@openremote/core 1.8.0-snapshot.20250723203453 → 1.8.0-snapshot.20250725070921
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 +2 -2
- package/dist/umd/index.bundle.js.map +1 -0
- package/dist/umd/index.js +2 -2
- package/dist/umd/index.js.map +1 -0
- package/dist/umd/index.orbundle.js +7 -6
- package/dist/umd/index.orbundle.js.map +1 -0
- package/lib/asset-mixin.d.ts +3 -3
- package/lib/asset-mixin.js +1 -1
- package/lib/console.js +1 -1
- package/lib/event.js +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/util.js +1 -1
- package/package.json +5 -5
- package/dist/umd/index.bundle.js.LICENSE.txt +0 -35
- package/dist/umd/index.js.LICENSE.txt +0 -31
- package/dist/umd/index.orbundle.js.LICENSE.txt +0 -47
package/dist/umd/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! For license information please see index.js.LICENSE.txt */
|
|
2
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("ORModel"),require("moment"),require("ORRest"),require("ORIcon")):"function"==typeof define&&define.amd?define(["ORModel","moment","ORRest","ORIcon"],t):"object"==typeof exports?exports.ORCore=t(require("ORModel"),require("moment"),require("ORRest"),require("ORIcon")):e.ORCore=t(e.ORModel,e.moment,e.ORRest,e.ORIcon)}(self,((e,t,n,r)=>(()=>{var o,i,a={256:(e,t,n)=>{"use strict";var r=n(795),o=n(772),i=o(r("String.prototype.indexOf"));e.exports=function(e,t){var n=r(e,!!t);return"function"==typeof n&&i(e,".prototype.")>-1?o(n):n}},772:(e,t,n)=>{"use strict";var r=n(200),o=n(795),i=n(328),a=n(352),s=o("%Function.prototype.apply%"),u=o("%Function.prototype.call%"),c=o("%Reflect.apply%",!0)||r.call(u,s),l=o("%Object.defineProperty%",!0),f=o("%Math.max%");if(l)try{l({},"a",{value:1})}catch(e){l=null}e.exports=function(e){if("function"!=typeof e)throw new a("a function is required");var t=c(r,u,arguments);return i(t,1+f(0,e.length-(arguments.length-1)),!0)};var p=function(){return c(r,s,arguments)};l?l(e.exports,"apply",{value:p}):e.exports.apply=p},388:function(e,t){var n="undefined"!=typeof self?self:this,r=function(){function e(){this.fetch=!1,this.DOMException=n.DOMException}return e.prototype=n,new e}();!function(e){!function(t){var n="URLSearchParams"in e,r="Symbol"in e&&"iterator"in Symbol,o="FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),i="FormData"in e,a="ArrayBuffer"in e;if(a)var s=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],u=ArrayBuffer.isView||function(e){return e&&s.indexOf(Object.prototype.toString.call(e))>-1};function c(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function l(e){return"string"!=typeof e&&(e=String(e)),e}function f(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return r&&(t[Symbol.iterator]=function(){return t}),t}function p(e){this.map={},e instanceof p?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function h(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function d(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function g(e){var t=new FileReader,n=d(t);return t.readAsArrayBuffer(e),n}function v(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function y(){return this.bodyUsed=!1,this._initBody=function(e){var t;this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:o&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:i&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:n&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():a&&o&&(t=e)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=v(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):a&&(ArrayBuffer.prototype.isPrototypeOf(e)||u(e))?this._bodyArrayBuffer=v(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):n&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},o&&(this.blob=function(){var e=h(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?h(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(g)}),this.text=function(){var e,t,n,r=h(this);if(r)return r;if(this._bodyBlob)return e=this._bodyBlob,n=d(t=new FileReader),t.readAsText(e),n;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r<t.length;r++)n[r]=String.fromCharCode(t[r]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},i&&(this.formData=function(){return this.text().then(_)}),this.json=function(){return this.text().then(JSON.parse)},this}p.prototype.append=function(e,t){e=c(e),t=l(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},p.prototype.delete=function(e){delete this.map[c(e)]},p.prototype.get=function(e){return e=c(e),this.has(e)?this.map[e]:null},p.prototype.has=function(e){return this.map.hasOwnProperty(c(e))},p.prototype.set=function(e,t){this.map[c(e)]=l(t)},p.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},p.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),f(e)},p.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),f(e)},p.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),f(e)},r&&(p.prototype[Symbol.iterator]=p.prototype.entries);var b=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function m(e,t){var n,r,o=(t=t||{}).body;if(e instanceof m){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new p(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,o||null==e._bodyInit||(o=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",!t.headers&&this.headers||(this.headers=new p(t.headers)),this.method=(r=(n=t.method||this.method||"GET").toUpperCase(),b.indexOf(r)>-1?r:n),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&o)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(o)}function _(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),o=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(o))}})),t}function w(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new p(t.headers),this.url=t.url||"",this._initBody(e)}m.prototype.clone=function(){return new m(this,{body:this._bodyInit})},y.call(m.prototype),y.call(w.prototype),w.prototype.clone=function(){return new w(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new p(this.headers),url:this.url})},w.error=function(){var e=new w(null,{status:0,statusText:""});return e.type="error",e};var S=[301,302,303,307,308];w.redirect=function(e,t){if(-1===S.indexOf(t))throw new RangeError("Invalid status code");return new w(null,{status:t,headers:{location:e}})},t.DOMException=e.DOMException;try{new t.DOMException}catch(e){t.DOMException=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function k(e,n){return new Promise((function(r,i){var a=new m(e,n);if(a.signal&&a.signal.aborted)return i(new t.DOMException("Aborted","AbortError"));var s=new XMLHttpRequest;function u(){s.abort()}s.onload=function(){var e,t,n={status:s.status,statusText:s.statusText,headers:(e=s.getAllResponseHeaders()||"",t=new p,e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(e){var n=e.split(":"),r=n.shift().trim();if(r){var o=n.join(":").trim();t.append(r,o)}})),t)};n.url="responseURL"in s?s.responseURL:n.headers.get("X-Request-URL");var o="response"in s?s.response:s.responseText;r(new w(o,n))},s.onerror=function(){i(new TypeError("Network request failed"))},s.ontimeout=function(){i(new TypeError("Network request failed"))},s.onabort=function(){i(new t.DOMException("Aborted","AbortError"))},s.open(a.method,a.url,!0),"include"===a.credentials?s.withCredentials=!0:"omit"===a.credentials&&(s.withCredentials=!1),"responseType"in s&&o&&(s.responseType="blob"),a.headers.forEach((function(e,t){s.setRequestHeader(t,e)})),a.signal&&(a.signal.addEventListener("abort",u),s.onreadystatechange=function(){4===s.readyState&&a.signal.removeEventListener("abort",u)}),s.send(void 0===a._bodyInit?null:a._bodyInit)}))}k.polyfill=!0,e.fetch||(e.fetch=k,e.Headers=p,e.Request=m,e.Response=w),t.Headers=p,t.Request=m,t.Response=w,t.fetch=k,Object.defineProperty(t,"__esModule",{value:!0})}({})}(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var o=r;(t=o.fetch).default=o.fetch,t.fetch=o.fetch,t.Headers=o.Headers,t.Request=o.Request,t.Response=o.Response,e.exports=t},780:(e,t,n)=>{"use strict";var r=n(579)(),o=n(795),i=r&&o("%Object.defineProperty%",!0);if(i)try{i({},"a",{value:1})}catch(e){i=!1}var a=n(568),s=n(352),u=n(36);e.exports=function(e,t,n){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new s("`obj` must be an object or a function`");if("string"!=typeof t&&"symbol"!=typeof t)throw new s("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new s("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new s("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new s("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new s("`loose`, if provided, must be a boolean");var r=arguments.length>3?arguments[3]:null,o=arguments.length>4?arguments[4]:null,c=arguments.length>5?arguments[5]:null,l=arguments.length>6&&arguments[6],f=!!u&&u(e,t);if(i)i(e,t,{configurable:null===c&&f?f.configurable:!c,enumerable:null===r&&f?f.enumerable:!r,value:n,writable:null===o&&f?f.writable:!o});else{if(!l&&(r||o||c))throw new a("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");e[t]=n}}},648:e=>{"use strict";e.exports=EvalError},212:e=>{"use strict";e.exports=Error},500:e=>{"use strict";e.exports=RangeError},276:e=>{"use strict";e.exports=ReferenceError},568:e=>{"use strict";e.exports=SyntaxError},352:e=>{"use strict";e.exports=TypeError},160:e=>{"use strict";e.exports=URIError},432:e=>{"use strict";var t=Object.prototype.toString,n=Math.max,r=function(e,t){for(var n=[],r=0;r<e.length;r+=1)n[r]=e[r];for(var o=0;o<t.length;o+=1)n[o+e.length]=t[o];return n};e.exports=function(e){var o=this;if("function"!=typeof o||"[object Function]"!==t.apply(o))throw new TypeError("Function.prototype.bind called on incompatible "+o);for(var i,a=function(e,t){for(var n=[],r=1,o=0;r<e.length;r+=1,o+=1)n[o]=e[r];return n}(arguments),s=n(0,o.length-a.length),u=[],c=0;c<s;c++)u[c]="$"+c;if(i=Function("binder","return function ("+function(e,t){for(var n="",r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=",");return n}(u)+"){ return binder.apply(this,arguments); }")((function(){if(this instanceof i){var t=o.apply(this,r(a,arguments));return Object(t)===t?t:this}return o.apply(e,r(a,arguments))})),o.prototype){var l=function(){};l.prototype=o.prototype,i.prototype=new l,l.prototype=null}return i}},200:(e,t,n)=>{"use strict";var r=n(432);e.exports=Function.prototype.bind||r},795:(e,t,n)=>{"use strict";var r,o=n(212),i=n(648),a=n(500),s=n(276),u=n(568),c=n(352),l=n(160),f=Function,p=function(e){try{return f('"use strict"; return ('+e+").constructor;")()}catch(e){}},h=Object.getOwnPropertyDescriptor;if(h)try{h({},"")}catch(e){h=null}var d=function(){throw new c},g=h?function(){try{return d}catch(e){try{return h(arguments,"callee").get}catch(e){return d}}}():d,v=n(832)(),y=n(528)(),b=Object.getPrototypeOf||(y?function(e){return e.__proto__}:null),m={},_="undefined"!=typeof Uint8Array&&b?b(Uint8Array):r,w={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?r:ArrayBuffer,"%ArrayIteratorPrototype%":v&&b?b([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":m,"%AsyncGenerator%":m,"%AsyncGeneratorFunction%":m,"%AsyncIteratorPrototype%":m,"%Atomics%":"undefined"==typeof Atomics?r:Atomics,"%BigInt%":"undefined"==typeof BigInt?r:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?r:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":o,"%eval%":eval,"%EvalError%":i,"%Float32Array%":"undefined"==typeof Float32Array?r:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?r:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?r:FinalizationRegistry,"%Function%":f,"%GeneratorFunction%":m,"%Int8Array%":"undefined"==typeof Int8Array?r:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?r:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":v&&b?b(b([][Symbol.iterator]())):r,"%JSON%":"object"==typeof JSON?JSON:r,"%Map%":"undefined"==typeof Map?r:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&v&&b?b((new Map)[Symbol.iterator]()):r,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?r:Promise,"%Proxy%":"undefined"==typeof Proxy?r:Proxy,"%RangeError%":a,"%ReferenceError%":s,"%Reflect%":"undefined"==typeof Reflect?r:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?r:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&v&&b?b((new Set)[Symbol.iterator]()):r,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":v&&b?b(""[Symbol.iterator]()):r,"%Symbol%":v?Symbol:r,"%SyntaxError%":u,"%ThrowTypeError%":g,"%TypedArray%":_,"%TypeError%":c,"%Uint8Array%":"undefined"==typeof Uint8Array?r:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?r:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?r:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?r:Uint32Array,"%URIError%":l,"%WeakMap%":"undefined"==typeof WeakMap?r:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?r:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?r:WeakSet};if(b)try{null.error}catch(e){var S=b(b(e));w["%Error.prototype%"]=S}var k=function e(t){var n;if("%AsyncFunction%"===t)n=p("async function () {}");else if("%GeneratorFunction%"===t)n=p("function* () {}");else if("%AsyncGeneratorFunction%"===t)n=p("async function* () {}");else if("%AsyncGenerator%"===t){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&b&&(n=b(o.prototype))}return w[t]=n,n},O={__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"]},E=n(200),x=n(504),A=E.call(Function.call,Array.prototype.concat),R=E.call(Function.apply,Array.prototype.splice),P=E.call(Function.call,String.prototype.replace),C=E.call(Function.call,String.prototype.slice),I=E.call(Function.call,RegExp.prototype.exec),j=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,T=/\\(\\)?/g,N=function(e,t){var n,r=e;if(x(O,r)&&(r="%"+(n=O[r])[0]+"%"),x(w,r)){var o=w[r];if(o===m&&(o=k(r)),void 0===o&&!t)throw new c("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:r,value:o}}throw new u("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new c("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===I(/^%?[^%]*%?$/,e))throw new u("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=function(e){var t=C(e,0,1),n=C(e,-1);if("%"===t&&"%"!==n)throw new u("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new u("invalid intrinsic syntax, expected opening `%`");var r=[];return P(e,j,(function(e,t,n,o){r[r.length]=n?P(o,T,"$1"):t||e})),r}(e),r=n.length>0?n[0]:"",o=N("%"+r+"%",t),i=o.name,a=o.value,s=!1,l=o.alias;l&&(r=l[0],R(n,A([0,1],l)));for(var f=1,p=!0;f<n.length;f+=1){var d=n[f],g=C(d,0,1),v=C(d,-1);if(('"'===g||"'"===g||"`"===g||'"'===v||"'"===v||"`"===v)&&g!==v)throw new u("property names with quotes must have matching quotes");if("constructor"!==d&&p||(s=!0),x(w,i="%"+(r+="."+d)+"%"))a=w[i];else if(null!=a){if(!(d in a)){if(!t)throw new c("base intrinsic for "+e+" exists, but the property is not available.");return}if(h&&f+1>=n.length){var y=h(a,d);a=(p=!!y)&&"get"in y&&!("originalValue"in y.get)?y.get:a[d]}else p=x(a,d),a=a[d];p&&!s&&(w[i]=a)}}return a}},36:(e,t,n)=>{"use strict";var r=n(795)("%Object.getOwnPropertyDescriptor%",!0);if(r)try{r([],"length")}catch(e){r=null}e.exports=r},579:(e,t,n)=>{"use strict";var r=n(795)("%Object.defineProperty%",!0),o=function(){if(r)try{return r({},"a",{value:1}),!0}catch(e){return!1}return!1};o.hasArrayLengthDefineBug=function(){if(!o())return null;try{return 1!==r([],"length",{value:1}).length}catch(e){return!0}},e.exports=o},528:e=>{"use strict";var t={foo:{}},n=Object;e.exports=function(){return{__proto__:t}.foo===t.foo&&!({__proto__:null}instanceof n)}},832:(e,t,n)=>{"use strict";var r="undefined"!=typeof Symbol&&Symbol,o=n(632);e.exports=function(){return"function"==typeof r&&"function"==typeof Symbol&&"symbol"==typeof r("foo")&&"symbol"==typeof Symbol("bar")&&o()}},632: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"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},504:(e,t,n)=>{"use strict";var r=Function.prototype.call,o=Object.prototype.hasOwnProperty,i=n(200);e.exports=i.call(r,o)},964:(e,t,n)=>{var r;!function(){"use strict";var t="input is invalid type",o="object"==typeof window,i=o?window:{};i.JS_SHA256_NO_WINDOW&&(o=!1);var a=!o&&"object"==typeof self,s=!i.JS_SHA256_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node;s?i=n.g:a&&(i=self);var u=!i.JS_SHA256_NO_COMMON_JS&&e.exports,c=n.amdO,l=!i.JS_SHA256_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,f="0123456789abcdef".split(""),p=[-2147483648,8388608,32768,128],h=[24,16,8,0],d=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],g=["hex","array","digest","arrayBuffer"],v=[];!i.JS_SHA256_NO_NODE_JS&&Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),!l||!i.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(n){return new S(t,!0).update(n)[e]()}},b=function(e){var t=y("hex",e);s&&(t=m(t,e)),t.create=function(){return new S(e)},t.update=function(e){return t.create().update(e)};for(var n=0;n<g.length;++n){var r=g[n];t[r]=y(r,e)}return t},m=function(e,r){var o,a=n(164),s=n(248).Buffer,u=r?"sha224":"sha256";return o=s.from&&!i.JS_SHA256_NO_BUFFER_FROM?s.from:function(e){return new s(e)},function(n){if("string"==typeof n)return a.createHash(u).update(n,"utf8").digest("hex");if(null==n)throw new Error(t);return n.constructor===ArrayBuffer&&(n=new Uint8Array(n)),Array.isArray(n)||ArrayBuffer.isView(n)||n.constructor===s?a.createHash(u).update(o(n)).digest("hex"):e(n)}},_=function(e,t){return function(n,r){return new k(n,t,!0).update(r)[e]()}},w=function(e){var t=_("hex",e);t.create=function(t){return new k(t,e)},t.update=function(e,n){return t.create(e).update(n)};for(var n=0;n<g.length;++n){var r=g[n];t[r]=_(r,e)}return t};function S(e,t){t?(v[0]=v[16]=v[1]=v[2]=v[3]=v[4]=v[5]=v[6]=v[7]=v[8]=v[9]=v[10]=v[11]=v[12]=v[13]=v[14]=v[15]=0,this.blocks=v):this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],e?(this.h0=3238371032,this.h1=914150663,this.h2=812702999,this.h3=4144912697,this.h4=4290775857,this.h5=1750603025,this.h6=1694076839,this.h7=3204075428):(this.h0=1779033703,this.h1=3144134277,this.h2=1013904242,this.h3=2773480762,this.h4=1359893119,this.h5=2600822924,this.h6=528734635,this.h7=1541459225),this.block=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0,this.is224=e}function k(e,n,r){var o,i=typeof e;if("string"===i){var a,s=[],u=e.length,c=0;for(o=0;o<u;++o)(a=e.charCodeAt(o))<128?s[c++]=a:a<2048?(s[c++]=192|a>>>6,s[c++]=128|63&a):a<55296||a>=57344?(s[c++]=224|a>>>12,s[c++]=128|a>>>6&63,s[c++]=128|63&a):(a=65536+((1023&a)<<10|1023&e.charCodeAt(++o)),s[c++]=240|a>>>18,s[c++]=128|a>>>12&63,s[c++]=128|a>>>6&63,s[c++]=128|63&a);e=s}else{if("object"!==i)throw new Error(t);if(null===e)throw new Error(t);if(l&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||l&&ArrayBuffer.isView(e)))throw new Error(t)}e.length>64&&(e=new S(n,!0).update(e).array());var f=[],p=[];for(o=0;o<64;++o){var h=e[o]||0;f[o]=92^h,p[o]=54^h}S.call(this,n,r),this.update(p),this.oKeyPad=f,this.inner=!0,this.sharedMemory=r}S.prototype.update=function(e){if(!this.finalized){var n,r=typeof e;if("string"!==r){if("object"!==r)throw new Error(t);if(null===e)throw new Error(t);if(l&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||l&&ArrayBuffer.isView(e)))throw new Error(t);n=!0}for(var o,i,a=0,s=e.length,u=this.blocks;a<s;){if(this.hashed&&(this.hashed=!1,u[0]=this.block,this.block=u[16]=u[1]=u[2]=u[3]=u[4]=u[5]=u[6]=u[7]=u[8]=u[9]=u[10]=u[11]=u[12]=u[13]=u[14]=u[15]=0),n)for(i=this.start;a<s&&i<64;++a)u[i>>>2]|=e[a]<<h[3&i++];else for(i=this.start;a<s&&i<64;++a)(o=e.charCodeAt(a))<128?u[i>>>2]|=o<<h[3&i++]:o<2048?(u[i>>>2]|=(192|o>>>6)<<h[3&i++],u[i>>>2]|=(128|63&o)<<h[3&i++]):o<55296||o>=57344?(u[i>>>2]|=(224|o>>>12)<<h[3&i++],u[i>>>2]|=(128|o>>>6&63)<<h[3&i++],u[i>>>2]|=(128|63&o)<<h[3&i++]):(o=65536+((1023&o)<<10|1023&e.charCodeAt(++a)),u[i>>>2]|=(240|o>>>18)<<h[3&i++],u[i>>>2]|=(128|o>>>12&63)<<h[3&i++],u[i>>>2]|=(128|o>>>6&63)<<h[3&i++],u[i>>>2]|=(128|63&o)<<h[3&i++]);this.lastByteIndex=i,this.bytes+=i-this.start,i>=64?(this.block=u[16],this.start=i-64,this.hash(),this.hashed=!0):this.start=i}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),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]|=p[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,n,r,o,i,a,s,u,c=this.h0,l=this.h1,f=this.h2,p=this.h3,h=this.h4,g=this.h5,v=this.h6,y=this.h7,b=this.blocks;for(e=16;e<64;++e)t=((o=b[e-15])>>>7|o<<25)^(o>>>18|o<<14)^o>>>3,n=((o=b[e-2])>>>17|o<<15)^(o>>>19|o<<13)^o>>>10,b[e]=b[e-16]+t+b[e-7]+n<<0;for(u=l&f,e=0;e<64;e+=4)this.first?(this.is224?(i=300032,y=(o=b[0]-1413257819)-150054599<<0,p=o+24177077<<0):(i=704751109,y=(o=b[0]-210244248)-1521486534<<0,p=o+143694565<<0),this.first=!1):(t=(c>>>2|c<<30)^(c>>>13|c<<19)^(c>>>22|c<<10),r=(i=c&l)^c&f^u,y=p+(o=y+(n=(h>>>6|h<<26)^(h>>>11|h<<21)^(h>>>25|h<<7))+(h&g^~h&v)+d[e]+b[e])<<0,p=o+(t+r)<<0),t=(p>>>2|p<<30)^(p>>>13|p<<19)^(p>>>22|p<<10),r=(a=p&c)^p&l^i,v=f+(o=v+(n=(y>>>6|y<<26)^(y>>>11|y<<21)^(y>>>25|y<<7))+(y&h^~y&g)+d[e+1]+b[e+1])<<0,t=((f=o+(t+r)<<0)>>>2|f<<30)^(f>>>13|f<<19)^(f>>>22|f<<10),r=(s=f&p)^f&c^a,g=l+(o=g+(n=(v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+(v&y^~v&h)+d[e+2]+b[e+2])<<0,t=((l=o+(t+r)<<0)>>>2|l<<30)^(l>>>13|l<<19)^(l>>>22|l<<10),r=(u=l&f)^l&p^s,h=c+(o=h+(n=(g>>>6|g<<26)^(g>>>11|g<<21)^(g>>>25|g<<7))+(g&v^~g&y)+d[e+3]+b[e+3])<<0,c=o+(t+r)<<0,this.chromeBugWorkAround=!0;this.h0=this.h0+c<<0,this.h1=this.h1+l<<0,this.h2=this.h2+f<<0,this.h3=this.h3+p<<0,this.h4=this.h4+h<<0,this.h5=this.h5+g<<0,this.h6=this.h6+v<<0,this.h7=this.h7+y<<0},S.prototype.hex=function(){this.finalize();var e=this.h0,t=this.h1,n=this.h2,r=this.h3,o=this.h4,i=this.h5,a=this.h6,s=this.h7,u=f[e>>>28&15]+f[e>>>24&15]+f[e>>>20&15]+f[e>>>16&15]+f[e>>>12&15]+f[e>>>8&15]+f[e>>>4&15]+f[15&e]+f[t>>>28&15]+f[t>>>24&15]+f[t>>>20&15]+f[t>>>16&15]+f[t>>>12&15]+f[t>>>8&15]+f[t>>>4&15]+f[15&t]+f[n>>>28&15]+f[n>>>24&15]+f[n>>>20&15]+f[n>>>16&15]+f[n>>>12&15]+f[n>>>8&15]+f[n>>>4&15]+f[15&n]+f[r>>>28&15]+f[r>>>24&15]+f[r>>>20&15]+f[r>>>16&15]+f[r>>>12&15]+f[r>>>8&15]+f[r>>>4&15]+f[15&r]+f[o>>>28&15]+f[o>>>24&15]+f[o>>>20&15]+f[o>>>16&15]+f[o>>>12&15]+f[o>>>8&15]+f[o>>>4&15]+f[15&o]+f[i>>>28&15]+f[i>>>24&15]+f[i>>>20&15]+f[i>>>16&15]+f[i>>>12&15]+f[i>>>8&15]+f[i>>>4&15]+f[15&i]+f[a>>>28&15]+f[a>>>24&15]+f[a>>>20&15]+f[a>>>16&15]+f[a>>>12&15]+f[a>>>8&15]+f[a>>>4&15]+f[15&a];return this.is224||(u+=f[s>>>28&15]+f[s>>>24&15]+f[s>>>20&15]+f[s>>>16&15]+f[s>>>12&15]+f[s>>>8&15]+f[s>>>4&15]+f[15&s]),u},S.prototype.toString=S.prototype.hex,S.prototype.digest=function(){this.finalize();var e=this.h0,t=this.h1,n=this.h2,r=this.h3,o=this.h4,i=this.h5,a=this.h6,s=this.h7,u=[e>>>24&255,e>>>16&255,e>>>8&255,255&e,t>>>24&255,t>>>16&255,t>>>8&255,255&t,n>>>24&255,n>>>16&255,n>>>8&255,255&n,r>>>24&255,r>>>16&255,r>>>8&255,255&r,o>>>24&255,o>>>16&255,o>>>8&255,255&o,i>>>24&255,i>>>16&255,i>>>8&255,255&i,a>>>24&255,a>>>16&255,a>>>8&255,255&a];return this.is224||u.push(s>>>24&255,s>>>16&255,s>>>8&255,255&s),u},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},k.prototype=new S,k.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 O=b();O.sha256=O,O.sha224=b(!0),O.sha256.hmac=w(),O.sha224.hmac=w(!0),u?e.exports=O:(i.sha256=O.sha256,i.sha224=O.sha224,c&&(void 0===(r=function(){return O}.call(O,n,O,e))||(e.exports=r)))}()},944:function(e,t,n){var r;e=n.nmd(e),function(){var o,i="Expected a function",a="__lodash_hash_undefined__",s="__lodash_placeholder__",u=32,c=128,l=1/0,f=9007199254740991,p=NaN,h=4294967295,d=[["ary",c],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",u],["partialRight",64],["rearg",256]],g="[object Arguments]",v="[object Array]",y="[object Boolean]",b="[object Date]",m="[object Error]",_="[object Function]",w="[object GeneratorFunction]",S="[object Map]",k="[object Number]",O="[object Object]",E="[object Promise]",x="[object RegExp]",A="[object Set]",R="[object String]",P="[object Symbol]",C="[object WeakMap]",I="[object ArrayBuffer]",j="[object DataView]",T="[object Float32Array]",N="[object Float64Array]",L="[object Int8Array]",U="[object Int16Array]",D="[object Int32Array]",M="[object Uint8Array]",F="[object Uint8ClampedArray]",B="[object Uint16Array]",W="[object Uint32Array]",V=/\b__p \+= '';/g,H=/\b(__p \+=) '' \+/g,q=/(__e\(.*?\)|\b__t\)) \+\n'';/g,z=/&(?:amp|lt|gt|quot|#39);/g,K=/[&<>"']/g,G=RegExp(z.source),$=RegExp(K.source),J=/<%-([\s\S]+?)%>/g,Y=/<%([\s\S]+?)%>/g,X=/<%=([\s\S]+?)%>/g,Q=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Z=/^\w*$/,ee=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,te=/[\\^$.*+?()[\]{}|]/g,ne=RegExp(te.source),re=/^\s+/,oe=/\s/,ie=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ae=/\{\n\/\* \[wrapped with (.+)\] \*/,se=/,? & /,ue=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ce=/[()=,{}\[\]\/\s]/,le=/\\(\\)?/g,fe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,pe=/\w*$/,he=/^[-+]0x[0-9a-f]+$/i,de=/^0b[01]+$/i,ge=/^\[object .+?Constructor\]$/,ve=/^0o[0-7]+$/i,ye=/^(?:0|[1-9]\d*)$/,be=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,me=/($^)/,_e=/['\n\r\u2028\u2029\\]/g,we="\\ud800-\\udfff",Se="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",ke="\\u2700-\\u27bf",Oe="a-z\\xdf-\\xf6\\xf8-\\xff",Ee="A-Z\\xc0-\\xd6\\xd8-\\xde",xe="\\ufe0e\\ufe0f",Ae="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Re="["+we+"]",Pe="["+Ae+"]",Ce="["+Se+"]",Ie="\\d+",je="["+ke+"]",Te="["+Oe+"]",Ne="[^"+we+Ae+Ie+ke+Oe+Ee+"]",Le="\\ud83c[\\udffb-\\udfff]",Ue="[^"+we+"]",De="(?:\\ud83c[\\udde6-\\uddff]){2}",Me="[\\ud800-\\udbff][\\udc00-\\udfff]",Fe="["+Ee+"]",Be="\\u200d",We="(?:"+Te+"|"+Ne+")",Ve="(?:"+Fe+"|"+Ne+")",He="(?:['’](?:d|ll|m|re|s|t|ve))?",qe="(?:['’](?:D|LL|M|RE|S|T|VE))?",ze="(?:"+Ce+"|"+Le+")?",Ke="["+xe+"]?",Ge=Ke+ze+"(?:"+Be+"(?:"+[Ue,De,Me].join("|")+")"+Ke+ze+")*",$e="(?:"+[je,De,Me].join("|")+")"+Ge,Je="(?:"+[Ue+Ce+"?",Ce,De,Me,Re].join("|")+")",Ye=RegExp("['’]","g"),Xe=RegExp(Ce,"g"),Qe=RegExp(Le+"(?="+Le+")|"+Je+Ge,"g"),Ze=RegExp([Fe+"?"+Te+"+"+He+"(?="+[Pe,Fe,"$"].join("|")+")",Ve+"+"+qe+"(?="+[Pe,Fe+We,"$"].join("|")+")",Fe+"?"+We+"+"+He,Fe+"+"+qe,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ie,$e].join("|"),"g"),et=RegExp("["+Be+we+Se+xe+"]"),tt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,nt=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],rt=-1,ot={};ot[T]=ot[N]=ot[L]=ot[U]=ot[D]=ot[M]=ot[F]=ot[B]=ot[W]=!0,ot[g]=ot[v]=ot[I]=ot[y]=ot[j]=ot[b]=ot[m]=ot[_]=ot[S]=ot[k]=ot[O]=ot[x]=ot[A]=ot[R]=ot[C]=!1;var it={};it[g]=it[v]=it[I]=it[j]=it[y]=it[b]=it[T]=it[N]=it[L]=it[U]=it[D]=it[S]=it[k]=it[O]=it[x]=it[A]=it[R]=it[P]=it[M]=it[F]=it[B]=it[W]=!0,it[m]=it[_]=it[C]=!1;var at={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},st=parseFloat,ut=parseInt,ct="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,lt="object"==typeof self&&self&&self.Object===Object&&self,ft=ct||lt||Function("return this")(),pt=t&&!t.nodeType&&t,ht=pt&&e&&!e.nodeType&&e,dt=ht&&ht.exports===pt,gt=dt&&ct.process,vt=function(){try{return ht&&ht.require&&ht.require("util").types||gt&>.binding&>.binding("util")}catch(e){}}(),yt=vt&&vt.isArrayBuffer,bt=vt&&vt.isDate,mt=vt&&vt.isMap,_t=vt&&vt.isRegExp,wt=vt&&vt.isSet,St=vt&&vt.isTypedArray;function kt(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function Ot(e,t,n,r){for(var o=-1,i=null==e?0:e.length;++o<i;){var a=e[o];t(r,a,n(a),e)}return r}function Et(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function xt(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function At(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function Rt(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i}function Pt(e,t){return!(null==e||!e.length)&&Ft(e,t,0)>-1}function Ct(e,t,n){for(var r=-1,o=null==e?0:e.length;++r<o;)if(n(t,e[r]))return!0;return!1}function It(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}function jt(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}function Tt(e,t,n,r){var o=-1,i=null==e?0:e.length;for(r&&i&&(n=e[++o]);++o<i;)n=t(n,e[o],o,e);return n}function Nt(e,t,n,r){var o=null==e?0:e.length;for(r&&o&&(n=e[--o]);o--;)n=t(n,e[o],o,e);return n}function Lt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var Ut=Ht("length");function Dt(e,t,n){var r;return n(e,(function(e,n,o){if(t(e,n,o))return r=n,!1})),r}function Mt(e,t,n,r){for(var o=e.length,i=n+(r?1:-1);r?i--:++i<o;)if(t(e[i],i,e))return i;return-1}function Ft(e,t,n){return t==t?function(e,t,n){for(var r=n-1,o=e.length;++r<o;)if(e[r]===t)return r;return-1}(e,t,n):Mt(e,Wt,n)}function Bt(e,t,n,r){for(var o=n-1,i=e.length;++o<i;)if(r(e[o],t))return o;return-1}function Wt(e){return e!=e}function Vt(e,t){var n=null==e?0:e.length;return n?Kt(e,t)/n:p}function Ht(e){return function(t){return null==t?o:t[e]}}function qt(e){return function(t){return null==e?o:e[t]}}function zt(e,t,n,r,o){return o(e,(function(e,o,i){n=r?(r=!1,e):t(n,e,o,i)})),n}function Kt(e,t){for(var n,r=-1,i=e.length;++r<i;){var a=t(e[r]);a!==o&&(n=n===o?a:n+a)}return n}function Gt(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function $t(e){return e?e.slice(0,pn(e)+1).replace(re,""):e}function Jt(e){return function(t){return e(t)}}function Yt(e,t){return It(t,(function(t){return e[t]}))}function Xt(e,t){return e.has(t)}function Qt(e,t){for(var n=-1,r=e.length;++n<r&&Ft(t,e[n],0)>-1;);return n}function Zt(e,t){for(var n=e.length;n--&&Ft(t,e[n],0)>-1;);return n}var en=qt({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),tn=qt({"&":"&","<":"<",">":">",'"':""","'":"'"});function nn(e){return"\\"+at[e]}function rn(e){return et.test(e)}function on(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function an(e,t){return function(n){return e(t(n))}}function sn(e,t){for(var n=-1,r=e.length,o=0,i=[];++n<r;){var a=e[n];a!==t&&a!==s||(e[n]=s,i[o++]=n)}return i}function un(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function cn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n}function ln(e){return rn(e)?function(e){for(var t=Qe.lastIndex=0;Qe.test(e);)++t;return t}(e):Ut(e)}function fn(e){return rn(e)?function(e){return e.match(Qe)||[]}(e):function(e){return e.split("")}(e)}function pn(e){for(var t=e.length;t--&&oe.test(e.charAt(t)););return t}var hn=qt({"&":"&","<":"<",">":">",""":'"',"'":"'"}),dn=function e(t){var n,r=(t=null==t?ft:dn.defaults(ft.Object(),t,dn.pick(ft,nt))).Array,oe=t.Date,we=t.Error,Se=t.Function,ke=t.Math,Oe=t.Object,Ee=t.RegExp,xe=t.String,Ae=t.TypeError,Re=r.prototype,Pe=Se.prototype,Ce=Oe.prototype,Ie=t["__core-js_shared__"],je=Pe.toString,Te=Ce.hasOwnProperty,Ne=0,Le=(n=/[^.]+$/.exec(Ie&&Ie.keys&&Ie.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",Ue=Ce.toString,De=je.call(Oe),Me=ft._,Fe=Ee("^"+je.call(Te).replace(te,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Be=dt?t.Buffer:o,We=t.Symbol,Ve=t.Uint8Array,He=Be?Be.allocUnsafe:o,qe=an(Oe.getPrototypeOf,Oe),ze=Oe.create,Ke=Ce.propertyIsEnumerable,Ge=Re.splice,$e=We?We.isConcatSpreadable:o,Je=We?We.iterator:o,Qe=We?We.toStringTag:o,et=function(){try{var e=ci(Oe,"defineProperty");return e({},"",{}),e}catch(e){}}(),at=t.clearTimeout!==ft.clearTimeout&&t.clearTimeout,ct=oe&&oe.now!==ft.Date.now&&oe.now,lt=t.setTimeout!==ft.setTimeout&&t.setTimeout,pt=ke.ceil,ht=ke.floor,gt=Oe.getOwnPropertySymbols,vt=Be?Be.isBuffer:o,Ut=t.isFinite,qt=Re.join,gn=an(Oe.keys,Oe),vn=ke.max,yn=ke.min,bn=oe.now,mn=t.parseInt,_n=ke.random,wn=Re.reverse,Sn=ci(t,"DataView"),kn=ci(t,"Map"),On=ci(t,"Promise"),En=ci(t,"Set"),xn=ci(t,"WeakMap"),An=ci(Oe,"create"),Rn=xn&&new xn,Pn={},Cn=Di(Sn),In=Di(kn),jn=Di(On),Tn=Di(En),Nn=Di(xn),Ln=We?We.prototype:o,Un=Ln?Ln.valueOf:o,Dn=Ln?Ln.toString:o;function Mn(e){if(es(e)&&!Ha(e)&&!(e instanceof Vn)){if(e instanceof Wn)return e;if(Te.call(e,"__wrapped__"))return Mi(e)}return new Wn(e)}var Fn=function(){function e(){}return function(t){if(!Za(t))return{};if(ze)return ze(t);e.prototype=t;var n=new e;return e.prototype=o,n}}();function Bn(){}function Wn(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=o}function Vn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=h,this.__views__=[]}function Hn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function qn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function zn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Kn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new zn;++t<n;)this.add(e[t])}function Gn(e){var t=this.__data__=new qn(e);this.size=t.size}function $n(e,t){var n=Ha(e),r=!n&&Va(e),o=!n&&!r&&Ga(e),i=!n&&!r&&!o&&us(e),a=n||r||o||i,s=a?Gt(e.length,xe):[],u=s.length;for(var c in e)!t&&!Te.call(e,c)||a&&("length"==c||o&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||vi(c,u))||s.push(c);return s}function Jn(e){var t=e.length;return t?e[zr(0,t-1)]:o}function Yn(e,t){return ji(Ao(e),ir(t,0,e.length))}function Xn(e){return ji(Ao(e))}function Qn(e,t,n){(n!==o&&!Fa(e[t],n)||n===o&&!(t in e))&&rr(e,t,n)}function Zn(e,t,n){var r=e[t];Te.call(e,t)&&Fa(r,n)&&(n!==o||t in e)||rr(e,t,n)}function er(e,t){for(var n=e.length;n--;)if(Fa(e[n][0],t))return n;return-1}function tr(e,t,n,r){return lr(e,(function(e,o,i){t(r,e,n(e),i)})),r}function nr(e,t){return e&&Ro(t,Cs(t),e)}function rr(e,t,n){"__proto__"==t&&et?et(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function or(e,t){for(var n=-1,i=t.length,a=r(i),s=null==e;++n<i;)a[n]=s?o:Es(e,t[n]);return a}function ir(e,t,n){return e==e&&(n!==o&&(e=e<=n?e:n),t!==o&&(e=e>=t?e:t)),e}function ar(e,t,n,r,i,a){var s,u=1&t,c=2&t,l=4&t;if(n&&(s=i?n(e,r,i,a):n(e)),s!==o)return s;if(!Za(e))return e;var f=Ha(e);if(f){if(s=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&Te.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!u)return Ao(e,s)}else{var p=pi(e),h=p==_||p==w;if(Ga(e))return wo(e,u);if(p==O||p==g||h&&!i){if(s=c||h?{}:di(e),!u)return c?function(e,t){return Ro(e,fi(e),t)}(e,function(e,t){return e&&Ro(t,Is(t),e)}(s,e)):function(e,t){return Ro(e,li(e),t)}(e,nr(s,e))}else{if(!it[p])return i?e:{};s=function(e,t,n){var r,o=e.constructor;switch(t){case I:return So(e);case y:case b:return new o(+e);case j:return function(e,t){var n=t?So(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case T:case N:case L:case U:case D:case M:case F:case B:case W:return ko(e,n);case S:return new o;case k:case R:return new o(e);case x:return function(e){var t=new e.constructor(e.source,pe.exec(e));return t.lastIndex=e.lastIndex,t}(e);case A:return new o;case P:return r=e,Un?Oe(Un.call(r)):{}}}(e,p,u)}}a||(a=new Gn);var d=a.get(e);if(d)return d;a.set(e,s),is(e)?e.forEach((function(r){s.add(ar(r,t,n,r,e,a))})):ts(e)&&e.forEach((function(r,o){s.set(o,ar(r,t,n,o,e,a))}));var v=f?o:(l?c?ni:ti:c?Is:Cs)(e);return Et(v||e,(function(r,o){v&&(r=e[o=r]),Zn(s,o,ar(r,t,n,o,e,a))})),s}function sr(e,t,n){var r=n.length;if(null==e)return!r;for(e=Oe(e);r--;){var i=n[r],a=t[i],s=e[i];if(s===o&&!(i in e)||!a(s))return!1}return!0}function ur(e,t,n){if("function"!=typeof e)throw new Ae(i);return Ri((function(){e.apply(o,n)}),t)}function cr(e,t,n,r){var o=-1,i=Pt,a=!0,s=e.length,u=[],c=t.length;if(!s)return u;n&&(t=It(t,Jt(n))),r?(i=Ct,a=!1):t.length>=200&&(i=Xt,a=!1,t=new Kn(t));e:for(;++o<s;){var l=e[o],f=null==n?l:n(l);if(l=r||0!==l?l:0,a&&f==f){for(var p=c;p--;)if(t[p]===f)continue e;u.push(l)}else i(t,f,r)||u.push(l)}return u}Mn.templateSettings={escape:J,evaluate:Y,interpolate:X,variable:"",imports:{_:Mn}},Mn.prototype=Bn.prototype,Mn.prototype.constructor=Mn,Wn.prototype=Fn(Bn.prototype),Wn.prototype.constructor=Wn,Vn.prototype=Fn(Bn.prototype),Vn.prototype.constructor=Vn,Hn.prototype.clear=function(){this.__data__=An?An(null):{},this.size=0},Hn.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Hn.prototype.get=function(e){var t=this.__data__;if(An){var n=t[e];return n===a?o:n}return Te.call(t,e)?t[e]:o},Hn.prototype.has=function(e){var t=this.__data__;return An?t[e]!==o:Te.call(t,e)},Hn.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=An&&t===o?a:t,this},qn.prototype.clear=function(){this.__data__=[],this.size=0},qn.prototype.delete=function(e){var t=this.__data__,n=er(t,e);return!(n<0||(n==t.length-1?t.pop():Ge.call(t,n,1),--this.size,0))},qn.prototype.get=function(e){var t=this.__data__,n=er(t,e);return n<0?o:t[n][1]},qn.prototype.has=function(e){return er(this.__data__,e)>-1},qn.prototype.set=function(e,t){var n=this.__data__,r=er(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},zn.prototype.clear=function(){this.size=0,this.__data__={hash:new Hn,map:new(kn||qn),string:new Hn}},zn.prototype.delete=function(e){var t=si(this,e).delete(e);return this.size-=t?1:0,t},zn.prototype.get=function(e){return si(this,e).get(e)},zn.prototype.has=function(e){return si(this,e).has(e)},zn.prototype.set=function(e,t){var n=si(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Kn.prototype.add=Kn.prototype.push=function(e){return this.__data__.set(e,a),this},Kn.prototype.has=function(e){return this.__data__.has(e)},Gn.prototype.clear=function(){this.__data__=new qn,this.size=0},Gn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Gn.prototype.get=function(e){return this.__data__.get(e)},Gn.prototype.has=function(e){return this.__data__.has(e)},Gn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof qn){var r=n.__data__;if(!kn||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new zn(r)}return n.set(e,t),this.size=n.size,this};var lr=Io(br),fr=Io(mr,!0);function pr(e,t){var n=!0;return lr(e,(function(e,r,o){return n=!!t(e,r,o)})),n}function hr(e,t,n){for(var r=-1,i=e.length;++r<i;){var a=e[r],s=t(a);if(null!=s&&(u===o?s==s&&!ss(s):n(s,u)))var u=s,c=a}return c}function dr(e,t){var n=[];return lr(e,(function(e,r,o){t(e,r,o)&&n.push(e)})),n}function gr(e,t,n,r,o){var i=-1,a=e.length;for(n||(n=gi),o||(o=[]);++i<a;){var s=e[i];t>0&&n(s)?t>1?gr(s,t-1,n,r,o):jt(o,s):r||(o[o.length]=s)}return o}var vr=jo(),yr=jo(!0);function br(e,t){return e&&vr(e,t,Cs)}function mr(e,t){return e&&yr(e,t,Cs)}function _r(e,t){return Rt(t,(function(t){return Ya(e[t])}))}function wr(e,t){for(var n=0,r=(t=yo(t,e)).length;null!=e&&n<r;)e=e[Ui(t[n++])];return n&&n==r?e:o}function Sr(e,t,n){var r=t(e);return Ha(e)?r:jt(r,n(e))}function kr(e){return null==e?e===o?"[object Undefined]":"[object Null]":Qe&&Qe in Oe(e)?function(e){var t=Te.call(e,Qe),n=e[Qe];try{e[Qe]=o;var r=!0}catch(e){}var i=Ue.call(e);return r&&(t?e[Qe]=n:delete e[Qe]),i}(e):function(e){return Ue.call(e)}(e)}function Or(e,t){return e>t}function Er(e,t){return null!=e&&Te.call(e,t)}function xr(e,t){return null!=e&&t in Oe(e)}function Ar(e,t,n){for(var i=n?Ct:Pt,a=e[0].length,s=e.length,u=s,c=r(s),l=1/0,f=[];u--;){var p=e[u];u&&t&&(p=It(p,Jt(t))),l=yn(p.length,l),c[u]=!n&&(t||a>=120&&p.length>=120)?new Kn(u&&p):o}p=e[0];var h=-1,d=c[0];e:for(;++h<a&&f.length<l;){var g=p[h],v=t?t(g):g;if(g=n||0!==g?g:0,!(d?Xt(d,v):i(f,v,n))){for(u=s;--u;){var y=c[u];if(!(y?Xt(y,v):i(e[u],v,n)))continue e}d&&d.push(v),f.push(g)}}return f}function Rr(e,t,n){var r=null==(e=Ei(e,t=yo(t,e)))?e:e[Ui(Ji(t))];return null==r?o:kt(r,e,n)}function Pr(e){return es(e)&&kr(e)==g}function Cr(e,t,n,r,i){return e===t||(null==e||null==t||!es(e)&&!es(t)?e!=e&&t!=t:function(e,t,n,r,i,a){var s=Ha(e),u=Ha(t),c=s?v:pi(e),l=u?v:pi(t),f=(c=c==g?O:c)==O,p=(l=l==g?O:l)==O,h=c==l;if(h&&Ga(e)){if(!Ga(t))return!1;s=!0,f=!1}if(h&&!f)return a||(a=new Gn),s||us(e)?Zo(e,t,n,r,i,a):function(e,t,n,r,o,i,a){switch(n){case j:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case I:return!(e.byteLength!=t.byteLength||!i(new Ve(e),new Ve(t)));case y:case b:case k:return Fa(+e,+t);case m:return e.name==t.name&&e.message==t.message;case x:case R:return e==t+"";case S:var s=on;case A:var u=1&r;if(s||(s=un),e.size!=t.size&&!u)return!1;var c=a.get(e);if(c)return c==t;r|=2,a.set(e,t);var l=Zo(s(e),s(t),r,o,i,a);return a.delete(e),l;case P:if(Un)return Un.call(e)==Un.call(t)}return!1}(e,t,c,n,r,i,a);if(!(1&n)){var d=f&&Te.call(e,"__wrapped__"),_=p&&Te.call(t,"__wrapped__");if(d||_){var w=d?e.value():e,E=_?t.value():t;return a||(a=new Gn),i(w,E,n,r,a)}}return!!h&&(a||(a=new Gn),function(e,t,n,r,i,a){var s=1&n,u=ti(e),c=u.length;if(c!=ti(t).length&&!s)return!1;for(var l=c;l--;){var f=u[l];if(!(s?f in t:Te.call(t,f)))return!1}var p=a.get(e),h=a.get(t);if(p&&h)return p==t&&h==e;var d=!0;a.set(e,t),a.set(t,e);for(var g=s;++l<c;){var v=e[f=u[l]],y=t[f];if(r)var b=s?r(y,v,f,t,e,a):r(v,y,f,e,t,a);if(!(b===o?v===y||i(v,y,n,r,a):b)){d=!1;break}g||(g="constructor"==f)}if(d&&!g){var m=e.constructor,_=t.constructor;m==_||!("constructor"in e)||!("constructor"in t)||"function"==typeof m&&m instanceof m&&"function"==typeof _&&_ instanceof _||(d=!1)}return a.delete(e),a.delete(t),d}(e,t,n,r,i,a))}(e,t,n,r,Cr,i))}function Ir(e,t,n,r){var i=n.length,a=i,s=!r;if(null==e)return!a;for(e=Oe(e);i--;){var u=n[i];if(s&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++i<a;){var c=(u=n[i])[0],l=e[c],f=u[1];if(s&&u[2]){if(l===o&&!(c in e))return!1}else{var p=new Gn;if(r)var h=r(l,f,c,e,t,p);if(!(h===o?Cr(f,l,3,r,p):h))return!1}}return!0}function jr(e){return!(!Za(e)||(t=e,Le&&Le in t))&&(Ya(e)?Fe:ge).test(Di(e));var t}function Tr(e){return"function"==typeof e?e:null==e?nu:"object"==typeof e?Ha(e)?Mr(e[0],e[1]):Dr(e):fu(e)}function Nr(e){if(!wi(e))return gn(e);var t=[];for(var n in Oe(e))Te.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Lr(e,t){return e<t}function Ur(e,t){var n=-1,o=za(e)?r(e.length):[];return lr(e,(function(e,r,i){o[++n]=t(e,r,i)})),o}function Dr(e){var t=ui(e);return 1==t.length&&t[0][2]?ki(t[0][0],t[0][1]):function(n){return n===e||Ir(n,e,t)}}function Mr(e,t){return bi(e)&&Si(t)?ki(Ui(e),t):function(n){var r=Es(n,e);return r===o&&r===t?xs(n,e):Cr(t,r,3)}}function Fr(e,t,n,r,i){e!==t&&vr(t,(function(a,s){if(i||(i=new Gn),Za(a))!function(e,t,n,r,i,a,s){var u=xi(e,n),c=xi(t,n),l=s.get(c);if(l)Qn(e,n,l);else{var f=a?a(u,c,n+"",e,t,s):o,p=f===o;if(p){var h=Ha(c),d=!h&&Ga(c),g=!h&&!d&&us(c);f=c,h||d||g?Ha(u)?f=u:Ka(u)?f=Ao(u):d?(p=!1,f=wo(c,!0)):g?(p=!1,f=ko(c,!0)):f=[]:rs(c)||Va(c)?(f=u,Va(u)?f=vs(u):Za(u)&&!Ya(u)||(f=di(c))):p=!1}p&&(s.set(c,f),i(f,c,r,a,s),s.delete(c)),Qn(e,n,f)}}(e,t,s,n,Fr,r,i);else{var u=r?r(xi(e,s),a,s+"",e,t,i):o;u===o&&(u=a),Qn(e,s,u)}}),Is)}function Br(e,t){var n=e.length;if(n)return vi(t+=t<0?n:0,n)?e[t]:o}function Wr(e,t,n){t=t.length?It(t,(function(e){return Ha(e)?function(t){return wr(t,1===e.length?e[0]:e)}:e})):[nu];var r=-1;t=It(t,Jt(ai()));var o=Ur(e,(function(e,n,o){var i=It(t,(function(t){return t(e)}));return{criteria:i,index:++r,value:e}}));return function(e,t){var r=e.length;for(e.sort((function(e,t){return function(e,t,n){for(var r=-1,o=e.criteria,i=t.criteria,a=o.length,s=n.length;++r<a;){var u=Oo(o[r],i[r]);if(u)return r>=s?u:u*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)}));r--;)e[r]=e[r].value;return e}(o)}function Vr(e,t,n){for(var r=-1,o=t.length,i={};++r<o;){var a=t[r],s=wr(e,a);n(s,a)&&Yr(i,yo(a,e),s)}return i}function Hr(e,t,n,r){var o=r?Bt:Ft,i=-1,a=t.length,s=e;for(e===t&&(t=Ao(t)),n&&(s=It(e,Jt(n)));++i<a;)for(var u=0,c=t[i],l=n?n(c):c;(u=o(s,l,u,r))>-1;)s!==e&&Ge.call(s,u,1),Ge.call(e,u,1);return e}function qr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var o=t[n];if(n==r||o!==i){var i=o;vi(o)?Ge.call(e,o,1):uo(e,o)}}return e}function zr(e,t){return e+ht(_n()*(t-e+1))}function Kr(e,t){var n="";if(!e||t<1||t>f)return n;do{t%2&&(n+=e),(t=ht(t/2))&&(e+=e)}while(t);return n}function Gr(e,t){return Pi(Oi(e,t,nu),e+"")}function $r(e){return Jn(Fs(e))}function Jr(e,t){var n=Fs(e);return ji(n,ir(t,0,n.length))}function Yr(e,t,n,r){if(!Za(e))return e;for(var i=-1,a=(t=yo(t,e)).length,s=a-1,u=e;null!=u&&++i<a;){var c=Ui(t[i]),l=n;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;if(i!=s){var f=u[c];(l=r?r(f,c,u):o)===o&&(l=Za(f)?f:vi(t[i+1])?[]:{})}Zn(u,c,l),u=u[c]}return e}var Xr=Rn?function(e,t){return Rn.set(e,t),e}:nu,Qr=et?function(e,t){return et(e,"toString",{configurable:!0,enumerable:!1,value:Zs(t),writable:!0})}:nu;function Zr(e){return ji(Fs(e))}function eo(e,t,n){var o=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var a=r(i);++o<i;)a[o]=e[o+t];return a}function to(e,t){var n;return lr(e,(function(e,r,o){return!(n=t(e,r,o))})),!!n}function no(e,t,n){var r=0,o=null==e?r:e.length;if("number"==typeof t&&t==t&&o<=2147483647){for(;r<o;){var i=r+o>>>1,a=e[i];null!==a&&!ss(a)&&(n?a<=t:a<t)?r=i+1:o=i}return o}return ro(e,t,nu,n)}function ro(e,t,n,r){var i=0,a=null==e?0:e.length;if(0===a)return 0;for(var s=(t=n(t))!=t,u=null===t,c=ss(t),l=t===o;i<a;){var f=ht((i+a)/2),p=n(e[f]),h=p!==o,d=null===p,g=p==p,v=ss(p);if(s)var y=r||g;else y=l?g&&(r||h):u?g&&h&&(r||!d):c?g&&h&&!d&&(r||!v):!d&&!v&&(r?p<=t:p<t);y?i=f+1:a=f}return yn(a,4294967294)}function oo(e,t){for(var n=-1,r=e.length,o=0,i=[];++n<r;){var a=e[n],s=t?t(a):a;if(!n||!Fa(s,u)){var u=s;i[o++]=0===a?0:a}}return i}function io(e){return"number"==typeof e?e:ss(e)?p:+e}function ao(e){if("string"==typeof e)return e;if(Ha(e))return It(e,ao)+"";if(ss(e))return Dn?Dn.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function so(e,t,n){var r=-1,o=Pt,i=e.length,a=!0,s=[],u=s;if(n)a=!1,o=Ct;else if(i>=200){var c=t?null:Go(e);if(c)return un(c);a=!1,o=Xt,u=new Kn}else u=t?[]:s;e:for(;++r<i;){var l=e[r],f=t?t(l):l;if(l=n||0!==l?l:0,a&&f==f){for(var p=u.length;p--;)if(u[p]===f)continue e;t&&u.push(f),s.push(l)}else o(u,f,n)||(u!==s&&u.push(f),s.push(l))}return s}function uo(e,t){return null==(e=Ei(e,t=yo(t,e)))||delete e[Ui(Ji(t))]}function co(e,t,n,r){return Yr(e,t,n(wr(e,t)),r)}function lo(e,t,n,r){for(var o=e.length,i=r?o:-1;(r?i--:++i<o)&&t(e[i],i,e););return n?eo(e,r?0:i,r?i+1:o):eo(e,r?i+1:0,r?o:i)}function fo(e,t){var n=e;return n instanceof Vn&&(n=n.value()),Tt(t,(function(e,t){return t.func.apply(t.thisArg,jt([e],t.args))}),n)}function po(e,t,n){var o=e.length;if(o<2)return o?so(e[0]):[];for(var i=-1,a=r(o);++i<o;)for(var s=e[i],u=-1;++u<o;)u!=i&&(a[i]=cr(a[i]||s,e[u],t,n));return so(gr(a,1),t,n)}function ho(e,t,n){for(var r=-1,i=e.length,a=t.length,s={};++r<i;){var u=r<a?t[r]:o;n(s,e[r],u)}return s}function go(e){return Ka(e)?e:[]}function vo(e){return"function"==typeof e?e:nu}function yo(e,t){return Ha(e)?e:bi(e,t)?[e]:Li(ys(e))}var bo=Gr;function mo(e,t,n){var r=e.length;return n=n===o?r:n,!t&&n>=r?e:eo(e,t,n)}var _o=at||function(e){return ft.clearTimeout(e)};function wo(e,t){if(t)return e.slice();var n=e.length,r=He?He(n):new e.constructor(n);return e.copy(r),r}function So(e){var t=new e.constructor(e.byteLength);return new Ve(t).set(new Ve(e)),t}function ko(e,t){var n=t?So(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Oo(e,t){if(e!==t){var n=e!==o,r=null===e,i=e==e,a=ss(e),s=t!==o,u=null===t,c=t==t,l=ss(t);if(!u&&!l&&!a&&e>t||a&&s&&c&&!u&&!l||r&&s&&c||!n&&c||!i)return 1;if(!r&&!a&&!l&&e<t||l&&n&&i&&!r&&!a||u&&n&&i||!s&&i||!c)return-1}return 0}function Eo(e,t,n,o){for(var i=-1,a=e.length,s=n.length,u=-1,c=t.length,l=vn(a-s,0),f=r(c+l),p=!o;++u<c;)f[u]=t[u];for(;++i<s;)(p||i<a)&&(f[n[i]]=e[i]);for(;l--;)f[u++]=e[i++];return f}function xo(e,t,n,o){for(var i=-1,a=e.length,s=-1,u=n.length,c=-1,l=t.length,f=vn(a-u,0),p=r(f+l),h=!o;++i<f;)p[i]=e[i];for(var d=i;++c<l;)p[d+c]=t[c];for(;++s<u;)(h||i<a)&&(p[d+n[s]]=e[i++]);return p}function Ao(e,t){var n=-1,o=e.length;for(t||(t=r(o));++n<o;)t[n]=e[n];return t}function Ro(e,t,n,r){var i=!n;n||(n={});for(var a=-1,s=t.length;++a<s;){var u=t[a],c=r?r(n[u],e[u],u,n,e):o;c===o&&(c=e[u]),i?rr(n,u,c):Zn(n,u,c)}return n}function Po(e,t){return function(n,r){var o=Ha(n)?Ot:tr,i=t?t():{};return o(n,e,ai(r,2),i)}}function Co(e){return Gr((function(t,n){var r=-1,i=n.length,a=i>1?n[i-1]:o,s=i>2?n[2]:o;for(a=e.length>3&&"function"==typeof a?(i--,a):o,s&&yi(n[0],n[1],s)&&(a=i<3?o:a,i=1),t=Oe(t);++r<i;){var u=n[r];u&&e(t,u,r,a)}return t}))}function Io(e,t){return function(n,r){if(null==n)return n;if(!za(n))return e(n,r);for(var o=n.length,i=t?o:-1,a=Oe(n);(t?i--:++i<o)&&!1!==r(a[i],i,a););return n}}function jo(e){return function(t,n,r){for(var o=-1,i=Oe(t),a=r(t),s=a.length;s--;){var u=a[e?s:++o];if(!1===n(i[u],u,i))break}return t}}function To(e){return function(t){var n=rn(t=ys(t))?fn(t):o,r=n?n[0]:t.charAt(0),i=n?mo(n,1).join(""):t.slice(1);return r[e]()+i}}function No(e){return function(t){return Tt(Ys(Vs(t).replace(Ye,"")),e,"")}}function Lo(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=Fn(e.prototype),r=e.apply(n,t);return Za(r)?r:n}}function Uo(e){return function(t,n,r){var i=Oe(t);if(!za(t)){var a=ai(n,3);t=Cs(t),n=function(e){return a(i[e],e,i)}}var s=e(t,n,r);return s>-1?i[a?t[s]:s]:o}}function Do(e){return ei((function(t){var n=t.length,r=n,a=Wn.prototype.thru;for(e&&t.reverse();r--;){var s=t[r];if("function"!=typeof s)throw new Ae(i);if(a&&!u&&"wrapper"==oi(s))var u=new Wn([],!0)}for(r=u?r:n;++r<n;){var c=oi(s=t[r]),l="wrapper"==c?ri(s):o;u=l&&mi(l[0])&&424==l[1]&&!l[4].length&&1==l[9]?u[oi(l[0])].apply(u,l[3]):1==s.length&&mi(s)?u[c]():u.thru(s)}return function(){var e=arguments,r=e[0];if(u&&1==e.length&&Ha(r))return u.plant(r).value();for(var o=0,i=n?t[o].apply(this,e):r;++o<n;)i=t[o].call(this,i);return i}}))}function Mo(e,t,n,i,a,s,u,l,f,p){var h=t&c,d=1&t,g=2&t,v=24&t,y=512&t,b=g?o:Lo(e);return function c(){for(var m=arguments.length,_=r(m),w=m;w--;)_[w]=arguments[w];if(v)var S=ii(c),k=function(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}(_,S);if(i&&(_=Eo(_,i,a,v)),s&&(_=xo(_,s,u,v)),m-=k,v&&m<p){var O=sn(_,S);return zo(e,t,Mo,c.placeholder,n,_,O,l,f,p-m)}var E=d?n:this,x=g?E[e]:e;return m=_.length,l?_=function(e,t){for(var n=e.length,r=yn(t.length,n),i=Ao(e);r--;){var a=t[r];e[r]=vi(a,n)?i[a]:o}return e}(_,l):y&&m>1&&_.reverse(),h&&f<m&&(_.length=f),this&&this!==ft&&this instanceof c&&(x=b||Lo(x)),x.apply(E,_)}}function Fo(e,t){return function(n,r){return function(e,t,n,r){return br(e,(function(e,o,i){t(r,n(e),o,i)})),r}(n,e,t(r),{})}}function Bo(e,t){return function(n,r){var i;if(n===o&&r===o)return t;if(n!==o&&(i=n),r!==o){if(i===o)return r;"string"==typeof n||"string"==typeof r?(n=ao(n),r=ao(r)):(n=io(n),r=io(r)),i=e(n,r)}return i}}function Wo(e){return ei((function(t){return t=It(t,Jt(ai())),Gr((function(n){var r=this;return e(t,(function(e){return kt(e,r,n)}))}))}))}function Vo(e,t){var n=(t=t===o?" ":ao(t)).length;if(n<2)return n?Kr(t,e):t;var r=Kr(t,pt(e/ln(t)));return rn(t)?mo(fn(r),0,e).join(""):r.slice(0,e)}function Ho(e){return function(t,n,i){return i&&"number"!=typeof i&&yi(t,n,i)&&(n=i=o),t=ps(t),n===o?(n=t,t=0):n=ps(n),function(e,t,n,o){for(var i=-1,a=vn(pt((t-e)/(n||1)),0),s=r(a);a--;)s[o?a:++i]=e,e+=n;return s}(t,n,i=i===o?t<n?1:-1:ps(i),e)}}function qo(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=gs(t),n=gs(n)),e(t,n)}}function zo(e,t,n,r,i,a,s,c,l,f){var p=8&t;t|=p?u:64,4&(t&=~(p?64:u))||(t&=-4);var h=[e,t,i,p?a:o,p?s:o,p?o:a,p?o:s,c,l,f],d=n.apply(o,h);return mi(e)&&Ai(d,h),d.placeholder=r,Ci(d,e,t)}function Ko(e){var t=ke[e];return function(e,n){if(e=gs(e),(n=null==n?0:yn(hs(n),292))&&Ut(e)){var r=(ys(e)+"e").split("e");return+((r=(ys(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var Go=En&&1/un(new En([,-0]))[1]==l?function(e){return new En(e)}:su;function $o(e){return function(t){var n=pi(t);return n==S?on(t):n==A?cn(t):function(e,t){return It(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Jo(e,t,n,a,l,f,p,h){var d=2&t;if(!d&&"function"!=typeof e)throw new Ae(i);var g=a?a.length:0;if(g||(t&=-97,a=l=o),p=p===o?p:vn(hs(p),0),h=h===o?h:hs(h),g-=l?l.length:0,64&t){var v=a,y=l;a=l=o}var b=d?o:ri(e),m=[e,t,n,a,l,v,y,f,p,h];if(b&&function(e,t){var n=e[1],r=t[1],o=n|r,i=o<131,a=r==c&&8==n||r==c&&256==n&&e[7].length<=t[8]||384==r&&t[7].length<=t[8]&&8==n;if(!i&&!a)return e;1&r&&(e[2]=t[2],o|=1&n?0:4);var u=t[3];if(u){var l=e[3];e[3]=l?Eo(l,u,t[4]):u,e[4]=l?sn(e[3],s):t[4]}(u=t[5])&&(l=e[5],e[5]=l?xo(l,u,t[6]):u,e[6]=l?sn(e[5],s):t[6]),(u=t[7])&&(e[7]=u),r&c&&(e[8]=null==e[8]?t[8]:yn(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=o}(m,b),e=m[0],t=m[1],n=m[2],a=m[3],l=m[4],!(h=m[9]=m[9]===o?d?0:e.length:vn(m[9]-g,0))&&24&t&&(t&=-25),t&&1!=t)_=8==t||16==t?function(e,t,n){var i=Lo(e);return function a(){for(var s=arguments.length,u=r(s),c=s,l=ii(a);c--;)u[c]=arguments[c];var f=s<3&&u[0]!==l&&u[s-1]!==l?[]:sn(u,l);return(s-=f.length)<n?zo(e,t,Mo,a.placeholder,o,u,f,o,o,n-s):kt(this&&this!==ft&&this instanceof a?i:e,this,u)}}(e,t,h):t!=u&&33!=t||l.length?Mo.apply(o,m):function(e,t,n,o){var i=1&t,a=Lo(e);return function t(){for(var s=-1,u=arguments.length,c=-1,l=o.length,f=r(l+u),p=this&&this!==ft&&this instanceof t?a:e;++c<l;)f[c]=o[c];for(;u--;)f[c++]=arguments[++s];return kt(p,i?n:this,f)}}(e,t,n,a);else var _=function(e,t,n){var r=1&t,o=Lo(e);return function t(){return(this&&this!==ft&&this instanceof t?o:e).apply(r?n:this,arguments)}}(e,t,n);return Ci((b?Xr:Ai)(_,m),e,t)}function Yo(e,t,n,r){return e===o||Fa(e,Ce[n])&&!Te.call(r,n)?t:e}function Xo(e,t,n,r,i,a){return Za(e)&&Za(t)&&(a.set(t,e),Fr(e,t,o,Xo,a),a.delete(t)),e}function Qo(e){return rs(e)?o:e}function Zo(e,t,n,r,i,a){var s=1&n,u=e.length,c=t.length;if(u!=c&&!(s&&c>u))return!1;var l=a.get(e),f=a.get(t);if(l&&f)return l==t&&f==e;var p=-1,h=!0,d=2&n?new Kn:o;for(a.set(e,t),a.set(t,e);++p<u;){var g=e[p],v=t[p];if(r)var y=s?r(v,g,p,t,e,a):r(g,v,p,e,t,a);if(y!==o){if(y)continue;h=!1;break}if(d){if(!Lt(t,(function(e,t){if(!Xt(d,t)&&(g===e||i(g,e,n,r,a)))return d.push(t)}))){h=!1;break}}else if(g!==v&&!i(g,v,n,r,a)){h=!1;break}}return a.delete(e),a.delete(t),h}function ei(e){return Pi(Oi(e,o,qi),e+"")}function ti(e){return Sr(e,Cs,li)}function ni(e){return Sr(e,Is,fi)}var ri=Rn?function(e){return Rn.get(e)}:su;function oi(e){for(var t=e.name+"",n=Pn[t],r=Te.call(Pn,t)?n.length:0;r--;){var o=n[r],i=o.func;if(null==i||i==e)return o.name}return t}function ii(e){return(Te.call(Mn,"placeholder")?Mn:e).placeholder}function ai(){var e=Mn.iteratee||ru;return e=e===ru?Tr:e,arguments.length?e(arguments[0],arguments[1]):e}function si(e,t){var n,r,o=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof t?"string":"hash"]:o.map}function ui(e){for(var t=Cs(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,Si(o)]}return t}function ci(e,t){var n=function(e,t){return null==e?o:e[t]}(e,t);return jr(n)?n:o}var li=gt?function(e){return null==e?[]:(e=Oe(e),Rt(gt(e),(function(t){return Ke.call(e,t)})))}:du,fi=gt?function(e){for(var t=[];e;)jt(t,li(e)),e=qe(e);return t}:du,pi=kr;function hi(e,t,n){for(var r=-1,o=(t=yo(t,e)).length,i=!1;++r<o;){var a=Ui(t[r]);if(!(i=null!=e&&n(e,a)))break;e=e[a]}return i||++r!=o?i:!!(o=null==e?0:e.length)&&Qa(o)&&vi(a,o)&&(Ha(e)||Va(e))}function di(e){return"function"!=typeof e.constructor||wi(e)?{}:Fn(qe(e))}function gi(e){return Ha(e)||Va(e)||!!($e&&e&&e[$e])}function vi(e,t){var n=typeof e;return!!(t=null==t?f:t)&&("number"==n||"symbol"!=n&&ye.test(e))&&e>-1&&e%1==0&&e<t}function yi(e,t,n){if(!Za(n))return!1;var r=typeof t;return!!("number"==r?za(n)&&vi(t,n.length):"string"==r&&t in n)&&Fa(n[t],e)}function bi(e,t){if(Ha(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!ss(e))||Z.test(e)||!Q.test(e)||null!=t&&e in Oe(t)}function mi(e){var t=oi(e),n=Mn[t];if("function"!=typeof n||!(t in Vn.prototype))return!1;if(e===n)return!0;var r=ri(n);return!!r&&e===r[0]}(Sn&&pi(new Sn(new ArrayBuffer(1)))!=j||kn&&pi(new kn)!=S||On&&pi(On.resolve())!=E||En&&pi(new En)!=A||xn&&pi(new xn)!=C)&&(pi=function(e){var t=kr(e),n=t==O?e.constructor:o,r=n?Di(n):"";if(r)switch(r){case Cn:return j;case In:return S;case jn:return E;case Tn:return A;case Nn:return C}return t});var _i=Ie?Ya:gu;function wi(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Ce)}function Si(e){return e==e&&!Za(e)}function ki(e,t){return function(n){return null!=n&&n[e]===t&&(t!==o||e in Oe(n))}}function Oi(e,t,n){return t=vn(t===o?e.length-1:t,0),function(){for(var o=arguments,i=-1,a=vn(o.length-t,0),s=r(a);++i<a;)s[i]=o[t+i];i=-1;for(var u=r(t+1);++i<t;)u[i]=o[i];return u[t]=n(s),kt(e,this,u)}}function Ei(e,t){return t.length<2?e:wr(e,eo(t,0,-1))}function xi(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var Ai=Ii(Xr),Ri=lt||function(e,t){return ft.setTimeout(e,t)},Pi=Ii(Qr);function Ci(e,t,n){var r=t+"";return Pi(e,function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(ie,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return Et(d,(function(n){var r="_."+n[0];t&n[1]&&!Pt(e,r)&&e.push(r)})),e.sort()}(function(e){var t=e.match(ae);return t?t[1].split(se):[]}(r),n)))}function Ii(e){var t=0,n=0;return function(){var r=bn(),i=16-(r-n);if(n=r,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(o,arguments)}}function ji(e,t){var n=-1,r=e.length,i=r-1;for(t=t===o?r:t;++n<t;){var a=zr(n,i),s=e[a];e[a]=e[n],e[n]=s}return e.length=t,e}var Ti,Ni,Li=(Ti=Ta((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(ee,(function(e,n,r,o){t.push(r?o.replace(le,"$1"):n||e)})),t}),(function(e){return 500===Ni.size&&Ni.clear(),e})),Ni=Ti.cache,Ti);function Ui(e){if("string"==typeof e||ss(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Di(e){if(null!=e){try{return je.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Mi(e){if(e instanceof Vn)return e.clone();var t=new Wn(e.__wrapped__,e.__chain__);return t.__actions__=Ao(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var Fi=Gr((function(e,t){return Ka(e)?cr(e,gr(t,1,Ka,!0)):[]})),Bi=Gr((function(e,t){var n=Ji(t);return Ka(n)&&(n=o),Ka(e)?cr(e,gr(t,1,Ka,!0),ai(n,2)):[]})),Wi=Gr((function(e,t){var n=Ji(t);return Ka(n)&&(n=o),Ka(e)?cr(e,gr(t,1,Ka,!0),o,n):[]}));function Vi(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:hs(n);return o<0&&(o=vn(r+o,0)),Mt(e,ai(t,3),o)}function Hi(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=r-1;return n!==o&&(i=hs(n),i=n<0?vn(r+i,0):yn(i,r-1)),Mt(e,ai(t,3),i,!0)}function qi(e){return null!=e&&e.length?gr(e,1):[]}function zi(e){return e&&e.length?e[0]:o}var Ki=Gr((function(e){var t=It(e,go);return t.length&&t[0]===e[0]?Ar(t):[]})),Gi=Gr((function(e){var t=Ji(e),n=It(e,go);return t===Ji(n)?t=o:n.pop(),n.length&&n[0]===e[0]?Ar(n,ai(t,2)):[]})),$i=Gr((function(e){var t=Ji(e),n=It(e,go);return(t="function"==typeof t?t:o)&&n.pop(),n.length&&n[0]===e[0]?Ar(n,o,t):[]}));function Ji(e){var t=null==e?0:e.length;return t?e[t-1]:o}var Yi=Gr(Xi);function Xi(e,t){return e&&e.length&&t&&t.length?Hr(e,t):e}var Qi=ei((function(e,t){var n=null==e?0:e.length,r=or(e,t);return qr(e,It(t,(function(e){return vi(e,n)?+e:e})).sort(Oo)),r}));function Zi(e){return null==e?e:wn.call(e)}var ea=Gr((function(e){return so(gr(e,1,Ka,!0))})),ta=Gr((function(e){var t=Ji(e);return Ka(t)&&(t=o),so(gr(e,1,Ka,!0),ai(t,2))})),na=Gr((function(e){var t=Ji(e);return t="function"==typeof t?t:o,so(gr(e,1,Ka,!0),o,t)}));function ra(e){if(!e||!e.length)return[];var t=0;return e=Rt(e,(function(e){if(Ka(e))return t=vn(e.length,t),!0})),Gt(t,(function(t){return It(e,Ht(t))}))}function oa(e,t){if(!e||!e.length)return[];var n=ra(e);return null==t?n:It(n,(function(e){return kt(t,o,e)}))}var ia=Gr((function(e,t){return Ka(e)?cr(e,t):[]})),aa=Gr((function(e){return po(Rt(e,Ka))})),sa=Gr((function(e){var t=Ji(e);return Ka(t)&&(t=o),po(Rt(e,Ka),ai(t,2))})),ua=Gr((function(e){var t=Ji(e);return t="function"==typeof t?t:o,po(Rt(e,Ka),o,t)})),ca=Gr(ra),la=Gr((function(e){var t=e.length,n=t>1?e[t-1]:o;return n="function"==typeof n?(e.pop(),n):o,oa(e,n)}));function fa(e){var t=Mn(e);return t.__chain__=!0,t}function pa(e,t){return t(e)}var ha=ei((function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,i=function(t){return or(t,e)};return!(t>1||this.__actions__.length)&&r instanceof Vn&&vi(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:pa,args:[i],thisArg:o}),new Wn(r,this.__chain__).thru((function(e){return t&&!e.length&&e.push(o),e}))):this.thru(i)})),da=Po((function(e,t,n){Te.call(e,n)?++e[n]:rr(e,n,1)})),ga=Uo(Vi),va=Uo(Hi);function ya(e,t){return(Ha(e)?Et:lr)(e,ai(t,3))}function ba(e,t){return(Ha(e)?xt:fr)(e,ai(t,3))}var ma=Po((function(e,t,n){Te.call(e,n)?e[n].push(t):rr(e,n,[t])})),_a=Gr((function(e,t,n){var o=-1,i="function"==typeof t,a=za(e)?r(e.length):[];return lr(e,(function(e){a[++o]=i?kt(t,e,n):Rr(e,t,n)})),a})),wa=Po((function(e,t,n){rr(e,n,t)}));function Sa(e,t){return(Ha(e)?It:Ur)(e,ai(t,3))}var ka=Po((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]})),Oa=Gr((function(e,t){if(null==e)return[];var n=t.length;return n>1&&yi(e,t[0],t[1])?t=[]:n>2&&yi(t[0],t[1],t[2])&&(t=[t[0]]),Wr(e,gr(t,1),[])})),Ea=ct||function(){return ft.Date.now()};function xa(e,t,n){return t=n?o:t,t=e&&null==t?e.length:t,Jo(e,c,o,o,o,o,t)}function Aa(e,t){var n;if("function"!=typeof t)throw new Ae(i);return e=hs(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=o),n}}var Ra=Gr((function(e,t,n){var r=1;if(n.length){var o=sn(n,ii(Ra));r|=u}return Jo(e,r,t,n,o)})),Pa=Gr((function(e,t,n){var r=3;if(n.length){var o=sn(n,ii(Pa));r|=u}return Jo(t,r,e,n,o)}));function Ca(e,t,n){var r,a,s,u,c,l,f=0,p=!1,h=!1,d=!0;if("function"!=typeof e)throw new Ae(i);function g(t){var n=r,i=a;return r=a=o,f=t,u=e.apply(i,n)}function v(e){var n=e-l;return l===o||n>=t||n<0||h&&e-f>=s}function y(){var e=Ea();if(v(e))return b(e);c=Ri(y,function(e){var n=t-(e-l);return h?yn(n,s-(e-f)):n}(e))}function b(e){return c=o,d&&r?g(e):(r=a=o,u)}function m(){var e=Ea(),n=v(e);if(r=arguments,a=this,l=e,n){if(c===o)return function(e){return f=e,c=Ri(y,t),p?g(e):u}(l);if(h)return _o(c),c=Ri(y,t),g(l)}return c===o&&(c=Ri(y,t)),u}return t=gs(t)||0,Za(n)&&(p=!!n.leading,s=(h="maxWait"in n)?vn(gs(n.maxWait)||0,t):s,d="trailing"in n?!!n.trailing:d),m.cancel=function(){c!==o&&_o(c),f=0,r=l=a=c=o},m.flush=function(){return c===o?u:b(Ea())},m}var Ia=Gr((function(e,t){return ur(e,1,t)})),ja=Gr((function(e,t,n){return ur(e,gs(t)||0,n)}));function Ta(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Ae(i);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(Ta.Cache||zn),n}function Na(e){if("function"!=typeof e)throw new Ae(i);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Ta.Cache=zn;var La=bo((function(e,t){var n=(t=1==t.length&&Ha(t[0])?It(t[0],Jt(ai())):It(gr(t,1),Jt(ai()))).length;return Gr((function(r){for(var o=-1,i=yn(r.length,n);++o<i;)r[o]=t[o].call(this,r[o]);return kt(e,this,r)}))})),Ua=Gr((function(e,t){var n=sn(t,ii(Ua));return Jo(e,u,o,t,n)})),Da=Gr((function(e,t){var n=sn(t,ii(Da));return Jo(e,64,o,t,n)})),Ma=ei((function(e,t){return Jo(e,256,o,o,o,t)}));function Fa(e,t){return e===t||e!=e&&t!=t}var Ba=qo(Or),Wa=qo((function(e,t){return e>=t})),Va=Pr(function(){return arguments}())?Pr:function(e){return es(e)&&Te.call(e,"callee")&&!Ke.call(e,"callee")},Ha=r.isArray,qa=yt?Jt(yt):function(e){return es(e)&&kr(e)==I};function za(e){return null!=e&&Qa(e.length)&&!Ya(e)}function Ka(e){return es(e)&&za(e)}var Ga=vt||gu,$a=bt?Jt(bt):function(e){return es(e)&&kr(e)==b};function Ja(e){if(!es(e))return!1;var t=kr(e);return t==m||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!rs(e)}function Ya(e){if(!Za(e))return!1;var t=kr(e);return t==_||t==w||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Xa(e){return"number"==typeof e&&e==hs(e)}function Qa(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=f}function Za(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function es(e){return null!=e&&"object"==typeof e}var ts=mt?Jt(mt):function(e){return es(e)&&pi(e)==S};function ns(e){return"number"==typeof e||es(e)&&kr(e)==k}function rs(e){if(!es(e)||kr(e)!=O)return!1;var t=qe(e);if(null===t)return!0;var n=Te.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&je.call(n)==De}var os=_t?Jt(_t):function(e){return es(e)&&kr(e)==x},is=wt?Jt(wt):function(e){return es(e)&&pi(e)==A};function as(e){return"string"==typeof e||!Ha(e)&&es(e)&&kr(e)==R}function ss(e){return"symbol"==typeof e||es(e)&&kr(e)==P}var us=St?Jt(St):function(e){return es(e)&&Qa(e.length)&&!!ot[kr(e)]},cs=qo(Lr),ls=qo((function(e,t){return e<=t}));function fs(e){if(!e)return[];if(za(e))return as(e)?fn(e):Ao(e);if(Je&&e[Je])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Je]());var t=pi(e);return(t==S?on:t==A?un:Fs)(e)}function ps(e){return e?(e=gs(e))===l||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function hs(e){var t=ps(e),n=t%1;return t==t?n?t-n:t:0}function ds(e){return e?ir(hs(e),0,h):0}function gs(e){if("number"==typeof e)return e;if(ss(e))return p;if(Za(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Za(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=$t(e);var n=de.test(e);return n||ve.test(e)?ut(e.slice(2),n?2:8):he.test(e)?p:+e}function vs(e){return Ro(e,Is(e))}function ys(e){return null==e?"":ao(e)}var bs=Co((function(e,t){if(wi(t)||za(t))Ro(t,Cs(t),e);else for(var n in t)Te.call(t,n)&&Zn(e,n,t[n])})),ms=Co((function(e,t){Ro(t,Is(t),e)})),_s=Co((function(e,t,n,r){Ro(t,Is(t),e,r)})),ws=Co((function(e,t,n,r){Ro(t,Cs(t),e,r)})),Ss=ei(or),ks=Gr((function(e,t){e=Oe(e);var n=-1,r=t.length,i=r>2?t[2]:o;for(i&&yi(t[0],t[1],i)&&(r=1);++n<r;)for(var a=t[n],s=Is(a),u=-1,c=s.length;++u<c;){var l=s[u],f=e[l];(f===o||Fa(f,Ce[l])&&!Te.call(e,l))&&(e[l]=a[l])}return e})),Os=Gr((function(e){return e.push(o,Xo),kt(Ts,o,e)}));function Es(e,t,n){var r=null==e?o:wr(e,t);return r===o?n:r}function xs(e,t){return null!=e&&hi(e,t,xr)}var As=Fo((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Ue.call(t)),e[t]=n}),Zs(nu)),Rs=Fo((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Ue.call(t)),Te.call(e,t)?e[t].push(n):e[t]=[n]}),ai),Ps=Gr(Rr);function Cs(e){return za(e)?$n(e):Nr(e)}function Is(e){return za(e)?$n(e,!0):function(e){if(!Za(e))return function(e){var t=[];if(null!=e)for(var n in Oe(e))t.push(n);return t}(e);var t=wi(e),n=[];for(var r in e)("constructor"!=r||!t&&Te.call(e,r))&&n.push(r);return n}(e)}var js=Co((function(e,t,n){Fr(e,t,n)})),Ts=Co((function(e,t,n,r){Fr(e,t,n,r)})),Ns=ei((function(e,t){var n={};if(null==e)return n;var r=!1;t=It(t,(function(t){return t=yo(t,e),r||(r=t.length>1),t})),Ro(e,ni(e),n),r&&(n=ar(n,7,Qo));for(var o=t.length;o--;)uo(n,t[o]);return n})),Ls=ei((function(e,t){return null==e?{}:function(e,t){return Vr(e,t,(function(t,n){return xs(e,n)}))}(e,t)}));function Us(e,t){if(null==e)return{};var n=It(ni(e),(function(e){return[e]}));return t=ai(t),Vr(e,n,(function(e,n){return t(e,n[0])}))}var Ds=$o(Cs),Ms=$o(Is);function Fs(e){return null==e?[]:Yt(e,Cs(e))}var Bs=No((function(e,t,n){return t=t.toLowerCase(),e+(n?Ws(t):t)}));function Ws(e){return Js(ys(e).toLowerCase())}function Vs(e){return(e=ys(e))&&e.replace(be,en).replace(Xe,"")}var Hs=No((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),qs=No((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),zs=To("toLowerCase"),Ks=No((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()})),Gs=No((function(e,t,n){return e+(n?" ":"")+Js(t)})),$s=No((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Js=To("toUpperCase");function Ys(e,t,n){return e=ys(e),(t=n?o:t)===o?function(e){return tt.test(e)}(e)?function(e){return e.match(Ze)||[]}(e):function(e){return e.match(ue)||[]}(e):e.match(t)||[]}var Xs=Gr((function(e,t){try{return kt(e,o,t)}catch(e){return Ja(e)?e:new we(e)}})),Qs=ei((function(e,t){return Et(t,(function(t){t=Ui(t),rr(e,t,Ra(e[t],e))})),e}));function Zs(e){return function(){return e}}var eu=Do(),tu=Do(!0);function nu(e){return e}function ru(e){return Tr("function"==typeof e?e:ar(e,1))}var ou=Gr((function(e,t){return function(n){return Rr(n,e,t)}})),iu=Gr((function(e,t){return function(n){return Rr(e,n,t)}}));function au(e,t,n){var r=Cs(t),o=_r(t,r);null!=n||Za(t)&&(o.length||!r.length)||(n=t,t=e,e=this,o=_r(t,Cs(t)));var i=!(Za(n)&&"chain"in n&&!n.chain),a=Ya(e);return Et(o,(function(n){var r=t[n];e[n]=r,a&&(e.prototype[n]=function(){var t=this.__chain__;if(i||t){var n=e(this.__wrapped__);return(n.__actions__=Ao(this.__actions__)).push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,jt([this.value()],arguments))})})),e}function su(){}var uu=Wo(It),cu=Wo(At),lu=Wo(Lt);function fu(e){return bi(e)?Ht(Ui(e)):function(e){return function(t){return wr(t,e)}}(e)}var pu=Ho(),hu=Ho(!0);function du(){return[]}function gu(){return!1}var vu,yu=Bo((function(e,t){return e+t}),0),bu=Ko("ceil"),mu=Bo((function(e,t){return e/t}),1),_u=Ko("floor"),wu=Bo((function(e,t){return e*t}),1),Su=Ko("round"),ku=Bo((function(e,t){return e-t}),0);return Mn.after=function(e,t){if("function"!=typeof t)throw new Ae(i);return e=hs(e),function(){if(--e<1)return t.apply(this,arguments)}},Mn.ary=xa,Mn.assign=bs,Mn.assignIn=ms,Mn.assignInWith=_s,Mn.assignWith=ws,Mn.at=Ss,Mn.before=Aa,Mn.bind=Ra,Mn.bindAll=Qs,Mn.bindKey=Pa,Mn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Ha(e)?e:[e]},Mn.chain=fa,Mn.chunk=function(e,t,n){t=(n?yi(e,t,n):t===o)?1:vn(hs(t),0);var i=null==e?0:e.length;if(!i||t<1)return[];for(var a=0,s=0,u=r(pt(i/t));a<i;)u[s++]=eo(e,a,a+=t);return u},Mn.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,o=[];++t<n;){var i=e[t];i&&(o[r++]=i)}return o},Mn.concat=function(){var e=arguments.length;if(!e)return[];for(var t=r(e-1),n=arguments[0],o=e;o--;)t[o-1]=arguments[o];return jt(Ha(n)?Ao(n):[n],gr(t,1))},Mn.cond=function(e){var t=null==e?0:e.length,n=ai();return e=t?It(e,(function(e){if("function"!=typeof e[1])throw new Ae(i);return[n(e[0]),e[1]]})):[],Gr((function(n){for(var r=-1;++r<t;){var o=e[r];if(kt(o[0],this,n))return kt(o[1],this,n)}}))},Mn.conforms=function(e){return function(e){var t=Cs(e);return function(n){return sr(n,e,t)}}(ar(e,1))},Mn.constant=Zs,Mn.countBy=da,Mn.create=function(e,t){var n=Fn(e);return null==t?n:nr(n,t)},Mn.curry=function e(t,n,r){var i=Jo(t,8,o,o,o,o,o,n=r?o:n);return i.placeholder=e.placeholder,i},Mn.curryRight=function e(t,n,r){var i=Jo(t,16,o,o,o,o,o,n=r?o:n);return i.placeholder=e.placeholder,i},Mn.debounce=Ca,Mn.defaults=ks,Mn.defaultsDeep=Os,Mn.defer=Ia,Mn.delay=ja,Mn.difference=Fi,Mn.differenceBy=Bi,Mn.differenceWith=Wi,Mn.drop=function(e,t,n){var r=null==e?0:e.length;return r?eo(e,(t=n||t===o?1:hs(t))<0?0:t,r):[]},Mn.dropRight=function(e,t,n){var r=null==e?0:e.length;return r?eo(e,0,(t=r-(t=n||t===o?1:hs(t)))<0?0:t):[]},Mn.dropRightWhile=function(e,t){return e&&e.length?lo(e,ai(t,3),!0,!0):[]},Mn.dropWhile=function(e,t){return e&&e.length?lo(e,ai(t,3),!0):[]},Mn.fill=function(e,t,n,r){var i=null==e?0:e.length;return i?(n&&"number"!=typeof n&&yi(e,t,n)&&(n=0,r=i),function(e,t,n,r){var i=e.length;for((n=hs(n))<0&&(n=-n>i?0:i+n),(r=r===o||r>i?i:hs(r))<0&&(r+=i),r=n>r?0:ds(r);n<r;)e[n++]=t;return e}(e,t,n,r)):[]},Mn.filter=function(e,t){return(Ha(e)?Rt:dr)(e,ai(t,3))},Mn.flatMap=function(e,t){return gr(Sa(e,t),1)},Mn.flatMapDeep=function(e,t){return gr(Sa(e,t),l)},Mn.flatMapDepth=function(e,t,n){return n=n===o?1:hs(n),gr(Sa(e,t),n)},Mn.flatten=qi,Mn.flattenDeep=function(e){return null!=e&&e.length?gr(e,l):[]},Mn.flattenDepth=function(e,t){return null!=e&&e.length?gr(e,t=t===o?1:hs(t)):[]},Mn.flip=function(e){return Jo(e,512)},Mn.flow=eu,Mn.flowRight=tu,Mn.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var o=e[t];r[o[0]]=o[1]}return r},Mn.functions=function(e){return null==e?[]:_r(e,Cs(e))},Mn.functionsIn=function(e){return null==e?[]:_r(e,Is(e))},Mn.groupBy=ma,Mn.initial=function(e){return null!=e&&e.length?eo(e,0,-1):[]},Mn.intersection=Ki,Mn.intersectionBy=Gi,Mn.intersectionWith=$i,Mn.invert=As,Mn.invertBy=Rs,Mn.invokeMap=_a,Mn.iteratee=ru,Mn.keyBy=wa,Mn.keys=Cs,Mn.keysIn=Is,Mn.map=Sa,Mn.mapKeys=function(e,t){var n={};return t=ai(t,3),br(e,(function(e,r,o){rr(n,t(e,r,o),e)})),n},Mn.mapValues=function(e,t){var n={};return t=ai(t,3),br(e,(function(e,r,o){rr(n,r,t(e,r,o))})),n},Mn.matches=function(e){return Dr(ar(e,1))},Mn.matchesProperty=function(e,t){return Mr(e,ar(t,1))},Mn.memoize=Ta,Mn.merge=js,Mn.mergeWith=Ts,Mn.method=ou,Mn.methodOf=iu,Mn.mixin=au,Mn.negate=Na,Mn.nthArg=function(e){return e=hs(e),Gr((function(t){return Br(t,e)}))},Mn.omit=Ns,Mn.omitBy=function(e,t){return Us(e,Na(ai(t)))},Mn.once=function(e){return Aa(2,e)},Mn.orderBy=function(e,t,n,r){return null==e?[]:(Ha(t)||(t=null==t?[]:[t]),Ha(n=r?o:n)||(n=null==n?[]:[n]),Wr(e,t,n))},Mn.over=uu,Mn.overArgs=La,Mn.overEvery=cu,Mn.overSome=lu,Mn.partial=Ua,Mn.partialRight=Da,Mn.partition=ka,Mn.pick=Ls,Mn.pickBy=Us,Mn.property=fu,Mn.propertyOf=function(e){return function(t){return null==e?o:wr(e,t)}},Mn.pull=Yi,Mn.pullAll=Xi,Mn.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?Hr(e,t,ai(n,2)):e},Mn.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?Hr(e,t,o,n):e},Mn.pullAt=Qi,Mn.range=pu,Mn.rangeRight=hu,Mn.rearg=Ma,Mn.reject=function(e,t){return(Ha(e)?Rt:dr)(e,Na(ai(t,3)))},Mn.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,o=[],i=e.length;for(t=ai(t,3);++r<i;){var a=e[r];t(a,r,e)&&(n.push(a),o.push(r))}return qr(e,o),n},Mn.rest=function(e,t){if("function"!=typeof e)throw new Ae(i);return Gr(e,t=t===o?t:hs(t))},Mn.reverse=Zi,Mn.sampleSize=function(e,t,n){return t=(n?yi(e,t,n):t===o)?1:hs(t),(Ha(e)?Yn:Jr)(e,t)},Mn.set=function(e,t,n){return null==e?e:Yr(e,t,n)},Mn.setWith=function(e,t,n,r){return r="function"==typeof r?r:o,null==e?e:Yr(e,t,n,r)},Mn.shuffle=function(e){return(Ha(e)?Xn:Zr)(e)},Mn.slice=function(e,t,n){var r=null==e?0:e.length;return r?(n&&"number"!=typeof n&&yi(e,t,n)?(t=0,n=r):(t=null==t?0:hs(t),n=n===o?r:hs(n)),eo(e,t,n)):[]},Mn.sortBy=Oa,Mn.sortedUniq=function(e){return e&&e.length?oo(e):[]},Mn.sortedUniqBy=function(e,t){return e&&e.length?oo(e,ai(t,2)):[]},Mn.split=function(e,t,n){return n&&"number"!=typeof n&&yi(e,t,n)&&(t=n=o),(n=n===o?h:n>>>0)?(e=ys(e))&&("string"==typeof t||null!=t&&!os(t))&&!(t=ao(t))&&rn(e)?mo(fn(e),0,n):e.split(t,n):[]},Mn.spread=function(e,t){if("function"!=typeof e)throw new Ae(i);return t=null==t?0:vn(hs(t),0),Gr((function(n){var r=n[t],o=mo(n,0,t);return r&&jt(o,r),kt(e,this,o)}))},Mn.tail=function(e){var t=null==e?0:e.length;return t?eo(e,1,t):[]},Mn.take=function(e,t,n){return e&&e.length?eo(e,0,(t=n||t===o?1:hs(t))<0?0:t):[]},Mn.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?eo(e,(t=r-(t=n||t===o?1:hs(t)))<0?0:t,r):[]},Mn.takeRightWhile=function(e,t){return e&&e.length?lo(e,ai(t,3),!1,!0):[]},Mn.takeWhile=function(e,t){return e&&e.length?lo(e,ai(t,3)):[]},Mn.tap=function(e,t){return t(e),e},Mn.throttle=function(e,t,n){var r=!0,o=!0;if("function"!=typeof e)throw new Ae(i);return Za(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),Ca(e,t,{leading:r,maxWait:t,trailing:o})},Mn.thru=pa,Mn.toArray=fs,Mn.toPairs=Ds,Mn.toPairsIn=Ms,Mn.toPath=function(e){return Ha(e)?It(e,Ui):ss(e)?[e]:Ao(Li(ys(e)))},Mn.toPlainObject=vs,Mn.transform=function(e,t,n){var r=Ha(e),o=r||Ga(e)||us(e);if(t=ai(t,4),null==n){var i=e&&e.constructor;n=o?r?new i:[]:Za(e)&&Ya(i)?Fn(qe(e)):{}}return(o?Et:br)(e,(function(e,r,o){return t(n,e,r,o)})),n},Mn.unary=function(e){return xa(e,1)},Mn.union=ea,Mn.unionBy=ta,Mn.unionWith=na,Mn.uniq=function(e){return e&&e.length?so(e):[]},Mn.uniqBy=function(e,t){return e&&e.length?so(e,ai(t,2)):[]},Mn.uniqWith=function(e,t){return t="function"==typeof t?t:o,e&&e.length?so(e,o,t):[]},Mn.unset=function(e,t){return null==e||uo(e,t)},Mn.unzip=ra,Mn.unzipWith=oa,Mn.update=function(e,t,n){return null==e?e:co(e,t,vo(n))},Mn.updateWith=function(e,t,n,r){return r="function"==typeof r?r:o,null==e?e:co(e,t,vo(n),r)},Mn.values=Fs,Mn.valuesIn=function(e){return null==e?[]:Yt(e,Is(e))},Mn.without=ia,Mn.words=Ys,Mn.wrap=function(e,t){return Ua(vo(t),e)},Mn.xor=aa,Mn.xorBy=sa,Mn.xorWith=ua,Mn.zip=ca,Mn.zipObject=function(e,t){return ho(e||[],t||[],Zn)},Mn.zipObjectDeep=function(e,t){return ho(e||[],t||[],Yr)},Mn.zipWith=la,Mn.entries=Ds,Mn.entriesIn=Ms,Mn.extend=ms,Mn.extendWith=_s,au(Mn,Mn),Mn.add=yu,Mn.attempt=Xs,Mn.camelCase=Bs,Mn.capitalize=Ws,Mn.ceil=bu,Mn.clamp=function(e,t,n){return n===o&&(n=t,t=o),n!==o&&(n=(n=gs(n))==n?n:0),t!==o&&(t=(t=gs(t))==t?t:0),ir(gs(e),t,n)},Mn.clone=function(e){return ar(e,4)},Mn.cloneDeep=function(e){return ar(e,5)},Mn.cloneDeepWith=function(e,t){return ar(e,5,t="function"==typeof t?t:o)},Mn.cloneWith=function(e,t){return ar(e,4,t="function"==typeof t?t:o)},Mn.conformsTo=function(e,t){return null==t||sr(e,t,Cs(t))},Mn.deburr=Vs,Mn.defaultTo=function(e,t){return null==e||e!=e?t:e},Mn.divide=mu,Mn.endsWith=function(e,t,n){e=ys(e),t=ao(t);var r=e.length,i=n=n===o?r:ir(hs(n),0,r);return(n-=t.length)>=0&&e.slice(n,i)==t},Mn.eq=Fa,Mn.escape=function(e){return(e=ys(e))&&$.test(e)?e.replace(K,tn):e},Mn.escapeRegExp=function(e){return(e=ys(e))&&ne.test(e)?e.replace(te,"\\$&"):e},Mn.every=function(e,t,n){var r=Ha(e)?At:pr;return n&&yi(e,t,n)&&(t=o),r(e,ai(t,3))},Mn.find=ga,Mn.findIndex=Vi,Mn.findKey=function(e,t){return Dt(e,ai(t,3),br)},Mn.findLast=va,Mn.findLastIndex=Hi,Mn.findLastKey=function(e,t){return Dt(e,ai(t,3),mr)},Mn.floor=_u,Mn.forEach=ya,Mn.forEachRight=ba,Mn.forIn=function(e,t){return null==e?e:vr(e,ai(t,3),Is)},Mn.forInRight=function(e,t){return null==e?e:yr(e,ai(t,3),Is)},Mn.forOwn=function(e,t){return e&&br(e,ai(t,3))},Mn.forOwnRight=function(e,t){return e&&mr(e,ai(t,3))},Mn.get=Es,Mn.gt=Ba,Mn.gte=Wa,Mn.has=function(e,t){return null!=e&&hi(e,t,Er)},Mn.hasIn=xs,Mn.head=zi,Mn.identity=nu,Mn.includes=function(e,t,n,r){e=za(e)?e:Fs(e),n=n&&!r?hs(n):0;var o=e.length;return n<0&&(n=vn(o+n,0)),as(e)?n<=o&&e.indexOf(t,n)>-1:!!o&&Ft(e,t,n)>-1},Mn.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:hs(n);return o<0&&(o=vn(r+o,0)),Ft(e,t,o)},Mn.inRange=function(e,t,n){return t=ps(t),n===o?(n=t,t=0):n=ps(n),function(e,t,n){return e>=yn(t,n)&&e<vn(t,n)}(e=gs(e),t,n)},Mn.invoke=Ps,Mn.isArguments=Va,Mn.isArray=Ha,Mn.isArrayBuffer=qa,Mn.isArrayLike=za,Mn.isArrayLikeObject=Ka,Mn.isBoolean=function(e){return!0===e||!1===e||es(e)&&kr(e)==y},Mn.isBuffer=Ga,Mn.isDate=$a,Mn.isElement=function(e){return es(e)&&1===e.nodeType&&!rs(e)},Mn.isEmpty=function(e){if(null==e)return!0;if(za(e)&&(Ha(e)||"string"==typeof e||"function"==typeof e.splice||Ga(e)||us(e)||Va(e)))return!e.length;var t=pi(e);if(t==S||t==A)return!e.size;if(wi(e))return!Nr(e).length;for(var n in e)if(Te.call(e,n))return!1;return!0},Mn.isEqual=function(e,t){return Cr(e,t)},Mn.isEqualWith=function(e,t,n){var r=(n="function"==typeof n?n:o)?n(e,t):o;return r===o?Cr(e,t,o,n):!!r},Mn.isError=Ja,Mn.isFinite=function(e){return"number"==typeof e&&Ut(e)},Mn.isFunction=Ya,Mn.isInteger=Xa,Mn.isLength=Qa,Mn.isMap=ts,Mn.isMatch=function(e,t){return e===t||Ir(e,t,ui(t))},Mn.isMatchWith=function(e,t,n){return n="function"==typeof n?n:o,Ir(e,t,ui(t),n)},Mn.isNaN=function(e){return ns(e)&&e!=+e},Mn.isNative=function(e){if(_i(e))throw new we("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return jr(e)},Mn.isNil=function(e){return null==e},Mn.isNull=function(e){return null===e},Mn.isNumber=ns,Mn.isObject=Za,Mn.isObjectLike=es,Mn.isPlainObject=rs,Mn.isRegExp=os,Mn.isSafeInteger=function(e){return Xa(e)&&e>=-9007199254740991&&e<=f},Mn.isSet=is,Mn.isString=as,Mn.isSymbol=ss,Mn.isTypedArray=us,Mn.isUndefined=function(e){return e===o},Mn.isWeakMap=function(e){return es(e)&&pi(e)==C},Mn.isWeakSet=function(e){return es(e)&&"[object WeakSet]"==kr(e)},Mn.join=function(e,t){return null==e?"":qt.call(e,t)},Mn.kebabCase=Hs,Mn.last=Ji,Mn.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=r;return n!==o&&(i=(i=hs(n))<0?vn(r+i,0):yn(i,r-1)),t==t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,i):Mt(e,Wt,i,!0)},Mn.lowerCase=qs,Mn.lowerFirst=zs,Mn.lt=cs,Mn.lte=ls,Mn.max=function(e){return e&&e.length?hr(e,nu,Or):o},Mn.maxBy=function(e,t){return e&&e.length?hr(e,ai(t,2),Or):o},Mn.mean=function(e){return Vt(e,nu)},Mn.meanBy=function(e,t){return Vt(e,ai(t,2))},Mn.min=function(e){return e&&e.length?hr(e,nu,Lr):o},Mn.minBy=function(e,t){return e&&e.length?hr(e,ai(t,2),Lr):o},Mn.stubArray=du,Mn.stubFalse=gu,Mn.stubObject=function(){return{}},Mn.stubString=function(){return""},Mn.stubTrue=function(){return!0},Mn.multiply=wu,Mn.nth=function(e,t){return e&&e.length?Br(e,hs(t)):o},Mn.noConflict=function(){return ft._===this&&(ft._=Me),this},Mn.noop=su,Mn.now=Ea,Mn.pad=function(e,t,n){e=ys(e);var r=(t=hs(t))?ln(e):0;if(!t||r>=t)return e;var o=(t-r)/2;return Vo(ht(o),n)+e+Vo(pt(o),n)},Mn.padEnd=function(e,t,n){e=ys(e);var r=(t=hs(t))?ln(e):0;return t&&r<t?e+Vo(t-r,n):e},Mn.padStart=function(e,t,n){e=ys(e);var r=(t=hs(t))?ln(e):0;return t&&r<t?Vo(t-r,n)+e:e},Mn.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),mn(ys(e).replace(re,""),t||0)},Mn.random=function(e,t,n){if(n&&"boolean"!=typeof n&&yi(e,t,n)&&(t=n=o),n===o&&("boolean"==typeof t?(n=t,t=o):"boolean"==typeof e&&(n=e,e=o)),e===o&&t===o?(e=0,t=1):(e=ps(e),t===o?(t=e,e=0):t=ps(t)),e>t){var r=e;e=t,t=r}if(n||e%1||t%1){var i=_n();return yn(e+i*(t-e+st("1e-"+((i+"").length-1))),t)}return zr(e,t)},Mn.reduce=function(e,t,n){var r=Ha(e)?Tt:zt,o=arguments.length<3;return r(e,ai(t,4),n,o,lr)},Mn.reduceRight=function(e,t,n){var r=Ha(e)?Nt:zt,o=arguments.length<3;return r(e,ai(t,4),n,o,fr)},Mn.repeat=function(e,t,n){return t=(n?yi(e,t,n):t===o)?1:hs(t),Kr(ys(e),t)},Mn.replace=function(){var e=arguments,t=ys(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Mn.result=function(e,t,n){var r=-1,i=(t=yo(t,e)).length;for(i||(i=1,e=o);++r<i;){var a=null==e?o:e[Ui(t[r])];a===o&&(r=i,a=n),e=Ya(a)?a.call(e):a}return e},Mn.round=Su,Mn.runInContext=e,Mn.sample=function(e){return(Ha(e)?Jn:$r)(e)},Mn.size=function(e){if(null==e)return 0;if(za(e))return as(e)?ln(e):e.length;var t=pi(e);return t==S||t==A?e.size:Nr(e).length},Mn.snakeCase=Ks,Mn.some=function(e,t,n){var r=Ha(e)?Lt:to;return n&&yi(e,t,n)&&(t=o),r(e,ai(t,3))},Mn.sortedIndex=function(e,t){return no(e,t)},Mn.sortedIndexBy=function(e,t,n){return ro(e,t,ai(n,2))},Mn.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=no(e,t);if(r<n&&Fa(e[r],t))return r}return-1},Mn.sortedLastIndex=function(e,t){return no(e,t,!0)},Mn.sortedLastIndexBy=function(e,t,n){return ro(e,t,ai(n,2),!0)},Mn.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var n=no(e,t,!0)-1;if(Fa(e[n],t))return n}return-1},Mn.startCase=Gs,Mn.startsWith=function(e,t,n){return e=ys(e),n=null==n?0:ir(hs(n),0,e.length),t=ao(t),e.slice(n,n+t.length)==t},Mn.subtract=ku,Mn.sum=function(e){return e&&e.length?Kt(e,nu):0},Mn.sumBy=function(e,t){return e&&e.length?Kt(e,ai(t,2)):0},Mn.template=function(e,t,n){var r=Mn.templateSettings;n&&yi(e,t,n)&&(t=o),e=ys(e),t=_s({},t,r,Yo);var i,a,s=_s({},t.imports,r.imports,Yo),u=Cs(s),c=Yt(s,u),l=0,f=t.interpolate||me,p="__p += '",h=Ee((t.escape||me).source+"|"+f.source+"|"+(f===X?fe:me).source+"|"+(t.evaluate||me).source+"|$","g"),d="//# sourceURL="+(Te.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++rt+"]")+"\n";e.replace(h,(function(t,n,r,o,s,u){return r||(r=o),p+=e.slice(l,u).replace(_e,nn),n&&(i=!0,p+="' +\n__e("+n+") +\n'"),s&&(a=!0,p+="';\n"+s+";\n__p += '"),r&&(p+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=u+t.length,t})),p+="';\n";var g=Te.call(t,"variable")&&t.variable;if(g){if(ce.test(g))throw new we("Invalid `variable` option passed into `_.template`")}else p="with (obj) {\n"+p+"\n}\n";p=(a?p.replace(V,""):p).replace(H,"$1").replace(q,"$1;"),p="function("+(g||"obj")+") {\n"+(g?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+p+"return __p\n}";var v=Xs((function(){return Se(u,d+"return "+p).apply(o,c)}));if(v.source=p,Ja(v))throw v;return v},Mn.times=function(e,t){if((e=hs(e))<1||e>f)return[];var n=h,r=yn(e,h);t=ai(t),e-=h;for(var o=Gt(r,t);++n<e;)t(n);return o},Mn.toFinite=ps,Mn.toInteger=hs,Mn.toLength=ds,Mn.toLower=function(e){return ys(e).toLowerCase()},Mn.toNumber=gs,Mn.toSafeInteger=function(e){return e?ir(hs(e),-9007199254740991,f):0===e?e:0},Mn.toString=ys,Mn.toUpper=function(e){return ys(e).toUpperCase()},Mn.trim=function(e,t,n){if((e=ys(e))&&(n||t===o))return $t(e);if(!e||!(t=ao(t)))return e;var r=fn(e),i=fn(t);return mo(r,Qt(r,i),Zt(r,i)+1).join("")},Mn.trimEnd=function(e,t,n){if((e=ys(e))&&(n||t===o))return e.slice(0,pn(e)+1);if(!e||!(t=ao(t)))return e;var r=fn(e);return mo(r,0,Zt(r,fn(t))+1).join("")},Mn.trimStart=function(e,t,n){if((e=ys(e))&&(n||t===o))return e.replace(re,"");if(!e||!(t=ao(t)))return e;var r=fn(e);return mo(r,Qt(r,fn(t))).join("")},Mn.truncate=function(e,t){var n=30,r="...";if(Za(t)){var i="separator"in t?t.separator:i;n="length"in t?hs(t.length):n,r="omission"in t?ao(t.omission):r}var a=(e=ys(e)).length;if(rn(e)){var s=fn(e);a=s.length}if(n>=a)return e;var u=n-ln(r);if(u<1)return r;var c=s?mo(s,0,u).join(""):e.slice(0,u);if(i===o)return c+r;if(s&&(u+=c.length-u),os(i)){if(e.slice(u).search(i)){var l,f=c;for(i.global||(i=Ee(i.source,ys(pe.exec(i))+"g")),i.lastIndex=0;l=i.exec(f);)var p=l.index;c=c.slice(0,p===o?u:p)}}else if(e.indexOf(ao(i),u)!=u){var h=c.lastIndexOf(i);h>-1&&(c=c.slice(0,h))}return c+r},Mn.unescape=function(e){return(e=ys(e))&&G.test(e)?e.replace(z,hn):e},Mn.uniqueId=function(e){var t=++Ne;return ys(e)+t},Mn.upperCase=$s,Mn.upperFirst=Js,Mn.each=ya,Mn.eachRight=ba,Mn.first=zi,au(Mn,(vu={},br(Mn,(function(e,t){Te.call(Mn.prototype,t)||(vu[t]=e)})),vu),{chain:!1}),Mn.VERSION="4.17.21",Et(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Mn[e].placeholder=Mn})),Et(["drop","take"],(function(e,t){Vn.prototype[e]=function(n){n=n===o?1:vn(hs(n),0);var r=this.__filtered__&&!t?new Vn(this):this.clone();return r.__filtered__?r.__takeCount__=yn(n,r.__takeCount__):r.__views__.push({size:yn(n,h),type:e+(r.__dir__<0?"Right":"")}),r},Vn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),Et(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=1==n||3==n;Vn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:ai(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),Et(["head","last"],(function(e,t){var n="take"+(t?"Right":"");Vn.prototype[e]=function(){return this[n](1).value()[0]}})),Et(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");Vn.prototype[e]=function(){return this.__filtered__?new Vn(this):this[n](1)}})),Vn.prototype.compact=function(){return this.filter(nu)},Vn.prototype.find=function(e){return this.filter(e).head()},Vn.prototype.findLast=function(e){return this.reverse().find(e)},Vn.prototype.invokeMap=Gr((function(e,t){return"function"==typeof e?new Vn(this):this.map((function(n){return Rr(n,e,t)}))})),Vn.prototype.reject=function(e){return this.filter(Na(ai(e)))},Vn.prototype.slice=function(e,t){e=hs(e);var n=this;return n.__filtered__&&(e>0||t<0)?new Vn(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==o&&(n=(t=hs(t))<0?n.dropRight(-t):n.take(t-e)),n)},Vn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Vn.prototype.toArray=function(){return this.take(h)},br(Vn.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),i=Mn[r?"take"+("last"==t?"Right":""):t],a=r||/^find/.test(t);i&&(Mn.prototype[t]=function(){var t=this.__wrapped__,s=r?[1]:arguments,u=t instanceof Vn,c=s[0],l=u||Ha(t),f=function(e){var t=i.apply(Mn,jt([e],s));return r&&p?t[0]:t};l&&n&&"function"==typeof c&&1!=c.length&&(u=l=!1);var p=this.__chain__,h=!!this.__actions__.length,d=a&&!p,g=u&&!h;if(!a&&l){t=g?t:new Vn(this);var v=e.apply(t,s);return v.__actions__.push({func:pa,args:[f],thisArg:o}),new Wn(v,p)}return d&&g?e.apply(this,s):(v=this.thru(f),d?r?v.value()[0]:v.value():v)})})),Et(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Re[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);Mn.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var o=this.value();return t.apply(Ha(o)?o:[],e)}return this[n]((function(n){return t.apply(Ha(n)?n:[],e)}))}})),br(Vn.prototype,(function(e,t){var n=Mn[t];if(n){var r=n.name+"";Te.call(Pn,r)||(Pn[r]=[]),Pn[r].push({name:t,func:n})}})),Pn[Mo(o,2).name]=[{name:"wrapper",func:o}],Vn.prototype.clone=function(){var e=new Vn(this.__wrapped__);return e.__actions__=Ao(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Ao(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Ao(this.__views__),e},Vn.prototype.reverse=function(){if(this.__filtered__){var e=new Vn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Vn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Ha(e),r=t<0,o=n?e.length:0,i=function(e,t,n){for(var r=-1,o=n.length;++r<o;){var i=n[r],a=i.size;switch(i.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=yn(t,e+a);break;case"takeRight":e=vn(e,t-a)}}return{start:e,end:t}}(0,o,this.__views__),a=i.start,s=i.end,u=s-a,c=r?s:a-1,l=this.__iteratees__,f=l.length,p=0,h=yn(u,this.__takeCount__);if(!n||!r&&o==u&&h==u)return fo(e,this.__actions__);var d=[];e:for(;u--&&p<h;){for(var g=-1,v=e[c+=t];++g<f;){var y=l[g],b=y.iteratee,m=y.type,_=b(v);if(2==m)v=_;else if(!_){if(1==m)continue e;break e}}d[p++]=v}return d},Mn.prototype.at=ha,Mn.prototype.chain=function(){return fa(this)},Mn.prototype.commit=function(){return new Wn(this.value(),this.__chain__)},Mn.prototype.next=function(){this.__values__===o&&(this.__values__=fs(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?o:this.__values__[this.__index__++]}},Mn.prototype.plant=function(e){for(var t,n=this;n instanceof Bn;){var r=Mi(n);r.__index__=0,r.__values__=o,t?i.__wrapped__=r:t=r;var i=r;n=n.__wrapped__}return i.__wrapped__=e,t},Mn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Vn){var t=e;return this.__actions__.length&&(t=new Vn(this)),(t=t.reverse()).__actions__.push({func:pa,args:[Zi],thisArg:o}),new Wn(t,this.__chain__)}return this.thru(Zi)},Mn.prototype.toJSON=Mn.prototype.valueOf=Mn.prototype.value=function(){return fo(this.__wrapped__,this.__actions__)},Mn.prototype.first=Mn.prototype.head,Je&&(Mn.prototype[Je]=function(){return this}),Mn}();ft._=dn,(r=function(){return dn}.call(t,n,t,e))===o||(e.exports=r)}.call(this)},636:(e,t,n)=>{var r="function"==typeof Map&&Map.prototype,o=Object.getOwnPropertyDescriptor&&r?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,i=r&&o&&"function"==typeof o.get?o.get:null,a=r&&Map.prototype.forEach,s="function"==typeof Set&&Set.prototype,u=Object.getOwnPropertyDescriptor&&s?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,c=s&&u&&"function"==typeof u.get?u.get:null,l=s&&Set.prototype.forEach,f="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,p="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,h="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,d=Boolean.prototype.valueOf,g=Object.prototype.toString,v=Function.prototype.toString,y=String.prototype.match,b=String.prototype.slice,m=String.prototype.replace,_=String.prototype.toUpperCase,w=String.prototype.toLowerCase,S=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,R=Object.getOwnPropertySymbols,P="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&&(Symbol.toStringTag,1)?Symbol.toStringTag:null,j=Object.prototype.propertyIsEnumerable,T=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function N(e,t){if(e===1/0||e===-1/0||e!=e||e&&e>-1e3&&e<1e3||S.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof e){var r=e<0?-x(-e):x(e);if(r!==e){var o=String(r),i=b.call(t,o.length+1);return m.call(o,n,"$&_")+"."+m.call(m.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return m.call(t,n,"$&_")}var L=n(132),U=L.custom,D=V(U)?U:null;function M(e,t,n){var r="double"===(n.quoteStyle||t)?'"':"'";return r+e+r}function F(e){return m.call(String(e),/"/g,""")}function B(e){return!("[object Array]"!==z(e)||I&&"object"==typeof e&&I in e)}function W(e){return!("[object RegExp]"!==z(e)||I&&"object"==typeof e&&I in e)}function V(e){if(C)return e&&"object"==typeof e&&e instanceof Symbol;if("symbol"==typeof e)return!0;if(!e||"object"!=typeof e||!P)return!1;try{return P.call(e),!0}catch(e){}return!1}e.exports=function e(t,r,o,s){var u=r||{};if(q(u,"quoteStyle")&&"single"!==u.quoteStyle&&"double"!==u.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(q(u,"maxStringLength")&&("number"==typeof u.maxStringLength?u.maxStringLength<0&&u.maxStringLength!==1/0:null!==u.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var g=!q(u,"customInspect")||u.customInspect;if("boolean"!=typeof g&&"symbol"!==g)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(q(u,"indent")&&null!==u.indent&&"\t"!==u.indent&&!(parseInt(u.indent,10)===u.indent&&u.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(q(u,"numericSeparator")&&"boolean"!=typeof u.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var _=u.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 G(t,u);if("number"==typeof t){if(0===t)return 1/0/t>0?"0":"-0";var S=String(t);return _?N(t,S):S}if("bigint"==typeof t){var x=String(t)+"n";return _?N(t,x):x}var R=void 0===u.depth?5:u.depth;if(void 0===o&&(o=0),o>=R&&R>0&&"object"==typeof t)return B(t)?"[Array]":"[Object]";var U,H=function(e,t){var n;if("\t"===e.indent)n="\t";else{if(!("number"==typeof e.indent&&e.indent>0))return null;n=O.call(Array(e.indent+1)," ")}return{base:n,prev:O.call(Array(t+1),n)}}(u,o);if(void 0===s)s=[];else if(K(s,t)>=0)return"[Circular]";function $(t,n,r){if(n&&(s=E.call(s)).push(n),r){var i={depth:u.depth};return q(u,"quoteStyle")&&(i.quoteStyle=u.quoteStyle),e(t,i,o+1,s)}return e(t,u,o+1,s)}if("function"==typeof t&&!W(t)){var ee=function(e){if(e.name)return e.name;var t=y.call(v.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}(t),te=Z(t,$);return"[Function"+(ee?": "+ee:" (anonymous)")+"]"+(te.length>0?" { "+O.call(te,", ")+" }":"")}if(V(t)){var ne=C?m.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):P.call(t);return"object"!=typeof t||C?ne:J(ne)}if((U=t)&&"object"==typeof U&&("undefined"!=typeof HTMLElement&&U instanceof HTMLElement||"string"==typeof U.nodeName&&"function"==typeof U.getAttribute)){for(var re="<"+w.call(String(t.nodeName)),oe=t.attributes||[],ie=0;ie<oe.length;ie++)re+=" "+oe[ie].name+"="+M(F(oe[ie].value),"double",u);return re+=">",t.childNodes&&t.childNodes.length&&(re+="..."),re+"</"+w.call(String(t.nodeName))+">"}if(B(t)){if(0===t.length)return"[]";var ae=Z(t,$);return H&&!function(e){for(var t=0;t<e.length;t++)if(K(e[t],"\n")>=0)return!1;return!0}(ae)?"["+Q(ae,H)+"]":"[ "+O.call(ae,", ")+" ]"}if(function(e){return!("[object Error]"!==z(e)||I&&"object"==typeof e&&I in e)}(t)){var se=Z(t,$);return"cause"in Error.prototype||!("cause"in t)||j.call(t,"cause")?0===se.length?"["+String(t)+"]":"{ ["+String(t)+"] "+O.call(se,", ")+" }":"{ ["+String(t)+"] "+O.call(k.call("[cause]: "+$(t.cause),se),", ")+" }"}if("object"==typeof t&&g){if(D&&"function"==typeof t[D]&&L)return L(t,{depth:R-o});if("symbol"!==g&&"function"==typeof t.inspect)return t.inspect()}if(function(e){if(!i||!e||"object"!=typeof e)return!1;try{i.call(e);try{c.call(e)}catch(e){return!0}return e instanceof Map}catch(e){}return!1}(t)){var ue=[];return a&&a.call(t,(function(e,n){ue.push($(n,t,!0)+" => "+$(e,t))})),X("Map",i.call(t),ue,H)}if(function(e){if(!c||!e||"object"!=typeof e)return!1;try{c.call(e);try{i.call(e)}catch(e){return!0}return e instanceof Set}catch(e){}return!1}(t)){var ce=[];return l&&l.call(t,(function(e){ce.push($(e,t))})),X("Set",c.call(t),ce,H)}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 Y("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 Y("WeakSet");if(function(e){if(!h||!e||"object"!=typeof e)return!1;try{return h.call(e),!0}catch(e){}return!1}(t))return Y("WeakRef");if(function(e){return!("[object Number]"!==z(e)||I&&"object"==typeof e&&I in e)}(t))return J($(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 J($(A.call(t)));if(function(e){return!("[object Boolean]"!==z(e)||I&&"object"==typeof e&&I in e)}(t))return J(d.call(t));if(function(e){return!("[object String]"!==z(e)||I&&"object"==typeof e&&I in e)}(t))return J($(String(t)));if("undefined"!=typeof window&&t===window)return"{ [object Window] }";if(t===n.g)return"{ [object globalThis] }";if(!function(e){return!("[object Date]"!==z(e)||I&&"object"==typeof e&&I in e)}(t)&&!W(t)){var le=Z(t,$),fe=T?T(t)===Object.prototype:t instanceof Object||t.constructor===Object,pe=t instanceof Object?"":"null prototype",he=!fe&&I&&Object(t)===t&&I in t?b.call(z(t),8,-1):pe?"Object":"",de=(fe||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(he||pe?"["+O.call(k.call([],he||[],pe||[]),": ")+"] ":"");return 0===le.length?de+"{}":H?de+"{"+Q(le,H)+"}":de+"{ "+O.call(le,", ")+" }"}return String(t)};var H=Object.prototype.hasOwnProperty||function(e){return e in this};function q(e,t){return H.call(e,t)}function z(e){return g.call(e)}function K(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}function G(e,t){if(e.length>t.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return G(b.call(e,0,t.maxStringLength),t)+r}return M(m.call(m.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,$),"single",t)}function $(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+_.call(t.toString(16))}function J(e){return"Object("+e+")"}function Y(e){return e+" { ? }"}function X(e,t,n,r){return e+" ("+t+") {"+(r?Q(n,r):O.call(n,", "))+"}"}function Q(e,t){if(0===e.length)return"";var n="\n"+t.prev+t.base;return n+O.call(e,","+n)+"\n"+t.prev}function Z(e,t){var n=B(e),r=[];if(n){r.length=e.length;for(var o=0;o<e.length;o++)r[o]=q(e,o)?t(e[o],e):""}var i,a="function"==typeof R?R(e):[];if(C){i={};for(var s=0;s<a.length;s++)i["$"+a[s]]=a[s]}for(var u in e)q(e,u)&&(n&&String(Number(u))===u&&u<e.length||C&&i["$"+u]instanceof Symbol||(S.call(/[^\w$]/,u)?r.push(t(u,e)+": "+t(e[u],e)):r.push(u+": "+t(e[u],e))));if("function"==typeof R)for(var c=0;c<a.length;c++)j.call(e,a[c])&&r.push("["+t(a[c])+"]: "+t(e[a[c]],e));return r}},900:function(e,t,n){var r;e=n.nmd(e),function(){"use strict";var o={function:!0,object:!0},i=o[typeof window]&&window||this,a=o[typeof t]&&t,s=o.object&&e&&!e.nodeType&&e,u=a&&s&&"object"==typeof n.g&&n.g;!u||u.global!==u&&u.window!==u&&u.self!==u||(i=u);var c=Math.pow(2,53)-1,l=/\bOpera/,f=Object.prototype,p=f.hasOwnProperty,h=f.toString;function d(e){return(e=String(e)).charAt(0).toUpperCase()+e.slice(1)}function g(e){return e=_(e),/^(?:webOS|i(?:OS|P))/.test(e)?e:d(e)}function v(e,t){for(var n in e)p.call(e,n)&&t(e[n],n,e)}function y(e){return null==e?d(e):h.call(e).slice(8,-1)}function b(e){return String(e).replace(/([ -])(?!$)/g,"$1?")}function m(e,t){var n=null;return function(e,t){var n=-1,r=e?e.length:0;if("number"==typeof r&&r>-1&&r<=c)for(;++n<r;)t(e[n],n);else v(e,t)}(e,(function(r,o){n=t(n,r,o,e)})),n}function _(e){return String(e).replace(/^ +| +$/g,"")}var w=function e(t){var n=i,r=t&&"object"==typeof t&&"String"!=y(t);r&&(n=t,t=null);var o=n.navigator||{},a=o.userAgent||"";t||(t=a);var s,u,c,f,p,d=r?!!o.likeChrome:/\bChrome\b/.test(t)&&!/internal|\n/i.test(h.toString()),w="Object",S=r?w:"ScriptBridgingProxyObject",k=r?w:"Environment",O=r&&n.java?"JavaPackage":y(n.java),E=r?w:"RuntimeObject",x=/\bJava/.test(O)&&n.java,A=x&&y(n.environment)==k,R=x?"a":"α",P=x?"b":"β",C=n.document||{},I=n.operamini||n.opera,j=l.test(j=r&&I?I["[[Class]]"]:y(I))?j:I=null,T=t,N=[],L=null,U=t==a,D=U&&I&&"function"==typeof I.version&&I.version(),M=m([{label:"EdgeHTML",pattern:"Edge"},"Trident",{label:"WebKit",pattern:"AppleWebKit"},"iCab","Presto","NetFront","Tasman","KHTML","Gecko"],(function(e,n){return e||RegExp("\\b"+(n.pattern||b(n))+"\\b","i").exec(t)&&(n.label||n)})),F=m(["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(e,n){return e||RegExp("\\b"+(n.pattern||b(n))+"\\b","i").exec(t)&&(n.label||n)})),B=H([{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"]),W=m({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(e,n,r){return e||(n[B]||n[/^[a-z]+(?: +[a-z]+\b)*/i.exec(B)]||RegExp("\\b"+b(r)+"(?:\\b|\\w*\\d)","i").exec(t))&&r})),V=m(["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(e,n){var r=n.pattern||b(n);return!e&&(e=RegExp("\\b"+r+"(?:/[\\d.]+|[ \\w.]*)","i").exec(t))&&(e=function(e,t,n){var r={"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"};return t&&n&&/^Win/i.test(e)&&!/^Windows Phone /i.test(e)&&(r=r[/[\d.]+$/.exec(e)])&&(e="Windows "+r),e=String(e),t&&n&&(e=e.replace(RegExp(t,"i"),n)),g(e.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])}(e,r,n.label||n)),e}));function H(e){return m(e,(function(e,n){var r=n.pattern||b(n);return!e&&(e=RegExp("\\b"+r+" *\\d+[.\\w_]*","i").exec(t)||RegExp("\\b"+r+" *\\w+-[\\w]*","i").exec(t)||RegExp("\\b"+r+"(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)","i").exec(t))&&((e=String(n.label&&!RegExp(r,"i").test(n.label)?n.label:e).split("/"))[1]&&!/[\d.]+/.test(e[0])&&(e[0]+=" "+e[1]),n=n.label||n,e=g(e[0].replace(RegExp(r,"i"),n).replace(RegExp("; *(?:"+n+"[_-])?","i")," ").replace(RegExp("("+n+")[-_.]?(\\w)","i"),"$1 $2"))),e}))}function q(e){return m(e,(function(e,n){return e||(RegExp(n+"(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)","i").exec(t)||0)[1]||null}))}if(M&&(M=[M]),/\bAndroid\b/.test(V)&&!B&&(s=/\bAndroid[^;]*;(.*?)(?:Build|\) AppleWebKit)\b/i.exec(t))&&(B=_(s[1]).replace(/^[a-z]{2}-[a-z]{2};\s*/i,"")||null),W&&!B?B=H([W]):W&&B&&(B=B.replace(RegExp("^("+b(W)+")[-_.\\s]","i"),W+" ").replace(RegExp("^("+b(W)+")[-_.]?(\\w)","i"),W+" $2")),(s=/\bGoogle TV\b/.exec(B))&&(B=s[0]),/\bSimulator\b/i.test(t)&&(B=(B?B+" ":"")+"Simulator"),"Opera Mini"==F&&/\bOPiOS\b/.test(t)&&N.push("running in Turbo/Uncompressed mode"),"IE"==F&&/\blike iPhone OS\b/.test(t)?(W=(s=e(t.replace(/like iPhone OS/,""))).manufacturer,B=s.product):/^iP/.test(B)?(F||(F="Safari"),V="iOS"+((s=/ OS ([\d_]+)/i.exec(t))?" "+s[1].replace(/_/g,"."):"")):"Konqueror"==F&&/^Linux\b/i.test(V)?V="Kubuntu":W&&"Google"!=W&&(/Chrome/.test(F)&&!/\bMobile Safari\b/i.test(t)||/\bVita\b/.test(B))||/\bAndroid\b/.test(V)&&/^Chrome/.test(F)&&/\bVersion\//i.test(t)?(F="Android Browser",V=/\bAndroid\b/.test(V)?V:"Android"):"Silk"==F?(/\bMobi/i.test(t)||(V="Android",N.unshift("desktop mode")),/Accelerated *= *true/i.test(t)&&N.unshift("accelerated")):"UC Browser"==F&&/\bUCWEB\b/.test(t)?N.push("speed mode"):"PaleMoon"==F&&(s=/\bFirefox\/([\d.]+)\b/.exec(t))?N.push("identifying as Firefox "+s[1]):"Firefox"==F&&(s=/\b(Mobile|Tablet|TV)\b/i.exec(t))?(V||(V="Firefox OS"),B||(B=s[1])):!F||(s=!/\bMinefield\b/i.test(t)&&/\b(?:Firefox|Safari)\b/.exec(F))?(F&&!B&&/[\/,]|^[^(]+?\)/.test(t.slice(t.indexOf(s+"/")+8))&&(F=null),(s=B||W||V)&&(B||W||/\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(V))&&(F=/[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(V)?V:s)+" Browser")):"Electron"==F&&(s=(/\bChrome\/([\d.]+)\b/.exec(t)||0)[1])&&N.push("Chromium "+s),D||(D=q(["(?:Cloud9|CriOS|CrMo|Edge|Edg|EdgA|EdgiOS|FxiOS|HeadlessChrome|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|SamsungBrowser|Silk(?!/[\\d.]+$)|UCBrowser|YaBrowser)","Version",b(F),"(?:Firefox|Minefield|NetFront)"])),(s=("iCab"==M&&parseFloat(D)>3?"WebKit":/\bOpera\b/.test(F)&&(/\bOPR\b/.test(t)?"Blink":"Presto"))||/\b(?:Midori|Nook|Safari)\b/i.test(t)&&!/^(?:Trident|EdgeHTML)$/.test(M)&&"WebKit"||!M&&/\bMSIE\b/i.test(t)&&("Mac OS"==V?"Tasman":"Trident")||"WebKit"==M&&/\bPlayStation\b(?! Vita\b)/i.test(F)&&"NetFront")&&(M=[s]),"IE"==F&&(s=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(t)||0)[1])?(F+=" Mobile",V="Windows Phone "+(/\+$/.test(s)?s:s+".x"),N.unshift("desktop mode")):/\bWPDesktop\b/i.test(t)?(F="IE Mobile",V="Windows Phone 8.x",N.unshift("desktop mode"),D||(D=(/\brv:([\d.]+)/.exec(t)||0)[1])):"IE"!=F&&"Trident"==M&&(s=/\brv:([\d.]+)/.exec(t))&&(F&&N.push("identifying as "+F+(D?" "+D:"")),F="IE",D=s[1]),U){if(f="global",p=null!=(c=n)?typeof c[f]:"number",/^(?:boolean|number|string|undefined)$/.test(p)||"object"==p&&!c[f])y(s=n.runtime)==S?(F="Adobe AIR",V=s.flash.system.Capabilities.os):y(s=n.phantom)==E?(F="PhantomJS",D=(s=s.version||null)&&s.major+"."+s.minor+"."+s.patch):"number"==typeof C.documentMode&&(s=/\bTrident\/(\d+)/i.exec(t))?(D=[D,C.documentMode],(s=+s[1]+4)!=D[1]&&(N.push("IE "+D[1]+" mode"),M&&(M[1]=""),D[1]=s),D="IE"==F?String(D[1].toFixed(1)):D[0]):"number"==typeof C.documentMode&&/^(?:Chrome|Firefox)\b/.test(F)&&(N.push("masking as "+F+" "+D),F="IE",D="11.0",M=["Trident"],V="Windows");else if(x&&(T=(s=x.lang.System).getProperty("os.arch"),V=V||s.getProperty("os.name")+" "+s.getProperty("os.version")),A){try{D=n.require("ringo/engine").version.join("."),F="RingoJS"}catch(e){(s=n.system)&&s.global.system==n.system&&(F="Narwhal",V||(V=s[0].os||null))}F||(F="Rhino")}else"object"==typeof n.process&&!n.process.browser&&(s=n.process)&&("object"==typeof s.versions&&("string"==typeof s.versions.electron?(N.push("Node "+s.versions.node),F="Electron",D=s.versions.electron):"string"==typeof s.versions.nw&&(N.push("Chromium "+D,"Node "+s.versions.node),F="NW.js",D=s.versions.nw)),F||(F="Node.js",T=s.arch,V=s.platform,D=(D=/[\d.]+/.exec(s.version))?D[0]:null));V=V&&g(V)}if(D&&(s=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(D)||/(?:alpha|beta)(?: ?\d)?/i.exec(t+";"+(U&&o.appMinorVersion))||/\bMinefield\b/i.test(t)&&"a")&&(L=/b/i.test(s)?"beta":"alpha",D=D.replace(RegExp(s+"\\+?$"),"")+("beta"==L?P:R)+(/\d+\+?/.exec(s)||"")),"Fennec"==F||"Firefox"==F&&/\b(?:Android|Firefox OS|KaiOS)\b/.test(V))F="Firefox Mobile";else if("Maxthon"==F&&D)D=D.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test(B))"Xbox 360"==B&&(V=null),"Xbox 360"==B&&/\bIEMobile\b/.test(t)&&N.unshift("mobile mode");else if(!/^(?:Chrome|IE|Opera)$/.test(F)&&(!F||B||/Browser|Mobi/.test(F))||"Windows CE"!=V&&!/Mobi/i.test(t))if("IE"==F&&U)try{null===n.external&&N.unshift("platform preview")}catch(e){N.unshift("embedded")}else(/\bBlackBerry\b/.test(B)||/\bBB10\b/.test(t))&&(s=(RegExp(B.replace(/ +/g," *")+"/([.\\d]+)","i").exec(t)||0)[1]||D)?(V=((s=[s,/BB10/.test(t)])[1]?(B=null,W="BlackBerry"):"Device Software")+" "+s[0],D=null):this!=v&&"Wii"!=B&&(U&&I||/Opera/.test(F)&&/\b(?:MSIE|Firefox)\b/i.test(t)||"Firefox"==F&&/\bOS X (?:\d+\.){2,}/.test(V)||"IE"==F&&(V&&!/^Win/.test(V)&&D>5.5||/\bWindows XP\b/.test(V)&&D>8||8==D&&!/\bTrident\b/.test(t)))&&!l.test(s=e.call(v,t.replace(l,"")+";"))&&s.name&&(s="ing as "+s.name+((s=s.version)?" "+s:""),l.test(F)?(/\bIE\b/.test(s)&&"Mac OS"==V&&(V=null),s="identify"+s):(s="mask"+s,F=j?g(j.replace(/([a-z])([A-Z])/g,"$1 $2")):"Opera",/\bIE\b/.test(s)&&(V=null),U||(D=null)),M=["Presto"],N.push(s));else F+=" Mobile";(s=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(t)||0)[1])&&(s=[parseFloat(s.replace(/\.(\d)$/,".0$1")),s],"Safari"==F&&"+"==s[1].slice(-1)?(F="WebKit Nightly",L="alpha",D=s[1].slice(0,-1)):D!=s[1]&&D!=(s[2]=(/\bSafari\/([\d.]+\+?)/i.exec(t)||0)[1])||(D=null),s[1]=(/\b(?:Headless)?Chrome\/([\d.]+)/i.exec(t)||0)[1],537.36==s[0]&&537.36==s[2]&&parseFloat(s[1])>=28&&"WebKit"==M&&(M=["Blink"]),U&&(d||s[1])?(M&&(M[1]="like Chrome"),s=s[1]||((s=s[0])<530?1:s<532?2:s<532.05?3:s<533?4:s<534.03?5:s<534.07?6:s<534.1?7:s<534.13?8:s<534.16?9:s<534.24?10:s<534.3?11:s<535.01?12:s<535.02?"13+":s<535.07?15:s<535.11?16:s<535.19?17:s<536.05?18:s<536.1?19:s<537.01?20:s<537.11?"21+":s<537.13?23:s<537.18?24:s<537.24?25:s<537.36?26:"Blink"!=M?"27":"28")):(M&&(M[1]="like Safari"),s=(s=s[0])<400?1:s<500?2:s<526?3:s<533?4:s<534?"4+":s<535?5:s<537?6:s<538?7:s<601?8:s<602?9:s<604?10:s<606?11:s<608?12:"12"),M&&(M[1]+=" "+(s+="number"==typeof s?".x":/[.+]/.test(s)?"":"+")),"Safari"==F&&(!D||parseInt(D)>45)?D=s:"Chrome"==F&&/\bHeadlessChrome/i.test(t)&&N.unshift("headless")),"Opera"==F&&(s=/\bzbov|zvav$/.exec(V))?(F+=" ",N.unshift("desktop mode"),"zvav"==s?(F+="Mini",D=null):F+="Mobile",V=V.replace(RegExp(" *"+s+"$"),"")):"Safari"==F&&/\bChrome\b/.exec(M&&M[1])?(N.unshift("desktop mode"),F="Chrome Mobile",D=null,/\bOS X\b/.test(V)?(W="Apple",V="iOS 4.3+"):V=null):/\bSRWare Iron\b/.test(F)&&!D&&(D=q("Chrome")),D&&0==D.indexOf(s=/[\d.]+$/.exec(V))&&t.indexOf("/"+s+"-")>-1&&(V=_(V.replace(s,""))),V&&-1!=V.indexOf(F)&&!RegExp(F+" OS").test(V)&&(V=V.replace(RegExp(" *"+b(F)+" *"),"")),M&&!/\b(?:Avant|Nook)\b/.test(F)&&(/Browser|Lunascape|Maxthon/.test(F)||"Safari"!=F&&/^iOS/.test(V)&&/\bSafari\b/.test(M[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|SRWare Iron|Vivaldi|Web)/.test(F)&&M[1])&&(s=M[M.length-1])&&N.push(s),N.length&&(N=["("+N.join("; ")+")"]),W&&B&&B.indexOf(W)<0&&N.push("on "+W),B&&N.push((/^on /.test(N[N.length-1])?"":"on ")+B),V&&(s=/ ([\d.+]+)$/.exec(V),u=s&&"/"==V.charAt(V.length-s[0].length-1),V={architecture:32,family:s&&!u?V.replace(s[0],""):V,version:s?s[1]:null,toString:function(){var e=this.version;return this.family+(e&&!u?" "+e:"")+(64==this.architecture?" 64-bit":"")}}),(s=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(T))&&!/\bi686\b/i.test(T)?(V&&(V.architecture=64,V.family=V.family.replace(RegExp(" *"+s),"")),F&&(/\bWOW64\b/i.test(t)||U&&/\w(?:86|32)$/.test(o.cpuClass||o.platform)&&!/\bWin64; x64\b/i.test(t))&&N.unshift("32-bit")):V&&/^OS X/.test(V.family)&&"Chrome"==F&&parseFloat(D)>=39&&(V.architecture=64),t||(t=null);var z={};return z.description=t,z.layout=M&&M[0],z.manufacturer=W,z.name=F,z.prerelease=L,z.product=B,z.ua=t,z.version=F&&D,z.os=V||{architecture:null,family:null,version:null,toString:function(){return"null"}},z.parse=e,z.toString=function(){return this.description||""},z.version&&N.unshift(D),z.name&&N.unshift(F),V&&F&&(V!=String(V).split(" ")[0]||V!=F.split(" ")[0]&&!B)&&N.push(B?"("+V+")":"on "+V),N.length&&(z.description=N.join(" ")),z}();i.platform=w,void 0===(r=function(){return w}.call(t,n,t,e))||(e.exports=r)}.call(this)},516:e=>{"use strict";var t=String.prototype.replace,n=/%20/g,r="RFC3986";e.exports={default:r,formatters:{RFC1738:function(e){return t.call(e,n,"+")},RFC3986:function(e){return String(e)}},RFC1738:"RFC1738",RFC3986:r}},344:(e,t,n)=>{"use strict";var r=n(976),o=n(688),i=n(516);e.exports={formats:i,parse:o,stringify:r}},688:(e,t,n)=>{"use strict";var r=n(72),o=Object.prototype.hasOwnProperty,i=Array.isArray,a={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:r.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},s=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},u=function(e,t){return e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},c=function(e,t,n,r){if(e){var i=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,a=/(\[[^[\]]*])/g,s=n.depth>0&&/(\[[^[\]]*])/.exec(i),c=s?i.slice(0,s.index):i,l=[];if(c){if(!n.plainObjects&&o.call(Object.prototype,c)&&!n.allowPrototypes)return;l.push(c)}for(var f=0;n.depth>0&&null!==(s=a.exec(i))&&f<n.depth;){if(f+=1,!n.plainObjects&&o.call(Object.prototype,s[1].slice(1,-1))&&!n.allowPrototypes)return;l.push(s[1])}return s&&l.push("["+i.slice(s.index)+"]"),function(e,t,n,r){for(var o=r?t:u(t,n),i=e.length-1;i>=0;--i){var a,s=e[i];if("[]"===s&&n.parseArrays)a=[].concat(o);else{a=n.plainObjects?Object.create(null):{};var c="["===s.charAt(0)&&"]"===s.charAt(s.length-1)?s.slice(1,-1):s,l=parseInt(c,10);n.parseArrays||""!==c?!isNaN(l)&&s!==c&&String(l)===c&&l>=0&&n.parseArrays&&l<=n.arrayLimit?(a=[])[l]=o:"__proto__"!==c&&(a[c]=o):a={0:o}}o=a}return o}(l,t,n,r)}};e.exports=function(e,t){var n=function(e){if(!e)return a;if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===e.charset?a.charset:e.charset;return{allowDots:void 0===e.allowDots?a.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:a.allowPrototypes,allowSparse:"boolean"==typeof e.allowSparse?e.allowSparse:a.allowSparse,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:a.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:a.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:a.comma,decoder:"function"==typeof e.decoder?e.decoder:a.decoder,delimiter:"string"==typeof e.delimiter||r.isRegExp(e.delimiter)?e.delimiter:a.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:a.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:a.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:a.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:a.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:a.strictNullHandling}}(t);if(""===e||null==e)return n.plainObjects?Object.create(null):{};for(var l="string"==typeof e?function(e,t){var n,c={__proto__:null},l=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,f=t.parameterLimit===1/0?void 0:t.parameterLimit,p=l.split(t.delimiter,f),h=-1,d=t.charset;if(t.charsetSentinel)for(n=0;n<p.length;++n)0===p[n].indexOf("utf8=")&&("utf8=%E2%9C%93"===p[n]?d="utf-8":"utf8=%26%2310003%3B"===p[n]&&(d="iso-8859-1"),h=n,n=p.length);for(n=0;n<p.length;++n)if(n!==h){var g,v,y=p[n],b=y.indexOf("]="),m=-1===b?y.indexOf("="):b+1;-1===m?(g=t.decoder(y,a.decoder,d,"key"),v=t.strictNullHandling?null:""):(g=t.decoder(y.slice(0,m),a.decoder,d,"key"),v=r.maybeMap(u(y.slice(m+1),t),(function(e){return t.decoder(e,a.decoder,d,"value")}))),v&&t.interpretNumericEntities&&"iso-8859-1"===d&&(v=s(v)),y.indexOf("[]=")>-1&&(v=i(v)?[v]:v),o.call(c,g)?c[g]=r.combine(c[g],v):c[g]=v}return c}(e,n):e,f=n.plainObjects?Object.create(null):{},p=Object.keys(l),h=0;h<p.length;++h){var d=p[h],g=c(d,l[d],n,"string"==typeof e);f=r.merge(f,g,n)}return!0===n.allowSparse?f:r.compact(f)}},976:(e,t,n)=>{"use strict";var r=n(252),o=n(72),i=n(516),a=Object.prototype.hasOwnProperty,s={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},u=Array.isArray,c=Array.prototype.push,l=function(e,t){c.apply(e,u(t)?t:[t])},f=Date.prototype.toISOString,p=i.default,h={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:o.encode,encodeValuesOnly:!1,format:p,formatter:i.formatters[p],indices:!1,serializeDate:function(e){return f.call(e)},skipNulls:!1,strictNullHandling:!1},d={},g=function e(t,n,i,a,s,c,f,p,g,v,y,b,m,_,w,S){for(var k,O=t,E=S,x=0,A=!1;void 0!==(E=E.get(d))&&!A;){var R=E.get(t);if(x+=1,void 0!==R){if(R===x)throw new RangeError("Cyclic object value");A=!0}void 0===E.get(d)&&(x=0)}if("function"==typeof p?O=p(n,O):O instanceof Date?O=y(O):"comma"===i&&u(O)&&(O=o.maybeMap(O,(function(e){return e instanceof Date?y(e):e}))),null===O){if(s)return f&&!_?f(n,h.encoder,w,"key",b):n;O=""}if("string"==typeof(k=O)||"number"==typeof k||"boolean"==typeof k||"symbol"==typeof k||"bigint"==typeof k||o.isBuffer(O))return f?[m(_?n:f(n,h.encoder,w,"key",b))+"="+m(f(O,h.encoder,w,"value",b))]:[m(n)+"="+m(String(O))];var P,C=[];if(void 0===O)return C;if("comma"===i&&u(O))_&&f&&(O=o.maybeMap(O,f)),P=[{value:O.length>0?O.join(",")||null:void 0}];else if(u(p))P=p;else{var I=Object.keys(O);P=g?I.sort(g):I}for(var j=a&&u(O)&&1===O.length?n+"[]":n,T=0;T<P.length;++T){var N=P[T],L="object"==typeof N&&void 0!==N.value?N.value:O[N];if(!c||null!==L){var U=u(O)?"function"==typeof i?i(j,N):j:j+(v?"."+N:"["+N+"]");S.set(t,x);var D=r();D.set(d,S),l(C,e(L,U,i,a,s,c,"comma"===i&&_&&u(O)?null:f,p,g,v,y,b,m,_,w,D))}}return C};e.exports=function(e,t){var n,o=e,c=function(e){if(!e)return h;if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||h.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=i.default;if(void 0!==e.format){if(!a.call(i.formatters,e.format))throw new TypeError("Unknown format option provided.");n=e.format}var r=i.formatters[n],o=h.filter;return("function"==typeof e.filter||u(e.filter))&&(o=e.filter),{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:h.addQueryPrefix,allowDots:void 0===e.allowDots?h.allowDots:!!e.allowDots,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:h.charsetSentinel,delimiter:void 0===e.delimiter?h.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:h.encode,encoder:"function"==typeof e.encoder?e.encoder:h.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:h.encodeValuesOnly,filter:o,format:n,formatter:r,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:h.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:h.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:h.strictNullHandling}}(t);"function"==typeof c.filter?o=(0,c.filter)("",o):u(c.filter)&&(n=c.filter);var f,p=[];if("object"!=typeof o||null===o)return"";f=t&&t.arrayFormat in s?t.arrayFormat:t&&"indices"in t?t.indices?"indices":"repeat":"indices";var d=s[f];if(t&&"commaRoundTrip"in t&&"boolean"!=typeof t.commaRoundTrip)throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var v="comma"===d&&t&&t.commaRoundTrip;n||(n=Object.keys(o)),c.sort&&n.sort(c.sort);for(var y=r(),b=0;b<n.length;++b){var m=n[b];c.skipNulls&&null===o[m]||l(p,g(o[m],m,d,v,c.strictNullHandling,c.skipNulls,c.encode?c.encoder:null,c.filter,c.sort,c.allowDots,c.serializeDate,c.format,c.formatter,c.encodeValuesOnly,c.charset,y))}var _=p.join(c.delimiter),w=!0===c.addQueryPrefix?"?":"";return c.charsetSentinel&&("iso-8859-1"===c.charset?w+="utf8=%26%2310003%3B&":w+="utf8=%E2%9C%93&"),_.length>0?w+_:""}},72:(e,t,n)=>{"use strict";var r=n(516),o=Object.prototype.hasOwnProperty,i=Array.isArray,a=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),s=function(e,t){for(var n=t&&t.plainObjects?Object.create(null):{},r=0;r<e.length;++r)void 0!==e[r]&&(n[r]=e[r]);return n};e.exports={arrayToObject:s,assign:function(e,t){return Object.keys(t).reduce((function(e,n){return e[n]=t[n],e}),e)},combine:function(e,t){return[].concat(e,t)},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],n=[],r=0;r<t.length;++r)for(var o=t[r],a=o.obj[o.prop],s=Object.keys(a),u=0;u<s.length;++u){var c=s[u],l=a[c];"object"==typeof l&&null!==l&&-1===n.indexOf(l)&&(t.push({obj:a,prop:c}),n.push(l))}return function(e){for(;e.length>1;){var t=e.pop(),n=t.obj[t.prop];if(i(n)){for(var r=[],o=0;o<n.length;++o)void 0!==n[o]&&r.push(n[o]);t.obj[t.prop]=r}}}(t),e},decode:function(e,t,n){var r=e.replace(/\+/g," ");if("iso-8859-1"===n)return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch(e){return r}},encode:function(e,t,n,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"===n)return escape(s).replace(/%u[0-9a-f]{4}/gi,(function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"}));for(var u="",c=0;c<s.length;++c){var l=s.charCodeAt(c);45===l||46===l||95===l||126===l||l>=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122||i===r.RFC1738&&(40===l||41===l)?u+=s.charAt(c):l<128?u+=a[l]:l<2048?u+=a[192|l>>6]+a[128|63&l]:l<55296||l>=57344?u+=a[224|l>>12]+a[128|l>>6&63]+a[128|63&l]:(c+=1,l=65536+((1023&l)<<10|1023&s.charCodeAt(c)),u+=a[240|l>>18]+a[128|l>>12&63]+a[128|l>>6&63]+a[128|63&l])}return u},isBuffer:function(e){return!(!e||"object"!=typeof e||!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e)))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(i(e)){for(var n=[],r=0;r<e.length;r+=1)n.push(t(e[r]));return n}return t(e)},merge:function e(t,n,r){if(!n)return t;if("object"!=typeof n){if(i(t))t.push(n);else{if(!t||"object"!=typeof t)return[t,n];(r&&(r.plainObjects||r.allowPrototypes)||!o.call(Object.prototype,n))&&(t[n]=!0)}return t}if(!t||"object"!=typeof t)return[t].concat(n);var a=t;return i(t)&&!i(n)&&(a=s(t,r)),i(t)&&i(n)?(n.forEach((function(n,i){if(o.call(t,i)){var a=t[i];a&&"object"==typeof a&&n&&"object"==typeof n?t[i]=e(a,n,r):t.push(n)}else t[i]=n})),t):Object.keys(n).reduce((function(t,i){var a=n[i];return o.call(t,i)?t[i]=e(t[i],a,r):t[i]=a,t}),a)}}},328:(e,t,n)=>{"use strict";var r=n(795),o=n(780),i=n(579)(),a=n(36),s=n(352),u=r("%Math.floor%");e.exports=function(e,t){if("function"!=typeof e)throw new s("`fn` is not a function");if("number"!=typeof t||t<0||t>4294967295||u(t)!==t)throw new s("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],r=!0,c=!0;if("length"in e&&a){var l=a(e,"length");l&&!l.configurable&&(r=!1),l&&!l.writable&&(c=!1)}return(r||c||!n)&&(i?o(e,"length",t,!0,!0):o(e,"length",t)),e}},252:(e,t,n)=>{"use strict";var r=n(795),o=n(256),i=n(636),a=n(352),s=r("%WeakMap%",!0),u=r("%Map%",!0),c=o("WeakMap.prototype.get",!0),l=o("WeakMap.prototype.set",!0),f=o("WeakMap.prototype.has",!0),p=o("Map.prototype.get",!0),h=o("Map.prototype.set",!0),d=o("Map.prototype.has",!0),g=function(e,t){for(var n,r=e;null!==(n=r.next);r=n)if(n.key===t)return r.next=n.next,n.next=e.next,e.next=n,n};e.exports=function(){var e,t,n,r={assert:function(e){if(!r.has(e))throw new a("Side channel does not contain "+i(e))},get:function(r){if(s&&r&&("object"==typeof r||"function"==typeof r)){if(e)return c(e,r)}else if(u){if(t)return p(t,r)}else if(n)return function(e,t){var n=g(e,t);return n&&n.value}(n,r)},has:function(r){if(s&&r&&("object"==typeof r||"function"==typeof r)){if(e)return f(e,r)}else if(u){if(t)return d(t,r)}else if(n)return function(e,t){return!!g(e,t)}(n,r);return!1},set:function(r,o){s&&r&&("object"==typeof r||"function"==typeof r)?(e||(e=new s),l(e,r,o)):u?(t||(t=new u),h(t,r,o)):(n||(n={key:{},next:null}),function(e,t,n){var r=g(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}}(n,r,o))}};return r}},960:function(e,t,n){!function(e){"use strict";var t,n=function(){try{if(e.URLSearchParams&&"bar"===new e.URLSearchParams("foo=bar").get("foo"))return e.URLSearchParams}catch(e){}return null}(),r=n&&"a=1"===new n({a:1}).toString(),o=n&&"+"===new n("s=%2B").get("s"),i=n&&"size"in n.prototype,a="__URLSearchParams__",s=!n||((t=new n).append("s"," &"),"s=+%26"===t.toString()),u=h.prototype,c=!(!e.Symbol||!e.Symbol.iterator);if(!(n&&r&&o&&s&&i)){u.append=function(e,t){b(this[a],e,t)},u.delete=function(e){delete this[a][e]},u.get=function(e){var t=this[a];return this.has(e)?t[e][0]:null},u.getAll=function(e){var t=this[a];return this.has(e)?t[e].slice(0):[]},u.has=function(e){return _(this[a],e)},u.set=function(e,t){this[a][e]=[""+t]},u.toString=function(){var e,t,n,r,o=this[a],i=[];for(t in o)for(n=d(t),e=0,r=o[t];e<r.length;e++)i.push(n+"="+d(r[e]));return i.join("&")};var l,f=e.Proxy&&n&&(!o||!s||!r||!i);f?(l=new Proxy(n,{construct:function(e,t){return new e(new h(t[0]).toString())}})).toString=Function.prototype.toString.bind(h):l=h,Object.defineProperty(e,"URLSearchParams",{value:l});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 n=y(this.toString());Object.getOwnPropertyNames(n).forEach((function(r){n[r].forEach((function(n){e.call(t,n,r,this)}),this)}),this)}),"sort"in p||(p.sort=function(){var e,t,n,r=y(this.toString()),o=[];for(e in r)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],a=r[i];for(n=0;n<a.length;n++)this.append(i,a[n])}}),"keys"in p||(p.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),v(e)}),"values"in p||(p.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),v(e)}),"entries"in p||(p.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),v(e)}),c&&(p[e.Symbol.iterator]=p[e.Symbol.iterator]||p.entries),"size"in p||Object.defineProperty(p,"size",{get:function(){var e=y(this.toString());if(p===this)throw new TypeError("Illegal invocation at URLSearchParams.invokeGetter");return Object.keys(e).reduce((function(t,n){return t+e[n].length}),0)}})}function h(e){((e=e||"")instanceof URLSearchParams||e instanceof h)&&(e=e.toString()),this[a]=y(e)}function d(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})+/gi,(function(e){return decodeURIComponent(e)}))}function v(t){var n={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return c&&(n[e.Symbol.iterator]=function(){return n}),n}function y(e){var t={};if("object"==typeof e)if(m(e))for(var n=0;n<e.length;n++){var r=e[n];if(!m(r)||2!==r.length)throw new TypeError("Failed to construct 'URLSearchParams': Sequence initializer must only contain pair elements");b(t,r[0],r[1])}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("&"),a=0;a<i.length;a++){var s=i[a],u=s.indexOf("=");-1<u?b(t,g(s.slice(0,u)),g(s.slice(u+1))):s&&b(t,g(s),"")}}return t}function b(e,t,n){var r="string"==typeof n?n:null!=n&&"function"==typeof n.toString?n.toString():JSON.stringify(n);_(e,t)?e[t].push(r):e[t]=[r]}function m(e){return!!e&&"[object Array]"===Object.prototype.toString.call(e)}function _(e,t){return Object.prototype.hasOwnProperty.call(e,t)}}(void 0!==n.g?n.g:"undefined"!=typeof window?window:this)},488:e=>{"use strict";e.exports=r},472:t=>{"use strict";t.exports=e},768:e=>{"use strict";e.exports=n},272:e=>{"use strict";e.exports=t},248:()=>{},164:()=>{},132:()=>{},624:(e,t,n)=>{var r;if("function"==typeof fetch&&(r=void 0!==n.g&&n.g.fetch?n.g.fetch:"undefined"!=typeof window&&window.fetch?window.fetch:fetch),"undefined"==typeof window||void 0===window.document){var o=r||n(388);o.default&&(o=o.default),t.default=o,e.exports=t.default}}},s={};function u(e){var t=s[e];if(void 0!==t)return t.exports;var n=s[e]={id:e,loaded:!1,exports:{}};return a[e].call(n.exports,n,n.exports,u),n.loaded=!0,n.exports}u.amdO={},u.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return u.d(t,{a:t}),t},i=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,u.t=function(e,t){if(1&t&&(e=this(e)),8&t)return e;if("object"==typeof e&&e){if(4&t&&e.__esModule)return e;if(16&t&&"function"==typeof e.then)return e}var n=Object.create(null);u.r(n);var r={};o=o||[null,i({}),i([]),i(i)];for(var a=2&t&&e;"object"==typeof a&&!~o.indexOf(a);a=i(a))Object.getOwnPropertyNames(a).forEach((t=>r[t]=()=>e[t]));return r.default=()=>e,u.d(n,r),n},u.d=(e,t)=>{for(var n in t)u.o(t,n)&&!u.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},u.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),u.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),u.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},u.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var c={};return(()=>{"use strict";u.r(c),u.d(c,{Console:()=>Rt,DEFAULT_ICONSET:()=>En,DEFAULT_LANGUAGES:()=>Cn,DefaultBoxShadow:()=>wn,DefaultBoxShadowBottom:()=>_n,DefaultColor1:()=>fn,DefaultColor10:()=>bn,DefaultColor11:()=>mn,DefaultColor2:()=>pn,DefaultColor3:()=>vn,DefaultColor4:()=>cn,DefaultColor5:()=>hn,DefaultColor6:()=>dn,DefaultColor7:()=>ln,DefaultColor8:()=>gn,DefaultColor9:()=>yn,DefaultDisabledOpacity:()=>kn,DefaultHeaderHeight:()=>Sn,EventProviderStatus:()=>Pt,Manager:()=>jn,OPENREMOTE_CLIENT_ID:()=>xn,ORError:()=>Rn,OREvent:()=>Pn,RESTRICTED_USER_REALM_ROLE:()=>An,Util:()=>e,WebSocketEventProvider:()=>Lt,default:()=>Nn,manager:()=>Tn,normaliseConfig:()=>In,subscribe:()=>un});var e={};function t(e){return t="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},t(e)}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e){var n=function(e,n){if("object"!=t(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,"string");if("object"!=t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==t(n)?n:String(n)}function o(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,r(o.key),o)}}function i(e,t,n){return t&&o(e.prototype,t),n&&o(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function a(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function s(e,t){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},s(e,t)}function l(e,t){if("function"!=typeof t&&null!==t)throw new 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&&s(e,t)}function f(e,n){if(n&&("object"===t(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return a(e)}function p(e){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},p(e)}function h(e,t,n){return(t=r(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function g(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function v(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?g(Object(n),!0).forEach((function(t){h(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}u.r(e),u.d(e,{Deferred:()=>ye,arrayRemove:()=>Ie,blobToBase64:()=>Et,camelCaseToSentenceCase:()=>Te,capitaliseFirstLetter:()=>Le,cronStringToISOString:()=>Ve,dateToCronString:()=>We,difference:()=>Ce,disableScroll:()=>kt,dispatchCancellableEvent:()=>vt,enableScroll:()=>Ot,enumContains:()=>Ue,formatCronString:()=>Be,getAllowedValueLabel:()=>Ge,getAssetTypeLabel:()=>ze,getAttributeLabel:()=>Je,getAttributeUnits:()=>it,getAttributeValueAsString:()=>Qe,getAttributeValueConstraints:()=>rt,getAttributeValueFormat:()=>st,getBrowserLanguage:()=>be,getEnumKeyAsString:()=>De,getGeoNotificationsFromRulesSet:()=>we,getMetaItemNameValueHolder:()=>$e,getMetaLabel:()=>Ye,getMetaUnits:()=>at,getMetaValue:()=>He,getMetaValueAsString:()=>Ze,getMetaValueConstraints:()=>ot,getMetaValueFormat:()=>ut,getQueryParameter:()=>_e,getQueryParameters:()=>me,getValueAsString:()=>tt,getValueDescriptorLabel:()=>Ke,getWeekNumber:()=>Me,hasMetaItem:()=>qe,isFunction:()=>Re,isObject:()=>Ae,isTimeDuration:()=>Oe,isTimeDurationNegativeInfinity:()=>xe,isTimeDurationPositiveInfinity:()=>Ee,loadJs:()=>ht,mergeObjects:()=>ct,objectsEqual:()=>Pe,resolveUnits:()=>nt,sentenceCaseToCamelCase:()=>je,sortByNumber:()=>dt,sortByString:()=>gt,stringMatch:()=>Ne,updateAsset:()=>pt}),u(960);var y={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)}},b=new(function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n(this,e),this.init(t,r)}return i(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||y,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=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"log","",!0)}},{key:"warn",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","",!0)}},{key:"error",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"error","")}},{key:"deprecate",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(e,t,n,r){return r&&!this.debug?null:("string"==typeof e[0]&&(e[0]="".concat(n).concat(this.prefix," ").concat(e[0])),this.logger[t](e))}},{key:"create",value:function(t){return new e(this.logger,v(v({},{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}()),m=function(){function e(){n(this,e),this.observers={}}return i(e,[{key:"on",value:function(e,t){var n=this;return e.split(" ").forEach((function(e){n.observers[e]=n.observers[e]||[],n.observers[e].push(t)})),this}},{key:"off",value:function(e,t){this.observers[e]&&(t?this.observers[e]=this.observers[e].filter((function(e){return e!==t})):delete this.observers[e])}},{key:"emit",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];this.observers[e]&&[].concat(this.observers[e]).forEach((function(e){e.apply(void 0,n)})),this.observers["*"]&&[].concat(this.observers["*"]).forEach((function(t){t.apply(t,[e].concat(n))}))}}]),e}();function _(){var e,t,n=new Promise((function(n,r){e=n,t=r}));return n.resolve=e,n.reject=t,n}function w(e){return null==e?"":""+e}function S(e,t,n){function r(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 a=r(i.shift());!e[a]&&n&&(e[a]=new n),e=Object.prototype.hasOwnProperty.call(e,a)?e[a]:{}}return o()?{}:{obj:e,k:r(i.shift())}}function k(e,t,n){var r=S(e,t,Object);r.obj[r.k]=n}function O(e,t){var n=S(e,t),r=n.obj,o=n.k;if(r)return r[o]}function E(e,t,n){var r=O(e,n);return void 0!==r?r:O(t,n)}function x(e,t,n){for(var r in t)"__proto__"!==r&&"constructor"!==r&&(r in e?"string"==typeof e[r]||e[r]instanceof String||"string"==typeof t[r]||t[r]instanceof String?n&&(e[r]=t[r]):x(e[r],t[r],n):e[r]=t[r]);return e}function A(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var R={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function P(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,(function(e){return R[e]})):e}var C="undefined"!=typeof window&&window.navigator&&void 0===window.navigator.userAgentData&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,I=[" ",",","?","!",";"];function j(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function T(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?j(Object(n),!0).forEach((function(t){h(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):j(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function N(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(e){if(e[t])return e[t];for(var r=t.split(n),o=e,i=0;i<r.length;++i){if(!o)return;if("string"==typeof o[r[i]]&&i+1<r.length)return;if(void 0===o[r[i]]){for(var a=2,s=r.slice(i,i+a).join(n),u=o[s];void 0===u&&r.length>i+a;)a++,u=o[s=r.slice(i,i+a).join(n)];if(void 0===u)return;if(null===u)return null;if(t.endsWith(s)){if("string"==typeof u)return u;if(s&&"string"==typeof u[s])return u[s]}var c=r.slice(i+a).join(n);return c?N(u,c,n):void 0}o=o[r[i]]}return o}}var L=function(e){l(s,e);var t,r,o=(t=s,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(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,n=p(t);if(r){var o=p(this).constructor;e=Reflect.construct(n,arguments,o)}else e=n.apply(this,arguments);return f(this,e)});function s(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return n(this,s),t=o.call(this),C&&m.call(a(t)),t.data=e||{},t.options=r,void 0===t.options.keySeparator&&(t.options.keySeparator="."),void 0===t.options.ignoreJSONStructure&&(t.options.ignoreJSONStructure=!0),t}return i(s,[{key:"addNamespaces",value:function(e){this.options.ns.indexOf(e)<0&&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,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,i=void 0!==r.ignoreJSONStructure?r.ignoreJSONStructure:this.options.ignoreJSONStructure,a=[e,t];n&&"string"!=typeof n&&(a=a.concat(n)),n&&"string"==typeof n&&(a=a.concat(o?n.split(o):n)),e.indexOf(".")>-1&&(a=e.split("."));var s=O(this.data,a);return s||!i||"string"!=typeof n?s:N(this.data&&this.data[e]&&this.data[e][t],n,o)}},{key:"addResource",value:function(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},i=this.options.keySeparator;void 0===i&&(i=".");var a=[e,t];n&&(a=a.concat(i?n.split(i):n)),e.indexOf(".")>-1&&(r=t,t=(a=e.split("."))[1]),this.addNamespaces(t),k(this.data,a,r),o.silent||this.emit("added",e,t,n,r)}},{key:"addResources",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var o in n)"string"!=typeof n[o]&&"[object Array]"!==Object.prototype.toString.apply(n[o])||this.addResource(e,t,o,n[o],{silent:!0});r.silent||this.emit("added",e,t,n)}},{key:"addResourceBundle",value:function(e,t,n,r,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},a=[e,t];e.indexOf(".")>-1&&(r=n,n=t,t=(a=e.split("."))[1]),this.addNamespaces(t);var s=O(this.data,a)||{};r?x(s,n,o):s=T(T({},s),n),k(this.data,a,s),i.silent||this.emit("added",e,t,n)}},{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?T(T({},{}),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}}]),s}(m),U={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,t,n,r,o){var i=this;return e.forEach((function(e){i.processors[e]&&(t=i.processors[e].process(t,n,r,o))})),t}};function D(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function M(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?D(Object(n),!0).forEach((function(t){h(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):D(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var F={},B=function(e){l(u,e);var r,o,s=(r=u,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(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,t=p(r);if(o){var n=p(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return f(this,e)});function u(e){var t,r,o,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n(this,u),t=s.call(this),C&&m.call(a(t)),r=e,o=a(t),["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"].forEach((function(e){r[e]&&(o[e]=r[e])})),t.options=i,void 0===t.options.keySeparator&&(t.options.keySeparator="."),t.logger=b.create("translator"),t}return i(u,[{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 n=this.resolve(e,t);return n&&void 0!==n.res}},{key:"extractFromKey",value:function(e,t){var n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");var r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,o=t.ns||this.options.defaultNS||[],i=n&&e.indexOf(n)>-1,a=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||function(e,t,n){t=t||"",n=n||"";var r=I.filter((function(e){return t.indexOf(e)<0&&n.indexOf(e)<0}));if(0===r.length)return!0;var o=new RegExp("(".concat(r.map((function(e){return"?"===e?"\\?":e})).join("|"),")")),i=!o.test(e);if(!i){var a=e.indexOf(n);a>0&&!o.test(e.substring(0,a))&&(i=!0)}return i}(e,n,r));if(i&&!a){var s=e.match(this.interpolator.nestingRegexp);if(s&&s.length>0)return{key:e,namespaces:o};var u=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(u[0])>-1)&&(o=u.shift()),e=u.join(r)}return"string"==typeof o&&(o=[o]),{key:e,namespaces:o}}},{key:"translate",value:function(e,n,r){var o=this;if("object"!==t(n)&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),n||(n={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);var i=void 0!==n.returnDetails?n.returnDetails:this.options.returnDetails,a=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,s=this.extractFromKey(e[e.length-1],n),c=s.key,l=s.namespaces,f=l[l.length-1],p=n.lng||this.language,h=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(p&&"cimode"===p.toLowerCase()){if(h){var d=n.nsSeparator||this.options.nsSeparator;return i?(g.res="".concat(f).concat(d).concat(c),g):"".concat(f).concat(d).concat(c)}return i?(g.res=c,g):c}var g=this.resolve(e,n),v=g&&g.res,y=g&&g.usedKey||c,b=g&&g.exactUsedKey||c,m=Object.prototype.toString.apply(v),_=void 0!==n.joinArrays?n.joinArrays:this.options.joinArrays,w=!this.i18nFormat||this.i18nFormat.handleAsObject;if(w&&v&&"string"!=typeof v&&"boolean"!=typeof v&&"number"!=typeof v&&["[object Number]","[object Function]","[object RegExp]"].indexOf(m)<0&&("string"!=typeof _||"[object Array]"!==m)){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var S=this.options.returnedObjectHandler?this.options.returnedObjectHandler(y,v,M(M({},n),{},{ns:l})):"key '".concat(c," (").concat(this.language,")' returned an object instead of string.");return i?(g.res=S,g):S}if(a){var k="[object Array]"===m,O=k?[]:{},E=k?b:y;for(var x in v)if(Object.prototype.hasOwnProperty.call(v,x)){var A="".concat(E).concat(a).concat(x);O[x]=this.translate(A,M(M({},n),{joinArrays:!1,ns:l})),O[x]===A&&(O[x]=v[x])}v=O}}else if(w&&"string"==typeof _&&"[object Array]"===m)(v=v.join(_))&&(v=this.extendTranslation(v,e,n,r));else{var R=!1,P=!1,C=void 0!==n.count&&"string"!=typeof n.count,I=u.hasDefaultValue(n),j=C?this.pluralResolver.getSuffix(p,n.count,n):"",T=n["defaultValue".concat(j)]||n.defaultValue;!this.isValidLookup(v)&&I&&(R=!0,v=T),this.isValidLookup(v)||(P=!0,v=c);var N=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&P?void 0:v,L=I&&T!==v&&this.options.updateMissing;if(P||R||L){if(this.logger.log(L?"updateKey":"missingKey",p,f,c,L?T:v),a){var U=this.resolve(c,M(M({},n),{},{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 D=[],F=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if("fallback"===this.options.saveMissingTo&&F&&F[0])for(var B=0;B<F.length;B++)D.push(F[B]);else"all"===this.options.saveMissingTo?D=this.languageUtils.toResolveHierarchy(n.lng||this.language):D.push(n.lng||this.language);var W=function(e,t,r){var i=I&&r!==v?r:N;o.options.missingKeyHandler?o.options.missingKeyHandler(e,f,t,i,L,n):o.backendConnector&&o.backendConnector.saveMissing&&o.backendConnector.saveMissing(e,f,t,i,L,n),o.emit("missingKey",e,f,t,v)};this.options.saveMissing&&(this.options.saveMissingPlurals&&C?D.forEach((function(e){o.pluralResolver.getSuffixes(e,n).forEach((function(t){W([e],c+t,n["defaultValue".concat(t)]||T)}))})):W(D,c,T))}v=this.extendTranslation(v,e,n,g,r),P&&v===c&&this.options.appendNamespaceToMissingKey&&(v="".concat(f,":").concat(c)),(P||R)&&this.options.parseMissingKeyHandler&&(v="v1"!==this.options.compatibilityAPI?this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?"".concat(f,":").concat(c):c,R?v:void 0):this.options.parseMissingKeyHandler(v))}return i?(g.res=v,g):v}},{key:"extendTranslation",value:function(e,t,n,r,o){var i=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,M(M({},this.options.interpolation.defaultVariables),n),r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init(M(M({},n),{interpolation:M(M({},this.options.interpolation),n.interpolation)}));var a,s="string"==typeof e&&(n&&n.interpolation&&void 0!==n.interpolation.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);if(s){var u=e.match(this.interpolator.nestingRegexp);a=u&&u.length}var c=n.replace&&"string"!=typeof n.replace?n.replace:n;if(this.options.interpolation.defaultVariables&&(c=M(M({},this.options.interpolation.defaultVariables),c)),e=this.interpolator.interpolate(e,c,n.lng||this.language,n),s){var l=e.match(this.interpolator.nestingRegexp);a<(l&&l.length)&&(n.nest=!1)}!1!==n.nest&&(e=this.interpolator.nest(e,(function(){for(var e=arguments.length,r=new Array(e),a=0;a<e;a++)r[a]=arguments[a];return o&&o[0]===r[0]&&!n.context?(i.logger.warn("It seems you are nesting recursively key: ".concat(r[0]," in key: ").concat(t[0])),null):i.translate.apply(i,r.concat([t]))}),n)),n.interpolation&&this.interpolator.reset()}var f=n.postProcess||this.options.postProcess,p="string"==typeof f?[f]:f;return null!=e&&p&&p.length&&!1!==n.applyPostProcessor&&(e=U.handle(p,e,t,this.options&&this.options.postProcessPassResolved?M({i18nResolved:r},n):n,this)),e}},{key:"resolve",value:function(e){var t,n,r,o,i,a=this,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach((function(e){if(!a.isValidLookup(t)){var u=a.extractFromKey(e,s),c=u.key;n=c;var l=u.namespaces;a.options.fallbackNS&&(l=l.concat(a.options.fallbackNS));var f=void 0!==s.count&&"string"!=typeof s.count,p=f&&!s.ordinal&&0===s.count&&a.pluralResolver.shouldUseIntlApi(),h=void 0!==s.context&&("string"==typeof s.context||"number"==typeof s.context)&&""!==s.context,d=s.lngs?s.lngs:a.languageUtils.toResolveHierarchy(s.lng||a.language,s.fallbackLng);l.forEach((function(e){a.isValidLookup(t)||(i=e,!F["".concat(d[0],"-").concat(e)]&&a.utils&&a.utils.hasLoadedNamespace&&!a.utils.hasLoadedNamespace(i)&&(F["".concat(d[0],"-").concat(e)]=!0,a.logger.warn('key "'.concat(n,'" for languages "').concat(d.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!!!")),d.forEach((function(n){if(!a.isValidLookup(t)){o=n;var i,u=[c];if(a.i18nFormat&&a.i18nFormat.addLookupKeys)a.i18nFormat.addLookupKeys(u,c,n,e,s);else{var l;f&&(l=a.pluralResolver.getSuffix(n,s.count,s));var d="".concat(a.options.pluralSeparator,"zero");if(f&&(u.push(c+l),p&&u.push(c+d)),h){var g="".concat(c).concat(a.options.contextSeparator).concat(s.context);u.push(g),f&&(u.push(g+l),p&&u.push(g+d))}}for(;i=u.pop();)a.isValidLookup(t)||(r=i,t=a.getResource(n,e,i,s))}})))}))}})),{res:t,usedKey:n,exactUsedKey:r,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,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}}],[{key:"hasDefaultValue",value:function(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&"defaultValue"===t.substring(0,12)&&void 0!==e[t])return!0;return!1}}]),u}(m);function W(e){return e.charAt(0).toUpperCase()+e.slice(1)}var V=function(){function e(t){n(this,e),this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=b.create("languageUtils")}return i(e,[{key:"getScriptPartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return null;var t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}},{key:"getLanguagePartFromCode",value:function(e){if(!e||e.indexOf("-")<0)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"],n=e.split("-");return this.options.lowerCaseLng?n=n.map((function(e){return e.toLowerCase()})):2===n.length?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=W(n[1].toLowerCase()))):3===n.length&&(n[0]=n[0].toLowerCase(),2===n[1].length&&(n[1]=n[1].toUpperCase()),"sgn"!==n[0]&&2===n[2].length&&(n[2]=n[2].toUpperCase()),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=W(n[1].toLowerCase())),t.indexOf(n[2].toLowerCase())>-1&&(n[2]=W(n[2].toLowerCase()))),n.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,n=this;return e?(e.forEach((function(e){if(!t){var r=n.formatLanguageCode(e);n.options.supportedLngs&&!n.isSupportedCode(r)||(t=r)}})),!t&&this.options.supportedLngs&&e.forEach((function(e){if(!t){var r=n.getLanguagePartFromCode(e);if(n.isSupportedCode(r))return t=r;t=n.options.supportedLngs.find((function(e){if(0===e.indexOf(r))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 n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}},{key:"toResolveHierarchy",value:function(e,t){var n=this,r=this.getFallbackCodes(t||this.options.fallbackLng||[],e),o=[],i=function(e){e&&(n.isSupportedCode(e)?o.push(e):n.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)),r.forEach((function(e){o.indexOf(e)<0&&i(n.formatLanguageCode(e))})),o}}]),e}(),H=[{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}],q={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?0:1)},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:e%100==3||e%100==4?3:0)},22:function(e){return Number(1==e?0:2==e?1:(e<0||e>10)&&e%10==0?2:3)}},z=["v1","v2","v3"],K={zero:0,one:1,two:2,few:3,many:4,other:5},G=function(){function e(t){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n(this,e),this.languageUtils=t,this.options=o,this.logger=b.create("pluralResolver"),this.options.compatibilityJSON&&"v4"!==this.options.compatibilityJSON||"undefined"!=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={},H.forEach((function(e){e.lngs.forEach((function(t){r[t]={numbers:e.nr,plurals:q[e.fc]}}))})),r)}return i(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]:{},n=this.getRule(e,t);return this.shouldUseIntlApi()?n&&n.resolvedOptions().pluralCategories.length>1:n&&n.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.getSuffixes(e,n).map((function(e){return"".concat(t).concat(e)}))}},{key:"getSuffixes",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.getRule(e,n);return r?this.shouldUseIntlApi()?r.resolvedOptions().pluralCategories.sort((function(e,t){return K[e]-K[t]})).map((function(e){return"".concat(t.options.prepend).concat(e)})):r.numbers.map((function(r){return t.getSuffix(e,r,n)})):[]}},{key:"getSuffix",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.getRule(e,n);return r?this.shouldUseIntlApi()?"".concat(this.options.prepend).concat(r.select(t)):this.getSuffixRetroCompatible(r,t):(this.logger.warn("no plural rule found for: ".concat(e)),"")}},{key:"getSuffixRetroCompatible",value:function(e,t){var n=this,r=e.noAbs?e.plurals(t):e.plurals(Math.abs(t)),o=e.numbers[r];this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]&&(2===o?o="plural":1===o&&(o=""));var i=function(){return n.options.prepend&&o.toString()?n.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&&r.toString()?this.options.prepend+r.toString():r.toString()}},{key:"shouldUseIntlApi",value:function(){return!z.includes(this.options.compatibilityJSON)}}]),e}();function $(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function J(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$(Object(n),!0).forEach((function(t){h(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Y=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};n(this,e),this.logger=b.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(e){return e},this.init(t)}return i(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:P,this.escapeValue=void 0===t.escapeValue||t.escapeValue,this.useRawValueToEscape=void 0!==t.useRawValueToEscape&&t.useRawValueToEscape,this.prefix=t.prefix?A(t.prefix):t.prefixEscaped||"{{",this.suffix=t.suffix?A(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?A(t.nestingPrefix):t.nestingPrefixEscaped||A("$t("),this.nestingSuffix=t.nestingSuffix?A(t.nestingSuffix):t.nestingSuffixEscaped||A(")"),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=new RegExp(e,"g");var t="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(t,"g");var n="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(n,"g")}},{key:"interpolate",value:function(e,t,n,r){var o,i,a,s=this,u=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function c(e){return e.replace(/\$/g,"$$$$")}var l=function(e){if(e.indexOf(s.formatSeparator)<0){var o=E(t,u,e);return s.alwaysFormat?s.format(o,void 0,n,J(J(J({},r),t),{},{interpolationkey:e})):o}var i=e.split(s.formatSeparator),a=i.shift().trim(),c=i.join(s.formatSeparator).trim();return s.format(E(t,u,a),c,n,J(J(J({},r),t),{},{interpolationkey:a}))};this.resetRegExp();var f=r&&r.missingInterpolationHandler||this.options.missingInterpolationHandler,p=r&&r.interpolation&&void 0!==r.interpolation.skipOnVariables?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:function(e){return c(e)}},{regex:this.regexp,safeValue:function(e){return s.escapeValue?c(s.escape(e)):c(e)}}].forEach((function(t){for(a=0;o=t.regex.exec(e);){var n=o[1].trim();if(void 0===(i=l(n)))if("function"==typeof f){var u=f(e,o,r);i="string"==typeof u?u:""}else if(r&&r.hasOwnProperty(n))i="";else{if(p){i=o[0];continue}s.logger.warn("missed to pass in variable ".concat(n," for interpolating ").concat(e)),i=""}else"string"==typeof i||s.useRawValueToEscape||(i=w(i));var c=t.safeValue(i);if(e=e.replace(o[0],c),p?(t.regex.lastIndex+=i.length,t.regex.lastIndex-=o[0].length):t.regex.lastIndex=0,++a>=s.maxReplaces)break}})),e}},{key:"nest",value:function(e,t){var n,r,o=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=J({},i);function s(e,t){var n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;var r=e.split(new RegExp("".concat(n,"[ ]*{"))),o="{".concat(r[1]);e=r[0];var i=(o=this.interpolate(o,a)).match(/'/g),s=o.match(/"/g);(i&&i.length%2==0&&!s||s.length%2!=0)&&(o=o.replace(/'/g,'"'));try{a=JSON.parse(o),t&&(a=J(J({},t),a))}catch(t){return this.logger.warn("failed parsing options string in nesting for key ".concat(e),t),"".concat(e).concat(n).concat(o)}return delete a.defaultValue,e}for(a.applyPostProcessor=!1,delete a.defaultValue;n=this.nestingRegexp.exec(e);){var u=[],c=!1;if(-1!==n[0].indexOf(this.formatSeparator)&&!/{.*}/.test(n[1])){var l=n[1].split(this.formatSeparator).map((function(e){return e.trim()}));n[1]=l.shift(),u=l,c=!0}if((r=t(s.call(this,n[1].trim(),a),a))&&n[0]===e&&"string"!=typeof r)return r;"string"!=typeof r&&(r=w(r)),r||(this.logger.warn("missed to resolve ".concat(n[1]," for nesting ").concat(e)),r=""),c&&(r=u.reduce((function(e,t){return o.format(e,t,i.lng,J(J({},i),{},{interpolationkey:n[1].trim()}))}),r.trim())),e=e.replace(n[0],r),this.regexp.lastIndex=0}return e}}]),e}();function X(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Q(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?X(Object(n),!0).forEach((function(t){h(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):X(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Z(e){var t={};return function(n,r,o){var i=r+JSON.stringify(o),a=t[i];return a||(a=e(r,o),t[i]=a),a(n)}}var ee=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};n(this,e),this.logger=b.create("formatter"),this.options=t,this.formats={number:Z((function(e,t){var n=new Intl.NumberFormat(e,t);return function(e){return n.format(e)}})),currency:Z((function(e,t){var n=new Intl.NumberFormat(e,Q(Q({},t),{},{style:"currency"}));return function(e){return n.format(e)}})),datetime:Z((function(e,t){var n=new Intl.DateTimeFormat(e,Q({},t));return function(e){return n.format(e)}})),relativetime:Z((function(e,t){var n=new Intl.RelativeTimeFormat(e,Q({},t));return function(e){return n.format(e,t.range||"day")}})),list:Z((function(e,t){var n=new Intl.ListFormat(e,Q({},t));return function(e){return n.format(e)}}))},this.init(t)}return i(e,[{key:"init",value:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||","}},{key:"add",value:function(e,t){this.formats[e.toLowerCase().trim()]=t}},{key:"addCached",value:function(e,t){this.formats[e.toLowerCase().trim()]=Z(t)}},{key:"format",value:function(e,t,n,r){var o=this;return t.split(this.formatSeparator).reduce((function(e,t){var i=function(e){var t=e.toLowerCase().trim(),n={};if(e.indexOf("(")>-1){var r=e.split("(");t=r[0].toLowerCase().trim();var o=r[1].substring(0,r[1].length-1);"currency"===t&&o.indexOf(":")<0?n.currency||(n.currency=o.trim()):"relativetime"===t&&o.indexOf(":")<0?n.range||(n.range=o.trim()):o.split(";").forEach((function(e){if(e){var t=function(e){return function(e){if(Array.isArray(e))return e}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return d(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(e.split(":")),r=t[0],o=t.slice(1).join(":").trim().replace(/^'+|'+$/g,"");n[r.trim()]||(n[r.trim()]=o),"false"===o&&(n[r.trim()]=!1),"true"===o&&(n[r.trim()]=!0),isNaN(o)||(n[r.trim()]=parseInt(o,10))}}))}return{formatName:t,formatOptions:n}}(t),a=i.formatName,s=i.formatOptions;if(o.formats[a]){var u=e;try{var c=r&&r.formatParams&&r.formatParams[r.interpolationkey]||{},l=c.locale||c.lng||r.locale||r.lng||n;u=o.formats[a](e,l,Q(Q(Q({},s),r),c))}catch(e){o.logger.warn(e)}return u}return o.logger.warn("there was no format function for ".concat(a)),e}),e)}}]),e}();function te(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ne(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?te(Object(n),!0).forEach((function(t){h(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):te(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var re=function(e){l(s,e);var t,r,o=(t=s,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(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,n=p(t);if(r){var o=p(this).constructor;e=Reflect.construct(n,arguments,o)}else e=n.apply(this,arguments);return f(this,e)});function s(e,t,r){var i,u=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return n(this,s),i=o.call(this),C&&m.call(a(i)),i.backend=e,i.store=t,i.services=r,i.languageUtils=r.languageUtils,i.options=u,i.logger=b.create("backendConnector"),i.waitingReads=[],i.maxParallelReads=u.maxParallelReads||10,i.readingCalls=0,i.maxRetries=u.maxRetries>=0?u.maxRetries:5,i.retryTimeout=u.retryTimeout>=1?u.retryTimeout:350,i.state={},i.queue=[],i.backend&&i.backend.init&&i.backend.init(r,u.backend,u),i}return i(s,[{key:"queueLoad",value:function(e,t,n,r){var o=this,i={},a={},s={},u={};return e.forEach((function(e){var r=!0;t.forEach((function(t){var s="".concat(e,"|").concat(t);!n.reload&&o.store.hasResourceBundle(e,t)?o.state[s]=2:o.state[s]<0||(1===o.state[s]?void 0===a[s]&&(a[s]=!0):(o.state[s]=1,r=!1,void 0===a[s]&&(a[s]=!0),void 0===i[s]&&(i[s]=!0),void 0===u[t]&&(u[t]=!0)))})),r||(s[e]=!0)})),(Object.keys(i).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(i),pending:Object.keys(a),toLoadLanguages:Object.keys(s),toLoadNamespaces:Object.keys(u)}}},{key:"loaded",value:function(e,t,n){var r=e.split("|"),o=r[0],i=r[1];t&&this.emit("failedLoading",o,i,t),n&&this.store.addResourceBundle(o,i,n),this.state[e]=t?-1:2;var a={};this.queue.forEach((function(n){var r,s,u,c,l;r=n.loaded,s=i,(c=(u=S(r,[o],Object)).obj)[l=u.k]=c[l]||[],c[l].push(s),function(e,t){void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)}(n,e),t&&n.errors.push(t),0!==n.pendingCount||n.done||(Object.keys(n.loaded).forEach((function(e){a[e]||(a[e]={});var t=n.loaded[e];t.length&&t.forEach((function(t){void 0===a[e][t]&&(a[e][t]=!0)}))})),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())})),this.emit("loaded",a),this.queue=this.queue.filter((function(e){return!e.done}))}},{key:"read",value:function(e,t,n){var r=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,a=arguments.length>5?arguments[5]:void 0;return e.length?this.readingCalls>=this.maxParallelReads?void this.waitingReads.push({lng:e,ns:t,fcName:n,tried:o,wait:i,callback:a}):(this.readingCalls++,this.backend[n](e,t,(function(s,u){if(r.readingCalls--,r.waitingReads.length>0){var c=r.waitingReads.shift();r.read(c.lng,c.ns,c.fcName,c.tried,c.wait,c.callback)}s&&u&&o<r.maxRetries?setTimeout((function(){r.read.call(r,e,t,n,o+1,2*i,a)}),i):a(s,u)}))):a(null,{})}},{key:"prepareLoading",value:function(e,t){var n=this,r=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,r,o);if(!i.toLoad.length)return i.pending.length||o(),null;i.toLoad.forEach((function(e){n.loadOne(e)}))}},{key:"load",value:function(e,t,n){this.prepareLoading(e,t,{},n)}},{key:"reload",value:function(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}},{key:"loadOne",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=e.split("|"),o=r[0],i=r[1];this.read(o,i,"read",void 0,void 0,(function(r,a){r&&t.logger.warn("".concat(n,"loading namespace ").concat(i," for language ").concat(o," failed"),r),!r&&a&&t.logger.log("".concat(n,"loaded namespace ").concat(i," for language ").concat(o),a),t.loaded(e,r,a)}))}},{key:"saveMissing",value:function(e,t,n,r,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(n,'" 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!=n&&""!==n&&(this.backend&&this.backend.create&&this.backend.create(e,t,n,r,null,ne(ne({},i),{},{isUpdate:o})),e&&e[0]&&this.store.addResource(e[0],t,n,r))}}]),s}(m);function oe(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&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function ie(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ae(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ie(Object(n),!0).forEach((function(t){h(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ie(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function se(){}var ue=function(e){l(u,e);var r,o,s=(r=u,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(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,t=p(r);if(o){var n=p(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return f(this,e)});function u(){var e,t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0;if(n(this,u),e=s.call(this),C&&m.call(a(e)),e.options=oe(r),e.services={},e.logger=b,e.modules={external:[]},t=a(e),Object.getOwnPropertyNames(Object.getPrototypeOf(t)).forEach((function(e){"function"==typeof t[e]&&(t[e]=t[e].bind(t))})),o&&!e.isInitialized&&!r.isClone){if(!e.options.initImmediate)return e.init(r,o),f(e,a(e));setTimeout((function(){e.init(r,o)}),0)}return e}return i(u,[{key:"init",value:function(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;"function"==typeof n&&(r=n,n={}),!n.defaultNS&&!1!==n.defaultNS&&n.ns&&("string"==typeof n.ns?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));var o={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 n={};if("object"===t(e[1])&&(n=e[1]),"string"==typeof e[1]&&(n.defaultValue=e[1]),"string"==typeof e[2]&&(n.tDescription=e[2]),"object"===t(e[2])||"object"===t(e[3])){var r=e[3]||e[2];Object.keys(r).forEach((function(e){n[e]=r[e]}))}return n},interpolation:{escapeValue:!0,format:function(e,t,n,r){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}};function i(e){return e?"function"==typeof e?new e:e:null}if(this.options=ae(ae(ae({},o),this.options),oe(n)),"v1"!==this.options.compatibilityAPI&&(this.options.interpolation=ae(ae({},o.interpolation),this.options.interpolation)),void 0!==n.keySeparator&&(this.options.userDefinedKeySeparator=n.keySeparator),void 0!==n.nsSeparator&&(this.options.userDefinedNsSeparator=n.nsSeparator),!this.options.isClone){var a;this.modules.logger?b.init(i(this.modules.logger),this.options):b.init(null,this.options),this.modules.formatter?a=this.modules.formatter:"undefined"!=typeof Intl&&(a=ee);var s=new V(this.options);this.store=new L(this.options.resources,this.options);var u=this.services;u.logger=b,u.resourceStore=this.store,u.languageUtils=s,u.pluralResolver=new G(s,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),!a||this.options.interpolation.format&&this.options.interpolation.format!==o.interpolation.format||(u.formatter=i(a),u.formatter.init(u,this.options),this.options.interpolation.format=u.formatter.format.bind(u.formatter)),u.interpolator=new Y(this.options),u.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},u.backendConnector=new re(i(this.modules.backend),u.resourceStore,u,this.options),u.backendConnector.on("*",(function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];e.emit.apply(e,[t].concat(r))})),this.modules.languageDetector&&(u.languageDetector=i(this.modules.languageDetector),u.languageDetector.init(u,this.options.detection,this.options)),this.modules.i18nFormat&&(u.i18nFormat=i(this.modules.i18nFormat),u.i18nFormat.init&&u.i18nFormat.init(this)),this.translator=new B(this.services,this.options),this.translator.on("*",(function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];e.emit.apply(e,[t].concat(r))})),this.modules.external.forEach((function(t){t.init&&t.init(e)}))}if(this.format=this.options.interpolation.format,r||(r=se),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 n;return(n=e.store)[t].apply(n,arguments)}})),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach((function(t){e[t]=function(){var n;return(n=e.store)[t].apply(n,arguments),e}}));var l=_(),f=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?f():setTimeout(f,0),l}},{key:"loadResources",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:se,r="string"==typeof e?e:this.language;if("function"==typeof e&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(r&&"cimode"===r.toLowerCase())return n();var o=[],i=function(e){e&&t.services.languageUtils.toResolveHierarchy(e).forEach((function(e){o.indexOf(e)<0&&o.push(e)}))};r?i(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((function(e){return i(e)})),this.options.preload&&this.options.preload.forEach((function(e){return i(e)})),this.services.backendConnector.load(o,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,n){var r=_();return e||(e=this.languages),t||(t=this.options.ns),n||(n=se),this.services.backendConnector.reload(e,t,(function(e){r.resolve(),n(e)})),r}},{key:"use",value:function(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new 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&&U.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 n=this.languages[t];if(!(["cimode","dev"].indexOf(n)>-1)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}}},{key:"changeLanguage",value:function(e,t){var n=this;this.isLanguageChangingTo=e;var r=_();this.emit("languageChanging",e);var o=function(e){n.language=e,n.languages=n.services.languageUtils.toResolveHierarchy(e),n.resolvedLanguage=void 0,n.setResolvedLanguage(e)},i=function(i){e||i||!n.services.languageDetector||(i=[]);var a="string"==typeof i?i:n.services.languageUtils.getBestMatchFromCodes(i);a&&(n.language||o(a),n.translator.language||n.translator.changeLanguage(a),n.services.languageDetector&&n.services.languageDetector.cacheUserLanguage(a)),n.loadResources(a,(function(e){!function(e,i){i?(o(i),n.translator.changeLanguage(i),n.isLanguageChangingTo=void 0,n.emit("languageChanged",i),n.logger.log("languageChanged",i)):n.isLanguageChangingTo=void 0,r.resolve((function(){return n.t.apply(n,arguments)})),t&&t(e,(function(){return n.t.apply(n,arguments)}))}(e,a)}))};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(i):i(e):i(this.services.languageDetector.detect()),r}},{key:"getFixedT",value:function(e,n,r){var o=this,i=function e(n,i){var a;if("object"!==t(i)){for(var s=arguments.length,u=new Array(s>2?s-2:0),c=2;c<s;c++)u[c-2]=arguments[c];a=o.options.overloadTranslationOptionHandler([n,i].concat(u))}else a=ae({},i);a.lng=a.lng||e.lng,a.lngs=a.lngs||e.lngs,a.ns=a.ns||e.ns,a.keyPrefix=a.keyPrefix||r||e.keyPrefix;var l=o.options.keySeparator||".",f=a.keyPrefix?"".concat(a.keyPrefix).concat(l).concat(n):n;return o.t(f,a)};return"string"==typeof e?i.lng=e:i.lngs=e,i.ns=n,i.keyPrefix=r,i}},{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,n=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 r=this.resolvedLanguage||this.languages[0],o=!!this.options&&this.options.fallbackLng,i=this.languages[this.languages.length-1];if("cimode"===r.toLowerCase())return!0;var a=function(e,n){var r=t.services.backendConnector.state["".concat(e,"|").concat(n)];return-1===r||2===r};if(n.precheck){var s=n.precheck(this,a);if(void 0!==s)return s}return!(!this.hasResourceBundle(r,e)&&this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages)&&(!a(r,e)||o&&!a(i,e)))}},{key:"loadNamespaces",value:function(e,t){var n=this,r=_();return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach((function(e){n.options.ns.indexOf(e)<0&&n.options.ns.push(e)})),this.loadResources((function(e){r.resolve(),t&&t(e)})),r):(t&&t(),Promise.resolve())}},{key:"loadLanguages",value:function(e,t){var n=_();"string"==typeof e&&(e=[e]);var r=this.options.preload||[],o=e.filter((function(e){return r.indexOf(e)<0}));return o.length?(this.options.preload=r.concat(o),this.loadResources((function(e){n.resolve(),t&&t(e)})),n):(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]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:se,r=ae(ae(ae({},this.options),t),{isClone:!0}),o=new u(r);return void 0===t.debug&&void 0===t.prefix||(o.logger=o.logger.clone(t)),["store","services","language"].forEach((function(t){o[t]=e[t]})),o.services=ae({},this.services),o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o.translator=new B(o.services,o.options),o.translator.on("*",(function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];o.emit.apply(o,[e].concat(n))})),o.init(r,n),o.translator.options=o.options,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}},{key:"toJSON",value:function(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}]),u}(m);h(ue,"createInstance",(function(){return new ue(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},arguments.length>1?arguments[1]:void 0)}));var ce=ue.createInstance();ce.createInstance=ue.createInstance,ce.createInstance,ce.init,ce.loadResources,ce.reloadResources,ce.use,ce.changeLanguage,ce.getFixedT,ce.t,ce.exists,ce.setDefaultNamespace,ce.hasLoadedNamespace,ce.loadNamespaces,ce.loadLanguages;const le=ce;var fe=u(344),pe=u.n(fe),he=u(472),de=u(272),ge=u.n(de),ve=u(944);class ye{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 be(){return navigator.language.split("-")[0]||"en"}function me(e){return pe().parse(e,{ignoreQueryPrefix:!0})}function _e(e){let t;if(location.search&&""!==location.search&&(t=me(location.search)),location.hash){const e=location.hash.indexOf("?");e>-1&&(t=me(location.hash.substring(e+1)))}return t?t[e]:void 0}function we(e){const t=[];return e.rules.forEach((e=>{if(e.when&&e.then&&e.then.length>0){const n=new Map;!function(e,t,n){if(!e)return;const 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){const t=[];if(Se(e.assets.attributes,t),t.length>0){const r=e.tag||(0).toString();n.set(r,t)}}}))}(e.when,0,n),n.size>0&&e.then.forEach((e=>function(e,t){if(e&&"notification"===e.action&&e.notification&&e.notification.message&&"push"===e.notification.message.type){const n=e.target;if(n&&n.conditionAssets){const r=t.get(n.conditionAssets);r&&r.forEach((t=>{t.notification=e.notification.message}))}else for(const n of t.values())n.forEach((t=>{t.notification=e.notification.message}))}}(e,n)));for(const e of n.values())e.forEach((e=>{e.notification&&t.push(e)}))}})),t}function Se(e,t){e&&(e.items.forEach((e=>{!e.value||"radial"!==e.value.predicateType&&"rect"!==e.value.predicateType||t.push({predicate:e.value})})),e.groups&&e.groups.forEach((e=>Se(e,t))))}const ke=/([+-])?((\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 Oe(e){return!!e&&(e=e.trim()).length>0&&(ke.test(e)||Ee(e)||xe(e))}function Ee(e){return"*"===(e=null!=e?e.trim():void 0)||"+*"===e}function xe(e){return"-*"===(null!=e?e.trim():void 0)}function Ae(e){return!!e&&"object"==typeof e}function Re(e){return!!(e&&e.constructor&&e.call&&e.apply)}function Pe(e,t,n=!0){if(null==e||null==t)return e===t;if(e.constructor!==t.constructor)return!1;if(e instanceof Function)return e===t;if(e instanceof RegExp)return e===t;if(e===t||e.valueOf()===t.valueOf())return!0;if(Array.isArray(e)&&e.length!==t.length)return!1;if(e instanceof Date)return!1;if(!(e instanceof Object))return!1;if(!(t instanceof Object))return!1;if(n){const n=Object.keys(e);return Object.keys(t).every((e=>-1!==n.indexOf(e)))&&n.every((n=>Pe(e[n],t[n])))}return!1}function Ce(e,t){const n=(e,t)=>(0,ve.transform)(e,(function(e,r,o){Pe(r,null==t?void 0:t[o])||(e[o]=Ae(r)&&Ae(null==t?void 0:t[o])?n(r,null==t?void 0:t[o]):r)}));return n(e,t)}function Ie(e,t){if(0===e.length)return;const n=e.indexOf(t);n>=0&&e.splice(n,1)}function je(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 Te(e){if(null==e)return"";let t=!1;return e.split(/([A-Z]|\d)/).map(((e,n,r)=>{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()){const t=!r[n-1]||"_"===r[n-1],o=n+1<r.length&&r[n+1]&&"_"!==r[n+1],i=n+3>r.length||!r[n+1]&&!r[n+3];t&&!o||(e=" "+e),(o||!t&&!i)&&(e=e.toLowerCase())}return e})).join("").trim()}function Ne(e,t){if(t===e)return!0;const n=e.endsWith("*"),r=!n&&e.startsWith("*"),o=!n&&!r&&e.startsWith("^")&&e.endsWith("$");if(n&&t.startsWith(e.substr(0,e.length-1)))return!0;if(r&&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 Le(e){if(e)return 1===e.length?e.toUpperCase():e.charAt(0).toUpperCase()+e.slice(1)}function Ue(e,t){return e&&Object.values(e).includes(t)}function De(e,t){return Object.keys(e).find((n=>e[n]===t))}function Me(e){(e=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate()))).setUTCDate(e.getUTCDate()+4-(e.getUTCDay()||7));const t=new Date(Date.UTC(e.getUTCFullYear(),0,1));return Math.ceil(((e.getTime()-t.getTime())/864e5+1)/7)}const Fe=["JAN","FEB","MAR","APR","MAY","JUN","JUL","AUG","SEP","OCT","NOV","DEC"];function Be(e,t,n,r,o,i,a){let s="";if(i?Array.isArray(i)?s+=i.toString().replace(" ",""):s+=i.toString():s+="0",s+=" ",o?Array.isArray(o)?s+=o.toString().replace(" ",""):s+=o.toString():s+="0",s+=" ",r?Array.isArray(r)?s+=r.toString().replace(" ",""):s+=r.toString():s+="0",s+=" ",n?Array.isArray(n)?s+=n.toString().replace(" ",""):s+=n.toString():s+="*",s+=" ",t)if(Array.isArray(t))if("number"==typeof t[0]){const e=[];t.forEach((t=>{e.push(Fe[t].toString())})),s+=e.toString().replace(" ","")}else s+=t.toString().replace(" ","");else s+=t.toString();else s+="*";return s+=" ",s+=a?a.toString():"?",s+=" ",e?Array.isArray(e)?s+=e.toString().replace(" ",""):s+=e:s+="*",s}function We(e){return Be(e.getFullYear(),Fe[e.getMonth()],[e.getDate()],[e.getHours()],[e.getMinutes()])}function Ve(e,t){const n=e.split(" ");if(!(Number.isNaN(Number(n[0]))||Number.isNaN(Number(n[1]))||Number.isNaN(Number(n[2]))||Number.isNaN(Number(n[3]))&&"*"!=n[3])){const e=(Number.isNaN(Number(n[6]))?(new Date).getFullYear():n[6]).toString();let r="";r="*"!=n[4]?Fe.indexOf(n[4]).toString():(new Date).getMonth().toString(),r=1==r.length?"0"+r:r;const o=1==n[3].length&&"*"!=n[3]?"0"+n[3]:n[3].replace("*","01"),i=1==n[2].length&&"*"!=n[2]?"0"+n[2]:n[2].replace("*","00"),a=1==n[1].length&&"*"!=n[1]?"0"+n[1]:n[1].replace("*","00"),s=1==n[0].length&&"*"!=n[0]?"0"+n[0]:n[0].replace("*","00");if(e.length>0&&r.length>0)return t?ge().utc({year:Number(e),month:Number(r),date:Number(o),hour:Number(i),minute:Number(a),second:Number(s)}).toISOString():ge()({year:Number(e),month:Number(r),date:Number(o),hour:Number(i),minute:Number(a),second:Number(s)}).toISOString()}}function He(e,t,n){const r="string"==typeof e?e:e.name;return t&&t.meta&&t.meta.hasOwnProperty(r)?t.meta[r]:n&&n.meta?n.meta[r]:void 0}function qe(e,t,n){const r="string"==typeof e?e:e.name;return!!(t&&t.meta&&t.meta.hasOwnProperty(r))||!!(n&&n.meta&&n.meta.hasOwnProperty(r))}function ze(e){return"string"==typeof e&&(e=he.AssetModelUtil.getAssetDescriptor(e)),e?le.t("label.asset."+e.name,{defaultValue:Te(e.name)}):""}function Ke(e){if(!e)return le.t("label.value.unknown",{defaultValue:"Unknown"});const t="string"==typeof e?e:e.name;return le.t("label.value."+t,{defaultValue:Te(t||"")})}function Ge(e,t){if(e)return le.t("label.allowedValue."+e,{defaultValue:t||Te(e||""),nsSeparator:!1})}function $e(e,t){const n="string"==typeof e?he.AssetModelUtil.getMetaItemDescriptor(e):e;return n?{name:n.name,type:n.type,value:t}:{name:typeof e,type:he.AssetModelUtil.resolveValueTypeFromValue(t),value:t}}function Je(e,t,n,r,o){return Xe(e,t,n,r,!0,o)}function Ye(e,t,n,r,o){return Xe(e||$e(t,null),t,n,r,!1,o)}function Xe(e,t,n,r,o,i){let a=ft("label",e,t,n,o),s="";if(a||(a=He("label",e,t&&t.meta?t:void 0)),r&&(s=nt(lt("units",e,t,n,o))),!a){const n=e?e.name:t?"string"==typeof t?t:t.name:void 0;a=i||(n?Te(n):void 0)}return a?a+(s?" ("+s+")":""):s}function Qe(e,t,n,r,o){return et(e,t,n,r,!0,o)}function Ze(e,t,n,r,o){return et(e||$e(t,null),t,n,r,!1,o)}function et(e,t,n,r,o,i){let a=tt(e?e.value:void 0,(()=>lt("format",e,t,n,o)),void 0,i);const s=it(e,t,n);return r&&s&&s.length&&(a=nt(lt("units",e,t,n,o),a)),a}function tt(e,t,n,r){let o="";if(null==e)o=r||"";else if("string"==typeof e)o=e;else if("number"==typeof e||"boolean"==typeof e||e instanceof Date){const r=t&&t();if(r&&0!==Object.keys(r).length)switch("number"==typeof e?r.asBoolean?e=!!e:r.asDate&&(e=new Date(e)):"boolean"==typeof e&&r.asNumber&&(e=e?1:0),typeof e){case"number":o=new Intl.NumberFormat(n||le.language,r).format(e);break;case"boolean":r.asOnOff&&(o=e?le.t("on"):le.t("off")),r.asOpenClosed&&(o=e?le.t("open"):le.t("closed")),r.asPressedReleased&&(o=e?le.t("pressed"):le.t("released"));break;case"object":if(r.momentJsFormat)o=ge()(e).format(r.momentJsFormat);else if(r.iso8601)o=e.toISOString();else if(r.week){const t=Me(e);o="2-digit"===r.week?String(t).padStart(2,"0"):Number(t).toString(10)}else o=new Intl.DateTimeFormat(n||le.language,r).format(e)}else o=Object(e).toString()}return o}function nt(e,t){if(!e)return"";t||(t="");const n=e.map(((e,n)=>{if(3!==e.length||e.toUpperCase()!==e)return le.t(["units."+e,"or:units."+e]);{const r=new Intl.NumberFormat(le.language,{currency:e,style:"currency"}).formatToParts();if(0!==n||"currency"!==r[0].type)return"currency"===r[0].type?r[0].value:r[r.length-1].value;if(!t)return r[0].value;t=r[0].value+t}})).join("");return t.length>0?t+" "+n:n}function rt(e,t,n){return lt("constraints",e,t,n,!0)}function ot(e,t,n){return lt("constraints",e||$e(t,null),t,n,!1)}function it(e,t,n){return lt("units",e,t,n,!0)}function at(e,t,n){return lt("units",e||$e(t,null),t,n,!1)}function st(e,t,n){return lt("format",e,t,n,!0)}function ut(e,t,n){return lt("format",e||$e(t,null),t,n,!1)}function ct(e,t,n){if(e&&!t)return Object.assign({},e);if(t&&!e)return Object.assign({},t);const r=Object.assign({},e),o=[];return Object.entries(t).forEach((([e,t])=>{!function(e,t,n,r,o){let i=e;t.forEach((e=>{i.hasOwnProperty(e)||(i[e]={}),i=i[e]})),i&&(i.hasOwnProperty(n)?null==r?delete i[n]:Array.isArray(i[n])?i[n]=o?[...i[n],...r]:[...r]:i[n]="object"==typeof r?ct(Object.assign({},i[n]),r,o):r:null==r?delete i[n]:Array.isArray(r)?i[n]=[...r]:i[n]="object"==typeof r?Object.assign({},r):r)}(r,o,e,t,n)})),r}function lt(e,t,n,r,o){let i;const a=[],s=ft(e,t&&"string"==typeof t?t:t?t.name:n?"string"==typeof n?n:n.name:void 0,n,r,o);if(s&&(i=JSON.parse(s),i)){if("format"!==e)return i;a.push(i)}if(t&&t.meta&&(i=He(e,t,n),i)){if("format"!==e)return i;a.push(i)}if(n&&"string"!=typeof n&&n.hasOwnProperty(e)){if(i=n[e],"format"!==e)return i;a.push(i)}if(n&&n.type){if(i=he.AssetModelUtil.getValueDescriptor(n.type)[e],"format"!==e)return i;a.push(i)}if("format"!==e||0===a.length)return i;let u={};return a.reverse().forEach((e=>{u=Object.assign(Object.assign({},u),e)})),u}function ft(e,t,n,r,o,i){let a;if(t?a="string"==typeof t?t:t.name:n&&(a="string"==typeof n?n:n.name),!a)return;const s=[],u=e+"."+(o?"attribute":"meta")+".";return r&&s.push(u+r+"."+a),n&&"string"!=typeof n&&(s.push(u+n.type+"."+a),s.push(u+n.type)),s.push(u+a),s.length>0?le.t(s,{defaultValue:i||""}):void 0}function pt(e,t){const n=t.ref.name;if(e.attributes)if(t.deleted)delete e.attributes[n];else{const r=e.attributes[n];r&&(r.value=t.value,r.timestamp=t.timestamp)}return Object.assign({},e)}function ht(e){return new Promise(((t,n)=>{const r=document.createElement("script");r.type="text/javascript",r.src=e,r.addEventListener("load",(e=>t(e)),!1),r.addEventListener("error",(e=>n(e)),!1),document.body.appendChild(r)}))}function dt(e){return(t,n)=>{const r=e(t),o=e(n);return r||o?r&&!o?1:!r&&o?-1:r-o:0}}function gt(e){return(t,n)=>{const r=e(t),o=e(n);return r||o?r&&!o?1:!r&&o?-1:r.localeCompare(o):0}}function vt(e,t){const n=new ye;return e.dispatchEvent(t),window.setTimeout((()=>{n.resolve(t.detail)})),n.promise}const yt={37:1,38:1,39:1,40:1};function bt(e){e.preventDefault()}function mt(e){if(yt[e.keyCode])return bt(e),!1}let _t=!1;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>{_t=!0}}))}catch(e){}const wt=!!_t&&{passive:!1},St="onwheel"in document.createElement("div")?"wheel":"mousewheel";function kt(){window.addEventListener("DOMMouseScroll",bt,!1),window.addEventListener(St,bt,wt),window.addEventListener("touchmove",bt,wt),window.addEventListener("keydown",mt,!1)}function Ot(){window.removeEventListener("DOMMouseScroll",bt,!1),window.removeEventListener(St,bt,wt),window.removeEventListener("touchmove",bt,wt),window.removeEventListener("keydown",mt,!1)}function Et(e){return new Promise(((t,n)=>{const r=new FileReader;r.readAsDataURL(e),r.onload=()=>{t(r.result)},r.onerror=e=>{n(e)}}))}var xt=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))};let At=u(900);class Rt{constructor(e,t,n){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=n,window.OpenRemoteConsole=this;let r=new URLSearchParams(window.location.search),o=r.get("consoleName"),i=r.get("consoleVersion"),a=r.get("consolePlatform"),s=r.get("consoleProviders"),u=r.get("consoleAutoEnable"),c=s&&s.length>0?s.split(" "):["push"];this._pendingProviderEnables=c;let l=Rt._createConsoleRegistration(),f=window.localStorage.getItem("OpenRemoteConsole:"+e);if(f)try{let e=JSON.parse(f);e.id&&(l.id=e.id),e.name&&(l.name=e.name),e.providers&&(l.providers=e.providers),e.apps&&(l.apps=e.apps)}catch(e){console.error("Failed to deserialise console registration")}let p=l.providers;l.providers={};for(let e of c){let t=p&&p.hasOwnProperty(e)?p[e]:{enabled:!1,disabled:!1};l.providers[e]=t}let h=Nn.getAppName();h.length>0&&l.apps.indexOf(h)<0&&l.apps.push(h),this._registration=l,o&&(l.name=o),i&&(l.version=i),a&&(l.platform=a),u&&(this._autoEnable="TRUE"===u||"true"===u)}get registration(){return this._registration}get autoEnable(){return this._autoEnable}get pendingProviderEnables(){return this._pendingProviderEnables.slice(0)}get shellApple(){const 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 xt(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(0)),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 xt(this,void 0,void 0,(function*(){if(!this._initialised)throw new 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 xt(this,void 0,void 0,(function*(){if(!this._initialised)throw console.debug("Console must be initialised before disabling providers"),new Error("Console must be initialised before enabling providers");if(!this._registration.providers.hasOwnProperty(e))throw console.debug("Invalid console provider '"+e+"'"),new Error("Invalid console provider '"+e+"'");console.debug("Console: enabling provider '"+e+"'");let n={provider:e,action:"PROVIDER_ENABLE",consoleId:this._registration.id,data:t},r=yield this.sendProviderMessage(n,!0);this._registration.providers[e].hasPermission=r.hasPermission,this._registration.providers[e].success=r.success,this._registration.providers[e].enabled=r.success,this._registration.providers[e].data=r.data;let o=this._pendingProviderEnables.indexOf(e);return o>=0&&(this._pendingProviderEnables.splice(o,1),0===this._pendingProviderEnables.length&&(this.sendRegistration(),this._callCompletedCallback())),r}))}disableProvider(e){return xt(this,void 0,void 0,(function*(){if(!this._initialised)throw console.debug("Console must be initialised before disabling providers"),new Error("Console must be initialised before disabling providers");if(!this._registration.providers.hasOwnProperty(e))throw console.debug("Invalid console provider '"+e+"'"),new 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 xt(this,void 0,void 0,(function*(){if("storage"!==e.provider&&!this._registration.providers.hasOwnProperty(e.provider))throw console.debug("Invalid console provider '"+e.provider+"'"),new Error("Invalid console provider '"+e.provider+"'");if(!t)return void this._doSendProviderMessage(e);let n=e.provider+e.action;if(this._pendingProviderPromises[n])throw new Error("Message already pending for provider '"+e.provider+"' with action '"+e.action+"'");const r=new ye;return this._pendingProviderPromises[n]=[r,window.setTimeout((()=>{delete this._pendingProviderPromises[n],r.reject("No response from provider")}),5e3)],this._doSendProviderMessage(e),r.promise}))}sendRegistration(e){return this._registrationTimer&&(window.clearTimeout(this._registrationTimer),this._registrationTimer=null),e=void 0!==e?e:2e3,console.debug("Sending registration in: "+e+"ms"),new Promise(((e,t)=>{this._registrationTimer=window.setTimeout((()=>{this._registrationTimer=null,console.debug("Console: updating registration");try{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={}),Nn.rest.api.ConsoleResource.register(this._registration).then((t=>{if(200!==t.status)throw new Error("Failed to register console");this._registration=t.data,console.debug("Console: registration successful"),console.debug("Console: updating locally stored registration"),window.localStorage.setItem("OpenRemoteConsole:"+this._realm,JSON.stringify(this._registration)),e()}))}catch(e){console.error("Failed to register console"),t("Failed to register console")}}))}))}storeData(e,t){this.sendProviderMessage({provider:"storage",action:"STORE",key:e,value:t},!1)}retrieveData(e){return xt(this,void 0,void 0,(function*(){let t=this.sendProviderMessage({provider:"storage",action:"RETRIEVE",key:e},!0);try{const e=yield Promise.race([t,new Promise(((e,t)=>setTimeout(t,2e3)))]);if(e&&e.value){const 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){const n={type:e,data:t};this.isMobile?this._postNativeShellMessage(n):console.warn("Failed to send generic message to console.",n)}_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":let t={action:"PROVIDER_INIT",provider:"push",version:"web",enabled:!0,disabled:!1,hasPermission:!0,requiresPermission:!1,success:!0};this._handleProviderResponse(JSON.stringify(t));break;case"PROVIDER_ENABLE":let n={action:"PROVIDER_ENABLE",provider:"push",hasPermission:!0,success:!0};this._handleProviderResponse(JSON.stringify(n));break;default:throw new Error("Unsupported provider '"+e.provider+"' and action '"+e.action+"'")}break;case"STORAGE":switch(e.action){case"PROVIDER_INIT":let t={action:"PROVIDER_INIT",provider:"storage",version:"1.0.0",disabled:!1,enabled:!0,hasPermission:!0,requiresPermission:!1,success:!0};this._handleProviderResponse(JSON.stringify(t));break;case"PROVIDER_ENABLE":let n={action:"PROVIDER_ENABLE",provider:"storage",hasPermission:!0,success:!0};this._handleProviderResponse(JSON.stringify(n));break;case"STORE":{let t=e.key?e.key.trim():null;if(!t||0===t.length)throw new 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 new Error("Storage provider 'retrieve' action requires a `key`");let n=window.localStorage.getItem(t);if(null!==n)try{n=JSON.parse(n)}catch(e){}this._handleProviderResponse(JSON.stringify({action:"RETRIEVE",provider:"storage",key:t,value:n}))}break;default:throw new 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),n=t.provider,r=t.action,o=this._pendingProviderPromises[n+r];o&&(window.clearTimeout(o[1]),delete this._pendingProviderPromises[n+r],o[0].resolve(t));let i=this._providerMessageListeners[n+r];i&&i(t)}_callCompletedCallback(){let e=this._enableCompleteCallback;this._enableCompleteCallback=null,e&&window.setTimeout((()=>{e()}),0)}static _createConsoleRegistration(){return{name:At.name,version:At.version,platform:At.os.toString(),apps:[],model:((At.manufacturer?At.manufacturer+" ":"")+(At.product?At.product:"")).trim()}}_initialiseProvider(e){return xt(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 Pt,Ct=u(768),It=u.n(Ct),jt=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))};!function(e){e.DISCONNECTED="DISCONNECTED",e.CONNECTED="CONNECTED",e.CONNECTING="CONNECTING"}(Pt||(Pt={}));const Tt="EVENT:";class Nt{constructor(){this._disconnectRequested=!1,this._reconnectDelayMillis=Lt.MIN_RECONNECT_DELAY,this._reconnectTimer=null,this._status=Pt.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){Ie(this._statusCallbacks,e)}connect(){return this._reconnectTimer&&(window.clearTimeout(this._reconnectTimer),this._reconnectTimer=null),this._status===Pt.CONNECTED?Promise.resolve(!0):(this._disconnectRequested=!1,this._connectingDeferred||(this._onStatusChanged(Pt.CONNECTING),this._connectingDeferred=new ye,this._doConnect().then((e=>{if(this._connectingDeferred){const t=this._connectingDeferred;this._connectingDeferred=null,e?(console.debug("Connected to event service: "+this.endpointUrl),this._reconnectDelayMillis=Lt.MIN_RECONNECT_DELAY,this._onStatusChanged(Pt.CONNECTED),window.setTimeout((()=>{this._onConnect()}),0)):(console.debug("Failed to connect to event service: "+this.endpointUrl),this._scheduleReconnect()),t.resolve(e)}}))),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!==Pt.DISCONNECTED&&this._doDisconnect())}subscribe(e,t){const n={eventSubscription:e,callback:t,deferred:new ye};return null!=this._pendingSubscription||this._status!==Pt.CONNECTED?(this._queuedSubscriptions.push(n),n.deferred.promise):(this._pendingSubscription=n,this._doSubscribe(e).then((e=>{if(this._pendingSubscription){const t=this._pendingSubscription;this._pendingSubscription=null,this._subscriptionMap.set(e,t),this._processNextSubscription();const n=t.deferred;t.deferred=null,n&&n.resolve(e)}}),(e=>{if(this._pendingSubscription){const t=this._pendingSubscription;this._pendingSubscription=null,this._processNextSubscription();const n=t.deferred;t.deferred=null,n&&n.reject(e)}})),this._pendingSubscription.deferred.promise)}unsubscribe(e){return jt(this,void 0,void 0,(function*(){if(this._subscriptionMap.delete(e))this._doUnsubscribe(e);else if(this._assetEventCallbackMap.delete(e)){if(this._assetEventPromise&&0===this._assetEventCallbackMap.size){const e=yield this._assetEventPromise;this._assetEventPromise=void 0,this.unsubscribe(e)}}else if(this._attributeEventCallbackMap.delete(e)&&this._attributeEventPromise&&0===this._attributeEventCallbackMap.size){const e=yield this._attributeEventPromise;this._attributeEventPromise=void 0,this.unsubscribe(e)}}))}sendEvent(e){this._status===Pt.CONNECTED&&this._doSend(e)}sendEventWithReply(e){return this._status!==Pt.CONNECTED?Promise.reject("Not connected"):this._doSendWithReply(e)}subscribeAssetEvents(e,t,n){return jt(this,void 0,void 0,(function*(){const r=e&&"string"!=typeof e[0]?e.map((e=>e.id)):e,o="AssetEvent"+Nt._subscriptionCounter++;if(!this._assetEventPromise){let e;Nn.authenticated||(e={filterType:"asset",realm:Nn.displayRealm});const t={eventType:"asset",filter:e};this._assetEventPromise=this.subscribe(t,(e=>{this._assetEventCallbackMap.forEach((t=>t(e)))}))}return this._assetEventCallbackMap.set(o,(e=>{const t=e.asset.id;r?r.find((e=>t===e))&&n(e):e.asset.realm===Nn.displayRealm&&n(e)})),this._assetEventPromise.then((()=>{try{if(r&&t){const e={messageID:"read-assets:"+r.join(",")+":"+o,eventType:"read-assets",assetQuery:{ids:r}};this.sendEventWithReply(e).then((e=>{const t=e;t.assets&&this._assetEventCallbackMap.has(o)&&t.assets.forEach((e=>{n({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,n){return jt(this,void 0,void 0,(function*(){const r=e&&"string"!=typeof e[0],o=r?e.map((e=>e.id)):e,i=r?e:void 0,a="AttributeEvent"+Nt._subscriptionCounter++;if(!this._attributeEventPromise){let e;Nn.authenticated||(e={filterType:"asset",realm:Nn.displayRealm});const t={eventType:"attribute",filter:e};this._attributeEventPromise=this.subscribe(t,(e=>{this._attributeEventCallbackMap.forEach((t=>t(e)))}))}const s=t=>{const i=t.ref;r?e.forEach((e=>{i.id===e.id&&i.name===e.name&&n(t)})):o?o.find((e=>i.id===e))&&n(t):t.realm===Nn.displayRealm&&n(t)};return this._attributeEventCallbackMap.set(a,s),this._attributeEventPromise.then((()=>{try{if(t&&o){const e={messageID:"read-assets:"+o.join(",")+":"+a,eventType:"read-assets",assetQuery:{ids:o}};this.sendEventWithReply(e).then((e=>{const t=e;t.assets&&this._attributeEventCallbackMap.has(a)&&t.assets.forEach((e=>{e.attributes&&Object.entries(e.attributes).forEach((([t,n])=>{i&&!i.find((n=>n.id===e.id&&n.name===t))||s({eventType:"attribute",timestamp:n.timestamp,value:n.value,ref:{id:e.id,name:t}})}))}))}))}}catch(t){throw console.error("Failed to subscribe to asset events for assets: "+e),a&&this.unsubscribe(a),t}return a}))}))}_processNextSubscription(){this._status===Pt.CONNECTED&&0!==this._queuedSubscriptions.length&&setTimeout((()=>{const e=this._queuedSubscriptions.shift();e&&this.subscribe(e.eventSubscription,e.callback).then((t=>{const n=e.deferred;e.deferred=null,n&&n.resolve(t)}),(t=>{const n=e.deferred;e.deferred=null,n&&n.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){const n=this._subscriptionMap.get(e);n&&n.callback(t)}_onConnect(){if(Object.keys(this._subscriptionMap).length>0){for(const e in this._subscriptionMap)this._subscriptionMap.has(e)&&this._queuedSubscriptions.unshift(this._subscriptionMap.get(e));this._subscriptionMap.clear()}this._processNextSubscription()}_onDisconnect(){this._status===Pt.CONNECTED&&this._onStatusChanged(Pt.DISCONNECTED),this._pendingSubscription&&(this._queuedSubscriptions.unshift(this._pendingSubscription),this._pendingSubscription=null),this._onStatusChanged(Pt.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<Lt.MAX_RECONNECT_DELAY&&(this._reconnectDelayMillis=Math.min(Lt.MAX_RECONNECT_DELAY,this._reconnectDelayMillis+3e3)))}}Nt.MIN_RECONNECT_DELAY=0,Nt.MAX_RECONNECT_DELAY=3e4,Nt._subscriptionCounter=0;class Lt extends Nt{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="+Nn.config.realm;return Nn.authenticated&&(e+="&Authorization="+Nn.getAuthorizationHeader()),this._webSocket=new WebSocket(e),this._connectDeferred=new ye,this._webSocket.onopen=()=>{if(this._connectDeferred){const e=this._connectDeferred;this._connectDeferred=null,e.resolve(!0)}},this._webSocket.onerror=e=>{if(this._connectDeferred){const e=this._connectDeferred;this._connectDeferred=null,e.resolve(!1)}else console.debug("Event provider error"),this._beforeDisconnect()},this._webSocket.onclose=()=>{if(this._webSocket=void 0,this._connectDeferred){const e=this._connectDeferred;this._connectDeferred=null,e.resolve(!1)}else this._beforeDisconnect()},this._webSocket.onmessage=e=>{const t=e.data;if(t&&t.startsWith("SUBSCRIBED:")){const e=t.substring(11),n=JSON.parse(e),r=this._subscribeDeferred;this._subscribeDeferred=null,r&&r.resolve(n.subscriptionId)}else if(t.startsWith("UNAUTHORIZED:")){const e=t.substring(13),n=JSON.parse(e),r=this._subscribeDeferred;this._subscribeDeferred=null,r&&(console.warn("Unauthorized event subscription: "+JSON.stringify(n,null,2)),r.reject("Unauthorized"))}else if(t.startsWith("TRIGGERED:")){const e=t.substring(10),n=JSON.parse(e);n.events&&n.events.forEach((e=>{this._onMessageReceived(n.subscriptionId,e)}))}else if(t.startsWith(Tt)){const e=t.substring(6),n=JSON.parse(e);if(n.messageID){const e=this._repliesDeferred.get(n.messageID);this._repliesDeferred.delete(n.messageID),e&&e.resolve(n)}}},this._connectDeferred.promise}_beforeDisconnect(){this._onDisconnect()}_doDisconnect(){var e;null===(e=this._webSocket)||void 0===e||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 ye,e.subscriptionId||(e.subscriptionId=Lt._subscriptionCounter+++""),this._webSocket.send("SUBSCRIBE:"+JSON.stringify(e)),this._subscribeDeferred.promise):Promise.reject("Not connected")}_doUnsubscribe(e){if(!this._webSocket)return;const t={subscriptionId:e};this._webSocket.send("UNSUBSCRIBE:"+JSON.stringify(t))}_doSend(e){const t=Tt+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");const t=new ye;return this._repliesDeferred.set(e.messageID,t),this._webSocket.send(Tt+JSON.stringify(e)),t.promise}}function Ut(e){return Ut="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},Ut(e)}Lt._subscriptionCounter=1;var Dt=[],Mt=Dt.forEach,Ft=Dt.slice;function Bt(e){return Mt.call(Ft.call(arguments,1),(function(t){if(t)for(var n in t)void 0===e[n]&&(e[n]=t[n])})),e}function Wt(){return"function"==typeof XMLHttpRequest||"object"===("undefined"==typeof XMLHttpRequest?"undefined":Ut(XMLHttpRequest))}var Vt,Ht,qt,zt=u(624),Kt=u.t(zt,2);function Gt(e){return Gt="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},Gt(e)}"function"==typeof fetch&&(Vt="undefined"!=typeof global&&global.fetch?global.fetch:"undefined"!=typeof window&&window.fetch?window.fetch:fetch),Wt()&&("undefined"!=typeof global&&global.XMLHttpRequest?Ht=global.XMLHttpRequest:"undefined"!=typeof window&&window.XMLHttpRequest&&(Ht=window.XMLHttpRequest)),"function"==typeof ActiveXObject&&("undefined"!=typeof global&&global.ActiveXObject?qt=global.ActiveXObject:"undefined"!=typeof window&&window.ActiveXObject&&(qt=window.ActiveXObject)),Vt||!Kt||Ht||qt||(Vt=zt||Kt),"function"!=typeof Vt&&(Vt=void 0);var $t=function(e,t){if(t&&"object"===Gt(t)){var n="";for(var r in t)n+="&"+encodeURIComponent(r)+"="+encodeURIComponent(t[r]);if(!n)return e;e=e+(-1!==e.indexOf("?")?"&":"?")+n.slice(1)}return e},Jt=function(e,t,n){Vt(e,t).then((function(e){if(!e.ok)return n(e.statusText||"Error",{status:e.status});e.text().then((function(t){n(null,{status:e.status,data:t})})).catch(n)})).catch(n)},Yt=!1;const Xt=function(e,t,n,r){return"function"==typeof n&&(r=n,n=void 0),r=r||function(){},Vt?function(e,t,n,r){e.queryStringParams&&(t=$t(t,e.queryStringParams));var o=Bt({},"function"==typeof e.customHeaders?e.customHeaders():e.customHeaders);n&&(o["Content-Type"]="application/json");var i="function"==typeof e.requestOptions?e.requestOptions(n):e.requestOptions,a=Bt({method:n?"POST":"GET",body:n?e.stringify(n):void 0,headers:o},Yt?{}:i);try{Jt(t,a,r)}catch(e){if(!i||0===Object.keys(i).length||!e.message||e.message.indexOf("not implemented")<0)return r(e);try{Object.keys(i).forEach((function(e){delete a[e]})),Jt(t,a,r),Yt=!0}catch(e){r(e)}}}(e,t,n,r):Wt()||"function"==typeof ActiveXObject?function(e,t,n,r){n&&"object"===Gt(n)&&(n=$t("",n).slice(1)),e.queryStringParams&&(t=$t(t,e.queryStringParams));try{var o;(o=Ht?new Ht:new qt("MSXML2.XMLHTTP.3.0")).open(n?"POST":"GET",t,1),e.crossDomain||o.setRequestHeader("X-Requested-With","XMLHttpRequest"),o.withCredentials=!!e.withCredentials,n&&o.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),o.overrideMimeType&&o.overrideMimeType("application/json");var i=e.customHeaders;if(i="function"==typeof i?i():i)for(var a in i)o.setRequestHeader(a,i[a]);o.onreadystatechange=function(){o.readyState>3&&r(o.status>=400?o.statusText:null,{status:o.status,data:o.responseText})},o.send(n)}catch(e){console&&console.log(e)}}(e,t,n,r):void r(new Error("No fetch and no xhr implementation found!"))};function Qt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var Zt=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.services=t,this.options=n,this.allOptions=r,this.type="backend",this.init(t,n,r)}var t,n;return t=e,n=[{key:"init",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.services=e,this.options=Bt(n,this.options||{},{loadPath:"/locales/{{lng}}/{{ns}}.json",addPath:"/locales/add/{{lng}}/{{ns}}",allowMultiLoading:!1,parse:function(e){return JSON.parse(e)},stringify:JSON.stringify,parsePayload:function(e,t,n){return function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({},t,n||"")},request:Xt,reloadInterval:"undefined"==typeof window&&36e5,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:"cors",credentials:"same-origin",cache:"default"}}),this.allOptions=r,this.services&&this.options.reloadInterval&&setInterval((function(){return t.reload()}),this.options.reloadInterval)}},{key:"readMulti",value:function(e,t,n){this._readAny(e,e,t,t,n)}},{key:"read",value:function(e,t,n){this._readAny([e],e,[t],t,n)}},{key:"_readAny",value:function(e,t,n,r,o){var i,a=this,s=this.options.loadPath;"function"==typeof this.options.loadPath&&(s=this.options.loadPath(e,n)),(s=function(e){return!!e&&"function"==typeof e.then}(i=s)?i:Promise.resolve(i)).then((function(i){if(!i)return o(null,{});var s=a.services.interpolator.interpolate(i,{lng:e.join("+"),ns:n.join("+")});a.loadUrl(s,o,t,r)}))}},{key:"loadUrl",value:function(e,t,n,r){var o=this;this.options.request(this.options,e,void 0,(function(i,a){if(a&&(a.status>=500&&a.status<600||!a.status))return t("failed loading "+e+"; status code: "+a.status,!0);if(a&&a.status>=400&&a.status<500)return t("failed loading "+e+"; status code: "+a.status,!1);if(!a&&i&&i.message&&i.message.indexOf("Failed to fetch")>-1)return t("failed loading "+e+": "+i.message,!0);if(i)return t(i,!1);var s,u;try{s="string"==typeof a.data?o.options.parse(a.data,n,r):a.data}catch(t){u="failed parsing "+e+" to json"}if(u)return t(u,!1);t(null,s)}))}},{key:"create",value:function(e,t,n,r,o){var i=this;if(this.options.addPath){"string"==typeof e&&(e=[e]);var a=this.options.parsePayload(t,n,r),s=0,u=[],c=[];e.forEach((function(n){var r=i.options.addPath;"function"==typeof i.options.addPath&&(r=i.options.addPath(n,t));var l=i.services.interpolator.interpolate(r,{lng:n,ns:t});i.options.request(i.options,l,a,(function(t,n){s+=1,u.push(t),c.push(n),s===e.length&&o&&o(u,c)}))}))}}},{key:"reload",value:function(){var e=this,t=this.services,n=t.backendConnector,r=t.languageUtils,o=t.logger,i=n.language;if(!i||"cimode"!==i.toLowerCase()){var a=[],s=function(e){r.toResolveHierarchy(e).forEach((function(e){a.indexOf(e)<0&&a.push(e)}))};s(i),this.allOptions.preload&&this.allOptions.preload.forEach((function(e){return s(e)})),a.forEach((function(t){e.allOptions.ns.forEach((function(e){n.read(t,e,"read",null,null,(function(r,i){r&&o.warn("loading namespace ".concat(e," for language ").concat(t," failed"),r),!r&&i&&o.log("loaded namespace ".concat(e," for language ").concat(t),i),n.loaded("".concat(t,"|").concat(e),r,i)}))}))}))}}}],n&&Qt(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();Zt.type="backend";const en=Zt;var tn=u(488),nn=u(964);class rn extends Error{}function on(e,t){if("string"!=typeof e)throw new rn("Invalid token specified: must be a string");t||(t={});const n=!0===t.header?0:1,r=e.split(".")[n];if("string"!=typeof r)throw new rn(`Invalid token specified: missing part #${n+1}`);let o;try{o=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 new Error("base64 string is not of the correct length")}try{return function(e){return decodeURIComponent(atob(e).replace(/(.)/g,((e,t)=>{let n=t.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n})))}(t)}catch(e){return atob(t)}}(r)}catch(e){throw new rn(`Invalid token specified: invalid base64 for part #${n+1} (${e.message})`)}try{return JSON.parse(o)}catch(e){throw new rn(`Invalid token specified: invalid json for part #${n+1} (${e.message})`)}}if(rn.prototype.name="InvalidTokenError","undefined"==typeof Promise)throw Error("Keycloak requires an environment that supports Promises. Make sure that you include the appropriate polyfill.");function an(e){if(!(this instanceof an))throw new Error("The 'Keycloak' constructor must be invoked with 'new'.");for(var t,n,r=this,o=[],i={enable:!0,callbackList:[],interval:5},a=document.getElementsByTagName("script"),s=0;s<a.length;s++)-1===a[s].src.indexOf("keycloak.js")&&-1===a[s].src.indexOf("keycloak.min.js")||-1===a[s].src.indexOf("version=")||(r.iframeVersion=a[s].src.substring(a[s].src.indexOf("version=")+8).split("&")[0]);var u=!0,c=A(console.info),l=A(console.warn);function f(e,t){for(var n=function(e){var t=null,n=window.crypto||window.msCrypto;if(n&&n.getRandomValues&&window.Uint8Array)return t=new Uint8Array(e),n.getRandomValues(t),t;t=new Array(e);for(var r=0;r<t.length;r++)t[r]=Math.floor(256*Math.random());return t}(e),r=new Array(e),o=0;o<e;o++)r[o]=t.charCodeAt(n[o]%t.length);return String.fromCharCode.apply(null,r)}function p(){return void 0!==r.authServerUrl?"/"==r.authServerUrl.charAt(r.authServerUrl.length-1)?r.authServerUrl+"realms/"+encodeURIComponent(r.realm):r.authServerUrl+"/realms/"+encodeURIComponent(r.realm):void 0}function h(e,t){var n=e.code,o=e.error,i=e.prompt,a=(new Date).getTime();if(e.kc_action_status&&r.onActionUpdate&&r.onActionUpdate(e.kc_action_status),o)if("none"!=i)if(e.error_description&&"authentication_expired"===e.error_description)r.login(e.loginOptions);else{var s={error:o,error_description:e.error_description};r.onAuthError&&r.onAuthError(s),t&&t.setError(s)}else t&&t.setSuccess();else if("standard"!=r.flow&&(e.access_token||e.id_token)&&h(e.access_token,null,e.id_token,!0),"implicit"!=r.flow&&n){var l="code="+n+"&grant_type=authorization_code",f=r.endpoints.token(),p=new XMLHttpRequest;p.open("POST",f,!0),p.setRequestHeader("Content-type","application/x-www-form-urlencoded"),l+="&client_id="+encodeURIComponent(r.clientId),l+="&redirect_uri="+e.redirectUri,e.pkceCodeVerifier&&(l+="&code_verifier="+e.pkceCodeVerifier),p.withCredentials=!0,p.onreadystatechange=function(){if(4==p.readyState)if(200==p.status){var e=JSON.parse(p.responseText);h(e.access_token,e.refresh_token,e.id_token,"standard"===r.flow),w()}else r.onAuthError&&r.onAuthError(),t&&t.setError()},p.send(l)}function h(n,o,i,s){g(n,o,i,a=(a+(new Date).getTime())/2),u&&r.idTokenParsed&&r.idTokenParsed.nonce!=e.storedNonce?(c("[KEYCLOAK] Invalid nonce, clearing token"),r.clearToken(),t&&t.setError()):s&&(r.onAuthSuccess&&r.onAuthSuccess(),t&&t.setSuccess())}}function d(e){return 0==e.status&&e.responseText&&e.responseURL.startsWith("file:")}function g(e,t,n,o){if(r.tokenTimeoutHandle&&(clearTimeout(r.tokenTimeoutHandle),r.tokenTimeoutHandle=null),t?(r.refreshToken=t,r.refreshTokenParsed=on(t)):(delete r.refreshToken,delete r.refreshTokenParsed),n?(r.idToken=n,r.idTokenParsed=on(n)):(delete r.idToken,delete r.idTokenParsed),e){if(r.token=e,r.tokenParsed=on(e),r.sessionId=r.tokenParsed.sid,r.authenticated=!0,r.subject=r.tokenParsed.sub,r.realmAccess=r.tokenParsed.realm_access,r.resourceAccess=r.tokenParsed.resource_access,o&&(r.timeSkew=Math.floor(o/1e3)-r.tokenParsed.iat),null!=r.timeSkew&&(c("[KEYCLOAK] Estimated time difference between browser and server is "+r.timeSkew+" seconds"),r.onTokenExpired)){var i=1e3*(r.tokenParsed.exp-(new Date).getTime()/1e3+r.timeSkew);c("[KEYCLOAK] Token expires in "+Math.round(i/1e3)+" s"),i<=0?r.onTokenExpired():r.tokenTimeoutHandle=setTimeout(r.onTokenExpired,i)}}else delete r.token,delete r.tokenParsed,delete r.subject,delete r.realmAccess,delete r.resourceAccess,r.authenticated=!1}function v(){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 y(e){var t=function(e){var t;switch(r.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 n,o,i=e.indexOf("?"),a=e.indexOf("#");if("query"===r.responseMode&&-1!==i?(n=e.substring(0,i),""!==(o=b(e.substring(i+1,-1!==a?a:e.length),t)).paramsString&&(n+="?"+o.paramsString),-1!==a&&(n+=e.substring(a))):"fragment"===r.responseMode&&-1!==a&&(n=e.substring(0,a),""!==(o=b(e.substring(a+1),t)).paramsString&&(n+="#"+o.paramsString)),o&&o.oauthParams)if("standard"===r.flow||"hybrid"===r.flow){if((o.oauthParams.code||o.oauthParams.error)&&o.oauthParams.state)return o.oauthParams.newUrl=n,o.oauthParams}else if("implicit"===r.flow&&(o.oauthParams.access_token||o.oauthParams.error)&&o.oauthParams.state)return o.oauthParams.newUrl=n,o.oauthParams}(e);if(t){var o=n.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 n=e.split("&"),r={paramsString:"",oauthParams:{}},o=0;o<n.length;o++){var i=n[o].indexOf("="),a=n[o].slice(0,i);-1!==t.indexOf(a)?r.oauthParams[a]=n[o].slice(i+1):(""!==r.paramsString&&(r.paramsString+="&"),r.paramsString+=n[o])}return r}function m(){var e={setSuccess:function(t){e.resolve(t)},setError:function(t){e.reject(t)}};return e.promise=new Promise((function(t,n){e.resolve=t,e.reject=n})),e}function _(){var e=m();if(!i.enable)return e.setSuccess(),e.promise;if(i.iframe)return e.setSuccess(),e.promise;var t=document.createElement("iframe");i.iframe=t,t.onload=function(){var t=r.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 n=r.endpoints.checkSessionIframe();return t.setAttribute("src",n),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&&r.clearToken();for(var t=i.callbackList.splice(0,i.callbackList.length),n=t.length-1;n>=0;--n){var o=t[n];"error"==e.data?o.setError():o.setSuccess("unchanged"==e.data)}}}),!1),e.promise}function w(){i.enable&&r.token&&setTimeout((function(){S().then((function(e){e&&w()}))}),1e3*i.interval)}function S(){var e=m();if(i.iframe&&i.iframeOrigin){var t=r.clientId+" "+(r.sessionId?r.sessionId:"");i.callbackList.push(e);var n=i.iframeOrigin;1==i.callbackList.length&&i.iframe.contentWindow.postMessage(t,n)}else e.setSuccess();return e.promise}function k(){var e=m();if(i.enable||r.silentCheckSsoRedirectUri){var t=document.createElement("iframe");t.setAttribute("src",r.endpoints.thirdPartyCookiesIframe()),t.setAttribute("sandbox","allow-storage-access-by-user-activation allow-scripts allow-same-origin"),t.setAttribute("title","keycloak-3p-check-iframe"),t.style.display="none",document.body.appendChild(t);var n=function(o){t.contentWindow===o.source&&("supported"!==o.data&&"unsupported"!==o.data||("unsupported"===o.data&&(l("[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,r.silentCheckSsoFallback&&(r.silentCheckSsoRedirectUri=!1)),document.body.removeChild(t),window.removeEventListener("message",n),e.setSuccess()))};window.addEventListener("message",n,!1)}else e.setSuccess();return function(e,t,n){var r=null,o=new Promise((function(e,n){r=setTimeout((function(){n({error:"Timeout when waiting for 3rd party check iframe message."})}),t)}));return Promise.race([e,o]).finally((function(){clearTimeout(r)}))}(e.promise,r.messageReceiveTimeout)}function O(e){if(!e||"default"==e)return{login:function(e){return window.location.assign(r.createLoginUrl(e)),m().promise},logout:async function(e){if("GET"===(e?.logoutMethod??r.logoutMethod))return void window.location.replace(r.createLogoutUrl(e));const n=r.createLogoutUrl(e),o=await fetch(n,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({id_token_hint:r.idToken,client_id:r.clientId,post_logout_redirect_uri:t.redirectUri(e,!1)})});if(o.redirected)window.location.href=o.url;else{if(!o.ok)throw new Error("Logout failed, request returned an error code.");window.location.reload()}},register:function(e){return window.location.assign(r.createRegisterUrl(e)),m().promise},accountManagement:function(){var e=r.createAccountUrl();if(void 0===e)throw"Not supported by the OIDC server";return window.location.href=e,m().promise},redirectUri:function(e,t){return e&&e.redirectUri?e.redirectUri:r.redirectUri?r.redirectUri:location.href}};if("cordova"==e){i.enable=!1;var n=function(e,t,n){return window.cordova&&window.cordova.InAppBrowser?window.cordova.InAppBrowser.open(e,t,n):window.open(e,t,n)},o=function(e){var t=function(e){return e&&e.cordovaOptions?Object.keys(e.cordovaOptions).reduce((function(t,n){return t[n]=e.cordovaOptions[n],t}),{}):{}}(e);return t.location="no",e&&"none"==e.prompt&&(t.hidden="yes"),function(e){return Object.keys(e).reduce((function(t,n){return t.push(n+"="+e[n]),t}),[]).join(",")}(t)},a=function(){return r.redirectUri||"http://localhost"};return{login:function(e){var t=m(),i=o(e),s=r.createLoginUrl(e),u=n(s,"_blank",i),c=!1,l=!1,f=function(){l=!0,u.close()};return u.addEventListener("loadstart",(function(e){0==e.url.indexOf(a())&&(h(y(e.url),t),f(),c=!0)})),u.addEventListener("loaderror",(function(e){c||(0==e.url.indexOf(a())?(h(y(e.url),t),f(),c=!0):(t.setError(),f()))})),u.addEventListener("exit",(function(e){l||t.setError({reason:"closed_by_user"})})),t.promise},logout:function(e){var t,o=m(),i=r.createLogoutUrl(e),s=n(i,"_blank","location=no,hidden=yes,clearcache=yes");return s.addEventListener("loadstart",(function(e){0==e.url.indexOf(a())&&s.close()})),s.addEventListener("loaderror",(function(e){0==e.url.indexOf(a())||(t=!0),s.close()})),s.addEventListener("exit",(function(e){t?o.setError():(r.clearToken(),o.setSuccess())})),o.promise},register:function(e){var t=m(),i=r.createRegisterUrl(),s=o(e),u=n(i,"_blank",s);return u.addEventListener("loadstart",(function(e){0==e.url.indexOf(a())&&(u.close(),h(y(e.url),t))})),t.promise},accountManagement:function(){var e=r.createAccountUrl();if(void 0===e)throw"Not supported by the OIDC server";var t=n(e,"_blank","location=no");t.addEventListener("loadstart",(function(e){0==e.url.indexOf(a())&&t.close()}))},redirectUri:function(e){return a()}}}if("cordova-native"==e)return i.enable=!1,{login:function(e){var t=m(),n=r.createLoginUrl(e);return universalLinks.subscribe("keycloak",(function(e){universalLinks.unsubscribe("keycloak"),window.cordova.plugins.browsertab.close(),h(y(e.url),t)})),window.cordova.plugins.browsertab.openUrl(n),t.promise},logout:function(e){var t=m(),n=r.createLogoutUrl(e);return universalLinks.subscribe("keycloak",(function(e){universalLinks.unsubscribe("keycloak"),window.cordova.plugins.browsertab.close(),r.clearToken(),t.setSuccess()})),window.cordova.plugins.browsertab.openUrl(n),t.promise},register:function(e){var t=m(),n=r.createRegisterUrl(e);return universalLinks.subscribe("keycloak",(function(e){universalLinks.unsubscribe("keycloak"),window.cordova.plugins.browsertab.close(),h(y(e.url),t)})),window.cordova.plugins.browsertab.openUrl(n),t.promise},accountManagement:function(){var e=r.createAccountUrl();if(void 0===e)throw"Not supported by the OIDC server";window.cordova.plugins.browsertab.openUrl(e)},redirectUri:function(e){return e&&e.redirectUri?e.redirectUri:r.redirectUri?r.redirectUri:"http://localhost"}};throw"invalid adapter type: "+e}r.init=function(o){if(r.didInitialize)throw new Error("A 'Keycloak' instance can only be initialized once.");if(r.didInitialize=!0,r.authenticated=!1,n=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&&(u=o.useNonce),void 0!==o.checkLoginIframe&&(i.enable=o.checkLoginIframe),o.checkLoginIframeInterval&&(i.interval=o.checkLoginIframeInterval),"login-required"===o.onLoad&&(r.loginRequired=!0),o.responseMode){if("query"!==o.responseMode&&"fragment"!==o.responseMode)throw"Invalid value for responseMode";r.responseMode=o.responseMode}if(o.flow){switch(o.flow){case"standard":r.responseType="code";break;case"implicit":r.responseType="id_token token";break;case"hybrid":r.responseType="code id_token token";break;default:throw"Invalid value for flow"}r.flow=o.flow}if(null!=o.timeSkew&&(r.timeSkew=o.timeSkew),o.redirectUri&&(r.redirectUri=o.redirectUri),o.silentCheckSsoRedirectUri&&(r.silentCheckSsoRedirectUri=o.silentCheckSsoRedirectUri),"boolean"==typeof o.silentCheckSsoFallback?r.silentCheckSsoFallback=o.silentCheckSsoFallback:r.silentCheckSsoFallback=!0,void 0!==o.pkceMethod){if("S256"!==o.pkceMethod&&!1!==o.pkceMethod)throw new TypeError(`Invalid value for pkceMethod', expected 'S256' or false but got ${o.pkceMethod}.`);r.pkceMethod=o.pkceMethod}else r.pkceMethod="S256";"boolean"==typeof o.enableLogging?r.enableLogging=o.enableLogging:r.enableLogging=!1,"POST"===o.logoutMethod?r.logoutMethod="POST":r.logoutMethod="GET","string"==typeof o.scope&&(r.scope=o.scope),"string"==typeof o.acrValues&&(r.acrValues=o.acrValues),"number"==typeof o.messageReceiveTimeout&&o.messageReceiveTimeout>0?r.messageReceiveTimeout=o.messageReceiveTimeout:r.messageReceiveTimeout=1e4}r.responseMode||(r.responseMode="fragment"),r.responseType||(r.responseType="code",r.flow="standard");var a=m(),s=m();s.promise.then((function(){r.onReady&&r.onReady(r.authenticated),a.setSuccess(r.authenticated)})).catch((function(e){a.setError(e)}));var c=function(t){var n,o=m();function i(e){r.endpoints=e?{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}}:{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 r.iframeVersion&&(e=e+"?version="+r.iframeVersion),e},thirdPartyCookiesIframe:function(){var e=p()+"/protocol/openid-connect/3p-cookies/step1.html";return r.iframeVersion&&(e=e+"?version="+r.iframeVersion),e},register:function(){return p()+"/protocol/openid-connect/registrations"},userinfo:function(){return p()+"/protocol/openid-connect/userinfo"}}}if(e?"string"==typeof e&&(n=e):n="keycloak.json",n)(u=new XMLHttpRequest).open("GET",n,!0),u.setRequestHeader("Accept","application/json"),u.onreadystatechange=function(){if(4==u.readyState)if(200==u.status||d(u)){var e=JSON.parse(u.responseText);r.authServerUrl=e["auth-server-url"],r.realm=e.realm,r.clientId=e.resource,i(null),o.setSuccess()}else o.setError()},u.send();else{if(!e.clientId)throw"clientId missing";r.clientId=e.clientId;var a=e.oidcProvider;if(a){var s,u;"string"==typeof a?(s="/"==a.charAt(a.length-1)?a+".well-known/openid-configuration":a+"/.well-known/openid-configuration",(u=new XMLHttpRequest).open("GET",s,!0),u.setRequestHeader("Accept","application/json"),u.onreadystatechange=function(){4==u.readyState&&(200==u.status||d(u)?(i(JSON.parse(u.responseText)),o.setSuccess()):o.setError())},u.send()):(i(a),o.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";r.authServerUrl=e.url,r.realm=e.realm,i(null),o.setSuccess()}}return o.promise}();function l(){var e=function(e){e||(n.prompt="none"),o&&o.locale&&(n.locale=o.locale),r.login(n).then((function(){s.setSuccess()})).catch((function(e){s.setError(e)}))},t=function(){var e=document.createElement("iframe"),t=r.createLoginUrl({prompt:"none",redirectUri:r.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 n=function(t){t.origin===window.location.origin&&e.contentWindow===t.source&&(h(y(t.data),s),document.body.removeChild(e),window.removeEventListener("message",n))};window.addEventListener("message",n)},n={};switch(o.onLoad){case"check-sso":i.enable?_().then((function(){S().then((function(n){n?s.setSuccess():r.silentCheckSsoRedirectUri?t():e(!1)})).catch((function(e){s.setError(e)}))})):r.silentCheckSsoRedirectUri?t():e(!1);break;case"login-required":e(!0);break;default:throw"Invalid value for onLoad"}}function f(){var e=y(window.location.href);if(e&&window.history.replaceState(window.history.state,null,e.newUrl),e&&e.valid)return _().then((function(){h(e,s)})).catch((function(e){s.setError(e)}));o?o.token&&o.refreshToken?(g(o.token,o.refreshToken,o.idToken),i.enable?_().then((function(){S().then((function(e){e?(r.onAuthSuccess&&r.onAuthSuccess(),s.setSuccess(),w()):s.setSuccess()})).catch((function(e){s.setError(e)}))})):r.updateToken(-1).then((function(){r.onAuthSuccess&&r.onAuthSuccess(),s.setSuccess()})).catch((function(e){r.onAuthError&&r.onAuthError(),o.onLoad?l():s.setError(e)}))):o.onLoad?l():s.setSuccess():s.setSuccess()}return c.then((function(){(function(){var e=m(),t=function(){"interactive"!==document.readyState&&"complete"!==document.readyState||(document.removeEventListener("readystatechange",t),e.setSuccess())};return document.addEventListener("readystatechange",t),t(),e.promise})().then(k).then(f).catch((function(e){a.setError(e)}))})),c.catch((function(e){a.setError(e)})),a.promise},r.login=function(e){return t.login(e)},r.createLoginUrl=function(e){var o,i=v(),a=v(),s=t.redirectUri(e),c={state:i,nonce:a,redirectUri:encodeURIComponent(s),loginOptions:e};e&&e.prompt&&(c.prompt=e.prompt),o=e&&"register"==e.action?r.endpoints.register():r.endpoints.authorize();var l=e&&e.scope||r.scope;l?-1===l.indexOf("openid")&&(l="openid "+l):l="openid";var p,h=o+"?client_id="+encodeURIComponent(r.clientId)+"&redirect_uri="+encodeURIComponent(s)+"&state="+encodeURIComponent(i)+"&response_mode="+encodeURIComponent(r.responseMode)+"&response_type="+encodeURIComponent(r.responseType)+"&scope="+encodeURIComponent(l);if(u&&(h=h+"&nonce="+encodeURIComponent(a)),e&&e.prompt&&(h+="&prompt="+encodeURIComponent(e.prompt)),e&&e.maxAge&&(h+="&max_age="+encodeURIComponent(e.maxAge)),e&&e.loginHint&&(h+="&login_hint="+encodeURIComponent(e.loginHint)),e&&e.idpHint&&(h+="&kc_idp_hint="+encodeURIComponent(e.idpHint)),e&&e.action&&"register"!=e.action&&(h+="&kc_action="+encodeURIComponent(e.action)),e&&e.locale&&(h+="&ui_locales="+encodeURIComponent(e.locale)),e&&e.acr){var d=(p={id_token:{acr:e.acr}},JSON.stringify(p));h+="&claims="+encodeURIComponent(d)}if((e&&e.acrValues||r.acrValues)&&(h+="&acr_values="+encodeURIComponent(e.acrValues||r.acrValues)),r.pkceMethod){var g=f(96,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789");c.pkceCodeVerifier=g,h+="&code_challenge="+function(e,t){if("S256"!==e)throw new TypeError(`Invalid value for 'pkceMethod', expected 'S256' but got '${e}'.`);return function(e){const t=String.fromCodePoint(...e);return btoa(t)}(new Uint8Array(nn.arrayBuffer(t))).replace(/\+/g,"-").replace(/\//g,"_").replace(/\=/g,"")}(r.pkceMethod,g),h+="&code_challenge_method="+r.pkceMethod}return n.add(c),h},r.logout=function(e){return t.logout(e)},r.createLogoutUrl=function(e){if("POST"===(e?.logoutMethod??r.logoutMethod))return r.endpoints.logout();var n=r.endpoints.logout()+"?client_id="+encodeURIComponent(r.clientId)+"&post_logout_redirect_uri="+encodeURIComponent(t.redirectUri(e,!1));return r.idToken&&(n+="&id_token_hint="+encodeURIComponent(r.idToken)),n},r.register=function(e){return t.register(e)},r.createRegisterUrl=function(e){return e||(e={}),e.action="register",r.createLoginUrl(e)},r.createAccountUrl=function(e){var n=p(),o=void 0;return void 0!==n&&(o=n+"/account?referrer="+encodeURIComponent(r.clientId)+"&referrer_uri="+encodeURIComponent(t.redirectUri(e))),o},r.accountManagement=function(){return t.accountManagement()},r.hasRealmRole=function(e){var t=r.realmAccess;return!!t&&t.roles.indexOf(e)>=0},r.hasResourceRole=function(e,t){if(!r.resourceAccess)return!1;var n=r.resourceAccess[t||r.clientId];return!!n&&n.roles.indexOf(e)>=0},r.loadUserProfile=function(){var e=p()+"/account",t=new XMLHttpRequest;t.open("GET",e,!0),t.setRequestHeader("Accept","application/json"),t.setRequestHeader("Authorization","bearer "+r.token);var n=m();return t.onreadystatechange=function(){4==t.readyState&&(200==t.status?(r.profile=JSON.parse(t.responseText),n.setSuccess(r.profile)):n.setError())},t.send(),n.promise},r.loadUserInfo=function(){var e=r.endpoints.userinfo(),t=new XMLHttpRequest;t.open("GET",e,!0),t.setRequestHeader("Accept","application/json"),t.setRequestHeader("Authorization","bearer "+r.token);var n=m();return t.onreadystatechange=function(){4==t.readyState&&(200==t.status?(r.userInfo=JSON.parse(t.responseText),n.setSuccess(r.userInfo)):n.setError())},t.send(),n.promise},r.isTokenExpired=function(e){if(!r.tokenParsed||!r.refreshToken&&"implicit"!=r.flow)throw"Not authenticated";if(null==r.timeSkew)return c("[KEYCLOAK] Unable to determine if token is expired as timeskew is not set"),!0;var t=r.tokenParsed.exp-Math.ceil((new Date).getTime()/1e3)+r.timeSkew;if(e){if(isNaN(e))throw"Invalid minValidity";t-=e}return t<0},r.updateToken=function(e){var t=m();if(!r.refreshToken)return t.setError(),t.promise;e=e||5;var n=function(){var n=!1;if(-1==e?(n=!0,c("[KEYCLOAK] Refreshing token: forced refresh")):r.tokenParsed&&!r.isTokenExpired(e)||(n=!0,c("[KEYCLOAK] Refreshing token: token expired")),n){var i="grant_type=refresh_token&refresh_token="+r.refreshToken,a=r.endpoints.token();if(o.push(t),1==o.length){var s=new XMLHttpRequest;s.open("POST",a,!0),s.setRequestHeader("Content-type","application/x-www-form-urlencoded"),s.withCredentials=!0,i+="&client_id="+encodeURIComponent(r.clientId);var u=(new Date).getTime();s.onreadystatechange=function(){if(4==s.readyState)if(200==s.status){c("[KEYCLOAK] Token refreshed"),u=(u+(new Date).getTime())/2;var e=JSON.parse(s.responseText);g(e.access_token,e.refresh_token,e.id_token,u),r.onAuthRefreshSuccess&&r.onAuthRefreshSuccess();for(var t=o.pop();null!=t;t=o.pop())t.setSuccess(!0)}else for(l("[KEYCLOAK] Failed to refresh token"),400==s.status&&r.clearToken(),r.onAuthRefreshError&&r.onAuthRefreshError(),t=o.pop();null!=t;t=o.pop())t.setError(!0)},s.send(i)}}else t.setSuccess(!1)};return i.enable?S().then((function(){n()})).catch((function(e){t.setError(e)})):n(),t.promise},r.clearToken=function(){r.token&&(g(null,null,null),r.onAuthLogout&&r.onAuthLogout(),r.loginRequired&&r.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 n=localStorage.key(t);if(n&&0==n.indexOf("kc-callback-")){var r=localStorage.getItem(n);if(r)try{var o=JSON.parse(r).expires;(!o||o<e)&&localStorage.removeItem(n)}catch(e){localStorage.removeItem(n)}}}}localStorage.setItem("kc-test","test"),localStorage.removeItem("kc-test"),this.get=function(t){if(t){var n="kc-callback-"+t,r=localStorage.getItem(n);return r&&(localStorage.removeItem(n),r=JSON.parse(r)),e(),r}},this.add=function(t){e();var n="kc-callback-"+t.state;t.expires=(new Date).getTime()+36e5,localStorage.setItem(n,JSON.stringify(t))}},x=function(){if(!(this instanceof x))return new x;var e=this;e.get=function(e){if(e){var o=n("kc-callback-"+e);return r("kc-callback-"+e,"",t(-100)),o?JSON.parse(o):void 0}},e.add=function(e){r("kc-callback-"+e.state,JSON.stringify(e),t(60))},e.removeItem=function(e){r(e,"",t(-100))};var t=function(e){var t=new Date;return t.setTime(t.getTime()+60*e*1e3),t},n=function(e){for(var t=e+"=",n=document.cookie.split(";"),r=0;r<n.length;r++){for(var o=n[r];" "==o.charAt(0);)o=o.substring(1);if(0==o.indexOf(t))return o.substring(t.length,o.length)}return""},r=function(e,t,n){var r=e+"="+t+"; expires="+n.toUTCString()+"; ";document.cookie=r}};function A(e){return function(){r.enableLogging&&e.apply(console,Array.prototype.slice.call(arguments))}}}var sn=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))};const un=e=>t=>class extends t{constructor(){super(...arguments),this._connectRequested=!1,this._status=Pt.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 sn(this,void 0,void 0,(function*(){this.eventsConnected&&this._onEventsConnect()}))}get eventsConnected(){return this._connectRequested&&e.getEventProvider().status===Pt.CONNECTED}_onEventProviderStatusChanged(e){switch(e){case Pt.DISCONNECTED:this._onEventsDisconnect();break;case Pt.CONNECTED:this._doConnect()}}_onEventsConnect(){this._addEventSubscriptions(),this.onEventsConnect()}_onEventsDisconnect(){this._removeEventSubscriptions(),this.onEventsDisconnect()}_addEventSubscriptions(){return sn(this,void 0,void 0,(function*(){const t=!!this._attributeRefs,n=!!this._assetIds,r=this._attributeRefs?this._attributeRefs:this._assetIds;if(r&&r.length>0){if(this._subscriptionIds=[],n){const t=yield e.getEventProvider().subscribeAssetEvents(r,!0,(e=>this._onEvent(e))),n=this._attributeRefs?this._attributeRefs:this._assetIds;if(!this._subscriptionIds||!Pe(r,n))return void e.getEventProvider().unsubscribe(t);this._subscriptionIds.push(t)}const o=yield e.getEventProvider().subscribeAttributeEvents(r,t,(e=>this._onEvent(e))),i=this._attributeRefs?this._attributeRefs:this._assetIds;if(!this._subscriptionIds||!Pe(r,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){Pe(this._assetIds,e)||(this._assetIds=e,this._refreshEventSubscriptions(),this.requestUpdate("assetIds"))}get assetIds(){return this._assetIds}set attributeRefs(e){Pe(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){}},cn="#4d9d2a",ln="#FFFFFF",fn="#FFFFFF",pn="#F9F9F9",hn="#CCCCCC",dn="#be0000",gn="#FFFFFF",vn="#4c4c4c",yn="#000000",bn="#000000",mn="#FFFFFF",_n="0 5px 5px -5px rgba(0,0,0,0.3)",wn="0 1px 3px 0 rgba(0,0,0,0.21)",Sn="50px",kn="0.3";var On=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))};const En="mdi",xn="openremote",An="restricted_user";var Rn,Pn;!function(e){e.MANAGER_FAILED_TO_LOAD="MANAGER_FAILED_TO_LOAD",e.AUTH_FAILED="AUTH_FAILED",e.AUTH_TYPE_UNSUPPORTED="AUTH_TYPE_UNSUPPORTED",e.CONSOLE_ERROR="CONSOLE_INIT_ERROR",e.EVENTS_CONNECTION_ERROR="EVENTS_CONNECTION_ERROR",e.TRANSLATION_ERROR="TRANSLATION_ERROR"}(Rn||(Rn={})),function(e){e.ERROR="ERROR",e.READY="READY",e.ONLINE="ONLINE",e.OFFLINE="OFFLINE",e.CONNECTING="CONNECTING",e.CONSOLE_INIT="CONSOLE_INIT",e.CONSOLE_READY="CONSOLE_READY",e.TRANSLATE_INIT="TRANSLATE_INIT",e.TRANSLATE_LANGUAGE_CHANGED="TRANSLATE_LANGUAGE_CHANGED",e.DISPLAY_REALM_CHANGED="DISPLAY_REALM_CHANGED"}(Pn||(Pn={}));const Cn={en:"english",cn:"chinese",nl:"dutch",fr:"french",de:"german",it:"italian",pt:"portuguese",ro:"romanian",es:"spanish",uk:"ukrainian"};function In(e){const 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=xn),t}class jn{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(){const e=new Map;return this._keycloak?this._keycloak.resourceAccess&&this._config.clientId&&this._keycloak.resourceAccess&&Object.entries(this._keycloak.resourceAccess).forEach((([t,n])=>{const r=n.roles;e.set(t,r)})):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?void 0:e.managerUrl}get keycloakUrl(){var e;return null===(e=this._config)||void 0===e?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 It()}get language(){return le.language}set language(e){console.debug(`Changing language to ${e}.`),e&&(le.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(Pn.DISPLAY_REALM_CHANGED))}get clientId(){return this._config.clientId||xn}getEventProvider(){return this.events}get mapType(){return this._config.mapType||"VECTOR"}isManagerSameOrigin(){if(!this.ready)return!1;const e=new URL(this._config.managerUrl),t=window.location;return e.protocol===t.protocol&&e.hostname===t.hostname&&e.port===t.port}addListener(e){this._listeners.indexOf(e)<0&&this._listeners.push(e)}removeListener(e){const t=this._listeners.indexOf(e);t>=0&&this._listeners.splice(t,1)}init(e){return On(this,void 0,void 0,(function*(){this._config&&console.debug("Already initialised"),this._config=In(e);let t=yield this.loadManagerInfo();const n=new Rt(this._config.realm,this._config.consoleAutoEnable,(()=>{this._emitEvent(Pn.CONSOLE_READY)}));if(this._console=n,"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){const e=new URL(this._config.managerUrl);let t;this._authServerUrl.startsWith("//")&&(this._authServerUrl=e.protocol+this._authServerUrl);try{t=new URL(this._authServerUrl)}catch(n){t=new URL(e),t.pathname=this._authServerUrl}t.protocol||(t.protocol=e.protocol),t.hostname||(t.hostname=e.hostname),t.port||(t.port=e.port),this._config.keycloakUrl=t.toString()}this._config.keycloakUrl||(this._config.keycloakUrl=this._config.managerUrl+"/auth"),this._config.keycloakUrl=this._config.keycloakUrl.replace(/\/+$/,""),t=yield this.doAuthInit(),t||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&&(t=yield this.doDescriptorsInit(),t=yield this.getConsoleAppConfig()),this.doIconInit(),t?(this._readyCallback&&(yield this._readyCallback()),this._ready=!0,this._emitEvent(Pn.READY)):(this._config=void 0,console.warn("Failed to initialise the manager")),this.displayRealm=e.realm||"master",t)}))}loadManagerInfo(){return On(this,void 0,void 0,(function*(){try{const e=yield new Promise(((e,t)=>{const n=new XMLHttpRequest;n.addEventListener("load",(()=>{e(JSON.parse(n.responseText))})),n.addEventListener("error",(()=>{t(new Error("Failed to contact the manager"))})),n.open("GET",this._config.managerUrl+"/api/master/info"),n.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(Rn.MANAGER_FAILED_TO_LOAD),!1}}))}doTranslateInit(){return On(this,void 0,void 0,(function*(){if(le.isInitialized)return!0;le.on("initialized",(e=>{this._emitEvent(Pn.TRANSLATE_INIT)})),le.on("languageChanged",(e=>{ge().locale(e),this._emitEvent(Pn.TRANSLATE_LANGUAGE_CHANGED)}));const 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,n)=>"uppercase"===t?e.toUpperCase():e instanceof Date?ge()(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 le.use(en).init(e)}catch(e){return console.error(e),this._setError(Rn.TRANSLATION_ERROR),!1}return!0}))}doDescriptorsInit(){return On(this,void 0,void 0,(function*(){if(!this.config.loadDescriptors)return!0;try{const e=yield It().api.AssetModelResource.getAssetInfos(),t=yield It().api.AssetModelResource.getMetaItemDescriptors(),n=yield It().api.AssetModelResource.getValueDescriptors();he.AssetModelUtil._assetTypeInfos=e.data,he.AssetModelUtil._metaItemDescriptors=Object.values(t.data),he.AssetModelUtil._valueDescriptors=Object.values(n.data)}catch(e){return console.error(e),!1}return!0}))}doAuthInit(){return On(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(Rn.AUTH_TYPE_UNSUPPORTED),!1}return!!e&&(It().addRequestInterceptor((e=>{if(!e.headers.Authorization){const t=this.getAuthorizationHeader();t&&(e.headers.Authorization=t)}return e})),e)}))}doRestApiInit(){return It().setTimeout(2e4),It().initialise(this.getApiBaseUrl()),!0}doEventsSubscriptionInit(){return On(this,void 0,void 0,(function*(){let e=!1;return"WEBSOCKET"===this._config.eventProviderType&&(this._events=new Lt(this._config.managerUrl),this._events.subscribeStatusChange((e=>this._onEventProviderStatusChanged(e))),e=yield this._events.connect()),e||this._setError(Rn.EVENTS_CONNECTION_ERROR),e}))}_connectEvents(){var e;(null===(e=this.events)||void 0===e?void 0:e.status)===Pt.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 Pt.DISCONNECTED:this._onDisconnect();break;case Pt.CONNECTED:break;case Pt.CONNECTING:this._emitEvent(Pn.CONNECTING)}}doConsoleInit(){return On(this,void 0,void 0,(function*(){try{return yield this.console.initialise(),this._emitEvent(Pn.CONSOLE_INIT),!0}catch(e){return this._setError(Rn.CONSOLE_ERROR),!1}}))}doIconInit(){this._config.loadIcons&&(tn.IconSets.addIconSet("mdi",(0,tn.createMdiIconSet)(Tn.managerUrl)),tn.IconSets.addIconSet("or",(0,tn.createSvgIconSet)(tn.OrIconSet.size,tn.OrIconSet.icons)))}getConsoleAppConfig(){var e;return On(this,void 0,void 0,(function*(){try{const t=yield fetch((null!==(e=Tn.managerUrl)&&void 0!==e?e:"")+"/consoleappconfig/"+Tn.displayRealm+".json");return this._consoleAppConfig=yield t.json(),!0}catch(e){return!0}}))}getConsolePreferredLanguage(e=this.console){return On(this,void 0,void 0,(function*(){return e.retrieveData("LANGUAGE")}))}getUserPreferredLanguage(e=this._keycloak){return On(this,void 0,void 0,(function*(){if(e&&e.authenticated){const t=(null==e?void 0:e.profile)||(yield null==e?void 0:e.loadUserProfile());if(null==t?void 0:t.attributes){const e=new Map(Object.entries(t.attributes));if(e.has("locale")){const 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,t=this.rest){return On(this,void 0,void 0,(function*(){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){const 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 On(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(){var e,t,n,r;return On(this,void 0,void 0,(function*(){if(!this.config.basicLoginProvider)return;let o={username:(null===(e=this.config.credentials)||void 0===e?void 0:e.username)?null===(t=this.config.credentials)||void 0===t?void 0:t.username:"",password:(null===(n=this.config.credentials)||void 0===n?void 0:n.password)?null===(r=this.config.credentials)||void 0===r?void 0:r.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),o.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{const t=yield It().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("Unknown response so aborting"),this._basicIdentity=void 0;break}{console.debug("Basic authentication successful"),i=!0;const e=yield It().api.UserResource.getCurrentUserClientRoles(this.clientId);this._basicIdentity.roles=e.data}}i&&this._onAuthenticated()}))}isSuperUser(){return!(!this.getRealm()||"master"!==this.getRealm()||!this.hasRealmRole("admin"))}isRestrictedUser(){return!!this.hasRealmRole(An)}getApiBaseUrl(){let e=this._config.managerUrl;return e+="/api/"+this._config.realm+"/",e}getAppName(){const 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){const n=this.roles;return n&&n.has(t)&&n.get(t).indexOf(e)>=0}getAuthorizationHeader(){return this.getKeycloakToken()?"Bearer "+this.getKeycloakToken():this.getBasicToken()?"Basic "+this.getBasicToken():void 0}getKeycloakToken(){if(this.isKeycloak())return 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,this._events||this.doEventsSubscriptionInit()}loadAndInitialiseKeycloak(){var e,t,n,r;return On(this,void 0,void 0,(function*(){try{this._keycloak=new an({clientId:this._config.clientId,realm:this._config.realm,url:this._config.keycloakUrl});const o=yield this._getNativeOfflineRefreshToken();let i=yield this._keycloak.init({checkLoginIframe:!1,onLoad:"check-sso"});if(!i&&o)try{console.error("SETTING OFFLINE TOKEN"),this._keycloak.refreshToken=o,i=yield this._updateKeycloakAccessToken()}catch(e){console.error("Failed to authenticate using offline token")}if(i)this._name=null===(e=this._keycloak.tokenParsed)||void 0===e?void 0:e.name,this._username=null===(t=this._keycloak.tokenParsed)||void 0===t?void 0:t.preferred_username,this._createTokenUpdateInterval(),this.isMobile()&&"Offline"===(null===(r=null===(n=this._keycloak)||void 0===n?void 0:n.refreshTokenParsed)||void 0===r?void 0:r.typ)&&(console.debug("Storing offline refresh token"),this.console.storeData("REFRESH_TOKEN",this._keycloak.refreshToken)),this._onAuthenticated();else if(this.config.autoLogin)return this.login(),!1;return!0}catch(e){return this._authenticated=!1,this._setError(Rn.AUTH_FAILED),console.error("Failed to initialise Keycloak: "+e),!1}}))}_createTokenUpdateInterval(){this._keycloakUpdateTokenInterval||(this._keycloakUpdateTokenInterval=window.setInterval((()=>On(this,void 0,void 0,(function*(){yield this._updateKeycloakAccessToken().catch((()=>{console.debug("Keycloak failed to refresh the access token"),this._onDisconnect()}))}))),1e4))}_updateKeycloakAccessToken(){return On(this,void 0,void 0,(function*(){const e=yield this._keycloak.updateToken(20);return console.debug("Access token update success, refreshed from server: "+e),e&&this._onAuthenticated(),e}))}_getNativeOfflineRefreshToken(){return On(this,void 0,void 0,(function*(){if(this.isMobile())return yield this.console.retrieveData("REFRESH_TOKEN")}))}_emitEvent(e){window.setTimeout((()=>{const t=this._listeners;for(const n of t)n(e)}),0)}_setError(e){this._error=e,this._emitEvent(Pn.ERROR),console.warn("Error set: "+e)}_clearWebHistory(){var e;null===(e=this.console)||void 0===e||e._doSendGenericMessage("CLEAR_WEB_HISTORY",void 0)}_onDisconnect(){return On(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(Pn.OFFLINE),this.reconnect())}))}_onReconnected(){console.debug("Reconnected"),this._disconnected=!1,this._createTokenUpdateInterval(),this._emitEvent(Pn.ONLINE)}reconnect(e=3e3){return On(this,void 0,void 0,(function*(){if(!this._disconnected)return;this._reconnectTimer&&(window.clearTimeout(this._reconnectTimer),this._reconnectTimer=void 0);const t=yield(()=>On(this,void 0,void 0,(function*(){var e;if(console.debug("Attempting reconnect"),!(yield this.isKeycloakReachable()))return console.debug("Keycloak is unreachable"),!1;console.debug("Keycloak is reachable"),console.debug("Checking keycloak access token");try{yield this._updateKeycloakAccessToken()}catch(e){const t=yield this._getNativeOfflineRefreshToken();this._keycloak.refreshToken=t;try{yield this._updateKeycloakAccessToken()}catch(e){return console.debug("Cannot update access token so sending to login"),void this.login()}return console.debug("Keycloak access token is valid"),!0}const t=this.events&&this.events.status===Pt.CONNECTING;return console.debug("If event provider offline then attempting reconnect: offline="+t),!t||(yield null===(e=this.events)||void 0===e?void 0:e.connect())})))();return void 0!==t?t?void this._onReconnected():(e=Math.min(jn.MAX_RECONNECT_DELAY,e+3e3),console.debug("Scheduling another reconnect attempt in (ms): "+e),void(this._reconnectTimer=window.setTimeout((()=>this.reconnect(e)),e))):void 0}))}isKeycloakReachable(e=2e3){return On(this,void 0,void 0,(function*(){const t=new AbortController,n=setTimeout((()=>t.abort()),e);try{const e=this._keycloak.endpoints.token();return 200===(yield fetch(e,{method:"OPTIONS",signal:t.signal})).status}catch(e){return!1}finally{clearTimeout(n)}}))}}jn.MAX_RECONNECT_DELAY=45e3;const Tn=new jn,Nn=Tn})(),c})()));
|
|
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,n,r)=>(()=>{var o={737:function(e,t,n){"use strict";var r=n(528),o=n(235),i=o(r("String.prototype.indexOf"));e.exports=function(e,t){var n=r(e,!!t);return"function"==typeof n&&i(e,".prototype.")>-1?o(n):n}},235:function(e,t,n){"use strict";var r=n(156),o=n(528),i=n(427),a=n(682),s=o("%Function.prototype.apply%"),u=o("%Function.prototype.call%"),c=o("%Reflect.apply%",!0)||r.call(u,s),l=o("%Object.defineProperty%",!0),f=o("%Math.max%");if(l)try{l({},"a",{value:1})}catch(e){l=null}e.exports=function(e){if("function"!=typeof e)throw new a("a function is required");var t=c(r,u,arguments);return i(t,1+f(0,e.length-(arguments.length-1)),!0)};var p=function(){return c(r,s,arguments)};l?l(e.exports,"apply",{value:p}):e.exports.apply=p},427:function(e,t,n){"use strict";var r=n(528),o=n(892),i=n(320)(),a=n(455),s=n(682),u=r("%Math.floor%");e.exports=function(e,t){if("function"!=typeof e)throw new s("`fn` is not a function");if("number"!=typeof t||t<0||t>0xffffffff||u(t)!==t)throw new s("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],r=!0,c=!0;if("length"in e&&a){var l=a(e,"length");l&&!l.configurable&&(r=!1),l&&!l.writable&&(c=!1)}return(r||c||!n)&&(i?o(e,"length",t,!0,!0):o(e,"length",t)),e}},456:function(e,t){var n="undefined"!=typeof self?self:this,r=function(){function e(){this.fetch=!1,this.DOMException=n.DOMException}return e.prototype=n,new e}();(function(e){var t={searchParams:"URLSearchParams"in r,iterable:"Symbol"in r&&"iterator"in Symbol,blob:"FileReader"in r&&"Blob"in r&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in r,arrayBuffer:"ArrayBuffer"in r};if(t.arrayBuffer)var n=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],o=ArrayBuffer.isView||function(e){return e&&n.indexOf(Object.prototype.toString.call(e))>-1};function i(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw TypeError("Invalid character in header field name");return e.toLowerCase()}function a(e){return"string"!=typeof e&&(e=String(e)),e}function s(e){var n={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return t.iterable&&(n[Symbol.iterator]=function(){return n}),n}function u(e){this.map={},e instanceof u?e.forEach(function(e,t){this.append(t,e)},this):Array.isArray(e)?e.forEach(function(e){this.append(e[0],e[1])},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}function c(e){if(e.bodyUsed)return Promise.reject(TypeError("Already read"));e.bodyUsed=!0}function l(e){return new Promise(function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}})}function f(e){var t=new FileReader,n=l(t);return t.readAsArrayBuffer(e),n}function p(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function h(){return this.bodyUsed=!1,this._initBody=function(e){if(this._bodyInit=e,e)if("string"==typeof e)this._bodyText=e;else if(t.blob&&Blob.prototype.isPrototypeOf(e))this._bodyBlob=e;else if(t.formData&&FormData.prototype.isPrototypeOf(e))this._bodyFormData=e;else if(t.searchParams&&URLSearchParams.prototype.isPrototypeOf(e))this._bodyText=e.toString();else{var n;t.arrayBuffer&&t.blob&&(n=e)&&DataView.prototype.isPrototypeOf(n)?(this._bodyArrayBuffer=p(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):t.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(e)||o(e))?this._bodyArrayBuffer=p(e):this._bodyText=e=Object.prototype.toString.call(e)}else this._bodyText="";!this.headers.get("content-type")&&("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):t.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},t.blob&&(this.blob=function(){var e=c(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(!this._bodyFormData)return Promise.resolve(new Blob([this._bodyText]));throw Error("could not read FormData body as blob")},this.arrayBuffer=function(){return this._bodyArrayBuffer?c(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(f)}),this.text=function(){var e,t,n,r=c(this);if(r)return r;if(this._bodyBlob)return e=this._bodyBlob,n=l(t=new FileReader),t.readAsText(e),n;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=Array(t.length),r=0;r<t.length;r++)n[r]=String.fromCharCode(t[r]);return n.join("")}(this._bodyArrayBuffer));if(!this._bodyFormData)return Promise.resolve(this._bodyText);throw Error("could not read FormData body as text")},t.formData&&(this.formData=function(){return this.text().then(y)}),this.json=function(){return this.text().then(JSON.parse)},this}u.prototype.append=function(e,t){e=i(e),t=a(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},u.prototype.delete=function(e){delete this.map[i(e)]},u.prototype.get=function(e){return e=i(e),this.has(e)?this.map[e]:null},u.prototype.has=function(e){return this.map.hasOwnProperty(i(e))},u.prototype.set=function(e,t){this.map[i(e)]=a(t)},u.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},u.prototype.keys=function(){var e=[];return this.forEach(function(t,n){e.push(n)}),s(e)},u.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),s(e)},u.prototype.entries=function(){var e=[];return this.forEach(function(t,n){e.push([n,t])}),s(e)},t.iterable&&(u.prototype[Symbol.iterator]=u.prototype.entries);var d=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function g(e,t){var n,r,o=(t=t||{}).body;if(e instanceof g){if(e.bodyUsed)throw TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new u(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,o||null==e._bodyInit||(o=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",(t.headers||!this.headers)&&(this.headers=new u(t.headers)),this.method=(r=(n=t.method||this.method||"GET").toUpperCase(),d.indexOf(r)>-1?r:n),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&o)throw TypeError("Body not allowed for GET or HEAD requests");this._initBody(o)}function y(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),o=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(o))}}),t}function v(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new u(t.headers),this.url=t.url||"",this._initBody(e)}g.prototype.clone=function(){return new g(this,{body:this._bodyInit})},h.call(g.prototype),h.call(v.prototype),v.prototype.clone=function(){return new v(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new u(this.headers),url:this.url})},v.error=function(){var e=new v(null,{status:0,statusText:""});return e.type="error",e};var b=[301,302,303,307,308];v.redirect=function(e,t){if(-1===b.indexOf(t))throw RangeError("Invalid status code");return new v(null,{status:t,headers:{location:e}})},e.DOMException=r.DOMException;try{new e.DOMException}catch(t){e.DOMException=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},e.DOMException.prototype=Object.create(Error.prototype),e.DOMException.prototype.constructor=e.DOMException}function m(n,r){return new Promise(function(o,i){var a=new g(n,r);if(a.signal&&a.signal.aborted)return i(new e.DOMException("Aborted","AbortError"));var s=new XMLHttpRequest;function c(){s.abort()}s.onload=function(){var e,t,n={status:s.status,statusText:s.statusText,headers:(e=s.getAllResponseHeaders()||"",t=new u,e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach(function(e){var n=e.split(":"),r=n.shift().trim();if(r){var o=n.join(":").trim();t.append(r,o)}}),t)};n.url="responseURL"in s?s.responseURL:n.headers.get("X-Request-URL"),o(new v("response"in s?s.response:s.responseText,n))},s.onerror=function(){i(TypeError("Network request failed"))},s.ontimeout=function(){i(TypeError("Network request failed"))},s.onabort=function(){i(new e.DOMException("Aborted","AbortError"))},s.open(a.method,a.url,!0),"include"===a.credentials?s.withCredentials=!0:"omit"===a.credentials&&(s.withCredentials=!1),"responseType"in s&&t.blob&&(s.responseType="blob"),a.headers.forEach(function(e,t){s.setRequestHeader(t,e)}),a.signal&&(a.signal.addEventListener("abort",c),s.onreadystatechange=function(){4===s.readyState&&a.signal.removeEventListener("abort",c)}),s.send(void 0===a._bodyInit?null:a._bodyInit)})}m.polyfill=!0,r.fetch||(r.fetch=m,r.Headers=u,r.Request=g,r.Response=v),e.Headers=u,e.Request=g,e.Response=v,e.fetch=m,Object.defineProperty(e,"__esModule",{value:!0})})({}),r.fetch.ponyfill=!0,delete r.fetch.polyfill,(t=r.fetch).default=r.fetch,t.fetch=r.fetch,t.Headers=r.Headers,t.Request=r.Request,t.Response=r.Response,e.exports=t},892:function(e,t,n){"use strict";var r=n(320)(),o=n(528),i=r&&o("%Object.defineProperty%",!0);if(i)try{i({},"a",{value:1})}catch(e){i=!1}var a=n(874),s=n(682),u=n(455);e.exports=function(e,t,n){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new s("`obj` must be an object or a function`");if("string"!=typeof t&&"symbol"!=typeof t)throw new s("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new s("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new s("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new s("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new s("`loose`, if provided, must be a boolean");var r=arguments.length>3?arguments[3]:null,o=arguments.length>4?arguments[4]:null,c=arguments.length>5?arguments[5]:null,l=arguments.length>6&&arguments[6],f=!!u&&u(e,t);if(i)i(e,t,{configurable:null===c&&f?f.configurable:!c,enumerable:null===r&&f?f.enumerable:!r,value:n,writable:null===o&&f?f.writable:!o});else if(!l&&(r||o||c))throw new a("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");else e[t]=n}},727:function(e){"use strict";e.exports=EvalError},772:function(e){"use strict";e.exports=Error},511:function(e){"use strict";e.exports=RangeError},912:function(e){"use strict";e.exports=ReferenceError},874:function(e){"use strict";e.exports=SyntaxError},682:function(e){"use strict";e.exports=TypeError},834:function(e){"use strict";e.exports=URIError},521:function(e){"use strict";var t=Object.prototype.toString,n=Math.max,r=function(e,t){for(var n=[],r=0;r<e.length;r+=1)n[r]=e[r];for(var o=0;o<t.length;o+=1)n[o+e.length]=t[o];return n},o=function(e,t){for(var n=[],r=t||0,o=0;r<e.length;r+=1,o+=1)n[o]=e[r];return n},i=function(e,t){for(var n="",r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n};e.exports=function(e){var a,s=this;if("function"!=typeof s||"[object Function]"!==t.apply(s))throw TypeError("Function.prototype.bind called on incompatible "+s);for(var u=o(arguments,1),c=n(0,s.length-u.length),l=[],f=0;f<c;f++)l[f]="$"+f;if(a=Function("binder","return function ("+i(l,",")+"){ return binder.apply(this,arguments); }")(function(){if(this instanceof a){var t=s.apply(this,r(u,arguments));return Object(t)===t?t:this}return s.apply(e,r(u,arguments))}),s.prototype){var p=function(){};p.prototype=s.prototype,a.prototype=new p,p.prototype=null}return a}},156:function(e,t,n){"use strict";var r=n(521);e.exports=Function.prototype.bind||r},528:function(e,t,n){"use strict";var r,o=n(772),i=n(727),a=n(511),s=n(912),u=n(874),c=n(682),l=n(834),f=Function,p=function(e){try{return f('"use strict"; return ('+e+").constructor;")()}catch(e){}},h=Object.getOwnPropertyDescriptor;if(h)try{h({},"")}catch(e){h=null}var d=function(){throw new c},g=h?function(){try{return arguments.callee,d}catch(e){try{return h(arguments,"callee").get}catch(e){return d}}}():d,y=n(465)(),v=n(209)(),b=Object.getPrototypeOf||(v?function(e){return e.__proto__}:null),m={},_="undefined"!=typeof Uint8Array&&b?b(Uint8Array):r,w={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?r:ArrayBuffer,"%ArrayIteratorPrototype%":y&&b?b([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":m,"%AsyncGenerator%":m,"%AsyncGeneratorFunction%":m,"%AsyncIteratorPrototype%":m,"%Atomics%":"undefined"==typeof Atomics?r:Atomics,"%BigInt%":"undefined"==typeof BigInt?r:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?r:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":o,"%eval%":eval,"%EvalError%":i,"%Float32Array%":"undefined"==typeof Float32Array?r:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?r:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?r:FinalizationRegistry,"%Function%":f,"%GeneratorFunction%":m,"%Int8Array%":"undefined"==typeof Int8Array?r:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?r:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":y&&b?b(b([][Symbol.iterator]())):r,"%JSON%":"object"==typeof JSON?JSON:r,"%Map%":"undefined"==typeof Map?r:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&y&&b?b(new Map()[Symbol.iterator]()):r,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?r:Promise,"%Proxy%":"undefined"==typeof Proxy?r:Proxy,"%RangeError%":a,"%ReferenceError%":s,"%Reflect%":"undefined"==typeof Reflect?r:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?r:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&y&&b?b(new Set()[Symbol.iterator]()):r,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":y&&b?b(""[Symbol.iterator]()):r,"%Symbol%":y?Symbol:r,"%SyntaxError%":u,"%ThrowTypeError%":g,"%TypedArray%":_,"%TypeError%":c,"%Uint8Array%":"undefined"==typeof Uint8Array?r:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?r:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?r:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?r:Uint32Array,"%URIError%":l,"%WeakMap%":"undefined"==typeof WeakMap?r:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?r:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?r:WeakSet};if(b)try{null.error}catch(e){var S=b(b(e));w["%Error.prototype%"]=S}var k=function e(t){var n;if("%AsyncFunction%"===t)n=p("async function () {}");else if("%GeneratorFunction%"===t)n=p("function* () {}");else if("%AsyncGeneratorFunction%"===t)n=p("async function* () {}");else if("%AsyncGenerator%"===t){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&b&&(n=b(o.prototype))}return w[t]=n,n},O={__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"]},E=n(156),x=n(673),A=E.call(Function.call,Array.prototype.concat),R=E.call(Function.apply,Array.prototype.splice),P=E.call(Function.call,String.prototype.replace),C=E.call(Function.call,String.prototype.slice),I=E.call(Function.call,RegExp.prototype.exec),j=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,T=/\\(\\)?/g,N=function(e){var t=C(e,0,1),n=C(e,-1);if("%"===t&&"%"!==n)throw new u("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new u("invalid intrinsic syntax, expected opening `%`");var r=[];return P(e,j,function(e,t,n,o){r[r.length]=n?P(o,T,"$1"):t||e}),r},L=function(e,t){var n,r=e;if(x(O,r)&&(r="%"+(n=O[r])[0]+"%"),x(w,r)){var o=w[r];if(o===m&&(o=k(r)),void 0===o&&!t)throw new c("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:r,value:o}}throw new u("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new c("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===I(/^%?[^%]*%?$/,e))throw new u("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=N(e),r=n.length>0?n[0]:"",o=L("%"+r+"%",t),i=o.name,a=o.value,s=!1,l=o.alias;l&&(r=l[0],R(n,A([0,1],l)));for(var f=1,p=!0;f<n.length;f+=1){var d=n[f],g=C(d,0,1),y=C(d,-1);if(('"'===g||"'"===g||"`"===g||'"'===y||"'"===y||"`"===y)&&g!==y)throw new u("property names with quotes must have matching quotes");if("constructor"!==d&&p||(s=!0),r+="."+d,x(w,i="%"+r+"%"))a=w[i];else if(null!=a){if(!(d in a)){if(!t)throw new c("base intrinsic for "+e+" exists, but the property is not available.");return}if(h&&f+1>=n.length){var v=h(a,d);a=(p=!!v)&&"get"in v&&!("originalValue"in v.get)?v.get:a[d]}else p=x(a,d),a=a[d];p&&!s&&(w[i]=a)}}return a}},455:function(e,t,n){"use strict";var r=n(528)("%Object.getOwnPropertyDescriptor%",!0);if(r)try{r([],"length")}catch(e){r=null}e.exports=r},320:function(e,t,n){"use strict";var r=n(528)("%Object.defineProperty%",!0),o=function(){if(r)try{return r({},"a",{value:1}),!0}catch(e){}return!1};o.hasArrayLengthDefineBug=function(){if(!o())return null;try{return 1!==r([],"length",{value:1}).length}catch(e){return!0}},e.exports=o},209:function(e){"use strict";var t={foo:{}},n=Object;e.exports=function(){return({__proto__:t}).foo===t.foo&&!(({__proto__:null})instanceof n)}},465:function(e,t,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,o=n(73);e.exports=function(){return"function"==typeof r&&"function"==typeof Symbol&&"symbol"==typeof r("foo")&&"symbol"==typeof Symbol("bar")&&o()}},73:function(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"),n=Object(t);if("string"==typeof t||"[object Symbol]"!==Object.prototype.toString.call(t)||"[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t 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 r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},673:function(e,t,n){"use strict";var r=Function.prototype.call,o=Object.prototype.hasOwnProperty;e.exports=n(156).call(r,o)},921:function(e,t,n){!function(){"use strict";var t="input is invalid type",r="object"==typeof window,o=r?window:{};o.JS_SHA256_NO_WINDOW&&(r=!1);var i=!r&&"object"==typeof self,a=!o.JS_SHA256_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node;a?o=n.g:i&&(o=self);var s=!o.JS_SHA256_NO_COMMON_JS&&e.exports,u="function"==typeof define&&define.amd,c=!o.JS_SHA256_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,l="0123456789abcdef".split(""),f=[-0x80000000,8388608,32768,128],p=[24,16,8,0],h=[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],d=["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)}),c&&(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(n){return new w(t,!0).update(n)[e]()}},v=function(e){var t=y("hex",e);a&&(t=b(t,e)),t.create=function(){return new w(e)},t.update=function(e){return t.create().update(e)};for(var n=0;n<d.length;++n){var r=d[n];t[r]=y(r,e)}return t},b=function(e,r){var i,a=n(917),s=n(194).Buffer,u=r?"sha224":"sha256";return i=s.from&&!o.JS_SHA256_NO_BUFFER_FROM?s.from:function(e){return new s(e)},function(n){if("string"==typeof n)return a.createHash(u).update(n,"utf8").digest("hex");if(null==n)throw Error(t);return n.constructor===ArrayBuffer&&(n=new Uint8Array(n)),Array.isArray(n)||ArrayBuffer.isView(n)||n.constructor===s?a.createHash(u).update(i(n)).digest("hex"):e(n)}},m=function(e,t){return function(n,r){return new S(n,t,!0).update(r)[e]()}},_=function(e){var t=m("hex",e);t.create=function(t){return new S(t,e)},t.update=function(e,n){return t.create(e).update(n)};for(var n=0;n<d.length;++n){var r=d[n];t[r]=m(r,e)}return t};function w(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 S(e,n,r){var o,i=typeof e;if("string"===i){var a,s=[],u=e.length,l=0;for(o=0;o<u;++o)(a=e.charCodeAt(o))<128?s[l++]=a:(a<2048?s[l++]=192|a>>>6:(a<55296||a>=57344?s[l++]=224|a>>>12:(a=65536+((1023&a)<<10|1023&e.charCodeAt(++o)),s[l++]=240|a>>>18,s[l++]=128|a>>>12&63),s[l++]=128|a>>>6&63),s[l++]=128|63&a);e=s}else if("object"===i){if(null===e)throw Error(t);else if(c&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!Array.isArray(e)&&(!c||!ArrayBuffer.isView(e)))throw Error(t)}else throw Error(t);e.length>64&&(e=new w(n,!0).update(e).array());var f=[],p=[];for(o=0;o<64;++o){var h=e[o]||0;f[o]=92^h,p[o]=54^h}w.call(this,n,r),this.update(p),this.oKeyPad=f,this.inner=!0,this.sharedMemory=r}w.prototype.update=function(e){if(!this.finalized){var n,r=typeof e;if("string"!==r){if("object"===r){if(null===e)throw Error(t);else if(c&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!Array.isArray(e)&&(!c||!ArrayBuffer.isView(e)))throw Error(t)}else throw Error(t);n=!0}for(var o,i,a=0,s=e.length,u=this.blocks;a<s;){if(this.hashed&&(this.hashed=!1,u[0]=this.block,this.block=u[16]=u[1]=u[2]=u[3]=u[4]=u[5]=u[6]=u[7]=u[8]=u[9]=u[10]=u[11]=u[12]=u[13]=u[14]=u[15]=0),n)for(i=this.start;a<s&&i<64;++a)u[i>>>2]|=e[a]<<p[3&i++];else for(i=this.start;a<s&&i<64;++a)(o=e.charCodeAt(a))<128?u[i>>>2]|=o<<p[3&i++]:(o<2048?u[i>>>2]|=(192|o>>>6)<<p[3&i++]:(o<55296||o>=57344?u[i>>>2]|=(224|o>>>12)<<p[3&i++]:(o=65536+((1023&o)<<10|1023&e.charCodeAt(++a)),u[i>>>2]|=(240|o>>>18)<<p[3&i++],u[i>>>2]|=(128|o>>>12&63)<<p[3&i++]),u[i>>>2]|=(128|o>>>6&63)<<p[3&i++]),u[i>>>2]|=(128|63&o)<<p[3&i++]);this.lastByteIndex=i,this.bytes+=i-this.start,i>=64?(this.block=u[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}},w.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()}},w.prototype.hash=function(){var e,t,n,r,o,i,a,s,u,c,l=this.h0,f=this.h1,p=this.h2,d=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,n=((o=m[e-2])>>>17|o<<15)^(o>>>19|o<<13)^o>>>10,m[e]=m[e-16]+t+m[e-7]+n|0;for(e=0,c=f&p;e<64;e+=4)this.first?(this.is224?(a=300032,b=(o=m[0]-0x543c9a5b)-0x8f1a6c7|0,d=o+0x170e9b5|0):(a=0x2a01a605,b=(o=m[0]-0xc881298)-0x5ab00ac6|0,d=o+0x8909ae5|0),this.first=!1):(t=(l>>>2|l<<30)^(l>>>13|l<<19)^(l>>>22|l<<10),n=(g>>>6|g<<26)^(g>>>11|g<<21)^(g>>>25|g<<7),r=(a=l&f)^l&p^c,o=b+n+(g&y^~g&v)+h[e]+m[e],i=t+r,b=d+o|0,d=o+i|0),t=(d>>>2|d<<30)^(d>>>13|d<<19)^(d>>>22|d<<10),n=(b>>>6|b<<26)^(b>>>11|b<<21)^(b>>>25|b<<7),r=(s=d&l)^d&f^a,o=v+n+(b&g^~b&y)+h[e+1]+m[e+1],i=t+r,v=p+o|0,t=((p=o+i|0)>>>2|p<<30)^(p>>>13|p<<19)^(p>>>22|p<<10),n=(v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7),r=(u=p&d)^p&l^s,o=y+n+(v&b^~v&g)+h[e+2]+m[e+2],i=t+r,y=f+o|0,t=((f=o+i|0)>>>2|f<<30)^(f>>>13|f<<19)^(f>>>22|f<<10),n=(y>>>6|y<<26)^(y>>>11|y<<21)^(y>>>25|y<<7),r=(c=f&p)^f&d^u,o=g+n+(y&v^~y&b)+h[e+3]+m[e+3],i=t+r,g=l+o|0,l=o+i|0,this.chromeBugWorkAround=!0;this.h0=this.h0+l|0,this.h1=this.h1+f|0,this.h2=this.h2+p|0,this.h3=this.h3+d|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},w.prototype.hex=function(){this.finalize();var e=this.h0,t=this.h1,n=this.h2,r=this.h3,o=this.h4,i=this.h5,a=this.h6,s=this.h7,u=l[e>>>28&15]+l[e>>>24&15]+l[e>>>20&15]+l[e>>>16&15]+l[e>>>12&15]+l[e>>>8&15]+l[e>>>4&15]+l[15&e]+l[t>>>28&15]+l[t>>>24&15]+l[t>>>20&15]+l[t>>>16&15]+l[t>>>12&15]+l[t>>>8&15]+l[t>>>4&15]+l[15&t]+l[n>>>28&15]+l[n>>>24&15]+l[n>>>20&15]+l[n>>>16&15]+l[n>>>12&15]+l[n>>>8&15]+l[n>>>4&15]+l[15&n]+l[r>>>28&15]+l[r>>>24&15]+l[r>>>20&15]+l[r>>>16&15]+l[r>>>12&15]+l[r>>>8&15]+l[r>>>4&15]+l[15&r]+l[o>>>28&15]+l[o>>>24&15]+l[o>>>20&15]+l[o>>>16&15]+l[o>>>12&15]+l[o>>>8&15]+l[o>>>4&15]+l[15&o]+l[i>>>28&15]+l[i>>>24&15]+l[i>>>20&15]+l[i>>>16&15]+l[i>>>12&15]+l[i>>>8&15]+l[i>>>4&15]+l[15&i]+l[a>>>28&15]+l[a>>>24&15]+l[a>>>20&15]+l[a>>>16&15]+l[a>>>12&15]+l[a>>>8&15]+l[a>>>4&15]+l[15&a];return this.is224||(u+=l[s>>>28&15]+l[s>>>24&15]+l[s>>>20&15]+l[s>>>16&15]+l[s>>>12&15]+l[s>>>8&15]+l[s>>>4&15]+l[15&s]),u},w.prototype.toString=w.prototype.hex,w.prototype.digest=function(){this.finalize();var e=this.h0,t=this.h1,n=this.h2,r=this.h3,o=this.h4,i=this.h5,a=this.h6,s=this.h7,u=[e>>>24&255,e>>>16&255,e>>>8&255,255&e,t>>>24&255,t>>>16&255,t>>>8&255,255&t,n>>>24&255,n>>>16&255,n>>>8&255,255&n,r>>>24&255,r>>>16&255,r>>>8&255,255&r,o>>>24&255,o>>>16&255,o>>>8&255,255&o,i>>>24&255,i>>>16&255,i>>>8&255,255&i,a>>>24&255,a>>>16&255,a>>>8&255,255&a];return this.is224||u.push(s>>>24&255,s>>>16&255,s>>>8&255,255&s),u},w.prototype.array=w.prototype.digest,w.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},S.prototype=new w,S.prototype.finalize=function(){if(w.prototype.finalize.call(this),this.inner){this.inner=!1;var e=this.array();w.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(e),w.prototype.finalize.call(this)}};var k=v();k.sha256=k,k.sha224=v(!0),k.sha256.hmac=_(),k.sha224.hmac=_(!0),s?e.exports=k:(o.sha256=k.sha256,o.sha224=k.sha224,u&&define(function(){return k}))}()},891:function(e,t,n){e=n.nmd(e),(function(){var r,o="Expected a function",i="__lodash_hash_undefined__",a="__lodash_placeholder__",s=1/0,u=0/0,c=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],l="[object Arguments]",f="[object Array]",p="[object Boolean]",h="[object Date]",d="[object Error]",g="[object Function]",y="[object GeneratorFunction]",v="[object Map]",b="[object Number]",m="[object Object]",_="[object Promise]",w="[object RegExp]",S="[object Set]",k="[object String]",O="[object Symbol]",E="[object WeakMap]",x="[object ArrayBuffer]",A="[object DataView]",R="[object Float32Array]",P="[object Float64Array]",C="[object Int8Array]",I="[object Int16Array]",j="[object Int32Array]",T="[object Uint8Array]",N="[object Uint8ClampedArray]",L="[object Uint16Array]",U="[object Uint32Array]",D=/\b__p \+= '';/g,M=/\b(__p \+=) '' \+/g,F=/(__e\(.*?\)|\b__t\)) \+\n'';/g,B=/&(?:amp|lt|gt|quot|#39);/g,W=/[&<>"']/g,V=RegExp(B.source),H=RegExp(W.source),q=/<%-([\s\S]+?)%>/g,z=/<%([\s\S]+?)%>/g,K=/<%=([\s\S]+?)%>/g,G=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,$=/^\w*$/,J=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Y=/[\\^$.*+?()[\]{}|]/g,X=RegExp(Y.source),Q=/^\s+/,Z=/\s/,ee=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,et=/\{\n\/\* \[wrapped with (.+)\] \*/,en=/,? & /,er=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,eo=/[()=,{}\[\]\/\s]/,ei=/\\(\\)?/g,ea=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,es=/\w*$/,eu=/^[-+]0x[0-9a-f]+$/i,ec=/^0b[01]+$/i,el=/^\[object .+?Constructor\]$/,ef=/^0o[0-7]+$/i,ep=/^(?:0|[1-9]\d*)$/,eh=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ed=/($^)/,eg=/['\n\r\u2028\u2029\\]/g,ey="\ud800-\udfff",ev="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",eb="\\u2700-\\u27bf",em="a-z\\xdf-\\xf6\\xf8-\\xff",e_="A-Z\\xc0-\\xd6\\xd8-\\xde",ew="\\ufe0e\\ufe0f",eS="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",ek="['’]",eO="["+eS+"]",eE="["+ev+"]",ex="["+em+"]",eA="[^"+ey+eS+"\\d+"+eb+em+e_+"]",eR="\ud83c[\udffb-\udfff]",eP="[^"+ey+"]",eC="(?:\ud83c[\udde6-\uddff]){2}",eI="[\ud800-\udbff][\udc00-\udfff]",ej="["+e_+"]",eT="\\u200d",eN="(?:"+ex+"|"+eA+")",eL="(?:"+ej+"|"+eA+")",eU="(?:"+ek+"(?:d|ll|m|re|s|t|ve))?",eD="(?:"+ek+"(?:D|LL|M|RE|S|T|VE))?",eM="(?:"+eE+"|"+eR+")?",eF="["+ew+"]?",eB="(?:"+eT+"(?:"+[eP,eC,eI].join("|")+")"+eF+eM+")*",eW=eF+eM+eB,eV="(?:"+["["+eb+"]",eC,eI].join("|")+")"+eW,eH="(?:"+[eP+eE+"?",eE,eC,eI,"["+ey+"]"].join("|")+")",eq=RegExp(ek,"g"),ez=RegExp(eE,"g"),eK=RegExp(eR+"(?="+eR+")|"+eH+eW,"g"),eG=RegExp([ej+"?"+ex+"+"+eU+"(?="+[eO,ej,"$"].join("|")+")",eL+"+"+eD+"(?="+[eO,ej+eN,"$"].join("|")+")",ej+"?"+eN+"+"+eU,ej+"+"+eD,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])|\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])|\\d+",eV].join("|"),"g"),e$=RegExp("["+eT+ey+ev+ew+"]"),eJ=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,eY=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],eX=-1,eQ={};eQ[R]=eQ[P]=eQ[C]=eQ[I]=eQ[j]=eQ[T]=eQ[N]=eQ[L]=eQ[U]=!0,eQ[l]=eQ[f]=eQ[x]=eQ[p]=eQ[A]=eQ[h]=eQ[d]=eQ[g]=eQ[v]=eQ[b]=eQ[m]=eQ[w]=eQ[S]=eQ[k]=eQ[E]=!1;var eZ={};eZ[l]=eZ[f]=eZ[x]=eZ[A]=eZ[p]=eZ[h]=eZ[R]=eZ[P]=eZ[C]=eZ[I]=eZ[j]=eZ[v]=eZ[b]=eZ[m]=eZ[w]=eZ[S]=eZ[k]=eZ[O]=eZ[T]=eZ[N]=eZ[L]=eZ[U]=!0,eZ[d]=eZ[g]=eZ[E]=!1;var e0={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},e1=parseFloat,e2=parseInt,e3="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,e5="object"==typeof self&&self&&self.Object===Object&&self,e8=e3||e5||Function("return this")(),e6=t&&!t.nodeType&&t,e4=e6&&e&&!e.nodeType&&e,e9=e4&&e4.exports===e6,e7=e9&&e3.process,te=function(){try{var e=e4&&e4.require&&e4.require("util").types;if(e)return e;return e7&&e7.binding&&e7.binding("util")}catch(e){}}(),tt=te&&te.isArrayBuffer,tn=te&&te.isDate,tr=te&&te.isMap,to=te&&te.isRegExp,ti=te&&te.isSet,ta=te&&te.isTypedArray;function ts(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function tu(e,t,n,r){for(var o=-1,i=null==e?0:e.length;++o<i;){var a=e[o];t(r,a,n(a),e)}return r}function tc(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function tl(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function tf(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i}function tp(e,t){return!!(null==e?0:e.length)&&tS(e,t,0)>-1}function th(e,t,n){for(var r=-1,o=null==e?0:e.length;++r<o;)if(n(t,e[r]))return!0;return!1}function td(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}function tg(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}function ty(e,t,n,r){var o=-1,i=null==e?0:e.length;for(r&&i&&(n=e[++o]);++o<i;)n=t(n,e[o],o,e);return n}function tv(e,t,n,r){var o=null==e?0:e.length;for(r&&o&&(n=e[--o]);o--;)n=t(n,e[o],o,e);return n}function tb(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var tm=tx("length");function t_(e,t,n){var r;return n(e,function(e,n,o){if(t(e,n,o))return r=n,!1}),r}function tw(e,t,n,r){for(var o=e.length,i=n+(r?1:-1);r?i--:++i<o;)if(t(e[i],i,e))return i;return -1}function tS(e,t,n){return t==t?function(e,t,n){for(var r=n-1,o=e.length;++r<o;)if(e[r]===t)return r;return -1}(e,t,n):tw(e,tO,n)}function tk(e,t,n,r){for(var o=n-1,i=e.length;++o<i;)if(r(e[o],t))return o;return -1}function tO(e){return e!=e}function tE(e,t){var n=null==e?0:e.length;return n?tP(e,t)/n:u}function tx(e){return function(t){return null==t?r:t[e]}}function tA(e){return function(t){return null==e?r:e[t]}}function tR(e,t,n,r,o){return o(e,function(e,o,i){n=r?(r=!1,e):t(n,e,o,i)}),n}function tP(e,t){for(var n,o=-1,i=e.length;++o<i;){var a=t(e[o]);r!==a&&(n=r===n?a:n+a)}return n}function tC(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function tI(e){return e?e.slice(0,tG(e)+1).replace(Q,""):e}function tj(e){return function(t){return e(t)}}function tT(e,t){return td(t,function(t){return e[t]})}function tN(e,t){return e.has(t)}function tL(e,t){for(var n=-1,r=e.length;++n<r&&tS(t,e[n],0)>-1;);return n}function tU(e,t){for(var n=e.length;n--&&tS(t,e[n],0)>-1;);return n}var tD=tA({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),tM=tA({"&":"&","<":"<",">":">",'"':""","'":"'"});function tF(e){return"\\"+e0[e]}function tB(e){return e$.test(e)}function tW(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function tV(e,t){return function(n){return e(t(n))}}function tH(e,t){for(var n=-1,r=e.length,o=0,i=[];++n<r;){var s=e[n];(s===t||s===a)&&(e[n]=a,i[o++]=n)}return i}function tq(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}function tz(e){return tB(e)?function(e){for(var t=eK.lastIndex=0;eK.test(e);)++t;return t}(e):tm(e)}function tK(e){return tB(e)?e.match(eK)||[]:e.split("")}function tG(e){for(var t=e.length;t--&&Z.test(e.charAt(t)););return t}var t$=tA({"&":"&","<":"<",">":">",""":'"',"'":"'"}),tJ=function e(t){var n,Z,ey,ev,eb=(t=null==t?e8:tJ.defaults(e8.Object(),t,tJ.pick(e8,eY))).Array,em=t.Date,e_=t.Error,ew=t.Function,eS=t.Math,ek=t.Object,eO=t.RegExp,eE=t.String,ex=t.TypeError,eA=eb.prototype,eR=ew.prototype,eP=ek.prototype,eC=t["__core-js_shared__"],eI=eR.toString,ej=eP.hasOwnProperty,eT=0,eN=(n=/[^.]+$/.exec(eC&&eC.keys&&eC.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",eL=eP.toString,eU=eI.call(ek),eD=e8._,eM=eO("^"+eI.call(ej).replace(Y,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),eF=e9?t.Buffer:r,eB=t.Symbol,eW=t.Uint8Array,eV=eF?eF.allocUnsafe:r,eH=tV(ek.getPrototypeOf,ek),eK=ek.create,e$=eP.propertyIsEnumerable,e0=eA.splice,e3=eB?eB.isConcatSpreadable:r,e5=eB?eB.iterator:r,e6=eB?eB.toStringTag:r,e4=function(){try{var e=op(ek,"defineProperty");return e({},"",{}),e}catch(e){}}(),e7=t.clearTimeout!==e8.clearTimeout&&t.clearTimeout,te=em&&em.now!==e8.Date.now&&em.now,tm=t.setTimeout!==e8.setTimeout&&t.setTimeout,tA=eS.ceil,tY=eS.floor,tX=ek.getOwnPropertySymbols,tQ=eF?eF.isBuffer:r,tZ=t.isFinite,t0=eA.join,t1=tV(ek.keys,ek),t2=eS.max,t3=eS.min,t5=em.now,t8=t.parseInt,t6=eS.random,t4=eA.reverse,t9=op(t,"DataView"),t7=op(t,"Map"),ne=op(t,"Promise"),nt=op(t,"Set"),nn=op(t,"WeakMap"),nr=op(ek,"create"),no=nn&&new nn,ni={},na=oD(t9),ns=oD(t7),nu=oD(ne),nc=oD(nt),nl=oD(nn),nf=eB?eB.prototype:r,np=nf?nf.valueOf:r,nh=nf?nf.toString:r;function nd(e){if(i$(e)&&!iD(e)&&!(e instanceof nb)){if(e instanceof nv)return e;if(ej.call(e,"__wrapped__"))return oM(e)}return new nv(e)}var ng=function(){function e(){}return function(t){if(!iG(t))return{};if(eK)return eK(t);e.prototype=t;var n=new e;return e.prototype=r,n}}();function ny(){}function nv(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=r}function nb(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=0xffffffff,this.__views__=[]}function nm(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function n_(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function nw(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function nS(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new nw;++t<n;)this.add(e[t])}function nk(e){var t=this.__data__=new n_(e);this.size=t.size}function nO(e,t){var n=iD(e),r=!n&&iU(e),o=!n&&!r&&iW(e),i=!n&&!r&&!o&&i2(e),a=n||r||o||i,s=a?tC(e.length,eE):[],u=s.length;for(var c in e)(t||ej.call(e,c))&&!(a&&("length"==c||o&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||om(c,u)))&&s.push(c);return s}function nE(e){var t=e.length;return t?e[rc(0,t-1)]:r}nd.templateSettings={escape:q,evaluate:z,interpolate:K,variable:"",imports:{_:nd}},nd.prototype=ny.prototype,nd.prototype.constructor=nd,nv.prototype=ng(ny.prototype),nv.prototype.constructor=nv,nb.prototype=ng(ny.prototype),nb.prototype.constructor=nb,nm.prototype.clear=function(){this.__data__=nr?nr(null):{},this.size=0},nm.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=!!t,t},nm.prototype.get=function(e){var t=this.__data__;if(nr){var n=t[e];return n===i?r:n}return ej.call(t,e)?t[e]:r},nm.prototype.has=function(e){var t=this.__data__;return nr?t[e]!==r:ej.call(t,e)},nm.prototype.set=function(e,t){var n=this.__data__;return this.size+=+!this.has(e),n[e]=nr&&r===t?i:t,this},n_.prototype.clear=function(){this.__data__=[],this.size=0},n_.prototype.delete=function(e){var t=this.__data__,n=nR(t,e);return!(n<0)&&(n==t.length-1?t.pop():e0.call(t,n,1),--this.size,!0)},n_.prototype.get=function(e){var t=this.__data__,n=nR(t,e);return n<0?r:t[n][1]},n_.prototype.has=function(e){return nR(this.__data__,e)>-1},n_.prototype.set=function(e,t){var n=this.__data__,r=nR(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},nw.prototype.clear=function(){this.size=0,this.__data__={hash:new nm,map:new(t7||n_),string:new nm}},nw.prototype.delete=function(e){var t=ol(this,e).delete(e);return this.size-=!!t,t},nw.prototype.get=function(e){return ol(this,e).get(e)},nw.prototype.has=function(e){return ol(this,e).has(e)},nw.prototype.set=function(e,t){var n=ol(this,e),r=n.size;return n.set(e,t),this.size+=+(n.size!=r),this},nS.prototype.add=nS.prototype.push=function(e){return this.__data__.set(e,i),this},nS.prototype.has=function(e){return this.__data__.has(e)};function nx(e,t,n){(r===n||iT(e[t],n))&&(r!==n||t in e)||nI(e,t,n)}function nA(e,t,n){var o=e[t];ej.call(e,t)&&iT(o,n)&&(r!==n||t in e)||nI(e,t,n)}function nR(e,t){for(var n=e.length;n--;)if(iT(e[n][0],t))return n;return -1}function nP(e,t,n,r){return nM(e,function(e,o,i){t(r,e,n(e),i)}),r}function nC(e,t){return e&&rW(t,ad(t),e)}function nI(e,t,n){"__proto__"==t&&e4?e4(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function nj(e,t){for(var n=-1,o=t.length,i=eb(o),a=null==e;++n<o;)i[n]=a?r:ac(e,t[n]);return i}function nT(e,t,n){return e==e&&(r!==n&&(e=e<=n?e:n),r!==t&&(e=e>=t?e:t)),e}function nN(e,t,n,o,i,a){var s,u=1&t,c=2&t,f=4&t;if(n&&(s=i?n(e,o,i,a):n(e)),r!==s)return s;if(!iG(e))return e;var d=iD(e);if(d){if(E=(_=e).length,D=new _.constructor(E),E&&"string"==typeof _[0]&&ej.call(_,"index")&&(D.index=_.index,D.input=_.input),s=D,!u)return rB(e,s)}else{var _,E,D,M,F,B,W,V,H=og(e),q=H==g||H==y;if(iW(e))return rN(e,u);if(H==m||H==l||q&&!i){if(s=c||q?{}:ov(e),!u){return c?(M=e,F=(V=s)&&rW(e,ag(e),V),rW(M,od(M),F)):(B=e,W=nC(s,e),rW(B,oh(B),W))}}else{if(!eZ[H])return i?e:{};s=function(e,t,n){var r,o,i=e.constructor;switch(t){case x:return rL(e);case p:case h:return new i(+e);case A:return r=n?rL(e.buffer):e.buffer,new e.constructor(r,e.byteOffset,e.byteLength);case R:case P:case C:case I:case j:case T:case N:case L:case U:return rU(e,n);case v:return new i;case b:case k:return new i(e);case w:return(o=new e.constructor(e.source,es.exec(e))).lastIndex=e.lastIndex,o;case S:return new i;case O:return np?ek(np.call(e)):{}}}(e,H,u)}}a||(a=new nk);var z=a.get(e);if(z)return z;a.set(e,s),iZ(e)?e.forEach(function(r){s.add(nN(r,t,n,r,e,a))}):iJ(e)&&e.forEach(function(r,o){s.set(o,nN(r,t,n,o,e,a))});var K=f?c?oi:oo:c?ag:ad,G=d?r:K(e);return tc(G||e,function(r,o){G&&(r=e[o=r]),nA(s,o,nN(r,t,n,o,e,a))}),s}function nL(e,t,n){var o=n.length;if(null==e)return!o;for(e=ek(e);o--;){var i=n[o],a=t[i],s=e[i];if(r===s&&!(i in e)||!a(s))return!1}return!0}function nU(e,t,n){if("function"!=typeof e)throw new ex(o);return oC(function(){e.apply(r,n)},t)}function nD(e,t,n,r){var o=-1,i=tp,a=!0,s=e.length,u=[],c=t.length;if(!s)return u;n&&(t=td(t,tj(n))),r?(i=th,a=!1):t.length>=200&&(i=tN,a=!1,t=new nS(t));e:for(;++o<s;){var l=e[o],f=null==n?l:n(l);if(l=r||0!==l?l:0,a&&f==f){for(var p=c;p--;)if(t[p]===f)continue e;u.push(l)}else i(t,f,r)||u.push(l)}return u}nk.prototype.clear=function(){this.__data__=new n_,this.size=0},nk.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},nk.prototype.get=function(e){return this.__data__.get(e)},nk.prototype.has=function(e){return this.__data__.has(e)},nk.prototype.set=function(e,t){var n=this.__data__;if(n instanceof n_){var r=n.__data__;if(!t7||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new nw(r)}return n.set(e,t),this.size=n.size,this};var nM=rq(nK),nF=rq(nG,!0);function nB(e,t){var n=!0;return nM(e,function(e,r,o){return n=!!t(e,r,o)}),n}function nW(e,t,n){for(var o=-1,i=e.length;++o<i;){var a=e[o],s=t(a);if(null!=s&&(r===u?s==s&&!i1(s):n(s,u)))var u=s,c=a}return c}function nV(e,t){var n=[];return nM(e,function(e,r,o){t(e,r,o)&&n.push(e)}),n}function nH(e,t,n,r,o){var i=-1,a=e.length;for(n||(n=ob),o||(o=[]);++i<a;){var s=e[i];t>0&&n(s)?t>1?nH(s,t-1,n,r,o):tg(o,s):r||(o[o.length]=s)}return o}var nq=rz(),nz=rz(!0);function nK(e,t){return e&&nq(e,t,ad)}function nG(e,t){return e&&nz(e,t,ad)}function n$(e,t){return tf(t,function(t){return iq(e[t])})}function nJ(e,t){t=rI(t,e);for(var n=0,o=t.length;null!=e&&n<o;)e=e[oU(t[n++])];return n&&n==o?e:r}function nY(e,t,n){var r=t(e);return iD(e)?r:tg(r,n(e))}function nX(e){var t;return null==e?r===e?"[object Undefined]":"[object Null]":e6&&e6 in ek(e)?function(e){var t=ej.call(e,e6),n=e[e6];try{e[e6]=r;var o=!0}catch(e){}var i=eL.call(e);return o&&(t?e[e6]=n:delete e[e6]),i}(e):(t=e,eL.call(t))}function nQ(e,t){return e>t}function nZ(e,t){return null!=e&&ej.call(e,t)}function n0(e,t){return null!=e&&t in ek(e)}function n1(e,t,n){for(var o=n?th:tp,i=e[0].length,a=e.length,s=a,u=eb(a),c=1/0,l=[];s--;){var f=e[s];s&&t&&(f=td(f,tj(t))),c=t3(f.length,c),u[s]=!n&&(t||i>=120&&f.length>=120)?new nS(s&&f):r}f=e[0];var p=-1,h=u[0];e:for(;++p<i&&l.length<c;){var d=f[p],g=t?t(d):d;if(d=n||0!==d?d:0,!(h?tN(h,g):o(l,g,n))){for(s=a;--s;){var y=u[s];if(!(y?tN(y,g):o(e[s],g,n)))continue e}h&&h.push(g),l.push(d)}}return l}function n2(e,t,n){t=rI(t,e);var o=null==(e=oA(e,t))?e:e[oU(oJ(t))];return null==o?r:ts(o,e,n)}function n3(e){return i$(e)&&nX(e)==l}function n5(e,t,n,o,i){return e===t||(null!=e&&null!=t&&(i$(e)||i$(t))?function(e,t,n,o,i,a){var s=iD(e),u=iD(t),c=s?f:og(e),g=u?f:og(t);c=c==l?m:c,g=g==l?m:g;var y=c==m,_=g==m,E=c==g;if(E&&iW(e)){if(!iW(t))return!1;s=!0,y=!1}if(E&&!y)return a||(a=new nk),s||i2(e)?on(e,t,n,o,i,a):function(e,t,n,r,o,i,a){switch(n){case A:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)break;e=e.buffer,t=t.buffer;case x:if(e.byteLength!=t.byteLength||!i(new eW(e),new eW(t)))break;return!0;case p:case h:case b:return iT(+e,+t);case d:return e.name==t.name&&e.message==t.message;case w:case k:return e==t+"";case v:var s=tW;case S:var u=1&r;if(s||(s=tq),e.size!=t.size&&!u)break;var c=a.get(e);if(c)return c==t;r|=2,a.set(e,t);var l=on(s(e),s(t),r,o,i,a);return a.delete(e),l;case O:if(np)return np.call(e)==np.call(t)}return!1}(e,t,c,n,o,i,a);if(!(1&n)){var R=y&&ej.call(e,"__wrapped__"),P=_&&ej.call(t,"__wrapped__");if(R||P){var C=R?e.value():e,I=P?t.value():t;return a||(a=new nk),i(C,I,n,o,a)}}return!!E&&(a||(a=new nk),function(e,t,n,o,i,a){var s=1&n,u=oo(e),c=u.length;if(c!=oo(t).length&&!s)return!1;for(var l=c;l--;){var f=u[l];if(!(s?f in t:ej.call(t,f)))return!1}var p=a.get(e),h=a.get(t);if(p&&h)return p==t&&h==e;var d=!0;a.set(e,t),a.set(t,e);for(var g=s;++l<c;){var y=e[f=u[l]],v=t[f];if(o)var b=s?o(v,y,f,t,e,a):o(y,v,f,e,t,a);if(!(r===b?y===v||i(y,v,n,o,a):b)){d=!1;break}g||(g="constructor"==f)}if(d&&!g){var m=e.constructor,_=t.constructor;m!=_&&"constructor"in e&&"constructor"in t&&!("function"==typeof m&&m instanceof m&&"function"==typeof _&&_ instanceof _)&&(d=!1)}return a.delete(e),a.delete(t),d}(e,t,n,o,i,a))}(e,t,n,o,n5,i):e!=e&&t!=t)}function n8(e,t,n,o){var i=n.length,a=i,s=!o;if(null==e)return!a;for(e=ek(e);i--;){var u=n[i];if(s&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++i<a;){var c=(u=n[i])[0],l=e[c],f=u[1];if(s&&u[2]){if(r===l&&!(c in e))return!1}else{var p=new nk;if(o)var h=o(l,f,c,e,t,p);if(!(r===h?n5(f,l,3,o,p):h))return!1}}return!0}function n6(e){var t;return!(!iG(e)||(t=e,eN&&eN in t))&&(iq(e)?eM:el).test(oD(e))}function n4(e){return"function"==typeof e?e:null==e?aB:"object"==typeof e?iD(e)?rn(e[0],e[1]):rt(e):aJ(e)}function n9(e){if(!oO(e))return t1(e);var t=[];for(var n in ek(e))ej.call(e,n)&&"constructor"!=n&&t.push(n);return t}function n7(e,t){return e<t}function re(e,t){var n=-1,r=iF(e)?eb(e.length):[];return nM(e,function(e,o,i){r[++n]=t(e,o,i)}),r}function rt(e){var t=of(e);return 1==t.length&&t[0][2]?oE(t[0][0],t[0][1]):function(n){return n===e||n8(n,e,t)}}function rn(e,t){var n;return ow(e)&&(n=t)==n&&!iG(n)?oE(oU(e),t):function(n){var o=ac(n,e);return r===o&&o===t?al(n,e):n5(t,o,3)}}function rr(e,t,n,o,i){e!==t&&nq(t,function(a,s){if(i||(i=new nk),iG(a))!function(e,t,n,o,i,a,s){var u=oR(e,n),c=oR(t,n),l=s.get(c);if(l)return nx(e,n,l);var f=a?a(u,c,n+"",e,t,s):r,p=r===f;if(p){var h=iD(c),d=!h&&iW(c),g=!h&&!d&&i2(c);f=c,h||d||g?iD(u)?f=u:iB(u)?f=rB(u):d?(p=!1,f=rN(c,!0)):g?(p=!1,f=rU(c,!0)):f=[]:iX(c)||iU(c)?(f=u,iU(u)?f=ae(u):(!iG(u)||iq(u))&&(f=ov(c))):p=!1}p&&(s.set(c,f),i(f,c,o,a,s),s.delete(c)),nx(e,n,f)}(e,t,s,n,rr,o,i);else{var u=o?o(oR(e,s),a,s+"",e,t,i):r;r===u&&(u=a),nx(e,s,u)}},ag)}function ro(e,t){var n=e.length;if(n)return om(t+=t<0?n:0,n)?e[t]:r}function ri(e,t,n){t=t.length?td(t,function(e){return iD(e)?function(t){return nJ(t,1===e.length?e[0]:e)}:e}):[aB];var r=-1;t=td(t,tj(oc()));var o=re(e,function(e,n,o){return{criteria:td(t,function(t){return t(e)}),index:++r,value:e}}),i=o.length;for(o.sort(function(e,t){return function(e,t,n){for(var r=-1,o=e.criteria,i=t.criteria,a=o.length,s=n.length;++r<a;){var u=rD(o[r],i[r]);if(u){if(r>=s)return u;return u*("desc"==n[r]?-1:1)}}return e.index-t.index}(e,t,n)});i--;)o[i]=o[i].value;return o}function ra(e,t,n){for(var r=-1,o=t.length,i={};++r<o;){var a=t[r],s=nJ(e,a);n(s,a)&&rp(i,rI(a,e),s)}return i}function rs(e,t,n,r){var o=r?tk:tS,i=-1,a=t.length,s=e;for(e===t&&(t=rB(t)),n&&(s=td(e,tj(n)));++i<a;)for(var u=0,c=t[i],l=n?n(c):c;(u=o(s,l,u,r))>-1;)s!==e&&e0.call(s,u,1),e0.call(e,u,1);return e}function ru(e,t){for(var n=e?t.length:0,r=n-1;n--;){var o=t[n];if(n==r||o!==i){var i=o;om(o)?e0.call(e,o,1):rk(e,o)}}return e}function rc(e,t){return e+tY(t6()*(t-e+1))}function rl(e,t){var n="";if(!e||t<1||t>0x1fffffffffffff)return n;do t%2&&(n+=e),(t=tY(t/2))&&(e+=e);while(t);return n}function rf(e,t){return oI(ox(e,t,aB),e+"")}function rp(e,t,n,o){if(!iG(e))return e;t=rI(t,e);for(var i=-1,a=t.length,s=a-1,u=e;null!=u&&++i<a;){var c=oU(t[i]),l=n;if("__proto__"===c||"constructor"===c||"prototype"===c)break;if(i!=s){var f=u[c];l=o?o(f,c,u):r,r===l&&(l=iG(f)?f:om(t[i+1])?[]:{})}nA(u,c,l),u=u[c]}return e}var rh=no?function(e,t){return no.set(e,t),e}:aB,rd=e4?function(e,t){return e4(e,"toString",{configurable:!0,enumerable:!1,value:aD(t),writable:!0})}:aB;function rg(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var i=eb(o);++r<o;)i[r]=e[r+t];return i}function ry(e,t){var n;return nM(e,function(e,r,o){return!(n=t(e,r,o))}),!!n}function rv(e,t,n){var r=0,o=null==e?r:e.length;if("number"==typeof t&&t==t&&o<=0x7fffffff){for(;r<o;){var i=r+o>>>1,a=e[i];null!==a&&!i1(a)&&(n?a<=t:a<t)?r=i+1:o=i}return o}return rb(e,t,aB,n)}function rb(e,t,n,o){var i=0,a=null==e?0:e.length;if(0===a)return 0;for(var s=(t=n(t))!=t,u=null===t,c=i1(t),l=r===t;i<a;){var f=tY((i+a)/2),p=n(e[f]),h=r!==p,d=null===p,g=p==p,y=i1(p);if(s)var v=o||g;else v=l?g&&(o||h):u?g&&h&&(o||!d):c?g&&h&&!d&&(o||!y):!d&&!y&&(o?p<=t:p<t);v?i=f+1:a=f}return t3(a,0xfffffffe)}function rm(e,t){for(var n=-1,r=e.length,o=0,i=[];++n<r;){var a=e[n],s=t?t(a):a;if(!n||!iT(s,u)){var u=s;i[o++]=0===a?0:a}}return i}function r_(e){return"number"==typeof e?e:i1(e)?u:+e}function rw(e){if("string"==typeof e)return e;if(iD(e))return td(e,rw)+"";if(i1(e))return nh?nh.call(e):"";var t=e+"";return"0"==t&&1/e==-s?"-0":t}function rS(e,t,n){var r=-1,o=tp,i=e.length,a=!0,s=[],u=s;if(n)a=!1,o=th;else if(i>=200){var c=t?null:r6(e);if(c)return tq(c);a=!1,o=tN,u=new nS}else u=t?[]:s;e:for(;++r<i;){var l=e[r],f=t?t(l):l;if(l=n||0!==l?l:0,a&&f==f){for(var p=u.length;p--;)if(u[p]===f)continue e;t&&u.push(f),s.push(l)}else o(u,f,n)||(u!==s&&u.push(f),s.push(l))}return s}function rk(e,t){return t=rI(t,e),null==(e=oA(e,t))||delete e[oU(oJ(t))]}function rO(e,t,n,r){return rp(e,t,n(nJ(e,t)),r)}function rE(e,t,n,r){for(var o=e.length,i=r?o:-1;(r?i--:++i<o)&&t(e[i],i,e););return n?rg(e,r?0:i,r?i+1:o):rg(e,r?i+1:0,r?o:i)}function rx(e,t){var n=e;return n instanceof nb&&(n=n.value()),ty(t,function(e,t){return t.func.apply(t.thisArg,tg([e],t.args))},n)}function rA(e,t,n){var r=e.length;if(r<2)return r?rS(e[0]):[];for(var o=-1,i=eb(r);++o<r;)for(var a=e[o],s=-1;++s<r;)s!=o&&(i[o]=nD(i[o]||a,e[s],t,n));return rS(nH(i,1),t,n)}function rR(e,t,n){for(var o=-1,i=e.length,a=t.length,s={};++o<i;){var u=o<a?t[o]:r;n(s,e[o],u)}return s}function rP(e){return iB(e)?e:[]}function rC(e){return"function"==typeof e?e:aB}function rI(e,t){return iD(e)?e:ow(e,t)?[e]:oL(at(e))}function rj(e,t,n){var o=e.length;return n=r===n?o:n,!t&&n>=o?e:rg(e,t,n)}var rT=e7||function(e){return e8.clearTimeout(e)};function rN(e,t){if(t)return e.slice();var n=e.length,r=eV?eV(n):new e.constructor(n);return e.copy(r),r}function rL(e){var t=new e.constructor(e.byteLength);return new eW(t).set(new eW(e)),t}function rU(e,t){var n=t?rL(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function rD(e,t){if(e!==t){var n=r!==e,o=null===e,i=e==e,a=i1(e),s=r!==t,u=null===t,c=t==t,l=i1(t);if(!u&&!l&&!a&&e>t||a&&s&&c&&!u&&!l||o&&s&&c||!n&&c||!i)return 1;if(!o&&!a&&!l&&e<t||l&&n&&i&&!o&&!a||u&&n&&i||!s&&i||!c)return -1}return 0}function rM(e,t,n,r){for(var o=-1,i=e.length,a=n.length,s=-1,u=t.length,c=t2(i-a,0),l=eb(u+c),f=!r;++s<u;)l[s]=t[s];for(;++o<a;)(f||o<i)&&(l[n[o]]=e[o]);for(;c--;)l[s++]=e[o++];return l}function rF(e,t,n,r){for(var o=-1,i=e.length,a=-1,s=n.length,u=-1,c=t.length,l=t2(i-s,0),f=eb(l+c),p=!r;++o<l;)f[o]=e[o];for(var h=o;++u<c;)f[h+u]=t[u];for(;++a<s;)(p||o<i)&&(f[h+n[a]]=e[o++]);return f}function rB(e,t){var n=-1,r=e.length;for(t||(t=eb(r));++n<r;)t[n]=e[n];return t}function rW(e,t,n,o){var i=!n;n||(n={});for(var a=-1,s=t.length;++a<s;){var u=t[a],c=o?o(n[u],e[u],u,n,e):r;r===c&&(c=e[u]),i?nI(n,u,c):nA(n,u,c)}return n}function rV(e,t){return function(n,r){var o=iD(n)?tu:nP,i=t?t():{};return o(n,e,oc(r,2),i)}}function rH(e){return rf(function(t,n){var o=-1,i=n.length,a=i>1?n[i-1]:r,s=i>2?n[2]:r;for(a=e.length>3&&"function"==typeof a?(i--,a):r,s&&o_(n[0],n[1],s)&&(a=i<3?r:a,i=1),t=ek(t);++o<i;){var u=n[o];u&&e(t,u,o,a)}return t})}function rq(e,t){return function(n,r){if(null==n)return n;if(!iF(n))return e(n,r);for(var o=n.length,i=t?o:-1,a=ek(n);(t?i--:++i<o)&&!1!==r(a[i],i,a););return n}}function rz(e){return function(t,n,r){for(var o=-1,i=ek(t),a=r(t),s=a.length;s--;){var u=a[e?s:++o];if(!1===n(i[u],u,i))break}return t}}function rK(e){return function(t){var n=tB(t=at(t))?tK(t):r,o=n?n[0]:t.charAt(0),i=n?rj(n,1).join(""):t.slice(1);return o[e]()+i}}function rG(e){return function(t){return ty(aN(ax(t).replace(eq,"")),e,"")}}function r$(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=ng(e.prototype),r=e.apply(n,t);return iG(r)?r:n}}function rJ(e){return function(t,n,o){var i=ek(t);if(!iF(t)){var a=oc(n,3);t=ad(t),n=function(e){return a(i[e],e,i)}}var s=e(t,n,o);return s>-1?i[a?t[s]:s]:r}}function rY(e){return or(function(t){var n=t.length,i=n,a=nv.prototype.thru;for(e&&t.reverse();i--;){var s=t[i];if("function"!=typeof s)throw new ex(o);if(a&&!u&&"wrapper"==os(s))var u=new nv([],!0)}for(i=u?i:n;++i<n;){var c=os(s=t[i]),l="wrapper"==c?oa(s):r;u=l&&oS(l[0])&&424==l[1]&&!l[4].length&&1==l[9]?u[os(l[0])].apply(u,l[3]):1==s.length&&oS(s)?u[c]():u.thru(s)}return function(){var e=arguments,r=e[0];if(u&&1==e.length&&iD(r))return u.plant(r).value();for(var o=0,i=n?t[o].apply(this,e):r;++o<n;)i=t[o].call(this,i);return i}})}function rX(e,t,n,o,i,a,s,u,c,l){var f=128&t,p=1&t,h=2&t,d=24&t,g=512&t,y=h?r:r$(e);function v(){for(var b=arguments.length,m=eb(b),_=b;_--;)m[_]=arguments[_];if(d)var w=ou(v),S=function(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}(m,w);if(o&&(m=rM(m,o,i,d)),a&&(m=rF(m,a,s,d)),b-=S,d&&b<l){var k=tH(m,w);return r5(e,t,rX,v.placeholder,n,m,k,u,c,l-b)}var O=p?n:this,E=h?O[e]:e;return b=m.length,u?m=function(e,t){for(var n=e.length,o=t3(t.length,n),i=rB(e);o--;){var a=t[o];e[o]=om(a,n)?i[a]:r}return e}(m,u):g&&b>1&&m.reverse(),f&&c<b&&(m.length=c),this&&this!==e8&&this instanceof v&&(E=y||r$(E)),E.apply(O,m)}return v}function rQ(e,t){return function(n,r){var o,i;return o=t(r),i={},nK(n,function(t,n,r){e(i,o(t),n,r)}),i}}function rZ(e,t){return function(n,o){var i;if(r===n&&r===o)return t;if(r!==n&&(i=n),r!==o){if(r===i)return o;"string"==typeof n||"string"==typeof o?(n=rw(n),o=rw(o)):(n=r_(n),o=r_(o)),i=e(n,o)}return i}}function r0(e){return or(function(t){return t=td(t,tj(oc())),rf(function(n){var r=this;return e(t,function(e){return ts(e,r,n)})})})}function r1(e,t){var n=(t=r===t?" ":rw(t)).length;if(n<2)return n?rl(t,e):t;var o=rl(t,tA(e/tz(t)));return tB(t)?rj(tK(o),0,e).join(""):o.slice(0,e)}function r2(e){return function(t,n,o){o&&"number"!=typeof o&&o_(t,n,o)&&(n=o=r),t=i6(t),r===n?(n=t,t=0):n=i6(n),o=r===o?t<n?1:-1:i6(o);for(var i=t,a=n,s=o,u=-1,c=t2(tA((a-i)/(s||1)),0),l=eb(c);c--;)l[e?c:++u]=i,i+=s;return l}}function r3(e){return function(t,n){return("string"!=typeof t||"string"!=typeof n)&&(t=i7(t),n=i7(n)),e(t,n)}}function r5(e,t,n,o,i,a,s,u,c,l){var f=8&t,p=f?s:r,h=f?r:s,d=f?a:r,g=f?r:a;t|=f?32:64,4&(t&=~(f?64:32))||(t&=-4);var y=[e,t,i,d,p,g,h,u,c,l],v=n.apply(r,y);return oS(e)&&oP(v,y),v.placeholder=o,oj(v,e,t)}function r8(e){var t=eS[e];return function(e,n){if(e=i7(e),(n=null==n?0:t3(i4(n),292))&&tZ(e)){var r=(at(e)+"e").split("e");return+((r=(at(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(r[1]-n))}return t(e)}}var r6=nt&&1/tq(new nt([,-0]))[1]==s?function(e){return new nt(e)}:az;function r4(e){return function(t){var n,r,o=og(t);return o==v?tW(t):o==S?(n=-1,r=Array(t.size),t.forEach(function(e){r[++n]=[e,e]}),r):td(e(t),function(e){return[e,t[e]]})}}function r9(e,t,n,i,s,u,c,l){var f=2&t;if(!f&&"function"!=typeof e)throw new ex(o);var p=i?i.length:0;if(p||(t&=-97,i=s=r),c=r===c?c:t2(i4(c),0),l=r===l?l:i4(l),p-=s?s.length:0,64&t){var h=i,d=s;i=s=r}var g=f?r:oa(e),y=[e,t,n,i,s,h,d,u,c,l];if(g&&function(e,t){var n=e[1],r=t[1],o=n|r,i=o<131,s=128==r&&8==n||128==r&&256==n&&e[7].length<=t[8]||384==r&&t[7].length<=t[8]&&8==n;if(i||s){1&r&&(e[2]=t[2],o|=1&n?0:4);var u=t[3];if(u){var c=e[3];e[3]=c?rM(c,u,t[4]):u,e[4]=c?tH(e[3],a):t[4]}(u=t[5])&&(c=e[5],e[5]=c?rF(c,u,t[6]):u,e[6]=c?tH(e[5],a):t[6]),(u=t[7])&&(e[7]=u),128&r&&(e[8]=null==e[8]?t[8]:t3(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=o}}(y,g),e=y[0],t=y[1],n=y[2],i=y[3],s=y[4],(l=y[9]=y[9]===r?f?0:e.length:t2(y[9]-p,0))||!(24&t)||(t&=-25),t&&1!=t)8==t||16==t?R=function(e,t,n){var o=r$(e);function i(){for(var a=arguments.length,s=eb(a),u=a,c=ou(i);u--;)s[u]=arguments[u];var l=a<3&&s[0]!==c&&s[a-1]!==c?[]:tH(s,c);return(a-=l.length)<n?r5(e,t,rX,i.placeholder,r,s,l,r,r,n-a):ts(this&&this!==e8&&this instanceof i?o:e,this,s)}return i}(e,t,l):32!=t&&33!=t||s.length?R=rX.apply(r,y):(v=e,b=t,m=n,_=i,w=1&b,S=r$(v),R=function e(){for(var t=-1,n=arguments.length,r=-1,o=_.length,i=eb(o+n),a=this&&this!==e8&&this instanceof e?S:v;++r<o;)i[r]=_[r];for(;n--;)i[r++]=arguments[++t];return ts(a,w?m:this,i)});else var v,b,m,_,w,S,k,O,E,x,A,R=(k=e,O=t,E=n,x=1&O,A=r$(k),function e(){return(this&&this!==e8&&this instanceof e?A:k).apply(x?E:this,arguments)});return oj((g?rh:oP)(R,y),e,t)}function r7(e,t,n,o){return r===e||iT(e,eP[n])&&!ej.call(o,n)?t:e}function oe(e,t,n,o,i,a){return iG(e)&&iG(t)&&(a.set(t,e),rr(e,t,r,oe,a),a.delete(t)),e}function ot(e){return iX(e)?r:e}function on(e,t,n,o,i,a){var s=1&n,u=e.length,c=t.length;if(u!=c&&!(s&&c>u))return!1;var l=a.get(e),f=a.get(t);if(l&&f)return l==t&&f==e;var p=-1,h=!0,d=2&n?new nS:r;for(a.set(e,t),a.set(t,e);++p<u;){var g=e[p],y=t[p];if(o)var v=s?o(y,g,p,t,e,a):o(g,y,p,e,t,a);if(r!==v){if(v)continue;h=!1;break}if(d){if(!tb(t,function(e,t){if(!tN(d,t)&&(g===e||i(g,e,n,o,a)))return d.push(t)})){h=!1;break}}else if(!(g===y||i(g,y,n,o,a))){h=!1;break}}return a.delete(e),a.delete(t),h}function or(e){return oI(ox(e,r,oq),e+"")}function oo(e){return nY(e,ad,oh)}function oi(e){return nY(e,ag,od)}var oa=no?function(e){return no.get(e)}:az;function os(e){for(var t=e.name+"",n=ni[t],r=ej.call(ni,t)?n.length:0;r--;){var o=n[r],i=o.func;if(null==i||i==e)return o.name}return t}function ou(e){return(ej.call(nd,"placeholder")?nd:e).placeholder}function oc(){var e=nd.iteratee||aW;return e=e===aW?n4:e,arguments.length?e(arguments[0],arguments[1]):e}function ol(e,t){var n,r,o=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof t?"string":"hash"]:o.map}function of(e){for(var t=ad(e),n=t.length;n--;){var r,o=t[n],i=e[o];t[n]=[o,i,(r=i)==r&&!iG(r)]}return t}function op(e,t){var n=null==e?r:e[t];return n6(n)?n:r}var oh=tX?function(e){return null==e?[]:tf(tX(e=ek(e)),function(t){return e$.call(e,t)})}:aQ,od=tX?function(e){for(var t=[];e;)tg(t,oh(e)),e=eH(e);return t}:aQ,og=nX;function oy(e,t,n){t=rI(t,e);for(var r=-1,o=t.length,i=!1;++r<o;){var a=oU(t[r]);if(!(i=null!=e&&n(e,a)))break;e=e[a]}return i||++r!=o?i:!!(o=null==e?0:e.length)&&iK(o)&&om(a,o)&&(iD(e)||iU(e))}function ov(e){return"function"!=typeof e.constructor||oO(e)?{}:ng(eH(e))}function ob(e){return iD(e)||iU(e)||!!(e3&&e&&e[e3])}function om(e,t){var n=typeof e;return!!(t=null==t?0x1fffffffffffff:t)&&("number"==n||"symbol"!=n&&ep.test(e))&&e>-1&&e%1==0&&e<t}function o_(e,t,n){if(!iG(n))return!1;var r=typeof t;return("number"==r?!!(iF(n)&&om(t,n.length)):"string"==r&&t in n)&&iT(n[t],e)}function ow(e,t){if(iD(e))return!1;var n=typeof e;return!!("number"==n||"symbol"==n||"boolean"==n||null==e||i1(e))||$.test(e)||!G.test(e)||null!=t&&e in ek(t)}function oS(e){var t=os(e),n=nd[t];if("function"!=typeof n||!(t in nb.prototype))return!1;if(e===n)return!0;var r=oa(n);return!!r&&e===r[0]}(t9&&og(new t9(new ArrayBuffer(1)))!=A||t7&&og(new t7)!=v||ne&&og(ne.resolve())!=_||nt&&og(new nt)!=S||nn&&og(new nn)!=E)&&(og=function(e){var t=nX(e),n=t==m?e.constructor:r,o=n?oD(n):"";if(o)switch(o){case na:return A;case ns:return v;case nu:return _;case nc:return S;case nl:return E}return t});var ok=eC?iq:aZ;function oO(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||eP)}function oE(e,t){return function(n){return null!=n&&n[e]===t&&(r!==t||e in ek(n))}}function ox(e,t,n){return t=t2(r===t?e.length-1:t,0),function(){for(var r=arguments,o=-1,i=t2(r.length-t,0),a=eb(i);++o<i;)a[o]=r[t+o];o=-1;for(var s=eb(t+1);++o<t;)s[o]=r[o];return s[t]=n(a),ts(e,this,s)}}function oA(e,t){return t.length<2?e:nJ(e,rg(t,0,-1))}function oR(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var oP=oT(rh),oC=tm||function(e,t){return e8.setTimeout(e,t)},oI=oT(rd);function oj(e,t,n){var r,o,i,a=t+"";return oI(e,function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(ee,"{\n/* [wrapped with "+t+"] */\n")}(a,(r=(i=a.match(et))?i[1].split(en):[],o=n,tc(c,function(e){var t="_."+e[0];o&e[1]&&!tp(r,t)&&r.push(t)}),r.sort())))}function oT(e){var t=0,n=0;return function(){var o=t5(),i=16-(o-n);if(n=o,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(r,arguments)}}function oN(e,t){var n=-1,o=e.length,i=o-1;for(t=r===t?o:t;++n<t;){var a=rc(n,i),s=e[a];e[a]=e[n],e[n]=s}return e.length=t,e}var oL=(ey=(Z=iA(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(J,function(e,n,r,o){t.push(r?o.replace(ei,"$1"):n||e)}),t},function(e){return 500===ey.size&&ey.clear(),e})).cache,Z);function oU(e){if("string"==typeof e||i1(e))return e;var t=e+"";return"0"==t&&1/e==-s?"-0":t}function oD(e){if(null!=e){try{return eI.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function oM(e){if(e instanceof nb)return e.clone();var t=new nv(e.__wrapped__,e.__chain__);return t.__actions__=rB(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var oF=rf(function(e,t){return iB(e)?nD(e,nH(t,1,iB,!0)):[]}),oB=rf(function(e,t){var n=oJ(t);return iB(n)&&(n=r),iB(e)?nD(e,nH(t,1,iB,!0),oc(n,2)):[]}),oW=rf(function(e,t){var n=oJ(t);return iB(n)&&(n=r),iB(e)?nD(e,nH(t,1,iB,!0),r,n):[]});function oV(e,t,n){var r=null==e?0:e.length;if(!r)return -1;var o=null==n?0:i4(n);return o<0&&(o=t2(r+o,0)),tw(e,oc(t,3),o)}function oH(e,t,n){var o=null==e?0:e.length;if(!o)return -1;var i=o-1;return r!==n&&(i=i4(n),i=n<0?t2(o+i,0):t3(i,o-1)),tw(e,oc(t,3),i,!0)}function oq(e){return(null==e?0:e.length)?nH(e,1):[]}function oz(e){return e&&e.length?e[0]:r}var oK=rf(function(e){var t=td(e,rP);return t.length&&t[0]===e[0]?n1(t):[]}),oG=rf(function(e){var t=oJ(e),n=td(e,rP);return t===oJ(n)?t=r:n.pop(),n.length&&n[0]===e[0]?n1(n,oc(t,2)):[]}),o$=rf(function(e){var t=oJ(e),n=td(e,rP);return(t="function"==typeof t?t:r)&&n.pop(),n.length&&n[0]===e[0]?n1(n,r,t):[]});function oJ(e){var t=null==e?0:e.length;return t?e[t-1]:r}var oY=rf(oX);function oX(e,t){return e&&e.length&&t&&t.length?rs(e,t):e}var oQ=or(function(e,t){var n=null==e?0:e.length,r=nj(e,t);return ru(e,td(t,function(e){return om(e,n)?+e:e}).sort(rD)),r});function oZ(e){return null==e?e:t4.call(e)}var o0=rf(function(e){return rS(nH(e,1,iB,!0))}),o1=rf(function(e){var t=oJ(e);return iB(t)&&(t=r),rS(nH(e,1,iB,!0),oc(t,2))}),o2=rf(function(e){var t=oJ(e);return t="function"==typeof t?t:r,rS(nH(e,1,iB,!0),r,t)});function o3(e){if(!(e&&e.length))return[];var t=0;return e=tf(e,function(e){if(iB(e))return t=t2(e.length,t),!0}),tC(t,function(t){return td(e,tx(t))})}function o5(e,t){if(!(e&&e.length))return[];var n=o3(e);return null==t?n:td(n,function(e){return ts(t,r,e)})}var o8=rf(function(e,t){return iB(e)?nD(e,t):[]}),o6=rf(function(e){return rA(tf(e,iB))}),o4=rf(function(e){var t=oJ(e);return iB(t)&&(t=r),rA(tf(e,iB),oc(t,2))}),o9=rf(function(e){var t=oJ(e);return t="function"==typeof t?t:r,rA(tf(e,iB),r,t)}),o7=rf(o3),ie=rf(function(e){var t=e.length,n=t>1?e[t-1]:r;return n="function"==typeof n?(e.pop(),n):r,o5(e,n)});function it(e){var t=nd(e);return t.__chain__=!0,t}function ir(e,t){return t(e)}var io=or(function(e){var t=e.length,n=t?e[0]:0,o=this.__wrapped__,i=function(t){return nj(t,e)};return!(t>1)&&!this.__actions__.length&&o instanceof nb&&om(n)?((o=o.slice(n,+n+ +!!t)).__actions__.push({func:ir,args:[i],thisArg:r}),new nv(o,this.__chain__).thru(function(e){return t&&!e.length&&e.push(r),e})):this.thru(i)}),ii=rV(function(e,t,n){ej.call(e,n)?++e[n]:nI(e,n,1)}),ia=rJ(oV),is=rJ(oH);function iu(e,t){return(iD(e)?tc:nM)(e,oc(t,3))}function ic(e,t){return(iD(e)?function(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}:nF)(e,oc(t,3))}var il=rV(function(e,t,n){ej.call(e,n)?e[n].push(t):nI(e,n,[t])}),ip=rf(function(e,t,n){var r=-1,o="function"==typeof t,i=iF(e)?eb(e.length):[];return nM(e,function(e){i[++r]=o?ts(t,e,n):n2(e,t,n)}),i}),ih=rV(function(e,t,n){nI(e,n,t)});function id(e,t){return(iD(e)?td:re)(e,oc(t,3))}var ig=rV(function(e,t,n){e[+!n].push(t)},function(){return[[],[]]}),iy=rf(function(e,t){if(null==e)return[];var n=t.length;return n>1&&o_(e,t[0],t[1])?t=[]:n>2&&o_(t[0],t[1],t[2])&&(t=[t[0]]),ri(e,nH(t,1),[])}),iv=te||function(){return e8.Date.now()};function ib(e,t,n){return t=n?r:t,t=e&&null==t?e.length:t,r9(e,128,r,r,r,r,t)}function im(e,t){var n;if("function"!=typeof t)throw new ex(o);return e=i4(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=r),n}}var i_=rf(function(e,t,n){var r=1;if(n.length){var o=tH(n,ou(i_));r|=32}return r9(e,r,t,n,o)}),iw=rf(function(e,t,n){var r=3;if(n.length){var o=tH(n,ou(iw));r|=32}return r9(t,r,e,n,o)});function iS(e,t,n){t=n?r:t;var o=r9(e,8,r,r,r,r,r,t);return o.placeholder=iS.placeholder,o}function ik(e,t,n){t=n?r:t;var o=r9(e,16,r,r,r,r,r,t);return o.placeholder=ik.placeholder,o}function iO(e,t,n){var i,a,s,u,c,l,f=0,p=!1,h=!1,d=!0;if("function"!=typeof e)throw new ex(o);function g(t){var n=i,o=a;return i=a=r,f=t,u=e.apply(o,n)}function y(e){var n=e-l,o=e-f;return r===l||n>=t||n<0||h&&o>=s}function v(){var e,n,r,o=iv();if(y(o))return b(o);c=oC(v,(e=o-l,n=o-f,r=t-e,h?t3(r,s-n):r))}function b(e){return(c=r,d&&i)?g(e):(i=a=r,u)}function m(){var e,n=iv(),o=y(n);if(i=arguments,a=this,l=n,o){if(r===c)return f=e=l,c=oC(v,t),p?g(e):u;if(h)return rT(c),c=oC(v,t),g(l)}return r===c&&(c=oC(v,t)),u}return t=i7(t)||0,iG(n)&&(p=!!n.leading,s=(h="maxWait"in n)?t2(i7(n.maxWait)||0,t):s,d="trailing"in n?!!n.trailing:d),m.cancel=function(){r!==c&&rT(c),f=0,i=l=a=c=r},m.flush=function(){return r===c?u:b(iv())},m}var iE=rf(function(e,t){return nU(e,1,t)}),ix=rf(function(e,t,n){return nU(e,i7(t)||0,n)});function iA(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new ex(o);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(iA.Cache||nw),n}function iR(e){if("function"!=typeof e)throw new ex(o);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}iA.Cache=nw;var iP=rf(function(e,t){var n=(t=1==t.length&&iD(t[0])?td(t[0],tj(oc())):td(nH(t,1),tj(oc()))).length;return rf(function(r){for(var o=-1,i=t3(r.length,n);++o<i;)r[o]=t[o].call(this,r[o]);return ts(e,this,r)})}),iC=rf(function(e,t){var n=tH(t,ou(iC));return r9(e,32,r,t,n)}),iI=rf(function(e,t){var n=tH(t,ou(iI));return r9(e,64,r,t,n)}),ij=or(function(e,t){return r9(e,256,r,r,r,t)});function iT(e,t){return e===t||e!=e&&t!=t}var iN=r3(nQ),iL=r3(function(e,t){return e>=t}),iU=n3(function(){return arguments}())?n3:function(e){return i$(e)&&ej.call(e,"callee")&&!e$.call(e,"callee")},iD=eb.isArray,iM=tt?tj(tt):function(e){return i$(e)&&nX(e)==x};function iF(e){return null!=e&&iK(e.length)&&!iq(e)}function iB(e){return i$(e)&&iF(e)}var iW=tQ||aZ,iV=tn?tj(tn):function(e){return i$(e)&&nX(e)==h};function iH(e){if(!i$(e))return!1;var t=nX(e);return t==d||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!iX(e)}function iq(e){if(!iG(e))return!1;var t=nX(e);return t==g||t==y||"[object AsyncFunction]"==t||"[object Proxy]"==t}function iz(e){return"number"==typeof e&&e==i4(e)}function iK(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=0x1fffffffffffff}function iG(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function i$(e){return null!=e&&"object"==typeof e}var iJ=tr?tj(tr):function(e){return i$(e)&&og(e)==v};function iY(e){return"number"==typeof e||i$(e)&&nX(e)==b}function iX(e){if(!i$(e)||nX(e)!=m)return!1;var t=eH(e);if(null===t)return!0;var n=ej.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&eI.call(n)==eU}var iQ=to?tj(to):function(e){return i$(e)&&nX(e)==w},iZ=ti?tj(ti):function(e){return i$(e)&&og(e)==S};function i0(e){return"string"==typeof e||!iD(e)&&i$(e)&&nX(e)==k}function i1(e){return"symbol"==typeof e||i$(e)&&nX(e)==O}var i2=ta?tj(ta):function(e){return i$(e)&&iK(e.length)&&!!eQ[nX(e)]},i3=r3(n7),i5=r3(function(e,t){return e<=t});function i8(e){if(!e)return[];if(iF(e))return i0(e)?tK(e):rB(e);if(e5&&e[e5]){for(var t,n=e[e5](),r=[];!(t=n.next()).done;)r.push(t.value);return r}var o=og(e);return(o==v?tW:o==S?tq:ak)(e)}function i6(e){return e?(e=i7(e))===s||e===-s?(e<0?-1:1)*17976931348623157e292:e==e?e:0:0===e?e:0}function i4(e){var t=i6(e),n=t%1;return t==t?n?t-n:t:0}function i9(e){return e?nT(i4(e),0,0xffffffff):0}function i7(e){if("number"==typeof e)return e;if(i1(e))return u;if(iG(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=iG(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=tI(e);var n=ec.test(e);return n||ef.test(e)?e2(e.slice(2),n?2:8):eu.test(e)?u:+e}function ae(e){return rW(e,ag(e))}function at(e){return null==e?"":rw(e)}var an=rH(function(e,t){if(oO(t)||iF(t))return void rW(t,ad(t),e);for(var n in t)ej.call(t,n)&&nA(e,n,t[n])}),ar=rH(function(e,t){rW(t,ag(t),e)}),ao=rH(function(e,t,n,r){rW(t,ag(t),e,r)}),ai=rH(function(e,t,n,r){rW(t,ad(t),e,r)}),aa=or(nj),as=rf(function(e,t){e=ek(e);var n=-1,o=t.length,i=o>2?t[2]:r;for(i&&o_(t[0],t[1],i)&&(o=1);++n<o;)for(var a=t[n],s=ag(a),u=-1,c=s.length;++u<c;){var l=s[u],f=e[l];(r===f||iT(f,eP[l])&&!ej.call(e,l))&&(e[l]=a[l])}return e}),au=rf(function(e){return e.push(r,oe),ts(av,r,e)});function ac(e,t,n){var o=null==e?r:nJ(e,t);return r===o?n:o}function al(e,t){return null!=e&&oy(e,t,n0)}var af=rQ(function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=eL.call(t)),e[t]=n},aD(aB)),ap=rQ(function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=eL.call(t)),ej.call(e,t)?e[t].push(n):e[t]=[n]},oc),ah=rf(n2);function ad(e){return iF(e)?nO(e):n9(e)}function ag(e){return iF(e)?nO(e,!0):function(e){if(!iG(e)){var t=e,n=[];if(null!=t)for(var r in ek(t))n.push(r);return n}var o=oO(e),i=[];for(var a in e)"constructor"==a&&(o||!ej.call(e,a))||i.push(a);return i}(e)}var ay=rH(function(e,t,n){rr(e,t,n)}),av=rH(function(e,t,n,r){rr(e,t,n,r)}),ab=or(function(e,t){var n={};if(null==e)return n;var r=!1;t=td(t,function(t){return t=rI(t,e),r||(r=t.length>1),t}),rW(e,oi(e),n),r&&(n=nN(n,7,ot));for(var o=t.length;o--;)rk(n,t[o]);return n}),am=or(function(e,t){return null==e?{}:ra(e,t,function(t,n){return al(e,n)})});function a_(e,t){if(null==e)return{};var n=td(oi(e),function(e){return[e]});return t=oc(t),ra(e,n,function(e,n){return t(e,n[0])})}var aw=r4(ad),aS=r4(ag);function ak(e){return null==e?[]:tT(e,ad(e))}var aO=rG(function(e,t,n){return t=t.toLowerCase(),e+(n?aE(t):t)});function aE(e){return aT(at(e).toLowerCase())}function ax(e){return(e=at(e))&&e.replace(eh,tD).replace(ez,"")}var aA=rG(function(e,t,n){return e+(n?"-":"")+t.toLowerCase()}),aR=rG(function(e,t,n){return e+(n?" ":"")+t.toLowerCase()}),aP=rK("toLowerCase"),aC=rG(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}),aI=rG(function(e,t,n){return e+(n?" ":"")+aT(t)}),aj=rG(function(e,t,n){return e+(n?" ":"")+t.toUpperCase()}),aT=rK("toUpperCase");function aN(e,t,n){if(e=at(e),t=n?r:t,r===t){var o;return(o=e,eJ.test(o))?e.match(eG)||[]:e.match(er)||[]}return e.match(t)||[]}var aL=rf(function(e,t){try{return ts(e,r,t)}catch(e){return iH(e)?e:new e_(e)}}),aU=or(function(e,t){return tc(t,function(t){nI(e,t=oU(t),i_(e[t],e))}),e});function aD(e){return function(){return e}}var aM=rY(),aF=rY(!0);function aB(e){return e}function aW(e){return n4("function"==typeof e?e:nN(e,1))}var aV=rf(function(e,t){return function(n){return n2(n,e,t)}}),aH=rf(function(e,t){return function(n){return n2(e,n,t)}});function aq(e,t,n){var r=ad(t),o=n$(t,r);null!=n||iG(t)&&(o.length||!r.length)||(n=t,t=e,e=this,o=n$(t,ad(t)));var i=!(iG(n)&&"chain"in n)||!!n.chain,a=iq(e);return tc(o,function(n){var r=t[n];e[n]=r,a&&(e.prototype[n]=function(){var t=this.__chain__;if(i||t){var n=e(this.__wrapped__);return(n.__actions__=rB(this.__actions__)).push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,tg([this.value()],arguments))})}),e}function az(){}var aK=r0(td),aG=r0(tl),a$=r0(tb);function aJ(e){return ow(e)?tx(oU(e)):function(t){return nJ(t,e)}}var aY=r2(),aX=r2(!0);function aQ(){return[]}function aZ(){return!1}var a0=rZ(function(e,t){return e+t},0),a1=r8("ceil"),a2=rZ(function(e,t){return e/t},1),a3=r8("floor"),a5=rZ(function(e,t){return e*t},1),a8=r8("round"),a6=rZ(function(e,t){return e-t},0);return nd.after=function(e,t){if("function"!=typeof t)throw new ex(o);return e=i4(e),function(){if(--e<1)return t.apply(this,arguments)}},nd.ary=ib,nd.assign=an,nd.assignIn=ar,nd.assignInWith=ao,nd.assignWith=ai,nd.at=aa,nd.before=im,nd.bind=i_,nd.bindAll=aU,nd.bindKey=iw,nd.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return iD(e)?e:[e]},nd.chain=it,nd.chunk=function(e,t,n){t=(n?o_(e,t,n):r===t)?1:t2(i4(t),0);var o=null==e?0:e.length;if(!o||t<1)return[];for(var i=0,a=0,s=eb(tA(o/t));i<o;)s[a++]=rg(e,i,i+=t);return s},nd.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,o=[];++t<n;){var i=e[t];i&&(o[r++]=i)}return o},nd.concat=function(){var e=arguments.length;if(!e)return[];for(var t=eb(e-1),n=arguments[0],r=e;r--;)t[r-1]=arguments[r];return tg(iD(n)?rB(n):[n],nH(t,1))},nd.cond=function(e){var t=null==e?0:e.length,n=oc();return e=t?td(e,function(e){if("function"!=typeof e[1])throw new ex(o);return[n(e[0]),e[1]]}):[],rf(function(n){for(var r=-1;++r<t;){var o=e[r];if(ts(o[0],this,n))return ts(o[1],this,n)}})},nd.conforms=function(e){var t,n;return n=ad(t=nN(e,1)),function(e){return nL(e,t,n)}},nd.constant=aD,nd.countBy=ii,nd.create=function(e,t){var n=ng(e);return null==t?n:nC(n,t)},nd.curry=iS,nd.curryRight=ik,nd.debounce=iO,nd.defaults=as,nd.defaultsDeep=au,nd.defer=iE,nd.delay=ix,nd.difference=oF,nd.differenceBy=oB,nd.differenceWith=oW,nd.drop=function(e,t,n){var o=null==e?0:e.length;return o?rg(e,(t=n||r===t?1:i4(t))<0?0:t,o):[]},nd.dropRight=function(e,t,n){var o=null==e?0:e.length;return o?rg(e,0,(t=o-(t=n||r===t?1:i4(t)))<0?0:t):[]},nd.dropRightWhile=function(e,t){return e&&e.length?rE(e,oc(t,3),!0,!0):[]},nd.dropWhile=function(e,t){return e&&e.length?rE(e,oc(t,3),!0):[]},nd.fill=function(e,t,n,o){var i=null==e?0:e.length;if(!i)return[];n&&"number"!=typeof n&&o_(e,t,n)&&(n=0,o=i);var a=n,s=o,u=e.length;for((a=i4(a))<0&&(a=-a>u?0:u+a),(s=r===s||s>u?u:i4(s))<0&&(s+=u),s=a>s?0:i9(s);a<s;)e[a++]=t;return e},nd.filter=function(e,t){return(iD(e)?tf:nV)(e,oc(t,3))},nd.flatMap=function(e,t){return nH(id(e,t),1)},nd.flatMapDeep=function(e,t){return nH(id(e,t),s)},nd.flatMapDepth=function(e,t,n){return n=r===n?1:i4(n),nH(id(e,t),n)},nd.flatten=oq,nd.flattenDeep=function(e){return(null==e?0:e.length)?nH(e,s):[]},nd.flattenDepth=function(e,t){return(null==e?0:e.length)?nH(e,t=r===t?1:i4(t)):[]},nd.flip=function(e){return r9(e,512)},nd.flow=aM,nd.flowRight=aF,nd.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var o=e[t];r[o[0]]=o[1]}return r},nd.functions=function(e){return null==e?[]:n$(e,ad(e))},nd.functionsIn=function(e){return null==e?[]:n$(e,ag(e))},nd.groupBy=il,nd.initial=function(e){return(null==e?0:e.length)?rg(e,0,-1):[]},nd.intersection=oK,nd.intersectionBy=oG,nd.intersectionWith=o$,nd.invert=af,nd.invertBy=ap,nd.invokeMap=ip,nd.iteratee=aW,nd.keyBy=ih,nd.keys=ad,nd.keysIn=ag,nd.map=id,nd.mapKeys=function(e,t){var n={};return t=oc(t,3),nK(e,function(e,r,o){nI(n,t(e,r,o),e)}),n},nd.mapValues=function(e,t){var n={};return t=oc(t,3),nK(e,function(e,r,o){nI(n,r,t(e,r,o))}),n},nd.matches=function(e){return rt(nN(e,1))},nd.matchesProperty=function(e,t){return rn(e,nN(t,1))},nd.memoize=iA,nd.merge=ay,nd.mergeWith=av,nd.method=aV,nd.methodOf=aH,nd.mixin=aq,nd.negate=iR,nd.nthArg=function(e){return e=i4(e),rf(function(t){return ro(t,e)})},nd.omit=ab,nd.omitBy=function(e,t){return a_(e,iR(oc(t)))},nd.once=function(e){return im(2,e)},nd.orderBy=function(e,t,n,o){return null==e?[]:(iD(t)||(t=null==t?[]:[t]),iD(n=o?r:n)||(n=null==n?[]:[n]),ri(e,t,n))},nd.over=aK,nd.overArgs=iP,nd.overEvery=aG,nd.overSome=a$,nd.partial=iC,nd.partialRight=iI,nd.partition=ig,nd.pick=am,nd.pickBy=a_,nd.property=aJ,nd.propertyOf=function(e){return function(t){return null==e?r:nJ(e,t)}},nd.pull=oY,nd.pullAll=oX,nd.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?rs(e,t,oc(n,2)):e},nd.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?rs(e,t,r,n):e},nd.pullAt=oQ,nd.range=aY,nd.rangeRight=aX,nd.rearg=ij,nd.reject=function(e,t){return(iD(e)?tf:nV)(e,iR(oc(t,3)))},nd.remove=function(e,t){var n=[];if(!(e&&e.length))return n;var r=-1,o=[],i=e.length;for(t=oc(t,3);++r<i;){var a=e[r];t(a,r,e)&&(n.push(a),o.push(r))}return ru(e,o),n},nd.rest=function(e,t){if("function"!=typeof e)throw new ex(o);return rf(e,t=r===t?t:i4(t))},nd.reverse=oZ,nd.sampleSize=function(e,t,n){return t=(n?o_(e,t,n):r===t)?1:i4(t),(iD(e)?function(e,t){return oN(rB(e),nT(t,0,e.length))}:function(e,t){var n=ak(e);return oN(n,nT(t,0,n.length))})(e,t)},nd.set=function(e,t,n){return null==e?e:rp(e,t,n)},nd.setWith=function(e,t,n,o){return o="function"==typeof o?o:r,null==e?e:rp(e,t,n,o)},nd.shuffle=function(e){return(iD(e)?function(e){return oN(rB(e))}:function(e){return oN(ak(e))})(e)},nd.slice=function(e,t,n){var o=null==e?0:e.length;return o?(n&&"number"!=typeof n&&o_(e,t,n)?(t=0,n=o):(t=null==t?0:i4(t),n=r===n?o:i4(n)),rg(e,t,n)):[]},nd.sortBy=iy,nd.sortedUniq=function(e){return e&&e.length?rm(e):[]},nd.sortedUniqBy=function(e,t){return e&&e.length?rm(e,oc(t,2)):[]},nd.split=function(e,t,n){return(n&&"number"!=typeof n&&o_(e,t,n)&&(t=n=r),n=r===n?0xffffffff:n>>>0)?(e=at(e))&&("string"==typeof t||null!=t&&!iQ(t))&&!(t=rw(t))&&tB(e)?rj(tK(e),0,n):e.split(t,n):[]},nd.spread=function(e,t){if("function"!=typeof e)throw new ex(o);return t=null==t?0:t2(i4(t),0),rf(function(n){var r=n[t],o=rj(n,0,t);return r&&tg(o,r),ts(e,this,o)})},nd.tail=function(e){var t=null==e?0:e.length;return t?rg(e,1,t):[]},nd.take=function(e,t,n){return e&&e.length?rg(e,0,(t=n||r===t?1:i4(t))<0?0:t):[]},nd.takeRight=function(e,t,n){var o=null==e?0:e.length;return o?rg(e,(t=o-(t=n||r===t?1:i4(t)))<0?0:t,o):[]},nd.takeRightWhile=function(e,t){return e&&e.length?rE(e,oc(t,3),!1,!0):[]},nd.takeWhile=function(e,t){return e&&e.length?rE(e,oc(t,3)):[]},nd.tap=function(e,t){return t(e),e},nd.throttle=function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new ex(o);return iG(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),iO(e,t,{leading:r,maxWait:t,trailing:i})},nd.thru=ir,nd.toArray=i8,nd.toPairs=aw,nd.toPairsIn=aS,nd.toPath=function(e){return iD(e)?td(e,oU):i1(e)?[e]:rB(oL(at(e)))},nd.toPlainObject=ae,nd.transform=function(e,t,n){var r=iD(e),o=r||iW(e)||i2(e);if(t=oc(t,4),null==n){var i=e&&e.constructor;n=o?r?new i:[]:iG(e)&&iq(i)?ng(eH(e)):{}}return(o?tc:nK)(e,function(e,r,o){return t(n,e,r,o)}),n},nd.unary=function(e){return ib(e,1)},nd.union=o0,nd.unionBy=o1,nd.unionWith=o2,nd.uniq=function(e){return e&&e.length?rS(e):[]},nd.uniqBy=function(e,t){return e&&e.length?rS(e,oc(t,2)):[]},nd.uniqWith=function(e,t){return t="function"==typeof t?t:r,e&&e.length?rS(e,r,t):[]},nd.unset=function(e,t){return null==e||rk(e,t)},nd.unzip=o3,nd.unzipWith=o5,nd.update=function(e,t,n){return null==e?e:rO(e,t,rC(n))},nd.updateWith=function(e,t,n,o){return o="function"==typeof o?o:r,null==e?e:rO(e,t,rC(n),o)},nd.values=ak,nd.valuesIn=function(e){return null==e?[]:tT(e,ag(e))},nd.without=o8,nd.words=aN,nd.wrap=function(e,t){return iC(rC(t),e)},nd.xor=o6,nd.xorBy=o4,nd.xorWith=o9,nd.zip=o7,nd.zipObject=function(e,t){return rR(e||[],t||[],nA)},nd.zipObjectDeep=function(e,t){return rR(e||[],t||[],rp)},nd.zipWith=ie,nd.entries=aw,nd.entriesIn=aS,nd.extend=ar,nd.extendWith=ao,aq(nd,nd),nd.add=a0,nd.attempt=aL,nd.camelCase=aO,nd.capitalize=aE,nd.ceil=a1,nd.clamp=function(e,t,n){return r===n&&(n=t,t=r),r!==n&&(n=(n=i7(n))==n?n:0),r!==t&&(t=(t=i7(t))==t?t:0),nT(i7(e),t,n)},nd.clone=function(e){return nN(e,4)},nd.cloneDeep=function(e){return nN(e,5)},nd.cloneDeepWith=function(e,t){return nN(e,5,t="function"==typeof t?t:r)},nd.cloneWith=function(e,t){return nN(e,4,t="function"==typeof t?t:r)},nd.conformsTo=function(e,t){return null==t||nL(e,t,ad(t))},nd.deburr=ax,nd.defaultTo=function(e,t){return null==e||e!=e?t:e},nd.divide=a2,nd.endsWith=function(e,t,n){e=at(e),t=rw(t);var o=e.length,i=n=r===n?o:nT(i4(n),0,o);return(n-=t.length)>=0&&e.slice(n,i)==t},nd.eq=iT,nd.escape=function(e){return(e=at(e))&&H.test(e)?e.replace(W,tM):e},nd.escapeRegExp=function(e){return(e=at(e))&&X.test(e)?e.replace(Y,"\\$&"):e},nd.every=function(e,t,n){var o=iD(e)?tl:nB;return n&&o_(e,t,n)&&(t=r),o(e,oc(t,3))},nd.find=ia,nd.findIndex=oV,nd.findKey=function(e,t){return t_(e,oc(t,3),nK)},nd.findLast=is,nd.findLastIndex=oH,nd.findLastKey=function(e,t){return t_(e,oc(t,3),nG)},nd.floor=a3,nd.forEach=iu,nd.forEachRight=ic,nd.forIn=function(e,t){return null==e?e:nq(e,oc(t,3),ag)},nd.forInRight=function(e,t){return null==e?e:nz(e,oc(t,3),ag)},nd.forOwn=function(e,t){return e&&nK(e,oc(t,3))},nd.forOwnRight=function(e,t){return e&&nG(e,oc(t,3))},nd.get=ac,nd.gt=iN,nd.gte=iL,nd.has=function(e,t){return null!=e&&oy(e,t,nZ)},nd.hasIn=al,nd.head=oz,nd.identity=aB,nd.includes=function(e,t,n,r){e=iF(e)?e:ak(e),n=n&&!r?i4(n):0;var o=e.length;return n<0&&(n=t2(o+n,0)),i0(e)?n<=o&&e.indexOf(t,n)>-1:!!o&&tS(e,t,n)>-1},nd.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return -1;var o=null==n?0:i4(n);return o<0&&(o=t2(r+o,0)),tS(e,t,o)},nd.inRange=function(e,t,n){var o,i,a;return t=i6(t),r===n?(n=t,t=0):n=i6(n),(o=e=i7(e))>=t3(i=t,a=n)&&o<t2(i,a)},nd.invoke=ah,nd.isArguments=iU,nd.isArray=iD,nd.isArrayBuffer=iM,nd.isArrayLike=iF,nd.isArrayLikeObject=iB,nd.isBoolean=function(e){return!0===e||!1===e||i$(e)&&nX(e)==p},nd.isBuffer=iW,nd.isDate=iV,nd.isElement=function(e){return i$(e)&&1===e.nodeType&&!iX(e)},nd.isEmpty=function(e){if(null==e)return!0;if(iF(e)&&(iD(e)||"string"==typeof e||"function"==typeof e.splice||iW(e)||i2(e)||iU(e)))return!e.length;var t=og(e);if(t==v||t==S)return!e.size;if(oO(e))return!n9(e).length;for(var n in e)if(ej.call(e,n))return!1;return!0},nd.isEqual=function(e,t){return n5(e,t)},nd.isEqualWith=function(e,t,n){var o=(n="function"==typeof n?n:r)?n(e,t):r;return r===o?n5(e,t,r,n):!!o},nd.isError=iH,nd.isFinite=function(e){return"number"==typeof e&&tZ(e)},nd.isFunction=iq,nd.isInteger=iz,nd.isLength=iK,nd.isMap=iJ,nd.isMatch=function(e,t){return e===t||n8(e,t,of(t))},nd.isMatchWith=function(e,t,n){return n="function"==typeof n?n:r,n8(e,t,of(t),n)},nd.isNaN=function(e){return iY(e)&&e!=+e},nd.isNative=function(e){if(ok(e))throw new e_("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return n6(e)},nd.isNil=function(e){return null==e},nd.isNull=function(e){return null===e},nd.isNumber=iY,nd.isObject=iG,nd.isObjectLike=i$,nd.isPlainObject=iX,nd.isRegExp=iQ,nd.isSafeInteger=function(e){return iz(e)&&e>=-0x1fffffffffffff&&e<=0x1fffffffffffff},nd.isSet=iZ,nd.isString=i0,nd.isSymbol=i1,nd.isTypedArray=i2,nd.isUndefined=function(e){return r===e},nd.isWeakMap=function(e){return i$(e)&&og(e)==E},nd.isWeakSet=function(e){return i$(e)&&"[object WeakSet]"==nX(e)},nd.join=function(e,t){return null==e?"":t0.call(e,t)},nd.kebabCase=aA,nd.last=oJ,nd.lastIndexOf=function(e,t,n){var o=null==e?0:e.length;if(!o)return -1;var i=o;return r!==n&&(i=(i=i4(n))<0?t2(o+i,0):t3(i,o-1)),t==t?function(e,t,n){for(var r=n+1;r--&&e[r]!==t;);return r}(e,t,i):tw(e,tO,i,!0)},nd.lowerCase=aR,nd.lowerFirst=aP,nd.lt=i3,nd.lte=i5,nd.max=function(e){return e&&e.length?nW(e,aB,nQ):r},nd.maxBy=function(e,t){return e&&e.length?nW(e,oc(t,2),nQ):r},nd.mean=function(e){return tE(e,aB)},nd.meanBy=function(e,t){return tE(e,oc(t,2))},nd.min=function(e){return e&&e.length?nW(e,aB,n7):r},nd.minBy=function(e,t){return e&&e.length?nW(e,oc(t,2),n7):r},nd.stubArray=aQ,nd.stubFalse=aZ,nd.stubObject=function(){return{}},nd.stubString=function(){return""},nd.stubTrue=function(){return!0},nd.multiply=a5,nd.nth=function(e,t){return e&&e.length?ro(e,i4(t)):r},nd.noConflict=function(){return e8._===this&&(e8._=eD),this},nd.noop=az,nd.now=iv,nd.pad=function(e,t,n){e=at(e);var r=(t=i4(t))?tz(e):0;if(!t||r>=t)return e;var o=(t-r)/2;return r1(tY(o),n)+e+r1(tA(o),n)},nd.padEnd=function(e,t,n){e=at(e);var r=(t=i4(t))?tz(e):0;return t&&r<t?e+r1(t-r,n):e},nd.padStart=function(e,t,n){e=at(e);var r=(t=i4(t))?tz(e):0;return t&&r<t?r1(t-r,n)+e:e},nd.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t*=1),t8(at(e).replace(Q,""),t||0)},nd.random=function(e,t,n){if(n&&"boolean"!=typeof n&&o_(e,t,n)&&(t=n=r),r===n&&("boolean"==typeof t?(n=t,t=r):"boolean"==typeof e&&(n=e,e=r)),r===e&&r===t?(e=0,t=1):(e=i6(e),r===t?(t=e,e=0):t=i6(t)),e>t){var o=e;e=t,t=o}if(n||e%1||t%1){var i=t6();return t3(e+i*(t-e+e1("1e-"+((i+"").length-1))),t)}return rc(e,t)},nd.reduce=function(e,t,n){var r=iD(e)?ty:tR,o=arguments.length<3;return r(e,oc(t,4),n,o,nM)},nd.reduceRight=function(e,t,n){var r=iD(e)?tv:tR,o=arguments.length<3;return r(e,oc(t,4),n,o,nF)},nd.repeat=function(e,t,n){return t=(n?o_(e,t,n):r===t)?1:i4(t),rl(at(e),t)},nd.replace=function(){var e=arguments,t=at(e[0]);return e.length<3?t:t.replace(e[1],e[2])},nd.result=function(e,t,n){t=rI(t,e);var o=-1,i=t.length;for(i||(i=1,e=r);++o<i;){var a=null==e?r:e[oU(t[o])];r===a&&(o=i,a=n),e=iq(a)?a.call(e):a}return e},nd.round=a8,nd.runInContext=e,nd.sample=function(e){return(iD(e)?nE:function(e){return nE(ak(e))})(e)},nd.size=function(e){if(null==e)return 0;if(iF(e))return i0(e)?tz(e):e.length;var t=og(e);return t==v||t==S?e.size:n9(e).length},nd.snakeCase=aC,nd.some=function(e,t,n){var o=iD(e)?tb:ry;return n&&o_(e,t,n)&&(t=r),o(e,oc(t,3))},nd.sortedIndex=function(e,t){return rv(e,t)},nd.sortedIndexBy=function(e,t,n){return rb(e,t,oc(n,2))},nd.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=rv(e,t);if(r<n&&iT(e[r],t))return r}return -1},nd.sortedLastIndex=function(e,t){return rv(e,t,!0)},nd.sortedLastIndexBy=function(e,t,n){return rb(e,t,oc(n,2),!0)},nd.sortedLastIndexOf=function(e,t){if(null==e?0:e.length){var n=rv(e,t,!0)-1;if(iT(e[n],t))return n}return -1},nd.startCase=aI,nd.startsWith=function(e,t,n){return e=at(e),n=null==n?0:nT(i4(n),0,e.length),t=rw(t),e.slice(n,n+t.length)==t},nd.subtract=a6,nd.sum=function(e){return e&&e.length?tP(e,aB):0},nd.sumBy=function(e,t){return e&&e.length?tP(e,oc(t,2)):0},nd.template=function(e,t,n){var o=nd.templateSettings;n&&o_(e,t,n)&&(t=r),e=at(e),t=ao({},t,o,r7);var i,a,s=ao({},t.imports,o.imports,r7),u=ad(s),c=tT(s,u),l=0,f=t.interpolate||ed,p="__p += '",h=eO((t.escape||ed).source+"|"+f.source+"|"+(f===K?ea:ed).source+"|"+(t.evaluate||ed).source+"|$","g"),d="//# sourceURL="+(ej.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++eX+"]")+"\n";e.replace(h,function(t,n,r,o,s,u){return r||(r=o),p+=e.slice(l,u).replace(eg,tF),n&&(i=!0,p+="' +\n__e("+n+") +\n'"),s&&(a=!0,p+="';\n"+s+";\n__p += '"),r&&(p+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=u+t.length,t}),p+="';\n";var g=ej.call(t,"variable")&&t.variable;if(g){if(eo.test(g))throw new e_("Invalid `variable` option passed into `_.template`")}else p="with (obj) {\n"+p+"\n}\n";p=(a?p.replace(D,""):p).replace(M,"$1").replace(F,"$1;"),p="function("+(g||"obj")+") {\n"+(g?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+p+"return __p\n}";var y=aL(function(){return ew(u,d+"return "+p).apply(r,c)});if(y.source=p,iH(y))throw y;return y},nd.times=function(e,t){if((e=i4(e))<1||e>0x1fffffffffffff)return[];var n=0xffffffff,r=t3(e,0xffffffff);t=oc(t),e-=0xffffffff;for(var o=tC(r,t);++n<e;)t(n);return o},nd.toFinite=i6,nd.toInteger=i4,nd.toLength=i9,nd.toLower=function(e){return at(e).toLowerCase()},nd.toNumber=i7,nd.toSafeInteger=function(e){return e?nT(i4(e),-0x1fffffffffffff,0x1fffffffffffff):0===e?e:0},nd.toString=at,nd.toUpper=function(e){return at(e).toUpperCase()},nd.trim=function(e,t,n){if((e=at(e))&&(n||r===t))return tI(e);if(!e||!(t=rw(t)))return e;var o=tK(e),i=tK(t),a=tL(o,i),s=tU(o,i)+1;return rj(o,a,s).join("")},nd.trimEnd=function(e,t,n){if((e=at(e))&&(n||r===t))return e.slice(0,tG(e)+1);if(!e||!(t=rw(t)))return e;var o=tK(e),i=tU(o,tK(t))+1;return rj(o,0,i).join("")},nd.trimStart=function(e,t,n){if((e=at(e))&&(n||r===t))return e.replace(Q,"");if(!e||!(t=rw(t)))return e;var o=tK(e),i=tL(o,tK(t));return rj(o,i).join("")},nd.truncate=function(e,t){var n=30,o="...";if(iG(t)){var i="separator"in t?t.separator:i;n="length"in t?i4(t.length):n,o="omission"in t?rw(t.omission):o}var a=(e=at(e)).length;if(tB(e)){var s=tK(e);a=s.length}if(n>=a)return e;var u=n-tz(o);if(u<1)return o;var c=s?rj(s,0,u).join(""):e.slice(0,u);if(r===i)return c+o;if(s&&(u+=c.length-u),iQ(i)){if(e.slice(u).search(i)){var l,f=c;for(i.global||(i=eO(i.source,at(es.exec(i))+"g")),i.lastIndex=0;l=i.exec(f);)var p=l.index;c=c.slice(0,r===p?u:p)}}else if(e.indexOf(rw(i),u)!=u){var h=c.lastIndexOf(i);h>-1&&(c=c.slice(0,h))}return c+o},nd.unescape=function(e){return(e=at(e))&&V.test(e)?e.replace(B,t$):e},nd.uniqueId=function(e){var t=++eT;return at(e)+t},nd.upperCase=aj,nd.upperFirst=aT,nd.each=iu,nd.eachRight=ic,nd.first=oz,aq(nd,(ev={},nK(nd,function(e,t){ej.call(nd.prototype,t)||(ev[t]=e)}),ev),{chain:!1}),nd.VERSION="4.17.21",tc(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){nd[e].placeholder=nd}),tc(["drop","take"],function(e,t){nb.prototype[e]=function(n){n=r===n?1:t2(i4(n),0);var o=this.__filtered__&&!t?new nb(this):this.clone();return o.__filtered__?o.__takeCount__=t3(n,o.__takeCount__):o.__views__.push({size:t3(n,0xffffffff),type:e+(o.__dir__<0?"Right":"")}),o},nb.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}}),tc(["filter","map","takeWhile"],function(e,t){var n=t+1,r=1==n||3==n;nb.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:oc(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}}),tc(["head","last"],function(e,t){var n="take"+(t?"Right":"");nb.prototype[e]=function(){return this[n](1).value()[0]}}),tc(["initial","tail"],function(e,t){var n="drop"+(t?"":"Right");nb.prototype[e]=function(){return this.__filtered__?new nb(this):this[n](1)}}),nb.prototype.compact=function(){return this.filter(aB)},nb.prototype.find=function(e){return this.filter(e).head()},nb.prototype.findLast=function(e){return this.reverse().find(e)},nb.prototype.invokeMap=rf(function(e,t){return"function"==typeof e?new nb(this):this.map(function(n){return n2(n,e,t)})}),nb.prototype.reject=function(e){return this.filter(iR(oc(e)))},nb.prototype.slice=function(e,t){e=i4(e);var n=this;return n.__filtered__&&(e>0||t<0)?new nb(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),r!==t&&(n=(t=i4(t))<0?n.dropRight(-t):n.take(t-e)),n)},nb.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},nb.prototype.toArray=function(){return this.take(0xffffffff)},nK(nb.prototype,function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),o=/^(?:head|last)$/.test(t),i=nd[o?"take"+("last"==t?"Right":""):t],a=o||/^find/.test(t);i&&(nd.prototype[t]=function(){var t=this.__wrapped__,s=o?[1]:arguments,u=t instanceof nb,c=s[0],l=u||iD(t),f=function(e){var t=i.apply(nd,tg([e],s));return o&&p?t[0]:t};l&&n&&"function"==typeof c&&1!=c.length&&(u=l=!1);var p=this.__chain__,h=!!this.__actions__.length,d=a&&!p,g=u&&!h;if(!a&&l){t=g?t:new nb(this);var y=e.apply(t,s);return y.__actions__.push({func:ir,args:[f],thisArg:r}),new nv(y,p)}return d&&g?e.apply(this,s):(y=this.thru(f),d?o?y.value()[0]:y.value():y)})}),tc(["pop","push","shift","sort","splice","unshift"],function(e){var t=eA[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);nd.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var o=this.value();return t.apply(iD(o)?o:[],e)}return this[n](function(n){return t.apply(iD(n)?n:[],e)})}}),nK(nb.prototype,function(e,t){var n=nd[t];if(n){var r=n.name+"";ej.call(ni,r)||(ni[r]=[]),ni[r].push({name:t,func:n})}}),ni[rX(r,2).name]=[{name:"wrapper",func:r}],nb.prototype.clone=function(){var e=new nb(this.__wrapped__);return e.__actions__=rB(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=rB(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=rB(this.__views__),e},nb.prototype.reverse=function(){if(this.__filtered__){var e=new nb(this);e.__dir__=-1,e.__filtered__=!0}else e=this.clone(),e.__dir__*=-1;return e},nb.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=iD(e),r=t<0,o=n?e.length:0,i=function(e,t,n){for(var r=-1,o=n.length;++r<o;){var i=n[r],a=i.size;switch(i.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=t3(t,e+a);break;case"takeRight":e=t2(e,t-a)}}return{start:e,end:t}}(0,o,this.__views__),a=i.start,s=i.end,u=s-a,c=r?s:a-1,l=this.__iteratees__,f=l.length,p=0,h=t3(u,this.__takeCount__);if(!n||!r&&o==u&&h==u)return rx(e,this.__actions__);var d=[];e:for(;u--&&p<h;){for(var g=-1,y=e[c+=t];++g<f;){var v=l[g],b=v.iteratee,m=v.type,_=b(y);if(2==m)y=_;else if(!_)if(1==m)continue e;else break e}d[p++]=y}return d},nd.prototype.at=io,nd.prototype.chain=function(){return it(this)},nd.prototype.commit=function(){return new nv(this.value(),this.__chain__)},nd.prototype.next=function(){this.__values__===r&&(this.__values__=i8(this.value()));var e=this.__index__>=this.__values__.length,t=e?r:this.__values__[this.__index__++];return{done:e,value:t}},nd.prototype.plant=function(e){for(var t,n=this;n instanceof ny;){var o=oM(n);o.__index__=0,o.__values__=r,t?i.__wrapped__=o:t=o;var i=o;n=n.__wrapped__}return i.__wrapped__=e,t},nd.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof nb){var t=e;return this.__actions__.length&&(t=new nb(this)),(t=t.reverse()).__actions__.push({func:ir,args:[oZ],thisArg:r}),new nv(t,this.__chain__)}return this.thru(oZ)},nd.prototype.toJSON=nd.prototype.valueOf=nd.prototype.value=function(){return rx(this.__wrapped__,this.__actions__)},nd.prototype.first=nd.prototype.head,e5&&(nd.prototype[e5]=function(){return this}),nd}();"function"==typeof define&&"object"==typeof define.amd&&define.amd?(e8._=tJ,define(function(){return tJ})):e4?((e4.exports=tJ)._=tJ,e6._=tJ):e8._=tJ}).call(this)},970:function(e,t,n){var r="function"==typeof Map&&Map.prototype,o=Object.getOwnPropertyDescriptor&&r?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,i=r&&o&&"function"==typeof o.get?o.get:null,a=r&&Map.prototype.forEach,s="function"==typeof Set&&Set.prototype,u=Object.getOwnPropertyDescriptor&&s?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,c=s&&u&&"function"==typeof u.get?u.get:null,l=s&&Set.prototype.forEach,f="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,p="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,h="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,d=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,w=String.prototype.toLowerCase,S=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,R=Object.getOwnPropertySymbols,P="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,j=Object.prototype.propertyIsEnumerable,T=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function N(e,t){if(e===1/0||e===-1/0||e!=e||e&&e>-1e3&&e<1e3||S.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof e){var r=e<0?-x(-e):x(e);if(r!==e){var o=String(r),i=b.call(t,o.length+1);return m.call(o,n,"$&_")+"."+m.call(m.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return m.call(t,n,"$&_")}var L=n(734),U=L.custom,D=W(U)?U:null;function M(e,t,n){var r="double"===(n.quoteStyle||t)?'"':"'";return r+e+r}function F(e){return"[object Array]"===q(e)&&(!I||!("object"==typeof e&&I in e))}function B(e){return"[object RegExp]"===q(e)&&(!I||!("object"==typeof e&&I in 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||!P)return!1;try{return P.call(e),!0}catch(e){}return!1}e.exports=function e(t,r,o,s){var u,g,_,S,x,R=r||{};if(H(R,"quoteStyle")&&"single"!==R.quoteStyle&&"double"!==R.quoteStyle)throw TypeError('option "quoteStyle" must be "single" or "double"');if(H(R,"maxStringLength")&&("number"==typeof R.maxStringLength?R.maxStringLength<0&&R.maxStringLength!==1/0:null!==R.maxStringLength))throw TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var U=!H(R,"customInspect")||R.customInspect;if("boolean"!=typeof U&&"symbol"!==U)throw TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(H(R,"indent")&&null!==R.indent&&" "!==R.indent&&!(parseInt(R.indent,10)===R.indent&&R.indent>0))throw TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(H(R,"numericSeparator")&&"boolean"!=typeof R.numericSeparator)throw TypeError('option "numericSeparator", if provided, must be `true` or `false`');var V=R.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,n){if(t.length>n.maxStringLength){var r=t.length-n.maxStringLength;return e(b.call(t,0,n.maxStringLength),n)+("... "+r)+" more character"+(r>1?"s":"")}return M(m.call(m.call(t,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,K),"single",n)}(t,R);if("number"==typeof t){if(0===t)return 1/0/t>0?"0":"-0";var Q=String(t);return V?N(t,Q):Q}if("bigint"==typeof t){var Z=String(t)+"n";return V?N(t,Z):Z}var ee=void 0===R.depth?5:R.depth;if(void 0===o&&(o=0),o>=ee&&ee>0&&"object"==typeof t)return F(t)?"[Array]":"[Object]";var et=function(e,t){var n;if(" "===e.indent)n=" ";else{if("number"!=typeof e.indent||!(e.indent>0))return null;n=O.call(Array(e.indent+1)," ")}return{base:n,prev:O.call(Array(t+1),n)}}(R,o);if(void 0===s)s=[];else if(z(s,t)>=0)return"[Circular]";function en(t,n,r){if(n&&(s=E.call(s)).push(n),r){var i={depth:R.depth};return H(R,"quoteStyle")&&(i.quoteStyle=R.quoteStyle),e(t,i,o+1,s)}return e(t,R,o+1,s)}if("function"==typeof t&&!B(t)){var er=function(e){if(e.name)return e.name;var t=v.call(y.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}(t),eo=X(t,en);return"[Function"+(er?": "+er:" (anonymous)")+"]"+(eo.length>0?" { "+O.call(eo,", ")+" }":"")}if(W(t)){var ei=C?m.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):P.call(t);return"object"!=typeof t||C?ei:G(ei)}if((ea=t)&&"object"==typeof ea&&("undefined"!=typeof HTMLElement&&ea instanceof HTMLElement||"string"==typeof ea.nodeName&&"function"==typeof ea.getAttribute)){for(var ea,es,eu="<"+w.call(String(t.nodeName)),ec=t.attributes||[],el=0;el<ec.length;el++){eu+=" "+ec[el].name+"="+M((es=ec[el].value,m.call(String(es),/"/g,""")),"double",R)}return eu+=">",t.childNodes&&t.childNodes.length&&(eu+="..."),eu+="</"+w.call(String(t.nodeName))+">"}if(F(t)){if(0===t.length)return"[]";var ef=X(t,en);return et&&!function(e){for(var t=0;t<e.length;t++)if(z(e[t],"\n")>=0)return!1;return!0}(ef)?"["+Y(ef,et)+"]":"[ "+O.call(ef,", ")+" ]"}if("[object Error]"===q(u=t)&&(!I||!("object"==typeof u&&I in u))){var ep=X(t,en);return"cause"in Error.prototype||!("cause"in t)||j.call(t,"cause")?0===ep.length?"["+String(t)+"]":"{ ["+String(t)+"] "+O.call(ep,", ")+" }":"{ ["+String(t)+"] "+O.call(k.call("[cause]: "+en(t.cause),ep),", ")+" }"}if("object"==typeof t&&U){if(D&&"function"==typeof t[D]&&L)return L(t,{depth:ee-o});else if("symbol"!==U&&"function"==typeof t.inspect)return t.inspect()}if(function(e){if(!i||!e||"object"!=typeof e)return!1;try{i.call(e);try{c.call(e)}catch(e){return!0}return e instanceof Map}catch(e){}return!1}(t)){var eh=[];return a&&a.call(t,function(e,n){eh.push(en(n,t,!0)+" => "+en(e,t))}),J("Map",i.call(t),eh,et)}if(function(e){if(!c||!e||"object"!=typeof e)return!1;try{c.call(e);try{i.call(e)}catch(e){return!0}return e instanceof Set}catch(e){}return!1}(t)){var ed=[];return l&&l.call(t,function(e){ed.push(en(e,t))}),J("Set",c.call(t),ed,et)}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 $("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 $("WeakSet");if(function(e){if(!h||!e||"object"!=typeof e)return!1;try{return h.call(e),!0}catch(e){}return!1}(t))return $("WeakRef");if("[object Number]"===q(g=t)&&(!I||!("object"==typeof g&&I in g)))return G(en(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 G(en(A.call(t)));if("[object Boolean]"===q(_=t)&&(!I||!("object"==typeof _&&I in _)))return G(d.call(t));if("[object String]"===q(S=t)&&(!I||!("object"==typeof S&&I in S)))return G(en(String(t)));if("undefined"!=typeof window&&t===window)return"{ [object Window] }";if(t===n.g)return"{ [object globalThis] }";if(!("[object Date]"===q(x=t)&&(!I||!("object"==typeof x&&I in x)))&&!B(t)){var eg=X(t,en),ey=T?T(t)===Object.prototype:t instanceof Object||t.constructor===Object,ev=t instanceof Object?"":"null prototype",eb=!ey&&I&&Object(t)===t&&I in t?b.call(q(t),8,-1):ev?"Object":"",em=(ey||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(eb||ev?"["+O.call(k.call([],eb||[],ev||[]),": ")+"] ":"");return 0===eg.length?em+"{}":et?em+"{"+Y(eg,et)+"}":em+"{ "+O.call(eg,", ")+" }"}return String(t)};var V=Object.prototype.hasOwnProperty||function(e){return e in this};function H(e,t){return V.call(e,t)}function q(e){return g.call(e)}function z(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return -1}function K(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+_.call(t.toString(16))}function G(e){return"Object("+e+")"}function $(e){return e+" { ? }"}function J(e,t,n,r){return e+" ("+t+") {"+(r?Y(n,r):O.call(n,", "))+"}"}function Y(e,t){if(0===e.length)return"";var n="\n"+t.prev+t.base;return n+O.call(e,","+n)+"\n"+t.prev}function X(e,t){var n,r=F(e),o=[];if(r){o.length=e.length;for(var i=0;i<e.length;i++)o[i]=H(e,i)?t(e[i],e):""}var a="function"==typeof R?R(e):[];if(C){n={};for(var s=0;s<a.length;s++)n["$"+a[s]]=a[s]}for(var u in e)if(H(e,u)&&(!r||String(Number(u))!==u||!(u<e.length)))if(C&&n["$"+u]instanceof Symbol)continue;else S.call(/[^\w$]/,u)?o.push(t(u,e)+": "+t(e[u],e)):o.push(u+": "+t(e[u],e));if("function"==typeof R)for(var c=0;c<a.length;c++)j.call(e,a[c])&&o.push("["+t(a[c])+"]: "+t(e[a[c]],e));return o}},916:function(e,t,n){e=n.nmd(e),(function(){"use strict";var r={function:!0,object:!0},o=r[typeof window]&&window||this,i=r[typeof t]&&t,a=r.object&&e&&!e.nodeType&&e,s=i&&a&&"object"==typeof n.g&&n.g;s&&(s.global===s||s.window===s||s.self===s)&&(o=s);var u=/\bOpera/,c=Object.prototype,l=c.hasOwnProperty,f=c.toString;function p(e){return(e=String(e)).charAt(0).toUpperCase()+e.slice(1)}function h(e){return e=b(e),/^(?:webOS|i(?:OS|P))/.test(e)?e:p(e)}function d(e,t){for(var n in e)l.call(e,n)&&t(e[n],n,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 n=null,r=function(r,o){n=t(n,r,o,e)},o=-1,i=e?e.length:0;if("number"==typeof i&&i>-1&&i<=0x1fffffffffffff)for(;++o<i;)r(e[o],o,e);else d(e,r);return n}function b(e){return String(e).replace(/^ +| +$/g,"")}function m(e){var t,n,r,i,a,s=o,c=e&&"object"==typeof e&&"String"!=g(e);c&&(s=e,e=null);var l=s.navigator||{},p=l.userAgent||"";e||(e=p);var _=c?!!l.likeChrome:/\bChrome\b/.test(e)&&!/internal|\n/i.test(f.toString()),w="Object",S=c&&s.java?"JavaPackage":g(s.java),k=/\bJava/.test(S)&&s.java,O=k&&g(s.environment)==(c?w:"Environment"),E=k?"a":"α",x=k?"b":"β",A=s.document||{},R=s.operamini||s.opera,P=u.test(P=c&&R?R["[[Class]]"]:g(R))?P:R=null,C=e,I=[],j=null,T=e==p,N=T&&R&&"function"==typeof R.version&&R.version(),L=v([{label:"EdgeHTML",pattern:"Edge"},"Trident",{label:"WebKit",pattern:"AppleWebKit"},"iCab","Presto","NetFront","Tasman","KHTML","Gecko"],function(t,n){return t||RegExp("\\b"+(n.pattern||y(n))+"\\b","i").exec(e)&&(n.label||n)}),U=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,n){return t||RegExp("\\b"+(n.pattern||y(n))+"\\b","i").exec(e)&&(n.label||n)}),D=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,n,r){return t||(n[D]||n[/^[a-z]+(?: +[a-z]+\b)*/i.exec(D)]||RegExp("\\b"+y(r)+"(?:\\b|\\w*\\d)","i").exec(e))&&r}),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,n){var r,o,i,a=n.pattern||y(n);return!t&&(t=RegExp("\\b"+a+"(?:/[\\d.]+|[ \\w.]*)","i").exec(e))&&(r=t,o=n.label||n,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"},a&&o&&/^Win/i.test(r)&&!/^Windows Phone /i.test(r)&&(i=i[/[\d.]+$/.exec(r)])&&(r="Windows "+i),r=String(r),a&&o&&(r=r.replace(RegExp(a,"i"),o)),t=r=h(r.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,n){var r=n.pattern||y(n);return!t&&(t=RegExp("\\b"+r+" *\\d+[.\\w_]*","i").exec(e)||RegExp("\\b"+r+" *\\w+-[\\w]*","i").exec(e)||RegExp("\\b"+r+"(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)","i").exec(e))&&((t=String(n.label&&!RegExp(r,"i").test(n.label)?n.label:t).split("/"))[1]&&!/[\d.]+/.test(t[0])&&(t[0]+=" "+t[1]),n=n.label||n,t=h(t[0].replace(RegExp(r,"i"),n).replace(RegExp("; *(?:"+n+"[_-])?","i")," ").replace(RegExp("("+n+")[-_.]?(\\w)","i"),"$1 $2"))),t})}function W(t){return v(t,function(t,n){return t||(RegExp(n+"(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)","i").exec(e)||0)[1]||null})}if(L&&(L=[L]),/\bAndroid\b/.test(F)&&!D&&(i=/\bAndroid[^;]*;(.*?)(?:Build|\) AppleWebKit)\b/i.exec(e))&&(D=b(i[1]).replace(/^[a-z]{2}-[a-z]{2};\s*/i,"")||null),M&&!D?D=B([M]):M&&D&&(D=D.replace(RegExp("^("+y(M)+")[-_.\\s]","i"),M+" ").replace(RegExp("^("+y(M)+")[-_.]?(\\w)","i"),M+" $2")),(i=/\bGoogle TV\b/.exec(D))&&(D=i[0]),/\bSimulator\b/i.test(e)&&(D=(D?D+" ":"")+"Simulator"),"Opera Mini"==U&&/\bOPiOS\b/.test(e)&&I.push("running in Turbo/Uncompressed mode"),"IE"==U&&/\blike iPhone OS\b/.test(e)?(M=(i=m(e.replace(/like iPhone OS/,""))).manufacturer,D=i.product):/^iP/.test(D)?(U||(U="Safari"),F="iOS"+((i=/ OS ([\d_]+)/i.exec(e))?" "+i[1].replace(/_/g,"."):"")):"Konqueror"==U&&/^Linux\b/i.test(F)?F="Kubuntu":M&&"Google"!=M&&(/Chrome/.test(U)&&!/\bMobile Safari\b/i.test(e)||/\bVita\b/.test(D))||/\bAndroid\b/.test(F)&&/^Chrome/.test(U)&&/\bVersion\//i.test(e)?(U="Android Browser",F=/\bAndroid\b/.test(F)?F:"Android"):"Silk"==U?(/\bMobi/i.test(e)||(F="Android",I.unshift("desktop mode")),/Accelerated *= *true/i.test(e)&&I.unshift("accelerated")):"UC Browser"==U&&/\bUCWEB\b/.test(e)?I.push("speed mode"):"PaleMoon"==U&&(i=/\bFirefox\/([\d.]+)\b/.exec(e))?I.push("identifying as Firefox "+i[1]):"Firefox"==U&&(i=/\b(Mobile|Tablet|TV)\b/i.exec(e))?(F||(F="Firefox OS"),D||(D=i[1])):!U||(i=!/\bMinefield\b/i.test(e)&&/\b(?:Firefox|Safari)\b/.exec(U))?(U&&!D&&/[\/,]|^[^(]+?\)/.test(e.slice(e.indexOf(i+"/")+8))&&(U=null),(i=D||M||F)&&(D||M||/\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(F))&&(U=/[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(F)?F:i)+" Browser")):"Electron"==U&&(i=(/\bChrome\/([\d.]+)\b/.exec(e)||0)[1])&&I.push("Chromium "+i),N||(N=W(["(?:Cloud9|CriOS|CrMo|Edge|Edg|EdgA|EdgiOS|FxiOS|HeadlessChrome|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|SamsungBrowser|Silk(?!/[\\d.]+$)|UCBrowser|YaBrowser)","Version",y(U),"(?:Firefox|Minefield|NetFront)"])),(i="iCab"==L&&parseFloat(N)>3&&"WebKit"||/\bOpera\b/.test(U)&&(/\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(U)&&"NetFront")&&(L=[i]),"IE"==U&&(i=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(e)||0)[1])?(U+=" Mobile",F="Windows Phone "+(/\+$/.test(i)?i:i+".x"),I.unshift("desktop mode")):/\bWPDesktop\b/i.test(e)?(U="IE Mobile",F="Windows Phone 8.x",I.unshift("desktop mode"),N||(N=(/\brv:([\d.]+)/.exec(e)||0)[1])):"IE"!=U&&"Trident"==L&&(i=/\brv:([\d.]+)/.exec(e))&&(U&&I.push("identifying as "+U+(N?" "+N:"")),U="IE",N=i[1]),T){if(n="global",r=null!=(t=s)?typeof t[n]:"number",/^(?:boolean|number|string|undefined)$/.test(r)||"object"==r&&!t[n])g(i=s.runtime)==(c?w:"ScriptBridgingProxyObject")?(U="Adobe AIR",F=i.flash.system.Capabilities.os):g(i=s.phantom)==(c?w:"RuntimeObject")?(U="PhantomJS",N=(i=i.version||null)&&i.major+"."+i.minor+"."+i.patch):"number"==typeof A.documentMode&&(i=/\bTrident\/(\d+)/i.exec(e))?(N=[N,A.documentMode],(i=+i[1]+4)!=N[1]&&(I.push("IE "+N[1]+" mode"),L&&(L[1]=""),N[1]=i),N="IE"==U?String(N[1].toFixed(1)):N[0]):"number"==typeof A.documentMode&&/^(?:Chrome|Firefox)\b/.test(U)&&(I.push("masking as "+U+" "+N),U="IE",N="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{N=s.require("ringo/engine").version.join("."),U="RingoJS"}catch(e){(i=s.system)&&i.global.system==s.system&&(U="Narwhal",F||(F=i[0].os||null))}U||(U="Rhino")}else"object"==typeof s.process&&!s.process.browser&&(i=s.process)&&("object"==typeof i.versions&&("string"==typeof i.versions.electron?(I.push("Node "+i.versions.node),U="Electron",N=i.versions.electron):"string"==typeof i.versions.nw&&(I.push("Chromium "+N,"Node "+i.versions.node),U="NW.js",N=i.versions.nw)),U||(U="Node.js",C=i.arch,F=i.platform,N=(N=/[\d.]+/.exec(i.version))?N[0]:null));F=F&&h(F)}if(N&&(i=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(N)||/(?:alpha|beta)(?: ?\d)?/i.exec(e+";"+(T&&l.appMinorVersion))||/\bMinefield\b/i.test(e)&&"a")&&(j=/b/i.test(i)?"beta":"alpha",N=N.replace(RegExp(i+"\\+?$"),"")+("beta"==j?x:E)+(/\d+\+?/.exec(i)||"")),"Fennec"==U||"Firefox"==U&&/\b(?:Android|Firefox OS|KaiOS)\b/.test(F))U="Firefox Mobile";else if("Maxthon"==U&&N)N=N.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test(D))"Xbox 360"==D&&(F=null),"Xbox 360"==D&&/\bIEMobile\b/.test(e)&&I.unshift("mobile mode");else if((/^(?:Chrome|IE|Opera)$/.test(U)||U&&!D&&!/Browser|Mobi/.test(U))&&("Windows CE"==F||/Mobi/i.test(e)))U+=" Mobile";else if("IE"==U&&T)try{null===s.external&&I.unshift("platform preview")}catch(e){I.unshift("embedded")}else(/\bBlackBerry\b/.test(D)||/\bBB10\b/.test(e))&&(i=(RegExp(D.replace(/ +/g," *")+"/([.\\d]+)","i").exec(e)||0)[1]||N)?(F=((i=[i,/BB10/.test(e)])[1]?(D=null,M="BlackBerry"):"Device Software")+" "+i[0],N=null):this!=d&&"Wii"!=D&&(T&&R||/Opera/.test(U)&&/\b(?:MSIE|Firefox)\b/i.test(e)||"Firefox"==U&&/\bOS X (?:\d+\.){2,}/.test(F)||"IE"==U&&(F&&!/^Win/.test(F)&&N>5.5||/\bWindows XP\b/.test(F)&&N>8||8==N&&!/\bTrident\b/.test(e)))&&!u.test(i=m.call(d,e.replace(u,"")+";"))&&i.name&&(i="ing as "+i.name+((i=i.version)?" "+i:""),u.test(U)?(/\bIE\b/.test(i)&&"Mac OS"==F&&(F=null),i="identify"+i):(i="mask"+i,U=P?h(P.replace(/([a-z])([A-Z])/g,"$1 $2")):"Opera",/\bIE\b/.test(i)&&(F=null),T||(N=null)),L=["Presto"],I.push(i));(i=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(e)||0)[1])&&(i=[parseFloat(i.replace(/\.(\d)$/,".0$1")),i],"Safari"==U&&"+"==i[1].slice(-1)?(U="WebKit Nightly",j="alpha",N=i[1].slice(0,-1)):(N==i[1]||N==(i[2]=(/\bSafari\/([\d.]+\+?)/i.exec(e)||0)[1]))&&(N=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"==U&&(!N||parseInt(N)>45)?N=i:"Chrome"==U&&/\bHeadlessChrome/i.test(e)&&I.unshift("headless")),"Opera"==U&&(i=/\bzbov|zvav$/.exec(F))?(U+=" ",I.unshift("desktop mode"),"zvav"==i?(U+="Mini",N=null):U+="Mobile",F=F.replace(RegExp(" *"+i+"$"),"")):"Safari"==U&&/\bChrome\b/.exec(L&&L[1])?(I.unshift("desktop mode"),U="Chrome Mobile",N=null,/\bOS X\b/.test(F)?(M="Apple",F="iOS 4.3+"):F=null):/\bSRWare Iron\b/.test(U)&&!N&&(N=W("Chrome")),N&&0==N.indexOf(i=/[\d.]+$/.exec(F))&&e.indexOf("/"+i+"-")>-1&&(F=b(F.replace(i,""))),F&&-1!=F.indexOf(U)&&!RegExp(U+" OS").test(F)&&(F=F.replace(RegExp(" *"+y(U)+" *"),"")),L&&!/\b(?:Avant|Nook)\b/.test(U)&&(/Browser|Lunascape|Maxthon/.test(U)||"Safari"!=U&&/^iOS/.test(F)&&/\bSafari\b/.test(L[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|SRWare Iron|Vivaldi|Web)/.test(U)&&L[1])&&(i=L[L.length-1])&&I.push(i),I.length&&(I=["("+I.join("; ")+")"]),M&&D&&0>D.indexOf(M)&&I.push("on "+M),D&&I.push((/^on /.test(I[I.length-1])?"":"on ")+D),F&&(a=(i=/ ([\d.+]+)$/.exec(F))&&"/"==F.charAt(F.length-i[0].length-1),F={architecture:32,family:i&&!a?F.replace(i[0],""):F,version:i?i[1]:null,toString:function(){var e=this.version;return this.family+(e&&!a?" "+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),"")),U&&(/\bWOW64\b/i.test(e)||T&&/\w(?:86|32)$/.test(l.cpuClass||l.platform)&&!/\bWin64; x64\b/i.test(e))&&I.unshift("32-bit")):F&&/^OS X/.test(F.family)&&"Chrome"==U&&parseFloat(N)>=39&&(F.architecture=64),e||(e=null);var V={};return V.description=e,V.layout=L&&L[0],V.manufacturer=M,V.name=U,V.prerelease=j,V.product=D,V.ua=e,V.version=U&&N,V.os=F||{architecture:null,family:null,version:null,toString:function(){return"null"}},V.parse=m,V.toString=function(){return this.description||""},V.version&&I.unshift(N),V.name&&I.unshift(U),F&&U&&!(F==String(F).split(" ")[0]&&(F==U.split(" ")[0]||D))&&I.push(D?"("+F+")":"on "+F),I.length&&(V.description=I.join(" ")),V}var _=m();"function"==typeof define&&"object"==typeof define.amd&&define.amd?(o.platform=_,define(function(){return _})):i&&a?d(_,function(e,t){i[t]=e}):o.platform=_}).call(this)},490:function(e){"use strict";var t=String.prototype.replace,n=/%20/g,r="RFC3986";e.exports={default:r,formatters:{RFC1738:function(e){return t.call(e,n,"+")},RFC3986:function(e){return String(e)}},RFC1738:"RFC1738",RFC3986:r}},348:function(e,t,n){"use strict";var r=n(530),o=n(429);e.exports={formats:n(490),parse:o,stringify:r}},429:function(e,t,n){"use strict";var r=n(422),o=Object.prototype.hasOwnProperty,i=Array.isArray,a={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:r.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},s=function(e,t){return e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},u=function(e,t){var n={__proto__:null},u=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,c=t.parameterLimit===1/0?void 0:t.parameterLimit,l=u.split(t.delimiter,c),f=-1,p=t.charset;if(t.charsetSentinel)for(h=0;h<l.length;++h)0===l[h].indexOf("utf8=")&&("utf8=%E2%9C%93"===l[h]?p="utf-8":"utf8=%26%2310003%3B"===l[h]&&(p="iso-8859-1"),f=h,h=l.length);for(h=0;h<l.length;++h)if(h!==f){var h,d,g,y=l[h],v=y.indexOf("]="),b=-1===v?y.indexOf("="):v+1;-1===b?(d=t.decoder(y,a.decoder,p,"key"),g=t.strictNullHandling?null:""):(d=t.decoder(y.slice(0,b),a.decoder,p,"key"),g=r.maybeMap(s(y.slice(b+1),t),function(e){return t.decoder(e,a.decoder,p,"value")})),g&&t.interpretNumericEntities&&"iso-8859-1"===p&&(g=g.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})),y.indexOf("[]=")>-1&&(g=i(g)?[g]:g),o.call(n,d)?n[d]=r.combine(n[d],g):n[d]=g}return n},c=function(e,t,n,r){for(var o=r?t:s(t,n),i=e.length-1;i>=0;--i){var a,u=e[i];if("[]"===u&&n.parseArrays)a=[].concat(o);else{a=n.plainObjects?Object.create(null):{};var c="["===u.charAt(0)&&"]"===u.charAt(u.length-1)?u.slice(1,-1):u,l=parseInt(c,10);n.parseArrays||""!==c?!isNaN(l)&&u!==c&&String(l)===c&&l>=0&&n.parseArrays&&l<=n.arrayLimit?(a=[])[l]=o:"__proto__"!==c&&(a[c]=o):a={0:o}}o=a}return o},l=function(e,t,n,r){if(e){var i=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,a=/(\[[^[\]]*])/g,s=n.depth>0&&/(\[[^[\]]*])/.exec(i),u=s?i.slice(0,s.index):i,l=[];if(u){if(!n.plainObjects&&o.call(Object.prototype,u)&&!n.allowPrototypes)return;l.push(u)}for(var f=0;n.depth>0&&null!==(s=a.exec(i))&&f<n.depth;){if(f+=1,!n.plainObjects&&o.call(Object.prototype,s[1].slice(1,-1))&&!n.allowPrototypes)return;l.push(s[1])}return s&&l.push("["+i.slice(s.index)+"]"),c(l,t,n,r)}},f=function(e){if(!e)return a;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");var t=void 0===e.charset?a.charset:e.charset;return{allowDots:void 0===e.allowDots?a.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:a.allowPrototypes,allowSparse:"boolean"==typeof e.allowSparse?e.allowSparse:a.allowSparse,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:a.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:a.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:a.comma,decoder:"function"==typeof e.decoder?e.decoder:a.decoder,delimiter:"string"==typeof e.delimiter||r.isRegExp(e.delimiter)?e.delimiter:a.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:a.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:a.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:a.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:a.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:a.strictNullHandling}};e.exports=function(e,t){var n=f(t);if(""===e||null==e)return n.plainObjects?Object.create(null):{};for(var o="string"==typeof e?u(e,n):e,i=n.plainObjects?Object.create(null):{},a=Object.keys(o),s=0;s<a.length;++s){var c=a[s],p=l(c,o[c],n,"string"==typeof e);i=r.merge(i,p,n)}return!0===n.allowSparse?i:r.compact(i)}},530:function(e,t,n){"use strict";var r=n(538),o=n(422),i=n(490),a=Object.prototype.hasOwnProperty,s={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},u=Array.isArray,c=Array.prototype.push,l=function(e,t){c.apply(e,u(t)?t:[t])},f=Date.prototype.toISOString,p=i.default,h={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:o.encode,encodeValuesOnly:!1,format:p,formatter:i.formatters[p],indices:!1,serializeDate:function(e){return f.call(e)},skipNulls:!1,strictNullHandling:!1},d={},g=function e(t,n,i,a,s,c,f,p,g,y,v,b,m,_,w,S){for(var k,O,E=t,x=S,A=0,R=!1;void 0!==(x=x.get(d))&&!R;){var P=x.get(t);if(A+=1,void 0!==P)if(P===A)throw RangeError("Cyclic object value");else R=!0;void 0===x.get(d)&&(A=0)}if("function"==typeof p?E=p(n,E):E instanceof Date?E=v(E):"comma"===i&&u(E)&&(E=o.maybeMap(E,function(e){return e instanceof Date?v(e):e})),null===E){if(s)return f&&!_?f(n,h.encoder,w,"key",b):n;E=""}if("string"==typeof(k=E)||"number"==typeof k||"boolean"==typeof k||"symbol"==typeof k||"bigint"==typeof k||o.isBuffer(E))return f?[m(_?n:f(n,h.encoder,w,"key",b))+"="+m(f(E,h.encoder,w,"value",b))]:[m(n)+"="+m(String(E))];var C=[];if(void 0===E)return C;if("comma"===i&&u(E))_&&f&&(E=o.maybeMap(E,f)),O=[{value:E.length>0?E.join(",")||null:void 0}];else if(u(p))O=p;else{var I=Object.keys(E);O=g?I.sort(g):I}for(var j=a&&u(E)&&1===E.length?n+"[]":n,T=0;T<O.length;++T){var N=O[T],L="object"==typeof N&&void 0!==N.value?N.value:E[N];if(!c||null!==L){var U=u(E)?"function"==typeof i?i(j,N):j:j+(y?"."+N:"["+N+"]");S.set(t,A);var D=r();D.set(d,S),l(C,e(L,U,i,a,s,c,"comma"===i&&_&&u(E)?null:f,p,g,y,v,b,m,_,w,D))}}return C},y=function(e){if(!e)return h;if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw TypeError("Encoder has to be a function.");var t=e.charset||h.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(!a.call(i.formatters,e.format))throw TypeError("Unknown format option provided.");n=e.format}var r=i.formatters[n],o=h.filter;return("function"==typeof e.filter||u(e.filter))&&(o=e.filter),{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:h.addQueryPrefix,allowDots:void 0===e.allowDots?h.allowDots:!!e.allowDots,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:h.charsetSentinel,delimiter:void 0===e.delimiter?h.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:h.encode,encoder:"function"==typeof e.encoder?e.encoder:h.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:h.encodeValuesOnly,filter:o,format:n,formatter:r,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:h.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:h.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:h.strictNullHandling}};e.exports=function(e,t){var n,o,i=e,a=y(t);"function"==typeof a.filter?i=(0,a.filter)("",i):u(a.filter)&&(n=a.filter);var c=[];if("object"!=typeof i||null===i)return"";o=t&&t.arrayFormat in s?t.arrayFormat:t&&"indices"in t?t.indices?"indices":"repeat":"indices";var f=s[o];if(t&&"commaRoundTrip"in t&&"boolean"!=typeof t.commaRoundTrip)throw TypeError("`commaRoundTrip` must be a boolean, or absent");var p="comma"===f&&t&&t.commaRoundTrip;n||(n=Object.keys(i)),a.sort&&n.sort(a.sort);for(var h=r(),d=0;d<n.length;++d){var v=n[d];a.skipNulls&&null===i[v]||l(c,g(i[v],v,f,p,a.strictNullHandling,a.skipNulls,a.encode?a.encoder:null,a.filter,a.sort,a.allowDots,a.serializeDate,a.format,a.formatter,a.encodeValuesOnly,a.charset,h))}var b=c.join(a.delimiter),m=!0===a.addQueryPrefix?"?":"";return a.charsetSentinel&&("iso-8859-1"===a.charset?m+="utf8=%26%2310003%3B&":m+="utf8=%E2%9C%93&"),b.length>0?m+b:""}},422:function(e,t,n){"use strict";var r=n(490),o=Object.prototype.hasOwnProperty,i=Array.isArray,a=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),s=function(e){for(;e.length>1;){var t=e.pop(),n=t.obj[t.prop];if(i(n)){for(var r=[],o=0;o<n.length;++o)void 0!==n[o]&&r.push(n[o]);t.obj[t.prop]=r}}},u=function(e,t){for(var n=t&&t.plainObjects?Object.create(null):{},r=0;r<e.length;++r)void 0!==e[r]&&(n[r]=e[r]);return n};e.exports={arrayToObject:u,assign:function(e,t){return Object.keys(t).reduce(function(e,n){return e[n]=t[n],e},e)},combine:function(e,t){return[].concat(e,t)},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],n=[],r=0;r<t.length;++r)for(var o=t[r],i=o.obj[o.prop],a=Object.keys(i),u=0;u<a.length;++u){var c=a[u],l=i[c];"object"==typeof l&&null!==l&&-1===n.indexOf(l)&&(t.push({obj:i,prop:c}),n.push(l))}return s(t),e},decode:function(e,t,n){var r=e.replace(/\+/g," ");if("iso-8859-1"===n)return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch(e){return r}},encode:function(e,t,n,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"===n)return escape(s).replace(/%u[0-9a-f]{4}/gi,function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"});for(var u="",c=0;c<s.length;++c){var l=s.charCodeAt(c);if(45===l||46===l||95===l||126===l||l>=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122||i===r.RFC1738&&(40===l||41===l)){u+=s.charAt(c);continue}if(l<128){u+=a[l];continue}if(l<2048){u+=a[192|l>>6]+a[128|63&l];continue}if(l<55296||l>=57344){u+=a[224|l>>12]+a[128|l>>6&63]+a[128|63&l];continue}c+=1,u+=a[240|(l=65536+((1023&l)<<10|1023&s.charCodeAt(c)))>>18]+a[128|l>>12&63]+a[128|l>>6&63]+a[128|63&l]}return u},isBuffer:function(e){return!!e&&"object"==typeof e&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(i(e)){for(var n=[],r=0;r<e.length;r+=1)n.push(t(e[r]));return n}return t(e)},merge:function e(t,n,r){if(!n)return t;if("object"!=typeof n){if(i(t))t.push(n);else{if(!t||"object"!=typeof t)return[t,n];(r&&(r.plainObjects||r.allowPrototypes)||!o.call(Object.prototype,n))&&(t[n]=!0)}return t}if(!t||"object"!=typeof t)return[t].concat(n);var a=t;return(i(t)&&!i(n)&&(a=u(t,r)),i(t)&&i(n))?(n.forEach(function(n,i){if(o.call(t,i)){var a=t[i];a&&"object"==typeof a&&n&&"object"==typeof n?t[i]=e(a,n,r):t.push(n)}else t[i]=n}),t):Object.keys(n).reduce(function(t,i){var a=n[i];return o.call(t,i)?t[i]=e(t[i],a,r):t[i]=a,t},a)}}},538:function(e,t,n){"use strict";var r=n(528),o=n(737),i=n(970),a=n(682),s=r("%WeakMap%",!0),u=r("%Map%",!0),c=o("WeakMap.prototype.get",!0),l=o("WeakMap.prototype.set",!0),f=o("WeakMap.prototype.has",!0),p=o("Map.prototype.get",!0),h=o("Map.prototype.set",!0),d=o("Map.prototype.has",!0),g=function(e,t){for(var n,r=e;null!==(n=r.next);r=n)if(n.key===t)return r.next=n.next,n.next=e.next,e.next=n,n},y=function(e,t){var n=g(e,t);return n&&n.value},v=function(e,t,n){var r=g(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}};e.exports=function(){var e,t,n,r={assert:function(e){if(!r.has(e))throw new a("Side channel does not contain "+i(e))},get:function(r){if(s&&r&&("object"==typeof r||"function"==typeof r)){if(e)return c(e,r)}else if(u){if(t)return p(t,r)}else if(n)return y(n,r)},has:function(r){if(s&&r&&("object"==typeof r||"function"==typeof r)){if(e)return f(e,r)}else if(u){if(t)return d(t,r)}else if(n)return!!g(n,r);return!1},set:function(r,o){s&&r&&("object"==typeof r||"function"==typeof r)?(e||(e=new s),l(e,r,o)):u?(t||(t=new u),h(t,r,o)):(n||(n={key:{},next:null}),v(n,r,o))}};return r}},488:function(e,t,n){!function(e){"use strict";var t,n,r=function(){try{if(e.URLSearchParams&&"bar"===new e.URLSearchParams("foo=bar").get("foo"))return e.URLSearchParams}catch(e){}return null}(),o=r&&"a=1"===new r({a:1}).toString(),i=r&&"+"===new r("s=%2B").get("s"),a=r&&"size"in r.prototype,s="__URLSearchParams__",u=!r||((t=new r).append("s"," &"),"s=+%26"===t.toString()),c=h.prototype,l=!!(e.Symbol&&e.Symbol.iterator);if(!r||!o||!i||!u||!a){c.append=function(e,t){b(this[s],e,t)},c.delete=function(e){delete this[s][e]},c.get=function(e){var t=this[s];return this.has(e)?t[e][0]:null},c.getAll=function(e){var t=this[s];return this.has(e)?t[e].slice(0):[]},c.has=function(e){return _(this[s],e)},c.set=function(e,t){this[s][e]=[""+t]},c.toString=function(){var e,t,n,r,o=this[s],i=[];for(t in o)for(e=0,n=d(t),r=o[t];e<r.length;e++)i.push(n+"="+d(r[e]));return i.join("&")};var f=e.Proxy&&r&&(!i||!u||!o||!a);f?(n=new Proxy(r,{construct:function(e,t){return new e(new h(t[0]).toString())}})).toString=Function.prototype.toString.bind(h):n=h,Object.defineProperty(e,"URLSearchParams",{value:n});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 n=v(this.toString());Object.getOwnPropertyNames(n).forEach(function(r){n[r].forEach(function(n){e.call(t,n,r,this)},this)},this)}),"sort"in p||(p.sort=function(){var e,t,n,r=v(this.toString()),o=[];for(e in r)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],a=r[i];for(n=0;n<a.length;n++)this.append(i,a[n])}}),"keys"in p||(p.keys=function(){var e=[];return this.forEach(function(t,n){e.push(n)}),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,n){e.push([n,t])}),y(e)}),l&&(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,n){return t+e[n].length},0)}})}function h(e){((e=e||"")instanceof URLSearchParams||e instanceof h)&&(e=e.toString()),this[s]=v(e)}function d(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 n={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return l&&(n[e.Symbol.iterator]=function(){return n}),n}function v(e){var t={};if("object"==typeof e)if(m(e))for(var n=0;n<e.length;n++){var r=e[n];if(m(r)&&2===r.length)b(t,r[0],r[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("&"),a=0;a<i.length;a++){var s=i[a],u=s.indexOf("=");-1<u?b(t,g(s.slice(0,u)),g(s.slice(u+1))):s&&b(t,g(s),"")}}return t}function b(e,t,n){var r="string"==typeof n?n:null!=n&&"function"==typeof n.toString?n.toString():JSON.stringify(n);_(e,t)?e[t].push(r):e[t]=[r]}function m(e){return!!e&&"[object Array]"===Object.prototype.toString.call(e)}function _(e,t){return Object.prototype.hasOwnProperty.call(e,t)}}(void 0!==n.g?n.g:"undefined"!=typeof window?window:this)},243:function(e){"use strict";e.exports=r},297:function(e){"use strict";e.exports=n},385:function(t){"use strict";t.exports=e},192:function(e){"use strict";e.exports=t},194:function(){},917:function(){},734:function(){},850:function(e,t,n){var r;if("function"==typeof fetch&&(r=void 0!==n.g&&n.g.fetch?n.g.fetch:"undefined"!=typeof window&&window.fetch?window.fetch:fetch),"undefined"==typeof window||void 0===window.document){var o=r||n(456);o.default&&(o=o.default),t.default=o,e.exports=t.default}}},i={};function a(e){var t=i[e];if(void 0!==t)return t.exports;var n=i[e]={id:e,loaded:!1,exports:{}};return o[e].call(n.exports,n,n.exports,a),n.loaded=!0,n.exports}a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},(()=>{var e,t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__;a.t=function(n,r){if(1&r&&(n=this(n)),8&r||"object"==typeof n&&n&&(4&r&&n.__esModule||16&r&&"function"==typeof n.then))return n;var o=Object.create(null);a.r(o);var i={};e=e||[null,t({}),t([]),t(t)];for(var s=2&r&&n;"object"==typeof s&&!~e.indexOf(s);s=t(s))Object.getOwnPropertyNames(s).forEach(e=>{i[e]=()=>n[e]});return i.default=()=>n,a.d(o,i),o}})(),a.d=(e,t)=>{for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.g=(()=>{if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}})(),a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var s={};return(()=>{"use strict";a.r(s),a.d(s,{DefaultBoxShadowBottom:()=>t7,DefaultColor3:()=>t8,RESTRICTED_USER_REALM_ROLE:()=>na,Util:()=>u,ORError:()=>o,DefaultColor10:()=>t4,DEFAULT_ICONSET:()=>no,EventProviderStatus:()=>e,DefaultHeaderHeight:()=>nt,DefaultColor1:()=>t0,OPENREMOTE_CLIENT_ID:()=>ni,manager:()=>nl,DefaultColor9:()=>t6,Console:()=>tm,DefaultColor8:()=>t5,DEFAULT_LANGUAGES:()=>ns,DefaultColor4:()=>tQ,subscribe:()=>tX,DefaultColor2:()=>t1,DefaultColor5:()=>t2,DefaultBoxShadow:()=>ne,DefaultDisabledOpacity:()=>nn,DefaultColor11:()=>t9,OREvent:()=>i,normaliseConfig:()=>nu,Manager:()=>nc,default:()=>nf,DefaultColor6:()=>t3,DefaultColor7:()=>tZ,WebSocketEventProvider:()=>tR});var e,t,n,r,o,i,u={};function c(e){return(c="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 l(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function f(e){var t=function(e,t){if("object"!=c(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=c(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==c(t)?t:String(t)}function p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,f(r.key),r)}}function h(e,t,n){return t&&p(e.prototype,t),n&&p(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function d(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function g(e,t){return(g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function y(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&&g(e,t)}function v(e,t){if(t&&("object"===c(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return d(e)}function b(e){return(b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function m(e,t,n){return(t=f(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function w(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function S(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?w(Object(n),!0).forEach(function(t){m(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):w(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}a.r(u),a.d(u,{Deferred:()=>e_,arrayRemove:()=>eT,blobToBase64:()=>ty,camelCaseToSentenceCase:()=>eL,capitaliseFirstLetter:()=>eD,cronStringToISOString:()=>eq,dateToCronString:()=>eH,difference:()=>ej,disableScroll:()=>td,dispatchCancellableEvent:()=>ts,enableScroll:()=>tg,enumContains:()=>eM,formatCronString:()=>eV,getAllowedValueLabel:()=>eJ,getAssetTypeLabel:()=>eG,getAttributeLabel:()=>eX,getAttributeUnits:()=>e4,getAttributeValueAsString:()=>e0,getAttributeValueConstraints:()=>e8,getAttributeValueFormat:()=>e7,getBrowserLanguage:()=>ew,getEnumKeyAsString:()=>eF,getGeoNotificationsFromRulesSet:()=>eO,getMetaItemNameValueHolder:()=>eY,getMetaLabel:()=>eQ,getMetaUnits:()=>e9,getMetaValue:()=>ez,getMetaValueAsString:()=>e1,getMetaValueConstraints:()=>e6,getMetaValueFormat:()=>te,getQueryParameter:()=>ek,getQueryParameters:()=>eS,getValueAsString:()=>e3,getValueDescriptorLabel:()=>e$,getWeekNumber:()=>eB,hasMetaItem:()=>eK,isFunction:()=>eC,isObject:()=>eP,isTimeDuration:()=>ex,isTimeDurationNegativeInfinity:()=>eR,isTimeDurationPositiveInfinity:()=>eA,loadJs:()=>to,mergeObjects:()=>function e(t,n,r){if(t&&!n)return Object.assign({},t);if(n&&!t)return Object.assign({},n);let o=Object.assign({},t),i=[];return Object.entries(n).forEach(([t,n])=>{var a,s,u,c,l;let f;a=o,s=i,u=t,c=n,l=r,f=a,s.forEach(e=>{f.hasOwnProperty(e)||(f[e]={}),f=f[e]}),f&&(f.hasOwnProperty(u)?null==c?delete f[u]:Array.isArray(f[u])?l?f[u]=[...f[u],...c]:f[u]=[...c]:"object"==typeof c?f[u]=e(Object.assign({},f[u]),c,l):f[u]=c:null==c?delete f[u]:Array.isArray(c)?f[u]=[...c]:"object"==typeof c?f[u]=Object.assign({},c):f[u]=c)}),o},objectsEqual:()=>eI,resolveUnits:()=>e5,sentenceCaseToCamelCase:()=>eN,sortByNumber:()=>ti,sortByString:()=>ta,stringMatch:()=>eU,updateAsset:()=>tr}),a(488);var k={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)}},O=new(function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};l(this,e),this.init(t,n)}return h(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||k,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),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"log","",!0)}},{key:"warn",value:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","",!0)}},{key:"error",value:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"error","")}},{key:"deprecate",value:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(e,t,n,r){return r&&!this.debug?null:("string"==typeof e[0]&&(e[0]="".concat(n).concat(this.prefix," ").concat(e[0])),this.logger[t](e))}},{key:"create",value:function(t){return new e(this.logger,S(S({},{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}()),E=function(){function e(){l(this,e),this.observers={}}return h(e,[{key:"on",value:function(e,t){var n=this;return e.split(" ").forEach(function(e){n.observers[e]=n.observers[e]||[],n.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,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];this.observers[e]&&[].concat(this.observers[e]).forEach(function(e){e.apply(void 0,n)}),this.observers["*"]&&[].concat(this.observers["*"]).forEach(function(t){t.apply(t,[e].concat(n))})}}]),e}();function x(){var e,t,n=new Promise(function(n,r){e=n,t=r});return n.resolve=e,n.reject=t,n}function A(e){return null==e?"":""+e}function R(e,t,n){function r(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 a=r(i.shift());!e[a]&&n&&(e[a]=new n),e=Object.prototype.hasOwnProperty.call(e,a)?e[a]:{}}return o()?{}:{obj:e,k:r(i.shift())}}function P(e,t,n){var r=R(e,t,Object);r.obj[r.k]=n}function C(e,t){var n=R(e,t),r=n.obj,o=n.k;if(r)return r[o]}function I(e,t,n){var r=C(e,n);return void 0!==r?r:C(t,n)}function j(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var T={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function N(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,function(e){return T[e]}):e}var L="undefined"!=typeof window&&window.navigator&&void 0===window.navigator.userAgentData&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,U=[" ",",","?","!",";"];function D(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function M(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?D(Object(n),!0).forEach(function(t){m(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):D(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var F=function(e){y(r,e);var t,n=(t=function(){if("undefined"==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,n=b(r);return e=t?Reflect.construct(n,arguments,b(this).constructor):n.apply(this,arguments),v(this,e)});function r(e){var t,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return l(this,r),t=n.call(this),L&&E.call(d(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 h(r,[{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,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,i=void 0!==r.ignoreJSONStructure?r.ignoreJSONStructure:this.options.ignoreJSONStructure,a=[e,t];n&&"string"!=typeof n&&(a=a.concat(n)),n&&"string"==typeof n&&(a=a.concat(o?n.split(o):n)),e.indexOf(".")>-1&&(a=e.split("."));var s=C(this.data,a);return s||!i||"string"!=typeof n?s:function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(t){if(t[n])return t[n];for(var o=n.split(r),i=t,a=0;a<o.length;++a){if(!i||"string"==typeof i[o[a]]&&a+1<o.length)return;if(void 0===i[o[a]]){for(var s=2,u=o.slice(a,a+s).join(r),c=i[u];void 0===c&&o.length>a+s;)s++,c=i[u=o.slice(a,a+s).join(r)];if(void 0===c)return;if(null===c)return null;if(n.endsWith(u)){if("string"==typeof c)return c;if(u&&"string"==typeof c[u])return c[u]}var l=o.slice(a+s).join(r);if(l)return e(c,l,r);return}i=i[o[a]]}return i}}(this.data&&this.data[e]&&this.data[e][t],n,o)}},{key:"addResource",value:function(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},i=this.options.keySeparator;void 0===i&&(i=".");var a=[e,t];n&&(a=a.concat(i?n.split(i):n)),e.indexOf(".")>-1&&(a=e.split("."),r=t,t=a[1]),this.addNamespaces(t),P(this.data,a,r),o.silent||this.emit("added",e,t,n,r)}},{key:"addResources",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var o in n)("string"==typeof n[o]||"[object Array]"===Object.prototype.toString.apply(n[o]))&&this.addResource(e,t,o,n[o],{silent:!0});r.silent||this.emit("added",e,t,n)}},{key:"addResourceBundle",value:function(e,t,n,r,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},a=[e,t];e.indexOf(".")>-1&&(a=e.split("."),r=n,n=t,t=a[1]),this.addNamespaces(t);var s=C(this.data,a)||{};r?function e(t,n,r){for(var o in n)"__proto__"!==o&&"constructor"!==o&&(o in t?"string"==typeof t[o]||t[o]instanceof String||"string"==typeof n[o]||n[o]instanceof String?r&&(t[o]=n[o]):e(t[o],n[o],r):t[o]=n[o]);return t}(s,n,o):s=M(M({},s),n),P(this.data,a,s),i.silent||this.emit("added",e,t,n)}},{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)?M(M({},{}),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}}]),r}(E),B={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,t,n,r,o){var i=this;return e.forEach(function(e){i.processors[e]&&(t=i.processors[e].process(t,n,r,o))}),t}};function W(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function V(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?W(Object(n),!0).forEach(function(t){m(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):W(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var H={},q=function(e){y(r,e);var t,n=(t=function(){if("undefined"==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,n=b(r);return e=t?Reflect.construct(n,arguments,b(this).constructor):n.apply(this,arguments),v(this,e)});function r(e){var t,o,i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return l(this,r),i=n.call(this),L&&E.call(d(i)),t=["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],o=d(i),t.forEach(function(t){e[t]&&(o[t]=e[t])}),i.options=a,void 0===i.options.keySeparator&&(i.options.keySeparator="."),i.logger=O.create("translator"),i}return h(r,[{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 n=this.resolve(e,t);return n&&void 0!==n.res}},{key:"extractFromKey",value:function(e,t){var n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");var r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,o=t.ns||this.options.defaultNS||[],i=n&&e.indexOf(n)>-1,a=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!function(e,t,n){t=t||"",n=n||"";var r=U.filter(function(e){return 0>t.indexOf(e)&&0>n.indexOf(e)});if(0===r.length)return!0;var o=new RegExp("(".concat(r.map(function(e){return"?"===e?"\\?":e}).join("|"),")")),i=!o.test(e);if(!i){var a=e.indexOf(n);a>0&&!o.test(e.substring(0,a))&&(i=!0)}return i}(e,n,r);if(i&&!a){var s=e.match(this.interpolator.nestingRegexp);if(s&&s.length>0)return{key:e,namespaces:o};var u=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(u[0])>-1)&&(o=u.shift()),e=u.join(r)}return"string"==typeof o&&(o=[o]),{key:e,namespaces:o}}},{key:"translate",value:function(e,t,n){var o=this;if("object"!==c(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,a=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,s=this.extractFromKey(e[e.length-1],t),u=s.key,l=s.namespaces,f=l[l.length-1],p=t.lng||this.language,h=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(p&&"cimode"===p.toLowerCase()){if(h){var d=t.nsSeparator||this.options.nsSeparator;return i?(g.res="".concat(f).concat(d).concat(u),g):"".concat(f).concat(d).concat(u)}return i?(g.res=u,g):u}var g=this.resolve(e,t),y=g&&g.res,v=g&&g.usedKey||u,b=g&&g.exactUsedKey||u,m=Object.prototype.toString.apply(y),_=void 0!==t.joinArrays?t.joinArrays:this.options.joinArrays,w=!this.i18nFormat||this.i18nFormat.handleAsObject,S="string"!=typeof y&&"boolean"!=typeof y&&"number"!=typeof y;if(w&&y&&S&&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,V(V({},t),{},{ns:l})):"key '".concat(u," (").concat(this.language,")' returned an object instead of string.");return i?(g.res=k,g):k}if(a){var O="[object Array]"===m,E=O?[]:{},x=O?b:v;for(var A in y)if(Object.prototype.hasOwnProperty.call(y,A)){var R="".concat(x).concat(a).concat(A);E[A]=this.translate(R,V(V({},t),{joinArrays:!1,ns:l})),E[A]===R&&(E[A]=y[A])}y=E}}else if(w&&"string"==typeof _&&"[object Array]"===m)(y=y.join(_))&&(y=this.extendTranslation(y,e,t,n));else{var P=!1,C=!1,I=void 0!==t.count&&"string"!=typeof t.count,j=r.hasDefaultValue(t),T=I?this.pluralResolver.getSuffix(p,t.count,t):"",N=t["defaultValue".concat(T)]||t.defaultValue;!this.isValidLookup(y)&&j&&(P=!0,y=N),this.isValidLookup(y)||(C=!0,y=u);var L=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&C?void 0:y,U=j&&N!==y&&this.options.updateMissing;if(C||P||U){if(this.logger.log(U?"updateKey":"missingKey",p,f,u,U?N:y),a){var D=this.resolve(u,V(V({},t),{},{keySeparator:!1}));D&&D.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 W=function(e,n,r){var i=j&&r!==y?r:L;o.options.missingKeyHandler?o.options.missingKeyHandler(e,f,n,i,U,t):o.backendConnector&&o.backendConnector.saveMissing&&o.backendConnector.saveMissing(e,f,n,i,U,t),o.emit("missingKey",e,f,n,y)};this.options.saveMissing&&(this.options.saveMissingPlurals&&I?M.forEach(function(e){o.pluralResolver.getSuffixes(e,t).forEach(function(n){W([e],u+n,t["defaultValue".concat(n)]||N)})}):W(M,u,N))}y=this.extendTranslation(y,e,t,g,n),C&&y===u&&this.options.appendNamespaceToMissingKey&&(y="".concat(f,":").concat(u)),(C||P)&&this.options.parseMissingKeyHandler&&(y="v1"!==this.options.compatibilityAPI?this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?"".concat(f,":").concat(u):u,P?y:void 0):this.options.parseMissingKeyHandler(y))}return i?(g.res=y,g):y}},{key:"extendTranslation",value:function(e,t,n,r,o){var i=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,V(V({},this.options.interpolation.defaultVariables),n),r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init(V(V({},n),{interpolation:V(V({},this.options.interpolation),n.interpolation)}));var a,s="string"==typeof e&&(n&&n.interpolation&&void 0!==n.interpolation.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);if(s){var u=e.match(this.interpolator.nestingRegexp);a=u&&u.length}var c=n.replace&&"string"!=typeof n.replace?n.replace:n;if(this.options.interpolation.defaultVariables&&(c=V(V({},this.options.interpolation.defaultVariables),c)),e=this.interpolator.interpolate(e,c,n.lng||this.language,n),s){var l=e.match(this.interpolator.nestingRegexp);a<(l&&l.length)&&(n.nest=!1)}!1!==n.nest&&(e=this.interpolator.nest(e,function(){for(var e=arguments.length,r=Array(e),a=0;a<e;a++)r[a]=arguments[a];return o&&o[0]===r[0]&&!n.context?(i.logger.warn("It seems you are nesting recursively key: ".concat(r[0]," in key: ").concat(t[0])),null):i.translate.apply(i,r.concat([t]))},n)),n.interpolation&&this.interpolator.reset()}var f=n.postProcess||this.options.postProcess,p="string"==typeof f?[f]:f;return null!=e&&p&&p.length&&!1!==n.applyPostProcessor&&(e=B.handle(p,e,t,this.options&&this.options.postProcessPassResolved?V({i18nResolved:r},n):n,this)),e}},{key:"resolve",value:function(e){var t,n,r,o,i,a=this,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach(function(e){if(!a.isValidLookup(t)){var u=a.extractFromKey(e,s),c=u.key;n=c;var l=u.namespaces;a.options.fallbackNS&&(l=l.concat(a.options.fallbackNS));var f=void 0!==s.count&&"string"!=typeof s.count,p=f&&!s.ordinal&&0===s.count&&a.pluralResolver.shouldUseIntlApi(),h=void 0!==s.context&&("string"==typeof s.context||"number"==typeof s.context)&&""!==s.context,d=s.lngs?s.lngs:a.languageUtils.toResolveHierarchy(s.lng||a.language,s.fallbackLng);l.forEach(function(e){a.isValidLookup(t)||(i=e,!H["".concat(d[0],"-").concat(e)]&&a.utils&&a.utils.hasLoadedNamespace&&!a.utils.hasLoadedNamespace(i)&&(H["".concat(d[0],"-").concat(e)]=!0,a.logger.warn('key "'.concat(n,'" for languages "').concat(d.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!!!")),d.forEach(function(n){if(!a.isValidLookup(t)){o=n;var i,u=[c];if(a.i18nFormat&&a.i18nFormat.addLookupKeys)a.i18nFormat.addLookupKeys(u,c,n,e,s);else{f&&(l=a.pluralResolver.getSuffix(n,s.count,s));var l,d="".concat(a.options.pluralSeparator,"zero");if(f&&(u.push(c+l),p&&u.push(c+d)),h){var g="".concat(c).concat(a.options.contextSeparator).concat(s.context);u.push(g),f&&(u.push(g+l),p&&u.push(g+d))}}for(;i=u.pop();)a.isValidLookup(t)||(r=i,t=a.getResource(n,e,i,s))}}))})}}),{res:t,usedKey:n,exactUsedKey:r,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,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}}],[{key:"hasDefaultValue",value:function(e){var t="defaultValue";for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,t.length)&&void 0!==e[n])return!0;return!1}}]),r}(E);function z(e){return e.charAt(0).toUpperCase()+e.slice(1)}var K=function(){function e(t){l(this,e),this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=O.create("languageUtils")}return h(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"],n=e.split("-");return this.options.lowerCaseLng?n=n.map(function(e){return e.toLowerCase()}):2===n.length?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=z(n[1].toLowerCase()))):3===n.length&&(n[0]=n[0].toLowerCase(),2===n[1].length&&(n[1]=n[1].toUpperCase()),"sgn"!==n[0]&&2===n[2].length&&(n[2]=n[2].toUpperCase()),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=z(n[1].toLowerCase())),t.indexOf(n[2].toLowerCase())>-1&&(n[2]=z(n[2].toLowerCase()))),n.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,n=this;return e?(e.forEach(function(e){if(!t){var r=n.formatLanguageCode(e);(!n.options.supportedLngs||n.isSupportedCode(r))&&(t=r)}}),!t&&this.options.supportedLngs&&e.forEach(function(e){if(!t){var r=n.getLanguagePartFromCode(e);if(n.isSupportedCode(r))return t=r;t=n.options.supportedLngs.find(function(e){if(0===e.indexOf(r))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 n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}},{key:"toResolveHierarchy",value:function(e,t){var n=this,r=this.getFallbackCodes(t||this.options.fallbackLng||[],e),o=[],i=function(e){e&&(n.isSupportedCode(e)?o.push(e):n.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)),r.forEach(function(e){0>o.indexOf(e)&&i(n.formatLanguageCode(e))}),o}}]),e}(),G=[{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}],$={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)}},J=["v1","v2","v3"],Y={zero:0,one:1,two:2,few:3,many:4,other:5},X=function(){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};l(this,e),this.languageUtils=t,this.options=r,this.logger=O.create("pluralResolver"),this.options.compatibilityJSON&&"v4"!==this.options.compatibilityJSON||"undefined"!=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=(n={},G.forEach(function(e){e.lngs.forEach(function(t){n[t]={numbers:e.nr,plurals:$[e.fc]}})}),n)}return h(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]:{},n=this.getRule(e,t);return this.shouldUseIntlApi()?n&&n.resolvedOptions().pluralCategories.length>1:n&&n.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.getSuffixes(e,n).map(function(e){return"".concat(t).concat(e)})}},{key:"getSuffixes",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.getRule(e,n);return r?this.shouldUseIntlApi()?r.resolvedOptions().pluralCategories.sort(function(e,t){return Y[e]-Y[t]}).map(function(e){return"".concat(t.options.prepend).concat(e)}):r.numbers.map(function(r){return t.getSuffix(e,r,n)}):[]}},{key:"getSuffix",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.getRule(e,n);return r?this.shouldUseIntlApi()?"".concat(this.options.prepend).concat(r.select(t)):this.getSuffixRetroCompatible(r,t):(this.logger.warn("no plural rule found for: ".concat(e)),"")}},{key:"getSuffixRetroCompatible",value:function(e,t){var n=this,r=e.noAbs?e.plurals(t):e.plurals(Math.abs(t)),o=e.numbers[r];this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]&&(2===o?o="plural":1===o&&(o=""));var i=function(){return n.options.prepend&&o.toString()?n.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&&r.toString()?this.options.prepend+r.toString():r.toString()}},{key:"shouldUseIntlApi",value:function(){return!J.includes(this.options.compatibilityJSON)}}]),e}();function Q(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Z(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Q(Object(n),!0).forEach(function(t){m(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Q(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var ee=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};l(this,e),this.logger=O.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(e){return e},this.init(t)}return h(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:N,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 n="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=RegExp(n,"g")}},{key:"interpolate",value:function(e,t,n,r){var o,i,a,s=this,u=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function c(e){return e.replace(/\$/g,"$$$$")}var l=function(e){if(0>e.indexOf(s.formatSeparator)){var o=I(t,u,e);return s.alwaysFormat?s.format(o,void 0,n,Z(Z(Z({},r),t),{},{interpolationkey:e})):o}var i=e.split(s.formatSeparator),a=i.shift().trim(),c=i.join(s.formatSeparator).trim();return s.format(I(t,u,a),c,n,Z(Z(Z({},r),t),{},{interpolationkey:a}))};this.resetRegExp();var f=r&&r.missingInterpolationHandler||this.options.missingInterpolationHandler,p=r&&r.interpolation&&void 0!==r.interpolation.skipOnVariables?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:function(e){return c(e)}},{regex:this.regexp,safeValue:function(e){return s.escapeValue?c(s.escape(e)):c(e)}}].forEach(function(t){for(a=0;o=t.regex.exec(e);){var n=o[1].trim();if(void 0===(i=l(n)))if("function"==typeof f){var u=f(e,o,r);i="string"==typeof u?u:""}else if(r&&r.hasOwnProperty(n))i="";else if(p){i=o[0];continue}else s.logger.warn("missed to pass in variable ".concat(n," for interpolating ").concat(e)),i="";else"string"==typeof i||s.useRawValueToEscape||(i=A(i));var c=t.safeValue(i);if(e=e.replace(o[0],c),p?(t.regex.lastIndex+=i.length,t.regex.lastIndex-=o[0].length):t.regex.lastIndex=0,++a>=s.maxReplaces)break}}),e}},{key:"nest",value:function(e,t){var n,r,o=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=Z({},i);function s(e,t){var n=this.nestingOptionsSeparator;if(0>e.indexOf(n))return e;var r=e.split(new RegExp("".concat(n,"[ ]*{"))),o="{".concat(r[1]);e=r[0];var i=(o=this.interpolate(o,a)).match(/'/g),s=o.match(/"/g);(i&&i.length%2==0&&!s||s.length%2!=0)&&(o=o.replace(/'/g,'"'));try{a=JSON.parse(o),t&&(a=Z(Z({},t),a))}catch(t){return this.logger.warn("failed parsing options string in nesting for key ".concat(e),t),"".concat(e).concat(n).concat(o)}return delete a.defaultValue,e}for(a.applyPostProcessor=!1,delete a.defaultValue;n=this.nestingRegexp.exec(e);){var u=[],c=!1;if(-1!==n[0].indexOf(this.formatSeparator)&&!/{.*}/.test(n[1])){var l=n[1].split(this.formatSeparator).map(function(e){return e.trim()});n[1]=l.shift(),u=l,c=!0}if((r=t(s.call(this,n[1].trim(),a),a))&&n[0]===e&&"string"!=typeof r)return r;"string"!=typeof r&&(r=A(r)),r||(this.logger.warn("missed to resolve ".concat(n[1]," for nesting ").concat(e)),r=""),c&&(r=u.reduce(function(e,t){return o.format(e,t,i.lng,Z(Z({},i),{},{interpolationkey:n[1].trim()}))},r.trim())),e=e.replace(n[0],r),this.regexp.lastIndex=0}return e}}]),e}();function et(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function en(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?et(Object(n),!0).forEach(function(t){m(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):et(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function er(e){var t={};return function(n,r,o){var i=r+JSON.stringify(o),a=t[i];return a||(a=e(r,o),t[i]=a),a(n)}}var eo=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};l(this,e),this.logger=O.create("formatter"),this.options=t,this.formats={number:er(function(e,t){var n=new Intl.NumberFormat(e,t);return function(e){return n.format(e)}}),currency:er(function(e,t){var n=new Intl.NumberFormat(e,en(en({},t),{},{style:"currency"}));return function(e){return n.format(e)}}),datetime:er(function(e,t){var n=new Intl.DateTimeFormat(e,en({},t));return function(e){return n.format(e)}}),relativetime:er(function(e,t){var n=new Intl.RelativeTimeFormat(e,en({},t));return function(e){return n.format(e,t.range||"day")}}),list:er(function(e,t){var n=new Intl.ListFormat(e,en({},t));return function(e){return n.format(e)}})},this.init(t)}return h(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}},n=t.interpolation;this.formatSeparator=n.formatSeparator?n.formatSeparator:n.formatSeparator||","}},{key:"add",value:function(e,t){this.formats[e.toLowerCase().trim()]=t}},{key:"addCached",value:function(e,t){this.formats[e.toLowerCase().trim()]=er(t)}},{key:"format",value:function(e,t,n,r){var o=this;return t.split(this.formatSeparator).reduce(function(e,t){var i=function(e){var t=e.toLowerCase().trim(),n={};if(e.indexOf("(")>-1){var r=e.split("(");t=r[0].toLowerCase().trim();var o=r[1].substring(0,r[1].length-1);"currency"===t&&0>o.indexOf(":")?n.currency||(n.currency=o.trim()):"relativetime"===t&&0>o.indexOf(":")?n.range||(n.range=o.trim()):o.split(";").forEach(function(e){if(e){var t,r=function(e){if(Array.isArray(e))return e}(t=e.split(":"))||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return _(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _(e,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=r[0],i=r.slice(1).join(":").trim().replace(/^'+|'+$/g,"");n[o.trim()]||(n[o.trim()]=i),"false"===i&&(n[o.trim()]=!1),"true"===i&&(n[o.trim()]=!0),isNaN(i)||(n[o.trim()]=parseInt(i,10))}})}return{formatName:t,formatOptions:n}}(t),a=i.formatName,s=i.formatOptions;if(o.formats[a]){var u=e;try{var c=r&&r.formatParams&&r.formatParams[r.interpolationkey]||{},l=c.locale||c.lng||r.locale||r.lng||n;u=o.formats[a](e,l,en(en(en({},s),r),c))}catch(e){o.logger.warn(e)}return u}return o.logger.warn("there was no format function for ".concat(a)),e},e)}}]),e}();function ei(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ea(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ei(Object(n),!0).forEach(function(t){m(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ei(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var es=function(e){y(r,e);var t,n=(t=function(){if("undefined"==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,n=b(r);return e=t?Reflect.construct(n,arguments,b(this).constructor):n.apply(this,arguments),v(this,e)});function r(e,t,o){var i,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return l(this,r),i=n.call(this),L&&E.call(d(i)),i.backend=e,i.store=t,i.services=o,i.languageUtils=o.languageUtils,i.options=a,i.logger=O.create("backendConnector"),i.waitingReads=[],i.maxParallelReads=a.maxParallelReads||10,i.readingCalls=0,i.maxRetries=a.maxRetries>=0?a.maxRetries:5,i.retryTimeout=a.retryTimeout>=1?a.retryTimeout:350,i.state={},i.queue=[],i.backend&&i.backend.init&&i.backend.init(o,a.backend,a),i}return h(r,[{key:"queueLoad",value:function(e,t,n,r){var o=this,i={},a={},s={},u={};return e.forEach(function(e){var r=!0;t.forEach(function(t){var s="".concat(e,"|").concat(t);!n.reload&&o.store.hasResourceBundle(e,t)?o.state[s]=2:o.state[s]<0||(1===o.state[s]?void 0===a[s]&&(a[s]=!0):(o.state[s]=1,r=!1,void 0===a[s]&&(a[s]=!0),void 0===i[s]&&(i[s]=!0),void 0===u[t]&&(u[t]=!0)))}),r||(s[e]=!0)}),(Object.keys(i).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(i),pending:Object.keys(a),toLoadLanguages:Object.keys(s),toLoadNamespaces:Object.keys(u)}}},{key:"loaded",value:function(e,t,n){var r=e.split("|"),o=r[0],i=r[1];t&&this.emit("failedLoading",o,i,t),n&&this.store.addResourceBundle(o,i,n),this.state[e]=t?-1:2;var a={};this.queue.forEach(function(n){var r,s,u,c,l;r=n.loaded,(c=(u=R(r,[o],Object)).obj)[l=u.k]=c[l]||[],s||c[l].push(i),void 0!==n.pending[e]&&(delete n.pending[e],n.pendingCount--),t&&n.errors.push(t),0!==n.pendingCount||n.done||(Object.keys(n.loaded).forEach(function(e){a[e]||(a[e]={});var t=n.loaded[e];t.length&&t.forEach(function(t){void 0===a[e][t]&&(a[e][t]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(function(e){return!e.done})}},{key:"read",value:function(e,t,n){var r=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,a=arguments.length>5?arguments[5]:void 0;return e.length?this.readingCalls>=this.maxParallelReads?void this.waitingReads.push({lng:e,ns:t,fcName:n,tried:o,wait:i,callback:a}):(this.readingCalls++,this.backend[n](e,t,function(s,u){if(r.readingCalls--,r.waitingReads.length>0){var c=r.waitingReads.shift();r.read(c.lng,c.ns,c.fcName,c.tried,c.wait,c.callback)}if(s&&u&&o<r.maxRetries)return void setTimeout(function(){r.read.call(r,e,t,n,o+1,2*i,a)},i);a(s,u)})):a(null,{})}},{key:"prepareLoading",value:function(e,t){var n=this,r=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,r,o);if(!i.toLoad.length)return i.pending.length||o(),null;i.toLoad.forEach(function(e){n.loadOne(e)})}},{key:"load",value:function(e,t,n){this.prepareLoading(e,t,{},n)}},{key:"reload",value:function(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}},{key:"loadOne",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=e.split("|"),o=r[0],i=r[1];this.read(o,i,"read",void 0,void 0,function(r,a){r&&t.logger.warn("".concat(n,"loading namespace ").concat(i," for language ").concat(o," failed"),r),!r&&a&&t.logger.log("".concat(n,"loaded namespace ").concat(i," for language ").concat(o),a),t.loaded(e,r,a)})}},{key:"saveMissing",value:function(e,t,n,r,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t))return void this.logger.warn('did not save key "'.concat(n,'" 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!=n&&""!==n&&(this.backend&&this.backend.create&&this.backend.create(e,t,n,r,null,ea(ea({},i),{},{isUpdate:o})),e&&e[0]&&this.store.addResource(e[0],t,n,r))}}]),r}(E);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 ec(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function el(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ec(Object(n),!0).forEach(function(t){m(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ec(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function ef(){}var ep=function(e){y(r,e);var t,n=(t=function(){if("undefined"==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,n=b(r);return e=t?Reflect.construct(n,arguments,b(this).constructor):n.apply(this,arguments),v(this,e)});function r(){var e,t,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;if(l(this,r),t=n.call(this),L&&E.call(d(t)),t.options=eu(o),t.services={},t.logger=O,t.modules={external:[]},Object.getOwnPropertyNames(Object.getPrototypeOf(e=d(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),v(t,d(t));setTimeout(function(){t.init(o,i)},0)}return t}return h(r,[{key:"init",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;"function"==typeof t&&(n=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 r={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"===c(e[1])&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"===c(e[2])||"object"===c(e[3])){var n=e[3]||e[2];Object.keys(n).forEach(function(e){t[e]=n[e]})}return t},interpolation:{escapeValue:!0,format:function(e,t,n,r){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=el(el(el({},r),this.options),eu(t)),"v1"!==this.options.compatibilityAPI&&(this.options.interpolation=el(el({},r.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?O.init(o(this.modules.logger),this.options):O.init(null,this.options),this.modules.formatter?i=this.modules.formatter:"undefined"!=typeof Intl&&(i=eo);var i,a=new K(this.options);this.store=new F(this.options.resources,this.options);var s=this.services;s.logger=O,s.resourceStore=this.store,s.languageUtils=a,s.pluralResolver=new X(a,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),i&&(!this.options.interpolation.format||this.options.interpolation.format===r.interpolation.format)&&(s.formatter=o(i),s.formatter.init(s,this.options),this.options.interpolation.format=s.formatter.format.bind(s.formatter)),s.interpolator=new ee(this.options),s.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},s.backendConnector=new es(o(this.modules.backend),s.resourceStore,s,this.options),s.backendConnector.on("*",function(t){for(var n=arguments.length,r=Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];e.emit.apply(e,[t].concat(r))}),this.modules.languageDetector&&(s.languageDetector=o(this.modules.languageDetector),s.languageDetector.init(s,this.options.detection,this.options)),this.modules.i18nFormat&&(s.i18nFormat=o(this.modules.i18nFormat),s.i18nFormat.init&&s.i18nFormat.init(this)),this.translator=new q(this.services,this.options),this.translator.on("*",function(t){for(var n=arguments.length,r=Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];e.emit.apply(e,[t].concat(r))}),this.modules.external.forEach(function(t){t.init&&t.init(e)})}if(this.format=this.options.interpolation.format,n||(n=ef),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var u=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);u.length>0&&"dev"!==u[0]&&(this.options.lng=u[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 n;return(n=e.store)[t].apply(n,arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(function(t){e[t]=function(){var n;return(n=e.store)[t].apply(n,arguments),e}});var l=x(),f=function(){var t=function(t,r){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(r),n(t,r)};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?f():setTimeout(f,0),l}},{key:"loadResources",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ef,r=n,o="string"==typeof e?e:this.language;if("function"==typeof e&&(r=e),!this.options.resources||this.options.partialBundledLanguages){if(o&&"cimode"===o.toLowerCase())return r();var i=[],a=function(e){e&&t.services.languageUtils.toResolveHierarchy(e).forEach(function(e){0>i.indexOf(e)&&i.push(e)})};o?a(o):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(function(e){return a(e)}),this.options.preload&&this.options.preload.forEach(function(e){return a(e)}),this.services.backendConnector.load(i,this.options.ns,function(e){e||t.resolvedLanguage||!t.language||t.setResolvedLanguage(t.language),r(e)})}else r(null)}},{key:"reloadResources",value:function(e,t,n){var r=x();return e||(e=this.languages),t||(t=this.options.ns),n||(n=ef),this.services.backendConnector.reload(e,t,function(e){r.resolve(),n(e)}),r}},{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&&B.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 n=this.languages[t];if(!(["cimode","dev"].indexOf(n)>-1)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}}},{key:"changeLanguage",value:function(e,t){var n=this;this.isLanguageChangingTo=e;var r=x();this.emit("languageChanging",e);var o=function(e){n.language=e,n.languages=n.services.languageUtils.toResolveHierarchy(e),n.resolvedLanguage=void 0,n.setResolvedLanguage(e)},i=function(e,i){i?(o(i),n.translator.changeLanguage(i),n.isLanguageChangingTo=void 0,n.emit("languageChanged",i),n.logger.log("languageChanged",i)):n.isLanguageChangingTo=void 0,r.resolve(function(){return n.t.apply(n,arguments)}),t&&t(e,function(){return n.t.apply(n,arguments)})},a=function(t){e||t||!n.services.languageDetector||(t=[]);var r="string"==typeof t?t:n.services.languageUtils.getBestMatchFromCodes(t);r&&(n.language||o(r),n.translator.language||n.translator.changeLanguage(r),n.services.languageDetector&&n.services.languageDetector.cacheUserLanguage(r)),n.loadResources(r,function(e){i(e,r)})};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(a):a(e):a(this.services.languageDetector.detect()),r}},{key:"getFixedT",value:function(e,t,n){var r=this,o=function e(t,o){if("object"!==c(o)){for(var i,a=arguments.length,s=Array(a>2?a-2:0),u=2;u<a;u++)s[u-2]=arguments[u];i=r.options.overloadTranslationOptionHandler([t,o].concat(s))}else i=el({},o);i.lng=i.lng||e.lng,i.lngs=i.lngs||e.lngs,i.ns=i.ns||e.ns,i.keyPrefix=i.keyPrefix||n||e.keyPrefix;var l=r.options.keySeparator||".",f=i.keyPrefix?"".concat(i.keyPrefix).concat(l).concat(t):t;return r.t(f,i)};return"string"==typeof e?o.lng=e:o.lngs=e,o.ns=t,o.keyPrefix=n,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,n=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 r=this.resolvedLanguage||this.languages[0],o=!!this.options&&this.options.fallbackLng,i=this.languages[this.languages.length-1];if("cimode"===r.toLowerCase())return!0;var a=function(e,n){var r=t.services.backendConnector.state["".concat(e,"|").concat(n)];return -1===r||2===r};if(n.precheck){var s=n.precheck(this,a);if(void 0!==s)return s}return!!(this.hasResourceBundle(r,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(r,e)&&(!o||a(i,e)))}},{key:"loadNamespaces",value:function(e,t){var n=this,r=x();return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach(function(e){0>n.options.ns.indexOf(e)&&n.options.ns.push(e)}),this.loadResources(function(e){r.resolve(),t&&t(e)}),r):(t&&t(),Promise.resolve())}},{key:"loadLanguages",value:function(e,t){var n=x();"string"==typeof e&&(e=[e]);var r=this.options.preload||[],o=e.filter(function(e){return 0>r.indexOf(e)});return o.length?(this.options.preload=r.concat(o),this.loadResources(function(e){n.resolve(),t&&t(e)}),n):(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]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ef,o=el(el(el({},this.options),t),{isClone:!0}),i=new r(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=el({},this.services),i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i.translator=new q(i.services,i.options),i.translator.on("*",function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];i.emit.apply(i,[e].concat(n))}),i.init(o,n),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}}}]),r}(E);m(ep,"createInstance",function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return new ep(e,t)});var eh=ep.createInstance();eh.createInstance=ep.createInstance,eh.createInstance,eh.init,eh.loadResources,eh.reloadResources,eh.use,eh.changeLanguage,eh.getFixedT,eh.t,eh.exists,eh.setDefaultNamespace,eh.hasLoadedNamespace,eh.loadNamespaces,eh.loadLanguages;var ed=a(348),eg=a.n(ed),ey=a(297),ev=a(192),eb=a.n(ev),em=a(891);class e_{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 ew(){return navigator.language.split("-")[0]||"en"}function eS(e){return eg().parse(e,{ignoreQueryPrefix:!0})}function ek(e){let t;if(location.search&&""!==location.search&&(t=eS(location.search)),location.hash){let e=location.hash.indexOf("?");e>-1&&(t=eS(location.hash.substring(e+1)))}return t?t[e]:void 0}function eO(e){let t=[];return e.rules.forEach(e=>{if(e.when&&e.then&&e.then.length>0){let n=new Map;for(let r of(function(e,t,n){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 t=[];if(function e(t,n){t&&(t.items.forEach(e=>{e.value&&("radial"===e.value.predicateType||"rect"===e.value.predicateType)&&n.push({predicate:e.value})}),t.groups&&t.groups.forEach(t=>e(t,n)))}(e.assets.attributes,t),t.length>0){let r=e.tag||"0";n.set(r,t)}}})}(e.when,0,n),n.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 n=e.target;if(n&&n.conditionAssets){let r=t.get(n.conditionAssets);r&&r.forEach(t=>{t.notification=e.notification.message})}else for(let n of t.values())n.forEach(t=>{t.notification=e.notification.message})}})(e,n)),n.values()))r.forEach(e=>{e.notification&&t.push(e)})}}),t}let eE=/([+-])?((\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 ex(e){return!!e&&(e=e.trim()).length>0&&(eE.test(e)||eA(e)||eR(e))}function eA(e){return"*"===(e=null!=e?e.trim():void 0)||"+*"===e}function eR(e){return"-*"===(e=null!=e?e.trim():void 0)}function eP(e){return!!e&&"object"==typeof e}function eC(e){return!!(e&&e.constructor&&e.call&&e.apply)}function eI(e,t,n=!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(n){let n=Object.keys(e);return Object.keys(t).every(e=>-1!==n.indexOf(e))&&n.every(n=>eI(e[n],t[n]))}return!1}function ej(e,t){let n=(e,t)=>(0,em.transform)(e,function(e,r,o){eI(r,null==t?void 0:t[o])||(e[o]=eP(r)&&eP(null==t?void 0:t[o])?n(r,null==t?void 0:t[o]):r)});return n(e,t)}function eT(e,t){if(0===e.length)return;let n=e.indexOf(t);n>=0&&e.splice(n,1)}function eN(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 eL(e){if(null==e)return"";let t=!1;return e.split(/([A-Z]|\d)/).map((e,n,r)=>{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=!r[n-1]||"_"===r[n-1],o=n+1<r.length&&r[n+1]&&"_"!==r[n+1],i=n+3>r.length||!r[n+1]&&!r[n+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 n=e.endsWith("*"),r=!n&&e.startsWith("*"),o=!n&&!r&&e.startsWith("^")&&e.endsWith("$");if(n&&t.startsWith(e.substr(0,e.length-1))||r&&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 eD(e){if(e)return 1===e.length?e.toUpperCase():e.charAt(0).toUpperCase()+e.slice(1)}function eM(e,t){return e&&Object.values(e).includes(t)}function eF(e,t){return Object.keys(e).find(n=>e[n]===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 eW=["JAN","FEB","MAR","APR","MAY","JUN","JUL","AUG","SEP","OCT","NOV","DEC"];function eV(e,t,n,r,o,i,a){let s="";if(i?Array.isArray(i)?s+=i.toString().replace(" ",""):s+=i.toString():s+="0",s+=" ",o?Array.isArray(o)?s+=o.toString().replace(" ",""):s+=o.toString():s+="0",s+=" ",r?Array.isArray(r)?s+=r.toString().replace(" ",""):s+=r.toString():s+="0",s+=" ",n?Array.isArray(n)?s+=n.toString().replace(" ",""):s+=n.toString():s+="*",s+=" ",t)if(Array.isArray(t))if("number"==typeof t[0]){let e=[];t.forEach(t=>{e.push(eW[t].toString())}),s+=e.toString().replace(" ","")}else s+=t.toString().replace(" ","");else s+=t.toString();else s+="*";return s+=" ",a?s+=a.toString():s+="?",s+=" ",e?Array.isArray(e)?s+=e.toString().replace(" ",""):s+=e:s+="*",s}function eH(e){return eV(e.getFullYear(),eW[e.getMonth()],[e.getDate()],[e.getHours()],[e.getMinutes()])}function eq(e,t){let n=e.split(" ");if(!Number.isNaN(Number(n[0]))&&!Number.isNaN(Number(n[1]))&&!Number.isNaN(Number(n[2]))&&(!Number.isNaN(Number(n[3]))||"*"==n[3])){let e=(!Number.isNaN(Number(n[6]))?n[6]:new Date().getFullYear()).toString(),r="";r=1==(r="*"!=n[4]?eW.indexOf(n[4]).toString():new Date().getMonth().toString()).length?"0"+r:r;let o=1==n[3].length&&"*"!=n[3]?"0"+n[3]:n[3].replace("*","01"),i=1==n[2].length&&"*"!=n[2]?"0"+n[2]:n[2].replace("*","00"),a=1==n[1].length&&"*"!=n[1]?"0"+n[1]:n[1].replace("*","00"),s=1==n[0].length&&"*"!=n[0]?"0"+n[0]:n[0].replace("*","00");if(e.length>0&&r.length>0)if(t)return eb().utc({year:Number(e),month:Number(r),date:Number(o),hour:Number(i),minute:Number(a),second:Number(s)}).toISOString();else return eb()({year:Number(e),month:Number(r),date:Number(o),hour:Number(i),minute:Number(a),second:Number(s)}).toISOString()}}function ez(e,t,n){let r="string"==typeof e?e:e.name;return t&&t.meta&&t.meta.hasOwnProperty(r)?t.meta[r]:n&&n.meta?n.meta[r]:void 0}function eK(e,t,n){let r="string"==typeof e?e:e.name;return!!(t&&t.meta&&t.meta.hasOwnProperty(r)||n&&n.meta&&n.meta.hasOwnProperty(r))}function eG(e){return("string"==typeof e&&(e=ey.AssetModelUtil.getAssetDescriptor(e)),e)?eh.t("label.asset."+e.name,{defaultValue:eL(e.name)}):""}function e$(e){if(!e)return eh.t("label.value.unknown",{defaultValue:"Unknown"});let t="string"==typeof e?e:e.name;return eh.t("label.value."+t,{defaultValue:eL(t||"")})}function eJ(e,t){if(e)return eh.t("label.allowedValue."+e,{defaultValue:t||eL(e||""),nsSeparator:!1})}function eY(e,t){let n="string"==typeof e?ey.AssetModelUtil.getMetaItemDescriptor(e):e;return n?{name:n.name,type:n.type,value:t}:{name:typeof e,type:ey.AssetModelUtil.resolveValueTypeFromValue(t),value:t}}function eX(e,t,n,r,o){return eZ(e,t,n,r,!0,o)}function eQ(e,t,n,r,o){return eZ(e||eY(t,null),t,n,r,!1,o)}function eZ(e,t,n,r,o,i){let a=tn("label",e,t,n,o),s="";if(a||(a=ez("label",e,t&&t.meta?t:void 0)),r&&(s=e5(tt("units",e,t,n,o))),!a){let n=e?e.name:t?"string"==typeof t?t:t.name:void 0;a=i||(n?eL(n):void 0)}return a?a+(s?" ("+s+")":""):s}function e0(e,t,n,r,o){return e2(e,t,n,r,!0,o)}function e1(e,t,n,r,o){return e2(e||eY(t,null),t,n,r,!1,o)}function e2(e,t,n,r,o,i){let a=e3(e?e.value:void 0,()=>tt("format",e,t,n,o),void 0,i),s=e4(e,t,n);return r&&s&&s.length&&(a=e5(tt("units",e,t,n,o),a)),a}function e3(e,t,n,r){let o="";if(null==e)o=r||"";else if("string"==typeof e)o=e;else if("number"==typeof e||"boolean"==typeof e||e instanceof Date){let r=t&&t();if(r&&0!==Object.keys(r).length)switch("number"==typeof e?r.asBoolean?e=!!e:r.asDate&&(e=new Date(e)):"boolean"==typeof e&&r.asNumber&&(e=+!!e),typeof e){case"number":o=new Intl.NumberFormat(n||eh.language,r).format(e);break;case"boolean":r.asOnOff&&(o=e?eh.t("on"):eh.t("off")),r.asOpenClosed&&(o=e?eh.t("open"):eh.t("closed")),r.asPressedReleased&&(o=e?eh.t("pressed"):eh.t("released"));break;case"object":if(r.momentJsFormat)o=eb()(e).format(r.momentJsFormat);else if(r.iso8601)o=e.toISOString();else if(r.week){let t=eB(e);o="2-digit"===r.week?String(t).padStart(2,"0"):Number(t).toString(10)}else o=new Intl.DateTimeFormat(n||eh.language,r).format(e)}else o=Object(e).toString()}return o}function e5(e,t){if(!e)return"";t||(t="");let n=e.map((e,n)=>{if(3!==e.length||e.toUpperCase()!==e)return eh.t(["units."+e,"or:units."+e]);{let r=new Intl.NumberFormat(eh.language,{currency:e,style:"currency"}).formatToParts();if(0!==n||"currency"!==r[0].type)return"currency"===r[0].type?r[0].value:r[r.length-1].value;if(!t)return r[0].value;t=r[0].value+t}}).join("");return t.length>0?t+" "+n:n}function e8(e,t,n){return tt("constraints",e,t,n,!0)}function e6(e,t,n){return tt("constraints",e||eY(t,null),t,n,!1)}function e4(e,t,n){return tt("units",e,t,n,!0)}function e9(e,t,n){return tt("units",e||eY(t,null),t,n,!1)}function e7(e,t,n){return tt("format",e,t,n,!0)}function te(e,t,n){return tt("format",e||eY(t,null),t,n,!1)}function tt(e,t,n,r,o){let i,a=[],s=tn(e,t&&"string"==typeof t?t:t?t.name:n?"string"==typeof n?n:n.name:void 0,n,r,o);if(s&&(i=JSON.parse(s)))if("format"!==e)return i;else a.push(i);if(t&&t.meta&&(i=ez(e,t,n)))if("format"!==e)return i;else a.push(i);if(n&&"string"!=typeof n&&n.hasOwnProperty(e)){if(i=n[e],"format"!==e)return i;a.push(i)}if(n&&n.type){if(i=ey.AssetModelUtil.getValueDescriptor(n.type)[e],"format"!==e)return i;a.push(i)}if("format"!==e||0===a.length)return i;let u={};return a.reverse().forEach(e=>{u=Object.assign(Object.assign({},u),e)}),u}function tn(e,t,n,r,o,i){let a;if(t?a="string"==typeof t?t:t.name:n&&(a="string"==typeof n?n:n.name),!a)return;let s=[],u=e+"."+(o?"attribute":"meta")+".";if(r&&s.push(u+r+"."+a),n&&"string"!=typeof n&&(s.push(u+n.type+"."+a),s.push(u+n.type)),s.push(u+a),s.length>0)return eh.t(s,{defaultValue:i||""})}function tr(e,t){let n=t.ref.name;if(e.attributes)if(t.deleted)delete e.attributes[n];else{let r=e.attributes[n];r&&(r.value=t.value,r.timestamp=t.timestamp)}return Object.assign({},e)}function to(e){return new Promise((t,n)=>{let r=document.createElement("script");r.type="text/javascript",r.src=e,r.addEventListener("load",e=>t(e),!1),r.addEventListener("error",e=>n(e),!1),document.body.appendChild(r)})}function ti(e){return(t,n)=>{let r=e(t),o=e(n);return r||o?r&&!o?1:!r&&o?-1:r-o:0}}function ta(e){return(t,n)=>{let r=e(t),o=e(n);return r||o?r&&!o?1:!r&&o?-1:r.localeCompare(o):0}}function ts(e,t){let n=new e_;return e.dispatchEvent(t),window.setTimeout(()=>{n.resolve(t.detail)}),n.promise}let tu={37:1,38:1,39:1,40:1};function tc(e){e.preventDefault()}function tl(e){if(tu[e.keyCode])return tc(e),!1}let tf=!1;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>{tf=!0}}))}catch(e){}let tp=!!tf&&{passive:!1},th="onwheel"in document.createElement("div")?"wheel":"mousewheel";function td(){window.addEventListener("DOMMouseScroll",tc,!1),window.addEventListener(th,tc,tp),window.addEventListener("touchmove",tc,tp),window.addEventListener("keydown",tl,!1)}function tg(){window.removeEventListener("DOMMouseScroll",tc,!1),window.removeEventListener(th,tc,tp),window.removeEventListener("touchmove",tc,tp),window.removeEventListener("keydown",tl,!1)}function ty(e){return new Promise((t,n)=>{let r=new FileReader;r.readAsDataURL(e),r.onload=()=>{t(r.result)},r.onerror=e=>{n(e)}})}var tv=function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,s)}u((r=r.apply(e,t||[])).next())})};let tb=a(916);class tm{constructor(e,t,n){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=n,window.OpenRemoteConsole=this;let r=new URLSearchParams(window.location.search),o=r.get("consoleName"),i=r.get("consoleVersion"),a=r.get("consolePlatform"),s=r.get("consoleProviders"),u=r.get("consoleAutoEnable"),c=s&&s.length>0?s.split(" "):["push"];this._pendingProviderEnables=c;let l=tm._createConsoleRegistration(),f=window.localStorage.getItem("OpenRemoteConsole:"+e);if(f)try{let e=JSON.parse(f);e.id&&(l.id=e.id),e.name&&(l.name=e.name),e.providers&&(l.providers=e.providers),e.apps&&(l.apps=e.apps)}catch(e){console.error("Failed to deserialise console registration")}let p=l.providers;for(let e of(l.providers={},c)){let t=p&&p.hasOwnProperty(e)?p[e]:{enabled:!1,disabled:!1};l.providers[e]=t}let h=nf.getAppName();h.length>0&&0>l.apps.indexOf(h)&&l.apps.push(h),this._registration=l,o&&(l.name=o),i&&(l.version=i),a&&(l.platform=a),u&&(this._autoEnable="TRUE"===u||"true"===u)}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 tv(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(0)),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 tv(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 tv(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 n={provider:e,action:"PROVIDER_ENABLE",consoleId:this._registration.id,data:t},r=yield this.sendProviderMessage(n,!0);this._registration.providers[e].hasPermission=r.hasPermission,this._registration.providers[e].success=r.success,this._registration.providers[e].enabled=r.success,this._registration.providers[e].data=r.data;let o=this._pendingProviderEnables.indexOf(e);return o>=0&&(this._pendingProviderEnables.splice(o,1),0===this._pendingProviderEnables.length&&(this.sendRegistration(),this._callCompletedCallback())),r})}disableProvider(e){return tv(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 tv(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 n=e.provider+e.action;if(this._pendingProviderPromises[n])throw Error("Message already pending for provider '"+e.provider+"' with action '"+e.action+"'");let r=new e_;return this._pendingProviderPromises[n]=[r,window.setTimeout(()=>{delete this._pendingProviderPromises[n],r.reject("No response from provider")},5e3)],this._doSendProviderMessage(e),r.promise})}sendRegistration(e){return this._registrationTimer&&(window.clearTimeout(this._registrationTimer),this._registrationTimer=null),console.debug("Sending registration in: "+(e=void 0!==e?e:2e3)+"ms"),new Promise((e,t)=>{this._registrationTimer=window.setTimeout(()=>{this._registrationTimer=null,console.debug("Console: updating registration");try{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={}),nf.rest.api.ConsoleResource.register(this._registration).then(t=>{if(200!==t.status)throw Error("Failed to register console");this._registration=t.data,console.debug("Console: registration successful"),console.debug("Console: updating locally stored registration"),window.localStorage.setItem("OpenRemoteConsole:"+this._realm,JSON.stringify(this._registration)),e()})}catch(e){console.error("Failed to register console"),t("Failed to register console")}})})}storeData(e,t){this.sendProviderMessage({provider:"storage",action:"STORE",key:e,value:t},!1)}retrieveData(e){return tv(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 n={type:e,data:t};this.isMobile?this._postNativeShellMessage(n):console.warn("Failed to send generic message to console.",n)}_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 n=window.localStorage.getItem(t);if(null!==n)try{n=JSON.parse(n)}catch(e){}this._handleProviderResponse(JSON.stringify({action:"RETRIEVE",provider:"storage",key:t,value:n}))}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),n=t.provider,r=t.action,o=this._pendingProviderPromises[n+r];o&&(window.clearTimeout(o[1]),delete this._pendingProviderPromises[n+r],o[0].resolve(t));let i=this._providerMessageListeners[n+r];i&&i(t)}_callCompletedCallback(){let e=this._enableCompleteCallback;this._enableCompleteCallback=null,e&&window.setTimeout(()=>{e()},0)}static _createConsoleRegistration(){return{name:tb.name,version:tb.version,platform:tb.os.toString(),apps:[],model:((tb.manufacturer?tb.manufacturer+" ":"")+(tb.product?tb.product:"")).trim()}}_initialiseProvider(e){return tv(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 t_=a(385),tw=a.n(t_),tS=function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,s)}u((r=r.apply(e,t||[])).next())})};!function(e){e.DISCONNECTED="DISCONNECTED",e.CONNECTED="CONNECTED",e.CONNECTING="CONNECTING"}(e||(e={}));let tk="SUBSCRIBED:",tO="UNAUTHORIZED:",tE="TRIGGERED:",tx="EVENT:";class tA{constructor(){this._disconnectRequested=!1,this._reconnectDelayMillis=tR.MIN_RECONNECT_DELAY,this._reconnectTimer=null,this._status=e.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){eT(this._statusCallbacks,e)}connect(){return(this._reconnectTimer&&(window.clearTimeout(this._reconnectTimer),this._reconnectTimer=null),this._status===e.CONNECTED)?Promise.resolve(!0):(this._disconnectRequested=!1,this._connectingDeferred||(this._onStatusChanged(e.CONNECTING),this._connectingDeferred=new e_,this._doConnect().then(t=>{if(this._connectingDeferred){let n=this._connectingDeferred;this._connectingDeferred=null,t?(console.debug("Connected to event service: "+this.endpointUrl),this._reconnectDelayMillis=tR.MIN_RECONNECT_DELAY,this._onStatusChanged(e.CONNECTED),window.setTimeout(()=>{this._onConnect()},0)):(console.debug("Failed to connect to event service: "+this.endpointUrl),this._scheduleReconnect()),n.resolve(t)}})),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!==e.DISCONNECTED&&this._doDisconnect())}subscribe(t,n){let r={eventSubscription:t,callback:n,deferred:new e_};return null!=this._pendingSubscription||this._status!==e.CONNECTED?(this._queuedSubscriptions.push(r),r.deferred.promise):(this._pendingSubscription=r,this._doSubscribe(t).then(e=>{if(this._pendingSubscription){let t=this._pendingSubscription;this._pendingSubscription=null,this._subscriptionMap.set(e,t),this._processNextSubscription();let n=t.deferred;t.deferred=null,n&&n.resolve(e)}},e=>{if(this._pendingSubscription){let t=this._pendingSubscription;this._pendingSubscription=null,this._processNextSubscription();let n=t.deferred;t.deferred=null,n&&n.reject(e)}}),this._pendingSubscription.deferred.promise)}unsubscribe(e){return tS(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(t){this._status===e.CONNECTED&&this._doSend(t)}sendEventWithReply(t){return this._status!==e.CONNECTED?Promise.reject("Not connected"):this._doSendWithReply(t)}subscribeAssetEvents(e,t,n){return tS(this,void 0,void 0,function*(){let r=e&&"string"!=typeof e[0]?e.map(e=>e.id):e,o="AssetEvent"+tA._subscriptionCounter++;if(!this._assetEventPromise){let e;nf.authenticated||(e={filterType:"asset",realm:nf.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;r?r.find(e=>t===e)&&n(e):e.asset.realm===nf.displayRealm&&n(e)}),this._assetEventPromise.then(()=>{try{if(r&&t){let e={messageID:"read-assets:"+r.join(",")+":"+o,eventType:"read-assets",assetQuery:{ids:r}};this.sendEventWithReply(e).then(e=>{e.assets&&this._assetEventCallbackMap.has(o)&&e.assets.forEach(e=>{n({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,n){return tS(this,void 0,void 0,function*(){let r=e&&"string"!=typeof e[0],o=r?e.map(e=>e.id):e,i=r?e:void 0,a="AttributeEvent"+tA._subscriptionCounter++;if(!this._attributeEventPromise){let e;nf.authenticated||(e={filterType:"asset",realm:nf.displayRealm});let t={eventType:"attribute",filter:e};this._attributeEventPromise=this.subscribe(t,e=>{this._attributeEventCallbackMap.forEach(t=>t(e))})}let s=t=>{let i=t.ref;r?e.forEach(e=>{i.id===e.id&&i.name===e.name&&n(t)}):o?o.find(e=>i.id===e)&&n(t):t.realm===nf.displayRealm&&n(t)};return this._attributeEventCallbackMap.set(a,s),this._attributeEventPromise.then(()=>{try{if(t&&o){let e={messageID:"read-assets:"+o.join(",")+":"+a,eventType:"read-assets",assetQuery:{ids:o}};this.sendEventWithReply(e).then(e=>{e.assets&&this._attributeEventCallbackMap.has(a)&&e.assets.forEach(e=>{e.attributes&&Object.entries(e.attributes).forEach(([t,n])=>{(!i||i.find(n=>n.id===e.id&&n.name===t))&&s({eventType:"attribute",timestamp:n.timestamp,value:n.value,ref:{id:e.id,name:t}})})})})}}catch(t){throw console.error("Failed to subscribe to asset events for assets: "+e),a&&this.unsubscribe(a),t}return a})})}_processNextSubscription(){this._status===e.CONNECTED&&0!==this._queuedSubscriptions.length&&setTimeout(()=>{let e=this._queuedSubscriptions.shift();e&&this.subscribe(e.eventSubscription,e.callback).then(t=>{let n=e.deferred;e.deferred=null,n&&n.resolve(t)},t=>{let n=e.deferred;e.deferred=null,n&&n.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 n=this._subscriptionMap.get(e);n&&n.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===e.CONNECTED&&this._onStatusChanged(e.DISCONNECTED),this._pendingSubscription&&(this._queuedSubscriptions.unshift(this._pendingSubscription),this._pendingSubscription=null),this._onStatusChanged(e.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<tR.MAX_RECONNECT_DELAY&&(this._reconnectDelayMillis=Math.min(tR.MAX_RECONNECT_DELAY,this._reconnectDelayMillis+3e3)))}}tA.MIN_RECONNECT_DELAY=0,tA.MAX_RECONNECT_DELAY=3e4,tA._subscriptionCounter=0;class tR extends tA{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="+nf.config.realm;return nf.authenticated&&(e+="&Authorization="+nf.getAuthorizationHeader()),this._webSocket=new WebSocket(e),this._connectDeferred=new e_,this._webSocket.onopen=()=>{if(this._connectDeferred){let e=this._connectDeferred;this._connectDeferred=null,e.resolve(!0)}},this._webSocket.onerror=e=>{if(this._connectDeferred){let e=this._connectDeferred;this._connectDeferred=null,e.resolve(!1)}else console.debug("Event provider error"),this._beforeDisconnect()},this._webSocket.onclose=()=>{if(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(tk)){let e=JSON.parse(t.substring(tk.length)),n=this._subscribeDeferred;this._subscribeDeferred=null,n&&n.resolve(e.subscriptionId)}else if(t.startsWith(tO)){let e=JSON.parse(t.substring(tO.length)),n=this._subscribeDeferred;this._subscribeDeferred=null,n&&(console.warn("Unauthorized event subscription: "+JSON.stringify(e,null,2)),n.reject("Unauthorized"))}else if(t.startsWith(tE)){let e=JSON.parse(t.substring(tE.length));e.events&&e.events.forEach(t=>{this._onMessageReceived(e.subscriptionId,t)})}else if(t.startsWith(tx)){let e=JSON.parse(t.substring(tx.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 e_,e.subscriptionId||(e.subscriptionId=tR._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=tx+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 e_;return this._repliesDeferred.set(e.messageID,t),this._webSocket.send(tx+JSON.stringify(e)),t.promise}}function tP(e){return(tP="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)}tR._subscriptionCounter=1;var tC=[],tI=tC.forEach,tj=tC.slice;function tT(e){return tI.call(tj.call(arguments,1),function(t){if(t)for(var n in t)void 0===e[n]&&(e[n]=t[n])}),e}function tN(){return"function"==typeof XMLHttpRequest||("undefined"==typeof XMLHttpRequest?"undefined":tP(XMLHttpRequest))==="object"}var tL=a(850),tU=a.t(tL,2);function tD(e){return(tD="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"==typeof fetch&&(t="undefined"!=typeof global&&global.fetch?global.fetch:"undefined"!=typeof window&&window.fetch?window.fetch:fetch),tN()&&("undefined"!=typeof global&&global.XMLHttpRequest?n=global.XMLHttpRequest:"undefined"!=typeof window&&window.XMLHttpRequest&&(n=window.XMLHttpRequest)),"function"==typeof ActiveXObject&&("undefined"!=typeof global&&global.ActiveXObject?r=global.ActiveXObject:"undefined"!=typeof window&&window.ActiveXObject&&(r=window.ActiveXObject)),t||!tU||n||r||(t=tL||tU),"function"!=typeof t&&(t=void 0);var tM=function(e,t){if(t&&"object"===tD(t)){var n="";for(var r in t)n+="&"+encodeURIComponent(r)+"="+encodeURIComponent(t[r]);if(!n)return e;e=e+(-1!==e.indexOf("?")?"&":"?")+n.slice(1)}return e},tF=function(e,n,r){t(e,n).then(function(e){if(!e.ok)return r(e.statusText||"Error",{status:e.status});e.text().then(function(t){r(null,{status:e.status,data:t})}).catch(r)}).catch(r)},tB=!1,tW=function(e,t,n,r){e.queryStringParams&&(t=tM(t,e.queryStringParams));var o=tT({},"function"==typeof e.customHeaders?e.customHeaders():e.customHeaders);n&&(o["Content-Type"]="application/json");var i="function"==typeof e.requestOptions?e.requestOptions(n):e.requestOptions,a=tT({method:n?"POST":"GET",body:n?e.stringify(n):void 0,headers:o},tB?{}:i);try{tF(t,a,r)}catch(e){if(!i||0===Object.keys(i).length||!e.message||0>e.message.indexOf("not implemented"))return r(e);try{Object.keys(i).forEach(function(e){delete a[e]}),tF(t,a,r),tB=!0}catch(e){r(e)}}},tV=function(e,t,o,i){o&&"object"===tD(o)&&(o=tM("",o).slice(1)),e.queryStringParams&&(t=tM(t,e.queryStringParams));try{(a=n?new n:new r("MSXML2.XMLHTTP.3.0")).open(o?"POST":"GET",t,1),e.crossDomain||a.setRequestHeader("X-Requested-With","XMLHttpRequest"),a.withCredentials=!!e.withCredentials,o&&a.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),a.overrideMimeType&&a.overrideMimeType("application/json");var a,s=e.customHeaders;if(s="function"==typeof s?s():s)for(var u in s)a.setRequestHeader(u,s[u]);a.onreadystatechange=function(){a.readyState>3&&i(a.status>=400?a.statusText:null,{status:a.status,data:a.responseText})},a.send(o)}catch(e){console&&console.log(e)}};let tH=function(e,n,r,o){return("function"==typeof r&&(o=r,r=void 0),o=o||function(){},t)?tW(e,n,r,o):tN()||"function"==typeof ActiveXObject?tV(e,n,r,o):void o(Error("No fetch and no xhr implementation found!"))};var tq=function(){var e;function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!(this instanceof t))throw TypeError("Cannot call a class as a function");this.services=e,this.options=n,this.allOptions=r,this.type="backend",this.init(e,n,r)}return e=[{key:"init",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.services=e,this.options=tT(n,this.options||{},{loadPath:"/locales/{{lng}}/{{ns}}.json",addPath:"/locales/add/{{lng}}/{{ns}}",allowMultiLoading:!1,parse:function(e){return JSON.parse(e)},stringify:JSON.stringify,parsePayload:function(e,t,n){var r,o;return r={},o=n||"",t in r?Object.defineProperty(r,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[t]=o,r},request:tH,reloadInterval:"undefined"==typeof window&&36e5,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:"cors",credentials:"same-origin",cache:"default"}}),this.allOptions=r,this.services&&this.options.reloadInterval&&setInterval(function(){return t.reload()},this.options.reloadInterval)}},{key:"readMulti",value:function(e,t,n){this._readAny(e,e,t,t,n)}},{key:"read",value:function(e,t,n){this._readAny([e],e,[t],t,n)}},{key:"_readAny",value:function(e,t,n,r,o){var i,a,s=this,u=this.options.loadPath;"function"==typeof this.options.loadPath&&(u=this.options.loadPath(e,n)),(u=(a=i=u)&&"function"==typeof a.then?i:Promise.resolve(i)).then(function(i){if(!i)return o(null,{});var a=s.services.interpolator.interpolate(i,{lng:e.join("+"),ns:n.join("+")});s.loadUrl(a,o,t,r)})}},{key:"loadUrl",value:function(e,t,n,r){var o=this;this.options.request(this.options,e,void 0,function(i,a){var s,u;if(a&&(a.status>=500&&a.status<600||!a.status))return t("failed loading "+e+"; status code: "+a.status,!0);if(a&&a.status>=400&&a.status<500)return t("failed loading "+e+"; status code: "+a.status,!1);if(!a&&i&&i.message&&i.message.indexOf("Failed to fetch")>-1)return t("failed loading "+e+": "+i.message,!0);if(i)return t(i,!1);try{s="string"==typeof a.data?o.options.parse(a.data,n,r):a.data}catch(t){u="failed parsing "+e+" to json"}if(u)return t(u,!1);t(null,s)})}},{key:"create",value:function(e,t,n,r,o){var i=this;if(this.options.addPath){"string"==typeof e&&(e=[e]);var a=this.options.parsePayload(t,n,r),s=0,u=[],c=[];e.forEach(function(n){var r=i.options.addPath;"function"==typeof i.options.addPath&&(r=i.options.addPath(n,t));var l=i.services.interpolator.interpolate(r,{lng:n,ns:t});i.options.request(i.options,l,a,function(t,n){s+=1,u.push(t),c.push(n),s===e.length&&o&&o(u,c)})})}}},{key:"reload",value:function(){var e=this,t=this.services,n=t.backendConnector,r=t.languageUtils,o=t.logger,i=n.language;if(!i||"cimode"!==i.toLowerCase()){var a=[],s=function(e){r.toResolveHierarchy(e).forEach(function(e){0>a.indexOf(e)&&a.push(e)})};s(i),this.allOptions.preload&&this.allOptions.preload.forEach(function(e){return s(e)}),a.forEach(function(t){e.allOptions.ns.forEach(function(e){n.read(t,e,"read",null,null,function(r,i){r&&o.warn("loading namespace ".concat(e," for language ").concat(t," failed"),r),!r&&i&&o.log("loaded namespace ".concat(e," for language ").concat(t),i),n.loaded("".concat(t,"|").concat(e),r,i)})})})}}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}();tq.type="backend";var tz=a(243),tK=a(921);class tG extends Error{}function t$(e,t){let n;if("string"!=typeof e)throw new tG("Invalid token specified: must be a string");t||(t={});let r=+(!0!==t.header),o=e.split(".")[r];if("string"!=typeof o)throw new tG(`Invalid token specified: missing part #${r+1}`);try{n=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 n;return n=t,decodeURIComponent(atob(n).replace(/(.)/g,(e,t)=>{let n=t.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n}))}catch(e){return atob(t)}}(o)}catch(e){throw new tG(`Invalid token specified: invalid base64 for part #${r+1} (${e.message})`)}try{return JSON.parse(n)}catch(e){throw new tG(`Invalid token specified: invalid json for part #${r+1} (${e.message})`)}}if(tG.prototype.name="InvalidTokenError","undefined"==typeof Promise)throw Error("Keycloak requires an environment that supports Promises. Make sure that you include the appropriate polyfill.");function tJ(e){if(!(this instanceof tJ))throw Error("The 'Keycloak' constructor must be invoked with 'new'.");for(var t,n,r=this,o=[],i={enable:!0,callbackList:[],interval:5},a=document.getElementsByTagName("script"),s=0;s<a.length;s++)(-1!==a[s].src.indexOf("keycloak.js")||-1!==a[s].src.indexOf("keycloak.min.js"))&&-1!==a[s].src.indexOf("version=")&&(r.iframeVersion=a[s].src.substring(a[s].src.indexOf("version=")+8).split("&")[0]);var u=!0,c=A(console.info),l=A(console.warn);function f(e,t){for(var n=function(e){var t=null,n=window.crypto||window.msCrypto;if(n&&n.getRandomValues&&window.Uint8Array)return t=new Uint8Array(e),n.getRandomValues(t),t;t=Array(e);for(var r=0;r<t.length;r++)t[r]=Math.floor(256*Math.random());return t}(e),r=Array(e),o=0;o<e;o++)r[o]=t.charCodeAt(n[o]%t.length);return String.fromCharCode.apply(null,r)}function p(){return void 0===r.authServerUrl?void 0:"/"==r.authServerUrl.charAt(r.authServerUrl.length-1)?r.authServerUrl+"realms/"+encodeURIComponent(r.realm):r.authServerUrl+"/realms/"+encodeURIComponent(r.realm)}function h(e,t){var n=e.code,o=e.error,i=e.prompt,a=new Date().getTime();if(e.kc_action_status&&r.onActionUpdate&&r.onActionUpdate(e.kc_action_status),o){if("none"!=i)if(e.error_description&&"authentication_expired"===e.error_description)r.login(e.loginOptions);else{var s={error:o,error_description:e.error_description};r.onAuthError&&r.onAuthError(s),t&&t.setError(s)}else t&&t.setSuccess();return}if("standard"!=r.flow&&(e.access_token||e.id_token)&&h(e.access_token,null,e.id_token,!0),"implicit"!=r.flow&&n){var l="code="+n+"&grant_type=authorization_code",f=r.endpoints.token(),p=new XMLHttpRequest;p.open("POST",f,!0),p.setRequestHeader("Content-type","application/x-www-form-urlencoded"),l+="&client_id="+encodeURIComponent(r.clientId)+"&redirect_uri="+e.redirectUri,e.pkceCodeVerifier&&(l+="&code_verifier="+e.pkceCodeVerifier),p.withCredentials=!0,p.onreadystatechange=function(){if(4==p.readyState)if(200==p.status){var e=JSON.parse(p.responseText);h(e.access_token,e.refresh_token,e.id_token,"standard"===r.flow),w()}else r.onAuthError&&r.onAuthError(),t&&t.setError()},p.send(l)}function h(n,o,i,s){g(n,o,i,a=(a+new Date().getTime())/2),u&&r.idTokenParsed&&r.idTokenParsed.nonce!=e.storedNonce?(c("[KEYCLOAK] Invalid nonce, clearing token"),r.clearToken(),t&&t.setError()):s&&(r.onAuthSuccess&&r.onAuthSuccess(),t&&t.setSuccess())}}function d(e){return 0==e.status&&e.responseText&&e.responseURL.startsWith("file:")}function g(e,t,n,o){if(r.tokenTimeoutHandle&&(clearTimeout(r.tokenTimeoutHandle),r.tokenTimeoutHandle=null),t?(r.refreshToken=t,r.refreshTokenParsed=t$(t)):(delete r.refreshToken,delete r.refreshTokenParsed),n?(r.idToken=n,r.idTokenParsed=t$(n)):(delete r.idToken,delete r.idTokenParsed),e){if(r.token=e,r.tokenParsed=t$(e),r.sessionId=r.tokenParsed.sid,r.authenticated=!0,r.subject=r.tokenParsed.sub,r.realmAccess=r.tokenParsed.realm_access,r.resourceAccess=r.tokenParsed.resource_access,o&&(r.timeSkew=Math.floor(o/1e3)-r.tokenParsed.iat),null!=r.timeSkew&&(c("[KEYCLOAK] Estimated time difference between browser and server is "+r.timeSkew+" seconds"),r.onTokenExpired)){var i=(r.tokenParsed.exp-new Date().getTime()/1e3+r.timeSkew)*1e3;c("[KEYCLOAK] Token expires in "+Math.round(i/1e3)+" s"),i<=0?r.onTokenExpired():r.tokenTimeoutHandle=setTimeout(r.onTokenExpired,i)}}else delete r.token,delete r.tokenParsed,delete r.subject,delete r.realmAccess,delete r.resourceAccess,r.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(r.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,n,o,i=e.indexOf("?"),a=e.indexOf("#");if("query"===r.responseMode&&-1!==i?(n=e.substring(0,i),""!==(o=b(e.substring(i+1,-1!==a?a:e.length),t)).paramsString&&(n+="?"+o.paramsString),-1!==a&&(n+=e.substring(a))):"fragment"===r.responseMode&&-1!==a&&(n=e.substring(0,a),""!==(o=b(e.substring(a+1),t)).paramsString&&(n+="#"+o.paramsString)),o&&o.oauthParams){if("standard"===r.flow||"hybrid"===r.flow){if((o.oauthParams.code||o.oauthParams.error)&&o.oauthParams.state)return o.oauthParams.newUrl=n,o.oauthParams}else if("implicit"===r.flow&&(o.oauthParams.access_token||o.oauthParams.error)&&o.oauthParams.state)return o.oauthParams.newUrl=n,o.oauthParams}}(e);if(t){var o=n.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 n=e.split("&"),r={paramsString:"",oauthParams:{}},o=0;o<n.length;o++){var i=n[o].indexOf("="),a=n[o].slice(0,i);-1!==t.indexOf(a)?r.oauthParams[a]=n[o].slice(i+1):(""!==r.paramsString&&(r.paramsString+="&"),r.paramsString+=n[o])}return r}function m(){var e={setSuccess:function(t){e.resolve(t)},setError:function(t){e.reject(t)}};return e.promise=new Promise(function(t,n){e.resolve=t,e.reject=n}),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=r.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 n=r.endpoints.checkSessionIframe();return t.setAttribute("src",n),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&&r.clearToken();for(var t=i.callbackList.splice(0,i.callbackList.length),n=t.length-1;n>=0;--n){var o=t[n];"error"==e.data?o.setError():o.setSuccess("unchanged"==e.data)}}},!1),e.promise}function w(){i.enable&&r.token&&setTimeout(function(){S().then(function(e){e&&w()})},1e3*i.interval)}function S(){var e=m();if(i.iframe&&i.iframeOrigin){var t=r.clientId+" "+(r.sessionId?r.sessionId:"");i.callbackList.push(e);var n=i.iframeOrigin;1==i.callbackList.length&&i.iframe.contentWindow.postMessage(t,n)}else e.setSuccess();return e.promise}function k(){var e,t,n,o=m();if(i.enable||r.silentCheckSsoRedirectUri){var a=document.createElement("iframe");a.setAttribute("src",r.endpoints.thirdPartyCookiesIframe()),a.setAttribute("sandbox","allow-storage-access-by-user-activation allow-scripts allow-same-origin"),a.setAttribute("title","keycloak-3p-check-iframe"),a.style.display="none",document.body.appendChild(a);var s=function(e){a.contentWindow===e.source&&("supported"===e.data||"unsupported"===e.data)&&("unsupported"===e.data&&(l("[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,r.silentCheckSsoFallback&&(r.silentCheckSsoRedirectUri=!1)),document.body.removeChild(a),window.removeEventListener("message",s),o.setSuccess())};window.addEventListener("message",s,!1)}else o.setSuccess();return e=o.promise,t=r.messageReceiveTimeout,n=null,Promise.race([e,new Promise(function(e,r){n=setTimeout(function(){r({error:"Timeout when waiting for 3rd party check iframe message."})},t)})]).finally(function(){clearTimeout(n)})}function O(e){if(!e||"default"==e)return{login:function(e){return window.location.assign(r.createLoginUrl(e)),m().promise},logout:async function(e){if("GET"===(e?.logoutMethod??r.logoutMethod))return void window.location.replace(r.createLogoutUrl(e));let n=r.createLogoutUrl(e),o=await fetch(n,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({id_token_hint:r.idToken,client_id:r.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(r.createRegisterUrl(e)),m().promise},accountManagement:function(){var e=r.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:r.redirectUri?r.redirectUri:location.href}};if("cordova"==e){i.enable=!1;var n=function(e,t,n){return window.cordova&&window.cordova.InAppBrowser?window.cordova.InAppBrowser.open(e,t,n):window.open(e,t,n)},o=function(e){var t=e&&e.cordovaOptions?Object.keys(e.cordovaOptions).reduce(function(t,n){return t[n]=e.cordovaOptions[n],t},{}):{};return t.location="no",e&&"none"==e.prompt&&(t.hidden="yes"),Object.keys(t).reduce(function(e,n){return e.push(n+"="+t[n]),e},[]).join(",")},a=function(){return r.redirectUri||"http://localhost"};return{login:function(e){var t=m(),i=o(e),s=n(r.createLoginUrl(e),"_blank",i),u=!1,c=!1,l=function(){c=!0,s.close()};return s.addEventListener("loadstart",function(e){0==e.url.indexOf(a())&&(h(v(e.url),t),l(),u=!0)}),s.addEventListener("loaderror",function(e){u||(0==e.url.indexOf(a())?(h(v(e.url),t),l(),u=!0):(t.setError(),l()))}),s.addEventListener("exit",function(e){c||t.setError({reason:"closed_by_user"})}),t.promise},logout:function(e){var t,o=m(),i=n(r.createLogoutUrl(e),"_blank","location=no,hidden=yes,clearcache=yes");return i.addEventListener("loadstart",function(e){0==e.url.indexOf(a())&&i.close()}),i.addEventListener("loaderror",function(e){0==e.url.indexOf(a())||(t=!0),i.close()}),i.addEventListener("exit",function(e){t?o.setError():(r.clearToken(),o.setSuccess())}),o.promise},register:function(e){var t=m(),i=n(r.createRegisterUrl(),"_blank",o(e));return i.addEventListener("loadstart",function(e){0==e.url.indexOf(a())&&(i.close(),h(v(e.url),t))}),t.promise},accountManagement:function(){var e=r.createAccountUrl();if(void 0!==e){var t=n(e,"_blank","location=no");t.addEventListener("loadstart",function(e){0==e.url.indexOf(a())&&t.close()})}else throw"Not supported by the OIDC server"},redirectUri:function(e){return a()}}}if("cordova-native"==e)return i.enable=!1,{login:function(e){var t=m(),n=r.createLoginUrl(e);return universalLinks.subscribe("keycloak",function(e){universalLinks.unsubscribe("keycloak"),window.cordova.plugins.browsertab.close(),h(v(e.url),t)}),window.cordova.plugins.browsertab.openUrl(n),t.promise},logout:function(e){var t=m(),n=r.createLogoutUrl(e);return universalLinks.subscribe("keycloak",function(e){universalLinks.unsubscribe("keycloak"),window.cordova.plugins.browsertab.close(),r.clearToken(),t.setSuccess()}),window.cordova.plugins.browsertab.openUrl(n),t.promise},register:function(e){var t=m(),n=r.createRegisterUrl(e);return universalLinks.subscribe("keycloak",function(e){universalLinks.unsubscribe("keycloak"),window.cordova.plugins.browsertab.close(),h(v(e.url),t)}),window.cordova.plugins.browsertab.openUrl(n),t.promise},accountManagement:function(){var e=r.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:r.redirectUri?r.redirectUri:"http://localhost"}};throw"invalid adapter type: "+e}r.init=function(o){if(r.didInitialize)throw Error("A 'Keycloak' instance can only be initialized once.");if(r.didInitialize=!0,r.authenticated=!1,n=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&&(u=o.useNonce),void 0!==o.checkLoginIframe&&(i.enable=o.checkLoginIframe),o.checkLoginIframeInterval&&(i.interval=o.checkLoginIframeInterval),"login-required"===o.onLoad&&(r.loginRequired=!0),o.responseMode)if("query"===o.responseMode||"fragment"===o.responseMode)r.responseMode=o.responseMode;else throw"Invalid value for responseMode";if(o.flow){switch(o.flow){case"standard":r.responseType="code";break;case"implicit":r.responseType="id_token token";break;case"hybrid":r.responseType="code id_token token";break;default:throw"Invalid value for flow"}r.flow=o.flow}if(null!=o.timeSkew&&(r.timeSkew=o.timeSkew),o.redirectUri&&(r.redirectUri=o.redirectUri),o.silentCheckSsoRedirectUri&&(r.silentCheckSsoRedirectUri=o.silentCheckSsoRedirectUri),"boolean"==typeof o.silentCheckSsoFallback?r.silentCheckSsoFallback=o.silentCheckSsoFallback:r.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}.`);r.pkceMethod=o.pkceMethod}else r.pkceMethod="S256";"boolean"==typeof o.enableLogging?r.enableLogging=o.enableLogging:r.enableLogging=!1,"POST"===o.logoutMethod?r.logoutMethod="POST":r.logoutMethod="GET","string"==typeof o.scope&&(r.scope=o.scope),"string"==typeof o.acrValues&&(r.acrValues=o.acrValues),"number"==typeof o.messageReceiveTimeout&&o.messageReceiveTimeout>0?r.messageReceiveTimeout=o.messageReceiveTimeout:r.messageReceiveTimeout=1e4}r.responseMode||(r.responseMode="fragment"),r.responseType||(r.responseType="code",r.flow="standard");var a=m(),s=m();s.promise.then(function(){r.onReady&&r.onReady(r.authenticated),a.setSuccess(r.authenticated)}).catch(function(e){a.setError(e)});var c=function(t){var n=m();function o(e){e?r.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}}:r.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 r.iframeVersion&&(e=e+"?version="+r.iframeVersion),e},thirdPartyCookiesIframe:function(){var e=p()+"/protocol/openid-connect/3p-cookies/step1.html";return r.iframeVersion&&(e=e+"?version="+r.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 i=new XMLHttpRequest;i.open("GET",s,!0),i.setRequestHeader("Accept","application/json"),i.onreadystatechange=function(){if(4==i.readyState)if(200==i.status||d(i)){var e=JSON.parse(i.responseText);r.authServerUrl=e["auth-server-url"],r.realm=e.realm,r.clientId=e.resource,o(null),n.setSuccess()}else n.setError()},i.send()}else{if(!e.clientId)throw"clientId missing";r.clientId=e.clientId;var a=e.oidcProvider;if(a)if("string"==typeof a){var s,u="/"==a.charAt(a.length-1)?a+".well-known/openid-configuration":a+"/.well-known/openid-configuration",i=new XMLHttpRequest;i.open("GET",u,!0),i.setRequestHeader("Accept","application/json"),i.onreadystatechange=function(){4==i.readyState&&(200==i.status||d(i)?(o(JSON.parse(i.responseText)),n.setSuccess()):n.setError())},i.send()}else o(a),n.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";r.authServerUrl=e.url,r.realm=e.realm,o(null),n.setSuccess()}}return n.promise}();function l(){var e=function(e){e||(n.prompt="none"),o&&o.locale&&(n.locale=o.locale),r.login(n).then(function(){s.setSuccess()}).catch(function(e){s.setError(e)})},t=function(){var e=document.createElement("iframe"),t=r.createLoginUrl({prompt:"none",redirectUri:r.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 n=function(t){t.origin===window.location.origin&&e.contentWindow===t.source&&(h(v(t.data),s),document.body.removeChild(e),window.removeEventListener("message",n))};window.addEventListener("message",n)},n={};switch(o.onLoad){case"check-sso":i.enable?_().then(function(){S().then(function(n){n?s.setSuccess():r.silentCheckSsoRedirectUri?t():e(!1)}).catch(function(e){s.setError(e)})}):r.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(){h(e,s)}).catch(function(e){s.setError(e)});o?o.token&&o.refreshToken?(g(o.token,o.refreshToken,o.idToken),i.enable?_().then(function(){S().then(function(e){e?(r.onAuthSuccess&&r.onAuthSuccess(),s.setSuccess(),w()):s.setSuccess()}).catch(function(e){s.setError(e)})}):r.updateToken(-1).then(function(){r.onAuthSuccess&&r.onAuthSuccess(),s.setSuccess()}).catch(function(e){r.onAuthError&&r.onAuthError(),o.onLoad?l():s.setError(e)})):o.onLoad?l():s.setSuccess():s.setSuccess()}return c.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){a.setError(e)})}),c.catch(function(e){a.setError(e)}),a.promise},r.login=function(e){return t.login(e)},r.createLoginUrl=function(e){var o,i=y(),a=y(),s=t.redirectUri(e),c={state:i,nonce:a,redirectUri:encodeURIComponent(s),loginOptions:e};e&&e.prompt&&(c.prompt=e.prompt),o=e&&"register"==e.action?r.endpoints.register():r.endpoints.authorize();var l=e&&e.scope||r.scope;l?-1===l.indexOf("openid")&&(l="openid "+l):l="openid";var p=o+"?client_id="+encodeURIComponent(r.clientId)+"&redirect_uri="+encodeURIComponent(s)+"&state="+encodeURIComponent(i)+"&response_mode="+encodeURIComponent(r.responseMode)+"&response_type="+encodeURIComponent(r.responseType)+"&scope="+encodeURIComponent(l);if(u&&(p=p+"&nonce="+encodeURIComponent(a)),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||r.acrValues)&&(p+="&acr_values="+encodeURIComponent(e.acrValues||r.acrValues)),r.pkceMethod){var h=f(96,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789");c.pkceCodeVerifier=h,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(tK.arrayBuffer(t)))).replace(/\+/g,"-").replace(/\//g,"_").replace(/\=/g,"")}(r.pkceMethod,h)+"&code_challenge_method="+r.pkceMethod}return n.add(c),p},r.logout=function(e){return t.logout(e)},r.createLogoutUrl=function(e){if("POST"===(e?.logoutMethod??r.logoutMethod))return r.endpoints.logout();var n=r.endpoints.logout()+"?client_id="+encodeURIComponent(r.clientId)+"&post_logout_redirect_uri="+encodeURIComponent(t.redirectUri(e,!1));return r.idToken&&(n+="&id_token_hint="+encodeURIComponent(r.idToken)),n},r.register=function(e){return t.register(e)},r.createRegisterUrl=function(e){return e||(e={}),e.action="register",r.createLoginUrl(e)},r.createAccountUrl=function(e){var n=p(),o=void 0;return void 0!==n&&(o=n+"/account?referrer="+encodeURIComponent(r.clientId)+"&referrer_uri="+encodeURIComponent(t.redirectUri(e))),o},r.accountManagement=function(){return t.accountManagement()},r.hasRealmRole=function(e){var t=r.realmAccess;return!!t&&t.roles.indexOf(e)>=0},r.hasResourceRole=function(e,t){if(!r.resourceAccess)return!1;var n=r.resourceAccess[t||r.clientId];return!!n&&n.roles.indexOf(e)>=0},r.loadUserProfile=function(){var e=p()+"/account",t=new XMLHttpRequest;t.open("GET",e,!0),t.setRequestHeader("Accept","application/json"),t.setRequestHeader("Authorization","bearer "+r.token);var n=m();return t.onreadystatechange=function(){4==t.readyState&&(200==t.status?(r.profile=JSON.parse(t.responseText),n.setSuccess(r.profile)):n.setError())},t.send(),n.promise},r.loadUserInfo=function(){var e=r.endpoints.userinfo(),t=new XMLHttpRequest;t.open("GET",e,!0),t.setRequestHeader("Accept","application/json"),t.setRequestHeader("Authorization","bearer "+r.token);var n=m();return t.onreadystatechange=function(){4==t.readyState&&(200==t.status?(r.userInfo=JSON.parse(t.responseText),n.setSuccess(r.userInfo)):n.setError())},t.send(),n.promise},r.isTokenExpired=function(e){if(!r.tokenParsed||!r.refreshToken&&"implicit"!=r.flow)throw"Not authenticated";if(null==r.timeSkew)return c("[KEYCLOAK] Unable to determine if token is expired as timeskew is not set"),!0;var t=r.tokenParsed.exp-Math.ceil(new Date().getTime()/1e3)+r.timeSkew;if(e){if(isNaN(e))throw"Invalid minValidity";t-=e}return t<0},r.updateToken=function(e){var t=m();if(!r.refreshToken)return t.setError(),t.promise;e=e||5;var n=function(){var n=!1;if(-1==e?(n=!0,c("[KEYCLOAK] Refreshing token: forced refresh")):(!r.tokenParsed||r.isTokenExpired(e))&&(n=!0,c("[KEYCLOAK] Refreshing token: token expired")),n){var i="grant_type=refresh_token&refresh_token="+r.refreshToken,a=r.endpoints.token();if(o.push(t),1==o.length){var s=new XMLHttpRequest;s.open("POST",a,!0),s.setRequestHeader("Content-type","application/x-www-form-urlencoded"),s.withCredentials=!0,i+="&client_id="+encodeURIComponent(r.clientId);var u=new Date().getTime();s.onreadystatechange=function(){if(4==s.readyState)if(200==s.status){c("[KEYCLOAK] Token refreshed"),u=(u+new Date().getTime())/2;var e=JSON.parse(s.responseText);g(e.access_token,e.refresh_token,e.id_token,u),r.onAuthRefreshSuccess&&r.onAuthRefreshSuccess();for(var t=o.pop();null!=t;t=o.pop())t.setSuccess(!0)}else{l("[KEYCLOAK] Failed to refresh token"),400==s.status&&r.clearToken(),r.onAuthRefreshError&&r.onAuthRefreshError();for(var t=o.pop();null!=t;t=o.pop())t.setError(!0)}},s.send(i)}}else t.setSuccess(!1)};return i.enable?S().then(function(){n()}).catch(function(e){t.setError(e)}):n(),t.promise},r.clearToken=function(){r.token&&(g(null,null,null),r.onAuthLogout&&r.onAuthLogout(),r.loginRequired&&r.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 n=localStorage.key(t);if(n&&0==n.indexOf("kc-callback-")){var r=localStorage.getItem(n);if(r)try{var o=JSON.parse(r).expires;(!o||o<e)&&localStorage.removeItem(n)}catch(e){localStorage.removeItem(n)}}}}localStorage.setItem("kc-test","test"),localStorage.removeItem("kc-test"),this.get=function(t){if(t){var n="kc-callback-"+t,r=localStorage.getItem(n);return r&&(localStorage.removeItem(n),r=JSON.parse(r)),e(),r}},this.add=function(t){e();var n="kc-callback-"+t.state;t.expires=new Date().getTime()+36e5,localStorage.setItem(n,JSON.stringify(t))}},x=function(){if(!(this instanceof x))return new x;this.get=function(r){if(r){var o=t("kc-callback-"+r);if(n("kc-callback-"+r,"",e(-100)),o)return JSON.parse(o)}},this.add=function(t){n("kc-callback-"+t.state,JSON.stringify(t),e(60))},this.removeItem=function(t){n(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+"=",n=document.cookie.split(";"),r=0;r<n.length;r++){for(var o=n[r];" "==o.charAt(0);)o=o.substring(1);if(0==o.indexOf(t))return o.substring(t.length,o.length)}return""},n=function(e,t,n){var r=e+"="+t+"; expires="+n.toUTCString()+"; ";document.cookie=r}};function A(e){return function(){r.enableLogging&&e.apply(console,Array.prototype.slice.call(arguments))}}}var tY=function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,s)}u((r=r.apply(e,t||[])).next())})};let tX=t=>n=>class extends n{constructor(){super(...arguments),this._connectRequested=!1,this._status=e.DISCONNECTED,this._statusCallback=e=>this._onEventProviderStatusChanged(e)}connectedCallback(){super.connectedCallback&&super.connectedCallback(),this.connectEvents()}disconnectedCallback(){this.disconnectEvents(),super.disconnectedCallback&&super.disconnectedCallback()}connectEvents(){if(!t.getEventProvider())return void console.log("No event provider available so cannot subscribe");this._connectRequested||(this._connectRequested=!0,t.getEventProvider().subscribeStatusChange(this._statusCallback),this._doConnect())}disconnectEvents(){this._connectRequested&&(this._connectRequested=!1,t.getEventProvider().unsubscribeStatusChange(this._statusCallback),this._onEventsDisconnect())}_doConnect(){return tY(this,void 0,void 0,function*(){this.eventsConnected&&this._onEventsConnect()})}get eventsConnected(){return this._connectRequested&&t.getEventProvider().status===e.CONNECTED}_onEventProviderStatusChanged(t){switch(t){case e.DISCONNECTED:this._onEventsDisconnect();break;case e.CONNECTED:this._doConnect()}}_onEventsConnect(){this._addEventSubscriptions(),this.onEventsConnect()}_onEventsDisconnect(){this._removeEventSubscriptions(),this.onEventsDisconnect()}_addEventSubscriptions(){return tY(this,void 0,void 0,function*(){let e=!!this._attributeRefs,n=!!this._assetIds,r=this._attributeRefs?this._attributeRefs:this._assetIds;if(r&&r.length>0){if(this._subscriptionIds=[],n){let e=yield t.getEventProvider().subscribeAssetEvents(r,!0,e=>this._onEvent(e)),n=this._attributeRefs?this._attributeRefs:this._assetIds;if(!this._subscriptionIds||!eI(r,n))return void t.getEventProvider().unsubscribe(e);this._subscriptionIds.push(e)}let o=yield t.getEventProvider().subscribeAttributeEvents(r,e,e=>this._onEvent(e)),i=this._attributeRefs?this._attributeRefs:this._assetIds;if(!this._subscriptionIds||!eI(r,i))return void t.getEventProvider().unsubscribe(o);this._subscriptionIds.push(o)}})}_removeEventSubscriptions(){this._subscriptionIds&&(this._subscriptionIds.forEach(e=>{t.getEventProvider().unsubscribe(e)}),this._subscriptionIds=void 0)}_refreshEventSubscriptions(){this._removeEventSubscriptions(),this._addEventSubscriptions()}set assetIds(e){eI(this._assetIds,e)||(this._assetIds=e,this._refreshEventSubscriptions(),this.requestUpdate("assetIds"))}get assetIds(){return this._assetIds}set attributeRefs(e){eI(this._attributeRefs,e)||(this._attributeRefs=e,this._refreshEventSubscriptions())}get attributeRefs(){return this._attributeRefs}_sendEvent(e){t.getEventProvider().sendEvent(e)}_sendEventWithReply(e){return t.getEventProvider().sendEventWithReply(e)}onEventsConnect(){}onEventsDisconnect(){}_onEvent(e){}},tQ="#4d9d2a",tZ="#FFFFFF",t0="#FFFFFF",t1="#F9F9F9",t2="#CCCCCC",t3="#be0000",t5="#FFFFFF",t8="#4c4c4c",t6="#000000",t4="#000000",t9="#FFFFFF",t7="0 5px 5px -5px rgba(0,0,0,0.3)",ne="0 1px 3px 0 rgba(0,0,0,0.21)",nt="50px",nn="0.3";var nr=function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,s)}u((r=r.apply(e,t||[])).next())})};let no="mdi",ni="openremote",na="restricted_user";!function(e){e.MANAGER_FAILED_TO_LOAD="MANAGER_FAILED_TO_LOAD",e.AUTH_FAILED="AUTH_FAILED",e.AUTH_TYPE_UNSUPPORTED="AUTH_TYPE_UNSUPPORTED",e.CONSOLE_ERROR="CONSOLE_INIT_ERROR",e.EVENTS_CONNECTION_ERROR="EVENTS_CONNECTION_ERROR",e.TRANSLATION_ERROR="TRANSLATION_ERROR"}(o||(o={})),function(e){e.ERROR="ERROR",e.READY="READY",e.ONLINE="ONLINE",e.OFFLINE="OFFLINE",e.CONNECTING="CONNECTING",e.CONSOLE_INIT="CONSOLE_INIT",e.CONSOLE_READY="CONSOLE_READY",e.TRANSLATE_INIT="TRANSLATE_INIT",e.TRANSLATE_LANGUAGE_CHANGED="TRANSLATE_LANGUAGE_CHANGED",e.DISPLAY_REALM_CHANGED="DISPLAY_REALM_CHANGED"}(i||(i={}));let ns={en:"english",cn:"chinese",nl:"dutch",fr:"french",de:"german",it:"italian",pt:"portuguese",ro:"romanian",es:"spanish",uk:"ukrainian"};function nu(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=ni),t}class nc{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,n])=>{let r=n.roles;e.set(t,r)}):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 tw()}get language(){return eh.language}set language(e){console.debug(`Changing language to ${e}.`),e&&(eh.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(i.DISPLAY_REALM_CHANGED))}get clientId(){return this._config.clientId||ni}getEventProvider(){return this.events}get mapType(){return this._config.mapType||"VECTOR"}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 nr(this,void 0,void 0,function*(){this._config&&console.debug("Already initialised"),this._config=nu(e);let t=yield this.loadManagerInfo(),n=new tm(this._config.realm,this._config.consoleAutoEnable,()=>{this._emitEvent(i.CONSOLE_READY)});if(this._console=n,"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(n){(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?(this._readyCallback&&(yield this._readyCallback()),this._ready=!0,this._emitEvent(i.READY)):(this._config=void 0,console.warn("Failed to initialise the manager")),this.displayRealm=e.realm||"master",t)})}loadManagerInfo(){return nr(this,void 0,void 0,function*(){try{let e=yield new Promise((e,t)=>{let n=new XMLHttpRequest;n.addEventListener("load",()=>{e(JSON.parse(n.responseText))}),n.addEventListener("error",()=>{t(Error("Failed to contact the manager"))}),n.open("GET",this._config.managerUrl+"/api/master/info"),n.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(o.MANAGER_FAILED_TO_LOAD),!1}})}doTranslateInit(){return nr(this,void 0,void 0,function*(){if(eh.isInitialized)return!0;eh.on("initialized",e=>{this._emitEvent(i.TRANSLATE_INIT)}),eh.on("languageChanged",e=>{eb().locale(e),this._emitEvent(i.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,n)=>"uppercase"===t?e.toUpperCase():e instanceof Date?eb()(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 eh.use(tq).init(e)}catch(e){return console.error(e),this._setError(o.TRANSLATION_ERROR),!1}return!0})}doDescriptorsInit(){return nr(this,void 0,void 0,function*(){if(!this.config.loadDescriptors)return!0;try{let e=yield tw().api.AssetModelResource.getAssetInfos(),t=yield tw().api.AssetModelResource.getMetaItemDescriptors(),n=yield tw().api.AssetModelResource.getValueDescriptors();ey.AssetModelUtil._assetTypeInfos=e.data,ey.AssetModelUtil._metaItemDescriptors=Object.values(t.data),ey.AssetModelUtil._valueDescriptors=Object.values(n.data)}catch(e){return console.error(e),!1}return!0})}doAuthInit(){return nr(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(o.AUTH_TYPE_UNSUPPORTED),!1}return!!e&&(tw().addRequestInterceptor(e=>{if(!e.headers.Authorization){let t=this.getAuthorizationHeader();t&&(e.headers.Authorization=t)}return e}),e)})}doRestApiInit(){return tw().setTimeout(2e4),tw().initialise(this.getApiBaseUrl()),!0}doEventsSubscriptionInit(){return nr(this,void 0,void 0,function*(){let e=!1;return"WEBSOCKET"===this._config.eventProviderType&&(this._events=new tR(this._config.managerUrl),this._events.subscribeStatusChange(e=>this._onEventProviderStatusChanged(e)),e=yield this._events.connect()),e||this._setError(o.EVENTS_CONNECTION_ERROR),e})}_connectEvents(){var t;(null==(t=this.events)?void 0:t.status)===e.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(t){switch(t){case e.DISCONNECTED:this._onDisconnect();break;case e.CONNECTED:break;case e.CONNECTING:this._emitEvent(i.CONNECTING)}}doConsoleInit(){return nr(this,void 0,void 0,function*(){try{return yield this.console.initialise(),this._emitEvent(i.CONSOLE_INIT),!0}catch(e){return this._setError(o.CONSOLE_ERROR),!1}})}doIconInit(){this._config.loadIcons&&(tz.IconSets.addIconSet("mdi",(0,tz.createMdiIconSet)(nl.managerUrl)),tz.IconSets.addIconSet("or",(0,tz.createSvgIconSet)(tz.OrIconSet.size,tz.OrIconSet.icons)))}getConsoleAppConfig(){return nr(this,void 0,void 0,function*(){var e;try{let t=yield fetch((null!=(e=nl.managerUrl)?e:"")+"/consoleappconfig/"+nl.displayRealm+".json");return this._consoleAppConfig=yield t.json(),!0}catch(e){return!0}})}getConsolePreferredLanguage(){return nr(this,arguments,void 0,function*(e=this.console){return e.retrieveData("LANGUAGE")})}getUserPreferredLanguage(){return nr(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 nr(this,arguments,void 0,function*(e,t=this.rest){return this.authenticated?t?void(yield t.api.UserResource.updateCurrentUserLocale(e,{headers:{"Content-Type":"application/json"}})):void console.warn("Tried updating user language, but the REST API is not initialized yet."):void 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 nr(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 nr(this,void 0,void 0,function*(){var e,t,n,r;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==(n=this.config.credentials)?void 0:n.password)?null==(r=this.config.credentials)?void 0:r.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 tw().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 tw().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(na)}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 n=this.roles;return n&&n.has(t)&&n.get(t).indexOf(e)>=0}getAuthorizationHeader(){return this.getKeycloakToken()?"Bearer "+this.getKeycloakToken():this.getBasicToken()?"Basic "+this.getBasicToken():void 0}getKeycloakToken(){if(this.isKeycloak())return 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,this._events||this.doEventsSubscriptionInit()}loadAndInitialiseKeycloak(){return nr(this,void 0,void 0,function*(){var e,t,n,r;try{this._keycloak=new tJ({clientId:this._config.clientId,realm:this._config.realm,url:this._config.keycloakUrl});let o=yield this._getNativeOfflineRefreshToken(),i=yield this._keycloak.init({checkLoginIframe:!1,onLoad:"check-sso"});if(!i&&o)try{console.error("SETTING OFFLINE TOKEN"),this._keycloak.refreshToken=o,i=yield this._updateKeycloakAccessToken()}catch(e){console.error("Failed to authenticate using offline token")}if(i)this._name=null==(e=this._keycloak.tokenParsed)?void 0:e.name,this._username=null==(t=this._keycloak.tokenParsed)?void 0:t.preferred_username,this._createTokenUpdateInterval(),this.isMobile()&&(null==(r=null==(n=this._keycloak)?void 0:n.refreshTokenParsed)?void 0:r.typ)==="Offline"&&(console.debug("Storing offline refresh token"),this.console.storeData("REFRESH_TOKEN",this._keycloak.refreshToken)),this._onAuthenticated();else if(this.config.autoLogin)return this.login(),!1;return!0}catch(e){return this._authenticated=!1,this._setError(o.AUTH_FAILED),console.error("Failed to initialise Keycloak: "+e),!1}})}_createTokenUpdateInterval(){this._keycloakUpdateTokenInterval||(this._keycloakUpdateTokenInterval=window.setInterval(()=>nr(this,void 0,void 0,function*(){yield this._updateKeycloakAccessToken().catch(()=>{console.debug("Keycloak failed to refresh the access token"),this._onDisconnect()})}),1e4))}_updateKeycloakAccessToken(){return nr(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 nr(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(i.ERROR),console.warn("Error set: "+e)}_clearWebHistory(){var e;null==(e=this.console)||e._doSendGenericMessage("CLEAR_WEB_HISTORY",void 0)}_onDisconnect(){return nr(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(i.OFFLINE),this.reconnect())})}_onReconnected(){console.debug("Reconnected"),this._disconnected=!1,this._createTokenUpdateInterval(),this._emitEvent(i.ONLINE)}reconnect(){return nr(this,arguments,void 0,function*(t=3e3){if(!this._disconnected)return;this._reconnectTimer&&(window.clearTimeout(this._reconnectTimer),this._reconnectTimer=void 0);let n=yield nr(this,void 0,void 0,function*(){var t;if(console.debug("Attempting reconnect"),!(yield this.isKeycloakReachable()))return console.debug("Keycloak is unreachable"),!1;console.debug("Keycloak is reachable"),console.debug("Checking keycloak access token");try{yield this._updateKeycloakAccessToken()}catch(t){let e=yield this._getNativeOfflineRefreshToken();this._keycloak.refreshToken=e;try{yield this._updateKeycloakAccessToken()}catch(e){console.debug("Cannot update access token so sending to login"),this.login();return}return console.debug("Keycloak access token is valid"),!0}let n=this.events&&this.events.status===e.CONNECTING;return console.debug("If event provider offline then attempting reconnect: offline="+n),!n||(yield null==(t=this.events)?void 0:t.connect())});if(void 0!==n){if(!n){console.debug("Scheduling another reconnect attempt in (ms): "+(t=Math.min(nc.MAX_RECONNECT_DELAY,t+3e3))),this._reconnectTimer=window.setTimeout(()=>this.reconnect(t),t);return}this._onReconnected()}})}isKeycloakReachable(){return nr(this,arguments,void 0,function*(e=2e3){let t=new AbortController,n=setTimeout(()=>t.abort(),e);try{let e=this._keycloak.endpoints.token(),n=yield fetch(e,{method:"OPTIONS",signal:t.signal});return 200===n.status}catch(e){return!1}finally{clearTimeout(n)}})}}nc.MAX_RECONNECT_DELAY=45e3;let nl=new nc,nf=nl})(),s})());
|
|
2
|
+
//# sourceMappingURL=index.js.map
|