@combeenation/custom-code-sdk 0.0.1-alpha5 โ 0.0.1-alpha7
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/README.md +0 -0
- package/dist/bundle.cjs.js +1 -14
- package/dist/bundle.es.js +341 -17162
- package/dist/index.d.ts +386 -79
- package/package.json +3 -4
package/dist/bundle.cjs.js
CHANGED
|
@@ -1,14 +1 @@
|
|
|
1
|
-
"use strict";var j_=Object.defineProperty;var cg=t=>{throw TypeError(t)};var L_=(t,e,n)=>e in t?j_(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var ar=(t,e,n)=>L_(t,typeof e!="symbol"?e+"":e,n),ug=(t,e,n)=>e.has(t)||cg("Cannot "+n);var xe=(t,e,n)=>(ug(t,e,"read from private field"),n?n.call(t):e.get(t)),wt=(t,e,n)=>e.has(t)?cg("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),cr=(t,e,n,r)=>(ug(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const k=require("zod"),wm="0.0.1-alpha5";var Sl,gr;class W_{constructor(e){ar(this,"id");wt(this,Sl,"v1");wt(this,gr);var r,i;this.id=e;const n=(i=(r=window.Cbn)==null?void 0:r.getCustomCodeSdkBridge)==null?void 0:i.call(r,xe(this,Sl));if(cr(this,gr,n==null?void 0:n.getButtonSdkBridge(this.id)),!xe(this,gr))throw new Error(`Cannot access API for Button "${this.id}".`)}onRendered(e){var n;return((n=xe(this,gr))==null?void 0:n.addOnRenderedCallback(e))??{unsubscribe:()=>{}}}onClick(e){var n;return((n=xe(this,gr))==null?void 0:n.addOnClickCallback(e))??{unsubscribe:()=>{}}}async setVisible(e){var n;await((n=xe(this,gr))==null?void 0:n.setVisible(e))}setText(e){var n;(n=xe(this,gr))==null||n.setText(e)}}Sl=new WeakMap,gr=new WeakMap;var Il,Bi;class V_{constructor(e){ar(this,"id");wt(this,Il,"v1");wt(this,Bi);var r,i;this.id=e;const n=(i=(r=window.Cbn)==null?void 0:r.getCustomCodeSdkBridge)==null?void 0:i.call(r,xe(this,Il));if(cr(this,Bi,n==null?void 0:n.getCheckboxSdkBridge(this.id)),!xe(this,Bi))throw new Error(`Cannot access API for Checkbox "${this.id}".`)}onRendered(e){var n;return((n=xe(this,Bi))==null?void 0:n.addOnRenderedCallback(e))??{unsubscribe:()=>{}}}async setVisible(e){var n;await((n=xe(this,Bi))==null?void 0:n.setVisible(e))}}Il=new WeakMap,Bi=new WeakMap;var kl,Ki;class q_{constructor(e){ar(this,"id");wt(this,kl,"v1");wt(this,Ki);var r,i;this.id=e;const n=(i=(r=window.Cbn)==null?void 0:r.getCustomCodeSdkBridge)==null?void 0:i.call(r,xe(this,kl));if(cr(this,Ki,n==null?void 0:n.getCollapsibleSdkBridge(this.id)),!xe(this,Ki))throw new Error(`Cannot access API for Collapsible "${this.id}".`)}onRendered(e){var n;return((n=xe(this,Ki))==null?void 0:n.addOnRenderedCallback(e))??{unsubscribe:()=>{}}}async setVisible(e){var n;await((n=xe(this,Ki))==null?void 0:n.setVisible(e))}}kl=new WeakMap,Ki=new WeakMap;var Tl,vr;class H_{constructor(e){ar(this,"id");wt(this,Tl,"v1");wt(this,vr);var r,i;this.id=e;const n=(i=(r=window.Cbn)==null?void 0:r.getCustomCodeSdkBridge)==null?void 0:i.call(r,xe(this,Tl));if(cr(this,vr,n==null?void 0:n.getCustomCtrlSdkBridge(this.id)),!xe(this,vr))throw new Error(`Cannot access API for Custom Control "${this.id}".`)}set renderFn(e){var n;(n=xe(this,vr))==null||n.setRenderFn(e)}async render(e){var n;typeof e=="function"&&(this.renderFn=e),await((n=xe(this,vr))==null?void 0:n.render())}getElement(){var n;return(n=xe(this,vr))==null?void 0:n.getElement()}async setVisible(e){var n;await((n=xe(this,vr))==null?void 0:n.setVisible(e))}}Tl=new WeakMap,vr=new WeakMap;var El,Xi;class B_{constructor(e){ar(this,"id");wt(this,El,"v1");wt(this,Xi);var r,i;this.id=e;const n=(i=(r=window.Cbn)==null?void 0:r.getCustomCodeSdkBridge)==null?void 0:i.call(r,xe(this,El));if(cr(this,Xi,n==null?void 0:n.getDataviewSdkBridge(this.id)),!xe(this,Xi))throw new Error(`Cannot access API for Dataview "${this.id}".`)}onRendered(e){var n;return((n=xe(this,Xi))==null?void 0:n.addOnRenderedCallback(e))??{unsubscribe:()=>{}}}async setVisible(e){var n;await((n=xe(this,Xi))==null?void 0:n.setVisible(e))}}El=new WeakMap,Xi=new WeakMap;var xl,Gi;class K_{constructor(e){ar(this,"id");wt(this,xl,"v1");wt(this,Gi);var r,i;this.id=e;const n=(i=(r=window.Cbn)==null?void 0:r.getCustomCodeSdkBridge)==null?void 0:i.call(r,xe(this,xl));if(cr(this,Gi,n==null?void 0:n.getInputSdkBridge(this.id)),!xe(this,Gi))throw new Error(`Cannot access API for Input "${this.id}".`)}onRendered(e){var n;return((n=xe(this,Gi))==null?void 0:n.addOnRenderedCallback(e))??{unsubscribe:()=>{}}}async setVisible(e){var n;await((n=xe(this,Gi))==null?void 0:n.setVisible(e))}}xl=new WeakMap,Gi=new WeakMap;var Pl,Ji;class X_{constructor(e){ar(this,"id");wt(this,Pl,"v1");wt(this,Ji);var r,i;this.id=e;const n=(i=(r=window.Cbn)==null?void 0:r.getCustomCodeSdkBridge)==null?void 0:i.call(r,xe(this,Pl));if(cr(this,Ji,n==null?void 0:n.getPanelSdkBridge(this.id)),!xe(this,Ji))throw new Error(`Cannot access API for Panel "${this.id}".`)}onRendered(e){var n;return((n=xe(this,Ji))==null?void 0:n.addOnRenderedCallback(e))??{unsubscribe:()=>{}}}async setVisible(e){var n;await((n=xe(this,Ji))==null?void 0:n.setVisible(e))}}Pl=new WeakMap,Ji=new WeakMap;var Dl,ei;class G_{constructor(e){ar(this,"id");wt(this,Dl,"v1");wt(this,ei);var r,i;this.id=e;const n=(i=(r=window.Cbn)==null?void 0:r.getCustomCodeSdkBridge)==null?void 0:i.call(r,xe(this,Dl));if(cr(this,ei,n==null?void 0:n.getTextSdkBridge(this.id)),!xe(this,ei))throw new Error(`Cannot access API for Text "${this.id}".`)}onRendered(e){var n;return((n=xe(this,ei))==null?void 0:n.addOnRenderedCallback(e))??{unsubscribe:()=>{}}}async setVisible(e){var n;await((n=xe(this,ei))==null?void 0:n.setVisible(e))}setText(e){var n;(n=xe(this,ei))==null||n.setText(e)}}Dl=new WeakMap,ei=new WeakMap;const Tu=[];function Sm(t,e){if(Tu.length>=1)throw new Error("Only 1 `ConfiguratorClient` can be created at a time.");Tu.push({client:t,internals:e})}function lg(){const t=Tu[0];if(!t)throw new Error("Operation not possible as no `ConfiguratorClient` has been registered yet.");return t.client}function Yc(){const t=Tu[0];if(!t)throw new Error("Operation not possible as no `ConfiguratorClient` has been registered yet.");return t.internals}function J_(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var nf={exports:{}},fg;function Q_(){return fg||(fg=1,(function(t){var e=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function i(c,u,l){this.fn=c,this.context=u,this.once=l||!1}function o(c,u,l,f,m){if(typeof l!="function")throw new TypeError("The listener must be a function");var d=new i(l,f||c,m),h=n?n+u:u;return c._events[h]?c._events[h].fn?c._events[h]=[c._events[h],d]:c._events[h].push(d):(c._events[h]=d,c._eventsCount++),c}function s(c,u){--c._eventsCount===0?c._events=new r:delete c._events[u]}function a(){this._events=new r,this._eventsCount=0}a.prototype.eventNames=function(){var u=[],l,f;if(this._eventsCount===0)return u;for(f in l=this._events)e.call(l,f)&&u.push(n?f.slice(1):f);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(l)):u},a.prototype.listeners=function(u){var l=n?n+u:u,f=this._events[l];if(!f)return[];if(f.fn)return[f.fn];for(var m=0,d=f.length,h=new Array(d);m<d;m++)h[m]=f[m].fn;return h},a.prototype.listenerCount=function(u){var l=n?n+u:u,f=this._events[l];return f?f.fn?1:f.length:0},a.prototype.emit=function(u,l,f,m,d,h){var g=n?n+u:u;if(!this._events[g])return!1;var p=this._events[g],v=arguments.length,_,P;if(p.fn){switch(p.once&&this.removeListener(u,p.fn,void 0,!0),v){case 1:return p.fn.call(p.context),!0;case 2:return p.fn.call(p.context,l),!0;case 3:return p.fn.call(p.context,l,f),!0;case 4:return p.fn.call(p.context,l,f,m),!0;case 5:return p.fn.call(p.context,l,f,m,d),!0;case 6:return p.fn.call(p.context,l,f,m,d,h),!0}for(P=1,_=new Array(v-1);P<v;P++)_[P-1]=arguments[P];p.fn.apply(p.context,_)}else{var x=p.length,R;for(P=0;P<x;P++)switch(p[P].once&&this.removeListener(u,p[P].fn,void 0,!0),v){case 1:p[P].fn.call(p[P].context);break;case 2:p[P].fn.call(p[P].context,l);break;case 3:p[P].fn.call(p[P].context,l,f);break;case 4:p[P].fn.call(p[P].context,l,f,m);break;default:if(!_)for(R=1,_=new Array(v-1);R<v;R++)_[R-1]=arguments[R];p[P].fn.apply(p[P].context,_)}}return!0},a.prototype.on=function(u,l,f){return o(this,u,l,f,!1)},a.prototype.once=function(u,l,f){return o(this,u,l,f,!0)},a.prototype.removeListener=function(u,l,f,m){var d=n?n+u:u;if(!this._events[d])return this;if(!l)return s(this,d),this;var h=this._events[d];if(h.fn)h.fn===l&&(!m||h.once)&&(!f||h.context===f)&&s(this,d);else{for(var g=0,p=[],v=h.length;g<v;g++)(h[g].fn!==l||m&&!h[g].once||f&&h[g].context!==f)&&p.push(h[g]);p.length?this._events[d]=p.length===1?p[0]:p:s(this,d)}return this},a.prototype.removeAllListeners=function(u){var l;return u?(l=n?n+u:u,this._events[l]&&s(this,l)):(this._events=new r,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=n,a.EventEmitter=a,t.exports=a})(nf)),nf.exports}var Z_=Q_();const Rl=J_(Z_);class Qi extends Error{constructor(e,n){const r=new.target.prototype;super(`${e}: Status code '${n}'`),this.statusCode=n,this.__proto__=r}}class cp extends Error{constructor(e="A timeout occurred."){const n=new.target.prototype;super(e),this.__proto__=n}}class Pn extends Error{constructor(e="An abort occurred."){const n=new.target.prototype;super(e),this.__proto__=n}}class Y_ extends Error{constructor(e,n){const r=new.target.prototype;super(e),this.transport=n,this.errorType="UnsupportedTransportError",this.__proto__=r}}class e0 extends Error{constructor(e,n){const r=new.target.prototype;super(e),this.transport=n,this.errorType="DisabledTransportError",this.__proto__=r}}class t0 extends Error{constructor(e,n){const r=new.target.prototype;super(e),this.transport=n,this.errorType="FailedToStartTransportError",this.__proto__=r}}class dg extends Error{constructor(e){const n=new.target.prototype;super(e),this.errorType="FailedToNegotiateWithServerError",this.__proto__=n}}class n0 extends Error{constructor(e,n){const r=new.target.prototype;super(e),this.innerErrors=n,this.__proto__=r}}class Im{constructor(e,n,r){this.statusCode=e,this.statusText=n,this.content=r}}class Al{get(e,n){return this.send({...n,method:"GET",url:e})}post(e,n){return this.send({...n,method:"POST",url:e})}delete(e,n){return this.send({...n,method:"DELETE",url:e})}getCookieString(e){return""}}var N;(function(t){t[t.Trace=0]="Trace",t[t.Debug=1]="Debug",t[t.Information=2]="Information",t[t.Warning=3]="Warning",t[t.Error=4]="Error",t[t.Critical=5]="Critical",t[t.None=6]="None"})(N||(N={}));class Va{constructor(){}log(e,n){}}Va.instance=new Va;const r0="10.0.0";class ht{static isRequired(e,n){if(e==null)throw new Error(`The '${n}' argument is required.`)}static isNotEmpty(e,n){if(!e||e.match(/^\s*$/))throw new Error(`The '${n}' argument should not be empty.`)}static isIn(e,n,r){if(!(e in n))throw new Error(`Unknown ${r} value: ${e}.`)}}class rt{static get isBrowser(){return!rt.isNode&&typeof window=="object"&&typeof window.document=="object"}static get isWebWorker(){return!rt.isNode&&typeof self=="object"&&"importScripts"in self}static get isReactNative(){return!rt.isNode&&typeof window=="object"&&typeof window.document>"u"}static get isNode(){return typeof process<"u"&&process.release&&process.release.name==="node"}}function qa(t,e){let n="";return uo(t)?(n=`Binary data of length ${t.byteLength}`,e&&(n+=`. Content: '${i0(t)}'`)):typeof t=="string"&&(n=`String data of length ${t.length}`,e&&(n+=`. Content: '${t}'`)),n}function i0(t){const e=new Uint8Array(t);let n="";return e.forEach(r=>{const i=r<16?"0":"";n+=`0x${i}${r.toString(16)} `}),n.substring(0,n.length-1)}function uo(t){return t&&typeof ArrayBuffer<"u"&&(t instanceof ArrayBuffer||t.constructor&&t.constructor.name==="ArrayBuffer")}async function km(t,e,n,r,i,o){const s={},[a,c]=Ms();s[a]=c,t.log(N.Trace,`(${e} transport) sending data. ${qa(i,o.logMessageContent)}.`);const u=uo(i)?"arraybuffer":"text",l=await n.post(r,{content:i,headers:{...s,...o.headers},responseType:u,timeout:o.timeout,withCredentials:o.withCredentials});t.log(N.Trace,`(${e} transport) request complete. Response status: ${l.statusCode}.`)}function o0(t){return t===void 0?new Eu(N.Information):t===null?Va.instance:t.log!==void 0?t:new Eu(t)}class s0{constructor(e,n){this._subject=e,this._observer=n}dispose(){const e=this._subject.observers.indexOf(this._observer);e>-1&&this._subject.observers.splice(e,1),this._subject.observers.length===0&&this._subject.cancelCallback&&this._subject.cancelCallback().catch(n=>{})}}class Eu{constructor(e){this._minLevel=e,this.out=console}log(e,n){if(e>=this._minLevel){const r=`[${new Date().toISOString()}] ${N[e]}: ${n}`;switch(e){case N.Critical:case N.Error:this.out.error(r);break;case N.Warning:this.out.warn(r);break;case N.Information:this.out.info(r);break;default:this.out.log(r);break}}}}function Ms(){let t="X-SignalR-User-Agent";return rt.isNode&&(t="User-Agent"),[t,a0(r0,c0(),l0(),u0())]}function a0(t,e,n,r){let i="Microsoft SignalR/";const o=t.split(".");return i+=`${o[0]}.${o[1]}`,i+=` (${t}; `,e&&e!==""?i+=`${e}; `:i+="Unknown OS; ",i+=`${n}`,r?i+=`; ${r}`:i+="; Unknown Runtime Version",i+=")",i}function c0(){if(rt.isNode)switch(process.platform){case"win32":return"Windows NT";case"darwin":return"macOS";case"linux":return"Linux";default:return process.platform}else return""}function u0(){if(rt.isNode)return process.versions.node}function l0(){return rt.isNode?"NodeJS":"Browser"}function rf(t){return t.stack?t.stack:t.message?t.message:`${t}`}function f0(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("could not find global")}class d0 extends Al{constructor(e){if(super(),this._logger=e,typeof fetch>"u"||rt.isNode){const n=typeof __webpack_require__=="function"?__non_webpack_require__:require;this._jar=new(n("tough-cookie")).CookieJar,typeof fetch>"u"?this._fetchType=n("node-fetch"):this._fetchType=fetch,this._fetchType=n("fetch-cookie")(this._fetchType,this._jar)}else this._fetchType=fetch.bind(f0());if(typeof AbortController>"u"){const n=typeof __webpack_require__=="function"?__non_webpack_require__:require;this._abortControllerType=n("abort-controller")}else this._abortControllerType=AbortController}async send(e){if(e.abortSignal&&e.abortSignal.aborted)throw new Pn;if(!e.method)throw new Error("No method defined.");if(!e.url)throw new Error("No url defined.");const n=new this._abortControllerType;let r;e.abortSignal&&(e.abortSignal.onabort=()=>{n.abort(),r=new Pn});let i=null;if(e.timeout){const c=e.timeout;i=setTimeout(()=>{n.abort(),this._logger.log(N.Warning,"Timeout from HTTP request."),r=new cp},c)}e.content===""&&(e.content=void 0),e.content&&(e.headers=e.headers||{},uo(e.content)?e.headers["Content-Type"]="application/octet-stream":e.headers["Content-Type"]="text/plain;charset=UTF-8");let o;try{o=await this._fetchType(e.url,{body:e.content,cache:"no-cache",credentials:e.withCredentials===!0?"include":"same-origin",headers:{"X-Requested-With":"XMLHttpRequest",...e.headers},method:e.method,mode:"cors",redirect:"follow",signal:n.signal})}catch(c){throw r||(this._logger.log(N.Warning,`Error from HTTP request. ${c}.`),c)}finally{i&&clearTimeout(i),e.abortSignal&&(e.abortSignal.onabort=null)}if(!o.ok){const c=await hg(o,"text");throw new Qi(c||o.statusText,o.status)}const a=await hg(o,e.responseType);return new Im(o.status,o.statusText,a)}getCookieString(e){let n="";return rt.isNode&&this._jar&&this._jar.getCookies(e,(r,i)=>n=i.join("; ")),n}}function hg(t,e){let n;switch(e){case"arraybuffer":n=t.arrayBuffer();break;case"text":n=t.text();break;case"blob":case"document":case"json":throw new Error(`${e} is not supported.`);default:n=t.text();break}return n}class h0 extends Al{constructor(e){super(),this._logger=e}send(e){return e.abortSignal&&e.abortSignal.aborted?Promise.reject(new Pn):e.method?e.url?new Promise((n,r)=>{const i=new XMLHttpRequest;i.open(e.method,e.url,!0),i.withCredentials=e.withCredentials===void 0?!0:e.withCredentials,i.setRequestHeader("X-Requested-With","XMLHttpRequest"),e.content===""&&(e.content=void 0),e.content&&(uo(e.content)?i.setRequestHeader("Content-Type","application/octet-stream"):i.setRequestHeader("Content-Type","text/plain;charset=UTF-8"));const o=e.headers;o&&Object.keys(o).forEach(s=>{i.setRequestHeader(s,o[s])}),e.responseType&&(i.responseType=e.responseType),e.abortSignal&&(e.abortSignal.onabort=()=>{i.abort(),r(new Pn)}),e.timeout&&(i.timeout=e.timeout),i.onload=()=>{e.abortSignal&&(e.abortSignal.onabort=null),i.status>=200&&i.status<300?n(new Im(i.status,i.statusText,i.response||i.responseText)):r(new Qi(i.response||i.responseText||i.statusText,i.status))},i.onerror=()=>{this._logger.log(N.Warning,`Error from HTTP request. ${i.status}: ${i.statusText}.`),r(new Qi(i.statusText,i.status))},i.ontimeout=()=>{this._logger.log(N.Warning,"Timeout from HTTP request."),r(new cp)},i.send(e.content)}):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))}}class p0 extends Al{constructor(e){if(super(),typeof fetch<"u"||rt.isNode)this._httpClient=new d0(e);else if(typeof XMLHttpRequest<"u")this._httpClient=new h0(e);else throw new Error("No usable HttpClient found.")}send(e){return e.abortSignal&&e.abortSignal.aborted?Promise.reject(new Pn):e.method?e.url?this._httpClient.send(e):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))}getCookieString(e){return this._httpClient.getCookieString(e)}}class rn{static write(e){return`${e}${rn.RecordSeparator}`}static parse(e){if(e[e.length-1]!==rn.RecordSeparator)throw new Error("Message is incomplete.");const n=e.split(rn.RecordSeparator);return n.pop(),n}}rn.RecordSeparatorCode=30;rn.RecordSeparator=String.fromCharCode(rn.RecordSeparatorCode);class g0{writeHandshakeRequest(e){return rn.write(JSON.stringify(e))}parseHandshakeResponse(e){let n,r;if(uo(e)){const a=new Uint8Array(e),c=a.indexOf(rn.RecordSeparatorCode);if(c===-1)throw new Error("Message is incomplete.");const u=c+1;n=String.fromCharCode.apply(null,Array.prototype.slice.call(a.slice(0,u))),r=a.byteLength>u?a.slice(u).buffer:null}else{const a=e,c=a.indexOf(rn.RecordSeparator);if(c===-1)throw new Error("Message is incomplete.");const u=c+1;n=a.substring(0,u),r=a.length>u?a.substring(u):null}const i=rn.parse(n),o=JSON.parse(i[0]);if(o.type)throw new Error("Expected a handshake response from the server.");return[r,o]}}var Se;(function(t){t[t.Invocation=1]="Invocation",t[t.StreamItem=2]="StreamItem",t[t.Completion=3]="Completion",t[t.StreamInvocation=4]="StreamInvocation",t[t.CancelInvocation=5]="CancelInvocation",t[t.Ping=6]="Ping",t[t.Close=7]="Close",t[t.Ack=8]="Ack",t[t.Sequence=9]="Sequence"})(Se||(Se={}));class v0{constructor(){this.observers=[]}next(e){for(const n of this.observers)n.next(e)}error(e){for(const n of this.observers)n.error&&n.error(e)}complete(){for(const e of this.observers)e.complete&&e.complete()}subscribe(e){return this.observers.push(e),new s0(this,e)}}class m0{constructor(e,n,r){this._bufferSize=1e5,this._messages=[],this._totalMessageCount=0,this._waitForSequenceMessage=!1,this._nextReceivingSequenceId=1,this._latestReceivedSequenceId=0,this._bufferedByteCount=0,this._reconnectInProgress=!1,this._protocol=e,this._connection=n,this._bufferSize=r}async _send(e){const n=this._protocol.writeMessage(e);let r=Promise.resolve();if(this._isInvocationMessage(e)){this._totalMessageCount++;let i=()=>{},o=()=>{};uo(n)?this._bufferedByteCount+=n.byteLength:this._bufferedByteCount+=n.length,this._bufferedByteCount>=this._bufferSize&&(r=new Promise((s,a)=>{i=s,o=a})),this._messages.push(new y0(n,this._totalMessageCount,i,o))}try{this._reconnectInProgress||await this._connection.send(n)}catch{this._disconnected()}await r}_ack(e){let n=-1;for(let r=0;r<this._messages.length;r++){const i=this._messages[r];if(i._id<=e.sequenceId)n=r,uo(i._message)?this._bufferedByteCount-=i._message.byteLength:this._bufferedByteCount-=i._message.length,i._resolver();else if(this._bufferedByteCount<this._bufferSize)i._resolver();else break}n!==-1&&(this._messages=this._messages.slice(n+1))}_shouldProcessMessage(e){if(this._waitForSequenceMessage)return e.type!==Se.Sequence?!1:(this._waitForSequenceMessage=!1,!0);if(!this._isInvocationMessage(e))return!0;const n=this._nextReceivingSequenceId;return this._nextReceivingSequenceId++,n<=this._latestReceivedSequenceId?(n===this._latestReceivedSequenceId&&this._ackTimer(),!1):(this._latestReceivedSequenceId=n,this._ackTimer(),!0)}_resetSequence(e){if(e.sequenceId>this._nextReceivingSequenceId){this._connection.stop(new Error("Sequence ID greater than amount of messages we've received."));return}this._nextReceivingSequenceId=e.sequenceId}_disconnected(){this._reconnectInProgress=!0,this._waitForSequenceMessage=!0}async _resend(){const e=this._messages.length!==0?this._messages[0]._id:this._totalMessageCount+1;await this._connection.send(this._protocol.writeMessage({type:Se.Sequence,sequenceId:e}));const n=this._messages;for(const r of n)await this._connection.send(r._message);this._reconnectInProgress=!1}_dispose(e){e??(e=new Error("Unable to reconnect to server."));for(const n of this._messages)n._rejector(e)}_isInvocationMessage(e){switch(e.type){case Se.Invocation:case Se.StreamItem:case Se.Completion:case Se.StreamInvocation:case Se.CancelInvocation:return!0;case Se.Close:case Se.Sequence:case Se.Ping:case Se.Ack:return!1}}_ackTimer(){this._ackTimerHandle===void 0&&(this._ackTimerHandle=setTimeout(async()=>{try{this._reconnectInProgress||await this._connection.send(this._protocol.writeMessage({type:Se.Ack,sequenceId:this._latestReceivedSequenceId}))}catch{}clearTimeout(this._ackTimerHandle),this._ackTimerHandle=void 0},1e3))}}class y0{constructor(e,n,r,i){this._message=e,this._id=n,this._resolver=r,this._rejector=i}}const b0=30*1e3,_0=15*1e3,C0=1e5;var Ge;(function(t){t.Disconnected="Disconnected",t.Connecting="Connecting",t.Connected="Connected",t.Disconnecting="Disconnecting",t.Reconnecting="Reconnecting"})(Ge||(Ge={}));class up{static create(e,n,r,i,o,s,a){return new up(e,n,r,i,o,s,a)}constructor(e,n,r,i,o,s,a){this._nextKeepAlive=0,this._freezeEventListener=()=>{this._logger.log(N.Warning,"The page is being frozen, this will likely lead to the connection being closed and messages being lost. For more information see the docs at https://learn.microsoft.com/aspnet/core/signalr/javascript-client#bsleep")},ht.isRequired(e,"connection"),ht.isRequired(n,"logger"),ht.isRequired(r,"protocol"),this.serverTimeoutInMilliseconds=o??b0,this.keepAliveIntervalInMilliseconds=s??_0,this._statefulReconnectBufferSize=a??C0,this._logger=n,this._protocol=r,this.connection=e,this._reconnectPolicy=i,this._handshakeProtocol=new g0,this.connection.onreceive=c=>this._processIncomingData(c),this.connection.onclose=c=>this._connectionClosed(c),this._callbacks={},this._methods={},this._closedCallbacks=[],this._reconnectingCallbacks=[],this._reconnectedCallbacks=[],this._invocationId=0,this._receivedHandshakeResponse=!1,this._connectionState=Ge.Disconnected,this._connectionStarted=!1,this._cachedPingMessage=this._protocol.writeMessage({type:Se.Ping})}get state(){return this._connectionState}get connectionId(){return this.connection&&this.connection.connectionId||null}get baseUrl(){return this.connection.baseUrl||""}set baseUrl(e){if(this._connectionState!==Ge.Disconnected&&this._connectionState!==Ge.Reconnecting)throw new Error("The HubConnection must be in the Disconnected or Reconnecting state to change the url.");if(!e)throw new Error("The HubConnection url must be a valid url.");this.connection.baseUrl=e}start(){return this._startPromise=this._startWithStateTransitions(),this._startPromise}async _startWithStateTransitions(){if(this._connectionState!==Ge.Disconnected)return Promise.reject(new Error("Cannot start a HubConnection that is not in the 'Disconnected' state."));this._connectionState=Ge.Connecting,this._logger.log(N.Debug,"Starting HubConnection.");try{await this._startInternal(),rt.isBrowser&&window.document.addEventListener("freeze",this._freezeEventListener),this._connectionState=Ge.Connected,this._connectionStarted=!0,this._logger.log(N.Debug,"HubConnection connected successfully.")}catch(e){return this._connectionState=Ge.Disconnected,this._logger.log(N.Debug,`HubConnection failed to start successfully because of error '${e}'.`),Promise.reject(e)}}async _startInternal(){this._stopDuringStartError=void 0,this._receivedHandshakeResponse=!1;const e=new Promise((n,r)=>{this._handshakeResolver=n,this._handshakeRejecter=r});await this.connection.start(this._protocol.transferFormat);try{let n=this._protocol.version;this.connection.features.reconnect||(n=1);const r={protocol:this._protocol.name,version:n};if(this._logger.log(N.Debug,"Sending handshake request."),await this._sendMessage(this._handshakeProtocol.writeHandshakeRequest(r)),this._logger.log(N.Information,`Using HubProtocol '${this._protocol.name}'.`),this._cleanupTimeout(),this._resetTimeoutPeriod(),this._resetKeepAliveInterval(),await e,this._stopDuringStartError)throw this._stopDuringStartError;(this.connection.features.reconnect||!1)&&(this._messageBuffer=new m0(this._protocol,this.connection,this._statefulReconnectBufferSize),this.connection.features.disconnected=this._messageBuffer._disconnected.bind(this._messageBuffer),this.connection.features.resend=()=>{if(this._messageBuffer)return this._messageBuffer._resend()}),this.connection.features.inherentKeepAlive||await this._sendMessage(this._cachedPingMessage)}catch(n){throw this._logger.log(N.Debug,`Hub handshake failed with error '${n}' during start(). Stopping HubConnection.`),this._cleanupTimeout(),this._cleanupPingTimer(),await this.connection.stop(n),n}}async stop(){const e=this._startPromise;this.connection.features.reconnect=!1,this._stopPromise=this._stopInternal(),await this._stopPromise;try{await e}catch{}}_stopInternal(e){if(this._connectionState===Ge.Disconnected)return this._logger.log(N.Debug,`Call to HubConnection.stop(${e}) ignored because it is already in the disconnected state.`),Promise.resolve();if(this._connectionState===Ge.Disconnecting)return this._logger.log(N.Debug,`Call to HttpConnection.stop(${e}) ignored because the connection is already in the disconnecting state.`),this._stopPromise;const n=this._connectionState;return this._connectionState=Ge.Disconnecting,this._logger.log(N.Debug,"Stopping HubConnection."),this._reconnectDelayHandle?(this._logger.log(N.Debug,"Connection stopped during reconnect delay. Done reconnecting."),clearTimeout(this._reconnectDelayHandle),this._reconnectDelayHandle=void 0,this._completeClose(),Promise.resolve()):(n===Ge.Connected&&this._sendCloseMessage(),this._cleanupTimeout(),this._cleanupPingTimer(),this._stopDuringStartError=e||new Pn("The connection was stopped before the hub handshake could complete."),this.connection.stop(e))}async _sendCloseMessage(){try{await this._sendWithProtocol(this._createCloseMessage())}catch{}}stream(e,...n){const[r,i]=this._replaceStreamingParams(n),o=this._createStreamInvocation(e,n,i);let s;const a=new v0;return a.cancelCallback=()=>{const c=this._createCancelInvocation(o.invocationId);return delete this._callbacks[o.invocationId],s.then(()=>this._sendWithProtocol(c))},this._callbacks[o.invocationId]=(c,u)=>{if(u){a.error(u);return}else c&&(c.type===Se.Completion?c.error?a.error(new Error(c.error)):a.complete():a.next(c.item))},s=this._sendWithProtocol(o).catch(c=>{a.error(c),delete this._callbacks[o.invocationId]}),this._launchStreams(r,s),a}_sendMessage(e){return this._resetKeepAliveInterval(),this.connection.send(e)}_sendWithProtocol(e){return this._messageBuffer?this._messageBuffer._send(e):this._sendMessage(this._protocol.writeMessage(e))}send(e,...n){const[r,i]=this._replaceStreamingParams(n),o=this._sendWithProtocol(this._createInvocation(e,n,!0,i));return this._launchStreams(r,o),o}invoke(e,...n){const[r,i]=this._replaceStreamingParams(n),o=this._createInvocation(e,n,!1,i);return new Promise((a,c)=>{this._callbacks[o.invocationId]=(l,f)=>{if(f){c(f);return}else l&&(l.type===Se.Completion?l.error?c(new Error(l.error)):a(l.result):c(new Error(`Unexpected message type: ${l.type}`)))};const u=this._sendWithProtocol(o).catch(l=>{c(l),delete this._callbacks[o.invocationId]});this._launchStreams(r,u)})}on(e,n){!e||!n||(e=e.toLowerCase(),this._methods[e]||(this._methods[e]=[]),this._methods[e].indexOf(n)===-1&&this._methods[e].push(n))}off(e,n){if(!e)return;e=e.toLowerCase();const r=this._methods[e];if(r)if(n){const i=r.indexOf(n);i!==-1&&(r.splice(i,1),r.length===0&&delete this._methods[e])}else delete this._methods[e]}onclose(e){e&&this._closedCallbacks.push(e)}onreconnecting(e){e&&this._reconnectingCallbacks.push(e)}onreconnected(e){e&&this._reconnectedCallbacks.push(e)}_processIncomingData(e){if(this._cleanupTimeout(),this._receivedHandshakeResponse||(e=this._processHandshakeResponse(e),this._receivedHandshakeResponse=!0),e){const n=this._protocol.parseMessages(e,this._logger);for(const r of n)if(!(this._messageBuffer&&!this._messageBuffer._shouldProcessMessage(r)))switch(r.type){case Se.Invocation:this._invokeClientMethod(r).catch(i=>{this._logger.log(N.Error,`Invoke client method threw error: ${rf(i)}`)});break;case Se.StreamItem:case Se.Completion:{const i=this._callbacks[r.invocationId];if(i){r.type===Se.Completion&&delete this._callbacks[r.invocationId];try{i(r)}catch(o){this._logger.log(N.Error,`Stream callback threw error: ${rf(o)}`)}}break}case Se.Ping:break;case Se.Close:{this._logger.log(N.Information,"Close message received from server.");const i=r.error?new Error("Server returned an error on close: "+r.error):void 0;r.allowReconnect===!0?this.connection.stop(i):this._stopPromise=this._stopInternal(i);break}case Se.Ack:this._messageBuffer&&this._messageBuffer._ack(r);break;case Se.Sequence:this._messageBuffer&&this._messageBuffer._resetSequence(r);break;default:this._logger.log(N.Warning,`Invalid message type: ${r.type}.`);break}}this._resetTimeoutPeriod()}_processHandshakeResponse(e){let n,r;try{[r,n]=this._handshakeProtocol.parseHandshakeResponse(e)}catch(i){const o="Error parsing handshake response: "+i;this._logger.log(N.Error,o);const s=new Error(o);throw this._handshakeRejecter(s),s}if(n.error){const i="Server returned handshake error: "+n.error;this._logger.log(N.Error,i);const o=new Error(i);throw this._handshakeRejecter(o),o}else this._logger.log(N.Debug,"Server handshake complete.");return this._handshakeResolver(),r}_resetKeepAliveInterval(){this.connection.features.inherentKeepAlive||(this._nextKeepAlive=new Date().getTime()+this.keepAliveIntervalInMilliseconds,this._cleanupPingTimer())}_resetTimeoutPeriod(){if(!this.connection.features||!this.connection.features.inherentKeepAlive){this._timeoutHandle=setTimeout(()=>this.serverTimeout(),this.serverTimeoutInMilliseconds);let e=this._nextKeepAlive-new Date().getTime();if(e<0){this._connectionState===Ge.Connected&&this._trySendPingMessage();return}this._pingServerHandle===void 0&&(e<0&&(e=0),this._pingServerHandle=setTimeout(async()=>{this._connectionState===Ge.Connected&&await this._trySendPingMessage()},e))}}serverTimeout(){this.connection.stop(new Error("Server timeout elapsed without receiving a message from the server."))}async _invokeClientMethod(e){const n=e.target.toLowerCase(),r=this._methods[n];if(!r){this._logger.log(N.Warning,`No client method with the name '${n}' found.`),e.invocationId&&(this._logger.log(N.Warning,`No result given for '${n}' method and invocation ID '${e.invocationId}'.`),await this._sendWithProtocol(this._createCompletionMessage(e.invocationId,"Client didn't provide a result.",null)));return}const i=r.slice(),o=!!e.invocationId;let s,a,c;for(const u of i)try{const l=s;s=await u.apply(this,e.arguments),o&&s&&l&&(this._logger.log(N.Error,`Multiple results provided for '${n}'. Sending error to server.`),c=this._createCompletionMessage(e.invocationId,"Client provided multiple results.",null)),a=void 0}catch(l){a=l,this._logger.log(N.Error,`A callback for the method '${n}' threw error '${l}'.`)}c?await this._sendWithProtocol(c):o?(a?c=this._createCompletionMessage(e.invocationId,`${a}`,null):s!==void 0?c=this._createCompletionMessage(e.invocationId,null,s):(this._logger.log(N.Warning,`No result given for '${n}' method and invocation ID '${e.invocationId}'.`),c=this._createCompletionMessage(e.invocationId,"Client didn't provide a result.",null)),await this._sendWithProtocol(c)):s&&this._logger.log(N.Error,`Result given for '${n}' method but server is not expecting a result.`)}_connectionClosed(e){this._logger.log(N.Debug,`HubConnection.connectionClosed(${e}) called while in state ${this._connectionState}.`),this._stopDuringStartError=this._stopDuringStartError||e||new Pn("The underlying connection was closed before the hub handshake could complete."),this._handshakeResolver&&this._handshakeResolver(),this._cancelCallbacksWithError(e||new Error("Invocation canceled due to the underlying connection being closed.")),this._cleanupTimeout(),this._cleanupPingTimer(),this._connectionState===Ge.Disconnecting?this._completeClose(e):this._connectionState===Ge.Connected&&this._reconnectPolicy?this._reconnect(e):this._connectionState===Ge.Connected&&this._completeClose(e)}_completeClose(e){if(this._connectionStarted){this._connectionState=Ge.Disconnected,this._connectionStarted=!1,this._messageBuffer&&(this._messageBuffer._dispose(e??new Error("Connection closed.")),this._messageBuffer=void 0),rt.isBrowser&&window.document.removeEventListener("freeze",this._freezeEventListener);try{this._closedCallbacks.forEach(n=>n.apply(this,[e]))}catch(n){this._logger.log(N.Error,`An onclose callback called with error '${e}' threw error '${n}'.`)}}}async _reconnect(e){const n=Date.now();let r=0,i=e!==void 0?e:new Error("Attempting to reconnect due to a unknown error."),o=this._getNextRetryDelay(r,0,i);if(o===null){this._logger.log(N.Debug,"Connection not reconnecting because the IRetryPolicy returned null on the first reconnect attempt."),this._completeClose(e);return}if(this._connectionState=Ge.Reconnecting,e?this._logger.log(N.Information,`Connection reconnecting because of error '${e}'.`):this._logger.log(N.Information,"Connection reconnecting."),this._reconnectingCallbacks.length!==0){try{this._reconnectingCallbacks.forEach(s=>s.apply(this,[e]))}catch(s){this._logger.log(N.Error,`An onreconnecting callback called with error '${e}' threw error '${s}'.`)}if(this._connectionState!==Ge.Reconnecting){this._logger.log(N.Debug,"Connection left the reconnecting state in onreconnecting callback. Done reconnecting.");return}}for(;o!==null;){if(this._logger.log(N.Information,`Reconnect attempt number ${r+1} will start in ${o} ms.`),await new Promise(s=>{this._reconnectDelayHandle=setTimeout(s,o)}),this._reconnectDelayHandle=void 0,this._connectionState!==Ge.Reconnecting){this._logger.log(N.Debug,"Connection left the reconnecting state during reconnect delay. Done reconnecting.");return}try{if(await this._startInternal(),this._connectionState=Ge.Connected,this._logger.log(N.Information,"HubConnection reconnected successfully."),this._reconnectedCallbacks.length!==0)try{this._reconnectedCallbacks.forEach(s=>s.apply(this,[this.connection.connectionId]))}catch(s){this._logger.log(N.Error,`An onreconnected callback called with connectionId '${this.connection.connectionId}; threw error '${s}'.`)}return}catch(s){if(this._logger.log(N.Information,`Reconnect attempt failed because of error '${s}'.`),this._connectionState!==Ge.Reconnecting){this._logger.log(N.Debug,`Connection moved to the '${this._connectionState}' from the reconnecting state during reconnect attempt. Done reconnecting.`),this._connectionState===Ge.Disconnecting&&this._completeClose();return}r++,i=s instanceof Error?s:new Error(s.toString()),o=this._getNextRetryDelay(r,Date.now()-n,i)}}this._logger.log(N.Information,`Reconnect retries have been exhausted after ${Date.now()-n} ms and ${r} failed attempts. Connection disconnecting.`),this._completeClose()}_getNextRetryDelay(e,n,r){try{return this._reconnectPolicy.nextRetryDelayInMilliseconds({elapsedMilliseconds:n,previousRetryCount:e,retryReason:r})}catch(i){return this._logger.log(N.Error,`IRetryPolicy.nextRetryDelayInMilliseconds(${e}, ${n}) threw error '${i}'.`),null}}_cancelCallbacksWithError(e){const n=this._callbacks;this._callbacks={},Object.keys(n).forEach(r=>{const i=n[r];try{i(null,e)}catch(o){this._logger.log(N.Error,`Stream 'error' callback called with '${e}' threw error: ${rf(o)}`)}})}_cleanupPingTimer(){this._pingServerHandle&&(clearTimeout(this._pingServerHandle),this._pingServerHandle=void 0)}_cleanupTimeout(){this._timeoutHandle&&clearTimeout(this._timeoutHandle)}_createInvocation(e,n,r,i){if(r)return i.length!==0?{target:e,arguments:n,streamIds:i,type:Se.Invocation}:{target:e,arguments:n,type:Se.Invocation};{const o=this._invocationId;return this._invocationId++,i.length!==0?{target:e,arguments:n,invocationId:o.toString(),streamIds:i,type:Se.Invocation}:{target:e,arguments:n,invocationId:o.toString(),type:Se.Invocation}}}_launchStreams(e,n){if(e.length!==0){n||(n=Promise.resolve());for(const r in e)e[r].subscribe({complete:()=>{n=n.then(()=>this._sendWithProtocol(this._createCompletionMessage(r)))},error:i=>{let o;i instanceof Error?o=i.message:i&&i.toString?o=i.toString():o="Unknown error",n=n.then(()=>this._sendWithProtocol(this._createCompletionMessage(r,o)))},next:i=>{n=n.then(()=>this._sendWithProtocol(this._createStreamItemMessage(r,i)))}})}}_replaceStreamingParams(e){const n=[],r=[];for(let i=0;i<e.length;i++){const o=e[i];if(this._isObservable(o)){const s=this._invocationId;this._invocationId++,n[s]=o,r.push(s.toString()),e.splice(i,1)}}return[n,r]}_isObservable(e){return e&&e.subscribe&&typeof e.subscribe=="function"}_createStreamInvocation(e,n,r){const i=this._invocationId;return this._invocationId++,r.length!==0?{target:e,arguments:n,invocationId:i.toString(),streamIds:r,type:Se.StreamInvocation}:{target:e,arguments:n,invocationId:i.toString(),type:Se.StreamInvocation}}_createCancelInvocation(e){return{invocationId:e,type:Se.CancelInvocation}}_createStreamItemMessage(e,n){return{invocationId:e,item:n,type:Se.StreamItem}}_createCompletionMessage(e,n,r){return n?{error:n,invocationId:e,type:Se.Completion}:{invocationId:e,result:r,type:Se.Completion}}_createCloseMessage(){return{type:Se.Close}}async _trySendPingMessage(){try{await this._sendMessage(this._cachedPingMessage)}catch{this._cleanupPingTimer()}}}const w0=[0,2e3,1e4,3e4,null];class pg{constructor(e){this._retryDelays=e!==void 0?[...e,null]:w0}nextRetryDelayInMilliseconds(e){return this._retryDelays[e.previousRetryCount]}}class Zi{}Zi.Authorization="Authorization";Zi.Cookie="Cookie";class S0 extends Al{constructor(e,n){super(),this._innerClient=e,this._accessTokenFactory=n}async send(e){let n=!0;this._accessTokenFactory&&(!this._accessToken||e.url&&e.url.indexOf("/negotiate?")>0)&&(n=!1,this._accessToken=await this._accessTokenFactory()),this._setAuthorizationHeader(e);const r=await this._innerClient.send(e);return n&&r.statusCode===401&&this._accessTokenFactory?(this._accessToken=await this._accessTokenFactory(),this._setAuthorizationHeader(e),await this._innerClient.send(e)):r}_setAuthorizationHeader(e){e.headers||(e.headers={}),this._accessToken?e.headers[Zi.Authorization]=`Bearer ${this._accessToken}`:this._accessTokenFactory&&e.headers[Zi.Authorization]&&delete e.headers[Zi.Authorization]}getCookieString(e){return this._innerClient.getCookieString(e)}}var lt;(function(t){t[t.None=0]="None",t[t.WebSockets=1]="WebSockets",t[t.ServerSentEvents=2]="ServerSentEvents",t[t.LongPolling=4]="LongPolling"})(lt||(lt={}));var Rt;(function(t){t[t.Text=1]="Text",t[t.Binary=2]="Binary"})(Rt||(Rt={}));let I0=class{constructor(){this._isAborted=!1,this.onabort=null}abort(){this._isAborted||(this._isAborted=!0,this.onabort&&this.onabort())}get signal(){return this}get aborted(){return this._isAborted}};class gg{get pollAborted(){return this._pollAbort.aborted}constructor(e,n,r){this._httpClient=e,this._logger=n,this._pollAbort=new I0,this._options=r,this._running=!1,this.onreceive=null,this.onclose=null}async connect(e,n){if(ht.isRequired(e,"url"),ht.isRequired(n,"transferFormat"),ht.isIn(n,Rt,"transferFormat"),this._url=e,this._logger.log(N.Trace,"(LongPolling transport) Connecting."),n===Rt.Binary&&typeof XMLHttpRequest<"u"&&typeof new XMLHttpRequest().responseType!="string")throw new Error("Binary protocols over XmlHttpRequest not implementing advanced features are not supported.");const[r,i]=Ms(),o={[r]:i,...this._options.headers},s={abortSignal:this._pollAbort.signal,headers:o,timeout:1e5,withCredentials:this._options.withCredentials};n===Rt.Binary&&(s.responseType="arraybuffer");const a=`${e}&_=${Date.now()}`;this._logger.log(N.Trace,`(LongPolling transport) polling: ${a}.`);const c=await this._httpClient.get(a,s);c.statusCode!==200?(this._logger.log(N.Error,`(LongPolling transport) Unexpected response code: ${c.statusCode}.`),this._closeError=new Qi(c.statusText||"",c.statusCode),this._running=!1):this._running=!0,this._receiving=this._poll(this._url,s)}async _poll(e,n){try{for(;this._running;)try{const r=`${e}&_=${Date.now()}`;this._logger.log(N.Trace,`(LongPolling transport) polling: ${r}.`);const i=await this._httpClient.get(r,n);i.statusCode===204?(this._logger.log(N.Information,"(LongPolling transport) Poll terminated by server."),this._running=!1):i.statusCode!==200?(this._logger.log(N.Error,`(LongPolling transport) Unexpected response code: ${i.statusCode}.`),this._closeError=new Qi(i.statusText||"",i.statusCode),this._running=!1):i.content?(this._logger.log(N.Trace,`(LongPolling transport) data received. ${qa(i.content,this._options.logMessageContent)}.`),this.onreceive&&this.onreceive(i.content)):this._logger.log(N.Trace,"(LongPolling transport) Poll timed out, reissuing.")}catch(r){this._running?r instanceof cp?this._logger.log(N.Trace,"(LongPolling transport) Poll timed out, reissuing."):(this._closeError=r,this._running=!1):this._logger.log(N.Trace,`(LongPolling transport) Poll errored after shutdown: ${r.message}`)}}finally{this._logger.log(N.Trace,"(LongPolling transport) Polling complete."),this.pollAborted||this._raiseOnClose()}}async send(e){return this._running?km(this._logger,"LongPolling",this._httpClient,this._url,e,this._options):Promise.reject(new Error("Cannot send until the transport is connected"))}async stop(){this._logger.log(N.Trace,"(LongPolling transport) Stopping polling."),this._running=!1,this._pollAbort.abort();try{await this._receiving,this._logger.log(N.Trace,`(LongPolling transport) sending DELETE request to ${this._url}.`);const e={},[n,r]=Ms();e[n]=r;const i={headers:{...e,...this._options.headers},timeout:this._options.timeout,withCredentials:this._options.withCredentials};let o;try{await this._httpClient.delete(this._url,i)}catch(s){o=s}o?o instanceof Qi&&(o.statusCode===404?this._logger.log(N.Trace,"(LongPolling transport) A 404 response was returned from sending a DELETE request."):this._logger.log(N.Trace,`(LongPolling transport) Error sending a DELETE request: ${o}`)):this._logger.log(N.Trace,"(LongPolling transport) DELETE request accepted.")}finally{this._logger.log(N.Trace,"(LongPolling transport) Stop finished."),this._raiseOnClose()}}_raiseOnClose(){if(this.onclose){let e="(LongPolling transport) Firing onclose event.";this._closeError&&(e+=" Error: "+this._closeError),this._logger.log(N.Trace,e),this.onclose(this._closeError)}}}class k0{constructor(e,n,r,i){this._httpClient=e,this._accessToken=n,this._logger=r,this._options=i,this.onreceive=null,this.onclose=null}async connect(e,n){return ht.isRequired(e,"url"),ht.isRequired(n,"transferFormat"),ht.isIn(n,Rt,"transferFormat"),this._logger.log(N.Trace,"(SSE transport) Connecting."),this._url=e,this._accessToken&&(e+=(e.indexOf("?")<0?"?":"&")+`access_token=${encodeURIComponent(this._accessToken)}`),new Promise((r,i)=>{let o=!1;if(n!==Rt.Text){i(new Error("The Server-Sent Events transport only supports the 'Text' transfer format"));return}let s;if(rt.isBrowser||rt.isWebWorker)s=new this._options.EventSource(e,{withCredentials:this._options.withCredentials});else{const a=this._httpClient.getCookieString(e),c={};c.Cookie=a;const[u,l]=Ms();c[u]=l,s=new this._options.EventSource(e,{withCredentials:this._options.withCredentials,headers:{...c,...this._options.headers}})}try{s.onmessage=a=>{if(this.onreceive)try{this._logger.log(N.Trace,`(SSE transport) data received. ${qa(a.data,this._options.logMessageContent)}.`),this.onreceive(a.data)}catch(c){this._close(c);return}},s.onerror=a=>{o?this._close():i(new Error("EventSource failed to connect. The connection could not be found on the server, either the connection ID is not present on the server, or a proxy is refusing/buffering the connection. If you have multiple servers check that sticky sessions are enabled."))},s.onopen=()=>{this._logger.log(N.Information,`SSE connected to ${this._url}`),this._eventSource=s,o=!0,r()}}catch(a){i(a);return}})}async send(e){return this._eventSource?km(this._logger,"SSE",this._httpClient,this._url,e,this._options):Promise.reject(new Error("Cannot send until the transport is connected"))}stop(){return this._close(),Promise.resolve()}_close(e){this._eventSource&&(this._eventSource.close(),this._eventSource=void 0,this.onclose&&this.onclose(e))}}class T0{constructor(e,n,r,i,o,s){this._logger=r,this._accessTokenFactory=n,this._logMessageContent=i,this._webSocketConstructor=o,this._httpClient=e,this.onreceive=null,this.onclose=null,this._headers=s}async connect(e,n){ht.isRequired(e,"url"),ht.isRequired(n,"transferFormat"),ht.isIn(n,Rt,"transferFormat"),this._logger.log(N.Trace,"(WebSockets transport) Connecting.");let r;return this._accessTokenFactory&&(r=await this._accessTokenFactory()),new Promise((i,o)=>{e=e.replace(/^http/,"ws");let s;const a=this._httpClient.getCookieString(e);let c=!1;if(rt.isNode||rt.isReactNative){const u={},[l,f]=Ms();u[l]=f,r&&(u[Zi.Authorization]=`Bearer ${r}`),a&&(u[Zi.Cookie]=a),s=new this._webSocketConstructor(e,void 0,{headers:{...u,...this._headers}})}else r&&(e+=(e.indexOf("?")<0?"?":"&")+`access_token=${encodeURIComponent(r)}`);s||(s=new this._webSocketConstructor(e)),n===Rt.Binary&&(s.binaryType="arraybuffer"),s.onopen=u=>{this._logger.log(N.Information,`WebSocket connected to ${e}.`),this._webSocket=s,c=!0,i()},s.onerror=u=>{let l=null;typeof ErrorEvent<"u"&&u instanceof ErrorEvent?l=u.error:l="There was an error with the transport",this._logger.log(N.Information,`(WebSockets transport) ${l}.`)},s.onmessage=u=>{if(this._logger.log(N.Trace,`(WebSockets transport) data received. ${qa(u.data,this._logMessageContent)}.`),this.onreceive)try{this.onreceive(u.data)}catch(l){this._close(l);return}},s.onclose=u=>{if(c)this._close(u);else{let l=null;typeof ErrorEvent<"u"&&u instanceof ErrorEvent?l=u.error:l="WebSocket failed to connect. The connection could not be found on the server, either the endpoint may not be a SignalR endpoint, the connection ID is not present on the server, or there is a proxy blocking WebSockets. If you have multiple servers check that sticky sessions are enabled.",o(new Error(l))}}})}send(e){return this._webSocket&&this._webSocket.readyState===this._webSocketConstructor.OPEN?(this._logger.log(N.Trace,`(WebSockets transport) sending data. ${qa(e,this._logMessageContent)}.`),this._webSocket.send(e),Promise.resolve()):Promise.reject("WebSocket is not in the OPEN state")}stop(){return this._webSocket&&this._close(void 0),Promise.resolve()}_close(e){this._webSocket&&(this._webSocket.onclose=()=>{},this._webSocket.onmessage=()=>{},this._webSocket.onerror=()=>{},this._webSocket.close(),this._webSocket=void 0),this._logger.log(N.Trace,"(WebSockets transport) socket closed."),this.onclose&&(this._isCloseEvent(e)&&(e.wasClean===!1||e.code!==1e3)?this.onclose(new Error(`WebSocket closed with status code: ${e.code} (${e.reason||"no reason given"}).`)):e instanceof Error?this.onclose(e):this.onclose())}_isCloseEvent(e){return e&&typeof e.wasClean=="boolean"&&typeof e.code=="number"}}const vg=100;class E0{constructor(e,n={}){if(this._stopPromiseResolver=()=>{},this.features={},this._negotiateVersion=1,ht.isRequired(e,"url"),this._logger=o0(n.logger),this.baseUrl=this._resolveUrl(e),n=n||{},n.logMessageContent=n.logMessageContent===void 0?!1:n.logMessageContent,typeof n.withCredentials=="boolean"||n.withCredentials===void 0)n.withCredentials=n.withCredentials===void 0?!0:n.withCredentials;else throw new Error("withCredentials option was not a 'boolean' or 'undefined' value");n.timeout=n.timeout===void 0?100*1e3:n.timeout;let r=null,i=null;if(rt.isNode&&typeof require<"u"){const o=typeof __webpack_require__=="function"?__non_webpack_require__:require;r=o("ws"),i=o("eventsource")}!rt.isNode&&typeof WebSocket<"u"&&!n.WebSocket?n.WebSocket=WebSocket:rt.isNode&&!n.WebSocket&&r&&(n.WebSocket=r),!rt.isNode&&typeof EventSource<"u"&&!n.EventSource?n.EventSource=EventSource:rt.isNode&&!n.EventSource&&typeof i<"u"&&(n.EventSource=i),this._httpClient=new S0(n.httpClient||new p0(this._logger),n.accessTokenFactory),this._connectionState="Disconnected",this._connectionStarted=!1,this._options=n,this.onreceive=null,this.onclose=null}async start(e){if(e=e||Rt.Binary,ht.isIn(e,Rt,"transferFormat"),this._logger.log(N.Debug,`Starting connection with transfer format '${Rt[e]}'.`),this._connectionState!=="Disconnected")return Promise.reject(new Error("Cannot start an HttpConnection that is not in the 'Disconnected' state."));if(this._connectionState="Connecting",this._startInternalPromise=this._startInternal(e),await this._startInternalPromise,this._connectionState==="Disconnecting"){const n="Failed to start the HttpConnection before stop() was called.";return this._logger.log(N.Error,n),await this._stopPromise,Promise.reject(new Pn(n))}else if(this._connectionState!=="Connected"){const n="HttpConnection.startInternal completed gracefully but didn't enter the connection into the connected state!";return this._logger.log(N.Error,n),Promise.reject(new Pn(n))}this._connectionStarted=!0}send(e){return this._connectionState!=="Connected"?Promise.reject(new Error("Cannot send data if the connection is not in the 'Connected' State.")):(this._sendQueue||(this._sendQueue=new lp(this.transport)),this._sendQueue.send(e))}async stop(e){if(this._connectionState==="Disconnected")return this._logger.log(N.Debug,`Call to HttpConnection.stop(${e}) ignored because the connection is already in the disconnected state.`),Promise.resolve();if(this._connectionState==="Disconnecting")return this._logger.log(N.Debug,`Call to HttpConnection.stop(${e}) ignored because the connection is already in the disconnecting state.`),this._stopPromise;this._connectionState="Disconnecting",this._stopPromise=new Promise(n=>{this._stopPromiseResolver=n}),await this._stopInternal(e),await this._stopPromise}async _stopInternal(e){this._stopError=e;try{await this._startInternalPromise}catch{}if(this.transport){try{await this.transport.stop()}catch(n){this._logger.log(N.Error,`HttpConnection.transport.stop() threw error '${n}'.`),this._stopConnection()}this.transport=void 0}else this._logger.log(N.Debug,"HttpConnection.transport is undefined in HttpConnection.stop() because start() failed.")}async _startInternal(e){let n=this.baseUrl;this._accessTokenFactory=this._options.accessTokenFactory,this._httpClient._accessTokenFactory=this._accessTokenFactory;try{if(this._options.skipNegotiation)if(this._options.transport===lt.WebSockets)this.transport=this._constructTransport(lt.WebSockets),await this._startTransport(n,e);else throw new Error("Negotiation can only be skipped when using the WebSocket transport directly.");else{let r=null,i=0;do{if(r=await this._getNegotiationResponse(n),this._connectionState==="Disconnecting"||this._connectionState==="Disconnected")throw new Pn("The connection was stopped during negotiation.");if(r.error)throw new Error(r.error);if(r.ProtocolVersion)throw new Error("Detected a connection attempt to an ASP.NET SignalR Server. This client only supports connecting to an ASP.NET Core SignalR Server. See https://aka.ms/signalr-core-differences for details.");if(r.url&&(n=r.url),r.accessToken){const o=r.accessToken;this._accessTokenFactory=()=>o,this._httpClient._accessToken=o,this._httpClient._accessTokenFactory=void 0}i++}while(r.url&&i<vg);if(i===vg&&r.url)throw new Error("Negotiate redirection limit exceeded.");await this._createTransport(n,this._options.transport,r,e)}this.transport instanceof gg&&(this.features.inherentKeepAlive=!0),this._connectionState==="Connecting"&&(this._logger.log(N.Debug,"The HttpConnection connected successfully."),this._connectionState="Connected")}catch(r){return this._logger.log(N.Error,"Failed to start the connection: "+r),this._connectionState="Disconnected",this.transport=void 0,this._stopPromiseResolver(),Promise.reject(r)}}async _getNegotiationResponse(e){const n={},[r,i]=Ms();n[r]=i;const o=this._resolveNegotiateUrl(e);this._logger.log(N.Debug,`Sending negotiation request: ${o}.`);try{const s=await this._httpClient.post(o,{content:"",headers:{...n,...this._options.headers},timeout:this._options.timeout,withCredentials:this._options.withCredentials});if(s.statusCode!==200)return Promise.reject(new Error(`Unexpected status code returned from negotiate '${s.statusCode}'`));const a=JSON.parse(s.content);return(!a.negotiateVersion||a.negotiateVersion<1)&&(a.connectionToken=a.connectionId),a.useStatefulReconnect&&this._options._useStatefulReconnect!==!0?Promise.reject(new dg("Client didn't negotiate Stateful Reconnect but the server did.")):a}catch(s){let a="Failed to complete negotiation with the server: "+s;return s instanceof Qi&&s.statusCode===404&&(a=a+" Either this is not a SignalR endpoint or there is a proxy blocking the connection."),this._logger.log(N.Error,a),Promise.reject(new dg(a))}}_createConnectUrl(e,n){return n?e+(e.indexOf("?")===-1?"?":"&")+`id=${n}`:e}async _createTransport(e,n,r,i){let o=this._createConnectUrl(e,r.connectionToken);if(this._isITransport(n)){this._logger.log(N.Debug,"Connection was provided an instance of ITransport, using that directly."),this.transport=n,await this._startTransport(o,i),this.connectionId=r.connectionId;return}const s=[],a=r.availableTransports||[];let c=r;for(const u of a){const l=this._resolveTransportOrError(u,n,i,(c==null?void 0:c.useStatefulReconnect)===!0);if(l instanceof Error)s.push(`${u.transport} failed:`),s.push(l);else if(this._isITransport(l)){if(this.transport=l,!c){try{c=await this._getNegotiationResponse(e)}catch(f){return Promise.reject(f)}o=this._createConnectUrl(e,c.connectionToken)}try{await this._startTransport(o,i),this.connectionId=c.connectionId;return}catch(f){if(this._logger.log(N.Error,`Failed to start the transport '${u.transport}': ${f}`),c=void 0,s.push(new t0(`${u.transport} failed: ${f}`,lt[u.transport])),this._connectionState!=="Connecting"){const m="Failed to select transport before stop() was called.";return this._logger.log(N.Debug,m),Promise.reject(new Pn(m))}}}}return s.length>0?Promise.reject(new n0(`Unable to connect to the server with any of the available transports. ${s.join(" ")}`,s)):Promise.reject(new Error("None of the transports supported by the client are supported by the server."))}_constructTransport(e){switch(e){case lt.WebSockets:if(!this._options.WebSocket)throw new Error("'WebSocket' is not supported in your environment.");return new T0(this._httpClient,this._accessTokenFactory,this._logger,this._options.logMessageContent,this._options.WebSocket,this._options.headers||{});case lt.ServerSentEvents:if(!this._options.EventSource)throw new Error("'EventSource' is not supported in your environment.");return new k0(this._httpClient,this._httpClient._accessToken,this._logger,this._options);case lt.LongPolling:return new gg(this._httpClient,this._logger,this._options);default:throw new Error(`Unknown transport: ${e}.`)}}_startTransport(e,n){return this.transport.onreceive=this.onreceive,this.features.reconnect?this.transport.onclose=async r=>{let i=!1;if(this.features.reconnect)try{this.features.disconnected(),await this.transport.connect(e,n),await this.features.resend()}catch{i=!0}else{this._stopConnection(r);return}i&&this._stopConnection(r)}:this.transport.onclose=r=>this._stopConnection(r),this.transport.connect(e,n)}_resolveTransportOrError(e,n,r,i){const o=lt[e.transport];if(o==null)return this._logger.log(N.Debug,`Skipping transport '${e.transport}' because it is not supported by this client.`),new Error(`Skipping transport '${e.transport}' because it is not supported by this client.`);if(x0(n,o))if(e.transferFormats.map(a=>Rt[a]).indexOf(r)>=0){if(o===lt.WebSockets&&!this._options.WebSocket||o===lt.ServerSentEvents&&!this._options.EventSource)return this._logger.log(N.Debug,`Skipping transport '${lt[o]}' because it is not supported in your environment.'`),new Y_(`'${lt[o]}' is not supported in your environment.`,o);this._logger.log(N.Debug,`Selecting transport '${lt[o]}'.`);try{return this.features.reconnect=o===lt.WebSockets?i:void 0,this._constructTransport(o)}catch(a){return a}}else return this._logger.log(N.Debug,`Skipping transport '${lt[o]}' because it does not support the requested transfer format '${Rt[r]}'.`),new Error(`'${lt[o]}' does not support ${Rt[r]}.`);else return this._logger.log(N.Debug,`Skipping transport '${lt[o]}' because it was disabled by the client.`),new e0(`'${lt[o]}' is disabled by the client.`,o)}_isITransport(e){return e&&typeof e=="object"&&"connect"in e}_stopConnection(e){if(this._logger.log(N.Debug,`HttpConnection.stopConnection(${e}) called while in state ${this._connectionState}.`),this.transport=void 0,e=this._stopError||e,this._stopError=void 0,this._connectionState==="Disconnected"){this._logger.log(N.Debug,`Call to HttpConnection.stopConnection(${e}) was ignored because the connection is already in the disconnected state.`);return}if(this._connectionState==="Connecting")throw this._logger.log(N.Warning,`Call to HttpConnection.stopConnection(${e}) was ignored because the connection is still in the connecting state.`),new Error(`HttpConnection.stopConnection(${e}) was called while the connection is still in the connecting state.`);if(this._connectionState==="Disconnecting"&&this._stopPromiseResolver(),e?this._logger.log(N.Error,`Connection disconnected with error '${e}'.`):this._logger.log(N.Information,"Connection disconnected."),this._sendQueue&&(this._sendQueue.stop().catch(n=>{this._logger.log(N.Error,`TransportSendQueue.stop() threw error '${n}'.`)}),this._sendQueue=void 0),this.connectionId=void 0,this._connectionState="Disconnected",this._connectionStarted){this._connectionStarted=!1;try{this.onclose&&this.onclose(e)}catch(n){this._logger.log(N.Error,`HttpConnection.onclose(${e}) threw error '${n}'.`)}}}_resolveUrl(e){if(e.lastIndexOf("https://",0)===0||e.lastIndexOf("http://",0)===0)return e;if(!rt.isBrowser)throw new Error(`Cannot resolve '${e}'.`);const n=window.document.createElement("a");return n.href=e,this._logger.log(N.Information,`Normalizing '${e}' to '${n.href}'.`),n.href}_resolveNegotiateUrl(e){const n=new URL(e);n.pathname.endsWith("/")?n.pathname+="negotiate":n.pathname+="/negotiate";const r=new URLSearchParams(n.searchParams);return r.has("negotiateVersion")||r.append("negotiateVersion",this._negotiateVersion.toString()),r.has("useStatefulReconnect")?r.get("useStatefulReconnect")==="true"&&(this._options._useStatefulReconnect=!0):this._options._useStatefulReconnect===!0&&r.append("useStatefulReconnect","true"),n.search=r.toString(),n.toString()}}function x0(t,e){return!t||(e&t)!==0}class lp{constructor(e){this._transport=e,this._buffer=[],this._executing=!0,this._sendBufferedData=new kc,this._transportResult=new kc,this._sendLoopPromise=this._sendLoop()}send(e){return this._bufferData(e),this._transportResult||(this._transportResult=new kc),this._transportResult.promise}stop(){return this._executing=!1,this._sendBufferedData.resolve(),this._sendLoopPromise}_bufferData(e){if(this._buffer.length&&typeof this._buffer[0]!=typeof e)throw new Error(`Expected data to be of type ${typeof this._buffer} but was of type ${typeof e}`);this._buffer.push(e),this._sendBufferedData.resolve()}async _sendLoop(){for(;;){if(await this._sendBufferedData.promise,!this._executing){this._transportResult&&this._transportResult.reject("Connection stopped.");break}this._sendBufferedData=new kc;const e=this._transportResult;this._transportResult=void 0;const n=typeof this._buffer[0]=="string"?this._buffer.join(""):lp._concatBuffers(this._buffer);this._buffer.length=0;try{await this._transport.send(n),e.resolve()}catch(r){e.reject(r)}}}static _concatBuffers(e){const n=e.map(o=>o.byteLength).reduce((o,s)=>o+s),r=new Uint8Array(n);let i=0;for(const o of e)r.set(new Uint8Array(o),i),i+=o.byteLength;return r.buffer}}class kc{constructor(){this.promise=new Promise((e,n)=>[this._resolver,this._rejecter]=[e,n])}resolve(){this._resolver()}reject(e){this._rejecter(e)}}const P0="json";class D0{constructor(){this.name=P0,this.version=2,this.transferFormat=Rt.Text}parseMessages(e,n){if(typeof e!="string")throw new Error("Invalid input for JSON hub protocol. Expected a string.");if(!e)return[];n===null&&(n=Va.instance);const r=rn.parse(e),i=[];for(const o of r){const s=JSON.parse(o);if(typeof s.type!="number")throw new Error("Invalid payload.");switch(s.type){case Se.Invocation:this._isInvocationMessage(s);break;case Se.StreamItem:this._isStreamItemMessage(s);break;case Se.Completion:this._isCompletionMessage(s);break;case Se.Ping:break;case Se.Close:break;case Se.Ack:this._isAckMessage(s);break;case Se.Sequence:this._isSequenceMessage(s);break;default:n.log(N.Information,"Unknown message type '"+s.type+"' ignored.");continue}i.push(s)}return i}writeMessage(e){return rn.write(JSON.stringify(e))}_isInvocationMessage(e){this._assertNotEmptyString(e.target,"Invalid payload for Invocation message."),e.invocationId!==void 0&&this._assertNotEmptyString(e.invocationId,"Invalid payload for Invocation message.")}_isStreamItemMessage(e){if(this._assertNotEmptyString(e.invocationId,"Invalid payload for StreamItem message."),e.item===void 0)throw new Error("Invalid payload for StreamItem message.")}_isCompletionMessage(e){if(e.result&&e.error)throw new Error("Invalid payload for Completion message.");!e.result&&e.error&&this._assertNotEmptyString(e.error,"Invalid payload for Completion message."),this._assertNotEmptyString(e.invocationId,"Invalid payload for Completion message.")}_isAckMessage(e){if(typeof e.sequenceId!="number")throw new Error("Invalid SequenceId for Ack message.")}_isSequenceMessage(e){if(typeof e.sequenceId!="number")throw new Error("Invalid SequenceId for Sequence message.")}_assertNotEmptyString(e,n){if(typeof e!="string"||e==="")throw new Error(n)}}const R0={trace:N.Trace,debug:N.Debug,info:N.Information,information:N.Information,warn:N.Warning,warning:N.Warning,error:N.Error,critical:N.Critical,none:N.None};function A0(t){const e=R0[t.toLowerCase()];if(typeof e<"u")return e;throw new Error(`Unknown log level: ${t}`)}class M0{configureLogging(e){if(ht.isRequired(e,"logging"),z0(e))this.logger=e;else if(typeof e=="string"){const n=A0(e);this.logger=new Eu(n)}else this.logger=new Eu(e);return this}withUrl(e,n){return ht.isRequired(e,"url"),ht.isNotEmpty(e,"url"),this.url=e,typeof n=="object"?this.httpConnectionOptions={...this.httpConnectionOptions,...n}:this.httpConnectionOptions={...this.httpConnectionOptions,transport:n},this}withHubProtocol(e){return ht.isRequired(e,"protocol"),this.protocol=e,this}withAutomaticReconnect(e){if(this.reconnectPolicy)throw new Error("A reconnectPolicy has already been set.");return e?Array.isArray(e)?this.reconnectPolicy=new pg(e):this.reconnectPolicy=e:this.reconnectPolicy=new pg,this}withServerTimeout(e){return ht.isRequired(e,"milliseconds"),this._serverTimeoutInMilliseconds=e,this}withKeepAliveInterval(e){return ht.isRequired(e,"milliseconds"),this._keepAliveIntervalInMilliseconds=e,this}withStatefulReconnect(e){return this.httpConnectionOptions===void 0&&(this.httpConnectionOptions={}),this.httpConnectionOptions._useStatefulReconnect=!0,this._statefulReconnectBufferSize=e==null?void 0:e.bufferSize,this}build(){const e=this.httpConnectionOptions||{};if(e.logger===void 0&&(e.logger=this.logger),!this.url)throw new Error("The 'HubConnectionBuilder.withUrl' method must be called before building the connection.");const n=new E0(this.url,e);return up.create(n,this.logger||Va.instance,this.protocol||new D0,this.reconnectPolicy,this._serverTimeoutInMilliseconds,this._keepAliveIntervalInMilliseconds,this._statefulReconnectBufferSize)}}function z0(t){return t.log!==void 0}const mg=t=>{if(typeof t=="object"&&t!==null){if(typeof Object.getPrototypeOf=="function"){const e=Object.getPrototypeOf(t);return e===Object.prototype||e===null}return Object.prototype.toString.call(t)==="[object Object]"}return!1},Vn=(...t)=>t.reduce((e,n)=>{if(Array.isArray(n))throw new TypeError("Arguments provided to ts-deepmerge must be objects, not arrays.");return Object.keys(n).forEach(r=>{["__proto__","constructor","prototype"].includes(r)||(Array.isArray(e[r])&&Array.isArray(n[r])?e[r]=Vn.options.mergeArrays?Vn.options.uniqueArrayItems?Array.from(new Set(e[r].concat(n[r]))):[...e[r],...n[r]]:n[r]:mg(e[r])&&mg(n[r])?e[r]=Vn(e[r],n[r]):e[r]=n[r]===void 0?Vn.options.allowUndefinedOverrides?n[r]:e[r]:n[r])}),e},{}),Ad={allowUndefinedOverrides:!0,mergeArrays:!0,uniqueArrayItems:!0};Vn.options=Ad;Vn.withOptions=(t,...e)=>{Vn.options=Object.assign(Object.assign({},Ad),t);const n=Vn(...e);return Vn.options=Ad,n};var U0=Object.defineProperty,Tm=t=>{throw TypeError(t)},N0=(t,e,n)=>e in t?U0(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,lo=(t,e,n)=>N0(t,typeof e!="symbol"?e+"":e,n),fp=(t,e,n)=>e.has(t)||Tm("Cannot "+n),w=(t,e,n)=>(fp(t,e,"read from private field"),n?n.call(t):e.get(t)),le=(t,e,n)=>e.has(t)?Tm("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),Me=(t,e,n,r)=>(fp(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),on=(t,e,n)=>(fp(t,e,"access private method"),n),$0=(t,e,n,r)=>({set _(i){Me(t,e,i,n)},get _(){return w(t,e,r)}});const O0="0.0.2-alpha6",vs={Text:"Text",Number:"Number",Logic:"Logic"},sn={ValueComponent:"ValueComponent",TableComponent:"TableComponent",RecordComponent:"RecordComponent",ResourceComponent:"ResourceComponent",GraphicComponent:"GraphicComponent",CheckoutComponent:"CheckoutComponent"},F0=t=>Object.values(sn).includes(t),j0=[sn.GraphicComponent,sn.CheckoutComponent,sn.ResourceComponent,sn.RecordComponent],gn={ValueEditor:"ValueEditor",TableEditor:"TableEditor",Fiber:"Fiber",FiberEditor:"FiberEditor",CfgrField:"CfgrField"},L0=k.z.enum([gn.ValueEditor,gn.TableEditor,gn.Fiber,gn.FiberEditor,gn.CfgrField]),Tc={Fiber:"fiber",CfgrField:"cfgrField"},ur={CtrlFibers:"CtrlFibers"};function eu(t){try{return[null,t()]}catch(e){if(e instanceof Error)return[e,null];throw e}}async function ms(t){try{return[null,await t]}catch(e){if(e instanceof Error)return[e,null];throw e}}function Ml(t){return eu(()=>JSON.parse(t))}const Mr=t=>typeof t=="string",W0=t=>t===void 0||t==null||t===""||It(t)&&t.length===0,It=t=>Array.isArray(t),_r=t=>Object.prototype.toString.call(t)==="[object Object]",Md=async t=>new Promise(e=>setTimeout(e,t)),Em=k.z.string(),V0=k.z.enum([vs.Text,vs.Number,vs.Logic]),q0=t=>V0.safeParse(t).success,xm=k.z.string(),H0=t=>xm.safeParse(t).success,B0=k.z.custom(t=>Mr(t)&&t.toLowerCase()===t),Ls=t=>(t==null?void 0:t.toLowerCase())??"",Pm=k.z.string(),K0=k.z.custom(t=>Mr(t)?new RegExp(`^${sn.ValueComponent}<.*>$`).test(t):!1),X0=k.z.custom(t=>Mr(t)?new RegExp(`^${sn.RecordComponent}<.*>$`).test(t):!1),G0=k.z.custom(t=>Mr(t)?new RegExp(`^${sn.ResourceComponent}<.*>$`).test(t):!1),J0=k.z.custom(t=>Mr(t)?new RegExp(`^${sn.TableComponent}<.*>$`).test(t):!1),Dm=k.z.union([K0,J0,X0,G0,k.z.literal(sn.GraphicComponent),k.z.literal(sn.CheckoutComponent)]),yg=k.z.union([k.z.string(),k.z.number(),k.z.boolean()]),Rm=k.z.union([yg,k.z.array(yg),k.z.object({}),k.z.unknown()]),dp=k.z.object({$typ:k.z.literal("Error"),Id:k.z.string(),Message:k.z.string(),route:k.z.unknown().optional()}),bg=t=>dp.safeParse(t).success,Am=dp.or(Rm),zd=new Map;function Q0(t){const e=Ls(t.name);zd.has(e)||zd.set(e,t)}function Mm(t){const e=Ls(t);return zd.get(e)}class hp{constructor(e,n){lo(this,"name"),lo(this,"zodType"),this.name=e,this.zodType=n,Q0(this)}async getValue(){return await lg().getCmpValue(this.name)}async setInput(e){const n=Ls(this.name);await Yc().setCmpInput(n,e,this.zodType)}onValueChanged(e,n=!1,r){lg().onCmpValueChanged(this.name,e,r,n)}}const Z0=k.z.number().transform(t=>t*1e3).pipe(k.z.coerce.date());function zm(t){return t._def.typeName===k.z.ZodFirstPartyTypeKind.ZodArray}function Um(t){return t._def.typeName===k.z.ZodFirstPartyTypeKind.ZodObject}function Y0(t){const[,e]=Ml(t.description??"{}");return e?e.elementity:!1}const Nm={green:"#36D792",yellow:"#D19A66",red:"red"};function $m(t,e){return t&&e?`[${t}.${e}]`:t?`[${t}]`:e?`[${e}]`:""}function Je(t,e,n="",r,i="green"){const o=$m(t,e),s=Nm[i]??"inherit";console.log(`%c${o}%c ${n}`,`color: ${s}`,"color: inherit",r)}function et(t,e,n="",r,i="green"){const o=$m(t,e),s=Nm[i]??"inherit";console.error(`%c${o}%c ${n}`,`color: ${s}`,"color: inherit",r)}const eC=t=>_r(t)&&Object.values(t).every(e=>_r(e)&&"$key"in e&&"$idx"in e&&"definition"in e),Om=[{open:"List<",openReplace:"[",closeReplace:"]"},{open:"Table<",openReplace:"[",closeReplace:"]"},{open:`${sn.ValueComponent}<`,openReplace:`"${sn.ValueComponent}<`,closeReplace:'>"',preventInnerParsing:!0,allowInnerParsingOnRootLevel:!0},{open:"RecordComponent<",openReplace:'"RecordComponent<',closeReplace:'>"',preventInnerParsing:!0,allowInnerParsingOnRootLevel:!0},{open:"TableComponent<",openReplace:'"TableComponent<',closeReplace:'>"',preventInnerParsing:!0,allowInnerParsingOnRootLevel:!0},{open:"ResourceComponent<",openReplace:'"ResourceComponent<',closeReplace:'>"',preventInnerParsing:!0},{open:"ComposedVisual<",openReplace:'"ComposedVisual<',closeReplace:'>"',preventInnerParsing:!0},{open:"DynamicVisual<",openReplace:'"DynamicVisual<',closeReplace:'>"',preventInnerParsing:!0},{open:"Map<",openReplace:'"Map<',closeReplace:'>"',preventInnerParsing:!0},{open:"DataSource<",openReplace:'"DataSource<',closeReplace:'>"',preventInnerParsing:!0},{open:"Resource<",openReplace:"{",closeReplace:"}"},{open:"Record<{",openReplace:"{",closeReplace:""}];function tC(t){let e=1;for(let n=0;n<t.length;n++)if(t[n]==="<"?e++:t[n]===">"&&e--,e===0)return n;return-1}function Fm(t){const e=[",","}",">"],n=/=|,|<|{|}|]/,r="!!TYPEPLACEHOLDER!!";if(t.indexOf("=")===-1)return'"'+t+'"';let i="",o=!1,s=0,a=t||"";for(;a.length>0;){const c=Om.find(u=>a.indexOf(u.open)===0);if(e.includes(a[0]))i+=a[0],a=a.slice(1);else if(c){a=a.slice(c.open.length);const u=tC(a),l=c.preventInnerParsing?a.substring(0,u):Fm(a.substring(0,u)),f=c.openReplace+l+c.closeReplace;i=i.length>0?i.replace(r,f):f,a=a.slice(u+1),o=!1}else if(o){const u=a.search(n);u>0?(i=i.replace(r,'"'+a.substring(0,u)+'"')+a[u],a=a.slice(u+1)):(et("HiveUtils","_parseHiveTypeToJsonStr","Fallback: Full remaining string appended. Possible parsing issue!",{errorName:"Hive type to JSON - parsing issue",jsonObj:{typeDefinition:t}}),i+=a,a=""),o=!1}else{const u=a.indexOf("="),l=a.substring(0,u).trim();i+=`"${l}":{ "$key": "${l}", "$idx": ${s}, "definition": ${r} }`,s++,a=a.slice(u+1),o=!0}}return i}function Ud(t,e,n,r=n){if(!_r(t)&&!It(t))return t;const i=zm(e);if(It(t)&&i)return[Ud(t[0],e.element,n,r)];if(It(t)||i)return et("HiveUtils","_recursiveHiveSchemaMapping","Type mismatch because either the schema or the type expects an array!",{cmpName:n,propertyPath:r,hive:t,zod:JSON.stringify(e)}),t;if(!Um(e))return et("HiveUtils","_recursiveHiveSchemaMapping","Generated schema doesn't match the retrieved component type!",{cmpName:n,propertyPath:r,hive:t,zod:JSON.stringify(e)}),t;const o=Object.keys(e.shape).reduce((a,c)=>(a[c.toLowerCase()]=c,a),{}),s={};return Object.values(t).forEach(function(a){const c=a.$key.toLowerCase(),u=o[c];if(u){const l=e.shape[u];s[u]=a,s[u].$key=u,delete o[c];const f=r+"."+u,m=Ud(a.definition,l,u,f);s[u].definition=m}else s[a.$key]=a}),s}function _g(t){const e=t.match(/^(\w+)<.+>/),n=e&&2>=e.length?e[1]:t;if(!F0(n))throw et("HiveUtils","getBaseHiveType","Unknown base type found!",{type:t,baseType:n}),new Error(`Unknown base component type found: ${JSON.stringify({type:t,baseType:n})}`);return n}function jm(t,e){const n=(t||"").match(new RegExp("<(.+)>"));return n&&2>=n.length?n[1]:""}function nC(t){const e=t.indexOf("=")>-1,n=e&&Om.find(i=>t.indexOf(i.open)===0),r=n&&n.preventInnerParsing&&!n.allowInnerParsingOnRootLevel;return e&&!r}function rC(t,e,n){const r=jm(t)||t;let i=Lm(r);if(t.startsWith("TableComponent<")&&(i=[i]),!i){et("HiveUtils","parseAndMapSchema","Schema parsing not successful",{jsonObj:{type:r,fullType:t}});return}return i=Ud(i,e,n),i}function tu(t,e,n){const r=It(e),i=r&&It(t)&&(_r(e[0])||It(e[0]));if(W0(t)||r&&!i)return t;if(i)return t.map(s=>tu(s,e[0]));const o={};return Object.values(e.$key!==void 0?e.definition:e).forEach(function(s){const a=s.definition,c=t&&t[s.$idx];let u;It(a)&&_r(a[0])?(u=c==null?void 0:c.map(l=>tu(l,a[0])),JSON.stringify(a)):!It(a)&&_r(a)?(u=tu(c,a),JSON.stringify(a)):u=c,o[s.$key]=u}),o}function Lm(t){const e=t.replace(/Resource<\w+>/g,"Text"),n=Fm(e),[r,i]=Ml(n);return r&&et("HiveUtils","parseHiveTypeToSchema","Schema parsing resulted in an invalid JSON",{jsonObj:{typeDefinition:t,parsed:n},exc:r}),r?void 0:i}const iC={[vs.Text]:k.z.string(),[vs.Number]:k.z.number(),[vs.Logic]:k.z.boolean()};function oC(t){const e=Lm(t),n=r=>{const i=It(r),o=i?r[0]:r,s=eC(o)?k.z.object(Object.values(o).reduce((a,c)=>(a[c.$key]=n(c.definition),a),{})):iC[o];return s?i?k.z.array(s):s:(et("HiveUtils","parseHiveTypeToZodSchema","Unknown simple Hive type",{typeDefinition:t,schema:JSON.stringify(r)}),k.z.unknown())};return e?n(e):(et("HiveUtils","parseHiveTypeToZodSchema","Schema is undefined",{typeDefinition:t}),k.z.unknown())}class Nd extends Error{constructor(e){super(e),this.name="ConversionError"}}function sC(t,e,n){const r=n.safeParse(e);if(!r.success)throw new Nd(r.error.message);const i=function(o,s){if(Y0(o))return s;const a=Um(o),c=zm(o);if(a&&_r(s)){const u=o.shape;return Object.keys(u).reduce(function(l,f){const m=i(u[f],s[f]);return l.push(m),l},[])}else return c&&It(s)?s.map(function(u){return i(o.element,u)}):s};return i(n,e)}function Wm(t){return It(t)?Wm(t[0]):_r(t)}const Cg=Symbol("UnknownCmpType");function aC(t,e){if(t==null)return;const{success:n,error:r}=e.safeParse(t);if(!n)throw et("CmpUtils","_assertCmpValueValid","Parser error:",r),new Error("Value received for component doesn't match its zod schema")}function cC(t,e,n){return rC(t,e,n)}function uC(t,e,n,r){const i=nC(e),o=i?cC(e,n,r):void 0;return i&&o?tu(t,o):t}function lC(t,e,n){const r=Mm(t);if(!r)throw new Error("Component does not exist in the component definitions.");const i=r instanceof hp?uC(n,e,r.zodType,t):Cg;if(i===Cg)throw new Error("Component has unknown type.");return i&&aC(i,r.zodType),i}var Vr,Ko;class fC{constructor(){le(this,Vr,new Map),le(this,Ko,new Map)}updateCmp(e,n,r){const i=w(this,Vr).get(e)??{value:n,freshProperties:new Set};i.value=n,i.freshProperties.add("Value"),r&&w(this,Ko).set(e,{property:"Value",lazy:!1,isInitialSubscription:!0}),w(this,Vr).set(e,i)}markCmpPropertiesAsStale(e,n){const r=w(this,Vr).get(e);r&&n.forEach(i=>r.freshProperties.delete(i))}markAllCmpPropertiesAsStale(){for(const e of w(this,Vr).values())e.freshProperties.clear()}async subscribeToCmpUpdates(e,n,r=!1){Je("CmpsStore","subscribeToCmpUpdates","",{cmpName:e,property:n,lazy:r});const i=w(this,Ko).get(e);(!i||i.lazy===!0&&r===!1)&&(w(this,Ko).set(e,{property:n,lazy:r,isInitialSubscription:!1}),await Yc().subscribeToCmpUpdates(e,n,r))}async resubscribeToCmpUpdates(){const e=Yc(),n=Array.from(w(this,Ko)).filter(([,r])=>!r.isInitialSubscription).map(([r,{property:i,lazy:o}])=>e.subscribeToCmpUpdates(r,i,o));await Promise.all(n)}async getCmpValue(e){Je("CmpsStore","getCmpValue","",{name:e});const n=w(this,Vr).get(e);if(n!=null&&n.freshProperties.has("Value"))return n.value;const r=Ls(e);await Yc().fetchCmpPropertyValue([{name:r,property:"Value"}]);const i=w(this,Vr).get(e);return structuredClone(i==null?void 0:i.value)}}Vr=new WeakMap,Ko=new WeakMap;function wg(t){return t instanceof hp}function dC(t){const e=t.split("-");return{companyName:e[0],distributorName:e.length>1?e[1]:""}}function Vm(t){const{pathname:e}=new URL(t),n=new RegExp("^/(cfgr|preview|staging)/","i"),r=new RegExp("/$"),i=e.replace(n,"").replace(r,"").split("/");if(i.length<2)return;let o,s,a,c,u,l;const f=e.toLowerCase(),m=f.startsWith("/preview/"),d=f.startsWith("/staging/");m||d?(l=i[2],a=i[3],o=i[4]==="copy"?"copy":"edit",c=i[5],s=m?"preview":"staging",u=!1):f.startsWith("/cfgr/")&&(a=i[2]==="copy"?void 0:i[2],c=void 0,i[3]==="edit"?(o="edit",c=i[4]):o="copy",s="cfgr",u=i[i.length-1]!=="copy"||i[i.length-1]==="copy"&&a===void 0);const h=dC(i[0]);return{tenant:i[0],companyName:h.companyName,planName:i[1],planVersion:l||void 0,cfgnId:a||void 0,startAction:o,authToken:c||void 0,cfgrMode:s,isPresetCopy:u}}function Sg(t){const e=new RegExp("^/|/$","g"),n=new URL(t).pathname.replace(e,"").split("/"),r=["cfgr","preview","staging"];return n.length>=2&&r.includes(n[0].toLowerCase())}var qm=(t=>(t[t.NotActivated=0]="NotActivated",t[t.Activated=1]="Activated",t[t.Deactivated=2]="Deactivated",t[t.MarkedForDeletion=3]="MarkedForDeletion",t))(qm||{});const hC=k.z.object({mailNotifications:k.z.object({quoteAssignment:k.z.boolean(),insightsAssignment:k.z.boolean()})});k.z.object({id:k.z.string(),firstname:k.z.string(),lastname:k.z.string(),email:k.z.string(),isCbnAdmin:k.z.boolean().optional(),isSuperAdmin:k.z.boolean().optional(),state:k.z.nativeEnum(qm),avatarUrl:k.z.string().nullable().optional(),settings:hC});const Ig={local:void 0,session:void 0};function kg(t=!1){var e;(e=pC(t).storage)==null||e.clear()}function pC(t=!1){const e="CbnStorageTestKey",n="CbnStorageTestValue",r=t?"session":"local",i=Ig[r];if(i!==void 0)return i;const o={storage:t?window.sessionStorage:window.localStorage,writeable:!1,readable:!1};if(o.storage){try{o.storage.setItem(e,n),o.writeable=!0}catch{}try{const s=o.storage.getItem(e);o.readable=o.writeable?s===n:!0}catch{}o.writeable&&o.storage.removeItem(e)}return Ig[r]=o,o}const gC="/login",vC="redirectTo";function mC(t){kg(),kg(!0);const e=encodeURIComponent(window.location.pathname+window.location.search);window.location.href=`${gC}?${vC}=${e}`}var Hm="function",Bm="object",pp="undefined",Kn="prototype",gp=Object,yC=gp[Kn];/*! https://github.com/nevware21/ts-utils v0.12.6 */function Gt(t,e){return t||e}function ot(t,e){return t[e]}var Ut=void 0,mt=null,vp="",zl="function",dc="object",Cr="prototype",xu="__proto__",Fi="undefined",Pu="constructor",mp="Symbol",ys="length",Du="name",Tt="call",hc="toString",yp="getOwnPropertyDescriptor",jt=Gt(Object),bp=ot(jt,Cr),Km=Gt(String),bo=ot(Km,Cr),pc=Gt(Math),Xm=Gt(Array),Ul=ot(Xm,Cr),xr=ot(Ul,"slice"),Tg="_polyfill",Eg="__nw21$polytype__";function it(t,e){try{return{v:t.apply(this,e)}}catch(n){return{e:n}}}function bC(t,e,n){var r=it(t,n);return r.e?e:r.v}var of;function Nl(t){return function(e){return typeof e===t}}function Gm(t){var e="[object "+t+"]";return function(n){return!!(n&&_C(n)===e)}}function _C(t){return bp[hc].call(t)}function Ye(t){return typeof t===Fi||t===Fi}function CC(t){return t===Ut}function K(t){return t===mt||Ye(t)}function _p(t){return t===mt||t===Ut}function wC(t){return!!t||t!==Ut}function SC(t){return!of&&(of=["string","number","boolean",Fi,"symbol","bigint"]),t!==dc&&of.indexOf(t)!==-1}var de=Nl("string"),pe=Nl(zl);function Xt(t){return!t&&K(t)?!1:!!t&&typeof t===dc}var Ce=ot(Xm,"isArray"),IC=Gm("Date"),gc=Nl("number"),Jm=Nl("boolean"),Cp=Gm("Error");function fi(t){return!!(t&&t.then&&pe(t.then))}function Ru(t){return!(!t||bC(function(){return!(t&&0+t)},!t))}function wp(){}function kC(){return!1}var $t=Gt(Km),TC="[object Error]";function te(t,e){var n=vp,r=bp[hc][Tt](t);r===TC&&(t={stack:$t(t.stack),message:$t(t.message),name:$t(t.name)});try{n=JSON.stringify(t,mt,e?typeof e=="number"?e:4:Ut),n=(n?n.replace(/"(\w+)"\s*:\s{0,1}/g,"$1: "):mt)||$t(t)}catch(i){n=" - "+te(i,e)}return r+": "+n}function Yt(t){throw new Error(t)}function nr(t){throw new TypeError(t)}function $l(t){_p(t)&&nr("Cannot convert undefined or null to object")}function EC(t){de(t)||nr("'"+te(t)+"' is not a string")}function mn(t,e){return!!t&&bp.hasOwnProperty[Tt](t,e)}var xC=Gt(ot(jt,yp),wp),ii=Gt(ot(jt,"hasOwn"),PC);function PC(t,e){return $l(t),mn(t,e)||!!xC(t,e)}function De(t,e,n){if(t&&(Xt(t)||pe(t))){for(var r in t)if(ii(t,r)&&e[Tt](t,r,t[r])===-1)break}}function ee(t,e,n){if(t)for(var r=t[ys]>>>0,i=0;i<r&&!(i in t&&e[Tt](t,t[i],i,t)===-1);i++);}var _o=Ol;function Ol(t,e,n){var r=e?e[t]:mt;return function(i){var o=(i?i[t]:mt)||r;if(o||n){var s=arguments;return(o||n).apply(i,o?xr[Tt](s,1):s)}nr('"'+$t(t)+'" not defined for '+te(i))}}function DC(t){return function(e){return e[t]}}var RC=Gt(ot(jt,yp),wp),Ec={e:"enumerable",c:"configurable",v:"value",w:"writable",g:"get",s:"set"};function Qm(t){var e={};if(e[Ec.c]=!0,e[Ec.e]=!0,t.l){e.get=function(){return t.l.v};var n=RC(t.l,"v");n&&n.set&&(e.set=function(r){t.l.v=r})}return De(t,function(r,i){e[Ec[r]]=CC(i)?e[Ec[r]]:i}),e}var Qn=ot(jt,"defineProperty"),AC=ot(jt,"defineProperties");function MC(t,e,n,r,i,o){var s={e:o,c:i};return n&&(s.g=n),Qn(t,e,Qm(s))}function Ae(t,e,n){return Qn(t,e,Qm(n))}function Zm(t,e,n,r,i){var o={};return De(t,function(s,a){Au(o,s,e?a:s),Au(o,a,s)}),r?r(o):o}function Au(t,e,n,r){Qn(t,e,{value:n,enumerable:!0,writable:!1})}var zC=Gt(ot(jt,"isFrozen"),kC),Ym=ot(jt,"freeze");function UC(t){return t}function NC(t){return $l(t),t[xu]||mt}var $d=ot(jt,"assign"),wr=ot(jt,"keys");function ey(t,e){if((Ce(t)||Xt(t)||pe(t))&&!zC(t)){for(var n=0;n<e.length;n++)if(e[n]===t)return t;e.push(t),De(t,function(r,i){ey(i,e)}),Rn(t)}return t}function Ws(t){return Ym?ey(t,[]):t}var Rn=Gt(Ym,UC),Od=Gt(ot(jt,"getPrototypeOf"),NC);function $C(t){return Zm(t,1,0,Rn)}function OC(t){return Zm(t,0,0,Rn)}function FC(t){var e={};return De(t,function(n,r){Au(e,n,r[1]),Au(e,r[0],r[1])}),Rn(e)}function jC(t){return FC(t)}var ty=OC({asyncIterator:0,hasInstance:1,isConcatSpreadable:2,iterator:3,match:4,matchAll:5,replace:6,search:7,species:8,split:9,toPrimitive:10,toStringTag:11,unscopables:12}),xg="__tsUtils$gblCfg",sf;function ny(){var t;return typeof globalThis!==Fi&&(t=globalThis),!t&&typeof self!==Fi&&(t=self),!t&&typeof window!==Fi&&(t=window),!t&&typeof global!==Fi&&(t=global),t}function Fl(){if(!sf){var t=it(ny).v||{};sf=t[xg]=t[xg]||{}}return sf}var ry=ot(pc,"min"),za=ot(pc,"max"),Pg=_o("slice",bo),Bt=_o("substring",bo),Jr=Ol("substr",bo,LC);function LC(t,e,n){return $l(t),n<0?vp:(e=e||0,e<0&&(e=za(e+t[ys],0)),Ye(n)?Pg(t,e):Pg(t,e,e+n))}function Mu(t,e){return Bt(t,0,e)}function WC(t,e){return t&&(it(function(){t[Tg]=!0,t[Eg]=e}),it(Ae,[t,Tg,{v:!0,w:!1,e:!1}]),it(Ae,[t,Eg,{v:e,w:!1,e:!1}])),t}var Pr=Gt(ot(jt,"create"),VC);function VC(t,e){var n=null;function r(){}if(_p(t))n={};else{var i=typeof t;i!==dc&&i!==zl&&nr("Prototype must be an Object or function: "+te(t)),r[Cr]=t,it(function(){r[xu]=t}),n=new r}return e&&it(AC,[n,e]),n}function An(){return(Date.now||qC)()}function qC(){return new Date().getTime()}function ji(t,e,n){return t.apply(e,n)}var pt;function pi(){pt=Fl()}function iy(t,e){var n={};return!pt&&pi(),n.b=pt.lzy,Qn(n,"v",{configurable:!0,get:function(){var r=ji(t,null,e);return pt.lzy||Qn(n,"v",{value:r}),n.b=pt.lzy,r}}),n}var HC=ot(pc,"random"),BC=iy(function(){for(var t=An().toString(36).slice(2);t.length<16;)t+=HC().toString(36).slice(2);return t=t.substring(0,16),t}),Dg="_urid",KC="$nw21sym",af,XC=0;function GC(){if(!af){var t=Fl();af=t.gblSym=t.gblSym||{k:{},s:{}}}return af}var xc;function Sp(t){var e="_"+XC+++"_"+BC.v,n=mp+"("+t+")";function r(o,s){Ae(i,o,{v:s,e:!1,w:!1})}var i=Pr(null);return r("description",$t(t)),r(hc,function(){return n+KC+e}),r("valueOf",function(){return i}),r("v",n),r("_uid",e),WC(i,"symbol")}function JC(t){var e=GC();if(!ii(e.k,t)){var n=Sp(t),r=wr(e.s).length;n[Dg]=function(){return r+"_"+n[hc]()},e.k[t]=n,e.s[n[Dg]()]=$t(t)}return e.k[t]}function QC(t){!xc&&(xc={});var e,n=ty[t];return n&&(e=xc[n]=xc[n]||Sp(mp+"."+n)),e}function Cn(t){return Qn({toJSON:function(){return t}},"v",{value:t})}var oy="window",Ua;function Vs(t,e){var n;return function(){return!pt&&pi(),(!n||pt.lzy)&&(n=Cn(it(t,e).v)),n.v}}function vn(t){return!pt&&pi(),(!Ua||t===!1||pt.lzy)&&(Ua=Cn(it(ny).v||mt)),Ua.v}function nt(t,e){var n;if(!Ua||e===!1?n=vn(e):n=Ua.v,n&&n[t])return n[t];if(t===oy)try{return window}catch{}return mt}function sy(){return!!kt()}var kt=Vs(nt,["document"]);function jl(){return!!cn()}var cn=Vs(nt,[oy]);function ZC(){return!!rr()}var rr=Vs(nt,["navigator"]);function YC(){return!!ay()}var ay=Vs(nt,["history"]),ew=Vs(function(){return!!it(function(){return process&&(process.versions||{}).node}).v}),cy=Vs(function(){return!!it(function(){return self&&self instanceof WorkerGlobalScope}).v}),zs,cf;function Ll(){return zs=Cn(it(nt,[mp]).v),zs}function tw(t){var e=(pt.lzy?0:zs)||Ll();return e.v?e.v[t]:Ut}function nw(){return!!rw()}function rw(){return!pt&&pi(),((pt.lzy?0:zs)||Ll()).v}function Ip(t,e){var n=ty[t];!pt&&pi();var r=(pt.lzy?0:zs)||Ll();return r.v?r.v[n||t]:QC(t)}function Xs(t,e){!pt&&pi();var n=(pt.lzy?0:zs)||Ll();return n.v?n.v(t):Sp(t)}function kp(t){return!pt&&pi(),cf=(pt.lzy?0:cf)||Cn(it(tw,["for"]).v),(cf.v||JC)(t)}function Fd(t){return!!t&&pe(t.next)}function uy(t){return!_p(t)&&pe(t[Ip(3)])}var Pc;function Tp(t,e,n){if(t&&(Fd(t)||(!Pc&&(Pc=Cn(Ip(3))),t=t[Pc.v]?t[Pc.v]():mt),Fd(t))){var r=Ut,i=Ut;try{for(var o=0;!(i=t.next()).done&&e[Tt](n||t,i.value,o,t)!==-1;)o++}catch(s){r={e:s},t.throw&&(i=mt,t.throw(r))}finally{try{i&&!i.done&&t.return&&t.return(i)}finally{if(r)throw r.e}}}}function cs(t,e){return!Ye(e)&&t&&(Ce(e)?ji(t.push,t,e):Fd(e)||uy(e)?Tp(e,function(n){t.push(n)}):t.push(e)),t}var At=_o("indexOf",Ul),Ha=_o("map",Ul);function Wl(t,e,n){return((t?t.slice:mt)||xr).apply(t,xr[Tt](arguments,1))}var iw=_o("reduce",Ul),uf,ly=Gt(ot(jt,"setPrototypeOf"),ow);function ow(t,e){var n;return!uf&&(uf=Cn((n={},n[xu]=[],n instanceof Array))),uf.v?t[xu]=e:De(e,function(r,i){return t[r]=i}),t}function sw(t,e,n){it(Ae,[e,Du,{v:t,c:!0,e:!1}]),e=ly(e,n);function r(){this[Pu]=e,it(Ae,[this,Du,{v:t,c:!0,e:!1}])}return e[Cr]=n===mt?Pr(n):(r[Cr]=n[Cr],new r),e}function Rg(t,e){e&&(t[Du]=e)}function fy(t,e,n){var r=Error,i=r[Cr][Du],o=Error.captureStackTrace;return sw(t,function(){var s=this,a=arguments;try{it(Rg,[r,t]);var c=ji(r,s,xr[Tt](a))||s;if(c!==s){var u=Od(s);u!==Od(c)&&ly(c,u)}return o&&o(c,s[Pu]),e&&e(c,a),c}finally{it(Rg,[r,i])}},r)}var lf;function aw(t){throw lf||(lf=fy("UnsupportedError")),new lf(t)}function cw(t){return function(e){return $l(e),e&&e.replace&&(e=e.replace(t,vp)),e}}var uw=cw(/^\s+|(?=\s)\s+$/g),Ve=Ol("trim",bo,uw),an=ot(pc,"floor"),ff,df,hf;function Ot(t){if(!t||typeof t!==dc)return!1;hf||(hf=jl()?cn():!0);var e=!1;if(t!==hf){df||(ff=Function[Cr][hc],df=ff[Tt](jt));try{var n=Od(t);e=!n,e||(mn(n,Pu)&&(n=n[Pu]),e=!!(n&&typeof n===zl&&ff[Tt](n)===df))}catch{}}return e}function lw(t){return t.value&&hy(t),!0}var Ag=[pw,hy,vw,gw];function fw(t,e,n,r){var i;return ee(t,function(o){if(o.k===e)return i=o,-1}),i||(i={k:e,v:e},t.push(i),r(i)),i.v}function Ep(t,e,n,r){var i=n.handler,o=n.path?r?n.path.concat(r):n.path:[],s={handler:n.handler,src:n.src,path:o},a=typeof e,c=!1,u=e===mt;u||(e&&a===dc?c=Ot(e):u=SC(a));var l={type:a,isPrim:u,isPlain:c,value:e,result:e,path:o,origin:n.src,copy:function(f,m){return Ep(t,f,m?s:n,m)},copyTo:function(f,m){return dy(t,f,m,s)}};return l.isPrim?i&&i[Tt](n,l)?l.result:e:fw(t,e,o,function(f){Ae(l,"result",{g:function(){return f.v},s:function(h){f.v=h}});for(var m=0,d=i;!(d||(m<Ag.length?Ag[m++]:lw))[Tt](n,l);)d=mt})}function dy(t,e,n,r){if(!K(n))for(var i in n)e[i]=Ep(t,n[i],r,i);return e}function dw(t,e,n){var r={handler:n,src:e,path:[]};return dy([],t,e,r)}function hw(t,e){var n={handler:e,src:t};return Ep([],t,n)}function pw(t){var e=t.value;if(Ce(e)){var n=t.result=[];return n.length=e.length,t.copyTo(n,e),!0}return!1}function gw(t){var e=t.value;return IC(e)?(t.result=new Date(e.getTime()),!0):!1}function vw(t){return t.type===zl}function hy(t){var e=t.value;if(e&&t.isPlain){var n=t.result={};return t.copyTo(n,e),!0}return!1}function py(t,e){return ee(e,function(n){dw(t,n)}),t}function Mg(t,e,n,r,i,o,s){return py(hw(t)||{},xr[Tt](arguments))}function mw(t,e,n,r,i,o,s){return py(t||{},xr[Tt](arguments))}var gy=_o("split",bo);function vy(t,e,n){if(t&&e){var r=gy(e,"."),i=r.pop();ee(r,function(o){K(t[o])&&(t[o]={}),t=t[o]}),t[i]=n}}var yw=DC(ys),pf;function Dr(){return!pt&&pi(),(!pf||pt.lzy)&&(pf=Cn(it(nt,["performance"]).v)),pf.v}var my=ot(pc,"round"),bw=Gt(ot(jt,yp),wp),yy=Ol("endsWith",bo,_w);function _w(t,e,n){EC(t);var r=de(e)?e:$t(e),i=!Ye(n)&&n<t[ys]?n:t[ys];return Bt(t,i-r[ys],i)===r}var at=_o("indexOf",bo),gf="ref",vf="unref",mf="hasRef",Cw="enabled";function ww(t,e,n){var r=!0,i=t?e(mt):mt,o;function s(){return r=!1,i&&i[vf]&&i[vf](),o}function a(){i&&n(i),i=mt}function c(){return i=e(i),r||s(),o}function u(l){!l&&i&&a(),l&&!i&&c()}return o={cancel:a,refresh:c},o[mf]=function(){return i&&i[mf]?i[mf]():r},o[gf]=function(){return r=!0,i&&i[gf]&&i[gf](),o},o[vf]=s,o=Qn(o,Cw,{get:function(){return!!i},set:u}),{h:o,dn:function(){i=mt}}}var Sw,Iw;function kw(t){var e=pe(t)?t:Sw;if(!e){var n=Fl().tmOut||[];Ce(n)&&n.length>0&&pe(n[0])&&(e=n[0])}return e||setTimeout}function Tw(t){var e=pe(t)?t:Iw;if(!e){var n=Fl().tmOut||[];Ce(n)&&n.length>1&&pe(n[1])&&(e=n[1])}return e||clearTimeout}function by(t,e,n){var r=Ce(e),i=r?e.length:0,o=kw(i>0?e[0]:r?Ut:e),s=Tw(i>1?e[1]:Ut),a=n[0];n[0]=function(){c.dn(),ji(a,Ut,xr[Tt](arguments))};var c=ww(t,function(u){if(u){if(u.refresh)return u.refresh(),u;ji(s,Ut,[u])}return ji(o,Ut,n)},function(u){ji(s,Ut,[u])});return c.h}function yn(t,e){return by(!0,Ut,xr[Tt](arguments))}function Ew(t,e){return by(!1,Ut,xr[Tt](arguments))}(vn()||{}).Symbol;(vn()||{}).Reflect;var _y="hasOwnProperty",xw=function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)yC[_y].call(e,i)&&(t[i]=e[i])}return t},Ft=$d||xw,jd=function(t,e){return jd=gp.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)r[_y](i)&&(n[i]=r[i])},jd(t,e)};function ir(t,e){typeof e!==Hm&&e!==null&&nr("Class extends value "+String(e)+" is not a constructor or null"),jd(t,e);function n(){this.constructor=t}t[Kn]=e===null?Pr(e):(n[Kn]=e[Kn],new n)}function zg(t,e){for(var n=0,r=e.length,i=t.length;n<r;n++,i++)t[i]=e[n];return t}var Dc,zu="constructor",Rr="prototype",Uu="function",Nu="_dynInstFuncs",Ld="_isDynProxy",bs="_dynClass",Pw="_dynCls$",Wd="_dynInstChk",Ba=Wd,Cy="_dfOpts",Ug="_unknown_",xp="__proto__",Rc="_dyn"+xp,Ng="__dynProto$Gbl",yf="_dynInstProto",nu="useBaseInst",Vd="setInstFuncs",Pp=Object,Ka=Pp.getPrototypeOf,$g=Pp.getOwnPropertyNames,Og=vn(),qd=Og[Ng]||(Og[Ng]={o:(Dc={},Dc[Vd]=!0,Dc[nu]=!0,Dc),n:1e3});function ru(t){return t&&(t===Pp[Rr]||t===Array[Rr])}function Dp(t){return ru(t)||t===Function[Rr]}function fo(t){var e;if(t){if(Ka)return Ka(t);var n=t[xp]||t[Rr]||(t[zu]?t[zu][Rr]:null);e=t[Rc]||n,mn(t,Rc)||(delete t[yf],e=t[Rc]=t[yf]||t[Rc],t[yf]=n)}return e}function $u(t,e){var n=[];if($g)n=$g(t);else for(var r in t)typeof r=="string"&&mn(t,r)&&n.push(r);if(n&&n.length>0)for(var i=0;i<n.length;i++)e(n[i])}function Rp(t,e,n){return e!==zu&&typeof t[e]===Uu&&(n||mn(t,e))&&e!==xp&&e!==Rr}function Ou(t){nr("DynamicProto: "+t)}function Dw(t){var e=Pr(null);return $u(t,function(n){!e[n]&&Rp(t,n,!1)&&(e[n]=t[n])}),e}function Ap(t,e){for(var n=t.length-1;n>=0;n--)if(t[n]===e)return!0;return!1}function Rw(t,e,n,r){function i(c,u,l){var f=u[l];if(f[Ld]&&r){var m=c[Nu]||{};m[Ba]!==!1&&(f=(m[u[bs]]||{})[l]||f)}return function(){return f.apply(c,arguments)}}var o=Pr(null);$u(n,function(c){o[c]=i(e,n,c)});for(var s=fo(t),a=[];s&&!Dp(s)&&!Ap(a,s);)$u(s,function(c){!o[c]&&Rp(s,c,!Ka)&&(o[c]=i(e,s,c))}),a.push(s),s=fo(s);return o}function Aw(t,e,n,r){var i=null;if(t&&mn(n,bs)){var o=t[Nu]||Pr(null);if(i=(o[n[bs]]||Pr(null))[e],i||Ou("Missing ["+e+"] "+Uu),!i[Wd]&&o[Ba]!==!1){for(var s=!mn(t,e),a=fo(t),c=[];s&&a&&!Dp(a)&&!Ap(c,a);){var u=a[e];if(u){s=u===r;break}c.push(a),a=fo(a)}try{s&&(t[e]=i),i[Wd]=1}catch{o[Ba]=!1}}}return i}function Mw(t,e,n){var r=e[t];return r===n&&(r=fo(e)[t]),typeof r!==Uu&&Ou("["+t+"] is not a "+Uu),r}function zw(t,e,n,r,i){function o(c,u){var l=function(){var f=Aw(this,u,c,l)||Mw(u,c,l);return f.apply(this,arguments)};return l[Ld]=1,l}if(!ru(t)){var s=n[Nu]=n[Nu]||Pr(null);if(!ru(s)){var a=s[e]=s[e]||Pr(null);s[Ba]!==!1&&(s[Ba]=!!i),ru(a)||$u(n,function(c){Rp(n,c,!1)&&n[c]!==r[c]&&(a[c]=n[c],delete n[c],(!mn(t,c)||t[c]&&!t[c][Ld])&&(t[c]=o(t,c)))})}}}function Uw(t,e){if(Ka){for(var n=[],r=fo(e);r&&!Dp(r)&&!Ap(n,r);){if(r===t)return!0;n.push(r),r=fo(r)}return!1}return!0}function bf(t,e){return mn(t,Rr)?t.name||e||Ug:((t||{})[zu]||{}).name||e||Ug}function qe(t,e,n,r){mn(t,Rr)||Ou("theClass is an invalid class definition.");var i=t[Rr];Uw(i,e)||Ou("["+bf(t)+"] not in hierarchy of ["+bf(e)+"]");var o=null;mn(i,bs)?o=i[bs]:(o=Pw+bf(t,"_")+"$"+qd.n,qd.n++,i[bs]=o);var s=qe[Cy],a=!!s[nu];a&&r&&r[nu]!==void 0&&(a=!!r[nu]);var c=Dw(e),u=Rw(i,e,c,a);n(e,u);var l=!!Ka&&!!s[Vd];l&&r&&(l=!!r[Vd]),zw(i,o,e,c,l!==!1)}qe[Cy]=qd.o;var Mp=$C,Nw=jC,Kr=Mp({NONE:0,PENDING:3,INACTIVE:1,ACTIVE:2}),Us="toLowerCase",he="length",Fu="warnToConsole",vc="throwInternal",Yi="watch",ho="apply",Ee="push",Co="splice",ft="logger",Ui="cancel",mc="initialize",Qr="identifier",ju="removeNotificationListener",Lu="addNotificationListener",qn="isInitialized",Ac="getNotifyMgr",Xa="getPlugin",po="name",Nt="processNext",wy="getProcessTelContext",Li="value",us="enabled",Fg="stopPollingInternalLogs",go="unload",Mc="onComplete",Hd="version",Sy="loggingLevelConsole",vo="createNew",pr="teardown",Wu="messageId",eo="message",Sr="diagLog",Vu="_doTeardown",Ga="update",Xn="getNext",Ja="setNextPlugin",Bd="userAgent",mo="split",to="replace",Kd="substring",Iy="indexOf",oi="type",jg="evtName",dr="status",Lg="getAllResponseHeaders",Xd="isChildEvt",Sn="data",_s="getCtx",jn="setCtx",Wg="itemsReceived",zc="headers",Gs="urlString",zo="timeout",Gd="traceFlags",_f="getAttribute",Cf;function $w(t,e){Cf||(Cf=fy("AggregationError",function(r,i){i[he]>1&&(r.errors=i[1])}));var n=t;throw ee(e,function(r,i){n+=`
|
|
2
|
-
`.concat(i," > ").concat(te(r))}),new Cf(n,e||[])}/*!
|
|
3
|
-
* NevWare21 Solutions LLC - ts-async, 0.5.5
|
|
4
|
-
* https://github.com/nevware21/ts-async
|
|
5
|
-
* Copyright (c) NevWare21 Solutions LLC and contributors. All rights reserved.
|
|
6
|
-
* Licensed under the MIT license.
|
|
7
|
-
*/var qu="Promise",zp="rejected";function Kt(t,e){return Up(t,function(n){return e?e({status:"fulfilled",rejected:!1,value:n}):n},function(n){return e?e({status:zp,rejected:!0,reason:n}):n})}function Up(t,e,n,r){var i=t;try{if(fi(t))(e||n)&&(i=t.then(e,n));else try{e&&(i=e(t))}catch(o){if(n)i=n(o);else throw o}}finally{}return i}var ky=["pending","resolving","resolved",zp],Vg="dispatchEvent",Uc;function Ow(t){var e;return t&&t.createEvent&&(e=t.createEvent("Event")),!!e&&e.initEvent}function Fw(t,e,n,r){var i=kt();!Uc&&(Uc=Cn(!!it(Ow,[i]).v));var o=Uc.v?i.createEvent("Event"):r?new Event(e):{};if(n&&n(o),Uc.v&&o.initEvent(e,!1,!0),o&&t[Vg])t[Vg](o);else{var s=t["on"+e];if(s)s(o);else{var a=nt("console");a&&(a.error||a.log)(e,te(o))}}}var Ty="unhandledRejection",jw=Ty.toLowerCase(),qg=[],Lw=0,Ww=10,wf;function Hg(t){return pe(t)?t.toString():te(t)}function Ey(t,e,n){var r=Wl(arguments,3),i=0,o=!1,s,a=[],c=Lw++,u=!1,l=null,f;function m(x,R){try{qg.push(c),u=!0,l&&l.cancel(),l=null;var q=t(function(A,I){a.push(function(){try{var L=i===2?x:R,O=Ye(L)?s:pe(L)?L(s):L;fi(O)?O.then(A,I):L?A(O):i===3?I(O):A(O)}catch(H){I(H)}}),o&&p()},r);return q}finally{qg.pop()}}function d(x){return m(void 0,x)}function h(x){var R=x,q=x;return pe(x)&&(R=function(A){return x&&x(),A},q=function(A){throw x&&x(),A}),m(R,q)}function g(){return ky[i]}function p(){if(a.length>0){var x=a.slice();a=[],u=!0,l&&l.cancel(),l=null,e(x)}}function v(x,R){return function(q){if(i===R){if(x===2&&fi(q)){i=1,q.then(v(2,1),v(3,1));return}i=x,o=!0,s=q,p(),!u&&x===3&&!l&&(l=yn(_,Ww))}}}function _(){if(!u)if(u=!0,ew())process.emit(Ty,s,f);else{var x=cn()||vn();!wf&&(wf=Cn(it(nt,[qu+"RejectionEvent"]).v)),Fw(x,jw,function(R){return Ae(R,"promise",{g:function(){return f}}),R.reason=s,R},!!wf.v)}}f={then:m,catch:d,finally:h},Qn(f,"state",{get:g}),nw()&&(f[Ip(11)]="IPromise");function P(){return"IPromise "+g()+(o?" - "+Hg(s):"")}return f.toString=P,(function(){pe(n)||nr(qu+": executor is not a function - "+Hg(n));var x=v(3,0);try{n.call(f,v(2,0),x)}catch(R){x(R)}})(),f}function Vw(t){return function(e){var n=Wl(arguments,1);return t(function(r,i){try{var o=[],s=1;Tp(e,function(a,c){a&&(s++,Up(a,function(u){o[c]=u,--s===0&&r(o)},i))}),s--,s===0&&r(o)}catch(a){i(a)}},n)}}function qw(t){return Cn(function(e){var n=Wl(arguments,1);return t(function(r,i){var o=[],s=1;function a(c,u){s++,Kt(c,function(l){l.rejected?o[u]={status:zp,reason:l.reason}:o[u]={status:"fulfilled",value:l.value},--s===0&&r(o)})}try{Ce(e)?ee(e,a):uy(e)?Tp(e,a):nr("Input is not an iterable"),s--,s===0&&r(o)}catch(c){i(c)}},n)})}function xy(t){ee(t,function(e){try{e()}catch{}})}function Hw(t){var e=gc(t)?t:0;return function(n){yn(function(){xy(n)},e)}}function Py(t,e){return Ey(Py,Hw(e),t,e)}var Sf;function Bw(t,e){!Sf&&(Sf=Cn(it(nt,[qu]).v||null));var n=Sf.v;if(!n)return Py(t);pe(t)||nr(qu+": executor is not a function - "+te(t));var r=0;function i(){return ky[r]}var o=new n(function(s,a){function c(l){r=2,s(l)}function u(l){r=3,a(l)}t(c,u)});return Qn(o,"state",{get:i}),o}var If;function Qa(t){return Ey(Qa,xy,t)}function Kw(t,e){return!If&&(If=qw(Qa)),If.v(t,e)}var kf;function Zn(t,e){return!kf&&(kf=Cn(Bw)),kf.v.call(this,t,e)}var Xw=Vw(Zn),Wn=void 0,Re="",Xo="channels",yt="core",Jd="createPerfMgr",Qd="disabled",Cs="extensionConfig",Go="extensions",Yn="processTelemetry",Hu="priority",iu="eventsSent",Na="eventsDiscarded",ou="eventsSendRequest",Wi="perfEvent",Tf="offlineEventsStored",Ef="offlineBatchSent",xf="offlineBatchDrop",Bu="getPerfMgr",Zd="domain",Pf="path",Gw="Not dynamic - ",Jw="REDACTED",Bg=["sig","Signature","AWSAccessKeyId","X-Goog-Signature"],Qw="getPrototypeOf",Zw=/-([a-z])/g,Yw=/([^\w\d_$])/g,eS=/^(\d+[\w\d_$])/,tS=Object[Qw];function no(t){return!K(t)}function Ku(t){var e=t;return e&&de(e)&&(e=e[to](Zw,function(n,r){return r.toUpperCase()}),e=e[to](Yw,"_"),e=e[to](eS,function(n,r){return"_"+r})),e}function Dt(t,e){return t&&e?at(t,e)!==-1:!1}function Ns(t){return t&&t.toISOString()||""}function $e(t){return Cp(t)?t[po]:Re}function We(t,e,n,r,i){var o=n;return t&&(o=t[e],o!==n&&(!i||i(o))&&(!r||r(n))&&(o=n,t[e]=o)),o}function zt(t,e,n){var r;return t?(r=t[e],!r&&K(r)&&(r=Ye(n)?{}:n,t[e]=r)):r=Ye(n)?{}:n,r}function Dy(t,e){var n=null,r=null;return pe(t)?n=t:r=t,function(){var i=arguments;if(n&&(r=n()),r)return r[e][ho](r,i)}}function nS(t,e,n){if(t&&e&&Xt(t)&&Xt(e)){var r=function(o){if(de(o)){var s=e[o];pe(s)?(!n||n(o,!0,e,t))&&(t[o]=Dy(e,o)):(!n||n(o,!1,e,t))&&(ii(t,o)&&delete t[o],Ae(t,o,{g:function(){return e[o]},s:function(a){e[o]=a}}))}};for(var i in e)r(i)}return t}function Xu(t,e,n,r,i){t&&e&&n&&(t[e]=Dy(n,r))}function ls(t,e,n,r){return t&&e&&Xt(t)&&Ce(n)&&ee(n,function(i){de(i)&&Xu(t,i,e,i)}),t}function rS(t){return(function(){function e(){var n=this;t&&De(t,function(r,i){n[r]=i})}return e})()}function Ry(t){return t&&$d&&(t=gp($d({},t))),t}function Ay(t,e,n,r,i,o){var s=arguments,a=s[0]||{},c=s[he],u=!1,l=1;for(c>0&&Jm(a)&&(u=a,a=s[l]||{},l++),Xt(a)||(a={});l<c;l++){var f=s[l],m=Ce(f),d=Xt(f);for(var h in f){var g=m&&h in f||d&&ii(f,h);if(g){var p=f[h],v=void 0;if(u&&p&&((v=Ce(p))||Ot(p))){var _=a[h];v?Ce(_)||(_=[]):Ot(_)||(_={}),p=Ay(u,_,p)}p!==void 0&&(a[h]=p)}}}return a}function su(t,e,n){var r=e&&e.featureOptIn&&e.featureOptIn[t];if(t&&r){var i=r.mode;if(i===3)return!0;if(i===2)return!1}return n}function Gu(t){try{return t.responseText}catch{}return null}function My(t,e){return t?"XDomainRequest,Response:"+Gu(t)||"":e}function Ju(t,e){return t?"XMLHttpRequest,Status:"+t[dr]+",Response:"+Gu(t)||t.response||"":e}function Kg(t,e){return e&&(gc(e)?t=[e].concat(t):Ce(e)&&(t=e.concat(t))),t}var iS="Microsoft_ApplicationInsights_BypassAjaxInstrumentation",Xg="withCredentials",oS="timeout";function sS(t,e,n,r,i,o){i===void 0&&(i=!1);function s(c,u,l){try{c[u]=l}catch{}}var a=new XMLHttpRequest;return s(a,iS,r),n&&s(a,Xg,n),a.open(t,e,!i),n&&s(a,Xg,n),!i&&o&&s(a,oS,o),a}function aS(t){var e={};if(de(t)){var n=Ve(t)[mo](/[\r\n]+/);ee(n,function(r){if(r){var i=r[Iy](": ");if(i!==-1){var o=Ve(r.substring(0,i))[Us](),s=Ve(r[Kd](i+1));e[o]=s}else e[Ve(r)]=1}})}return e}function Df(t,e,n){if(!t[n]&&e&&e.getResponseHeader){var r=e.getResponseHeader(n);r&&(t[n]=Ve(r))}return t}var cS="kill-duration",uS="kill-duration-seconds",lS="time-delta-millis";function Rf(t,e){var n={};return t[Lg]?n=aS(t[Lg]()):e&&(n=Df(n,t,lS),n=Df(n,t,cS),n=Df(n,t,uS)),n}var fS="documentMode",dS="location",hS="console",zy="JSON",pS="crypto",gS="msCrypto",vS="ReactNative",Yd="msie",eh="trident/",Uy="XMLHttpRequest",Af=null,Mf=null,Uo=null,zf=null;function Ny(t,e){var n=!1;if(t){try{if(n=e in t,!n){var r=t[Kn];r&&(n=e in r)}}catch{}if(!n)try{var i=new t;n=!Ye(i[e])}catch{}}return n}function Hn(t){return typeof location===Bm&&location?location:nt(dS)}function mS(){return typeof console!==pp?console:nt(hS)}function yc(){return!!(typeof JSON===Bm&&JSON||nt(zy)!==null)}function Mn(){return yc()?JSON||nt(zy):null}function yS(){return nt(pS)}function bS(){return nt(gS)}function _S(){var t=rr();return t&&t.product?t.product===vS:!1}function th(){var t=rr();if(t&&(t[Bd]!==Mf||Af===null)){Mf=t[Bd];var e=(Mf||Re)[Us]();Af=Dt(e,Yd)||Dt(e,eh)}return Af}function $y(t){if(t===void 0&&(t=null),!t){var e=rr()||{};t=e?(e.userAgent||Re)[Us]():Re}var n=(t||Re)[Us]();if(Dt(n,Yd)){var r=kt()||{};return za(parseInt(n[mo](Yd)[1]),r[fS]||0)}else if(Dt(n,eh)){var i=parseInt(n[mo](eh)[1]);if(i)return i+4}return null}function ma(t){return(zf===null||t===!1)&&(zf=ZC()&&!!rr().sendBeacon),zf}function Np(t){var e=!1;try{e=!!nt("fetch");var n=nt("Request");e&&t&&n&&(e=Ny(n,"keepalive"))}catch{}return e}function CS(){return Uo===null&&(Uo=typeof XDomainRequest!==pp,Uo&&Vl()&&(Uo=Uo&&!Ny(nt(Uy),"withCredentials"))),Uo}function Vl(){var t=!1;try{var e=nt(Uy);t=!!e}catch{}return t}function wS(t,e){return t&&t.dispatchEvent&&e?(t.dispatchEvent(e),!0):!1}function SS(t,e){var n=null,r={detail:e||null};if(pe(CustomEvent))n=new CustomEvent(t,r);else{var i=kt();i&&i.createEvent&&(n=i.createEvent("CustomEvent"),n.initCustomEvent(t,!0,!0,r))}return n}function IS(t,e,n){var r=vn();if(r&&r.CustomEvent)try{var i={cfg:e||null,customDetails:n||null};return wS(r,SS(t,i))}catch{}return!1}function kS(t){return t.replace(/^([a-zA-Z][a-zA-Z0-9+.-]*:\/\/)([^:@]{1,200}):([^@]{1,200})@(.*)$/,"$1REDACTED:REDACTED@$4")}function TS(t,e){var n,r=at(t,"?");if(r===-1)return t;e&&e.redactQueryParams?n=Bg.concat(e.redactQueryParams):n=Bg;var i=Bt(t,0,r+1),o=Bt(t,r+1),s=Re,a=at(o,"#");a!==-1&&(s=Bt(o,a),o=Bt(o,0,a));for(var c=!1,u=0;u<n[he];u++){var l=n[u]+"=";if(at(o,l)!==-1){c=!0;break}}if(!c)return t;var f=[],m=!1;if(o&&o[he])for(var d=o[mo]("&"),u=0;u<d[he];u++){var h=d[u];if(h){var g=at(h,"=");if(g===-1)f[Ee](h);else{var p=h[Kd](0,g),v=h[Kd](g+1);if(v===Re)f[Ee](h);else{for(var _=!1,P=0;P<n[he];P++)if(p===n[P]){_=!0,m=!0;break}_?f[Ee](p+"="+Jw):f[Ee](h)}}}}return m?i+f.join("&")+s:t}function mr(t,e){if(!t||!de(t)||t[Iy](" ")!==-1)return t;var n=e&&e.redactUrls===!1;if(n)return t;var r=at(t,"@")!==-1,i=at(t,"?")!==-1;if(!r&&!i)return t;try{var o=t;return r&&(o=kS(t)),i&&(o=TS(o,e)),o}catch{return t}}var Oy=4294967296,si=4294967295,Fy=123456789,jy=987654321,Ly=!1,ya=Fy,ba=jy;function ES(t){t<0&&(t>>>=0),ya=Fy+t&si,ba=jy-t&si,Ly=!0}function xS(){try{var t=An()&2147483647;ES((Math.random()*Oy^t)+t)}catch{}}function PS(t){return an(Za()/si*(t+1))>>>0}function Za(t){var e=0,n=yS()||bS();return n&&n.getRandomValues&&(e=n.getRandomValues(new Uint32Array(1))[0]&si),e===0&&th()&&(Ly||xS(),e=DS()&si),e===0&&(e=an(Oy*Math.random()|0)),e>>>=0,e}function DS(t){ba=36969*(ba&65535)+(ba>>16)&si,ya=18e3*(ya&65535)+(ya>>16)&si;var e=(ba<<16)+(ya&65535)>>>0&si|0;return e>>>=0,e}function $p(t){t===void 0&&(t=22);for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n=Za()>>>0,r=0,i=Re;i[he]<t;)r++,i+=e.charAt(n&63),n>>>=6,r===5&&(n=(Za()<<2&4294967295|n&3)>>>0,r=0);return i}var Wy="3.3.11",RS="."+$p(6),AS=0;function Vy(t){return t.nodeType===1||t.nodeType===9||!+t.nodeType}function MS(t,e){var n=e[t.id];if(!n){n={};try{Vy(e)&&Ae(e,t.id,{e:!1,v:n})}catch{}}return n}function bn(t,e){return e===void 0&&(e=!1),Ku(t+AS+++(e?"."+Wy:Re)+RS)}function qy(t){var e={id:bn("_aiData-"+(t||Re)+"."+Wy),accept:function(n){return Vy(n)},get:function(n,r,i,o){var s=n[e.id];return s?s[Ku(r)]:(o&&(s=MS(e,n),s[Ku(r)]=i),i)},kill:function(n,r){if(n&&n[r])try{delete n[r]}catch{}}};return e}function au(t){return t&&Xt(t)&&!Ce(t)&&(t.isVal||t.fb||ii(t,"v")||ii(t,"mrg")||ii(t,"ref")||t.set)}function Hy(t,e,n){var r,i=n.dfVal||wC;if(e&&n.fb){var o=n.fb;Ce(o)||(o=[o]);for(var s=0;s<o[he];s++){var a=o[s],c=e[a];if(i(c)?r=c:t&&(c=t.cfg[a],i(c)&&(r=c),t.set(t.cfg,$t(a),c)),i(r))break}}return!i(r)&&i(n.v)&&(r=n.v),r}function nh(t,e,n){var r=n;if(n&&au(n)&&(r=Hy(t,e,n)),r){au(r)&&(r=nh(t,e,r));var i;Ce(r)?(i=[],i[he]=r[he]):Ot(r)&&(i={}),i&&(De(r,function(o,s){s&&au(s)&&(s=nh(t,e,s)),i[o]=s}),r=i)}return r}function Op(t,e,n,r){var i,o,s,a=r,c,u,l,f;au(a)?(i=a.isVal,o=a.set,l=a.rdOnly,f=a.blkVal,c=a.mrg,u=a.ref,!u&&Ye(u)&&(u=!!c),s=Hy(t,e,a)):s=r,f&&t.blkVal(e,n);var m,d=!0,h=e[n];(h||!K(h))&&(m=h,d=!1,i&&m!==s&&!i(m)&&(m=s,d=!0),o&&(m=o(m,s,e),d=m===s)),d?s?m=nh(t,e,s):m=s:(Ot(m)||Ce(s))&&c&&s&&(Ot(s)||Ce(s))&&De(s,function(g,p){Op(t,m,g,p)}),t.set(e,n,m),u&&t.ref(e,n),l&&t.rdOnly(e,n)}var di=kp("[[ai_dynCfg_1]]"),By=kp("[[ai_blkDynCfg_1]]"),zS=kp("[[ai_frcDynCfg_1]]");function Ky(t){if(t){var e;if(Ce(t)?(e=[],e[he]=t[he]):Ot(t)&&(e={}),e)return De(t,function(n,r){e[n]=Ky(r)}),e}return t}function US(t){if(t){var e=t[di]||t;if(e.cfg&&(e.cfg===t||e.cfg[di]===e))return e}return null}function NS(t){if(t&&(Ot(t)||Ce(t)))try{t[By]=!0}catch{}return t}function Uf(t,e,n){var r=!1;return n&&!t[e.blkVal]&&(r=n[zS],!r&&!n[By]&&(r=Ot(n)||Ce(n))),r}function Xy(t){nr("InvalidAccess:"+t)}var $S=["push","pop","shift","unshift","splice"],Ya=function(t,e,n,r){t&&t[vc](3,108,"".concat(n," [").concat(e,"] failed - ")+te(r))};function OS(t,e,n){Ce(e)&&ee($S,function(r){var i=e[r];e[r]=function(){for(var o=[],s=0;s<arguments.length;s++)o[s]=arguments[s];var a=i[ho](this,o);return Zu(t,e,n,"Patching"),a}})}function Qu(t,e){var n=bw(t,e);return n&&n.get}function FS(t,e,n,r){var i={n,h:[],trk:function(u){u&&u.fn&&(At(i.h,u)===-1&&i.h[Ee](u),t.trk(u,i))},clr:function(u){var l=At(i.h,u);l!==-1&&i.h[Co](l,1)}},o=!0,s=!1;function a(){o&&(s=s||Uf(a,t,r),r&&!r[di]&&s&&(r=Zu(t,r,n,"Converting")),o=!1);var u=t.act;return u&&i.trk(u),r}a[t.prop]={chng:function(){t.add(i)}};function c(u){if(r!==u){a[t.ro]&&!t.upd&&Xy("["+n+"] is read-only:"+te(e)),o&&(s=s||Uf(a,t,r),o=!1);var l=s&&a[t.rf];if(s)if(l){De(r,function(m){r[m]=u?u[m]:Wn});try{De(u,function(m,d){ql(t,r,m,d)}),u=r}catch(m){Ya((t.hdlr||{})[ft],n,"Assigning",m),s=!1}}else r&&r[di]&&De(r,function(m){var d=Qu(r,m);if(d){var h=d[t.prop];h&&h.chng()}});if(u!==r){var f=u&&Uf(a,t,u);!l&&f&&(u=Zu(t,u,n,"Converting")),r=u,s=f}t.add(i)}}Ae(e,i.n,{g:a,s:c})}function ql(t,e,n,r){if(e){var i=Qu(e,n),o=i&&!!i[t.prop];o?e[n]=r:FS(t,e,n,r)}return e}function Nf(t,e,n,r){if(e){var i=Qu(e,n),o=i&&!!i[t.prop],s=r&&r[0],a=r&&r[1],c=r&&r[2];if(!o){if(c)try{NS(e)}catch(u){Ya((t.hdlr||{})[ft],n,"Blocking",u)}try{ql(t,e,n,e[n]),i=Qu(e,n)}catch(u){Ya((t.hdlr||{})[ft],n,"State",u)}}s&&(i[t.rf]=s),a&&(i[t.ro]=a),c&&(i[t.blkVal]=!0)}return e}function Zu(t,e,n,r){try{De(e,function(i,o){ql(t,e,i,o)}),e[di]||(Qn(e,di,{get:function(){return t.hdlr}}),OS(t,e,n))}catch(i){Ya((t.hdlr||{})[ft],n,r,i)}return e}var Js="[[ai_",Qs="]]";function jS(t){var e=Xs(Js+"get"+t.uid+Qs),n=Xs(Js+"ro"+t.uid+Qs),r=Xs(Js+"rf"+t.uid+Qs),i=Xs(Js+"blkVal"+t.uid+Qs),o=Xs(Js+"dtl"+t.uid+Qs),s=null,a=null,c;function u(d,h){var g=c.act;try{c.act=d,d&&d[o]&&(ee(d[o],function(v){v.clr(d)}),d[o]=[]),h({cfg:t.cfg,set:t.set.bind(t),setDf:t.setDf.bind(t),ref:t.ref.bind(t),rdOnly:t.rdOnly.bind(t)})}catch(v){var p=t[ft];throw p&&p[vc](1,107,te(v)),v}finally{c.act=g||null}}function l(){if(s){var d=s;s=null,a&&a[Ui](),a=null;var h=[];if(ee(d,function(g){if(g&&(g[o]&&(ee(g[o],function(p){p.clr(g)}),g[o]=null),g.fn))try{u(g,g.fn)}catch(p){h[Ee](p)}}),s)try{l()}catch(g){h[Ee](g)}h[he]>0&&$w("Watcher error(s): ",h)}}function f(d){if(d&&d.h[he]>0){s||(s=[]),a||(a=yn(function(){a=null,l()},0));for(var h=0;h<d.h[he];h++){var g=d.h[h];g&&At(s,g)===-1&&s[Ee](g)}}}function m(d,h){if(d){var g=d[o]=d[o]||[];At(g,h)===-1&&g[Ee](h)}}return c={prop:e,ro:n,rf:r,blkVal:i,hdlr:t,add:f,notify:l,use:u,trk:m},c}function LS(t,e){var n={fn:e,rm:function(){n.fn=null,t=null,e=null}};return Ae(n,"toJSON",{v:function(){return"WatcherHandler"+(n.fn?"":"[X]")}}),t.use(n,e),n}function WS(t,e,n){var r=US(e);if(r)return r;var i=bn("dyncfg",!0),o=e&&n!==!1?e:Ky(e),s;function a(){s.notify()}function c(p,v,_){try{p=ql(s,p,v,_)}catch(P){Ya(t,v,"Setting value",P)}return p[v]}function u(p){return LS(s,p)}function l(p,v){s.use(null,function(_){var P=s.upd;try{Ye(v)||(s.upd=v),p(_)}finally{s.upd=P}})}function f(p,v){var _;return Nf(s,p,v,(_={},_[0]=!0,_))[v]}function m(p,v){var _;return Nf(s,p,v,(_={},_[1]=!0,_))[v]}function d(p,v){var _;return Nf(s,p,v,(_={},_[2]=!0,_))[v]}function h(p,v){return v&&De(v,function(_,P){Op(g,p,_,P)}),p}var g={uid:null,cfg:o,logger:t,notify:a,set:c,setDf:h,watch:u,ref:f,rdOnly:m,blkVal:d,_block:l};return Ae(g,"uid",{c:!1,e:!1,w:!1,v:i}),s=jS(g),Zu(s,o,"config","Creating"),g}function VS(t,e){t?(t[Fu](e),t[vc](2,108,e)):Xy(e)}function _n(t,e,n,r){var i=WS(n,t||{},r);return e&&i.setDf(i.cfg,e),i}function ct(t,e,n){var r=t[di]||t;return r.cfg&&(r.cfg===t||r.cfg[di]===r)?r[Yi](e):(VS(n,Gw+te(t)),_n(t,null,n)[Yi](e))}function fs(t,e){if(t&&t[go])return t[go](e)}function Gy(t,e,n){var r;return n||(r=Zn(function(i){n=i})),t&&yw(t)>0?Kt(fs(t[0],e),function(){Gy(Wl(t,1),e,n)}):n(),r}var qS=500,Gg="Microsoft_ApplicationInsights_BypassAjaxInstrumentation";function HS(t,e,n){return!t&&K(t)?e:Jm(t)?t:$t(t)[Us]()==="true"}function kn(t){return{mrg:!0,v:t}}function Jg(t,e){return{set:t,v:e}}function Yu(t,e,n){return{fb:n,isVal:t,v:e}}function dt(t,e){return{fb:e,set:HS,v:!!t}}function BS(t){return{isVal:de,v:$t(Re)}}var $f=[iu,Na,ou,Wi],el=null,Nc;function KS(t,e){return function(){var n=arguments,r=Jy(e);if(r){var i=r.listener;i&&i[t]&&i[t][ho](i,n)}}}function XS(){var t=nt("Microsoft");return t&&(el=t.ApplicationInsights),el}function Jy(t){var e=el;return!e&&t.disableDbgExt!==!0&&(e=el||XS()),e?e.ChromeDbgExt:null}function GS(t){if(!Nc){Nc={};for(var e=0;e<$f[he];e++)Nc[$f[e]]=KS($f[e],t)}return Nc}var No,Qy="warnToConsole",JS="AI (Internal): ",QS="AI: ",ZS="AITR_",YS={loggingLevelConsole:0,loggingLevelTelemetry:1,maxMessageLimit:25,enableDebug:!1},eI=(No={},No[0]=null,No[1]="errorToConsole",No[2]=Qy,No[3]="debugToConsole",No);function Qg(t){return t?'"'+t[to](/\"/g,Re)+'"':Re}function Of(t,e){var n=mS();if(n){var r="log";n[t]&&(r=t),pe(n[r])&&n[r](e)}}var ec=(function(){function t(e,n,r,i){r===void 0&&(r=!1);var o=this;o[Wu]=e,o[eo]=(r?QS:JS)+e;var s=Re;yc()&&(s=Mn().stringify(i));var a=(n?" message:"+Qg(n):Re)+(i?" props:"+Qg(s):Re);o[eo]+=a}return t.dataType="MessageData",t})();function wo(t,e){return(t||{})[ft]||new tl(e)}var tl=(function(){function t(e){this.identifier="DiagnosticLogger",this.queue=[];var n=0,r={},i,o,s,a,c;qe(t,this,function(u){c=f(e||{}),u.consoleLoggingLevel=function(){return i},u[vc]=function(h,g,p,v,_){_===void 0&&(_=!1);var P=new ec(g,p,_,v);if(a)throw te(P);var x=eI[h]||Qy;if(Ye(P[eo]))d("throw"+(h===1?"Critical":"Warning"),P);else{if(_){var R=+P[Wu];!r[R]&&i>=h&&(u[x](P[eo]),r[R]=!0)}else i>=h&&u[x](P[eo]);l(h,P)}},u.debugToConsole=function(h){Of("debug",h),d("warning",h)},u[Fu]=function(h){Of("warn",h),d("warning",h)},u.errorToConsole=function(h){Of("error",h),d("error",h)},u.resetInternalMessageCount=function(){n=0,r={}},u.logInternalMessage=l,u[go]=function(h){c&&c.rm(),c=null};function l(h,g){if(!m()){var p=!0,v=ZS+g[Wu];if(r[v]?p=!1:r[v]=!0,p&&(h<=o&&(u.queue[Ee](g),n++,d(h===1?"error":"warn",g)),n===s)){var _="Internal events throttle limit per PageView reached for this app.",P=new ec(23,_,!1);u.queue[Ee](P),h===1?u.errorToConsole(_):u[Fu](_)}}}function f(h){return ct(_n(h,YS,u).cfg,function(g){var p=g.cfg;i=p[Sy],o=p.loggingLevelTelemetry,s=p.maxMessageLimit,a=p.enableDebug})}function m(){return n>=s}function d(h,g){var p=Jy(e||{});p&&p[Sr]&&p[Sr](h,g)}})}return t.__ieDyn=1,t})();function Fp(t){return t||new tl}function J(t,e,n,r,i,o){o===void 0&&(o=!1),Fp(t)[vc](e,n,r,i,o)}function ro(t,e){Fp(t)[Fu](e)}function tI(t,e,n){Fp(t).logInternalMessage(e,n)}var Ff,Ur,Zg="toGMTString",Yg="toUTCString",jp="cookie",jf="expires",ev="isCookieUseDisabled",tc="disableCookiesUsage",ds="_ckMgr",$c=null,Lf=null,tv=null,Gn,nv={},nl={},nI=(Ff={cookieCfg:kn((Ur={},Ur[Zd]={fb:"cookieDomain",dfVal:no},Ur.path={fb:"cookiePath",dfVal:no},Ur.enabled=Wn,Ur.ignoreCookies=Wn,Ur.blockedCookies=Wn,Ur.disableCookieDefer=!1,Ur)),cookieDomain:Wn,cookiePath:Wn},Ff[tc]=Wn,Ff);function Lp(){!Gn&&(Gn=iy(function(){return kt()}))}function rI(t,e){var n=cu[ds]||nl[ds];return n||(n=cu[ds]=cu(t,e),nl[ds]=n),n}function Oc(t){return t?t.isEnabled():!0}function Zy(t,e){return e&&t&&Ce(t.ignoreCookies)?At(t.ignoreCookies,e)!==-1:!1}function rv(t,e){return e&&t&&Ce(t.blockedCookies)&&At(t.blockedCookies,e)!==-1?!0:Zy(t,e)}function iv(t,e){var n=e[us];if(K(n)){var r=void 0;Ye(t[ev])||(r=!t[ev]),Ye(t[tc])||(r=!t[tc]),n=r}return n}function Hl(t,e){var n;return t&&(n=t.getCookieMgr()),n||(n=rI(e,(t||{})[ft])),n}function cu(t,e){var n,r,i,o,s,a,c,u,l=[];function f(p){var v,_=(v={},v[Pf]=p||"/",v[jf]="Thu, 01 Jan 1970 00:00:01 GMT",v);return th()||(_["max-age"]="0"),sv(Re,_)}function m(p,v,_,P){var x={},R=Ve(p||Re),q=at(R,";");if(q!==-1&&(R=Ve(Mu(p,q)),x=Yy(Bt(p,q+1))),We(x,Zd,_||i,Ru,Ye),!K(v)){var A=th();if(Ye(x[jf])){var I=An(),L=I+v*1e3;if(L>0){var O=new Date;O.setTime(L),We(x,jf,ov(O,A?Zg:Yg)||ov(O,A?Zg:Yg)||Re,Ru)}}A||We(x,"max-age",Re+v,null,Ye)}var H=Hn();return H&&H.protocol==="https:"&&(We(x,"secure",null,null,Ye),Lf===null&&(Lf=!oI((rr()||{})[Bd])),Lf&&We(x,"SameSite","None",null,Ye)),We(x,Pf,P||r,null,Ye),sv(R,x)}function d(p){if(l)for(var v=l[he]-1;v>=0;v--)l[v].n===p&&l[Co](v,1)}function h(){Wf(e)&&l&&(ee(l,function(p){rv(n,p.n)||(p.o===0?c(p.n,p.v):p.o===1&&u(p.n,p.v))}),l=[])}t=_n(t||nl,null,e).cfg,o=ct(t,function(p){p.setDf(p.cfg,nI),n=p.ref(p.cfg,"cookieCfg"),r=n[Pf]||"/",i=n[Zd],n.disableCookieDefer?l=null:l===null&&(l=[]);var v=s;s=iv(t,n)!==!1,a=n.getCookie||iI,c=n.setCookie||av,u=n.delCookie||av,!v&&s&&l&&h()},e);var g={isEnabled:function(){var p=iv(t,n)!==!1&&s&&Wf(e),v=nl[ds];return p&&v&&g!==v&&(p=Oc(v)),p},setEnabled:function(p){n[us]=p,Ye(t[tc])||(t[tc]=!p)},set:function(p,v,_,P,x){var R=!1,q=rv(n,p);if(!q){var A=m(v,_,P,x);Oc(g)?(c(p,A),R=!0):l&&(d(p),l[Ee]({n:p,o:0,v:A}),R=!0)}return R},get:function(p){var v=Re,_=Zy(n,p);if(!_){if(Oc(g))v=a(p);else if(l)for(var P=l[he]-1;P>=0;P--){var x=l[P];if(x.n===p){if(x.o===0){var R=x.v,q=at(R,";");v=Ve(q!==-1?Mu(R,q):R)}break}}}return v},del:function(p,v){var _=!1;return Oc(g)?_=g.purge(p,v):l&&(d(p),l[Ee]({n:p,o:1,v:f(v)}),_=!0),_},purge:function(p,v){var _=!1;return Wf(e)&&(u(p,f(v)),_=!0),_},unload:function(p){o&&o.rm(),o=null,l=null}};return g[ds]=g,g}function Wf(t){if($c===null){$c=!1,!Gn&&Lp();try{var e=Gn.v||{};$c=e[jp]!==void 0}catch(n){J(t,2,68,"Cannot access document.cookie - "+$e(n),{exception:te(n)})}}return $c}function Yy(t){var e={};if(t&&t[he]){var n=Ve(t)[mo](";");ee(n,function(r){if(r=Ve(r||Re),r){var i=at(r,"=");i===-1?e[r]=null:e[Ve(Mu(r,i))]=Ve(Bt(r,i+1))}})}return e}function ov(t,e){return pe(t[e])?t[e]():null}function sv(t,e){var n=t||Re;return De(e,function(r,i){n+="; "+r+(K(i)?Re:"="+i)}),n}function iI(t){var e=Re;if(!Gn&&Lp(),Gn.v){var n=Gn.v[jp]||Re;tv!==n&&(nv=Yy(n),tv=n),e=Ve(nv[t]||Re)}return e}function av(t,e){!Gn&&Lp(),Gn.v&&(Gn.v[jp]=t+"="+e)}function oI(t){return de(t)?!!(Dt(t,"CPU iPhone OS 12")||Dt(t,"iPad; CPU OS 12")||Dt(t,"Macintosh; Intel Mac OS X 10_14")&&Dt(t,"Version/")&&Dt(t,"Safari")||Dt(t,"Macintosh; Intel Mac OS X 10_14")&&yy(t,"AppleWebKit/605.1.15 (KHTML, like Gecko)")||Dt(t,"Chrome/5")||Dt(t,"Chrome/6")||Dt(t,"UnrealEngine")&&!Dt(t,"Chrome")||Dt(t,"UCBrowser/12")||Dt(t,"UCBrowser/11")):!1}var sI={perfEvtsSendAll:!1};function aI(t){t.h=null;var e=t.cb;t.cb=[],ee(e,function(n){it(n.fn,[n.arg])})}function Nr(t,e,n,r){ee(t,function(i){i&&i[e]&&(n?(n.cb[Ee]({fn:r,arg:i}),n.h=n.h||yn(aI,0,n)):it(r,[i]))})}var cI=(function(){function t(e){this.listeners=[];var n,r,i=[],o={h:null,cb:[]},s=_n(e,sI);r=s[Yi](function(a){n=!!a.cfg.perfEvtsSendAll}),qe(t,this,function(a){Ae(a,"listeners",{g:function(){return i}}),a[Lu]=function(c){i[Ee](c)},a[ju]=function(c){for(var u=At(i,c);u>-1;)i[Co](u,1),u=At(i,c)},a[iu]=function(c){Nr(i,iu,o,function(u){u[iu](c)})},a[Na]=function(c,u,l){Nr(i,Na,o,function(f){f[Na](c,u,l)})},a[ou]=function(c,u){Nr(i,ou,u?o:null,function(l){l[ou](c,u)})},a[Wi]=function(c){c&&(n||!c[Xd]())&&Nr(i,Wi,null,function(u){c.isAsync?yn(function(){return u[Wi](c)},0):u[Wi](c)})},a[Tf]=function(c){c&&c[he]&&Nr(i,Tf,o,function(u){u[Tf](c)})},a[Ef]=function(c){c&&c[Sn]&&Nr(i,Ef,o,function(u){u[Ef](c)})},a[xf]=function(c,u){if(c>0){var l=u||0;Nr(i,xf,o,function(f){f[xf](c,l)})}},a[go]=function(c){var u=function(){r&&r.rm(),r=null,i=[],o.h&&o.h[Ui](),o.h=null,o.cb=[]},l;if(Nr(i,"unload",null,function(f){var m=f[go](c);m&&(l||(l=[]),l[Ee](m))}),l)return Zn(function(f){return Kt(Xw(l),function(){u(),f()})});u()}})}return t.__ieDyn=1,t})(),ws="ctx",rh="ParentContextKey",$a="ChildrenContextKey",uI=null,uu=(function(){function t(e,n,r){var i=this;if(i.start=An(),i[po]=e,i.isAsync=r,i[Xd]=function(){return!1},pe(n)){var o;Ae(i,"payload",{g:function(){return!o&&pe(n)&&(o=n(),n=null),o}})}i[_s]=function(s){return s?s===t[rh]||s===t[$a]?i[s]:(i[ws]||{})[s]:null},i[jn]=function(s,a){if(s)if(s===t[rh])i[s]||(i[Xd]=function(){return!0}),i[s]=a;else if(s===t[$a])i[s]=a;else{var c=i[ws]=i[ws]||{};c[s]=a}},i.complete=function(){var s=0,a=i[_s](t[$a]);if(Ce(a))for(var c=0;c<a[he];c++){var u=a[c];u&&(s+=u.time)}i.time=An()-i.start,i.exTime=i.time-s,i.complete=function(){}}}return t.ParentContextKey="parent",t.ChildrenContextKey="childEvts",t})(),lI=(function(){function t(e){this.ctx={},qe(t,this,function(n){n.create=function(r,i,o){return new uu(r,i,o)},n.fire=function(r){r&&(r.complete(),e&&pe(e[Wi])&&e[Wi](r))},n[jn]=function(r,i){if(r){var o=n[ws]=n[ws]||{};o[r]=i}},n[_s]=function(r){return(n[ws]||{})[r]}})}return t.__ieDyn=1,t})(),Vf="CoreUtils.doPerf";function rl(t,e,n,r,i){if(t){var o=t;if(o[Bu]&&(o=o[Bu]()),o){var s=void 0,a=o[_s](Vf);try{if(s=o.create(e(),r,i),s){if(a&&s[jn]&&(s[jn](uu[rh],a),a[_s]&&a[jn])){var c=a[_s](uu[$a]);c||(c=[],a[jn](uu[$a],c)),c[Ee](s)}return o[jn](Vf,s),n(s)}}catch(u){s&&s[jn]&&s[jn]("exception",u)}finally{s&&o.fire(s),o[jn](Vf,a)}}}return n()}function fI(){return uI}function ti(){for(var t=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],e=Re,n,r=0;r<4;r++)n=Za(),e+=t[n&15]+t[n>>4&15]+t[n>>8&15]+t[n>>12&15]+t[n>>16&15]+t[n>>20&15]+t[n>>24&15]+t[n>>28&15];var i=t[8+(Za()&3)|0];return Jr(e,0,8)+Jr(e,9,4)+"4"+Jr(e,13,3)+i+Jr(e,16,3)+Jr(e,19,12)}var ih="00",dI="ff",eb="00000000000000000000000000000000",tb="0000000000000000";function bc(t,e,n){return t&&t[he]===e&&t!==n?!!t.match(/^[\da-f]*$/i):!1}function cv(t,e,n){return bc(t,e)?t:n}function hI(t){(isNaN(t)||t<0||t>255)&&(t=1);for(var e=t.toString(16);e[he]<2;)e="0"+e;return e}function uv(t,e,n,r){return{version:bc(r,2,dI)?r:ih,traceId:Wp(t)?t:ti(),spanId:Vp(e)?e:Mu(ti(),16),traceFlags:n>=0&&n<=255?n:1}}function Wp(t){return bc(t,32,eb)}function Vp(t){return bc(t,16,tb)}function lv(t){if(t){var e=hI(t[Gd]);bc(e,2)||(e="01");var n=t[Hd]||ih;return n!=="00"&&n!=="ff"&&(n=ih),"".concat(n.toLowerCase(),"-").concat(cv(t.traceId,32,eb).toLowerCase(),"-").concat(cv(t.spanId,16,tb).toLowerCase(),"-").concat(e.toLowerCase())}return""}function pI(t){var e=t.getElementsByTagName("script"),n=[];return ee(e,function(r){var i=r[_f]("src");if(i){var o=r[_f]("crossorigin"),s=r.hasAttribute("async")===!0,a=r.hasAttribute("defer")===!0,c=r[_f]("referrerpolicy"),u={url:i};o&&(u.crossOrigin=o),s&&(u.async=s),a&&(u.defer=a),c&&(u.referrerPolicy=c),n[Ee](u)}}),n}var gI=qy("plugin");function io(t){return gI.get(t,"state",{},!0)}function fv(t,e){for(var n=[],r=null,i=t[Xn](),o;i;){var s=i[Xa]();if(s){r&&r[Ja]&&s[Yn]&&r[Ja](s),o=io(s);var a=!!o[qn];s[qn]&&(a=s[qn]()),a||n[Ee](s),r=s,i=i[Xn]()}}ee(n,function(c){var u=t[yt]();c[mc](t.getCfg(),u,e,t[Xn]()),o=io(c),!c[yt]&&!o[yt]&&(o[yt]=u),o[qn]=!0,delete o[pr]})}function qf(t){return t.sort(function(e,n){var r=0;if(n){var i=n[Yn];e[Yn]?r=i?e[Hu]-n[Hu]:1:i&&(r=-1)}else r=e?1:-1;return r})}function vI(t){var e={};return{getName:function(){return e[po]},setName:function(n){e[po]=n},getTraceId:function(){return e.traceId},setTraceId:function(n){Wp(n)&&(e.traceId=n)},getSpanId:function(){return e.spanId},setSpanId:function(n){Vp(n)&&(e.spanId=n)},getTraceFlags:function(){return e[Gd]},setTraceFlags:function(n){e[Gd]=n}}}var mI="TelemetryPluginChain",dv="_hasRun",hv="_getTelCtx",pv=0;function yI(t,e,n){for(;t;){if(t[Xa]()===n)return t;t=t[Xn]()}return yo([n],e.config||{},e)}function qp(t,e,n,r){var i=null,o=[];e||(e=_n({},null,n[ft])),r!==null&&(i=r?yI(t,n,r):t);var s={_next:c,ctx:{core:function(){return n},diagLog:function(){return wo(n,e.cfg)},getCfg:function(){return e.cfg},getExtCfg:l,getConfig:f,hasNext:function(){return!!i},getNext:function(){return i},setNext:function(d){i=d},iterate:m,onComplete:a}};function a(d,h){for(var g=[],p=2;p<arguments.length;p++)g[p-2]=arguments[p];d&&o[Ee]({func:d,self:Ye(h)?s.ctx:h,args:g})}function c(){var d=i;if(i=d?d[Xn]():null,!d){var h=o;h&&h[he]>0&&(ee(h,function(g){try{g.func.call(g.self,g.args)}catch(p){J(n[ft],2,73,"Unexpected Exception during onComplete - "+te(p))}}),o=[])}return d}function u(d,h){var g=null,p=e.cfg;if(p&&d){var v=p[Cs];!v&&h&&(v={}),p[Cs]=v,v=e.ref(p,Cs),v&&(g=v[d],!g&&h&&(g={}),v[d]=g,g=e.ref(v,d))}return g}function l(d,h){var g=u(d,!0);return h&&De(h,function(p,v){if(K(g[p])){var _=e.cfg[p];(_||!K(_))&&(g[p]=_)}Op(e,g,p,v)}),e.setDf(g,h)}function f(d,h,g){g===void 0&&(g=!1);var p,v=u(d,!1),_=e.cfg;return v&&(v[h]||!K(v[h]))?p=v[h]:(_[h]||!K(_[h]))&&(p=_[h]),p||!K(p)?p:g}function m(d){for(var h;h=s._next();){var g=h[Xa]();g&&d(g)}}return s}function zn(t,e,n,r){var i=_n(e),o=qp(t,i,n,r),s=o.ctx;function a(u){var l=o._next();return l&&l[Yn](u,s),!l}function c(u,l){return u===void 0&&(u=null),Ce(u)&&(u=yo(u,i.cfg,n,l)),zn(u||s[Xn](),i.cfg,n,l)}return s[Nt]=a,s[vo]=c,s}function il(t,e,n){var r=_n(e.config),i=qp(t,r,e,n),o=i.ctx;function s(c){var u=i._next();return u&&u[go](o,c),!u}function a(c,u){return c===void 0&&(c=null),Ce(c)&&(c=yo(c,r.cfg,e,u)),il(c||o[Xn](),e,u)}return o[Nt]=s,o[vo]=a,o}function Hp(t,e,n){var r=_n(e.config),i=qp(t,r,e,n),o=i.ctx;function s(c){return o.iterate(function(u){pe(u[Ga])&&u[Ga](o,c)})}function a(c,u){return c===void 0&&(c=null),Ce(c)&&(c=yo(c,r.cfg,e,u)),Hp(c||o[Xn](),e,u)}return o[Nt]=s,o[vo]=a,o}function yo(t,e,n,r){var i=null,o=!r;if(Ce(t)&&t[he]>0){var s=null;ee(t,function(a){if(!o&&r===a&&(o=!0),o&&a&&pe(a[Yn])){var c=bI(a,e,n);i||(i=c),s&&s._setNext(c),s=c}})}return r&&!i?yo([r],e,n):i}function bI(t,e,n){var r=null,i=pe(t[Yn]),o=pe(t[Ja]),s;t?s=t[Qr]+"-"+t[Hu]+"-"+pv++:s="Unknown-0-"+pv++;var a={getPlugin:function(){return t},getNext:function(){return r},processTelemetry:l,unload:f,update:m,_id:s,_setNext:function(d){r=d}};function c(){var d;return t&&pe(t[hv])&&(d=t[hv]()),d||(d=zn(a,e,n)),d}function u(d,h,g,p,v){var _=!1,P=t?t[Qr]:mI,x=d[dv];return x||(x=d[dv]={}),d.setNext(r),t&&rl(d[yt](),function(){return P+":"+g},function(){x[s]=!0;try{var R=r?r._id:Re;R&&(x[R]=!1),_=h(d)}catch(A){var q=r?x[r._id]:!0;q&&(_=!0),(!r||!q)&&J(d[Sr](),1,73,"Plugin ["+P+"] failed during "+g+" - "+te(A)+", run flags: "+te(x))}},p,v),_}function l(d,h){h=h||c();function g(p){if(!t||!i)return!1;var v=io(t);return v[pr]||v[Qd]?!1:(o&&t[Ja](r),t[Yn](d,p),!0)}u(h,g,"processTelemetry",function(){return{item:d}},!d.sync)||h[Nt](d)}function f(d,h){function g(){var p=!1;if(t){var v=io(t),_=t[yt]||v[yt];t&&(!_||_===d.core())&&!v[pr]&&(v[yt]=null,v[pr]=!0,v[qn]=!1,t[pr]&&t[pr](d,h)===!0&&(p=!0))}return p}u(d,g,"unload",function(){},h.isAsync)||d[Nt](h)}function m(d,h){function g(){var p=!1;if(t){var v=io(t),_=t[yt]||v[yt];t&&(!_||_===d.core())&&!v[pr]&&t[Ga]&&t[Ga](d,h)===!0&&(p=!0)}return p}u(d,g,"update",function(){},!1)||d[Nt](h)}return Rn(a)}function nb(){var t=[];function e(r){r&&t[Ee](r)}function n(r,i){ee(t,function(o){try{o(r,i)}catch(s){J(r[Sr](),2,73,"Unexpected error calling unload handler - "+te(s))}}),t=[]}return{add:e,run:n}}function rb(){var t=[];function e(r){var i=t;t=[],ee(i,function(o){try{(o.rm||o.remove).call(o)}catch(s){J(r,2,73,"Unloading:"+te(s))}})}function n(r){r&&cs(t,r)}return{run:e,add:n}}var Hf,$r="getPlugin",_I=(Hf={},Hf[Cs]={isVal:no,v:{}},Hf),So=(function(){function t(){var e=this,n,r,i,o,s;u(),qe(t,e,function(l){l[mc]=function(f,m,d,h){c(f,m,h),n=!0},l[pr]=function(f,m){var d=l[yt];if(!d||f&&d!==f[yt]())return;var h,g=!1,p=f||il(null,d,i&&i[$r]?i[$r]():i),v=m||{reason:0,isAsync:!1};function _(){g||(g=!0,o.run(p,m),s.run(p[Sr]()),h===!0&&p[Nt](v),u())}return!l[Vu]||l[Vu](p,v,_)!==!0?_():h=!0,h},l[Ga]=function(f,m){var d=l[yt];if(!d||f&&d!==f[yt]())return;var h,g=!1,p=f||Hp(null,d,i&&i[$r]?i[$r]():i),v=m||{reason:0};function _(){g||(g=!0,c(p.getCfg(),p.core(),p[Xn]()))}return!l._doUpdate||l._doUpdate(p,v,_)!==!0?_():h=!0,h},Xu(l,"_addUnloadCb",function(){return o},"add"),Xu(l,"_addHook",function(){return s},"add"),Ae(l,"_unloadHooks",{g:function(){return s}})}),e[Sr]=function(l){return a(l)[Sr]()},e[qn]=function(){return n},e.setInitialized=function(l){n=l},e[Ja]=function(l){i=l},e[Nt]=function(l,f){f?f[Nt](l):i&&pe(i[Yn])&&i[Yn](l,null)},e._getTelCtx=a;function a(l){l===void 0&&(l=null);var f=l;if(!f){var m=r||zn(null,{},e[yt]);i&&i[$r]?f=m[vo](null,i[$r]):f=m[vo](null,i)}return f}function c(l,f,m){_n(l,_I,wo(f)),!m&&f&&(m=f[wy]()[Xn]());var d=i;i&&i[$r]&&(d=i[$r]()),e[yt]=f,r=zn(m,l,f,d)}function u(){n=!1,e[yt]=null,r=null,i=null,s=rb(),o=nb()}}return t.__ieDyn=1,t})();function CI(t,e,n){var r={id:e,fn:n};cs(t,r);var i={remove:function(){ee(t,function(o,s){if(o.id===r.id)return t[Co](s,1),-1})}};return i}function wI(t,e,n){for(var r=!1,i=t[he],o=0;o<i;++o){var s=t[o];if(s)try{if(s.fn[ho](null,[e])===!1){r=!0;break}}catch(a){J(n,2,64,"Telemetry initializer failed: "+$e(a),{exception:te(a)},!0)}}return!r}var SI=(function(t){ir(e,t);function e(){var n=t.call(this)||this;n.identifier="TelemetryInitializerPlugin",n.priority=199;var r,i;o(),qe(e,n,function(s,a){s.addTelemetryInitializer=function(c){return CI(i,r++,c)},s[Yn]=function(c,u){wI(i,c,u?u[Sr]():s[Sr]())&&s[Nt](c,u)},s[Vu]=function(){o()}});function o(){r=0,i=[]}return n}return e.__ieDyn=1,e})(So),Or,ib="Plugins must provide initialize method",II="_notificationManager",gv="SDK is still unloading...",kI="SDK is not initialized",TI=100,EI=5e4,Bf=Ws((Or={cookieCfg:{}},Or[Go]={rdOnly:!0,ref:!0,v:[]},Or[Xo]={rdOnly:!0,ref:!0,v:[]},Or[Cs]={ref:!0,v:{}},Or[Jd]=Wn,Or.loggingLevelConsole=0,Or.diagnosticLogInterval=Wn,Or));function xI(t,e){return new lI(e)}function PI(t,e,n){var r=[],i=[],o={};return ee(n,function(s){(K(s)||K(s[mc]))&&Yt(ib);var a=s[Hu],c=s[Qr];s&&a&&(K(o[a])?o[a]=c:ro(t,"Two extensions have same priority #"+a+" - "+o[a]+", "+c)),!a||a<e?r[Ee](s):i[Ee](s)}),{core:r,channels:i}}function vv(t,e){var n=!1;return ee(e,function(r){if(r===t)return n=!0,-1}),n}function oh(t,e,n,r){n&&De(n,function(i,o){r&&Ot(o)&&Ot(e[i])&&oh(t,e[i],o,r),r&&Ot(o)&&Ot(e[i])?oh(t,e[i],o,r):t.set(e,i,o)})}function mv(t,e){var n=null,r=-1;return ee(t,function(i,o){if(i.w===e)return n=i,r=o,-1}),{i:r,l:n}}function DI(t,e){var n=mv(t,e).l;return n||(n={w:e,rm:function(){var r=mv(t,e);r.i!==-1&&t[Co](r.i,1)}},t[Ee](n)),n}function RI(t,e,n){ee(e,function(r){var i=ct(t,r.w,n);delete r.w,r.rm=function(){i.rm()}})}function AI(t,e,n,r){return e.add(t[Yi](function(i){var o=i.cfg.disableDbgExt;o===!0&&r&&(n[ju](r),r=null),n&&!r&&o!==!0&&(r=GS(i.cfg),n[Lu](r))})),r}function MI(t){return Ae({rm:function(){t.rm()}},"toJSON",{v:function(){return"aicore::onCfgChange<"+JSON.stringify(t)+">"}})}var zI=(function(){function t(){var e,n,r,i,o,s,a,c,u,l,f,m,d,h,g,p,v,_,P,x,R,q,A,I,L,O,H,ne,se,b,E,B,M;qe(t,this,function(D){U(),D._getDbgPlgTargets=function(){return[A,i]},D[qn]=function(){return n},D.activeStatus=function(){return O},D._setPendingStatus=function(){O=3},D[mc]=function($,Z,ue,re){d&&Yt(gv),D[qn]()&&Yt("Core cannot be initialized more than once"),e=_n($,Bf,ue||D[ft],!1),$=e.cfg,un(e[Yi](function(W){var j=W.cfg;ne=j.initInMemoMaxSize||TI,ce(j);var X=W.ref(W.cfg,Cs);De(X,function(ie){W.ref(X,ie)})})),o=re,P=AI(e,_,o&&D[Ac](),P),je(),D[ft]=ue;var S=$[Go];if(l=[],l[Ee].apply(l,zg(zg([],Z,!1),S)),f=$[Xo],Y(null),(!m||m[he]===0)&&Yt("No "+Xo+" available"),f&&f[he]>1){var z=D[Xa]("TeeChannelController");(!z||!z.plugin)&&J(r,1,28,"TeeChannel required")}RI($,q,r),q=null,n=!0,O===Kr.ACTIVE&&V()},D.getChannels=function(){var $=[];return m&&ee(m,function(Z){$[Ee](Z)}),Rn($)},D.track=function($){rl(D[Bu](),function(){return"AppInsightsCore:track"},function(){$===null&&(or($),Yt("Invalid telemetry item")),!$[po]&&K($[po])&&(or($),Yt("telemetry name required")),$.iKey=$.iKey||R,$.time=$.time||Ns(new Date),$.ver=$.ver||"4.0",!d&&D[qn]()&&O===Kr.ACTIVE?G()[Nt]($):O!==Kr.INACTIVE&&i[he]<=ne&&i[Ee]($)},function(){return{item:$}},!$.sync)},D[wy]=G,D[Ac]=function(){return o||(o=new cI(e.cfg),D[II]=o),o},D[Lu]=function($){D.getNotifyMgr()[Lu]($)},D[ju]=function($){o&&o[ju]($)},D.getCookieMgr=function(){return c||(c=cu(e.cfg,D[ft])),c},D.setCookieMgr=function($){c!==$&&(fs(c,!1),c=$)},D[Bu]=function(){return s||a||fI()},D.setPerfMgr=function($){s=$},D.eventCnt=function(){return i[he]},D.releaseQueue=function(){if(n&&i[he]>0){var $=i;i=[],O===2?ee($,function(Z){Z.iKey=Z.iKey||R,G()[Nt](Z)}):J(r,2,20,"core init status is not active")}},D.pollInternalLogs=function($){return g=$||null,M=!1,E&&E[Ui](),C(!0)};function ce($){var Z=$.instrumentationKey,ue=$.endpointUrl;if(O!==3){if(K(Z)){R=null,O=Kr.INACTIVE;var re="Please provide instrumentation key";n?(J(r,1,100,re),V()):Yt(re);return}var S=[];fi(Z)?(S[Ee](Z),R=null):R=Z,fi(ue)?(S[Ee](ue),H=null):H=ue,S[he]?me($,S):oe()}}function me($,Z){se=!1,O=3;var ue=no($.initTimeOut)?$.initTimeOut:EI,re=Kw(Z);b&&b[Ui](),b=yn(function(){b=null,se||oe()},ue),Kt(re,function(S){try{if(se)return;if(!S.rejected){var z=S[Li];if(z&&z[he]){var W=z[0];if(R=W&&W[Li],z[he]>1){var j=z[1];H=j&&j[Li]}}R&&($.instrumentationKey=R,$.endpointUrl=H)}oe()}catch{se||oe()}})}function oe(){se=!0,K(R)?(O=Kr.INACTIVE,J(r,1,112,"ikey can't be resolved from promises")):O=Kr.ACTIVE,V()}function V(){n&&(D.releaseQueue(),D.pollInternalLogs())}function C($){if((!E||!E[us])&&!M){var Z=$||r&&r.queue[he]>0;Z&&(B||(B=!0,un(e[Yi](function(ue){var re=ue.cfg.diagnosticLogInterval;(!re||!(re>0))&&(re=1e4);var S=!1;E&&(S=E[us],E[Ui]()),E=Ew(Ne,re),E.unref(),E[us]=S}))),E[us]=!0)}return E}D[Fg]=function(){M=!0,E&&E[Ui](),Ne()},ls(D,function(){return h},["addTelemetryInitializer"]),D[go]=function($,Z,ue){$===void 0&&($=!0),n||Yt(kI),d&&Yt(gv);var re={reason:50,isAsync:$,flushComplete:!1},S;$&&!Z&&(S=Zn(function(j){Z=j}));var z=il(ke(),D);z[Mc](function(){_.run(D[ft]),Gy([c,o,r],$,function(){U(),Z&&Z(re)})},D);function W(j){re.flushComplete=j,d=!0,v.run(z,re),D[Fg](),z[Nt](re)}return Ne(),Et($,W,6,ue),S},D[Xa]=_e,D.addPlugin=function($,Z,ue,re){if(!$){re&&re(!1),xt(ib);return}var S=_e($[Qr]);if(S&&!Z){re&&re(!1),xt("Plugin ["+$[Qr]+"] is already loaded!");return}var z={reason:16};function W(ie){l[Ee]($),z.added=[$],Y(z),re&&re(!0)}if(S){var j=[S.plugin],X={reason:2,isAsync:!!ue};Te(j,X,function(ie){ie?(z.removed=j,z.reason|=32,W()):re&&re(!1)})}else W()},D.updateCfg=function($,Z){Z===void 0&&(Z=!0);var ue;if(D[qn]()){ue={reason:1,cfg:e.cfg,oldCfg:Mg({},e.cfg),newConfig:Mg({},$),merge:Z},$=ue.newConfig;var re=e.cfg;$[Go]=re[Go],$[Xo]=re[Xo]}e._block(function(S){var z=S.cfg;oh(S,z,$,Z),Z||De(z,function(W){ii($,W)||S.set(z,W,Wn)}),S.setDf(z,Bf)},!0),e.notify(),ue&&Le(ue)},D.evtNamespace=function(){return p},D.flush=Et,D.getTraceCtx=function($){return x||(x=vI()),x},D.setTraceCtx=function($){x=$||null},D.addUnloadHook=un,Xu(D,"addUnloadCb",function(){return v},"add"),D.onCfgChange=function($){var Z;return n?Z=ct(e.cfg,$,D[ft]):Z=DI(q,$),MI(Z)},D.getWParam=function(){return sy()||e.cfg.enableWParam?0:-1};function y(){var $={};I=[];var Z=function(ue){ue&&ee(ue,function(re){if(re[Qr]&&re[Hd]&&!$[re.identifier]){var S=re[Qr]+"="+re[Hd];I[Ee](S),$[re.identifier]=re}})};Z(m),f&&ee(f,function(ue){Z(ue)}),Z(l)}function U(){n=!1,e=_n({},Bf,D[ft]),e.cfg[Sy]=1,Ae(D,"config",{g:function(){return e.cfg},s:function(Z){D.updateCfg(Z,!1)}}),Ae(D,"pluginVersionStringArr",{g:function(){return I||y(),I}}),Ae(D,"pluginVersionString",{g:function(){return L||(I||y(),L=I.join(";")),L||Re}}),Ae(D,"logger",{g:function(){return r||(r=new tl(e.cfg),e[ft]=r),r},s:function(Z){e[ft]=Z,r!==Z&&(fs(r,!1),r=Z)}}),D[ft]=new tl(e.cfg),A=[];var $=D.config[Go]||[];$.splice(0,$[he]),cs($,A),h=new SI,i=[],fs(o,!1),o=null,s=null,a=null,fs(c,!1),c=null,u=null,l=[],f=null,m=null,d=!1,g=null,p=bn("AIBaseCore",!0),v=nb(),x=null,R=null,_=rb(),q=[],L=null,I=null,M=!1,E=null,B=!1,O=0,H=null,ne=null,se=!1,b=null}function G(){var $=zn(ke(),e.cfg,D);return $[Mc](C),$}function Y($){var Z=PI(D[ft],qS,l);u=null,L=null,I=null,m=(f||[])[0]||[],m=qf(cs(m,Z[Xo]));var ue=cs(qf(Z[yt]),m);A=Rn(ue);var re=D.config[Go]||[];re.splice(0,re[he]),cs(re,A);var S=G();m&&m[he]>0&&fv(S[vo](m),ue),fv(S,ue),$&&Le($)}function _e($){var Z=null,ue=null,re=[];return ee(A,function(S){if(S[Qr]===$&&S!==h)return ue=S,-1;S.getChannel&&re[Ee](S)}),!ue&&re[he]>0&&ee(re,function(S){if(ue=S.getChannel($),!ue)return-1}),ue&&(Z={plugin:ue,setEnabled:function(S){io(ue)[Qd]=!S},isEnabled:function(){var S=io(ue);return!S[pr]&&!S[Qd]},remove:function(S,z){S===void 0&&(S=!0);var W=[ue],j={reason:1,isAsync:S};Te(W,j,function(X){X&&Y({reason:32,removed:W}),z&&z(X)})}}),Z}function ke(){if(!u){var $=(A||[]).slice();At($,h)===-1&&$[Ee](h),u=yo(qf($),e.cfg,D)}return u}function Te($,Z,ue){if($&&$[he]>0){var re=yo($,e.cfg,D),S=il(re,D);S[Mc](function(){var z=!1,W=[];ee(l,function(X,ie){vv(X,$)?z=!0:W[Ee](X)}),l=W,L=null,I=null;var j=[];f&&(ee(f,function(X,ie){var fe=[];ee(X,function(Ie){vv(Ie,$)?z=!0:fe[Ee](Ie)}),j[Ee](fe)}),f=j),ue&&ue(z),C()}),S[Nt](Z)}else ue(!1)}function Ne(){if(r&&r.queue){var $=r.queue.slice(0);r.queue[he]=0,ee($,function(Z){var ue={name:g||"InternalMessageId: "+Z[Wu],iKey:R,time:Ns(new Date),baseType:ec.dataType,baseData:{message:Z[eo]}};D.track(ue)})}}function Et($,Z,ue,re){var S=1,z=!1,W=null;re=re||5e3;function j(){S--,z&&S===0&&(W&&W[Ui](),W=null,Z&&Z(z),Z=null)}if(m&&m[he]>0){var X=G()[vo](m);X.iterate(function(ie){if(ie.flush){S++;var fe=!1;ie.flush($,function(){fe=!0,j()},ue)||fe||($&&W==null?W=yn(function(){W=null,j()},re):j())}})}return z=!0,j(),!0}function je(){var $;un(e[Yi](function(Z){var ue=Z.cfg.enablePerfMgr;if(ue){var re=Z.cfg[Jd];($!==re||!$)&&(re||(re=xI),zt(Z.cfg,Jd,re),$=re,a=null),!s&&!a&&pe(re)&&(a=re(D,D[Ac]()))}else a=null,$=null}))}function Le($){var Z=Hp(ke(),D);Z[Mc](C),(!D._updateHook||D._updateHook(Z,$)!==!0)&&Z[Nt]($)}function xt($){var Z=D[ft];Z?(J(Z,2,73,$),C()):Yt($)}function or($){var Z=D[Ac]();Z&&Z[Na]([$],2)}function un($){_.add($)}})}return t.__ieDyn=1,t})();function Kf(t,e){try{if(t&&t!==""){var n=Mn().parse(t);if(n&&n[Wg]&&n[Wg]>=n.itemsAccepted&&n.itemsReceived-n.itemsAccepted===n.errors[he])return n}}catch(r){J(e,1,43,"Cannot parse the response. "+(r[po]||te(r)),{response:t})}return null}var wn="",UI="NoResponseBody",yv="&"+UI+"=true",Xf="POST",NI=(function(){function t(){var e=0,n,r,i,o,s,a,c,u,l,f,m,d,h,g;qe(t,this,function(p,v){var _=!0;se(),p[mc]=function(b,E){i=E,r&&J(i,1,28,"Sender is already initialized"),p.SetConfig(b),r=!0},p._getDbgPlgTargets=function(){return[r,o,a,n]},p.SetConfig=function(b){try{if(s=b.senderOnCompleteCallBack||{},a=!!b.disableCredentials,c=b.fetchCredentials,o=!!b.isOneDs,n=!!b.enableSendPromise,l=!!b.disableXhr,f=!!b.disableBeacon,m=!!b.disableBeaconSync,g=b.timeWrapper,h=!!b.addNoResponse,d=!!b.disableFetchKeepAlive,u={sendPOST:O},o||(_=!1),a){var E=Hn();E&&E.protocol&&E.protocol[Us]()==="file:"&&(_=!1)}return!0}catch{}return!1},p.getSyncFetchPayload=function(){return e},p.getSenderInst=function(b,E){return b&&b[he]?q(b,E):null},p.getFallbackInst=function(){return u},p[Vu]=function(b,E){se()},p.preparePayload=function(b,E,B,M){if(!E||M||!B[Sn]){b(B);return}try{var D=nt("CompressionStream");if(!pe(D)){b(B);return}var ce=new ReadableStream({start:function(U){U.enqueue(de(B[Sn])?new TextEncoder().encode(B[Sn]):B[Sn]),U.close()}}),me=ce.pipeThrough(new D("gzip")),oe=me.getReader(),V=[],C=0,y=!1;return Kt(oe.read(),function U(G){if(!y&&!G.rejected){var Y=G[Li];if(!Y.done)return V[Ee](Y[Li]),C+=Y.value[he],Kt(oe.read(),U);for(var _e=new Uint8Array(C),ke=0,Te=0,Ne=V;Te<Ne.length;Te++){var Et=Ne[Te];_e.set(Et,ke),ke+=Et[he]}B[Sn]=_e,B[zc]["Content-Encoding"]="gzip",B._chunkCount=V[he]}y||(y=!0,b(B))}),oe}catch{b(B);return}};function P(b,E){A(E,200,{},b)}function x(b,E){J(i,2,26,"Failed to send telemetry.",{message:b}),A(E,400,{})}function R(b){x("No endpoint url is provided for the batch",b)}function q(b,E){for(var B=0,M=null,D=0;M==null&&D<b[he];)B=b[D],!l&&B===1?CS()?M=ne:Vl()&&(M=O):B===2&&Np(E)&&(!E||!d)?M=H:B===3&&ma()&&(E?!m:!f)&&(M=L),D++;return M?{_transport:B,_isSync:E,sendPOST:M}:null}function A(b,E,B,M){try{b&&b(E,B,M)}catch{}}function I(b,E){var B=rr(),M=b[Gs];if(!M)return R(E),!0;M=b[Gs]+(h?yv:wn);var D=b[Sn],ce=o?D:new Blob([D],{type:"text/plain;charset=UTF-8"}),me=B.sendBeacon(M,ce);return me}function L(b,E,B){var M=b[Sn];try{if(M)if(I(b,E))P(wn,E);else{var D=s&&s.beaconOnRetry;D&&pe(D)?D(b,E,I):(u&&u.sendPOST(b,E,!0),J(i,2,40,". Failed to send telemetry with Beacon API, retried with normal sender."))}}catch(ce){o&&ro(i,"Failed to send telemetry using sendBeacon API. Ex:"+te(ce)),A(E,o?0:400,{},wn)}}function O(b,E,B){var M,D,ce,me=b[zc]||{};!B&&n&&(M=Zn(function(y,U){D=y,ce=U})),o&&B&&b.disableXhrSync&&(B=!1);var oe=b[Gs];if(!oe){R(E),D&&D(!1);return}var V=sS(Xf,oe,_,!0,B,b[zo]);o||V.setRequestHeader("Content-type","application/json"),ee(wr(me),function(y){V.setRequestHeader(y,me[y])}),V.onreadystatechange=function(){o||(C(V),V.readyState===4&&D&&D(!0))},V.onload=function(){o&&C(V)};function C(y){var U=s&&s.xhrOnComplete,G=U&&pe(U);if(G)U(y,E,b);else{var Y=Gu(y);A(E,y[dr],Rf(y,o),Y)}}return V.onerror=function(y){A(E,o?V[dr]:400,Rf(V,o),o?wn:Ju(V)),ce&&ce(y)},V.ontimeout=function(){A(E,o?V[dr]:500,Rf(V,o),o?wn:Ju(V)),D&&D(!1)},V.send(b[Sn]),M}function H(b,E,B){var M,D=b[Gs],ce=b[Sn],me=o?ce:new Blob([ce],{type:"application/json"}),oe,V,C,y=new Headers,U=ce[he],G=!1,Y=!1,_e=b[zc]||{},ke=(M={method:Xf,body:me},M[Gg]=!0,M);b.headers&&wr(b.headers)[he]>0&&(ee(wr(_e),function(je){y.append(je,_e[je])}),ke[zc]=y),c?ke.credentials=c:_&&o&&(ke.credentials="include"),B&&(ke.keepalive=!0,e+=U,o?b._sendReason===2&&(G=!0,h&&(D+=yv)):G=!0);var Te=new Request(D,ke);try{Te[Gg]=!0}catch{}if(!B&&n&&(oe=Zn(function(je,Le){V=je,C=Le})),!D){R(E),V&&V(!1);return}function Ne(je,Le){Le?A(E,o?0:Le,{},o?wn:je):A(E,o?0:400,{},o?wn:je)}function Et(je,Le,xt){var or=je[dr],un=s.fetchOnComplete;un&&pe(un)?un(je,E,xt||wn,Le):A(E,or,{},xt||wn)}try{Kt(fetch(o?D:Te,o?ke:null),function(je){if(B&&(e-=U,U=0),!Y)if(Y=!0,je.rejected)Ne(je.reason&&je.reason[eo],499),C&&C(je.reason);else{var Le=je[Li];try{!o&&!Le.ok?(Le[dr]?Ne(Le.statusText,Le[dr]):Ne(Le.statusText,499),V&&V(!1)):o&&!Le.body?(Et(Le,null,wn),V&&V(!0)):Kt(Le.text(),function(xt){Et(Le,b,xt[Li]),V&&V(!0)})}catch(xt){Le&&Le[dr]?Ne(te(xt),Le[dr]):Ne(te(xt),499),C&&C(xt)}}})}catch(je){Y||(Ne(te(je),499),C&&C(je))}return G&&!Y&&(Y=!0,A(E,200,{}),V&&V(!0)),o&&!Y&&b[zo]>0&&g&&g.set(function(){Y||(Y=!0,A(E,500,{}),V&&V(!0))},b[zo]),oe}function ne(b,E,B){var M=cn(),D=new XDomainRequest,ce=b[Sn];D.onload=function(){var y=Gu(D),U=s&&s.xdrOnComplete;U&&pe(U)?U(D,E,b):A(E,200,{},y)},D.onerror=function(){A(E,400,{},o?wn:My(D))},D.ontimeout=function(){A(E,500,{})},D.onprogress=function(){};var me=M&&M.location&&M.location.protocol||"",oe=b[Gs];if(!oe){R(E);return}if(!o&&oe.lastIndexOf(me,0)!==0){var V="Cannot send XDomain request. The endpoint URL protocol doesn't match the hosting page protocol.";J(i,2,40,". "+V),x(V,E);return}var C=o?oe:oe[to](/^(https?:)/,"");D.open(Xf,C),b[zo]&&(D[zo]=b[zo]),D.send(ce),o&&B?g&&g.set(function(){D.send(ce)},0):D.send(ce)}function se(){e=0,r=!1,n=!1,i=null,o=null,s=null,a=null,c=null,u=null,l=!1,f=!1,m=!1,d=!1,h=!1,g=null}})}return t.__ieDyn=1,t})(),ob="on",bv="attachEvent",_v="addEventListener",Cv="detachEvent",wv="removeEventListener",sh="events",ah="visibilitychange",Bl="pagehide",sb="unload",ab="beforeunload",cb=bn("aiEvtPageHide");bn("aiEvtPageShow");var $I=/\.[\.]+/g,OI=/[\.]+$/,FI=1,ol=qy("events"),jI=/^([^.]*)(?:\.(.+)|)/;function Sv(t){return t&&t[to]?t[to](/^[\s\.]+|(?=[\s\.])[\.\s]+$/g,Re):t}function Bp(t,e){if(e){var n=Re;Ce(e)?(n=Re,ee(e,function(i){i=Sv(i),i&&(i[0]!=="."&&(i="."+i),n+=i)})):n=Sv(e),n&&(n[0]!=="."&&(n="."+n),t=(t||Re)+n)}var r=jI.exec(t||Re)||[];return{type:r[1],ns:(r[2]||Re).replace($I,".").replace(OI,Re)[mo](".").sort().join(".")}}function ub(t,e,n){n===void 0&&(n=!0);var r=ol.get(t,sh,{},n),i=r[e];return i||(i=r[e]=[]),i}function lb(t,e,n,r){t&&e&&e[oi]&&(t[wv]?t[wv](e[oi],n,r):t[Cv]&&t[Cv](ob+e[oi],n))}function LI(t,e,n,r){var i=!1;return t&&e&&e[oi]&&n&&(t[_v]?(t[_v](e[oi],n,r),i=!0):t[bv]&&(t[bv](ob+e[oi],n),i=!0)),i}function Iv(t,e,n,r){for(var i=e[he];i--;){var o=e[i];o&&(!n.ns||n.ns===o[jg].ns)&&(!r||r(o))&&(lb(t,o[jg],o.handler,o.capture),e[Co](i,1))}}function WI(t,e,n){if(e[oi])Iv(t,ub(t,e[oi]),e,n);else{var r=ol.get(t,sh,{});De(r,function(i,o){Iv(t,o,e,n)}),wr(r)[he]===0&&ol.kill(t,sh)}}function gi(t,e){var n;return e?(Ce(e)?n=[t].concat(e):n=[t,e],n=Bp("xx",n).ns[mo](".")):n=t,n}function Ir(t,e,n,r,i){i===void 0&&(i=!1);var o=!1;if(t)try{var s=Bp(e,r);if(o=LI(t,s,n,i),o&&ol.accept(t)){var a={guid:FI++,evtName:s,handler:n,capture:i};ub(t,s.type)[Ee](a)}}catch{}return o}function Ss(t,e,n,r,i){if(i===void 0&&(i=!1),t)try{var o=Bp(e,r),s=!1;WI(t,o,function(a){return o.ns&&!n||a.handler===n?(s=!0,!0):!1}),s||lb(t,o,n,i)}catch{}}function VI(t,e,n){var r=!1,i=cn();i&&(r=Ir(i,t,e,n),r=Ir(i.body,t,e,n)||r);var o=kt();return o&&(r=Ir(o,t,e,n)||r),r}function qI(t,e,n){var r=cn();r&&(Ss(r,t,e,n),Ss(r.body,t,e,n));var i=kt();i&&Ss(i,t,e,n)}function sl(t,e,n,r){var i=!1;return e&&t&&t[he]>0&&ee(t,function(o){o&&(!n||At(n,o)===-1)&&(i=VI(o,e,r)||i)}),i}function HI(t,e,n,r){var i=!1;return e&&t&&Ce(t)&&(i=sl(t,e,n,r),!i&&n&&n[he]>0&&(i=sl(t,e,null,r))),i}function ch(t,e,n){t&&Ce(t)&&ee(t,function(r){r&&qI(r,e,n)})}function BI(t,e,n){return HI([ab,sb,Bl],t,e,n)}function KI(t,e){ch([ab,sb,Bl],t,e)}function uh(t,e,n){function r(s){var a=kt();t&&a&&a.visibilityState==="hidden"&&t(s)}var i=gi(cb,n),o=sl([Bl],t,e,i);return(!e||At(e,ah)===-1)&&(o=sl([ah],r,e,i)||o),!o&&e&&(o=uh(t,null,n)),o}function XI(t,e){var n=gi(cb,e);ch([Bl],t,n),ch([ah],null,n)}var kv="_aiHooks",Tv=["req","rsp","hkErr","fnErr"];function Kp(t,e){if(t)for(var n=0;n<t[he]&&!e(t[n],n);n++);}function Gf(t,e,n,r,i){i>=0&&i<=2&&Kp(t,function(o,s){var a=o.cbks,c=a[Tv[i]];if(c){e.ctx=function(){var f=r[s]=r[s]||{};return f};try{c[ho](e.inst,n)}catch(f){var u=e.err;try{var l=a[Tv[2]];l&&(e.err=f,l[ho](e.inst,n))}catch{}finally{e.err=u}}}})}function GI(t){return function(){var e=this,n=arguments,r=t.h,i={name:t.n,inst:e,ctx:null,set:c},o=[],s=a([i],n);i.evt=nt("event");function a(l,f){return Kp(f,function(m){l[Ee](m)}),l}function c(l,f){n=a([],n),n[l]=f,s=a([i],n)}Gf(r,i,s,o,0);var u=t.f;if(u)try{i.rslt=u[ho](e,n)}catch(l){throw i.err=l,Gf(r,i,s,o,3),l}return Gf(r,i,s,o,1),i.rslt}}function Xp(t,e,n,r){var i=null;return t&&(mn(t,e)?i=t:n&&(i=Xp(tS(t),e,r,!1))),i}function JI(t,e,n){return t?lh(t[Kn],e,n,!1):null}function fb(t,e,n,r){var i=n&&n[kv];if(!i){i={i:0,n:e,f:n,h:[]};var o=GI(i);o[kv]=i,t[e]=o}var s={id:i.i,cbks:r,rm:function(){var a=this.id;Kp(i.h,function(c,u){if(c.id===a)return i.h[Co](u,1),1})}};return i.i++,i.h[Ee](s),s}function lh(t,e,n,r,i){if(r===void 0&&(r=!0),t&&e&&n){var o=Xp(t,e,r,i);if(o){var s=o[e];if(typeof s===Hm)return fb(o,e,s,n)}}return null}function Fc(t,e,n,r,i){if(t&&e&&n){var o=Xp(t,e,r,i)||t;if(o)return fb(o,e,o[e],n)}return null}var Vi="Microsoft_ApplicationInsights_BypassAjaxInstrumentation",db="sampleRate",Jf="ProcessLegacy",Ev="http.method",Gp="https://dc.services.visualstudio.com",Is="/v2/track",er="not_specified",Qf="iKey",Fe=Nw({requestContextHeader:[0,"Request-Context"],requestContextTargetKey:[1,"appId"],requestContextAppIdFormat:[2,"appId=cid-v1:"],requestIdHeader:[3,"Request-Id"],traceParentHeader:[4,"traceparent"],traceStateHeader:[5,"tracestate"],sdkContextHeader:[6,"Sdk-Context"],sdkContextHeaderAppIdRequest:[7,"appId"],requestContextHeaderLowerCase:[8,"request-context"]}),$s="split",be="length",nc="toLowerCase",bi="ingestionendpoint",rc="toString",Jp="removeItem",_c="message",Jo="count",Zf="preTriggerDate",Yf="getUTCDate",al="stringify",ed="pathname",ic="match",xv="correlationHeaderExcludePatterns",tr="name",Bn="properties",kr="measurements",lu="sizeInBytes",fu="typeName",Zs="exceptions",_a="severityLevel",td="problemGroup",ks="parsedStack",cl="hasFullStack",ul="assembly",Tr="fileName",Os="line",Kl="aiDataContract",ll="duration";function hb(t,e,n){var r=e[be],i=QI(t,e);if(i[be]!==r){for(var o=0,s=i;n[s]!==void 0;)o++,s=Bt(i,0,147)+ek(o);i=s}return i}function QI(t,e){var n;return e&&(e=Ve($t(e)),e[be]>150&&(n=Bt(e,0,150),J(t,2,57,"name is too long. It has been truncated to 150 characters.",{name:e},!0))),n||e}function gt(t,e,n){n===void 0&&(n=1024);var r;return e&&(n=n||1024,e=Ve($t(e)),e[be]>n&&(r=Bt(e,0,n),J(t,2,61,"string value is too long. It has been truncated to "+n+" characters.",{value:e},!0))),r||e}function Xl(t,e,n){return de(e)&&(e=mr(e,n)),gb(t,e,2048,66)}function pb(t,e){var n;return e&&e[be]>32768&&(n=Bt(e,0,32768),J(t,2,56,"message is too long, it has been truncated to 32768 characters.",{message:e},!0)),n||e}function ZI(t,e){var n;if(e){var r=""+e;r[be]>32768&&(n=Bt(r,0,32768),J(t,2,52,"exception is too long, it has been truncated to 32768 characters.",{exception:e},!0))}return n||e}function Io(t,e){if(e){var n={};De(e,function(r,i){if(Xt(i)&&yc())try{i=Mn()[al](i)}catch(o){J(t,2,49,"custom property is not valid",{exception:o},!0)}i=gt(t,i,8192),r=hb(t,r,n),n[r]=i}),e=n}return e}function ko(t,e){if(e){var n={};De(e,function(r,i){r=hb(t,r,n),n[r]=i}),e=n}return e}function YI(t,e){return e&&gb(t,e,128,69)[rc]()}function gb(t,e,n,r){var i;return e&&(e=Ve($t(e)),e[be]>n&&(i=Bt(e,0,n),J(t,2,r,"input is too long, it has been truncated to "+n+" characters.",{data:e},!0))),i||e}function ek(t){var e="00"+t;return Jr(e,e[be]-3)}var Pv=kt()||{},Dv=0,tk=[null,null,null,null,null];function Qp(t){var e=Dv,n=tk,r=n[e];return Pv.createElement?n[e]||(r=n[e]=Pv.createElement("a")):r={host:ik(t)},r.href=t,e++,e>=n[be]&&(e=0),Dv=e,r}function nk(t){var e,n=Qp(t);return n&&(e=n.href),e}function rk(t,e){return t?t.toUpperCase()+" "+e:e}function ik(t,e){var n=vb(t)||"";if(n){var r=n[ic](/(www\d{0,5}\.)?([^\/:]{1,256})(:\d{1,20})?/i);if(r!=null&&r[be]>3&&de(r[2])&&r[2][be]>0)return r[2]+(r[3]||"")}return n}function vb(t,e){var n=null;if(t){var r=t[ic](/(\w{1,150}):\/\/([^\/:]{1,256})(:\d{1,20})?/i);if(r!=null&&r[be]>2&&de(r[2])&&r[2][be]>0&&(n=r[2]||"",r[be]>2)){var i=(r[1]||"")[nc](),o=r[3]||"";(i==="http"&&o===":80"||i==="https"&&o===":443")&&(o=""),n+=o}}return n}var ok=[Gp+Is,"https://breeze.aimon.applicationinsights.io"+Is,"https://dc-int.services.visualstudio.com"+Is],sk="cid-v1:";function fh(t){return At(ok,t[nc]())!==-1}function Rv(t,e,n){if(!e||t&&t.disableCorrelationHeaders)return!1;if(t&&t[xv]){for(var r=0;r<t.correlationHeaderExcludePatterns[be];r++)if(t[xv][r].test(e))return!1}var i=Qp(e).host[nc]();if(i&&(at(i,":443")!==-1||at(i,":80")!==-1)&&(i=(vb(e)||"")[nc]()),(!t||!t.enableCorsCorrelation)&&i&&i!==n)return!1;var o=t&&t.correlationHeaderDomains;if(o){var s;if(ee(o,function(u){var l=new RegExp(u.toLowerCase().replace(/\\/g,"\\\\").replace(/\./g,"\\.").replace(/\*/g,".*"));s=s||l.test(i)}),!s)return!1}var a=t&&t.correlationHeaderExcludedDomains;if(!a||a[be]===0)return!0;for(var r=0;r<a[be];r++){var c=new RegExp(a[r].toLowerCase().replace(/\\/g,"\\\\").replace(/\./g,"\\.").replace(/\*/g,".*"));if(c.test(i))return!1}return i&&i[be]>0}function Av(t){if(t){var e=ak(t,Fe[1]);if(e&&e!==sk)return e}}function ak(t,e){if(t)for(var n=t[$s](","),r=0;r<n[be];++r){var i=n[r][$s]("=");if(i[be]===2&&i[0]===e)return i[1]}}function ck(t,e,n,r){var i,o=r,s=r;if(e&&e[be]>0){var a=Qp(e);if(i=a.host,!o)if(a[ed]!=null){var c=a.pathname[be]===0?"/":a[ed];c.charAt(0)!=="/"&&(c="/"+c),s=a[ed],o=gt(t,n?n+" "+c:c)}else o=gt(t,e)}else i=r,o=r;return{target:i,name:o,data:s}}function jc(){var t=Dr();if(t&&t.now&&t.timing){var e=t.now()+t.timing.navigationStart;if(e>0)return e}return An()}function qt(t,e){var n=null;return t!==0&&e!==0&&!K(t)&&!K(e)&&(n=e-t),n}function Zp(t,e){var n=t||{};return{getName:function(){return n[tr]},setName:function(r){e&&e.setName(r),n[tr]=r},getTraceId:function(){return n.traceID},setTraceId:function(r){e&&e.setTraceId(r),Wp(r)&&(n.traceID=r)},getSpanId:function(){return n.parentID},setSpanId:function(r){e&&e.setSpanId(r),Vp(r)&&(n.parentID=r)},getTraceFlags:function(){return n.traceFlags},setTraceFlags:function(r){e&&e.setTraceFlags(r),n.traceFlags=r}}}var Cc=Mp({LocalStorage:0,SessionStorage:1}),ai=void 0,ci=void 0,mb="";function Yp(){return Jl()?Gl(Cc.LocalStorage):null}function Gl(t){try{if(K(vn()))return null;var e=new Date()[rc](),n=nt(t===Cc.LocalStorage?"localStorage":"sessionStorage"),r=mb+e;n.setItem(r,e);var i=n.getItem(r)!==e;if(n[Jp](r),!i)return n}catch{}return null}function eg(){return oc()?Gl(Cc.SessionStorage):null}function uk(){ai=!1,ci=!1}function tg(t){mb=t||""}function lk(){ai=Jl(!0),ci=oc(!0)}function Jl(t){return(t||ai===void 0)&&(ai=!!Gl(Cc.LocalStorage)),ai}function yb(t,e){var n=Yp();if(n!==null)try{return n.getItem(e)}catch(r){ai=!1,J(t,2,1,"Browser failed read of local storage. "+$e(r),{exception:te(r)})}return null}function bb(t,e,n){var r=Yp();if(r!==null)try{return r.setItem(e,n),!0}catch(i){ai=!1,J(t,2,3,"Browser failed write to local storage. "+$e(i),{exception:te(i)})}return!1}function fk(t,e){var n=Yp();if(n!==null)try{return n[Jp](e),!0}catch(r){ai=!1,J(t,2,5,"Browser failed removal of local storage item. "+$e(r),{exception:te(r)})}return!1}function oc(t){return(t||ci===void 0)&&(ci=!!Gl(Cc.SessionStorage)),ci}function dh(t,e){var n=eg();if(n!==null)try{return n.getItem(e)}catch(r){ci=!1,J(t,2,2,"Browser failed read of session storage. "+$e(r),{exception:te(r)})}return null}function _b(t,e,n){var r=eg();if(r!==null)try{return r.setItem(e,n),!0}catch(i){ci=!1,J(t,2,4,"Browser failed write to session storage. "+$e(i),{exception:te(i)})}return!1}function Cb(t,e){var n=eg();if(n!==null)try{return n[Jp](e),!0}catch(r){ci=!1,J(t,2,6,"Browser failed removal of session storage item. "+$e(r),{exception:te(r)})}return!1}var dk="appInsightsThrottle",hk=(function(){function t(e,n){var r=this,i,o,s,a,c,u,l,f=!1,m=!1;h(),r._getDbgPlgTargets=function(){return[l]},r.getConfig=function(){return s},r.canThrottle=function(b){var E=H(b),B=g(b);return _(B,i,E)},r.isTriggered=function(b){return ne(b)},r.isReady=function(){return f},r.flush=function(b){try{var E=se(b);if(E&&E[be]>0){var B=E.slice(0);return l[b]=[],ee(B,function(M){d(M.msgID,M[_c],M.severity,!1)}),!0}}catch{}return!1},r.flushAll=function(){try{if(l){var b=!0;return De(l,function(E){var B=r.flush(parseInt(E));b=b&&B}),b}}catch{}return!1},r.onReadyState=function(b,E){return E===void 0&&(E=!0),f=K(b)?!0:b,f&&E?r.flushAll():null},r.sendMessage=function(b,E,B){return d(b,E,B,!0)};function d(b,E,B,M){if(f){var D=O(b);if(!D)return;var ce=g(b),me=H(b),oe=_(ce,i,me),V=!1,C=0,y=ne(b);try{oe&&!y?(C=ry(ce.limit.maxSendNumber,me[Jo]+1),me[Jo]=0,V=!0,c[b]=!0,me[Zf]=new Date):(c[b]=oe,me[Jo]+=1);var U=P(b);A(o,U,me);for(var G=0;G<C;G++)L(b,o,E,B)}catch{}return{isThrottled:V,throttleNum:C}}else if(M){var Y=se(b);Y.push({msgID:b,message:E,severity:B})}return null}function h(){o=wo(e),c={},a={},l={},s={},p(109),u=no(n)?n:"",e.addUnloadHook(ct(e.config,function(b){var E=b.cfg;i=Jl();var B=E.throttleMgrCfg||{};De(B,function(M,D){p(parseInt(M),D)})}))}function g(b){return s[b]||s[109]}function p(b,E){var B,M;try{var D=E||{},ce={};ce.disabled=!!D.disabled;var me=D.interval||{};m=(me==null?void 0:me.daysOfMonth)&&(me==null?void 0:me.daysOfMonth[be])>0,ce.interval=v(me);var oe={samplingRate:((B=D.limit)===null||B===void 0?void 0:B.samplingRate)||100,maxSendNumber:((M=D.limit)===null||M===void 0?void 0:M.maxSendNumber)||1};ce.limit=oe,s[b]=ce}catch{}}function v(b){b=b||{};var E=b==null?void 0:b.monthInterval,B=b==null?void 0:b.dayInterval;return K(E)&&K(B)&&(b.monthInterval=3,m||(b.daysOfMonth=[28],m=!0)),b={monthInterval:b==null?void 0:b.monthInterval,dayInterval:b==null?void 0:b.dayInterval,daysOfMonth:b==null?void 0:b.daysOfMonth},b}function _(b,E,B){if(b&&!b.disabled&&E&&no(B)){var M=q(),D=B.date,ce=b.interval,me=1;if(ce!=null&&ce.monthInterval){var oe=(M.getUTCFullYear()-D.getUTCFullYear())*12+M.getUTCMonth()-D.getUTCMonth();me=I(ce.monthInterval,0,oe)}var V=1;if(m)V=At(ce.daysOfMonth,M[Yf]());else if(ce!=null&&ce.dayInterval){var C=an((M.getTime()-D.getTime())/864e5);V=I(ce.dayInterval,0,C)}return me>=0&&V>=0}return!1}function P(b,E){var B=no(E)?E:"";return b?dk+B+"-"+b:null}function x(b){try{if(b){var E=new Date;return b.getUTCFullYear()===E.getUTCFullYear()&&b.getUTCMonth()===E.getUTCMonth()&&b[Yf]()===E[Yf]()}}catch{}return!1}function R(b,E,B){try{var M={date:q(),count:0};if(b){var D=JSON.parse(b),ce={date:q(D.date)||M.date,count:D[Jo]||M[Jo],preTriggerDate:D.preTriggerDate?q(D[Zf]):void 0};return ce}else return A(E,B,M),M}catch{}return null}function q(b){try{if(b){var E=new Date(b);if(!isNaN(E.getDate()))return E}else return new Date}catch{}return null}function A(b,E,B){try{return bb(b,E,Ve(JSON[al](B)))}catch{}return!1}function I(b,E,B){return b<=0?1:B>=E&&(B-E)%b==0?an((B-E)/b)+1:-1}function L(b,E,B,M){J(E,M||1,b,B)}function O(b){try{var E=g(b);return PS(1e6)<=E.limit.samplingRate}catch{}return!1}function H(b){try{var E=a[b];if(!E){var B=P(b,u);E=R(yb(o,B),o,B),a[b]=E}return a[b]}catch{}return null}function ne(b){var E=c[b];if(K(E)){E=!1;var B=H(b);B&&(E=x(B[Zf])),c[b]=E}return c[b]}function se(b){return l=l||{},K(l[b])&&(l[b]=[]),l[b]}}return t})(),pk=";",gk="=";function wb(t){if(!t)return{};var e=t[$s](pk),n=iw(e,function(i,o){var s=o[$s](gk);if(s[be]===2){var a=s[0][nc](),c=s[1];i[a]=c}return i},{});if(wr(n)[be]>0){if(n.endpointsuffix){var r=n.location?n.location+".":"";n[bi]=n[bi]||"https://"+r+"dc."+n.endpointsuffix}n[bi]=n[bi]||Gp,yy(n[bi],"/")&&(n[bi]=n[bi].slice(0,-1))}return n}var vk=(function(){function t(e,n,r){var i=this,o=this;o.ver=1,o.sampleRate=100,o.tags={},o[tr]=gt(e,r)||er,o.data=n,o.time=Ns(new Date),o[Kl]={time:1,iKey:1,name:1,sampleRate:function(){return i.sampleRate===100?4:1},tags:1,data:1}}return t})(),yr=(function(){function t(e,n,r,i){this.aiDataContract={ver:1,name:1,properties:0,measurements:0};var o=this;o.ver=2,o[tr]=gt(e,n)||er,o[Bn]=Io(e,r),o[kr]=ko(e,i)}return t.envelopeType="Microsoft.ApplicationInsights.{0}.Event",t.dataType="EventData",t})(),mk=58,yk=/^\s{0,50}(from\s|at\s|Line\s{1,5}\d{1,10}\s{1,5}of|\w{1,50}@\w{1,80}|[^\(\s\n]+:[0-9\?]+(?::[0-9\?]+)?)/,bk=/^(?:\s{0,50}at)?\s{0,50}([^\@\()\s]+)?\s{0,50}(?:\s|\@|\()\s{0,5}([^\(\s\n\]]+):([0-9\?]+):([0-9\?]+)\)?$/,_k=/^(?:\s{0,50}at)?\s{0,50}([^\@\()\s]+)?\s{0,50}(?:\s|\@|\()\s{0,5}([^\(\s\n\]]+):([0-9\?]+)\)?$/,Ck=/^(?:\s{0,50}at)?\s{0,50}([^\@\()\s]+)?\s{0,50}(?:\s|\@|\()\s{0,5}([^\(\s\n\)\]]+)\)?$/,wk=/(?:^|\(|\s{0,10}[\w\)]+\@)?([^\(\n\s\]\)]+)(?:\:([0-9]+)(?:\:([0-9]+))?)?\)?(?:,|$)/,Sk=/([^\(\s\n]+):([0-9]+):([0-9]+)$/,Ik=/([^\(\s\n]+):([0-9]+)$/,Mv="<no_method>",Ts="error",pn="stack",hh="stackDetails",zv="errorSrc",ph="message",Sb="description",Uv=[{re:bk,len:5,m:1,fn:2,ln:3,col:4},{chk:Tk,pre:kk,re:_k,len:4,m:1,fn:2,ln:3},{re:Ck,len:3,m:1,fn:2,hdl:$v},{re:wk,len:2,fn:1,hdl:$v}];function kk(t){return t.replace(/(\(anonymous\))/,"<anonymous>")}function Tk(t){return at(t,"[native")<0}function gh(t,e){var n=t;return n&&!de(n)&&(JSON&&JSON[al]?(n=JSON[al](t),e&&(!n||n==="{}")&&(pe(t[rc])?n=t[rc]():n=""+t)):n=""+t+" - (Missing JSON.stringify)"),n||""}function Ib(t,e){var n=t;return t&&(n&&!de(n)&&(n=t[ph]||t[Sb]||n),n&&!de(n)&&(n=gh(n,!0)),t.filename&&(n=n+" @"+(t.filename||"")+":"+(t.lineno||"?")+":"+(t.colno||"?"))),e&&e!=="String"&&e!=="Object"&&e!=="Error"&&at(n||"",e)===-1&&(n=e+": "+n),n||""}function Ek(t){try{if(Xt(t))return"hasFullStack"in t&&"typeName"in t}catch{}return!1}function xk(t){try{if(Xt(t))return"ver"in t&&"exceptions"in t&&"properties"in t}catch{}return!1}function Nv(t){return t&&t.src&&de(t.src)&&t.obj&&Ce(t.obj)}function _i(t){var e=t||"";de(e)||(de(e[pn])?e=e[pn]:e=""+e);var n=e[$s](`
|
|
8
|
-
`);return{src:e,obj:n}}function Pk(t){for(var e=[],n=t[$s](`
|
|
9
|
-
`),r=0;r<n[be];r++){var i=n[r];n[r+1]&&(i+="@"+n[r+1],r++),e.push(i)}return{src:t,obj:e}}function kb(t){var e=null;if(t)try{if(t[pn])e=_i(t[pn]);else if(t[Ts]&&t[Ts][pn])e=_i(t[Ts][pn]);else if(t.exception&&t.exception[pn])e=_i(t.exception[pn]);else if(Nv(t))e=t;else if(Nv(t[hh]))e=t[hh];else if(cn()&&cn().opera&&t[ph])e=Pk(t[_c]);else if(t.reason&&t.reason[pn])e=_i(t.reason[pn]);else if(de(t))e=_i(t);else{var n=t[ph]||t[Sb]||"";de(t[zv])&&(n&&(n+=`
|
|
10
|
-
`),n+=" from "+t[zv]),n&&(e=_i(n))}}catch(r){e=_i(r)}return e||{src:"",obj:null}}function Dk(t){var e="";return t&&(t.obj?e=t.obj.join(`
|
|
11
|
-
`):e=t.src||""),e}function Rk(t){var e,n=t.obj;if(n&&n[be]>0){e=[];var r=0,i=!1,o=0;ee(n,function(g){if(i||Uk(g)){var p=$t(g);i=!0;var v=Nk(p,r);v&&(o+=v[lu],e.push(v),r++)}});var s=32*1024;if(o>s)for(var a=0,c=e[be]-1,u=0,l=a,f=c;a<c;){var m=e[a][lu],d=e[c][lu];if(u+=m+d,u>s){var h=f-l+1;e.splice(l,h);break}l=a,f=c,a++,c--}}return e}function fl(t){var e="";if(t&&(e=t.typeName||t[tr]||"",!e))try{var n=/function (.{1,200})\(/,r=n.exec(t.constructor[rc]());e=r&&r[be]>1?r[1]:""}catch{}return e}function nd(t){if(t)try{if(!de(t)){var e=fl(t),n=gh(t,!1);return(!n||n==="{}")&&(t[Ts]&&(t=t[Ts],e=fl(t)),n=gh(t,!0)),at(n,e)!==0&&e!=="String"?e+":"+n:n}}catch{}return""+(t||"")}var Ht=(function(){function t(e,n,r,i,o,s){this.aiDataContract={ver:1,exceptions:1,severityLevel:0,properties:0,measurements:0};var a=this;a.ver=2,xk(n)?(a[Zs]=n[Zs]||[],a[Bn]=n[Bn],a[kr]=n[kr],n[_a]&&(a[_a]=n[_a]),n.id&&(a.id=n.id,n[Bn].id=n.id),n[td]&&(a[td]=n[td]),K(n.isManual)||(a.isManual=n.isManual)):(r||(r={}),s&&(r.id=s),a[Zs]=[Tb(e,n,r)],a[Bn]=Io(e,r),a[kr]=ko(e,i),o&&(a[_a]=o),s&&(a.id=s))}return t.CreateAutoException=function(e,n,r,i,o,s,a,c){var u=fl(o||s||e);return{message:Ib(e,u),url:n,lineNumber:r,columnNumber:i,error:nd(o||s||e),evt:nd(s||e),typeName:u,stackDetails:kb(a||o||s),errorSrc:c}},t.CreateFromInterface=function(e,n,r,i){var o=n[Zs]&&Ha(n[Zs],function(a){return zk(e,a)}),s=new t(e,Ft(Ft({},n),{exceptions:o}),r,i);return s},t.prototype.toInterface=function(){var e=this,n=e.exceptions,r=e.properties,i=e.measurements,o=e.severityLevel,s=e.problemGroup,a=e.id,c=e.isManual,u=n instanceof Array&&Ha(n,function(l){return l.toInterface()})||void 0;return{ver:"4.0",exceptions:u,severityLevel:o,properties:r,measurements:i,problemGroup:s,id:a,isManual:c}},t.CreateSimpleException=function(e,n,r,i,o,s){var a;return{exceptions:[(a={},a[cl]=!0,a.message=e,a.stack=o,a.typeName=n,a)]}},t.envelopeType="Microsoft.ApplicationInsights.{0}.Exception",t.dataType="ExceptionData",t.formatError=nd,t})(),Ak=Rn({id:0,outerId:0,typeName:1,message:1,hasFullStack:0,stack:0,parsedStack:2});function Mk(){var t=this,e=Ce(t[ks])&&Ha(t[ks],function(r){return Ok(r)}),n={id:t.id,outerId:t.outerId,typeName:t[fu],message:t[_c],hasFullStack:t[cl],stack:t[pn],parsedStack:e||void 0};return n}function Tb(t,e,n){var r,i,o,s,a,c,u,l;if(Ek(e))s=e[fu],a=e[_c],u=e[pn],l=e[ks]||[],c=e[cl];else{var f=e,m=f&&f.evt;Cp(f)||(f=f[Ts]||m||f),s=gt(t,fl(f))||er,a=pb(t,Ib(e||f,s))||er;var d=e[hh]||kb(e);l=Rk(d),Ce(l)&&Ha(l,function(h){h[ul]=gt(t,h[ul]),h[Tr]=gt(t,h[Tr])}),u=ZI(t,Dk(d)),c=Ce(l)&&l[be]>0,n&&(n[fu]=n[fu]||s)}return r={},r[Kl]=Ak,r.id=i,r.outerId=o,r.typeName=s,r.message=a,r[cl]=c,r.stack=u,r.parsedStack=l,r.toInterface=Mk,r}function zk(t,e){var n=Ce(e[ks])&&Ha(e[ks],function(i){return $k(i)})||e[ks],r=Tb(t,Ft(Ft({},e),{parsedStack:n}));return r}function Eb(t,e){var n=e[ic](Sk);if(n&&n[be]>=4)t[Tr]=n[1],t[Os]=parseInt(n[2]);else{var r=e[ic](Ik);r&&r[be]>=3?(t[Tr]=r[1],t[Os]=parseInt(r[2])):t[Tr]=e}}function $v(t,e,n){var r=t[Tr];e.fn&&n&&n[be]>e.fn&&(e.ln&&n[be]>e.ln?(r=Ve(n[e.fn]||""),t[Os]=parseInt(Ve(n[e.ln]||""))||0):r=Ve(n[e.fn]||"")),r&&Eb(t,r)}function Uk(t){var e=!1;if(t&&de(t)){var n=Ve(t);n&&(e=yk.test(n))}return e}var xb=Rn({level:1,method:1,assembly:0,fileName:0,line:0});function Nk(t,e){var n,r;if(t&&de(t)&&Ve(t)){r=(n={},n[Kl]=xb,n.level=e,n.assembly=Ve(t),n.method=Mv,n.fileName="",n.line=0,n.sizeInBytes=0,n);for(var i=0;i<Uv[be];){var o=Uv[i];if(o.chk&&!o.chk(t))break;o.pre&&(t=o.pre(t));var s=t[ic](o.re);if(s&&s[be]>=o.len){o.m&&(r.method=Ve(s[o.m]||Mv)),o.hdl?o.hdl(r,o,s):o.fn&&(o.ln?(r[Tr]=Ve(s[o.fn]||""),r[Os]=parseInt(Ve(s[o.ln]||""))||0):Eb(r,s[o.fn]||""));break}i++}}return Pb(r)}function $k(t){var e,n=(e={},e[Kl]=xb,e.level=t.level,e.method=t.method,e.assembly=t[ul],e.fileName=t[Tr],e.line=t[Os],e.sizeInBytes=0,e);return Pb(n)}function Pb(t){var e=mk;return t&&(e+=t.method[be],e+=t.assembly[be],e+=t.fileName[be],e+=t.level.toString()[be],e+=t.line.toString()[be],t[lu]=e),t}function Ok(t){return{level:t.level,method:t.method,assembly:t[ul],fileName:t[Tr],line:t[Os]}}var Fk=(function(){function t(){this.aiDataContract={name:1,kind:0,value:1,count:0,min:0,max:0,stdDev:0},this.kind=0}return t})(),oo=(function(){function t(e,n,r,i,o,s,a,c,u){this.aiDataContract={ver:1,metrics:1,properties:0};var l=this;l.ver=2;var f=new Fk;f[Jo]=i>0?i:void 0,f.max=isNaN(s)||s===null?void 0:s,f.min=isNaN(o)||o===null?void 0:o,f[tr]=gt(e,n)||er,f.value=r,f.stdDev=isNaN(a)||a===null?void 0:a,l.metrics=[f],l[Bn]=Io(e,c),l[kr]=ko(e,u)}return t.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",t.dataType="MetricData",t})(),Ys="";function Zr(t){(isNaN(t)||t<0)&&(t=0),t=my(t);var e=Ys+t%1e3,n=Ys+an(t/1e3)%60,r=Ys+an(t/(1e3*60))%60,i=Ys+an(t/(1e3*60*60))%24,o=an(t/(1e3*60*60*24));return e=e[be]===1?"00"+e:e[be]===2?"0"+e:e,n=n[be]<2?"0"+n:n,r=r[be]<2?"0"+r:r,i=i[be]<2?"0"+i:i,(o>0?o+".":Ys)+i+":"+r+":"+n+"."+e}function jk(t,e,n,r,i){return!i&&de(t)&&(t==="Script error."||t==="Script error")}var ui=(function(){function t(e,n,r,i,o,s,a){this.aiDataContract={ver:1,name:0,url:0,duration:0,properties:0,measurements:0,id:0};var c=this;c.ver=2,c.id=YI(e,a),c.url=Xl(e,r),c[tr]=gt(e,n)||er,isNaN(i)||(c[ll]=Zr(i)),c[Bn]=Io(e,o),c[kr]=ko(e,s)}return t.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",t.dataType="PageviewData",t})(),so=(function(){function t(e,n,r,i,o,s,a,c,u,l,f,m){u===void 0&&(u="Ajax"),this.aiDataContract={id:1,ver:1,name:0,resultCode:0,duration:0,success:0,data:0,target:0,type:0,properties:0,measurements:0,kind:0,value:0,count:0,min:0,max:0,stdDev:0,dependencyKind:0,dependencySource:0,commandName:0,dependencyTypeName:0};var d=this;d.ver=2,d.id=n,d[ll]=Zr(o),d.success=s,d.resultCode=a+"",d.type=gt(e,u);var h=ck(e,r,c,i);d.data=Xl(e,i)||h.data,d.target=gt(e,h.target),l&&(d.target="".concat(d.target," | ").concat(l)),d[tr]=gt(e,h[tr]),d[Bn]=Io(e,f),d[kr]=ko(e,m)}return t.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",t.dataType="RemoteDependencyData",t})(),Es=(function(){function t(e,n,r,i,o){this.aiDataContract={ver:1,message:1,severityLevel:0,properties:0};var s=this;s.ver=2,n=n||er,s[_c]=pb(e,n),s[Bn]=Io(e,i),s[kr]=ko(e,o),r&&(s[_a]=r)}return t.envelopeType="Microsoft.ApplicationInsights.{0}.Message",t.dataType="MessageData",t})(),xs=(function(){function t(e,n,r,i,o,s,a){this.aiDataContract={ver:1,name:0,url:0,duration:0,perfTotal:0,networkConnect:0,sentRequest:0,receivedResponse:0,domProcessing:0,properties:0,measurements:0};var c=this;c.ver=2,c.url=Xl(e,r),c[tr]=gt(e,n)||er,c[Bn]=Io(e,o),c[kr]=ko(e,s),a&&(c.domProcessing=a.domProcessing,c[ll]=a[ll],c.networkConnect=a.networkConnect,c.perfTotal=a.perfTotal,c.receivedResponse=a.receivedResponse,c.sentRequest=a.sentRequest)}return t.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",t.dataType="PageviewPerformanceData",t})(),To=(function(){function t(e,n){this.aiDataContract={baseType:1,baseData:1},this.baseType=e,this.baseData=n}return t})(),sc=Mp({Verbose:0,Information:1,Warning:2,Error:3,Critical:4});function vi(t){var e="ai."+t+".";return function(n){return e+n}}var ea=vi("application"),vt=vi("device"),Lc=vi("location"),$o=vi("operation"),rd=vi("session"),Fr=vi("user"),Ci=vi("cloud"),ta=vi("internal"),Db=(function(t){ir(e,t);function e(){return t.call(this)||this}return e})(rS({applicationVersion:ea("ver"),applicationBuild:ea("build"),applicationTypeId:ea("typeId"),applicationId:ea("applicationId"),applicationLayer:ea("layer"),deviceId:vt("id"),deviceIp:vt("ip"),deviceLanguage:vt("language"),deviceLocale:vt("locale"),deviceModel:vt("model"),deviceFriendlyName:vt("friendlyName"),deviceNetwork:vt("network"),deviceNetworkName:vt("networkName"),deviceOEMName:vt("oemName"),deviceOS:vt("os"),deviceOSVersion:vt("osVersion"),deviceRoleInstance:vt("roleInstance"),deviceRoleName:vt("roleName"),deviceScreenResolution:vt("screenResolution"),deviceType:vt("type"),deviceMachineName:vt("machineName"),deviceVMName:vt("vmName"),deviceBrowser:vt("browser"),deviceBrowserVersion:vt("browserVersion"),locationIp:Lc("ip"),locationCountry:Lc("country"),locationProvince:Lc("province"),locationCity:Lc("city"),operationId:$o("id"),operationName:$o("name"),operationParentId:$o("parentId"),operationRootId:$o("rootId"),operationSyntheticSource:$o("syntheticSource"),operationCorrelationVector:$o("correlationVector"),sessionId:rd("id"),sessionIsFirst:rd("isFirst"),sessionIsNew:rd("isNew"),userAccountAcquisitionDate:Fr("accountAcquisitionDate"),userAccountId:Fr("accountId"),userAgent:Fr("userAgent"),userId:Fr("id"),userStoreRegion:Fr("storeRegion"),userAuthUserId:Fr("authUserId"),userAnonymousUserAcquisitionDate:Fr("anonUserAcquisitionDate"),userAuthenticatedUserAcquisitionDate:Fr("authUserAcquisitionDate"),cloudName:Ci("name"),cloudRole:Ci("role"),cloudRoleVer:Ci("roleVer"),cloudRoleInstance:Ci("roleInstance"),cloudEnvironment:Ci("environment"),cloudLocation:Ci("location"),cloudDeploymentUnit:Ci("deploymentUnit"),internalNodeName:ta("nodeName"),internalSdkVersion:ta("sdkVersion"),internalAgentVersion:ta("agentVersion"),internalSnippet:ta("snippet"),internalSdkSrc:ta("sdkSrc")}));function qr(t,e,n,r,i,o){n=gt(r,n)||er,(K(t)||K(e)||K(n))&&Yt("Input doesn't contain all required fields");var s="";t[Qf]&&(s=t[Qf],delete t[Qf]);var a={name:n,time:Ns(new Date),iKey:s,ext:o||{},tags:[],data:{},baseType:e,baseData:t};return K(i)||De(i,function(c,u){a.data[c]=u}),a}var Zt={UserExt:"user",DeviceExt:"device",TraceExt:"trace",WebExt:"web",AppExt:"app",OSExt:"os"},Xe=new Db;function na(t){var e=null;if(pe(Event))e=new Event(t);else{var n=kt();n&&n.createEvent&&(e=n.createEvent("Event"),e.initEvent(t,!0,!0))}return e}function Ov(t,e){Ss(t,null,null,e)}function Lk(t){var e=kt(),n=rr(),r=!1,i=[],o=1;n&&!K(n.onLine)&&!n.onLine&&(o=2);var s=0,a=m(),c=gi(bn("OfflineListener"),t);try{if(l(cn())&&(r=!0),e){var u=e.body||e;u.ononline&&l(u)&&(r=!0)}}catch{r=!1}function l(P){var x=!1;return P&&(x=Ir(P,"online",g,c),x&&Ir(P,"offline",p,c)),x}function f(){return a}function m(){return!(s===2||o===2)}function d(){var P=m();a!==P&&(a=P,ee(i,function(x){var R={isOnline:a,rState:o,uState:s};try{x(R)}catch{}}))}function h(P){s=P,d()}function g(){o=1,d()}function p(){o=2,d()}function v(){var P=cn();if(P&&r){if(Ov(P,c),e){var x=e.body||e;Ye(x.ononline)||Ov(x,c)}r=!1}}function _(P){return i.push(P),{rm:function(){var x=i.indexOf(P);if(x>-1)return i.splice(x,1)}}}return{isOnline:f,isListening:function(){return r},unload:v,addListener:_,setOnlineState:h}}var Ql="AppInsightsPropertiesPlugin",Rb="AppInsightsChannelPlugin",ng="ApplicationInsightsAnalytics",Wk=Ws({history:{blkVal:!0,v:void 0}}),Vk=(function(t){ir(e,t);function e(){var n=t.call(this)||this;n.priority=185,n.identifier="ReactPlugin";var r,i,o,s,a;return qe(e,n,function(c,u){l(),c.initialize=function(d,h,g,p){t.prototype.initialize.call(n,d,h,g,p),c._addHook(ct(d,function(v){var _,P=c._getTelCtx();if(i=P.getExtCfg(n.identifier,Wk),r=(_=h.getPlugin(ng))===null||_===void 0?void 0:_.plugin,pe(o)&&(o(),o=null),i.history&&(m(i.history),!a)){var x={uri:i.history.location.pathname};c.trackPageView(x),a=!0}}))},c.getCookieMgr=function(){return Hl(c.core)},c.getAppInsights=f,c.processTelemetry=function(d,h){c.processNext(d,h)},c._doTeardown=function(d,h,g){pe(o)&&o(),s&&clearTimeout(s),l()},ls(c,f,["trackMetric","trackPageView","trackEvent","trackException","trackTrace"]);function l(){r=null,i=null,o=null,s=null,a=!1}function f(){return r||J(c.diagLog(),1,64,"Analytics plugin is not available, React plugin telemetry will not be sent: "),r}function m(d){var h=function(g){var p=null;"location"in g?p=g.location:p=g,s=setTimeout(function(){s=null;var v={uri:p.pathname};c.trackPageView(v)},500)};o=d.listen(h)}MC(c,"_extensionConfig",function(){return i})}),n}return e.__ieDyn=1,e})(So),dl="toString",vh="isStorageUseDisabled",Oo="_addHook",Ue="core",jr="dataType",wi="envelopeType",Jt="diagLog",Si="track",du="trackPageView",fn="config",mh="trackPreviousPageVisit",Ni="sendPageViewInternal",id="refUri",Fs="startTime",Ca="properties",Ln="duration",yh="sendPageViewPerformanceInternal",rg="populatePageViewPerformanceEvent",wa="href",Fv="sendExceptionInternal",ra="error",od="lineNumber",sd="columnNumber",ad="CreateAutoException",Wc="addTelemetryInitializer",qk="overridePageViewDuration",cd="autoExceptionInstrumented",Ab="autoTrackPageVisitTime",Mb="isBrowserLinkTrackingEnabled",ac="length",zb="enableAutoRouteTracking",Ub="enableUnhandledPromiseRejectionTracking",bh="autoUnhandledPromiseInstrumented",_h="getEntriesByType",Nb="isPerformanceTimingSupported",$b="getPerformanceTiming",hl="navigationStart",Ch="shouldCollectDuration",Ob="isPerformanceTimingDataReady",Sa="responseStart",Hk="requestStart",hu="loadEventEnd",wh="responseEnd",pu="connectEnd",Bk=(function(){function t(e,n,r,i){qe(t,this,function(o){var s=null,a=[],c=!1,u=!1,l;r&&(l=r.logger);function f(h){r&&r.flush(h,function(){})}function m(){s||(s=yn((function(){s=null;var h=a.slice(0),g=!1;a=[],ee(h,function(p){p()?g=!0:a.push(p)}),a[ac]>0&&m(),g&&f(!0)}),100))}function d(h){a.push(h),m()}o[du]=function(h,g){var p=h.name;if(K(p)||typeof p!="string"){var v=kt();p=h.name=v&&v.title||""}var _=h.uri;if(K(_)||typeof _!="string"){var P=Hn();_=h.uri=P&&P[wa]||""}if(r&&r[fn]&&(_=h.uri=mr(h.uri,r[fn])),!u){var x=Dr(),R=x&&x[_h]&&x[_h]("navigation");if(R&&R[0]&&!Ye(x.timeOrigin)){var q=R[0].loadEventStart;h[Fs]=new Date(x.timeOrigin+q)}else{var A=(g||h[Ca]||{})[Ln]||0;h[Fs]=new Date(new Date().getTime()-A)}u=!0}if(!i[Nb]()){e[Ni](h,g),f(!0),cy()||J(l,2,25,"trackPageView: navigation timing API used for calculation of page duration is not supported in this browser. This page view will be collected without duration and timing info.");return}var I=!1,L,O=i[$b]()[hl];O>0&&(L=qt(O,+new Date),i[Ch](L)||(L=void 0));var H;!K(g)&&!K(g[Ln])&&(H=g[Ln]),(n||!isNaN(H))&&(isNaN(H)&&(g||(g={}),g[Ln]=L),e[Ni](h,g),f(!0),I=!0);var ne=6e4;g||(g={}),d(function(){var se=!1;try{if(i[Ob]()){se=!0;var b={name:p,uri:_};i[rg](b),!b.isValid&&!I?(g[Ln]=L,e[Ni](h,g)):(I||(g[Ln]=b.durationMs,e[Ni](h,g)),c||(e[yh](b,g),c=!0))}else O>0&&qt(O,+new Date)>ne&&(se=!0,I||(g[Ln]=ne,e[Ni](h,g)))}catch(E){J(l,1,38,"trackPageView failed on page load calculation: "+$e(E),{exception:te(E)})}return se})},o.teardown=function(h,g){if(s){s.cancel(),s=null;var p=a.slice(0);a=[],ee(p,function(v){v()})}}})}return t.__ieDyn=1,t})(),Kk=36e5,jv=["googlebot","adsbot-google","apis-google","mediapartners-google"];function Fb(){var t=Dr();return t&&!!t.timing}function Xk(){var t=Dr();return t&&t.getEntriesByType&&t.getEntriesByType("navigation")[ac]>0}function Gk(){var t=Dr(),e=t?t.timing:0;return e&&e.domainLookupStart>0&&e[hl]>0&&e[Sa]>0&&e[Hk]>0&&e[hu]>0&&e[wh]>0&&e[pu]>0&&e.domLoading>0}function Lv(){return Fb()?Dr().timing:null}function Jk(){return Xk()?Dr()[_h]("navigation")[0]:null}function Qk(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=rr()||{},r=n.userAgent,i=!1;if(r)for(var o=0;o<jv[ac];o++)i=i||at(r.toLowerCase(),jv[o])!==-1;if(i)return!1;for(var o=0;o<t[ac];o++)if(t[o]<0||t[o]>=Kk)return!1;return!0}var Zk=(function(){function t(e){var n=wo(e);qe(t,this,function(r){r[rg]=function(i){i.isValid=!1;var o=Jk(),s=Lv(),a=0,c=0,u=0,l=0,f=0;(o||s)&&(o?(a=o[Ln],c=o[Fs]===0?o[pu]:qt(o[Fs],o[pu]),u=qt(o.requestStart,o[Sa]),l=qt(o[Sa],o[wh]),f=qt(o.responseEnd,o[hu])):(a=qt(s[hl],s[hu]),c=qt(s[hl],s[pu]),u=qt(s.requestStart,s[Sa]),l=qt(s[Sa],s[wh]),f=qt(s.responseEnd,s[hu])),a===0?J(n,2,10,"error calculating page view performance.",{total:a,network:c,request:u,response:l,dom:f}):r[Ch](a,c,u,l,f)?a<an(c)+an(u)+an(l)+an(f)?J(n,2,8,"client performance math error.",{total:a,network:c,request:u,response:l,dom:f}):(i.durationMs=a,i.perfTotal=i[Ln]=Zr(a),i.networkConnect=Zr(c),i.sentRequest=Zr(u),i.receivedResponse=Zr(l),i.domProcessing=Zr(f),i.isValid=!0):J(n,2,45,"Invalid page load duration value. Browser perf data won't be sent.",{total:a,network:c,request:u,response:l,dom:f}))},r[$b]=Lv,r[Nb]=Fb,r[Ob]=Gk,r[Ch]=Qk})}return t.__ieDyn=1,t})(),Yk=(function(){function t(e,n){var r="prevPageVisitData";qe(t,this,function(i){i[mh]=function(a,c){try{var u=o(a,c);u&&n(u.pageName,u.pageUrl,u.pageVisitTime)}catch(l){ro(e,"Auto track page visit time failed, metric will not be collected: "+te(l))}};function o(a,c){var u=null;try{if(u=s(),oc()){dh(e,r)!=null&&Yt("Cannot call startPageVisit consecutively without first calling stopPageVisit");var l=Mn().stringify(new eT(a,c));_b(e,r,l)}}catch(f){ro(e,"Call to restart failed: "+te(f)),u=null}return u}function s(){var a=null;try{if(oc()){var c=An(),u=dh(e,r);u&&yc()&&(a=Mn().parse(u),a.pageVisitTime=c-a.pageVisitStartTime,Cb(e,r))}}catch(l){ro(e,"Stop page visit timer failed: "+te(l)),a=null}return a}Ae(i,"_logger",{g:function(){return e}}),Ae(i,"pageVisitTimeTrackingHandler",{g:function(){return n}})})}return t.__ieDyn=1,t})(),eT=(function(){function t(e,n){this.pageVisitStartTime=An(),this.pageName=e,this.pageUrl=n}return t})(),Wv=(function(){function t(e,n){var r=this,i={};r.start=function(o){typeof i[o]<"u"&&J(e,2,62,"start was called more than once for this event without calling stop.",{name:o,key:o},!0),i[o]=+new Date},r.stop=function(o,s,a,c){var u=i[o];if(isNaN(u))J(e,2,63,"stop was called without a corresponding start.",{name:o,key:o},!0);else{var l=+new Date,f=qt(u,l);r.action(o,s,f,a,c)}delete i[o],i[o]=void 0}}return t})(),Mt,tT="event";function ia(t,e){t&&t.dispatchEvent&&e&&t.dispatchEvent(e)}function nT(t){if(t&&t.reason){var e=t.reason;return!de(e)&&pe(e[dl])?e[dl]():te(e)}return t||""}var Vv=6e4,rT=Ws((Mt={sessionRenewalMs:Jg(qv,1800*1e3),sessionExpirationMs:Jg(qv,1440*60*1e3),disableExceptionTracking:dt()},Mt[Ab]=dt(),Mt[qk]=dt(),Mt[Ub]=dt(),Mt[bh]=!1,Mt.samplingPercentage=Yu(iT,100),Mt[vh]=dt(),Mt[Mb]=dt(),Mt[zb]=dt(),Mt.namePrefix=BS(),Mt.enableDebug=dt(),Mt.disableFlushOnBeforeUnload=dt(),Mt.disableFlushOnUnload=dt(!1,"disableFlushOnBeforeUnload"),Mt.expCfg=kn({inclScripts:!1,expLog:void 0,maxLogs:50}),Mt));function qv(t,e){return t=t||e,t<Vv&&(t=Vv),+t}function iT(t){return!isNaN(t)&&t>0&&t<=100}function oT(t){Ye(t[vh])||(t[vh]?uk():lk())}var sT=(function(t){ir(e,t);function e(){var n=t.call(this)||this;n.identifier=ng,n.priority=180,n.autoRoutePVDelay=500;var r,i,o,s,a,c,u,l,f,m,d,h,g,p,v,_,P,x,R,q,A;return qe(e,n,function(I,L){var O=L[Oo];V(),I.getCookieMgr=function(){return Hl(I[Ue])},I.processTelemetry=function(C,y){I.processNext(C,y)},I.trackEvent=function(C,y){try{var U=qr(C,yr[jr],yr[wi],I[Jt](),y);I[Ue][Si](U)}catch(G){oe(2,39,"trackTrace failed, trace will not be collected: "+$e(G),{exception:te(G)})}},I.startTrackEvent=function(C){try{r.start(C)}catch(y){oe(1,29,"startTrackEvent failed, event will not be collected: "+$e(y),{exception:te(y)})}},I.stopTrackEvent=function(C,y,U){try{r.stop(C,void 0,y,U)}catch(G){oe(1,30,"stopTrackEvent failed, event will not be collected: "+$e(G),{exception:te(G)})}},I.trackTrace=function(C,y){try{var U=qr(C,Es[jr],Es[wi],I[Jt](),y);I[Ue][Si](U)}catch(G){oe(2,39,"trackTrace failed, trace will not be collected: "+$e(G),{exception:te(G)})}},I.trackMetric=function(C,y){try{var U=qr(C,oo[jr],oo[wi],I[Jt](),y);I[Ue][Si](U)}catch(G){oe(1,36,"trackMetric failed, metric will not be collected: "+$e(G),{exception:te(G)})}},I[du]=function(C,y){try{var U=C||{};I[Ue]&&I[Ue][fn]&&(U.uri=mr(U.uri,I[Ue][fn])),o[du](U,Ft(Ft(Ft({},U.properties),U.measurements),y)),_&&a[mh](U.name,U.uri)}catch(G){oe(1,37,"trackPageView failed, page view will not be collected: "+$e(G),{exception:te(G)})}},I[Ni]=function(C,y,U){var G=kt();if(G&&(C[id]=C[id]===void 0?G.referrer:C[id]),I[Ue]&&I[Ue][fn]&&(C.refUri=mr(C.refUri,I[Ue][fn])),K(C[Fs])){var Y=(y||C[Ca]||{})[Ln]||0;C[Fs]=new Date(new Date().getTime()-Y)}var _e=qr(C,ui[jr],ui[wi],I[Jt](),y,U);I[Ue][Si](_e),H()},I[yh]=function(C,y,U){var G=qr(C,xs[jr],xs[wi],I[Jt](),y,U);I[Ue][Si](G)},I.trackPageViewPerformance=function(C,y){var U=C||{};try{s[rg](U),I[yh](U,y)}catch(G){oe(1,37,"trackPageViewPerformance failed, page view will not be collected: "+$e(G),{exception:te(G)})}},I.startTrackPage=function(C){try{if(typeof C!="string"){var y=kt();C=y&&y.title||""}i.start(C)}catch(U){oe(1,31,"startTrackPage failed, page view may not be collected: "+$e(U),{exception:te(U)})}},I.stopTrackPage=function(C,y,U,G){try{if(typeof C!="string"){var Y=kt();C=Y&&Y.title||""}if(typeof y!="string"){var _e=Hn();y=_e&&_e[wa]||""}I[Ue]&&I[Ue][fn]&&(y=mr(y,I[Ue][fn])),i.stop(C,y,U,G),_&&a[mh](C,y)}catch(ke){oe(1,32,"stopTrackPage failed, page view will not be collected: "+$e(ke),{exception:te(ke)})}},I[Fv]=function(C,y,U){var G=C&&(C.exception||C[ra])||Cp(C)&&C||{name:C&&typeof C,message:C||er};C=C||{};var Y=new Ht(I[Jt](),G,C[Ca]||y,C.measurements,C.severityLevel,C.id).toInterface(),_e=kt();if(_e&&P!=null&&P.inclScripts){var ke=pI(_e);Y[Ca].exceptionScripts=JSON.stringify(ke)}if(P!=null&&P.expLog){var Te=P.expLog();Te&&Te.logs&&Ce(Te.logs)&&(Y[Ca].exceptionLog=Te.logs.slice(0,P.maxLogs).join(`
|
|
12
|
-
`))}var Ne=qr(Y,Ht[jr],Ht[wi],I[Jt](),y,U);I[Ue][Si](Ne)},I.trackException=function(C,y){C&&!C.exception&&C[ra]&&(C.exception=C[ra]);try{I[Fv](C,y)}catch(U){oe(1,35,"trackException failed, exception will not be collected: "+$e(U),{exception:te(U)})}},I._onerror=function(C){var y=C&&C[ra],U=C&&C.evt;try{if(!U){var G=cn();G&&(U=G[tT])}var Y=C&&C.url||(kt()||{}).URL,_e=C.errorSrc||"window.onerror@"+Y+":"+(C[od]||0)+":"+(C[sd]||0),ke={errorSrc:_e,url:Y,lineNumber:C[od]||0,columnNumber:C[sd]||0,message:C.message};jk(C.message,C.url,C.lineNumber,C.columnNumber,C[ra])?E(Ht[ad]("Script error: The browser's same-origin policy prevents us from getting the details of this exception. Consider using the 'crossorigin' attribute.",Y,C[od]||0,C[sd]||0,y,U,null,_e),ke):(C.errorSrc||(C.errorSrc=_e),I.trackException({exception:C,severityLevel:3},ke))}catch(Ne){var Te=y?y.name+", "+y.message:"null";oe(1,11,"_onError threw exception while logging error, error will not be collected: "+$e(Ne),{exception:te(Ne),errorString:Te})}},I[Wc]=function(C){if(I[Ue])return I[Ue][Wc](C);c||(c=[]),c.push(C)},I.initialize=function(C,y,U,G){if(!I.isInitialized()){K(y)&&Yt("Error initializing"),L.initialize(C,y,U,G);try{q=gi(bn(I.identifier),y.evtNamespace&&y.evtNamespace()),c&&(ee(c,function(Y){y[Wc](Y)}),c=null),ne(C),s=new Zk(I[Ue]),o=new Bk(I,v.overridePageViewDuration,I[Ue],s),a=new Yk(I[Jt](),function(Y,_e,ke){return se(Y,_e,ke)}),r=new Wv(I[Jt](),"trackEvent"),r.action=function(Y,_e,ke,Te,Ne){Te||(Te={}),Ne||(Ne={}),Te.duration=ke[dl](),I.trackEvent({name:Y,properties:Te,measurements:Ne})},i=new Wv(I[Jt](),"trackPageView"),i.action=function(Y,_e,ke,Te,Ne){K(Te)&&(Te={}),Te.duration=ke[dl]();var Et={name:Y,uri:_e,properties:Te,measurements:Ne};I[Ni](Et,Te)},jl()&&(B(),M())}catch(Y){throw I.setInitialized(!1),Y}}},I._doTeardown=function(C,y){o&&o.teardown(C,y),Ss(window,null,null,q),V()},I._getDbgPlgTargets=function(){return[A,h]};function H(){if(I[Ue]){var C=I[Ue].getPlugin("AjaxDependencyPlugin");C&&C.plugin&&C.plugin.resetAjaxAttempts&&C.plugin.resetAjaxAttempts()}}function ne(C){var y=I.identifier,U=I[Ue];I[Oo](ct(C,function(){var G=zn(null,C,U);v=G.getExtCfg(y,rT),h=h||C[cd]||v[cd],P=v.expCfg,_=v[Ab],C.storagePrefix&&tg(C.storagePrefix),oT(v),u=v[Mb],b()}))}function se(C,y,U){var G={PageName:C,PageUrl:y};I.trackMetric({name:"PageVisitTime",average:U,max:U,min:U,sampleCount:1},G)}function b(){if(!l&&u){var C=["/browserLinkSignalR/","/__browserLink/"],y=function(U){if(u&&U.baseType===so[jr]){var G=U.baseData;if(G){for(var Y=0;Y<C[ac];Y++)if(G.target&&at(G.target,C[Y])>=0)return!1}}return!0};I[Oo](I[Wc](y)),l=!0}}function E(C,y){var U=qr(C,Ht[jr],Ht[wi],I[Jt](),y);I[Ue][Si](U)}function B(){var C=cn(),y=Hn();I[Oo](ct(v,function(){d=v.disableExceptionTracking,!d&&!h&&!v[cd]&&(O(Fc(C,"onerror",{ns:q,rsp:function(U,G,Y,_e,ke,Te){!d&&U.rslt!==!0&&I._onerror(Ht[ad](G,Y,_e,ke,Te,U.evt))}},!1)),A++,h=!0)})),me(C,y)}function M(){var C=cn(),y=Hn();I[Oo](ct(v,function(){if(f=v[zb]===!0,C&&f&&!m&&YC()){var U=ay();pe(U.pushState)&&pe(U.replaceState)&&typeof Event!==pp&&ce(C,U,y)}}))}function D(){var C=null;if(I[Ue]&&I[Ue].getTraceCtx&&(C=I[Ue].getTraceCtx(!1)),!C){var y=I[Ue].getPlugin(Ql);if(y){var U=y.plugin.context;U&&(C=Zp(U.telemetryTrace))}}return C}function ce(C,y,U){if(m)return;var G=v.namePrefix||"";function Y(){f&&ia(C,na(G+"locationchange"))}function _e(){if(R&&(x=R),R=U&&U[wa]||"",I[Ue]&&I[Ue][fn]&&(R=mr(R,I[Ue][fn])),f){var ke=D();if(ke){ke.setTraceId(ti());var Te="_unknown_";U&&U.pathname&&(Te=U.pathname+(U.hash||"")),ke.setName(gt(I[Jt](),Te))}yn((function(Ne){I[du]({refUri:Ne,properties:{duration:0}})}).bind(I,x),I.autoRoutePVDelay)}}O(Fc(y,"pushState",{ns:q,rsp:function(){f&&(ia(C,na(G+"pushState")),ia(C,na(G+"locationchange")))}},!0)),O(Fc(y,"replaceState",{ns:q,rsp:function(){f&&(ia(C,na(G+"replaceState")),ia(C,na(G+"locationchange")))}},!0)),Ir(C,G+"popstate",Y,q),Ir(C,G+"locationchange",_e,q),m=!0}function me(C,y){I[Oo](ct(v,function(){g=v[Ub]===!0,h=h||v[bh],g&&!p&&(O(Fc(C,"onunhandledrejection",{ns:q,rsp:function(U,G){g&&U.rslt!==!0&&I._onerror(Ht[ad](nT(G),y?y[wa]:"",0,0,G,U.evt))}},!1)),A++,v[bh]=p=!0)}))}function oe(C,y,U,G,Y){I[Jt]().throwInternal(C,y,U,G,Y)}function V(){r=null,i=null,o=null,s=null,a=null,c=null,u=!1,l=!1,f=!1,m=!1,d=!1,h=!1,g=!1,p=!1,_=!1,H();var C=Hn();x=C&&C[wa]||"",I[Ue]&&I[Ue][fn]&&(x=mr(x,I[Ue][fn])),R=null,q=null,v=null,A=0,Ae(I,"config",{g:function(){return v}})}Ae(I,"_pageViewManager",{g:function(){return o}}),Ae(I,"_pageViewPerformanceManager",{g:function(){return s}}),Ae(I,"_pageVisitTimeManager",{g:function(){return a}}),Ae(I,"_evtNamespace",{g:function(){return"."+q}})}),n}return e.Version="3.3.11",e})(So),gu="featureOptIn",jb="scheduleFetchTimeout";function Lb(t,e,n,r){try{var i=n>r;i&&(t=null);var o=n==0?mw({},t):t;return o&&e&&!i&&De(o,function(s){var a=e[s];a&&(Xt(o[s])&&Xt(a)?o[s]=Lb(o[s],a,++n,r):delete o[s])}),o}catch{}return t}var Ps="featureOptIn.",Wb=".mode",Vb=".onCfg",qb=".offCfg";function aT(t,e,n){var r;if(!e||!e.enabled)return null;var i=(e[gu]||{})[t]||{mode:1},o=i.mode,s=i.onCfg,a=i.offCfg,c=(n||{})[t]||{mode:2},u=c.mode,l=c.onCfg,f=c.offCfg,m=!!c.blockCdnCfg,d=Ps+t+Wb,h=Ps+t+Vb,g=Ps+t+qb,p=u,v=l,_=f;return m||(o===4||o===5?(p=o==4?3:2,v=s||l,_=a||f):o===2||u===2?(p=2,v=l||s,_=f||a):o===3?(p=3,v=l||s,_=f||a):o===1&&u===1&&(p=1)),r={},r[d]=p,r[h]=v,r[g]=_,r}function cT(t,e){try{if(!t||!t.enabled)return null;if(!t[gu])return t.config;var n=t[gu],r=t.config||{};return De(n,function(i){var o=aT(i,t,e.config[gu]);K(o)||(De(o,function(s,a){vy(r,s,a)}),uT(i,o,r))}),r}catch{}return null}function uT(t,e,n){var r=e[Ps+t+Wb],i=e[Ps+t+Vb],o=e[Ps+t+qb],s=null;r===3&&(s=i),r===2&&(s=o),s&&De(s,function(a,c){vy(n,a,c)})}var oa,lT="ai_cfgsync",Hv="GET",fT=18e5,Fo=void 0,dT={instrumentationKey:!0,connectionString:!0,endpointUrl:!0},hT=Ws((oa={syncMode:1,blkCdnCfg:Fo,customEvtName:Fo,cfgUrl:Fo,overrideSyncFn:Fo,overrideFetchFn:Fo,onCfgChangeReceive:Fo},oa[jb]=fT,oa.nonOverrideConfigs=dT,oa.enableAjax=!1,oa)),pT=(function(t){ir(e,t);function e(){var n=t.call(this)||this;n.priority=198,n.identifier="AppInsightsCfgSyncPlugin";var r,i,o,s,a,c,u,l,f,m,d,h,g,p,v,_,P=!1,x;return qe(e,n,function(R,q){A(),R.initialize=function(V,C,y,U){q.initialize(V,C,y,U),s=gi(bn(R.identifier),C.evtNamespace&&C.evtNamespace()),I(V)},R.getCfg=function(){return i},R.pause=function(){P=!0,oe()},R.resume=function(){P=!1,me()},R.setCfg=function(V){return L(V)},R.sync=function(V){return H(V)},R.updateEventListenerName=function(V){return ne(V)},R._doTeardown=function(V,C){O(),oe(),A()},R._getDbgPlgTargets=function(){return[l,u,o,f,g]};function A(){i=null,o=null,s=null,a=null,u=null,l=null,g=null,c=null,m=null,d=null,f=null,x=!1,v=null,_=null,h=null}function I(V){var C=R.identifier,y=R.core;R._addHook(ct(V,function(){var U=zn(null,V,y);r=U.getExtCfg(C,hT);var G=f;f=!!r.blkCdnCfg,x=!!r.enableAjax,!K(G)&&G!==f&&(!f&&a?p&&p(a,B,l):oe()),K(u)&&(u=r.syncMode===2),K(l)&&(l=r.syncMode===1);var Y=r.customEvtName||lT;o!==Y&&(u?ne(Y):(O(),o=Y)),K(a)&&(a=r.cfgUrl),a||(i=V,l&&H())})),_=r.overrideSyncFn,v=r.overrideFetchFn,h=r.onCfgChangeReceive,g=r.nonOverrideConfigs,m=r[jb],p=se(),d=0,a&&!f&&p&&p(a,B,l)}function L(V,C){if(V){if(i=V,C&&!P)return H();if(u&&!P)return R.core.updateCfg(V),!0}return!1}function O(){try{var V=vn();V&&Ss(V,null,null,s)}catch{}}function H(V){try{return _&&pe(_)?_(i,V):IS(o,i,V)}catch{}return!1}function ne(V){try{return O(),V&&(o=V,D()),!0}catch{}return!1}function se(){var V=v;return K(V)&&(Np()?V=b:Vl()&&(V=E)),V}function b(V,C,y){var U=vn(),G=U&&U.fetch||null;if(V&&G&&pe(G))try{var Y={method:Hv};x||(Y[Vi]=!0);var _e=new Request(V,Y);if(!x)try{_e[Vi]=!0}catch{}Kt(fetch(_e),function(ke){var Te=ke.value;ke.rejected?M(C,400):Te.ok?Kt(Te.text(),function(Ne){M(C,Te.status,Ne.value,y)}):M(C,Te.status,null,y)})}catch{}}function E(V,C,y){try{var U=new XMLHttpRequest;x||(U[Vi]=!0),U.open(Hv,V),U.onreadystatechange=function(){U.readyState===XMLHttpRequest.DONE&&M(C,U.status,U.responseText,y)},U.onerror=function(){M(C,400)},U.ontimeout=function(){M(C,400)},U.send()}catch{}}function B(V,C,y){try{if(V>=200&&V<400&&C){d=0;var U=Mn();if(U){var G=U.parse(C),Y=cT(G,R.core),_e=Y&&Ot(Y)&&ce(Y);_e&&L(_e,y)}}else d++;d<3&&me()}catch{}}function M(V,C,y,U){try{V(C,y,U)}catch{}}function D(){if(u){var V=vn();if(V)try{Ir(V,o,function(C){var y=C&&C.detail;if(h&&y)h(y);else{var U=y&&y.cfg,G=U&&Ot(U)&&ce(U);G&&L(G)}},s,!0)}catch{}}}function ce(V,C){var y=null;try{V&&(y=Lb(V,g,0,5))}catch{}return y}function me(){!c&&m&&(c=yn(function(){c=null,p(a,B,l)},m),c.unref())}function oe(){c&&c.cancel(),c=null,d=0}R.processTelemetry=function(V,C){R.processNext(V,C)}}),n}return e.__ieDyn=1,e})(So),xi="duration",St="tags",ud="deviceType",nn="data",Ar="name",cc="traceID",Pe="length",uc="stringify",Eo="measurements",Jn="dataType",xo="envelopeType",Pi="toString",ao="enqueue",co="count",Er="push",Sh="emitLineDelimitedJson",Ds="clear",pl="markAsSent",Oa="clearSent",ig="bufferOverride",sa="BUFFER_KEY",Lr="SENT_BUFFER_KEY",Qo="concat",aa="MAX_BUFFER_SIZE",ca="triggerSend",Pt="diagLog",ld="initialize",ua="_sender",la="endpointUrl",Ia="instrumentationKey",Ih="customHeaders",Hb="maxBatchSizeInBytes",kh="onunloadDisableBeacon",Th="isBeaconApiDisabled",Bb="alwaysUseXhrOverride",Kb="enableSessionStorageBuffer",$n="_buffer",Xb="onunloadDisableFetch",Gb="disableSendBeaconSplit",Vc="getSenderInst",Ii="_onError",fd="_onPartialSuccess",qc="_onSuccess",dd="itemsReceived",hd="itemsAccepted",pd="baseType",gl="sampleRate",gT="getHashCodeScore",gd="baseType",tt="baseData",bt="properties",Bv="true";function ut(t,e,n){return We(t,e,n,Ru)}function vT(t,e,n){var r=n[St]=n[St]||{},i=e.ext=e.ext||{},o=e[St]=e[St]||[],s=i.user;s&&(ut(r,Xe.userAuthUserId,s.authId),ut(r,Xe.userId,s.id||s.localId));var a=i.app;a&&ut(r,Xe.sessionId,a.sesId);var c=i.device;c&&(ut(r,Xe.deviceId,c.id||c.localId),ut(r,Xe[ud],c.deviceClass),ut(r,Xe.deviceIp,c.ip),ut(r,Xe.deviceModel,c.model),ut(r,Xe[ud],c[ud]));var u=e.ext.web;if(u){ut(r,Xe.deviceLanguage,u.browserLang),ut(r,Xe.deviceBrowserVersion,u.browserVer),ut(r,Xe.deviceBrowser,u.browser);var l=n[nn]=n[nn]||{},f=l[tt]=l[tt]||{},m=f[bt]=f[bt]||{};ut(m,"domain",u.domain),ut(m,"isManual",u.isManual?Bv:null),ut(m,"screenRes",u.screenRes),ut(m,"userConsent",u.userConsent?Bv:null)}var d=i.os;d&&(ut(r,Xe.deviceOS,d[Ar]),ut(r,Xe.deviceOSVersion,d.osVer));var h=i.trace;h&&(ut(r,Xe.operationParentId,h.parentID),ut(r,Xe.operationName,gt(t,h[Ar])),ut(r,Xe.operationId,h[cc]));for(var g={},p=o[Pe]-1;p>=0;p--){var v=o[p];De(v,function(P,x){g[P]=x}),o.splice(p,1)}De(o,function(P,x){g[P]=x});var _=Ft(Ft({},r),g);_[Xe.internalSdkVersion]||(_[Xe.internalSdkVersion]=gt(t,"javascript:".concat(mT.Version),64)),n[St]=Ry(_)}function hi(t,e,n){K(t)||De(t,function(r,i){gc(i)?n[r]=i:de(i)?e[r]=i:yc()&&(e[r]=Mn()[uc](i))})}function Po(t,e){K(t)||De(t,function(n,r){t[n]=r||e})}function Do(t,e,n,r){var i=new vk(t,r,e);ut(i,"sampleRate",n[db]),(n[tt]||{}).startTime&&(i.time=Ns(n[tt].startTime)),i.iKey=n.iKey;var o=n.iKey.replace(/-/g,"");return i[Ar]=i[Ar].replace("{0}",o),vT(t,n,i),n[St]=n[St]||[],Ry(i)}function Ro(t,e){K(e[tt])&&J(t,1,46,"telemetryItem.baseData cannot be null.")}var mT={Version:"3.3.11"};function yT(t,e,n){Ro(t,e);var r=e[tt][Eo]||{},i=e[tt][bt]||{};hi(e[nn],i,r),K(n)||Po(i,n);var o=e[tt];if(K(o))return ro(t,"Invalid input for dependency data"),null;var s=o[bt]&&o[bt][Ev]?o[bt][Ev]:"GET",a=new so(t,o.id,o.target,o[Ar],o[xi],o.success,o.responseCode,s,o.type,o.correlationContext,i,r),c=new To(so[Jn],a);return Do(t,so[xo],e,c)}function Jb(t,e,n){Ro(t,e);var r={},i={};e[gd]!==yr[Jn]&&(r.baseTypeSource=e[gd]),e[gd]===yr[Jn]?(r=e[tt][bt]||{},i=e[tt][Eo]||{}):e[tt]&&hi(e[tt],r,i),hi(e[nn],r,i),K(n)||Po(r,n);var o=e[tt][Ar],s=new yr(t,o,r,i),a=new To(yr[Jn],s);return Do(t,yr[xo],e,a)}function bT(t,e,n){Ro(t,e);var r=e[tt][Eo]||{},i=e[tt][bt]||{};hi(e[nn],i,r),K(n)||Po(i,n);var o=e[tt],s=Ht.CreateFromInterface(t,o,i,r),a=new To(Ht[Jn],s);return Do(t,Ht[xo],e,a)}function _T(t,e,n){Ro(t,e);var r=e[tt],i=r[bt]||{},o=r[Eo]||{};hi(e[nn],i,o),K(n)||Po(i,n);var s=new oo(t,r[Ar],r.average,r.sampleCount,r.min,r.max,r.stdDev,i,o),a=new To(oo[Jn],s);return Do(t,oo[xo],e,a)}function CT(t,e,n){Ro(t,e);var r,i=e[tt];!K(i)&&!K(i[bt])&&!K(i[bt][xi])?(r=i[bt][xi],delete i[bt][xi]):!K(e[nn])&&!K(e[nn][xi])&&(r=e[nn][xi],delete e[nn][xi]);var o=e[tt],s;((e.ext||{}).trace||{})[cc]&&(s=e.ext.trace[cc]);var a=o.id||s,c=o[Ar],u=o.uri,l=o[bt]||{},f=o[Eo]||{};if(K(o.refUri)||(l.refUri=o.refUri),K(o.pageType)||(l.pageType=o.pageType),K(o.isLoggedIn)||(l.isLoggedIn=o.isLoggedIn[Pi]()),!K(o[bt])){var m=o[bt];De(m,function(g,p){l[g]=p})}hi(e[nn],l,f),K(n)||Po(l,n);var d=new ui(t,c,u,r,l,f,a),h=new To(ui[Jn],d);return Do(t,ui[xo],e,h)}function wT(t,e,n){Ro(t,e);var r=e[tt],i=r[Ar],o=r.uri||r.url,s=r[bt]||{},a=r[Eo]||{};hi(e[nn],s,a),K(n)||Po(s,n);var c=new xs(t,i,o,void 0,s,a,r),u=new To(xs[Jn],c);return Do(t,xs[xo],e,u)}function ST(t,e,n){Ro(t,e);var r=e[tt].message,i=e[tt].severityLevel,o=e[tt][bt]||{},s=e[tt][Eo]||{};hi(e[nn],o,s),K(n)||Po(o,n);var a=new Es(t,r,i,o,s),c=new To(Es[Jn],a);return Do(t,Es[xo],e,c)}var Qb=(function(){function t(e,n){var r=[],i=!1,o=n.maxRetryCnt;this._get=function(){return r},this._set=function(s){return r=s,r},qe(t,this,function(s){s[ao]=function(a){if(s[co]()>=n.eventsLimitInMem){i||(J(e,2,105,"Maximum in-memory buffer size reached: "+s[co](),!0),i=!0);return}a.cnt=a.cnt||0,!(!K(o)&&a.cnt>o)&&r[Er](a)},s[co]=function(){return r[Pe]},s.size=function(){for(var a=r[Pe],c=0;c<r[Pe];c++)a+=r[c].item[Pe];return n[Sh]||(a+=2),a},s[Ds]=function(){r=[],i=!1},s.getItems=function(){return r.slice(0)},s.batchPayloads=function(a){if(a&&a[Pe]>0){var c=[];ee(a,function(l){c[Er](l.item)});var u=n[Sh]?c.join(`
|
|
13
|
-
`):"["+c.join(",")+"]";return u}return null},s.createNew=function(a,c,u){var l=r.slice(0);a=a||e,c=c||{};var f=u?new Zb(a,c):new og(a,c);return ee(l,function(m){f[ao](m)}),f}})}return t.__ieDyn=1,t})(),og=(function(t){ir(e,t);function e(n,r){var i=t.call(this,n,r)||this;return qe(e,i,function(o,s){o[pl]=function(a){s[Ds]()},o[Oa]=function(a){}}),i}return e.__ieDyn=1,e})(Qb),IT=["AI_buffer","AI_sentBuffer"],Zb=(function(t){ir(e,t);function e(r,i){var o=t.call(this,r,i)||this,s=!1,a=i==null?void 0:i.namePrefix,c=i[ig]||{getItem:dh,setItem:_b},u=c.getItem,l=c.setItem,f=i.maxRetryCnt;return qe(e,o,function(m,d){var h=x(e[sa]),g=x(e[Lr]),p=A(),v=g[Qo](p),_=m._set(h[Qo](v));_[Pe]>e[aa]&&(_[Pe]=e[aa]),q(e[Lr],[]),q(e[sa],_),m[ao]=function(L){if(m[co]()>=e[aa]){s||(J(r,2,67,"Maximum buffer size reached: "+m[co](),!0),s=!0);return}L.cnt=L.cnt||0,!(!K(f)&&L.cnt>f)&&(d[ao](L),q(e[sa],m._get()))},m[Ds]=function(){d[Ds](),q(e[sa],m._get()),q(e[Lr],[]),s=!1},m[pl]=function(L){q(e[sa],m._set(P(L,m._get())));var O=x(e[Lr]);O instanceof Array&&L instanceof Array&&(O=O[Qo](L),O[Pe]>e[aa]&&(J(r,1,67,"Sent buffer reached its maximum size: "+O[Pe],!0),O[Pe]=e[aa]),q(e[Lr],O))},m[Oa]=function(L){var O=x(e[Lr]);O=P(L,O),q(e[Lr],O)},m.createNew=function(L,O,H){H=!!H;var ne=m._get().slice(0),se=x(e[Lr]).slice(0);L=L||r,O=O||{},m[Ds]();var b=H?new e(L,O):new og(L,O);return ee(ne,function(E){b[ao](E)}),H&&b[pl](se),b};function P(L,O){var H=[],ne=[];return ee(L,function(se){ne[Er](se.item)}),ee(O,function(se){!pe(se)&&At(ne,se.item)===-1&&H[Er](se)}),H}function x(L){var O=L;return O=a?a+"_"+O:O,R(O)}function R(L){try{var O=u(r,L);if(O){var H=Mn().parse(O);if(de(H)&&(H=Mn().parse(H)),H&&Ce(H))return H}}catch(ne){J(r,1,42," storage key: "+L+", "+$e(ne),{exception:te(ne)})}return[]}function q(L,O){var H=L;try{H=a?a+"_"+H:H;var ne=JSON[uc](O);l(r,H,ne)}catch(se){l(r,H,JSON[uc]([])),J(r,2,41," storage key: "+H+", "+$e(se)+". Buffer cleared",{exception:te(se)})}}function A(){var L=[];try{return ee(IT,function(O){var H=I(O);if(L=L[Qo](H),a){var ne=a+"_"+O,se=I(ne);L=L[Qo](se)}}),L}catch(O){J(r,2,41,"Transfer events from previous buffers: "+$e(O)+". previous Buffer items can not be removed",{exception:te(O)})}return[]}function I(L){try{var O=R(L),H=[];return ee(O,function(ne){var se={item:ne,cnt:0};H[Er](se)}),Cb(r,L),H}catch{}return[]}}),o}var n;return n=e,e.VERSION="_1",e.BUFFER_KEY="AI_buffer"+n.VERSION,e.SENT_BUFFER_KEY="AI_sentBuffer"+n.VERSION,e.MAX_BUFFER_SIZE=2e3,e})(Qb),kT=(function(){function t(e){qe(t,this,function(n){n.serialize=function(s){var a=r(s,"root");try{return Mn()[uc](a)}catch(c){J(e,1,48,c&&pe(c[Pi])?c[Pi]():"Error serializing object",null,!0)}};function r(s,a){var c="__aiCircularRefCheck",u={};if(!s)return J(e,1,48,"cannot serialize object because it is null or undefined",{name:a},!0),u;if(s[c])return J(e,2,50,"Circular reference detected while serializing object",{name:a},!0),u;if(!s.aiDataContract){if(a==="measurements")u=o(s,"number",a);else if(a==="properties")u=o(s,"string",a);else if(a==="tags")u=o(s,"string",a);else if(Ce(s))u=i(s,a);else{J(e,2,49,"Attempting to serialize an object which does not implement ISerializable",{name:a},!0);try{Mn()[uc](s),u=s}catch(l){J(e,1,48,l&&pe(l[Pi])?l[Pi]():"Error serializing object",null,!0)}}return u}return s[c]=!0,De(s.aiDataContract,function(l,f){var m=pe(f)?f()&1:f&1,d=pe(f)?f()&4:f&4,h=f&2,g=s[l]!==void 0,p=Xt(s[l])&&s[l]!==null;if(m&&!g&&!h)J(e,1,24,"Missing required field specification. The field is required but not present on source",{field:l,name:a});else if(!d){var v=void 0;p?h?v=i(s[l],l):v=r(s[l],l):v=s[l],v!==void 0&&(u[l]=v)}}),delete s[c],u}function i(s,a){var c;if(s)if(!Ce(s))J(e,1,54,`This field was specified as an array in the contract but the item is not an array.\r
|
|
14
|
-
`,{name:a},!0);else{c=[];for(var u=0;u<s[Pe];u++){var l=s[u],f=r(l,a+"["+u+"]");c[Er](f)}}return c}function o(s,a,c){var u;return s&&(u={},De(s,function(l,f){if(a==="string")f===void 0?u[l]="undefined":f===null?u[l]="null":f[Pi]?u[l]=f[Pi]():u[l]="invalid field: toString() is not defined.";else if(a==="number")if(f===void 0)u[l]="undefined";else if(f===null)u[l]="null";else{var m=parseFloat(f);u[l]=m}else u[l]="invalid field: "+c+" is of unknown type.",J(e,1,u[l],null,!0)})),u}})}return t.__ieDyn=1,t})(),TT=8,ET=(function(){function t(){}return t.prototype.getHashCodeScore=function(e){var n=this.getHashCode(e)/t.INT_MAX_VALUE;return n*100},t.prototype.getHashCode=function(e){if(e==="")return 0;for(;e[Pe]<TT;)e=e[Qo](e);for(var n=5381,r=0;r<e[Pe];++r)n=(n<<5)+n+e.charCodeAt(r),n=n&n;return Math.abs(n)},t.INT_MAX_VALUE=2147483647,t})(),xT=(function(){function t(){var e=this,n=new ET,r=new Db;e.getSamplingScore=function(i){var o=0;return i[St]&&i[St][r.userId]?o=n.getHashCodeScore(i[St][r.userId]):i.ext&&i.ext.user&&i.ext.user.id?o=n[gT](i.ext.user.id):i[St]&&i[St][r.operationId]?o=n.getHashCodeScore(i[St][r.operationId]):i.ext&&i.ext.telemetryTrace&&i.ext.telemetryTrace[cc]?o=n.getHashCodeScore(i.ext.telemetryTrace[cc]):o=Math.random()*100,o}}return t})(),PT=(function(){function t(e,n){this.INT_MAX_VALUE=2147483647;var r=n||wo(null);(e>100||e<0)&&(r.throwInternal(2,58,"Sampling rate is out of range (0..100). Sampling will be disabled, you may be sending too much data which may affect your AI service level.",{samplingRate:e},!0),e=100),this[gl]=e,this.samplingScoreGenerator=new xT}return t.prototype.isSampledIn=function(e){var n=this[gl],r=!1;return n==null||n>=100||e.baseType===oo[Jn]?!0:(r=this.samplingScoreGenerator.getSamplingScore(e)<n,r)},t})(),Be,lr,In=void 0,Kv="",DT=65e3;function Xv(t){try{return t.responseText}catch{}return null}function RT(t){return t&&t.sendPOST}var Gv=Ws((Be={endpointUrl:Yu(Ru,Gp+Is)},Be[Sh]=dt(),Be.maxBatchInterval=15e3,Be[Hb]=102400,Be.disableTelemetry=dt(),Be[Kb]=dt(!0),Be.isRetryDisabled=dt(),Be[Th]=dt(!0),Be[Gb]=dt(!0),Be.disableXhr=dt(),Be[Xb]=dt(),Be[kh]=dt(),Be[Ia]=In,Be.namePrefix=In,Be.samplingPercentage=Yu(AT,100),Be[Ih]=In,Be.convertUndefined=In,Be.eventsLimitInMem=1e4,Be[ig]=!1,Be.httpXHROverride={isVal:RT,v:In},Be[Bb]=dt(),Be.transports=In,Be.retryCodes=In,Be.corsPolicy=In,Be.maxRetryCnt={isVal:gc,v:10},Be)),Jv="X-Set-Cross-Origin-Resource-Policy";function AT(t){return!isNaN(t)&&t>0&&t<=100}var MT=(lr={},lr[yr.dataType]=Jb,lr[Es.dataType]=ST,lr[ui.dataType]=CT,lr[xs.dataType]=wT,lr[Ht.dataType]=bT,lr[oo.dataType]=_T,lr[so.dataType]=yT,lr),zT=(function(t){ir(e,t);function e(){var n=t.call(this)||this;n.priority=1001,n.identifier=Rb;var r,i,o,s,a,c,u,l,f=0,m,d,h,g,p,v,_,P,x,R,q,A,I,L,O,H,ne,se,b,E,B,M,D,ce,me,oe,V,C;return qe(e,n,function(y,U){wc(),y.pause=function(){_t(),s=!0},y.resume=function(){s&&(s=!1,i=null,z(),He())},y.flush=function(T,F,Q){if(T===void 0&&(T=!0),!s){_t();try{var ae=y[ca](T,null,Q||1);return Kt(ae,function(ge){return F?(F(!ge.rejected),!0):T?Zn(function(ve){ve(!ge.rejected)}):ae})}catch(ge){J(y[Pt](),1,22,"flush failed, telemetry will not be collected: "+$e(ge),{exception:te(ge)})}}},y.onunloadFlush=function(){if(!s)if(_||E)try{return y[ca](!0,X,2)}catch(T){J(y[Pt](),1,20,"failed to flush with beacon sender on page unload, telemetry will not be collected: "+$e(T),{exception:te(T)})}else y.flush(!1)},y.addHeader=function(T,F){l[T]=F},y[ld]=function(T,F,Q,ae){y.isInitialized()&&J(y[Pt](),1,28,"Sender is already initialized"),U[ld](T,F,Q,ae);var ge=y.identifier;c=new kT(F.logger),r=0,i=null,o=0,y[ua]=null,u=0;var ve=y[Pt]();h=gi(bn("Sender"),F.evtNamespace&&F.evtNamespace()),d=Lk(h),y._addHook(ct(T,function(ze){var Qe=ze.cfg;Qe.storagePrefix&&tg(Qe.storagePrefix);var Wt=zn(null,Qe,F),we=Wt.getExtCfg(ge,Gv),Hs=we[la];if(g&&Hs===g){var sr=Qe[la];sr&&sr!==Hs&&(we[la]=sr)}var Bs=nt("CompressionStream");C=su("zipPayload",Qe,!1),pe(Bs)||(C=!1);var mi=we.corsPolicy;mi?(mi==="same-origin"||mi==="same-site"||mi==="cross-origin")&&n.addHeader(Jv,mi):delete l[Jv],fi(we[Ia])&&(we[Ia]=Qe[Ia]),Ae(y,"_senderConfig",{g:function(){return we}}),p!==we[la]&&(g=p=we[la]),F.activeStatus()===Kr.PENDING?y.pause():F.activeStatus()===Kr.ACTIVE&&y.resume(),R&&R!==we[Ih]&&ee(R,function(Ct){delete l[Ct.header]}),v=we[Hb],_=(we[kh]===!1||we[Th]===!1)&&ma(),P=we[kh]===!1&&ma(),x=we[Th]===!1&&ma(),E=we[Bb],B=!!we.disableXhr,V=we.retryCodes;var Yl=we[ig],Mo=!!we[Kb]&&(!!Yl||oc()),sg=we.namePrefix,O_=Mo!==H||Mo&&se!==sg||Mo&&ne!==Yl;if(y[$n]){if(O_)try{y[$n]=y[$n].createNew(ve,we,Mo)}catch(Ct){J(y[Pt](),1,12,"failed to transfer telemetry to different buffer storage, telemetry will be lost: "+$e(Ct),{exception:te(Ct)})}z()}else y[$n]=Mo?new Zb(ve,we):new og(ve,we);se=sg,H=Mo,ne=Yl,M=!we[Xb]&&Np(!0),me=!!we[Gb],y._sample=new PT(we.samplingPercentage,ve),A=we[Ia],!fi(A)&&!Ao(A,Qe)&&J(ve,1,100,"Invalid Instrumentation key "+A),R=we[Ih],de(g)&&!fh(g)&&R&&R[Pe]>0?ee(R,function(Ct){n.addHeader(Ct.header,Ct.value)}):R=null,b=we.enableSendPromise;var ag=Y();oe?oe.SetConfig(ag):(oe=new NI,oe[ld](ag,ve));var Sc=we.httpXHROverride,Ic=null,Ks=null,F_=Kg([3,1,2],we.transports);Ic=oe&&oe[Vc](F_,!1);var ef=oe&&oe.getFallbackInst();D=function(Ct,yi){return ue(ef,Ct,yi)},ce=function(Ct,yi){return ue(ef,Ct,yi,!1)},Ic=E?Sc:Ic||Sc||ef,y[ua]=function(Ct,yi){return ue(Ic,Ct,yi)},M&&(m=Ie);var tf=Kg([3,1],we.unloadTransports);M||(tf=tf.filter(function(Ct){return Ct!==2})),Ks=oe&&oe[Vc](tf,!0),Ks=E?Sc:Ks||Sc,(E||we.unloadTransports||!m)&&Ks&&(m=function(Ct,yi){return ue(Ks,Ct,yi)}),m||(m=D),q=we.disableTelemetry,I=we.convertUndefined||In,L=we.isRetryDisabled,O=we.maxBatchInterval}))},y.processTelemetry=function(T,F){F=y._getTelCtx(F);var Q=F[Pt]();try{var ae=je(T,Q);if(!ae)return;var ge=Le(T,Q);if(!ge)return;var ve=c.serialize(ge),ze=y[$n];z(ve);var Qe={item:ve,cnt:0};ze[ao](Qe),He()}catch(Wt){J(Q,2,12,"Failed adding telemetry to the sender's buffer, some telemetry will be lost: "+$e(Wt),{exception:te(Wt)})}y.processNext(T,F)},y.isCompletelyIdle=function(){return!s&&f===0&&y._buffer[co]()===0},y.getOfflineListener=function(){return d},y._xhrReadyStateChange=function(T,F,Q){if(!fe(F))return _e(T,F,Q)},y[ca]=function(T,F,Q){T===void 0&&(T=!0);var ae;if(!s)try{var ge=y[$n];if(q)ge[Ds]();else{if(ge[co]()>0){var ve=ge.getItems();Lt(Q||0,T),F?ae=F.call(y,ve,T):ae=y[ua](ve,T)}o=+new Date}_t()}catch(Qe){var ze=$y();(!ze||ze>9)&&J(y[Pt](),1,40,"Telemetry transmission failed, some telemetry will be lost: "+$e(Qe),{exception:te(Qe)})}return ae},y.getOfflineSupport=function(){return{getUrl:function(){return g},createPayload:un,serialize:xt,batch:or,shouldProcess:function(T){return!!je(T)}}},y._doTeardown=function(T,F){y.onunloadFlush(),fs(d,!1),wc()},y[Ii]=function(T,F,Q){if(!fe(T))return ke(T,F)},y[fd]=function(T,F){if(!fe(T))return Te(T,F)},y[qc]=function(T,F){if(!fe(T))return Ne(T)},y._xdrOnLoad=function(T,F){if(!fe(F))return G(T,F)};function G(T,F){var Q=Xv(T);if(T&&(Q+""=="200"||Q===""))r=0,y[qc](F,0);else{var ae=Kf(Q);ae&&ae[dd]&&ae[dd]>ae[hd]&&!L?y[fd](F,ae):y[Ii](F,My(T))}}function Y(){try{var T={xdrOnComplete:function(Q,ae,ge){var ve=Et(ge);if(ve)return G(Q,ve)},fetchOnComplete:function(Q,ae,ge,ve){var ze=Et(ve);if(ze)return W(Q.status,ze,Q.url,ze[Pe],Q.statusText,ge||"")},xhrOnComplete:function(Q,ae,ge){var ve=Et(ge);if(ve)return _e(Q,ve,ve[Pe])},beaconOnRetry:function(Q,ae,ge){return ie(Q,ae,ge)}},F={enableSendPromise:b,isOneDs:!1,disableCredentials:!1,disableXhr:B,disableBeacon:!x,disableBeaconSync:!P,senderOnCompleteCallBack:T};return F}catch{}return null}function _e(T,F,Q){T.readyState===4&&W(T.status,F,T.responseURL,Q,Ju(T),Xv(T)||T.response)}function ke(T,F,Q){J(y[Pt](),2,26,"Failed to send telemetry.",{message:F}),y._buffer&&y._buffer[Oa](T)}function Te(T,F){for(var Q=[],ae=[],ge=F.errors.reverse(),ve=0,ze=ge;ve<ze.length;ve++){var Qe=ze[ve],Wt=T.splice(Qe.index,1)[0];Un(Qe.statusCode)?ae[Er](Wt):Q[Er](Wt)}T[Pe]>0&&y[qc](T,F[hd]),Q[Pe]>0&&y[Ii](Q,Ju(null,["partial success",F[hd],"of",F.itemsReceived].join(" "))),ae[Pe]>0&&(ye(ae),J(y[Pt](),2,40,"Partial success. Delivered: "+T[Pe]+", Failed: "+Q[Pe]+". Will retry to send "+ae[Pe]+" our of "+F[dd]+" items"))}function Ne(T,F){y._buffer&&y._buffer[Oa](T)}function Et(T){try{if(T){var F=T,Q=F.oriPayload;return Q&&Q[Pe]?Q:null}}catch{}return null}function je(T,F){if(q)return!1;if(!T)return F&&J(F,1,7,"Cannot send empty telemetry"),!1;if(T.baseData&&!T[pd])return F&&J(F,1,70,"Cannot send telemetry without baseData and baseType"),!1;if(T[pd]||(T[pd]="EventData"),!y[ua])return F&&J(F,1,28,"Sender was not initialized"),!1;if($(T))T[db]=y._sample[gl];else return F&&J(F,2,33,"Telemetry item was sampled out and not sent",{SampleRate:y._sample[gl]}),!1;return!0}function Le(T,F){var Q=T.iKey||A,ae=e.constructEnvelope(T,Q,F,I);if(!ae){J(F,1,47,"Unable to create an AppInsights envelope");return}var ge=!1;if(T[St]&&T[St][Jf]&&(ee(T[St][Jf],function(ve){try{ve&&ve(ae)===!1&&(ge=!0,ro(F,"Telemetry processor check returns false"))}catch(ze){J(F,1,64,"One of telemetry initializers failed, telemetry item will not be sent: "+$e(ze),{exception:te(ze)},!0)}}),delete T[St][Jf]),!ge)return ae}function xt(T){var F=Kv,Q=y[Pt]();try{var ae=je(T,Q),ge=null;ae&&(ge=Le(T,Q)),ge&&(F=c.serialize(ge))}catch{}return F}function or(T){var F=Kv;return T&&T[Pe]&&(F="["+T.join(",")+"]"),F}function un(T){var F=S();return{urlString:g,data:T,headers:F}}function $(T){return y._sample.isSampledIn(T)}function Z(T,F,Q,ae){F===200&&T?y._onSuccess(T,T[Pe]):ae&&y[Ii](T,ae)}function ue(T,F,Q,ae){ae===void 0&&(ae=!0);var ge=function(sr,Bs,mi){return Z(F,sr,Bs,mi)},ve=re(F),ze=T&&T.sendPOST;if(ze&&ve){ae&&y._buffer[pl](F);var Qe,Wt=!1,we,Hs;return oe.preparePayload(function(sr){Qe=ze(sr,ge,!Q),Wt=!0,we&&Up(Qe,we,Hs)},C,ve,!Q),Wt?Qe:Zn(function(sr,Bs){we=sr,Hs=Bs})}return null}function re(T){if(Ce(T)&&T[Pe]>0){var F=y[$n].batchPayloads(T),Q=S(),ae={data:F,urlString:g,headers:Q,disableXhrSync:B,disableFetchKeepAlive:!M,oriPayload:T};return ae}return null}function S(){try{var T=l||{};return fh(g)&&(T[Fe[6]]=Fe[7]),T}catch{}return null}function z(T){var F=T?T[Pe]:0;return y[$n].size()+F>v?((!d||d.isOnline())&&y[ca](!0,null,10),!0):!1}function W(T,F,Q,ae,ge,ve){var ze=null;if(y._appId||(ze=Kf(ve),ze&&ze.appId&&(y._appId=ze.appId)),(T<200||T>=300)&&T!==0){if((T===301||T===307||T===308)&&!j(Q)){y[Ii](F,ge);return}if(d&&!d.isOnline()){if(!L){var Qe=10;ye(F,Qe),J(y[Pt](),2,40,". Offline - Response Code: ".concat(T,". Offline status: ").concat(!d.isOnline(),". Will retry to send ").concat(F.length," items."))}return}!L&&Un(T)?(ye(F),J(y[Pt](),2,40,". Response code "+T+". Will retry to send "+F[Pe]+" items.")):y[Ii](F,ge)}else j(Q),T===206?(ze||(ze=Kf(ve)),ze&&!L?y[fd](F,ze):y[Ii](F,ge)):(r=0,y[qc](F,ae))}function j(T){return u>=10?!1:!K(T)&&T!==""&&T!==g?(g=T,++u,!0):!1}function X(T,F){if(m)m(T,!1);else{var Q=oe&&oe[Vc]([3],!0);return ue(Q,T,F)}}function ie(T,F,Q){var ae=T,ge=ae&&ae.oriPayload;if(me)ce&&ce(ge,!0),J(y[Pt](),2,40,". Failed to send telemetry with Beacon API, retried with normal sender.");else{for(var ve=[],ze=0;ze<ge[Pe];ze++){var Qe=ge[ze],Wt=[Qe],we=re(Wt);Q(we,F)?y._onSuccess(Wt,Wt[Pe]):ve[Er](Qe)}ve[Pe]>0&&(ce&&ce(ve,!0),J(y[Pt](),2,40,". Failed to send telemetry with Beacon API, retried with normal sender."))}}function fe(T){try{if(T&&T[Pe])return de(T[0])}catch{}return null}function Ie(T,F){var Q=null;if(Ce(T)){for(var ae=T[Pe],ge=0;ge<T[Pe];ge++)ae+=T[ge].item[Pe];var ve=oe.getSyncFetchPayload();ve+ae<=DT?Q=2:ma()?Q=3:(Q=1,J(y[Pt](),2,40,". Failed to send telemetry with Beacon API, retried with xhrSender."));var ze=oe&&oe[Vc]([Q],!0);return ue(ze,T,F)}return null}function ye(T,F){if(F===void 0&&(F=1),!(!T||T[Pe]===0)){var Q=y[$n];Q[Oa](T),r++;for(var ae=0,ge=T;ae<ge.length;ae++){var ve=ge[ae];ve.cnt=ve.cnt||0,ve.cnt++,Q[ao](ve)}Oe(F),He()}}function Oe(T){var F=10,Q;if(r<=1)Q=F;else{var ae=(Math.pow(2,r)-1)/2,ge=an(Math.random()*ae*F)+1;ge=T*ge,Q=za(ry(ge,3600),F)}var ve=An()+Q*1e3;i=ve}function He(){if(!a&&!s){var T=i?za(0,i-An()):0,F=za(O,T);a=yn(function(){a=null,y[ca](!0,null,1)},F)}}function _t(){a&&a.cancel(),a=null,i=null}function Un(T){return K(V)?T===401||T===408||T===429||T===500||T===502||T===503||T===504:V[Pe]&&V.indexOf(T)>-1}function Nn(){var T="getNotifyMgr",F,Q=y.core;return Q&&(Q[T]?F=Q[T]():F=Q._notificationManager),F}function Lt(T,F){var Q=Nn();if(Q&&Q.eventsSendRequest)try{Q.eventsSendRequest(T,F)}catch(ae){J(y[Pt](),1,74,"send request notification failed: "+$e(ae),{exception:te(ae)})}}function Ao(T,F){var Q=F.disableInstrumentationKeyValidation,ae=K(Q)?!1:Q;if(ae)return!0;var ge="^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",ve=new RegExp(ge);return ve.test(T)}function wc(){y[ua]=null,y[$n]=null,y._appId=null,y._sample=null,l={},d=null,r=0,i=null,o=null,s=!1,a=null,c=null,u=0,f=0,m=null,h=null,g=null,p=null,v=0,_=!1,R=null,q=!1,A=null,I=In,L=!1,H=null,se=In,B=!1,M=!1,me=!1,D=null,ce=null,oe=null,Ae(y,"_senderConfig",{g:function(){return Ay({},Gv)}})}}),n}return e.constructEnvelope=function(n,r,i,o){var s;r!==n.iKey&&!K(r)?s=Ft(Ft({},n),{iKey:r}):s=n;var a=MT[s.baseType]||Jb;return a(i,s,o)},e})(So),Qv="duration",js="properties",xn="requestUrl",qi="length",ni="traceID",ri="spanID",Dn="traceFlags",Fa="context",Rs="aborted",Hc="_addHook",Qt="core",vd="includeCorrelationHeaders",Eh="getAbsoluteUrl",ki="headers",hn="requestHeaders",md="setRequestHeader",Zv="trackDependencyDataInternal",hs="startTime",jo="toLowerCase",xh="enableRequestHeaderTracking",Yb="enableAjaxErrorStatusText",e_="enableAjaxPerfTracking",t_="maxAjaxCallsPerView",n_="excludeRequestFromAutoTrackingPatterns",Ph="disableAjaxTracking",r_="ajaxPerfLookupDelay",i_="disableFetchTracking",o_="enableResponseHeaderTracking",En="status",$i="statusText",vl="headerMap",Hi="requestSentTime",Dh="getTraceId",Rh="getTraceFlags",Yr="method",Ah="errorStatusText",s_="stateChangeAttached",Yv="responseText",ka="responseFinishedTime",Mh="CreateTrackItem",em="getAllResponseHeaders",zh="getPartAProps",ml="perfMark",Uh="perfTiming",Nh="ajaxDiagnosticsMessage",$h="correlationContext",yd="ajaxTotalDuration",bd="eventTraceCtx";function a_(t,e,n){var r=0,i=t[e],o=t[n];return i&&o&&(r=qt(i,o)),r}function Ti(t,e,n,r,i){var o=0,s=a_(n,r,i);return s&&(o=Hr(t,e,Zr(s))),o}function Hr(t,e,n){var r="ajaxPerf",i=0;if(t&&e&&n){var o=t[r]=t[r]||{};o[e]=n,i=1}return i}function UT(t,e){var n=t[Uh],r=e[js]||{},i=0,o="name",s="Start",a="End",c="domainLookup",u="connect",l="redirect",f="request",m="response",d="startTime",h=c+s,g=c+a,p=u+s,v=u+a,_=f+s,P=f+a,x=m+s,R=m+a,q=l+s,A=l=a,I="transferSize",L="encodedBodySize",O="decodedBodySize",H="serverTiming";if(n){i|=Ti(r,l,n,q,A),i|=Ti(r,c,n,h,g),i|=Ti(r,u,n,p,v),i|=Ti(r,f,n,_,P),i|=Ti(r,m,n,x,R),i|=Ti(r,"networkConnect",n,d,v),i|=Ti(r,"sentRequest",n,_,R);var ne=n[Qv];ne||(ne=a_(n,d,R)||0),i|=Hr(r,Qv,ne),i|=Hr(r,"perfTotal",ne);var se=n[H];if(se){var b={};ee(se,function(E,B){var M=Ku(E[o]||""+B),D=b[M]||{};De(E,function(ce,me){(ce!==o&&de(me)||gc(me))&&(D[ce]&&(me=D[ce]+";"+me),(me||!de(me))&&(D[ce]=me))}),b[M]=D}),i|=Hr(r,H,b)}i|=Hr(r,I,n[I]),i|=Hr(r,L,n[L]),i|=Hr(r,O,n[O])}else t[ml]&&(i|=Hr(r,"missing",t.perfAttempts));i&&(e[js]=r)}var NT=(function(){function t(){var e=this;e.openDone=!1,e.setRequestHeaderDone=!1,e.sendDone=!1,e.abortDone=!1,e[s_]=!1}return t})(),tm=(function(){function t(e,n,r,i){var o=this,s=r,a="responseText";o[ml]=null,o.completed=!1,o.requestHeadersSize=null,o[hn]=null,o.responseReceivingDuration=null,o.callbackDuration=null,o[yd]=null,o[Rs]=0,o.pageUrl=null,o[xn]=null,o.requestSize=0,o[Yr]=null,o[En]=null,o[Hi]=null,o.responseStartedTime=null,o[ka]=null,o.callbackFinishedTime=null,o.endTime=null,o.xhrMonitoringState=new NT,o.clientFailure=0,o[ni]=e,o[ri]=n,o[Dn]=i==null?void 0:i.getTraceFlags(),i?o[bd]={traceId:i[Dh](),spanId:i.getSpanId(),traceFlags:i[Rh]()}:o[bd]=null,qe(t,o,function(c){c.getAbsoluteUrl=function(){return c[xn]?nk(c[xn]):null},c.getPathName=function(){return c[xn]?Xl(s,rk(c[Yr],c[xn])):null},c[Mh]=function(u,l,f){var m;if(c.ajaxTotalDuration=my(qt(c.requestSentTime,c.responseFinishedTime)*1e3)/1e3,c[yd]<0)return null;var d=(m={id:"|"+c[ni]+"."+c[ri],target:c[Eh](),name:c.getPathName(),type:u,startTime:null,duration:c[yd],success:+c[En]>=200&&+c[En]<400,responseCode:+c[En]},m[js]={HttpMethod:c[Yr]},m),h=d[js];if(c[Rs]&&(h[Rs]=!0),c[Hi]&&(d[hs]=new Date,d[hs].setTime(c[Hi])),UT(c,d),l&&wr(c.requestHeaders)[qi]>0&&(h[hn]=c[hn]),f){var g=f();if(g){var p=g[$h];if(p&&(d.correlationContext=p),g[vl]&&wr(g.headerMap)[qi]>0&&(h.responseHeaders=g[vl]),c[Ah])if(c[En]>=400){var v=g.type;(v===""||v==="text")&&(h.responseText=g.responseText?g[$i]+" - "+g[a]:g[$i]),v==="json"&&(h.responseText=g.response?g[$i]+" - "+JSON.stringify(g.response):g[$i])}else c[En]===0&&(h.responseText=g[$i]||"")}}return d},c[zh]=function(){var u=null,l=c[bd];if(l&&(l.traceId||l.spanId)){u={};var f=u[Zt.TraceExt]={traceID:l.traceId,parentID:l.spanId};K(l[Dn])||(f[Dn]=l[Dn])}return u}})}return t.__ieDyn=1,t})(),st,ja="diagLog",li="_ajaxData",Oi="fetch",fa="Failed to monitor XMLHttpRequest",c_=", monitoring data for this ajax call ",Lo=c_+"may be incorrect.",nm=c_+"won't be sent.",rm="Failed to get Request-Context correlation header as it may be not included in the response or not accessible.",im="Failed to add custom defined request context as configured call back may missing a null check.",om="Failed to calculate the duration of the ",sm=0;function $T(){var t=vn();return!t||K(t.Request)||K(t.Request[Kn])||K(t[Oi])?null:t[Oi]}function OT(t,e){var n,r=!1;if(Vl()){var i=XMLHttpRequest[Kn];r=!K(i)&&!K(i.open)&&!K(i.send)&&!K(i.abort)}var o=$y();if(o&&o<9&&(r=!1),r)try{var s=new XMLHttpRequest,a={xh:[],i:(n={},n[e]={},n)};s[li]=a;var c=XMLHttpRequest[Kn].open;XMLHttpRequest[Kn].open=c}catch(u){r=!1,La(t,15,"Failed to enable XMLHttpRequest monitoring, extension is not supported",{exception:te(u)})}return r}var Zo=function(t,e){return t&&e&&t[li]?(t[li].i||{})[e]:null},FT=function(t,e,n){if(t){var r=(t[li]||{}).xh;r&&r.push({n:e,v:n})}},_d=function(t,e){var n=!1;if(t){var r=(t[li]||{}).xh;r&&ee(r,function(i){if(i.n===e)return n=!0,-1})}return n};function vu(t,e){var n="";try{var r=Zo(t,e);r&&r[xn]&&(n+="(url: '"+r[xn]+"')")}catch{}return n}function La(t,e,n,r,i){J(t[ja](),1,e,n,r,i)}function fr(t,e,n,r,i){J(t[ja](),2,e,n,r,i)}function da(t,e,n){return function(r){var i;La(t,e,n,(i={},i[Nh]=vu(r.inst,t._ajaxDataId),i.exception=te(r.err),i))}}function Wo(t,e){return t&&e?at(t,e):-1}function am(t,e,n){var r={id:e,fn:n};return t.push(r),{remove:function(){ee(t,function(i,o){if(i.id===r.id)return t.splice(o,1),-1})}}}function u_(t,e,n,r){var i=!0;return ee(e,function(o,s){try{o.fn.call(null,n)===!1&&(i=!1)}catch(a){J(t&&t.logger,1,64,"Dependency "+r+" [#"+s+"] failed: "+$e(a),{exception:te(a)},!0)}}),i}function jT(t,e,n,r,i,o){var s=t[qi],a=!0;if(s>0){var c={core:e,xhr:r,input:i,init:o,traceId:n[ni],spanId:n[ri],traceFlags:n[Dn],context:n[Fa]||{},aborted:!!n[Rs]};a=u_(e,t,c,"listener"),n[ni]=c.traceId,n[ri]=c.spanId,n[Dn]=c[Dn],n[Fa]=c[Fa]}return a}var Bc="*.blob.core.",LT=Rn([Bc+"windows.net",Bc+"chinacloudapi.cn",Bc+"cloudapi.de",Bc+"usgovcloudapi.net"]),WT=[/https:\/\/[^\/]*(\.pipe\.aria|aria\.pipe|events\.data|collector\.azure)\.[^\/]+\/(OneCollector\/1|Collector\/3)\.0/i],VT=Rn((st={},st[t_]=500,st[Ph]=!1,st[i_]=!1,st[n_]=void 0,st.disableCorrelationHeaders=!1,st.distributedTracingMode=1,st.correlationHeaderExcludedDomains=LT,st.correlationHeaderDomains=void 0,st.correlationHeaderExcludePatterns=void 0,st.appId=void 0,st.enableCorsCorrelation=!1,st[xh]=!1,st[o_]=!1,st[Yb]=!1,st[e_]=!1,st.maxAjaxPerfLookupAttempts=3,st[r_]=25,st.ignoreHeaders=["Authorization","X-API-Key","WWW-Authenticate"],st.addRequestContext=void 0,st.addIntEndpoints=!0,st)),qT=(function(t){ir(e,t);function e(){var n=t.call(this)||this;n.identifier=e.identifier,n.priority=120;var r,i,o,s,a,c,u,l,f,m,d,h,g,p,v,_,P,x,R,q,A,I,L,O,H,ne,se,b,E,B;return qe(e,n,function(M,D){var ce=D[Hc];me(),M.initialize=function(S,z,W,j){M.isInitialized()||(D.initialize(S,z,W,j),q=gi(bn("ajax"),z&&z.evtNamespace&&z.evtNamespace()),oe(S),G(),y(),V())},M._doTeardown=function(){me()},M.trackDependencyData=function(S,z){re(O,M[Qt],null,S,z)},M.resetAjaxAttempts=function(){u=0},M[vd]=function(S,z,W,j){var X=M._currentWindowHost||o;if(jT(L,M[Qt],S,j,z,W)){if(z||z===""){if(Rv(s,S[Eh](),X)){W||(W={});var ie=new Headers(W[ki]||(z instanceof Request?z[ki]||{}:{}));if(m){var fe="|"+S[ni]+"."+S[ri];ie.set(Fe[3],fe),a&&(S[hn][Fe[3]]=fe)}var Ie=E||l&&l.appId();if(Ie&&(ie.set(Fe[0],Fe[2]+Ie),a&&(S[hn][Fe[0]]=Fe[2]+Ie)),f){var ye=S[Dn];K(ye)&&(ye=1);var Oe=lv(uv(S[ni],S[ri],ye));ie.set(Fe[4],Oe),a&&(S[hn][Fe[4]]=Oe)}W[ki]=ie}}else if(j&&Rv(s,S[Eh](),X)){if(m)if(_d(j,Fe[3]))fr(M,71,"Unable to set ["+Fe[3]+"] as it has already been set by another instance");else{var fe="|"+S[ni]+"."+S[ri];j[md](Fe[3],fe),a&&(S[hn][Fe[3]]=fe)}var Ie=E||l&&l.appId();if(Ie&&(_d(j,Fe[0])?fr(M,71,"Unable to set ["+Fe[0]+"] as it has already been set by another instance"):(j[md](Fe[0],Fe[2]+Ie),a&&(S[hn][Fe[0]]=Fe[2]+Ie))),f){var ye=S[Dn];if(K(ye)&&(ye=1),_d(j,Fe[4]))fr(M,71,"Unable to set ["+Fe[4]+"] as it has already been set by another instance");else{var Oe=lv(uv(S[ni],S[ri],ye));j[md](Fe[4],Oe),a&&(S[hn][Fe[4]]=Oe)}}}}return j||W},M[Zv]=function(S,z,W){if(g===-1||u<g){(b===2||b===1)&&typeof S.id=="string"&&S.id[S.id[qi]-1]!=="."&&(S.id+="."),K(S[hs])&&(S[hs]=new Date);var j=qr(S,so.dataType,so.envelopeType,M[ja](),z,W);M[Qt].track(j)}else u===g&&La(M,55,"Maximum ajax per page view limit reached, ajax monitoring is paused until the next trackPageView(). In order to increase the limit set the maxAjaxCallsPerView configuration parameter.",!0);++u},M.addDependencyListener=function(S){return am(L,I++,S)},M.addDependencyInitializer=function(S){return am(O,I++,S)};function me(){var S=Hn();r=!1,i=!1,B=!1,o=S&&S.host&&S.host[jo](),s=null,a=!1,c=!1,u=0,l=null,f=!1,m=!1,d=null,h=!1,g=0,p=!1,v={},_=!1,P=!1,x=null,R=null,q=null,I=0,L=[],O=[],A=bn("ajaxData"),M._ajaxDataId=A,H=null,ne=1,se=1,b=1,E=null}function oe(S){M[Hc](ct(S,function(z){var W=z.cfg,j=zn(null,W,M[Qt]);s=j.getExtCfg(e.identifier,VT),b=s.distributedTracingMode,a=s[xh],c=s[Yb],h=s[e_],g=s[t_],x=[].concat(s[n_]||[],s.addIntEndpoints!==!1?WT:[]),R=s.addRequestContext,m=b===0||b===1,f=b===1||b===2,h&&(d=A),_=!!s[Ph],ne=s.maxAjaxPerfLookupAttempts,se=s[r_],H=s.ignoreHeaders,E=s.appId}))}function V(){var S=M[Qt].getPlugin(Ql);S&&(l=S.plugin[Fa])}function C(S){var z=!0;return(S||H)&&ee(H,(function(W){if(W[jo]()===S[jo]())return z=!1,-1})),z}function y(){var S=$T();if(S){var z=vn(),W=S.polyfill;M[Hc](ct(s,function(){P=!!s[i_],p=s[o_],!P&&!r?(ce(lh(z,Oi,{ns:q,req:function(j,X,ie){var fe;if(!P&&r&&!Y(null,X,ie)&&!(W&&i)){var Ie=j.ctx();fe=un(X,ie);var ye=M[vd](fe,X,ie);ye!==ie&&j.set(1,ye),Ie.data=fe}},rsp:function(j,X){if(!P){var ie=j.ctx().data;ie&&(j.rslt=j.rslt.then(function(fe){return Z(j,(fe||{})[En],X,fe,ie,function(){var Ie,ye=(Ie={statusText:(fe||{})[$i],headerMap:null},Ie[$h]=ue(fe),Ie);if(p&&fe){var Oe={};fe.headers.forEach(function(He,_t){C(_t)&&(Oe[_t]=He)}),ye[vl]=Oe}return ye}),fe}).catch(function(fe){throw Z(j,0,X,null,ie,null,{error:fe.message||te(fe)}),fe}))}},hkErr:da(M,15,"Failed to monitor Window.fetch"+Lo)},!0,cy())),r=!0):W&&!B&&(ce(lh(z,Oi,{ns:q,req:function(j,X,ie){Y(null,X,ie)}})),B=!0)})),W&&(z[Oi].polyfill=W)}}function U(S,z,W){ce(JI(S,z,W))}function G(){OT(M,A)&&M[Hc](ct(s,function(){_=!!s[Ph],a=s[xh],!_&&!i&&(U(XMLHttpRequest,"open",{ns:q,req:function(S,z,W,j){if(!_){var X=S.inst,ie=Zo(X,A);!Y(X,W)&&_e(X,ie,!0)&&((!ie||!ie.xhrMonitoringState.openDone)&&(ie=Te(X,z,W,j)),Ne(X,ie))}},hkErr:da(M,15,fa+".open"+Lo)}),U(XMLHttpRequest,"send",{ns:q,req:function(S,z){if(!_){var W=S.inst,j=Zo(W,A);_e(W,j)&&!j.xhrMonitoringState.sendDone&&(xt("xhr",j),j[Hi]=jc(),M[vd](j,void 0,void 0,W),j.xhrMonitoringState.sendDone=!0)}},hkErr:da(M,17,fa+Lo)}),U(XMLHttpRequest,"abort",{ns:q,req:function(S){if(!_){var z=S.inst,W=Zo(z,A);_e(z,W)&&!W.xhrMonitoringState.abortDone&&(W[Rs]=1,W.xhrMonitoringState.abortDone=!0)}},hkErr:da(M,13,fa+".abort"+Lo)}),U(XMLHttpRequest,"setRequestHeader",{ns:q,req:function(S,z,W){if(!_){var j=S.inst,X=Zo(j,A);X&&_e(j,X)&&(FT(j,z,W),a&&C(z)&&(X[hn][z]=W))}},hkErr:da(M,71,fa+".setRequestHeader"+Lo)}),i=!0)}))}function Y(S,z,W){var j=!1,X=((de(z)?z:(z||{}).url||"")||"")[jo]();if(ee(x,function(Ie){var ye=Ie;de(Ie)&&(ye=new RegExp(Ie)),j||(j=ye.test(X))}),j)return j;var ie=Wo(X,"?"),fe=Wo(X,"#");return(ie===-1||fe!==-1&&fe<ie)&&(ie=fe),ie!==-1&&(X=X.substring(0,ie)),K(S)?K(z)||(j=(typeof z=="object"?z[Vi]===!0:!1)||(W?W[Vi]===!0:!1)):j=S[Vi]===!0||X[Vi]===!0,!j&&X&&fh(X)&&(j=!0),j?v[X]||(v[X]=1):v[X]&&(j=!0),j}function _e(S,z,W){var j=!0,X=i;return K(S)||(j=W===!0||!K(z)),X&&j}function ke(){var S=null;return M[Qt]&&M[Qt].getTraceCtx&&(S=M[Qt].getTraceCtx(!1)),!S&&l&&l.telemetryTrace&&(S=Zp(l.telemetryTrace)),S}function Te(S,z,W,j){var X,ie=ke(),fe=ie&&ie[Dh]()||ti(),Ie=Jr(ti(),0,16),ye=S[li]=S[li]||{xh:[],i:{}},Oe=ye.i=ye.i||{},He=Oe[A]=Oe[A]||new tm(fe,Ie,M[ja](),(X=M.core)===null||X===void 0?void 0:X.getTraceCtx());return He[Dn]=ie&&ie[Rh](),He[Yr]=z,He[xn]=W,He.xhrMonitoringState.openDone=!0,He[hn]={},He.async=j,He[Ah]=c,He}function Ne(S,z){z.xhrMonitoringState[s_]=Ir(S,"readystatechange",function(){var W;try{S&&S.readyState===4&&_e(S,z)&&je(S)}catch(X){var j=te(X);(!j||Wo(j[jo](),"c00c023f")===-1)&&La(M,16,fa+" 'readystatechange' event handler"+Lo,(W={},W[Nh]=vu(S,A),W.exception=j,W))}},q)}function Et(S){try{var z=S.responseType;if(z===""||z==="text")return S[Yv]}catch{}return null}function je(S){var z=Zo(S,A);z[ka]=jc(),z[En]=S[En];function W(j,X){var ie=X||{};ie.ajaxDiagnosticsMessage=vu(S,A),j&&(ie.exception=te(j)),fr(M,14,om+"ajax call"+nm,ie)}or("xmlhttprequest",z,function(){try{var j=z[Mh]("Ajax",a,function(){var ye,Oe=(ye={statusText:S[$i],headerMap:null},ye[$h]=Le(S),ye.type=S.responseType,ye[Yv]=Et(S),ye.response=S.response,ye);if(p){var He=S[em]();if(He){var _t=Ve(He).split(/[\r\n]+/),Un={};ee(_t,function(Nn){var Lt=Nn.split(": "),Ao=Lt.shift(),wc=Lt.join(": ");C(Ao)&&(Un[Ao]=wc)}),Oe[vl]=Un}}return Oe}),X=void 0;try{R&&(X=R({status:S[En],xhr:S}))}catch{fr(M,104,im)}if(j){X!==void 0&&(j[js]=Ft(Ft({},j.properties),X));var ie=z[zh]();re(O,M[Qt],z,j,null,ie)}else W(null,{requestSentTime:z[Hi],responseFinishedTime:z[ka]})}finally{try{var fe=S[li]||{i:{}},Ie=fe.i||{};Ie[A]&&(Ie[A]=null)}catch{}}},function(j){W(j,null)})}function Le(S){var z;try{var W=S[em]();if(W!==null){var j=Wo(W[jo](),Fe[8]);if(j!==-1){var X=S.getResponseHeader(Fe[0]);return Av(X)}}}catch(ie){fr(M,18,rm,(z={},z[Nh]=vu(S,A),z.exception=te(ie),z))}}function xt(S,z){if(z[xn]&&d&&h){var W=Dr();if(W&&pe(W.mark)){sm++;var j=d+S+"#"+sm;W.mark(j);var X=W.getEntriesByName(j);X&&X[qi]===1&&(z[ml]=X[0])}}}function or(S,z,W,j){var X=z[ml],ie=Dr(),fe=ne,Ie=se,ye=z[xn],Oe=0;(function He(){try{if(ie&&X){Oe++;for(var _t=null,Un=ie.getEntries(),Nn=Un[qi]-1;Nn>=0;Nn--){var Lt=Un[Nn];if(Lt){if(Lt.entryType==="resource")Lt.initiatorType===S&&(Wo(Lt.name,ye)!==-1||Wo(ye,Lt.name)!==-1)&&(_t=Lt);else if(Lt.entryType==="mark"&&Lt.name===X.name){z[Uh]=_t;break}if(Lt[hs]<X[hs]-1e3)break}}}!X||z[Uh]||Oe>=fe||z.async===!1?(X&&pe(ie.clearMarks)&&ie.clearMarks(X.name),z.perfAttempts=Oe,W()):yn(He,Ie)}catch(Ao){j(Ao)}})()}function un(S,z){var W,j=ke(),X=j&&j[Dh]()||ti(),ie=Jr(ti(),0,16),fe=new tm(X,ie,M[ja](),(W=M.core)===null||W===void 0?void 0:W.getTraceCtx());fe[Dn]=j&&j[Rh](),fe[Hi]=jc(),fe[Ah]=c;var Ie;if(S instanceof Request?Ie=(S||{}).url||"":Ie=S,Ie===""){var ye=Hn();ye&&ye.href&&(Ie=gy(ye.href,"#")[0])}M[Qt]&&M[Qt].config&&(Ie=mr(Ie,M[Qt].config)),fe[xn]=Ie;var Oe="GET";z&&z[Yr]?Oe=z[Yr]:S&&S instanceof Request&&(Oe=S[Yr]),fe[Yr]=Oe;var He={};if(a){var _t=new Headers((z?z[ki]:0)||(S instanceof Request?S[ki]||{}:{}));_t.forEach(function(Un,Nn){C(Nn)&&(He[Nn]=Un)})}return fe[hn]=He,xt(Oi,fe),fe}function $(S){var z="";try{K(S)||(typeof S=="string"?z+="(url: '".concat(S,"')"):z+="(url: '".concat(S.url,"')"))}catch(W){La(M,15,"Failed to grab failed fetch diagnostics message",{exception:te(W)})}return z}function Z(S,z,W,j,X,ie,fe){if(!X)return;function Ie(ye,Oe,He){var _t=He||{};_t.fetchDiagnosticsMessage=$(W),Oe&&(_t.exception=te(Oe)),fr(M,ye,om+"fetch call"+nm,_t)}X[ka]=jc(),X[En]=z,or(Oi,X,function(){var ye=X[Mh]("Fetch",a,ie),Oe;try{R&&(Oe=R({status:z,request:W,response:j}))}catch{fr(M,104,im)}if(ye){Oe!==void 0&&(ye[js]=Ft(Ft({},ye.properties),Oe));var He=X[zh]();re(O,M[Qt],X,ye,null,He)}else Ie(14,null,{requestSentTime:X[Hi],responseFinishedTime:X[ka]})},function(ye){Ie(18,ye,null)})}function ue(S){if(S&&S[ki])try{var z=S[ki].get(Fe[0]);return Av(z)}catch(W){fr(M,18,rm,{fetchDiagnosticsMessage:$(S),exception:te(W)})}}function re(S,z,W,j,X,ie){var fe=!0,Ie=S[qi];if(Ie>0){var ye={item:j,properties:X,sysProperties:ie,context:W?W[Fa]:null,aborted:W?!!W[Rs]:!1};fe=u_(z,S,ye,"initializer")}fe&&M[Zv](j,X,ie)}}),n}return e.prototype.processTelemetry=function(n,r){this.processNext(n,r)},e.prototype.addDependencyInitializer=function(n){return null},e.identifier="AjaxDependencyPlugin",e})(So),HT=(function(){function t(){}return t})(),BT=(function(){function t(){this.id="browser",this.deviceClass="Browser"}return t})(),KT="3.3.11",XT=(function(){function t(e,n){var r=this,i=ct(e,function(){var o=e.sdkExtension;r.sdkVersion=(o?o+"_":"")+"javascript:"+KT});n&&n.add(i)}return t})(),GT=(function(){function t(){}return t})(),yl="session",bl="sessionManager",mu="isUserCookieSet",_l="isNewUser",Cd="getTraceCtx",Oh="telemetryTrace",l_="applySessionContext",f_="applyApplicationContext",d_="applyOperationContext",h_="applyOperatingSystemContxt",p_="applyLocationContext",g_="applyInternalContext",yu="getSessionId",v_="sessionCookiePostfix",Di="automaticSession",Yo="accountId",es="authenticatedId",ha="acquisitionDate",Kc="renewalDate",pa="cookieSeparator",wd="authUserCookieName",JT="ai_session",QT=864e5,ZT=18e5,YT=6e4,m_=(function(){function t(){}return t})(),e1=(function(){function t(e,n,r){var i=this,o,s,a=wo(n),c=Hl(n),u,l;qe(t,i,function(f){e||(e={});var m=ct(e,function(_){u=e.sessionExpirationMs||QT,l=e.sessionRenewalMs||ZT;var P=e[v_]||e.namePrefix||"";o=JT+P});r&&r.add(m),f[Di]=new m_,f.update=function(){var _=An(),P=!1,x=f[Di];if(x.id||(P=!d(x)),!P&&u>0){var R=_-x[ha],q=_-x[Kc];P=R<0||q<0,P=P||R>u,P=P||q>l}P?g(_):(!s||_-s>YT)&&p(x,_)},f.backup=function(){var _=f[Di];v(_.id,_[ha],_[Kc])};function d(_,P){var x=!1,R=c.get(o);if(R&&pe(R.split))x=h(_,R);else{var q=yb(a,o);q&&(x=h(_,q))}return x||!!_.id}function h(_,P){var x=!1,R=", session will be reset",q=P.split("|");if(q.length>=2)try{var A=+q[1]||0,I=+q[2]||0;isNaN(A)||A<=0?J(a,2,27,"AI session acquisition date is 0"+R):isNaN(I)||I<=0?J(a,2,27,"AI session renewal date is 0"+R):q[0]&&(_.id=q[0],_[ha]=A,_[Kc]=I,x=!0)}catch(L){J(a,1,9,"Error parsing ai_session value ["+(P||"")+"]"+R+" - "+$e(L),{exception:te(L)})}return x}function g(_){var P=e.getNewId||$p;f[Di].id=P(e.idLength||22),f[Di][ha]=_,p(f[Di],_),Jl()||J(a,2,0,"Browser does not support local storage. Session durations will be inaccurate.")}function p(_,P){var x=_[ha];_[Kc]=P;var R=l,q=x+u-P,A=[_.id,x,P],I=0;q<R?I=q/1e3:I=R/1e3;var L=e.cookieDomain||null;c.set(o,A.join("|"),u>0?I:null,L),s=P}function v(_,P,x){bb(a,o,[_,P,x].join("|"))}})}return t.__ieDyn=1,t})(),t1=(function(){function t(e,n,r,i,o){var s=this;s.traceID=e||ti(),s.parentID=n;var a=Hn();!r&&a&&a.pathname&&(r=a.pathname,o&&(r=mr(r,o))),s.name=gt(i,r)}return t})();function cm(t){return!(typeof t!="string"||!t||t.match(/,|;|=| |\|/))}var n1=(function(){function t(e,n,r){this.isNewUser=!1,this.isUserCookieSet=!1;var i=wo(n),o=Hl(n),s;qe(t,this,function(a){Ae(a,"config",{g:function(){return e}});var c=ct(e,function(){var m=e.userCookiePostfix||"";s=t.userCookieName+m;var d=o.get(s);if(d){a[_l]=!1;var h=d.split(t[pa]);h.length>0&&(a.id=h[0],a[mu]=!!a.id)}if(!a.id){a.id=u();var g=l(a.id);f(g.join(t[pa]));var p=(e.namePrefix||"")+"ai_session";fk(i,p)}a[Yo]=e[Yo]||void 0;var v=o.get(t[wd]);if(v){v=decodeURI(v);var _=v.split(t[pa]);_[0]&&(a[es]=_[0]),_.length>1&&_[1]&&(a[Yo]=_[1])}});r&&r.add(c);function u(){var m=e||{},d=m.getNewId||$p,h=d(m.idLength?e.idLength:22);return h}function l(m){var d=Ns(new Date);a.accountAcquisitionDate=d,a[_l]=!0;var h=[m,d];return h}function f(m){var d=31536e3;a[mu]=o.set(s,m,d)}a.setAuthenticatedUserContext=function(m,d,h){h===void 0&&(h=!1);var g=!cm(m)||d&&!cm(d);if(g){J(i,2,60,"Setting auth user context failed. User auth/account id should be of type string, and not contain commas, semi-colons, equal signs, spaces, or vertical-bars.",!0);return}a[es]=m;var p=a[es];d&&(a[Yo]=d,p=[a[es],a.accountId].join(t[pa])),h&&o.set(t[wd],encodeURI(p))},a.clearAuthenticatedUserContext=function(){a[es]=null,a[Yo]=null,o.del(t[wd])},a.update=function(m){if(a.id!==m||!a[mu]){var d=m||u(),h=l(d);f(h.join(t[pa]))}}})}return t.cookieSeparator="|",t.userCookieName="ai_user",t.authUserCookieName="ai_authUser",t})(),Xc="ext",Gc="tags";function Vo(t,e){t&&t[e]&&wr(t[e]).length===0&&delete t[e]}function um(){return null}var r1=(function(){function t(e,n,r,i){var o=this,s=e.logger;qe(t,this,function(a){if(a.appId=um,a[yu]=um,a.application=new HT,a.internal=new XT(n,i),jl()){a[bl]=new e1(n,e,i),a.device=new BT,a.location=new GT,a.user=new n1(n,e,i);var c=void 0,u=void 0,l;r&&(c=r.getTraceId(),u=r.getSpanId(),l=r.getName()),a[Oh]=new t1(c,u,l,s),a[yl]=new m_}a[yu]=function(){var f=a[yl],m=null;if(f&&de(f.id))m=f.id;else{var d=(a[bl]||{})[Di];m=d&&de(d.id)?d.id:null}return m},a[l_]=function(f,m){We(zt(f.ext,Zt.AppExt),"sesId",a[yu](),de)},a[h_]=function(f,m){We(f.ext,Zt.OSExt,a.os)},a[f_]=function(f,m){var d=a.application;if(d){var h=zt(f,Gc);We(h,Xe.applicationVersion,d.ver,de),We(h,Xe.applicationBuild,d.build,de)}},a.applyDeviceContext=function(f,m){var d=a.device;if(d){var h=zt(zt(f,Xc),Zt.DeviceExt);We(h,"localId",d.id,de),We(h,"ip",d.ip,de),We(h,"model",d.model,de),We(h,"deviceClass",d.deviceClass,de)}},a[g_]=function(f,m){var d=a.internal;if(d){var h=zt(f,Gc);We(h,Xe.internalAgentVersion,d.agentVersion,de),We(h,Xe.internalSdkVersion,gt(s,d.sdkVersion,64),de),(f.baseType===ec.dataType||f.baseType===ui.dataType)&&(We(h,Xe.internalSnippet,d.snippetVer,de),We(h,Xe.internalSdkSrc,d.sdkSrc,de))}},a[p_]=function(f,m){var d=o.location;d&&We(zt(f,Gc,[]),Xe.locationIp,d.ip,de)},a[d_]=function(f,m){var d=a[Oh];if(d){var h=zt(zt(f,Xc),Zt.TraceExt,{traceID:void 0,parentID:void 0});We(h,"traceID",d.traceID,de,K),We(h,"name",d.name,de,K),We(h,"parentID",d.parentID,de,K)}},a.applyWebContext=function(f,m){var d=o.web;d&&We(zt(f,Xc),Zt.WebExt,d)},a.applyUserContext=function(f,m){var d=a.user;if(d){var h=zt(f,Gc,[]);We(h,Xe.userAccountId,d[Yo],de);var g=zt(zt(f,Xc),Zt.UserExt);We(g,"id",d.id,de),We(g,"authId",d[es],de)}},a.cleanUp=function(f,m){var d=f.ext;d&&(Vo(d,Zt.DeviceExt),Vo(d,Zt.UserExt),Vo(d,Zt.WebExt),Vo(d,Zt.OSExt),Vo(d,Zt.AppExt),Vo(d,Zt.TraceExt))}})}return t.__ieDyn=1,t})(),Wr,Sd,qo=null,i1=Ws((Wr={accountId:qo,sessionRenewalMs:1800*1e3,samplingPercentage:100,sessionExpirationMs:1440*60*1e3,cookieDomain:qo,sdkExtension:qo,isBrowserLinkTrackingEnabled:!1,appId:qo},Wr[yu]=qo,Wr.namePrefix=Sd,Wr[v_]=Sd,Wr.userCookiePostfix=Sd,Wr.idLength=22,Wr.getNewId=qo,Wr)),o1=(function(t){ir(e,t);function e(){var n=t.call(this)||this;n.priority=110,n.identifier=Ql;var r,i,o,s,a;return qe(e,n,function(c,u){l(),Ae(c,"context",{g:function(){return s}}),c.initialize=function(d,h,g,p){u.initialize(d,h,g,p),f(d)},c.processTelemetry=function(d,h){if(!K(d)){h=c._getTelCtx(h),d.name===ui.envelopeType&&h.diagLog().resetInternalMessageCount();var g=s||{};g[yl]&&typeof s[yl].id!="string"&&g[bl]&&g[bl].update();var p=g.user;if(p&&!p[mu]&&p.update(g.user.id),m(d,h),p&&p[_l]&&(p[_l]=!1,!a)){var v=new ec(72,(rr()||{}).userAgent||"");tI(h.diagLog(),1,v)}c.processNext(d,h)}},c._doTeardown=function(d,h){var g=(d||{}).core();if(g&&g[Cd]){var p=g[Cd](!1);p===i&&g.setTraceCtx(o)}l()};function l(){r=null,i=null,o=null,s=null,a=!0}function f(d){var h=c.identifier,g=c.core;c._addHook(ct(d,function(){var p=zn(null,d,g);d.storagePrefix&&tg(d.storagePrefix),a=d.disableUserInitMessage!==!1,r=p.getExtCfg(h,i1),c._extConfig=r})),o=g[Cd](!1),s=new r1(g,r,o,c._unloadHooks),i=Zp(c.context[Oh],o),g.setTraceCtx(i),c.context.appId=function(){var p=g.getPlugin(Rb);return p?p.plugin._appId:null}}function m(d,h){zt(d,"tags",[]),zt(d,"ext",{});var g=c.context;g[l_](d,h),g[f_](d,h),g.applyDeviceContext(d,h),g[d_](d,h),g.applyUserContext(d,h),g[h_](d,h),g.applyWebContext(d,h),g[p_](d,h),g[g_](d,h),g.cleanUp(d,h)}}),n}return e.__ieDyn=1,e})(So),y_="AuthenticatedUserContext",qs="track",Fh="snippet",s1="getCookieMgr",a1="startTrackPage",c1="stopTrackPage",Id="flush",u1="startTrackEvent",l1="stopTrackEvent",f1="addTelemetryInitializer",lm="pollInternalLogs",kd="getPlugin",Td="evtNamespace",d1=qs+"Event",h1=qs+"Trace",p1=qs+"Metric",g1=qs+"PageView",v1=qs+"Exception",m1=qs+"DependencyData",y1="set"+y_,b1="clear"+y_,_1="https://js.monitor.azure.com/scripts/b/ai.config.1.cfg.json",Cl="connectionString",Ed="version",Ei="queue",Ta="instrumentationKey",ts="userOverrideEndpointUrl",xd="endpointUrl",ga="onunloadFlush",ln="context",fm="addHousekeepingBeforeUnload",Pd="sendMessage",C1="updateSnippetDefinitions",On,Ho,Bo,Dd,va,dm=[Fh,"dependencies","properties","_snippetVersion","appInsightsNew","getSKUDefaults"],b_="iKeyUsage",__="CdnUsage",C_="SdkLoaderVer",w1="zipPayload",Jc=void 0,S1={samplingRate:100,maxSendNumber:1},I1={monthInterval:3,daysOfMonth:[28]},Qc={disabled:!0,limit:kn(S1),interval:kn(I1)},k1=(On={},On[Cl]=Jc,On.endpointUrl=Jc,On[Ta]=Jc,On[ts]=Jc,On.diagnosticLogInterval=Yu(T1,1e4),On.featureOptIn=(Ho={},Ho[b_]={mode:3},Ho[__]={mode:2},Ho[C_]={mode:2},Ho[w1]={mode:1},Ho),On.throttleMgrCfg=kn((Bo={},Bo[109]=kn(Qc),Bo[106]=kn(Qc),Bo[111]=kn(Qc),Bo[110]=kn(Qc),Bo)),On.extensionConfig=kn((Dd={},Dd.AppInsightsCfgSyncPlugin=kn({cfgUrl:_1,syncMode:2}),Dd)),On);function T1(t){return t&&t>0}function hm(t,e){return Qa(function(n,r){Kt(e,function(i){var o=i&&i.value,s=null;!i.rejected&&o&&(t[Cl]=o,s=wb(o)),n(s)})})}var E1=(function(){function t(e){var n=this,r,i,o,s,a,c,u,l,f,m,d,h,g,p;qe(t,this,function(v){x(),Ae(v,"config",{g:function(){return l}}),ee(["pluginVersionStringArr","pluginVersionString"],function(A){Ae(v,A,{g:function(){return u?u[A]:null}})}),s=""+(e.sv||e[Ed]||""),e[Ei]=e[Ei]||[],e[Ed]=e[Ed]||2;var _=_n(e.config||{},k1);l=_.cfg,f=new sT,Ae(v,"appInsights",{g:function(){return f}}),i=new o1,r=new qT,o=new zT,u=new zI,Ae(v,"core",{g:function(){return u}}),q(ct(_,function(){var A=l[Cl];if(fi(A)){var I=Qa(function(ne,se){Kt(hm(l,A),function(b){if(b.rejected)ne(null);else{var E=l[Ta],B=b.value;E=B&&B.instrumentationkey||E,ne(E)}})}),L=l[ts];K(L)&&(L=Qa(function(ne,se){Kt(hm(l,A),function(b){if(b.rejected)ne(null);else{var E=l[xd],B=b.value,M=B&&B.ingestionendpoint;E=M?M+Is:E,ne(E)}})})),l[Ta]=I,l[xd]=L}if(de(A)&&A){var O=wb(A),H=O.ingestionendpoint;l.endpointUrl=l[ts]?l[ts]:H+Is,l[Ta]=O.instrumentationkey||l[Ta]}l.endpointUrl=l[ts]?l[ts]:l[xd]})),v[Fh]=e,v[Id]=function(A,I){A===void 0&&(A=!0);var L;return rl(u,function(){return"AISKU.flush"},function(){A&&!I&&(L=Zn(function(ne){I=ne}));var O=1,H=function(){O--,O===0&&I()};ee(u.getChannels(),function(ne){ne&&(O++,ne[Id](A,H))}),H()},null,A),L},v[ga]=function(A){A===void 0&&(A=!0),ee(u.getChannels(),function(I){I[ga]?I[ga]():I[Id](A)})},v.loadAppInsights=function(A,I,L){A===void 0&&(A=!1),A&&aw("Legacy Mode is no longer supported");function O(H){if(H){var ne="";K(s)||(ne+=s),v[ln]&&v[ln].internal&&(v[ln].internal.snippetVer=ne||"-"),De(v,function(se,b){de(se)&&!pe(b)&&se&&se[0]!=="_"&&At(dm,se)===-1&&H[se]!==b&&(H[se]=b)})}}return rl(v.core,function(){return"AISKU.loadAppInsights"},function(){u.initialize(l,[o,i,r,f,m],I,L),Ae(v,"context",{g:function(){return i[ln]}}),d||(d=new hk(u));var H=x1();H&&v[ln]&&(v[ln].internal.sdkSrc=H),O(v[Fh]),v.emptyQueue(),v[lm](),v[fm](v),q(ct(_,function(){var ne=!1;l.throttleMgrCfg[109]&&(ne=!l.throttleMgrCfg[109].disabled),!d.isReady()&&l.extensionConfig&&l.extensionConfig[m.identifier]&&ne&&d.onReadyState(!0),!h&&!l[Cl]&&su(b_,l,!0)&&(d[Pd](106,"See Instrumentation key support at aka.ms/IkeyMigrate"),h=!0),!g&&v[ln].internal.sdkSrc&&v[ln].internal.sdkSrc.indexOf("az416426")!=-1&&su(__,l,!0)&&(d[Pd](110,"See Cdn support notice at aka.ms/JsActiveCdn"),g=!0),!p&&parseInt(s)<6&&su(C_,l,!0)&&(d[Pd](111,"An updated Sdk Loader is available, see aka.ms/SnippetVer"),p=!0)}))}),v},v[C1]=function(A){nS(A,v,function(I){return I&&At(dm,I)===-1})},v.emptyQueue=function(){try{if(Ce(v.snippet[Ei])){for(var A=v.snippet[Ei].length,I=0;I<A;I++){var L=v.snippet[Ei][I];L()}v.snippet[Ei]=void 0,delete v.snippet[Ei]}}catch(H){var O={};H&&pe(H.toString)&&(O.exception=H.toString())}},v[fm]=function(A){if(jl()||sy()){var I=function(){if(A[ga](!1),pe(v.core[kd])){var O=n.core[kd](Ql);if(O){var H=O.plugin;H&&H[ln]&&H[ln]._sessionManager&&H[ln]._sessionManager.backup()}}},L=!1;c||(c=gi(a,u[Td]&&u[Td]())),q(ct(l,function(O){var H=O.cfg,ne=A.appInsights,se=zn(null,H,ne.core),b=se.getExtCfg(ne.identifier||ng);R();var E=H.disablePageUnloadEvents;b.disableFlushOnBeforeUnload||(BI(I,E,c)&&(L=!0),uh(I,E,c)&&(L=!0),!L&&!_S()&&J(u.logger,1,19,"Could not add handler for beforeunload and pagehide")),!L&&!b.disableFlushOnUnload&&uh(I,E,c)}))}},v.getSender=function(){return o},v.unload=function(A,I,L){var O=!1,H;A!==!1&&!I&&(H=Zn(function(se){I=se}));function ne(se){O||(O=!0,x(),I&&I(se))}return v[ga](A),R(),u.unload&&u.unload(A,ne,L),H},ls(v,f,[s1,d1,g1,"trackPageViewPerformance",v1,"_onerror",h1,p1,a1,c1,u1,l1]),ls(v,P,[m1,"addDependencyListener","addDependencyInitializer"]),ls(v,u,[f1,lm,"stopPollingInternalLogs",kd,"addPlugin",Td,"addUnloadCb","getTraceCtx","updateCfg","onCfgChange"]),ls(v,function(){var A=i[ln];return A?A.user:null},[y1,b1]);function P(){return r}function x(){a=bn("AISKU"),c=null,r=null,i=null,o=null,s=null,d=null,h=!1,g=!1,p=!1,m=new pT}function R(){c&&(KI(null,c),XI(null,c))}function q(A){u.addUnloadHook(A)}})}return t.prototype.addDependencyInitializer=function(e){return null},t})();function x1(){if(va)return va;var t=null,e=!1,n=["://js.monitor.azure.com/","://az416426.vo.msecnd.net/"];try{var r=(document||{}).currentScript;r&&(t=r.src)}catch{}if(t){try{var i=t.toLowerCase();if(i){var o="";ee(n,function(s,a){if(at(i,s)!==-1)return o="cdn"+(a+1),at(i,"/scripts/")===-1&&(at(i,"/next/")!==-1?o+="-next":at(i,"/beta/")!==-1&&(o+="-beta")),va=o+(e?".mod":""),-1})}}catch{}va=t}return va}const P1=["NotLoggedIn","LoginFailed"],D1=["ResizeObserver loop limit exceeded","ResizeObserver loop completed with undelivered notifications."];var pm;const lc=((pm=window.Cbn)==null?void 0:pm.appInsightsConnectionString)??"",R1=new Vk,zr=new E1({config:{enableResponseHeaderTracking:!0,connectionString:lc,enableAutoRouteTracking:!0,enableUnhandledPromiseRejectionTracking:!0,extensions:[R1],enableAjaxErrorStatusText:!0,disableCookiesUsage:!0}}),A1=()=>!!lc&&lc!=="InstrumentationKey=00000000-0000-0000-0000-000000000000",M1=t=>{var e,n,r,i,o;if((e=t.data)!=null&&e.message){const s=O1(t.data.message);if(D1.includes(s))return Ea.addLog(t.data.message,"Error",{sendToTracker:!1}),!1;if(s==="Network Error"&&!window.navigator.onLine||s.includes("status code 401")||s==="Uncaught SyntaxError: Unexpected token '<'"&&(n=t.data.errorSrc)!=null&&n.startsWith("window.onerror")&&(r=t.data.errorSrc)!=null&&r.endsWith(".chunk.js:1:1"))return!1;const a=K1((i=t.data)==null?void 0:i.message);if((o=a==null?void 0:a.Causes)!=null&&o.some(c=>P1.includes(c.Id)))return!1}},z1=t=>{var e;const n=(e=t.baseData)==null?void 0:e.exceptions;if(!n)return!0;if(n.some(r=>r.stack.includes("chrome-extension://")))return!1},U1=t=>{var e;const n=t.data??{};t.baseType===Ht.dataType&&t.baseData&&(t.baseData.id=((e=t.baseData)==null?void 0:e.id)??w_(),n.errorGuid=t.baseData.id),t.data=n},N1=t=>{var e,n,r;const i=sc[(e=t.baseData)==null?void 0:e.severityLevel]??"Information";switch(t.baseType){case Ht.dataType:{const o=t.baseData,s=sc[o.severityLevel];o.exceptions.forEach(a=>{Ea.addLog(a.message,s??i,{envelope:t,sendToTracker:!1});const c=t.data??{};if(c._cbnUserDialogPrevented!==!0&&c._cbnErrorBoundary!==!0){const u=c._cbnUserMsg??a.message;Ea._Internals.showErrorDialog({header:"Error",text:u,errorId:o.id})}})}break;case yr.dataType:Ea.addLog(`Event "${(n=t.baseData)==null?void 0:n.name}"`,i,{envelope:t,sendToTracker:!1});break;default:Ea.addLog(((r=t.baseData)==null?void 0:r.message)??t.name,i,{envelope:t,sendToTracker:!1});break}},$1=lc!==void 0&&lc.startsWith("InstrumentationKey=");$1?zr.loadAppInsights():console.warn("AppInsights not initialized! The connections string wasn't properly injected.");function O1(t){return t.replace("PromiseRejectionEvent: ","").replace("ErrorEvent: ","").replace("AxiosError: ","")}zr.trackPageView();zr.addTelemetryInitializer(z1);zr.addTelemetryInitializer(U1);zr.addTelemetryInitializer(M1);zr.addTelemetryInitializer(N1);zr.addTelemetryInitializer(A1);const F1=()=>Math.floor(Math.random()*999).toString().padStart(3,"0"),w_=()=>Date.now().toString()+F1(),j1=()=>new Date().toISOString().slice(11,23);function L1(){const t=(new Error().stack||"").replace(/(\r\n|\n|\r)/gm,"").split(/\s{2,10}at /gm);return t.shift(),t}const W1={Verbose:{emoji:"๐งพ",style:"color: grey;"},Information:{emoji:"๐",style:"color: #466FD5;"},Warning:{emoji:"โ ๏ธ",style:"color: #ebc334;"},Error:{emoji:"๐",style:"color: red;"},Critical:{emoji:"๐ฅ",style:"color: red;"}};function V1(t,e,n){var r,i,o,s;const a=W1[e],c=n!=null&&n.customProperties?" | data = %O":"",u=n!=null&&n.envelope?" | envelope = %O":"",l=e==="Critical"?"[Critical] ":"",f=[((s=(o=(i=(r=n==null?void 0:n.envelope)==null?void 0:r.baseData)==null?void 0:i.exceptions)==null?void 0:o[0])==null?void 0:s.parsedStack)??L1(),a.style];n!=null&&n.customProperties&&f.push(n.customProperties),n!=null&&n.envelope&&f.push(n.envelope),console.log(`%O ${a.emoji} %c[${j1()}] ${l}${t}${u}${c}`,...f)}function q1(t){if(!t)return;const e={};return(t==null?void 0:t.show)!=="dialog"&&(e._cbnUserDialogPrevented=!0),t!=null&&t.userMessage&&(e._cbnUserMsg=t.userMessage),e}function H1(t,e){const n=w_(),r={id:n,exception:t instanceof Error?t:new Error(t),severityLevel:e!=null&&e.isCritical?sc.Critical:sc.Error,properties:{title:t.toString(),...e==null?void 0:e.customProperties}};return zr.trackException(r,q1(e)),n}var ns,rs,jh,S_;class B1{constructor(){le(this,jh),le(this,ns),le(this,rs,[]),lo(this,"_Internals",{subscribeUiListener:e=>{if(w(this,ns)){console.warn("Logger UI listener is already registered. Ensure that this only happens once!");return}Me(this,ns,e),w(this,rs).forEach(n=>this._Internals.showErrorDialog(n)),Me(this,rs,[])},showErrorDialog:e=>{w(this,ns)?w(this,ns).call(this,e):(w(this,rs).length===0&&on(this,jh,S_).call(this),w(this,rs).push(e))}})}addLog(e,n="Information",r){(r==null?void 0:r.sendToTracker)!==!1?zr.trackTrace({message:e,severityLevel:sc[n],properties:r==null?void 0:r.customProperties}):V1(e,n,r)}reportError(e,n){return H1(e,n)}}ns=new WeakMap,rs=new WeakMap,jh=new WeakSet,S_=async function(){};const Ea=new B1,I_=t=>typeof t=="object"&&t!==null&&t.$typ!==void 0&&t.Id!==void 0;function xa(t,e){return I_(t)?e?e.includes(t.Id):!0:!1}function K1(t){const e=t.replace(/^[^{]+/g,"");let n;try{n=JSON.parse(e)}catch{return}return xa(n)?n:void 0}function Fn(t){throw new Error(I_(t)?`${t.Id} - ${t.Message}`:"Unknown error")}const Lh="CmpEditor_",k_=k.z.custom(t=>Mr(t)&&t.startsWith(Lh)&&B0.safeParse(t.substring(Lh.length)).success),X1=t=>k_.safeParse(t).success,gm=t=>`CmpEditor_${t}`,G1=t=>t.substring(Lh.length);function J1(t){const e=t.substring(t.indexOf("<")+1,t.lastIndexOf(">"));if(!H0(e))throw new Error(`Invalid input type: ${e}`);return e}const T_=k.z.string();k.z.array(T_);const Q1=k.z.string(),Z1=t=>t.split("."),Y1=t=>{const e=Z1(t);return e[e.length-1]},Zl=k.z.enum(["value","width","height","minWidth","maxWidth","minHeight","maxHeight","backgroundNormal","backgroundHover","backgroundPressed","border","borderRadius","font","color","captionText","captionWidth","errorMsg","description","flexGrow","flexWrap","opacity","gap","visible","enabled","tooltipText","rawHtml","wrapText","text","placeholder","dataEntries","dataTemplate","tooltipKey","collapsed","group"]),eE=k.z.record(Zl,Am),E_=k.z.lazy(()=>k.z.union([eE,k.z.record(E_)])),tE=k.z.record(Zl,Pm),x_=k.z.lazy(()=>k.z.union([tE,k.z.record(x_)])),nE=k.z.object({Name:k.z.literal("Fiber"),$val:E_,$typ:x_.optional()}),rE=k.z.object({Fibers:k.z.record(Zl,k.z.object({$src:Em,$typ:Pm})),Name:k.z.literal(gn.FiberEditor),Pack:Q1}),P_=t=>rE.safeParse(t).success;function bu(t,e){const n=[];for(const[r,i]of Object.entries(t))if(e&&r==="$val")n.push({ctrlId:e,values:i});else if(r!=="$val"){const o=bu(i,r);n.push(...o)}return n}const vm="CtrlFiberEditor_",iE=k.z.custom(t=>Mr(t)&&t.startsWith(vm)&&T_.safeParse(t.substring(vm.length)).success),D_=t=>iE.safeParse(t).success,mm=t=>`CtrlFiberEditor_${t}`,oE=["NotLoggedIn","AuthenticationFailed","SessionTimedOut","CfgnSessionTimedOut","Unauthorized"];var Ke,dn,Ri,_u,Ai,Cu,Wh,Mi,zi;class sE{constructor(e,n){le(this,Cu),le(this,Ke),le(this,dn),le(this,Ri,[]),le(this,_u,async()=>{if(w(this,Ri).length===0)return;Je("WsConfiguratorClientInternals","#sendDeferredServerCallsAfterReconnect","Sending queued messages",w(this,Ri));const r=w(this,Ri).map(i=>this._callServer(...i));Me(this,Ri,[]),await Promise.all(r)}),lo(this,"_callServer",async(r,i,o)=>{const s=w(this,Ke).connection;if(!s||w(this,Ke).state!=="connected"){Je("ConfiguratorClientInternals","_callServer","Not connected. Message queued to be sent later.",{method:r,args:i,options:o}),w(this,Ri).push([r,i,o]);const f=w(this,Ke).state==="connecting";return w(this,Ke).isInitialized&&!f&&w(this,Ke).restoreConnection(),null}const a=(o==null?void 0:o.requestId)??w(this,Ke).getNextRequestId();Je("ConfiguratorClientInternals",`_callServer, ID ${a}`,"",{method:r,args:i,options:o}),w(this,Ke).extendSessionLifetime();const c=o!=null&&o.requestId?[...i,o.requestId]:i,[u,l]=await ms(s.invoke(r,...c));return u?et("ConfiguratorClientInternals",`_callServer, ID ${a}`,"InvocationError:",u):l.error&&(xa(l.error,oE)&&mC(),et("ConfiguratorClientInternals",`_callServer, ID ${a}`,"Error in response:",l.error)),Je("ConfiguratorClientInternals",`_callServer, ID ${a}`,"Result:",l),l}),le(this,Ai,[]),le(this,Mi,[]),le(this,zi,[]),Me(this,Ke,e),w(this,Ke).onConnected(()=>w(this,_u).call(this)),w(this,Ke).onConnectionRestored(()=>w(this,_u).call(this)),Me(this,dn,n)}async setCmpInput(e,n,r){const[i]=await ms(on(this,Cu,Wh).call(this,e,n,"change-cfgn-value",r));if(i instanceof Nd)return i.message;if(i)throw i}async setCmpPresetInput(e,n,r,i){const o=!q0(r)&&Mr(n),[s,a]=o?Ml(n):[null,n];if(s)return s.message;const c=oC(r),[u]=await ms(on(this,Cu,Wh).call(this,e,a,i,c));if(u instanceof Nd)return u.message;if(u)throw u}async setCmpInputType(e,n){const r=await this._callServer("ChangeConfigurationValueType",[e,n],{isChunkable:!0});if(r!=null&&r.error){if(xa(r.error))return r.error.Message;throw new Error("Unknown error")}else return}async setCmpHiveRule(e,n,r){const i={name:e,changes:[{name:r?"Query":"Value",value:n}]};await this._callServer("SetCmpValue",[i],{isChunkable:!0})}async setCmpGroup(e,n){const r={name:e,changes:[{name:"Group",value:n}]};await this._callServer("SetCmpValue",[r])}async fetchCmpPropertyValue(e){let n=()=>{};const r=new Promise(i=>n=i);if(w(this,Mi).push({resolver:n,values:e}),await Md(0),w(this,Mi).length){const i=w(this,Mi).map(a=>a.resolver),o=w(this,Mi).flatMap(({values:a})=>a.map(({name:c,property:u})=>({name:c,...u!=="Value"&&{property:[u]}})));Me(this,Mi,[]);const s=w(this,Ke).getNextRequestId();this._callServer("GetCmpValue",[o],{requestId:s}),await w(this,dn).awaitCspdUpdateResponse(s),i.forEach(a=>a())}return r}async subscribeToCmpUpdates(e,n,r=!1){let i=()=>{};const o=new Promise(s=>i=s);if(w(this,zi).push({resolver:i,values:{name:e,property:n,lazy:r}}),await Md(0),w(this,zi).length){const s=w(this,zi).map(u=>u.resolver),a=w(this,zi).map(({values:{name:u,property:l,lazy:f}})=>({name:u,...l!=="Value"&&{property:[l]},...f===!0&&{lazy:f}}));Me(this,zi,[]);const c=w(this,Ke).getNextRequestId();this._callServer("SubscribeCmpUpdate",[a],{requestId:c}),await w(this,dn).awaitCspdUpdateResponse(c),s.forEach(u=>u())}return o}async requestCmpEditorCspd(e,n){const r=w(this,Ke).getNextRequestId(),i=gm(e);this._callServer("RequestCspd",[[{slot:i,cspdId:n?gn.TableEditor:gn.ValueEditor,targetComponent:e,parameters:void 0}]],{requestId:r}),await w(this,dn).awaitCspdUpdateResponse(r)}async releaseCmpEditorCspd(e){const n=e.map(r=>gm(r));await this._callServer("ReleaseCspd",n)}async createCmp(e,n,r){const i=[e,n,r],o=await this._callServer("CreateComponent",i);o!=null&&o.error&&Fn(o.error)}async renameCmp(e,n){const r=[e,n],i=await this._callServer("RenameComponent",r);i!=null&&i.error&&Fn(i.error)}async renameCmpGroup(e,n){const r=[e,n],i=await this._callServer("RenameComponentGroup",r);i!=null&&i.error&&Fn(i.error)}async copyCmp(e,n){const r=[e,n],i=await this._callServer("CopyComponent",r);i!=null&&i.error&&Fn(i.error)}async deleteCmp(e){const n=[e],r=await this._callServer("DeleteComponent",n);r!=null&&r.error&&Fn(r.error)}async initiateCfgrFiles(e){const n=await this._callServer("InitiateCfgrFiles",[e]);return Je("ConfiguratorClientInternals","initiateCfgrFiles","After initiate",{payload:e,result:n}),n!=null&&n.error&&Fn(n.error),(n==null?void 0:n.value)??{}}async completeCfgrFiles(e){const n=w(this,Ke).getNextRequestId(),r=await this._callServer("CompleteCfgrFiles",[e],{requestId:n});return Je("ConfiguratorClientInternals","completeCfgrFiles","After complete",{payload:e,result:r}),r!=null&&r.error&&Fn(r.error),(r==null?void 0:r.value)??{}}async deleteCfgrFile(e,n){const r=w(this,Ke).getNextRequestId(),i=await this._callServer("DeleteCfgrFile",[e,n],{requestId:r});Je("ConfiguratorClientInternals","deleteCfgrFile","After complete",{payload:{type:e,fileName:n},result:i}),i!=null&&i.error&&Fn(i.error)}async initiateCfgnFiles(e){const n=await this._callServer("InitiateCfgnFiles",[e]);return Je("ConfiguratorClientInternals","initiateCfgnFiles","After initiate",{payload:e,result:n}),(n==null?void 0:n.value)??{}}async completeCfgnFiles(e){const n=w(this,Ke).getNextRequestId(),r=[this._callServer("CompleteCfgnFiles",[e],{requestId:n}),w(this,dn).awaitCspdUpdateResponse(n)],[i]=await Promise.all(r);return Je("ConfiguratorClientInternals","completeCfgnFiles","After complete",{payload:e,result:i}),(i==null?void 0:i.value)??{}}async completeCfgnFileAndConvertToPdf(e,n,r){const i=w(this,Ke).getNextRequestId(),o=[this._callServer("CompleteCfgnFileAndConvertToPdf",[e,n,r],{requestId:i}),w(this,dn).awaitCspdUpdateResponse(i)],[s]=await Promise.all(o);return Je("ConfiguratorClientInternals","completeCfgnFiles","After complete",{payload:{fileName:e,sasUri:n,pdfOptions:r},result:s}),s}async shareConfiguration(e){const n=w(this,Ke).getNextRequestId(),r=await this._callServer("ShareConfiguration",[e],{requestId:n});return r==null?void 0:r.value}async checkoutConfiguration(e){const n=w(this,Ke).getNextRequestId(),r=await this._callServer("Checkout",[e],{requestId:n});return r==null?void 0:r.value}async finishConfiguration(e){const n=w(this,Ke).getNextRequestId(),r=await this._callServer("Finish",[e],{requestId:n});return r==null?void 0:r.value}async assignAssetBundleToCfgrDraft(e,n,r,i){const o=[e,n,r,i],s=await this._callServer("AssignAssetBundleToCfgrDraft",o);s!=null&&s.error&&Fn(s.error)}async unassignAssetBundleFromCfgrDraft(e){const n=[e],r=await this._callServer("UnassignAssetBundleFromCfgrDraft",n);r!=null&&r.error&&Fn(r.error)}async requestCtrlFiberCspd(){const e=w(this,Ke).getNextRequestId();this._callServer("RequestCspd",[[{slot:Tc.Fiber,cspdId:gn.Fiber,targetComponent:ur.CtrlFibers,parameters:void 0}]],{requestId:e}),await w(this,dn).awaitCspdUpdateResponse(e)}async releaseCtrlFiberCspd(){await this._callServer("ReleaseCspd",[Tc.Fiber])}async requestCtrlFiberEditorCspd(e,n){const r=w(this,Ke).getNextRequestId(),i=mm(e);this._callServer("RequestCspd",[[{slot:i,cspdId:gn.FiberEditor,targetComponent:`${ur.CtrlFibers}.${n}`,parameters:void 0}]],{requestId:r}),await w(this,dn).awaitCspdUpdateResponse(r)}async releaseCtrlFiberEditorCspd(e){const n=e.map(r=>mm(r));await this._callServer("ReleaseCspd",n)}async createOrChangeCtrlFiber(e,n,r,i){const o=`${ur.CtrlFibers}.${e}`;await this._callServer("CreateOrChangeFiber",[o,n,r,i])}async deleteCtrlFiber(e,n){const r=`${ur.CtrlFibers}.${e}`;await this._callServer("DeleteFiber",[r,n])}async deleteCtrlFiberPack(e){const n=`${ur.CtrlFibers}.${e}`;await this._callServer("DeleteFiberPack",[n])}async moveCtrlFiberPack(e,n){const r=`${ur.CtrlFibers}.${e}`,i=`${ur.CtrlFibers}.${n}`;await this._callServer("MoveFiberPack",[r,i])}async copyCtrlFiberPack(e,n,r){const i=`${ur.CtrlFibers}.${e}`,o=`${ur.CtrlFibers}.${n}`;await this._callServer("CopyFiberPack",[i,o,r])}async publishCfgr(e,n,r,i){const o=await this._callServer("Publish",[e,n,r,i]);if(xa(o==null?void 0:o.error))return o.error}async setCfgrValue(e,n){const r=await this._callServer("SetCfgrValue",[{name:e,value:n}]);if(xa(r==null?void 0:r.error))return r.error}async requestCfgrFieldCspd(){const e=w(this,Ke).getNextRequestId();this._callServer("RequestCspd",[[{slot:Tc.CfgrField,cspdId:gn.CfgrField,targetComponent:"FinishActions",parameters:void 0}]],{requestId:e}),await w(this,dn).awaitCspdUpdateResponse(e)}async releaseCfgrFieldCspd(){await this._callServer("ReleaseCspd",[Tc.CfgrField])}}Ke=new WeakMap,dn=new WeakMap,Ri=new WeakMap,_u=new WeakMap,Ai=new WeakMap,Cu=new WeakSet,Wh=async function(t,e,n,r){let i=()=>{};const o=new Promise(s=>i=s);if(w(this,Ai).push({resolver:i,values:{name:t,value:e,zodType:r}}),await Md(0),w(this,Ai).length){const s=w(this,Ai).map(m=>m.resolver),a=w(this,Ai).filter((m,d,h)=>h.findLastIndex(g=>g.values.name===m.values.name)<=d);Me(this,Ai,[]);const c=a.map(({values:{name:m,value:d,zodType:h}})=>{const g=d!==void 0&&Wm(d)?sC(m,d,h):d;return{name:m,value:g}}),u=n==="change-preset-value",l=u?void 0:w(this,Ke).getNextRequestId(),f=u?"ChangePresetValue":"ChangeConfigurationValue";this._callServer(f,[c],{requestId:l,isChunkable:!0}),l&&await w(this,dn).awaitCspdUpdateResponse(l),s.forEach(m=>m())}return o},Mi=new WeakMap,zi=new WeakMap;var R_=(t=>(t[t.Fedl=1]="Fedl",t[t.Css=2]="Css",t[t.JavaScript=3]="JavaScript",t[t.CustomCodePack=4]="CustomCodePack",t[t.Fedl2=5]="Fedl2",t))(R_||{}),Vh,is,Pa;class aE{constructor(){le(this,Vh,600*1e3-60*1e3),le(this,is),le(this,Pa),Me(this,Pa,new Rl)}onSessionLifeTimeReached(e){w(this,Pa).on("sessionLifeTimeReached",e)}restartSessionLifeTimer(){this.stopSessionLifeTimer(),Me(this,is,window.setTimeout(()=>{w(this,Pa).emit("sessionLifeTimeReached")},w(this,Vh)))}stopSessionLifeTimer(){w(this,is)&&(window.clearTimeout(w(this,is)),Me(this,is,void 0))}}Vh=new WeakMap,is=new WeakMap,Pa=new WeakMap;const cE=k.z.enum(["edit","view"]),uE=t=>cE.safeParse(t).success,lE="wss://portal.combeenation.com/signalR",fE={[N.Trace]:"Trace",[N.Debug]:"Debug",[N.Information]:"Information",[N.Warning]:"Warning",[N.Error]:"Error",[N.Critical]:"Critical",[N.None]:"None"},dE="userland",hE=k.z.enum(["theme","user",dE]),pE=k.z.object({lastEditedAt:k.z.number(),lastEditedBy:k.z.string(),size:k.z.number(),type:k.z.nativeEnum(R_),url:k.z.string().url()}),gE=k.z.object({fedl:k.z.object({lastEditedAt:Z0,lastEditedBy:k.z.string(),metadata:k.z.object({LayoutVersion:k.z.string()}),size:k.z.number(),url:k.z.string().url()}),customCode:k.z.record(k.z.string(),pE).optional(),css:k.z.record(hE,k.z.object({url:k.z.string().url()})).optional()}),vE=k.z.object({value:k.z.object({cfgrVersion:k.z.string(),draftName:k.z.string(),lastEditedAt:k.z.number(),lastEditedBy:k.z.string(),presetId:k.z.string(),published:k.z.object({isPublished:k.z.boolean(),version:k.z.string()}),files:gE})}),A_=k.z.object({value:k.z.object({cfgrVersion:k.z.string(),copyUrl:k.z.string(),editUrl:k.z.string(),newUrl:k.z.string()})}),ym=t=>A_.safeParse(t).success;var br,en,qh,wl,tn,ps,As,Vt,Hh,M_,bm,_m,wu;class mE{constructor(){le(this,tn),le(this,br),le(this,en),le(this,qh,N.Warning),le(this,wl,"not-initialized"),le(this,As),le(this,Vt),le(this,Hh,0),lo(this,"getNextRequestId",()=>(++$0(this,Hh)._).toString()),Me(this,br,new aE),w(this,br).onSessionLifeTimeReached(()=>on(this,tn,M_).call(this)),Me(this,en,new Rl)}get state(){return w(this,wl)}get isInitialized(){return this.state!=="not-initialized"}get connection(){return w(this,Vt)}onConnected(e){w(this,en).on("connectionEstablished",e)}onConnectionClosed(e){w(this,en).on("connectionClosed",e)}onCspdUpdate(e){w(this,en).on("cspdUpdate",e)}onCspdUpdateParts(e){w(this,en).on("cspdUpdateParts",e)}onConnectionRestored(e){w(this,en).on("connectionRestored",e)}async connectEditor(e){return await on(this,tn,wu).call(this,e)}async connectCfgr(e){return await on(this,tn,wu).call(this,e)}async restoreConnection(){if(!w(this,As)){et("ConnectionManager","restoreConnection","There's no previous connection to restore. Create a connection with `client.connectEditor()` or `client.connectCfgr()` first.");return}w(this,br).stopSessionLifeTimer();const[e]=await ms(this.closeConnection());e&&et("ConnectionManager","restoreConnection","Error closing connection",e),await on(this,tn,wu).call(this,w(this,As))&&w(this,en).emit("connectionRestored")}async closeConnection(){var e;Me(this,tn,"disconnecting",ps);try{await((e=w(this,Vt))==null?void 0:e.stop())}catch{}Me(this,tn,"disconnected",ps)}extendSessionLifetime(){w(this,br).restartSessionLifeTimer()}}br=new WeakMap,en=new WeakMap,qh=new WeakMap,wl=new WeakMap,tn=new WeakSet,ps=function(t){Me(this,wl,t),Je("ConnectionManager","",`State changed to "${t}"`)},As=new WeakMap,Vt=new WeakMap,Hh=new WeakMap,M_=function(){Je("ConnectionManager","#onSessionLifeTimeReached","Session lifetime reached"),this.closeConnection()},bm=function(t,e){if(t<w(this,qh))return;const n=fE[t];Je("ConnectionManager","#onConnectionLog",`[SignalR ${n}] ${e}`,{logLevel:t},"yellow")},_m=function(t){t?et("ConnectionManager","#handleConnectionClosed","Connection closed with error",t):this.state!=="disconnecting"?et("ConnectionManager","#handleConnectionClosed","Connection closed unexpectedly"):Je("ConnectionManager","#handleConnectionClosed","Connection closed"),Me(this,Vt,void 0),Me(this,tn,"disconnected",ps),w(this,br).stopSessionLifeTimer(),w(this,en).emit("connectionClosed")},wu=async function(t){if(Je("ConnectionManager","connect","Connecting to configurator"),this.isInitialized&&this.state!=="disconnected"){et("ConnectionManager","connect",`Cannot connect whilst in state "${this.state}"`);return}Me(this,tn,"connecting",ps),Me(this,As,t),w(this,br).stopSessionLifeTimer();const e=t.serverUrl??lE;Me(this,Vt,new M0().withUrl(e,{transport:lt.WebSockets,skipNegotiation:!0}).configureLogging({log:on(this,tn,bm).bind(this)}).build()),w(this,Vt).onclose(g=>on(this,tn,_m).call(this,g)),w(this,Vt).on("cspdUpdate",g=>{w(this,en).emit("cspdUpdate",g)}),w(this,Vt).on("cspdUpdateParts",(g,p,v,_)=>w(this,en).emit("cspdUpdateParts",g,p,v,_));const[n]=await ms(w(this,Vt).start());if(n){et("ConnectionManager","connect","Connecting to configurator failed",n),await this.closeConnection();return}Je("ConnectionManager","connect","WS connection established");const r=uE(t.mode),i=r?["",t.companyName,t.configuratorName,t.draftName,t.mode,"000"]:[t.mode,t.companyName,t.configuratorName,...t.mode==="preview"||t.mode==="staging"?[t.draftName]:[],...t.editCfgn?[t.editCfgn.cfgnId,"edit",t.editCfgn.authToken]:[]],o=this.getNextRequestId(),s=window.innerWidth,a=window.innerHeight,c={cbnInitialWindowWidth:s.toString(),cbnInitialWindowHeight:a.toString()},u={width:s,height:a,userAgent:navigator.userAgent},l=void 0,[f,m]=await ms(r?w(this,Vt).invoke("StartProductEditor",i,o,c,l):w(this,Vt).invoke("StartConfiguration",i,o,c,l,u)),d=r?vE.safeParse(m):A_.safeParse(m);if(f||!d.success){const g=f??d.error;et("ConnectionManager","connect",f?"Error starting configuration":"Error parsing start response",{error:g,startCfgnResponse:m}),await this.closeConnection();return}const h=ym(d.data)?Vm(d.data.value.editUrl):{cfgnId:"not-used-in-editor",authToken:"not-used-in-editor"};if(!h||!h.cfgnId||!h.authToken)throw new Error("Error parsing edit URL from start response");if(Je("ConnectionManager","connect","Connection to configurator established",{startCfgnResponseParsed:d}),Me(this,tn,"connected",ps),w(this,br).restartSessionLifeTimer(),w(this,en).emit("connectionEstablished"),ym(d.data)){const{cfgnId:g,authToken:p}=h;return w(this,As).editCfgn={cfgnId:g,authToken:p},{connection:w(this,Vt),...d.data.value,cfgnId:g,authToken:p}}else return{connection:w(this,Vt),...d.data.value}};const yE=k.z.object({Name:k.z.literal(gn.CfgrField),$val:k.z.unknown(),$inp:k.z.string().nullable(),$src:Em}),bE=k.z.object({Name:L0,ComponentInfo:k.z.object({$nam:k.z.string(),$typ:Dm}).optional(),Group:k.z.object({$val:k.z.string()}).optional(),Value:k.z.object({$val:Am,$inp:Rm.optional(),$ipt:xm.optional(),$src:k.z.string().optional()}).optional(),Query:k.z.union([k.z.object({$val:k.z.union([k.z.literal("[DataSourceQuery]"),dp]),$src:k.z.string()}),k.z.object({}).transform(()=>{})]).optional(),Archive:k.z.object({$val:k.z.boolean()}).optional()}),_E=k.z.record(k_,bE),CE=k.z.enum(["Value","Records"]),wE=k.z.object({Name:k.z.literal("ComponentList").or(k.z.literal("Configurator")),$val:k.z.record(k.z.string(),k.z.union([k.z.object({$typ:Dm.optional(),$chg:k.z.array(CE).optional(),Value:k.z.any().optional(),Group:k.z.string().optional()}),k.z.string().array()]))}),SE=k.z.union([k.z.number(),k.z.array(k.z.number()),k.z.null()]),z_=k.z.lazy(()=>k.z.union([SE,k.z.record(z_)])),IE=k.z.record(Zl,k.z.union([k.z.number(),k.z.array(k.z.number()),k.z.null()])),U_=k.z.lazy(()=>k.z.union([IE,k.z.record(U_)])),kE=k.z.object({Name:k.z.literal("ConfiguratorInspector"),Errors:k.z.object({Cfgr:z_.optional(),Fibers:k.z.object({CtrlFibers:U_.optional()}).optional(),$val:k.z.array(k.z.object({Id:k.z.string(),Message:k.z.string(),route:k.z.any()}))})}),TE=k.z.object({number:k.z.number(),partialNumber:k.z.number().optional(),isPartial:k.z.boolean().optional(),request:k.z.string().optional(),west:wE.optional(),fiber:nE.optional(),inspector:kE.optional(),cfgrField:yE.optional()}).passthrough().refine(t=>Object.keys(t).filter(D_).every(e=>P_(t[e]))),EE=t=>!isNaN(t.partialNumber??NaN);var Ze,Wa,Su,Iu,os,Da,ku,Bh,Kh,N_,Ra,Xh,hr,Gh,Jh,Qh,gs,Zh,Xr,Yh,ep,tp,np,rp,ip,op,ss;class xE{constructor(e,n){le(this,Kh),le(this,Ze),le(this,Wa,!1),le(this,Su,{}),le(this,Iu,{}),le(this,os),le(this,Da,new Map),le(this,ku,new Map),lo(this,"awaitCspdUpdateResponse",async r=>{const i=w(this,ku).get(r);if(i)return i;const o=new Promise(s=>w(this,Da).set(r,s));return w(this,ku).set(r,o),o}),le(this,Bh,r=>{const i=w(this,Da).get(r);i&&(i(),w(this,Da).delete(r))}),le(this,Ra,{}),le(this,Xh,async(r,i,o,s)=>{Je("WsCspdUpdateHandler","#handleCspdUpdateParts","Received cspd update part",{msgId:r,partNr:i,totalParts:o,msgPart:s});const a=w(this,Ra)[r]??{messageParts:[],receivedPartsCnt:0,totalParts:o};if(a.receivedPartsCnt++,a.messageParts[i]=s,w(this,Ra)[r]=a,a.totalParts===a.receivedPartsCnt){delete w(this,Ra)[r];const c=a.messageParts.join("");Je("WsCspdUpdateHandler","#handleCspdUpdateParts","All cspd update parts received",{message:c}),w(this,ss).call(this,c)}}),le(this,hr,{}),le(this,Gh,async r=>{Je("WsCspdUpdateHandler","#handleCspdUpdatePartial","",{data:r});const i=r.number;w(this,hr)[i]||(w(this,hr)[i]=[]),w(this,hr)[i][r.partialNumber]=r;const o=Object.values(w(this,hr)[i]).find(a=>!a.isPartial),s=w(this,hr)[i].filter(Boolean);if(o&&s.length===o.partialNumber+1&&s.every((a,c)=>a.partialNumber===c)){const a=Vn(...w(this,hr)[i]);delete a.partialNumber,delete a.isPartial,Je("WsCspdUpdateHandler","#handleCspdUpdatePartial","All partial parts received",{mergedData:a}),delete w(this,hr)[i],w(this,ss).call(this,a)}}),le(this,Jh,2147483647),le(this,Qh,-2147483648),le(this,gs,0),le(this,Zh,()=>{const r=w(this,gs);return w(this,Jh)===r?w(this,Qh):r+1}),le(this,Xr,[]),le(this,Yh,r=>{const[i,o]=Ml(r);if(i)return[i,null];const{error:s,data:a}=TE.safeParse(o);if(s)return[s,null];const c=(o&&typeof o=="object"?Object.entries(o):[]).reduce((m,[d,h])=>(X1(d)&&(m[d]=h),m),{}),{error:u,data:l}=_E.safeParse(c);if(u)return[u,null];const f={...a,...Object.keys(l).length&&{editorData:l}};return[null,{rawResponse:o,parsedResponse:f}]}),le(this,ep,r=>{const i=r.$del??[],o=Object.entries(r),{staleCmps:s,updatedCmps:a}=(o==null?void 0:o.reduce((c,[u,l])=>{if(It(l))return c;const{$chg:f,$typ:m,Value:d,Group:h}=l;f&&c.staleCmps.push({name:u,changedCmpProperties:f});const g=Ls(u);m&&(w(this,Su)[g]=m);const p=w(this,Su)[g],v=_g(p),_=j0.some(x=>v===x),P=f==null?void 0:f.includes("Value");if(!_&&!P){const[x,R]=eu(()=>w(this,os).call(this,g,p,d));if(x){const q=x instanceof Error?x.message:"Unknown error",A={name:u,type:p,value:d,error:x};et("WsCspdUpdateHandler","#getCmpListDataFromCspdUpdate",`Failed to parse cmp value: ${q}`,A)}else c.updatedCmps.push({name:u,value:R,type:p,group:h})}return c},{staleCmps:[],updatedCmps:[]}))??{staleCmps:[],updatedCmps:[]};return{staleCmps:s,updatedCmps:a,deletedCmps:i}}),le(this,tp,r=>Object.entries(r).map(([i,o])=>{const s=G1(i),{$typ:a}=o.ComponentInfo??{},{$inp:c,$ipt:u,$src:l,$val:f}=o.Value??{},{$src:m}=o.Query??{};a&&(w(this,Iu)[s]=a);const d=w(this,Iu)[s],h=bg(f)?f:void 0,[g,p]=h?[void 0,void 0]:eu(()=>w(this,os).call(this,s,d,f));if(g){const L=g instanceof Error?g.message:"Unknown error",O={cmpId:s,cmpType:d,value:f};et("WsCspdUpdateHandler","#getCmpEditorDataFromCspdUpdate",`Failed to parse cmp editor value: ${L}`,O)}const v=_g(d),_=jm(d),P=u||d&&J1(d),x=`${v}<${P}>`,[R,q]=eu(()=>w(this,os).call(this,s,x,c));if(R){const L=R instanceof Error?R.message:"Unknown error",O={cmpId:s,cmpType:d,value:c};et("WsCspdUpdateHandler","#getCmpEditorDataFromCspdUpdate",`Failed to parse cmp editor input value: ${L}`,O)}const A=l??m??"",I=_r(q)||It(q)?JSON.stringify(q):q;return{cmpId:s,value:p,error:h,input:I,inputType:P,source:A,type:_,baseType:v}})??[]),le(this,np,r=>{const i=bu(r.$val),o=r.$typ?bu(r.$typ):[];return{updatedFibers:i.reduce((s,{ctrlId:a,values:c})=>(s[a]=Object.entries(c).map(([u,l])=>{var f;const m=u,d=(f=o.find(g=>g.ctrlId===a))==null?void 0:f.values[m],h=bg(l)?l:void 0;return{propertyName:m,type:d,value:h?void 0:l,error:h}}),s),{})}}),le(this,rp,r=>r.map(i=>{const o=Y1(i.Pack),s=Object.entries(i.Fibers).map(([a,c])=>({propertyName:a,type:c.$typ,hiveRule:c.$src}));return{ctrlId:o,fibers:s}})),le(this,ip,r=>{var i;const o=v=>{if(typeof v=="number"||It(v)||v===null)return v;const _=Object.keys(v).filter(x=>x!=="$err")[0],P=v[_];return o(P)},s={cmpsWithSourceErrors:[],cmpsWithCascadingErrors:[],cmpsWithResolvedErrors:[]},a=r.Errors.Cfgr,{cmpsWithSourceErrors:c,cmpsWithCascadingErrors:u,cmpsWithResolvedErrors:l}=a?Object.entries(a).reduce((v,[_,P])=>{const x=o(P);return typeof x=="number"?v.cmpsWithSourceErrors.push(_):It(x)?v.cmpsWithCascadingErrors.push(_):x===null&&v.cmpsWithResolvedErrors.push(_),v},s):s,f={ctrlFibersWithSourceErrors:[],ctrlFibersWithCascadingErrors:[],ctrlFibersWithResolvedErrors:[]},m=(i=r.Errors.Fibers)==null?void 0:i.CtrlFibers,d=m&&bu(m),{ctrlFibersWithSourceErrors:h,ctrlFibersWithCascadingErrors:g,ctrlFibersWithResolvedErrors:p}=d?d.reduce((v,{ctrlId:_,values:P})=>(Object.entries(P).forEach(([x,R])=>{const q=x;typeof R=="number"?v.ctrlFibersWithSourceErrors.push({ctrlId:_,fiberName:q}):It(R)?v.ctrlFibersWithCascadingErrors.push({ctrlId:_,fiberName:q}):R===null&&v.ctrlFibersWithResolvedErrors.push({ctrlId:_,fiberName:q})}),v),f):f;return{cmpsWithSourceErrors:c,cmpsWithCascadingErrors:u,cmpsWithResolvedErrors:l,ctrlFibersWithSourceErrors:h,ctrlFibersWithCascadingErrors:g,ctrlFibersWithResolvedErrors:p}}),le(this,op,r=>{const i=r.$src,o=r.$val,s=r.$inp;return{source:i,value:o,input:s}}),le(this,ss,r=>{var i;const[o,s]=Mr(r)?w(this,Yh).call(this,r):[null,{parsedResponse:r,rawResponse:r}];if(o){et("WsCspdUpdateHandler","#handleCspdUpdate","Failed to parse cspd update",{error:o,errorMsg:o.message,rawResponse:r});return}const{parsedResponse:a,rawResponse:c}=s;if(EE(a)){w(this,Gh).call(this,a);return}const u=w(this,gs);if(a.number!==u){w(this,Xr).push(a),Je("WsCspdUpdateHandler","#handleCspdUpdate",`Waiting for msg number ${u}, received ${a.number}. Saving data for later processing.`,{rawResponse:c,parsedResponse:a,queue:w(this,Xr)});return}Je("WsCspdUpdateHandler",`#handleCspdUpdate, ID ${a.request}`,"",{rawResponse:c,parsedResponse:a});const l=!w(this,Wa);Me(this,Wa,!0);const f=w(this,Zh).call(this);Me(this,gs,f);const m=(i=a.west)==null?void 0:i.$val,{staleCmps:d,updatedCmps:h,deletedCmps:g}=m?w(this,ep).call(this,m):{staleCmps:[],updatedCmps:[],deletedCmps:[]};w(this,Ze).emit("cmpListCspdUpdateProcessed",{isFirstCspdUpdate:l,staleCmps:d,updatedCmps:h,deletedCmps:g});const p=a.editorData,v=p?w(this,tp).call(this,p):[];v.length&&w(this,Ze).emit("cmpEditorCspdUpdateProcessed",v);const _=a.fiber,P=_&&w(this,np).call(this,_);P&&w(this,Ze).emit("ctrlFiberCspdUpdateProcessed",P);const x=Object.entries(a).map(([H,ne])=>D_(H)&&P_(ne)?ne:void 0).filter(H=>H!==void 0),R=x&&w(this,rp).call(this,x);R&&w(this,Ze).emit("ctrlFiberEditorCspdUpdateProcessed",R);const q=a.inspector,A=q&&w(this,ip).call(this,q);A&&w(this,Ze).emit("inspectorCspdUpdateProcessed",A);const I=a.cfgrField,L=I&&w(this,op).call(this,I);L&&w(this,Ze).emit("cfgrFieldCspdUpdateProcessed",L),a.request&&w(this,Bh).call(this,a.request),w(this,Ze).emit("cspdUpdateProcessed");const O=w(this,Xr).findIndex(H=>H.number===f);if(O>=0){const H=w(this,Xr)[O];w(this,Xr).splice(O,1),w(this,ss).call(this,H)}}),Me(this,Ze,new Rl),Me(this,os,n),e.onCspdUpdate(r=>w(this,ss).call(this,r)),e.onCspdUpdateParts((...r)=>w(this,Xh).call(this,...r)),e.onConnectionClosed(()=>on(this,Kh,N_).call(this))}onCspdUpdateProcessed(e){return w(this,Ze).on("cspdUpdateProcessed",e),{unsubscribe:()=>w(this,Ze).off("cspdUpdateProcessed",e)}}onCmpListCspdUpdateProcessed(e){return w(this,Ze).on("cmpListCspdUpdateProcessed",e),{unsubscribe:()=>w(this,Ze).off("cmpListCspdUpdateProcessed",e)}}onCmpEditorCspdUpdateProcessed(e,n){const r=i=>{const o=i.find(s=>s.cmpId===e);o&&n(o)};return w(this,Ze).on("cmpEditorCspdUpdateProcessed",r),{unsubscribe:()=>w(this,Ze).off("cmpEditorCspdUpdateProcessed",r)}}onCtrlFiberCspdUpdateProcessed(e){return w(this,Ze).on("ctrlFiberCspdUpdateProcessed",e),{unsubscribe:()=>w(this,Ze).off("ctrlFiberCspdUpdateProcessed",e)}}onCtrlFiberEditorCspdUpdateProcessed(e,n){const r=i=>{const o=i.find(s=>s.ctrlId===e);o&&n(o)};return w(this,Ze).on("ctrlFiberEditorCspdUpdateProcessed",r),{unsubscribe:()=>w(this,Ze).off("ctrlFiberEditorCspdUpdateProcessed",r)}}onInspectorCspdUpdateProcessed(e){return w(this,Ze).on("inspectorCspdUpdateProcessed",e),{unsubscribe:()=>w(this,Ze).off("inspectorCspdUpdateProcessed",e)}}onCfgrFieldCspdUpdateProcessed(e){return w(this,Ze).on("cfgrFieldCspdUpdateProcessed",e),{unsubscribe:()=>w(this,Ze).off("cfgrFieldCspdUpdateProcessed",e)}}}Ze=new WeakMap,Wa=new WeakMap,Su=new WeakMap,Iu=new WeakMap,os=new WeakMap,Da=new WeakMap,ku=new WeakMap,Bh=new WeakMap,Kh=new WeakSet,N_=function(){Me(this,Wa,!1),Me(this,gs,0),Me(this,Xr,[])},Ra=new WeakMap,Xh=new WeakMap,hr=new WeakMap,Gh=new WeakMap,Jh=new WeakMap,Qh=new WeakMap,gs=new WeakMap,Zh=new WeakMap,Xr=new WeakMap,Yh=new WeakMap,ep=new WeakMap,tp=new WeakMap,np=new WeakMap,rp=new WeakMap,ip=new WeakMap,op=new WeakMap,ss=new WeakMap;var Br,Gr,Aa,as,Tn,sp,Ma,ap,$_;class PE{constructor(){le(this,Ma),le(this,Br),le(this,Gr),le(this,Aa),le(this,as),le(this,Tn),le(this,sp,async()=>{await w(this,Tn).resubscribeToCmpUpdates()});var e,n;const r=(n=(e=window.Cbn)==null?void 0:e.getCustomCodeSdkBridge)==null?void 0:n.call(e,"v1"),{connectionMgr:i,cspdUpdateHandler:o,cfgrClientInternals:s}=(r==null?void 0:r.getSharedCfgrClientCore())??{};Me(this,Br,i??new mE),w(this,Br).onConnectionClosed(()=>w(this,Tn).markAllCmpPropertiesAsStale()),w(this,Br).onConnectionRestored(()=>w(this,sp).call(this)),Me(this,Gr,new Rl),Me(this,Tn,new fC),Me(this,Aa,o??new xE(w(this,Br),lC)),w(this,Aa).onCmpListCspdUpdateProcessed(a=>on(this,Ma,$_).call(this,a)),Me(this,as,s??new sE(w(this,Br),w(this,Aa))),Sm(this,w(this,as))}onNewCfgnIdCreated(e){w(this,Gr).on("newCfgnIdCreated",e)}async connect(e){const n=window.location.href,r=Sg(n)?Vm(n):void 0,i=r?{serverUrl:e.serverUrl,mode:e.mode,companyName:r.companyName,configuratorName:r.planName,draftName:r.planVersion,...(r==null?void 0:r.cfgnId)&&(r==null?void 0:r.authToken)&&{editCfgn:{cfgnId:r.cfgnId,authToken:r.authToken}}}:e,o=await w(this,Br).connectCfgr(i);if(o&&(w(this,Gr).emit("newCfgnIdCreated",o.cfgnId,o.authToken),r)){const s=o.editUrl+window.location.search;window.history.replaceState({},"",s)}}async getCmpValue(e){return await w(this,Tn).getCmpValue(e)}async onCmpValueChanged(e,n,r,i=!1){await w(this,Tn).subscribeToCmpUpdates(e,"Value"),w(this,Gr).on("cmpsUpdated",o=>{o.find(s=>s===e)&&on(this,Ma,ap).call(this,e,n,r)}),i&&on(this,Ma,ap).call(this,e,n,r)}async onAnyCmpValueChanged(e,n,r=!1){n.length||et("ConfiguratorClient","onAnyCmpValueChanged","Please define at least one component!");const i=n.map(s=>w(this,Tn).subscribeToCmpUpdates(s.name,"Value",r));await Promise.all(i);const o=n.map(s=>s.name);w(this,Gr).on("cmpsUpdated",s=>{if(s.some(a=>o.includes(a))){const a=o.reduce((c,u)=>(c[u]=s.includes(u),c),{});e(a)}})}async setCmpInputs(e){const n=e.map(o=>({...o,cmp:Mm(o.name)})),r=n.filter(o=>!wg(o.cmp));if(r.length){et("ConfiguratorClient","setCmpInputs","The following components have not been registered with the `ConfiguratorClient` or are not supported by `setCmpInputs`. They will be ignored:",r);return}const i=n.filter(o=>wg(o.cmp)).map(o=>{const{zodType:s}=o.cmp,a=Ls(o.name);return w(this,as).setCmpInput(a,o.value,s)});await Promise.all(i)}async finishConfiguration(e){const n=await w(this,as).finishConfiguration(e);if(!n)throw new Error("Failed to finish configuration. No result returned from server.");const r=window.location.href;if(Sg(r)){const i=n.newEditCfgnUrl+window.location.search;window.history.replaceState({},"",i)}return n}}Br=new WeakMap,Gr=new WeakMap,Aa=new WeakMap,as=new WeakMap,Tn=new WeakMap,sp=new WeakMap,Ma=new WeakSet,ap=async function(t,e,n){const r=await w(this,Tn).getCmpValue(t);(typeof n!="function"||await n(r))&&e(r)},$_=function(t){const{isFirstCspdUpdate:e,staleCmps:n,updatedCmps:r}=t;if(n.forEach(({name:i,changedCmpProperties:o})=>{w(this,Tn).markCmpPropertiesAsStale(i,o)}),r.forEach(({name:i,value:o})=>{w(this,Tn).updateCmp(i,o,e)}),r.length){const i=r.map(o=>o.name);w(this,Gr).emit("cmpsUpdated",i)}},lo(PE,"version",O0);const DE="v1";console.log(`Loading custom code SDK v${wm}`);var Zc,Cm;const Rd=(Cm=(Zc=window.Cbn)==null?void 0:Zc.getCustomCodeSdkBridge)==null?void 0:Cm.call(Zc,"v1"),fc=Rd==null?void 0:Rd.createCfgrClient(DE,Sm);if(!fc)throw new Error("Cannot create Configurator Client. Make sure to only use the `custom-code-sdk` inside a Combeenation Configurator.");const RE=fc.onAnyCmpValueChanged.bind(fc),AE=fc.finishConfiguration.bind(fc);exports.Button=W_;exports.Checkbox=V_;exports.Collapsible=q_;exports.CustomControl=H_;exports.Dataview=B_;exports.Input=K_;exports.Panel=X_;exports.Text=G_;exports.ValueComponent=hp;exports.finishConfiguration=AE;exports.onAnyCmpValueChanged=RE;exports.version=wm;
|
|
1
|
+
"use strict";var se=Object.defineProperty;var x=t=>{throw TypeError(t)};var re=(t,n,e)=>n in t?se(t,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[n]=e;var d=(t,n,e)=>re(t,typeof n!="symbol"?n+"":n,e),L=(t,n,e)=>n.has(t)||x("Cannot "+e);var o=(t,n,e)=>(L(t,n,"read from private field"),e?e.call(t):n.get(t)),a=(t,n,e)=>n.has(t)?x("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(t):n.set(t,e),c=(t,n,e,i)=>(L(t,n,"write to private field"),i?i.call(t,e):n.set(t,e),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("zod"),O="0.0.1-alpha7";var z,C;class ae{constructor(n){d(this,"id");a(this,z,"v1");a(this,C);var i,r;this.id=n;const e=(r=(i=window.Cbn)==null?void 0:i.getCustomCodeSdkBridge)==null?void 0:r.call(i,o(this,z));if(c(this,C,e==null?void 0:e.getButtonSdkBridge(this.id)),!o(this,C))throw new Error(`Cannot access API for Button "${this.id}".`)}onRendered(n){var e;return((e=o(this,C))==null?void 0:e.addOnRenderedCallback(n))??{unsubscribe:()=>{}}}onClick(n){var e;return((e=o(this,C))==null?void 0:e.addOnClickCallback(n))??{unsubscribe:()=>{}}}async setVisible(n){var e;await((e=o(this,C))==null?void 0:e.setVisible(n))}setText(n){var e;(e=o(this,C))==null||e.setText(n)}}z=new WeakMap,C=new WeakMap;var B,l;class de{constructor(n){d(this,"id");a(this,B,"v1");a(this,l);var i,r;this.id=n;const e=(r=(i=window.Cbn)==null?void 0:i.getCustomCodeSdkBridge)==null?void 0:r.call(i,o(this,B));if(c(this,l,e==null?void 0:e.getCheckboxSdkBridge(this.id)),!o(this,l))throw new Error(`Cannot access API for Checkbox "${this.id}".`)}onRendered(n){var e;return((e=o(this,l))==null?void 0:e.addOnRenderedCallback(n))??{unsubscribe:()=>{}}}async setVisible(n){var e;await((e=o(this,l))==null?void 0:e.setVisible(n))}}B=new WeakMap,l=new WeakMap;var E,h;class ce{constructor(n){d(this,"id");a(this,E,"v1");a(this,h);var i,r;this.id=n;const e=(r=(i=window.Cbn)==null?void 0:i.getCustomCodeSdkBridge)==null?void 0:r.call(i,o(this,E));if(c(this,h,e==null?void 0:e.getCollapsibleSdkBridge(this.id)),!o(this,h))throw new Error(`Cannot access API for Collapsible "${this.id}".`)}onRendered(n){var e;return((e=o(this,h))==null?void 0:e.addOnRenderedCallback(n))??{unsubscribe:()=>{}}}async setVisible(n){var e;await((e=o(this,h))==null?void 0:e.setVisible(n))}}E=new WeakMap,h=new WeakMap;var I,g;class Ce{constructor(n){d(this,"id");a(this,I,"v1");a(this,g);var i,r;this.id=n;const e=(r=(i=window.Cbn)==null?void 0:i.getCustomCodeSdkBridge)==null?void 0:r.call(i,o(this,I));if(c(this,g,e==null?void 0:e.getCustomCtrlSdkBridge(this.id)),!o(this,g))throw new Error(`Cannot access API for Custom Control "${this.id}".`)}set renderFn(n){var e;(e=o(this,g))==null||e.setRenderFn(n)}async render(n){var e;typeof n=="function"&&(this.renderFn=n),await((e=o(this,g))==null?void 0:e.render())}getElement(){var e;return(e=o(this,g))==null?void 0:e.getElement()}async setVisible(n){var e;await((e=o(this,g))==null?void 0:e.setVisible(n))}}I=new WeakMap,g=new WeakMap;var S,b;class ge{constructor(n){d(this,"id");a(this,S,"v1");a(this,b);var i,r;this.id=n;const e=(r=(i=window.Cbn)==null?void 0:i.getCustomCodeSdkBridge)==null?void 0:r.call(i,o(this,S));if(c(this,b,e==null?void 0:e.getDataviewSdkBridge(this.id)),!o(this,b))throw new Error(`Cannot access API for Dataview "${this.id}".`)}onRendered(n){var e;return((e=o(this,b))==null?void 0:e.addOnRenderedCallback(n))??{unsubscribe:()=>{}}}async setVisible(n){var e;await((e=o(this,b))==null?void 0:e.setVisible(n))}}S=new WeakMap,b=new WeakMap;var v,p;class ue{constructor(n){d(this,"id");a(this,v,"v1");a(this,p);var i,r;this.id=n;const e=(r=(i=window.Cbn)==null?void 0:i.getCustomCodeSdkBridge)==null?void 0:r.call(i,o(this,v));if(c(this,p,e==null?void 0:e.getInputSdkBridge(this.id)),!o(this,p))throw new Error(`Cannot access API for Input "${this.id}".`)}onRendered(n){var e;return((e=o(this,p))==null?void 0:e.addOnRenderedCallback(n))??{unsubscribe:()=>{}}}async setVisible(n){var e;await((e=o(this,p))==null?void 0:e.setVisible(n))}}v=new WeakMap,p=new WeakMap;var R,m;class le{constructor(n){d(this,"id");a(this,R,"v1");a(this,m);var i,r;this.id=n;const e=(r=(i=window.Cbn)==null?void 0:i.getCustomCodeSdkBridge)==null?void 0:r.call(i,o(this,R));if(c(this,m,e==null?void 0:e.getPanelSdkBridge(this.id)),!o(this,m))throw new Error(`Cannot access API for Panel "${this.id}".`)}onRendered(n){var e;return((e=o(this,m))==null?void 0:e.addOnRenderedCallback(n))??{unsubscribe:()=>{}}}async setVisible(n){var e;await((e=o(this,m))==null?void 0:e.setVisible(n))}}R=new WeakMap,m=new WeakMap;var P,u;class he{constructor(n){d(this,"id");a(this,P,"v1");a(this,u);var i,r;this.id=n;const e=(r=(i=window.Cbn)==null?void 0:i.getCustomCodeSdkBridge)==null?void 0:r.call(i,o(this,P));if(c(this,u,e==null?void 0:e.getTextSdkBridge(this.id)),!o(this,u))throw new Error(`Cannot access API for Text "${this.id}".`)}onRendered(n){var e;return((e=o(this,u))==null?void 0:e.addOnRenderedCallback(n))??{unsubscribe:()=>{}}}async setVisible(n){var e;await((e=o(this,u))==null?void 0:e.setVisible(n))}setText(n){var e;(e=o(this,u))==null||e.setText(n)}}P=new WeakMap,u=new WeakMap;const U=1,y=[];function be(t,n){if(y.length>=U)throw new Error(`Only ${U} \`ConfiguratorClient\` can be created at a time.`);y.push({client:t,internals:n})}function D(){const t=y[0];if(!t)throw new Error("Operation not possible as no `ConfiguratorClient` has been registered yet.");return t.client}function pe(){const t=y[0];if(!t)throw new Error("Operation not possible as no `ConfiguratorClient` has been registered yet.");return t.internals}const me="v1";var A,Z;const F=(Z=(A=window.Cbn)==null?void 0:A.getCustomCodeSdkBridge)==null?void 0:Z.call(A,"v1");if(!F)throw new Error("Cannot access Configurator SDK bridge. Make sure to only use the `custom-code-sdk` inside a Combeenation Configurator.");const N=F.createCfgrClient(me,be);if(!N)throw new Error("Cannot create Configurator Client. Make sure to only use the `custom-code-sdk` inside a Combeenation Configurator.");const w=F.getParentPageUtilsSdkBridge(),j=F.getCfgrUtilsSdkBridge(),T=N,$={Text:"Text",Number:"Number",Logic:"Logic"},f={ValueComponent:"ValueComponent",TableComponent:"TableComponent",RecordComponent:"RecordComponent",ResourceComponent:"ResourceComponent",GraphicComponent:"GraphicComponent",CheckoutComponent:"CheckoutComponent"},k={ValueEditor:"ValueEditor",TableEditor:"TableEditor",Fiber:"Fiber",FiberEditor:"FiberEditor",CfgrField:"CfgrField"};s.z.enum([k.ValueEditor,k.TableEditor,k.Fiber,k.FiberEditor,k.CfgrField]);s.z.union([s.z.string(),s.z.number(),s.z.boolean()]);const V=t=>typeof t=="string";s.z.string();s.z.enum([$.Text,$.Number,$.Logic]);s.z.string();s.z.custom(t=>V(t)&&t.toLowerCase()===t);const G=t=>(t==null?void 0:t.toLowerCase())??"";s.z.string();const we=s.z.custom(t=>V(t)?new RegExp(`^${f.ValueComponent}<.*>$`).test(t):!1),fe=s.z.custom(t=>V(t)?new RegExp(`^${f.RecordComponent}<.*>$`).test(t):!1),ke=s.z.custom(t=>V(t)?new RegExp(`^${f.ResourceComponent}<.*>$`).test(t):!1),Ve=s.z.custom(t=>V(t)?new RegExp(`^${f.TableComponent}<.*>$`).test(t):!1);s.z.union([we,Ve,fe,ke,s.z.literal(f.GraphicComponent),s.z.literal(f.CheckoutComponent)]);const M=s.z.union([s.z.string(),s.z.number(),s.z.boolean()]),Ae=s.z.union([M,s.z.array(M),s.z.object({}),s.z.unknown()]),ye=s.z.object({$typ:s.z.literal("Error"),Id:s.z.string(),Message:s.z.string(),route:s.z.unknown().optional()});ye.or(Ae);const _=new Map;function Te(t){const n=G(t.name);_.has(n)||_.set(n,t)}class ze{constructor(n,e){d(this,"name");d(this,"zodType");this.name=n,this.zodType=e,Te(this)}async getValue(){return await D().getCmpValue(this.name)}async setInput(n){const e=G(this.name);await pe().setCmpInput(e,n,this.zodType)}onValueChanged(n,e=!1,i){D().onCmpValueChanged(this.name,n,i,e)}}var K=(t=>(t[t.Facebook=0]="Facebook",t[t.Pinterest=1]="Pinterest",t[t.Twitter=2]="Twitter",t[t.LinkedIn=3]="LinkedIn",t[t.WhatsApp=4]="WhatsApp",t[t.Custom=5]="Custom",t[t.NativeShare=6]="NativeShare",t))(K||{});const Be="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8/x8AAwMCAO+X2ZkAAAAASUVORK5CYII=",W=T.onAnyCmpValueChanged.bind(T),H=async t=>{if(await T.finishConfiguration(t==null?void 0:t.input),t.sendDataToParentPage){const n=t.transformParentPageData();await w.sendConfigurationFinished(n)}},Q=async t=>{const n=K[t.platform],e=t.imageUrl??Be,i={...t,platform:n,imageUrl:e},r=await T.shareConfiguration(i);await j.openShareWindow(t.platform,r);const{shareUrl:ie,shareConfigurationId:oe}=r;return{shareUrl:ie,shareConfigurationId:oe}},X=()=>w.isInIFrame(),q=t=>w.setIFrameSize(t),Y=t=>j.navigateToLogin(t),J=(t,n)=>w.sendCustomMsg(t,n),ee=t=>w.redirectParentPage(t),te=()=>w.getParentPageUrl(),ne=(t,n)=>w.fireAnalyticsEvent(t,n),Ee=Object.freeze(Object.defineProperty({__proto__:null,configuratorIsInIFrame:X,finishConfiguration:H,fireAnalyticsEvent:ne,getParentPageUrl:te,navigateToLogin:Y,onAnyCmpValueChanged:W,redirectParentPage:ee,sendCustomMsgToParentPage:J,setConfiguratorIFrameSize:q,shareConfiguration:Q,version:O},Symbol.toStringTag,{value:"Module"}));console.log(`Loading custom code SDK v${O}`);exports.Button=ae;exports.CbnSdk=Ee;exports.Checkbox=de;exports.Collapsible=ce;exports.CustomControl=Ce;exports.Dataview=ge;exports.Input=ue;exports.Panel=le;exports.Text=he;exports.ValueComponent=ze;exports.configuratorIsInIFrame=X;exports.finishConfiguration=H;exports.fireAnalyticsEvent=ne;exports.getParentPageUrl=te;exports.navigateToLogin=Y;exports.onAnyCmpValueChanged=W;exports.redirectParentPage=ee;exports.sendCustomMsgToParentPage=J;exports.setConfiguratorIFrameSize=q;exports.shareConfiguration=Q;exports.version=O;
|