/*! For license information please see extension.js.LICENSE.txt */ (()=>{var e={33577:(e,t,n)=>{"use strict";function a(e){return e.toLowerCase()}function i(e){if(e&&"object"==typeof e){const t=e;if("function"==typeof t.rawHeaders&&"function"==typeof t.clone&&"function"==typeof t.get&&"function"==typeof t.set&&"function"==typeof t.contains&&"function"==typeof t.remove&&"function"==typeof t.headersArray&&"function"==typeof t.headerValues&&"function"==typeof t.headerNames&&"function"==typeof t.toJson)return!0}return!1}n.r(t),n.d(t,{AccessTokenRefresher:()=>ka,ApiKeyCredentials:()=>Pa,BaseRequestPolicy:()=>Kt,BasicAuthenticationCredentials:()=>Da,Constants:()=>Tn,DefaultHttpClient:()=>Yt,ExpiringAccessTokenCache:()=>Aa,HttpHeaders:()=>r,HttpPipelineLogLevel:()=>$t,MapperType:()=>H,QueryCollectionFormat:()=>Bn,RequestPolicyOptions:()=>Qt,RestError:()=>we,RetryMode:()=>Rn,Serializer:()=>P,ServiceClient:()=>ya,TopicCredentials:()=>Ma,URLBuilder:()=>ae,URLQuery:()=>ne,WebResource:()=>V,XML_ATTRKEY:()=>l,XML_CHARKEY:()=>c,applyMixins:()=>x,bearerTokenAuthenticationPolicy:()=>zn,createPipelineFromOptions:()=>Ca,createSpanFunction:()=>xa,delay:()=>Cn,deserializationPolicy:()=>an,deserializeResponseBody:()=>cn,disableResponseDecompressionPolicy:()=>Gn,encodeUri:()=>S,executePromisesSequentially:()=>R,exponentialRetryPolicy:()=>wn,flattenResponse:()=>Oa,generateClientRequestIdPolicy:()=>Vn,generateUuid:()=>w,getDefaultProxySettings:()=>Zn,getDefaultUserAgentValue:()=>Fn,isDuration:()=>k,isNode:()=>E,isTokenCredential:()=>Pn,isValidUuid:()=>C,keepAlivePolicy:()=>dn,logPolicy:()=>An,operationOptionsToRequestOptionsBase:()=>Wt,parseXML:()=>nn,promiseToCallback:()=>N,promiseToServiceCallback:()=>O,proxyPolicy:()=>Jn,redirectPolicy:()=>_n,serializeObject:()=>G,signingPolicy:()=>ia,stringifyXML:()=>tn,stripRequest:()=>T,stripResponse:()=>y,systemErrorRetryPolicy:()=>oa,throttlingRetryPolicy:()=>pa,tracingPolicy:()=>Ea,userAgentPolicy:()=>jn});class r{constructor(e){if(this._headersMap={},e)for(const t in e)this.set(t,e[t])}set(e,t){this._headersMap[a(e)]={name:e,value:t.toString()}}get(e){const t=this._headersMap[a(e)];return t?t.value:void 0}contains(e){return!!this._headersMap[a(e)]}remove(e){const t=this.contains(e);return delete this._headersMap[a(e)],t}rawHeaders(){return this.toJson({preserveCase:!0})}headersArray(){const e=[];for(const t in this._headersMap)e.push(this._headersMap[t]);return e}headerNames(){const e=[],t=this.headersArray();for(let n=0;nu.length-16&&(d().randomFillSync(u),m=0),u.slice(m,m+=16)}const _=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,g=[];for(let e=0;e<256;++e)g.push((e+256).toString(16).substr(1));const f=function(e,t=0){const n=(g[e[t+0]]+g[e[t+1]]+g[e[t+2]]+g[e[t+3]]+"-"+g[e[t+4]]+g[e[t+5]]+"-"+g[e[t+6]]+g[e[t+7]]+"-"+g[e[t+8]]+g[e[t+9]]+"-"+g[e[t+10]]+g[e[t+11]]+g[e[t+12]]+g[e[t+13]]+g[e[t+14]]+g[e[t+15]]).toLowerCase();if(!function(e){return"string"==typeof e&&_.test(e)}(n))throw TypeError("Stringified UUID is invalid");return n},v=function(e,t,n){const a=(e=e||{}).random||(e.rng||h)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=a[e];return t}return f(a)},b=/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/i,E="undefined"!=typeof process&&!!process.version&&!!process.versions&&!!process.versions.node;function S(e){return encodeURIComponent(e).replace(/!/g,"%21").replace(/"/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A")}function y(e){const t={};return t.body=e.bodyAsText,t.headers=e.headers,t.status=e.status,t}function T(e){const t=e.clone();return t.headers&&t.headers.remove("authorization"),t}function C(e){return b.test(e)}function w(){return v()}function R(e,t){let n=Promise.resolve(t);return e.forEach((e=>{n=n.then(e)})),n}function N(e){if("function"!=typeof e.then)throw new Error("The provided input is not a Promise.");return t=>{e.then((e=>t(void 0,e))).catch((e=>{t(e)}))}}function O(e){if("function"!=typeof e.then)throw new Error("The provided input is not a Promise.");return t=>{e.then((e=>process.nextTick(t,void 0,e.parsedBody,e.request,e))).catch((e=>{process.nextTick(t,e)}))}}function x(e,t){const n=e;t.forEach((e=>{Object.getOwnPropertyNames(e.prototype).forEach((t=>{n.prototype[t]=e.prototype[t]}))}))}const A=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function k(e){return A.test(e)}function I(e,t,n){return e&&t?e.split(t).join(n||""):e}function D(e){return process.env[e]?process.env[e]:process.env[e.toLowerCase()]?process.env[e.toLowerCase()]:void 0}class P{constructor(e={},t){this.modelMappers=e,this.isXML=t}validateConstraints(e,t,n){const a=(e,a)=>{throw new Error(`"${n}" with value "${t}" should satisfy the constraint "${e}": ${a}.`)};if(e.constraints&&null!=t){const n=t,{ExclusiveMaximum:i,ExclusiveMinimum:r,InclusiveMaximum:o,InclusiveMinimum:s,MaxItems:l,MaxLength:c,MinItems:p,MinLength:d,MultipleOf:u,Pattern:m,UniqueItems:h}=e.constraints;null!=i&&n>=i&&a("ExclusiveMaximum",i),null!=r&&n<=r&&a("ExclusiveMinimum",r),null!=o&&n>o&&a("InclusiveMaximum",o),null!=s&&nl&&a("MaxItems",l),null!=c&&_.length>c&&a("MaxLength",c),null!=p&&_.lengthn.indexOf(e)!==t))&&a("UniqueItems",h)}}serialize(e,t,n,a={}){var i,r,s;const p={rootName:null!==(i=a.rootName)&&void 0!==i?i:"",includeRoot:null!==(r=a.includeRoot)&&void 0!==r&&r,xmlCharKey:null!==(s=a.xmlCharKey)&&void 0!==s?s:c};let d={};const u=e.type.name;n||(n=e.serializedName),null!==u.match(/^Sequence$/i)&&(d=[]),e.isConstant&&(t=e.defaultValue);const{required:m,nullable:h}=e;if(m&&h&&void 0===t)throw new Error(`${n} cannot be undefined.`);if(m&&!h&&null==t)throw new Error(`${n} cannot be null or undefined.`);if(!m&&!1===h&&null===t)throw new Error(`${n} cannot be null.`);return null==t||null!==u.match(/^any$/i)?d=t:null!==u.match(/^(Number|String|Boolean|Object|Stream|Uuid)$/i)?d=function(e,t,n){if(null!=n)if(null!==e.match(/^Number$/i)){if("number"!=typeof n)throw new Error(`${t} with value ${n} must be of type number.`)}else if(null!==e.match(/^String$/i)){if("string"!=typeof n.valueOf())throw new Error(`${t} with value "${n}" must be of type string.`)}else if(null!==e.match(/^Uuid$/i)){if("string"!=typeof n.valueOf()||!C(n))throw new Error(`${t} with value "${n}" must be of type string and a valid uuid.`)}else if(null!==e.match(/^Boolean$/i)){if("boolean"!=typeof n)throw new Error(`${t} with value ${n} must be of type boolean.`)}else if(null!==e.match(/^Stream$/i)){const e=typeof n;if(!("string"===e||"function"===e||n instanceof ArrayBuffer||ArrayBuffer.isView(n)||("function"==typeof Blob||"object"==typeof Blob)&&n instanceof Blob))throw new Error(`${t} must be a string, Blob, ArrayBuffer, ArrayBufferView, or a function returning NodeJS.ReadableStream.`)}return n}(u,n,t):null!==u.match(/^Enum$/i)?d=function(e,t,n){if(!t)throw new Error(`Please provide a set of allowedValues to validate ${e} as an Enum Type.`);if(!t.some((e=>"string"==typeof e.valueOf()?e.toLowerCase()===n.toLowerCase():e===n)))throw new Error(`${n} is not a valid value for ${e}. The valid values are: ${JSON.stringify(t)}.`);return n}(n,e.type.allowedValues,t):null!==u.match(/^(Date|DateTime|TimeSpan|DateTimeRfc1123|UnixTime)$/i)?d=function(e,t,n){if(null!=t)if(null!==e.match(/^Date$/i)){if(!(t instanceof Date||"string"==typeof t.valueOf()&&!isNaN(Date.parse(t))))throw new Error(`${n} must be an instanceof Date or a string in ISO8601 format.`);t=t instanceof Date?t.toISOString().substring(0,10):new Date(t).toISOString().substring(0,10)}else if(null!==e.match(/^DateTime$/i)){if(!(t instanceof Date||"string"==typeof t.valueOf()&&!isNaN(Date.parse(t))))throw new Error(`${n} must be an instanceof Date or a string in ISO8601 format.`);t=t instanceof Date?t.toISOString():new Date(t).toISOString()}else if(null!==e.match(/^DateTimeRfc1123$/i)){if(!(t instanceof Date||"string"==typeof t.valueOf()&&!isNaN(Date.parse(t))))throw new Error(`${n} must be an instanceof Date or a string in RFC-1123 format.`);t=t instanceof Date?t.toUTCString():new Date(t).toUTCString()}else if(null!==e.match(/^UnixTime$/i)){if(!(t instanceof Date||"string"==typeof t.valueOf()&&!isNaN(Date.parse(t))))throw new Error(`${n} must be an instanceof Date or a string in RFC-1123/ISO8601 format for it to be serialized in UnixTime/Epoch format.`);t=function(e){if(e)return"string"==typeof e.valueOf()&&(e=new Date(e)),Math.floor(e.getTime()/1e3)}(t)}else if(null!==e.match(/^TimeSpan$/i)&&!k(t))throw new Error(`${n} must be a string in ISO 8601 format. Instead was "${t}".`);return t}(u,t,n):null!==u.match(/^ByteArray$/i)?d=function(e,t){let n="";if(null!=t){if(!(t instanceof Uint8Array))throw new Error(`${e} must be of type Uint8Array.`);n=o(t)}return n}(n,t):null!==u.match(/^Base64Url$/i)?d=function(e,t){let n="";if(null!=t){if(!(t instanceof Uint8Array))throw new Error(`${e} must be of type Uint8Array.`);n=function(e){if(e){if(!(e instanceof Uint8Array))throw new Error("Please provide an input of type Uint8Array for converting to Base64Url.");return function(e,t){let n=e.length;for(;n-1>=0&&"="===e[n-1];)--n;return e.substr(0,n)}(o(e)).replace(/\+/g,"-").replace(/\//g,"_")}}(t)||""}return n}(n,t):null!==u.match(/^Sequence$/i)?d=function(e,t,n,a,i,r){if(!Array.isArray(n))throw new Error(`${a} must be of type Array.`);const o=t.type.element;if(!o||"object"!=typeof o)throw new Error(`element" metadata for an Array must be defined in the mapper and it must of type "object" in ${a}.`);const s=[];for(let t=0;te!==i))&&(o[i]=e.serialize(c,n[i],a+'["'+i+'"]',r))}return o}return n}(this,e,t,n,Boolean(this.isXML),p)),d}deserialize(e,t,n,a={}){var i,r,o;const p={rootName:null!==(i=a.rootName)&&void 0!==i?i:"",includeRoot:null!==(r=a.includeRoot)&&void 0!==r&&r,xmlCharKey:null!==(o=a.xmlCharKey)&&void 0!==o?o:c};if(null==t)return this.isXML&&"Sequence"===e.type.name&&!e.xmlIsWrapped&&(t=[]),void 0!==e.defaultValue&&(t=e.defaultValue),t;let d;const u=e.type.name;if(n||(n=e.serializedName),null!==u.match(/^Composite$/i))d=function(e,t,n,a,i){var r,o;const s=null!==(r=i.xmlCharKey)&&void 0!==r?r:c;q(e,t)&&(t=B(e,t,n,"serializedName"));const p=F(e,t,a);let d={};const u=[];for(const r of Object.keys(p)){const c=p[r],m=M(p[r].serializedName);u.push(m[0]);const{serializedName:h,xmlName:_,xmlElementName:g}=c;let f=a;""!==h&&void 0!==h&&(f=a+"."+h);const v=c.headerCollectionPrefix;if(v){const t={};for(const a of Object.keys(n))a.startsWith(v)&&(t[a.substring(v.length)]=e.deserialize(c.type.value,n[a],f,i)),u.push(a);d[r]=t}else if(e.isXML)if(c.xmlIsAttribute&&n[l])d[r]=e.deserialize(c,n[l][_],f,i);else if(c.xmlIsMsText)void 0!==n[s]?d[r]=n[s]:"string"==typeof n&&(d[r]=n);else{const t=g||_||h;if(c.xmlIsWrapped){const t=n[_],a=null!==(o=null==t?void 0:t[g])&&void 0!==o?o:[];d[r]=e.deserialize(c,a,f,i),u.push(_)}else{const a=n[t];d[r]=e.deserialize(c,a,f,i),u.push(t)}}else{let a,o=n;for(const e of m){if(!o)break;o=o[e]}a=o;const s=t.type.polymorphicDiscriminator;let l;if(s&&r===s.clientName&&null==a&&(a=t.serializedName),Array.isArray(n[r])&&""===p[r].serializedName){a=n[r];const t=e.deserialize(c,a,f,i);for(const[e,n]of Object.entries(d))Object.prototype.hasOwnProperty.call(t,e)||(t[e]=n);d=t}else void 0===a&&void 0===c.defaultValue||(l=e.deserialize(c,a,f,i),d[r]=l)}}const m=t.type.additionalProperties;if(m){const t=e=>{for(const t in p)if(M(p[t].serializedName)[0]===e)return!1;return!0};for(const r in n)t(r)&&(d[r]=e.deserialize(m,n[r],a+'["'+r+'"]',i))}else if(n)for(const e of Object.keys(n))void 0!==d[e]||u.includes(e)||U(e,i)||(d[e]=n[e]);return d}(this,e,t,n,p);else{if(this.isXML){const e=p.xmlCharKey,n=t;null!=n[l]&&null!=n[e]&&(t=n[e])}null!==u.match(/^Number$/i)?(d=parseFloat(t),isNaN(d)&&(d=t)):null!==u.match(/^Boolean$/i)?d="true"===t||"false"!==t&&t:null!==u.match(/^(String|Enum|Object|Stream|Uuid|TimeSpan|any)$/i)?d=t:null!==u.match(/^(Date|DateTime|DateTimeRfc1123)$/i)?d=new Date(t):null!==u.match(/^UnixTime$/i)?d=function(e){if(e)return new Date(1e3*e)}(t):null!==u.match(/^ByteArray$/i)?d=s(t):null!==u.match(/^Base64Url$/i)?d=function(e){if(e){if(e&&"string"!=typeof e.valueOf())throw new Error("Please provide an input of type string for converting to Uint8Array");return s(e=e.replace(/-/g,"+").replace(/_/g,"/"))}}(t):null!==u.match(/^Sequence$/i)?d=function(e,t,n,a,i){const r=t.type.element;if(!r||"object"!=typeof r)throw new Error(`element" metadata for an Array must be defined in the mapper and it must of type "object" in ${a}`);if(n){Array.isArray(n)||(n=[n]);const t=[];for(let o=0;o-1&&n.splice(a,1)}dispatchEvent(e){throw new Error("This is a stub dispatchEvent implementation that should not be used. It only exists for type-checking purposes.")}}function Z(e){if(e.aborted)return;e.onabort&&e.onabort.call(e);const t=K.get(e);t&&t.slice().forEach((t=>{t.call(e,{type:"abort"})})),Q.set(e,!0)}class J extends Error{constructor(e){super(e),this.name="AbortError"}}class ee{constructor(e){if(this._signal=new X,e){Array.isArray(e)||(e=arguments);for(const t of e)t.aborted?this.abort():t.addEventListener("abort",(()=>{this.abort()}))}}get signal(){return this._signal}abort(){Z(this._signal)}static timeout(e){const t=new X,n=setTimeout(Z,e,t);return"function"==typeof n.unref&&n.unref(),t}}var te=n(6149);class ne{constructor(){this._rawQuery={}}any(){return Object.keys(this._rawQuery).length>0}keys(){return Object.keys(this._rawQuery)}set(e,t){const n=t;if(e)if(null!=n){const t=Array.isArray(n)?n:n.toString();this._rawQuery[e]=t}else delete this._rawQuery[e]}get(e){return e?this._rawQuery[e]:void 0}toString(){let e="";for(const t in this._rawQuery){e&&(e+="&");const n=this._rawQuery[t];if(Array.isArray(n)){const a=[];for(const e of n)a.push(`${t}=${e}`);e+=a.join("&")}else e+=`${t}=${n}`}return e}static parse(e){const t=new ne;if(e){e.startsWith("?")&&(e=e.substring(1));let n="ParameterName",a="",i="";for(let r=0;rfunction(e){const t=e.charCodeAt(0);return 48<=t&&t<=57||65<=t&&t<=90||97<=t&&t<=122}(e)))}(e);e._currentToken=ie.scheme(t),oe(e)?e._currentState="HOST":e._currentState="DONE"}(this);break;case"SCHEME_OR_HOST":!function(e){const t=de(e,":","/","?");oe(e)?":"===se(e)?"://"===ce(e,3)?(e._currentToken=ie.scheme(t),e._currentState="HOST"):(e._currentToken=ie.host(t),e._currentState="PORT"):(e._currentToken=ie.host(t),"/"===se(e)?e._currentState="PATH":e._currentState="QUERY"):(e._currentToken=ie.host(t),e._currentState="DONE")}(this);break;case"HOST":!function(e){"://"===ce(e,3)&&le(e,3);const t=de(e,":","/","?");e._currentToken=ie.host(t),oe(e)?":"===se(e)?e._currentState="PORT":"/"===se(e)?e._currentState="PATH":e._currentState="QUERY":e._currentState="DONE"}(this);break;case"PORT":!function(e){":"===se(e)&&le(e);const t=de(e,"/","?");e._currentToken=ie.port(t),oe(e)?"/"===se(e)?e._currentState="PATH":e._currentState="QUERY":e._currentState="DONE"}(this);break;case"PATH":!function(e){const t=de(e,"?");e._currentToken=ie.path(t),oe(e)?e._currentState="QUERY":e._currentState="DONE"}(this);break;case"QUERY":!function(e){"?"===se(e)&&le(e);const t=function(e){let t="";return e._currentIndex-1===t.indexOf(e)))}function ue(e){return"https"===(ae.parse(e).getScheme()||"").toLowerCase()}function me(e,t,n){return e&&t?te.httpsOverHttps(n):e&&!t?te.httpsOverHttp(n):!e&&t?te.httpOverHttps(n):te.httpOverHttp(n)}var he=n(92413),_e=n(46882),ge=n.n(_e);const fe="REDACTED",ve=["x-ms-client-request-id","x-ms-return-client-request-id","x-ms-useragent","x-ms-correlation-request-id","x-ms-request-id","client-request-id","ms-cv","return-client-request-id","traceparent","Access-Control-Allow-Credentials","Access-Control-Allow-Headers","Access-Control-Allow-Methods","Access-Control-Allow-Origin","Access-Control-Expose-Headers","Access-Control-Max-Age","Access-Control-Request-Headers","Access-Control-Request-Method","Origin","Accept","Accept-Encoding","Cache-Control","Connection","Content-Length","Content-Type","Date","ETag","Expires","If-Match","If-Modified-Since","If-None-Match","If-Unmodified-Since","Last-Modified","Pragma","Request-Id","Retry-After","Server","Transfer-Encoding","User-Agent","WWW-Authenticate"],be=["api-version"];class Ee{constructor({allowedHeaderNames:e=[],allowedQueryParameters:t=[]}={}){e=Array.isArray(e)?ve.concat(e):ve,t=Array.isArray(t)?be.concat(t):be,this.allowedHeaderNames=new Set(e.map((e=>e.toLowerCase()))),this.allowedQueryParameters=new Set(t.map((e=>e.toLowerCase())))}sanitize(e){const t=new Set;return JSON.stringify(e,((e,n)=>{if(n instanceof Error)return Object.assign(Object.assign({},n),{name:n.name,message:n.message});if("_headersMap"===e)return this.sanitizeHeaders(n);if("url"===e)return this.sanitizeUrl(n);if("query"===e)return this.sanitizeQuery(n);if("body"!==e&&"response"!==e&&"operationSpec"!==e){if(Array.isArray(n)||!("object"!=typeof(a=n)||null===a||Array.isArray(a)||a instanceof RegExp||a instanceof Date)){if(t.has(n))return"[Circular]";t.add(n)}var a;return n}}),2)}sanitizeHeaders(e){return this.sanitizeObject(e,this.allowedHeaderNames,((e,t)=>e[t].value))}sanitizeQuery(e){return this.sanitizeObject(e,this.allowedQueryParameters,((e,t)=>e[t]))}sanitizeObject(e,t,n){if("object"!=typeof e||null===e)return e;const a={};for(const i of Object.keys(e))t.has(i.toLowerCase())?a[i]=n(e,i):a[i]=fe;return a}sanitizeUrl(e){if("string"!=typeof e||null===e)return e;const t=ae.parse(e),n=t.getQuery();if(!n)return e;const a=ne.parse(n);for(const e of a.keys())this.allowedQueryParameters.has(e.toLowerCase())||a.set(e,fe);return t.setQuery(a.toString()),t.toString()}}var Se=n(31669),ye=n.n(Se);const Te=Se.inspect.custom,Ce=new Ee;class we extends Error{constructor(e,t,n,a,i){super(e),this.name="RestError",this.code=t,this.statusCode=n,this.request=a,this.response=i,Object.setPrototypeOf(this,we.prototype)}[Te](){return`RestError: ${this.message} \n ${Ce.sanitize(this)}`}}we.REQUEST_SEND_ERROR="REQUEST_SEND_ERROR",we.PARSE_ERROR="PARSE_ERROR";var Re=n(12087);const Ne="undefined"!=typeof process&&process.env&&process.env.DEBUG||void 0;let Oe,xe=[],Ae=[];const ke=[];Ne&&De(Ne);const Ie=Object.assign((e=>Me(e)),{enable:De,enabled:Pe,disable:function(){const e=Oe||"";return De(""),e},log:function(e,...t){process.stderr.write(`${ye().format(e,...t)}${Re.EOL}`)}});function De(e){Oe=e,xe=[],Ae=[];const t=/\*/g,n=e.split(",").map((e=>e.trim().replace(t,".*?")));for(const e of n)e.startsWith("-")?Ae.push(new RegExp(`^${e.substr(1)}$`)):xe.push(new RegExp(`^${e}$`));for(const e of ke)e.enabled=Pe(e.namespace)}function Pe(e){if(e.endsWith("*"))return!0;for(const t of Ae)if(t.test(e))return!1;for(const t of xe)if(t.test(e))return!0;return!1}function Me(e){const t=Object.assign((function(...n){t.enabled&&(n.length>0&&(n[0]=`${e} ${n[0]}`),t.log(...n))}),{enabled:Pe(e),destroy:Le,log:Ie.log,namespace:e,extend:Fe});return ke.push(t),t}function Le(){const e=ke.indexOf(this);return e>=0&&(ke.splice(e,1),!0)}function Fe(e){const t=Me(`${this.namespace}:${e}`);return t.log=this.log,t}const je=Ie,Ue=new Set,Be="undefined"!=typeof process&&process.env&&process.env.AZURE_LOG_LEVEL||void 0;let qe;const ze=je("azure");ze.log=(...e)=>{je.log(...e)};const Ge=["verbose","info","warning","error"];Be&&(We(Be)?function(e){if(e&&!We(e))throw new Error(`Unknown log level '${e}'. Acceptable values: ${Ge.join(",")}`);qe=e;const t=[];for(const e of Ue)$e(e)&&t.push(e.namespace);je.enable(t.join(","))}(Be):console.error(`AZURE_LOG_LEVEL set to unknown log level '${Be}'; logging is not enabled. Acceptable values: ${Ge.join(", ")}.`));const He={verbose:400,info:300,warning:200,error:100};function Ve(e,t){t.log=(...t)=>{e.log(...t)}}function Ye(e,t){const n=Object.assign(e.extend(t),{level:t});if(Ve(e,n),$e(n)){const e=je.disable();je.enable(e+","+n.namespace)}return Ue.add(n),n}function $e(e){return!!(qe&&He[e.level]<=He[qe])}function We(e){return Ge.includes(e)}const Ke=function(e){const t=ze.extend("core-http");return Ve(ze,t),{error:Ye(t,"error"),warning:Ye(t,"warning"),info:Ye(t,"info"),verbose:Ye(t,"verbose")}}();var Qe=n(78835),Xe=n(87347),Ze=n(78761);const Je=he.Readable,et=Symbol("buffer"),tt=Symbol("type");class nt{constructor(){this[tt]="";const e=arguments[0],t=arguments[1],n=[];let a=0;if(e){const t=e,i=Number(t.length);for(let e=0;e1&&void 0!==arguments[1]?arguments[1]:{},a=n.size;let i=void 0===a?0:a;var r=n.timeout;let o=void 0===r?0:r;null==e?e=null:ct(e)?e=Buffer.from(e.toString()):pt(e)||Buffer.isBuffer(e)||("[object ArrayBuffer]"===Object.prototype.toString.call(e)?e=Buffer.from(e):ArrayBuffer.isView(e)?e=Buffer.from(e.buffer,e.byteOffset,e.byteLength):e instanceof he||(e=Buffer.from(String(e)))),this[rt]={body:e,disturbed:!1,error:null},this.size=i,this.timeout=o,e instanceof he&&e.on("error",(function(e){const n="AbortError"===e.name?e:new at(`Invalid response body while trying to fetch ${t.url}: ${e.message}`,"system",e);t[rt].error=n}))}function lt(){var e=this;if(this[rt].disturbed)return st.Promise.reject(new TypeError(`body used already for: ${this.url}`));if(this[rt].disturbed=!0,this[rt].error)return st.Promise.reject(this[rt].error);let t=this.body;if(null===t)return st.Promise.resolve(Buffer.alloc(0));if(pt(t)&&(t=t.stream()),Buffer.isBuffer(t))return st.Promise.resolve(t);if(!(t instanceof he))return st.Promise.resolve(Buffer.alloc(0));let n=[],a=0,i=!1;return new st.Promise((function(r,o){let s;e.timeout&&(s=setTimeout((function(){i=!0,o(new at(`Response timeout while trying to fetch ${e.url} (over ${e.timeout}ms)`,"body-timeout"))}),e.timeout)),t.on("error",(function(t){"AbortError"===t.name?(i=!0,o(t)):o(new at(`Invalid response body while trying to fetch ${e.url}: ${t.message}`,"system",t))})),t.on("data",(function(t){if(!i&&null!==t){if(e.size&&a+t.length>e.size)return i=!0,void o(new at(`content size at ${e.url} over limit: ${e.size}`,"max-size"));a+=t.length,n.push(t)}})),t.on("end",(function(){if(!i){clearTimeout(s);try{r(Buffer.concat(n,a))}catch(t){o(new at(`Could not create Buffer from response body for ${e.url}: ${t.message}`,"system",t))}}}))}))}function ct(e){return"object"==typeof e&&"function"==typeof e.append&&"function"==typeof e.delete&&"function"==typeof e.get&&"function"==typeof e.getAll&&"function"==typeof e.has&&"function"==typeof e.set&&("URLSearchParams"===e.constructor.name||"[object URLSearchParams]"===Object.prototype.toString.call(e)||"function"==typeof e.sort)}function pt(e){return"object"==typeof e&&"function"==typeof e.arrayBuffer&&"string"==typeof e.type&&"function"==typeof e.stream&&"function"==typeof e.constructor&&"string"==typeof e.constructor.name&&/^(Blob|File)$/.test(e.constructor.name)&&/^(Blob|File)$/.test(e[Symbol.toStringTag])}function dt(e){let t,n,a=e.body;if(e.bodyUsed)throw new Error("cannot clone body after it is used");return a instanceof he&&"function"!=typeof a.getBoundary&&(t=new ot,n=new ot,a.pipe(t),a.pipe(n),e[rt].body=t,a=n),a}function ut(e){return null===e?null:"string"==typeof e?"text/plain;charset=UTF-8":ct(e)?"application/x-www-form-urlencoded;charset=UTF-8":pt(e)?e.type||null:Buffer.isBuffer(e)||"[object ArrayBuffer]"===Object.prototype.toString.call(e)||ArrayBuffer.isView(e)?null:"function"==typeof e.getBoundary?`multipart/form-data;boundary=${e.getBoundary()}`:e instanceof he?null:"text/plain;charset=UTF-8"}function mt(e){const t=e.body;return null===t?0:pt(t)?t.size:Buffer.isBuffer(t)?t.length:t&&"function"==typeof t.getLengthSync&&(t._lengthRetrievers&&0==t._lengthRetrievers.length||t.hasKnownLength&&t.hasKnownLength())?t.getLengthSync():null}st.prototype={get body(){return this[rt].body},get bodyUsed(){return this[rt].disturbed},arrayBuffer(){return lt.call(this).then((function(e){return e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength)}))},blob(){let e=this.headers&&this.headers.get("content-type")||"";return lt.call(this).then((function(t){return Object.assign(new nt([],{type:e.toLowerCase()}),{[et]:t})}))},json(){var e=this;return lt.call(this).then((function(t){try{return JSON.parse(t.toString())}catch(t){return st.Promise.reject(new at(`invalid json response body at ${e.url} reason: ${t.message}`,"invalid-json"))}}))},text(){return lt.call(this).then((function(e){return e.toString()}))},buffer(){return lt.call(this)},textConverted(){var e=this;return lt.call(this).then((function(t){return function(e,t){if("function"!=typeof it)throw new Error("The package `encoding` must be installed to use the textConverted() function");const n=t.get("content-type");let a,i,r="utf-8";return n&&(a=/charset=([^;]*)/i.exec(n)),i=e.slice(0,1024).toString(),!a&&i&&(a=/0&&void 0!==arguments[0]?arguments[0]:void 0;if(this[bt]=Object.create(null),e instanceof Et){const t=e.raw(),n=Object.keys(t);for(const e of n)for(const n of t[e])this.append(e,n)}else if(null==e);else{if("object"!=typeof e)throw new TypeError("Provided initializer must be an object");{const t=e[Symbol.iterator];if(null!=t){if("function"!=typeof t)throw new TypeError("Header pairs must be iterable");const n=[];for(const t of e){if("object"!=typeof t||"function"!=typeof t[Symbol.iterator])throw new TypeError("Each header pair must be iterable");n.push(Array.from(t))}for(const e of n){if(2!==e.length)throw new TypeError("Each header pair must be a name/value tuple");this.append(e[0],e[1])}}else for(const t of Object.keys(e)){const n=e[t];this.append(t,n)}}}}get(e){gt(e=`${e}`);const t=vt(this[bt],e);return void 0===t?null:this[bt][t].join(", ")}forEach(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=St(this),a=0;for(;a1&&void 0!==arguments[1]?arguments[1]:"key+value";const n=Object.keys(e[bt]).sort();return n.map("key"===t?function(e){return e.toLowerCase()}:"value"===t?function(t){return e[bt][t].join(", ")}:function(t){return[t.toLowerCase(),e[bt][t].join(", ")]})}Et.prototype.entries=Et.prototype[Symbol.iterator],Object.defineProperty(Et.prototype,Symbol.toStringTag,{value:"Headers",writable:!1,enumerable:!1,configurable:!0}),Object.defineProperties(Et.prototype,{get:{enumerable:!0},forEach:{enumerable:!0},set:{enumerable:!0},append:{enumerable:!0},has:{enumerable:!0},delete:{enumerable:!0},keys:{enumerable:!0},values:{enumerable:!0},entries:{enumerable:!0}});const yt=Symbol("internal");function Tt(e,t){const n=Object.create(Ct);return n[yt]={target:e,kind:t,index:0},n}const Ct=Object.setPrototypeOf({next(){if(!this||Object.getPrototypeOf(this)!==Ct)throw new TypeError("Value of `this` is not a HeadersIterator");var e=this[yt];const t=e.target,n=e.kind,a=e.index,i=St(t,n);return a>=i.length?{value:void 0,done:!0}:(this[yt].index=a+1,{value:i[a],done:!1})}},Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())));function wt(e){const t=Object.assign({__proto__:null},e[bt]),n=vt(e[bt],"Host");return void 0!==n&&(t[n]=t[n][0]),t}Object.defineProperty(Ct,Symbol.toStringTag,{value:"HeadersIterator",writable:!1,enumerable:!1,configurable:!0});const Rt=Symbol("Response internals"),Nt=Y.STATUS_CODES;class Ot{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};st.call(this,e,t);const n=t.status||200,a=new Et(t.headers);if(null!=e&&!a.has("Content-Type")){const t=ut(e);t&&a.append("Content-Type",t)}this[Rt]={url:t.url,status:n,statusText:t.statusText||Nt[n],headers:a,counter:t.counter}}get url(){return this[Rt].url||""}get status(){return this[Rt].status}get ok(){return this[Rt].status>=200&&this[Rt].status<300}get redirected(){return this[Rt].counter>0}get statusText(){return this[Rt].statusText}get headers(){return this[Rt].headers}clone(){return new Ot(dt(this),{url:this.url,status:this.status,statusText:this.statusText,headers:this.headers,ok:this.ok,redirected:this.redirected})}}st.mixIn(Ot.prototype),Object.defineProperties(Ot.prototype,{url:{enumerable:!0},status:{enumerable:!0},ok:{enumerable:!0},redirected:{enumerable:!0},statusText:{enumerable:!0},headers:{enumerable:!0},clone:{enumerable:!0}}),Object.defineProperty(Ot.prototype,Symbol.toStringTag,{value:"Response",writable:!1,enumerable:!1,configurable:!0});const xt=Symbol("Request internals"),At=Qe.URL||Xe.URL,kt=Qe.parse,It=Qe.format;function Dt(e){return/^[a-zA-Z][a-zA-Z\d+\-.]*:/.exec(e)&&(e=new At(e).toString()),kt(e)}const Pt="destroy"in he.Readable.prototype;function Mt(e){return"object"==typeof e&&"object"==typeof e[xt]}class Lt{constructor(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Mt(e)?t=Dt(e.url):(t=e&&e.href?Dt(e.href):Dt(`${e}`),e={});let a=n.method||e.method||"GET";if(a=a.toUpperCase(),(null!=n.body||Mt(e)&&null!==e.body)&&("GET"===a||"HEAD"===a))throw new TypeError("Request with GET/HEAD method cannot have body");let i=null!=n.body?n.body:Mt(e)&&null!==e.body?dt(e):null;st.call(this,i,{timeout:n.timeout||e.timeout||0,size:n.size||e.size||0});const r=new Et(n.headers||e.headers||{});if(null!=i&&!r.has("Content-Type")){const e=ut(i);e&&r.append("Content-Type",e)}let o=Mt(e)?e.signal:null;if("signal"in n&&(o=n.signal),null!=o&&!function(e){const t=e&&"object"==typeof e&&Object.getPrototypeOf(e);return!(!t||"AbortSignal"!==t.constructor.name)}(o))throw new TypeError("Expected signal to be an instanceof AbortSignal");this[xt]={method:a,redirect:n.redirect||e.redirect||"follow",headers:r,parsedURL:t,signal:o},this.follow=void 0!==n.follow?n.follow:void 0!==e.follow?e.follow:20,this.compress=void 0!==n.compress?n.compress:void 0===e.compress||e.compress,this.counter=n.counter||e.counter||0,this.agent=n.agent||e.agent}get method(){return this[xt].method}get url(){return It(this[xt].parsedURL)}get headers(){return this[xt].headers}get redirect(){return this[xt].redirect}get signal(){return this[xt].signal}clone(){return new Lt(this)}}function Ft(e){Error.call(this,e),this.type="aborted",this.message=e,Error.captureStackTrace(this,this.constructor)}st.mixIn(Lt.prototype),Object.defineProperty(Lt.prototype,Symbol.toStringTag,{value:"Request",writable:!1,enumerable:!1,configurable:!0}),Object.defineProperties(Lt.prototype,{method:{enumerable:!0},url:{enumerable:!0},headers:{enumerable:!0},redirect:{enumerable:!0},clone:{enumerable:!0},signal:{enumerable:!0}}),Ft.prototype=Object.create(Error.prototype),Ft.prototype.constructor=Ft,Ft.prototype.name="AbortError";const jt=Qe.URL||Xe.URL,Ut=he.PassThrough;function Bt(e,t){if(!Bt.Promise)throw new Error("native promise missing, set fetch.Promise to your favorite alternative");return st.Promise=Bt.Promise,new Bt.Promise((function(n,a){const i=new Lt(e,t),r=function(e){const t=e[xt].parsedURL,n=new Et(e[xt].headers);if(n.has("Accept")||n.set("Accept","*/*"),!t.protocol||!t.hostname)throw new TypeError("Only absolute URLs are supported");if(!/^https?:$/.test(t.protocol))throw new TypeError("Only HTTP(S) protocols are supported");if(e.signal&&e.body instanceof he.Readable&&!Pt)throw new Error("Cancellation of streamed requests with AbortSignal is not supported in node < 8");let a=null;if(null==e.body&&/^(POST|PUT)$/i.test(e.method)&&(a="0"),null!=e.body){const t=mt(e);"number"==typeof t&&(a=String(t))}a&&n.set("Content-Length",a),n.has("User-Agent")||n.set("User-Agent","node-fetch/1.0 (+https://github.com/bitinn/node-fetch)"),e.compress&&!n.has("Accept-Encoding")&&n.set("Accept-Encoding","gzip,deflate");let i=e.agent;return"function"==typeof i&&(i=i(t)),n.has("Connection")||i||n.set("Connection","close"),Object.assign({},t,{method:e.method,headers:wt(n),agent:i})}(i),o=("https:"===r.protocol?$:Y).request,s=i.signal;let l=null;const c=function(){let e=new Ft("The user aborted a request.");a(e),i.body&&i.body instanceof he.Readable&&i.body.destroy(e),l&&l.body&&l.body.emit("error",e)};if(s&&s.aborted)return void c();const p=function(){c(),m()},d=o(r);let u;function m(){d.abort(),s&&s.removeEventListener("abort",p),clearTimeout(u)}s&&s.addEventListener("abort",p),i.timeout&&d.once("socket",(function(e){u=setTimeout((function(){a(new at(`network timeout at: ${i.url}`,"request-timeout")),m()}),i.timeout)})),d.on("error",(function(e){a(new at(`request to ${i.url} failed, reason: ${e.message}`,"system",e)),m()})),d.on("response",(function(e){clearTimeout(u);const t=function(e){const t=new Et;for(const n of Object.keys(e))if(!ht.test(n))if(Array.isArray(e[n]))for(const a of e[n])_t.test(a)||(void 0===t[bt][n]?t[bt][n]=[a]:t[bt][n].push(a));else _t.test(e[n])||(t[bt][n]=[e[n]]);return t}(e.headers);if(Bt.isRedirect(e.statusCode)){const r=t.get("Location");let o=null;try{o=null===r?null:new jt(r,i.url).toString()}catch(e){if("manual"!==i.redirect)return a(new at(`uri requested responds with an invalid redirect URL: ${r}`,"invalid-redirect")),void m()}switch(i.redirect){case"error":return a(new at(`uri requested responds with a redirect, redirect mode is set to error: ${i.url}`,"no-redirect")),void m();case"manual":if(null!==o)try{t.set("Location",o)}catch(e){a(e)}break;case"follow":if(null===o)break;if(i.counter>=i.follow)return a(new at(`maximum redirect reached at: ${i.url}`,"max-redirect")),void m();const r={headers:new Et(i.headers),follow:i.follow,counter:i.counter+1,agent:i.agent,compress:i.compress,method:i.method,body:i.body,signal:i.signal,timeout:i.timeout,size:i.size};if(!function(e,t){const n=new jt(t).hostname,a=new jt(e).hostname;return n===a||"."===n[n.length-a.length-1]&&n.endsWith(a)}(i.url,o))for(const e of["authorization","www-authenticate","cookie","cookie2"])r.headers.delete(e);return 303!==e.statusCode&&i.body&&null===mt(i)?(a(new at("Cannot follow redirect with body being a readable stream","unsupported-redirect")),void m()):(303!==e.statusCode&&(301!==e.statusCode&&302!==e.statusCode||"POST"!==i.method)||(r.method="GET",r.body=void 0,r.headers.delete("content-length")),n(Bt(new Lt(o,r))),void m())}}e.once("end",(function(){s&&s.removeEventListener("abort",p)}));let r=e.pipe(new Ut);const o={url:i.url,status:e.statusCode,statusText:e.statusMessage,headers:t,size:i.size,timeout:i.timeout,counter:i.counter},c=t.get("Content-Encoding");if(!i.compress||"HEAD"===i.method||null===c||204===e.statusCode||304===e.statusCode)return l=new Ot(r,o),void n(l);const d={flush:Ze.Z_SYNC_FLUSH,finishFlush:Ze.Z_SYNC_FLUSH};if("gzip"==c||"x-gzip"==c)return r=r.pipe(Ze.createGunzip(d)),l=new Ot(r,o),void n(l);if("deflate"!=c&&"x-deflate"!=c){if("br"==c&&"function"==typeof Ze.createBrotliDecompress)return r=r.pipe(Ze.createBrotliDecompress()),l=new Ot(r,o),void n(l);l=new Ot(r,o),n(l)}else e.pipe(new Ut).once("data",(function(e){r=8==(15&e[0])?r.pipe(Ze.createInflate()):r.pipe(Ze.createInflateRaw()),l=new Ot(r,o),n(l)}))})),function(e,t){const n=t.body;null===n?e.end():pt(n)?n.stream().pipe(e):Buffer.isBuffer(n)?(e.write(n),e.end()):n.pipe(e)}(d,i)}))}Bt.isRedirect=function(e){return 301===e||302===e||303===e||307===e||308===e},Bt.Promise=global.Promise;const qt=Bt;function zt(e,t){return e?t.httpsAgent:t.httpAgent}class Gt extends he.Transform{constructor(e){super(),this.progressCallback=e,this.loadedBytes=0}_transform(e,t,n){this.push(e),this.loadedBytes+=e.length,this.progressCallback({loadedBytes:this.loadedBytes}),n(void 0)}}function Ht(e){return e&&"function"==typeof e.pipe}function Vt(e,t){return new Promise((n=>{e.once("close",(()=>{null==t||t.abort(),n()})),e.once("end",n),e.once("error",n)}))}class Yt{constructor(){this.proxyAgentMap=new Map,this.keepAliveAgents={},this.cookieJar=new W.US(void 0,{looseMode:!0})}async sendRequest(e){var t;if(!e&&"object"!=typeof e)throw new Error("'httpRequest' (WebResourceLike) cannot be null or undefined and must be of type object.");const n=new ee;let a;if(e.abortSignal){if(e.abortSignal.aborted)throw new J("The operation was aborted.");a=e=>{"abort"===e.type&&n.abort()},e.abortSignal.addEventListener("abort",a)}if(e.timeout&&setTimeout((()=>{n.abort()}),e.timeout),e.formData){const t=e.formData,n=new(ge()),a=(e,t)=>{"function"==typeof t&&(t=t()),t&&Object.prototype.hasOwnProperty.call(t,"value")&&Object.prototype.hasOwnProperty.call(t,"options")?n.append(e,t.value,t.options):n.append(e,t)};for(const e of Object.keys(t)){const n=t[e];if(Array.isArray(n))for(let t=0;t{t.set(n,e)})),t}(o.headers),p=(null===(t=e.streamResponseStatusCodes)||void 0===t?void 0:t.has(o.status))||e.streamResponseBody;l={headers:c,request:e,status:o.status,readableStreamBody:p?o.body:void 0,bodyAsText:p?void 0:await o.text()};const d=e.onDownloadProgress;if(d){const e=o.body||void 0;if(Ht(e)){const t=new Gt(d);e.pipe(t),l.readableStreamBody=t}else{const e=parseInt(c.get("Content-Length"))||void 0;e&&d({loadedBytes:e})}}return await this.processRequest(l),l}catch(t){const n=t;if("ENOTFOUND"===n.code)throw new we(n.message,we.REQUEST_SEND_ERROR,void 0,e);if("aborted"===n.type)throw new J("The operation was aborted.");throw n}finally{if(e.abortSignal&&a){let t=Promise.resolve();Ht(i)&&(t=Vt(i));let r=Promise.resolve();Ht(null==l?void 0:l.readableStreamBody)&&(r=Vt(l.readableStreamBody,n)),Promise.all([t,r]).then((()=>{var t;null===(t=e.abortSignal)||void 0===t||t.removeEventListener("abort",a)})).catch((e=>{Ke.warning("Error when cleaning up abortListener on httpRequest",e)}))}}}getOrCreateAgent(e){var t;const n=ue(e.url);if(e.proxySettings){const{host:a,port:i,username:r,password:o}=e.proxySettings,s=`${a}:${i}:${r}:${o}`,l=null!==(t=this.proxyAgentMap.get(s))&&void 0!==t?t:{};let c=zt(n,l);if(c)return c;const p=function(e,t,n){const a=ae.parse(t.host).getHost();if(!a)throw new Error("Expecting a non-empty host in proxy settings.");if(!(0<=(i=t.port)&&i<=65535))throw new Error("Expecting a valid port number in the range of [0, 65535] in proxy settings.");var i;const r={proxy:{host:a,port:t.port,headers:n&&n.rawHeaders()||{}}};t.username&&t.password?r.proxy.proxyAuth=`${t.username}:${t.password}`:t.username&&(r.proxy.proxyAuth=`${t.username}`);const o=ue(e);return{isHttps:o,agent:me(o,ue(t.host),r)}}(e.url,e.proxySettings,e.headers);return c=p.agent,p.isHttps?l.httpsAgent=p.agent:l.httpAgent=p.agent,this.proxyAgentMap.set(s,l),c}if(e.keepAlive){let t=zt(n,this.keepAliveAgents);if(t)return t;const a={keepAlive:e.keepAlive};return t=n?this.keepAliveAgents.httpsAgent=new $.Agent(a):this.keepAliveAgents.httpAgent=new Y.Agent(a),t}return n?$.globalAgent:Y.globalAgent}async fetch(e,t){return qt(e,t)}async prepareRequest(e){const t={};if(this.cookieJar&&!e.headers.get("Cookie")){const t=await new Promise(((t,n)=>{this.cookieJar.getCookieString(e.url,((e,a)=>{e?n(e):t(a)}))}));e.headers.set("Cookie",t)}return t.agent=this.getOrCreateAgent(e),t.compress=e.decompressResponse,t}async processRequest(e){if(this.cookieJar){const t=e.headers.get("Set-Cookie");void 0!==t&&await new Promise(((n,a)=>{this.cookieJar.setCookie(t,e.request.url,{ignoreError:!0},(e=>{e?a(e):n()}))}))}}}var $t;function Wt(e){const{requestOptions:t,tracingOptions:n}=e;let a=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(a=Object.getOwnPropertySymbols(e);i{e?a.parseString(e,((e,a)=>{e?n(e):t(a)})):n(new Error("Document is empty"))}))}function an(e,t){return{create:(n,a)=>new ln(n,a,e,t)}}en.explicitArray=!1,en.renderOpts={pretty:!1};const rn=["application/json","text/json"],on=["application/xml","application/atom+xml"],sn={expectedContentTypes:{json:rn,xml:on}};class ln extends Kt{constructor(e,t,n,a={}){var i;super(e,t),this.jsonContentTypes=n&&n.json||rn,this.xmlContentTypes=n&&n.xml||on,this.xmlCharKey=null!==(i=a.xmlCharKey)&&void 0!==i?i:c}async sendRequest(e){return this._nextPolicy.sendRequest(e).then((e=>cn(this.jsonContentTypes,this.xmlContentTypes,e,{xmlCharKey:this.xmlCharKey})))}}function cn(e,t,n,a={}){var i,r,o;const s={rootName:null!==(i=a.rootName)&&void 0!==i?i:"",includeRoot:null!==(r=a.includeRoot)&&void 0!==r&&r,xmlCharKey:null!==(o=a.xmlCharKey)&&void 0!==o?o:c};return function(e,t,n,a){var i;const r=e=>{const t=`Error "${e}" occurred while parsing the response body - ${n.bodyAsText}.`,a=e.code||we.PARSE_ERROR,i=new we(t,a,n.status,n.request,n);return Promise.reject(i)};if(!(null===(i=n.request.streamResponseStatusCodes)||void 0===i?void 0:i.has(n.status))&&!n.request.streamResponseBody&&n.bodyAsText){const i=n.bodyAsText,o=n.headers.get("Content-Type")||"",s=o?o.split(";").map((e=>e.toLowerCase())):[];if(0===s.length||s.some((t=>-1!==e.indexOf(t))))return new Promise((e=>{n.parsedBody=JSON.parse(i),e(n)})).catch(r);if(s.some((e=>-1!==t.indexOf(e))))return nn(i,a).then((e=>(n.parsedBody=e,n))).catch(r)}return Promise.resolve(n)}(e,t,n,s).then((e=>{if(!function(e){const t=e.request.shouldDeserialize;let n;return n=void 0===t||("boolean"==typeof t?t:t(e)),n}(e))return e;const t=e.request.operationSpec;if(!t||!t.responses)return e;const i=function(e){let t;const n=e.request,a=n.operationSpec;if(a){const i=n.operationResponseGetter;t=i?i(a,e):a.responses[e.status]}return t}(e),{error:r,shouldReturnResponse:o}=function(e,t,n){var a;const i=200<=e.status&&e.status<300;if(function(e){const t=Object.keys(e.responses);return 0===t.length||1===t.length&&"default"===t[0]}(t)?i:n){if(!n)return{error:null,shouldReturnResponse:!1};if(!n.isError)return{error:null,shouldReturnResponse:!1}}const r=null!=n?n:t.responses.default,o=(null===(a=e.request.streamResponseStatusCodes)||void 0===a?void 0:a.has(e.status))||e.request.streamResponseBody?`Unexpected status code: ${e.status}`:e.bodyAsText,s=new we(o,void 0,e.status,e.request,e);if(!r)throw s;const l=r.bodyMapper,c=r.headersMapper;try{if(e.parsedBody){const n=e.parsedBody;let a;if(l){let e=n;t.isXML&&l.type.name===H.Sequence&&(e="object"==typeof n?n[l.xmlElementName]:[]),a=t.serializer.deserialize(l,e,"error.response.parsedBody")}const i=n.error||a||n;s.code=i.code,i.message&&(s.message=i.message),l&&(s.response.parsedBody=a)}e.headers&&c&&(s.response.parsedHeaders=t.serializer.deserialize(c,e.headers.toJson(),"operationRes.parsedHeaders"))}catch(t){s.message=`Error "${t.message}" occurred in deserializing the responseBody - "${e.bodyAsText}" for the default response.`}return{error:s,shouldReturnResponse:!1}}(e,t,i);if(r)throw r;if(o)return e;if(i){if(i.bodyMapper){let n=e.parsedBody;t.isXML&&i.bodyMapper.type.name===H.Sequence&&(n="object"==typeof n?n[i.bodyMapper.xmlElementName]:[]);try{e.parsedBody=t.serializer.deserialize(i.bodyMapper,n,"operationRes.parsedBody",a)}catch(t){throw new we(`Error ${t} occurred in deserializing the responseBody - ${e.bodyAsText}`,void 0,e.status,e.request,e)}}else"HEAD"===t.httpMethod&&(e.parsedBody=n.status>=200&&n.status<300);i.headersMapper&&(e.parsedHeaders=t.serializer.deserialize(i.headersMapper,e.headers.toJson(),"operationRes.parsedHeaders",a))}return e}))}const pn={enable:!0};function dn(e){return{create:(t,n)=>new un(t,n,e||pn)}}class un extends Kt{constructor(e,t,n){super(e,t),this.keepAliveOptions=n}async sendRequest(e){return e.keepAlive=this.keepAliveOptions.enable,this._nextPolicy.sendRequest(e)}}const mn=["GET","HEAD"],hn={handleRedirects:!0,maxRetries:20};function _n(e=20){return{create:(t,n)=>new gn(t,n,e)}}class gn extends Kt{constructor(e,t,n=20){super(e,t),this.maxRetries=n}sendRequest(e){return this._nextPolicy.sendRequest(e).then((e=>fn(this,e,0)))}}function fn(e,t,n){const{request:a,status:i}=t,r=t.headers.get("location");if(r&&(300===i||301===i&&mn.includes(a.method)||302===i&&mn.includes(a.method)||303===i&&"POST"===a.method||307===i)&&(!e.maxRetries||nfn(e,t,n+1)))}return Promise.resolve(t)}const vn=3e4,bn=9e4;function En(e){return"number"==typeof e}function Sn(e,t,n,a,i){return!!t(a,i)&&n.retryCount{let i,r;const o=()=>{var e;return a(new J(null!==(e=null==t?void 0:t.abortErrorMsg)&&void 0!==e?e:"The operation was aborted."))},s=()=>{(null==t?void 0:t.abortSignal)&&r&&t.abortSignal.removeEventListener("abort",r)};if(r=()=>(null!=i&&clearTimeout(i),s(),o()),(null==t?void 0:t.abortSignal)&&t.abortSignal.aborted)return o();i=setTimeout((()=>{s(),n()}),e),(null==t?void 0:t.abortSignal)&&t.abortSignal.addEventListener("abort",r)}))}function wn(e,t,n){return{create:(a,i)=>new On(a,i,e,t,n)}}var Rn;!function(e){e[e.Exponential=0]="Exponential"}(Rn||(Rn={}));const Nn={maxRetries:3,retryDelayInMs:vn,maxRetryDelayInMs:bn};class On extends Kt{constructor(e,t,n,a,i){super(e,t),this.retryCount=En(n)?n:3,this.retryInterval=En(a)?a:vn,this.maxRetryInterval=En(i)?i:bn}sendRequest(e){return this._nextPolicy.sendRequest(e.clone()).then((t=>xn(this,e,t))).catch((t=>xn(this,e,t.response,void 0,t)))}}async function xn(e,t,n,a,i){a=yn({retryInterval:e.retryInterval,minRetryInterval:0,maxRetryInterval:e.maxRetryInterval},a,i);const r=t.abortSignal&&t.abortSignal.aborted;if(r||!Sn(e.retryCount,(function(e){const t=null==e?void 0:e.status;return!(503===t&&(null==n?void 0:n.headers.get(Tn.HeaderConstants.RETRY_AFTER))||void 0===t||t<500&&408!==t||501===t||505===t)}),a,n)){if(r||i||!n)throw a.error||new we("Failed to send the request.",we.REQUEST_SEND_ERROR,n&&n.status,n&&n.request,n);return n}Ke.info(`Retrying request in ${a.retryInterval}`);try{await Cn(a.retryInterval);const n=await e._nextPolicy.sendRequest(t.clone());return xn(e,t,n,a)}catch(i){return xn(e,t,n,a,i)}}function An(e={}){return{create:(t,n)=>new kn(t,n,e)}}class kn extends Kt{constructor(e,t,{logger:n=Ke.info,allowedHeaderNames:a=[],allowedQueryParameters:i=[]}={}){super(e,t),this.logger=n,this.sanitizer=new Ee({allowedHeaderNames:a,allowedQueryParameters:i})}get allowedHeaderNames(){return this.sanitizer.allowedHeaderNames}set allowedHeaderNames(e){this.sanitizer.allowedHeaderNames=e}get allowedQueryParameters(){return this.sanitizer.allowedQueryParameters}set allowedQueryParameters(e){this.sanitizer.allowedQueryParameters=e}sendRequest(e){return this.logger.enabled?(this.logRequest(e),this._nextPolicy.sendRequest(e).then((e=>this.logResponse(e)))):this._nextPolicy.sendRequest(e)}logRequest(e){this.logger(`Request: ${this.sanitizer.sanitize(e)}`)}logResponse(e){return this.logger(`Response status code: ${e.status}`),this.logger(`Headers: ${this.sanitizer.sanitize(e.headers)}`),e}}function In(e){return Dn(e.parameterPath,e.mapper)}function Dn(e,t){let n;return n="string"==typeof e?e:Array.isArray(e)?e.join("."):t.serializedName,n}function Pn(e){const t=e;return t&&"function"==typeof t.getToken&&(void 0===t.signRequest||t.getToken.length>0)}function Mn(){return Tn.HeaderConstants.USER_AGENT}const Ln=Mn;function Fn(){const e=[{key:"core-http",value:Tn.coreHttpVersion}],t=[{key:"Node",value:process.version},{key:"OS",value:`(${Re.arch()}-${Re.type()}-${Re.release()})`}];return function(e,t=" ",n="/"){return e.map((e=>{const t=e.value?`${n}${e.value}`:"";return`${e.key}${t}`})).join(t)}(e.concat(t))}function jn(e){const t=e&&void 0!==e.key&&null!==e.key?e.key:Mn(),n=e&&void 0!==e.value&&null!==e.value?e.value:Fn();return{create:(e,a)=>new Un(e,a,t,n)}}class Un extends Kt{constructor(e,t,n,a){super(e,t),this._nextPolicy=e,this._options=t,this.headerKey=n,this.headerValue=a}sendRequest(e){return this.addUserAgentHeader(e),this._nextPolicy.sendRequest(e)}addUserAgentHeader(e){e.headers||(e.headers=new r),!e.headers.get(this.headerKey)&&this.headerValue&&e.headers.set(this.headerKey,this.headerValue)}}var Bn;!function(e){e.Csv=",",e.Ssv=" ",e.Tsv="\t",e.Pipes="|",e.Multi="Multi"}(Bn||(Bn={}));const qn={forcedRefreshWindowInMs:1e3,retryIntervalInMs:3e3,refreshWindowInMs:12e4};function zn(e,t){const n=function(e,t,n){let a=null,i=null;const r=Object.assign(Object.assign({},qn),n),o={get isRefreshing(){return null!==a},get shouldRefresh(){var e;return!o.isRefreshing&&(null!==(e=null==i?void 0:i.expiresOnTimestamp)&&void 0!==e?e:0)-r.refreshWindowInMse.getToken(t,n)),r.retryIntervalInMs,null!==(s=null==i?void 0:i.expiresOnTimestamp)&&void 0!==s?s:Date.now()).then((e=>(a=null,i=e,i))).catch((e=>{throw a=null,i=null,e}))),a}return async e=>o.mustRefresh?s(e):(o.shouldRefresh&&s(e),i)}(e,t);class a extends Kt{constructor(e,t){super(e,t)}async sendRequest(e){if(!e.url.toLowerCase().startsWith("https://"))throw new Error("Bearer token authentication is not permitted for non-TLS protected (non-https) URLs.");const{token:t}=await n({abortSignal:e.abortSignal,tracingOptions:{tracingContext:e.tracingContext}});return e.headers.set(Tn.HeaderConstants.AUTHORIZATION,`Bearer ${t}`),this._nextPolicy.sendRequest(e)}}return{create:(e,t)=>new a(e,t)}}function Gn(){return{create:(e,t)=>new Hn(e,t)}}class Hn extends Kt{constructor(e,t){super(e,t)}async sendRequest(e){return e.decompressResponse=!1,this._nextPolicy.sendRequest(e)}}function Vn(e="x-ms-client-request-id"){return{create:(t,n)=>new Yn(t,n,e)}}class Yn extends Kt{constructor(e,t,n){super(e,t),this._requestIdHeaderName=n}sendRequest(e){return e.headers.contains(this._requestIdHeaderName)||e.headers.set(this._requestIdHeaderName,e.requestId),this._nextPolicy.sendRequest(e)}}let $n;class Wn extends Kt{constructor(e,t){super(e,t)}async sendRequest(e){if("string"==typeof e.body&&e.body.startsWith("[")){const t=JSON.parse(e.body);Array.isArray(t)&&(e.body=t.map((e=>JSON.stringify(e)+"\n")).join(""))}return this._nextPolicy.sendRequest(e)}}const Kn=[];let Qn=!1;const Xn=new Map;function Zn(e){if(!e&&!(e=function(){if(!process)return;const e=D(Tn.HTTPS_PROXY),t=D(Tn.ALL_PROXY),n=D(Tn.HTTP_PROXY);return e||t||n}()))return;const{username:t,password:n,urlWithoutAuth:a}=function(e){const t=e.indexOf("@");if(-1===t)return{urlWithoutAuth:e};const n=e.indexOf("://"),a=-1!==n?n+3:0,i=e.substring(a,t),r=i.indexOf(":"),o=-1!==r;return{username:o?i.substring(0,r):i,password:o?i.substring(r+1):void 0,urlWithoutAuth:e.substring(0,a)+e.substring(t+1)}}(e),i=ae.parse(a);return{host:(i.getScheme()?i.getScheme()+"://":"")+i.getHost(),port:Number.parseInt(i.getPort()||"80"),username:t,password:n}}function Jn(e,t){return e||(e=Zn()),Qn||Kn.push(...function(){const e=D(Tn.NO_PROXY);return Qn=!0,e?e.split(",").map((e=>e.trim())).filter((e=>e.length)):[]}()),{create:(n,a)=>new ea(n,a,e,null==t?void 0:t.customNoProxyList)}}class ea extends Kt{constructor(e,t,n,a){super(e,t),this.proxySettings=n,this.customNoProxyList=a}sendRequest(e){var t;return e.proxySettings||function(e,t,n){if(0===t.length)return!1;const a=ae.parse(e).getHost();if(null==n?void 0:n.has(a))return n.get(a);let i=!1;for(const e of t)"."===e[0]?(a.endsWith(e)||a.length===e.length-1&&a===e.slice(1))&&(i=!0):a===e&&(i=!0);return null==n||n.set(a,i),i}(e.url,null!==(t=this.customNoProxyList)&&void 0!==t?t:Kn,this.customNoProxyList?void 0:Xn)||(e.proxySettings=this.proxySettings),this._nextPolicy.sendRequest(e)}}class ta extends Kt{constructor(e,t,n=30){super(e,t),this._retryTimeout=n}sendRequest(e){return this._nextPolicy.sendRequest(e.clone()).then((t=>function(e,t,n){if(409===n.status){const a=function(e){let t,n;if(e){try{n=JSON.parse(e)}catch(e){}if(n&&n.error&&n.error.message&&n.error.code&&"MissingSubscriptionRegistration"===n.error.code){const e=n.error.message.match(/.*'(.*)'/i);e&&(t=e.pop())}}return t}(n.bodyAsText);if(a){const i=function(e){let t;const n=e.match(/.*\/subscriptions\/[a-f0-9-]+\//gi);if(!n||!n[0])throw new Error(`Unable to extract subscriptionId from the given url - ${e}.`);return t=n[0],t}(t.url);return async function(e,t,n,a){const i=`${t}providers/${n}/register?api-version=2016-02-01`,r=`${t}providers/${n}?api-version=2016-02-01`,o=na(a);if(o.method="POST",o.url=i,200!==(await e._nextPolicy.sendRequest(o)).status)throw new Error(`Autoregistration of ${n} failed. Please try registering manually.`);return aa(e,r,a)}(e,i,a,t).catch((()=>!1)).then((a=>a?(t.headers.set("x-ms-client-request-id",w()),e._nextPolicy.sendRequest(t.clone())):n))}}return Promise.resolve(n)}(this,e,t)))}}function na(e,t=!1){const n=e.clone();return t&&(n.url=e.url),n.headers.set("x-ms-client-request-id",w()),n.headers.set("Content-Type","application/json; charset=utf-8"),n}async function aa(e,t,n){const a=na(n);a.url=t,a.method="GET";const i=await e._nextPolicy.sendRequest(a),r=i.parsedBody;return!(!i.parsedBody||!r.registrationState||"Registered"!==r.registrationState)||(await Cn(1e3*e._retryTimeout),aa(e,t,n))}function ia(e){return{create:(t,n)=>new ra(t,n,e)}}class ra extends Kt{constructor(e,t,n){super(e,t),this.authenticationProvider=n}signRequest(e){return this.authenticationProvider.signRequest(e)}sendRequest(e){return this.signRequest(e).then((e=>this._nextPolicy.sendRequest(e)))}}function oa(e,t,n,a){return{create:(i,r)=>new sa(i,r,e,t,n,a)}}class sa extends Kt{constructor(e,t,n,a,i,r){super(e,t),this.retryCount=En(n)?n:3,this.retryInterval=En(a)?a:vn,this.minRetryInterval=En(i)?i:3e3,this.maxRetryInterval=En(r)?r:bn}sendRequest(e){return this._nextPolicy.sendRequest(e.clone()).catch((t=>la(this,e,t.response,t)))}}async function la(e,t,n,a,i){if(i=yn(e,i,a),!Sn(e.retryCount,(function(e,t){return!(!t||!t.code||"ETIMEDOUT"!==t.code&&"ESOCKETTIMEDOUT"!==t.code&&"ECONNREFUSED"!==t.code&&"ECONNRESET"!==t.code&&"ENOENT"!==t.code)}),i,n,a))return a?Promise.reject(i.error):n;try{return await Cn(i.retryInterval),e._nextPolicy.sendRequest(t.clone())}catch(a){return la(e,t,n,a,i)}}const ca=Tn.HttpConstants.StatusCodes;function pa(){return{create:(e,t)=>new ua(e,t)}}const da="The operation was aborted.";class ua extends Kt{constructor(e,t,n){super(e,t),this.numberOfRetries=0,this._handleResponse=n||this._defaultResponseHandler}async sendRequest(e){const t=await this._nextPolicy.sendRequest(e.clone());return t.status!==ca.TooManyRequests&&t.status!==ca.ServiceUnavailable?t:this._handleResponse(e,t)}async _defaultResponseHandler(e,t){var n;const a=t.headers.get(Tn.HeaderConstants.RETRY_AFTER);if(a){const t=ua.parseRetryAfterHeader(a);if(t){if(this.numberOfRetries+=1,await Cn(t,{abortSignal:e.abortSignal,abortErrorMsg:da}),null===(n=e.abortSignal)||void 0===n?void 0:n.aborted)throw new J(da);return this.numberOfRetries<3?this.sendRequest(e):this._nextPolicy.sendRequest(e)}}return t}static parseRetryAfterHeader(e){const t=Number(e);return Number.isNaN(t)?ua.parseDateRetryAfterHeader(e):1e3*t}static parseDateRetryAfterHeader(e){try{const t=Date.now(),n=Date.parse(e)-t;return Number.isNaN(n)?void 0:n}catch(e){return}}}var ma,ha=n(7770);function _a(e,t){return ha.trace.setSpan(e,t)}!function(e){e[e.INTERNAL=0]="INTERNAL",e[e.SERVER=1]="SERVER",e[e.CLIENT=2]="CLIENT",e[e.PRODUCER=3]="PRODUCER",e[e.CONSUMER=4]="CONSUMER"}(ma||(ma={}));const ga=ha.context;var fa;function va(e){return function(t,n){const a=ha.trace.getTracer("azure/core-tracing",undefined);const i=(null==n?void 0:n.tracingOptions)||{},r=Object.assign({kind:ma.INTERNAL},i.spanOptions),o=e.packagePrefix?`${e.packagePrefix}.${t}`:t;let s;s=function(){var e;if("undefined"==typeof process)return!1;const t=null===(e=process.env.AZURE_TRACING_DISABLED)||void 0===e?void 0:e.toLowerCase();return"false"!==t&&"0"!==t&&Boolean(t)}()?ha.trace.wrapSpanContext(ha.INVALID_SPAN_CONTEXT):a.startSpan(o,r,i.tracingContext),e.namespace&&s.setAttribute("az.namespace",e.namespace);let l=i.spanOptions||{};s.isRecording()&&e.namespace&&(l=Object.assign(Object.assign({},i.spanOptions),{attributes:Object.assign(Object.assign({},r.attributes),{"az.namespace":e.namespace})}));const c=Object.assign(Object.assign({},i),{spanOptions:l,tracingContext:_a(i.tracingContext||ga.active(),s)});return{span:s,updatedOptions:Object.assign(Object.assign({},n),{tracingOptions:c})}}}!function(e){e[e.UNSET=0]="UNSET",e[e.OK=1]="OK",e[e.ERROR=2]="ERROR"}(fa||(fa={}));const ba=va({packagePrefix:"",namespace:""});function Ea(e={}){return{create:(t,n)=>new Sa(t,n,e)}}class Sa extends Kt{constructor(e,t,n){super(e,t),this.userAgent=n.userAgent}async sendRequest(e){if(!e.tracingContext)return this._nextPolicy.sendRequest(e);const t=this.tryCreateSpan(e);if(!t)return this._nextPolicy.sendRequest(e);try{const n=await this._nextPolicy.sendRequest(e);return this.tryProcessResponse(t,n),n}catch(e){throw this.tryProcessError(t,e),e}}tryCreateSpan(e){var t;try{const{span:n}=ba(`HTTP ${e.method}`,{tracingOptions:{spanOptions:Object.assign(Object.assign({},e.spanOptions),{kind:ma.CLIENT}),tracingContext:e.tracingContext}});if(!n.isRecording())return void n.end();const a=null===(t=e.tracingContext)||void 0===t?void 0:t.getValue(Symbol.for("az.namespace"));"string"==typeof a&&n.setAttribute("az.namespace",a),n.setAttributes({"http.method":e.method,"http.url":e.url,requestId:e.requestId}),this.userAgent&&n.setAttribute("http.user_agent",this.userAgent);const i=n.spanContext(),r=function(e){const t=[];if(e.traceId||t.push("traceId"),e.spanId||t.push("spanId"),t.length)return;const n=(e.traceFlags||0).toString(16),a=1===n.length?`0${n}`:n;return`00-${e.traceId}-${e.spanId}-${a}`}(i);if(r&&function(e){return ha.trace.isSpanContextValid(e)}(i)){e.headers.set("traceparent",r);const t=i.traceState&&i.traceState.serialize();t&&e.headers.set("tracestate",t)}return n}catch(e){return void Ke.warning(`Skipping creating a tracing span due to an error: ${e.message}`)}}tryProcessError(e,t){try{e.setStatus({code:fa.ERROR,message:t.message}),t.statusCode&&e.setAttribute("http.status_code",t.statusCode),e.end()}catch(e){Ke.warning(`Skipping tracing span processing due to an error: ${e.message}`)}}tryProcessResponse(e,t){try{e.setAttribute("http.status_code",t.status);const n=t.headers.get("x-ms-request-id");n&&e.setAttribute("serviceRequestId",n),e.setStatus({code:fa.OK}),e.end()}catch(e){Ke.warning(`Skipping tracing span processing due to an error: ${e.message}`)}}}class ya{constructor(e,t){let n;if(t||(t={}),this._withCredentials=t.withCredentials||!1,this._httpClient=t.httpClient||($n||($n=new Yt),$n),this._requestPolicyOptions=new Qt(t.httpPipelineLogger),Array.isArray(t.requestPolicyFactories))Ke.info("ServiceClient: using custom request policies"),n=t.requestPolicyFactories;else{let a;if(Pn(e))Ke.info("ServiceClient: creating bearer token authentication policy from provided credentials"),a=(()=>{let n;const a=this,i=t;return{create(t,r){const o=function(e,t){if(null==e?void 0:e.credentialScopes){const t=e.credentialScopes;return Array.isArray(t)?t.map((e=>new URL(e).toString())):new URL(t).toString()}if(t)return`${t}/.default`}(i,a.baseUri);if(!o)throw new Error("When using credential, the ServiceClient must contain a baseUri or a credentialScopes in ServiceClientOptions. Unable to create a bearerTokenAuthenticationPolicy");return null==n&&(n=zn(e,o)),n.create(t,r)}}})();else if(e&&"function"==typeof e.signRequest)Ke.info("ServiceClient: creating signing policy from provided credentials"),a=ia(e);else if(null!=e)throw new Error("The credentials argument must implement the TokenCredential interface");if(Ke.info("ServiceClient: using default request policies"),n=function(e,t){const n=[];t.generateClientRequestIdHeader&&n.push(Vn(t.clientRequestIdHeaderName)),e&&n.push(e);const a=Ta(t.userAgentHeaderName,Ln),i=Ta(t.userAgent,Fn);return a&&i&&n.push(jn({key:a,value:i})),n.push(_n()),n.push(function(e=30){return{create:(t,n)=>new ta(t,n,e)}}(t.rpRegistrationRetryTimeout)),t.noRetryPolicy||(n.push(wn()),n.push(oa()),n.push(pa())),n.push(an(t.deserializationContentTypes)),E&&n.push(Jn(t.proxySettings)),n.push(An({logger:Ke.info})),n}(a,t),t.requestPolicyFactories){const e=t.requestPolicyFactories(n);e&&(n=e)}}this._requestPolicyFactories=n}sendRequest(e){if(null==e||"object"!=typeof e)throw new Error("options cannot be null or undefined and it must be of type object.");let t;try{!function(e){if(e&&"object"==typeof e){const t=e;if("string"==typeof t.url&&"string"==typeof t.method&&"object"==typeof t.headers&&i(t.headers)&&"function"==typeof t.validateRequestProperties&&"function"==typeof t.prepare&&"function"==typeof t.clone)return!0}return!1}(e)?(t=new V,t=t.prepare(e)):(e.validateRequestProperties(),t=e)}catch(e){return Promise.reject(e)}let n=this._httpClient;if(this._requestPolicyFactories&&this._requestPolicyFactories.length>0)for(let e=this._requestPolicyFactories.length-1;e>=0;--e)n=this._requestPolicyFactories[e].create(n,this._requestPolicyOptions);return n.sendRequest(t)}async sendOperationRequest(e,t,n){var a;"function"==typeof e.options&&(n=e.options,e.options=void 0);const i=null===(a=e.options)||void 0===a?void 0:a.serializerOptions,r=new V;let o;try{const n=t.baseUrl||this.baseUri;if(!n)throw new Error("If operationSpec.baseUrl is not specified, then the ServiceClient must have a baseUri string property that contains the base URL to use.");r.method=t.httpMethod,r.operationSpec=t;const a=ae.parse(n);if(t.path&&a.appendPath(t.path),t.urlParameters&&t.urlParameters.length>0)for(const n of t.urlParameters){let r=wa(this,e,n,t.serializer);r=t.serializer.serialize(n.mapper,r,In(n),i),n.skipEncoding||(r=encodeURIComponent(r)),a.replaceAll(`{${n.mapper.serializedName||In(n)}}`,r)}if(t.queryParameters&&t.queryParameters.length>0)for(const n of t.queryParameters){let r=wa(this,e,n,t.serializer);if(null!=r){if(r=t.serializer.serialize(n.mapper,r,In(n),i),void 0!==n.collectionFormat&&null!==n.collectionFormat)if(n.collectionFormat===Bn.Multi){if(0===r.length)continue;for(const e in r){const t=r[e];r[e]=null==t?"":t.toString()}}else n.collectionFormat!==Bn.Ssv&&n.collectionFormat!==Bn.Tsv||(r=r.join(n.collectionFormat));if(!n.skipEncoding)if(Array.isArray(r))for(const e in r)void 0!==r[e]&&null!==r[e]&&(r[e]=encodeURIComponent(r[e]));else r=encodeURIComponent(r);void 0!==n.collectionFormat&&null!==n.collectionFormat&&n.collectionFormat!==Bn.Multi&&n.collectionFormat!==Bn.Ssv&&n.collectionFormat!==Bn.Tsv&&(r=r.join(n.collectionFormat)),a.setQueryParameter(n.mapper.serializedName||In(n),r)}}r.url=a.toString();const s=t.contentType||this.requestContentType;if(s&&t.requestBody&&r.headers.set("Content-Type",s),t.headerParameters)for(const n of t.headerParameters){let a=wa(this,e,n,t.serializer);if(null!=a){a=t.serializer.serialize(n.mapper,a,In(n),i);const e=n.mapper.headerCollectionPrefix;if(e)for(const t of Object.keys(a))r.headers.set(e+t,a[t]);else r.headers.set(n.mapper.serializedName||In(n),a)}}const p=e.options;if(p){if(p.customHeaders)for(const e in p.customHeaders)r.headers.set(e,p.customHeaders[e]);p.abortSignal&&(r.abortSignal=p.abortSignal),p.timeout&&(r.timeout=p.timeout),p.onUploadProgress&&(r.onUploadProgress=p.onUploadProgress),p.onDownloadProgress&&(r.onDownloadProgress=p.onDownloadProgress),p.spanOptions&&(r.spanOptions=p.spanOptions),p.tracingContext&&(r.tracingContext=p.tracingContext),void 0!==p.shouldDeserialize&&null!==p.shouldDeserialize&&(r.shouldDeserialize=p.shouldDeserialize)}let d,u;r.withCredentials=this._withCredentials,function(e,t,n,a){var i,r,o,s,p,d;const u=null!==(r=null===(i=n.options)||void 0===i?void 0:i.serializerOptions)&&void 0!==r?r:{},m={rootName:null!==(o=u.rootName)&&void 0!==o?o:"",includeRoot:null!==(s=u.includeRoot)&&void 0!==s&&s,xmlCharKey:null!==(p=u.xmlCharKey)&&void 0!==p?p:c},h=u.xmlCharKey;if(a.requestBody&&a.requestBody.mapper){t.body=wa(e,n,a.requestBody,a.serializer);const i=a.requestBody.mapper,{required:r,xmlName:o,xmlElementName:s,serializedName:c,xmlNamespace:p,xmlNamespacePrefix:u}=i,_=i.type.name;try{if(void 0!==t.body&&null!==t.body||r){const e=In(a.requestBody);t.body=a.serializer.serialize(i,t.body,e,m);const n=_===H.Stream;if(a.isXML){const e=u?`xmlns:${u}`:"xmlns",a=function(e,t,n,a,i){if(e&&!["Composite","Sequence","Dictionary"].includes(n)){const n={};return n[i.xmlCharKey]=a,n[l]={[t]:e},n}return a}(p,e,_,t.body,m);_===H.Sequence?t.body=tn(function(e,t,n,a){if(Array.isArray(e)||(e=[e]),!n||!a)return{[t]:e};const i={[t]:e};return i[l]={[n]:a},i}(a,s||o||c,e,p),{rootName:o||c,xmlCharKey:h}):n||(t.body=tn(a,{rootName:o||c,xmlCharKey:h}))}else{if(_===H.String&&((null===(d=a.contentType)||void 0===d?void 0:d.match("text/plain"))||"text"===a.mediaType))return;n||(t.body=JSON.stringify(t.body))}}}catch(e){throw new Error(`Error "${e.message}" occurred in serializing the payload - ${JSON.stringify(c,void 0," ")}.`)}}else if(a.formDataParameters&&a.formDataParameters.length>0){t.formData={};for(const i of a.formDataParameters){const r=wa(e,n,i,a.serializer);if(null!=r){const e=i.mapper.serializedName||In(i);t.formData[e]=a.serializer.serialize(i.mapper,r,In(i),m)}}}}(this,r,e,t),void 0===r.streamResponseStatusCodes&&(r.streamResponseStatusCodes=function(e){const t=new Set;for(const n in e.responses){const a=e.responses[n];a.bodyMapper&&a.bodyMapper.type.name===H.Stream&&t.add(Number(n))}return t}(t));try{d=await this.sendRequest(r)}catch(e){u=e}u?(u.response&&(u.details=Oa(u.response,t.responses[u.statusCode]||t.responses.default)),o=Promise.reject(u)):o=Promise.resolve(Oa(d,t.responses[d.status]))}catch(e){o=Promise.reject(e)}const s=n;return s&&o.then((e=>s(null,e._response.parsedBody,e._response.request,e._response))).catch((e=>s(e))),o}}function Ta(e,t){let n;return"string"==typeof e?n=e:(n=t(),"function"==typeof e&&(n=e(n))),n}function Ca(e,t){const n=[];let a;if(e.sendStreamingJson&&n.push({create:(e,t)=>new Wn(e,t)}),e.userAgentOptions&&e.userAgentOptions.userAgentPrefix){const t=[];t.push(e.userAgentOptions.userAgentPrefix);const n=Fn();-1===t.indexOf(n)&&t.push(n),a=t.join(" ")}const i=Object.assign(Object.assign({},pn),e.keepAliveOptions),r=Object.assign(Object.assign({},Nn),e.retryOptions),o=Object.assign(Object.assign({},hn),e.redirectOptions);E&&n.push(Jn(e.proxyOptions));const s=Object.assign(Object.assign({},sn),e.deserializationOptions),l=Object.assign({},e.loggingOptions);return n.push(Ea({userAgent:a}),dn(i),jn({value:a}),Vn(),an(s.expectedContentTypes),pa(),oa(),wn(r.maxRetries,r.retryDelayInMs,r.maxRetryDelayInMs)),o.handleRedirects&&n.push(_n(o.maxRetries)),t&&n.push(t),n.push(An(l)),E&&!1===e.decompressResponse&&n.push(Gn()),{httpClient:e.httpClient,requestPolicyFactories:n}}function wa(e,t,n,a){return Ra(e,t,n.parameterPath,n.mapper,a)}function Ra(e,t,n,a,i){var r;let o;"string"==typeof n&&(n=[n]);const s=null===(r=t.options)||void 0===r?void 0:r.serializerOptions;if(Array.isArray(n)){if(n.length>0){if(a.isConstant)o=a.defaultValue;else{let i=Na(t,n);i.propertyFound||(i=Na(e,n));let r=!1;i.propertyFound||(r=a.required||"options"===n[0]&&2===n.length),o=r?a.defaultValue:i.propertyValue}const r=Dn(n,a);i.serialize(a,o,r,s)}}else{a.required&&(o={});for(const r in n){const l=a.type.modelProperties[r],c=n[r],p=Ra(e,t,c,l,i),d=Dn(c,l);i.serialize(l,p,d,s),null!=p&&(o||(o={}),o[r]=p)}}return o}function Na(e,t){const n={propertyFound:!1};let a=0;for(;aObject.defineProperty(t,"_response",{value:e});if(a){const t=a.type.name;if("Stream"===t)return i(Object.assign(Object.assign({},n),{blobBody:e.blobBody,readableStreamBody:e.readableStreamBody}));const r="Composite"===t&&a.type.modelProperties||{},o=Object.keys(r).some((e=>""===r[e].serializedName));if("Sequence"===t||o){const t=[...e.parsedBody||[]];for(const n of Object.keys(r))r[n].serializedName&&(t[n]=e.parsedBody[n]);if(n)for(const e of Object.keys(n))t[e]=n[e];return i(t),t}if("Composite"===t||"Dictionary"===t)return i(Object.assign(Object.assign({},n),e.parsedBody))}return a||"HEAD"===e.request.method||"object"!=typeof(r=e.parsedBody)&&"function"!=typeof r||null===r?i(Object.assign(Object.assign({},n),{body:e.parsedBody})):i(Object.assign(Object.assign({},n),e.parsedBody));var r}function xa(e){return va(e)}class Aa{constructor(e=12e4){this.cachedToken=void 0,this.tokenRefreshBufferMs=e}setCachedToken(e){this.cachedToken=e}getCachedToken(){return this.cachedToken&&Date.now()+this.tokenRefreshBufferMs>=this.cachedToken.expiresOnTimestamp&&(this.cachedToken=void 0),this.cachedToken}}class ka{constructor(e,t,n=3e4){this.credential=e,this.scopes=t,this.requiredMillisecondsBeforeNewRefresh=n,this.lastCalled=0}isReady(){return!this.lastCalled||Date.now()-this.lastCalled>this.requiredMillisecondsBeforeNewRefresh}async getToken(e){this.lastCalled=Date.now();const t=await this.credential.getToken(this.scopes,e);return this.promise=void 0,t||void 0}refresh(e){return this.promise||(this.promise=this.getToken(e)),this.promise}}const Ia=Tn.HeaderConstants;class Da{constructor(e,t,n="Basic"){if(this.authorizationScheme="Basic",null==e||"string"!=typeof e.valueOf())throw new Error("userName cannot be null or undefined and must be of type string.");if(null==t||"string"!=typeof t.valueOf())throw new Error("password cannot be null or undefined and must be of type string.");this.userName=e,this.password=t,this.authorizationScheme=n}signRequest(e){const t=`${this.userName}:${this.password}`,n=`${this.authorizationScheme} ${a=t,Buffer.from(a).toString("base64")}`;var a;return e.headers||(e.headers=new r),e.headers.set(Ia.AUTHORIZATION,n),Promise.resolve(e)}}class Pa{constructor(e){if(!e||e&&!e.inHeader&&!e.inQuery)throw new Error('options cannot be null or undefined. Either "inHeader" or "inQuery" property of the options object needs to be provided.');this.inHeader=e.inHeader,this.inQuery=e.inQuery}signRequest(e){if(!e)return Promise.reject(new Error('webResource cannot be null or undefined and must be of type "object".'));if(this.inHeader){e.headers||(e.headers=new r);for(const t in this.inHeader)e.headers.set(t,this.inHeader[t])}if(this.inQuery){if(!e.url)return Promise.reject(new Error("url cannot be null in the request object."));e.url.indexOf("?")<0&&(e.url+="?");for(const t in this.inQuery)e.url.endsWith("?")||(e.url+="&"),e.url+=`${t}=${this.inQuery[t]}`}return Promise.resolve(e)}}class Ma extends Pa{constructor(e){if(!e||e&&"string"!=typeof e)throw new Error("topicKey cannot be null or undefined and must be of type string.");super({inHeader:{"aeg-sas-key":e}})}}},67164:(e,t,n)=>{"use strict";n.r(t),n.d(t,{AppInsightsCore:()=>G,BaseCore:()=>H,BaseTelemetryPlugin:()=>x.i,CoreUtils:()=>z.Tr,DiagnosticLogger:()=>g.AQ,ESPromise:()=>$,ESPromiseScheduler:()=>J,EventHelper:()=>ae.zB,EventLatency:()=>p,EventPersistence:()=>u,EventPropertyType:()=>d,EventsDiscardedReason:()=>ne.h,FullVersionString:()=>z.vs,InternalAppInsightsCore:()=>B,InternalBaseCore:()=>F,LoggingSeverity:()=>s,MinChannelPriorty:()=>te,NotificationManager:()=>U,PerfEvent:()=>f.zn,PerfManager:()=>f.Jk,ProcessTelemetryContext:()=>y.Vi,TraceLevel:()=>m,Undefined:()=>oe.jA,Utils:()=>z.cQ,ValueKind:()=>c,ValueSanitizer:()=>ee,Version:()=>z.Gf,_ExtendedInternalMessageId:()=>h,_InternalLogMessage:()=>g.lQ,_InternalMessageId:()=>l,__getRegisteredEvents:()=>ie.um,_logInternalMessage:()=>g.L4,_throwInternal:()=>g.kP,_warnToConsole:()=>g.jV,addEventHandler:()=>ie.Ib,addEventListeners:()=>ie.yw,addPageHideEventListener:()=>ie.TJ,addPageShowEventListener:()=>ie.nD,addPageUnloadEventListener:()=>ie.c9,areCookiesSupported:()=>R.p7,arrForEach:()=>o.tO,arrIndexOf:()=>o.UA,arrMap:()=>o.Mr,arrReduce:()=>o.Xz,attachEvent:()=>ie.pZ,cookieAvailable:()=>R.p7,createCookieMgr:()=>R.Nz,createEnumStyle:()=>r.By,createGuid:()=>z.cm,createProcessTelemetryContext:()=>y.CD,createTraceParent:()=>se.SU,createUniqueNamespace:()=>N.J,createUnloadHandlerContainer:()=>k.Y,dateNow:()=>o.m6,deleteCookie:()=>z.kT,detachEvent:()=>ie.pD,disableCookies:()=>z.oF,disallowsSameSiteNone:()=>R.UY,doPerf:()=>f.Lm,dumpObj:()=>v.eU,eventOff:()=>ie.QY,eventOn:()=>ie.XO,extend:()=>z.l7,findW3cTraceParent:()=>se.lq,formatTraceParent:()=>se.aR,generateW3CId:()=>ae.DO,getCommonSchemaMetaData:()=>z.Vv,getConsole:()=>v.dr,getCookie:()=>z.ej,getCookieValue:()=>z.Do,getCrypto:()=>v.MX,getDocument:()=>v.Me,getExceptionName:()=>o.jj,getFieldValueType:()=>z.Sy,getGlobal:()=>E.Rd,getGlobalInst:()=>v.a8,getHistory:()=>v.s1,getIEVersion:()=>v.sA,getISOString:()=>o.Y6,getJSON:()=>v.xA,getLocation:()=>v.k$,getMsCrypto:()=>v.gz,getNavigator:()=>v.jW,getPerformance:()=>v.r,getSetValue:()=>o.qK,getTenantId:()=>z.jM,getTime:()=>z.hK,getWindow:()=>v.Jj,hasDocument:()=>v.Nv,hasHistory:()=>v.fE,hasJSON:()=>v.nS,hasNavigator:()=>v.d6,hasOwnProperty:()=>o.nr,hasWindow:()=>v.Ym,isArray:()=>o.kJ,isArrayValid:()=>z.JT,isBeaconsSupported:()=>v.MF,isBoolean:()=>o.jn,isChromium:()=>z.mJ,isDate:()=>o.J_,isDocumentObjectAvailable:()=>z.x9,isError:()=>o.VZ,isFetchSupported:()=>v.JO,isFunction:()=>o.mf,isIE:()=>v.w1,isLatency:()=>z.r7,isNotTruthy:()=>o.F,isNullOrUndefined:()=>o.le,isNumber:()=>o.hj,isObject:()=>o.Kn,isReactNative:()=>v.b$,isSampledFlag:()=>se.Pn,isString:()=>o.HD,isTruthy:()=>o.fQ,isTypeof:()=>o.Ym,isUint8ArrayAvailable:()=>z.IZ,isUndefined:()=>o.o8,isValidSpanId:()=>se.Lc,isValidTraceId:()=>se.jN,isValidTraceParent:()=>se.J6,isValueAssigned:()=>z.Sn,isValueKind:()=>z.oS,isWindowObjectAvailable:()=>z.dH,isXhrSupported:()=>v.Z3,mergeEvtNamespace:()=>ie.jU,newGuid:()=>ae.GW,newId:()=>re.pZ,normalizeJsName:()=>o.Gf,objCreate:()=>E.pu,objDefineAccessors:()=>o.l_,objForEachKey:()=>o.rW,objFreeze:()=>o.FL,objKeys:()=>o.FY,objSeal:()=>o.Xi,openXhr:()=>z.ot,optimizeObject:()=>o.Ax,parseTraceParent:()=>se.j_,perfNow:()=>ae.Jj,proxyAssign:()=>o.cf,proxyFunctionAs:()=>o.Oi,proxyFunctions:()=>o.Vb,random32:()=>re._l,randomValue:()=>re.az,removeEventHandler:()=>ie.C1,removeEventListeners:()=>ie.nJ,removePageHideEventListener:()=>ie.C9,removePageShowEventListener:()=>ie.Yl,removePageUnloadEventListener:()=>ie.JA,safeGetCookieMgr:()=>R.JP,safeGetLogger:()=>g.vH,sanitizeProperty:()=>z.yj,setCookie:()=>z.d8,setEnableEnvMocks:()=>v.dI,setProcessTelemetryTimings:()=>z.if,setValue:()=>o.sO,strContains:()=>o._Q,strEndsWith:()=>o.Id,strFunction:()=>oe.cb,strObject:()=>oe.fK,strPrototype:()=>oe.hB,strStartsWith:()=>o.xe,strTrim:()=>o.nd,strUndefined:()=>oe.jA,throwError:()=>o._y,toISOString:()=>o.Y6,useXDomainRequest:()=>v.cp});var a,i=n(27421),r=n(50951),o=n(24869),s=(0,r.By)({CRITICAL:1,WARNING:2}),l=(0,r.By)(((a={}).BrowserDoesNotSupportLocalStorage=0,a.BrowserCannotReadLocalStorage=1,a.BrowserCannotReadSessionStorage=2,a.BrowserCannotWriteLocalStorage=3,a.BrowserCannotWriteSessionStorage=4,a.BrowserFailedRemovalFromLocalStorage=5,a.BrowserFailedRemovalFromSessionStorage=6,a.CannotSendEmptyTelemetry=7,a.ClientPerformanceMathError=8,a.ErrorParsingAISessionCookie=9,a.ErrorPVCalc=10,a.ExceptionWhileLoggingError=11,a.FailedAddingTelemetryToBuffer=12,a.FailedMonitorAjaxAbort=13,a.FailedMonitorAjaxDur=14,a.FailedMonitorAjaxOpen=15,a.FailedMonitorAjaxRSC=16,a.FailedMonitorAjaxSend=17,a.FailedMonitorAjaxGetCorrelationHeader=18,a.FailedToAddHandlerForOnBeforeUnload=19,a.FailedToSendQueuedTelemetry=20,a.FailedToReportDataLoss=21,a.FlushFailed=22,a.MessageLimitPerPVExceeded=23,a.MissingRequiredFieldSpecification=24,a.NavigationTimingNotSupported=25,a.OnError=26,a.SessionRenewalDateIsZero=27,a.SenderNotInitialized=28,a.StartTrackEventFailed=29,a.StopTrackEventFailed=30,a.StartTrackFailed=31,a.StopTrackFailed=32,a.TelemetrySampledAndNotSent=33,a.TrackEventFailed=34,a.TrackExceptionFailed=35,a.TrackMetricFailed=36,a.TrackPVFailed=37,a.TrackPVFailedCalc=38,a.TrackTraceFailed=39,a.TransmissionFailed=40,a.FailedToSetStorageBuffer=41,a.FailedToRestoreStorageBuffer=42,a.InvalidBackendResponse=43,a.FailedToFixDepricatedValues=44,a.InvalidDurationValue=45,a.TelemetryEnvelopeInvalid=46,a.CreateEnvelopeError=47,a.CannotSerializeObject=48,a.CannotSerializeObjectNonSerializable=49,a.CircularReferenceDetected=50,a.ClearAuthContextFailed=51,a.ExceptionTruncated=52,a.IllegalCharsInName=53,a.ItemNotInArray=54,a.MaxAjaxPerPVExceeded=55,a.MessageTruncated=56,a.NameTooLong=57,a.SampleRateOutOfRange=58,a.SetAuthContextFailed=59,a.SetAuthContextFailedAccountName=60,a.StringValueTooLong=61,a.StartCalledMoreThanOnce=62,a.StopCalledWithoutStart=63,a.TelemetryInitializerFailed=64,a.TrackArgumentsNotSpecified=65,a.UrlTooLong=66,a.SessionStorageBufferFull=67,a.CannotAccessCookie=68,a.IdTooLong=69,a.InvalidEvent=70,a.FailedMonitorAjaxSetRequestHeader=71,a.SendBrowserInfoOnUserInit=72,a.PluginException=73,a.NotificationException=74,a.SnippetScriptLoadFailure=99,a.InvalidInstrumentationKey=100,a.CannotParseAiBlobValue=101,a.InvalidContentBlob=102,a.TrackPageActionEventFailed=103,a.FailedAddingCustomDefinedRequestContext=104,a.InMemoryStorageBufferFull=105,a.InstrumentationKeyDeprecation=106,a)),c=(0,r.By)({NotSet:0,Pii_DistinguishedName:1,Pii_GenericData:2,Pii_IPV4Address:3,Pii_IPv6Address:4,Pii_MailSubject:5,Pii_PhoneNumber:6,Pii_QueryString:7,Pii_SipAddress:8,Pii_SmtpAddress:9,Pii_Identity:10,Pii_Uri:11,Pii_Fqdn:12,Pii_IPV4AddressLegacy:13,CustomerContent_GenericContent:32}),p=(0,r.By)({Normal:1,CostDeferred:2,RealTime:3,Immediate:4}),d=(0,r.By)({Unspecified:0,String:1,Int32:2,UInt32:3,Int64:4,UInt64:5,Double:6,Bool:7,Guid:8,DateTime:9}),u=(0,r.By)({Normal:1,Critical:2}),m=(0,r.By)({NONE:0,ERROR:1,WARNING:2,INFORMATION:3}),h=(0,o.FL)((0,i.uc)((0,i.uc)({},l),(0,r.By)({AuthHandShakeError:501,AuthRedirectFail:502,BrowserCannotReadLocalStorage:503,BrowserCannotWriteLocalStorage:504,BrowserDoesNotSupportLocalStorage:505,CannotParseBiBlobValue:506,CannotParseDataAttribute:507,CVPluginNotAvailable:508,DroppedEvent:509,ErrorParsingAISessionCookie:510,ErrorProvidedChannels:511,FailedToGetCookies:512,FailedToInitializeCorrelationVector:513,FailedToInitializeSDK:514,InvalidContentBlob:515,InvalidCorrelationValue:516,SessionRenewalDateIsZero:517,SendPostOnCompleteFailure:518,PostResponseHandler:519,SDKNotInitialized:520}))),_=n(29141),g=n(29339),f=n(81782),v=n(49251),b=n(98145),E=n(30175),S=n(96335),y=n(31030),T=n(69031),C=500;function w(e,t,n){t&&(0,o.kJ)(t)&&t[b.R5]>0&&(t=t.sort((function(e,t){return e[S.yi]-t[S.yi]})),(0,o.tO)(t,(function(e){e[S.yi]C&&i[b.MW](e)})),w(a,i,n)}return a}(h,i,e)),m){var r=(0,o.UA)(i,m);-1!==r&&i[b.cb](r,1),-1!==(r=(0,o.UA)(u,m))&&u[b.cb](r,1),m._setQueue(v)}else m=function(e,t){function n(){return(0,y.CD)(null,t[b.TC],t,null)}function a(e,t,n,a){var i=e?e[b.R5]+1:1;function r(){0==--i&&(a&&a(),a=null)}i>0&&(0,o.tO)(e,(function(e){if(e&&e.queue[b.R5]>0){var a=e.chain,o=t[b.zV](a);o[b.Fc](r),n(o)}else i--})),r()}var i=!1;return{identifier:"ChannelControllerPlugin",priority:C,initialize:function(t,n,a,r){i=!0,(0,o.tO)(e,(function(e){e&&e.queue[b.R5]>0&&(0,T.bP)((0,y.CD)(e.chain,t,n),a)}))},isInitialized:function(){return i},processTelemetry:function(t,i){a(e,i||n(),(function(e){e[b.uL](t)}),(function(){i[b.uL](t)}))},update:function(t,n){var i=n||{reason:0};return a(e,t,(function(e){e[b.uL](i)}),(function(){t[b.uL](i)})),!0},pause:function(){a(e,n(),(function(e){e.iterate((function(e){e.pause&&e.pause()}))}),null)},resume:function(){a(e,n(),(function(e){e.iterate((function(e){e.resume&&e.resume()}))}),null)},teardown:function(t,n){var r=n||{reason:0,isAsync:!1};return a(e,t,(function(e){e[b.uL](r)}),(function(){t[b.uL](r),i=!1})),!0},getChannel:function(t){var n=null;return e&&e[b.R5]>0&&(0,o.tO)(e,(function(e){if(e&&e.queue[b.R5]>0&&((0,o.tO)(e.queue,(function(e){if(e[b.pZ]===t)return n=e,-1})),n))return-1})),n},flush:function(t,i,r,o){var s=1,l=!1,c=null;function p(){s--,l&&0===s&&(c&&(clearTimeout(c),c=null),i&&i(l),i=null)}return o=o||5e3,a(e,n(),(function(e){e.iterate((function(e){if(e[b.kL]){s++;var n=!1;e[b.kL](t,(function(){n=!0,p()}),r)||n||(t&&null==c?c=setTimeout((function(){c=null,p()}),o):p())}}))}),(function(){l=!0,p()})),!0},_setQueue:function(t){e=t}}}(v,e);i[b.MW](m),u[b.MW](m),e[b.iC]=(0,T.AA)(i),m[b.VL](t,e,i),(0,T.bP)(H(),i),e[b.iC]=(0,o.FL)((0,T.AA)(u||[])).slice(),n&&function(t){var n=(0,y.xy)($(),e);e._updateHook&&!0===e._updateHook(n,t)||n[b.uL](t)}(n)}function Y(t){var n,a=null,i=null;return(0,o.tO)(e[b.iC],(function(e){if(e[b.pZ]===t&&e!==m&&e!==F)return i=e,-1})),!i&&m&&(i=m.getChannel(t)),i&&((n={plugin:i})[b.$h]=function(e){(0,T.OY)(i)[S.mE]=!e},n.isEnabled=function(){var e=(0,T.OY)(i);return!e[b.fi]&&!e[S.mE]},n.remove=function(e,t){var n;void 0===e&&(e=!0);var a=[i],r=((n={reason:1})[b.d]=e,n);W(a,r,(function(e){e&&V({reason:32,removed:a}),t&&t(e)}))},a=n),a}function $(){if(!p){var n=(u||[]).slice();-1===(0,o.UA)(n,F)&&n[b.MW](F),p=(0,y.jV)((0,T.AA)(n),t,e)}return p}function W(n,a,i){if(n&&n[b.R5]>0){var r=(0,y.jV)(n,t,e),s=(0,y.Bt)(r,e);s[b.Fc]((function(){var e=!1,t=[];(0,o.tO)(d,(function(a,i){L(a,n)?e=!0:t[b.MW](a)})),d=t;var a=[];h&&((0,o.tO)(h,(function(t,i){var r=[];(0,o.tO)(t,(function(t){L(t,n)?e=!0:r[b.MW](t)})),a[b.MW](r)})),h=a),i&&i(e)})),s[b.uL](a)}else i(!1)}function K(){var n=e[b.eZ]?e[b.eZ].queue:[];n&&((0,o.tO)(n,(function(n){var a,i=((a={})[b.I]=j||"InternalMessageId: "+n[b.Gc],a.iKey=(0,o.v4)(t[b.p$]),a.time=(0,o.Y6)(new Date),a.baseType=g.lQ.dataType,a.baseData={message:n[b.gU]},a);e.track(i)})),n[b.R5]=0)}function Q(e,t,n,a){return m?m[b.kL](e,t,n||6,a):(t&&t(!1),!0)}function X(t){var n=e[b.eZ];n?(0,g.kP)(n,2,73,t):(0,o._y)(t)}_(),e[b.yl]=function(){return n},e[b.VL]=function(a,s,c,p){var u,m;x&&(0,o._y)(D),e[b.yl]()&&(0,o._y)("Core should not be initialized more than once"),t=a||{},e[b.TC]=t,(0,o.le)(a[b.p$])&&(0,o._y)("Please provide instrumentation key"),r=p,e._notificationManager=p,!0===(m=(0,o.v4)(t.disableDbgExt))&&q&&(r[b.n7](q),q=null),r&&!q&&!0!==m&&(q=(0,O.p)(t),r[b.g](q)),!(u=(0,o.v4)(t.enablePerfMgr))&&l&&(l=null),u&&(0,o.qK)(t,S.DN,M),(0,o.qK)(t,S.Zh,{}).NotificationManager=r,c&&(e[b.eZ]=c);var _=(0,o.qK)(t,S.js,[]);(d=[])[b.MW].apply(d,(0,i.$h)((0,i.$h)([],s,!1),_,!1)),h=(0,o.qK)(t,S.Z,[]),V(null),v&&0!==v[b.R5]||(0,o._y)("No "+S.Z+" available"),n=!0,e.releaseQueue()},e.getTransmissionControls=function(){var e=[];return v&&(0,o.tO)(v,(function(t){e[b.MW](t.queue)})),(0,o.FL)(e)},e.track=function(n){n.iKey=n.iKey||t[b.p$],n[b.Z_]=n[b.Z_]||(0,o.Y6)(new Date),n.ver=n.ver||"4.0",!x&&e[b.yl]()?H()[b.uL](n):a[b.MW](n)},e[b.SD]=H,e[b.tb]=function(){return r||(r=function(){var e;return(0,E.pu)(((e={})[b.g]=function(e){},e[b.n7]=function(e){},e[S.uC]=function(e){},e[S.$F]=function(e,t){},e[S.f_]=function(e,t){},e))}(),e._notificationManager=r),r},e[b.g]=function(e){r&&r[b.g](e)},e[b.n7]=function(e){r&&r[b.n7](e)},e.getCookieMgr=function(){return c||(c=(0,R.Nz)(t,e[b.eZ])),c},e.setCookieMgr=function(e){c=e},e[S.kl]=function(){if(!s&&!l&&(0,o.v4)(t.enablePerfMgr)){var n=(0,o.v4)(t[S.DN]);(0,o.mf)(n)&&(l=n(e,e[b.tb]()))}return s||l||(0,f.j5)()},e.setPerfMgr=function(e){s=e},e.eventCnt=function(){return a[b.R5]},e.releaseQueue=function(){if(n&&a[b.R5]>0){var e=a;a=[],(0,o.tO)(e,(function(e){H()[b.uL](e)}))}},e.pollInternalLogs=function(e){j=e||null;var n=(0,o.v4)(t.diagnosticLogInterval);return n&&n>0||(n=1e4),G&&clearInterval(G),G=setInterval((function(){K()}),n)},e[b.LS]=function(){G&&(clearInterval(G),G=0,K())},(0,o.Vb)(e,(function(){return F}),["addTelemetryInitializer"]),e.unload=function(t,a,i){var r;void 0===t&&(t=!0),n||(0,o._y)("SDK is not initialized"),x&&(0,o._y)(D);var s=((r={reason:50})[b.d]=t,r.flushComplete=!1,r),l=(0,y.Bt)($(),e);function c(t){s.flushComplete=t,x=!0,B.run(l,s),e[b.LS](),l[b.uL](s)}l[b.Fc]((function(){_(),a&&a(s)}),e),Q(t,c,6,i)||c(!1)},e[b.TO]=Y,e.addPlugin=function(e,t,n,a){if(!e)return a&&a(!1),void X(I);var i=Y(e[b.pZ]);if(i&&!t)return a&&a(!1),void X("Plugin ["+e[b.pZ]+"] is already loaded!");var r={reason:16};function o(t){d[b.MW](e),r.added=[e],V(r),a&&a(!0)}if(i){var s=[i.plugin];W(s,{reason:2,isAsync:!!n},(function(e){e?(r.removed=s,r.reason|=32,o()):a&&a(!1)}))}else o()},e.evtNamespace=function(){return U},e[b.kL]=Q,e.getTraceCtx=function(e){return z||(z=(0,T.Yn)()),z},e.setTraceCtx=function(e){z=e||null},(0,o.Oi)(e,"addUnloadCb",(function(){return B}),"add")}))}return e.__ieDyn=1,e}();function j(e,t,n,a){(0,o.tO)(e,(function(e){if(e&&e[t])if(n)setTimeout((function(){return a(e)}),0);else try{a(e)}catch(e){}}))}var U=function(){function e(t){this.listeners=[];var n=!!(t||{}).perfEvtsSendAll;(0,_.Z)(e,this,(function(e){e[b.g]=function(t){e.listeners[b.MW](t)},e[b.n7]=function(t){for(var n=(0,o.UA)(e[b.dE],t);n>-1;)e.listeners[b.cb](n,1),n=(0,o.UA)(e[b.dE],t)},e[S.uC]=function(t){j(e[b.dE],S.uC,!0,(function(e){e[S.uC](t)}))},e[S.$F]=function(t,n){j(e[b.dE],S.$F,!0,(function(e){e[S.$F](t,n)}))},e[S.f_]=function(t,n){j(e[b.dE],S.f_,n,(function(e){e[S.f_](t,n)}))},e[S.C$]=function(t){t&&(!n&&t[b.PL]()||j(e[b.dE],S.C$,!1,(function(e){t[b.d]?setTimeout((function(){return e[S.C$](t)}),0):e[S.C$](t)})))}}))}return e.__ieDyn=1,e}(),B=function(e){function t(){var n=e.call(this)||this;return(0,_.Z)(t,n,(function(e,t){function n(t){var n=e[b.tb]();n&&n[S.$F]([t],2)}e[b.VL]=function(e,n,a,i){t[b.VL](e,n,a||new g.AQ(e),i||new U(e))},e.track=function(a){(0,f.Lm)(e[S.kl](),(function(){return"AppInsightsCore:track"}),(function(){null===a&&(n(a),(0,o._y)("Invalid telemetry item")),function(e){(0,o.le)(e[b.I])&&(n(e),(0,o._y)("telemetry name required"))}(a),t.track(a)}),(function(){return{item:a}}),!a.sync)}})),n}return(0,i.ne)(t,e),t.__ieDyn=1,t}(F),q=n(51539),z=n(65705);const G=function(e){function t(){var n=e.call(this)||this;return n.pluginVersionStringArr=[],(0,_.Z)(t,n,(function(e,t){e.logger&&e.logger.queue||(e.logger=new g.AQ({loggingLevelConsole:1})),e.initialize=function(n,a,i,r){(0,f.Lm)(e,(function(){return"AppInsightsCore.initialize"}),(function(){var s=e.pluginVersionStringArr;if(n){n.endpointUrl||(n.endpointUrl=q.YT);var l=n.propertyStorageOverride;!l||l.getProperty&&l.setProperty||(0,o._y)("Invalid property storage override passed."),n.channels&&(0,o.tO)(n.channels,(function(e){e&&(0,o.tO)(e,(function(e){if(e.identifier&&e.version){var t=e.identifier+"="+e.version;s.push(t)}}))}))}e.getWParam=function(){return"undefined"!=typeof document||n.enableWParam?0:-1},a&&(0,o.tO)(a,(function(e){if(e&&e.identifier&&e.version){var t=e.identifier+"="+e.version;s.push(t)}})),e.pluginVersionString=s.join(";"),e.pluginVersionStringArr=s;try{t.initialize(n,a,i,r),e.pollInternalLogs("InternalLog")}catch(t){var c=e.logger,p=(0,v.eU)(t);-1!==p.indexOf("channels")&&(p+="\n - Channels must be provided through config.channels only!"),(0,g.kP)(c,1,514,"SDK Initialization Failed - no telemetry will be sent: "+p)}}),(function(){return{config:n,extensions:a,logger:i,notificationManager:r}}))},e.track=function(n){(0,f.Lm)(e,(function(){return"AppInsightsCore.track"}),(function(){var a=n;if(a){a.timings=a.timings||{},a.timings.trackStart=(0,z.hK)(),(0,z.r7)(a.latency)||(a.latency=1);var i=a.ext=a.ext||{};i.sdk=i.sdk||{},i.sdk.ver=z.vs;var r=a.baseData=a.baseData||{};r[q.o6]=r[q.o6]||{};var o=r[q.o6];o[q.p8]=o[q.p8]||e.pluginVersionString||q.qS}t.track(a)}),(function(){return{item:n}}),!n.sync)}})),n}return(0,i.ne)(t,e),t.__ieDyn=1,t}(B),H=function(e){function t(){var n=e.call(this)||this;return(0,_.Z)(t,n,(function(e,t){e.initialize=function(n,a,i,r){n&&!n.endpointUrl&&(n.endpointUrl=q.YT),e.getWParam=function(){return z.x9||n.enableWParam?0:-1};try{t.initialize(n,a,i,r)}catch(t){(0,g.kP)(e.logger,1,514,"Initialization Failed: "+(0,v.eU)(t)+"\n - Note: Channels must be provided through config.channels only")}},e.track=function(e){var n=e;if(n){var a=n.ext=n.ext||{};a.sdk=a.sdk||{},a.sdk.ver=z.vs}t.track(n)}})),n}return(0,i.ne)(t,e),t.__ieDyn=1,t}(F);var V=o.mf;function Y(e,t,n){return function(a){e[t]=a,n()}}const $=function(){function e(t){var n=0,a=null,i=[];function r(){if(i.length>0){var e=i.slice();i=[],setTimeout((function(){for(var t=0,n=e.length;t")+"."+W;function r(e){var t=(0,E.Rd)();t&&t.QUnit&&console&&console.log("ESPromiseScheduler["+i+"] "+e)}function o(e){(0,g.jV)(n,"ESPromiseScheduler["+i+"] "+e)}W++,(0,_.Z)(e,this,(function(e){var t=null,n=0;function s(e,t){for(var n=0;n0){for(var l=0;l{"use strict";n.d(t,{qS:()=>a,YT:()=>i,p8:()=>r,o6:()=>o});var a="",i="https://browser.events.data.microsoft.com/OneCollector/1.0/",r="version",o="properties"},65705:(e,t,n)=>{"use strict";n.d(t,{Gf:()=>m,vs:()=>h,x9:()=>v,dH:()=>b,Sn:()=>E,jM:()=>S,IZ:()=>y,r7:()=>T,yj:()=>C,Vv:()=>w,oF:()=>R,d8:()=>N,kT:()=>O,ej:()=>x,Do:()=>A,cm:()=>k,l7:()=>I,hK:()=>D,oS:()=>P,JT:()=>M,if:()=>L,Sy:()=>F,cQ:()=>j,Tr:()=>U,mJ:()=>B,ot:()=>q});var a,i=n(49251),r=n(24869),o=n(88140),s=n(28956),l=n(1550),c=n(47954),p=n(19406),d=n(30175),u=n(51539),m="3.2.8",h="1DS-Web-JS-"+m,_="withCredentials",g=((a={})[0]=0,a[2]=6,a[1]=1,a[3]=7,a[4098]=6,a[4097]=1,a[4099]=7,a),f=null,v=Boolean((0,i.Me)()),b=Boolean((0,i.Jj)());function E(e){return!(e===u.qS||(0,r.le)(e))}function S(e){if(e){var t=e.indexOf("-");if(t>-1)return e.substring(0,t)}return u.qS}function y(){return null===f&&(f=!(0,r.o8)(Uint8Array)&&!function(){var e=(0,i.jW)();if(!(0,r.o8)(e)&&e.userAgent){var t=e.userAgent.toLowerCase();if((t.indexOf("safari")>=0||t.indexOf("firefox")>=0)&&t.indexOf("chrome")<0)return!0}return!1}()&&!(0,i.b$)()),f}function T(e){return!!(e&&(0,r.hj)(e)&&e>=1&&e<=4)}function C(e,t,n){if(!t&&!E(t)||"string"!=typeof e)return null;var a=typeof t;if("string"===a||"number"===a||"boolean"===a||(0,r.kJ)(t))t={value:t};else if("object"!==a||l.CY.call(t,"value")){if((0,r.le)(t.value)||t.value===u.qS||!(0,r.HD)(t.value)&&!(0,r.hj)(t.value)&&!(0,r.jn)(t.value)&&!(0,r.kJ)(t.value))return null}else t={value:n?JSON.stringify(t):t};if((0,r.kJ)(t.value)&&!M(t.value))return null;if(!(0,r.le)(t.kind)){if((0,r.kJ)(t.value)||!P(t.kind))return null;t.value=t.value.toString()}return t}function w(e,t,n){var a=-1;if(!(0,r.o8)(e))if(t>0&&(32===t?a=8192:t<=13&&(a=t<<5)),function(e){return e>=0&&e<=9}(n))-1===a&&(a=0),a|=n;else{var i=g[F(e)]||-1;-1!==a&&-1!==i?a|=i:6===i&&(a=i)}return a}function R(){(0,o.JP)(null).setEnabled(!1)}function N(e,t,n){(0,o.p7)(null)&&(0,o.JP)(null).set(e,t,86400*n,null,"/")}function O(e){(0,o.p7)(null)&&(0,o.JP)(null).del(e)}function x(e){return(0,o.p7)(null)?A((0,o.JP)(null),e):u.qS}function A(e,t,n){var a;return void 0===n&&(n=!0),e&&(a=e.get(t),n&&a&&decodeURIComponent&&(a=decodeURIComponent(a))),a||u.qS}function k(e){void 0===e&&(e="D");var t=(0,s.GW)();return"B"===e?t="{"+t+"}":"P"===e?t="("+t+")":"N"===e&&(t=t.replace(/-/g,u.qS)),t}function I(e,t,n,a,i){var o={},s=!1,c=0,p=arguments.length,d=Object[l.hB],u=arguments;for("[object Boolean]"===d.toString.call(u[0])&&(s=u[0],c++);c0&&e<=13||32===e}function M(e){return e.length>0}function L(e,t){var n=e;n.timings=n.timings||{},n.timings.processTelemetryStart=n.timings.processTelemetryStart||{},n.timings.processTelemetryStart[t]=D()}function F(e){var t=0;if(null!=e){var n=typeof e;"string"===n?t=1:"number"===n?t=2:"boolean"===n?t=3:n===l.fK&&(t=4,(0,r.kJ)(e)?(t=4096,e.length>0&&(t|=F(e[0]))):l.CY.call(e,"value")&&(t=8192|F(e.value)))}return t}var j={Version:m,FullVersionString:h,strUndefined:l.jA,strObject:l.fK,Undefined:l.jA,arrForEach:r.tO,arrIndexOf:r.UA,arrMap:r.Mr,arrReduce:r.Xz,objKeys:r.FY,toISOString:r.Y6,isReactNative:i.b$,isString:r.HD,isNumber:r.hj,isBoolean:r.jn,isFunction:r.mf,isArray:r.kJ,isObject:r.Kn,strTrim:r.nd,isDocumentObjectAvailable:v,isWindowObjectAvailable:b,isValueAssigned:E,getTenantId:S,isBeaconsSupported:i.MF,isUint8ArrayAvailable:y,isLatency:T,sanitizeProperty:C,getISOString:r.Y6,useXDomainRequest:i.cp,getCommonSchemaMetaData:w,cookieAvailable:o.p7,disallowsSameSiteNone:o.UY,setCookie:N,deleteCookie:O,getCookie:x,createGuid:k,extend:I,getTime:D,isValueKind:P,isArrayValid:M,objDefineAccessors:r.l_,addPageUnloadEventListener:c.c9,setProcessTelemetryTimings:L,addEventHandler:c.Ib,getFieldValueType:F,strEndsWith:r.Id,objForEachKey:r.rW},U={_canUseCookies:void 0,isTypeof:r.Ym,isUndefined:r.o8,isNullOrUndefined:r.le,hasOwnProperty:r.nr,isFunction:r.mf,isObject:r.Kn,isDate:r.J_,isArray:r.kJ,isError:r.VZ,isString:r.HD,isNumber:r.hj,isBoolean:r.jn,toISOString:r.Y6,arrForEach:r.tO,arrIndexOf:r.UA,arrMap:r.Mr,arrReduce:r.Xz,strTrim:r.nd,objCreate:d.pu,objKeys:r.FY,objDefineAccessors:r.l_,addEventHandler:c.Ib,dateNow:r.m6,isIE:i.w1,disableCookies:R,newGuid:s.GW,perfNow:s.Jj,newId:p.pZ,randomValue:p.az,random32:p._l,mwcRandomSeed:p.CN,mwcRandom32:p.F6,generateW3CId:s.DO};function B(){return!!(0,i.a8)("chrome")}function q(e,t,n,a,i,r){function o(e,t,n){try{e[t]=n}catch(e){}}void 0===a&&(a=!1),void 0===i&&(i=!1);var s=new XMLHttpRequest;return a&&o(s,"Microsoft_ApplicationInsights_BypassAjaxInstrumentation",a),n&&o(s,_,n),s.open(e,t,!i),n&&o(s,_,n),!i&&r&&o(s,"timeout",r),s}},71488:(e,t,n)=>{"use strict";n.r(t),n.d(t,{BE_PROFILE:()=>g,NRT_PROFILE:()=>_,PostChannel:()=>ae,RT_PROFILE:()=>h});var a=n(27421),i=n(29141),r=n(81782),o=n(47954),s=n(87624),l=n(65705),c=n(24869),p=n(49251),d=n(28452),u=n(29339),m=n(87951),h="REAL_TIME",_="NEAR_REAL_TIME",g="BEST_EFFORT",f="",v="POST",b="drop",E="requeue",S="application/x-json-stream",y="content-type",T="client-version",C="client-id",w="time-delta-to-apply-millis",R="upload-time",N="apikey",O="AuthMsaDeviceTicket",x="AuthXToken";function A(e){var t=(e.ext||{}).intweb;return t&&(0,l.Sn)(t.msfpc)?t.msfpc:null}function k(e){for(var t=null,n=0;null===t&&n(0,c.m6)()||(delete n[a],!1)}}))}return e.__ieDyn=1,e}();var M=n(1550);function L(e){var t,n=Math.floor(1200*Math.random())+2400;return t=Math.pow(2,e)*n,Math.min(t,6e5)}var F,j=2e6,U=Math.min(j,65e3),B=/\./,q=function(){function e(t,n,a,o){var s="baseData",p=!!o,d=n,u={};(0,i.Z)(e,this,(function(e){function n(e,t,i,r,o,s,m){(0,c.rW)(e,(function(e,h){var _=null;if(h||(0,l.Sn)(h)){var g=i,f=e,v=o,b=t;if(p&&!r&&B.test(e)){var E=e.split("."),S=E.length;if(S>1){v&&(v=v.slice());for(var y=0;y=7&&(n=(0,c.xe)(e,"ext.metadata")||(0,c.xe)(e,"ext.web")),u[e]=n),n}(g)||!d||!d.handleField(g,f)?(0,l.yj)(f,h,a):d.value(g,f,h,a)){var C=_.value;if(b[f]=C,s&&s(v,f,_),m&&"object"==typeof C&&!(0,c.kJ)(C)){var w=v;w&&(w=w.slice()).push(f),n(h,C,g+"."+f,r,w,s,m)}}}}))}e.createPayload=function(e,t,n,a,i,r){return{apiKeys:[],payloadBlob:f,overflow:null,sizeExceed:[],failedEvts:[],batches:[],numEvents:0,retryCnt:e,isTeardown:t,isSync:n,isBeacon:a,sendType:r,sendReason:i}},e.appendPayload=function(n,a,i){var o=n&&a&&!n.overflow;return o&&(0,r.Lm)(t,(function(){return"Serializer:appendPayload"}),(function(){for(var t=a.events(),r=n.payloadBlob,o=n.numEvents,s=!1,l=[],p=[],d=n.isBeacon,u=d?65e3:3984588,m=d?U:j,h=0,_=0;h=i){n.overflow=a.split(h);break}var f=e.getEventBlob(g);if(f&&f.length<=m){var v=f.length;if(r.length+v>u){n.overflow=a.split(h);break}r&&(r+="\n"),r+=f,++_>20&&(r.substr(0,1),_=0),s=!0,o++}else f?l.push(g):p.push(g),t.splice(h,1),h--}h++}if(l&&l.length>0&&n.sizeExceed.push(I.create(a.iKey(),l)),p&&p.length>0&&n.failedEvts.push(I.create(a.iKey(),p)),s){n.batches.push(a),n.payloadBlob=r,n.numEvents=o;var b=a.iKey();-1===(0,c.UA)(n.apiKeys,b)&&n.apiKeys.push(b)}}),(function(){return{payload:n,theBatch:{iKey:a.iKey(),evts:a.events()},max:i}})),o},e.getEventBlob=function(e){try{return(0,r.Lm)(t,(function(){return"Serializer.getEventBlob"}),(function(){var t={};t.name=e.name,t.time=e.time,t.ver=e.ver,t.iKey="o:"+(0,l.jM)(e.iKey);var a={},i=e.ext;i&&(t.ext=a,(0,c.rW)(i,(function(e,t){n(t,a[e]={},"ext."+e,!0,null,null,!0)})));var r=t.data={};r.baseType=e.baseType;var o=r.baseData={};return n(e.baseData,o,s,!1,[s],(function(e,t,n){z(a,e,t,n)}),!0),n(e.data,r,"data",!1,[],(function(e,t,n){z(a,e,t,n)}),!0),JSON.stringify(t)}),(function(){return{item:e}}))}catch(e){return null}}}))}return e.__ieDyn=1,e}();function z(e,t,n,a){if(a&&e){var i=(0,l.Vv)(a.value,a.kind,a.propertyType);if(i>-1){var r=e.metadata;r||(r=e.metadata={f:{}});var o=r.f;if(o||(o=r.f={}),t)for(var s=0;s0)for(var i=t.toLowerCase(),r=0;r0&&(a&&V[t]?(e.hdrs[V[t]]=n,e.useHdrs=!0):e.url+="&"+t+"="+n)}function X(e,t){return t&&((0,c.hj)(t)?e=[t].concat(e):(0,c.kJ)(t)&&(e=t.concat(e))),e}$(O,O,!1),$(T,T),$(C,"Client-Id"),$(N,N),$(w,w),$(R,R),$(x,x);var Z=function(){function e(t,n,a,o,s){this._responseHandlers=[];var d,m,h,_,g,E,O,x,A,k,I="?cors=true&"+y.toLowerCase()+"="+S,F=new P,j=!1,U=new D,B=!1,z=0,V=!0,$=[],Z={},J=[],ee=null,te=!1,ne=!1,ae=!1;(0,i.Z)(e,this,(function(e){var i=!0;function D(e,t){for(var n=0,a=null,i=0;null==a&&i0&&(p.headers=e.headers),fetch(r,p).then((function(e){var n={},a=f,i=e.headers;i&&i.forEach((function(e,t){n[t]=e})),e.body&&e.text().then((function(e){a=e})),l||(l=!0,oe(t,e.status,n,a),ve(a))})).catch((function(e){l||(l=!0,oe(t,0,{}))})),o&&!l&&(l=!0,oe(t,200,{})),!l&&e.timeout>0&&s.set((function(){l||(l=!0,oe(t,500,{}))}),e.timeout)}function re(e,t,n){var a=e.urlString;function r(e,t,n){if(!e[n]&&t&&t.getResponseHeader){var a=t.getResponseHeader(n);a&&(e[n]=(0,c.nd)(a))}return e}function o(e,n){oe(t,e.status,function(e){var t={};return e.getAllResponseHeaders?t=function(e){var t={};if((0,c.HD)(e)){var n=(0,c.nd)(e).split(/[\r\n]+/);(0,c.tO)(n,(function(e){if(e){var n=e.indexOf(": ");if(-1!==n){var a=(0,c.nd)(e.substring(0,n)).toLowerCase(),i=(0,c.nd)(e.substring(n+1));t[a]=i}else t[(0,c.nd)(e)]=1}}))}return t}(e.getAllResponseHeaders()):(t=r(t,e,"time-delta-millis"),t=r(t,e,"kill-duration"),t=r(t,e,"kill-duration-seconds")),t}(e),n)}n&&e.disableXhrSync&&(n=!1);var s=(0,l.ot)(v,a,i,!0,n,e.timeout);(0,c.rW)(e.headers,(function(e,t){s.setRequestHeader(e,t)})),s.onload=function(){var e=W(s);o(s,e),ve(e)},s.onerror=function(){o(s)},s.ontimeout=function(){o(s)},s.send(e.data)}function oe(e,t,n,a){try{e(t,n,a)}catch(e){(0,u.kP)(m,2,518,(0,p.eU)(e))}}function se(e,t,n){var a=200,i=e._thePayload,r=e.urlString+(k?G:f);try{var o=(0,p.jW)();if(!o.sendBeacon(r,e.data))if(i){var s=[];(0,c.tO)(i.batches,(function(e){if(s&&e&&e.count()>0){for(var t=e.events(),n=0;n0&&!j&&h[t]&&ee&&(a=0!==t||pe()&&(n>0||U.allowRequestSending())),a}function me(e){var t={};return e&&(0,c.tO)(e,(function(e,n){t[n]={iKey:e.iKey(),evts:e.events()}})),t}function he(e,n,a,i,o){if(e&&0!==e.length)if(j)be(e,1,i);else{i=ce(i);try{var s=e,c=0!==i;(0,r.Lm)(_,(function(){return"HttpManager:_sendBatches"}),(function(r){r&&(e=e.slice(0));for(var s=[],p=null,d=(0,l.hK)(),u=h[i]||(c?h[1]:h[0]),m=u&&u._transport,_=A&&(ne||le(i)||3===m||u._isSync&&2===m);ue(e,i,n);){var g=e.shift();g&&g.count()>0&&(F.isTenantKilled(g.iKey())?s.push(g):(p=p||ee.createPayload(n,a,c,_,o,i),ee.appendPayload(p,g,t)?null!==p.overflow&&(e=[p.overflow].concat(e),p.overflow=null,ge(p,d,(0,l.hK)(),o),d=(0,l.hK)(),p=null):(ge(p,d,(0,l.hK)(),o),d=(0,l.hK)(),e=[g].concat(e),p=null)))}p&&ge(p,d,(0,l.hK)(),o),e.length>0&&(J=e.concat(J)),be(s,8004,i)}),(function(){return{batches:me(s),retryCount:n,isTeardown:a,isSynchronous:c,sendReason:o,useSendBeacon:le(i),sendType:i}}),!c)}catch(e){(0,u.kP)(m,2,48,"Unexpected Exception sending batch: "+(0,p.eU)(e))}}}function _e(e,t,n){e[t]=e[t]||{},e[t][d.identifier]=n}function ge(t,n,i,o){if(t&&t.payloadBlob&&t.payloadBlob.length>0){var s=!!e.sendHook,g=h[t.sendType];!le(t.sendType)&&t.isBeacon&&2===t.sendReason&&(g=h[2]||h[3]||g);var v=ae;(t.isBeacon||3===g._transport)&&(v=!1);var b=function(e,t){var n={url:I,hdrs:{},useHdrs:!1};t?(n.hdrs=(0,l.l7)(n.hdrs,Z),n.useHdrs=(0,c.FY)(n.hdrs).length>0):(0,c.rW)(Z,(function(e,t){Y[e]?Q(n,Y[e],t,!1):(n.hdrs[e]=t,n.useHdrs=!0)})),Q(n,C,"NO_AUTH",t),Q(n,T,l.vs,t);var a=f;(0,c.tO)(e.apiKeys,(function(e){a.length>0&&(a+=","),a+=e})),Q(n,N,a,t),Q(n,R,(0,c.m6)().toString(),t);var i=function(e){for(var t=0;t=0&&(n.url+="&w="+r)}for(var o=0;o<$.length;o++)n.url+="&"+$[o].name+"="+$[o].value;return n}(t,v);v=v||b.useHdrs;var A=(0,l.hK)();(0,r.Lm)(_,(function(){return"HttpManager:_doPayloadSend"}),(function(){for(var h=0;h0?C.sendAttempt++:C.sendAttempt=1}be(t.batches,1e3+(o||0),t.sendType,!0);var R={data:t.payloadBlob,urlString:b.url,headers:b.hdrs,_thePayload:t,_sendReason:o,timeout:E,disableXhrSync:O,disableFetchKeepAlive:x};v&&(K(R.headers,"cache-control")||(R.headers["cache-control"]="no-cache, no-store"),K(R.headers,y)||(R.headers["content-type"]=S));var N=null;g&&(N=function(n){U.firstRequestSent();var i=function(n,i){!function(t,n,i,r){var o,s=9e3,p=null,u=!1,m=!1;try{var h=!0;if(typeof t!==M.jA){if(n){U.setClockSkew(n["time-delta-millis"]);var _=n["kill-duration"]||n["kill-duration-seconds"];(0,c.tO)(F.setKillSwitchTenants(n["kill-tokens"],_),(function(e){(0,c.tO)(i.batches,(function(t){if(t.iKey()===e){p=p||[];var n=t.split(0);i.numEvents-=n.count(),p.push(n)}}))}))}if(200==t||204==t)return void(s=200);((o=t)>=300&&o<500&&408!=o&&429!=o||501==o||505==o||i.numEvents<=0)&&(h=!1),s=9e3+t%1e3}if(h){s=100;var g=i.retryCnt;0===i.sendType&&(g0&&function(e,t){te&&(0,c.tO)(e,(function(e){_e(e.timings=e.timings||{},"sendEventCompleted",t)}))}(e.events(),t)}))}}(t.batches)),be(t.batches,n,t.sendType,!0)}finally{0===t.sendType&&(z--,5!==a&&e.sendQueuedRequests(t.sendType,a))}}(i,s,r,m)),be(p,8004,i.sendType)}}(n,i,t,o)},r=t.isTeardown||t.isSync;try{g.sendPOST(n,i,r),e.sendListener&&e.sendListener(R,n,r,t.isBeacon)}catch(e){(0,u.jV)(m,"Unexpected exception sending payload. Ex:"+(0,p.eU)(e)),oe(i,0,{})}}),(0,r.Lm)(_,(function(){return"HttpManager:_doPayloadSend.sender"}),(function(){if(N)if(0===t.sendType&&z++,s&&!t.isBeacon&&3!==g._transport){var n={data:R.data,urlString:R.urlString,headers:(0,l.l7)({},R.headers),timeout:R.timeout,disableXhrSync:R.disableXhrSync,disableFetchKeepAlive:R.disableFetchKeepAlive},a=!1;(0,r.Lm)(_,(function(){return"HttpManager:_doPayloadSend.sendHook"}),(function(){try{e.sendHook(n,(function(e){a=!0,V||e._thePayload||(e._thePayload=e._thePayload||R._thePayload,e._sendReason=e._sendReason||R._sendReason),N(e)}),t.isSync||t.isTeardown)}catch(e){a||N(R)}}))}else N(R)}))}),(function(){return{thePayload:t,serializationStart:n,serializationCompleted:i,sendReason:o}}),t.isSync)}t.sizeExceed&&t.sizeExceed.length>0&&be(t.sizeExceed,8003,t.sendType),t.failedEvts&&t.failedEvts.length>0&&be(t.failedEvts,8002,t.sendType)}function fe(e,t,n){t?e():s.set(e,n)}function ve(t){var n=e._responseHandlers;try{for(var a=0;a0&&o){var i=o[(c=t,p=H[c],(0,l.Sn)(p)||(p="oth",c>=9e3&&c<=9999?p="rspFail":c>=8e3&&c<=8999?p=b:c>=1e3&&c<=1999&&(p="send")),p)];if(i){var s=0!==n;(0,r.Lm)(_,(function(){return"HttpManager:_sendBatchesNotification"}),(function(){fe((function(){try{i.call(o,e,t,s,n)}catch(e){(0,u.kP)(m,1,74,"send request notification failed: "+e)}}),a||s,0)}),(function(){return{batches:me(e),reason:t,isSync:s,sendSync:a,sendType:n}}),!s)}}var c,p}e.initialize=function(e,t,n,a,r){var o;r||(r={}),I=e+I,ae=!!(0,c.o8)(r.avoidOptions)||!r.avoidOptions,_=t,g=t.getCookieMgr(),te=!_.config.disableEventTimings;var s=!!_.config.enableCompoundKey;m=(d=n).diagLog();var l=r.valueSanitizer,f=r.stringifyObjects;(0,c.o8)(r.enableCompoundKey)||(s=!!r.enableCompoundKey),E=r.xhrTimeout,O=!!r.disableXhrSync,x=!!r.disableFetchKeepAlive,k=!1!==r.addNoResponse,B=!(0,p.b$)(),ee=new q(_,l,f,s),(0,c.le)(r.useSendBeacon)||(B=!!r.useSendBeacon);var v=a,b=r.alwaysUseXhrOverride?a:null,S=r.alwaysUseXhrOverride?a:null,y=[3,2];if(!a){V=!1;var T=(0,p.k$)();T&&T.protocol&&"file:"===T.protocol.toLowerCase()&&(i=!1);var C=[];(0,p.b$)()?(C=[2,1],y=[2,1,3]):C=[1,2,3],(a=D(C=X(C,r.transports),!1))||(0,u.jV)(m,"No available transport to send events"),v=D(C,!0)}b||(b=D(y=X(y,r.unloadTransports),!0)),A=!V&&(B&&(0,p.MF)()||!x&&(0,p.JO)(!0)),(o={})[0]=a,o[1]=v||D([1,2,3],!0),o[2]=b||v||D([1],!0),o[3]=S||D([2,3],!0)||v||D([1],!0),h=o},e._getDbgPlgTargets=function(){return[h[0],F,ee,h]},e.addQueryStringParameter=function(e,t){for(var n=0;n<$.length;n++)if($[n].name===e)return void($[n].value=t);$.push({name:e,value:t})},e.addHeader=function(e,t){Z[e]=t},e.canSendRequest=function(){return pe()&&U.allowRequestSending()},e.sendQueuedRequests=function(e,t){(0,c.o8)(e)&&(e=0),ne&&(e=ce(e),t=2),ue(J,e,0)&&he(de(),0,!1,e,t||0)},e.isCompletelyIdle=function(){return!j&&0===z&&0===J.length},e.setUnloading=function(e){ne=e},e.addBatch=function(e){if(e&&e.count()>0){if(F.isTenantKilled(e.iKey()))return!1;J.push(e)}return!0},e.teardown=function(){J.length>0&&he(de(),0,!0,2,2)},e.pause=function(){j=!0},e.resume=function(){j=!1,e.sendQueuedRequests(0,4)},e.sendSynchronousBatch=function(e,t,n){e&&e.count()>0&&((0,c.le)(t)&&(t=1),ne&&(t=ce(t),n=2),he([e],0,!1,t,n||0))}}))}return e.__ieDyn=1,e}();function J(e,t){for(var n=[],a=2;a0){var r=i.split(0,a),o=r.count();if(o>0)return 4===n?N-=o:A-=o,he(ne,[r],d.h.QueueFull),!0}n++}return oe(),!1}(e.iKey,e.latency,o,s)&&(r=!re(e,t))}r&&me(ne,[e],d.h.QueueFull)}function $(e,t,n){var a=se(e,t,n);return f.sendQueuedRequests(t,n),a}function W(){return A>0}function K(){if(q>=0&&se(q,0,E)&&f.sendQueuedRequests(0,E),N>0&&!F&&!R){var e=D[P][2];e>=0&&(F=X((function(){F=null,$(4,0,1),K()}),e))}var t=D[P][1];!M&&!w&&t>=0&&!R&&(W()?M=X((function(){M=null,$(0===U?3:1,0,1),U++,U%=2,K()}),t):U=0)}function Q(){n=null,T=!1,C=[],w=null,R=!1,N=0,x=500,A=0,k=1e4,D={},P=h,M=null,F=null,j=0,U=0,m=null,B={},v=void 0,b=0,q=-1,E=null,z=!0,G=!1,H=6,V=2,S=null,y=te(),f=new Z(500,2,1,{requeue:de,send:_e,sent:ge,drop:fe,rspFail:ve,oth:be},y),pe(),B[4]={batches:[],iKeyMap:{}},B[3]={batches:[],iKeyMap:{}},B[2]={batches:[],iKeyMap:{}},B[1]={batches:[],iKeyMap:{}},Ee()}function X(e,t){0===t&&j&&(t=1);var n=1e3;return j&&(n=L(j-1)),y.set(e,t*n)}function J(){return null!==M&&(y.clear(M),M=null,U=0,!0)}function ee(e,t){J(),w&&(y.clear(w),w=null),R||$(1,e,t)}function ae(e,t,n){var a=B[t];a||(a=B[t=1]);var i=a.iKeyMap[e];return!i&&n&&(i=I.create(e),a.batches.push(i),a.iKeyMap[e]=i),i}function ie(t,n){f.canSendRequest()&&!j&&(v>0&&A>v&&(n=!0),n&&null==w&&e.flush(t,null,20))}function re(e,t){z&&(e=(0,c.Ax)(e));var n=e.latency,a=ae(e.iKey,n,!0);return!!a.addEvent(e)&&(4!==n?(A++,t&&0===e.sendAttempt&&ie(!e.sync,b>0&&a.count()>=b)):N++,!0)}function oe(){for(var e=0,t=0,n=function(n){var a=B[n];a&&a.batches&&(0,c.tO)(a.batches,(function(a){4===n?e+=a.count():t+=a.count()}))},a=1;a<=4;a++)n(a);A=t,N=e}function se(t,n,a){var i=!1,o=0===n;return!o||f.canSendRequest()?(0,r.Lm)(e.core,(function(){return"PostChannel._queueBatches"}),(function(){for(var e=[],n=4;n>=t;){var a=B[n];a&&a.batches&&a.batches.length>0&&((0,c.tO)(a.batches,(function(t){f.addBatch(t)?i=i||t&&t.count()>0:e=e.concat(t.events()),4===n?N-=t.count():A-=t.count()})),a.batches=[],a.iKeyMap={}),n--}e.length>0&&me(ne,e,d.h.KillSwitch),i&&q>=t&&(q=-1,E=0)}),(function(){return{latency:t,sendType:n,sendReason:a}}),!o):(q=q>=0?Math.min(q,t):t,E=Math.max(E,a)),i}function le(e,t){$(1,0,t),oe(),ce((function(){e&&e(),C.length>0?w=X((function(){w=null,le(C.shift(),t)}),0):(w=null,K())}))}function ce(e){f.isCompletelyIdle()?e():w=X((function(){w=null,ce(e)}),.25)}function pe(){(D={})[h]=[2,1,0],D[_]=[6,3,0],D[g]=[18,9,0]}function de(t,n){var a=[],i=H;G&&(i=V),(0,c.tO)(t,(function(t){t&&t.count()>0&&(0,c.tO)(t.events(),(function(t){t&&(t.sync&&(t.latency=4,t.sync=!1),t.sendAttempt0&&me(ne,a,d.h.NonRetryableStatus),G&&ee(2,2)}function ue(t,n){var a=e._notificationManager||{},i=a[t];if(i)try{i.apply(a,n)}catch(n){(0,u.kP)(e.diagLog(),1,74,t+" notification failed: "+n)}}function me(e,t){for(var n=[],a=2;a0&&ue(e,[t].concat(n))}function he(e,t){for(var n=[],a=2;a0&&(0,c.tO)(t,(function(t){t&&t.count()>0&&ue(e,[t.events()].concat(n))}))}function _e(e,t,n){e&&e.length>0&&ue("eventsSendRequest",[t>=1e3&&t<=1999?t-1e3:0,!0!==n])}function ge(e,t){he("eventsSent",e,t),K()}function fe(e,t){he(ne,e,t>=8e3&&t<=8999?t-8e3:d.h.Unknown)}function ve(e){he(ne,e,d.h.NonRetryableStatus),K()}function be(e,t){he(ne,e,d.h.Unknown),K()}function Ee(){b=n&&n.disableAutoBatchFlushLimit?0:Math.max(1500,k/6)}Q(),e._getDbgPlgTargets=function(){return[f]},e.initialize=function(p,d,u){(0,r.Lm)(d,(function(){return"PostChannel:initialize"}),(function(){var r=d;t.initialize(p,d,u);try{d.addUnloadCb,S=(0,o.jU)((0,s.J)(e.identifier),d.evtNamespace&&d.evtNamespace());var h=e._getTelCtx();p.extensionConfig[e.identifier]=p.extensionConfig[e.identifier]||{},n=h.getExtCfg(e.identifier),y=te(n.setTimeoutOverride,n.clearTimeoutOverride),z=!n.disableOptimizeObj&&(0,l.mJ)(),function(e){var t=e.getWParam;e.getWParam=function(){var e=0;return n.ignoreMc1Ms0CookieProcessing&&(e|=2),e|t()}}(r),n.eventsLimitInMem>0&&(k=n.eventsLimitInMem),n.immediateEventLimit>0&&(x=n.immediateEventLimit),n.autoFlushEventsLimit>0&&(v=n.autoFlushEventsLimit),(0,c.hj)(n.maxEventRetryAttempts)&&(H=n.maxEventRetryAttempts),(0,c.hj)(n.maxUnloadEventRetryAttempts)&&(V=n.maxUnloadEventRetryAttempts),Ee(),n.httpXHROverride&&n.httpXHROverride.sendPOST&&(m=n.httpXHROverride),(0,l.Sn)(p.anonCookieName)&&f.addQueryStringParameter("anoncknm",p.anonCookieName),f.sendHook=n.payloadPreprocessor,f.sendListener=n.payloadListener;var _=n.overrideEndpointUrl?n.overrideEndpointUrl:p.endpointUrl;e._notificationManager=d.getNotifyMgr(),f.initialize(_,e.core,e,m,n);var g=p.disablePageUnloadEvents||[];(0,o.c9)(a,g,S),(0,o.TJ)(a,g,S),(0,o.nD)(i,p.disablePageShowEvents,S)}catch(t){throw e.setInitialized(!1),t}}),(function(){return{coreConfig:p,core:d,extensions:u}}))},e.processTelemetry=function(t,a){(0,l.if)(t,e.identifier);var i=(a=e._getTelCtx(a)).getExtCfg(e.identifier),r=!!n.disableTelemetry;i&&(r=r||!!i.disableTelemetry);var o=t;r||T||(n.overrideInstrumentationKey&&(o.iKey=n.overrideInstrumentationKey),i&&i.overrideInstrumentationKey&&(o.iKey=i.overrideInstrumentationKey),Y(o,!0),G?ee(2,2):K()),e.processNext(o,a)},e._doTeardown=function(e,t){ee(2,2),T=!0,f.teardown(),(0,o.JA)(null,S),(0,o.C9)(null,S),(0,o.Yl)(null,S),Q()},e.setEventQueueLimits=function(e,t){k=e>0?e:1e4,v=t>0?t:0,Ee();var n=A>e;if(!n&&b>0)for(var a=1;!n&&a<=3;a++){var i=B[a];i&&i.batches&&(0,c.tO)(i.batches,(function(e){e&&e.count()>=b&&(n=!0)}))}ie(!0,n)},e.pause=function(){J(),R=!0,f.pause()},e.resume=function(){R=!1,f.resume(),K()},e.addResponseHandler=function(e){f._responseHandlers.push(e)},e._loadTransmitProfiles=function(e){J(),pe(),P=h,K(),(0,c.rW)(e,(function(e,t){var n=t.length;if(n>=2){var a=n>2?t[2]:0;if(t.splice(0,n-2),t[1]<0&&(t[0]=-1),t[1]>0&&t[0]>0){var i=t[0]/t[1];t[0]=Math.ceil(i)*t[1]}a>=0&&t[1]>=0&&a>t[1]&&(a=t[1]),t.push(a),D[e]=t}}))},e.flush=function(e,t,n){if(void 0===e&&(e=!0),!R)if(n=n||1,e)null==w?(J(),se(1,0,n),w=X((function(){w=null,le(t,n)}),0)):C.push(t);else{var a=J();$(1,1,n),null!=t&&t(),a&&K()}},e.setMsaAuthTicket=function(e){f.addHeader(O,e)},e.hasEvents=W,e._setTransmitProfile=function(e){P!==e&&void 0!==D[e]&&(J(),P=e,K())},e._backOffTransmission=function(){j<4&&(j++,J(),K())},e._clearBackOff=function(){j&&(j=0,J(),K())},(0,c.l_)(e,"_setTimeoutOverride",(function(){return y.set}),(function(e){y=te(e,y.clear)})),(0,c.l_)(e,"_clearTimeoutOverride",(function(){return y.clear}),(function(e){y=te(y.set,e)}))})),a}return(0,a.ne)(t,e),t.__ieDyn=1,t}(m.i)},50951:(e,t,n)=>{"use strict";n.d(t,{By:()=>i});var a=n(24869);function i(e){var t={};return(0,a.rW)(e,(function(e,n){t[e]=n,t[n]=e})),(0,a._A)(t)}},28452:(e,t,n)=>{"use strict";n.d(t,{h:()=>a});var a=(0,n(50951).By)({Unknown:0,NonRetryableStatus:1,InvalidEvent:2,SizeLimitExceeded:3,KillSwitch:4,QueueFull:5})},87951:(e,t,n)=>{"use strict";n.d(t,{i:()=>c});var a=n(29141),i=n(98145),r=n(24869),o=n(96335),s=n(31030),l=n(38593),c=function(){function e(){var t,n,c,p,d,u=this;function m(e){void 0===e&&(e=null);var t=e;if(!t){var a=n||(0,s.CD)(null,{},u[o.oV]);t=c&&c.getPlugin?a[i.zV](null,c.getPlugin):a[i.zV](null,c)}return t}function h(e,t,a){e&&(0,r.sO)(e,o.Zh,[],null,r.le),!a&&t&&(a=t[i.SD]()[i.W2]());var l=c;c&&c.getPlugin&&(l=c.getPlugin()),u[o.oV]=t,n=(0,s.CD)(a,e,t,l)}function _(){t=!1,u[o.oV]=null,n=null,c=null,d=[],p=(0,l.Y)()}_(),(0,a.Z)(e,u,(function(e){e[i.VL]=function(e,n,a,i){h(e,n,i),t=!0},e[i.fi]=function(t,n){var a,l=e[o.oV];if(l&&(!t||l===t[o.oV]())){var u,m=!1,h=t||(0,s.Bt)(null,l,c&&c.getPlugin?c.getPlugin():c),g=n||((a={reason:0})[i.d]=!1,a);return e[i.F3]&&!0===e[i.F3](h,g,f)?u=!0:f(),u}function f(){if(!m){m=!0,p.run(h,n);var e=d;d=[],(0,r.tO)(e,(function(e){e.rm()})),!0===u&&h[i.uL](g),_()}}},e[i.Tu]=function(t,n){var a=e[o.oV];if(a&&(!t||a===t[o.oV]())){var r,l=!1,p=t||(0,s.xy)(null,a,c&&c.getPlugin?c.getPlugin():c),d=n||{reason:0};return e._doUpdate&&!0===e._doUpdate(p,d,u)?r=!0:u(),r}function u(){l||(l=!0,h(p.getCfg(),p.core(),p[i.W2]()))}},e._addHook=function(e){e&&((0,r.kJ)(e)?d=d.concat(e):d[i.MW](e))},(0,r.Oi)(e,"_addUnloadCb",(function(){return p}),"add")})),u[i.mc]=function(e){return m(e)[i.mc]()},u[i.yl]=function(){return t},u.setInitialized=function(e){t=e},u[i.Jd]=function(e){c=e},u[i.uL]=function(e,t){t?t[i.uL](e):c&&(0,r.mf)(c[o.hL])&&c[o.hL](e,null)},u._getTelCtx=m}return e.__ieDyn=1,e}()},88140:(e,t,n)=>{"use strict";n.d(t,{kj:()=>g,JP:()=>b,Nz:()=>E,p7:()=>S,UY:()=>N});var a=n(98145),i=n(29339),r=n(49251),o=n(24869),s=n(96335),l="toGMTString",c="toUTCString",p=null,d=null,u=null,m=(0,r.Me)(),h={},_={};function g(e,t){var n=E._ckMgr||_._ckMgr;return n||(n=E._ckMgr=E(e,t),_._ckMgr=n),n}function f(e){return!e||e.isEnabled()}function v(e,t){return!!(t&&e&&(0,o.kJ)(e.ignoreCookies))&&-1!==e.ignoreCookies[a.ou](t)}function b(e,t){var n;if(e)n=e.getCookieMgr();else if(t){var i=t[a.Lk];n=i._ckMgr?i._ckMgr:E(t)}return n||(n=g(t,(e||{})[a.eZ])),n}function E(e,t){var n,i=function(e){var t=e[a.Lk]=e[a.Lk]||{};if((0,o.sO)(t,"domain",e.cookieDomain,o.BX,o.le),(0,o.sO)(t,"path",e.cookiePath||"/",null,o.le),(0,o.le)(t.enabled)){var n=void 0;(0,o.o8)(e.isCookieUseDisabled)||(n=!e.isCookieUseDisabled),(0,o.o8)(e.disableCookiesUsage)||(n=!e.disableCookiesUsage),t.enabled=n}return t}(e||_),p=i.path||"/",u=i.domain,m=!1!==i.enabled,h=((n={isEnabled:function(){var e=m&&S(t),n=_._ckMgr;return e&&n&&h!==n&&(e=f(n)),e}})[a.$h]=function(e){m=!1!==e},n.set=function(e,t,n,m,_){var g=!1;if(f(h)&&!function(e,t){return!!(t&&e&&(0,o.kJ)(e.blockedCookies)&&-1!==e.blockedCookies[a.ou](t))||v(e,t)}(i,e)){var b={},E=(0,o.nd)(t||s.qS),S=E[a.ou](";");if(-1!==S&&(E=(0,o.nd)(t[a.zc](0,S)),b=y(t[a.zc](S+1))),(0,o.sO)(b,"domain",m||u,o.fQ,o.o8),!(0,o.le)(n)){var w=(0,r.w1)();if((0,o.o8)(b.expires)){var O=(0,o.m6)()+1e3*n;if(O>0){var x=new Date;x.setTime(O),(0,o.sO)(b,"expires",T(x,w?l:c)||T(x,w?l:c)||s.qS,o.fQ)}}w||(0,o.sO)(b,"max-age",s.qS+n,null,o.o8)}var A=(0,r.k$)();A&&"https:"===A.protocol&&((0,o.sO)(b,"secure",null,null,o.o8),null===d&&(d=!N(((0,r.jW)()||{})[a.qV])),d&&(0,o.sO)(b,"SameSite","None",null,o.o8)),(0,o.sO)(b,"path",_||p,null,o.o8),(i.setCookie||R)(e,C(E,b)),g=!0}return g},n.get=function(e){var t=s.qS;return f(h)&&!v(i,e)&&(t=(i.getCookie||w)(e)),t},n.del=function(e,t){var n=!1;return f(h)&&(n=h.purge(e,t)),n},n.purge=function(e,n){var a,o=!1;if(S(t)){var l=((a={}).path=n||"/",a.expires="Thu, 01 Jan 1970 00:00:01 GMT",a);(0,r.w1)()||(l["max-age"]="0"),(i.delCookie||R)(e,C(s.qS,l)),o=!0}return o},n);return h._ckMgr=h,h}function S(e){if(null===p){p=!1;try{p=void 0!==(m||{}).cookie}catch(t){(0,i.kP)(e,2,68,"Cannot access document.cookie - "+(0,o.jj)(t),{exception:(0,r.eU)(t)})}}return p}function y(e){var t={};if(e&&e[a.R5]){var n=(0,o.nd)(e)[a.w6](";");(0,o.tO)(n,(function(e){if(e=(0,o.nd)(e||s.qS)){var n=e[a.ou]("=");-1===n?t[e]=null:t[(0,o.nd)(e[a.zc](0,n))]=(0,o.nd)(e[a.zc](n+1))}}))}return t}function T(e,t){return(0,o.mf)(e[t])?e[t]():null}function C(e,t){var n=e||s.qS;return(0,o.rW)(t,(function(e,t){n+="; "+e+((0,o.le)(t)?s.qS:"="+t)})),n}function w(e){var t=s.qS;if(m){var n=m.cookie||s.qS;u!==n&&(h=y(n),u=n),t=(0,o.nd)(h[e]||s.qS)}return t}function R(e,t){m&&(m.cookie=e+"="+t)}function N(e){return!(!(0,o.HD)(e)||!(0,o._Q)(e,"CPU iPhone OS 12")&&!(0,o._Q)(e,"iPad; CPU OS 12")&&!((0,o._Q)(e,"Macintosh; Intel Mac OS X 10_14")&&(0,o._Q)(e,"Version/")&&(0,o._Q)(e,"Safari"))&&(!(0,o._Q)(e,"Macintosh; Intel Mac OS X 10_14")||!(0,o.Id)(e,"AppleWebKit/605.1.15 (KHTML, like Gecko)"))&&!(0,o._Q)(e,"Chrome/5")&&!(0,o._Q)(e,"Chrome/6")&&(!(0,o._Q)(e,"UnrealEngine")||(0,o._Q)(e,"Chrome"))&&!(0,o._Q)(e,"UCBrowser/12")&&!(0,o._Q)(e,"UCBrowser/11"))}},28956:(e,t,n)=>{"use strict";n.d(t,{GW:()=>m,Jj:()=>h,DO:()=>_,zB:()=>f});var a,i=n(30175),r=n(98145),o=n(88140),s=n(49251),l=n(47954),c=n(24869),p=n(96335),d=n(19406),u=null;function m(){var e=_();return e[r.zc](0,8)+"-"+e[r.zc](8,12)+"-"+e[r.zc](12,16)+"-"+e[r.zc](16,20)+"-"+e[r.zc](20)}function h(){var e=(0,s.r)();return e&&e.now?e.now():(0,c.m6)()}function _(){for(var e,t=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],n=p.qS,a=0;a<4;a++)n+=t[15&(e=(0,d._l)())]+t[e>>4&15]+t[e>>8&15]+t[e>>12&15]+t[e>>16&15]+t[e>>20&15]+t[e>>24&15]+t[e>>28&15];var i=t[8+(3&(0,d._l)())|0];return n[r.Jn](0,8)+n[r.Jn](9,4)+"4"+n[r.Jn](13,3)+i+n[r.Jn](16,3)+n[r.Jn](19,12)}var g={_canUseCookies:void 0,isTypeof:c.Ym,isUndefined:c.o8,isNullOrUndefined:c.le,hasOwnProperty:c.nr,isFunction:c.mf,isObject:c.Kn,isDate:c.J_,isArray:c.kJ,isError:c.VZ,isString:c.HD,isNumber:c.hj,isBoolean:c.jn,toISOString:c.Y6,arrForEach:c.tO,arrIndexOf:c.UA,arrMap:c.Mr,arrReduce:c.Xz,strTrim:c.nd,objCreate:i.pu,objKeys:c.FY,objDefineAccessors:c.l_,addEventHandler:l.Ib,dateNow:c.m6,isIE:s.w1,disableCookies:function(){var e,t,n,i;(n=(0,o.kj)(e,t),i=g._canUseCookies,null===u&&(u=[],a=i,(0,c.l_)(g,"_canUseCookies",(function(){return a}),(function(e){a=e,(0,c.tO)(u,(function(t){t[r.$h](e)}))}))),-1===(0,c.UA)(u,n)&&u[r.MW](n),(0,c.jn)(i)&&n[r.$h](i),(0,c.jn)(a)&&n[r.$h](a),n)[r.$h](!1)},newGuid:m,perfNow:h,newId:d.pZ,randomValue:d.az,random32:d._l,mwcRandomSeed:d.CN,mwcRandom32:d.F6,generateW3CId:_},f={Attach:l.pZ,AttachEvent:l.pZ,Detach:l.pD,DetachEvent:l.pD}},87624:(e,t,n)=>{"use strict";n.d(t,{J:()=>u,K:()=>m});var a=n(1550),i=n(98145),r=n(24869),o=n(96335),s=n(19406),l=a.RJ,c="."+(0,s.pZ)(6),p=0;function d(e){return 1===e[i.xv]||9===e[i.xv]||!+e[i.xv]}function u(e,t){return void 0===t&&(t=!1),(0,r.Gf)(e+p+++(t?".2.8.9":o.qS)+c)}function m(e){var t={id:u("_aiData-"+(e||o.qS)+".2.8.9"),accept:function(e){return d(e)},get:function(e,n,a,i){var o=e[t.id];return o?o[(0,r.Gf)(n)]:(i&&((o=function(e,t){var n=t[e.id];if(!n){n={};try{d(t)&&(function(e,t,n){if(l)try{return l(e,t,{value:n,enumerable:!1,configurable:!0}),!0}catch(e){}return!1}(t,e.id,n)||(t[e.id]=n))}catch(e){}}return n}(t,e))[(0,r.Gf)(n)]=a),a)},kill:function(e,t){if(e&&e[t])try{delete e[t]}catch(e){}}};return t}},28341:(e,t,n)=>{"use strict";n.d(t,{j:()=>c,p:()=>p});var a,i=n(98145),r=n(49251),o=["eventsSent","eventsDiscarded","eventsSendRequest","perfEvent"],s=null;function l(e,t){return function(){var n=arguments,a=c(t);if(a){var r=a.listener;r&&r[e]&&r[e][i.ZV](r,n)}}}function c(e){var t,n=s;return n||!0===e.disableDbgExt||(n=s||((t=(0,r.a8)("Microsoft"))&&(s=t.ApplicationInsights),s)),n?n.ChromeDbgExt:null}function p(e){if(!a){a={};for(var t=0;t{"use strict";n.d(t,{lQ:()=>d,vH:()=>u,AQ:()=>m,kP:()=>_,jV:()=>g,L4:()=>f});var a=n(29141),i=n(98145),r=n(28341),o=n(49251),s=n(24869),l=n(96335);function c(e){return e?'"'+e[i.i7](/\"/g,l.qS)+'"':l.qS}function p(e,t){var n=(0,o.dr)();if(n){var a="log";n[e]&&(a=e),(0,s.mf)(n[a])&&n[a](t)}}var d=function(){function e(e,t,n,a){void 0===n&&(n=!1);var r=this;r[i.Gc]=e,r[i.gU]=(n?"AI: ":"AI (Internal): ")+e;var s=l.qS;(0,o.nS)()&&(s=(0,o.xA)().stringify(a));var p=(t?" message:"+c(t):l.qS)+(a?" props:"+c(s):l.qS);r[i.gU]+=p}return e.dataType="MessageData",e}();function u(e,t){return(e||{})[i.eZ]||new m(t)}var m=function(){function e(t){this.identifier="DiagnosticLogger",this.queue=[];var n,c,u,m,h=0,_={};(0,a.Z)(e,this,(function(e){function a(t,n){if(!(h>=u)){var a=!0,r="AITR_"+n[i.Gc];if(_[r]?a=!1:_[r]=!0,a&&(t<=c&&(e.queue[i.MW](n),h++,g(1===t?"error":"warn",n)),h===u)){var o="Internal events throttle limit per PageView reached for this app.",s=new d(23,o,!1);e.queue[i.MW](s),1===t?e[l.ys](o):e[l.cL](o)}}}function g(e,n){var a=(0,r.j)(t||{});a&&a[i.mc]&&a[i.mc](e,n)}!function(e){n=(0,s.v4)(e.loggingLevelConsole,0),c=(0,s.v4)(e.loggingLevelTelemetry,1),u=(0,s.v4)(e.maxMessageLimit,25),m=(0,s.v4)(e[i.Fr],!1)}(t||{}),e.consoleLoggingLevel=function(){return n},e.telemetryLoggingLevel=function(){return c},e.maxInternalMessageLimit=function(){return u},e[i.Fr]=function(){return m},e.throwInternal=function(t,r,c,p,u){void 0===u&&(u=!1);var h=new d(r,c,u,p);if(m)throw(0,o.eU)(h);var f=1===t?l.ys:l.cL;if((0,s.o8)(h[i.gU]))g("throw"+(1===t?"Critical":"Warning"),h);else{if(u){var v=+h[i.Gc];!_[v]&&n>=t&&(e[f](h[i.gU]),_[v]=!0)}else n>=t&&e[f](h[i.gU]);a(t,h)}},e[l.cL]=function(e){p("warn",e),g("warning",e)},e[l.ys]=function(e){p("error",e),g("error",e)},e.resetInternalMessageCount=function(){h=0,_={}},e[i.jk]=a}))}return e.__ieDyn=1,e}();function h(e){return e||new m}function _(e,t,n,a,i,r){void 0===r&&(r=!1),h(e).throwInternal(t,n,a,i,r)}function g(e,t){h(e)[l.cL](t)}function f(e,t,n){h(e)[i.jk](t,n)}},49251:(e,t,n)=>{"use strict";n.d(t,{dI:()=>b,a8:()=>E,Ym:()=>S,Jj:()=>y,Nv:()=>T,Me:()=>C,d6:()=>w,jW:()=>R,fE:()=>N,s1:()=>O,k$:()=>x,dr:()=>A,r:()=>k,nS:()=>I,xA:()=>D,MX:()=>P,gz:()=>M,b$:()=>L,w1:()=>F,sA:()=>j,eU:()=>U,MF:()=>B,JO:()=>q,cp:()=>z,Z3:()=>G,ed:()=>V,pI:()=>Y});var a=n(1550),i=n(30175),r=n(98145),o=n(24869),s=n(96335),l="window",c="JSON",p="msie",d="trident/",u="XMLHttpRequest",m=null,h=null,_=!1,g=null,f=null;function v(e,t){var n=!1;if(e){try{if(!(n=t in e)){var i=e[a.hB];i&&(n=t in i)}}catch(e){}if(!n)try{var r=new e;n=!(0,o.o8)(r[t])}catch(e){}}return n}function b(e){_=e}function E(e){var t=(0,i.Rd)();return t&&t[e]?t[e]:e===l&&S()?window:null}function S(){return Boolean(typeof window===a.fK&&window)}function y(){return S()?window:E(l)}function T(){return Boolean(typeof document===a.fK&&document)}function C(){return T()?document:E("document")}function w(){return Boolean(typeof navigator===a.fK&&navigator)}function R(){return w()?navigator:E("navigator")}function N(){return Boolean(typeof history===a.fK&&history)}function O(){return N()?history:E("history")}function x(e){if(e&&_){var t=E("__mockLocation");if(t)return t}return typeof location===a.fK&&location?location:E("location")}function A(){return typeof console!==a.jA?console:E("console")}function k(){return E("performance")}function I(){return Boolean(typeof JSON===a.fK&&JSON||null!==E(c))}function D(){return I()?JSON||E(c):null}function P(){return E("crypto")}function M(){return E("msCrypto")}function L(){var e=R();return!(!e||!e.product)&&"ReactNative"===e.product}function F(){var e=R();if(e&&(e[r.qV]!==h||null===m)){var t=((h=e[r.qV])||s.qS)[r.T1]();m=(0,o._Q)(t,p)||(0,o._Q)(t,d)}return m}function j(e){if(void 0===e&&(e=null),!e){var t=R()||{};e=t?(t[r.qV]||s.qS)[r.T1]():s.qS}var n=(e||s.qS)[r.T1]();if((0,o._Q)(n,p)){var a=C()||{};return Math.max(parseInt(n[r.w6](p)[1]),a.documentMode||0)}if((0,o._Q)(n,d)){var i=parseInt(n[r.w6](d)[1]);if(i)return i+4}return null}function U(e){var t=Object[a.hB].toString[r._S](e),n=s.qS;return"[object Error]"===t?n="{ stack: '"+e.stack+"', message: '"+e.message+"', name: '"+e[r.I]+"'":I()&&(n=D().stringify(e)),t+n}function B(){return null===f&&(f=w()&&Boolean(R().sendBeacon)),f}function q(e){var t=!1;try{t=!!E("fetch");var n=E("Request");t&&e&&n&&(t=v(n,"keepalive"))}catch(e){}return t}function z(){return null===g&&(g=typeof XDomainRequest!==a.jA)&&G()&&(g=g&&!v(E(u),"withCredentials")),g}function G(){var e=!1;try{e=!!E(u)}catch(e){}return e}function H(e,t){if(e)for(var n=0;n0?a[0]:{}).serverTiming,e).description}return t}},47954:(e,t,n)=>{"use strict";n.d(t,{um:()=>T,jU:()=>N,XO:()=>O,QY:()=>x,pZ:()=>A,pD:()=>k,Ib:()=>I,C1:()=>D,yw:()=>M,nJ:()=>L,c9:()=>F,JA:()=>j,TJ:()=>U,C9:()=>B,nD:()=>q,Yl:()=>z});var a=n(98145),i=n(87624),r=n(49251),o=n(24869),s=n(96335),l="events",c="visibilitychange",p="pagehide",d="pageshow",u="unload",m="beforeunload",h=(0,i.J)("aiEvtPageHide"),_=(0,i.J)("aiEvtPageShow"),g=/\.[\.]+/g,f=/[\.]+$/,v=1,b=(0,i.K)("events"),E=/^([^.]*)(?:\.(.+)|)/;function S(e){return e&&e[a.i7]?e[a.i7](/^[\s\.]+|(?=[\s\.])[\.\s]+$/g,s.qS):e}function y(e,t){var n;if(t){var i=s.qS;(0,o.kJ)(t)?(i=s.qS,(0,o.tO)(t,(function(e){(e=S(e))&&("."!==e[0]&&(e="."+e),i+=e)}))):i=S(t),i&&("."!==i[0]&&(i="."+i),e=(e||s.qS)+i)}var r=E.exec(e||s.qS)||[];return(n={})[a.P6]=r[1],n.ns=(r[2]||s.qS).replace(g,".").replace(f,s.qS)[a.w6](".").sort().join("."),n}function T(e,t,n){var i=[],r=b.get(e,l,{},!1),c=y(t,n);return(0,o.rW)(r,(function(e,t){(0,o.tO)(t,(function(e){var t;c[a.P6]&&c[a.P6]!==e.evtName[a.P6]||c.ns&&c.ns!=c.ns||i[a.MW](((t={})[a.I]=e.evtName[a.P6]+(e.evtName.ns?"."+e.evtName.ns:s.qS),t.handler=e[a.Kn],t))}))})),i}function C(e,t,n){void 0===n&&(n=!0);var a=b.get(e,l,{},n),i=a[t];return i||(i=a[t]=[]),i}function w(e,t,n,i){e&&t&&t[a.P6]&&(e.removeEventListener?e.removeEventListener(t[a.P6],n,i):e.detachEvent&&e.detachEvent("on"+t[a.P6],n))}function R(e,t,n,i){for(var r=t[a.R5];r--;){var o=t[r];o&&(n.ns&&n.ns!==o.evtName.ns||i&&!i(o)||(w(e,o.evtName,o[a.Kn],o.capture),t[a.cb](r,1)))}}function N(e,t){return t?y("xx",(0,o.kJ)(t)?[e].concat(t):[e,t]).ns[a.w6]("."):e}function O(e,t,n,i,r){var o;void 0===r&&(r=!1);var s=!1;if(e)try{var l=y(t,i);if((s=function(e,t,n,i){var r=!1;return e&&t&&t[a.P6]&&n&&(e.addEventListener?(e.addEventListener(t[a.P6],n,i),r=!0):e.attachEvent&&(e.attachEvent("on"+t[a.P6],n),r=!0)),r}(e,l,n,r))&&b.accept(e)){var c=((o={guid:v++,evtName:l})[a.Kn]=n,o.capture=r,o);C(e,l.type)[a.MW](c)}}catch(e){}return s}function x(e,t,n,i,r){if(void 0===r&&(r=!1),e)try{var s=y(t,i),c=!1;!function(e,t,n){if(t[a.P6])R(e,C(e,t[a.P6]),t,n);else{var i=b.get(e,l,{});(0,o.rW)(i,(function(a,i){R(e,i,t,n)})),0===(0,o.FY)(i)[a.R5]&&b.kill(e,l)}}(e,s,(function(e){return!((!s.ns||n)&&e[a.Kn]!==n||(c=!0,0))})),c||w(e,s,n,r)}catch(e){}}function A(e,t,n,a){return void 0===a&&(a=!1),O(e,t,n,null,a)}function k(e,t,n,a){void 0===a&&(a=!1),x(e,t,n,null,a)}function I(e,t,n){var a=!1,i=(0,r.Jj)();i&&(a=O(i,e,t,n),a=O(i.body,e,t,n)||a);var o=(0,r.Me)();return o&&(a=O(o,e,t,n)||a),a}function D(e,t,n){var a=(0,r.Jj)();a&&(x(a,e,t,n),x(a.body,e,t,n));var i=(0,r.Me)();i&&x(i,e,t,n)}function P(e,t,n,i){var r=!1;return t&&e&&e[a.R5]>0&&(0,o.tO)(e,(function(e){e&&(n&&-1!==(0,o.UA)(n,e)||(r=I(e,t,i)||r))})),r}function M(e,t,n,i){var r=!1;return t&&e&&(0,o.kJ)(e)&&!(r=P(e,t,n,i))&&n&&n[a.R5]>0&&(r=P(e,t,null,i)),r}function L(e,t,n){e&&(0,o.kJ)(e)&&(0,o.tO)(e,(function(e){e&&D(e,t,n)}))}function F(e,t,n){return M([m,u,p],e,t,n)}function j(e,t){L([m,u,p],e,t)}function U(e,t,n){var a=N(h,n),i=P([p],e,t,a);return t&&-1!==(0,o.UA)(t,c)||(i=P([c],(function(t){var n=(0,r.Me)();e&&n&&"hidden"===n.visibilityState&&e(t)}),t,a)||i),!i&&t&&(i=U(e,null,n)),i}function B(e,t){var n=N(h,t);L([p],e,n),L([c],null,n)}function q(e,t,n){var a=N(_,n),i=P([d],e,t,a);return!(i=P([c],(function(t){var n=(0,r.Me)();e&&n&&"visible"===n.visibilityState&&e(t)}),t,a)||i)&&t&&(i=q(e,null,n)),i}function z(e,t){var n=N(_,t);L([d],e,n),L([c],null,n)}},24869:(e,t,n)=>{"use strict";n.d(t,{Ym:()=>C,o8:()=>w,le:()=>R,BX:()=>N,nr:()=>O,Kn:()=>x,mf:()=>A,Gf:()=>k,rW:()=>I,Id:()=>D,xe:()=>P,_Q:()=>M,J_:()=>L,kJ:()=>F,VZ:()=>j,HD:()=>U,hj:()=>B,jn:()=>q,Y6:()=>G,tO:()=>H,UA:()=>V,Mr:()=>Y,Xz:()=>$,nd:()=>W,FY:()=>X,l_:()=>Z,_A:()=>ee,FL:()=>te,Xi:()=>ne,m6:()=>ae,jj:()=>ie,sO:()=>re,qK:()=>oe,v4:()=>se,F:()=>le,fQ:()=>ce,_y:()=>pe,cf:()=>ue,Oi:()=>me,Vb:()=>he,Ax:()=>_e,mm:()=>ge});var a=n(1550),i=n(30175),r=n(98145),o=n(96335),s=a.RJ,l=a.Pw.freeze,c=a.Pw.seal,p=a.Pw.keys,d=String[a.hB],u=d.trim,m=d.endsWith,h=d.startsWith,_=Date[a.hB].toISOString,g=Array.isArray,f=a.V4.toString,v=a.CY.toString,b=v[r._S](a.Pw),E=/-([a-z])/g,S=/([^\w\d_$])/g,y=/^(\d+[\w\d_$])/,T=Object.getPrototypeOf;function C(e,t){return typeof e===t}function w(e){return void 0===e||typeof e===a.jA}function R(e){return null===e||w(e)}function N(e){return!R(e)}function O(e,t){return!(!e||!a.CY[r._S](e,t))}function x(e){return!(!e||typeof e!==a.fK)}function A(e){return!(!e||typeof e!==a.cb)}function k(e){var t=e;return t&&U(t)&&(t=(t=(t=t[r.i7](E,(function(e,t){return t.toUpperCase()})))[r.i7](S,"_"))[r.i7](y,(function(e,t){return"_"+t}))),t}function I(e,t){if(e)for(var n in e)a.CY[r._S](e,n)&&t[r._S](e,n,e[n])}function D(e,t){var n=!1;return e&&t&&!(n=e===t)&&(n=m?e.endsWith(t):function(e,t){var n=!1,a=t?t[r.R5]:0,i=e?e[r.R5]:0;if(a&&i&&i>=a&&!(n=e===t)){for(var o=i-1,s=a-1;s>=0;s--){if(e[o]!=t[s])return!1;o--}n=!0}return n}(e,t)),n}function P(e,t){var n=!1;return e&&t&&!(n=e===t)&&(n=h?e.startsWith(t):function(e,t){var n=!1,a=t?t[r.R5]:0;if(e&&a&&e[r.R5]>=a&&!(n=e===t)){for(var i=0;i=0?i:a-Math.abs(i),0);o=3)a=arguments[2];else{for(;o0&&q(c)&&(d=c,c=l[u]||{},u++),x(c)||(c={});u{"use strict";n.d(t,{qS:()=>a,Z:()=>i,oV:()=>r,DN:()=>o,mE:()=>s,Zh:()=>l,js:()=>c,hL:()=>p,yi:()=>d,uC:()=>u,$F:()=>m,f_:()=>h,C$:()=>_,ys:()=>g,cL:()=>f,kl:()=>v});var a="",i="channels",r="core",o="createPerfMgr",s="disabled",l="extensionConfig",c="extensions",p="processTelemetry",d="priority",u="eventsSent",m="eventsDiscarded",h="eventsSendRequest",_="perfEvent",g="errorToConsole",f="warnToConsole",v="getPerfMgr"},81782:(e,t,n)=>{"use strict";n.d(t,{zn:()=>s,Jk:()=>l,Lm:()=>p,j5:()=>d});var a=n(29141),i=n(98145),r=n(24869),o=n(96335),s=function(){function e(t,n,a){var o,s=this,l=!1;s.start=(0,r.m6)(),s[i.I]=t,s[i.d]=a,s[i.PL]=function(){return!1},(0,r.mf)(n)&&(l=(0,r.l_)(s,"payload",(function(){return!o&&(0,r.mf)(n)&&(o=n(),n=null),o}))),s[i.T]=function(t){return t?t===e.ParentContextKey||t===e.ChildrenContextKey?s[t]:(s.ctx||{})[t]:null},s[i.wu]=function(t,n){t&&(t===e.ParentContextKey?(s[t]||(s[i.PL]=function(){return!0}),s[t]=n):t===e.ChildrenContextKey?s[t]=n:(s.ctx=s.ctx||{})[t]=n)},s[i.Km]=function(){var t=0,a=s[i.T](e.ChildrenContextKey);if((0,r.kJ)(a))for(var o=0;o{"use strict";n.d(t,{CD:()=>u,Bt:()=>m,xy:()=>h,jV:()=>_,Vi:()=>g});var a=n(98145),i=n(29339),r=n(49251),o=n(24869),s=n(96335),l=n(81782),c=n(69031),p=0;function d(e,t,n,l){var c=null,p=[];null!==l&&(c=l?function(e,t,n){for(;e;){if(e[a.TO]()===n)return e;e=e[a.W2]()}return _([n],t[a.TC]||{},t)}(e,n,l):e);var d={_next:function(){var e=c;if(c=e?e[a.W2]():null,!e){var t=p;t&&t[a.R5]>0&&((0,o.tO)(t,(function(e){try{e.func[a._S](e.self,e.args)}catch(e){(0,i.kP)(n[a.eZ],2,73,"Unexpected Exception during onComplete - "+(0,r.eU)(e))}})),p=[])}return e},ctx:{core:function(){return n},diagLog:function(){return(0,i.vH)(n,t)},getCfg:function(){return t},getExtCfg:u,getConfig:function(e,n,a){void 0===a&&(a=!1);var i,r=u(e,null);return r&&!(0,o.le)(r[n])?i=r[n]:t&&!(0,o.le)(t[n])&&(i=t[n]),(0,o.le)(i)?a:i},hasNext:function(){return!!c},getNext:function(){return c},setNext:function(e){c=e},iterate:function(e){for(var t;t=d._next();){var n=t[a.TO]();n&&e(n)}},onComplete:function(e,t){for(var n=[],i=2;i0){var g=null;(0,o.tO)(e,(function(e){if(h||d!==e||(h=!0),h&&e&&(0,o.mf)(e[s.hL])){var _=function(e,t,n){var d,m=null,h=(0,o.mf)(e[s.hL]),_=(0,o.mf)(e[a.Jd]),g={getPlugin:function(){return e},getNext:function(){return m},processTelemetry:function(i,r){f(r=r||function(){var a;return e&&(0,o.mf)(e._getTelCtx)&&(a=e._getTelCtx()),a||(a=u(g,t,n)),a}(),(function(t){if(!e||!h)return!1;var n=(0,c.OY)(e);return!n[a.fi]&&!n[s.mE]&&(_&&e[a.Jd](m),e[s.hL](i,t),!0)}),"processTelemetry",(function(){return{item:i}}),!i.sync)||r[a.uL](i)},unload:function(t,n){f(t,(function(){var i=!1;if(e){var r=(0,c.OY)(e),o=e[s.oV]||r[s.oV];!e||o&&o!==t.core()||r[a.fi]||(r[s.oV]=null,r[a.fi]=!0,r[a.yl]=!1,e[a.fi]&&!0===e[a.fi](t,n)&&(i=!0))}return i}),"unload",(function(){}),n[a.d])||t[a.uL](n)},update:function(t,n){f(t,(function(){var i=!1;if(e){var r=(0,c.OY)(e),o=e[s.oV]||r[s.oV];!e||o&&o!==t.core()||r[a.fi]||e[a.Tu]&&!0===e[a.Tu](t,n)&&(i=!0)}return i}),"update",(function(){}),!1)||t[a.uL](n)},_id:d=e?e[a.pZ]+"-"+e[s.yi]+"-"+p++:"Unknown-0-"+p++,_setNext:function(e){m=e}};function f(t,n,o,c,p){var u=!1,h=e?e[a.pZ]:"TelemetryPluginChain",_=t._hasRun;return _||(_=t._hasRun={}),t.setNext(m),e&&(0,l.Lm)(t[s.oV](),(function(){return h+":"+o}),(function(){_[d]=!0;try{var e=m?m._id:s.qS;e&&(_[e]=!1),u=n(t)}catch(e){var l=!m||_[m._id];l&&(u=!0),m&&l||(0,i.kP)(t[a.mc](),1,73,"Plugin ["+h+"] failed during "+o+" - "+(0,r.eU)(e)+", run flags: "+(0,r.eU)(_))}}),c,p),u}return(0,o.FL)(g)}(e,t,n);m||(m=_),g&&g._setNext(_),g=_}}))}return d&&!m?_([d],t,n):m}var g=function(e,t,n,a){var i=u(e,t,n,a);(0,o.Vb)(this,i,(0,o.FY)(i))}},19406:(e,t,n)=>{"use strict";n.d(t,{az:()=>h,_l:()=>_,CN:()=>g,F6:()=>f,pZ:()=>v});var a=n(98145),i=n(49251),r=n(24869),o=n(96335),s=4294967296,l=4294967295,c=!1,p=123456789,d=987654321;function u(e){e<0&&(e>>>=0),p=123456789+e&l,d=987654321-e&l,c=!0}function m(){try{var e=2147483647&(0,r.m6)();u((Math.random()*s^e)+e)}catch(e){}}function h(e){return e>0?Math.floor(_()/l*(e+1))>>>0:0}function _(e){var t=0,n=(0,i.MX)()||(0,i.gz)();return n&&n.getRandomValues&&(t=n.getRandomValues(new Uint32Array(1))[0]&l),0===t&&(0,i.w1)()&&(c||m(),t=f()&l),0===t&&(t=Math.floor(s*Math.random()|0)),e||(t>>>=0),t}function g(e){e?u(e):m()}function f(e){var t=((d=36969*(65535&d)+(d>>16)&l)<<16)+(65535&(p=18e3*(65535&p)+(p>>16)&l))>>>0&l|0;return e||(t>>>=0),t}function v(e){void 0===e&&(e=22);for(var t=_()>>>0,n=0,i=o.qS;i[a.R5]>>=6,5===n&&(t=(_()<<2&4294967295|3&t)>>>0,n=0);return i}},69031:(e,t,n)=>{"use strict";n.d(t,{OY:()=>c,bP:()=>p,AA:()=>d,Yn:()=>u});var a=n(98145),i=n(87624),r=n(24869),o=n(96335),s=n(56207),l=(0,i.K)("plugin");function c(e){return l.get(e,"state",{},!0)}function p(e,t){for(var n,i=[],s=null,l=e[a.W2]();l;){var p=l[a.TO]();p&&(s&&(0,r.mf)(s[a.Jd])&&(0,r.mf)(p[o.hL])&&s[a.Jd](p),((0,r.mf)(p[a.yl])?p[a.yl]():(n=c(p))[a.yl])||i[a.MW](p),s=p,l=l[a.W2]())}(0,r.tO)(i,(function(i){var r=e[o.oV]();i[a.VL](e.getCfg(),r,t,e[a.W2]()),n=c(i),i[o.oV]||n[o.oV]||(n[o.oV]=r),n[a.yl]=!0,delete n[a.fi]}))}function d(e){return e.sort((function(e,t){var n=0;if(t){var a=(0,r.mf)(t[o.hL]);(0,r.mf)(e[o.hL])?n=a?e[o.yi]-t[o.yi]:1:a&&(n=-1)}else n=e?1:-1;return n}))}function u(e){var t={};return{getName:function(){return t[a.I]},setName:function(n){e&&e.setName(n),t[a.I]=n},getTraceId:function(){return t[a.nY]},setTraceId:function(n){e&&e.setTraceId(n),(0,s.jN)(n)&&(t[a.nY]=n)},getSpanId:function(){return t[a._d]},setSpanId:function(n){e&&e.setSpanId(n),(0,s.Lc)(n)&&(t[a._d]=n)},getTraceFlags:function(){return t[a.T0]},setTraceFlags:function(n){e&&e.setTraceFlags(n),t[a.T0]=n}}}},38593:(e,t,n)=>{"use strict";n.d(t,{Y:()=>s});var a=n(98145),i=n(29339),r=n(49251),o=n(24869);function s(){var e=[];return{add:function(t){t&&e[a.MW](t)},run:function(t,n){(0,o.tO)(e,(function(e){try{e(t,n)}catch(e){(0,i.kP)(t[a.mc](),2,73,"Unexpected error calling unload handler - "+(0,r.eU)(e))}})),e=[]}}}},56207:(e,t,n)=>{"use strict";n.d(t,{SU:()=>_,j_:()=>g,jN:()=>f,Lc:()=>v,J6:()=>b,Pn:()=>E,aR:()=>S,lq:()=>y});var a=n(98145),i=n(28956),r=n(49251),o=n(24869),s=/^([\da-f]{2})-([\da-f]{32})-([\da-f]{16})-([\da-f]{2})(-[^\s]*)?$/,l="00",c="ff",p="00000000000000000000000000000000",d="0000000000000000";function u(e,t,n){return!(!e||e[a.R5]!==t||e===n||!e.match(/^[\da-f]*$/))}function m(e,t,n){return u(e,t)?e:n}function h(e){(isNaN(e)||e<0||e>255)&&(e=1);for(var t=e.toString(16);t[a.R5]<2;)t="0"+t;return t}function _(e,t,n,r){var o;return(o={})[a.PA]=u(r,2,c)?r:l,o[a.nY]=f(e)?e:(0,i.DO)(),o.spanId=v(t)?t:(0,i.DO)()[a.Jn](0,16),o.traceFlags=n>=0&&n<=255?n:1,o}function g(e){var t;if(!e)return null;if((0,o.kJ)(e)&&(e=e[0]||""),!e||!(0,o.HD)(e)||e[a.R5]>8192)return null;var n=s.exec((0,o.nd)(e));return n&&n[1]!==c&&n[2]!==p&&n[3]!==d?((t={})[a.PA]=n[1],t[a.nY]=n[2],t[a._d]=n[3],t[a.T0]=parseInt(n[4],16),t):null}function f(e){return u(e,32,p)}function v(e){return u(e,16,d)}function b(e){return!!(e&&u(e[a.PA],2,c)&&u(e[a.nY],32,p)&&u(e[a._d],16,d)&&u(h(e[a.T0]),2))}function E(e){return!!b(e)&&1==(1&e[a.T0])}function S(e){if(e){var t=h(e[a.T0]);u(t,2)||(t="01");var n=e[a.PA]||l;return"00"!==n&&"ff"!==n&&(n=l),"".concat(n,"-").concat(m(e.traceId,32,p),"-").concat(m(e.spanId,16,d),"-").concat(t)}return""}function y(){var e="traceparent",t=g((0,r.ed)(e));return t||(t=g((0,r.pI)(e))),t}},98145:(e,t,n)=>{"use strict";n.d(t,{VL:()=>a,I:()=>i,tb:()=>r,pZ:()=>o,MW:()=>s,yl:()=>l,TC:()=>c,p$:()=>p,eZ:()=>d,R5:()=>u,Z_:()=>m,uL:()=>h,SD:()=>_,g:()=>g,n7:()=>f,LS:()=>v,Fc:()=>b,TO:()=>E,kL:()=>S,iC:()=>y,cb:()=>T,fi:()=>C,Gc:()=>w,gU:()=>R,d:()=>N,F3:()=>O,Tu:()=>x,W2:()=>A,mc:()=>k,Jd:()=>I,zV:()=>D,Lk:()=>P,ou:()=>M,zc:()=>L,qV:()=>F,w6:()=>j,$h:()=>U,Jn:()=>B,xv:()=>q,ZV:()=>z,i7:()=>G,Fr:()=>H,jk:()=>V,T1:()=>Y,_S:()=>$,P6:()=>W,Kn:()=>K,dE:()=>Q,PL:()=>X,T:()=>Z,wu:()=>J,Km:()=>ee,nY:()=>te,_d:()=>ne,T0:()=>ae,PA:()=>ie});var a="initialize",i="name",r="getNotifyMgr",o="identifier",s="push",l="isInitialized",c="config",p="instrumentationKey",d="logger",u="length",m="time",h="processNext",_="getProcessTelContext",g="addNotificationListener",f="removeNotificationListener",v="stopPollingInternalLogs",b="onComplete",E="getPlugin",S="flush",y="_extensions",T="splice",C="teardown",w="messageId",R="message",N="isAsync",O="_doTeardown",x="update",A="getNext",k="diagLog",I="setNextPlugin",D="createNew",P="cookieCfg",M="indexOf",L="substring",F="userAgent",j="split",U="setEnabled",B="substr",q="nodeType",z="apply",G="replace",H="enableDebugExceptions",V="logInternalMessage",Y="toLowerCase",$="call",W="type",K="handler",Q="listeners",X="isChildEvt",Z="getCtx",J="setCtx",ee="complete",te="traceId",ne="spanId",ae="traceFlags",ie="version"},1550:(e,t,n)=>{"use strict";n.d(t,{cb:()=>a,fK:()=>i,jA:()=>r,hB:()=>o,bO:()=>s,Pw:()=>l,V4:()=>c,rl:()=>p,yu:()=>d,RJ:()=>u,CY:()=>m});var a="function",i="object",r="undefined",o="prototype",s="hasOwnProperty",l=Object,c=l[o],p=l.assign,d=l.create,u=l.defineProperty,m=c[s]},30175:(e,t,n)=>{"use strict";n.d(t,{Rd:()=>r,ZU:()=>o,pu:()=>s});var a=n(1550),i=null;function r(e){void 0===e&&(e=!0);var t=!1===e?null:i;return t||(typeof globalThis!==a.jA&&(t=globalThis),t||typeof self===a.jA||(t=self),t||typeof window===a.jA||(t=window),t||typeof global===a.jA||(t=global),i=t),t}function o(e){throw new TypeError(e)}function s(e){var t=a.yu;if(t)return t(e);if(null==e)return{};var n=typeof e;function i(){}return n!==a.fK&&n!==a.cb&&o("Object prototype may only be an Object:"+e),i[a.hB]=e,new i}},27421:(e,t,n)=>{"use strict";n.d(t,{uc:()=>r,ne:()=>s,$h:()=>l});var a=n(1550),i=n(30175),r=(((0,i.Rd)()||{}).Symbol,((0,i.Rd)()||{}).Reflect,a.rl||function(e){for(var t,n=1,i=arguments.length;n{"use strict";n.r(t),n.d(t,{webSnippet:()=>a});var a='!function(T,l,y){var S=T.location,k="script",D="instrumentationKey",C="ingestionendpoint",I="disableExceptionTracking",E="ai.device.",b="toLowerCase",w="crossOrigin",N="POST",e="appInsightsSDK",t=y.name||"appInsights";(y.name||T[e])&&(T[e]=t);var n=T[t]||function(d){var g=!1,f=!1,m={initialize:!0,queue:[],sv:"5",version:2,config:d};function v(e,t){var n={},a="Browser";return n[E+"id"]=a[b](),n[E+"type"]=a,n["ai.operation.name"]=S&&S.pathname||"_unknown_",n["ai.internal.sdkVersion"]="javascript:snippet_"+(m.sv||m.version),{time:function(){var e=new Date;function t(e){var t=""+e;return 1===t.length&&(t="0"+t),t}return e.getUTCFullYear()+"-"+t(1+e.getUTCMonth())+"-"+t(e.getUTCDate())+"T"+t(e.getUTCHours())+":"+t(e.getUTCMinutes())+":"+t(e.getUTCSeconds())+"."+((e.getUTCMilliseconds()/1e3).toFixed(3)+"").slice(2,5)+"Z"}(),iKey:e,name:"Microsoft.ApplicationInsights."+e.replace(/-/g,"")+"."+t,sampleRate:100,tags:n,data:{baseData:{ver:2}}}}var h=d.url||y.src;if(h){function a(e){var t,n,a,i,r,o,s,c,u,p,l;g=!0,m.queue=[],f||(f=!0,t=h,s=function(){var e={},t=d.connectionString;if(t)for(var n=t.split(";"),a=0;a{"use strict";var a;n.d(t,{Z:()=>R});var i,r="undefined",o="prototype",s="function",l="_dynClass",c="_unknown_",p=Object,d=p.getPrototypeOf,u=p.getOwnPropertyNames,m=(typeof globalThis!==r&&(i=globalThis),i||typeof self===r||(i=self),i||typeof window===r||(i=window),i||typeof global===r||(i=global),i||{}),h=m.__dynProto$Gbl||(m.__dynProto$Gbl={o:(a={},a.setInstFuncs=!0,a.useBaseInst=!0,a),n:1e3});function _(e,t){return e&&p.prototype.hasOwnProperty.call(e,t)}function g(e){return e&&(e===p.prototype||e===Array.prototype)}function f(e){return g(e)||e===Function.prototype}function v(e){var t;if(e){if(d)return d(e);var n=e.__proto__||e.prototype||(e.constructor?e.constructor.prototype:null);t=e._dyn__proto__||n,_(e,"_dyn__proto__")||(delete e._dynInstProto,t=e._dyn__proto__=e._dynInstProto||e._dyn__proto__,e._dynInstProto=n)}return t}function b(e,t){var n=[];if(u)n=u(e);else for(var a in e)"string"==typeof a&&_(e,a)&&n.push(a);if(n&&n.length>0)for(var i=0;i=0;n--)if(e[n]===t)return!0;return!1}function T(e,t,n,a){var i=null;if(e&&_(n,l)){var r=e._dynInstFuncs||{};if((i=(r[n._dynClass]||{})[t])||S("Missing ["+t+"] "+s),!i._dynInstChk&&!1!==r._dynInstChk){for(var o=!_(e,t),c=v(e),p=[];o&&c&&!f(c)&&!y(p,c);){var d=c[t];if(d){o=d===a;break}p.push(c),c=v(c)}try{o&&(e[t]=i),i._dynInstChk=1}catch(e){r._dynInstChk=!1}}}return i}function C(e,t,n){var a=t[e];return a===n&&(a=v(t)[e]),typeof a!==s&&S("["+e+"] is not a "+s),a}function w(e,t){return _(e,o)?e.name||t||c:((e||{}).constructor||{}).name||t||c}function R(e,t,n,a){_(e,o)||S("theClass is an invalid class definition.");var i=e.prototype;(function(e,t){if(d){for(var n=[],a=v(t);a&&!f(a)&&!y(n,a);){if(a===e)return!0;n.push(a),a=v(a)}return!1}return!0})(i,t)||S("["+w(e)+"] not in hierarchy of ["+w(t)+"]");var r=null;_(i,l)?r=i._dynClass:(r="_dynCls$"+w(e,"_")+"$"+h.n,h.n++,i._dynClass=r);var s=R._dfOpts,c=!!s.useBaseInst;c&&a&&void 0!==a.useBaseInst&&(c=!!a.useBaseInst);var p=function(e){var t={};return b(e,(function(n){!t[n]&&E(e,n,!1)&&(t[n]=e[n])})),t}(t);n(t,function(e,t,n,a){function i(e,t,n){var i=t[n];if(i._isDynProxy&&a){var r=e._dynInstFuncs||{};!1!==r._dynInstChk&&(i=(r[t._dynClass]||{})[n]||i)}return function(){return i.apply(e,arguments)}}var r={};b(n,(function(e){r[e]=i(t,n,e)}));for(var o=v(e),s=[];o&&!f(o)&&!y(s,o);)b(o,(function(e){!r[e]&&E(o,e,!d)&&(r[e]=i(t,o,e))})),s.push(o),o=v(o);return r}(i,t,p,c));var u=!!d&&!!s.setInstFuncs;u&&a&&(u=!!a.setInstFuncs),function(e,t,n,a,i){if(!g(e)){var r=n._dynInstFuncs=n._dynInstFuncs||{},o=r[t]=r[t]||{};!1!==r._dynInstChk&&(r._dynInstChk=!!i),b(n,(function(t){E(n,t,!1)&&n[t]!==a[t]&&(o[t]=n[t],delete n[t],(!_(e,t)||e[t]&&!e[t]._isDynProxy)&&(e[t]=function(e,t){var n=function(){return(T(this,t,e,n)||C(t,e,n)).apply(this,arguments)};return n._isDynProxy=1,n}(e,t)))}))}}(i,r,t,p,!1!==u)}R._dfOpts=h.o},7770:(e,t,n)=>{"use strict";n.r(t),n.d(t,{DiagConsoleLogger:()=>T,DiagLogLevel:()=>m,INVALID_SPANID:()=>M,INVALID_SPAN_CONTEXT:()=>F,INVALID_TRACEID:()=>L,ProxyTracer:()=>ie,ProxyTracerProvider:()=>oe,ROOT_CONTEXT:()=>O,SamplingDecision:()=>Z,SpanKind:()=>J,SpanStatusCode:()=>ee,TraceFlags:()=>N,baggageEntryMetadataFromString:()=>S,context:()=>ye,createContextKey:()=>R,createTraceState:()=>de,default:()=>Re,defaultTextMapGetter:()=>C,defaultTextMapSetter:()=>w,diag:()=>we,isSpanContextValid:()=>Q,isValidSpanId:()=>K,isValidTraceId:()=>W,propagation:()=>Ce,trace:()=>Te});var a="object"==typeof globalThis?globalThis:global,i="1.2.0",r=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/,o=function(e){var t=new Set([e]),n=new Set,a=e.match(r);if(!a)return function(){return!1};var i=+a[1],o=+a[2],s=+a[3];if(null!=a[4])return function(t){return t===e};function l(e){return n.add(e),!1}function c(e){return t.add(e),!0}return function(e){if(t.has(e))return!0;if(n.has(e))return!1;var a=e.match(r);if(!a)return l(e);var p=+a[1],d=+a[2],u=+a[3];return null!=a[4]||i!==p?l(e):0===i?o===d&&s<=u?c(e):l(e):o<=d?c(e):l(e)}}(i),s=i.split(".")[0],l=Symbol.for("opentelemetry.js.api."+s),c=a;function p(e,t,n,a){var r;void 0===a&&(a=!1);var o=c[l]=null!==(r=c[l])&&void 0!==r?r:{version:i};if(!a&&o[e]){var s=new Error("@opentelemetry/api: Attempted duplicate registration of API: "+e);return n.error(s.stack||s.message),!1}return o.version!==i?(s=new Error("@opentelemetry/api: All API registration versions must match"),n.error(s.stack||s.message),!1):(o[e]=t,n.debug("@opentelemetry/api: Registered a global for "+e+" v1.2.0."),!0)}function d(e){var t,n,a=null===(t=c[l])||void 0===t?void 0:t.version;if(a&&o(a))return null===(n=c[l])||void 0===n?void 0:n[e]}function u(e,t){t.debug("@opentelemetry/api: Unregistering a global for "+e+" v1.2.0.");var n=c[l];n&&delete n[e]}var m,h=function(){function e(e){this._namespace=e.namespace||"DiagComponentLogger"}return e.prototype.debug=function(){for(var e=[],t=0;t=a?i.bind(t):function(){}}return em.ALL&&(e=m.ALL),t=t||{},{error:n("error",m.ERROR),warn:n("warn",m.WARN),info:n("info",m.INFO),debug:n("debug",m.DEBUG),verbose:n("verbose",m.VERBOSE)}}(n,e);if(o){var l=null!==(i=(new Error).stack)&&void 0!==i?i:"";o.warn("Current logger will be overwritten from "+l),s.warn("Current logger will overwrite one already registered from "+l)}return p("diag",s,t,!0)},t.disable=function(){u("diag",t)},t.createComponentLogger=function(e){return new h(e)},t.verbose=e("verbose"),t.debug=e("debug"),t.info=e("info"),t.warn=e("warn"),t.error=e("error")}return e.instance=function(){return this._instance||(this._instance=new e),this._instance},e}(),f=function(){function e(e){this._entries=e?new Map(e):new Map}return e.prototype.getEntry=function(e){var t=this._entries.get(e);if(t)return Object.assign({},t)},e.prototype.getAllEntries=function(){return Array.from(this._entries.entries()).map((function(e){return[e[0],e[1]]}))},e.prototype.setEntry=function(t,n){var a=new e(this._entries);return a._entries.set(t,n),a},e.prototype.removeEntry=function(t){var n=new e(this._entries);return n._entries.delete(t),n},e.prototype.removeEntries=function(){for(var t=[],n=0;n512||(this._internalState=e.split(",").reverse().reduce((function(e,t){var n=t.trim(),a=n.indexOf("=");if(-1!==a){var i=n.slice(0,a),r=n.slice(a+1,t.length);(function(e){return se.test(e)})(i)&&function(e){return le.test(e)&&!ce.test(e)}(r)&&e.set(i,r)}return e}),new Map),this._internalState.size>32&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,32))))},e.prototype._keys=function(){return Array.from(this._internalState.keys()).reverse()},e.prototype._clone=function(){var t=new e;return t._internalState=new Map(this._internalState),t},e}();function de(e){return new pe(e)}var ue="trace",me=function(){function e(){this._proxyTracerProvider=new oe,this.wrapSpanContext=X,this.isSpanContextValid=Q,this.deleteSpan=G,this.getSpan=B,this.getActiveSpan=q,this.getSpanContext=V,this.setSpan=z,this.setSpanContext=H}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalTracerProvider=function(e){var t=p(ue,this._proxyTracerProvider,g.instance());return t&&this._proxyTracerProvider.setDelegate(e),t},e.prototype.getTracerProvider=function(){return d(ue)||this._proxyTracerProvider},e.prototype.getTracer=function(e,t){return this.getTracerProvider().getTracer(e,t)},e.prototype.disable=function(){u(ue,g.instance()),this._proxyTracerProvider=new oe},e}(),he=function(){function e(){}return e.prototype.inject=function(e,t){},e.prototype.extract=function(e,t){return e},e.prototype.fields=function(){return[]},e}(),_e=R("OpenTelemetry Baggage Key");function ge(e){return e.getValue(_e)||void 0}function fe(e,t){return e.setValue(_e,t)}function ve(e){return e.deleteValue(_e)}var be="propagation",Ee=new he,Se=function(){function e(){this.createBaggage=E,this.getBaggage=ge,this.setBaggage=fe,this.deleteBaggage=ve}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalPropagator=function(e){return p(be,e,g.instance())},e.prototype.inject=function(e,t,n){return void 0===n&&(n=w),this._getGlobalPropagator().inject(e,t,n)},e.prototype.extract=function(e,t,n){return void 0===n&&(n=C),this._getGlobalPropagator().extract(e,t,n)},e.prototype.fields=function(){return this._getGlobalPropagator().fields()},e.prototype.disable=function(){u(be,g.instance())},e.prototype._getGlobalPropagator=function(){return d(be)||Ee},e}(),ye=P.getInstance(),Te=me.getInstance(),Ce=Se.getInstance(),we=g.instance();const Re={trace:Te,context:ye,propagation:Ce,diag:we}},26248:(e,t,n)=>{"use strict";n.r(t),n.d(t,{AlwaysOffSampler:()=>Pe,AlwaysOnSampler:()=>Me,AnchoredClock:()=>g,BindOnceFuture:()=>ot,CompositePropagator:()=>fe,DEFAULT_ATTRIBUTE_COUNT_LIMIT:()=>M,DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT:()=>P,DEFAULT_ENVIRONMENT:()=>L,ExportResultCode:()=>ie,ParentBasedSampler:()=>Le,RPCType:()=>Re,RandomIdGenerator:()=>K,SDK_INFO:()=>ne,TRACE_PARENT_HEADER:()=>ye,TRACE_STATE_HEADER:()=>Te,TraceIdRatioBasedSampler:()=>Fe,TraceState:()=>Se,TracesSamplerValues:()=>N,VERSION:()=>ee,W3CBaggagePropagator:()=>_,W3CTraceContextPropagator:()=>Ne,_globalThis:()=>H,baggageUtils:()=>a,deleteRPCMetadata:()=>Ae,getEnv:()=>G,getEnvWithoutDefaults:()=>z,getRPCMetadata:()=>ke,globalErrorHandler:()=>R,hexToBase64:()=>W,hrTime:()=>le,hrTimeDuration:()=>pe,hrTimeToMicroseconds:()=>he,hrTimeToMilliseconds:()=>me,hrTimeToNanoseconds:()=>ue,hrTimeToTimeStamp:()=>de,isAttributeKey:()=>E,isAttributeValue:()=>S,isTimeInput:()=>ge,isTimeInputHrTime:()=>_e,isTracingSuppressed:()=>l,isUrlIgnored:()=>tt,isWrapped:()=>nt,loggingErrorHandler:()=>T,merge:()=>Ye,otperformance:()=>J,parseEnvironment:()=>q,parseTraceParent:()=>we,sanitizeAttributes:()=>b,setGlobalErrorHandler:()=>w,setRPCMetadata:()=>xe,suppressTracing:()=>o,timeInputToHrTime:()=>ce,unrefTimer:()=>ae,unsuppressTracing:()=>s,urlMatches:()=>et});var a={};n.r(a),n.d(a,{getKeyPairs:()=>u,parseKeyPairsIntoRecord:()=>h,parsePairKeyValue:()=>m,serializeKeyPairs:()=>d});var i=n(7770),r=(0,i.createContextKey)("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function o(e){return e.setValue(r,!0)}function s(e){return e.deleteValue(r)}function l(e){return!0===e.getValue(r)}var c=",",p="baggage";function d(e){return e.reduce((function(e,t){var n=""+e+(""!==e?c:"")+t;return n.length>8192?e:n}),"")}function u(e){return e.getAllEntries().map((function(e){var t=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var a,i,r=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(a=r.next()).done;)o.push(a.value)}catch(e){i={error:e}}finally{try{a&&!a.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}return o}(e,2),n=t[0],a=t[1],i=encodeURIComponent(n)+"="+encodeURIComponent(a.value);return void 0!==a.metadata&&(i+=";"+a.metadata.toString()),i}))}function m(e){var t=e.split(";");if(!(t.length<=0)){var n=t.shift();if(n){var a=n.split("=");if(2===a.length){var r,o=decodeURIComponent(a[0].trim()),s=decodeURIComponent(a[1].trim());return t.length>0&&(r=(0,i.baggageEntryMetadataFromString)(t.join(";"))),{key:o,value:s,metadata:r}}}}}function h(e){return"string"!=typeof e||0===e.length?{}:e.split(c).map((function(e){return m(e)})).filter((function(e){return void 0!==e&&e.value.length>0})).reduce((function(e,t){return e[t.key]=t.value,e}),{})}var _=function(){function e(){}return e.prototype.inject=function(e,t,n){var a=i.propagation.getBaggage(e);if(a&&!l(e)){var r=d(u(a).filter((function(e){return e.length<=4096})).slice(0,180));r.length>0&&n.set(t,p,r)}},e.prototype.extract=function(e,t,n){var a=n.get(t,p),r=Array.isArray(a)?a.join(c):a;if(!r)return e;var o={};return 0===r.length?e:(r.split(c).forEach((function(e){var t=m(e);if(t){var n={value:t.value};t.metadata&&(n.metadata=t.metadata),o[t.key]=n}})),0===Object.entries(o).length?e:i.propagation.setBaggage(e,i.propagation.createBaggage(o)))},e.prototype.fields=function(){return[p]},e}(),g=function(){function e(e,t){this._monotonicClock=t,this._epochMillis=e.now(),this._performanceMillis=t.now()}return e.prototype.now=function(){var e=this._monotonicClock.now()-this._performanceMillis;return this._epochMillis+e},e}(),f=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],a=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&a>=e.length&&(e=void 0),{value:e&&e[a++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},v=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var a,i,r=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(a=r.next()).done;)o.push(a.value)}catch(e){i={error:e}}finally{try{a&&!a.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}return o};function b(e){var t,n,a={};if("object"!=typeof e||null==e)return a;try{for(var r=f(Object.entries(e)),o=r.next();!o.done;o=r.next()){var s=v(o.value,2),l=s[0],c=s[1];E(l)?S(c)?Array.isArray(c)?a[l]=c.slice():a[l]=c:i.diag.warn("Invalid attribute value set for key: "+l):i.diag.warn("Invalid attribute key: "+l)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}return a}function E(e){return"string"==typeof e&&e.length>0}function S(e){return null==e||(Array.isArray(e)?function(e){var t,n,a;try{for(var i=f(e),r=i.next();!r.done;r=i.next()){var o=r.value;if(null!=o){if(!a){if(y(o)){a=typeof o;continue}return!1}if(typeof o!==a)return!1}}}catch(e){t={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return!0}(e):y(e))}function y(e){switch(typeof e){case"number":case"boolean":case"string":return!0}return!1}function T(){return function(e){i.diag.error(function(e){return"string"==typeof e?e:JSON.stringify(function(e){for(var t={},n=e;null!==n;)Object.getOwnPropertyNames(n).forEach((function(e){if(!t[e]){var a=n[e];a&&(t[e]=String(a))}})),n=Object.getPrototypeOf(n);return t}(e))}(e))}}var C=T();function w(e){C=e}function R(e){try{C(e)}catch(e){}}var N,O=n(12087);!function(e){e.AlwaysOff="always_off",e.AlwaysOn="always_on",e.ParentBasedAlwaysOff="parentbased_always_off",e.ParentBasedAlwaysOn="parentbased_always_on",e.ParentBasedTraceIdRatio="parentbased_traceidratio",e.TraceIdRatio="traceidratio"}(N||(N={}));var x="object"==typeof globalThis?globalThis:"object"==typeof self?self:"object"==typeof window?window:"object"==typeof global?global:{},A=["OTEL_BSP_EXPORT_TIMEOUT","OTEL_BSP_MAX_EXPORT_BATCH_SIZE","OTEL_BSP_MAX_QUEUE_SIZE","OTEL_BSP_SCHEDULE_DELAY","OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_ATTRIBUTE_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT","OTEL_SPAN_EVENT_COUNT_LIMIT","OTEL_SPAN_LINK_COUNT_LIMIT","OTEL_EXPORTER_OTLP_TIMEOUT","OTEL_EXPORTER_OTLP_TRACES_TIMEOUT","OTEL_EXPORTER_OTLP_METRICS_TIMEOUT","OTEL_EXPORTER_JAEGER_AGENT_PORT"];function k(e){return A.indexOf(e)>-1}var I=["OTEL_NO_PATCH_MODULES","OTEL_PROPAGATORS"];function D(e){return I.indexOf(e)>-1}var P=1/0,M=128,L={CONTAINER_NAME:"",ECS_CONTAINER_METADATA_URI_V4:"",ECS_CONTAINER_METADATA_URI:"",HOSTNAME:"",KUBERNETES_SERVICE_HOST:"",NAMESPACE:"",OTEL_BSP_EXPORT_TIMEOUT:3e4,OTEL_BSP_MAX_EXPORT_BATCH_SIZE:512,OTEL_BSP_MAX_QUEUE_SIZE:2048,OTEL_BSP_SCHEDULE_DELAY:5e3,OTEL_EXPORTER_JAEGER_AGENT_HOST:"",OTEL_EXPORTER_JAEGER_AGENT_PORT:6832,OTEL_EXPORTER_JAEGER_ENDPOINT:"",OTEL_EXPORTER_JAEGER_PASSWORD:"",OTEL_EXPORTER_JAEGER_USER:"",OTEL_EXPORTER_OTLP_ENDPOINT:"",OTEL_EXPORTER_OTLP_TRACES_ENDPOINT:"",OTEL_EXPORTER_OTLP_METRICS_ENDPOINT:"",OTEL_EXPORTER_OTLP_HEADERS:"",OTEL_EXPORTER_OTLP_TRACES_HEADERS:"",OTEL_EXPORTER_OTLP_METRICS_HEADERS:"",OTEL_EXPORTER_OTLP_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_TRACES_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_METRICS_TIMEOUT:1e4,OTEL_EXPORTER_ZIPKIN_ENDPOINT:"http://localhost:9411/api/v2/spans",OTEL_LOG_LEVEL:i.DiagLogLevel.INFO,OTEL_NO_PATCH_MODULES:[],OTEL_PROPAGATORS:["tracecontext","baggage"],OTEL_RESOURCE_ATTRIBUTES:"",OTEL_SERVICE_NAME:"",OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT:P,OTEL_ATTRIBUTE_COUNT_LIMIT:M,OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT:P,OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT:M,OTEL_SPAN_EVENT_COUNT_LIMIT:128,OTEL_SPAN_LINK_COUNT_LIMIT:128,OTEL_TRACES_EXPORTER:"none",OTEL_TRACES_SAMPLER:N.ParentBasedAlwaysOn,OTEL_TRACES_SAMPLER_ARG:"",OTEL_EXPORTER_OTLP_INSECURE:"",OTEL_EXPORTER_OTLP_TRACES_INSECURE:"",OTEL_EXPORTER_OTLP_METRICS_INSECURE:"",OTEL_EXPORTER_OTLP_CERTIFICATE:"",OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE:"",OTEL_EXPORTER_OTLP_METRICS_CERTIFICATE:"",OTEL_EXPORTER_OTLP_COMPRESSION:"",OTEL_EXPORTER_OTLP_TRACES_COMPRESSION:"",OTEL_EXPORTER_OTLP_METRICS_COMPRESSION:"",OTEL_EXPORTER_OTLP_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_TRACES_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_METRICS_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_TRACES_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_METRICS_CLIENT_CERTIFICATE:""};function F(e,t,n,a,i){if(void 0===a&&(a=-1/0),void 0===i&&(i=1/0),void 0!==n[e]){var r=Number(n[e]);isNaN(r)||(t[e]=ri?i:r)}}function j(e,t,n,a){void 0===a&&(a=",");var i=n[e];"string"==typeof i&&(t[e]=i.split(a).map((function(e){return e.trim()})))}var U={ALL:i.DiagLogLevel.ALL,VERBOSE:i.DiagLogLevel.VERBOSE,DEBUG:i.DiagLogLevel.DEBUG,INFO:i.DiagLogLevel.INFO,WARN:i.DiagLogLevel.WARN,ERROR:i.DiagLogLevel.ERROR,NONE:i.DiagLogLevel.NONE};function B(e,t,n){var a=n[e];if("string"==typeof a){var i=U[a.toUpperCase()];null!=i&&(t[e]=i)}}function q(e){var t={};for(var n in L){var a=n;switch(a){case"OTEL_LOG_LEVEL":B(a,t,e);break;default:if(k(a))F(a,t,e);else if(D(a))j(a,t,e);else{var i=e[a];null!=i&&(t[a]=String(i))}}}return t}function z(){return"undefined"!=typeof process?q(process.env):q(x)}function G(){var e=q(process.env);return Object.assign({HOSTNAME:O.hostname()},L,e)}var H="object"==typeof globalThis?globalThis:global;function V(e){return e>=48&&e<=57?e-48:e>=97&&e<=102?e-87:e-55}var Y=Buffer.alloc(8),$=Buffer.alloc(16);function W(e){var t;t=16===e.length?Y:32===e.length?$:Buffer.alloc(e.length/2);for(var n=0,a=0;a>>0,4*t);for(t=0;t0);t++)t===e-1&&(Q[e-1]=1);return Q.toString("hex",0,e)}}var Z,J=require("perf_hooks").performance,ee="1.7.0",te=n(11871),ne=((Z={})[te.SemanticResourceAttributes.TELEMETRY_SDK_NAME]="opentelemetry",Z[te.SemanticResourceAttributes.PROCESS_RUNTIME_NAME]="node",Z[te.SemanticResourceAttributes.TELEMETRY_SDK_LANGUAGE]=te.TelemetrySdkLanguageValues.NODEJS,Z[te.SemanticResourceAttributes.TELEMETRY_SDK_VERSION]=ee,Z);function ae(e){e.unref()}var ie,re=Math.pow(10,9);function oe(e){var t=e/1e3,n=Math.trunc(t);return[n,Number((t-n).toFixed(9))*re]}function se(){var e=J.timeOrigin;if("number"!=typeof e){var t=J;e=t.timing&&t.timing.fetchStart}return e}function le(e){var t=oe(se()),n=oe("number"==typeof e?e:J.now()),a=t[0]+n[0],i=t[1]+n[1];return i>re&&(i-=re,a+=1),[a,i]}function ce(e){if(_e(e))return e;if("number"==typeof e)return e=e.length&&(e=void 0),{value:e&&e[a++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(this._propagators),s=o.next();!s.done;s=o.next()){var l=s.value;try{l.inject(e,t,n)}catch(e){i.diag.warn("Failed to inject with "+l.constructor.name+". Err: "+e.message)}}}catch(e){a={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(a)throw a.error}}},e.prototype.extract=function(e,t,n){return this._propagators.reduce((function(e,a){try{return a.extract(e,t,n)}catch(e){i.diag.warn("Failed to inject with "+a.constructor.name+". Err: "+e.message)}return e}),e)},e.prototype.fields=function(){return this._fields.slice()},e}(),ve=new RegExp("^(?:[a-z][_0-9a-z-*/]{0,255}|[a-z0-9][_0-9a-z-*/]{0,240}@[a-z][_0-9a-z-*/]{0,13})$"),be=/^[ -~]{0,255}[!-~]$/,Ee=/,|=/,Se=function(){function e(e){this._internalState=new Map,e&&this._parse(e)}return e.prototype.set=function(e,t){var n=this._clone();return n._internalState.has(e)&&n._internalState.delete(e),n._internalState.set(e,t),n},e.prototype.unset=function(e){var t=this._clone();return t._internalState.delete(e),t},e.prototype.get=function(e){return this._internalState.get(e)},e.prototype.serialize=function(){var e=this;return this._keys().reduce((function(t,n){return t.push(n+"="+e.get(n)),t}),[]).join(",")},e.prototype._parse=function(e){e.length>512||(this._internalState=e.split(",").reverse().reduce((function(e,t){var n=t.trim(),a=n.indexOf("=");if(-1!==a){var i=n.slice(0,a),r=n.slice(a+1,t.length);(function(e){return ve.test(e)})(i)&&function(e){return be.test(e)&&!Ee.test(e)}(r)&&e.set(i,r)}return e}),new Map),this._internalState.size>32&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,32))))},e.prototype._keys=function(){return Array.from(this._internalState.keys()).reverse()},e.prototype._clone=function(){var t=new e;return t._internalState=new Map(this._internalState),t},e}(),ye="traceparent",Te="tracestate",Ce=new RegExp("^\\s?((?!ff)[\\da-f]{2})-((?![0]{32})[\\da-f]{32})-((?![0]{16})[\\da-f]{16})-([\\da-f]{2})(-.*)?\\s?$");function we(e){var t=Ce.exec(e);return t?"00"===t[1]&&t[5]?null:{traceId:t[2],spanId:t[3],traceFlags:parseInt(t[4],16)}:null}var Re,Ne=function(){function e(){}return e.prototype.inject=function(e,t,n){var a=i.trace.getSpanContext(e);if(a&&!l(e)&&(0,i.isSpanContextValid)(a)){var r="00-"+a.traceId+"-"+a.spanId+"-0"+Number(a.traceFlags||i.TraceFlags.NONE).toString(16);n.set(t,ye,r),a.traceState&&n.set(t,Te,a.traceState.serialize())}},e.prototype.extract=function(e,t,n){var a=n.get(t,ye);if(!a)return e;var r=Array.isArray(a)?a[0]:a;if("string"!=typeof r)return e;var o=we(r);if(!o)return e;o.isRemote=!0;var s=n.get(t,Te);if(s){var l=Array.isArray(s)?s.join(","):s;o.traceState=new Se("string"==typeof l?l:void 0)}return i.trace.setSpanContext(e,o)},e.prototype.fields=function(){return[ye,Te]},e}(),Oe=(0,i.createContextKey)("OpenTelemetry SDK Context Key RPC_METADATA");function xe(e,t){return e.setValue(Oe,t)}function Ae(e){return e.deleteValue(Oe)}function ke(e){return e.getValue(Oe)}!function(e){e.HTTP="http"}(Re||(Re={}));var Ie,De,Pe=function(){function e(){}return e.prototype.shouldSample=function(){return{decision:i.SamplingDecision.NOT_RECORD}},e.prototype.toString=function(){return"AlwaysOffSampler"},e}(),Me=function(){function e(){}return e.prototype.shouldSample=function(){return{decision:i.SamplingDecision.RECORD_AND_SAMPLED}},e.prototype.toString=function(){return"AlwaysOnSampler"},e}(),Le=function(){function e(e){var t,n,a,i;this._root=e.root,this._root||(R(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new Me),this._remoteParentSampled=null!==(t=e.remoteParentSampled)&&void 0!==t?t:new Me,this._remoteParentNotSampled=null!==(n=e.remoteParentNotSampled)&&void 0!==n?n:new Pe,this._localParentSampled=null!==(a=e.localParentSampled)&&void 0!==a?a:new Me,this._localParentNotSampled=null!==(i=e.localParentNotSampled)&&void 0!==i?i:new Pe}return e.prototype.shouldSample=function(e,t,n,a,r,o){var s=i.trace.getSpanContext(e);return s&&(0,i.isSpanContextValid)(s)?s.isRemote?s.traceFlags&i.TraceFlags.SAMPLED?this._remoteParentSampled.shouldSample(e,t,n,a,r,o):this._remoteParentNotSampled.shouldSample(e,t,n,a,r,o):s.traceFlags&i.TraceFlags.SAMPLED?this._localParentSampled.shouldSample(e,t,n,a,r,o):this._localParentNotSampled.shouldSample(e,t,n,a,r,o):this._root.shouldSample(e,t,n,a,r,o)},e.prototype.toString=function(){return"ParentBased{root="+this._root.toString()+", remoteParentSampled="+this._remoteParentSampled.toString()+", remoteParentNotSampled="+this._remoteParentNotSampled.toString()+", localParentSampled="+this._localParentSampled.toString()+", localParentNotSampled="+this._localParentNotSampled.toString()+"}"},e}(),Fe=function(){function e(e){void 0===e&&(e=0),this._ratio=e,this._ratio=this._normalize(e),this._upperBound=Math.floor(4294967295*this._ratio)}return e.prototype.shouldSample=function(e,t){return{decision:(0,i.isValidTraceId)(t)&&this._accumulate(t)=1?1:e<=0?0:e},e.prototype._accumulate=function(e){for(var t=0,n=0;n>>0}return t},e}(),je=Function.prototype.toString,Ue=je.call(Object),Be=(Ie=Object.getPrototypeOf,De=Object,function(e){return Ie(De(e))}),qe=Object.prototype,ze=qe.hasOwnProperty,Ge=Symbol?Symbol.toStringTag:void 0,He=qe.toString;function Ve(e){if(!function(e){return null!=e&&"object"==typeof e}(e)||"[object Object]"!==function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Ge&&Ge in Object(e)?function(e){var t=ze.call(e,Ge),n=e[Ge],a=!1;try{e[Ge]=void 0,a=!0}catch(e){}var i=He.call(e);return a&&(t?e[Ge]=n:delete e[Ge]),i}(e):function(e){return He.call(e)}(e)}(e))return!1;var t=Be(e);if(null===t)return!0;var n=ze.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&je.call(n)===Ue}function Ye(){for(var e=[],t=0;t0;)n=We(n,e.shift(),0,a);return n}function $e(e){return Qe(e)?e.slice():e}function We(e,t,n,a){var i;if(void 0===n&&(n=0),!(n>20)){if(n++,Je(e)||Je(t)||Xe(t))i=$e(t);else if(Qe(e)){if(i=e.slice(),Qe(t))for(var r=0,o=t.length;r=e.length&&(e=void 0),{value:e&&e[a++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(t),r=i.next();!r.done;r=i.next())if(et(e,r.value))return!0}catch(e){n={error:e}}finally{try{r&&!r.done&&(a=i.return)&&a.call(i)}finally{if(n)throw n.error}}return!1}function nt(e){return"function"==typeof e&&"function"==typeof e.__original&&"function"==typeof e.__unwrap&&!0===e.__wrapped}var at=function(){function e(){var e=this;this._promise=new Promise((function(t,n){e._resolve=t,e._reject=n}))}return Object.defineProperty(e.prototype,"promise",{get:function(){return this._promise},enumerable:!1,configurable:!0}),e.prototype.resolve=function(e){this._resolve(e)},e.prototype.reject=function(e){this._reject(e)},e}(),it=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var a,i,r=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(a=r.next()).done;)o.push(a.value)}catch(e){i={error:e}}finally{try{a&&!a.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}return o},rt=function(e,t,n){if(n||2===arguments.length)for(var a,i=0,r=t.length;i{"use strict";n.r(t),n.d(t,{AlwaysOffSampler:()=>c,AlwaysOnSampler:()=>p,BasicTracerProvider:()=>F,BatchSpanProcessor:()=>S,ConsoleSpanExporter:()=>j,ForceFlushState:()=>R,InMemorySpanExporter:()=>U,NoopSpanProcessor:()=>L,ParentBasedSampler:()=>d,RandomIdGenerator:()=>y,SamplingDecision:()=>a,SimpleSpanProcessor:()=>B,Span:()=>l,TraceIdRatioBasedSampler:()=>u,Tracer:()=>w});var a,i=n(7770),r=n(26248),o=n(11871),s=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var a,i,r=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(a=r.next()).done;)o.push(a.value)}catch(e){i={error:e}}finally{try{a&&!a.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}return o},l=function(){function e(e,t,n,a,o,s,l,c,p){void 0===l&&(l=[]),void 0===p&&(p=r.otperformance),this.attributes={},this.links=[],this.events=[],this.status={code:i.SpanStatusCode.UNSET},this.endTime=[0,0],this._ended=!1,this._duration=[-1,-1],this._clock=p,this.name=n,this._spanContext=a,this.parentSpanId=s,this.kind=o,this.links=l,this.startTime=(0,r.timeInputToHrTime)(null!=c?c:p.now()),this.resource=e.resource,this.instrumentationLibrary=e.instrumentationLibrary,this._spanLimits=e.getSpanLimits(),this._spanProcessor=e.getActiveSpanProcessor(),this._spanProcessor.onStart(this,t),this._attributeValueLengthLimit=this._spanLimits.attributeValueLengthLimit||0}return e.prototype.spanContext=function(){return this._spanContext},e.prototype.setAttribute=function(e,t){return null==t||this._isSpanEnded()?this:0===e.length?(i.diag.warn("Invalid attribute key: "+e),this):(0,r.isAttributeValue)(t)?(Object.keys(this.attributes).length>=this._spanLimits.attributeCountLimit&&!Object.prototype.hasOwnProperty.call(this.attributes,e)||(this.attributes[e]=this._truncateToSize(t)),this):(i.diag.warn("Invalid attribute value set for key: "+e),this)},e.prototype.setAttributes=function(e){var t,n;try{for(var a=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],a=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&a>=e.length&&(e=void 0),{value:e&&e[a++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(Object.entries(e)),i=a.next();!i.done;i=a.next()){var r=s(i.value,2),o=r[0],l=r[1];this.setAttribute(o,l)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}return this},e.prototype.addEvent=function(e,t,n){if(this._isSpanEnded())return this;if(0===this._spanLimits.eventCountLimit)return i.diag.warn("No events allowed."),this;this.events.length>=this._spanLimits.eventCountLimit&&(i.diag.warn("Dropping extra events."),this.events.shift()),(0,r.isTimeInput)(t)&&(void 0===n&&(n=t),t=void 0),void 0===n&&(n=this._clock.now());var a=(0,r.sanitizeAttributes)(t);return this.events.push({name:e,attributes:a,time:(0,r.timeInputToHrTime)(n)}),this},e.prototype.setStatus=function(e){return this._isSpanEnded()||(this.status=e),this},e.prototype.updateName=function(e){return this._isSpanEnded()||(this.name=e),this},e.prototype.end=function(e){this._isSpanEnded()?i.diag.error("You can only call end() on a span once."):(this._ended=!0,this.endTime=(0,r.timeInputToHrTime)(null!=e?e:this._clock.now()),this._duration=(0,r.hrTimeDuration)(this.startTime,this.endTime),this._duration[0]<0&&i.diag.warn("Inconsistent start and end time, startTime > endTime",this.startTime,this.endTime),this._spanProcessor.onEnd(this))},e.prototype.isRecording=function(){return!1===this._ended},e.prototype.recordException=function(e,t){void 0===t&&(t=this._clock.now());var n={};"string"==typeof e?n[o.SemanticAttributes.EXCEPTION_MESSAGE]=e:e&&(e.code?n[o.SemanticAttributes.EXCEPTION_TYPE]=e.code.toString():e.name&&(n[o.SemanticAttributes.EXCEPTION_TYPE]=e.name),e.message&&(n[o.SemanticAttributes.EXCEPTION_MESSAGE]=e.message),e.stack&&(n[o.SemanticAttributes.EXCEPTION_STACKTRACE]=e.stack)),n[o.SemanticAttributes.EXCEPTION_TYPE]||n[o.SemanticAttributes.EXCEPTION_MESSAGE]?this.addEvent("exception",n,t):i.diag.warn("Failed to record an exception "+e)},Object.defineProperty(e.prototype,"duration",{get:function(){return this._duration},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ended",{get:function(){return this._ended},enumerable:!1,configurable:!0}),e.prototype._isSpanEnded=function(){return this._ended&&i.diag.warn("Can not execute the operation on ended Span {traceId: "+this._spanContext.traceId+", spanId: "+this._spanContext.spanId+"}"),this._ended},e.prototype._truncateToLimitUtil=function(e,t){return e.length<=t?e:e.substr(0,t)},e.prototype._truncateToSize=function(e){var t=this,n=this._attributeValueLengthLimit;return n<=0?(i.diag.warn("Attribute value limit must be positive, got "+n),e):"string"==typeof e?this._truncateToLimitUtil(e,n):Array.isArray(e)?e.map((function(e){return"string"==typeof e?t._truncateToLimitUtil(e,n):e})):e},e}();!function(e){e[e.NOT_RECORD=0]="NOT_RECORD",e[e.RECORD=1]="RECORD",e[e.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"}(a||(a={}));var c=function(){function e(){}return e.prototype.shouldSample=function(){return{decision:a.NOT_RECORD}},e.prototype.toString=function(){return"AlwaysOffSampler"},e}(),p=function(){function e(){}return e.prototype.shouldSample=function(){return{decision:a.RECORD_AND_SAMPLED}},e.prototype.toString=function(){return"AlwaysOnSampler"},e}(),d=function(){function e(e){var t,n,a,i;this._root=e.root,this._root||((0,r.globalErrorHandler)(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new p),this._remoteParentSampled=null!==(t=e.remoteParentSampled)&&void 0!==t?t:new p,this._remoteParentNotSampled=null!==(n=e.remoteParentNotSampled)&&void 0!==n?n:new c,this._localParentSampled=null!==(a=e.localParentSampled)&&void 0!==a?a:new p,this._localParentNotSampled=null!==(i=e.localParentNotSampled)&&void 0!==i?i:new c}return e.prototype.shouldSample=function(e,t,n,a,r,o){var s=i.trace.getSpanContext(e);return s&&(0,i.isSpanContextValid)(s)?s.isRemote?s.traceFlags&i.TraceFlags.SAMPLED?this._remoteParentSampled.shouldSample(e,t,n,a,r,o):this._remoteParentNotSampled.shouldSample(e,t,n,a,r,o):s.traceFlags&i.TraceFlags.SAMPLED?this._localParentSampled.shouldSample(e,t,n,a,r,o):this._localParentNotSampled.shouldSample(e,t,n,a,r,o):this._root.shouldSample(e,t,n,a,r,o)},e.prototype.toString=function(){return"ParentBased{root="+this._root.toString()+", remoteParentSampled="+this._remoteParentSampled.toString()+", remoteParentNotSampled="+this._remoteParentNotSampled.toString()+", localParentSampled="+this._localParentSampled.toString()+", localParentNotSampled="+this._localParentNotSampled.toString()+"}"},e}(),u=function(){function e(e){void 0===e&&(e=0),this._ratio=e,this._ratio=this._normalize(e),this._upperBound=Math.floor(4294967295*this._ratio)}return e.prototype.shouldSample=function(e,t){return{decision:(0,i.isValidTraceId)(t)&&this._accumulate(t)=1?1:e<=0?0:e},e.prototype._accumulate=function(e){for(var t=0,n=0;n>>0}return t},e}(),m=(0,r.getEnv)(),h=r.TracesSamplerValues.AlwaysOn;function _(){return{sampler:g(m),forceFlushTimeoutMillis:3e4,generalLimits:{attributeValueLengthLimit:(0,r.getEnv)().OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:(0,r.getEnv)().OTEL_ATTRIBUTE_COUNT_LIMIT},spanLimits:{attributeValueLengthLimit:(0,r.getEnv)().OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:(0,r.getEnv)().OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT,linkCountLimit:(0,r.getEnv)().OTEL_SPAN_LINK_COUNT_LIMIT,eventCountLimit:(0,r.getEnv)().OTEL_SPAN_EVENT_COUNT_LIMIT}}}function g(e){switch(void 0===e&&(e=(0,r.getEnv)()),e.OTEL_TRACES_SAMPLER){case r.TracesSamplerValues.AlwaysOn:return new p;case r.TracesSamplerValues.AlwaysOff:return new c;case r.TracesSamplerValues.ParentBasedAlwaysOn:return new d({root:new p});case r.TracesSamplerValues.ParentBasedAlwaysOff:return new d({root:new c});case r.TracesSamplerValues.TraceIdRatio:return new u(f(e));case r.TracesSamplerValues.ParentBasedTraceIdRatio:return new d({root:new u(f(e))});default:return i.diag.error('OTEL_TRACES_SAMPLER value "'+e.OTEL_TRACES_SAMPLER+" invalid, defaulting to "+h+'".'),new p}}function f(e){if(void 0===e.OTEL_TRACES_SAMPLER_ARG||""===e.OTEL_TRACES_SAMPLER_ARG)return i.diag.error("OTEL_TRACES_SAMPLER_ARG is blank, defaulting to 1."),1;var t=Number(e.OTEL_TRACES_SAMPLER_ARG);return isNaN(t)?(i.diag.error("OTEL_TRACES_SAMPLER_ARG="+e.OTEL_TRACES_SAMPLER_ARG+" was given, but it is invalid, defaulting to 1."),1):t<0||t>1?(i.diag.error("OTEL_TRACES_SAMPLER_ARG="+e.OTEL_TRACES_SAMPLER_ARG+" was given, but it is out of range ([0..1]), defaulting to 1."),1):t}var v,b=function(){function e(e,t){this._exporter=e,this._finishedSpans=[];var n=(0,r.getEnv)();this._maxExportBatchSize="number"==typeof(null==t?void 0:t.maxExportBatchSize)?t.maxExportBatchSize:n.OTEL_BSP_MAX_EXPORT_BATCH_SIZE,this._maxQueueSize="number"==typeof(null==t?void 0:t.maxQueueSize)?t.maxQueueSize:n.OTEL_BSP_MAX_QUEUE_SIZE,this._scheduledDelayMillis="number"==typeof(null==t?void 0:t.scheduledDelayMillis)?t.scheduledDelayMillis:n.OTEL_BSP_SCHEDULE_DELAY,this._exportTimeoutMillis="number"==typeof(null==t?void 0:t.exportTimeoutMillis)?t.exportTimeoutMillis:n.OTEL_BSP_EXPORT_TIMEOUT,this._shutdownOnce=new r.BindOnceFuture(this._shutdown,this)}return e.prototype.forceFlush=function(){return this._shutdownOnce.isCalled?this._shutdownOnce.promise:this._flushAll()},e.prototype.onStart=function(e,t){},e.prototype.onEnd=function(e){this._shutdownOnce.isCalled||0!=(e.spanContext().traceFlags&i.TraceFlags.SAMPLED)&&this._addToBuffer(e)},e.prototype.shutdown=function(){return this._shutdownOnce.call()},e.prototype._shutdown=function(){var e=this;return Promise.resolve().then((function(){return e.onShutdown()})).then((function(){return e._flushAll()})).then((function(){return e._exporter.shutdown()}))},e.prototype._addToBuffer=function(e){this._finishedSpans.length>=this._maxQueueSize||(this._finishedSpans.push(e),this._maybeStartTimer())},e.prototype._flushAll=function(){var e=this;return new Promise((function(t,n){for(var a=[],i=0,r=Math.ceil(e._finishedSpans.length/e._maxExportBatchSize);i0&&(e._clearTimer(),e._maybeStartTimer())})).catch((function(e){(0,r.globalErrorHandler)(e)}))}),this._scheduledDelayMillis),(0,r.unrefTimer)(this._timer))},e.prototype._clearTimer=function(){void 0!==this._timer&&(clearTimeout(this._timer),this._timer=void 0)},e}(),E=(v=function(e,t){return(v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}v(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),S=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return E(t,e),t.prototype.onShutdown=function(){},t}(b),y=function(){this.generateTraceId=C(16),this.generateSpanId=C(8)},T=Buffer.allocUnsafe(16);function C(e){return function(){for(var t=0;t>>0,4*t);for(t=0;t0);t++)t===e-1&&(T[e-1]=1);return T.toString("hex",0,e)}}var w=function(){function e(e,t,n){this._tracerProvider=n;var a,i,r,o,s=(a=t,i={sampler:g()},r=_(),(o=Object.assign({},r,i,a)).generalLimits=Object.assign({},r.generalLimits,a.generalLimits||{}),o.spanLimits=Object.assign({},r.spanLimits,a.spanLimits||{}),o);this._sampler=s.sampler,this._generalLimits=s.generalLimits,this._spanLimits=s.spanLimits,this._idGenerator=t.idGenerator||new y,this.resource=n.resource,this.instrumentationLibrary=e}return e.prototype.startSpan=function(e,t,n){var a,o;void 0===t&&(t={}),void 0===n&&(n=i.context.active()),t.root&&(n=i.trace.deleteSpan(n));var s,c=i.trace.getSpan(n);if(c&&(s=c._clock),s||(s=new r.AnchoredClock(Date,r.otperformance),c&&(c._clock=s)),(0,r.isTracingSuppressed)(n))return i.diag.debug("Instrumentation suppressed, returning Noop Span"),(_=i.trace.wrapSpanContext(i.INVALID_SPAN_CONTEXT))._clock=s,_;var p,d,u,m=null==c?void 0:c.spanContext(),h=this._idGenerator.generateSpanId();m&&i.trace.isSpanContextValid(m)?(p=m.traceId,d=m.traceState,u=m.spanId):p=this._idGenerator.generateTraceId();var _,g=null!==(a=t.kind)&&void 0!==a?a:i.SpanKind.INTERNAL,f=(null!==(o=t.links)&&void 0!==o?o:[]).map((function(e){return{context:e.context,attributes:(0,r.sanitizeAttributes)(e.attributes)}})),v=(0,r.sanitizeAttributes)(t.attributes),b=this._sampler.shouldSample(n,p,e,g,v,f),E={traceId:p,spanId:h,traceFlags:b.decision===i.SamplingDecision.RECORD_AND_SAMPLED?i.TraceFlags.SAMPLED:i.TraceFlags.NONE,traceState:d};if(b.decision===i.SamplingDecision.NOT_RECORD)return i.diag.debug("Recording is off, propagating context in a non-recording span"),(_=i.trace.wrapSpanContext(E))._clock=s,_;var S=new l(this,n,e,E,g,u,f,t.startTime,s),y=(0,r.sanitizeAttributes)(Object.assign(v,b.attributes));return S.setAttributes(y),S},e.prototype.startActiveSpan=function(e,t,n,a){var r,o,s;if(!(arguments.length<2)){2===arguments.length?s=t:3===arguments.length?(r=t,s=n):(r=t,o=n,s=a);var l=null!=o?o:i.context.active(),c=this.startSpan(e,r,l),p=i.trace.setSpan(l,c);return i.context.with(p,s,void 0,c)}},e.prototype.getGeneralLimits=function(){return this._generalLimits},e.prototype.getSpanLimits=function(){return this._spanLimits},e.prototype.getActiveSpanProcessor=function(){return this._tracerProvider.getActiveSpanProcessor()},e}();n(31669);var R,N=n(12087),O=(new(function(){function e(){}return e.prototype.detect=function(e){return t=this,n=void 0,i=function(){var e;return function(e,t){var n,a,i,r,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return r={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function s(r){return function(s){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,a&&(i=2&r[0]?a.return:r[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,r[1])).done)return i;switch(a=0,i&&(r=[2&r[0],i.value]),r[0]){case 0:case 1:i=r;break;case 4:return o.label++,{value:r[1],done:!1};case 5:o.label++,a=r[1],r=[0];continue;case 7:r=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==r[0]&&2!==r[0])){o=0;continue}if(3===r[0]&&(!i||r[1]>i[0]&&r[1]0&&i[i.length-1])||6!==r[0]&&2!==r[0])){o=0;continue}if(3===r[0]&&(!i||r[1]>i[0]&&r[1]0&&i[i.length-1])||6!==r[0]&&2!==r[0])){o=0;continue}if(3===r[0]&&(!i||r[1]>i[0]&&r[1]0)&&!(a=r.next()).done;)o.push(a.value)}catch(e){i={error:e}}finally{try{a&&!a.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}return o},D=(new(function(){function e(){this._MAX_LENGTH=255,this._COMMA_SEPARATOR=",",this._LABEL_KEY_VALUE_SPLITTER="=",this._ERROR_MESSAGE_INVALID_CHARS="should be a ASCII string with a length greater than 0 and not exceed "+this._MAX_LENGTH+" characters.",this._ERROR_MESSAGE_INVALID_VALUE="should be a ASCII string with a length not exceed "+this._MAX_LENGTH+" characters."}return e.prototype.detect=function(e){return k(this,void 0,void 0,(function(){var e,t,n,a,s;return function(e,t){var n,a,i,r,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return r={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function s(r){return function(s){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,a&&(i=2&r[0]?a.return:r[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,r[1])).done)return i;switch(a=0,i&&(r=[2&r[0],i.value]),r[0]){case 0:case 1:i=r;break;case 4:return o.label++,{value:r[1],done:!1};case 5:o.label++,a=r[1],r=[0];continue;case 7:r=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==r[0]&&2!==r[0])){o=0;continue}if(3===r[0]&&(!i||r[1]>i[0]&&r[1]=e.length&&(e=void 0),{value:e&&e[a++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(i),o=r.next();!o.done;o=r.next()){var s=o.value.split(this._LABEL_KEY_VALUE_SPLITTER,-1);if(2===s.length){var l=I(s,2),c=l[0],p=l[1];if(c=c.trim(),p=p.trim().split('^"|"$').join(""),!this._isValidAndNotEmpty(c))throw new Error("Attribute key "+this._ERROR_MESSAGE_INVALID_CHARS);if(!this._isValid(p))throw new Error("Attribute value "+this._ERROR_MESSAGE_INVALID_VALUE);a[c]=p}}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}return a},e.prototype._isValid=function(e){return e.length<=this._MAX_LENGTH&&this._isPrintableString(e)},e.prototype._isPrintableString=function(e){for(var t=0;t="~")return!1}return!0},e.prototype._isValidAndNotEmpty=function(e){return e.length>0&&this._isValid(e)},e}()),function(){return(D=Object.assign||function(e){for(var t,n=1,a=arguments.length;n0&&i[i.length-1])||6!==r[0]&&2!==r[0])){o=0;continue}if(3===r[0]&&(!i||r[1]>i[0]&&r[1]=e.length&&(e=void 0),{value:e&&e[a++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}),M=function(){function e(e){this._spanProcessors=e}return e.prototype.forceFlush=function(){var e,t,n=[];try{for(var a=P(this._spanProcessors),i=a.next();!i.done;i=a.next()){var o=i.value;n.push(o.forceFlush())}}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=a.return)&&t.call(a)}finally{if(e)throw e.error}}return new Promise((function(e){Promise.all(n).then((function(){e()})).catch((function(t){(0,r.globalErrorHandler)(t||new Error("MultiSpanProcessor: forceFlush failed")),e()}))}))},e.prototype.onStart=function(e,t){var n,a;try{for(var i=P(this._spanProcessors),r=i.next();!r.done;r=i.next())r.value.onStart(e,t)}catch(e){n={error:e}}finally{try{r&&!r.done&&(a=i.return)&&a.call(i)}finally{if(n)throw n.error}}},e.prototype.onEnd=function(e){var t,n;try{for(var a=P(this._spanProcessors),i=a.next();!i.done;i=a.next())i.value.onEnd(e)}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}},e.prototype.shutdown=function(){var e,t,n=[];try{for(var a=P(this._spanProcessors),i=a.next();!i.done;i=a.next()){var r=i.value;n.push(r.shutdown())}}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=a.return)&&t.call(a)}finally{if(e)throw e.error}}return new Promise((function(e,t){Promise.all(n).then((function(){e()}),t)}))},e}(),L=function(){function e(){}return e.prototype.onStart=function(e,t){},e.prototype.onEnd=function(e){},e.prototype.shutdown=function(){return Promise.resolve()},e.prototype.forceFlush=function(){return Promise.resolve()},e}();!function(e){e[e.resolved=0]="resolved",e[e.timeout=1]="timeout",e[e.error=2]="error",e[e.unresolved=3]="unresolved"}(R||(R={}));var F=function(){function e(e){var t;void 0===e&&(e={}),this._registeredSpanProcessors=[],this._tracers=new Map;var n=(0,r.merge)({},_(),function(e){var t,n,a,i,o,s,l,c,p,d,u,m,h=Object.assign({},e.spanLimits),_=(0,r.getEnvWithoutDefaults)();return h.attributeCountLimit=null!==(s=null!==(o=null!==(i=null!==(n=null===(t=e.spanLimits)||void 0===t?void 0:t.attributeCountLimit)&&void 0!==n?n:null===(a=e.generalLimits)||void 0===a?void 0:a.attributeCountLimit)&&void 0!==i?i:_.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT)&&void 0!==o?o:_.OTEL_ATTRIBUTE_COUNT_LIMIT)&&void 0!==s?s:r.DEFAULT_ATTRIBUTE_COUNT_LIMIT,h.attributeValueLengthLimit=null!==(m=null!==(u=null!==(d=null!==(c=null===(l=e.spanLimits)||void 0===l?void 0:l.attributeValueLengthLimit)&&void 0!==c?c:null===(p=e.generalLimits)||void 0===p?void 0:p.attributeValueLengthLimit)&&void 0!==d?d:_.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT)&&void 0!==u?u:_.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT)&&void 0!==m?m:r.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT,Object.assign({},e,{spanLimits:h})}(e));this.resource=null!==(t=n.resource)&&void 0!==t?t:x.empty(),this.resource=x.default().merge(this.resource),this._config=Object.assign({},n,{resource:this.resource});var a=this._buildExporterFromEnv();if(void 0!==a){var i=new S(a);this.activeSpanProcessor=i}else this.activeSpanProcessor=new L}return e.prototype.getTracer=function(e,t,n){var a=e+"@"+(t||"")+":"+((null==n?void 0:n.schemaUrl)||"");return this._tracers.has(a)||this._tracers.set(a,new w({name:e,version:t,schemaUrl:null==n?void 0:n.schemaUrl},this._config,this)),this._tracers.get(a)},e.prototype.addSpanProcessor=function(e){0===this._registeredSpanProcessors.length&&this.activeSpanProcessor.shutdown().catch((function(e){return i.diag.error("Error while trying to shutdown current span processor",e)})),this._registeredSpanProcessors.push(e),this.activeSpanProcessor=new M(this._registeredSpanProcessors)},e.prototype.getActiveSpanProcessor=function(){return this.activeSpanProcessor},e.prototype.register=function(e){void 0===e&&(e={}),i.trace.setGlobalTracerProvider(this),void 0===e.propagator&&(e.propagator=this._buildPropagatorFromEnv()),e.contextManager&&i.context.setGlobalContextManager(e.contextManager),e.propagator&&i.propagation.setGlobalPropagator(e.propagator)},e.prototype.forceFlush=function(){var e=this._config.forceFlushTimeoutMillis,t=this._registeredSpanProcessors.map((function(t){return new Promise((function(n){var a,i=setTimeout((function(){n(new Error("Span processor did not completed within timeout period of "+e+" ms")),a=R.timeout}),e);t.forceFlush().then((function(){clearTimeout(i),a!==R.timeout&&(a=R.resolved,n(a))})).catch((function(e){clearTimeout(i),a=R.error,n(e)}))}))}));return new Promise((function(e,n){Promise.all(t).then((function(t){var a=t.filter((function(e){return e!==R.resolved}));a.length>0?n(a):e()})).catch((function(e){return n([e])}))}))},e.prototype.shutdown=function(){return this.activeSpanProcessor.shutdown()},e.prototype._getPropagator=function(e){var t;return null===(t=this.constructor._registeredPropagators.get(e))||void 0===t?void 0:t()},e.prototype._getSpanExporter=function(e){var t;return null===(t=this.constructor._registeredExporters.get(e))||void 0===t?void 0:t()},e.prototype._buildPropagatorFromEnv=function(){var e=this,t=Array.from(new Set((0,r.getEnv)().OTEL_PROPAGATORS)),n=t.map((function(t){var n=e._getPropagator(t);return n||i.diag.warn('Propagator "'+t+'" requested through environment variable is unavailable.'),n})).reduce((function(e,t){return t&&e.push(t),e}),[]);return 0===n.length?void 0:1===t.length?n[0]:new r.CompositePropagator({propagators:n})},e.prototype._buildExporterFromEnv=function(){var e=(0,r.getEnv)().OTEL_TRACES_EXPORTER;if("none"!==e){var t=this._getSpanExporter(e);return t||i.diag.error('Exporter "'+e+'" requested through environment variable is unavailable.'),t}},e._registeredPropagators=new Map([["tracecontext",function(){return new r.W3CTraceContextPropagator}],["baggage",function(){return new r.W3CBaggagePropagator}]]),e._registeredExporters=new Map,e}(),j=function(){function e(){}return e.prototype.export=function(e,t){return this._sendSpans(e,t)},e.prototype.shutdown=function(){return this._sendSpans([]),Promise.resolve()},e.prototype._exportInfo=function(e){return{traceId:e.spanContext().traceId,parentId:e.parentSpanId,name:e.name,id:e.spanContext().spanId,kind:e.kind,timestamp:(0,r.hrTimeToMicroseconds)(e.startTime),duration:(0,r.hrTimeToMicroseconds)(e.duration),attributes:e.attributes,status:e.status,events:e.events,links:e.links}},e.prototype._sendSpans=function(e,t){var n,a;try{for(var i=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],a=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&a>=e.length&&(e=void 0),{value:e&&e[a++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(e),o=i.next();!o.done;o=i.next()){var s=o.value;console.dir(this._exportInfo(s),{depth:3})}}catch(e){n={error:e}}finally{try{o&&!o.done&&(a=i.return)&&a.call(i)}finally{if(n)throw n.error}}if(t)return t({code:r.ExportResultCode.SUCCESS})},e}(),U=function(){function e(){this._finishedSpans=[],this._stopped=!1}return e.prototype.export=function(e,t){var n;if(this._stopped)return t({code:r.ExportResultCode.FAILED,error:new Error("Exporter has been stopped")});(n=this._finishedSpans).push.apply(n,function(e,t,n){if(n||2===arguments.length)for(var a,i=0,r=t.length;i0)&&!(a=r.next()).done;)o.push(a.value)}catch(e){i={error:e}}finally{try{a&&!a.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}return o}(e),!1)),setTimeout((function(){return t({code:r.ExportResultCode.SUCCESS})}),0)},e.prototype.shutdown=function(){return this._stopped=!0,this._finishedSpans=[],Promise.resolve()},e.prototype.reset=function(){this._finishedSpans=[]},e.prototype.getFinishedSpans=function(){return this._finishedSpans},e}(),B=function(){function e(e){this._exporter=e,this._shutdownOnce=new r.BindOnceFuture(this._shutdown,this)}return e.prototype.forceFlush=function(){return Promise.resolve()},e.prototype.onStart=function(e,t){},e.prototype.onEnd=function(e){var t=this;this._shutdownOnce.isCalled||0!=(e.spanContext().traceFlags&i.TraceFlags.SAMPLED)&&i.context.with((0,r.suppressTracing)(i.context.active()),(function(){t._exporter.export([e],(function(e){var t;e.code!==r.ExportResultCode.SUCCESS&&(0,r.globalErrorHandler)(null!==(t=e.error)&&void 0!==t?t:new Error("SimpleSpanProcessor: span export failed (status "+e+")"))}))}))},e.prototype.shutdown=function(){return this._shutdownOnce.call()},e.prototype._shutdown=function(){return this._exporter.shutdown()},e}()},11871:(e,t,n)=>{"use strict";n.r(t),n.d(t,{AwsEcsLaunchtypeValues:()=>E,CloudPlatformValues:()=>b,CloudProviderValues:()=>v,DbCassandraConsistencyLevelValues:()=>r,DbSystemValues:()=>i,FaasDocumentOperationValues:()=>s,FaasInvokedProviderValues:()=>l,FaasTriggerValues:()=>o,HostArchValues:()=>S,HttpFlavorValues:()=>u,MessageTypeValues:()=>g,MessagingDestinationKindValues:()=>m,MessagingOperationValues:()=>h,NetHostConnectionSubtypeValues:()=>d,NetHostConnectionTypeValues:()=>p,NetTransportValues:()=>c,OsTypeValues:()=>y,RpcGrpcStatusCodeValues:()=>_,SemanticAttributes:()=>a,SemanticResourceAttributes:()=>f,TelemetrySdkLanguageValues:()=>T});var a={AWS_LAMBDA_INVOKED_ARN:"aws.lambda.invoked_arn",DB_SYSTEM:"db.system",DB_CONNECTION_STRING:"db.connection_string",DB_USER:"db.user",DB_JDBC_DRIVER_CLASSNAME:"db.jdbc.driver_classname",DB_NAME:"db.name",DB_STATEMENT:"db.statement",DB_OPERATION:"db.operation",DB_MSSQL_INSTANCE_NAME:"db.mssql.instance_name",DB_CASSANDRA_KEYSPACE:"db.cassandra.keyspace",DB_CASSANDRA_PAGE_SIZE:"db.cassandra.page_size",DB_CASSANDRA_CONSISTENCY_LEVEL:"db.cassandra.consistency_level",DB_CASSANDRA_TABLE:"db.cassandra.table",DB_CASSANDRA_IDEMPOTENCE:"db.cassandra.idempotence",DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT:"db.cassandra.speculative_execution_count",DB_CASSANDRA_COORDINATOR_ID:"db.cassandra.coordinator.id",DB_CASSANDRA_COORDINATOR_DC:"db.cassandra.coordinator.dc",DB_HBASE_NAMESPACE:"db.hbase.namespace",DB_REDIS_DATABASE_INDEX:"db.redis.database_index",DB_MONGODB_COLLECTION:"db.mongodb.collection",DB_SQL_TABLE:"db.sql.table",EXCEPTION_TYPE:"exception.type",EXCEPTION_MESSAGE:"exception.message",EXCEPTION_STACKTRACE:"exception.stacktrace",EXCEPTION_ESCAPED:"exception.escaped",FAAS_TRIGGER:"faas.trigger",FAAS_EXECUTION:"faas.execution",FAAS_DOCUMENT_COLLECTION:"faas.document.collection",FAAS_DOCUMENT_OPERATION:"faas.document.operation",FAAS_DOCUMENT_TIME:"faas.document.time",FAAS_DOCUMENT_NAME:"faas.document.name",FAAS_TIME:"faas.time",FAAS_CRON:"faas.cron",FAAS_COLDSTART:"faas.coldstart",FAAS_INVOKED_NAME:"faas.invoked_name",FAAS_INVOKED_PROVIDER:"faas.invoked_provider",FAAS_INVOKED_REGION:"faas.invoked_region",NET_TRANSPORT:"net.transport",NET_PEER_IP:"net.peer.ip",NET_PEER_PORT:"net.peer.port",NET_PEER_NAME:"net.peer.name",NET_HOST_IP:"net.host.ip",NET_HOST_PORT:"net.host.port",NET_HOST_NAME:"net.host.name",NET_HOST_CONNECTION_TYPE:"net.host.connection.type",NET_HOST_CONNECTION_SUBTYPE:"net.host.connection.subtype",NET_HOST_CARRIER_NAME:"net.host.carrier.name",NET_HOST_CARRIER_MCC:"net.host.carrier.mcc",NET_HOST_CARRIER_MNC:"net.host.carrier.mnc",NET_HOST_CARRIER_ICC:"net.host.carrier.icc",PEER_SERVICE:"peer.service",ENDUSER_ID:"enduser.id",ENDUSER_ROLE:"enduser.role",ENDUSER_SCOPE:"enduser.scope",THREAD_ID:"thread.id",THREAD_NAME:"thread.name",CODE_FUNCTION:"code.function",CODE_NAMESPACE:"code.namespace",CODE_FILEPATH:"code.filepath",CODE_LINENO:"code.lineno",HTTP_METHOD:"http.method",HTTP_URL:"http.url",HTTP_TARGET:"http.target",HTTP_HOST:"http.host",HTTP_SCHEME:"http.scheme",HTTP_STATUS_CODE:"http.status_code",HTTP_FLAVOR:"http.flavor",HTTP_USER_AGENT:"http.user_agent",HTTP_REQUEST_CONTENT_LENGTH:"http.request_content_length",HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED:"http.request_content_length_uncompressed",HTTP_RESPONSE_CONTENT_LENGTH:"http.response_content_length",HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED:"http.response_content_length_uncompressed",HTTP_SERVER_NAME:"http.server_name",HTTP_ROUTE:"http.route",HTTP_CLIENT_IP:"http.client_ip",AWS_DYNAMODB_TABLE_NAMES:"aws.dynamodb.table_names",AWS_DYNAMODB_CONSUMED_CAPACITY:"aws.dynamodb.consumed_capacity",AWS_DYNAMODB_ITEM_COLLECTION_METRICS:"aws.dynamodb.item_collection_metrics",AWS_DYNAMODB_PROVISIONED_READ_CAPACITY:"aws.dynamodb.provisioned_read_capacity",AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY:"aws.dynamodb.provisioned_write_capacity",AWS_DYNAMODB_CONSISTENT_READ:"aws.dynamodb.consistent_read",AWS_DYNAMODB_PROJECTION:"aws.dynamodb.projection",AWS_DYNAMODB_LIMIT:"aws.dynamodb.limit",AWS_DYNAMODB_ATTRIBUTES_TO_GET:"aws.dynamodb.attributes_to_get",AWS_DYNAMODB_INDEX_NAME:"aws.dynamodb.index_name",AWS_DYNAMODB_SELECT:"aws.dynamodb.select",AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES:"aws.dynamodb.global_secondary_indexes",AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES:"aws.dynamodb.local_secondary_indexes",AWS_DYNAMODB_EXCLUSIVE_START_TABLE:"aws.dynamodb.exclusive_start_table",AWS_DYNAMODB_TABLE_COUNT:"aws.dynamodb.table_count",AWS_DYNAMODB_SCAN_FORWARD:"aws.dynamodb.scan_forward",AWS_DYNAMODB_SEGMENT:"aws.dynamodb.segment",AWS_DYNAMODB_TOTAL_SEGMENTS:"aws.dynamodb.total_segments",AWS_DYNAMODB_COUNT:"aws.dynamodb.count",AWS_DYNAMODB_SCANNED_COUNT:"aws.dynamodb.scanned_count",AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS:"aws.dynamodb.attribute_definitions",AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES:"aws.dynamodb.global_secondary_index_updates",MESSAGING_SYSTEM:"messaging.system",MESSAGING_DESTINATION:"messaging.destination",MESSAGING_DESTINATION_KIND:"messaging.destination_kind",MESSAGING_TEMP_DESTINATION:"messaging.temp_destination",MESSAGING_PROTOCOL:"messaging.protocol",MESSAGING_PROTOCOL_VERSION:"messaging.protocol_version",MESSAGING_URL:"messaging.url",MESSAGING_MESSAGE_ID:"messaging.message_id",MESSAGING_CONVERSATION_ID:"messaging.conversation_id",MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES:"messaging.message_payload_size_bytes",MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES:"messaging.message_payload_compressed_size_bytes",MESSAGING_OPERATION:"messaging.operation",MESSAGING_CONSUMER_ID:"messaging.consumer_id",MESSAGING_RABBITMQ_ROUTING_KEY:"messaging.rabbitmq.routing_key",MESSAGING_KAFKA_MESSAGE_KEY:"messaging.kafka.message_key",MESSAGING_KAFKA_CONSUMER_GROUP:"messaging.kafka.consumer_group",MESSAGING_KAFKA_CLIENT_ID:"messaging.kafka.client_id",MESSAGING_KAFKA_PARTITION:"messaging.kafka.partition",MESSAGING_KAFKA_TOMBSTONE:"messaging.kafka.tombstone",RPC_SYSTEM:"rpc.system",RPC_SERVICE:"rpc.service",RPC_METHOD:"rpc.method",RPC_GRPC_STATUS_CODE:"rpc.grpc.status_code",RPC_JSONRPC_VERSION:"rpc.jsonrpc.version",RPC_JSONRPC_REQUEST_ID:"rpc.jsonrpc.request_id",RPC_JSONRPC_ERROR_CODE:"rpc.jsonrpc.error_code",RPC_JSONRPC_ERROR_MESSAGE:"rpc.jsonrpc.error_message",MESSAGE_TYPE:"message.type",MESSAGE_ID:"message.id",MESSAGE_COMPRESSED_SIZE:"message.compressed_size",MESSAGE_UNCOMPRESSED_SIZE:"message.uncompressed_size"},i={OTHER_SQL:"other_sql",MSSQL:"mssql",MYSQL:"mysql",ORACLE:"oracle",DB2:"db2",POSTGRESQL:"postgresql",REDSHIFT:"redshift",HIVE:"hive",CLOUDSCAPE:"cloudscape",HSQLDB:"hsqldb",PROGRESS:"progress",MAXDB:"maxdb",HANADB:"hanadb",INGRES:"ingres",FIRSTSQL:"firstsql",EDB:"edb",CACHE:"cache",ADABAS:"adabas",FIREBIRD:"firebird",DERBY:"derby",FILEMAKER:"filemaker",INFORMIX:"informix",INSTANTDB:"instantdb",INTERBASE:"interbase",MARIADB:"mariadb",NETEZZA:"netezza",PERVASIVE:"pervasive",POINTBASE:"pointbase",SQLITE:"sqlite",SYBASE:"sybase",TERADATA:"teradata",VERTICA:"vertica",H2:"h2",COLDFUSION:"coldfusion",CASSANDRA:"cassandra",HBASE:"hbase",MONGODB:"mongodb",REDIS:"redis",COUCHBASE:"couchbase",COUCHDB:"couchdb",COSMOSDB:"cosmosdb",DYNAMODB:"dynamodb",NEO4J:"neo4j",GEODE:"geode",ELASTICSEARCH:"elasticsearch",MEMCACHED:"memcached",COCKROACHDB:"cockroachdb"},r={ALL:"all",EACH_QUORUM:"each_quorum",QUORUM:"quorum",LOCAL_QUORUM:"local_quorum",ONE:"one",TWO:"two",THREE:"three",LOCAL_ONE:"local_one",ANY:"any",SERIAL:"serial",LOCAL_SERIAL:"local_serial"},o={DATASOURCE:"datasource",HTTP:"http",PUBSUB:"pubsub",TIMER:"timer",OTHER:"other"},s={INSERT:"insert",EDIT:"edit",DELETE:"delete"},l={ALIBABA_CLOUD:"alibaba_cloud",AWS:"aws",AZURE:"azure",GCP:"gcp"},c={IP_TCP:"ip_tcp",IP_UDP:"ip_udp",IP:"ip",UNIX:"unix",PIPE:"pipe",INPROC:"inproc",OTHER:"other"},p={WIFI:"wifi",WIRED:"wired",CELL:"cell",UNAVAILABLE:"unavailable",UNKNOWN:"unknown"},d={GPRS:"gprs",EDGE:"edge",UMTS:"umts",CDMA:"cdma",EVDO_0:"evdo_0",EVDO_A:"evdo_a",CDMA2000_1XRTT:"cdma2000_1xrtt",HSDPA:"hsdpa",HSUPA:"hsupa",HSPA:"hspa",IDEN:"iden",EVDO_B:"evdo_b",LTE:"lte",EHRPD:"ehrpd",HSPAP:"hspap",GSM:"gsm",TD_SCDMA:"td_scdma",IWLAN:"iwlan",NR:"nr",NRNSA:"nrnsa",LTE_CA:"lte_ca"},u={HTTP_1_0:"1.0",HTTP_1_1:"1.1",HTTP_2_0:"2.0",SPDY:"SPDY",QUIC:"QUIC"},m={QUEUE:"queue",TOPIC:"topic"},h={RECEIVE:"receive",PROCESS:"process"},_={OK:0,CANCELLED:1,UNKNOWN:2,INVALID_ARGUMENT:3,DEADLINE_EXCEEDED:4,NOT_FOUND:5,ALREADY_EXISTS:6,PERMISSION_DENIED:7,RESOURCE_EXHAUSTED:8,FAILED_PRECONDITION:9,ABORTED:10,OUT_OF_RANGE:11,UNIMPLEMENTED:12,INTERNAL:13,UNAVAILABLE:14,DATA_LOSS:15,UNAUTHENTICATED:16},g={SENT:"SENT",RECEIVED:"RECEIVED"},f={CLOUD_PROVIDER:"cloud.provider",CLOUD_ACCOUNT_ID:"cloud.account.id",CLOUD_REGION:"cloud.region",CLOUD_AVAILABILITY_ZONE:"cloud.availability_zone",CLOUD_PLATFORM:"cloud.platform",AWS_ECS_CONTAINER_ARN:"aws.ecs.container.arn",AWS_ECS_CLUSTER_ARN:"aws.ecs.cluster.arn",AWS_ECS_LAUNCHTYPE:"aws.ecs.launchtype",AWS_ECS_TASK_ARN:"aws.ecs.task.arn",AWS_ECS_TASK_FAMILY:"aws.ecs.task.family",AWS_ECS_TASK_REVISION:"aws.ecs.task.revision",AWS_EKS_CLUSTER_ARN:"aws.eks.cluster.arn",AWS_LOG_GROUP_NAMES:"aws.log.group.names",AWS_LOG_GROUP_ARNS:"aws.log.group.arns",AWS_LOG_STREAM_NAMES:"aws.log.stream.names",AWS_LOG_STREAM_ARNS:"aws.log.stream.arns",CONTAINER_NAME:"container.name",CONTAINER_ID:"container.id",CONTAINER_RUNTIME:"container.runtime",CONTAINER_IMAGE_NAME:"container.image.name",CONTAINER_IMAGE_TAG:"container.image.tag",DEPLOYMENT_ENVIRONMENT:"deployment.environment",DEVICE_ID:"device.id",DEVICE_MODEL_IDENTIFIER:"device.model.identifier",DEVICE_MODEL_NAME:"device.model.name",FAAS_NAME:"faas.name",FAAS_ID:"faas.id",FAAS_VERSION:"faas.version",FAAS_INSTANCE:"faas.instance",FAAS_MAX_MEMORY:"faas.max_memory",HOST_ID:"host.id",HOST_NAME:"host.name",HOST_TYPE:"host.type",HOST_ARCH:"host.arch",HOST_IMAGE_NAME:"host.image.name",HOST_IMAGE_ID:"host.image.id",HOST_IMAGE_VERSION:"host.image.version",K8S_CLUSTER_NAME:"k8s.cluster.name",K8S_NODE_NAME:"k8s.node.name",K8S_NODE_UID:"k8s.node.uid",K8S_NAMESPACE_NAME:"k8s.namespace.name",K8S_POD_UID:"k8s.pod.uid",K8S_POD_NAME:"k8s.pod.name",K8S_CONTAINER_NAME:"k8s.container.name",K8S_REPLICASET_UID:"k8s.replicaset.uid",K8S_REPLICASET_NAME:"k8s.replicaset.name",K8S_DEPLOYMENT_UID:"k8s.deployment.uid",K8S_DEPLOYMENT_NAME:"k8s.deployment.name",K8S_STATEFULSET_UID:"k8s.statefulset.uid",K8S_STATEFULSET_NAME:"k8s.statefulset.name",K8S_DAEMONSET_UID:"k8s.daemonset.uid",K8S_DAEMONSET_NAME:"k8s.daemonset.name",K8S_JOB_UID:"k8s.job.uid",K8S_JOB_NAME:"k8s.job.name",K8S_CRONJOB_UID:"k8s.cronjob.uid",K8S_CRONJOB_NAME:"k8s.cronjob.name",OS_TYPE:"os.type",OS_DESCRIPTION:"os.description",OS_NAME:"os.name",OS_VERSION:"os.version",PROCESS_PID:"process.pid",PROCESS_EXECUTABLE_NAME:"process.executable.name",PROCESS_EXECUTABLE_PATH:"process.executable.path",PROCESS_COMMAND:"process.command",PROCESS_COMMAND_LINE:"process.command_line",PROCESS_COMMAND_ARGS:"process.command_args",PROCESS_OWNER:"process.owner",PROCESS_RUNTIME_NAME:"process.runtime.name",PROCESS_RUNTIME_VERSION:"process.runtime.version",PROCESS_RUNTIME_DESCRIPTION:"process.runtime.description",SERVICE_NAME:"service.name",SERVICE_NAMESPACE:"service.namespace",SERVICE_INSTANCE_ID:"service.instance.id",SERVICE_VERSION:"service.version",TELEMETRY_SDK_NAME:"telemetry.sdk.name",TELEMETRY_SDK_LANGUAGE:"telemetry.sdk.language",TELEMETRY_SDK_VERSION:"telemetry.sdk.version",TELEMETRY_AUTO_VERSION:"telemetry.auto.version",WEBENGINE_NAME:"webengine.name",WEBENGINE_VERSION:"webengine.version",WEBENGINE_DESCRIPTION:"webengine.description"},v={ALIBABA_CLOUD:"alibaba_cloud",AWS:"aws",AZURE:"azure",GCP:"gcp"},b={ALIBABA_CLOUD_ECS:"alibaba_cloud_ecs",ALIBABA_CLOUD_FC:"alibaba_cloud_fc",AWS_EC2:"aws_ec2",AWS_ECS:"aws_ecs",AWS_EKS:"aws_eks",AWS_LAMBDA:"aws_lambda",AWS_ELASTIC_BEANSTALK:"aws_elastic_beanstalk",AZURE_VM:"azure_vm",AZURE_CONTAINER_INSTANCES:"azure_container_instances",AZURE_AKS:"azure_aks",AZURE_FUNCTIONS:"azure_functions",AZURE_APP_SERVICE:"azure_app_service",GCP_COMPUTE_ENGINE:"gcp_compute_engine",GCP_CLOUD_RUN:"gcp_cloud_run",GCP_KUBERNETES_ENGINE:"gcp_kubernetes_engine",GCP_CLOUD_FUNCTIONS:"gcp_cloud_functions",GCP_APP_ENGINE:"gcp_app_engine"},E={EC2:"ec2",FARGATE:"fargate"},S={AMD64:"amd64",ARM32:"arm32",ARM64:"arm64",IA64:"ia64",PPC32:"ppc32",PPC64:"ppc64",X86:"x86"},y={WINDOWS:"windows",LINUX:"linux",DARWIN:"darwin",FREEBSD:"freebsd",NETBSD:"netbsd",OPENBSD:"openbsd",DRAGONFLYBSD:"dragonflybsd",HPUX:"hpux",AIX:"aix",SOLARIS:"solaris",Z_OS:"z_os"},T={CPP:"cpp",DOTNET:"dotnet",ERLANG:"erlang",GO:"go",JAVA:"java",NODEJS:"nodejs",PHP:"php",PYTHON:"python",RUBY:"ruby",WEBJS:"webjs"}},40725:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,i)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.oneDataSystemClientFactory=void 0,t.oneDataSystemClientFactory=async(e,t,a)=>{const i=await(async(e,t,a)=>{const i=await Promise.resolve().then((()=>r(n(67164)))),o=await Promise.resolve().then((()=>r(n(71488)))),s=new i.AppInsightsCore,l=new o.PostChannel,c={instrumentationKey:e,endpointUrl:"https://mobile.events.data.microsoft.com/OneCollector/1.0",loggingLevelTelemetry:0,loggingLevelConsole:0,disableCookiesUsage:!0,disableDbgExt:!0,disableInstrumentationKeyValidation:!0,channels:[[l]]};if(a){c.extensionConfig={};const e={alwaysUseXhrOverride:!0,httpXHROverride:a};c.extensionConfig[l.identifier]=e}const p=t.workspace.getConfiguration("telemetry").get("internalTesting");return s.initialize(c,[]),s.addTelemetryInitializer((e=>{p&&(e.ext=e.ext??{},e.ext.utc=e.ext.utc??{},e.ext.utc.flags=8462029)})),s})(e,t,a);return{logEvent:(e,t)=>{try{i?.track({name:e,baseData:{name:e,properties:t?.properties,measurements:t?.measurements}})}catch(e){throw new Error("Failed to log event to app insights!\n"+e.message)}},flush:async()=>{try{i?.unload()}catch(e){throw new Error("Failed to flush app insights!\n"+e.message)}}}}},39911:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.BaseTelemetryAppender=void 0,function(e){e[e.NOT_INSTANTIATED=0]="NOT_INSTANTIATED",e[e.INSTANTIATING=1]="INSTANTIATING",e[e.INSTANTIATED=2]="INSTANTIATED"}(n||(n={})),t.BaseTelemetryAppender=class{constructor(e,t,a){this.osShim=a,this._instantiationStatus=n.NOT_INSTANTIATED,this._eventQueue=[],this._exceptionQueue=[],this.ignoreBuiltInCommonProperties=!1,this._clientFactory=t,this._key=e}get additionalCommonProperties(){return{"common.os":this.osShim.platform,"common.nodeArch":this.osShim.architecture,"common.platformversion":(this.osShim.release||"").replace(/^(\d+)(\.\d+)?(\.\d+)?(.*)/,"$1$2$3"),"common.telemetryclientversion":"0.7.1-preview"}}logEvent(e,t){this._telemetryClient?this._telemetryClient.logEvent(e,t):this._instantiationStatus!==n.INSTANTIATED&&this._eventQueue.push({eventName:e,data:t})}logException(e,t){this._telemetryClient||this._instantiationStatus!==n.INSTANTIATED&&this._exceptionQueue.push({exception:e,data:t})}async flush(){this._telemetryClient&&(await this._telemetryClient.flush(),this._telemetryClient=void 0)}_flushQueues(){this._eventQueue.forEach((({eventName:e,data:t})=>this.logEvent(e,t))),this._eventQueue=[],this._exceptionQueue.forEach((({exception:e,data:t})=>this.logException(e,t))),this._exceptionQueue=[]}instantiateAppender(){this._instantiationStatus===n.NOT_INSTANTIATED&&(this._instantiationStatus=n.INSTANTIATING,this._clientFactory(this._key).then((e=>{this._telemetryClient=e,this._instantiationStatus=n.INSTANTIATED,this._flushQueues()})).catch((e=>{console.error(e),this._instantiationStatus=n.INSTANTIATED})))}}},33456:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseTelemetryReporter=void 0,t.BaseTelemetryReporter=class{constructor(e,t){this.telemetryAppender=e,this.vscodeAPI=t,this.userOptIn=!1,this.errorOptIn=!1,this.disposables=[],this.telemetryLogger=this.vscodeAPI.env.createTelemetryLogger(this.telemetryAppender),this.updateUserOptIn(),this.telemetryLogger.onDidChangeEnableStates((()=>{this.updateUserOptIn()}))}updateUserOptIn(){this.errorOptIn=this.telemetryLogger.isErrorsEnabled,this.userOptIn=this.telemetryLogger.isUsageEnabled,(this.telemetryLogger.isErrorsEnabled||this.telemetryLogger.isUsageEnabled)&&this.telemetryAppender.instantiateAppender()}get telemetryLevel(){return this.errorOptIn&&this.userOptIn?"all":this.errorOptIn?"error":"off"}internalSendTelemetryEvent(e,t,n,a){a?this.telemetryAppender.logEvent(e,{properties:t,measurements:n}):this.telemetryLogger.logUsage(e,{properties:t,measurements:n})}sendTelemetryEvent(e,t,n){this.internalSendTelemetryEvent(e,t,n,!1)}sendDangerousTelemetryEvent(e,t,n){this.telemetryAppender.instantiateAppender(),this.internalSendTelemetryEvent(e,t,n,!0)}internalSendTelemetryErrorEvent(e,t,n,a){a?this.telemetryAppender.logEvent(e,{properties:t,measurements:n}):this.telemetryLogger.logError(e,{properties:t,measurements:n})}sendTelemetryErrorEvent(e,t,n){this.internalSendTelemetryErrorEvent(e,t,n,!1)}sendDangerousTelemetryErrorEvent(e,t,n){this.telemetryAppender.instantiateAppender(),this.internalSendTelemetryErrorEvent(e,t,n,!0)}internalSendTelemetryException(e,t,n,a){a?this.telemetryAppender.logException(e,{properties:t,measurements:n}):this.telemetryLogger.logError(e,{properties:t,measurements:n})}sendTelemetryException(e,t,n){this.internalSendTelemetryException(e,t,n,!1)}sendDangerousTelemetryException(e,t,n){this.telemetryAppender.instantiateAppender(),this.internalSendTelemetryException(e,t,n,!0)}dispose(){return this.telemetryLogger.dispose(),Promise.all(this.disposables.map((e=>e.dispose())))}}},95888:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TelemetryUtil=void 0;class n{static applyReplacements(e,t){for(const n of Object.keys(e))for(const a of t)a.lookup.test(n)&&(void 0!==a.replacementString?e[n]=a.replacementString:delete e[n])}static shouldUseOneDataSystemSDK(e){return 74===e.length&&"-"===e[32]&&"-"===e[41]&&"-"===e[46]&&"-"===e[51]&&"-"===e[56]&&"-"===e[69]}static getInstance(){return n._instance||(n._instance=new n),n._instance}}t.TelemetryUtil=n},92291:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,i)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});const o=r(n(12087)),s=r(n(37549)),l=r(n(57211)),c=n(33456),p=n(39911),d=n(95888),u=n(40725);class m extends c.BaseTelemetryReporter{constructor(e,t){let a=e=>(async(e,t)=>{let a;try{process.env.APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL="1";const t=await Promise.resolve().then((()=>r(n(9574))));t.defaultClient?(a=new t.TelemetryClient(e),a.channel.setUseDiskRetryCaching(!0)):(t.setup(e).setAutoCollectRequests(!1).setAutoCollectPerformance(!1).setAutoCollectExceptions(!1).setAutoCollectDependencies(!1).setAutoDependencyCorrelation(!1).setAutoCollectConsole(!1).setAutoCollectHeartbeat(!1).setUseDiskRetryCaching(!0).start(),a=t.defaultClient),s&&s.env&&(a.context.tags[a.context.keys.userId]=s.env.machineId,a.context.tags[a.context.keys.sessionId]=s.env.sessionId,a.context.tags[a.context.keys.cloudRole]=s.env.appName,a.context.tags[a.context.keys.cloudRoleInstance]=s.env.appName)}catch(e){return Promise.reject("Failed to initialize app insights!\n"+e.message)}return t?.length&&function(e,t){e.addTelemetryProcessor((e=>(Array.isArray(e.tags)?e.tags.forEach((e=>d.TelemetryUtil.applyReplacements(e,t))):e.tags&&d.TelemetryUtil.applyReplacements(e.tags,t),e.data.baseData&&d.TelemetryUtil.applyReplacements(e.data.baseData,t),!0)))}(a,t),{logEvent:(e,t)=>{try{a?.trackEvent({name:e,properties:t?.properties,measurements:t?.measurements})}catch(e){throw new Error("Failed to log event to app insights!\n"+e.message)}},flush:async()=>{try{a?.flush()}catch(e){throw new Error("Failed to flush app insights!\n"+e.message)}}}})(e,t);d.TelemetryUtil.shouldUseOneDataSystemSDK(e)&&(a=e=>(0,u.oneDataSystemClientFactory)(e,s,{sendPOST:(e,t)=>{const n={method:"POST",headers:{...e.headers,"Content-Type":"application/json","Content-Length":Buffer.byteLength(e.data)}};try{const a=l.request(e.urlString,n,(e=>{e.on("data",(function(n){t(e.statusCode??200,e.headers,n.toString())})),e.on("error",(function(){t(0,{})}))}));a.write(e.data),a.end()}catch{t(0,{})}}}));const i=new p.BaseTelemetryAppender(e,a,{release:o.release(),platform:o.platform(),architecture:o.arch()});if(e&&0===e.indexOf("AIF-"))throw new Error("AIF keys are no longer supported. Please switch to 1DS keys for 1st party extensions");super(i,s)}}t.default=m},20699:function(e,t,n){"use strict";var a=this&&this.__assign||function(){return(a=Object.assign||function(e){for(var t,n=1,a=arguments.length;n{"use strict";var a=n(87396),i=function(){function e(t){if(e.INSTANCE)throw new Error("Console logging adapter tracking should be configured from the applicationInsights object");this._client=t,e.INSTANCE=this}return e.prototype.enable=function(e,t){a.IsInitialized&&(n(14309).wp(e&&t,this._client),n(35823).wp(e,this._client),n(30454).wp(e,this._client))},e.prototype.isInitialized=function(){return this._isInitialized},e.prototype.dispose=function(){e.INSTANCE=null,this.enable(!1,!1)},e._methodNames=["debug","info","log","warn","error"],e}();e.exports=i},70894:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CorrelationContextManager=void 0;var a=n(95282),i=n(87396),r=n(58090),o=n(10420),s=n(86694),l=n(25740),c=function(){function e(){}return e.getCurrentContext=function(){if(!e.enabled)return null;var t=e.session.get(e.CONTEXT_NAME);return void 0===t?null:t},e.generateContextObject=function(e,t,n,a,i,r){return t=t||e,this.enabled?{operation:{name:n,id:e,parentId:t,traceparent:i,tracestate:r},customProperties:new p(a)}:null},e.spanToContextObject=function(t,n,a){var i=new r;return i.traceId=t.traceId,i.spanId=t.spanId,i.traceFlag=r.formatOpenTelemetryTraceFlags(t.traceFlags)||r.DEFAULT_TRACE_FLAG,i.parentId=n,e.generateContextObject(i.traceId,i.parentId,a,null,i)},e.runWithContext=function(t,n){var i;if(e.enabled)try{return e.session.bind(n,((i={})[e.CONTEXT_NAME]=t,i))()}catch(e){a.warn("Error binding to session context",l.dumpObj(e))}return n()},e.wrapEmitter=function(t){if(e.enabled)try{e.session.bindEmitter(t)}catch(e){a.warn("Error binding to session context",l.dumpObj(e))}},e.wrapCallback=function(t,n){var i;if(e.enabled)try{return e.session.bind(t,n?((i={})[e.CONTEXT_NAME]=n,i):void 0)}catch(e){a.warn("Error binding to session context",l.dumpObj(e))}return t},e.enable=function(t){this.enabled||(this.isNodeVersionCompatible()?(e.hasEverEnabled||(this.forceClsHooked=t,this.hasEverEnabled=!0,void 0===this.cls&&(!0===e.forceClsHooked||void 0===e.forceClsHooked&&e.shouldUseClsHooked()?this.cls=n(39562):this.cls=n(13057)),e.session=this.cls.createNamespace("AI-CLS-Session"),i.registerContextPreservation((function(t){try{return e.session.bind(t)}catch(e){a.warn("Error binding to session context",l.dumpObj(e))}}))),this.enabled=!0):this.enabled=!1)},e.startOperation=function(t,n){var i=t&&t.traceContext||null,l=t&&t.spanContext?t:null,c=t&&t.traceId?t:null,p=t&&t.headers;if(l)return this.spanToContextObject(l.spanContext(),l.parentSpanId,l.name);if(c)return this.spanToContextObject(c,"|"+c.traceId+"."+c.spanId+".","string"==typeof n?n:"");if(i){var d=null,u=null;n.headers&&(n.headers.traceparent?d=new r(n.headers.traceparent):n.headers["request-id"]&&(d=new r(null,n.headers["request-id"])),n.headers.tracestate&&(u=new o(n.headers.tracestate))),d||(d=new r(i.traceparent)),u||(u=new o(i.tracestate));var m="object"==typeof n?new s(n):null;return e.generateContextObject(d.traceId,d.parentId,"string"==typeof n?n:m.getOperationName({}),m&&m.getCorrelationContextHeader()||void 0,d,u)}return p?(d=new r(p.traceparent?p.traceparent.toString():null),u=new o(p.tracestate?p.tracestate.toString():null),m=new s(t),e.generateContextObject(d.traceId,d.parentId,m.getOperationName({}),m.getCorrelationContextHeader(),d,u)):(a.warn("startOperation was called with invalid arguments",arguments),null)},e.disable=function(){this.enabled=!1},e.reset=function(){e.hasEverEnabled&&(e.session=null,e.session=this.cls.createNamespace("AI-CLS-Session"))},e.isNodeVersionCompatible=function(){var e=process.versions.node.split(".");return parseInt(e[0])>3||parseInt(e[0])>2&&parseInt(e[1])>2},e.shouldUseClsHooked=function(){var e=process.versions.node.split(".");return parseInt(e[0])>8||parseInt(e[0])>=8&&parseInt(e[1])>=2},e.canUseClsHooked=function(){var e=process.versions.node.split("."),t=parseInt(e[0])>8||parseInt(e[0])>=8&&parseInt(e[1])>=0,n=parseInt(e[0])<8||parseInt(e[0])<=8&&parseInt(e[1])<2,a=parseInt(e[0])>4||parseInt(e[0])>=4&&parseInt(e[1])>=7;return!(t&&n)&&a},e.enabled=!1,e.hasEverEnabled=!1,e.forceClsHooked=void 0,e.CONTEXT_NAME="ApplicationInsights-Context",e}();t.CorrelationContextManager=c;var p=function(){function e(e){this.props=[],this.addHeaderData(e)}return e.prototype.addHeaderData=function(e){var t=e?e.split(", "):[];this.props=t.map((function(e){var t=e.split("=");return{key:t[0],value:t[1]}})).concat(this.props)},e.prototype.serializeToHeader=function(){return this.props.map((function(e){return e.key+"="+e.value})).join(", ")},e.prototype.getProperty=function(e){for(var t=0;t0&&e.forEach((function(e){var n=e.name;if(void 0!==n){var a=e.value;switch(typeof a){case"function":case"object":break;case"string":t+=" "+n+': "'+a+'",\r\n';break;default:t+=" "+n+": "+a+",\r\n"}}}))}catch(e){this._isEnabled=!1,o.info("Parse client web instrumentation error. Web Instrumentation is disabled")}return t},e.prototype._initialize=function(){this._isInitialized=!0;var t=a.createServer,n=i.createServer,r=this._isEnabled;a.createServer=function(n){var a=n;return a&&(n=function(t,n){var i=n.write,l="GET"==t.method;n.write=function(t,a,c){try{if(r&&l){var p=s.getContentEncodingFromHeaders(n),d=void 0;if("string"==typeof a&&(d=a),null==p)e.INSTANCE.ValidateInjection(n,t)&&(arguments[0]=e.INSTANCE.InjectWebSnippet(n,t,void 0,d));else if(p.length){var u=p[0];arguments[0]=e.INSTANCE.InjectWebSnippet(n,t,u)}}}catch(e){o.warn("Inject snippet error: "+e)}return i.apply(n,arguments)};var c=n.end;return n.end=function(t,a,i){if(r&&l)try{if(r&&l){var p=s.getContentEncodingFromHeaders(n),d=void 0;if("string"==typeof a&&(d=a),null==p)e.INSTANCE.ValidateInjection(n,t)&&(arguments[0]=e.INSTANCE.InjectWebSnippet(n,t,void 0,d));else if(p.length){var u=p[0];arguments[0]=e.INSTANCE.InjectWebSnippet(n,t,u)}}}catch(e){o.warn("Inject snipet error: "+e)}return c.apply(n,arguments)},a(t,n)}),t(n)},i.createServer=function(t,a){var i=a;if(i)return n(t,a=function(t,n){var a="GET"==t.method,l=n.write,c=n.end;return n.write=function(t,i,c){try{if(r&&a){var p=s.getContentEncodingFromHeaders(n),d=void 0;if("string"==typeof i&&(d=i),null==p)e.INSTANCE.ValidateInjection(n,t)&&(arguments[0]=this.InjectWebSnippet(n,t,void 0,d));else if(p.length){var u=p[0];arguments[0]=e.INSTANCE.InjectWebSnippet(n,t,u)}}}catch(e){o.warn("Inject snippet error: "+e)}return l.apply(n,arguments)},n.end=function(t,i,l){try{if(r&&a){var p=s.getContentEncodingFromHeaders(n),d=void 0;if("string"==typeof i&&(d=i),null==p)e.INSTANCE.ValidateInjection(n,t)&&(arguments[0]=e.INSTANCE.InjectWebSnippet(n,t,void 0,d));else if(p.length){var u=p[0];arguments[0]=e.INSTANCE.InjectWebSnippet(n,t,u)}}}catch(e){o.warn("Inject snippet error: "+e)}return c.apply(n,arguments)},i(t,n)})}},e.prototype.ValidateInjection=function(t,n){try{if(!t||!n||200!=t.statusCode)return!1;if(!s.isContentTypeHeaderHtml(t))return!1;var a=n.slice().toString();if(a.indexOf("")>=0&&a.indexOf("")>=0&&a.indexOf(e._aiUrl)<0&&a.indexOf(e._aiDeprecatedUrl)<0)return!0}catch(e){o.info("validate injections error: "+e)}return!1},e.prototype.InjectWebSnippet=function(t,n,a,i){try{if(a)t.removeHeader("Content-Length"),n=this._getInjectedCompressBuffer(t,n,a),t.setHeader("Content-Length",n.length);else{var r=n.toString(),l=r.indexOf("");if(l<0)return n;var c=s.insertSnippetByIndex(l,r,e._snippet);if("string"==typeof n)t.removeHeader("Content-Length"),n=c,t.setHeader("Content-Length",Buffer.byteLength(n));else if(Buffer.isBuffer(n)){var p=i||"utf8";if(s.isBufferType(n,p)){t.removeHeader("Content-Length");var d=Buffer.from(c).toString(p);n=Buffer.from(d,p),t.setHeader("Content-Length",n.length)}}}}catch(e){o.warn("Failed to inject web snippet and change content-lenght headers. Exception:"+e)}return n},e.prototype._getInjectedCompressBuffer=function(e,t,n){try{switch(n){case s.contentEncodingMethod.GZIP:var a=r.gunzipSync(t);if(this.ValidateInjection(e,a)){var i=this.InjectWebSnippet(e,a);t=r.gzipSync(i)}break;case s.contentEncodingMethod.DEFLATE:var l=r.inflateSync(t);if(this.ValidateInjection(e,l)){var c=this.InjectWebSnippet(e,l);t=r.deflateSync(c)}break;case s.contentEncodingMethod.BR:var p=s.getBrotliDecompressSync(r),d=s.getBrotliCompressSync(r);if(p&&d){var u=p(t);this.ValidateInjection(e,u)&&(t=d(this.InjectWebSnippet(e,u)));break}}}catch(e){o.info("get web injection compress buffer error: "+e)}return t},e.prototype.dispose=function(){e.INSTANCE=null,this.enable(!1),this._isInitialized=!1},e}();e.exports=u},60211:function(e,t,n){"use strict";var a=this&&this.__assign||function(){return(a=Object.assign||function(e){for(var t,n=1,a=arguments.length;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.spanToTelemetryContract=void 0;var a=n(78835),i=n(7770),r=n(11871),o=n(63580),s=n(60211),l=n(25740);function c(e){if(e.attributes[r.SemanticAttributes.HTTP_METHOD]){var t=e.attributes[r.SemanticAttributes.HTTP_URL];if(t)return String(t);var n=e.attributes[r.SemanticAttributes.HTTP_SCHEME],a=e.attributes[r.SemanticAttributes.HTTP_TARGET];if(n&&a){var i=e.attributes[r.SemanticAttributes.HTTP_HOST];if(i)return n+"://"+i+a;var o=e.attributes[r.SemanticAttributes.NET_PEER_PORT];if(o){var s=e.attributes[r.SemanticAttributes.NET_PEER_NAME];if(s)return n+"://"+s+":"+o+a;var l=e.attributes[r.SemanticAttributes.NET_PEER_IP];if(l)return n+"://"+l+":"+o+a}}}return""}function p(e){var t=e.attributes[r.SemanticAttributes.PEER_SERVICE],n=e.attributes[r.SemanticAttributes.HTTP_HOST],a=e.attributes[r.SemanticAttributes.HTTP_URL],i=e.attributes[r.SemanticAttributes.NET_PEER_NAME],o=e.attributes[r.SemanticAttributes.NET_PEER_IP];return t?String(t):n?String(n):a?String(a):i?String(i):o?String(o):""}t.spanToTelemetryContract=function(e){var t;switch(e.kind){case i.SpanKind.CLIENT:case i.SpanKind.PRODUCER:case i.SpanKind.INTERNAL:t=function(e){var t={name:e.name,success:e.status.code!=i.SpanStatusCode.ERROR,resultCode:"0",duration:0,data:"",dependencyTypeName:""};e.kind===i.SpanKind.PRODUCER&&(t.dependencyTypeName=o.DependencyTypeName.QueueMessage),e.kind===i.SpanKind.INTERNAL&&e.parentSpanId&&(t.dependencyTypeName=o.DependencyTypeName.InProc);var n=e.attributes[r.SemanticAttributes.HTTP_METHOD],s=e.attributes[r.SemanticAttributes.DB_SYSTEM],l=e.attributes[r.SemanticAttributes.RPC_SYSTEM];if(n){t.dependencyTypeName=o.DependencyTypeName.Http;var d=e.attributes[r.SemanticAttributes.HTTP_URL];if(d){var u="";try{u=new a.URL(String(d)).pathname}catch(e){}t.name=n+" "+u}t.data=c(e);var m=e.attributes[r.SemanticAttributes.HTTP_STATUS_CODE];if(m&&(t.resultCode=String(m)),b=p(e)){try{var h=new RegExp(/(https?)(:\/\/.*)(:\d+)(\S*)/).exec(b);if(null!=h){var _=h[1],g=h[3];("https"==_&&":443"==g||"http"==_&&":80"==g)&&(b=h[1]+h[2]+h[4])}}catch(e){}t.target=""+b}}else if(s){String(s)===r.DbSystemValues.MYSQL?t.dependencyTypeName="mysql":String(s)===r.DbSystemValues.POSTGRESQL?t.dependencyTypeName="postgresql":String(s)===r.DbSystemValues.MONGODB?t.dependencyTypeName="mongodb":String(s)===r.DbSystemValues.REDIS?t.dependencyTypeName="redis":function(e){return e===r.DbSystemValues.DB2||e===r.DbSystemValues.DERBY||e===r.DbSystemValues.MARIADB||e===r.DbSystemValues.MSSQL||e===r.DbSystemValues.ORACLE||e===r.DbSystemValues.SQLITE||e===r.DbSystemValues.OTHER_SQL||e===r.DbSystemValues.HSQLDB||e===r.DbSystemValues.H2}(String(s))?t.dependencyTypeName="SQL":t.dependencyTypeName=String(s);var f=e.attributes[r.SemanticAttributes.DB_STATEMENT],v=e.attributes[r.SemanticAttributes.DB_OPERATION];f?t.data=String(f):v&&(t.data=String(v));var b=p(e),E=e.attributes[r.SemanticAttributes.DB_NAME];t.target=b?E?b+"|"+E:""+b:E?""+E:""+s}else if(l){t.dependencyTypeName=o.DependencyTypeName.Grpc;var S=e.attributes[r.SemanticAttributes.RPC_GRPC_STATUS_CODE];S&&(t.resultCode=String(S)),(b=p(e))?t.target=""+b:l&&(t.target=String(l))}return t}(e);break;case i.SpanKind.SERVER:case i.SpanKind.CONSUMER:t=function(e){var t={name:e.name,success:e.status.code!=i.SpanStatusCode.ERROR,resultCode:"0",duration:0,url:"",source:void 0},n=e.attributes[r.SemanticAttributes.HTTP_METHOD],o=e.attributes[r.SemanticAttributes.RPC_GRPC_STATUS_CODE];if(n){if(e.kind==i.SpanKind.SERVER){var s=e.attributes[r.SemanticAttributes.HTTP_ROUTE],l=e.attributes[r.SemanticAttributes.HTTP_URL];if(s)t.name=n+" "+s;else if(l)try{var p=new a.URL(String(l));t.name=n+" "+p.pathname}catch(e){}}t.url=c(e);var d=e.attributes[r.SemanticAttributes.HTTP_STATUS_CODE];d&&(t.resultCode=String(d))}else o&&(t.resultCode=String(o));return t}(e)}var n=""+(e.spanContext?e.spanContext():e.context()).spanId,d=Math.round(1e3*e.duration[0]+e.duration[1]/1e6);return t.id=n,t.duration=d,t.properties=function(e){for(var t={},n=0,a=Object.keys(e.attributes);n0&&(t["_MS.links"]=l.stringify(r)),t}(e),e.attributes[o.AzNamespace]&&(e.kind===i.SpanKind.INTERNAL&&(t.dependencyTypeName=o.DependencyTypeName.InProc+" | "+e.attributes[o.AzNamespace]),e.attributes[o.AzNamespace]===o.MicrosoftEventHub&&s.parseEventHubSpan(e,t)),t}},89879:(e,t,n)=>{"use strict";t.wp=t.qP=void 0;var a=n(7770),i=n(63580),r=n(84953),o=n(65946),s=n(20699),l=[];t.qP=function(e){try{var t=e.data,n=o.spanToTelemetryContract(t);s.AsyncScopeManager.with(t,(function(){l.forEach((function(e){t.kind===a.SpanKind.SERVER||t.kind===a.SpanKind.CONSUMER?e.trackRequest(n):t.kind!==a.SpanKind.CLIENT&&t.kind!==a.SpanKind.INTERNAL&&t.kind!==a.SpanKind.PRODUCER||e.trackDependency(n)}))}))}catch(e){}},t.wp=function(e,n){if(e){if(l.find((function(e){return e==n})))return;0===l.length&&r.channel.subscribe("azure-coretracing",t.qP,r.trueFilter,(function(e,t){var a=n.getStatsbeat();a&&a.addInstrumentation(i.StatsbeatInstrumentation.AZURE_CORE_TRACING)})),l.push(n)}else 0===(l=l.filter((function(e){return e!=n}))).length&&r.channel.unsubscribe("azure-coretracing",t.qP)}},35823:(e,t,n)=>{"use strict";t.wp=void 0;var a=n(55290),i=n(63580),r=n(84953),o=[],s={10:a.SeverityLevel.Verbose,20:a.SeverityLevel.Verbose,30:a.SeverityLevel.Information,40:a.SeverityLevel.Warning,50:a.SeverityLevel.Error,60:a.SeverityLevel.Critical},l=function(e){var t=e.data.result;o.forEach((function(n){try{var a=JSON.parse(t);if(a.err){var i=new Error(a.err.message);return i.name=a.err.name,i.stack=a.err.stack,void n.trackException({exception:i})}}catch(e){}var r=s[e.data.level];n.trackTrace({message:t,severity:r})}))};t.wp=function(e,t){if(e){if(o.find((function(e){return e==t})))return;0===o.length&&r.channel.subscribe("bunyan",l,r.trueFilter,(function(e,n){var a=t.getStatsbeat();a&&a.addInstrumentation(i.StatsbeatInstrumentation.BUNYAN)})),o.push(t)}else 0===(o=o.filter((function(e){return e!=t}))).length&&r.channel.unsubscribe("bunyan",l)}},14309:(e,t,n)=>{"use strict";t.wp=void 0;var a=n(55290),i=n(63580),r=n(84953),o=[],s=function(e){var t=e.data.message;o.forEach((function(n){t instanceof Error?n.trackException({exception:t}):(t.lastIndexOf("\n")==t.length-1&&(t=t.substring(0,t.length-1)),n.trackTrace({message:t,severity:e.data.stderr?a.SeverityLevel.Warning:a.SeverityLevel.Information}))}))};t.wp=function(e,t){if(e){if(o.find((function(e){return e==t})))return;0===o.length&&r.channel.subscribe("console",s,r.trueFilter,(function(e,n){var a=t.getStatsbeat();a&&a.addInstrumentation(i.StatsbeatInstrumentation.CONSOLE)})),o.push(t)}else 0===(o=o.filter((function(e){return e!=t}))).length&&r.channel.unsubscribe("console",s)}},87396:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.registerContextPreservation=t.IsInitialized=void 0;var a=n(95282),i=n(3063);t.IsInitialized=!i.JsonConfig.getInstance().noDiagnosticChannel;var r="DiagnosticChannel";if(t.IsInitialized){var o=n(4106),s=i.JsonConfig.getInstance().noPatchModules.split(","),l={bunyan:o.bunyan,console:o.console,mongodb:o.mongodb,mongodbCore:o.mongodbCore,mysql:o.mysql,redis:o.redis,pg:o.pg,pgPool:o.pgPool,winston:o.winston,azuresdk:o.azuresdk};for(var c in l)-1===s.indexOf(c)&&(l[c].enable(),a.info(r,"Subscribed to "+c+" events"));s.length>0&&a.info(r,"Some modules will not be patched",s)}else a.info(r,"Not subscribing to dependency autocollection because APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL was set");t.registerContextPreservation=function(e){t.IsInitialized&&n(84953).channel.addContextPreservation(e)}},67886:(e,t,n)=>{"use strict";t.wp=t.qP=void 0;var a=n(63580),i=n(84953),r=[];t.qP=function(e){"ismaster"!==e.data.event.commandName&&r.forEach((function(t){var n=e.data.startedData&&e.data.startedData.databaseName||"Unknown database";t.trackDependency({target:n,data:e.data.event.commandName,name:e.data.event.commandName,duration:e.data.event.duration,success:e.data.succeeded,resultCode:e.data.succeeded?"0":"1",time:e.data.startedData.time,dependencyTypeName:"mongodb"})}))},t.wp=function(e,n){if(e){if(r.find((function(e){return e==n})))return;0===r.length&&i.channel.subscribe("mongodb",t.qP,i.trueFilter,(function(e,t){var i=n.getStatsbeat();i&&i.addInstrumentation(a.StatsbeatInstrumentation.MONGODB)})),r.push(n)}else 0===(r=r.filter((function(e){return e!=n}))).length&&i.channel.unsubscribe("mongodb",t.qP)}},34777:(e,t,n)=>{"use strict";t.wp=t.qP=void 0;var a=n(63580),i=n(84953),r=[];t.qP=function(e){r.forEach((function(t){var n=e.data.query||{},a=n.sql||"Unknown query",i=!e.data.err,r=(n._connection||{}).config||{},o=r.socketPath?r.socketPath:(r.host||"localhost")+":"+r.port;t.trackDependency({target:o,data:a,name:a,duration:e.data.duration,success:i,resultCode:i?"0":"1",time:e.data.time,dependencyTypeName:"mysql"})}))},t.wp=function(e,n){if(e){if(r.find((function(e){return e==n})))return;0===r.length&&i.channel.subscribe("mysql",t.qP,i.trueFilter,(function(e,t){var i=n.getStatsbeat();i&&i.addInstrumentation(a.StatsbeatInstrumentation.MYSQL)})),r.push(n)}else 0===(r=r.filter((function(e){return e!=n}))).length&&i.channel.unsubscribe("mysql",t.qP)}},31227:(e,t,n)=>{"use strict";t.wp=t.qP=void 0;var a=n(63580),i=n(84953),r=[];t.qP=function(e){r.forEach((function(t){var n=e.data.query,a=n.preparable&&n.preparable.text||n.plan||n.text||"unknown query",i=!e.data.error,r=e.data.database.host+":"+e.data.database.port;t.trackDependency({target:r,data:a,name:a,duration:e.data.duration,success:i,resultCode:i?"0":"1",time:e.data.time,dependencyTypeName:"postgres"})}))},t.wp=function(e,n){if(e){if(r.find((function(e){return e==n})))return;0===r.length&&i.channel.subscribe("postgres",t.qP,i.trueFilter,(function(e,t){var i=n.getStatsbeat();i&&i.addInstrumentation(a.StatsbeatInstrumentation.POSTGRES)})),r.push(n)}else 0===(r=r.filter((function(e){return e!=n}))).length&&i.channel.unsubscribe("postgres",t.qP)}},85071:(e,t,n)=>{"use strict";t.wp=t.qP=void 0;var a=n(63580),i=n(84953),r=[];t.qP=function(e){r.forEach((function(t){"info"!==e.data.commandObj.command&&t.trackDependency({target:e.data.address,name:e.data.commandObj.command,data:e.data.commandObj.command,duration:e.data.duration,success:!e.data.err,resultCode:e.data.err?"1":"0",time:e.data.time,dependencyTypeName:"redis"})}))},t.wp=function(e,n){if(e){if(r.find((function(e){return e==n})))return;0===r.length&&i.channel.subscribe("redis",t.qP,i.trueFilter,(function(e,t){var i=n.getStatsbeat();i&&i.addInstrumentation(a.StatsbeatInstrumentation.REDIS)})),r.push(n)}else 0===(r=r.filter((function(e){return e!=n}))).length&&i.channel.unsubscribe("redis",t.qP)}},30454:(e,t,n)=>{"use strict";t.wp=void 0;var a=n(63580),i=n(55290),r=n(84953),o=[],s={syslog:function(e){var t={emerg:i.SeverityLevel.Critical,alert:i.SeverityLevel.Critical,crit:i.SeverityLevel.Critical,error:i.SeverityLevel.Error,warning:i.SeverityLevel.Warning,notice:i.SeverityLevel.Information,info:i.SeverityLevel.Information,debug:i.SeverityLevel.Verbose};return void 0===t[e]?i.SeverityLevel.Information:t[e]},npm:function(e){var t={error:i.SeverityLevel.Error,warn:i.SeverityLevel.Warning,info:i.SeverityLevel.Information,verbose:i.SeverityLevel.Verbose,debug:i.SeverityLevel.Verbose,silly:i.SeverityLevel.Verbose};return void 0===t[e]?i.SeverityLevel.Information:t[e]},unknown:function(e){return i.SeverityLevel.Information}},l=function(e){var t=e.data.message;o.forEach((function(n){if(t instanceof Error)n.trackException({exception:t,properties:e.data.meta});else{var a=s[e.data.levelKind](e.data.level);n.trackTrace({message:t,severity:a,properties:e.data.meta})}}))};t.wp=function(e,t){if(e){if(o.find((function(e){return e==t})))return;0===o.length&&r.channel.subscribe("winston",l,r.trueFilter,(function(e,n){var i=t.getStatsbeat();i&&i.addInstrumentation(a.StatsbeatInstrumentation.WINSTON)})),o.push(t)}else 0===(o=o.filter((function(e){return e!=t}))).length&&r.channel.unsubscribe("winston",l)}},63580:(e,t)=>{"use strict";var n,a,i,r,o,s,l,c;Object.defineProperty(t,"__esModule",{value:!0}),t.WEB_INSTRUMENTATION_DEPRECATED_SOURCE=t.WEB_INSTRUMENTATION_DEFAULT_SOURCE=t.TIME_SINCE_ENQUEUED=t.ENQUEUED_TIME=t.MessageBusDestination=t.MicrosoftEventHub=t.AzNamespace=t.StatsbeatNetworkCategory=t.StatsbeatFeatureType=t.StatsbeatInstrumentation=t.StatsbeatFeature=t.StatsbeatCounter=t.StatsbeatAttach=t.StatsbeatResourceProvider=t.StatsbeatTelemetryName=t.HeartBeatMetricName=t.DependencyTypeName=t.TelemetryTypeStringToQuickPulseDocumentType=t.TelemetryTypeStringToQuickPulseType=t.QuickPulseType=t.QuickPulseDocumentType=t.PerformanceToQuickPulseCounter=t.MetricId=t.PerformanceCounter=t.QuickPulseCounter=t.DEFAULT_LIVEMETRICS_HOST=t.DEFAULT_LIVEMETRICS_ENDPOINT=t.DEFAULT_BREEZE_ENDPOINT=t.APPLICATION_INSIGHTS_SDK_VERSION=void 0,t.APPLICATION_INSIGHTS_SDK_VERSION="2.3.6",t.DEFAULT_BREEZE_ENDPOINT="https://dc.services.visualstudio.com",t.DEFAULT_LIVEMETRICS_ENDPOINT="https://rt.services.visualstudio.com",t.DEFAULT_LIVEMETRICS_HOST="rt.services.visualstudio.com",function(e){e.COMMITTED_BYTES="\\Memory\\Committed Bytes",e.PROCESSOR_TIME="\\Processor(_Total)\\% Processor Time",e.REQUEST_RATE="\\ApplicationInsights\\Requests/Sec",e.REQUEST_FAILURE_RATE="\\ApplicationInsights\\Requests Failed/Sec",e.REQUEST_DURATION="\\ApplicationInsights\\Request Duration",e.DEPENDENCY_RATE="\\ApplicationInsights\\Dependency Calls/Sec",e.DEPENDENCY_FAILURE_RATE="\\ApplicationInsights\\Dependency Calls Failed/Sec",e.DEPENDENCY_DURATION="\\ApplicationInsights\\Dependency Call Duration",e.EXCEPTION_RATE="\\ApplicationInsights\\Exceptions/Sec"}(a=t.QuickPulseCounter||(t.QuickPulseCounter={})),function(e){e.PRIVATE_BYTES="\\Process(??APP_WIN32_PROC??)\\Private Bytes",e.AVAILABLE_BYTES="\\Memory\\Available Bytes",e.PROCESSOR_TIME="\\Processor(_Total)\\% Processor Time",e.PROCESS_TIME="\\Process(??APP_WIN32_PROC??)\\% Processor Time",e.REQUEST_RATE="\\ASP.NET Applications(??APP_W3SVC_PROC??)\\Requests/Sec",e.REQUEST_DURATION="\\ASP.NET Applications(??APP_W3SVC_PROC??)\\Request Execution Time"}(i=t.PerformanceCounter||(t.PerformanceCounter={})),(c=t.MetricId||(t.MetricId={})).REQUESTS_DURATION="requests/duration",c.DEPENDENCIES_DURATION="dependencies/duration",c.EXCEPTIONS_COUNT="exceptions/count",c.TRACES_COUNT="traces/count",t.PerformanceToQuickPulseCounter=((n={})[i.PROCESSOR_TIME]=a.PROCESSOR_TIME,n[i.REQUEST_RATE]=a.REQUEST_RATE,n[i.REQUEST_DURATION]=a.REQUEST_DURATION,n[a.COMMITTED_BYTES]=a.COMMITTED_BYTES,n[a.REQUEST_FAILURE_RATE]=a.REQUEST_FAILURE_RATE,n[a.DEPENDENCY_RATE]=a.DEPENDENCY_RATE,n[a.DEPENDENCY_FAILURE_RATE]=a.DEPENDENCY_FAILURE_RATE,n[a.DEPENDENCY_DURATION]=a.DEPENDENCY_DURATION,n[a.EXCEPTION_RATE]=a.EXCEPTION_RATE,n),t.QuickPulseDocumentType={Event:"Event",Exception:"Exception",Trace:"Trace",Metric:"Metric",Request:"Request",Dependency:"RemoteDependency",Availability:"Availability",PageView:"PageView"},t.QuickPulseType={Event:"EventTelemetryDocument",Exception:"ExceptionTelemetryDocument",Trace:"TraceTelemetryDocument",Metric:"MetricTelemetryDocument",Request:"RequestTelemetryDocument",Dependency:"DependencyTelemetryDocument",Availability:"AvailabilityTelemetryDocument",PageView:"PageViewTelemetryDocument"},t.TelemetryTypeStringToQuickPulseType={EventData:t.QuickPulseType.Event,ExceptionData:t.QuickPulseType.Exception,MessageData:t.QuickPulseType.Trace,MetricData:t.QuickPulseType.Metric,RequestData:t.QuickPulseType.Request,RemoteDependencyData:t.QuickPulseType.Dependency,AvailabilityData:t.QuickPulseType.Availability,PageViewData:t.QuickPulseType.PageView},t.TelemetryTypeStringToQuickPulseDocumentType={EventData:t.QuickPulseDocumentType.Event,ExceptionData:t.QuickPulseDocumentType.Exception,MessageData:t.QuickPulseDocumentType.Trace,MetricData:t.QuickPulseDocumentType.Metric,RequestData:t.QuickPulseDocumentType.Request,RemoteDependencyData:t.QuickPulseDocumentType.Dependency,AvailabilityData:t.QuickPulseDocumentType.Availability,PageViewData:t.QuickPulseDocumentType.PageView},t.DependencyTypeName={Grpc:"GRPC",Http:"HTTP",InProc:"InProc",Sql:"SQL",QueueMessage:"Queue Message"},t.HeartBeatMetricName="HeartBeat",t.StatsbeatTelemetryName="Statsbeat",t.StatsbeatResourceProvider={appsvc:"appsvc",functions:"functions",vm:"vm",unknown:"unknown"},t.StatsbeatAttach={codeless:"codeless",sdk:"sdk"},t.StatsbeatCounter={REQUEST_SUCCESS:"Request Success Count",REQUEST_FAILURE:"Request Failure Count",REQUEST_DURATION:"Request Duration",RETRY_COUNT:"Retry Count",THROTTLE_COUNT:"Throttle Count",EXCEPTION_COUNT:"Exception Count",ATTACH:"Attach",FEATURE:"Feature"},(l=t.StatsbeatFeature||(t.StatsbeatFeature={}))[l.NONE=0]="NONE",l[l.DISK_RETRY=1]="DISK_RETRY",l[l.AAD_HANDLING=2]="AAD_HANDLING",l[l.WEB_SNIPPET=4]="WEB_SNIPPET",(s=t.StatsbeatInstrumentation||(t.StatsbeatInstrumentation={}))[s.NONE=0]="NONE",s[s.AZURE_CORE_TRACING=1]="AZURE_CORE_TRACING",s[s.MONGODB=2]="MONGODB",s[s.MYSQL=4]="MYSQL",s[s.REDIS=8]="REDIS",s[s.POSTGRES=16]="POSTGRES",s[s.BUNYAN=32]="BUNYAN",s[s.WINSTON=64]="WINSTON",s[s.CONSOLE=128]="CONSOLE",(o=t.StatsbeatFeatureType||(t.StatsbeatFeatureType={}))[o.Feature=0]="Feature",o[o.Instrumentation=1]="Instrumentation",(r=t.StatsbeatNetworkCategory||(t.StatsbeatNetworkCategory={}))[r.Breeze=0]="Breeze",r[r.Quickpulse=1]="Quickpulse",t.AzNamespace="az.namespace",t.MicrosoftEventHub="Microsoft.EventHub",t.MessageBusDestination="message_bus.destination",t.ENQUEUED_TIME="enqueuedTime",t.TIME_SINCE_ENQUEUED="timeSinceEnqueued",t.WEB_INSTRUMENTATION_DEFAULT_SOURCE="https://js.monitor.azure.com/scripts/b/ai",t.WEB_INSTRUMENTATION_DEPRECATED_SOURCE="https://az416426.vo.msecnd.net/scripts/b/ai"},69382:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.domainSupportsProperties=t.RemoteDependencyDataConstants=void 0;var a=n(99958),i=function(){function e(){}return e.TYPE_HTTP="Http",e.TYPE_AI="Http (tracked component)",e}();t.RemoteDependencyDataConstants=i,t.domainSupportsProperties=function(e){return"properties"in e||e instanceof a.EventData||e instanceof a.ExceptionData||e instanceof a.MessageData||e instanceof a.MetricData||e instanceof a.PageViewData||e instanceof a.RemoteDependencyData||e instanceof a.RequestData}},27220:function(e,t,n){"use strict";var a,i=this&&this.__extends||(a=function(e,t){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}a(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),r=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.properties={},t.measurements={},t}return i(t,e),t}(n(78934));e.exports=r},64101:e=>{"use strict";e.exports=function(){}},69871:e=>{"use strict";e.exports=function(){this.applicationVersion="ai.application.ver",this.deviceId="ai.device.id",this.deviceLocale="ai.device.locale",this.deviceModel="ai.device.model",this.deviceOEMName="ai.device.oemName",this.deviceOSVersion="ai.device.osVersion",this.deviceType="ai.device.type",this.locationIp="ai.location.ip",this.operationId="ai.operation.id",this.operationName="ai.operation.name",this.operationParentId="ai.operation.parentId",this.operationSyntheticSource="ai.operation.syntheticSource",this.operationCorrelationVector="ai.operation.correlationVector",this.sessionId="ai.session.id",this.sessionIsFirst="ai.session.isFirst",this.userAccountId="ai.user.accountId",this.userId="ai.user.id",this.userAuthUserId="ai.user.authUserId",this.cloudRole="ai.cloud.role",this.cloudRoleInstance="ai.cloud.roleInstance",this.internalSdkVersion="ai.internal.sdkVersion",this.internalAgentVersion="ai.internal.agentVersion",this.internalNodeName="ai.internal.nodeName"}},320:function(e,t,n){"use strict";var a,i=this&&this.__extends||(a=function(e,t){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}a(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),r=function(e){function t(){return e.call(this)||this}return i(t,e),t}(n(64101));e.exports=r},78602:(e,t,n)=>{"use strict";var a=n(80495);e.exports=function(){this.kind=a.Measurement}},80495:e=>{"use strict";var t;!function(e){e[e.Measurement=0]="Measurement",e[e.Aggregation=1]="Aggregation"}(t||(t={})),e.exports=t},78934:e=>{"use strict";e.exports=function(){}},37300:e=>{"use strict";e.exports=function(){this.ver=1,this.sampleRate=100,this.tags={}}},44526:function(e,t,n){"use strict";var a,i=this&&this.__extends||(a=function(e,t){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}a(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),r=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.properties={},t.measurements={},t}return i(t,e),t}(n(78934));e.exports=r},40935:function(e,t,n){"use strict";var a,i=this&&this.__extends||(a=function(e,t){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}a(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),r=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.exceptions=[],t.properties={},t.measurements={},t}return i(t,e),t}(n(78934));e.exports=r},18082:e=>{"use strict";e.exports=function(){this.hasFullStack=!0,this.parsedStack=[]}},10901:function(e,t,n){"use strict";var a,i=this&&this.__extends||(a=function(e,t){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}a(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),r=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.properties={},t}return i(t,e),t}(n(78934));e.exports=r},33092:function(e,t,n){"use strict";var a,i=this&&this.__extends||(a=function(e,t){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}a(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),r=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.metrics=[],t.properties={},t}return i(t,e),t}(n(78934));e.exports=r},56279:function(e,t,n){"use strict";var a,i=this&&this.__extends||(a=function(e,t){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}a(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),r=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.properties={},t.measurements={},t}return i(t,e),t}(n(44526));e.exports=r},86290:function(e,t,n){"use strict";var a,i=this&&this.__extends||(a=function(e,t){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}a(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),r=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.success=!0,t.properties={},t.measurements={},t}return i(t,e),t}(n(78934));e.exports=r},7339:function(e,t,n){"use strict";var a,i=this&&this.__extends||(a=function(e,t){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}a(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),r=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.properties={},t.measurements={},t}return i(t,e),t}(n(78934));e.exports=r},39697:e=>{"use strict";var t;!function(e){e[e.Verbose=0]="Verbose",e[e.Information=1]="Information",e[e.Warning=2]="Warning",e[e.Error=3]="Error",e[e.Critical=4]="Critical"}(t||(t={})),e.exports=t},76376:e=>{"use strict";e.exports=function(){}},99958:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AvailabilityData=n(27220),t.Base=n(64101),t.ContextTagKeys=n(69871),t.Data=n(320),t.DataPoint=n(78602),t.DataPointType=n(80495),t.Domain=n(78934),t.Envelope=n(37300),t.EventData=n(44526),t.ExceptionData=n(40935),t.ExceptionDetails=n(18082),t.MessageData=n(10901),t.MetricData=n(33092),t.PageViewData=n(56279),t.RemoteDependencyData=n(86290),t.RequestData=n(7339),t.SeverityLevel=n(39697),t.StackFrame=n(76376)},76522:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},40532:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},84429:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},8937:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},49003:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},15323:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},89477:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},6647:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},85977:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||a(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(n(89477),t),i(n(84429),t),i(n(40532),t),i(n(49003),t),i(n(15323),t),i(n(76522),t),i(n(6647),t),i(n(8937),t)},93382:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},31727:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},16375:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},78010:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},62637:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},34381:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},71143:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},42166:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},74013:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},72334:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},18836:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},75481:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.TelemetryType=t.TelemetryTypeString=t.baseTypeToTelemetryType=t.telemetryTypeToBaseType=void 0,t.telemetryTypeToBaseType=function(e){switch(e){case n.Event:return"EventData";case n.Exception:return"ExceptionData";case n.Trace:return"MessageData";case n.Metric:return"MetricData";case n.Request:return"RequestData";case n.Dependency:return"RemoteDependencyData";case n.Availability:return"AvailabilityData";case n.PageView:return"PageViewData"}},t.baseTypeToTelemetryType=function(e){switch(e){case"EventData":return n.Event;case"ExceptionData":return n.Exception;case"MessageData":return n.Trace;case"MetricData":return n.Metric;case"RequestData":return n.Request;case"RemoteDependencyData":return n.Dependency;case"AvailabilityData":return n.Availability;case"PageViewData":return n.PageView}},t.TelemetryTypeString={Event:"EventData",Exception:"ExceptionData",Trace:"MessageData",Metric:"MetricData",Request:"RequestData",Dependency:"RemoteDependencyData",Availability:"AvailabilityData",PageView:"PageViewData"},function(e){e[e.Event=0]="Event",e[e.Exception=1]="Exception",e[e.Trace=2]="Trace",e[e.Metric=3]="Metric",e[e.Request=4]="Request",e[e.Dependency=5]="Dependency",e[e.Availability=6]="Availability",e[e.PageView=7]="PageView"}(n=t.TelemetryType||(t.TelemetryType={}))},35539:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},62626:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||a(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(n(31727),t),i(n(78010),t),i(n(62637),t),i(n(34381),t),i(n(72334),t),i(n(35539),t),i(n(18836),t),i(n(71143),t),i(n(42166),t),i(n(93382),t),i(n(74013),t),i(n(16375),t),i(n(75481),t)},55290:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||a(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(n(69382),t),i(n(99958),t),i(n(62626),t),i(n(85977),t)},60521:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AggregatedMetricCounter=void 0;t.AggregatedMetricCounter=function(e){this.dimensions=e,this.totalCount=0,this.lastTotalCount=0,this.intervalExecutionTime=0,this.lastTime=+new Date,this.lastIntervalExecutionTime=0}},77535:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PreaggregatedMetricPropertyNames=void 0,t.PreaggregatedMetricPropertyNames={cloudRoleInstance:"cloud/roleInstance",cloudRoleName:"cloud/roleName",operationSynthetic:"operation/synthetic",requestSuccess:"Request.Success",requestResultCode:"request/resultCode",dependencyType:"Dependency.Type",dependencyTarget:"dependency/target",dependencySuccess:"Dependency.Success",dependencyResultCode:"dependency/resultCode",traceSeverityLevel:"trace/severityLevel"}},80287:function(e,t,n){"use strict";var a=this&&this.__awaiter||function(e,t,n,a){return new(n||(n=Promise))((function(i,r){function o(e){try{l(a.next(e))}catch(e){r(e)}}function s(e){try{l(a.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}l((a=a.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,a,i,r,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return r={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function s(r){return function(s){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,a&&(i=2&r[0]?a.return:r[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,r[1])).done)return i;switch(a=0,i&&(r=[2&r[0],i.value]),r[0]){case 0:case 1:i=r;break;case 4:return o.label++,{value:r[1],done:!1};case 5:o.label++,a=r[1],r=[0];continue;case 7:r=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==r[0]&&2!==r[0])){o=0;continue}if(3===r[0]&&(!i||r[1]>i[0]&&r[1]{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AzureVirtualMachine=void 0;var a=n(95282),i=n(25740),r=n(88723),o=function(){function e(){}return e.getAzureComputeMetadata=function(t,n){var o,s=this,l={},c=((o={method:"GET"})[r.disableCollectionRequestOption]=!0,o.headers={Metadata:"True"},o),p=i.makeRequest(t,"http://169.254.169.254/metadata/instance/compute?api-version=2017-12-01&format=json",c,(function(t){if(200===t.statusCode){l.isVM=!0;var i="";t.on("data",(function(e){i+=e})),t.on("end",(function(){try{var t=JSON.parse(i);l.id=t.vmId||"",l.subscriptionId=t.subscriptionId||"",l.osType=t.osType||""}catch(t){a.info(e.TAG,t)}n(l)}))}else n(l)}),!1,!1);p&&(setTimeout((function(){s._requestTimedOut=!0,p.abort()}),e.HTTP_TIMEOUT),p.on("error",(function(t){s._requestTimedOut&&t&&(t.name="telemetry timeout",t.message="telemetry request timed out"),t&&t.message&&t.message.indexOf("UNREACH")>-1?l.isVM=!1:a.info(e.TAG,t),n(l)})),p.end())},e.HTTP_TIMEOUT=2500,e.TAG="AzureVirtualMachine",e}();t.AzureVirtualMachine=o},3504:(e,t,n)=>{"use strict";var a=n(95282),i=n(25740),r=function(){function e(e,t,n,a){this._buffer=[],this._lastSend=0,this._isDisabled=e,this._getBatchSize=t,this._getBatchIntervalMs=n,this._sender=a}return e.prototype.setUseDiskRetryCaching=function(e,t,n){this._sender.setDiskRetryMode(e,t,n)},e.prototype.send=function(e){var t=this;this._isDisabled()||(e?(this._buffer.push(e),this._buffer.length>=this._getBatchSize()?this.triggerSend(!1):!this._timeoutHandle&&this._buffer.length>0&&(this._timeoutHandle=setTimeout((function(){t._timeoutHandle=null,t.triggerSend(!1)}),this._getBatchIntervalMs()))):a.warn("Cannot send null/undefined telemetry"))},e.prototype.triggerSend=function(e,t){var n=this._buffer.length<1;n||(e||i.isNodeExit?(this._sender.saveOnCrash(this._buffer),"function"==typeof t&&t("data saved on crash")):this._sender.send(this._buffer,t)),this._lastSend=+new Date,this._buffer=[],clearTimeout(this._timeoutHandle),this._timeoutHandle=null,n&&"function"==typeof t&&t("no data to send")},e}();e.exports=r},69253:(e,t,n)=>{"use strict";var a=n(29962),i=n(55158),r=n(95282),o=n(63580),s=n(78835),l=n(3063),c=function(){function e(t){var n=this;this._endpointBase=o.DEFAULT_BREEZE_ENDPOINT,this._mergeConfig();var a=this._connectionString,r=i.parse(t),l=i.parse(a),c=!r.instrumentationkey&&Object.keys(r).length>0?null:t,p=this._instrumentationKey;this.instrumentationKey=r.instrumentationkey||c||l.instrumentationkey||p;var d=""+(this.endpointUrl||r.ingestionendpoint||l.ingestionendpoint||this._endpointBase);d.endsWith("/")&&(d=d.slice(0,-1)),this.endpointUrl=d+"/v2.1/track",this.maxBatchSize=this.maxBatchSize||250,this.maxBatchIntervalMs=this.maxBatchIntervalMs||15e3,this.disableAppInsights=this.disableAppInsights||!1,this.samplingPercentage=this.samplingPercentage||100,this.correlationIdRetryIntervalMs=this.correlationIdRetryIntervalMs||3e4,this.enableWebInstrumentation=this.enableWebInstrumentation||this.enableAutoWebSnippetInjection||!1,this.webInstrumentationConfig=this.webInstrumentationConfig||null,this.enableAutoWebSnippetInjection=this.enableWebInstrumentation,this.correlationHeaderExcludedDomains=this.correlationHeaderExcludedDomains||["*.core.windows.net","*.core.chinacloudapi.cn","*.core.cloudapi.de","*.core.usgovcloudapi.net","*.core.microsoft.scloud","*.core.eaglex.ic.gov"],this._setCorrelationId=function(e){return n.correlationId=e},this.ignoreLegacyHeaders=this.ignoreLegacyHeaders||!1,this.profileQueryEndpoint=r.ingestionendpoint||l.ingestionendpoint||process.env[e.ENV_profileQueryEndpoint]||this._endpointBase,this.quickPulseHost=this.quickPulseHost||r.liveendpoint||l.liveendpoint||process.env[e.ENV_quickPulseHost]||o.DEFAULT_LIVEMETRICS_HOST,this.webInstrumentationConnectionString=this.webInstrumentationConnectionString||this._webInstrumentationConnectionString||"",this.webSnippetConnectionString=this.webInstrumentationConnectionString,this.quickPulseHost.match(/^https?:\/\//)&&(this.quickPulseHost=new s.URL(this.quickPulseHost).host)}return Object.defineProperty(e.prototype,"profileQueryEndpoint",{get:function(){return this._profileQueryEndpoint},set:function(e){a.cancelCorrelationIdQuery(this,this._setCorrelationId),this._profileQueryEndpoint=e,this.correlationId=a.correlationIdPrefix,a.queryCorrelationId(this,this._setCorrelationId)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"instrumentationKey",{get:function(){return this._instrumentationKey},set:function(t){e._validateInstrumentationKey(t)||r.warn("An invalid instrumentation key was provided. There may be resulting telemetry loss",this.instrumentationKey),this._instrumentationKey=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"webSnippetConnectionString",{get:function(){return this._webInstrumentationConnectionString},set:function(e){this._webInstrumentationConnectionString=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"webInstrumentationConnectionString",{get:function(){return this._webInstrumentationConnectionString},set:function(e){this._webInstrumentationConnectionString=e},enumerable:!1,configurable:!0}),e.prototype._mergeConfig=function(){var e=l.JsonConfig.getInstance();this._connectionString=e.connectionString,this._instrumentationKey=e.instrumentationKey,this.correlationHeaderExcludedDomains=e.correlationHeaderExcludedDomains,this.correlationIdRetryIntervalMs=e.correlationIdRetryIntervalMs,this.disableAllExtendedMetrics=e.disableAllExtendedMetrics,this.disableAppInsights=e.disableAppInsights,this.disableStatsbeat=e.disableStatsbeat,this.distributedTracingMode=e.distributedTracingMode,this.enableAutoCollectConsole=e.enableAutoCollectConsole,this.enableAutoCollectDependencies=e.enableAutoCollectDependencies,this.enableAutoCollectExceptions=e.enableAutoCollectExceptions,this.enableAutoCollectExtendedMetrics=e.enableAutoCollectExtendedMetrics,this.enableAutoCollectExternalLoggers=e.enableAutoCollectExternalLoggers,this.enableAutoCollectHeartbeat=e.enableAutoCollectHeartbeat,this.enableAutoCollectPerformance=e.enableAutoCollectPerformance,this.enableAutoCollectPreAggregatedMetrics=e.enableAutoCollectPreAggregatedMetrics,this.enableAutoCollectRequests=e.enableAutoCollectRequests,this.enableAutoDependencyCorrelation=e.enableAutoDependencyCorrelation,this.enableInternalDebugLogging=e.enableInternalDebugLogging,this.enableInternalWarningLogging=e.enableInternalWarningLogging,this.enableResendInterval=e.enableResendInterval,this.enableMaxBytesOnDisk=e.enableMaxBytesOnDisk,this.enableSendLiveMetrics=e.enableSendLiveMetrics,this.enableUseAsyncHooks=e.enableUseAsyncHooks,this.enableUseDiskRetryCaching=e.enableUseDiskRetryCaching,this.endpointUrl=e.endpointUrl,this.extendedMetricDisablers=e.extendedMetricDisablers,this.ignoreLegacyHeaders=e.ignoreLegacyHeaders,this.maxBatchIntervalMs=e.maxBatchIntervalMs,this.maxBatchSize=e.maxBatchSize,this.proxyHttpUrl=e.proxyHttpUrl,this.proxyHttpsUrl=e.proxyHttpsUrl,this.quickPulseHost=e.quickPulseHost,this.samplingPercentage=e.samplingPercentage,this.enableWebInstrumentation=e.enableWebInstrumentation,this._webInstrumentationConnectionString=e.webInstrumentationConnectionString,this.webInstrumentationConfig=e.webInstrumentationConfig,this.webInstrumentationSrc=e.webInstrumentationSrc},e._validateInstrumentationKey=function(e){return new RegExp("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$").test(e)},e.ENV_azurePrefix="APPSETTING_",e.ENV_iKey="APPINSIGHTS_INSTRUMENTATIONKEY",e.legacy_ENV_iKey="APPINSIGHTS_INSTRUMENTATION_KEY",e.ENV_profileQueryEndpoint="APPINSIGHTS_PROFILE_QUERY_ENDPOINT",e.ENV_quickPulseHost="APPINSIGHTS_QUICKPULSE_HOST",e}();e.exports=c},55158:(e,t,n)=>{"use strict";var a=n(63580),i=function(){function e(){}return e.parse=function(t){if(!t)return{};var n=t.split(e._FIELDS_SEPARATOR).reduce((function(t,n){var a=n.split(e._FIELD_KEY_VALUE_SEPARATOR);if(2===a.length){var i=a[0].toLowerCase(),r=a[1];t[i]=r}return t}),{});if(Object.keys(n).length>0){if(n.endpointsuffix){var i=n.location?n.location+".":"";n.ingestionendpoint=n.ingestionendpoint||"https://"+i+"dc."+n.endpointsuffix,n.liveendpoint=n.liveendpoint||"https://"+i+"live."+n.endpointsuffix}n.ingestionendpoint=n.ingestionendpoint||a.DEFAULT_BREEZE_ENDPOINT,n.liveendpoint=n.liveendpoint||a.DEFAULT_LIVEMETRICS_ENDPOINT}return n},e.isIkeyValid=function(e){return!(!e||""==e)&&new RegExp("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$").test(e)},e._FIELDS_SEPARATOR=";",e._FIELD_KEY_VALUE_SEPARATOR="=",e}();e.exports=i},54470:(e,t,n)=>{"use strict";var a=n(12087),i=n(35747),r=n(85622),o=n(55290),s=n(63580),l=n(95282),c=function(){function e(e){this.keys=new o.ContextTagKeys,this.tags={},this._loadApplicationContext(e),this._loadDeviceContext(),this._loadInternalContext()}return e.prototype._loadApplicationContext=function(t){if(t=t||r.resolve(__dirname,"../../../../package.json"),!e.appVersion[t]){e.appVersion[t]="unknown";try{var n=JSON.parse(i.readFileSync(t,"utf8"));n&&"string"==typeof n.version&&(e.appVersion[t]=n.version)}catch(e){l.info("unable to read app version: ",e)}}this.tags[this.keys.applicationVersion]=e.appVersion[t]},e.prototype._loadDeviceContext=function(){this.tags[this.keys.deviceId]="",this.tags[this.keys.cloudRoleInstance]=a&&a.hostname(),this.tags[this.keys.deviceOSVersion]=a&&a.type()+" "+a.release(),this.tags[this.keys.cloudRole]=e.DefaultRoleName,this.tags["ai.device.osArchitecture"]=a&&a.arch(),this.tags["ai.device.osPlatform"]=a&&a.platform()},e.prototype._loadInternalContext=function(){e.sdkVersion=s.APPLICATION_INSIGHTS_SDK_VERSION,this.tags[this.keys.internalSdkVersion]="node:"+e.sdkVersion},e.DefaultRoleName="Web",e.appVersion={},e.sdkVersion=null,e}();e.exports=c},29962:(e,t,n)=>{"use strict";var a=n(25740),i=n(95282),r=function(){function e(){}return e.queryCorrelationId=function(t,n){var r=this,o=t.profileQueryEndpoint+"/api/profiles/"+t.instrumentationKey+"/appId";if(e.completedLookups.hasOwnProperty(o))n(e.completedLookups[o]);else if(e.pendingLookups[o])e.pendingLookups[o].push(n);else{e.pendingLookups[o]=[n];var s=function(){if(e.pendingLookups[o]){var n={method:"GET",disableAppInsightsAutoCollection:!0};i.info(e.TAG,n);var s=a.makeRequest(t,o,n,(function(t){if(200===t.statusCode){var n="";t.setEncoding("utf-8"),t.on("data",(function(e){n+=e})),t.on("end",(function(){i.info(e.TAG,n);var t=e.correlationIdPrefix+n;e.completedLookups[o]=t,e.pendingLookups[o]&&e.pendingLookups[o].forEach((function(e){return e(t)})),delete e.pendingLookups[o]}))}else{if(!(t.statusCode>=400&&t.statusCode<500))return;e.completedLookups[o]=void 0,delete e.pendingLookups[o]}e._handle&&(clearTimeout(e._handle),e._handle=void 0)}),!0,!1);s&&(s.setTimeout(e.HTTP_TIMEOUT,(function(){r._requestTimedOut=!0,s.abort()})),s.on("error",(function(t){r._requestTimedOut&&(t.name="telemetry timeout",t.message="telemetry request timed out"),i.warn(e.TAG,t),r._handle&&(clearTimeout(e._handle),e._handle=void 0)})),s.end())}};e._handle||(e._handle=setTimeout(s,t.correlationIdRetryIntervalMs),e._handle.unref()),setImmediate(s)}},e.cancelCorrelationIdQuery=function(t,n){var a=t.profileQueryEndpoint+"/api/profiles/"+t.instrumentationKey+"/appId",i=e.pendingLookups[a];i&&(e.pendingLookups[a]=i.filter((function(e){return e!=n})),0==e.pendingLookups[a].length&&delete e.pendingLookups[a])},e.generateRequestId=function(t){if(t){"."!==(t="|"==t[0]?t:"|"+t)[t.length-1]&&(t+=".");var n=(e.currentRootId++).toString(16);return e.appendSuffix(t,n,"_")}return e.generateRootId()},e.getRootId=function(e){var t=e.indexOf(".");t<0&&(t=e.length);var n="|"===e[0]?1:0;return e.substring(n,t)},e.generateRootId=function(){return"|"+a.w3cTraceId()+"."},e.appendSuffix=function(t,n,i){if(t.length+n.lengthr)for(;r>1;--r){var o=t[r-1];if("."===o||"_"===o)break}if(r<=1)return e.generateRootId();for(n=a.randomu32().toString(16);n.length<8;)n="0"+n;return t.substring(0,r)+n+"#"},e.TAG="CorrelationIdManager",e.correlationIdPrefix="cid-v1:",e.w3cEnabled=!0,e.HTTP_TIMEOUT=2500,e.pendingLookups={},e.completedLookups={},e.requestIdMaxLength=1024,e.currentRootId=a.randomu32(),e}();e.exports=r},99813:(e,t,n)=>{"use strict";var a=n(55290),i=n(25740),r=n(70894),o=function(){function e(){}return e.createEnvelope=function(t,n,r,o,s){var l=null;switch(n){case a.TelemetryType.Trace:l=e.createTraceData(t);break;case a.TelemetryType.Dependency:l=e.createDependencyData(t);break;case a.TelemetryType.Event:l=e.createEventData(t);break;case a.TelemetryType.Exception:l=e.createExceptionData(t);break;case a.TelemetryType.Request:l=e.createRequestData(t);break;case a.TelemetryType.Metric:l=e.createMetricData(t);break;case a.TelemetryType.Availability:l=e.createAvailabilityData(t);break;case a.TelemetryType.PageView:l=e.createPageViewData(t)}if(l&&l.baseData&&a.domainSupportsProperties(l.baseData)){if(r)if(l.baseData.properties)for(var c in r)l.baseData.properties[c]||(l.baseData.properties[c]=r[c]);else l.baseData.properties=r;l.baseData.properties&&(l.baseData.properties=i.validateStringMap(l.baseData.properties))}var p=s&&s.instrumentationKey||"",d=new a.Envelope;return d.data=l,d.iKey=p,d.name="Microsoft.ApplicationInsights."+p.replace(/-/g,"")+"."+l.baseType.substr(0,l.baseType.length-4),d.tags=this.getTags(o,t.tagOverrides),d.time=(new Date).toISOString(),d.ver=1,d.sampleRate=s?s.samplingPercentage:100,n===a.TelemetryType.Metric&&(d.sampleRate=100),d},e.createTraceData=function(e){var t=new a.MessageData;t.message=e.message,t.properties=e.properties,isNaN(e.severity)?t.severityLevel=a.SeverityLevel.Information:t.severityLevel=e.severity;var n=new a.Data;return n.baseType=a.telemetryTypeToBaseType(a.TelemetryType.Trace),n.baseData=t,n},e.createDependencyData=function(e){var t=new a.RemoteDependencyData;"string"==typeof e.name&&(t.name=e.name.length>1024?e.name.slice(0,1021)+"...":e.name),t.data=e.data,t.target=e.target,t.duration=i.msToTimeSpan(e.duration),t.success=e.success,t.type=e.dependencyTypeName,t.properties=e.properties,t.resultCode=e.resultCode?e.resultCode.toString():"0",e.id?t.id=e.id:t.id=i.w3cTraceId();var n=new a.Data;return n.baseType=a.telemetryTypeToBaseType(a.TelemetryType.Dependency),n.baseData=t,n},e.createEventData=function(e){var t=new a.EventData;t.name=e.name,t.properties=e.properties,t.measurements=e.measurements;var n=new a.Data;return n.baseType=a.telemetryTypeToBaseType(a.TelemetryType.Event),n.baseData=t,n},e.createExceptionData=function(e){var t=new a.ExceptionData;t.properties=e.properties,isNaN(e.severity)?t.severityLevel=a.SeverityLevel.Error:t.severityLevel=e.severity,t.measurements=e.measurements,t.exceptions=[];var n=e.exception.stack,r=new a.ExceptionDetails;r.message=e.exception.message,r.typeName=e.exception.name,r.parsedStack=this.parseStack(n),r.hasFullStack=i.isArray(r.parsedStack)&&r.parsedStack.length>0,t.exceptions.push(r);var o=new a.Data;return o.baseType=a.telemetryTypeToBaseType(a.TelemetryType.Exception),o.baseData=t,o},e.createRequestData=function(e){var t=new a.RequestData;e.id?t.id=e.id:t.id=i.w3cTraceId(),t.name=e.name,t.url=e.url,t.source=e.source,t.duration=i.msToTimeSpan(e.duration),t.responseCode=e.resultCode?e.resultCode.toString():"0",t.success=e.success,t.properties=e.properties,t.measurements=e.measurements;var n=new a.Data;return n.baseType=a.telemetryTypeToBaseType(a.TelemetryType.Request),n.baseData=t,n},e.createMetricData=function(e){var t=new a.MetricData;t.metrics=[];var n=new a.DataPoint;n.count=isNaN(e.count)?1:e.count,n.kind=a.DataPointType.Aggregation,n.max=isNaN(e.max)?e.value:e.max,n.min=isNaN(e.min)?e.value:e.min,n.name=e.name,n.stdDev=isNaN(e.stdDev)?0:e.stdDev,n.value=e.value,n.ns=e.namespace,t.metrics.push(n),t.properties=e.properties;var i=new a.Data;return i.baseType=a.telemetryTypeToBaseType(a.TelemetryType.Metric),i.baseData=t,i},e.createAvailabilityData=function(e){var t=new a.AvailabilityData;e.id?t.id=e.id:t.id=i.w3cTraceId(),t.name=e.name,t.duration=i.msToTimeSpan(e.duration),t.success=e.success,t.runLocation=e.runLocation,t.message=e.message,t.measurements=e.measurements,t.properties=e.properties;var n=new a.Data;return n.baseType=a.telemetryTypeToBaseType(a.TelemetryType.Availability),n.baseData=t,n},e.createPageViewData=function(e){var t=new a.PageViewData;t.name=e.name,t.duration=i.msToTimeSpan(e.duration),t.url=e.url,t.measurements=e.measurements,t.properties=e.properties;var n=new a.Data;return n.baseType=a.telemetryTypeToBaseType(a.TelemetryType.PageView),n.baseData=t,n},e.getTags=function(e,t){var n=r.CorrelationContextManager.getCurrentContext(),a={};if(e&&e.tags)for(var i in e.tags)a[i]=e.tags[i];if(t)for(var i in t)a[i]=t[i];return n&&(a[e.keys.operationId]=a[e.keys.operationId]||n.operation.id,a[e.keys.operationName]=a[e.keys.operationName]||n.operation.name,a[e.keys.operationParentId]=a[e.keys.operationParentId]||n.operation.parentId),a},e.parseStack=function(e){var t=void 0;if("string"==typeof e){var n=e.split("\n");t=[];for(var a=0,i=0,r=0;r<=n.length;r++){var o=n[r];if(s.regex.test(o)){var l=new s(n[r],a++);i+=l.sizeInBytes,t.push(l)}}if(i>32768)for(var c=0,p=t.length-1,d=0,u=c,m=p;c32768){var h=m-u+1;t.splice(u,h);break}u=c,m=p,c++,p--}}return t},e}(),s=function(){function e(t,n){this.sizeInBytes=0,this.level=n,this.method="",this.assembly=i.trim(t);var a=t.match(e.regex);a&&a.length>=5&&(this.method=i.trim(a[2])||this.method,this.fileName=i.trim(a[4])||"",this.line=parseInt(a[5])||0),this.sizeInBytes+=this.method.length,this.sizeInBytes+=this.fileName.length,this.sizeInBytes+=this.assembly.length,this.sizeInBytes+=e.baseSize,this.sizeInBytes+=this.level.toString().length,this.sizeInBytes+=this.line.toString().length}return e.regex=/^(\s+at)?(.*?)(\@|\s\(|\s)([^\(\n]+):(\d+):(\d+)(\)?)$/,e.baseSize=58,e}();e.exports=o},12640:function(e,t,n){"use strict";var a=this&&this.__awaiter||function(e,t,n,a){return new(n||(n=Promise))((function(i,r){function o(e){try{l(a.next(e))}catch(e){r(e)}}function s(e){try{l(a.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}l((a=a.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,a,i,r,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return r={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function s(r){return function(s){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,a&&(i=2&r[0]?a.return:r[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,r[1])).done)return i;switch(a=0,i&&(r=[2&r[0],i.value]),r[0]){case 0:case 1:i=r;break;case 4:return o.label++,{value:r[1],done:!1};case 5:o.label++,a=r[1],r=[0];continue;case 7:r=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==r[0]&&2!==r[0])){o=0;continue}if(3===r[0]&&(!i||r[1]>i[0]&&r[1]0&&i[i.length-1])||6!==r[0]&&2!==r[0])){o=0;continue}if(3===r[0]&&(!i||r[1]>i[0]&&r[1]{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},23370:function(e,t,n){"use strict";var a=this&&this.__awaiter||function(e,t,n,a){return new(n||(n=Promise))((function(i,r){function o(e){try{l(a.next(e))}catch(e){r(e)}}function s(e){try{l(a.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}l((a=a.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,a,i,r,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return r={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function s(r){return function(s){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,a&&(i=2&r[0]?a.return:r[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,r[1])).done)return i;switch(a=0,i&&(r=[2&r[0],i.value]),r[0]){case 0:case 1:i=r;break;case 4:return o.label++,{value:r[1],done:!1};case 5:o.label++,a=r[1],r=[0];continue;case 7:r=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==r[0]&&2!==r[0])){o=0;continue}if(3===r[0]&&(!i||r[1]>i[0]&&r[1]this.maxSizeBytes?[4,this._createBackupFile(t)]:[3,14];case 13:return i.sent(),[3,16];case 14:return[4,c.appendFileAsync(this._fileFullPath,t)];case 15:i.sent(),i.label=16;case 16:return[3,18];case 17:return r=i.sent(),console.log(this.TAG,"Failed to create backup file: "+(r&&r.message)),[3,18];case 18:return[2]}}))}))},e.prototype._createBackupFile=function(e){return a(this,void 0,void 0,(function(){var t,n,a;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,3,4,5]),[4,c.readFileAsync(this._fileFullPath)];case 1:return t=i.sent(),n=l.join(this._tempDir,(new Date).getTime()+"."+this._logFileName),[4,c.writeFileAsync(n,t)];case 2:return i.sent(),[3,5];case 3:return a=i.sent(),console.log("Failed to generate backup log file",a),[3,5];case 4:return c.writeFileAsync(this._fileFullPath,e),[7];case 5:return[2]}}))}))},e.prototype._fileCleanupTask=function(){return a(this,void 0,void 0,(function(){var e,t,n,a,r,o=this;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,6,,7]),[4,c.readdirAsync(this._tempDir)];case 1:(e=(e=i.sent()).filter((function(e){return l.basename(e).indexOf(o._backUpNameFormat)>-1}))).sort((function(e,t){var n=new Date(parseInt(e.split(o._backUpNameFormat)[0])),a=new Date(parseInt(t.split(o._backUpNameFormat)[0]));return n=a?1:void 0})),t=e.length,n=0,i.label=2;case 2:return n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JsonConfig=void 0;var a=n(35747),i=n(85622),r=n(95282),o="APPINSIGHTS_INSTRUMENTATIONKEY",s=function(){function e(){this.connectionString=process.env.APPLICATIONINSIGHTS_CONNECTION_STRING,this.instrumentationKey=process.env[o]||process.env["APPSETTING_"+o]||process.env.APPINSIGHTS_INSTRUMENTATION_KEY||process.env.APPSETTING_APPINSIGHTS_INSTRUMENTATION_KEY,!this.connectionString&&this.instrumentationKey&&r.warn("APPINSIGHTS_INSTRUMENTATIONKEY is in path of deprecation, please use APPLICATIONINSIGHTS_CONNECTION_STRING env variable to setup the SDK."),this.disableAllExtendedMetrics=!!process.env.APPLICATION_INSIGHTS_DISABLE_ALL_EXTENDED_METRICS,this.extendedMetricDisablers=process.env.APPLICATION_INSIGHTS_DISABLE_EXTENDED_METRIC,this.proxyHttpUrl=process.env.http_proxy,this.proxyHttpsUrl=process.env.https_proxy,this.noDiagnosticChannel=!!process.env.APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL,this.disableStatsbeat=!!process.env.APPLICATION_INSIGHTS_NO_STATSBEAT,this.noHttpAgentKeepAlive=!!process.env.APPLICATION_INSIGHTS_NO_HTTP_AGENT_KEEP_ALIVE,this.noPatchModules=process.env.APPLICATION_INSIGHTS_NO_PATCH_MODULES||"",this.enableWebInstrumentation=!!process.env.APPLICATIONINSIGHTS_WEB_INSTRUMENTATION_ENABLED||!!process.env.APPLICATIONINSIGHTS_WEB_SNIPPET_ENABLED,this.webInstrumentationSrc=process.env.APPLICATIONINSIGHTS_WEB_INSTRUMENTATION_SOURCE||"",this.webInstrumentationConnectionString=process.env.APPLICATIONINSIGHTS_WEB_INSTRUMENTATION_CONNECTION_STRING||process.env.APPLICATIONINSIGHTS_WEB_SNIPPET_CONNECTION_STRING||"",this.enableAutoWebSnippetInjection=this.enableWebInstrumentation,this.webSnippetConnectionString=this.webInstrumentationConnectionString,this._loadJsonFile()}return e.getInstance=function(){return e._instance||(e._instance=new e),e._instance},e.prototype._loadJsonFile=function(){var e=i.join(__dirname,"../../"),t=i.join(e,"applicationinsights.json"),n=process.env.APPLICATIONINSIGHTS_CONFIGURATION_FILE;n&&(t=i.isAbsolute(n)?n:i.join(e,n));try{var o=JSON.parse(a.readFileSync(t,"utf8"));null!=o.disableStatsbeat&&(this.disableStatsbeat=o.disableStatsbeat),null!=o.disableAllExtendedMetrics&&(this.disableAllExtendedMetrics=o.disableStatsbeat),null!=o.noDiagnosticChannel&&(this.noDiagnosticChannel=o.noDiagnosticChannel),null!=o.noHttpAgentKeepAlive&&(this.noHttpAgentKeepAlive=o.noHttpAgentKeepAlive),null!=o.connectionString&&(this.connectionString=o.connectionString),null!=o.extendedMetricDisablers&&(this.extendedMetricDisablers=o.extendedMetricDisablers),null!=o.noDiagnosticChannel&&(this.noDiagnosticChannel=o.noDiagnosticChannel),null!=o.proxyHttpUrl&&(this.proxyHttpUrl=o.proxyHttpUrl),null!=o.proxyHttpsUrl&&(this.proxyHttpsUrl=o.proxyHttpsUrl),null!=o.proxyHttpsUrl&&(this.proxyHttpsUrl=o.proxyHttpsUrl),null!=o.noPatchModules&&(this.noPatchModules=o.noPatchModules),null!=o.enableAutoWebSnippetInjection&&(this.enableWebInstrumentation=o.enableAutoWebSnippetInjection,this.enableAutoWebSnippetInjection=this.enableWebInstrumentation),null!=o.enableWebInstrumentation&&(this.enableWebInstrumentation=o.enableWebInstrumentation,this.enableAutoWebSnippetInjection=this.enableWebInstrumentation),null!=o.webSnippetConnectionString&&(this.webInstrumentationConnectionString=o.webSnippetConnectionString,this.webSnippetConnectionString=this.webInstrumentationConnectionString),null!=o.webInstrumentationConnectionString&&(this.webInstrumentationConnectionString=o.webInstrumentationConnectionString,this.webSnippetConnectionString=this.webInstrumentationConnectionString),null!=o.webInstrumentationConfig&&(this.webInstrumentationConfig=o.webInstrumentationConfig),null!=o.webInstrumentationSrc&&(this.webInstrumentationSrc=o.webInstrumentationSrc),this.endpointUrl=o.endpointUrl,this.maxBatchSize=o.maxBatchSize,this.maxBatchIntervalMs=o.maxBatchIntervalMs,this.disableAppInsights=o.disableAppInsights,this.samplingPercentage=o.samplingPercentage,this.correlationIdRetryIntervalMs=o.correlationIdRetryIntervalMs,this.correlationHeaderExcludedDomains=o.correlationHeaderExcludedDomains,this.ignoreLegacyHeaders=o.ignoreLegacyHeaders,this.distributedTracingMode=o.distributedTracingMode,this.enableAutoCollectExternalLoggers=o.enableAutoCollectExternalLoggers,this.enableAutoCollectConsole=o.enableAutoCollectConsole,this.enableAutoCollectExceptions=o.enableAutoCollectExceptions,this.enableAutoCollectPerformance=o.enableAutoCollectPerformance,this.enableAutoCollectExtendedMetrics=o.enableAutoCollectExtendedMetrics,this.enableAutoCollectPreAggregatedMetrics=o.enableAutoCollectPreAggregatedMetrics,this.enableAutoCollectHeartbeat=o.enableAutoCollectHeartbeat,this.enableAutoCollectRequests=o.enableAutoCollectRequests,this.enableAutoCollectDependencies=o.enableAutoCollectDependencies,this.enableAutoDependencyCorrelation=o.enableAutoDependencyCorrelation,this.enableUseAsyncHooks=o.enableUseAsyncHooks,this.enableUseDiskRetryCaching=o.enableUseDiskRetryCaching,this.enableResendInterval=o.enableResendInterval,this.enableMaxBytesOnDisk=o.enableMaxBytesOnDisk,this.enableInternalDebugLogging=o.enableInternalDebugLogging,this.enableInternalWarningLogging=o.enableInternalWarningLogging,this.enableSendLiveMetrics=o.enableSendLiveMetrics,this.quickPulseHost=o.quickPulseHost}catch(e){r.info("Missing or invalid JSON config file: ",e)}},e}();t.JsonConfig=s},95282:(e,t,n)=>{"use strict";var a=n(23370),i=function(){function e(){}return e.info=function(e){for(var t=[],n=1;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getResourceProvider=t.getOsPrefix=t.isFunctionApp=t.isWebApp=t.isLinux=t.isWindows=void 0,t.isWindows=function(){return"win32"===process.platform},t.isLinux=function(){return"linux"===process.platform},t.isWebApp=function(){return!!process.env.WEBSITE_SITE_NAME},t.isFunctionApp=function(){return!!process.env.FUNCTIONS_WORKER_RUNTIME},t.getOsPrefix=function(){return t.isWindows()?"w":t.isLinux()?"l":"u"},t.getResourceProvider=function(){return t.isWebApp()?"a":t.isFunctionApp()?"f":"u"}},87148:function(e,t,n){"use strict";var a=this&&this.__assign||function(){return(a=Object.assign||function(e){for(var t,n=1,a=arguments.length;n0?t:null,InstrumentationKey:n.instrumentationKey||"",Metrics:e.length>0?e:null,InvariantVersion:1,Timestamp:"/Date("+Date.now()+")/",Version:a.tags[a.keys.internalSdkVersion],StreamId:c,MachineName:r,Instance:o,RoleName:s}},e.createQuickPulseMetric=function(e){return{Name:e.name,Value:e.value,Weight:e.count||1}},e.telemetryEnvelopeToQuickPulseDocument=function(t){switch(t.data.baseType){case r.TelemetryTypeString.Event:return e.createQuickPulseEventDocument(t);case r.TelemetryTypeString.Exception:return e.createQuickPulseExceptionDocument(t);case r.TelemetryTypeString.Trace:return e.createQuickPulseTraceDocument(t);case r.TelemetryTypeString.Dependency:return e.createQuickPulseDependencyDocument(t);case r.TelemetryTypeString.Request:return e.createQuickPulseRequestDocument(t)}return null},e.createQuickPulseEventDocument=function(t){var n=e.createQuickPulseDocument(t),i=t.data.baseData.name;return a(a({},n),{Name:i})},e.createQuickPulseTraceDocument=function(t){var n=e.createQuickPulseDocument(t),i=t.data.baseData.severityLevel||0;return a(a({},n),{Message:t.data.baseData.message,SeverityLevel:r.SeverityLevel[i]})},e.createQuickPulseExceptionDocument=function(t){var n=e.createQuickPulseDocument(t),i=t.data.baseData.exceptions,r="",o="",s="";return i&&i.length>0&&(i[0].parsedStack&&i[0].parsedStack.length>0?i[0].parsedStack.forEach((function(e){r+=e.assembly+"\n"})):i[0].stack&&i[0].stack.length>0&&(r=i[0].stack),o=i[0].message,s=i[0].typeName),a(a({},n),{Exception:r,ExceptionMessage:o,ExceptionType:s})},e.createQuickPulseRequestDocument=function(t){var n=e.createQuickPulseDocument(t),i=t.data.baseData;return a(a({},n),{Name:i.name,Success:i.success,Duration:i.duration,ResponseCode:i.responseCode,OperationName:i.name})},e.createQuickPulseDependencyDocument=function(t){var n=e.createQuickPulseDocument(t),i=t.data.baseData;return a(a({},n),{Name:i.name,Target:i.target,Success:i.success,Duration:i.duration,ResultCode:i.resultCode,CommandName:i.data,OperationName:n.OperationId,DependencyTypeName:i.type})},e.createQuickPulseDocument=function(t){var n,a;return t.data.baseType?(a=o.TelemetryTypeStringToQuickPulseType[t.data.baseType],n=o.TelemetryTypeStringToQuickPulseDocumentType[t.data.baseType]):l.warn("Document type invalid; not sending live metric document",t.data.baseType),{DocumentType:n,__type:a,OperationId:t.tags[e.keys.operationId],Version:"1.0",Properties:e.aggregateProperties(t)}},e.aggregateProperties=function(e){var t=[],n=e.data.baseData.measurements||{};for(var a in n)if(n.hasOwnProperty(a)){var i={key:a,value:n[a]};t.push(i)}var r=e.data.baseData.properties||{};for(var a in r)r.hasOwnProperty(a)&&(i={key:a,value:r[a]},t.push(i));return t},e.keys=new r.ContextTagKeys,e}();e.exports=p},59184:function(e,t,n){"use strict";var a=this&&this.__awaiter||function(e,t,n,a){return new(n||(n=Promise))((function(i,r){function o(e){try{l(a.next(e))}catch(e){r(e)}}function s(e){try{l(a.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}l((a=a.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,a,i,r,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return r={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function s(r){return function(s){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,a&&(i=2&r[0]?a.return:r[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,r[1])).done)return i;switch(a=0,i&&(r=[2&r[0],i.value]),r[0]){case 0:case 1:i=r;break;case 4:return o.label++,{value:r[1],done:!1};case 5:o.label++,a=r[1],r=[0];continue;case 7:r=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==r[0]&&2!==r[0])){o=0;continue}if(3===r[0]&&(!i||r[1]>i[0]&&r[1]0?n:this._config.quickPulseHost,E.method="POST",E.path="/QuickPulseService.svc/"+h+"?ikey="+this._config.instrumentationKey,E.headers=((S={Expect:"100-continue"})["x-ms-qps-transmission-time"]=l.getTransmissionTime(),S["Content-Type"]="application/json",S["Content-Length"]=Buffer.byteLength(a),S),g=E,_&&_.length>0&&_.forEach((function(e){return g.headers[e.name]=e.value})),"post"!==h)return[3,4];if(!(f=this._getAuthorizationHandler?this._getAuthorizationHandler(this._config):null))return[3,4];i.label=1;case 1:return i.trys.push([1,3,,4]),[4,f.addAuthorizationHeader(g)];case 2:return i.sent(),[3,4];case 3:return v=i.sent(),s.info(e.TAG,"Failed to get AAD bearer token for the Application. Error:",v),[2];case 4:return this._config.httpsAgent?g.agent=this._config.httpsAgent:g.agent=c.tlsRestrictedAgent,(b=r.request(g,(function(e){if(200==e.statusCode){var t="true"===e.headers["x-ms-qps-subscribed"],n=null;try{n=e.headers[u]?new p.URL(e.headers[u].toString()).host:null}catch(e){y._onError("Failed to parse redirect header from QuickPulse: "+c.dumpObj(e))}var a=e.headers[d]?parseInt(e.headers[d].toString()):null;y._consecutiveErrors=0,m(t,e,n,a)}else y._onError("StatusCode:"+e.statusCode+" StatusMessage:"+e.statusMessage),m()}))).on("error",(function(e){y._onError(e),m()})),b.write(a),b.end(),[2]}}))}))},e.prototype._onError=function(t){this._consecutiveErrors++;var n="Transient error connecting to the Live Metrics endpoint. This packet will not appear in your Live Metrics Stream. Error:";this._consecutiveErrors%e.MAX_QPS_FAILURES_BEFORE_WARN==0?(n="Live Metrics endpoint could not be reached "+this._consecutiveErrors+" consecutive times. Most recent error:",s.warn(e.TAG,n,t)):s.info(e.TAG,n,t)},e.TAG="QuickPulseSender",e.MAX_QPS_FAILURES_BEFORE_WARN=25,e}();e.exports=m},83668:function(e,t,n){"use strict";var a=this&&this.__awaiter||function(e,t,n,a){return new(n||(n=Promise))((function(i,r){function o(e){try{l(a.next(e))}catch(e){r(e)}}function s(e){try{l(a.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}l((a=a.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,a,i,r,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return r={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function s(r){return function(s){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,a&&(i=2&r[0]?a.return:r[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,r[1])).done)return i;switch(a=0,i&&(r=[2&r[0],i.value]),r[0]){case 0:case 1:i=r;break;case 4:return o.label++,{value:r[1],done:!1};case 5:o.label++,a=r[1],r=[0];continue;case 7:r=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==r[0]&&2!==r[0])){o=0;continue}if(3===r[0]&&(!i||r[1]>i[0]&&r[1]0?this._pollingIntervalHint:e.PING_INTERVAL,r=this._isCollectingData?e.POST_INTERVAL:a,this._isCollectingData&&Date.now()-this._lastSuccessTime>=e.MAX_POST_WAIT_TIME&&!this._lastSendSucceeded?(this._isCollectingData=!1,r=e.FALLBACK_INTERVAL):!this._isCollectingData&&Date.now()-this._lastSuccessTime>=e.MAX_PING_WAIT_TIME&&!this._lastSendSucceeded&&(r=e.FALLBACK_INTERVAL),this._lastSendSucceeded=null,this._handle=setTimeout(this._goQuickPulse.bind(this),r),this._handle.unref(),[2]}}))}))},e.prototype._ping=function(e){this._sender.ping(e,this._redirectedHost,this._quickPulseDone.bind(this))},e.prototype._post=function(e){return a(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this._sender.post(e,this._redirectedHost,this._quickPulseDone.bind(this))];case 1:return t.sent(),[2]}}))}))},e.prototype._quickPulseDone=function(e,t,n,a){null!=e?(this._isCollectingData!==e&&(r.info("Live Metrics sending data",e),this.enableCollectors(e)),this._isCollectingData=e,n&&n.length>0&&(this._redirectedHost=n,r.info("Redirecting endpoint to: ",n)),a&&a>0&&(this._pollingIntervalHint=a),t&&t.statusCode<300&&t.statusCode>=200?(this._lastSuccessTime=Date.now(),this._lastSendSucceeded=!0):this._lastSendSucceeded=!1):this._lastSendSucceeded=!1},e.MAX_POST_WAIT_TIME=2e4,e.MAX_PING_WAIT_TIME=6e4,e.FALLBACK_INTERVAL=6e4,e.PING_INTERVAL=5e3,e.POST_INTERVAL=1e3,e}();e.exports=p},3751:e=>{"use strict";e.exports={getTransmissionTime:function(){return 1e4*(Date.now()+621355968e5)}}},59036:e=>{"use strict";e.exports={requestContextHeader:"request-context",requestContextSourceKey:"appId",requestContextTargetKey:"appId",requestIdHeader:"request-id",parentIdHeader:"x-ms-request-id",rootIdHeader:"x-ms-request-root-id",correlationContextHeader:"correlation-context",traceparentHeader:"traceparent",traceStateHeader:"tracestate"}},82588:function(e,t,n){"use strict";var a=this&&this.__awaiter||function(e,t,n,a){return new(n||(n=Promise))((function(i,r){function o(e){try{l(a.next(e))}catch(e){r(e)}}function s(e){try{l(a.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}l((a=a.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,a,i,r,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return r={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function s(r){return function(s){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,a&&(i=2&r[0]?a.return:r[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,r[1])).done)return i;switch(a=0,i&&(r=[2&r[0],i.value]),r[0]){case 0:case 1:i=r;break;case 4:return o.label++,{value:r[1],done:!1};case 5:o.label++,a=r[1],r=[0];continue;case 7:r=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==r[0]&&2!==r[0])){o=0;continue}if(3===r[0]&&(!i||r[1]>i[0]&&r[1]=0&&(this._resendInterval=Math.floor(n)),"number"==typeof a&&a>=0&&(this._maxBytesOnDisk=Math.floor(a)),t&&!_.FileAccessControl.OS_PROVIDES_FILE_PROTECTION&&(this._enableDiskRetryMode=!1,this._logWarn("Ignoring request to enable disk retry mode. Sufficient file protection capabilities were not detected.")),this._enableDiskRetryMode?(this._statsbeat&&this._statsbeat.addFeature(c.StatsbeatFeature.DISK_RETRY),this._fileCleanupTimer||(this._fileCleanupTimer=setTimeout((function(){i._fileCleanupTask()}),e.CLEANUP_TIMEOUT),this._fileCleanupTimer.unref())):(this._statsbeat&&this._statsbeat.removeFeature(c.StatsbeatFeature.DISK_RETRY),this._fileCleanupTimer&&clearTimeout(this._fileCleanupTimer))},e.prototype.send=function(t,n){return a(this,void 0,void 0,(function(){var a,r,o,s,d,h,_,f,v=this;return i(this,(function(i){switch(i.label){case 0:if(!t)return[3,5];if(a=this._redirectedHost||this._config.endpointUrl,r=new m.URL(a).hostname,o={method:"POST",withCredentials:!1,headers:{"Content-Type":"application/x-json-stream"}},!(s=this._getAuthorizationHandler?this._getAuthorizationHandler(this._config):null))return[3,4];this._statsbeat&&this._statsbeat.addFeature(c.StatsbeatFeature.AAD_HANDLING),i.label=1;case 1:return i.trys.push([1,3,,4]),[4,s.addAuthorizationHeader(o)];case 2:return i.sent(),[3,4];case 3:return d=i.sent(),h="Failed to get AAD bearer token for the Application.",this._enableDiskRetryMode&&(h+="This batch of telemetry items will be retried. ",this._storeToDisk(t)),h+="Error:"+d.toString(),this._logWarn(h),"function"==typeof n&&n(h),[2];case 4:_="",t.forEach((function(e){var t=u.stringify(e);"string"==typeof t&&(_+=t+"\n")})),_.length>0&&(_=_.substring(0,_.length-1)),f=Buffer.from?Buffer.from(_):new Buffer(_),l.gzip(f,(function(i,s){var l=s;i?(v._logWarn(u.dumpObj(i)),l=f,o.headers["Content-Length"]=f.length.toString()):(o.headers["Content-Encoding"]="gzip",o.headers["Content-Length"]=s.length.toString()),v._logInfo(u.dumpObj(o)),o[p.disableCollectionRequestOption]=!0;var d=+new Date,m=u.makeRequest(v._config,a,o,(function(e){e.setEncoding("utf-8");var a="";e.on("data",(function(e){a+=e})),e.on("end",(function(){var i=+new Date-d;if(v._numConsecutiveFailures=0,v._isStatsbeatSender&&!v._statsbeatHasReachedIngestionAtLeastOnce&&(g.includes(e.statusCode)?v._statsbeatHasReachedIngestionAtLeastOnce=!0:v._statsbeatFailedToIngest()),v._statsbeat&&(402==e.statusCode||439==e.statusCode?v._statsbeat.countThrottle(c.StatsbeatNetworkCategory.Breeze,r,e.statusCode):v._statsbeat.countRequest(c.StatsbeatNetworkCategory.Breeze,r,i,200===e.statusCode,e.statusCode)),v._enableDiskRetryMode)if(200===e.statusCode)v._resendTimer||(v._resendTimer=setTimeout((function(){v._resendTimer=null,v._sendFirstFileOnDisk()}),v._resendInterval),v._resendTimer.unref());else if(v._isRetriable(e.statusCode))try{v._statsbeat&&v._statsbeat.countRetry(c.StatsbeatNetworkCategory.Breeze,r,e.statusCode);var o=JSON.parse(a),s=[];o.errors&&(o.errors.forEach((function(e){429!=e.statusCode&&500!=e.statusCode&&503!=e.statusCode||s.push(t[e.index])})),s.length>0&&v._storeToDisk(s))}catch(e){v._storeToDisk(t)}if(307===e.statusCode||308===e.statusCode)if(v._numConsecutiveRedirects++,v._numConsecutiveRedirects<10){var l=e.headers.location?e.headers.location.toString():null;l&&(v._redirectedHost=l,v.send(t,n))}else v._statsbeat&&v._statsbeat.countException(c.StatsbeatNetworkCategory.Breeze,r,{name:"Circular Redirect",message:"Error sending telemetry because of circular redirects."}),"function"==typeof n&&n("Error sending telemetry because of circular redirects.");else v._numConsecutiveRedirects=0,"function"==typeof n&&n(a),v._logInfo(a),"function"==typeof v._onSuccess&&v._onSuccess(a)}))}));m.setTimeout(e.HTTP_TIMEOUT,(function(){v._requestTimedOut=!0,m.abort()})),m.on("error",(function(a){if(v._isStatsbeatSender&&!v._statsbeatHasReachedIngestionAtLeastOnce&&v._statsbeatFailedToIngest(),v._numConsecutiveFailures++,v._statsbeat&&v._statsbeat.countException(c.StatsbeatNetworkCategory.Breeze,r,a),!v._enableDiskRetryMode||v._numConsecutiveFailures>0&&v._numConsecutiveFailures%e.MAX_CONNECTION_FAILURES_BEFORE_WARN==0){var i="Ingestion endpoint could not be reached. This batch of telemetry items has been lost. Use Disk Retry Caching to enable resending of failed telemetry. Error:";v._enableDiskRetryMode&&(i="Ingestion endpoint could not be reached "+v._numConsecutiveFailures+" consecutive times. There may be resulting telemetry loss. Most recent error:"),v._logWarn(i,u.dumpObj(a))}else i="Transient failure to reach ingestion endpoint. This batch of telemetry items will be retried. Error:",v._logInfo(i,u.dumpObj(a));v._onErrorHelper(a),"function"==typeof n&&(a?(v._requestTimedOut&&(a.name="telemetry timeout",a.message="telemetry request timed out"),n(u.dumpObj(a))):n("Error sending telemetry")),v._enableDiskRetryMode&&v._storeToDisk(t)})),m.write(l),m.end()})),i.label=5;case 5:return[2]}}))}))},e.prototype.saveOnCrash=function(e){this._enableDiskRetryMode&&this._storeToDiskSync(u.stringify(e))},e.prototype._isRetriable=function(e){return 206===e||401===e||403===e||408===e||429===e||500===e||502===e||503===e||504===e},e.prototype._logInfo=function(t){for(var n=[],a=1;a=3&&this._shutdownStatsbeat())},e.prototype._storeToDisk=function(e){return a(this,void 0,void 0,(function(){var t,n,a,r,o,l,c;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),this._logInfo("Checking existence of data storage directory: "+this._tempDir),[4,d.confirmDirExists(this._tempDir)];case 1:return i.sent(),[3,3];case 2:return t=i.sent(),this._logWarn("Failed to create folder to put telemetry: "+u.dumpObj(t)),this._onErrorHelper(t),[2];case 3:return i.trys.push([3,5,,6]),[4,_.FileAccessControl.applyACLRules(this._tempDir)];case 4:return i.sent(),[3,6];case 5:return n=i.sent(),this._logWarn("Failed to apply file access control to folder: "+u.dumpObj(n)),this._onErrorHelper(n),[2];case 6:return i.trys.push([6,8,,9]),[4,d.getShallowDirectorySize(this._tempDir)];case 7:return(a=i.sent())>this._maxBytesOnDisk?(this._logWarn("Not saving data due to max size limit being met. Directory size in bytes is: "+a),[2]):[3,9];case 8:return r=i.sent(),this._logWarn("Failed to read directory for retriable telemetry: "+u.dumpObj(r)),this._onErrorHelper(r),[2];case 9:return i.trys.push([9,11,,12]),o=(new Date).getTime()+".ai.json",l=s.join(this._tempDir,o),this._logInfo("saving data to disk at: "+l),[4,d.writeFileAsync(l,u.stringify(e),{mode:384})];case 10:return i.sent(),[3,12];case 11:return c=i.sent(),this._logWarn("Failed to persist telemetry to disk: "+u.dumpObj(c)),this._onErrorHelper(c),[2];case 12:return[2]}}))}))},e.prototype._storeToDiskSync=function(e){try{this._logInfo("Checking existence of data storage directory: "+this._tempDir),r.existsSync(this._tempDir)||r.mkdirSync(this._tempDir),_.FileAccessControl.applyACLRulesSync(this._tempDir);var t=d.getShallowDirectorySizeSync(this._tempDir);if(t>this._maxBytesOnDisk)return void this._logInfo("Not saving data due to max size limit being met. Directory size in bytes is: "+t);var n=(new Date).getTime()+".ai.json",a=s.join(this._tempDir,n);this._logInfo("saving data before crash to disk at: "+a),r.writeFileSync(a,e,{mode:384})}catch(e){this._logWarn("Error while saving data to disk: "+u.dumpObj(e)),this._onErrorHelper(e)}},e.prototype._sendFirstFileOnDisk=function(){return a(this,void 0,void 0,(function(){var e,t,n,a,r,o;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,6,,7]),[4,d.readdirAsync(this._tempDir)];case 1:return(e=(e=i.sent()).filter((function(e){return s.basename(e).indexOf(".ai.json")>-1}))).length>0?(t=e[0],n=s.join(this._tempDir,t),[4,d.readFileAsync(n)]):[3,5];case 2:return a=i.sent(),[4,d.unlinkAsync(n)];case 3:return i.sent(),r=JSON.parse(a.toString()),[4,this.send(r)];case 4:i.sent(),i.label=5;case 5:return[3,7];case 6:return o=i.sent(),this._onErrorHelper(o),[3,7];case 7:return[2]}}))}))},e.prototype._onErrorHelper=function(e){"function"==typeof this._onError&&this._onError(e)},e.prototype._fileCleanupTask=function(){return a(this,void 0,void 0,(function(){var t,n,a,r,o,l=this;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,6,,7]),[4,d.readdirAsync(this._tempDir)];case 1:if(!((t=(t=i.sent()).filter((function(e){return s.basename(e).indexOf(".ai.json")>-1}))).length>0))return[3,5];n=0,i.label=2;case 2:return na?(r=s.join(this._tempDir,t[n]),[4,d.unlinkAsync(r).catch((function(e){l._onErrorHelper(e)}))]):[3,4]):[3,5];case 3:i.sent(),i.label=4;case 4:return n++,[3,2];case 5:return[3,7];case 6:return"ENOENT"!=(o=i.sent()).code&&this._onErrorHelper(o),[3,7];case 7:return[2]}}))}))},e.TAG="Sender",e.WAIT_BETWEEN_RESEND=6e4,e.MAX_BYTES_ON_DISK=52428800,e.MAX_CONNECTION_FAILURES_BEFORE_WARN=5,e.CLEANUP_TIMEOUT=36e5,e.FILE_RETEMPTION_PERIOD=6048e5,e.TEMPDIR_PREFIX="appInsights-node",e.HTTP_TIMEOUT=2e4,e}();e.exports=f},82570:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isContentTypeHeaderHtml=t.insertSnippetByIndex=t.getContentEncodingFromHeaders=t.isSupportedContentEncoding=t.findBufferEncodingType=t.isBufferType=t.getBrotliDecompressSync=t.getBrotliDecompressAsync=t.getBrotliCompressSync=t.getBrotliCompressAsync=t.inflateAsync=t.deflateAsync=t.gunzipAsync=t.gzipAsync=t.isBrotliSupperted=t.bufferEncodingTypes=t.contentEncodingMethod=void 0;var a,i=n(78761),r=n(31669);!function(e){e.GZIP="gzip",e.DEFLATE="deflate",e.BR="br"}(a=t.contentEncodingMethod||(t.contentEncodingMethod={})),t.bufferEncodingTypes=["utf8","utf16le","latin1","base64","hex","ascii","binary","ucs2"],t.isBrotliSupperted=function(){var e=process.versions.node.split(".")[0];return parseInt(e)>=10},t.gzipAsync=r.promisify(i.gzip),t.gunzipAsync=r.promisify(i.gunzip),t.deflateAsync=r.promisify(i.deflate),t.inflateAsync=r.promisify(i.inflate),t.getBrotliCompressAsync=function(e){return t.isBrotliSupperted()&&"function"==typeof e.brotliCompress?r.promisify(e.brotliCompress):null},t.getBrotliCompressSync=function(e){return t.isBrotliSupperted()&&"function"==typeof e.brotliCompressSync?e.brotliCompressSync:null},t.getBrotliDecompressAsync=function(e){return t.isBrotliSupperted()&&"function"==typeof e.brotliDecompress?r.promisify(e.brotliDecompress):null},t.getBrotliDecompressSync=function(e){return t.isBrotliSupperted()&&"function"==typeof e.brotliDecompressSync?e.brotliDecompressSync:null},t.isBufferType=function(e,t){var n=t||"utf8",a=!1;return Buffer.isEncoding(n)&&(a=Buffer.from(e.toString(n),n).toJSON().data.toString()===e.toJSON().data.toString()),a},t.findBufferEncodingType=function(e){var n=null;for(var a in t.bufferEncodingTypes){var i=t.bufferEncodingTypes[a];if(Buffer.isEncoding(i)&&t.isBufferType(e,i)){n=i;break}}return n},t.isSupportedContentEncoding=function(e){var t=null;switch(e){case"gzip":t=a.GZIP;break;case"br":t=a.BR;break;case"deflate":t=a.DEFLATE}return t},t.getContentEncodingFromHeaders=function(e){var n=[],a=e.getHeader("Content-Encoding");if(!a)return null;if("string"==typeof a){var i=t.isSupportedContentEncoding(a);i&&n.push(i)}return n},t.insertSnippetByIndex=function(e,t,n){return e<0?null:t.substring(0,e)+'