@launchdarkly/observability 1.0.1 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/dist/index.js +3058 -2949
- package/dist/index.js.map +1 -1
- package/dist/index.umd.js +61 -61
- package/dist/index.umd.js.map +1 -1
- package/package.json +2 -2
package/dist/index.umd.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
(function(
|
|
2
|
-
`,l=
|
|
3
|
-
`)}function
|
|
1
|
+
(function(rt,Te){typeof exports=="object"&&typeof module<"u"?Te(exports):typeof define=="function"&&define.amd?define(["exports"],Te):(rt=typeof globalThis<"u"?globalThis:rt||self,Te(rt.Observability={}))})(this,function(rt){"use strict";var Te=Object.defineProperty,Oc=(t,e,n)=>e in t?Te(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,mt=(t,e,n)=>Oc(t,typeof e!="symbol"?e+"":e,n),Sc=(t,e,n)=>new Promise((r,i)=>{var o=c=>{try{u(n.next(c))}catch(s){i(s)}},a=c=>{try{u(n.throw(c))}catch(s){i(s)}},u=c=>c.done?r(c.value):Promise.resolve(c.value).then(o,a);u((n=n.apply(t,e)).next())});const mo=Object.create(null),Tt=(t,e,...n)=>{const r=`[@launchdarkly plugins]: (${t}): `;console[e].apply(console,[r,...n]),wc(r,...n)},bt=(t,e,n,...r)=>{mo[`${t}-${e}`]||(mo[`${t}-${e}`]=!0,Tt(t,n,...r))},wc=(t,...e)=>Sc(void 0,null,function*(){try{const{LDObserve:n}=yield Promise.resolve().then(()=>Hp);n.recordLog(`${t}${e}`,"warn")}catch{}});class Ac{constructor(e,n){mt(this,"debug"),mt(this,"name"),this.debug=e,this.name=n}log(...e){if(this.debug){let n=`[${Date.now()}]`;this.name&&(n+=` - ${this.name}`),console.log.apply(console,[n,...e])}}warn(...e){let n=`[${Date.now()}]`;this.name&&(n+=` - ${this.name}`),console.warn.apply(console,[n,...e])}}let _o=class{constructor(){mt(this,"_sdk"),mt(this,"_isLoaded",!1),mt(this,"_callBuffer",[]),mt(this,"_capacity",1e5),mt(this,"_droppedEvents",0),mt(this,"_exceededCapacity",!1),mt(this,"_logger",new Ac)}_bufferCall(e,n){if(this._isLoaded)try{return this._sdk[e](...n)}catch(r){Tt(`Error executing buffered call to ${e}:`,"error",r)}else{this._enqueue({method:e,args:n});return}}_enqueue(e){this._callBuffer.length<this._capacity?(this._callBuffer.push(e),this._exceededCapacity=!1):(this._exceededCapacity||(this._exceededCapacity=!0,Tt("Exceeded event queue capacity. Increase capacity to avoid dropping events.","warn")),this._droppedEvents+=1)}load(e){this._sdk=e,this._isLoaded=!0;for(const{method:n,args:r}of this._callBuffer)try{this._sdk[n](...r)}catch(i){Tt(`Error executing buffered call to ${n}:`,"error",i)}this._callBuffer=[]}};var Lc=Object.defineProperty,Rc=Object.defineProperties,Cc=Object.getOwnPropertyDescriptors,rn=Object.getOwnPropertySymbols,go=Object.prototype.hasOwnProperty,Eo=Object.prototype.propertyIsEnumerable,rr=(t,e,n)=>e in t?Lc(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,N=(t,e)=>{for(var n in e||(e={}))go.call(e,n)&&rr(t,n,e[n]);if(rn)for(var n of rn(e))Eo.call(e,n)&&rr(t,n,e[n]);return t},on=(t,e)=>Rc(t,Cc(e)),be=(t,e)=>{var n={};for(var r in t)go.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&rn)for(var r of rn(t))e.indexOf(r)<0&&Eo.call(t,r)&&(n[r]=t[r]);return n},Oe=(t,e,n)=>rr(t,typeof e!="symbol"?e+"":e,n),Zt=(t,e,n)=>new Promise((r,i)=>{var o=c=>{try{u(n.next(c))}catch(s){i(s)}},a=c=>{try{u(n.throw(c))}catch(s){i(s)}},u=c=>c.done?r(c.value):Promise.resolve(c.value).then(o,a);u((n=n.apply(t,e)).next())});function an(t,e){throw new Error(e)}function Nc(t){return typeof t=="object"&&t!==null}function xc(t,e){throw new Error("Unexpected invariant triggered.")}const Pc=/\r\n|[\n\r]/g;function ir(t,e){let n=0,r=1;for(const i of t.body.matchAll(Pc)){if(typeof i.index=="number"||xc(),i.index>=e)break;n=i.index+i[0].length,r+=1}return{line:r,column:e+1-n}}function Ic(t){return To(t.source,ir(t.source,t.start))}function To(t,e){const n=t.locationOffset.column-1,r="".padStart(n)+t.body,i=e.line-1,o=t.locationOffset.line-1,a=e.line+o,u=e.line===1?n:0,c=e.column+u,s=`${t.name}:${a}:${c}
|
|
2
|
+
`,l=r.split(/\r\n|[\n\r]/g),p=l[i];if(p.length>120){const f=Math.floor(c/80),y=c%80,v=[];for(let m=0;m<p.length;m+=80)v.push(p.slice(m,m+80));return s+bo([[`${a} |`,v[0]],...v.slice(1,f+1).map(m=>["|",m]),["|","^".padStart(y)],["|",v[f+1]]])}return s+bo([[`${a-1} |`,l[i-1]],[`${a} |`,p],["|","^".padStart(c)],[`${a+1} |`,l[i+1]]])}function bo(t){const e=t.filter(([r,i])=>i!==void 0),n=Math.max(...e.map(([r])=>r.length));return e.map(([r,i])=>r.padStart(n)+(i?" "+i:"")).join(`
|
|
3
|
+
`)}function Mc(t){const e=t[0];return e==null||"kind"in e||"length"in e?{nodes:e,source:t[1],positions:t[2],path:t[3],originalError:t[4],extensions:t[5]}:e}let kc=class bc extends Error{constructor(e,...n){var r,i,o;const{nodes:a,source:u,positions:c,path:s,originalError:l,extensions:p}=Mc(n);super(e),this.name="GraphQLError",this.path=s??void 0,this.originalError=l??void 0,this.nodes=Oo(Array.isArray(a)?a:a?[a]:void 0);const f=Oo((r=this.nodes)===null||r===void 0?void 0:r.map(v=>v.loc).filter(v=>v!=null));this.source=u??(f==null||(i=f[0])===null||i===void 0?void 0:i.source),this.positions=c??f?.map(v=>v.start),this.locations=c&&u?c.map(v=>ir(u,v)):f?.map(v=>ir(v.source,v.start));const y=Nc(l?.extensions)?l?.extensions:void 0;this.extensions=(o=p??y)!==null&&o!==void 0?o:Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),l!=null&&l.stack?Object.defineProperty(this,"stack",{value:l.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,bc):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let e=this.message;if(this.nodes)for(const n of this.nodes)n.loc&&(e+=`
|
|
4
4
|
|
|
5
|
-
`+
|
|
5
|
+
`+Ic(n.loc));else if(this.source&&this.locations)for(const n of this.locations)e+=`
|
|
6
6
|
|
|
7
|
-
`+
|
|
8
|
-
`),p+=
|
|
9
|
-
`),'"""'+p+'"""'}var d;(function(t){t.SOF="<SOF>",t.EOF="<EOF>",t.BANG="!",t.DOLLAR="$",t.AMP="&",t.PAREN_L="(",t.PAREN_R=")",t.SPREAD="...",t.COLON=":",t.EQUALS="=",t.AT="@",t.BRACKET_L="[",t.BRACKET_R="]",t.BRACE_L="{",t.PIPE="|",t.BRACE_R="}",t.NAME="Name",t.INT="Int",t.FLOAT="Float",t.STRING="String",t.BLOCK_STRING="BlockString",t.COMMENT="Comment"})(d||(d={}));let
|
|
10
|
-
`,size:2};case 114:return{value:"\r",size:2};case 116:return{value:" ",size:2}}throw
|
|
11
|
-
`));return t.line+=c.length-1,t.lineStart=i,l}if(s===92&&
|
|
7
|
+
`+To(this.source,n);return e}toJSON(){const e={message:this.message};return this.locations!=null&&(e.locations=this.locations),this.path!=null&&(e.path=this.path),this.extensions!=null&&Object.keys(this.extensions).length>0&&(e.extensions=this.extensions),e}};function Oo(t){return t===void 0||t.length===0?void 0:t}function G(t,e,n){return new kc(`Syntax Error: ${n}`,{source:t,positions:[e]})}let Dc=class{constructor(e,n,r){this.start=e.start,this.end=n.end,this.startToken=e,this.endToken=n,this.source=r}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}},So=class{constructor(e,n,r,i,o,a){this.kind=e,this.start=n,this.end=r,this.line=i,this.column=o,this.value=a,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}};const wo={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},Uc=new Set(Object.keys(wo));function Ao(t){const e=t?.kind;return typeof e=="string"&&Uc.has(e)}var te;(function(t){t.QUERY="query",t.MUTATION="mutation",t.SUBSCRIPTION="subscription"})(te||(te={}));var or;(function(t){t.QUERY="QUERY",t.MUTATION="MUTATION",t.SUBSCRIPTION="SUBSCRIPTION",t.FIELD="FIELD",t.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",t.FRAGMENT_SPREAD="FRAGMENT_SPREAD",t.INLINE_FRAGMENT="INLINE_FRAGMENT",t.VARIABLE_DEFINITION="VARIABLE_DEFINITION",t.SCHEMA="SCHEMA",t.SCALAR="SCALAR",t.OBJECT="OBJECT",t.FIELD_DEFINITION="FIELD_DEFINITION",t.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",t.INTERFACE="INTERFACE",t.UNION="UNION",t.ENUM="ENUM",t.ENUM_VALUE="ENUM_VALUE",t.INPUT_OBJECT="INPUT_OBJECT",t.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION"})(or||(or={}));var O;(function(t){t.NAME="Name",t.DOCUMENT="Document",t.OPERATION_DEFINITION="OperationDefinition",t.VARIABLE_DEFINITION="VariableDefinition",t.SELECTION_SET="SelectionSet",t.FIELD="Field",t.ARGUMENT="Argument",t.FRAGMENT_SPREAD="FragmentSpread",t.INLINE_FRAGMENT="InlineFragment",t.FRAGMENT_DEFINITION="FragmentDefinition",t.VARIABLE="Variable",t.INT="IntValue",t.FLOAT="FloatValue",t.STRING="StringValue",t.BOOLEAN="BooleanValue",t.NULL="NullValue",t.ENUM="EnumValue",t.LIST="ListValue",t.OBJECT="ObjectValue",t.OBJECT_FIELD="ObjectField",t.DIRECTIVE="Directive",t.NAMED_TYPE="NamedType",t.LIST_TYPE="ListType",t.NON_NULL_TYPE="NonNullType",t.SCHEMA_DEFINITION="SchemaDefinition",t.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",t.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",t.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",t.FIELD_DEFINITION="FieldDefinition",t.INPUT_VALUE_DEFINITION="InputValueDefinition",t.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",t.UNION_TYPE_DEFINITION="UnionTypeDefinition",t.ENUM_TYPE_DEFINITION="EnumTypeDefinition",t.ENUM_VALUE_DEFINITION="EnumValueDefinition",t.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",t.DIRECTIVE_DEFINITION="DirectiveDefinition",t.SCHEMA_EXTENSION="SchemaExtension",t.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",t.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",t.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",t.UNION_TYPE_EXTENSION="UnionTypeExtension",t.ENUM_TYPE_EXTENSION="EnumTypeExtension",t.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension"})(O||(O={}));function ar(t){return t===9||t===32}function Se(t){return t>=48&&t<=57}function Lo(t){return t>=97&&t<=122||t>=65&&t<=90}function Ro(t){return Lo(t)||t===95}function jc(t){return Lo(t)||Se(t)||t===95}function Bc(t){var e;let n=Number.MAX_SAFE_INTEGER,r=null,i=-1;for(let a=0;a<t.length;++a){var o;const u=t[a],c=$c(u);c!==u.length&&(r=(o=r)!==null&&o!==void 0?o:a,i=a,a!==0&&c<n&&(n=c))}return t.map((a,u)=>u===0?a:a.slice(n)).slice((e=r)!==null&&e!==void 0?e:0,i+1)}function $c(t){let e=0;for(;e<t.length&&ar(t.charCodeAt(e));)++e;return e}function Fc(t,e){const n=t.replace(/"""/g,'\\"""'),r=n.split(/\r\n|[\n\r]/g),i=r.length===1,o=r.length>1&&r.slice(1).every(y=>y.length===0||ar(y.charCodeAt(0))),a=n.endsWith('\\"""'),u=t.endsWith('"')&&!a,c=t.endsWith("\\"),s=u||c,l=!i||t.length>70||s||o||a;let p="";const f=i&&ar(t.charCodeAt(0));return(l&&!f||o)&&(p+=`
|
|
8
|
+
`),p+=n,(l||s)&&(p+=`
|
|
9
|
+
`),'"""'+p+'"""'}var d;(function(t){t.SOF="<SOF>",t.EOF="<EOF>",t.BANG="!",t.DOLLAR="$",t.AMP="&",t.PAREN_L="(",t.PAREN_R=")",t.SPREAD="...",t.COLON=":",t.EQUALS="=",t.AT="@",t.BRACKET_L="[",t.BRACKET_R="]",t.BRACE_L="{",t.PIPE="|",t.BRACE_R="}",t.NAME="Name",t.INT="Int",t.FLOAT="Float",t.STRING="String",t.BLOCK_STRING="BlockString",t.COMMENT="Comment"})(d||(d={}));let Vc=class{constructor(e){const n=new So(d.SOF,0,0,0,0);this.source=e,this.lastToken=n,this.token=n,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){return this.lastToken=this.token,this.token=this.lookahead()}lookahead(){let e=this.token;if(e.kind!==d.EOF)do if(e.next)e=e.next;else{const n=Gc(this,e.end);e.next=n,n.prev=e,e=n}while(e.kind===d.COMMENT);return e}};function Hc(t){return t===d.BANG||t===d.DOLLAR||t===d.AMP||t===d.PAREN_L||t===d.PAREN_R||t===d.SPREAD||t===d.COLON||t===d.EQUALS||t===d.AT||t===d.BRACKET_L||t===d.BRACKET_R||t===d.BRACE_L||t===d.PIPE||t===d.BRACE_R}function ee(t){return t>=0&&t<=55295||t>=57344&&t<=1114111}function sn(t,e){return Co(t.charCodeAt(e))&&No(t.charCodeAt(e+1))}function Co(t){return t>=55296&&t<=56319}function No(t){return t>=56320&&t<=57343}function Pt(t,e){const n=t.source.body.codePointAt(e);if(n===void 0)return d.EOF;if(n>=32&&n<=126){const r=String.fromCodePoint(n);return r==='"'?`'"'`:`"${r}"`}return"U+"+n.toString(16).toUpperCase().padStart(4,"0")}function B(t,e,n,r,i){const o=t.line,a=1+n-t.lineStart;return new So(e,n,r,o,a,i)}function Gc(t,e){const n=t.source.body,r=n.length;let i=e;for(;i<r;){const o=n.charCodeAt(i);switch(o){case 65279:case 9:case 32:case 44:++i;continue;case 10:++i,++t.line,t.lineStart=i;continue;case 13:n.charCodeAt(i+1)===10?i+=2:++i,++t.line,t.lineStart=i;continue;case 35:return qc(t,i);case 33:return B(t,d.BANG,i,i+1);case 36:return B(t,d.DOLLAR,i,i+1);case 38:return B(t,d.AMP,i,i+1);case 40:return B(t,d.PAREN_L,i,i+1);case 41:return B(t,d.PAREN_R,i,i+1);case 46:if(n.charCodeAt(i+1)===46&&n.charCodeAt(i+2)===46)return B(t,d.SPREAD,i,i+3);break;case 58:return B(t,d.COLON,i,i+1);case 61:return B(t,d.EQUALS,i,i+1);case 64:return B(t,d.AT,i,i+1);case 91:return B(t,d.BRACKET_L,i,i+1);case 93:return B(t,d.BRACKET_R,i,i+1);case 123:return B(t,d.BRACE_L,i,i+1);case 124:return B(t,d.PIPE,i,i+1);case 125:return B(t,d.BRACE_R,i,i+1);case 34:return n.charCodeAt(i+1)===34&&n.charCodeAt(i+2)===34?Jc(t,i):Xc(t,i)}if(Se(o)||o===45)return zc(t,i,o);if(Ro(o))return Qc(t,i);throw G(t.source,i,o===39?`Unexpected single quote character ('), did you mean to use a double quote (")?`:ee(o)||sn(n,i)?`Unexpected character: ${Pt(t,i)}.`:`Invalid character: ${Pt(t,i)}.`)}return B(t,d.EOF,r,r)}function qc(t,e){const n=t.source.body,r=n.length;let i=e+1;for(;i<r;){const o=n.charCodeAt(i);if(o===10||o===13)break;if(ee(o))++i;else if(sn(n,i))i+=2;else break}return B(t,d.COMMENT,e,i,n.slice(e+1,i))}function zc(t,e,n){const r=t.source.body;let i=e,o=n,a=!1;if(o===45&&(o=r.charCodeAt(++i)),o===48){if(o=r.charCodeAt(++i),Se(o))throw G(t.source,i,`Invalid number, unexpected digit after 0: ${Pt(t,i)}.`)}else i=sr(t,i,o),o=r.charCodeAt(i);if(o===46&&(a=!0,o=r.charCodeAt(++i),i=sr(t,i,o),o=r.charCodeAt(i)),(o===69||o===101)&&(a=!0,o=r.charCodeAt(++i),(o===43||o===45)&&(o=r.charCodeAt(++i)),i=sr(t,i,o),o=r.charCodeAt(i)),o===46||Ro(o))throw G(t.source,i,`Invalid number, expected digit but got: ${Pt(t,i)}.`);return B(t,a?d.FLOAT:d.INT,e,i,r.slice(e,i))}function sr(t,e,n){if(!Se(n))throw G(t.source,e,`Invalid number, expected digit but got: ${Pt(t,e)}.`);const r=t.source.body;let i=e+1;for(;Se(r.charCodeAt(i));)++i;return i}function Xc(t,e){const n=t.source.body,r=n.length;let i=e+1,o=i,a="";for(;i<r;){const u=n.charCodeAt(i);if(u===34)return a+=n.slice(o,i),B(t,d.STRING,e,i+1,a);if(u===92){a+=n.slice(o,i);const c=n.charCodeAt(i+1)===117?n.charCodeAt(i+2)===123?Kc(t,i):Wc(t,i):Yc(t,i);a+=c.value,i+=c.size,o=i;continue}if(u===10||u===13)break;if(ee(u))++i;else if(sn(n,i))i+=2;else throw G(t.source,i,`Invalid character within String: ${Pt(t,i)}.`)}throw G(t.source,i,"Unterminated string.")}function Kc(t,e){const n=t.source.body;let r=0,i=3;for(;i<12;){const o=n.charCodeAt(e+i++);if(o===125){if(i<5||!ee(r))break;return{value:String.fromCodePoint(r),size:i}}if(r=r<<4|we(o),r<0)break}throw G(t.source,e,`Invalid Unicode escape sequence: "${n.slice(e,e+i)}".`)}function Wc(t,e){const n=t.source.body,r=xo(n,e+2);if(ee(r))return{value:String.fromCodePoint(r),size:6};if(Co(r)&&n.charCodeAt(e+6)===92&&n.charCodeAt(e+7)===117){const i=xo(n,e+8);if(No(i))return{value:String.fromCodePoint(r,i),size:12}}throw G(t.source,e,`Invalid Unicode escape sequence: "${n.slice(e,e+6)}".`)}function xo(t,e){return we(t.charCodeAt(e))<<12|we(t.charCodeAt(e+1))<<8|we(t.charCodeAt(e+2))<<4|we(t.charCodeAt(e+3))}function we(t){return t>=48&&t<=57?t-48:t>=65&&t<=70?t-55:t>=97&&t<=102?t-87:-1}function Yc(t,e){const n=t.source.body;switch(n.charCodeAt(e+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:`
|
|
10
|
+
`,size:2};case 114:return{value:"\r",size:2};case 116:return{value:" ",size:2}}throw G(t.source,e,`Invalid character escape sequence: "${n.slice(e,e+2)}".`)}function Jc(t,e){const n=t.source.body,r=n.length;let i=t.lineStart,o=e+3,a=o,u="";const c=[];for(;o<r;){const s=n.charCodeAt(o);if(s===34&&n.charCodeAt(o+1)===34&&n.charCodeAt(o+2)===34){u+=n.slice(a,o),c.push(u);const l=B(t,d.BLOCK_STRING,e,o+3,Bc(c).join(`
|
|
11
|
+
`));return t.line+=c.length-1,t.lineStart=i,l}if(s===92&&n.charCodeAt(o+1)===34&&n.charCodeAt(o+2)===34&&n.charCodeAt(o+3)===34){u+=n.slice(a,o),a=o+1,o+=4;continue}if(s===10||s===13){u+=n.slice(a,o),c.push(u),s===13&&n.charCodeAt(o+1)===10?o+=2:++o,u="",a=o,i=o;continue}if(ee(s))++o;else if(sn(n,o))o+=2;else throw G(t.source,o,`Invalid character within String: ${Pt(t,o)}.`)}throw G(t.source,o,"Unterminated string.")}function Qc(t,e){const n=t.source.body,r=n.length;let i=e+1;for(;i<r;){const o=n.charCodeAt(i);if(jc(o))++i;else break}return B(t,d.NAME,e,i,n.slice(e,i))}const Zc=10,Po=2;function ur(t){return un(t,[])}function un(t,e){switch(typeof t){case"string":return JSON.stringify(t);case"function":return t.name?`[function ${t.name}]`:"[function]";case"object":return tl(t,e);default:return String(t)}}function tl(t,e){if(t===null)return"null";if(e.includes(t))return"[Circular]";const n=[...e,t];if(el(t)){const r=t.toJSON();if(r!==t)return typeof r=="string"?r:un(r,n)}else if(Array.isArray(t))return rl(t,n);return nl(t,n)}function el(t){return typeof t.toJSON=="function"}function nl(t,e){const n=Object.entries(t);return n.length===0?"{}":e.length>Po?"["+il(t)+"]":"{ "+n.map(([r,i])=>r+": "+un(i,e)).join(", ")+" }"}function rl(t,e){if(t.length===0)return"[]";if(e.length>Po)return"[Array]";const n=Math.min(Zc,t.length),r=t.length-n,i=[];for(let o=0;o<n;++o)i.push(un(t[o],e));return r===1?i.push("... 1 more item"):r>1&&i.push(`... ${r} more items`),"["+i.join(", ")+"]"}function il(t){const e=Object.prototype.toString.call(t).replace(/^\[object /,"").replace(/]$/,"");if(e==="Object"&&typeof t.constructor=="function"){const n=t.constructor.name;if(typeof n=="string"&&n!=="")return n}return e}const ol=globalThis.process&&process.env.NODE_ENV==="production",al=ol?function(t,e){return t instanceof e}:function(t,e){if(t instanceof e)return!0;if(typeof t=="object"&&t!==null){var n;const r=e.prototype[Symbol.toStringTag],i=Symbol.toStringTag in t?t[Symbol.toStringTag]:(n=t.constructor)===null||n===void 0?void 0:n.name;if(r===i){const o=ur(t);throw new Error(`Cannot use ${r} "${o}" from another module or realm.
|
|
12
12
|
|
|
13
13
|
Ensure that there is only one instance of "graphql" in the node_modules
|
|
14
14
|
directory. If different versions of "graphql" are the dependencies of other
|
|
@@ -19,41 +19,41 @@ https://yarnpkg.com/en/docs/selective-version-resolutions
|
|
|
19
19
|
Duplicate "graphql" modules cannot be used at the same time since different
|
|
20
20
|
versions may have different capabilities and behavior. The data from one
|
|
21
21
|
version used in the function from another could produce confusing and
|
|
22
|
-
spurious results.`)}}return!1};let Ro=class{constructor(e,r="GraphQL request",n={line:1,column:1}){typeof e=="string"||er(!1,`Body must be a string. Received: ${an(e)}.`),this.body=e,this.name=r,this.locationOffset=n,this.locationOffset.line>0||er(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||er(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}};function rl(t){return el(t,Ro)}function No(t,e){const r=new nl(t,e),n=r.parseDocument();return Object.defineProperty(n,"tokenCount",{enumerable:!1,value:r.tokenCount}),n}let nl=class{constructor(e,r={}){const n=rl(e)?e:new Ro(e);this._lexer=new Uc(n),this._options=r,this._tokenCounter=0}get tokenCount(){return this._tokenCounter}parseName(){const e=this.expectToken(d.NAME);return this.node(e,{kind:O.NAME,value:e.value})}parseDocument(){return this.node(this._lexer.token,{kind:O.DOCUMENT,definitions:this.many(d.SOF,this.parseDefinition,d.EOF)})}parseDefinition(){if(this.peek(d.BRACE_L))return this.parseOperationDefinition();const e=this.peekDescription(),r=e?this._lexer.lookahead():this._lexer.token;if(r.kind===d.NAME){switch(r.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}if(e)throw F(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(r.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(r)}parseOperationDefinition(){const e=this._lexer.token;if(this.peek(d.BRACE_L))return this.node(e,{kind:O.OPERATION_DEFINITION,operation:Jt.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});const r=this.parseOperationType();let n;return this.peek(d.NAME)&&(n=this.parseName()),this.node(e,{kind:O.OPERATION_DEFINITION,operation:r,name:n,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){const e=this.expectToken(d.NAME);switch(e.value){case"query":return Jt.QUERY;case"mutation":return Jt.MUTATION;case"subscription":return Jt.SUBSCRIPTION}throw this.unexpected(e)}parseVariableDefinitions(){return this.optionalMany(d.PAREN_L,this.parseVariableDefinition,d.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:O.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(d.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(d.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){const e=this._lexer.token;return this.expectToken(d.DOLLAR),this.node(e,{kind:O.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:O.SELECTION_SET,selections:this.many(d.BRACE_L,this.parseSelection,d.BRACE_R)})}parseSelection(){return this.peek(d.SPREAD)?this.parseFragment():this.parseField()}parseField(){const e=this._lexer.token,r=this.parseName();let n,i;return this.expectOptionalToken(d.COLON)?(n=r,i=this.parseName()):i=r,this.node(e,{kind:O.FIELD,alias:n,name:i,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(d.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(e){const r=e?this.parseConstArgument:this.parseArgument;return this.optionalMany(d.PAREN_L,r,d.PAREN_R)}parseArgument(e=!1){const r=this._lexer.token,n=this.parseName();return this.expectToken(d.COLON),this.node(r,{kind:O.ARGUMENT,name:n,value:this.parseValueLiteral(e)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){const e=this._lexer.token;this.expectToken(d.SPREAD);const r=this.expectOptionalKeyword("on");return!r&&this.peek(d.NAME)?this.node(e,{kind:O.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(e,{kind:O.INLINE_FRAGMENT,typeCondition:r?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){const e=this._lexer.token;return this.expectKeyword("fragment"),this._options.allowLegacyFragmentVariables===!0?this.node(e,{kind:O.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(e,{kind:O.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if(this._lexer.token.value==="on")throw this.unexpected();return this.parseName()}parseValueLiteral(e){const r=this._lexer.token;switch(r.kind){case d.BRACKET_L:return this.parseList(e);case d.BRACE_L:return this.parseObject(e);case d.INT:return this.advanceLexer(),this.node(r,{kind:O.INT,value:r.value});case d.FLOAT:return this.advanceLexer(),this.node(r,{kind:O.FLOAT,value:r.value});case d.STRING:case d.BLOCK_STRING:return this.parseStringLiteral();case d.NAME:switch(this.advanceLexer(),r.value){case"true":return this.node(r,{kind:O.BOOLEAN,value:!0});case"false":return this.node(r,{kind:O.BOOLEAN,value:!1});case"null":return this.node(r,{kind:O.NULL});default:return this.node(r,{kind:O.ENUM,value:r.value})}case d.DOLLAR:if(e)if(this.expectToken(d.DOLLAR),this._lexer.token.kind===d.NAME){const n=this._lexer.token.value;throw F(this._lexer.source,r.start,`Unexpected variable "$${n}" in constant value.`)}else throw this.unexpected(r);return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){const e=this._lexer.token;return this.advanceLexer(),this.node(e,{kind:O.STRING,value:e.value,block:e.kind===d.BLOCK_STRING})}parseList(e){const r=()=>this.parseValueLiteral(e);return this.node(this._lexer.token,{kind:O.LIST,values:this.any(d.BRACKET_L,r,d.BRACKET_R)})}parseObject(e){const r=()=>this.parseObjectField(e);return this.node(this._lexer.token,{kind:O.OBJECT,fields:this.any(d.BRACE_L,r,d.BRACE_R)})}parseObjectField(e){const r=this._lexer.token,n=this.parseName();return this.expectToken(d.COLON),this.node(r,{kind:O.OBJECT_FIELD,name:n,value:this.parseValueLiteral(e)})}parseDirectives(e){const r=[];for(;this.peek(d.AT);)r.push(this.parseDirective(e));return r}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(e){const r=this._lexer.token;return this.expectToken(d.AT),this.node(r,{kind:O.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(e)})}parseTypeReference(){const e=this._lexer.token;let r;if(this.expectOptionalToken(d.BRACKET_L)){const n=this.parseTypeReference();this.expectToken(d.BRACKET_R),r=this.node(e,{kind:O.LIST_TYPE,type:n})}else r=this.parseNamedType();return this.expectOptionalToken(d.BANG)?this.node(e,{kind:O.NON_NULL_TYPE,type:r}):r}parseNamedType(){return this.node(this._lexer.token,{kind:O.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(d.STRING)||this.peek(d.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){const e=this._lexer.token,r=this.parseDescription();this.expectKeyword("schema");const n=this.parseConstDirectives(),i=this.many(d.BRACE_L,this.parseOperationTypeDefinition,d.BRACE_R);return this.node(e,{kind:O.SCHEMA_DEFINITION,description:r,directives:n,operationTypes:i})}parseOperationTypeDefinition(){const e=this._lexer.token,r=this.parseOperationType();this.expectToken(d.COLON);const n=this.parseNamedType();return this.node(e,{kind:O.OPERATION_TYPE_DEFINITION,operation:r,type:n})}parseScalarTypeDefinition(){const e=this._lexer.token,r=this.parseDescription();this.expectKeyword("scalar");const n=this.parseName(),i=this.parseConstDirectives();return this.node(e,{kind:O.SCALAR_TYPE_DEFINITION,description:r,name:n,directives:i})}parseObjectTypeDefinition(){const e=this._lexer.token,r=this.parseDescription();this.expectKeyword("type");const n=this.parseName(),i=this.parseImplementsInterfaces(),o=this.parseConstDirectives(),a=this.parseFieldsDefinition();return this.node(e,{kind:O.OBJECT_TYPE_DEFINITION,description:r,name:n,interfaces:i,directives:o,fields:a})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(d.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(d.BRACE_L,this.parseFieldDefinition,d.BRACE_R)}parseFieldDefinition(){const e=this._lexer.token,r=this.parseDescription(),n=this.parseName(),i=this.parseArgumentDefs();this.expectToken(d.COLON);const o=this.parseTypeReference(),a=this.parseConstDirectives();return this.node(e,{kind:O.FIELD_DEFINITION,description:r,name:n,arguments:i,type:o,directives:a})}parseArgumentDefs(){return this.optionalMany(d.PAREN_L,this.parseInputValueDef,d.PAREN_R)}parseInputValueDef(){const e=this._lexer.token,r=this.parseDescription(),n=this.parseName();this.expectToken(d.COLON);const i=this.parseTypeReference();let o;this.expectOptionalToken(d.EQUALS)&&(o=this.parseConstValueLiteral());const a=this.parseConstDirectives();return this.node(e,{kind:O.INPUT_VALUE_DEFINITION,description:r,name:n,type:i,defaultValue:o,directives:a})}parseInterfaceTypeDefinition(){const e=this._lexer.token,r=this.parseDescription();this.expectKeyword("interface");const n=this.parseName(),i=this.parseImplementsInterfaces(),o=this.parseConstDirectives(),a=this.parseFieldsDefinition();return this.node(e,{kind:O.INTERFACE_TYPE_DEFINITION,description:r,name:n,interfaces:i,directives:o,fields:a})}parseUnionTypeDefinition(){const e=this._lexer.token,r=this.parseDescription();this.expectKeyword("union");const n=this.parseName(),i=this.parseConstDirectives(),o=this.parseUnionMemberTypes();return this.node(e,{kind:O.UNION_TYPE_DEFINITION,description:r,name:n,directives:i,types:o})}parseUnionMemberTypes(){return this.expectOptionalToken(d.EQUALS)?this.delimitedMany(d.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){const e=this._lexer.token,r=this.parseDescription();this.expectKeyword("enum");const n=this.parseName(),i=this.parseConstDirectives(),o=this.parseEnumValuesDefinition();return this.node(e,{kind:O.ENUM_TYPE_DEFINITION,description:r,name:n,directives:i,values:o})}parseEnumValuesDefinition(){return this.optionalMany(d.BRACE_L,this.parseEnumValueDefinition,d.BRACE_R)}parseEnumValueDefinition(){const e=this._lexer.token,r=this.parseDescription(),n=this.parseEnumValueName(),i=this.parseConstDirectives();return this.node(e,{kind:O.ENUM_VALUE_DEFINITION,description:r,name:n,directives:i})}parseEnumValueName(){if(this._lexer.token.value==="true"||this._lexer.token.value==="false"||this._lexer.token.value==="null")throw F(this._lexer.source,this._lexer.token.start,`${ir(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){const e=this._lexer.token,r=this.parseDescription();this.expectKeyword("input");const n=this.parseName(),i=this.parseConstDirectives(),o=this.parseInputFieldsDefinition();return this.node(e,{kind:O.INPUT_OBJECT_TYPE_DEFINITION,description:r,name:n,directives:i,fields:o})}parseInputFieldsDefinition(){return this.optionalMany(d.BRACE_L,this.parseInputValueDef,d.BRACE_R)}parseTypeSystemExtension(){const e=this._lexer.lookahead();if(e.kind===d.NAME)switch(e.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(e)}parseSchemaExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");const r=this.parseConstDirectives(),n=this.optionalMany(d.BRACE_L,this.parseOperationTypeDefinition,d.BRACE_R);if(r.length===0&&n.length===0)throw this.unexpected();return this.node(e,{kind:O.SCHEMA_EXTENSION,directives:r,operationTypes:n})}parseScalarTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");const r=this.parseName(),n=this.parseConstDirectives();if(n.length===0)throw this.unexpected();return this.node(e,{kind:O.SCALAR_TYPE_EXTENSION,name:r,directives:n})}parseObjectTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");const r=this.parseName(),n=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),o=this.parseFieldsDefinition();if(n.length===0&&i.length===0&&o.length===0)throw this.unexpected();return this.node(e,{kind:O.OBJECT_TYPE_EXTENSION,name:r,interfaces:n,directives:i,fields:o})}parseInterfaceTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");const r=this.parseName(),n=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),o=this.parseFieldsDefinition();if(n.length===0&&i.length===0&&o.length===0)throw this.unexpected();return this.node(e,{kind:O.INTERFACE_TYPE_EXTENSION,name:r,interfaces:n,directives:i,fields:o})}parseUnionTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");const r=this.parseName(),n=this.parseConstDirectives(),i=this.parseUnionMemberTypes();if(n.length===0&&i.length===0)throw this.unexpected();return this.node(e,{kind:O.UNION_TYPE_EXTENSION,name:r,directives:n,types:i})}parseEnumTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");const r=this.parseName(),n=this.parseConstDirectives(),i=this.parseEnumValuesDefinition();if(n.length===0&&i.length===0)throw this.unexpected();return this.node(e,{kind:O.ENUM_TYPE_EXTENSION,name:r,directives:n,values:i})}parseInputObjectTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");const r=this.parseName(),n=this.parseConstDirectives(),i=this.parseInputFieldsDefinition();if(n.length===0&&i.length===0)throw this.unexpected();return this.node(e,{kind:O.INPUT_OBJECT_TYPE_EXTENSION,name:r,directives:n,fields:i})}parseDirectiveDefinition(){const e=this._lexer.token,r=this.parseDescription();this.expectKeyword("directive"),this.expectToken(d.AT);const n=this.parseName(),i=this.parseArgumentDefs(),o=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");const a=this.parseDirectiveLocations();return this.node(e,{kind:O.DIRECTIVE_DEFINITION,description:r,name:n,arguments:i,repeatable:o,locations:a})}parseDirectiveLocations(){return this.delimitedMany(d.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){const e=this._lexer.token,r=this.parseName();if(Object.prototype.hasOwnProperty.call(rn,r.value))return r;throw this.unexpected(e)}node(e,r){return this._options.noLocation!==!0&&(r.loc=new xc(e,this._lexer.lastToken,this._lexer.source)),r}peek(e){return this._lexer.token.kind===e}expectToken(e){const r=this._lexer.token;if(r.kind===e)return this.advanceLexer(),r;throw F(this._lexer.source,r.start,`Expected ${Co(e)}, found ${ir(r)}.`)}expectOptionalToken(e){return this._lexer.token.kind===e?(this.advanceLexer(),!0):!1}expectKeyword(e){const r=this._lexer.token;if(r.kind===d.NAME&&r.value===e)this.advanceLexer();else throw F(this._lexer.source,r.start,`Expected "${e}", found ${ir(r)}.`)}expectOptionalKeyword(e){const r=this._lexer.token;return r.kind===d.NAME&&r.value===e?(this.advanceLexer(),!0):!1}unexpected(e){const r=e??this._lexer.token;return F(this._lexer.source,r.start,`Unexpected ${ir(r)}.`)}any(e,r,n){this.expectToken(e);const i=[];for(;!this.expectOptionalToken(n);)i.push(r.call(this));return i}optionalMany(e,r,n){if(this.expectOptionalToken(e)){const i=[];do i.push(r.call(this));while(!this.expectOptionalToken(n));return i}return[]}many(e,r,n){this.expectToken(e);const i=[];do i.push(r.call(this));while(!this.expectOptionalToken(n));return i}delimitedMany(e,r){this.expectOptionalToken(e);const n=[];do n.push(r.call(this));while(this.expectOptionalToken(e));return n}advanceLexer(){const{maxTokens:e}=this._options,r=this._lexer.advance();if(r.kind!==d.EOF&&(++this._tokenCounter,e!==void 0&&this._tokenCounter>e))throw F(this._lexer.source,r.start,`Document contains more that ${e} tokens. Parsing aborted.`)}};function ir(t){const e=t.value;return Co(t.kind)+(e!=null?` "${e}"`:"")}function Co(t){return jc(t)?`"${t}"`:t}function il(t){return`"${t.replace(ol,al)}"`}const ol=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function al(t){return sl[t.charCodeAt(0)]}const sl=["\\u0000","\\u0001","\\u0002","\\u0003","\\u0004","\\u0005","\\u0006","\\u0007","\\b","\\t","\\n","\\u000B","\\f","\\r","\\u000E","\\u000F","\\u0010","\\u0011","\\u0012","\\u0013","\\u0014","\\u0015","\\u0016","\\u0017","\\u0018","\\u0019","\\u001A","\\u001B","\\u001C","\\u001D","\\u001E","\\u001F","","",'\\"',"","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\\\","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\u007F","\\u0080","\\u0081","\\u0082","\\u0083","\\u0084","\\u0085","\\u0086","\\u0087","\\u0088","\\u0089","\\u008A","\\u008B","\\u008C","\\u008D","\\u008E","\\u008F","\\u0090","\\u0091","\\u0092","\\u0093","\\u0094","\\u0095","\\u0096","\\u0097","\\u0098","\\u0099","\\u009A","\\u009B","\\u009C","\\u009D","\\u009E","\\u009F"],ul=Object.freeze({});function cl(t,e,r=Eo){const n=new Map;for(const E of Object.values(O))n.set(E,ll(e,E));let i,o=Array.isArray(t),a=[t],u=-1,c=[],s=t,l,p;const f=[],y=[];do{u++;const E=u===a.length,R=E&&c.length!==0;if(E){if(l=y.length===0?void 0:f[f.length-1],s=p,p=y.pop(),R)if(o){s=s.slice();let D=0;for(const[G,j]of c){const H=G-D;j===null?(s.splice(H,1),D++):s[H]=j}}else{s=C({},s);for(const[D,G]of c)s[D]=G}u=i.index,a=i.keys,c=i.edits,o=i.inArray,i=i.prev}else if(p){if(l=o?u:a[u],s=p[l],s==null)continue;f.push(l)}let U;if(!Array.isArray(s)){var v,m;To(s)||er(!1,`Invalid AST Node: ${an(s)}.`);const D=E?(v=n.get(s.kind))===null||v===void 0?void 0:v.leave:(m=n.get(s.kind))===null||m===void 0?void 0:m.enter;if(U=D?.call(e,s,l,p,f,y),U===ul)break;if(U===!1){if(!E){f.pop();continue}}else if(U!==void 0&&(c.push([l,U]),!E))if(To(U))s=U;else{f.pop();continue}}if(U===void 0&&R&&c.push([l,s]),E)f.pop();else{var _;i={inArray:o,index:u,keys:a,edits:c,prev:i},o=Array.isArray(s),a=o?s:(_=r[s.kind])!==null&&_!==void 0?_:[],u=-1,c=[],p&&y.push(p),p=s}}while(i!==void 0);return c.length!==0?c[c.length-1][1]:t}function ll(t,e){const r=t[e];return typeof r=="object"?r:typeof r=="function"?{enter:r,leave:void 0}:{enter:t.enter,leave:t.leave}}function pl(t){return cl(t,hl)}const fl=80,hl={Name:{leave:t=>t.value},Variable:{leave:t=>"$"+t.name},Document:{leave:t=>b(t.definitions,`
|
|
22
|
+
spurious results.`)}}return!1};let Io=class{constructor(e,n="GraphQL request",r={line:1,column:1}){typeof e=="string"||an(!1,`Body must be a string. Received: ${ur(e)}.`),this.body=e,this.name=n,this.locationOffset=r,this.locationOffset.line>0||an(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||an(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}};function sl(t){return al(t,Io)}function Mo(t,e){const n=new ul(t,e),r=n.parseDocument();return Object.defineProperty(r,"tokenCount",{enumerable:!1,value:n.tokenCount}),r}let ul=class{constructor(e,n={}){const r=sl(e)?e:new Io(e);this._lexer=new Vc(r),this._options=n,this._tokenCounter=0}get tokenCount(){return this._tokenCounter}parseName(){const e=this.expectToken(d.NAME);return this.node(e,{kind:O.NAME,value:e.value})}parseDocument(){return this.node(this._lexer.token,{kind:O.DOCUMENT,definitions:this.many(d.SOF,this.parseDefinition,d.EOF)})}parseDefinition(){if(this.peek(d.BRACE_L))return this.parseOperationDefinition();const e=this.peekDescription(),n=e?this._lexer.lookahead():this._lexer.token;if(n.kind===d.NAME){switch(n.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}if(e)throw G(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(n.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(n)}parseOperationDefinition(){const e=this._lexer.token;if(this.peek(d.BRACE_L))return this.node(e,{kind:O.OPERATION_DEFINITION,operation:te.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});const n=this.parseOperationType();let r;return this.peek(d.NAME)&&(r=this.parseName()),this.node(e,{kind:O.OPERATION_DEFINITION,operation:n,name:r,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){const e=this.expectToken(d.NAME);switch(e.value){case"query":return te.QUERY;case"mutation":return te.MUTATION;case"subscription":return te.SUBSCRIPTION}throw this.unexpected(e)}parseVariableDefinitions(){return this.optionalMany(d.PAREN_L,this.parseVariableDefinition,d.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:O.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(d.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(d.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){const e=this._lexer.token;return this.expectToken(d.DOLLAR),this.node(e,{kind:O.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:O.SELECTION_SET,selections:this.many(d.BRACE_L,this.parseSelection,d.BRACE_R)})}parseSelection(){return this.peek(d.SPREAD)?this.parseFragment():this.parseField()}parseField(){const e=this._lexer.token,n=this.parseName();let r,i;return this.expectOptionalToken(d.COLON)?(r=n,i=this.parseName()):i=n,this.node(e,{kind:O.FIELD,alias:r,name:i,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(d.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(e){const n=e?this.parseConstArgument:this.parseArgument;return this.optionalMany(d.PAREN_L,n,d.PAREN_R)}parseArgument(e=!1){const n=this._lexer.token,r=this.parseName();return this.expectToken(d.COLON),this.node(n,{kind:O.ARGUMENT,name:r,value:this.parseValueLiteral(e)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){const e=this._lexer.token;this.expectToken(d.SPREAD);const n=this.expectOptionalKeyword("on");return!n&&this.peek(d.NAME)?this.node(e,{kind:O.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(e,{kind:O.INLINE_FRAGMENT,typeCondition:n?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){const e=this._lexer.token;return this.expectKeyword("fragment"),this._options.allowLegacyFragmentVariables===!0?this.node(e,{kind:O.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(e,{kind:O.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if(this._lexer.token.value==="on")throw this.unexpected();return this.parseName()}parseValueLiteral(e){const n=this._lexer.token;switch(n.kind){case d.BRACKET_L:return this.parseList(e);case d.BRACE_L:return this.parseObject(e);case d.INT:return this.advanceLexer(),this.node(n,{kind:O.INT,value:n.value});case d.FLOAT:return this.advanceLexer(),this.node(n,{kind:O.FLOAT,value:n.value});case d.STRING:case d.BLOCK_STRING:return this.parseStringLiteral();case d.NAME:switch(this.advanceLexer(),n.value){case"true":return this.node(n,{kind:O.BOOLEAN,value:!0});case"false":return this.node(n,{kind:O.BOOLEAN,value:!1});case"null":return this.node(n,{kind:O.NULL});default:return this.node(n,{kind:O.ENUM,value:n.value})}case d.DOLLAR:if(e)if(this.expectToken(d.DOLLAR),this._lexer.token.kind===d.NAME){const r=this._lexer.token.value;throw G(this._lexer.source,n.start,`Unexpected variable "$${r}" in constant value.`)}else throw this.unexpected(n);return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){const e=this._lexer.token;return this.advanceLexer(),this.node(e,{kind:O.STRING,value:e.value,block:e.kind===d.BLOCK_STRING})}parseList(e){const n=()=>this.parseValueLiteral(e);return this.node(this._lexer.token,{kind:O.LIST,values:this.any(d.BRACKET_L,n,d.BRACKET_R)})}parseObject(e){const n=()=>this.parseObjectField(e);return this.node(this._lexer.token,{kind:O.OBJECT,fields:this.any(d.BRACE_L,n,d.BRACE_R)})}parseObjectField(e){const n=this._lexer.token,r=this.parseName();return this.expectToken(d.COLON),this.node(n,{kind:O.OBJECT_FIELD,name:r,value:this.parseValueLiteral(e)})}parseDirectives(e){const n=[];for(;this.peek(d.AT);)n.push(this.parseDirective(e));return n}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(e){const n=this._lexer.token;return this.expectToken(d.AT),this.node(n,{kind:O.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(e)})}parseTypeReference(){const e=this._lexer.token;let n;if(this.expectOptionalToken(d.BRACKET_L)){const r=this.parseTypeReference();this.expectToken(d.BRACKET_R),n=this.node(e,{kind:O.LIST_TYPE,type:r})}else n=this.parseNamedType();return this.expectOptionalToken(d.BANG)?this.node(e,{kind:O.NON_NULL_TYPE,type:n}):n}parseNamedType(){return this.node(this._lexer.token,{kind:O.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(d.STRING)||this.peek(d.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){const e=this._lexer.token,n=this.parseDescription();this.expectKeyword("schema");const r=this.parseConstDirectives(),i=this.many(d.BRACE_L,this.parseOperationTypeDefinition,d.BRACE_R);return this.node(e,{kind:O.SCHEMA_DEFINITION,description:n,directives:r,operationTypes:i})}parseOperationTypeDefinition(){const e=this._lexer.token,n=this.parseOperationType();this.expectToken(d.COLON);const r=this.parseNamedType();return this.node(e,{kind:O.OPERATION_TYPE_DEFINITION,operation:n,type:r})}parseScalarTypeDefinition(){const e=this._lexer.token,n=this.parseDescription();this.expectKeyword("scalar");const r=this.parseName(),i=this.parseConstDirectives();return this.node(e,{kind:O.SCALAR_TYPE_DEFINITION,description:n,name:r,directives:i})}parseObjectTypeDefinition(){const e=this._lexer.token,n=this.parseDescription();this.expectKeyword("type");const r=this.parseName(),i=this.parseImplementsInterfaces(),o=this.parseConstDirectives(),a=this.parseFieldsDefinition();return this.node(e,{kind:O.OBJECT_TYPE_DEFINITION,description:n,name:r,interfaces:i,directives:o,fields:a})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(d.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(d.BRACE_L,this.parseFieldDefinition,d.BRACE_R)}parseFieldDefinition(){const e=this._lexer.token,n=this.parseDescription(),r=this.parseName(),i=this.parseArgumentDefs();this.expectToken(d.COLON);const o=this.parseTypeReference(),a=this.parseConstDirectives();return this.node(e,{kind:O.FIELD_DEFINITION,description:n,name:r,arguments:i,type:o,directives:a})}parseArgumentDefs(){return this.optionalMany(d.PAREN_L,this.parseInputValueDef,d.PAREN_R)}parseInputValueDef(){const e=this._lexer.token,n=this.parseDescription(),r=this.parseName();this.expectToken(d.COLON);const i=this.parseTypeReference();let o;this.expectOptionalToken(d.EQUALS)&&(o=this.parseConstValueLiteral());const a=this.parseConstDirectives();return this.node(e,{kind:O.INPUT_VALUE_DEFINITION,description:n,name:r,type:i,defaultValue:o,directives:a})}parseInterfaceTypeDefinition(){const e=this._lexer.token,n=this.parseDescription();this.expectKeyword("interface");const r=this.parseName(),i=this.parseImplementsInterfaces(),o=this.parseConstDirectives(),a=this.parseFieldsDefinition();return this.node(e,{kind:O.INTERFACE_TYPE_DEFINITION,description:n,name:r,interfaces:i,directives:o,fields:a})}parseUnionTypeDefinition(){const e=this._lexer.token,n=this.parseDescription();this.expectKeyword("union");const r=this.parseName(),i=this.parseConstDirectives(),o=this.parseUnionMemberTypes();return this.node(e,{kind:O.UNION_TYPE_DEFINITION,description:n,name:r,directives:i,types:o})}parseUnionMemberTypes(){return this.expectOptionalToken(d.EQUALS)?this.delimitedMany(d.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){const e=this._lexer.token,n=this.parseDescription();this.expectKeyword("enum");const r=this.parseName(),i=this.parseConstDirectives(),o=this.parseEnumValuesDefinition();return this.node(e,{kind:O.ENUM_TYPE_DEFINITION,description:n,name:r,directives:i,values:o})}parseEnumValuesDefinition(){return this.optionalMany(d.BRACE_L,this.parseEnumValueDefinition,d.BRACE_R)}parseEnumValueDefinition(){const e=this._lexer.token,n=this.parseDescription(),r=this.parseEnumValueName(),i=this.parseConstDirectives();return this.node(e,{kind:O.ENUM_VALUE_DEFINITION,description:n,name:r,directives:i})}parseEnumValueName(){if(this._lexer.token.value==="true"||this._lexer.token.value==="false"||this._lexer.token.value==="null")throw G(this._lexer.source,this._lexer.token.start,`${cn(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){const e=this._lexer.token,n=this.parseDescription();this.expectKeyword("input");const r=this.parseName(),i=this.parseConstDirectives(),o=this.parseInputFieldsDefinition();return this.node(e,{kind:O.INPUT_OBJECT_TYPE_DEFINITION,description:n,name:r,directives:i,fields:o})}parseInputFieldsDefinition(){return this.optionalMany(d.BRACE_L,this.parseInputValueDef,d.BRACE_R)}parseTypeSystemExtension(){const e=this._lexer.lookahead();if(e.kind===d.NAME)switch(e.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(e)}parseSchemaExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");const n=this.parseConstDirectives(),r=this.optionalMany(d.BRACE_L,this.parseOperationTypeDefinition,d.BRACE_R);if(n.length===0&&r.length===0)throw this.unexpected();return this.node(e,{kind:O.SCHEMA_EXTENSION,directives:n,operationTypes:r})}parseScalarTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");const n=this.parseName(),r=this.parseConstDirectives();if(r.length===0)throw this.unexpected();return this.node(e,{kind:O.SCALAR_TYPE_EXTENSION,name:n,directives:r})}parseObjectTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");const n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),o=this.parseFieldsDefinition();if(r.length===0&&i.length===0&&o.length===0)throw this.unexpected();return this.node(e,{kind:O.OBJECT_TYPE_EXTENSION,name:n,interfaces:r,directives:i,fields:o})}parseInterfaceTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");const n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),o=this.parseFieldsDefinition();if(r.length===0&&i.length===0&&o.length===0)throw this.unexpected();return this.node(e,{kind:O.INTERFACE_TYPE_EXTENSION,name:n,interfaces:r,directives:i,fields:o})}parseUnionTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");const n=this.parseName(),r=this.parseConstDirectives(),i=this.parseUnionMemberTypes();if(r.length===0&&i.length===0)throw this.unexpected();return this.node(e,{kind:O.UNION_TYPE_EXTENSION,name:n,directives:r,types:i})}parseEnumTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");const n=this.parseName(),r=this.parseConstDirectives(),i=this.parseEnumValuesDefinition();if(r.length===0&&i.length===0)throw this.unexpected();return this.node(e,{kind:O.ENUM_TYPE_EXTENSION,name:n,directives:r,values:i})}parseInputObjectTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");const n=this.parseName(),r=this.parseConstDirectives(),i=this.parseInputFieldsDefinition();if(r.length===0&&i.length===0)throw this.unexpected();return this.node(e,{kind:O.INPUT_OBJECT_TYPE_EXTENSION,name:n,directives:r,fields:i})}parseDirectiveDefinition(){const e=this._lexer.token,n=this.parseDescription();this.expectKeyword("directive"),this.expectToken(d.AT);const r=this.parseName(),i=this.parseArgumentDefs(),o=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");const a=this.parseDirectiveLocations();return this.node(e,{kind:O.DIRECTIVE_DEFINITION,description:n,name:r,arguments:i,repeatable:o,locations:a})}parseDirectiveLocations(){return this.delimitedMany(d.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){const e=this._lexer.token,n=this.parseName();if(Object.prototype.hasOwnProperty.call(or,n.value))return n;throw this.unexpected(e)}node(e,n){return this._options.noLocation!==!0&&(n.loc=new Dc(e,this._lexer.lastToken,this._lexer.source)),n}peek(e){return this._lexer.token.kind===e}expectToken(e){const n=this._lexer.token;if(n.kind===e)return this.advanceLexer(),n;throw G(this._lexer.source,n.start,`Expected ${ko(e)}, found ${cn(n)}.`)}expectOptionalToken(e){return this._lexer.token.kind===e?(this.advanceLexer(),!0):!1}expectKeyword(e){const n=this._lexer.token;if(n.kind===d.NAME&&n.value===e)this.advanceLexer();else throw G(this._lexer.source,n.start,`Expected "${e}", found ${cn(n)}.`)}expectOptionalKeyword(e){const n=this._lexer.token;return n.kind===d.NAME&&n.value===e?(this.advanceLexer(),!0):!1}unexpected(e){const n=e??this._lexer.token;return G(this._lexer.source,n.start,`Unexpected ${cn(n)}.`)}any(e,n,r){this.expectToken(e);const i=[];for(;!this.expectOptionalToken(r);)i.push(n.call(this));return i}optionalMany(e,n,r){if(this.expectOptionalToken(e)){const i=[];do i.push(n.call(this));while(!this.expectOptionalToken(r));return i}return[]}many(e,n,r){this.expectToken(e);const i=[];do i.push(n.call(this));while(!this.expectOptionalToken(r));return i}delimitedMany(e,n){this.expectOptionalToken(e);const r=[];do r.push(n.call(this));while(this.expectOptionalToken(e));return r}advanceLexer(){const{maxTokens:e}=this._options,n=this._lexer.advance();if(n.kind!==d.EOF&&(++this._tokenCounter,e!==void 0&&this._tokenCounter>e))throw G(this._lexer.source,n.start,`Document contains more that ${e} tokens. Parsing aborted.`)}};function cn(t){const e=t.value;return ko(t.kind)+(e!=null?` "${e}"`:"")}function ko(t){return Hc(t)?`"${t}"`:t}function cl(t){return`"${t.replace(ll,pl)}"`}const ll=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function pl(t){return fl[t.charCodeAt(0)]}const fl=["\\u0000","\\u0001","\\u0002","\\u0003","\\u0004","\\u0005","\\u0006","\\u0007","\\b","\\t","\\n","\\u000B","\\f","\\r","\\u000E","\\u000F","\\u0010","\\u0011","\\u0012","\\u0013","\\u0014","\\u0015","\\u0016","\\u0017","\\u0018","\\u0019","\\u001A","\\u001B","\\u001C","\\u001D","\\u001E","\\u001F","","",'\\"',"","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\\\","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\u007F","\\u0080","\\u0081","\\u0082","\\u0083","\\u0084","\\u0085","\\u0086","\\u0087","\\u0088","\\u0089","\\u008A","\\u008B","\\u008C","\\u008D","\\u008E","\\u008F","\\u0090","\\u0091","\\u0092","\\u0093","\\u0094","\\u0095","\\u0096","\\u0097","\\u0098","\\u0099","\\u009A","\\u009B","\\u009C","\\u009D","\\u009E","\\u009F"],hl=Object.freeze({});function dl(t,e,n=wo){const r=new Map;for(const E of Object.values(O))r.set(E,vl(e,E));let i,o=Array.isArray(t),a=[t],u=-1,c=[],s=t,l,p;const f=[],y=[];do{u++;const E=u===a.length,S=E&&c.length!==0;if(E){if(l=y.length===0?void 0:f[f.length-1],s=p,p=y.pop(),S)if(o){s=s.slice();let U=0;for(const[z,F]of c){const j=z-U;F===null?(s.splice(j,1),U++):s[j]=F}}else{s=N({},s);for(const[U,z]of c)s[U]=z}u=i.index,a=i.keys,c=i.edits,o=i.inArray,i=i.prev}else if(p){if(l=o?u:a[u],s=p[l],s==null)continue;f.push(l)}let I;if(!Array.isArray(s)){var v,m;Ao(s)||an(!1,`Invalid AST Node: ${ur(s)}.`);const U=E?(v=r.get(s.kind))===null||v===void 0?void 0:v.leave:(m=r.get(s.kind))===null||m===void 0?void 0:m.enter;if(I=U?.call(e,s,l,p,f,y),I===hl)break;if(I===!1){if(!E){f.pop();continue}}else if(I!==void 0&&(c.push([l,I]),!E))if(Ao(I))s=I;else{f.pop();continue}}if(I===void 0&&S&&c.push([l,s]),E)f.pop();else{var _;i={inArray:o,index:u,keys:a,edits:c,prev:i},o=Array.isArray(s),a=o?s:(_=n[s.kind])!==null&&_!==void 0?_:[],u=-1,c=[],p&&y.push(p),p=s}}while(i!==void 0);return c.length!==0?c[c.length-1][1]:t}function vl(t,e){const n=t[e];return typeof n=="object"?n:typeof n=="function"?{enter:n,leave:void 0}:{enter:t.enter,leave:t.leave}}function yl(t){return dl(t,_l)}const ml=80,_l={Name:{leave:t=>t.value},Variable:{leave:t=>"$"+t.name},Document:{leave:t=>b(t.definitions,`
|
|
23
23
|
|
|
24
|
-
`)},OperationDefinition:{leave(t){const e=
|
|
25
|
-
`,
|
|
24
|
+
`)},OperationDefinition:{leave(t){const e=R("(",b(t.variableDefinitions,", "),")"),n=b([t.operation,b([t.name,e]),b(t.directives," ")]," ");return(n==="query"?"":n+" ")+t.selectionSet}},VariableDefinition:{leave:({variable:t,type:e,defaultValue:n,directives:r})=>t+": "+e+R(" = ",n)+R(" ",b(r," "))},SelectionSet:{leave:({selections:t})=>ut(t)},Field:{leave({alias:t,name:e,arguments:n,directives:r,selectionSet:i}){const o=R("",t,": ")+e;let a=o+R("(",b(n,", "),")");return a.length>ml&&(a=o+R(`(
|
|
25
|
+
`,ln(b(n,`
|
|
26
26
|
`)),`
|
|
27
|
-
)`)),b([a,b(
|
|
28
|
-
`)+b(["schema",b(e," "),
|
|
29
|
-
`)+b(["scalar",e,b(
|
|
30
|
-
`)+b(["type",e,
|
|
31
|
-
`)+e+(
|
|
32
|
-
`,
|
|
27
|
+
)`)),b([a,b(r," "),i]," ")}},Argument:{leave:({name:t,value:e})=>t+": "+e},FragmentSpread:{leave:({name:t,directives:e})=>"..."+t+R(" ",b(e," "))},InlineFragment:{leave:({typeCondition:t,directives:e,selectionSet:n})=>b(["...",R("on ",t),b(e," "),n]," ")},FragmentDefinition:{leave:({name:t,typeCondition:e,variableDefinitions:n,directives:r,selectionSet:i})=>`fragment ${t}${R("(",b(n,", "),")")} on ${e} ${R("",b(r," ")," ")}`+i},IntValue:{leave:({value:t})=>t},FloatValue:{leave:({value:t})=>t},StringValue:{leave:({value:t,block:e})=>e?Fc(t):cl(t)},BooleanValue:{leave:({value:t})=>t?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:t})=>t},ListValue:{leave:({values:t})=>"["+b(t,", ")+"]"},ObjectValue:{leave:({fields:t})=>"{"+b(t,", ")+"}"},ObjectField:{leave:({name:t,value:e})=>t+": "+e},Directive:{leave:({name:t,arguments:e})=>"@"+t+R("(",b(e,", "),")")},NamedType:{leave:({name:t})=>t},ListType:{leave:({type:t})=>"["+t+"]"},NonNullType:{leave:({type:t})=>t+"!"},SchemaDefinition:{leave:({description:t,directives:e,operationTypes:n})=>R("",t,`
|
|
28
|
+
`)+b(["schema",b(e," "),ut(n)]," ")},OperationTypeDefinition:{leave:({operation:t,type:e})=>t+": "+e},ScalarTypeDefinition:{leave:({description:t,name:e,directives:n})=>R("",t,`
|
|
29
|
+
`)+b(["scalar",e,b(n," ")]," ")},ObjectTypeDefinition:{leave:({description:t,name:e,interfaces:n,directives:r,fields:i})=>R("",t,`
|
|
30
|
+
`)+b(["type",e,R("implements ",b(n," & ")),b(r," "),ut(i)]," ")},FieldDefinition:{leave:({description:t,name:e,arguments:n,type:r,directives:i})=>R("",t,`
|
|
31
|
+
`)+e+(Do(n)?R(`(
|
|
32
|
+
`,ln(b(n,`
|
|
33
33
|
`)),`
|
|
34
|
-
)`):
|
|
35
|
-
`)+b([e+": "+
|
|
36
|
-
`)+b(["interface",e,
|
|
37
|
-
`)+b(["union",e,b(
|
|
38
|
-
`)+b(["enum",e,b(
|
|
39
|
-
`)+b([e,b(
|
|
40
|
-
`)+b(["input",e,b(
|
|
41
|
-
`)+"directive @"+e+(
|
|
42
|
-
`,
|
|
34
|
+
)`):R("(",b(n,", "),")"))+": "+r+R(" ",b(i," "))},InputValueDefinition:{leave:({description:t,name:e,type:n,defaultValue:r,directives:i})=>R("",t,`
|
|
35
|
+
`)+b([e+": "+n,R("= ",r),b(i," ")]," ")},InterfaceTypeDefinition:{leave:({description:t,name:e,interfaces:n,directives:r,fields:i})=>R("",t,`
|
|
36
|
+
`)+b(["interface",e,R("implements ",b(n," & ")),b(r," "),ut(i)]," ")},UnionTypeDefinition:{leave:({description:t,name:e,directives:n,types:r})=>R("",t,`
|
|
37
|
+
`)+b(["union",e,b(n," "),R("= ",b(r," | "))]," ")},EnumTypeDefinition:{leave:({description:t,name:e,directives:n,values:r})=>R("",t,`
|
|
38
|
+
`)+b(["enum",e,b(n," "),ut(r)]," ")},EnumValueDefinition:{leave:({description:t,name:e,directives:n})=>R("",t,`
|
|
39
|
+
`)+b([e,b(n," ")]," ")},InputObjectTypeDefinition:{leave:({description:t,name:e,directives:n,fields:r})=>R("",t,`
|
|
40
|
+
`)+b(["input",e,b(n," "),ut(r)]," ")},DirectiveDefinition:{leave:({description:t,name:e,arguments:n,repeatable:r,locations:i})=>R("",t,`
|
|
41
|
+
`)+"directive @"+e+(Do(n)?R(`(
|
|
42
|
+
`,ln(b(n,`
|
|
43
43
|
`)),`
|
|
44
|
-
)`):
|
|
45
|
-
`,
|
|
44
|
+
)`):R("(",b(n,", "),")"))+(r?" repeatable":"")+" on "+b(i," | ")},SchemaExtension:{leave:({directives:t,operationTypes:e})=>b(["extend schema",b(t," "),ut(e)]," ")},ScalarTypeExtension:{leave:({name:t,directives:e})=>b(["extend scalar",t,b(e," ")]," ")},ObjectTypeExtension:{leave:({name:t,interfaces:e,directives:n,fields:r})=>b(["extend type",t,R("implements ",b(e," & ")),b(n," "),ut(r)]," ")},InterfaceTypeExtension:{leave:({name:t,interfaces:e,directives:n,fields:r})=>b(["extend interface",t,R("implements ",b(e," & ")),b(n," "),ut(r)]," ")},UnionTypeExtension:{leave:({name:t,directives:e,types:n})=>b(["extend union",t,b(e," "),R("= ",b(n," | "))]," ")},EnumTypeExtension:{leave:({name:t,directives:e,values:n})=>b(["extend enum",t,b(e," "),ut(n)]," ")},InputObjectTypeExtension:{leave:({name:t,directives:e,fields:n})=>b(["extend input",t,b(e," "),ut(n)]," ")}};function b(t,e=""){var n;return(n=t?.filter(r=>r).join(e))!==null&&n!==void 0?n:""}function ut(t){return R(`{
|
|
45
|
+
`,ln(b(t,`
|
|
46
46
|
`)),`
|
|
47
|
-
}`)}function
|
|
48
|
-
`))}function
|
|
49
|
-
`)))!==null&&e!==void 0?e:!1}const sn=JSON,dl=t=>t.toUpperCase(),vl=t=>{const e={};return t.forEach((r,n)=>{e[n]=r}),e},yl=(t,e,r)=>t.document?t:{document:t,variables:e,requestHeaders:r,signal:void 0},ml=(t,e,r)=>t.query?t:{query:t,variables:e,requestHeaders:r,signal:void 0},_l=(t,e)=>t.documents?t:{documents:t,requestHeaders:e,signal:void 0},Po=t=>{var e,r;let n;const i=t.definitions.filter(o=>o.kind==="OperationDefinition");return i.length===1&&(n=(r=(e=i[0])==null?void 0:e.name)==null?void 0:r.value),n},un=t=>{if(typeof t=="string"){let r;try{const n=No(t);r=Po(n)}catch{}return{query:t,operationName:r}}const e=Po(t);return{query:pl(t),operationName:e}};let Io=class Zr extends Error{constructor(e,r){const n=`${Zr.extractMessage(e)}: ${JSON.stringify({response:e,request:r})}`;super(n),Object.setPrototypeOf(this,Zr.prototype),this.response=e,this.request=r,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,Zr)}static extractMessage(e){var r,n,i;return(i=(n=(r=e.errors)==null?void 0:r[0])==null?void 0:n.message)!=null?i:`GraphQL Error (Code: ${e.status})`}};var cn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ar(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var ln={exports:{}};(function(t,e){var r=typeof self<"u"?self:cn,n=function(){function o(){this.fetch=!1,this.DOMException=r.DOMException}return o.prototype=r,new o}();(function(o){(function(a){var u={searchParams:"URLSearchParams"in o,iterable:"Symbol"in o&&"iterator"in Symbol,blob:"FileReader"in o&&"Blob"in o&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in o,arrayBuffer:"ArrayBuffer"in o};function c(h){return h&&DataView.prototype.isPrototypeOf(h)}if(u.arrayBuffer)var s=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],l=ArrayBuffer.isView||function(h){return h&&s.indexOf(Object.prototype.toString.call(h))>-1};function p(h){if(typeof h!="string"&&(h=String(h)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(h))throw new TypeError("Invalid character in header field name");return h.toLowerCase()}function f(h){return typeof h!="string"&&(h=String(h)),h}function y(h){var g={next:function(){var A=h.shift();return{done:A===void 0,value:A}}};return u.iterable&&(g[Symbol.iterator]=function(){return g}),g}function v(h){this.map={},h instanceof v?h.forEach(function(g,A){this.append(A,g)},this):Array.isArray(h)?h.forEach(function(g){this.append(g[0],g[1])},this):h&&Object.getOwnPropertyNames(h).forEach(function(g){this.append(g,h[g])},this)}v.prototype.append=function(h,g){h=p(h),g=f(g);var A=this.map[h];this.map[h]=A?A+", "+g:g},v.prototype.delete=function(h){delete this.map[p(h)]},v.prototype.get=function(h){return h=p(h),this.has(h)?this.map[h]:null},v.prototype.has=function(h){return this.map.hasOwnProperty(p(h))},v.prototype.set=function(h,g){this.map[p(h)]=f(g)},v.prototype.forEach=function(h,g){for(var A in this.map)this.map.hasOwnProperty(A)&&h.call(g,this.map[A],A,this)},v.prototype.keys=function(){var h=[];return this.forEach(function(g,A){h.push(A)}),y(h)},v.prototype.values=function(){var h=[];return this.forEach(function(g){h.push(g)}),y(h)},v.prototype.entries=function(){var h=[];return this.forEach(function(g,A){h.push([A,g])}),y(h)},u.iterable&&(v.prototype[Symbol.iterator]=v.prototype.entries);function m(h){if(h.bodyUsed)return Promise.reject(new TypeError("Already read"));h.bodyUsed=!0}function _(h){return new Promise(function(g,A){h.onload=function(){g(h.result)},h.onerror=function(){A(h.error)}})}function E(h){var g=new FileReader,A=_(g);return g.readAsArrayBuffer(h),A}function R(h){var g=new FileReader,A=_(g);return g.readAsText(h),A}function U(h){for(var g=new Uint8Array(h),A=new Array(g.length),W=0;W<g.length;W++)A[W]=String.fromCharCode(g[W]);return A.join("")}function D(h){if(h.slice)return h.slice(0);var g=new Uint8Array(h.byteLength);return g.set(new Uint8Array(h)),g.buffer}function G(){return this.bodyUsed=!1,this._initBody=function(h){this._bodyInit=h,h?typeof h=="string"?this._bodyText=h:u.blob&&Blob.prototype.isPrototypeOf(h)?this._bodyBlob=h:u.formData&&FormData.prototype.isPrototypeOf(h)?this._bodyFormData=h:u.searchParams&&URLSearchParams.prototype.isPrototypeOf(h)?this._bodyText=h.toString():u.arrayBuffer&&u.blob&&c(h)?(this._bodyArrayBuffer=D(h.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):u.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(h)||l(h))?this._bodyArrayBuffer=D(h):this._bodyText=h=Object.prototype.toString.call(h):this._bodyText="",this.headers.get("content-type")||(typeof h=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):u.searchParams&&URLSearchParams.prototype.isPrototypeOf(h)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},u.blob&&(this.blob=function(){var h=m(this);if(h)return h;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?m(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(E)}),this.text=function(){var h=m(this);if(h)return h;if(this._bodyBlob)return R(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(U(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},u.formData&&(this.formData=function(){return this.text().then(Et)}),this.json=function(){return this.text().then(JSON.parse)},this}var j=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function H(h){var g=h.toUpperCase();return j.indexOf(g)>-1?g:h}function B(h,g){g=g||{};var A=g.body;if(h instanceof B){if(h.bodyUsed)throw new TypeError("Already read");this.url=h.url,this.credentials=h.credentials,g.headers||(this.headers=new v(h.headers)),this.method=h.method,this.mode=h.mode,this.signal=h.signal,!A&&h._bodyInit!=null&&(A=h._bodyInit,h.bodyUsed=!0)}else this.url=String(h);if(this.credentials=g.credentials||this.credentials||"same-origin",(g.headers||!this.headers)&&(this.headers=new v(g.headers)),this.method=H(g.method||this.method||"GET"),this.mode=g.mode||this.mode||null,this.signal=g.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&A)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(A)}B.prototype.clone=function(){return new B(this,{body:this._bodyInit})};function Et(h){var g=new FormData;return h.trim().split("&").forEach(function(A){if(A){var W=A.split("="),z=W.shift().replace(/\+/g," "),M=W.join("=").replace(/\+/g," ");g.append(decodeURIComponent(z),decodeURIComponent(M))}}),g}function qt(h){var g=new v,A=h.replace(/\r?\n[\t ]+/g," ");return A.split(/\r?\n/).forEach(function(W){var z=W.split(":"),M=z.shift().trim();if(M){var Qr=z.join(":").trim();g.append(M,Qr)}}),g}G.call(B.prototype);function K(h,g){g||(g={}),this.type="default",this.status=g.status===void 0?200:g.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in g?g.statusText:"OK",this.headers=new v(g.headers),this.url=g.url||"",this._initBody(h)}G.call(K.prototype),K.prototype.clone=function(){return new K(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new v(this.headers),url:this.url})},K.error=function(){var h=new K(null,{status:0,statusText:""});return h.type="error",h};var ye=[301,302,303,307,308];K.redirect=function(h,g){if(ye.indexOf(g)===-1)throw new RangeError("Invalid status code");return new K(null,{status:g,headers:{location:h}})},a.DOMException=o.DOMException;try{new a.DOMException}catch{a.DOMException=function(g,A){this.message=g,this.name=A;var W=Error(g);this.stack=W.stack},a.DOMException.prototype=Object.create(Error.prototype),a.DOMException.prototype.constructor=a.DOMException}function Kt(h,g){return new Promise(function(A,W){var z=new B(h,g);if(z.signal&&z.signal.aborted)return W(new a.DOMException("Aborted","AbortError"));var M=new XMLHttpRequest;function Qr(){M.abort()}M.onload=function(){var Qe={status:M.status,statusText:M.statusText,headers:qt(M.getAllResponseHeaders()||"")};Qe.url="responseURL"in M?M.responseURL:Qe.headers.get("X-Request-URL");var lo="response"in M?M.response:M.responseText;A(new K(lo,Qe))},M.onerror=function(){W(new TypeError("Network request failed"))},M.ontimeout=function(){W(new TypeError("Network request failed"))},M.onabort=function(){W(new a.DOMException("Aborted","AbortError"))},M.open(z.method,z.url,!0),z.credentials==="include"?M.withCredentials=!0:z.credentials==="omit"&&(M.withCredentials=!1),"responseType"in M&&u.blob&&(M.responseType="blob"),z.headers.forEach(function(Qe,lo){M.setRequestHeader(lo,Qe)}),z.signal&&(z.signal.addEventListener("abort",Qr),M.onreadystatechange=function(){M.readyState===4&&z.signal.removeEventListener("abort",Qr)}),M.send(typeof z._bodyInit>"u"?null:z._bodyInit)})}return Kt.polyfill=!0,o.fetch||(o.fetch=Kt,o.Headers=v,o.Request=B,o.Response=K),a.Headers=v,a.Request=B,a.Response=K,a.fetch=Kt,Object.defineProperty(a,"__esModule",{value:!0}),a})({})})(n),n.fetch.ponyfill=!0,delete n.fetch.polyfill;var i=n;e=i.fetch,e.default=i.fetch,e.fetch=i.fetch,e.Headers=i.Headers,e.Request=i.Request,e.Response=i.Response,t.exports=e})(ln,ln.exports);var pn=ln.exports;const sr=ar(pn),gl=Object.freeze(Object.defineProperty({__proto__:null,default:sr},Symbol.toStringTag,{value:"Module"})),Zt=t=>{let e={};return t&&(typeof Headers<"u"&&t instanceof Headers||gl&&pn.Headers&&t instanceof pn.Headers?e=vl(t):Array.isArray(t)?t.forEach(([r,n])=>{r&&n!==void 0&&(e[r]=n)}):e=t),e},Mo=t=>t.replace(/([\s,]|#[^\n\r]+)+/g," ").trim(),El=t=>{if(!Array.isArray(t.query)){const n=t,i=[`query=${encodeURIComponent(Mo(n.query))}`];return t.variables&&i.push(`variables=${encodeURIComponent(n.jsonSerializer.stringify(n.variables))}`),n.operationName&&i.push(`operationName=${encodeURIComponent(n.operationName)}`),i.join("&")}if(typeof t.variables<"u"&&!Array.isArray(t.variables))throw new Error("Cannot create query with given variable type, array expected");const e=t,r=t.query.reduce((n,i,o)=>(n.push({query:Mo(i),variables:e.variables?e.jsonSerializer.stringify(e.variables[o]):void 0}),n),[]);return`query=${encodeURIComponent(e.jsonSerializer.stringify(r))}`},Tl=t=>e=>Yt(void 0,null,function*(){var r;const{url:n,query:i,variables:o,operationName:a,fetch:u,fetchOptions:c,middleware:s}=e,l=C({},e.headers);let p="",f;t==="POST"?(f=Ol(i,o,a,c.jsonSerializer),typeof f=="string"&&(l["Content-Type"]="application/json")):p=El({query:i,variables:o,operationName:a,jsonSerializer:(r=c.jsonSerializer)!=null?r:sn});const y=C({method:t,headers:l,body:f},c);let v=n,m=y;if(s){const _=yield Promise.resolve(s(tr(C({},y),{url:n,operationName:a,variables:o}))),{url:E}=_,R=_e(_,["url"]);v=E,m=R}return p&&(v=`${v}?${p}`),yield u(v,m)});let bl=class{constructor(e,r={}){this.url=e,this.requestConfig=r,this.rawRequest=(...n)=>Yt(this,null,function*(){const[i,o,a]=n,u=ml(i,o,a),c=this.requestConfig,{headers:s,fetch:l=sr,method:p="POST",requestMiddleware:f,responseMiddleware:y}=c,v=_e(c,["headers","fetch","method","requestMiddleware","responseMiddleware"]),{url:m}=this;u.signal!==void 0&&(v.signal=u.signal);const{operationName:_}=un(u.query);return fn({url:m,query:u.query,variables:u.variables,headers:C(C({},Zt(hn(s))),Zt(u.requestHeaders)),operationName:_,fetch:l,method:p,fetchOptions:v,middleware:f}).then(E=>(y&&y(E),E)).catch(E=>{throw y&&y(E),E})})}request(e,...r){return Yt(this,null,function*(){const[n,i]=r,o=yl(e,n,i),a=this.requestConfig,{headers:u,fetch:c=sr,method:s="POST",requestMiddleware:l,responseMiddleware:p}=a,f=_e(a,["headers","fetch","method","requestMiddleware","responseMiddleware"]),{url:y}=this;o.signal!==void 0&&(f.signal=o.signal);const{query:v,operationName:m}=un(o.document);return fn({url:y,query:v,variables:o.variables,headers:C(C({},Zt(hn(u))),Zt(o.requestHeaders)),operationName:m,fetch:c,method:s,fetchOptions:f,middleware:l}).then(_=>(p&&p(_),_.data)).catch(_=>{throw p&&p(_),_})})}batchRequests(e,r){var n;const i=_l(e,r),o=this.requestConfig,{headers:a}=o,u=_e(o,["headers"]);i.signal!==void 0&&(u.signal=i.signal);const c=i.documents.map(({document:l})=>un(l).query),s=i.documents.map(({variables:l})=>l);return fn({url:this.url,query:c,variables:s,headers:C(C({},Zt(hn(a))),Zt(i.requestHeaders)),operationName:void 0,fetch:(n=this.requestConfig.fetch)!=null?n:sr,method:this.requestConfig.method||"POST",fetchOptions:u,middleware:this.requestConfig.requestMiddleware}).then(l=>(this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(l),l.data)).catch(l=>{throw this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(l),l})}setHeaders(e){return this.requestConfig.headers=e,this}setHeader(e,r){const{headers:n}=this.requestConfig;return n?n[e]=r:this.requestConfig.headers={[e]:r},this}setEndpoint(e){return this.url=e,this}};const fn=t=>Yt(void 0,null,function*(){var e,r;const{query:n,variables:i,fetchOptions:o}=t,a=Tl(dl((e=t.method)!=null?e:"post")),u=Array.isArray(t.query),c=yield a(t),s=yield Sl(c,(r=o.jsonSerializer)!=null?r:sn),l=Array.isArray(s)?!s.some(({data:f})=>!f):!!s.data,p=Array.isArray(s)||!s.errors||Array.isArray(s.errors)&&!s.errors.length||o.errorPolicy==="all"||o.errorPolicy==="ignore";if(c.ok&&p&&l){const f=s,y=_e(f,["errors"]),v=o.errorPolicy==="ignore"?y:s;return tr(C({},u?{data:v}:v),{headers:c.headers,status:c.status})}else{const f=typeof s=="string"?{error:s}:s;throw new Io(tr(C({},f),{status:c.status,headers:c.headers}),{query:n,variables:i})}}),Ol=(t,e,r,n)=>{const i=n??sn;if(!Array.isArray(t))return i.stringify({query:t,variables:e,operationName:r});if(typeof e<"u"&&!Array.isArray(e))throw new Error("Cannot create request body with given variable type, array expected");const o=t.reduce((a,u,c)=>(a.push({query:u,variables:e?e[c]:void 0}),a),[]);return i.stringify(o)},Sl=(t,e)=>Yt(void 0,null,function*(){let r;return t.headers.forEach((n,i)=>{i.toLowerCase()==="content-type"&&(r=n)}),r&&(r.toLowerCase().startsWith("application/json")||r.toLowerCase().startsWith("application/graphql+json")||r.toLowerCase().startsWith("application/graphql-response+json"))?e.parse(yield t.text()):t.text()}),hn=t=>typeof t=="function"?t():t;var dn={exports:{}};(function(t,e){e=t.exports=r,e.getSerialize=n;function r(i,o,a,u){return JSON.stringify(i,n(o,u),a)}function n(i,o){var a=[],u=[];return o==null&&(o=function(c,s){return a[0]===s?"[Circular ~]":"[Circular ~."+u.slice(0,a.indexOf(s)).join(".")+"]"}),function(c,s){if(a.length>0){var l=a.indexOf(this);~l?a.splice(l+1):a.push(this),~l?u.splice(l,1/0,c):u.push(c),~a.indexOf(s)&&(s=o.call(this,c,s))}else a.push(s);return i==null?s:i.call(this,c,s)}}})(dn,dn.exports);var wl=dn.exports;const be=ar(wl);var ur=function(){return ur=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++){e=arguments[r];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},ur.apply(this,arguments)},cr=new Map,vn=new Map,ko=!0,lr=!1;function Do(t){return t.replace(/[\s,]+/g," ").trim()}function Al(t){return Do(t.source.body.substring(t.start,t.end))}function Ll(t){var e=new Set,r=[];return t.definitions.forEach(function(n){if(n.kind==="FragmentDefinition"){var i=n.name.value,o=Al(n.loc),a=vn.get(i);a&&!a.has(o)?ko&&console.warn("Warning: fragment with name "+i+` already exists.
|
|
47
|
+
}`)}function R(t,e,n=""){return e!=null&&e!==""?t+e+n:""}function ln(t){return R(" ",t.replace(/\n/g,`
|
|
48
|
+
`))}function Do(t){var e;return(e=t?.some(n=>n.includes(`
|
|
49
|
+
`)))!==null&&e!==void 0?e:!1}const cr=JSON,gl=t=>t.toUpperCase(),El=t=>{const e={};return t.forEach((n,r)=>{e[r]=n}),e},Tl=(t,e,n)=>t.document?t:{document:t,variables:e,requestHeaders:n,signal:void 0},bl=(t,e,n)=>t.query?t:{query:t,variables:e,requestHeaders:n,signal:void 0},Ol=(t,e)=>t.documents?t:{documents:t,requestHeaders:e,signal:void 0},Uo=t=>{var e,n;let r;const i=t.definitions.filter(o=>o.kind==="OperationDefinition");return i.length===1&&(r=(n=(e=i[0])==null?void 0:e.name)==null?void 0:n.value),r},lr=t=>{if(typeof t=="string"){let n;try{const r=Mo(t);n=Uo(r)}catch{}return{query:t,operationName:n}}const e=Uo(t);return{query:yl(t),operationName:e}};let jo=class nr extends Error{constructor(e,n){const r=`${nr.extractMessage(e)}: ${JSON.stringify({response:e,request:n})}`;super(r),Object.setPrototypeOf(this,nr.prototype),this.response=e,this.request=n,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,nr)}static extractMessage(e){var n,r,i;return(i=(r=(n=e.errors)==null?void 0:n[0])==null?void 0:r.message)!=null?i:`GraphQL Error (Code: ${e.status})`}};var pr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function pn(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var fr={exports:{}};(function(t,e){var n=typeof self<"u"?self:pr,r=function(){function o(){this.fetch=!1,this.DOMException=n.DOMException}return o.prototype=n,new o}();(function(o){(function(a){var u={searchParams:"URLSearchParams"in o,iterable:"Symbol"in o&&"iterator"in Symbol,blob:"FileReader"in o&&"Blob"in o&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in o,arrayBuffer:"ArrayBuffer"in o};function c(h){return h&&DataView.prototype.isPrototypeOf(h)}if(u.arrayBuffer)var s=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],l=ArrayBuffer.isView||function(h){return h&&s.indexOf(Object.prototype.toString.call(h))>-1};function p(h){if(typeof h!="string"&&(h=String(h)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(h))throw new TypeError("Invalid character in header field name");return h.toLowerCase()}function f(h){return typeof h!="string"&&(h=String(h)),h}function y(h){var g={next:function(){var L=h.shift();return{done:L===void 0,value:L}}};return u.iterable&&(g[Symbol.iterator]=function(){return g}),g}function v(h){this.map={},h instanceof v?h.forEach(function(g,L){this.append(L,g)},this):Array.isArray(h)?h.forEach(function(g){this.append(g[0],g[1])},this):h&&Object.getOwnPropertyNames(h).forEach(function(g){this.append(g,h[g])},this)}v.prototype.append=function(h,g){h=p(h),g=f(g);var L=this.map[h];this.map[h]=L?L+", "+g:g},v.prototype.delete=function(h){delete this.map[p(h)]},v.prototype.get=function(h){return h=p(h),this.has(h)?this.map[h]:null},v.prototype.has=function(h){return this.map.hasOwnProperty(p(h))},v.prototype.set=function(h,g){this.map[p(h)]=f(g)},v.prototype.forEach=function(h,g){for(var L in this.map)this.map.hasOwnProperty(L)&&h.call(g,this.map[L],L,this)},v.prototype.keys=function(){var h=[];return this.forEach(function(g,L){h.push(L)}),y(h)},v.prototype.values=function(){var h=[];return this.forEach(function(g){h.push(g)}),y(h)},v.prototype.entries=function(){var h=[];return this.forEach(function(g,L){h.push([L,g])}),y(h)},u.iterable&&(v.prototype[Symbol.iterator]=v.prototype.entries);function m(h){if(h.bodyUsed)return Promise.reject(new TypeError("Already read"));h.bodyUsed=!0}function _(h){return new Promise(function(g,L){h.onload=function(){g(h.result)},h.onerror=function(){L(h.error)}})}function E(h){var g=new FileReader,L=_(g);return g.readAsArrayBuffer(h),L}function S(h){var g=new FileReader,L=_(g);return g.readAsText(h),L}function I(h){for(var g=new Uint8Array(h),L=new Array(g.length),H=0;H<g.length;H++)L[H]=String.fromCharCode(g[H]);return L.join("")}function U(h){if(h.slice)return h.slice(0);var g=new Uint8Array(h.byteLength);return g.set(new Uint8Array(h)),g.buffer}function z(){return this.bodyUsed=!1,this._initBody=function(h){this._bodyInit=h,h?typeof h=="string"?this._bodyText=h:u.blob&&Blob.prototype.isPrototypeOf(h)?this._bodyBlob=h:u.formData&&FormData.prototype.isPrototypeOf(h)?this._bodyFormData=h:u.searchParams&&URLSearchParams.prototype.isPrototypeOf(h)?this._bodyText=h.toString():u.arrayBuffer&&u.blob&&c(h)?(this._bodyArrayBuffer=U(h.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):u.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(h)||l(h))?this._bodyArrayBuffer=U(h):this._bodyText=h=Object.prototype.toString.call(h):this._bodyText="",this.headers.get("content-type")||(typeof h=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):u.searchParams&&URLSearchParams.prototype.isPrototypeOf(h)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},u.blob&&(this.blob=function(){var h=m(this);if(h)return h;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?m(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(E)}),this.text=function(){var h=m(this);if(h)return h;if(this._bodyBlob)return S(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(I(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},u.formData&&(this.formData=function(){return this.text().then(st)}),this.json=function(){return this.text().then(JSON.parse)},this}var F=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function j(h){var g=h.toUpperCase();return F.indexOf(g)>-1?g:h}function V(h,g){g=g||{};var L=g.body;if(h instanceof V){if(h.bodyUsed)throw new TypeError("Already read");this.url=h.url,this.credentials=h.credentials,g.headers||(this.headers=new v(h.headers)),this.method=h.method,this.mode=h.mode,this.signal=h.signal,!L&&h._bodyInit!=null&&(L=h._bodyInit,h.bodyUsed=!0)}else this.url=String(h);if(this.credentials=g.credentials||this.credentials||"same-origin",(g.headers||!this.headers)&&(this.headers=new v(g.headers)),this.method=j(g.method||this.method||"GET"),this.mode=g.mode||this.mode||null,this.signal=g.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&L)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(L)}V.prototype.clone=function(){return new V(this,{body:this._bodyInit})};function st(h){var g=new FormData;return h.trim().split("&").forEach(function(L){if(L){var H=L.split("="),$=H.shift().replace(/\+/g," "),M=H.join("=").replace(/\+/g," ");g.append(decodeURIComponent($),decodeURIComponent(M))}}),g}function Wt(h){var g=new v,L=h.replace(/\r?\n[\t ]+/g," ");return L.split(/\r?\n/).forEach(function(H){var $=H.split(":"),M=$.shift().trim();if(M){var Ee=$.join(":").trim();g.append(M,Ee)}}),g}z.call(V.prototype);function W(h,g){g||(g={}),this.type="default",this.status=g.status===void 0?200:g.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in g?g.statusText:"OK",this.headers=new v(g.headers),this.url=g.url||"",this._initBody(h)}z.call(W.prototype),W.prototype.clone=function(){return new W(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new v(this.headers),url:this.url})},W.error=function(){var h=new W(null,{status:0,statusText:""});return h.type="error",h};var Yt=[301,302,303,307,308];W.redirect=function(h,g){if(Yt.indexOf(g)===-1)throw new RangeError("Invalid status code");return new W(null,{status:g,headers:{location:h}})},a.DOMException=o.DOMException;try{new a.DOMException}catch{a.DOMException=function(g,L){this.message=g,this.name=L;var H=Error(g);this.stack=H.stack},a.DOMException.prototype=Object.create(Error.prototype),a.DOMException.prototype.constructor=a.DOMException}function xt(h,g){return new Promise(function(L,H){var $=new V(h,g);if($.signal&&$.signal.aborted)return H(new a.DOMException("Aborted","AbortError"));var M=new XMLHttpRequest;function Ee(){M.abort()}M.onload=function(){var Jt={status:M.status,statusText:M.statusText,headers:Wt(M.getAllResponseHeaders()||"")};Jt.url="responseURL"in M?M.responseURL:Jt.headers.get("X-Request-URL");var nn="response"in M?M.response:M.responseText;L(new W(nn,Jt))},M.onerror=function(){H(new TypeError("Network request failed"))},M.ontimeout=function(){H(new TypeError("Network request failed"))},M.onabort=function(){H(new a.DOMException("Aborted","AbortError"))},M.open($.method,$.url,!0),$.credentials==="include"?M.withCredentials=!0:$.credentials==="omit"&&(M.withCredentials=!1),"responseType"in M&&u.blob&&(M.responseType="blob"),$.headers.forEach(function(Jt,nn){M.setRequestHeader(nn,Jt)}),$.signal&&($.signal.addEventListener("abort",Ee),M.onreadystatechange=function(){M.readyState===4&&$.signal.removeEventListener("abort",Ee)}),M.send(typeof $._bodyInit>"u"?null:$._bodyInit)})}return xt.polyfill=!0,o.fetch||(o.fetch=xt,o.Headers=v,o.Request=V,o.Response=W),a.Headers=v,a.Request=V,a.Response=W,a.fetch=xt,Object.defineProperty(a,"__esModule",{value:!0}),a})({})})(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var i=r;e=i.fetch,e.default=i.fetch,e.fetch=i.fetch,e.Headers=i.Headers,e.Request=i.Request,e.Response=i.Response,t.exports=e})(fr,fr.exports);var hr=fr.exports;const fn=pn(hr),Sl=Object.freeze(Object.defineProperty({__proto__:null,default:fn},Symbol.toStringTag,{value:"Module"})),ne=t=>{let e={};return t&&(typeof Headers<"u"&&t instanceof Headers||Sl&&hr.Headers&&t instanceof hr.Headers?e=El(t):Array.isArray(t)?t.forEach(([n,r])=>{n&&r!==void 0&&(e[n]=r)}):e=t),e},Bo=t=>t.replace(/([\s,]|#[^\n\r]+)+/g," ").trim(),wl=t=>{if(!Array.isArray(t.query)){const r=t,i=[`query=${encodeURIComponent(Bo(r.query))}`];return t.variables&&i.push(`variables=${encodeURIComponent(r.jsonSerializer.stringify(r.variables))}`),r.operationName&&i.push(`operationName=${encodeURIComponent(r.operationName)}`),i.join("&")}if(typeof t.variables<"u"&&!Array.isArray(t.variables))throw new Error("Cannot create query with given variable type, array expected");const e=t,n=t.query.reduce((r,i,o)=>(r.push({query:Bo(i),variables:e.variables?e.jsonSerializer.stringify(e.variables[o]):void 0}),r),[]);return`query=${encodeURIComponent(e.jsonSerializer.stringify(n))}`},Al=t=>e=>Zt(void 0,null,function*(){var n;const{url:r,query:i,variables:o,operationName:a,fetch:u,fetchOptions:c,middleware:s}=e,l=N({},e.headers);let p="",f;t==="POST"?(f=Rl(i,o,a,c.jsonSerializer),typeof f=="string"&&(l["Content-Type"]="application/json")):p=wl({query:i,variables:o,operationName:a,jsonSerializer:(n=c.jsonSerializer)!=null?n:cr});const y=N({method:t,headers:l,body:f},c);let v=r,m=y;if(s){const _=yield Promise.resolve(s(on(N({},y),{url:r,operationName:a,variables:o}))),{url:E}=_,S=be(_,["url"]);v=E,m=S}return p&&(v=`${v}?${p}`),yield u(v,m)});let Ll=class{constructor(e,n={}){this.url=e,this.requestConfig=n,this.rawRequest=(...r)=>Zt(this,null,function*(){const[i,o,a]=r,u=bl(i,o,a),c=this.requestConfig,{headers:s,fetch:l=fn,method:p="POST",requestMiddleware:f,responseMiddleware:y}=c,v=be(c,["headers","fetch","method","requestMiddleware","responseMiddleware"]),{url:m}=this;u.signal!==void 0&&(v.signal=u.signal);const{operationName:_}=lr(u.query);return dr({url:m,query:u.query,variables:u.variables,headers:N(N({},ne(vr(s))),ne(u.requestHeaders)),operationName:_,fetch:l,method:p,fetchOptions:v,middleware:f}).then(E=>(y&&y(E),E)).catch(E=>{throw y&&y(E),E})})}request(e,...n){return Zt(this,null,function*(){const[r,i]=n,o=Tl(e,r,i),a=this.requestConfig,{headers:u,fetch:c=fn,method:s="POST",requestMiddleware:l,responseMiddleware:p}=a,f=be(a,["headers","fetch","method","requestMiddleware","responseMiddleware"]),{url:y}=this;o.signal!==void 0&&(f.signal=o.signal);const{query:v,operationName:m}=lr(o.document);return dr({url:y,query:v,variables:o.variables,headers:N(N({},ne(vr(u))),ne(o.requestHeaders)),operationName:m,fetch:c,method:s,fetchOptions:f,middleware:l}).then(_=>(p&&p(_),_.data)).catch(_=>{throw p&&p(_),_})})}batchRequests(e,n){var r;const i=Ol(e,n),o=this.requestConfig,{headers:a}=o,u=be(o,["headers"]);i.signal!==void 0&&(u.signal=i.signal);const c=i.documents.map(({document:l})=>lr(l).query),s=i.documents.map(({variables:l})=>l);return dr({url:this.url,query:c,variables:s,headers:N(N({},ne(vr(a))),ne(i.requestHeaders)),operationName:void 0,fetch:(r=this.requestConfig.fetch)!=null?r:fn,method:this.requestConfig.method||"POST",fetchOptions:u,middleware:this.requestConfig.requestMiddleware}).then(l=>(this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(l),l.data)).catch(l=>{throw this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(l),l})}setHeaders(e){return this.requestConfig.headers=e,this}setHeader(e,n){const{headers:r}=this.requestConfig;return r?r[e]=n:this.requestConfig.headers={[e]:n},this}setEndpoint(e){return this.url=e,this}};const dr=t=>Zt(void 0,null,function*(){var e,n;const{query:r,variables:i,fetchOptions:o}=t,a=Al(gl((e=t.method)!=null?e:"post")),u=Array.isArray(t.query),c=yield a(t),s=yield Cl(c,(n=o.jsonSerializer)!=null?n:cr),l=Array.isArray(s)?!s.some(({data:f})=>!f):!!s.data,p=Array.isArray(s)||!s.errors||Array.isArray(s.errors)&&!s.errors.length||o.errorPolicy==="all"||o.errorPolicy==="ignore";if(c.ok&&p&&l){const f=s,y=be(f,["errors"]),v=o.errorPolicy==="ignore"?y:s;return on(N({},u?{data:v}:v),{headers:c.headers,status:c.status})}else{const f=typeof s=="string"?{error:s}:s;throw new jo(on(N({},f),{status:c.status,headers:c.headers}),{query:r,variables:i})}}),Rl=(t,e,n,r)=>{const i=r??cr;if(!Array.isArray(t))return i.stringify({query:t,variables:e,operationName:n});if(typeof e<"u"&&!Array.isArray(e))throw new Error("Cannot create request body with given variable type, array expected");const o=t.reduce((a,u,c)=>(a.push({query:u,variables:e?e[c]:void 0}),a),[]);return i.stringify(o)},Cl=(t,e)=>Zt(void 0,null,function*(){let n;return t.headers.forEach((r,i)=>{i.toLowerCase()==="content-type"&&(n=r)}),n&&(n.toLowerCase().startsWith("application/json")||n.toLowerCase().startsWith("application/graphql+json")||n.toLowerCase().startsWith("application/graphql-response+json"))?e.parse(yield t.text()):t.text()}),vr=t=>typeof t=="function"?t():t;var yr={exports:{}};(function(t,e){e=t.exports=n,e.getSerialize=r;function n(i,o,a,u){return JSON.stringify(i,r(o,u),a)}function r(i,o){var a=[],u=[];return o==null&&(o=function(c,s){return a[0]===s?"[Circular ~]":"[Circular ~."+u.slice(0,a.indexOf(s)).join(".")+"]"}),function(c,s){if(a.length>0){var l=a.indexOf(this);~l?a.splice(l+1):a.push(this),~l?u.splice(l,1/0,c):u.push(c),~a.indexOf(s)&&(s=o.call(this,c,s))}else a.push(s);return i==null?s:i.call(this,c,s)}}})(yr,yr.exports);var Nl=yr.exports;const Ae=pn(Nl);var hn=function(){return hn=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},hn.apply(this,arguments)},dn=new Map,mr=new Map,$o=!0,vn=!1;function Fo(t){return t.replace(/[\s,]+/g," ").trim()}function xl(t){return Fo(t.source.body.substring(t.start,t.end))}function Pl(t){var e=new Set,n=[];return t.definitions.forEach(function(r){if(r.kind==="FragmentDefinition"){var i=r.name.value,o=xl(r.loc),a=mr.get(i);a&&!a.has(o)?$o&&console.warn("Warning: fragment with name "+i+` already exists.
|
|
50
50
|
graphql-tag enforces all fragment names across your application to be unique; read more about
|
|
51
|
-
this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):a||
|
|
51
|
+
this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):a||mr.set(i,a=new Set),a.add(o),e.has(o)||(e.add(o),n.push(r))}else n.push(r)}),hn(hn({},t),{definitions:n})}function Il(t){var e=new Set(t.definitions);e.forEach(function(r){r.loc&&delete r.loc,Object.keys(r).forEach(function(i){var o=r[i];o&&typeof o=="object"&&e.add(o)})});var n=t.loc;return n&&(delete n.startToken,delete n.endToken),t}function Ml(t){var e=Fo(t);if(!dn.has(e)){var n=Mo(t,{experimentalFragmentVariables:vn,allowLegacyFragmentVariables:vn});if(!n||n.kind!=="Document")throw new Error("Not a valid GraphQL document.");dn.set(e,Il(Pl(n)))}return dn.get(e)}function Y(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];typeof t=="string"&&(t=[t]);var r=t[0];return e.forEach(function(i,o){i&&i.kind==="Document"?r+=i.loc.source.body:r+=i,r+=t[o+1]}),Ml(r)}function kl(){dn.clear(),mr.clear()}function Dl(){$o=!1}function Ul(){vn=!0}function jl(){vn=!1}var Le={gql:Y,resetCaches:kl,disableFragmentWarnings:Dl,enableExperimentalFragmentVariables:Ul,disableExperimentalFragmentVariables:jl};(function(t){t.gql=Le.gql,t.resetCaches=Le.resetCaches,t.disableFragmentWarnings=Le.disableFragmentWarnings,t.enableExperimentalFragmentVariables=Le.enableExperimentalFragmentVariables,t.disableExperimentalFragmentVariables=Le.disableExperimentalFragmentVariables})(Y||(Y={})),Y.default=Y;const Vo=Y`
|
|
52
52
|
fragment MatchParts on MatchConfig {
|
|
53
53
|
regexValue
|
|
54
54
|
matchValue
|
|
55
55
|
}
|
|
56
|
-
`,
|
|
56
|
+
`,Bl=Y`
|
|
57
57
|
mutation PushPayload(
|
|
58
58
|
$session_secure_id: String!
|
|
59
59
|
$payload_id: ID!
|
|
@@ -79,7 +79,7 @@ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):a
|
|
|
79
79
|
highlight_logs: $highlight_logs
|
|
80
80
|
)
|
|
81
81
|
}
|
|
82
|
-
|
|
82
|
+
`,$l=Y`
|
|
83
83
|
mutation PushSessionEvents(
|
|
84
84
|
$session_secure_id: String!
|
|
85
85
|
$payload_id: Int64ID!
|
|
@@ -91,7 +91,7 @@ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):a
|
|
|
91
91
|
data: $data
|
|
92
92
|
)
|
|
93
93
|
}
|
|
94
|
-
`,
|
|
94
|
+
`,Fl=Y`
|
|
95
95
|
mutation identifySession(
|
|
96
96
|
$session_secure_id: String!
|
|
97
97
|
$user_identifier: String!
|
|
@@ -103,7 +103,7 @@ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):a
|
|
|
103
103
|
user_object: $user_object
|
|
104
104
|
)
|
|
105
105
|
}
|
|
106
|
-
`,
|
|
106
|
+
`,Vl=Y`
|
|
107
107
|
mutation addSessionProperties(
|
|
108
108
|
$session_secure_id: String!
|
|
109
109
|
$properties_object: Any
|
|
@@ -113,11 +113,11 @@ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):a
|
|
|
113
113
|
properties_object: $properties_object
|
|
114
114
|
)
|
|
115
115
|
}
|
|
116
|
-
`,
|
|
116
|
+
`,Hl=Y`
|
|
117
117
|
mutation pushMetrics($metrics: [MetricInput]!) {
|
|
118
118
|
pushMetrics(metrics: $metrics)
|
|
119
119
|
}
|
|
120
|
-
`,
|
|
120
|
+
`,Gl=Y`
|
|
121
121
|
mutation addSessionFeedback(
|
|
122
122
|
$session_secure_id: String!
|
|
123
123
|
$user_name: String
|
|
@@ -133,7 +133,7 @@ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):a
|
|
|
133
133
|
timestamp: $timestamp
|
|
134
134
|
)
|
|
135
135
|
}
|
|
136
|
-
|
|
136
|
+
`,ql=Y`
|
|
137
137
|
mutation initializeSession(
|
|
138
138
|
$session_secure_id: String!
|
|
139
139
|
$session_key: String
|
|
@@ -220,12 +220,12 @@ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):a
|
|
|
220
220
|
}
|
|
221
221
|
}
|
|
222
222
|
}
|
|
223
|
-
${
|
|
224
|
-
`,
|
|
223
|
+
${Vo}
|
|
224
|
+
`,zl=Y`
|
|
225
225
|
query Ignore($id: ID!) {
|
|
226
226
|
ignore(id: $id)
|
|
227
227
|
}
|
|
228
|
-
`,
|
|
228
|
+
`,Xl=Y`
|
|
229
229
|
query GetSamplingConfig($organization_verbose_id: String!) {
|
|
230
230
|
sampling(organization_verbose_id: $organization_verbose_id) {
|
|
231
231
|
spans {
|
|
@@ -274,8 +274,8 @@ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):a
|
|
|
274
274
|
}
|
|
275
275
|
}
|
|
276
276
|
}
|
|
277
|
-
${
|
|
278
|
-
`,Gl=(t,e,r,n)=>t();function Hl(t,e=Gl){return{PushPayload(r,n){return e(i=>t.request(Ml,r,C(C({},n),i)),"PushPayload","mutation",r)},PushSessionEvents(r,n){return e(i=>t.request(kl,r,C(C({},n),i)),"PushSessionEvents","mutation",r)},identifySession(r,n){return e(i=>t.request(Dl,r,C(C({},n),i)),"identifySession","mutation",r)},addSessionProperties(r,n){return e(i=>t.request(Ul,r,C(C({},n),i)),"addSessionProperties","mutation",r)},pushMetrics(r,n){return e(i=>t.request(jl,r,C(C({},n),i)),"pushMetrics","mutation",r)},addSessionFeedback(r,n){return e(i=>t.request(Bl,r,C(C({},n),i)),"addSessionFeedback","mutation",r)},initializeSession(r,n){return e(i=>t.request($l,r,C(C({},n),i)),"initializeSession","mutation",r)},Ignore(r,n){return e(i=>t.request(Fl,r,C(C({},n),i)),"Ignore","query",r)},GetSamplingConfig(r,n){return e(i=>t.request(Vl,r,C(C({},n),i)),"GetSamplingConfig","query",r)}}}function zl(t,e,r){try{if(!(e in t))return()=>{};const n=t[e],i=r(n);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:n}})),t[e]=i,()=>{t[e]=n}}catch{return()=>{}}}function Xl(t){if(!t||!t.outerHTML)return"";let e="";for(;t.parentElement;){let r=t.localName;if(!r)break;r=r.toLowerCase();let n=t.parentElement,i=[];if(n.children&&n.children.length>0)for(let o=0;o<n.children.length;o++){let a=n.children[o];a.localName&&a.localName.toLowerCase&&a.localName.toLowerCase()===r&&i.push(a)}i.length>1&&(r+=":eq("+i.indexOf(t)+")"),e=r+(e?">"+e:""),t=n}return e}function yn(t){return Object.prototype.toString.call(t)==="[object Object]"}function jo(t,e){if(e===0)return!0;const r=Object.keys(t);for(const n of r)if(yn(t[n])&&jo(t[n],e-1))return!0;return!1}function mn(t,e){const r={numOfKeysLimit:50,depthOfLimit:4};Object.assign(r,e);const n=[],i=[];return JSON.stringify(t,function(u,c){if(n.length>0){const s=n.indexOf(this);~s?n.splice(s+1):n.push(this),~s?i.splice(s,1/0,u):i.push(u),~n.indexOf(c)&&(n[0]===c?c="[Circular ~]":c="[Circular ~."+i.slice(0,n.indexOf(c)).join(".")+"]")}else n.push(c);if(c==null)return c;if(o(c))return a(c);if(c instanceof Event){const s={};for(const l in c){const p=c[l];Array.isArray(p)?s[l]=Xl(p.length?p[0]:null):s[l]=p}return s}else{if(c instanceof Node)return c instanceof HTMLElement?c?c.outerHTML:"":c.nodeName;if(c instanceof Error)return c.name+": "+c.message}return c});function o(u){return yn(u)&&Object.keys(u).length>r.numOfKeysLimit||typeof u=="function"?!0:u instanceof Event&&u.isTrusted===!1?Object.keys(u).length===1:!!(yn(u)&&jo(u,r.depthOfLimit))}function a(u){let c=u.toString();return r.stringLengthLimit&&c.length>r.stringLengthLimit&&(c=`${c.slice(0,r.stringLengthLimit)}...`),c}}function ql(t){return typeof t=="number"&&!isNaN(t)&&isFinite(t)}const _n="exception.message",Kl="exception.stacktrace",gn="exception.type",Wl="http.response.status_code",Yl="server.address",Jl="service.name",Ql="service.version",Zl="telemetry.sdk.name",tp="telemetry.sdk.version",pr="url.full",Bo="url.path",ep="url.query",rp="user_agent.original",En=15*60*1e3;/*! js-cookie v3.0.5 | MIT */function fr(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)t[n]=r[n]}return t}var np={read:function(t){return t[0]==='"'&&(t=t.slice(1,-1)),t.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(t){return encodeURIComponent(t).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function Tn(t,e){function r(i,o,a){if(typeof document<"u"){a=fr({},e,a),typeof a.expires=="number"&&(a.expires=new Date(Date.now()+a.expires*864e5)),a.expires&&(a.expires=a.expires.toUTCString()),i=encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var u="";for(var c in a)a[c]&&(u+="; "+c,a[c]!==!0&&(u+="="+a[c].split(";")[0]));return document.cookie=i+"="+t.write(o,i)+u}}function n(i){if(!(typeof document>"u"||arguments.length&&!i)){for(var o=document.cookie?document.cookie.split("; "):[],a={},u=0;u<o.length;u++){var c=o[u].split("="),s=c.slice(1).join("=");try{var l=decodeURIComponent(c[0]);if(a[l]=t.read(s,l),i===l)break}catch{}}return i?a[i]:a}}return Object.create({set:r,get:n,remove:function(i,o){r(i,"",fr({},o,{expires:-1}))},withAttributes:function(i){return Tn(this.converter,fr({},this.attributes,i))},withConverter:function(i){return Tn(fr({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(e)},converter:{value:Object.freeze(t)}})}var bn=Tn(np,{path:"/"});let On="localStorage",Sn=!0,ip=class{constructor(){ge(this,"storage",{})}get length(){return Object.keys(this.storage).length}key(e){var r;return(r=Object.keys(this.storage)[e])!=null?r:null}getItem(e){var r;return(r=this.storage[e])!=null?r:""}setItem(e,r){this.storage[e]=r}removeItem(e){delete this.storage[e]}},op=class{getItem(e){var r;return(r=bn.get(e))!=null?r:""}setItem(e,r){if(!Sn)return;const n=new Date;n.setTime(n.getTime()+En),bn.set(e,r,{expires:n})}removeItem(e){Sn&&bn.remove(e)}};const te=new ip,hr=new op,Se=()=>{let t=null;if(typeof window>"u")return te;try{switch(On){case"localStorage":t=window.localStorage;break;case"sessionStorage":t=window.sessionStorage;break}t||(bt("storage","getPersistentStorage","debug",`persistent storage was not found for mode ${On}; using global storage`),t=te)}catch(e){bt("storage","getPersistentStorage","debug","failed to get persistent storage; using global storage",e),t=te}return t},ap=t=>{On=t},$o=t=>{Sn=t},wn=t=>{try{return Se().getItem(t)}catch(e){return bt("storage","getItem","debug",`failed to get item ${t}; using global storage`,e),te.getItem(t)}},Fo=(t,e)=>{hr.setItem(t,e);try{return Se().setItem(t,e)}catch(r){return bt("storage","setItem","debug",`failed to set item ${t}; using global storage`,r),te.setItem(t,e)}},Vo=t=>{hr.removeItem(t);try{return Se().removeItem(t)}catch(e){return bt("storage","removeItem","debug",`failed to remove item ${t}; using global storage`,e),te.removeItem(t)}};var ee=(t=>(t.SEGMENT_LAST_SENT_HASH_KEY="HIGHLIGHT_SEGMENT_LAST_SENT_HASH_KEY",t.SESSION_ID="sessionID",t.SESSION_DATA="sessionData",t.USER_IDENTIFIER="highlightIdentifier",t.USER_OBJECT="highlightUserObject",t))(ee||{});const dr=t=>`${ee.SESSION_DATA}_${t}`,Ot=()=>{var t;return typeof globalThis<"u"&&(t=globalThis.persistentSessionSecureID)!=null&&t.length?globalThis.persistentSessionSecureID:Go()},sp=t=>{typeof globalThis<"u"&&t!=null&&t.length&&(globalThis.persistentSessionSecureID=t)},Go=()=>{var t;return(t=wn(ee.SESSION_ID))!=null?t:""},Ho=t=>{Fo(ee.SESSION_ID,t)},up=t=>{const e=dr(t);return JSON.parse(wn(e)||"{}")},cp=t=>{t||(t=Go());let e=up(t);if(e&&e.lastPushTime&&Date.now()-e.lastPushTime<En)return e;Vo(dr(t))},zo=function(t){if(!(t!=null&&t.sessionSecureID))return;const e=t.sessionSecureID;sp(e);const r=dr(e);Fo(r,JSON.stringify(t)),pp(r)},lp=function(){const t=hr.getItem(ee.SESSION_ID);Ho(t);const e=dr(t),r=hr.getItem(e);try{zo(JSON.parse(r))}catch{}};function pp(t){const e=`${ee.SESSION_DATA}_`;for(let r=Se().length-1;r>=0;r--){const n=Se().key(r);if(n&&n.startsWith(e)&&n!==t)try{const i=JSON.parse(wn(n)||"{}");i.lastPushTime!==void 0&&Date.now()-i.lastPushTime>=En&&(bt("highlightSession","pruneSessionData","debug",`removing session data for stale key ${n}`),Vo(n))}catch(i){bt("highlightSession","pruneSessionData","error",`failed to parse session data for key ${n}`,i)}}}var Xo=(t=>(t.BillingQuotaExceeded="BillingQuotaExceeded",t))(Xo||{});const An=3,Ln=1e3,Rn=500,fp=[Xo.BillingQuotaExceeded.toString()],hp=t=>{var e;return((e=t.response.errors)==null?void 0:e.find(r=>fp.includes(r.message)))===void 0},dp=()=>{const t=(e,r,n,i,o=0)=>Yt(void 0,null,function*(){try{return yield e()}catch(a){if(a instanceof Io&&!hp(a))throw a;if(o<An)return yield new Promise(u=>setTimeout(u,Ln+Rn*Math.pow(2,o))),yield t(e,r,n,i,o+1);throw console.error(`highlight.io: data request failed after ${o} retries`),a}});return t},J="feature_flag",qo="launchdarkly",vp="evaluation",yp=`${J}.set.id`,mp=`${J}.key`,_p=`${J}.contextKeys`,gp=`${J}.context.id`,Ep=`${J}.result.value`,Tp=`${J}.provider.name`,Ko={kind:`${J}.result.reason.kind`,errorKind:`${J}.result.reason.errorKind`,ruleIndex:`${J}.result.reason.ruleIndex`,ruleId:`${J}.result.reason.ruleId`,prerequisiteKey:`${J}.result.reason.prerequisiteKey`,inExperiment:`${J}.result.reason.inExperiment`,bigSegmentsStatus:`${J}.result.reason.bigSegmentsStatus`},bp=`${J}.result.variationIndex`,Op=`${qo}.application.id`,Sp=`${qo}.application.version`,wp="$ld:telemetry:session:init",Wo="$ld:telemetry:track",Ap="document_load",Lp="result.status";function Yo(t){return t.includes("%")||t.includes(":")?t.replace(/%/g,"%25").replace(/:/g,"%3A"):t}function Jo(t){return t.kind==="multi"}function Nn(t){return Jo(t)?Object.keys(t).sort().filter(e=>e!=="kind").map(e=>`${e}:${Yo(t[e].key)}`).join(":"):"kind"in t&&t.kind==="user"?t.key:"kind"in t?`${t.kind}:${Yo(t.key)}`:t.key}function Qo(t){return Jo(t)?Object.keys(t).sort().filter(e=>e!=="kind").map(e=>({[e]:t[e].key})).reduce((e,r)=>C(C({},e),r),{}):"kind"in t?{[t.kind]:t.key}:{user:t.key}}let Rp=class{constructor(e,r){ge(this,"client"),ge(this,"metadata"),this.client=e,this.metadata=r}getHooks(e){return[]}init(e){this.client.track(wp,{sessionID:e})}recordGauge(e,r){}identify(e,r,n={},i){}error(e,r){}track(e,r){const n=r.event;this.client.track(n?`${Wo}:${n}`:Wo,tr(C({},r),{sessionID:e}))}},Np=class extends fo{constructor(e,r){super(),ge(this,"client"),this.client=new Rp(e,r)}getHooks(e){return[{getMetadata:()=>({name:"highlight.run/ld"}),afterIdentify:(r,n,i)=>(this.load(this.client),n)}]}init(e){return this._bufferCall("init",[e])}recordGauge(e,r){return this._bufferCall("recordGauge",[e,r])}identify(e,r,n={},i){return this._bufferCall("identify",[e,r,n,i])}error(e,r){return this._bufferCall("error",[e,r])}track(e,r){return this._bufferCall("track",[e,r])}};const Cp="9.26.1",xp={version:Cp},Pp=xp.version;function Ip(t){if(t.id.length)return`#${t.id}`;if(t.classList.length){let e=[];for(const r of t.classList)e.push(`.${r}`);return`${t.nodeName.toLowerCase()}${e.join(",")}`}return t.nodeName.toLowerCase()}const Mp=t=>{let e;const r=()=>{clearTimeout(e),e=setTimeout(()=>{var n,i;t({height:window.innerHeight,width:window.innerWidth,availHeight:window.screen.availHeight,availWidth:window.screen.availWidth,colorDepth:window.screen.colorDepth,pixelDepth:window.screen.pixelDepth,orientation:(i=(n=window.screen.orientation)==null?void 0:n.angle)!=null?i:0})},500)};return window.addEventListener("resize",r),r(),()=>window.removeEventListener("resize",r)};var Zo={exports:{}};/**
|
|
277
|
+
${Vo}
|
|
278
|
+
`,Kl=(t,e,n,r)=>t();function Wl(t,e=Kl){return{PushPayload(n,r){return e(i=>t.request(Bl,n,N(N({},r),i)),"PushPayload","mutation",n)},PushSessionEvents(n,r){return e(i=>t.request($l,n,N(N({},r),i)),"PushSessionEvents","mutation",n)},identifySession(n,r){return e(i=>t.request(Fl,n,N(N({},r),i)),"identifySession","mutation",n)},addSessionProperties(n,r){return e(i=>t.request(Vl,n,N(N({},r),i)),"addSessionProperties","mutation",n)},pushMetrics(n,r){return e(i=>t.request(Hl,n,N(N({},r),i)),"pushMetrics","mutation",n)},addSessionFeedback(n,r){return e(i=>t.request(Gl,n,N(N({},r),i)),"addSessionFeedback","mutation",n)},initializeSession(n,r){return e(i=>t.request(ql,n,N(N({},r),i)),"initializeSession","mutation",n)},Ignore(n,r){return e(i=>t.request(zl,n,N(N({},r),i)),"Ignore","query",n)},GetSamplingConfig(n,r){return e(i=>t.request(Xl,n,N(N({},r),i)),"GetSamplingConfig","query",n)}}}function Yl(t,e,n){try{if(!(e in t))return()=>{};const r=t[e],i=n(r);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),t[e]=i,()=>{t[e]=r}}catch{return()=>{}}}function Jl(t){if(!t||!t.outerHTML)return"";let e="";for(;t.parentElement;){let n=t.localName;if(!n)break;n=n.toLowerCase();let r=t.parentElement,i=[];if(r.children&&r.children.length>0)for(let o=0;o<r.children.length;o++){let a=r.children[o];a.localName&&a.localName.toLowerCase&&a.localName.toLowerCase()===n&&i.push(a)}i.length>1&&(n+=":eq("+i.indexOf(t)+")"),e=n+(e?">"+e:""),t=r}return e}function _r(t){return Object.prototype.toString.call(t)==="[object Object]"}function Ho(t,e){if(e===0)return!0;const n=Object.keys(t);for(const r of n)if(_r(t[r])&&Ho(t[r],e-1))return!0;return!1}function gr(t,e){const n={numOfKeysLimit:50,depthOfLimit:4};Object.assign(n,e);const r=[],i=[];return JSON.stringify(t,function(u,c){if(r.length>0){const s=r.indexOf(this);~s?r.splice(s+1):r.push(this),~s?i.splice(s,1/0,u):i.push(u),~r.indexOf(c)&&(r[0]===c?c="[Circular ~]":c="[Circular ~."+i.slice(0,r.indexOf(c)).join(".")+"]")}else r.push(c);if(c==null)return c;if(o(c))return a(c);if(c instanceof Event){const s={};for(const l in c){const p=c[l];Array.isArray(p)?s[l]=Jl(p.length?p[0]:null):s[l]=p}return s}else{if(c instanceof Node)return c instanceof HTMLElement?c?c.outerHTML:"":c.nodeName;if(c instanceof Error)return c.name+": "+c.message}return c});function o(u){return _r(u)&&Object.keys(u).length>n.numOfKeysLimit||typeof u=="function"?!0:u instanceof Event&&u.isTrusted===!1?Object.keys(u).length===1:!!(_r(u)&&Ho(u,n.depthOfLimit))}function a(u){let c=u.toString();return n.stringLengthLimit&&c.length>n.stringLengthLimit&&(c=`${c.slice(0,n.stringLengthLimit)}...`),c}}function Ql(t){return typeof t=="number"&&!isNaN(t)&&isFinite(t)}const Er="exception.message",Zl="exception.stacktrace",Tr="exception.type",Go="http.response.status_code",tp="server.address",ep="service.name",np="service.version",rp="telemetry.sdk.name",ip="telemetry.sdk.version",Re="url.full",qo="url.path",op="url.query",ap="user_agent.original",br=15*60*1e3;/*! js-cookie v3.0.5 | MIT */function yn(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)t[r]=n[r]}return t}var sp={read:function(t){return t[0]==='"'&&(t=t.slice(1,-1)),t.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(t){return encodeURIComponent(t).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function Or(t,e){function n(i,o,a){if(typeof document<"u"){a=yn({},e,a),typeof a.expires=="number"&&(a.expires=new Date(Date.now()+a.expires*864e5)),a.expires&&(a.expires=a.expires.toUTCString()),i=encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var u="";for(var c in a)a[c]&&(u+="; "+c,a[c]!==!0&&(u+="="+a[c].split(";")[0]));return document.cookie=i+"="+t.write(o,i)+u}}function r(i){if(!(typeof document>"u"||arguments.length&&!i)){for(var o=document.cookie?document.cookie.split("; "):[],a={},u=0;u<o.length;u++){var c=o[u].split("="),s=c.slice(1).join("=");try{var l=decodeURIComponent(c[0]);if(a[l]=t.read(s,l),i===l)break}catch{}}return i?a[i]:a}}return Object.create({set:n,get:r,remove:function(i,o){n(i,"",yn({},o,{expires:-1}))},withAttributes:function(i){return Or(this.converter,yn({},this.attributes,i))},withConverter:function(i){return Or(yn({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(e)},converter:{value:Object.freeze(t)}})}var Sr=Or(sp,{path:"/"});let wr="localStorage",Ar=!0,up=class{constructor(){Oe(this,"storage",{})}get length(){return Object.keys(this.storage).length}key(e){var n;return(n=Object.keys(this.storage)[e])!=null?n:null}getItem(e){var n;return(n=this.storage[e])!=null?n:""}setItem(e,n){this.storage[e]=n}removeItem(e){delete this.storage[e]}},cp=class{getItem(e){var n;return(n=Sr.get(e))!=null?n:""}setItem(e,n){if(!Ar)return;const r=new Date;r.setTime(r.getTime()+br),Sr.set(e,n,{expires:r})}removeItem(e){Ar&&Sr.remove(e)}};const re=new up,mn=new cp,Ce=()=>{let t=null;if(typeof window>"u")return re;try{switch(wr){case"localStorage":t=window.localStorage;break;case"sessionStorage":t=window.sessionStorage;break}t||(bt("storage","getPersistentStorage","debug",`persistent storage was not found for mode ${wr}; using global storage`),t=re)}catch(e){bt("storage","getPersistentStorage","debug","failed to get persistent storage; using global storage",e),t=re}return t},lp=t=>{wr=t},zo=t=>{Ar=t},Lr=t=>{try{return Ce().getItem(t)}catch(e){return bt("storage","getItem","debug",`failed to get item ${t}; using global storage`,e),re.getItem(t)}},Xo=(t,e)=>{mn.setItem(t,e);try{return Ce().setItem(t,e)}catch(n){return bt("storage","setItem","debug",`failed to set item ${t}; using global storage`,n),re.setItem(t,e)}},Ko=t=>{mn.removeItem(t);try{return Ce().removeItem(t)}catch(e){return bt("storage","removeItem","debug",`failed to remove item ${t}; using global storage`,e),re.removeItem(t)}};var ie=(t=>(t.SEGMENT_LAST_SENT_HASH_KEY="HIGHLIGHT_SEGMENT_LAST_SENT_HASH_KEY",t.SESSION_ID="sessionID",t.SESSION_DATA="sessionData",t.USER_IDENTIFIER="highlightIdentifier",t.USER_OBJECT="highlightUserObject",t))(ie||{});const _n=t=>`${ie.SESSION_DATA}_${t}`,Ot=()=>{var t;return typeof globalThis<"u"&&(t=globalThis.persistentSessionSecureID)!=null&&t.length?globalThis.persistentSessionSecureID:Wo()},pp=t=>{typeof globalThis<"u"&&t!=null&&t.length&&(globalThis.persistentSessionSecureID=t)},Wo=()=>{var t;return(t=Lr(ie.SESSION_ID))!=null?t:""},Yo=t=>{Xo(ie.SESSION_ID,t)},fp=t=>{const e=_n(t);return JSON.parse(Lr(e)||"{}")},hp=t=>{t||(t=Wo());let e=fp(t);if(e&&e.lastPushTime&&Date.now()-e.lastPushTime<br)return e;Ko(_n(t))},Jo=function(t){if(!(t!=null&&t.sessionSecureID))return;const e=t.sessionSecureID;pp(e);const n=_n(e);Xo(n,JSON.stringify(t)),vp(n)},dp=function(){const t=mn.getItem(ie.SESSION_ID);Yo(t);const e=_n(t),n=mn.getItem(e);try{Jo(JSON.parse(n))}catch{}};function vp(t){const e=`${ie.SESSION_DATA}_`;for(let n=Ce().length-1;n>=0;n--){const r=Ce().key(n);if(r&&r.startsWith(e)&&r!==t)try{const i=JSON.parse(Lr(r)||"{}");i.lastPushTime!==void 0&&Date.now()-i.lastPushTime>=br&&(bt("highlightSession","pruneSessionData","debug",`removing session data for stale key ${r}`),Ko(r))}catch(i){bt("highlightSession","pruneSessionData","error",`failed to parse session data for key ${r}`,i)}}}var Qo=(t=>(t.BillingQuotaExceeded="BillingQuotaExceeded",t))(Qo||{});const Rr=3,Cr=1e3,Nr=500,yp=[Qo.BillingQuotaExceeded.toString()],mp=t=>{var e;return((e=t.response.errors)==null?void 0:e.find(n=>yp.includes(n.message)))===void 0},_p=()=>{const t=(e,n,r,i,o=0)=>Zt(void 0,null,function*(){try{return yield e()}catch(a){if(a instanceof jo&&!mp(a))throw a;if(o<Rr)return yield new Promise(u=>setTimeout(u,Cr+Nr*Math.pow(2,o))),yield t(e,n,r,i,o+1);throw console.error(`highlight.io: data request failed after ${o} retries`),a}});return t},J="feature_flag",Zo="launchdarkly",gp="evaluation",Ep=`${J}.set.id`,Tp=`${J}.key`,bp=`${J}.contextKeys`,Op=`${J}.context.id`,Sp=`${J}.result.value`,wp=`${J}.provider.name`,ta={kind:`${J}.result.reason.kind`,errorKind:`${J}.result.reason.errorKind`,ruleIndex:`${J}.result.reason.ruleIndex`,ruleId:`${J}.result.reason.ruleId`,prerequisiteKey:`${J}.result.reason.prerequisiteKey`,inExperiment:`${J}.result.reason.inExperiment`,bigSegmentsStatus:`${J}.result.reason.bigSegmentsStatus`},Ap=`${J}.result.variationIndex`,Lp=`${Zo}.application.id`,Rp=`${Zo}.application.version`,Cp="$ld:telemetry:session:init",ea="$ld:telemetry:track",Np="document_load",xp="result.status";function na(t){return t.includes("%")||t.includes(":")?t.replace(/%/g,"%25").replace(/:/g,"%3A"):t}function ra(t){return t.kind==="multi"}function xr(t){return ra(t)?Object.keys(t).sort().filter(e=>e!=="kind").map(e=>`${e}:${na(t[e].key)}`).join(":"):"kind"in t&&t.kind==="user"?t.key:"kind"in t?`${t.kind}:${na(t.key)}`:t.key}function ia(t){return ra(t)?Object.keys(t).sort().filter(e=>e!=="kind").map(e=>({[e]:t[e].key})).reduce((e,n)=>N(N({},e),n),{}):"kind"in t?{[t.kind]:t.key}:{user:t.key}}let Pp=class{constructor(e,n){Oe(this,"client"),Oe(this,"metadata"),this.client=e,this.metadata=n}getHooks(e){return[]}init(e){this.client.track(Cp,{sessionID:e})}recordGauge(e,n){}identify(e,n,r={},i){}error(e,n){}track(e,n){const r=n.event;this.client.track(r?`${ea}:${r}`:ea,on(N({},n),{sessionID:e}))}},Ip=class extends _o{constructor(e,n){super(),Oe(this,"client"),this.client=new Pp(e,n)}getHooks(e){return[{getMetadata:()=>({name:"highlight.run/ld"}),afterIdentify:(n,r,i)=>(this.load(this.client),r)}]}init(e){return this._bufferCall("init",[e])}recordGauge(e,n){return this._bufferCall("recordGauge",[e,n])}identify(e,n,r={},i){return this._bufferCall("identify",[e,n,r,i])}error(e,n){return this._bufferCall("error",[e,n])}track(e,n){return this._bufferCall("track",[e,n])}};const Mp="9.27.1",kp={version:Mp},Dp=kp.version;function Up(t){if(t.id.length)return`#${t.id}`;if(t.classList.length){let e=[];for(const n of t.classList)e.push(`.${n}`);return`${t.nodeName.toLowerCase()}${e.join(",")}`}return t.nodeName.toLowerCase()}const jp=t=>{let e;const n=()=>{clearTimeout(e),e=setTimeout(()=>{var r,i;t({height:window.innerHeight,width:window.innerWidth,availHeight:window.screen.availHeight,availWidth:window.screen.availWidth,colorDepth:window.screen.colorDepth,pixelDepth:window.screen.pixelDepth,orientation:(i=(r=window.screen.orientation)==null?void 0:r.angle)!=null?i:0})},500)};return window.addEventListener("resize",n),n(),()=>window.removeEventListener("resize",n)};var oa={exports:{}};/**
|
|
279
279
|
* @preserve
|
|
280
280
|
* JS Implementation of incremental MurmurHash3 (r150) (as of May 10, 2013)
|
|
281
281
|
*
|
|
@@ -285,25 +285,25 @@ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):a
|
|
|
285
285
|
* @see http://github.com/garycourt/murmurhash-js
|
|
286
286
|
* @author <a href="mailto:aappleby@gmail.com">Austin Appleby</a>
|
|
287
287
|
* @see http://sites.google.com/site/murmurhash/
|
|
288
|
-
*/(function(t){(function(){var e;function r
|
|
289
|
-
`).filter(function(c){return!!c.match(i)},this);return u.map(function(c){c.indexOf("(eval ")>-1&&(c=c.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(\),.*$)/g,""));var s=c.replace(/^\s+/,"").replace(/\(eval code/g,"("),l=s.match(/ (\((.+):(\d+):(\d+)\)$)/);s=l?s.replace(l[0],""):s;var p=s.split(/\s+/).slice(1),f=this.extractLocation(l?l[1]:p.pop()),y=p.join(" ")||void 0,v=["eval","<anonymous>"].indexOf(f[0])>-1?void 0:f[0];return new
|
|
290
|
-
`).filter(function(c){return!c.match(o)},this);return u.map(function(c){if(c.indexOf(" > eval")>-1&&(c=c.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),c.indexOf("@")===-1&&c.indexOf(":")===-1)return new
|
|
288
|
+
*/(function(t){(function(){var e;function n(r,i){var o=this instanceof n?this:e;if(o.reset(i),typeof r=="string"&&r.length>0&&o.hash(r),o!==this)return o}n.prototype.hash=function(r){var i,o,a,u,c;switch(c=r.length,this.len+=c,o=this.k1,a=0,this.rem){case 0:o^=c>a?r.charCodeAt(a++)&65535:0;case 1:o^=c>a?(r.charCodeAt(a++)&65535)<<8:0;case 2:o^=c>a?(r.charCodeAt(a++)&65535)<<16:0;case 3:o^=c>a?(r.charCodeAt(a)&255)<<24:0,o^=c>a?(r.charCodeAt(a++)&65280)>>8:0}if(this.rem=c+this.rem&3,c-=this.rem,c>0){for(i=this.h1;o=o*11601+(o&65535)*3432906752&4294967295,o=o<<15|o>>>17,o=o*13715+(o&65535)*461832192&4294967295,i^=o,i=i<<13|i>>>19,i=i*5+3864292196&4294967295,!(a>=c);)o=r.charCodeAt(a++)&65535^(r.charCodeAt(a++)&65535)<<8^(r.charCodeAt(a++)&65535)<<16,u=r.charCodeAt(a++),o^=(u&255)<<24^(u&65280)>>8;switch(o=0,this.rem){case 3:o^=(r.charCodeAt(a+2)&65535)<<16;case 2:o^=(r.charCodeAt(a+1)&65535)<<8;case 1:o^=r.charCodeAt(a)&65535}this.h1=i}return this.k1=o,this},n.prototype.result=function(){var r,i;return r=this.k1,i=this.h1,r>0&&(r=r*11601+(r&65535)*3432906752&4294967295,r=r<<15|r>>>17,r=r*13715+(r&65535)*461832192&4294967295,i^=r),i^=this.len,i^=i>>>16,i=i*51819+(i&65535)*2246770688&4294967295,i^=i>>>13,i=i*44597+(i&65535)*3266445312&4294967295,i^=i>>>16,i>>>0},n.prototype.reset=function(r){return this.h1=typeof r=="number"?r:0,this.rem=this.k1=this.len=0,this},e=new n,t.exports=n})()})(oa);var Bp=oa.exports;const $p=pn(Bp),Pr=28,oe="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",Fp=2246822507,aa=t=>{var e,n="";if(t){const r=$p(t).result();for(let i=0;i<Pr;i++){const o=((r^i*Fp)>>>0)%oe.length;n+=oe.charAt(o)}}else{const r=typeof window<"u"&&((e=window.crypto)==null?void 0:e.getRandomValues),i=new Uint32Array(Pr);r&&window.crypto.getRandomValues(i);for(let o=0;o<Pr;o++)r?n+=oe.charAt(i[o]%oe.length):n+=oe.charAt(Math.floor(Math.random()*oe.length))}return n};let Vp=class{constructor(e){Oe(this,"sessionSecureID");try{e!=null&&e.storageMode&&lp(e?.storageMode),zo(!!(e!=null&&e.sessionCookie)),e!=null&&e.sessionCookie?dp():zo(!1)}catch(n){Tt("Error initializing @launchdarkly observability plugin","error",n)}}configureSession(e,n){try{const r=Ot();let i=hp(r);i!=null&&i.sessionSecureID?this.sessionSecureID=i.sessionSecureID:(n!=null&&n.sessionKey?this.sessionSecureID=aa(`${e}-${n.sessionKey}`):this.sessionSecureID=aa(),Yo(this.sessionSecureID),Jo({sessionSecureID:this.sessionSecureID,sessionKey:n?.sessionKey,projectID:0,sessionStartTime:Date.now(),lastPushTime:Date.now()}))}catch(r){Tt("Error configuring session in @launchdarkly observability plugin","error",r)}}};class sa extends _o{start(){return this._sdk.start()}stop(){return this._sdk.stop()}recordGauge(e){return this._bufferCall("recordGauge",[e])}recordCount(e){return this._bufferCall("recordCount",[e])}recordIncr(e){return this._bufferCall("recordIncr",[e])}recordHistogram(e){return this._bufferCall("recordHistogram",[e])}recordUpDownCounter(e){return this._bufferCall("recordUpDownCounter",[e])}startSpan(e,n,r,i){return this._bufferCall("startSpan",[e,n,r,i])}startManualSpan(e,n,r,i){return this._bufferCall("startManualSpan",[e,n,r,i])}register(e,n){return this._bufferCall("register",[e,n])}recordLog(e,n,r){return this._bufferCall("recordLog",[e,n,r])}recordError(e,n,r,i,o){return this._bufferCall("recordError",[e,n,r,i,o])}}rt.LDObserve=void 0,typeof globalThis<"u"?globalThis.LDObserve?rt.LDObserve=globalThis.LDObserve:(rt.LDObserve=new sa,globalThis.LDObserve=rt.LDObserve):rt.LDObserve=new sa;const Hp=Object.freeze(Object.defineProperty({__proto__:null,get LDObserve(){return rt.LDObserve}},Symbol.toStringTag,{value:"Module"}));var Gp=Object.defineProperty,qp=Object.defineProperties,zp=Object.getOwnPropertyDescriptors,gn=Object.getOwnPropertySymbols,Xp=Object.getPrototypeOf,ua=Object.prototype.hasOwnProperty,ca=Object.prototype.propertyIsEnumerable,Kp=Reflect.get,Ir=(t,e,n)=>e in t?Gp(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,x=(t,e)=>{for(var n in e||(e={}))ua.call(e,n)&&Ir(t,n,e[n]);if(gn)for(var n of gn(e))ca.call(e,n)&&Ir(t,n,e[n]);return t},nt=(t,e)=>qp(t,zp(e)),Wp=(t,e)=>{var n={};for(var r in t)ua.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&gn)for(var r of gn(t))e.indexOf(r)<0&&ca.call(t,r)&&(n[r]=t[r]);return n},D=(t,e,n)=>Ir(t,typeof e!="symbol"?e+"":e,n),la=(t,e,n)=>Kp(Xp(t),n,e),ct=(t,e,n)=>new Promise((r,i)=>{var o=c=>{try{u(n.next(c))}catch(s){i(s)}},a=c=>{try{u(n.throw(c))}catch(s){i(s)}},u=c=>c.done?r(c.value):Promise.resolve(c.value).then(o,a);u((n=n.apply(t,e)).next())});const Yp=["assert","count","countReset","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","table","time","timeEnd","timeLog","trace","warn"];var It=(t=>(t.DeviceMemory="DeviceMemory",t.ViewportHeight="ViewportHeight",t.ViewportWidth="ViewportWidth",t.ScreenHeight="ScreenHeight",t.ScreenWidth="ScreenWidth",t.ViewportArea="ViewportArea",t))(It||{}),lt=(t=>(t.Device="Device",t.WebVital="WebVital",t.Performance="Performance",t.Frontend="Frontend",t.Backend="Backend",t))(lt||{}),pa={exports:{}},fa={exports:{}},ha;function Jp(){return ha||(ha=1,function(t,e){(function(n,r){t.exports=r()})(pr,function(){function n(m){return!isNaN(parseFloat(m))&&isFinite(m)}function r(m){return m.charAt(0).toUpperCase()+m.substring(1)}function i(m){return function(){return this[m]}}var o=["isConstructor","isEval","isNative","isToplevel"],a=["columnNumber","lineNumber"],u=["fileName","functionName","source"],c=["args"],s=["evalOrigin"],l=o.concat(a,u,c,s);function p(m){if(m)for(var _=0;_<l.length;_++)m[l[_]]!==void 0&&this["set"+r(l[_])](m[l[_]])}p.prototype={getArgs:function(){return this.args},setArgs:function(m){if(Object.prototype.toString.call(m)!=="[object Array]")throw new TypeError("Args must be an Array");this.args=m},getEvalOrigin:function(){return this.evalOrigin},setEvalOrigin:function(m){if(m instanceof p)this.evalOrigin=m;else if(m instanceof Object)this.evalOrigin=new p(m);else throw new TypeError("Eval Origin must be an Object or StackFrame")},toString:function(){var m=this.getFileName()||"",_=this.getLineNumber()||"",E=this.getColumnNumber()||"",S=this.getFunctionName()||"";return this.getIsEval()?m?"[eval] ("+m+":"+_+":"+E+")":"[eval]:"+_+":"+E:S?S+" ("+m+":"+_+":"+E+")":m+":"+_+":"+E}},p.fromString=function(m){var _=m.indexOf("("),E=m.lastIndexOf(")"),S=m.substring(0,_),I=m.substring(_+1,E).split(","),U=m.substring(E+1);if(U.indexOf("@")===0)var z=/@(.+?)(?::(\d+))?(?::(\d+))?$/.exec(U,""),F=z[1],j=z[2],V=z[3];return new p({functionName:S,args:I||void 0,fileName:F,lineNumber:j||void 0,columnNumber:V||void 0})};for(var f=0;f<o.length;f++)p.prototype["get"+r(o[f])]=i(o[f]),p.prototype["set"+r(o[f])]=function(m){return function(_){this[m]=!!_}}(o[f]);for(var y=0;y<a.length;y++)p.prototype["get"+r(a[y])]=i(a[y]),p.prototype["set"+r(a[y])]=function(m){return function(_){if(!n(_))throw new TypeError(m+" must be a Number");this[m]=Number(_)}}(a[y]);for(var v=0;v<u.length;v++)p.prototype["get"+r(u[v])]=i(u[v]),p.prototype["set"+r(u[v])]=function(m){return function(_){this[m]=String(_)}}(u[v]);return p})}(fa)),fa.exports}(function(t,e){(function(n,r){t.exports=r(Jp())})(pr,function(n){var r=/(^|@)\S+:\d+/,i=/^\s*at .*(\S+:\d+|\(native\))/m,o=/^(eval@)?(\[native code])?$/;return{parse:function(a){if(typeof a.stacktrace<"u"||typeof a["opera#sourceloc"]<"u")return this.parseOpera(a);if(a.stack&&a.stack.match(i))return this.parseV8OrIE(a);if(a.stack)return this.parseFFOrSafari(a);throw new Error("Cannot parse given Error object")},extractLocation:function(a){if(a.indexOf(":")===-1)return[a];var u=/(.+?)(?::(\d+))?(?::(\d+))?$/,c=u.exec(a.replace(/[()]/g,""));return[c[1],c[2]||void 0,c[3]||void 0]},parseV8OrIE:function(a){var u=a.stack.split(`
|
|
289
|
+
`).filter(function(c){return!!c.match(i)},this);return u.map(function(c){c.indexOf("(eval ")>-1&&(c=c.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(\),.*$)/g,""));var s=c.replace(/^\s+/,"").replace(/\(eval code/g,"("),l=s.match(/ (\((.+):(\d+):(\d+)\)$)/);s=l?s.replace(l[0],""):s;var p=s.split(/\s+/).slice(1),f=this.extractLocation(l?l[1]:p.pop()),y=p.join(" ")||void 0,v=["eval","<anonymous>"].indexOf(f[0])>-1?void 0:f[0];return new n({functionName:y,fileName:v,lineNumber:f[1],columnNumber:f[2],source:c})},this)},parseFFOrSafari:function(a){var u=a.stack.split(`
|
|
290
|
+
`).filter(function(c){return!c.match(o)},this);return u.map(function(c){if(c.indexOf(" > eval")>-1&&(c=c.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),c.indexOf("@")===-1&&c.indexOf(":")===-1)return new n({functionName:c});var s=/((.*".+"[^@]*)?[^@]*)(?:@)/,l=c.match(s),p=l&&l[1]?l[1]:void 0,f=this.extractLocation(c.replace(s,""));return new n({functionName:p,fileName:f[0],lineNumber:f[1],columnNumber:f[2],source:c})},this)},parseOpera:function(a){return!a.stacktrace||a.message.indexOf(`
|
|
291
291
|
`)>-1&&a.message.split(`
|
|
292
292
|
`).length>a.stacktrace.split(`
|
|
293
293
|
`).length?this.parseOpera9(a):a.stack?this.parseOpera11(a):this.parseOpera10(a)},parseOpera9:function(a){for(var u=/Line (\d+).*script (?:in )?(\S+)/i,c=a.message.split(`
|
|
294
|
-
`),s=[],l=2,p=c.length;l<p;l+=2){var f=u.exec(c[l]);f&&s.push(new
|
|
295
|
-
`),s=[],l=0,p=c.length;l<p;l+=2){var f=u.exec(c[l]);f&&s.push(new
|
|
296
|
-
`).filter(function(c){return!!c.match(n)&&!c.match(/^Error created at/)},this);return u.map(function(c){var s=c.split("@"),l=this.extractLocation(s.pop()),p=s.shift()||"",f=p.replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^)]*\)/g,"")||void 0,y;p.match(/\(([^)]*)\)/)&&(y=p.replace(/^[^(]+\(([^)]*)\)$/,"$1"));var v=y===void 0||y==="[arguments not available]"?void 0:y.split(",");return new r({functionName:f,args:v,fileName:l[0],lineNumber:l[1],columnNumber:l[2],source:c})},this)}}})})(ia);var Xp=ia.exports;const sa=ar(Xp);function yr(t){try{return sa.parse(t)}catch(e){try{return sa.parse(new Error)}catch(r){return console.warn("Highlight Warning: failed to parse error",{originalError:e,secondaryError:r}),[]}}}function qp(t,e){const r=e.logger;let n;n=window[r];const i=[];if(e.level.includes("error")&&window){const a=u=>{const{message:c,error:s}=u;let l=[];s&&(l=yr(s));const p=[mn(c,e.stringifyOptions)];t({type:"Error",trace:l,time:Date.now(),value:p})};window.addEventListener("error",a),i.push(()=>{window&&window.removeEventListener("error",a)})}for(const a of e.level)i.push(o(n,a));return()=>{i.forEach(a=>a())};function o(a,u){return a[u]?zl(a,u,c=>(...s)=>{c.apply(this,s);try{t(Kp(u,e,...s))}catch(l){c("highlight logger error:",l,...s)}}):()=>{}}}function Kp(t,e,...r){const n=yr(new Error),i=e.serializeConsoleAttributes?r.map(o=>typeof o=="object"?mn(o,e.stringifyOptions):o):r.filter(o=>typeof o!="object").map(o=>`${o}`);return{type:t,trace:n,value:i,attributes:mn(r.filter(o=>typeof o=="object").reduce((o,a)=>P(P({},o),a),{}),e.stringifyOptions),time:Date.now()}}const Wp={start:0,end:3},Yp={start:4,end:5},Pn={start:6,end:7},In={start:8,end:8},Jp={start:9,end:9},Qp={start:10,end:15};function Zp(){if(crypto&&crypto.getRandomValues){const e=new Uint8Array(16);return crypto.getRandomValues(e),[...e.values()]}const t=[];for(let e=0;e<16;e+=1)t.push(Math.floor(Math.random()*256));return t}function ne(t,e){let r="";for(let n=e.start;n<=e.end;n+=1)r+=t[n].toString(16).padStart(2,"0");return r}function tf(t){return t[In.start]=(t[In.start]|128)&191,t[Pn.start]=t[Pn.start]&15|64,`${ne(t,Wp)}-${ne(t,Yp)}-${ne(t,Pn)}-${ne(t,In)}${ne(t,Jp)}-${ne(t,Qp)}`}function ef(){const t=Zp();return tf(t)}function ua(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():ef()}function Mn(t,e,r,n){var i,o,a,u;let c=n??e,s=yr(c),l={};e instanceof Error&&(e=e.message,e.cause&&(l={"exception.cause":e.cause}));const p=nf(s);t({error:c,event:be(e),type:"window.onerror",url:window.location.href,source:r??"",lineNumber:(i=p[0])!=null&&i.lineNumber?(o=p[0])==null?void 0:o.lineNumber:0,columnNumber:(a=p[0])!=null&&a.columnNumber?(u=p[0])==null?void 0:u.columnNumber:0,stackTrace:p,timestamp:new Date().toISOString(),payload:l?be(l):void 0,id:ua()})}const rf=(t,{enablePromisePatch:e})=>{if(typeof window>"u")return()=>{};const r=window.onerror=(a,u,c,s,l)=>{Mn(t,a,u,l)},n=window.onunhandledrejection=a=>{if(a.reason){const u=a.promise;u.getStack?Mn(t,a.reason,a.type,u.getStack()):Mn(t,a.reason,a.type)}},i=window.Promise,o=class extends i{constructor(a){super(a),k(this,"promiseCreationError"),this.promiseCreationError=new Error}getStack(){return this.promiseCreationError}static shouldPatch(){const a=typeof window.Zone>"u";return e&&a}};return o.shouldPatch()&&(window.Promise=o),()=>{window.Promise=i,window.onunhandledrejection=n,window.onerror=r}},nf=t=>{var e,r;if(t.length===0)return t;const n=t[0];return(e=n.fileName)!=null&&e.includes("highlight.run")||(r=n.fileName)!=null&&r.includes("highlight.io")||n.functionName==="new highlightPromise"?t.slice(1):t},of=['["\\"Script error.\\""]','"Script error."','["\\"Load failed.\\""]','"Load failed."','["\\"Network request failed.\\""]','"Network request failed."','["\\"Document is not focused.\\""]','"Document is not focused."','["\\"Failed to fetch\\""]','"Failed to fetch"','[{"isTrusted":true}]','{"isTrusted":true}','["{}"]','"{}"','[""]','""','["\\"\\""]','""'],af=["websocket error",'\\"ResizeObserver loop'];var sf=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{},It="1.9.0",ca=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;function uf(t){var e=new Set([t]),r=new Set,n=t.match(ca);if(!n)return function(){return!1};var i={major:+n[1],minor:+n[2],patch:+n[3],prerelease:n[4]};if(i.prerelease!=null)return function(u){return u===t};function o(u){return r.add(u),!1}function a(u){return e.add(u),!0}return function(u){if(e.has(u))return!0;if(r.has(u))return!1;var c=u.match(ca);if(!c)return o(u);var s={major:+c[1],minor:+c[2],patch:+c[3],prerelease:c[4]};return s.prerelease!=null||i.major!==s.major?o(u):i.major===0?i.minor===s.minor&&i.patch<=s.patch?a(u):o(u):i.minor<=s.minor?a(u):o(u)}}var cf=uf(It),lf=It.split(".")[0],we=Symbol.for("opentelemetry.js.api."+lf),Ae=sf;function Le(t,e,r,n){var i;n===void 0&&(n=!1);var o=Ae[we]=(i=Ae[we])!==null&&i!==void 0?i:{version:It};if(!n&&o[t]){var a=new Error("@opentelemetry/api: Attempted duplicate registration of API: "+t);return r.error(a.stack||a.message),!1}if(o.version!==It){var a=new Error("@opentelemetry/api: Registration of version v"+o.version+" for "+t+" does not match previously registered API v"+It);return r.error(a.stack||a.message),!1}return o[t]=e,r.debug("@opentelemetry/api: Registered a global for "+t+" v"+It+"."),!0}function Mt(t){var e,r,n=(e=Ae[we])===null||e===void 0?void 0:e.version;if(!(!n||!cf(n)))return(r=Ae[we])===null||r===void 0?void 0:r[t]}function Re(t,e){e.debug("@opentelemetry/api: Unregistering a global for "+t+" v"+It+".");var r=Ae[we];r&&delete r[t]}var pf=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,o=[],a;try{for(;!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},ff=function(t,e,r){if(arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return t.concat(o||Array.prototype.slice.call(e))},hf=function(){function t(e){this._namespace=e.namespace||"DiagComponentLogger"}return t.prototype.debug=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return Ne("debug",this._namespace,e)},t.prototype.error=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return Ne("error",this._namespace,e)},t.prototype.info=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return Ne("info",this._namespace,e)},t.prototype.warn=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return Ne("warn",this._namespace,e)},t.prototype.verbose=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return Ne("verbose",this._namespace,e)},t}();function Ne(t,e,r){var n=Mt("diag");if(n)return r.unshift(e),n[t].apply(n,ff([],pf(r),!1))}var I;(function(t){t[t.NONE=0]="NONE",t[t.ERROR=30]="ERROR",t[t.WARN=50]="WARN",t[t.INFO=60]="INFO",t[t.DEBUG=70]="DEBUG",t[t.VERBOSE=80]="VERBOSE",t[t.ALL=9999]="ALL"})(I||(I={}));function df(t,e){t<I.NONE?t=I.NONE:t>I.ALL&&(t=I.ALL),e=e||{};function r(n,i){var o=e[n];return typeof o=="function"&&t>=i?o.bind(e):function(){}}return{error:r("error",I.ERROR),warn:r("warn",I.WARN),info:r("info",I.INFO),debug:r("debug",I.DEBUG),verbose:r("verbose",I.VERBOSE)}}var vf=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,o=[],a;try{for(;!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},yf=function(t,e,r){if(arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return t.concat(o||Array.prototype.slice.call(e))},mf="diag",lt=function(){function t(){function e(i){return function(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];var u=Mt("diag");if(u)return u[i].apply(u,yf([],vf(o),!1))}}var r=this,n=function(i,o){var a,u,c;if(o===void 0&&(o={logLevel:I.INFO}),i===r){var s=new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");return r.error((a=s.stack)!==null&&a!==void 0?a:s.message),!1}typeof o=="number"&&(o={logLevel:o});var l=Mt("diag"),p=df((u=o.logLevel)!==null&&u!==void 0?u:I.INFO,i);if(l&&!o.suppressOverrideMessage){var f=(c=new Error().stack)!==null&&c!==void 0?c:"<failed to generate stacktrace>";l.warn("Current logger will be overwritten from "+f),p.warn("Current logger will overwrite one already registered from "+f)}return Le("diag",p,r,!0)};r.setLogger=n,r.disable=function(){Re(mf,r)},r.createComponentLogger=function(i){return new hf(i)},r.verbose=e("verbose"),r.debug=e("debug"),r.info=e("info"),r.warn=e("warn"),r.error=e("error")}return t.instance=function(){return this._instance||(this._instance=new t),this._instance},t}(),_f=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},gf=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Ef=function(){function t(e){this._entries=e?new Map(e):new Map}return t.prototype.getEntry=function(e){var r=this._entries.get(e);if(r)return Object.assign({},r)},t.prototype.getAllEntries=function(){return Array.from(this._entries.entries()).map(function(e){var r=_f(e,2),n=r[0],i=r[1];return[n,i]})},t.prototype.setEntry=function(e,r){var n=new t(this._entries);return n._entries.set(e,r),n},t.prototype.removeEntry=function(e){var r=new t(this._entries);return r._entries.delete(e),r},t.prototype.removeEntries=function(){for(var e,r,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];var o=new t(this._entries);try{for(var a=gf(n),u=a.next();!u.done;u=a.next()){var c=u.value;o._entries.delete(c)}}catch(s){e={error:s}}finally{try{u&&!u.done&&(r=a.return)&&r.call(a)}finally{if(e)throw e.error}}return o},t.prototype.clear=function(){return new t},t}(),Tf=Symbol("BaggageEntryMetadata"),bf=lt.instance();function Of(t){return t===void 0&&(t={}),new Ef(new Map(Object.entries(t)))}function la(t){return typeof t!="string"&&(bf.error("Cannot create baggage metadata from unknown type: "+typeof t),t=""),{__TYPE__:Tf,toString:function(){return t}}}function Ce(t){return Symbol.for(t)}var Sf=function(){function t(e){var r=this;r._currentContext=e?new Map(e):new Map,r.getValue=function(n){return r._currentContext.get(n)},r.setValue=function(n,i){var o=new t(r._currentContext);return o._currentContext.set(n,i),o},r.deleteValue=function(n){var i=new t(r._currentContext);return i._currentContext.delete(n),i}}return t}(),kt=new Sf,Dt=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),wf=function(){function t(){}return t.prototype.createGauge=function(e,r){return Mf},t.prototype.createHistogram=function(e,r){return kf},t.prototype.createCounter=function(e,r){return If},t.prototype.createUpDownCounter=function(e,r){return Df},t.prototype.createObservableGauge=function(e,r){return jf},t.prototype.createObservableCounter=function(e,r){return Uf},t.prototype.createObservableUpDownCounter=function(e,r){return Bf},t.prototype.addBatchObservableCallback=function(e,r){},t.prototype.removeBatchObservableCallback=function(e){},t}(),mr=function(){function t(){}return t}(),Af=function(t){Dt(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.add=function(r,n){},e}(mr),Lf=function(t){Dt(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.add=function(r,n){},e}(mr),Rf=function(t){Dt(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.record=function(r,n){},e}(mr),Nf=function(t){Dt(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.record=function(r,n){},e}(mr),kn=function(){function t(){}return t.prototype.addCallback=function(e){},t.prototype.removeCallback=function(e){},t}(),Cf=function(t){Dt(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(kn),xf=function(t){Dt(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(kn),Pf=function(t){Dt(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(kn),pa=new wf,If=new Af,Mf=new Rf,kf=new Nf,Df=new Lf,Uf=new Cf,jf=new xf,Bf=new Pf;function $f(){return pa}var St;(function(t){t[t.INT=0]="INT",t[t.DOUBLE=1]="DOUBLE"})(St||(St={}));var Ff={get:function(t,e){if(t!=null)return t[e]},keys:function(t){return t==null?[]:Object.keys(t)}},Vf={set:function(t,e,r){t!=null&&(t[e]=r)}},Gf=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,o=[],a;try{for(;!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},Hf=function(t,e,r){if(arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return t.concat(o||Array.prototype.slice.call(e))},zf=function(){function t(){}return t.prototype.active=function(){return kt},t.prototype.with=function(e,r,n){for(var i=[],o=3;o<arguments.length;o++)i[o-3]=arguments[o];return r.call.apply(r,Hf([n],Gf(i),!1))},t.prototype.bind=function(e,r){return r},t.prototype.enable=function(){return this},t.prototype.disable=function(){return this},t}(),Xf=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,o=[],a;try{for(;!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},qf=function(t,e,r){if(arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return t.concat(o||Array.prototype.slice.call(e))},Dn="context",Kf=new zf,_r=function(){function t(){}return t.getInstance=function(){return this._instance||(this._instance=new t),this._instance},t.prototype.setGlobalContextManager=function(e){return Le(Dn,e,lt.instance())},t.prototype.active=function(){return this._getContextManager().active()},t.prototype.with=function(e,r,n){for(var i,o=[],a=3;a<arguments.length;a++)o[a-3]=arguments[a];return(i=this._getContextManager()).with.apply(i,qf([e,r,n],Xf(o),!1))},t.prototype.bind=function(e,r){return this._getContextManager().bind(e,r)},t.prototype._getContextManager=function(){return Mt(Dn)||Kf},t.prototype.disable=function(){this._getContextManager().disable(),Re(Dn,lt.instance())},t}(),pt;(function(t){t[t.NONE=0]="NONE",t[t.SAMPLED=1]="SAMPLED"})(pt||(pt={}));var fa="0000000000000000",ha="00000000000000000000000000000000",da={traceId:ha,spanId:fa,traceFlags:pt.NONE},xe=function(){function t(e){e===void 0&&(e=da),this._spanContext=e}return t.prototype.spanContext=function(){return this._spanContext},t.prototype.setAttribute=function(e,r){return this},t.prototype.setAttributes=function(e){return this},t.prototype.addEvent=function(e,r){return this},t.prototype.addLink=function(e){return this},t.prototype.addLinks=function(e){return this},t.prototype.setStatus=function(e){return this},t.prototype.updateName=function(e){return this},t.prototype.end=function(e){},t.prototype.isRecording=function(){return!1},t.prototype.recordException=function(e,r){},t}(),Un=Ce("OpenTelemetry Context Key SPAN");function jn(t){return t.getValue(Un)||void 0}function Wf(){return jn(_r.getInstance().active())}function Bn(t,e){return t.setValue(Un,e)}function Yf(t){return t.deleteValue(Un)}function Jf(t,e){return Bn(t,new xe(e))}function va(t){var e;return(e=jn(t))===null||e===void 0?void 0:e.spanContext()}var Qf=/^([0-9a-f]{32})$/i,Zf=/^[0-9a-f]{16}$/i;function ya(t){return Qf.test(t)&&t!==ha}function th(t){return Zf.test(t)&&t!==fa}function Pe(t){return ya(t.traceId)&&th(t.spanId)}function eh(t){return new xe(t)}var $n=_r.getInstance(),ma=function(){function t(){}return t.prototype.startSpan=function(e,r,n){n===void 0&&(n=$n.active());var i=!!(r!=null&&r.root);if(i)return new xe;var o=n&&va(n);return rh(o)&&Pe(o)?new xe(o):new xe},t.prototype.startActiveSpan=function(e,r,n,i){var o,a,u;if(!(arguments.length<2)){arguments.length===2?u=r:arguments.length===3?(o=r,u=n):(o=r,a=n,u=i);var c=a??$n.active(),s=this.startSpan(e,o,c),l=Bn(c,s);return $n.with(l,u,void 0,s)}},t}();function rh(t){return typeof t=="object"&&typeof t.spanId=="string"&&typeof t.traceId=="string"&&typeof t.traceFlags=="number"}var nh=new ma,ih=function(){function t(e,r,n,i){this._provider=e,this.name=r,this.version=n,this.options=i}return t.prototype.startSpan=function(e,r,n){return this._getTracer().startSpan(e,r,n)},t.prototype.startActiveSpan=function(e,r,n,i){var o=this._getTracer();return Reflect.apply(o.startActiveSpan,o,arguments)},t.prototype._getTracer=function(){if(this._delegate)return this._delegate;var e=this._provider.getDelegateTracer(this.name,this.version,this.options);return e?(this._delegate=e,this._delegate):nh},t}(),oh=function(){function t(){}return t.prototype.getTracer=function(e,r,n){return new ma},t}(),ah=new oh,_a=function(){function t(){}return t.prototype.getTracer=function(e,r,n){var i;return(i=this.getDelegateTracer(e,r,n))!==null&&i!==void 0?i:new ih(this,e,r,n)},t.prototype.getDelegate=function(){var e;return(e=this._delegate)!==null&&e!==void 0?e:ah},t.prototype.setDelegate=function(e){this._delegate=e},t.prototype.getDelegateTracer=function(e,r,n){var i;return(i=this._delegate)===null||i===void 0?void 0:i.getTracer(e,r,n)},t}(),gr;(function(t){t[t.NOT_RECORD=0]="NOT_RECORD",t[t.RECORD=1]="RECORD",t[t.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(gr||(gr={}));var Ie;(function(t){t[t.INTERNAL=0]="INTERNAL",t[t.SERVER=1]="SERVER",t[t.CLIENT=2]="CLIENT",t[t.PRODUCER=3]="PRODUCER",t[t.CONSUMER=4]="CONSUMER"})(Ie||(Ie={}));var Er;(function(t){t[t.UNSET=0]="UNSET",t[t.OK=1]="OK",t[t.ERROR=2]="ERROR"})(Er||(Er={}));var N=_r.getInstance(),T=lt.instance(),sh=function(){function t(){}return t.prototype.getMeter=function(e,r,n){return pa},t}(),uh=new sh,Fn="metrics",ch=function(){function t(){}return t.getInstance=function(){return this._instance||(this._instance=new t),this._instance},t.prototype.setGlobalMeterProvider=function(e){return Le(Fn,e,lt.instance())},t.prototype.getMeterProvider=function(){return Mt(Fn)||uh},t.prototype.getMeter=function(e,r,n){return this.getMeterProvider().getMeter(e,r,n)},t.prototype.disable=function(){Re(Fn,lt.instance())},t}(),ie=ch.getInstance(),lh=function(){function t(){}return t.prototype.inject=function(e,r){},t.prototype.extract=function(e,r){return e},t.prototype.fields=function(){return[]},t}(),Vn=Ce("OpenTelemetry Baggage Key");function ga(t){return t.getValue(Vn)||void 0}function ph(){return ga(_r.getInstance().active())}function fh(t,e){return t.setValue(Vn,e)}function hh(t){return t.deleteValue(Vn)}var Gn="propagation",dh=new lh,vh=function(){function t(){this.createBaggage=Of,this.getBaggage=ga,this.getActiveBaggage=ph,this.setBaggage=fh,this.deleteBaggage=hh}return t.getInstance=function(){return this._instance||(this._instance=new t),this._instance},t.prototype.setGlobalPropagator=function(e){return Le(Gn,e,lt.instance())},t.prototype.inject=function(e,r,n){return n===void 0&&(n=Vf),this._getGlobalPropagator().inject(e,r,n)},t.prototype.extract=function(e,r,n){return n===void 0&&(n=Ff),this._getGlobalPropagator().extract(e,r,n)},t.prototype.fields=function(){return this._getGlobalPropagator().fields()},t.prototype.disable=function(){Re(Gn,lt.instance())},t.prototype._getGlobalPropagator=function(){return Mt(Gn)||dh},t}(),Q=vh.getInstance(),Hn="trace",yh=function(){function t(){this._proxyTracerProvider=new _a,this.wrapSpanContext=eh,this.isSpanContextValid=Pe,this.deleteSpan=Yf,this.getSpan=jn,this.getActiveSpan=Wf,this.getSpanContext=va,this.setSpan=Bn,this.setSpanContext=Jf}return t.getInstance=function(){return this._instance||(this._instance=new t),this._instance},t.prototype.setGlobalTracerProvider=function(e){var r=Le(Hn,this._proxyTracerProvider,lt.instance());return r&&this._proxyTracerProvider.setDelegate(e),r},t.prototype.getTracerProvider=function(){return Mt(Hn)||this._proxyTracerProvider},t.prototype.getTracer=function(e,r){return this.getTracerProvider().getTracer(e,r)},t.prototype.disable=function(){Re(Hn,lt.instance()),this._proxyTracerProvider=new _a},t}(),x=yh.getInstance(),mh=Ce("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function Ea(t){return t.getValue(mh)===!0}var _h="=",zn=";",Xn=",",qn="baggage",gh=180,Eh=4096,Th=8192,bh=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o};function Oh(t){return t.reduce(function(e,r){var n=""+e+(e!==""?Xn:"")+r;return n.length>Th?e:n},"")}function Sh(t){return t.getAllEntries().map(function(e){var r=bh(e,2),n=r[0],i=r[1],o=encodeURIComponent(n)+"="+encodeURIComponent(i.value);return i.metadata!==void 0&&(o+=zn+i.metadata.toString()),o})}function wh(t){var e=t.split(zn);if(!(e.length<=0)){var r=e.shift();if(r){var n=r.indexOf(_h);if(!(n<=0)){var i=decodeURIComponent(r.substring(0,n).trim()),o=decodeURIComponent(r.substring(n+1).trim()),a;return e.length>0&&(a=la(e.join(zn))),{key:i,value:o,metadata:a}}}}}var Ah=function(){function t(){}return t.prototype.inject=function(e,r,n){var i=Q.getBaggage(e);if(!(!i||Ea(e))){var o=Sh(i).filter(function(u){return u.length<=Eh}).slice(0,gh),a=Oh(o);a.length>0&&n.set(r,qn,a)}},t.prototype.extract=function(e,r,n){var i=n.get(r,qn),o=Array.isArray(i)?i.join(Xn):i;if(!o)return e;var a={};if(o.length===0)return e;var u=o.split(Xn);return u.forEach(function(c){var s=wh(c);if(s){var l={value:s.value};s.metadata&&(l.metadata=s.metadata),a[s.key]=l}}),Object.entries(a).length===0?e:Q.setBaggage(e,Q.createBaggage(a))},t.prototype.fields=function(){return[qn]},t}(),Kn;(function(t){t.AlwaysOff="always_off",t.AlwaysOn="always_on",t.ParentBasedAlwaysOff="parentbased_always_off",t.ParentBasedAlwaysOn="parentbased_always_on",t.ParentBasedTraceIdRatio="parentbased_traceidratio",t.TraceIdRatio="traceidratio"})(Kn||(Kn={}));var Lh=",",Rh=["OTEL_SDK_DISABLED"];function Nh(t){return Rh.indexOf(t)>-1}var Ch=["OTEL_BSP_EXPORT_TIMEOUT","OTEL_BSP_MAX_EXPORT_BATCH_SIZE","OTEL_BSP_MAX_QUEUE_SIZE","OTEL_BSP_SCHEDULE_DELAY","OTEL_BLRP_EXPORT_TIMEOUT","OTEL_BLRP_MAX_EXPORT_BATCH_SIZE","OTEL_BLRP_MAX_QUEUE_SIZE","OTEL_BLRP_SCHEDULE_DELAY","OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_ATTRIBUTE_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT","OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT","OTEL_SPAN_EVENT_COUNT_LIMIT","OTEL_SPAN_LINK_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT","OTEL_EXPORTER_OTLP_TIMEOUT","OTEL_EXPORTER_OTLP_TRACES_TIMEOUT","OTEL_EXPORTER_OTLP_METRICS_TIMEOUT","OTEL_EXPORTER_OTLP_LOGS_TIMEOUT","OTEL_EXPORTER_JAEGER_AGENT_PORT"];function xh(t){return Ch.indexOf(t)>-1}var Ph=["OTEL_NO_PATCH_MODULES","OTEL_PROPAGATORS","OTEL_SEMCONV_STABILITY_OPT_IN"];function Ih(t){return Ph.indexOf(t)>-1}var Wn=1/0,Yn=128,Mh=128,kh=128,Ta={OTEL_SDK_DISABLED:!1,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_BLRP_EXPORT_TIMEOUT:3e4,OTEL_BLRP_MAX_EXPORT_BATCH_SIZE:512,OTEL_BLRP_MAX_QUEUE_SIZE:2048,OTEL_BLRP_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_LOGS_ENDPOINT:"",OTEL_EXPORTER_OTLP_HEADERS:"",OTEL_EXPORTER_OTLP_TRACES_HEADERS:"",OTEL_EXPORTER_OTLP_METRICS_HEADERS:"",OTEL_EXPORTER_OTLP_LOGS_HEADERS:"",OTEL_EXPORTER_OTLP_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_TRACES_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_METRICS_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_LOGS_TIMEOUT:1e4,OTEL_EXPORTER_ZIPKIN_ENDPOINT:"http://localhost:9411/api/v2/spans",OTEL_LOG_LEVEL:I.INFO,OTEL_NO_PATCH_MODULES:[],OTEL_PROPAGATORS:["tracecontext","baggage"],OTEL_RESOURCE_ATTRIBUTES:"",OTEL_SERVICE_NAME:"",OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT:Wn,OTEL_ATTRIBUTE_COUNT_LIMIT:Yn,OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT:Wn,OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT:Yn,OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT:Wn,OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT:Yn,OTEL_SPAN_EVENT_COUNT_LIMIT:128,OTEL_SPAN_LINK_COUNT_LIMIT:128,OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT:Mh,OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT:kh,OTEL_TRACES_EXPORTER:"",OTEL_TRACES_SAMPLER:Kn.ParentBasedAlwaysOn,OTEL_TRACES_SAMPLER_ARG:"",OTEL_LOGS_EXPORTER:"",OTEL_EXPORTER_OTLP_INSECURE:"",OTEL_EXPORTER_OTLP_TRACES_INSECURE:"",OTEL_EXPORTER_OTLP_METRICS_INSECURE:"",OTEL_EXPORTER_OTLP_LOGS_INSECURE:"",OTEL_EXPORTER_OTLP_CERTIFICATE:"",OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE:"",OTEL_EXPORTER_OTLP_METRICS_CERTIFICATE:"",OTEL_EXPORTER_OTLP_LOGS_CERTIFICATE:"",OTEL_EXPORTER_OTLP_COMPRESSION:"",OTEL_EXPORTER_OTLP_TRACES_COMPRESSION:"",OTEL_EXPORTER_OTLP_METRICS_COMPRESSION:"",OTEL_EXPORTER_OTLP_LOGS_COMPRESSION:"",OTEL_EXPORTER_OTLP_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_TRACES_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_METRICS_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_LOGS_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_TRACES_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_METRICS_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_LOGS_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_TRACES_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_METRICS_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_LOGS_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE:"cumulative",OTEL_SEMCONV_STABILITY_OPT_IN:[]};function Dh(t,e,r){if(typeof r[t]<"u"){var n=String(r[t]);e[t]=n.toLowerCase()==="true"}}function Uh(t,e,r,n,i){if(n===void 0&&(n=-1/0),i===void 0&&(i=1/0),typeof r[t]<"u"){var o=Number(r[t]);isNaN(o)||(o<n?e[t]=n:o>i?e[t]=i:e[t]=o)}}function jh(t,e,r,n){n===void 0&&(n=Lh);var i=r[t];typeof i=="string"&&(e[t]=i.split(n).map(function(o){return o.trim()}))}var Bh={ALL:I.ALL,VERBOSE:I.VERBOSE,DEBUG:I.DEBUG,INFO:I.INFO,WARN:I.WARN,ERROR:I.ERROR,NONE:I.NONE};function $h(t,e,r){var n=r[t];if(typeof n=="string"){var i=Bh[n.toUpperCase()];i!=null&&(e[t]=i)}}function Fh(t){var e={};for(var r in Ta){var n=r;switch(n){case"OTEL_LOG_LEVEL":$h(n,e,t);break;default:if(Nh(n))Dh(n,e,t);else if(xh(n))Uh(n,e,t);else if(Ih(n))jh(n,e,t);else{var i=t[n];typeof i<"u"&&i!==null&&(e[n]=String(i))}}}return e}var Vh=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{};function Gh(){var t=Fh(Vh);return Object.assign({},Ta,t)}var Jn=performance,Hh=9,zh=6,Xh=Math.pow(10,zh),ba=Math.pow(10,Hh);function Oa(t){var e=t/1e3,r=Math.trunc(e),n=Math.round(t%1e3*Xh);return[r,n]}function qh(){var t=Jn.timeOrigin;if(typeof t!="number"){var e=Jn;t=e.timing&&e.timing.fetchStart}return t}function Kh(t){var e=Oa(qh()),r=Oa(Jn.now());return Wh(e,r)}function Wh(t,e){var r=[t[0]+e[0],t[1]+e[1]];return r[1]>=ba&&(r[1]-=ba,r[0]+=1),r}var Z;(function(t){t[t.SUCCESS=0]="SUCCESS",t[t.FAILED=1]="FAILED"})(Z||(Z={}));var Yh=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Jh=function(){function t(e){e===void 0&&(e={});var r;this._propagators=(r=e.propagators)!==null&&r!==void 0?r:[],this._fields=Array.from(new Set(this._propagators.map(function(n){return typeof n.fields=="function"?n.fields():[]}).reduce(function(n,i){return n.concat(i)},[])))}return t.prototype.inject=function(e,r,n){var i,o;try{for(var a=Yh(this._propagators),u=a.next();!u.done;u=a.next()){var c=u.value;try{c.inject(e,r,n)}catch(s){T.warn("Failed to inject with "+c.constructor.name+". Err: "+s.message)}}}catch(s){i={error:s}}finally{try{u&&!u.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}},t.prototype.extract=function(e,r,n){return this._propagators.reduce(function(i,o){try{return o.extract(i,r,n)}catch(a){T.warn("Failed to extract with "+o.constructor.name+". Err: "+a.message)}return i},e)},t.prototype.fields=function(){return this._fields.slice()},t}(),Qn="[_0-9a-z-*/]",Qh="[a-z]"+Qn+"{0,255}",Zh="[a-z0-9]"+Qn+"{0,240}@[a-z]"+Qn+"{0,13}",td=new RegExp("^(?:"+Qh+"|"+Zh+")$"),ed=/^[ -~]{0,255}[!-~]$/,rd=/,|=/;function nd(t){return td.test(t)}function id(t){return ed.test(t)&&!rd.test(t)}var Sa=32,od=512,wa=",",Aa="=",ad=function(){function t(e){this._internalState=new Map,e&&this._parse(e)}return t.prototype.set=function(e,r){var n=this._clone();return n._internalState.has(e)&&n._internalState.delete(e),n._internalState.set(e,r),n},t.prototype.unset=function(e){var r=this._clone();return r._internalState.delete(e),r},t.prototype.get=function(e){return this._internalState.get(e)},t.prototype.serialize=function(){var e=this;return this._keys().reduce(function(r,n){return r.push(n+Aa+e.get(n)),r},[]).join(wa)},t.prototype._parse=function(e){e.length>od||(this._internalState=e.split(wa).reverse().reduce(function(r,n){var i=n.trim(),o=i.indexOf(Aa);if(o!==-1){var a=i.slice(0,o),u=i.slice(o+1,n.length);nd(a)&&id(u)&&r.set(a,u)}return r},new Map),this._internalState.size>Sa&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,Sa))))},t.prototype._keys=function(){return Array.from(this._internalState.keys()).reverse()},t.prototype._clone=function(){var e=new t;return e._internalState=new Map(this._internalState),e},t}(),Zn="traceparent",ti="tracestate",sd="00",ud="(?!ff)[\\da-f]{2}",cd="(?![0]{32})[\\da-f]{32}",ld="(?![0]{16})[\\da-f]{16}",pd="[\\da-f]{2}",fd=new RegExp("^\\s?("+ud+")-("+cd+")-("+ld+")-("+pd+")(-.*)?\\s?$");function hd(t){var e=fd.exec(t);return!e||e[1]==="00"&&e[5]?null:{traceId:e[2],spanId:e[3],traceFlags:parseInt(e[4],16)}}var dd=function(){function t(){}return t.prototype.inject=function(e,r,n){var i=x.getSpanContext(e);if(!(!i||Ea(e)||!Pe(i))){var o=sd+"-"+i.traceId+"-"+i.spanId+"-0"+Number(i.traceFlags||pt.NONE).toString(16);n.set(r,Zn,o),i.traceState&&n.set(r,ti,i.traceState.serialize())}},t.prototype.extract=function(e,r,n){var i=n.get(r,Zn);if(!i)return e;var o=Array.isArray(i)?i[0]:i;if(typeof o!="string")return e;var a=hd(o);if(!a)return e;a.isRemote=!0;var u=n.get(r,ti);if(u){var c=Array.isArray(u)?u.join(","):u;a.traceState=new ad(typeof c=="string"?c:void 0)}return x.setSpanContext(e,a)},t.prototype.fields=function(){return[Zn,ti]},t}(),vd="[object Object]",yd="[object Null]",md="[object Undefined]",_d=Function.prototype,La=_d.toString,gd=La.call(Object),Ed=Td(Object.getPrototypeOf,Object),Ra=Object.prototype,Na=Ra.hasOwnProperty,Ut=Symbol?Symbol.toStringTag:void 0,Ca=Ra.toString;function Td(t,e){return function(r){return t(e(r))}}function xa(t){if(!bd(t)||Od(t)!==vd)return!1;var e=Ed(t);if(e===null)return!0;var r=Na.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&La.call(r)===gd}function bd(t){return t!=null&&typeof t=="object"}function Od(t){return t==null?t===void 0?md:yd:Ut&&Ut in Object(t)?Sd(t):wd(t)}function Sd(t){var e=Na.call(t,Ut),r=t[Ut],n=!1;try{t[Ut]=void 0,n=!0}catch{}var i=Ca.call(t);return n&&(e?t[Ut]=r:delete t[Ut]),i}function wd(t){return Ca.call(t)}var Ad=20;function Ld(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var r=t.shift(),n=new WeakMap;t.length>0;)r=Pa(r,t.shift(),0,n);return r}function ei(t){return Tr(t)?t.slice():t}function Pa(t,e,r,n){r===void 0&&(r=0);var i;if(!(r>Ad)){if(r++,br(t)||br(e)||Ma(e))i=ei(e);else if(Tr(t)){if(i=t.slice(),Tr(e))for(var o=0,a=e.length;o<a;o++)i.push(ei(e[o]));else if(Me(e))for(var u=Object.keys(e),o=0,a=u.length;o<a;o++){var c=u[o];i[c]=ei(e[c])}}else if(Me(t))if(Me(e)){if(!Rd(t,e))return e;i=Object.assign({},t);for(var u=Object.keys(e),o=0,a=u.length;o<a;o++){var c=u[o],s=e[c];if(br(s))typeof s>"u"?delete i[c]:i[c]=s;else{var l=i[c],p=s;if(Ia(t,c,n)||Ia(e,c,n))delete i[c];else{if(Me(l)&&Me(p)){var f=n.get(l)||[],y=n.get(p)||[];f.push({obj:t,key:c}),y.push({obj:e,key:c}),n.set(l,f),n.set(p,y)}i[c]=Pa(i[c],s,r,n)}}}}else i=e;return i}}function Ia(t,e,r){for(var n=r.get(t[e])||[],i=0,o=n.length;i<o;i++){var a=n[i];if(a.key===e&&a.obj===t)return!0}return!1}function Tr(t){return Array.isArray(t)}function Ma(t){return typeof t=="function"}function Me(t){return!br(t)&&!Tr(t)&&!Ma(t)&&typeof t=="object"}function br(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t>"u"||t instanceof Date||t instanceof RegExp||t===null}function Rd(t,e){return!(!xa(t)||!xa(e))}var ka=function(){function t(){}return t.prototype.emit=function(e){},t}(),Nd=new ka,Cd=function(){function t(){}return t.prototype.getLogger=function(e,r,n){return new ka},t}(),Da=new Cd,xd=function(){function t(e,r,n,i){this._provider=e,this.name=r,this.version=n,this.options=i}return t.prototype.emit=function(e){this._getLogger().emit(e)},t.prototype._getLogger=function(){if(this._delegate)return this._delegate;var e=this._provider.getDelegateLogger(this.name,this.version,this.options);return e?(this._delegate=e,this._delegate):Nd},t}(),Ua=function(){function t(){}return t.prototype.getLogger=function(e,r,n){var i;return(i=this.getDelegateLogger(e,r,n))!==null&&i!==void 0?i:new xd(this,e,r,n)},t.prototype.getDelegate=function(){var e;return(e=this._delegate)!==null&&e!==void 0?e:Da},t.prototype.setDelegate=function(e){this._delegate=e},t.prototype.getDelegateLogger=function(e,r,n){var i;return(i=this._delegate)===null||i===void 0?void 0:i.getLogger(e,r,n)},t}(),Pd=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{},Or=Symbol.for("io.opentelemetry.js.api.logs"),ke=Pd;function Id(t,e,r){return function(n){return n===t?e:r}}var ja=1,Md=function(){function t(){this._proxyLoggerProvider=new Ua}return t.getInstance=function(){return this._instance||(this._instance=new t),this._instance},t.prototype.setGlobalLoggerProvider=function(e){return ke[Or]?this.getLoggerProvider():(ke[Or]=Id(ja,e,Da),this._proxyLoggerProvider.setDelegate(e),e)},t.prototype.getLoggerProvider=function(){var e,r;return(r=(e=ke[Or])===null||e===void 0?void 0:e.call(ke,ja))!==null&&r!==void 0?r:this._proxyLoggerProvider},t.prototype.getLogger=function(e,r,n){return this.getLoggerProvider().getLogger(e,r,n)},t.prototype.disable=function(){delete ke[Or],this._proxyLoggerProvider=new Ua},t}(),De=Md.getInstance();function kd(t,e,r,n){for(var i=0,o=t.length;i<o;i++){var a=t[i];e&&a.setTracerProvider(e),r&&a.setMeterProvider(r),n&&a.setLoggerProvider&&a.setLoggerProvider(n),a.getConfig().enabled||a.enable()}}function Dd(t){t.forEach(function(e){return e.disable()})}function Ud(t){var e,r,n=t.tracerProvider||x.getTracerProvider(),i=t.meterProvider||ie.getMeterProvider(),o=t.loggerProvider||De.getLoggerProvider(),a=(r=(e=t.instrumentations)===null||e===void 0?void 0:e.flat())!==null&&r!==void 0?r:[];return kd(a,n,i,o),function(){Dd(a)}}function ri(t){return typeof t=="function"}var tt=console.error.bind(console);function Ue(t,e,r){var n=!!t[e]&&t.propertyIsEnumerable(e);Object.defineProperty(t,e,{configurable:!0,enumerable:n,writable:!0,value:r})}function je(t){t&&t.logger&&(ri(t.logger)?tt=t.logger:tt("new logger isn't a function, not replacing"))}function Ba(t,e,r){if(!t||!t[e]){tt("no original function "+e+" to wrap");return}if(!r){tt("no wrapper function"),tt(new Error().stack);return}if(!ri(t[e])||!ri(r)){tt("original object and wrapper must be functions");return}var n=t[e],i=r(n,e);return Ue(i,"__original",n),Ue(i,"__unwrap",function(){t[e]===i&&Ue(t,e,n)}),Ue(i,"__wrapped",!0),Ue(t,e,i),i}function jd(t,e,r){if(t)Array.isArray(t)||(t=[t]);else{tt("must provide one or more modules to patch"),tt(new Error().stack);return}if(!(e&&Array.isArray(e))){tt("must provide one or more functions to wrap on modules");return}t.forEach(function(n){e.forEach(function(i){Ba(n,i,r)})})}function $a(t,e){if(!t||!t[e]){tt("no function to unwrap."),tt(new Error().stack);return}if(!t[e].__unwrap)tt("no original to unwrap to -- has "+e+" already been unwrapped?");else return t[e].__unwrap()}function Bd(t,e){if(t)Array.isArray(t)||(t=[t]);else{tt("must provide one or more modules to patch"),tt(new Error().stack);return}if(!(e&&Array.isArray(e))){tt("must provide one or more functions to unwrap on modules");return}t.forEach(function(r){e.forEach(function(n){$a(r,n)})})}je.wrap=Ba,je.massWrap=jd,je.unwrap=$a,je.massUnwrap=Bd;var X=je,ni=function(){return ni=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++){e=arguments[r];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},ni.apply(this,arguments)},$d=function(){function t(e,r,n){this.instrumentationName=e,this.instrumentationVersion=r,this._config={},this._wrap=X.wrap,this._unwrap=X.unwrap,this._massWrap=X.massWrap,this._massUnwrap=X.massUnwrap,this.setConfig(n),this._diag=T.createComponentLogger({namespace:e}),this._tracer=x.getTracer(e,r),this._meter=ie.getMeter(e,r),this._logger=De.getLogger(e,r),this._updateMetricInstruments()}return Object.defineProperty(t.prototype,"meter",{get:function(){return this._meter},enumerable:!1,configurable:!0}),t.prototype.setMeterProvider=function(e){this._meter=e.getMeter(this.instrumentationName,this.instrumentationVersion),this._updateMetricInstruments()},Object.defineProperty(t.prototype,"logger",{get:function(){return this._logger},enumerable:!1,configurable:!0}),t.prototype.setLoggerProvider=function(e){this._logger=e.getLogger(this.instrumentationName,this.instrumentationVersion)},t.prototype.getModuleDefinitions=function(){var e,r=(e=this.init())!==null&&e!==void 0?e:[];return Array.isArray(r)?r:[r]},t.prototype._updateMetricInstruments=function(){},t.prototype.getConfig=function(){return this._config},t.prototype.setConfig=function(e){this._config=ni({enabled:!0},e)},t.prototype.setTracerProvider=function(e){this._tracer=e.getTracer(this.instrumentationName,this.instrumentationVersion)},Object.defineProperty(t.prototype,"tracer",{get:function(){return this._tracer},enumerable:!1,configurable:!0}),t.prototype._runSpanCustomizationHook=function(e,r,n,i){if(e)try{e(n,i)}catch(o){this._diag.error("Error running span customization hook due to exception in handler",{triggerName:r},o)}},t}(),Fd=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Vd=function(t){Fd(e,t);function e(r,n,i){var o=t.call(this,r,n,i)||this;return o._config.enabled&&o.enable(),o}return e}($d);function et(t){return typeof t=="function"&&typeof t.__original=="function"&&typeof t.__unwrap=="function"&&t.__wrapped===!0}var Sr=performance,Gd="traceparent",Fa=Ce("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function Hd(t){return t.setValue(Fa,!0)}function ii(t){return t.getValue(Fa)===!0}var zd="=",oi=";",ai=",",si="baggage",Xd=180,qd=4096,Kd=8192,Wd=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o};function Yd(t){return t.reduce(function(e,r){var n=""+e+(e!==""?ai:"")+r;return n.length>Kd?e:n},"")}function Jd(t){return t.getAllEntries().map(function(e){var r=Wd(e,2),n=r[0],i=r[1],o=encodeURIComponent(n)+"="+encodeURIComponent(i.value);return i.metadata!==void 0&&(o+=oi+i.metadata.toString()),o})}function Qd(t){var e=t.split(oi);if(!(e.length<=0)){var r=e.shift();if(r){var n=r.indexOf(zd);if(!(n<=0)){var i=decodeURIComponent(r.substring(0,n).trim()),o=decodeURIComponent(r.substring(n+1).trim()),a;return e.length>0&&(a=la(e.join(oi))),{key:i,value:o,metadata:a}}}}}var Zd=function(){function t(){}return t.prototype.inject=function(e,r,n){var i=Q.getBaggage(e);if(!(!i||ii(e))){var o=Jd(i).filter(function(u){return u.length<=qd}).slice(0,Xd),a=Yd(o);a.length>0&&n.set(r,si,a)}},t.prototype.extract=function(e,r,n){var i=n.get(r,si),o=Array.isArray(i)?i.join(ai):i;if(!o)return e;var a={};if(o.length===0)return e;var u=o.split(ai);return u.forEach(function(c){var s=Qd(c);if(s){var l={value:s.value};s.metadata&&(l.metadata=s.metadata),a[s.key]=l}}),Object.entries(a).length===0?e:Q.setBaggage(e,Q.createBaggage(a))},t.prototype.fields=function(){return[si]},t}(),Va=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},tv=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o};function wr(t){var e,r,n={};if(typeof t!="object"||t==null)return n;try{for(var i=Va(Object.entries(t)),o=i.next();!o.done;o=i.next()){var a=tv(o.value,2),u=a[0],c=a[1];if(!ev(u)){T.warn("Invalid attribute key: "+u);continue}if(!Ga(c)){T.warn("Invalid attribute value set for key: "+u);continue}Array.isArray(c)?n[u]=c.slice():n[u]=c}}catch(s){e={error:s}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}return n}function ev(t){return typeof t=="string"&&t.length>0}function Ga(t){return t==null?!0:Array.isArray(t)?rv(t):Ha(t)}function rv(t){var e,r,n;try{for(var i=Va(t),o=i.next();!o.done;o=i.next()){var a=o.value;if(a!=null){if(!n){if(Ha(a)){n=typeof a;continue}return!1}if(typeof a!==n)return!1}}}catch(u){e={error:u}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}return!0}function Ha(t){switch(typeof t){case"number":case"boolean":case"string":return!0}return!1}function nv(){return function(t){T.error(iv(t))}}function iv(t){return typeof t=="string"?t:JSON.stringify(ov(t))}function ov(t){for(var e={},r=t;r!==null;)Object.getOwnPropertyNames(r).forEach(function(n){if(!e[n]){var i=r[n];i&&(e[n]=String(i))}}),r=Object.getPrototypeOf(r);return e}var av=nv();function oe(t){try{av(t)}catch{}}var ft;(function(t){t.AlwaysOff="always_off",t.AlwaysOn="always_on",t.ParentBasedAlwaysOff="parentbased_always_off",t.ParentBasedAlwaysOn="parentbased_always_on",t.ParentBasedTraceIdRatio="parentbased_traceidratio",t.TraceIdRatio="traceidratio"})(ft||(ft={}));var sv=",",uv=["OTEL_SDK_DISABLED"];function cv(t){return uv.indexOf(t)>-1}var lv=["OTEL_BSP_EXPORT_TIMEOUT","OTEL_BSP_MAX_EXPORT_BATCH_SIZE","OTEL_BSP_MAX_QUEUE_SIZE","OTEL_BSP_SCHEDULE_DELAY","OTEL_BLRP_EXPORT_TIMEOUT","OTEL_BLRP_MAX_EXPORT_BATCH_SIZE","OTEL_BLRP_MAX_QUEUE_SIZE","OTEL_BLRP_SCHEDULE_DELAY","OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_ATTRIBUTE_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT","OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT","OTEL_SPAN_EVENT_COUNT_LIMIT","OTEL_SPAN_LINK_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT","OTEL_EXPORTER_OTLP_TIMEOUT","OTEL_EXPORTER_OTLP_TRACES_TIMEOUT","OTEL_EXPORTER_OTLP_METRICS_TIMEOUT","OTEL_EXPORTER_OTLP_LOGS_TIMEOUT","OTEL_EXPORTER_JAEGER_AGENT_PORT"];function pv(t){return lv.indexOf(t)>-1}var fv=["OTEL_NO_PATCH_MODULES","OTEL_PROPAGATORS","OTEL_SEMCONV_STABILITY_OPT_IN"];function hv(t){return fv.indexOf(t)>-1}var Ar=1/0,Lr=128,dv=128,vv=128,za={OTEL_SDK_DISABLED:!1,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_BLRP_EXPORT_TIMEOUT:3e4,OTEL_BLRP_MAX_EXPORT_BATCH_SIZE:512,OTEL_BLRP_MAX_QUEUE_SIZE:2048,OTEL_BLRP_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_LOGS_ENDPOINT:"",OTEL_EXPORTER_OTLP_HEADERS:"",OTEL_EXPORTER_OTLP_TRACES_HEADERS:"",OTEL_EXPORTER_OTLP_METRICS_HEADERS:"",OTEL_EXPORTER_OTLP_LOGS_HEADERS:"",OTEL_EXPORTER_OTLP_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_TRACES_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_METRICS_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_LOGS_TIMEOUT:1e4,OTEL_EXPORTER_ZIPKIN_ENDPOINT:"http://localhost:9411/api/v2/spans",OTEL_LOG_LEVEL:I.INFO,OTEL_NO_PATCH_MODULES:[],OTEL_PROPAGATORS:["tracecontext","baggage"],OTEL_RESOURCE_ATTRIBUTES:"",OTEL_SERVICE_NAME:"",OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT:Ar,OTEL_ATTRIBUTE_COUNT_LIMIT:Lr,OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT:Ar,OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT:Lr,OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT:Ar,OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT:Lr,OTEL_SPAN_EVENT_COUNT_LIMIT:128,OTEL_SPAN_LINK_COUNT_LIMIT:128,OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT:dv,OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT:vv,OTEL_TRACES_EXPORTER:"",OTEL_TRACES_SAMPLER:ft.ParentBasedAlwaysOn,OTEL_TRACES_SAMPLER_ARG:"",OTEL_LOGS_EXPORTER:"",OTEL_EXPORTER_OTLP_INSECURE:"",OTEL_EXPORTER_OTLP_TRACES_INSECURE:"",OTEL_EXPORTER_OTLP_METRICS_INSECURE:"",OTEL_EXPORTER_OTLP_LOGS_INSECURE:"",OTEL_EXPORTER_OTLP_CERTIFICATE:"",OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE:"",OTEL_EXPORTER_OTLP_METRICS_CERTIFICATE:"",OTEL_EXPORTER_OTLP_LOGS_CERTIFICATE:"",OTEL_EXPORTER_OTLP_COMPRESSION:"",OTEL_EXPORTER_OTLP_TRACES_COMPRESSION:"",OTEL_EXPORTER_OTLP_METRICS_COMPRESSION:"",OTEL_EXPORTER_OTLP_LOGS_COMPRESSION:"",OTEL_EXPORTER_OTLP_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_TRACES_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_METRICS_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_LOGS_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_TRACES_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_METRICS_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_LOGS_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_TRACES_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_METRICS_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_LOGS_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE:"cumulative",OTEL_SEMCONV_STABILITY_OPT_IN:[]};function yv(t,e,r){if(typeof r[t]<"u"){var n=String(r[t]);e[t]=n.toLowerCase()==="true"}}function mv(t,e,r,n,i){if(n===void 0&&(n=-1/0),i===void 0&&(i=1/0),typeof r[t]<"u"){var o=Number(r[t]);isNaN(o)||(o<n?e[t]=n:o>i?e[t]=i:e[t]=o)}}function _v(t,e,r,n){n===void 0&&(n=sv);var i=r[t];typeof i=="string"&&(e[t]=i.split(n).map(function(o){return o.trim()}))}var gv={ALL:I.ALL,VERBOSE:I.VERBOSE,DEBUG:I.DEBUG,INFO:I.INFO,WARN:I.WARN,ERROR:I.ERROR,NONE:I.NONE};function Ev(t,e,r){var n=r[t];if(typeof n=="string"){var i=gv[n.toUpperCase()];i!=null&&(e[t]=i)}}function Xa(t){var e={};for(var r in za){var n=r;switch(n){case"OTEL_LOG_LEVEL":Ev(n,e,t);break;default:if(cv(n))yv(n,e,t);else if(pv(n))mv(n,e,t);else if(hv(n))_v(n,e,t);else{var i=t[n];typeof i<"u"&&i!==null&&(e[n]=String(i))}}}return e}var qa=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{};function Be(){var t=Xa(qa);return Object.assign({},za,t)}function Tv(){return Xa(qa)}var ae=performance,bv="exception.type",Ov="exception.message",Sv="exception.stacktrace",wv="http.response_content_length",Av="http.response_content_length_uncompressed",ui=bv,ci=Ov,Lv=Sv,Rv=wv,Nv=Av,Cv=9,xv=6,Pv=Math.pow(10,xv),Rr=Math.pow(10,Cv);function wt(t){var e=t/1e3,r=Math.trunc(e),n=Math.round(t%1e3*Pv);return[r,n]}function li(){var t=ae.timeOrigin;if(typeof t!="number"){var e=ae;t=e.timing&&e.timing.fetchStart}return t}function Ka(t){var e=wt(li()),r=wt(typeof t=="number"?t:ae.now());return Ya(e,r)}function $e(t){if(pi(t))return t;if(typeof t=="number")return t<li()?Ka(t):wt(t);if(t instanceof Date)return wt(t.getTime());throw TypeError("Invalid input type")}function Iv(t,e){var r=e[0]-t[0],n=e[1]-t[1];return n<0&&(r-=1,n+=Rr),[r,n]}function At(t){return t[0]*Rr+t[1]}function pi(t){return Array.isArray(t)&&t.length===2&&typeof t[0]=="number"&&typeof t[1]=="number"}function Wa(t){return pi(t)||typeof t=="number"||t instanceof Date}function Ya(t,e){var r=[t[0]+e[0],t[1]+e[1]];return r[1]>=Rr&&(r[1]-=Rr,r[0]+=1),r}var fi;(function(t){t[t.SUCCESS=0]="SUCCESS",t[t.FAILED=1]="FAILED"})(fi||(fi={}));var Mv=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},kv=function(){function t(e){e===void 0&&(e={});var r;this._propagators=(r=e.propagators)!==null&&r!==void 0?r:[],this._fields=Array.from(new Set(this._propagators.map(function(n){return typeof n.fields=="function"?n.fields():[]}).reduce(function(n,i){return n.concat(i)},[])))}return t.prototype.inject=function(e,r,n){var i,o;try{for(var a=Mv(this._propagators),u=a.next();!u.done;u=a.next()){var c=u.value;try{c.inject(e,r,n)}catch(s){T.warn("Failed to inject with "+c.constructor.name+". Err: "+s.message)}}}catch(s){i={error:s}}finally{try{u&&!u.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}},t.prototype.extract=function(e,r,n){return this._propagators.reduce(function(i,o){try{return o.extract(i,r,n)}catch(a){T.warn("Failed to extract with "+o.constructor.name+". Err: "+a.message)}return i},e)},t.prototype.fields=function(){return this._fields.slice()},t}(),hi="[_0-9a-z-*/]",Dv="[a-z]"+hi+"{0,255}",Uv="[a-z0-9]"+hi+"{0,240}@[a-z]"+hi+"{0,13}",jv=new RegExp("^(?:"+Dv+"|"+Uv+")$"),Bv=/^[ -~]{0,255}[!-~]$/,$v=/,|=/;function Fv(t){return jv.test(t)}function Vv(t){return Bv.test(t)&&!$v.test(t)}var Ja=32,Gv=512,Qa=",",Za="=",Hv=function(){function t(e){this._internalState=new Map,e&&this._parse(e)}return t.prototype.set=function(e,r){var n=this._clone();return n._internalState.has(e)&&n._internalState.delete(e),n._internalState.set(e,r),n},t.prototype.unset=function(e){var r=this._clone();return r._internalState.delete(e),r},t.prototype.get=function(e){return this._internalState.get(e)},t.prototype.serialize=function(){var e=this;return this._keys().reduce(function(r,n){return r.push(n+Za+e.get(n)),r},[]).join(Qa)},t.prototype._parse=function(e){e.length>Gv||(this._internalState=e.split(Qa).reverse().reduce(function(r,n){var i=n.trim(),o=i.indexOf(Za);if(o!==-1){var a=i.slice(0,o),u=i.slice(o+1,n.length);Fv(a)&&Vv(u)&&r.set(a,u)}return r},new Map),this._internalState.size>Ja&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,Ja))))},t.prototype._keys=function(){return Array.from(this._internalState.keys()).reverse()},t.prototype._clone=function(){var e=new t;return e._internalState=new Map(this._internalState),e},t}(),di="traceparent",vi="tracestate",zv="00",Xv="(?!ff)[\\da-f]{2}",qv="(?![0]{32})[\\da-f]{32}",Kv="(?![0]{16})[\\da-f]{16}",Wv="[\\da-f]{2}",Yv=new RegExp("^\\s?("+Xv+")-("+qv+")-("+Kv+")-("+Wv+")(-.*)?\\s?$");function Jv(t){var e=Yv.exec(t);return!e||e[1]==="00"&&e[5]?null:{traceId:e[2],spanId:e[3],traceFlags:parseInt(e[4],16)}}var Qv=function(){function t(){}return t.prototype.inject=function(e,r,n){var i=x.getSpanContext(e);if(!(!i||ii(e)||!Pe(i))){var o=zv+"-"+i.traceId+"-"+i.spanId+"-0"+Number(i.traceFlags||pt.NONE).toString(16);n.set(r,di,o),i.traceState&&n.set(r,vi,i.traceState.serialize())}},t.prototype.extract=function(e,r,n){var i=n.get(r,di);if(!i)return e;var o=Array.isArray(i)?i[0]:i;if(typeof o!="string")return e;var a=Jv(o);if(!a)return e;a.isRemote=!0;var u=n.get(r,vi);if(u){var c=Array.isArray(u)?u.join(","):u;a.traceState=new Hv(typeof c=="string"?c:void 0)}return x.setSpanContext(e,a)},t.prototype.fields=function(){return[di,vi]},t}(),Zv="[object Object]",ty="[object Null]",ey="[object Undefined]",ry=Function.prototype,ts=ry.toString,ny=ts.call(Object),iy=oy(Object.getPrototypeOf,Object),es=Object.prototype,rs=es.hasOwnProperty,jt=Symbol?Symbol.toStringTag:void 0,ns=es.toString;function oy(t,e){return function(r){return t(e(r))}}function is(t){if(!ay(t)||sy(t)!==Zv)return!1;var e=iy(t);if(e===null)return!0;var r=rs.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&ts.call(r)===ny}function ay(t){return t!=null&&typeof t=="object"}function sy(t){return t==null?t===void 0?ey:ty:jt&&jt in Object(t)?uy(t):cy(t)}function uy(t){var e=rs.call(t,jt),r=t[jt],n=!1;try{t[jt]=void 0,n=!0}catch{}var i=ns.call(t);return n&&(e?t[jt]=r:delete t[jt]),i}function cy(t){return ns.call(t)}var ly=20;function py(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var r=t.shift(),n=new WeakMap;t.length>0;)r=os(r,t.shift(),0,n);return r}function yi(t){return Nr(t)?t.slice():t}function os(t,e,r,n){r===void 0&&(r=0);var i;if(!(r>ly)){if(r++,Cr(t)||Cr(e)||ss(e))i=yi(e);else if(Nr(t)){if(i=t.slice(),Nr(e))for(var o=0,a=e.length;o<a;o++)i.push(yi(e[o]));else if(Fe(e))for(var u=Object.keys(e),o=0,a=u.length;o<a;o++){var c=u[o];i[c]=yi(e[c])}}else if(Fe(t))if(Fe(e)){if(!fy(t,e))return e;i=Object.assign({},t);for(var u=Object.keys(e),o=0,a=u.length;o<a;o++){var c=u[o],s=e[c];if(Cr(s))typeof s>"u"?delete i[c]:i[c]=s;else{var l=i[c],p=s;if(as(t,c,n)||as(e,c,n))delete i[c];else{if(Fe(l)&&Fe(p)){var f=n.get(l)||[],y=n.get(p)||[];f.push({obj:t,key:c}),y.push({obj:e,key:c}),n.set(l,f),n.set(p,y)}i[c]=os(i[c],s,r,n)}}}}else i=e;return i}}function as(t,e,r){for(var n=r.get(t[e])||[],i=0,o=n.length;i<o;i++){var a=n[i];if(a.key===e&&a.obj===t)return!0}return!1}function Nr(t){return Array.isArray(t)}function ss(t){return typeof t=="function"}function Fe(t){return!Cr(t)&&!Nr(t)&&!ss(t)&&typeof t=="object"}function Cr(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t>"u"||t instanceof Date||t instanceof RegExp||t===null}function fy(t,e){return!(!is(t)||!is(e))}function hy(t,e){return typeof e=="string"?t===e:!!t.match(e)}var dy=function(){function t(){var e=this;this._promise=new Promise(function(r,n){e._resolve=r,e._reject=n})}return Object.defineProperty(t.prototype,"promise",{get:function(){return this._promise},enumerable:!1,configurable:!0}),t.prototype.resolve=function(e){this._resolve(e)},t.prototype.reject=function(e){this._reject(e)},t}(),vy=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,o=[],a;try{for(;!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},yy=function(t,e,r){if(arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return t.concat(o||Array.prototype.slice.call(e))},my=function(){function t(e,r){this._callback=e,this._that=r,this._isCalled=!1,this._deferred=new dy}return Object.defineProperty(t.prototype,"isCalled",{get:function(){return this._isCalled},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"promise",{get:function(){return this._deferred.promise},enumerable:!1,configurable:!0}),t.prototype.call=function(){for(var e,r=this,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];if(!this._isCalled){this._isCalled=!0;try{Promise.resolve((e=this._callback).call.apply(e,yy([this._that],vy(n),!1))).then(function(o){return r._deferred.resolve(o)},function(o){return r._deferred.reject(o)})}catch(o){this._deferred.reject(o)}}return this._deferred.promise},t}(),_y="exception",mi=function(){return mi=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++){e=arguments[r];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},mi.apply(this,arguments)},gy=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},us=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},Ey=function(t,e,r){if(arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return t.concat(o||Array.prototype.slice.call(e))},Ty=function(){function t(e,r,n,i,o,a,u,c,s,l){u===void 0&&(u=[]),this.attributes={},this.links=[],this.events=[],this._droppedAttributesCount=0,this._droppedEventsCount=0,this._droppedLinksCount=0,this.status={code:Er.UNSET},this.endTime=[0,0],this._ended=!1,this._duration=[-1,-1],this.name=n,this._spanContext=i,this.parentSpanId=a,this.kind=o,this.links=u;var p=Date.now();this._performanceStartTime=ae.now(),this._performanceOffset=p-(this._performanceStartTime+li()),this._startTimeProvided=c!=null,this.startTime=this._getTime(c??p),this.resource=e.resource,this.instrumentationLibrary=e.instrumentationLibrary,this._spanLimits=e.getSpanLimits(),this._attributeValueLengthLimit=this._spanLimits.attributeValueLengthLimit||0,l!=null&&this.setAttributes(l),this._spanProcessor=e.getActiveSpanProcessor(),this._spanProcessor.onStart(this,r)}return t.prototype.spanContext=function(){return this._spanContext},t.prototype.setAttribute=function(e,r){return r==null||this._isSpanEnded()?this:e.length===0?(T.warn("Invalid attribute key: "+e),this):Ga(r)?Object.keys(this.attributes).length>=this._spanLimits.attributeCountLimit&&!Object.prototype.hasOwnProperty.call(this.attributes,e)?(this._droppedAttributesCount++,this):(this.attributes[e]=this._truncateToSize(r),this):(T.warn("Invalid attribute value set for key: "+e),this)},t.prototype.setAttributes=function(e){var r,n;try{for(var i=gy(Object.entries(e)),o=i.next();!o.done;o=i.next()){var a=us(o.value,2),u=a[0],c=a[1];this.setAttribute(u,c)}}catch(s){r={error:s}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return this},t.prototype.addEvent=function(e,r,n){if(this._isSpanEnded())return this;if(this._spanLimits.eventCountLimit===0)return T.warn("No events allowed."),this._droppedEventsCount++,this;this.events.length>=this._spanLimits.eventCountLimit&&(this._droppedEventsCount===0&&T.debug("Dropping extra events."),this.events.shift(),this._droppedEventsCount++),Wa(r)&&(Wa(n)||(n=r),r=void 0);var i=wr(r);return this.events.push({name:e,attributes:i,time:this._getTime(n),droppedAttributesCount:0}),this},t.prototype.addLink=function(e){return this.links.push(e),this},t.prototype.addLinks=function(e){var r;return(r=this.links).push.apply(r,Ey([],us(e),!1)),this},t.prototype.setStatus=function(e){return this._isSpanEnded()?this:(this.status=mi({},e),this.status.message!=null&&typeof e.message!="string"&&(T.warn("Dropping invalid status.message of type '"+typeof e.message+"', expected 'string'"),delete this.status.message),this)},t.prototype.updateName=function(e){return this._isSpanEnded()?this:(this.name=e,this)},t.prototype.end=function(e){if(this._isSpanEnded()){T.error(this.name+" "+this._spanContext.traceId+"-"+this._spanContext.spanId+" - You can only call end() on a span once.");return}this._ended=!0,this.endTime=this._getTime(e),this._duration=Iv(this.startTime,this.endTime),this._duration[0]<0&&(T.warn("Inconsistent start and end time, startTime > endTime. Setting span duration to 0ms.",this.startTime,this.endTime),this.endTime=this.startTime.slice(),this._duration=[0,0]),this._droppedEventsCount>0&&T.warn("Dropped "+this._droppedEventsCount+" events because eventCountLimit reached"),this._spanProcessor.onEnd(this)},t.prototype._getTime=function(e){if(typeof e=="number"&&e<=ae.now())return Ka(e+this._performanceOffset);if(typeof e=="number")return wt(e);if(e instanceof Date)return wt(e.getTime());if(pi(e))return e;if(this._startTimeProvided)return wt(Date.now());var r=ae.now()-this._performanceStartTime;return Ya(this.startTime,wt(r))},t.prototype.isRecording=function(){return this._ended===!1},t.prototype.recordException=function(e,r){var n={};typeof e=="string"?n[ci]=e:e&&(e.code?n[ui]=e.code.toString():e.name&&(n[ui]=e.name),e.message&&(n[ci]=e.message),e.stack&&(n[Lv]=e.stack)),n[ui]||n[ci]?this.addEvent(_y,n,r):T.warn("Failed to record an exception "+e)},Object.defineProperty(t.prototype,"duration",{get:function(){return this._duration},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ended",{get:function(){return this._ended},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"droppedAttributesCount",{get:function(){return this._droppedAttributesCount},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"droppedEventsCount",{get:function(){return this._droppedEventsCount},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"droppedLinksCount",{get:function(){return this._droppedLinksCount},enumerable:!1,configurable:!0}),t.prototype._isSpanEnded=function(){return this._ended&&T.warn("Can not execute the operation on ended Span {traceId: "+this._spanContext.traceId+", spanId: "+this._spanContext.spanId+"}"),this._ended},t.prototype._truncateToLimitUtil=function(e,r){return e.length<=r?e:e.substring(0,r)},t.prototype._truncateToSize=function(e){var r=this,n=this._attributeValueLengthLimit;return n<=0?(T.warn("Attribute value limit must be positive, got "+n),e):typeof e=="string"?this._truncateToLimitUtil(e,n):Array.isArray(e)?e.map(function(i){return typeof i=="string"?r._truncateToLimitUtil(i,n):i}):e},t}(),se;(function(t){t[t.NOT_RECORD=0]="NOT_RECORD",t[t.RECORD=1]="RECORD",t[t.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(se||(se={}));var xr=function(){function t(){}return t.prototype.shouldSample=function(){return{decision:se.NOT_RECORD}},t.prototype.toString=function(){return"AlwaysOffSampler"},t}(),ue=function(){function t(){}return t.prototype.shouldSample=function(){return{decision:se.RECORD_AND_SAMPLED}},t.prototype.toString=function(){return"AlwaysOnSampler"},t}(),_i=function(){function t(e){var r,n,i,o;this._root=e.root,this._root||(oe(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new ue),this._remoteParentSampled=(r=e.remoteParentSampled)!==null&&r!==void 0?r:new ue,this._remoteParentNotSampled=(n=e.remoteParentNotSampled)!==null&&n!==void 0?n:new xr,this._localParentSampled=(i=e.localParentSampled)!==null&&i!==void 0?i:new ue,this._localParentNotSampled=(o=e.localParentNotSampled)!==null&&o!==void 0?o:new xr}return t.prototype.shouldSample=function(e,r,n,i,o,a){var u=x.getSpanContext(e);return!u||!Pe(u)?this._root.shouldSample(e,r,n,i,o,a):u.isRemote?u.traceFlags&pt.SAMPLED?this._remoteParentSampled.shouldSample(e,r,n,i,o,a):this._remoteParentNotSampled.shouldSample(e,r,n,i,o,a):u.traceFlags&pt.SAMPLED?this._localParentSampled.shouldSample(e,r,n,i,o,a):this._localParentNotSampled.shouldSample(e,r,n,i,o,a)},t.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()+"}"},t}(),cs=function(){function t(e){e===void 0&&(e=0),this._ratio=e,this._ratio=this._normalize(e),this._upperBound=Math.floor(this._ratio*4294967295)}return t.prototype.shouldSample=function(e,r){return{decision:ya(r)&&this._accumulate(r)<this._upperBound?se.RECORD_AND_SAMPLED:se.NOT_RECORD}},t.prototype.toString=function(){return"TraceIdRatioBased{"+this._ratio+"}"},t.prototype._normalize=function(e){return typeof e!="number"||isNaN(e)?0:e>=1?1:e<=0?0:e},t.prototype._accumulate=function(e){for(var r=0,n=0;n<e.length/8;n++){var i=n*8,o=parseInt(e.slice(i,i+8),16);r=(r^o)>>>0}return r},t}(),by=ft.AlwaysOn,ce=1;function ls(){var t=Be();return{sampler:ps(t),forceFlushTimeoutMillis:3e4,generalLimits:{attributeValueLengthLimit:t.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:t.OTEL_ATTRIBUTE_COUNT_LIMIT},spanLimits:{attributeValueLengthLimit:t.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:t.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT,linkCountLimit:t.OTEL_SPAN_LINK_COUNT_LIMIT,eventCountLimit:t.OTEL_SPAN_EVENT_COUNT_LIMIT,attributePerEventCountLimit:t.OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT,attributePerLinkCountLimit:t.OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT},mergeResourceWithDefaults:!0}}function ps(t){switch(t===void 0&&(t=Be()),t.OTEL_TRACES_SAMPLER){case ft.AlwaysOn:return new ue;case ft.AlwaysOff:return new xr;case ft.ParentBasedAlwaysOn:return new _i({root:new ue});case ft.ParentBasedAlwaysOff:return new _i({root:new xr});case ft.TraceIdRatio:return new cs(fs(t));case ft.ParentBasedTraceIdRatio:return new _i({root:new cs(fs(t))});default:return T.error('OTEL_TRACES_SAMPLER value "'+t.OTEL_TRACES_SAMPLER+" invalid, defaulting to "+by+'".'),new ue}}function fs(t){if(t.OTEL_TRACES_SAMPLER_ARG===void 0||t.OTEL_TRACES_SAMPLER_ARG==="")return T.error("OTEL_TRACES_SAMPLER_ARG is blank, defaulting to "+ce+"."),ce;var e=Number(t.OTEL_TRACES_SAMPLER_ARG);return isNaN(e)?(T.error("OTEL_TRACES_SAMPLER_ARG="+t.OTEL_TRACES_SAMPLER_ARG+" was given, but it is invalid, defaulting to "+ce+"."),ce):e<0||e>1?(T.error("OTEL_TRACES_SAMPLER_ARG="+t.OTEL_TRACES_SAMPLER_ARG+" was given, but it is out of range ([0..1]), defaulting to "+ce+"."),ce):e}function Oy(t){var e={sampler:ps()},r=ls(),n=Object.assign({},r,e,t);return n.generalLimits=Object.assign({},r.generalLimits,t.generalLimits||{}),n.spanLimits=Object.assign({},r.spanLimits,t.spanLimits||{}),n}function Sy(t){var e,r,n,i,o,a,u,c,s,l,p,f,y=Object.assign({},t.spanLimits),v=Tv();return y.attributeCountLimit=(a=(o=(i=(r=(e=t.spanLimits)===null||e===void 0?void 0:e.attributeCountLimit)!==null&&r!==void 0?r:(n=t.generalLimits)===null||n===void 0?void 0:n.attributeCountLimit)!==null&&i!==void 0?i:v.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT)!==null&&o!==void 0?o:v.OTEL_ATTRIBUTE_COUNT_LIMIT)!==null&&a!==void 0?a:Lr,y.attributeValueLengthLimit=(f=(p=(l=(c=(u=t.spanLimits)===null||u===void 0?void 0:u.attributeValueLengthLimit)!==null&&c!==void 0?c:(s=t.generalLimits)===null||s===void 0?void 0:s.attributeValueLengthLimit)!==null&&l!==void 0?l:v.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&p!==void 0?p:v.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&f!==void 0?f:Ar,Object.assign({},t,{spanLimits:y})}var wy=function(){function t(e,r){this._exporter=e,this._isExporting=!1,this._finishedSpans=[],this._droppedSpansCount=0;var n=Be();this._maxExportBatchSize=typeof r?.maxExportBatchSize=="number"?r.maxExportBatchSize:n.OTEL_BSP_MAX_EXPORT_BATCH_SIZE,this._maxQueueSize=typeof r?.maxQueueSize=="number"?r.maxQueueSize:n.OTEL_BSP_MAX_QUEUE_SIZE,this._scheduledDelayMillis=typeof r?.scheduledDelayMillis=="number"?r.scheduledDelayMillis:n.OTEL_BSP_SCHEDULE_DELAY,this._exportTimeoutMillis=typeof r?.exportTimeoutMillis=="number"?r.exportTimeoutMillis:n.OTEL_BSP_EXPORT_TIMEOUT,this._shutdownOnce=new my(this._shutdown,this),this._maxExportBatchSize>this._maxQueueSize&&(T.warn("BatchSpanProcessor: maxExportBatchSize must be smaller or equal to maxQueueSize, setting maxExportBatchSize to match maxQueueSize"),this._maxExportBatchSize=this._maxQueueSize)}return t.prototype.forceFlush=function(){return this._shutdownOnce.isCalled?this._shutdownOnce.promise:this._flushAll()},t.prototype.onStart=function(e,r){},t.prototype.onEnd=function(e){this._shutdownOnce.isCalled||(e.spanContext().traceFlags&pt.SAMPLED)!==0&&this._addToBuffer(e)},t.prototype.shutdown=function(){return this._shutdownOnce.call()},t.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()})},t.prototype._addToBuffer=function(e){if(this._finishedSpans.length>=this._maxQueueSize){this._droppedSpansCount===0&&T.debug("maxQueueSize reached, dropping spans"),this._droppedSpansCount++;return}this._droppedSpansCount>0&&(T.warn("Dropped "+this._droppedSpansCount+" spans because maxQueueSize reached"),this._droppedSpansCount=0),this._finishedSpans.push(e),this._maybeStartTimer()},t.prototype._flushAll=function(){var e=this;return new Promise(function(r,n){for(var i=[],o=Math.ceil(e._finishedSpans.length/e._maxExportBatchSize),a=0,u=o;a<u;a++)i.push(e._flushOneBatch());Promise.all(i).then(function(){r()}).catch(n)})},t.prototype._flushOneBatch=function(){var e=this;return this._clearTimer(),this._finishedSpans.length===0?Promise.resolve():new Promise(function(r,n){var i=setTimeout(function(){n(new Error("Timeout"))},e._exportTimeoutMillis);N.with(Hd(N.active()),function(){var o;e._finishedSpans.length<=e._maxExportBatchSize?(o=e._finishedSpans,e._finishedSpans=[]):o=e._finishedSpans.splice(0,e._maxExportBatchSize);for(var a=function(){return e._exporter.export(o,function(p){var f;clearTimeout(i),p.code===fi.SUCCESS?r():n((f=p.error)!==null&&f!==void 0?f:new Error("BatchSpanProcessor: span export failed"))})},u=null,c=0,s=o.length;c<s;c++){var l=o[c];l.resource.asyncAttributesPending&&l.resource.waitForAsyncAttributes&&(u!=null||(u=[]),u.push(l.resource.waitForAsyncAttributes()))}u===null?a():Promise.all(u).then(a,function(p){oe(p),n(p)})})})},t.prototype._maybeStartTimer=function(){var e=this;if(!this._isExporting){var r=function(){e._isExporting=!0,e._flushOneBatch().finally(function(){e._isExporting=!1,e._finishedSpans.length>0&&(e._clearTimer(),e._maybeStartTimer())}).catch(function(n){e._isExporting=!1,oe(n)})};if(this._finishedSpans.length>=this._maxExportBatchSize)return r();this._timer===void 0&&(this._timer=setTimeout(function(){return r()},this._scheduledDelayMillis))}},t.prototype._clearTimer=function(){this._timer!==void 0&&(clearTimeout(this._timer),this._timer=void 0)},t}(),Ay=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),hs=function(t){Ay(e,t);function e(r,n){var i=t.call(this,r,n)||this;return i.onInit(n),i}return e.prototype.onInit=function(r){var n=this;r?.disableAutoFlushOnDocumentHide!==!0&&typeof document<"u"&&(this._visibilityChangeListener=function(){document.visibilityState==="hidden"&&n.forceFlush().catch(function(i){oe(i)})},this._pageHideListener=function(){n.forceFlush().catch(function(i){oe(i)})},document.addEventListener("visibilitychange",this._visibilityChangeListener),document.addEventListener("pagehide",this._pageHideListener))},e.prototype.onShutdown=function(){typeof document<"u"&&(this._visibilityChangeListener&&document.removeEventListener("visibilitychange",this._visibilityChangeListener),this._pageHideListener&&document.removeEventListener("pagehide",this._pageHideListener))},e}(wy),Ly=8,Ry=16,Ny=function(){function t(){this.generateTraceId=ds(Ry),this.generateSpanId=ds(Ly)}return t}(),Pr=Array(32);function ds(t){return function(){for(var e=0;e<t*2;e++)Pr[e]=Math.floor(Math.random()*16)+48,Pr[e]>=58&&(Pr[e]+=39);return String.fromCharCode.apply(null,Pr.slice(0,t*2))}}var Cy=function(){function t(e,r,n){this._tracerProvider=n;var i=Oy(r);this._sampler=i.sampler,this._generalLimits=i.generalLimits,this._spanLimits=i.spanLimits,this._idGenerator=r.idGenerator||new Ny,this.resource=n.resource,this.instrumentationLibrary=e}return t.prototype.startSpan=function(e,r,n){var i,o,a;r===void 0&&(r={}),n===void 0&&(n=N.active()),r.root&&(n=x.deleteSpan(n));var u=x.getSpan(n);if(ii(n)){T.debug("Instrumentation suppressed, returning Noop Span");var c=x.wrapSpanContext(da);return c}var s=u?.spanContext(),l=this._idGenerator.generateSpanId(),p,f,y;!s||!x.isSpanContextValid(s)?p=this._idGenerator.generateTraceId():(p=s.traceId,f=s.traceState,y=s.spanId);var v=(i=r.kind)!==null&&i!==void 0?i:Ie.INTERNAL,m=((o=r.links)!==null&&o!==void 0?o:[]).map(function(j){return{context:j.context,attributes:wr(j.attributes)}}),_=wr(r.attributes),E=this._sampler.shouldSample(n,p,e,v,_,m);f=(a=E.traceState)!==null&&a!==void 0?a:f;var R=E.decision===gr.RECORD_AND_SAMPLED?pt.SAMPLED:pt.NONE,U={traceId:p,spanId:l,traceFlags:R,traceState:f};if(E.decision===gr.NOT_RECORD){T.debug("Recording is off, propagating context in a non-recording span");var c=x.wrapSpanContext(U);return c}var D=wr(Object.assign(_,E.attributes)),G=new Ty(this,n,e,U,v,y,m,r.startTime,void 0,D);return G},t.prototype.startActiveSpan=function(e,r,n,i){var o,a,u;if(!(arguments.length<2)){arguments.length===2?u=r:arguments.length===3?(o=r,u=n):(o=r,a=n,u=i);var c=a??N.active(),s=this.startSpan(e,o,c),l=x.setSpan(c,s);return N.with(l,u,void 0,s)}},t.prototype.getGeneralLimits=function(){return this._generalLimits},t.prototype.getSpanLimits=function(){return this._spanLimits},t.prototype.getActiveSpanProcessor=function(){return this._tracerProvider.getActiveSpanProcessor()},t}(),xy="process.runtime.name",Py="service.name",Iy="telemetry.sdk.name",My="telemetry.sdk.language",ky="telemetry.sdk.version",Dy=xy,Uy=Py,gi=Iy,Ei=My,Ti=ky,jy="webjs",By=jy,$y="1.30.1",le,bi=(le={},le[gi]="opentelemetry",le[Dy]="browser",le[Ei]=By,le[Ti]=$y,le);function Fy(){return"unknown_service"}var Lt=function(){return Lt=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++){e=arguments[r];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Lt.apply(this,arguments)},Vy=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function u(l){try{s(n.next(l))}catch(p){a(p)}}function c(l){try{s(n.throw(l))}catch(p){a(p)}}function s(l){l.done?o(l.value):i(l.value).then(u,c)}s((n=n.apply(t,[])).next())})},Gy=function(t,e){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(l){return c([s,l])}}function c(s){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return r.label++,{value:s[1],done:!1};case 5:r.label++,i=s[1],s=[0];continue;case 7:s=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){r.label=s[1];break}if(s[0]===6&&r.label<o[1]){r.label=o[1],o=s;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(s);break}o[2]&&r.ops.pop(),r.trys.pop();continue}s=e.call(t,r)}catch(l){s=[6,l],i=0}finally{n=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},Hy=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},Ve=function(){function t(e,r){var n=this,i;this._attributes=e,this.asyncAttributesPending=r!=null,this._syncAttributes=(i=this._attributes)!==null&&i!==void 0?i:{},this._asyncAttributesPromise=r?.then(function(o){return n._attributes=Object.assign({},n._attributes,o),n.asyncAttributesPending=!1,o},function(o){return T.debug("a resource's async attributes promise rejected: %s",o),n.asyncAttributesPending=!1,{}})}return t.empty=function(){return t.EMPTY},t.default=function(){var e;return new t((e={},e[Uy]=Fy(),e[Ei]=bi[Ei],e[gi]=bi[gi],e[Ti]=bi[Ti],e))},Object.defineProperty(t.prototype,"attributes",{get:function(){var e;return this.asyncAttributesPending&&T.error("Accessing resource attributes before async attributes settled"),(e=this._attributes)!==null&&e!==void 0?e:{}},enumerable:!1,configurable:!0}),t.prototype.waitForAsyncAttributes=function(){return Vy(this,void 0,void 0,function(){return Gy(this,function(e){switch(e.label){case 0:return this.asyncAttributesPending?[4,this._asyncAttributesPromise]:[3,2];case 1:e.sent(),e.label=2;case 2:return[2]}})})},t.prototype.merge=function(e){var r=this,n;if(!e)return this;var i=Lt(Lt({},this._syncAttributes),(n=e._syncAttributes)!==null&&n!==void 0?n:e.attributes);if(!this._asyncAttributesPromise&&!e._asyncAttributesPromise)return new t(i);var o=Promise.all([this._asyncAttributesPromise,e._asyncAttributesPromise]).then(function(a){var u,c=Hy(a,2),s=c[0],l=c[1];return Lt(Lt(Lt(Lt({},r._syncAttributes),s),(u=e._syncAttributes)!==null&&u!==void 0?u:e.attributes),l)});return new t(i,o)},t.EMPTY=new t({}),t}(),Ir=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},vs=function(){function t(e){this._spanProcessors=e}return t.prototype.forceFlush=function(){var e,r,n=[];try{for(var i=Ir(this._spanProcessors),o=i.next();!o.done;o=i.next()){var a=o.value;n.push(a.forceFlush())}}catch(u){e={error:u}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}return new Promise(function(u){Promise.all(n).then(function(){u()}).catch(function(c){oe(c||new Error("MultiSpanProcessor: forceFlush failed")),u()})})},t.prototype.onStart=function(e,r){var n,i;try{for(var o=Ir(this._spanProcessors),a=o.next();!a.done;a=o.next()){var u=a.value;u.onStart(e,r)}}catch(c){n={error:c}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}},t.prototype.onEnd=function(e){var r,n;try{for(var i=Ir(this._spanProcessors),o=i.next();!o.done;o=i.next()){var a=o.value;a.onEnd(e)}}catch(u){r={error:u}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}},t.prototype.shutdown=function(){var e,r,n=[];try{for(var i=Ir(this._spanProcessors),o=i.next();!o.done;o=i.next()){var a=o.value;n.push(a.shutdown())}}catch(u){e={error:u}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}return new Promise(function(u,c){Promise.all(n).then(function(){u()},c)})},t}(),zy=function(){function t(){}return t.prototype.onStart=function(e,r){},t.prototype.onEnd=function(e){},t.prototype.shutdown=function(){return Promise.resolve()},t.prototype.forceFlush=function(){return Promise.resolve()},t}(),Xy=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,o=[],a;try{for(;!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},qy=function(t,e,r){if(arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return t.concat(o||Array.prototype.slice.call(e))},Bt;(function(t){t[t.resolved=0]="resolved",t[t.timeout=1]="timeout",t[t.error=2]="error",t[t.unresolved=3]="unresolved"})(Bt||(Bt={}));var Ky=function(){function t(e){e===void 0&&(e={});var r,n;this._registeredSpanProcessors=[],this._tracers=new Map;var i=py({},ls(),Sy(e));if(this.resource=(r=i.resource)!==null&&r!==void 0?r:Ve.empty(),i.mergeResourceWithDefaults&&(this.resource=Ve.default().merge(this.resource)),this._config=Object.assign({},i,{resource:this.resource}),!((n=e.spanProcessors)===null||n===void 0)&&n.length)this._registeredSpanProcessors=qy([],Xy(e.spanProcessors),!1),this.activeSpanProcessor=new vs(this._registeredSpanProcessors);else{var o=this._buildExporterFromEnv();if(o!==void 0){var a=new hs(o);this.activeSpanProcessor=a}else this.activeSpanProcessor=new zy}}return t.prototype.getTracer=function(e,r,n){var i=e+"@"+(r||"")+":"+(n?.schemaUrl||"");return this._tracers.has(i)||this._tracers.set(i,new Cy({name:e,version:r,schemaUrl:n?.schemaUrl},this._config,this)),this._tracers.get(i)},t.prototype.addSpanProcessor=function(e){this._registeredSpanProcessors.length===0&&this.activeSpanProcessor.shutdown().catch(function(r){return T.error("Error while trying to shutdown current span processor",r)}),this._registeredSpanProcessors.push(e),this.activeSpanProcessor=new vs(this._registeredSpanProcessors)},t.prototype.getActiveSpanProcessor=function(){return this.activeSpanProcessor},t.prototype.register=function(e){e===void 0&&(e={}),x.setGlobalTracerProvider(this),e.propagator===void 0&&(e.propagator=this._buildPropagatorFromEnv()),e.contextManager&&N.setGlobalContextManager(e.contextManager),e.propagator&&Q.setGlobalPropagator(e.propagator)},t.prototype.forceFlush=function(){var e=this._config.forceFlushTimeoutMillis,r=this._registeredSpanProcessors.map(function(n){return new Promise(function(i){var o,a=setTimeout(function(){i(new Error("Span processor did not completed within timeout period of "+e+" ms")),o=Bt.timeout},e);n.forceFlush().then(function(){clearTimeout(a),o!==Bt.timeout&&(o=Bt.resolved,i(o))}).catch(function(u){clearTimeout(a),o=Bt.error,i(u)})})});return new Promise(function(n,i){Promise.all(r).then(function(o){var a=o.filter(function(u){return u!==Bt.resolved});a.length>0?i(a):n()}).catch(function(o){return i([o])})})},t.prototype.shutdown=function(){return this.activeSpanProcessor.shutdown()},t.prototype._getPropagator=function(e){var r;return(r=this.constructor._registeredPropagators.get(e))===null||r===void 0?void 0:r()},t.prototype._getSpanExporter=function(e){var r;return(r=this.constructor._registeredExporters.get(e))===null||r===void 0?void 0:r()},t.prototype._buildPropagatorFromEnv=function(){var e=this,r=Array.from(new Set(Be().OTEL_PROPAGATORS)),n=r.map(function(o){var a=e._getPropagator(o);return a||T.warn('Propagator "'+o+'" requested through environment variable is unavailable.'),a}),i=n.reduce(function(o,a){return a&&o.push(a),o},[]);if(i.length!==0)return r.length===1?i[0]:new kv({propagators:i})},t.prototype._buildExporterFromEnv=function(){var e=Be().OTEL_TRACES_EXPORTER;if(!(e==="none"||e==="")){var r=this._getSpanExporter(e);return r||T.error('Exporter "'+e+'" requested through environment variable is unavailable.'),r}},t._registeredPropagators=new Map([["tracecontext",function(){return new Qv}],["baggage",function(){return new Zd}]]),t._registeredExporters=new Map,t}(),Wy=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,o=[],a;try{for(;!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},Yy=function(t,e,r){if(arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return t.concat(o||Array.prototype.slice.call(e))},ys=function(){function t(){this._enabled=!1,this._currentContext=kt}return t.prototype._bindFunction=function(e,r){e===void 0&&(e=kt);var n=this,i=function(){for(var o=this,a=[],u=0;u<arguments.length;u++)a[u]=arguments[u];return n.with(e,function(){return r.apply(o,a)})};return Object.defineProperty(i,"length",{enumerable:!1,configurable:!0,writable:!1,value:r.length}),i},t.prototype.active=function(){return this._currentContext},t.prototype.bind=function(e,r){return e===void 0&&(e=this.active()),typeof r=="function"?this._bindFunction(e,r):r},t.prototype.disable=function(){return this._currentContext=kt,this._enabled=!1,this},t.prototype.enable=function(){return this._enabled?this:(this._enabled=!0,this._currentContext=kt,this)},t.prototype.with=function(e,r,n){for(var i=[],o=3;o<arguments.length;o++)i[o-3]=arguments[o];var a=this._currentContext;this._currentContext=e||kt;try{return r.call.apply(r,Yy([n],Wy(i),!1))}finally{this._currentContext=a}},t}(),Jy=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Qy=function(t){Jy(e,t);function e(r){r===void 0&&(r={});var n=t.call(this,r)||this;if(r.contextManager)throw"contextManager should be defined in register method not in constructor";if(r.propagator)throw"propagator should be defined in register method not in constructor";return n}return e.prototype.register=function(r){r===void 0&&(r={}),r.contextManager===void 0&&(r.contextManager=new ys),r.contextManager&&r.contextManager.enable(),t.prototype.register.call(this,r)},e}(Ky),S;(function(t){t.CONNECT_END="connectEnd",t.CONNECT_START="connectStart",t.DECODED_BODY_SIZE="decodedBodySize",t.DOM_COMPLETE="domComplete",t.DOM_CONTENT_LOADED_EVENT_END="domContentLoadedEventEnd",t.DOM_CONTENT_LOADED_EVENT_START="domContentLoadedEventStart",t.DOM_INTERACTIVE="domInteractive",t.DOMAIN_LOOKUP_END="domainLookupEnd",t.DOMAIN_LOOKUP_START="domainLookupStart",t.ENCODED_BODY_SIZE="encodedBodySize",t.FETCH_START="fetchStart",t.LOAD_EVENT_END="loadEventEnd",t.LOAD_EVENT_START="loadEventStart",t.NAVIGATION_START="navigationStart",t.REDIRECT_END="redirectEnd",t.REDIRECT_START="redirectStart",t.REQUEST_START="requestStart",t.RESPONSE_END="responseEnd",t.RESPONSE_START="responseStart",t.SECURE_CONNECTION_START="secureConnectionStart",t.UNLOAD_EVENT_END="unloadEventEnd",t.UNLOAD_EVENT_START="unloadEventStart"})(S||(S={}));var Oi;function Zy(){return Oi||(Oi=document.createElement("a")),Oi}function Rt(t,e){return e in t}function V(t,e,r,n){var i=void 0,o=void 0;Rt(r,e)&&typeof r[e]=="number"&&(i=r[e]);var a=S.FETCH_START;if(Rt(r,a)&&typeof r[a]=="number"&&(o=r[a]),i!==void 0&&o!==void 0&&i>=o)return t.addEvent(e,i),t}function pe(t,e,r){r===void 0&&(r=!1),r||(V(t,S.FETCH_START,e),V(t,S.DOMAIN_LOOKUP_START,e),V(t,S.DOMAIN_LOOKUP_END,e),V(t,S.CONNECT_START,e),Rt(e,"name")&&e.name.startsWith("https:")&&V(t,S.SECURE_CONNECTION_START,e),V(t,S.CONNECT_END,e),V(t,S.REQUEST_START,e),V(t,S.RESPONSE_START,e),V(t,S.RESPONSE_END,e));var n=e[S.ENCODED_BODY_SIZE];n!==void 0&&t.setAttribute(Rv,n);var i=e[S.DECODED_BODY_SIZE];i!==void 0&&n!==i&&t.setAttribute(Nv,i)}function tm(t){return t.slice().sort(function(e,r){var n=e[S.FETCH_START],i=r[S.FETCH_START];return n>i?1:n<i?-1:0})}function ms(){return typeof location<"u"?location.origin:void 0}function _s(t,e,r,n,i,o){i===void 0&&(i=new WeakSet);var a=mt(t);t=a.toString();var u=rm(t,e,r,n,i,o);if(u.length===0)return{mainRequest:void 0};if(u.length===1)return{mainRequest:u[0]};var c=tm(u);if(a.origin!==ms()&&c.length>1){var s=c[0],l=em(c,s[S.RESPONSE_END],r),p=s[S.RESPONSE_END],f=l[S.FETCH_START];return f<p&&(l=s,s=void 0),{corsPreFlightRequest:s,mainRequest:l}}else return{mainRequest:u[0]}}function em(t,e,r){for(var n=At(r),i=At($e(e)),o=t[1],a,u=t.length,c=1;c<u;c++){var s=t[c],l=At($e(s[S.FETCH_START])),p=At($e(s[S.RESPONSE_END])),f=n-p;l>=i&&(!a||f<a)&&(a=f,o=s)}return o}function rm(t,e,r,n,i,o){var a=At(e),u=At(r),c=n.filter(function(s){var l=At($e(s[S.FETCH_START])),p=At($e(s[S.RESPONSE_END]));return s.initiatorType.toLowerCase()===(o||"xmlhttprequest")&&s.name===t&&l>=a&&p<=u});return c.length>0&&(c=c.filter(function(s){return!i.has(s)})),c}function mt(t){if(typeof URL=="function")return new URL(t,typeof document<"u"?document.baseURI:typeof location<"u"?location.href:void 0);var e=Zy();return e.href=t,e}function gs(t,e){if(t.nodeType===Node.DOCUMENT_NODE)return"/";var r=im(t,e);if(e&&r.indexOf("@id")>0)return r;var n="";return t.parentNode&&(n+=gs(t.parentNode,!1)),n+=r,n}function nm(t){if(!t.parentNode)return 0;var e=[t.nodeType];t.nodeType===Node.CDATA_SECTION_NODE&&e.push(Node.TEXT_NODE);var r=Array.from(t.parentNode.childNodes);return r=r.filter(function(n){var i=n.localName;return e.indexOf(n.nodeType)>=0&&i===t.localName}),r.length>=1?r.indexOf(t)+1:0}function im(t,e){var r=t.nodeType,n=nm(t),i="";if(r===Node.ELEMENT_NODE){var o=t.getAttribute("id");if(e&&o)return'//*[@id="'+o+'"]';i=t.localName}else if(r===Node.TEXT_NODE||r===Node.CDATA_SECTION_NODE)i="text()";else if(r===Node.COMMENT_NODE)i="comment()";else return"";return i&&n>1?"/"+i+"["+n+"]":"/"+i}function Es(t,e){var r=e||[];(typeof r=="string"||r instanceof RegExp)&&(r=[r]);var n=mt(t);return n.origin===ms()?!0:r.some(function(i){return hy(t,i)})}var Si=function(){return Si=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++){e=arguments[r];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Si.apply(this,arguments)},om=function(){function t(e,r,n){this.instrumentationName=e,this.instrumentationVersion=r,this._config={},this._wrap=X.wrap,this._unwrap=X.unwrap,this._massWrap=X.massWrap,this._massUnwrap=X.massUnwrap,this.setConfig(n),this._diag=T.createComponentLogger({namespace:e}),this._tracer=x.getTracer(e,r),this._meter=ie.getMeter(e,r),this._logger=De.getLogger(e,r),this._updateMetricInstruments()}return Object.defineProperty(t.prototype,"meter",{get:function(){return this._meter},enumerable:!1,configurable:!0}),t.prototype.setMeterProvider=function(e){this._meter=e.getMeter(this.instrumentationName,this.instrumentationVersion),this._updateMetricInstruments()},Object.defineProperty(t.prototype,"logger",{get:function(){return this._logger},enumerable:!1,configurable:!0}),t.prototype.setLoggerProvider=function(e){this._logger=e.getLogger(this.instrumentationName,this.instrumentationVersion)},t.prototype.getModuleDefinitions=function(){var e,r=(e=this.init())!==null&&e!==void 0?e:[];return Array.isArray(r)?r:[r]},t.prototype._updateMetricInstruments=function(){},t.prototype.getConfig=function(){return this._config},t.prototype.setConfig=function(e){this._config=Si({enabled:!0},e)},t.prototype.setTracerProvider=function(e){this._tracer=e.getTracer(this.instrumentationName,this.instrumentationVersion)},Object.defineProperty(t.prototype,"tracer",{get:function(){return this._tracer},enumerable:!1,configurable:!0}),t.prototype._runSpanCustomizationHook=function(e,r,n,i){if(e)try{e(n,i)}catch(o){this._diag.error("Error running span customization hook due to exception in handler",{triggerName:r},o)}},t}(),am=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),sm=function(t){am(e,t);function e(r,n,i){var o=t.call(this,r,n,i)||this;return o._config.enabled&&o.enable(),o}return e}(om);function Ts(t,e,r){var n,i;try{i=t()}catch(o){n=o}finally{return e(n,i),i}}var Ge;(function(t){t.DOCUMENT_LOAD="documentLoad",t.DOCUMENT_FETCH="documentFetch",t.RESOURCE_FETCH="resourceFetch"})(Ge||(Ge={}));var um="0.44.0",cm="@opentelemetry/instrumentation-document-load";const lm="http.url",pm="http.user_agent",He=lm,fm=pm;var Mr;(function(t){t.FIRST_PAINT="firstPaint",t.FIRST_CONTENTFUL_PAINT="firstContentfulPaint"})(Mr||(Mr={}));var hm=function(){var t,e,r={},n=(e=(t=Sr).getEntriesByType)===null||e===void 0?void 0:e.call(t,"navigation")[0];if(n){var i=Object.values(S);i.forEach(function(u){if(Rt(n,u)){var c=n[u];typeof c=="number"&&(r[u]=c)}})}else{var o=Sr,a=o.timing;if(a){var i=Object.values(S);i.forEach(function(c){if(Rt(a,c)){var s=a[c];typeof s=="number"&&(r[c]=s)}})}}return r},bs={"first-paint":Mr.FIRST_PAINT,"first-contentful-paint":Mr.FIRST_CONTENTFUL_PAINT},dm=function(t){var e,r,n=(r=(e=Sr).getEntriesByType)===null||r===void 0?void 0:r.call(e,"paint");n&&n.forEach(function(i){var o=i.name,a=i.startTime;Rt(bs,o)&&t.addEvent(bs[o],a)})},vm=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),ym=function(t){vm(e,t);function e(r){r===void 0&&(r={});var n=t.call(this,cm,um,r)||this;return n.component="document-load",n.version="1",n.moduleName=n.component,n}return e.prototype.init=function(){},e.prototype._onDocumentLoaded=function(){var r=this;window.setTimeout(function(){r._collectPerformance()})},e.prototype._addResourcesSpans=function(r){var n=this,i,o,a=(o=(i=Sr).getEntriesByType)===null||o===void 0?void 0:o.call(i,"resource");a&&a.forEach(function(u){n._initResourceSpan(u,r)})},e.prototype._collectPerformance=function(){var r=this,n=Array.from(document.getElementsByTagName("meta")).find(function(a){return a.getAttribute("name")===Gd}),i=hm(),o=n&&n.content||"";N.with(Q.extract(kt,{traceparent:o}),function(){var a,u=r._startSpan(Ge.DOCUMENT_LOAD,S.FETCH_START,i);u&&(N.with(x.setSpan(N.active(),u),function(){var c=r._startSpan(Ge.DOCUMENT_FETCH,S.FETCH_START,i);c&&(c.setAttribute(He,location.href),N.with(x.setSpan(N.active(),c),function(){var s;r.getConfig().ignoreNetworkEvents||pe(c,i),r._addCustomAttributesOnSpan(c,(s=r.getConfig().applyCustomAttributesOnSpan)===null||s===void 0?void 0:s.documentFetch),r._endSpan(c,S.RESPONSE_END,i)}))}),u.setAttribute(He,location.href),u.setAttribute(fm,navigator.userAgent),r._addResourcesSpans(u),r.getConfig().ignoreNetworkEvents||(V(u,S.FETCH_START,i),V(u,S.UNLOAD_EVENT_START,i),V(u,S.UNLOAD_EVENT_END,i),V(u,S.DOM_INTERACTIVE,i),V(u,S.DOM_CONTENT_LOADED_EVENT_START,i),V(u,S.DOM_CONTENT_LOADED_EVENT_END,i),V(u,S.DOM_COMPLETE,i),V(u,S.LOAD_EVENT_START,i),V(u,S.LOAD_EVENT_END,i)),r.getConfig().ignorePerformancePaintEvents||dm(u),r._addCustomAttributesOnSpan(u,(a=r.getConfig().applyCustomAttributesOnSpan)===null||a===void 0?void 0:a.documentLoad),r._endSpan(u,S.LOAD_EVENT_END,i))})},e.prototype._endSpan=function(r,n,i){r&&(Rt(i,n)?r.end(i[n]):r.end())},e.prototype._initResourceSpan=function(r,n){var i,o=this._startSpan(Ge.RESOURCE_FETCH,S.FETCH_START,r,n);o&&(o.setAttribute(He,r.name),this.getConfig().ignoreNetworkEvents||pe(o,r),this._addCustomAttributesOnResourceSpan(o,r,(i=this.getConfig().applyCustomAttributesOnSpan)===null||i===void 0?void 0:i.resourceFetch),this._endSpan(o,S.RESPONSE_END,r))},e.prototype._startSpan=function(r,n,i,o){if(Rt(i,n)&&typeof i[n]=="number"){var a=this.tracer.startSpan(r,{startTime:i[n]},o?x.setSpan(N.active(),o):void 0);return a}},e.prototype._waitForPageLoad=function(){window.document.readyState==="complete"?this._onDocumentLoaded():(this._onDocumentLoaded=this._onDocumentLoaded.bind(this),window.addEventListener("load",this._onDocumentLoaded))},e.prototype._addCustomAttributesOnSpan=function(r,n){var i=this;n&&Ts(function(){return n(r)},function(o){o&&i._diag.error("addCustomAttributesOnSpan",o)})},e.prototype._addCustomAttributesOnResourceSpan=function(r,n,i){var o=this;i&&Ts(function(){return i(r,n)},function(a){a&&o._diag.error("addCustomAttributesOnResourceSpan",a)})},e.prototype.enable=function(){window.removeEventListener("load",this._onDocumentLoaded),this._waitForPageLoad()},e.prototype.disable=function(){window.removeEventListener("load",this._onDocumentLoaded)},e}(sm),wi=function(){return wi=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++){e=arguments[r];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},wi.apply(this,arguments)},mm=function(){function t(e,r,n){this.instrumentationName=e,this.instrumentationVersion=r,this._config={},this._wrap=X.wrap,this._unwrap=X.unwrap,this._massWrap=X.massWrap,this._massUnwrap=X.massUnwrap,this.setConfig(n),this._diag=T.createComponentLogger({namespace:e}),this._tracer=x.getTracer(e,r),this._meter=ie.getMeter(e,r),this._logger=De.getLogger(e,r),this._updateMetricInstruments()}return Object.defineProperty(t.prototype,"meter",{get:function(){return this._meter},enumerable:!1,configurable:!0}),t.prototype.setMeterProvider=function(e){this._meter=e.getMeter(this.instrumentationName,this.instrumentationVersion),this._updateMetricInstruments()},Object.defineProperty(t.prototype,"logger",{get:function(){return this._logger},enumerable:!1,configurable:!0}),t.prototype.setLoggerProvider=function(e){this._logger=e.getLogger(this.instrumentationName,this.instrumentationVersion)},t.prototype.getModuleDefinitions=function(){var e,r=(e=this.init())!==null&&e!==void 0?e:[];return Array.isArray(r)?r:[r]},t.prototype._updateMetricInstruments=function(){},t.prototype.getConfig=function(){return this._config},t.prototype.setConfig=function(e){this._config=wi({enabled:!0},e)},t.prototype.setTracerProvider=function(e){this._tracer=e.getTracer(this.instrumentationName,this.instrumentationVersion)},Object.defineProperty(t.prototype,"tracer",{get:function(){return this._tracer},enumerable:!1,configurable:!0}),t.prototype._runSpanCustomizationHook=function(e,r,n,i){if(e)try{e(n,i)}catch(o){this._diag.error("Error running span customization hook due to exception in handler",{triggerName:r},o)}},t}(),_m=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),gm=function(t){_m(e,t);function e(r,n,i){var o=t.call(this,r,n,i)||this;return o._config.enabled&&o.enable(),o}return e}(mm);function Em(t,e,r){var n,i;try{i=t()}catch(o){n=o}finally{return e(n,i),i}}function Tm(t){return typeof t=="function"&&typeof t.__original=="function"&&typeof t.__unwrap=="function"&&t.__wrapped===!0}var Ai=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{},Li=performance,bm="http.method",Om="http.url",Sm="http.host",wm="http.scheme",Am="http.status_code",Lm="http.user_agent",Rm="http.request_content_length_uncompressed",Nm=bm,Cm=Om,xm=Sm,Pm=wm,Im=Am,Mm=Lm,km=Rm,Dm=9,Um=6,jm=Math.pow(10,Um),Os=Math.pow(10,Dm);function Ri(t){var e=t/1e3,r=Math.trunc(e),n=Math.round(t%1e3*jm);return[r,n]}function Bm(){var t=Li.timeOrigin;if(typeof t!="number"){var e=Li;t=e.timing&&e.timing.fetchStart}return t}function Ss(t){var e=Ri(Bm()),r=Ri(Li.now());return $m(e,r)}function $m(t,e){var r=[t[0]+e[0],t[1]+e[1]];return r[1]>=Os&&(r[1]-=Os,r[0]+=1),r}var Fm=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};function Vm(t,e){return typeof e=="string"?t===e:!!t.match(e)}function Gm(t,e){var r,n;if(!e)return!1;try{for(var i=Fm(e),o=i.next();!o.done;o=i.next()){var a=o.value;if(Vm(t,a))return!0}}catch(u){r={error:u}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return!1}var kr;(function(t){t.COMPONENT="component",t.HTTP_ERROR_NAME="http.error_name",t.HTTP_STATUS_TEXT="http.status_text"})(kr||(kr={}));var Hm=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function u(l){try{s(n.next(l))}catch(p){a(p)}}function c(l){try{s(n.throw(l))}catch(p){a(p)}}function s(l){l.done?o(l.value):i(l.value).then(u,c)}s((n=n.apply(t,[])).next())})},zm=function(t,e){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(l){return c([s,l])}}function c(s){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return r.label++,{value:s[1],done:!1};case 5:r.label++,i=s[1],s=[0];continue;case 7:s=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){r.label=s[1];break}if(s[0]===6&&r.label<o[1]){r.label=o[1],o=s;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(s);break}o[2]&&r.ops.pop(),r.trys.pop();continue}s=e.call(t,r)}catch(l){s=[6,l],i=0}finally{n=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},Xm=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},qm=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},ws=T.createComponentLogger({namespace:"@opentelemetry/opentelemetry-instrumentation-fetch/utils"});function Km(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(t[0]instanceof URL||typeof t[0]=="string"){var r=t[1];if(!(r!=null&&r.body))return Promise.resolve();if(r.body instanceof ReadableStream){var n=Wm(r.body),i=n.body,o=n.length;return r.body=i,o}else return Promise.resolve(Ym(r.body))}else{var a=t[0];return a!=null&&a.body?a.clone().text().then(function(u){return Ni(u)}):Promise.resolve()}}function Wm(t){if(!t.pipeThrough)return ws.warn("Platform has ReadableStream but not pipeThrough!"),{body:t,length:Promise.resolve(void 0)};var e=0,r,n=new Promise(function(o){r=o}),i=new TransformStream({start:function(){},transform:function(o,a){return Hm(this,void 0,void 0,function(){var u;return zm(this,function(c){switch(c.label){case 0:return[4,o];case 1:return u=c.sent(),e+=u.byteLength,a.enqueue(o),[2]}})})},flush:function(){r(e)}});return{body:t.pipeThrough(i),length:n}}function Ym(t){if(typeof Document<"u"&&t instanceof Document)return new XMLSerializer().serializeToString(document).length;if(t instanceof Blob)return t.size;if(t.byteLength!==void 0)return t.byteLength;if(t instanceof FormData)return Qm(t);if(t instanceof URLSearchParams)return Ni(t.toString());if(typeof t=="string")return Ni(t);ws.warn("unknown body type")}var Jm=new TextEncoder;function Ni(t){return Jm.encode(t).byteLength}function Qm(t){var e,r,n=0;try{for(var i=Xm(t.entries()),o=i.next();!o.done;o=i.next()){var a=qm(o.value,2),u=a[0],c=a[1];n+=u.length,c instanceof Blob?n+=c.size:n+=c.length}}catch(s){e={error:s}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}return n}var As="0.57.2",Zm=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),t_=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,o=[],a;try{for(;!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},e_=function(t,e,r){if(arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return t.concat(o||Array.prototype.slice.call(e))},Ci,r_=300,Ls=typeof process=="object"&&((Ci=process.release)===null||Ci===void 0?void 0:Ci.name)==="node",n_=function(t){Zm(e,t);function e(r){r===void 0&&(r={});var n=t.call(this,"@opentelemetry/instrumentation-fetch",As,r)||this;return n.component="fetch",n.version=As,n.moduleName=n.component,n._usedResources=new WeakSet,n._tasksCount=0,n}return e.prototype.init=function(){},e.prototype._addChildSpan=function(r,n){var i=this.tracer.startSpan("CORS Preflight",{startTime:n[S.FETCH_START]},x.setSpan(N.active(),r));pe(i,n,this.getConfig().ignoreNetworkEvents),i.end(n[S.RESPONSE_END])},e.prototype._addFinalSpanAttributes=function(r,n){var i=mt(n.url);r.setAttribute(Im,n.status),n.statusText!=null&&r.setAttribute(kr.HTTP_STATUS_TEXT,n.statusText),r.setAttribute(xm,i.host),r.setAttribute(Pm,i.protocol.replace(":","")),typeof navigator<"u"&&r.setAttribute(Mm,navigator.userAgent)},e.prototype._addHeaders=function(r,n){if(!Es(n,this.getConfig().propagateTraceHeaderCorsUrls)){var i={};Q.inject(N.active(),i),Object.keys(i).length>0&&this._diag.debug("headers inject skipped due to CORS policy");return}if(r instanceof Request)Q.inject(N.active(),r.headers,{set:function(o,a,u){return o.set(a,typeof u=="string"?u:String(u))}});else if(r.headers instanceof Headers)Q.inject(N.active(),r.headers,{set:function(o,a,u){return o.set(a,typeof u=="string"?u:String(u))}});else if(r.headers instanceof Map)Q.inject(N.active(),r.headers,{set:function(o,a,u){return o.set(a,typeof u=="string"?u:String(u))}});else{var i={};Q.inject(N.active(),i),r.headers=Object.assign({},i,r.headers||{})}},e.prototype._clearResources=function(){this._tasksCount===0&&this.getConfig().clearTimingResources&&(performance.clearResourceTimings(),this._usedResources=new WeakSet)},e.prototype._createSpan=function(r,n){var i;if(n===void 0&&(n={}),Gm(r,this.getConfig().ignoreUrls)){this._diag.debug("ignoring span as url matches ignored url");return}var o=(n.method||"GET").toUpperCase(),a="HTTP "+o;return this.tracer.startSpan(a,{kind:Ie.CLIENT,attributes:(i={},i[kr.COMPONENT]=this.moduleName,i[Nm]=o,i[Cm]=r,i)})},e.prototype._findResourceAndAddNetworkEvents=function(r,n,i){var o=n.entries;if(!o.length){if(!performance.getEntriesByType)return;o=performance.getEntriesByType("resource")}var a=_s(n.spanUrl,n.startTime,i,o,this._usedResources,"fetch");if(a.mainRequest){var u=a.mainRequest;this._markResourceAsUsed(u);var c=a.corsPreFlightRequest;c&&(this._addChildSpan(r,c),this._markResourceAsUsed(c)),pe(r,u,this.getConfig().ignoreNetworkEvents)}},e.prototype._markResourceAsUsed=function(r){this._usedResources.add(r)},e.prototype._endSpan=function(r,n,i){var o=this,a=Ri(Date.now()),u=Ss();this._addFinalSpanAttributes(r,i),setTimeout(function(){var c;(c=n.observer)===null||c===void 0||c.disconnect(),o._findResourceAndAddNetworkEvents(r,n,u),o._tasksCount--,o._clearResources(),r.end(a)},r_)},e.prototype._patchConstructor=function(){var r=this;return function(n){var i=r;return function(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];var u=this,c=mt(o[0]instanceof Request?o[0].url:String(o[0])).href,s=o[0]instanceof Request?o[0]:o[1]||{},l=i._createSpan(c,s);if(!l)return n.apply(this,o);var p=i._prepareSpanData(c);i.getConfig().measureRequestSize&&Km.apply(void 0,e_([],t_(o),!1)).then(function(_){_&&l.setAttribute(km,_)}).catch(function(_){i._diag.warn("getFetchBodyLength",_)});function f(_,E){i._applyAttributesAfterFetch(_,s,E),i._endSpan(_,p,{status:E.status||0,statusText:E.message,url:c})}function y(_,E){i._applyAttributesAfterFetch(_,s,E),E.status>=200&&E.status<400?i._endSpan(_,p,E):i._endSpan(_,p,{status:E.status,statusText:E.statusText,url:c})}function v(_,E,R){try{var U=R.clone(),D=R.clone(),G=U.body;if(G){var j=G.getReader(),H=function(){j.read().then(function(B){var Et=B.done;Et?y(_,D):H()},function(B){f(_,B)})};H()}else y(_,R)}finally{E(R)}}function m(_,E,R){try{f(_,R)}finally{E(R)}}return new Promise(function(_,E){return N.with(x.setSpan(N.active(),l),function(){return i._addHeaders(s,c),i._tasksCount++,n.apply(u,s instanceof Request?[s]:[c,s]).then(v.bind(u,l,_),m.bind(u,l,E))})})}}},e.prototype._applyAttributesAfterFetch=function(r,n,i){var o=this,a=this.getConfig().applyCustomAttributesOnSpan;a&&Em(function(){return a(r,n,i)},function(u){u&&o._diag.error("applyCustomAttributesOnSpan",u)})},e.prototype._prepareSpanData=function(r){var n=Ss(),i=[];if(typeof PerformanceObserver!="function")return{entries:i,startTime:n,spanUrl:r};var o=new PerformanceObserver(function(a){var u=a.getEntries();u.forEach(function(c){c.initiatorType==="fetch"&&c.name===r&&i.push(c)})});return o.observe({entryTypes:["resource"]}),{entries:i,observer:o,startTime:n,spanUrl:r}},e.prototype.enable=function(){if(Ls){this._diag.warn("this instrumentation is intended for web usage only, it does not instrument Node.js's fetch()");return}Tm(fetch)&&(this._unwrap(Ai,"fetch"),this._diag.debug("removing previous patch for constructor")),this._wrap(Ai,"fetch",this._patchConstructor())},e.prototype.disable=function(){Ls||(this._unwrap(Ai,"fetch"),this._usedResources=new WeakSet)},e}(gm),xi=function(){return xi=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++){e=arguments[r];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},xi.apply(this,arguments)},i_=function(){function t(e,r,n){this.instrumentationName=e,this.instrumentationVersion=r,this._config={},this._wrap=X.wrap,this._unwrap=X.unwrap,this._massWrap=X.massWrap,this._massUnwrap=X.massUnwrap,this.setConfig(n),this._diag=T.createComponentLogger({namespace:e}),this._tracer=x.getTracer(e,r),this._meter=ie.getMeter(e,r),this._logger=De.getLogger(e,r),this._updateMetricInstruments()}return Object.defineProperty(t.prototype,"meter",{get:function(){return this._meter},enumerable:!1,configurable:!0}),t.prototype.setMeterProvider=function(e){this._meter=e.getMeter(this.instrumentationName,this.instrumentationVersion),this._updateMetricInstruments()},Object.defineProperty(t.prototype,"logger",{get:function(){return this._logger},enumerable:!1,configurable:!0}),t.prototype.setLoggerProvider=function(e){this._logger=e.getLogger(this.instrumentationName,this.instrumentationVersion)},t.prototype.getModuleDefinitions=function(){var e,r=(e=this.init())!==null&&e!==void 0?e:[];return Array.isArray(r)?r:[r]},t.prototype._updateMetricInstruments=function(){},t.prototype.getConfig=function(){return this._config},t.prototype.setConfig=function(e){this._config=xi({enabled:!0},e)},t.prototype.setTracerProvider=function(e){this._tracer=e.getTracer(this.instrumentationName,this.instrumentationVersion)},Object.defineProperty(t.prototype,"tracer",{get:function(){return this._tracer},enumerable:!1,configurable:!0}),t.prototype._runSpanCustomizationHook=function(e,r,n,i){if(e)try{e(n,i)}catch(o){this._diag.error("Error running span customization hook due to exception in handler",{triggerName:r},o)}},t}(),o_=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),a_=function(t){o_(e,t);function e(r,n,i){var o=t.call(this,r,n,i)||this;return o._config.enabled&&o.enable(),o}return e}(i_);function s_(t,e,r){var n,i;try{i=t()}catch(o){n=o}finally{return e(n,i),i}}function Rs(t){return typeof t=="function"&&typeof t.__original=="function"&&typeof t.__unwrap=="function"&&t.__wrapped===!0}var ze=performance,u_="http.method",c_="http.url",l_="http.host",p_="http.scheme",f_="http.status_code",h_="http.user_agent",d_="http.request_content_length_uncompressed",v_=u_,y_=c_,m_=l_,__=p_,g_=f_,E_=h_,T_=d_,b_=9,O_=6,S_=Math.pow(10,O_),Ns=Math.pow(10,b_);function Cs(t){var e=t/1e3,r=Math.trunc(e),n=Math.round(t%1e3*S_);return[r,n]}function w_(){var t=ze.timeOrigin;if(typeof t!="number"){var e=ze;t=e.timing&&e.timing.fetchStart}return t}function xs(t){var e=Cs(w_()),r=Cs(ze.now());return A_(e,r)}function A_(t,e){var r=[t[0]+e[0],t[1]+e[1]];return r[1]>=Ns&&(r[1]-=Ns,r[0]+=1),r}var L_=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};function R_(t,e){return typeof e=="string"?t===e:!!t.match(e)}function N_(t,e){var r,n;if(!e)return!1;try{for(var i=L_(e),o=i.next();!o.done;o=i.next()){var a=o.value;if(R_(t,a))return!0}}catch(u){r={error:u}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return!1}var _t;(function(t){t.METHOD_OPEN="open",t.METHOD_SEND="send",t.EVENT_ABORT="abort",t.EVENT_ERROR="error",t.EVENT_LOAD="loaded",t.EVENT_TIMEOUT="timeout"})(_t||(_t={}));var C_=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},x_=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},P_=T.createComponentLogger({namespace:"@opentelemetry/opentelemetry-instrumentation-xml-http-request/utils"});function I_(t){if(typeof Document<"u"&&t instanceof Document)return new XMLSerializer().serializeToString(document).length;if(t instanceof Blob)return t.size;if(t.byteLength!==void 0)return t.byteLength;if(t instanceof FormData)return k_(t);if(t instanceof URLSearchParams)return Ps(t.toString());if(typeof t=="string")return Ps(t);P_.warn("unknown body type")}var M_=new TextEncoder;function Ps(t){return M_.encode(t).byteLength}function k_(t){var e,r,n=0;try{for(var i=C_(t.entries()),o=i.next();!o.done;o=i.next()){var a=x_(o.value,2),u=a[0],c=a[1];n+=u.length,c instanceof Blob?n+=c.size:n+=c.length}}catch(s){e={error:s}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}return n}var Is="0.57.2",Pi;(function(t){t.HTTP_STATUS_TEXT="http.status_text"})(Pi||(Pi={}));var D_=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),U_=300,j_=function(t){D_(e,t);function e(r){r===void 0&&(r={});var n=t.call(this,"@opentelemetry/instrumentation-xml-http-request",Is,r)||this;return n.component="xml-http-request",n.version=Is,n.moduleName=n.component,n._tasksCount=0,n._xhrMem=new WeakMap,n._usedResources=new WeakSet,n}return e.prototype.init=function(){},e.prototype._addHeaders=function(r,n){var i=mt(n).href;if(!Es(i,this.getConfig().propagateTraceHeaderCorsUrls)){var o={};Q.inject(N.active(),o),Object.keys(o).length>0&&this._diag.debug("headers inject skipped due to CORS policy");return}var a={};Q.inject(N.active(),a),Object.keys(a).forEach(function(u){r.setRequestHeader(u,String(a[u]))})},e.prototype._addChildSpan=function(r,n){var i=this;N.with(x.setSpan(N.active(),r),function(){var o=i.tracer.startSpan("CORS Preflight",{startTime:n[S.FETCH_START]});pe(o,n,i.getConfig().ignoreNetworkEvents),o.end(n[S.RESPONSE_END])})},e.prototype._addFinalSpanAttributes=function(r,n,i){if(typeof i=="string"){var o=mt(i);n.status!==void 0&&r.setAttribute(g_,n.status),n.statusText!==void 0&&r.setAttribute(Pi.HTTP_STATUS_TEXT,n.statusText),r.setAttribute(m_,o.host),r.setAttribute(__,o.protocol.replace(":","")),r.setAttribute(E_,navigator.userAgent)}},e.prototype._applyAttributesAfterXHR=function(r,n){var i=this,o=this.getConfig().applyCustomAttributesOnSpan;typeof o=="function"&&s_(function(){return o(r,n)},function(a){a&&i._diag.error("applyCustomAttributesOnSpan",a)})},e.prototype._addResourceObserver=function(r,n){var i=this._xhrMem.get(r);!i||typeof PerformanceObserver!="function"||typeof PerformanceResourceTiming!="function"||(i.createdResources={observer:new PerformanceObserver(function(o){var a=o.getEntries(),u=mt(n);a.forEach(function(c){c.initiatorType==="xmlhttprequest"&&c.name===u.href&&i.createdResources&&i.createdResources.entries.push(c)})}),entries:[]},i.createdResources.observer.observe({entryTypes:["resource"]}))},e.prototype._clearResources=function(){this._tasksCount===0&&this.getConfig().clearTimingResources&&(ze.clearResourceTimings(),this._xhrMem=new WeakMap,this._usedResources=new WeakSet)},e.prototype._findResourceAndAddNetworkEvents=function(r,n,i,o,a){if(!(!i||!o||!a||!r.createdResources)){var u=r.createdResources.entries;(!u||!u.length)&&(u=ze.getEntriesByType("resource"));var c=_s(mt(i).href,o,a,u,this._usedResources);if(c.mainRequest){var s=c.mainRequest;this._markResourceAsUsed(s);var l=c.corsPreFlightRequest;l&&(this._addChildSpan(n,l),this._markResourceAsUsed(l)),pe(n,s,this.getConfig().ignoreNetworkEvents)}}},e.prototype._cleanPreviousSpanInformation=function(r){var n=this._xhrMem.get(r);if(n){var i=n.callbackToRemoveEvents;i&&i(),this._xhrMem.delete(r)}},e.prototype._createSpan=function(r,n,i){var o;if(N_(n,this.getConfig().ignoreUrls)){this._diag.debug("ignoring span as url matches ignored url");return}var a=i.toUpperCase(),u=this.tracer.startSpan(a,{kind:Ie.CLIENT,attributes:(o={},o[v_]=i,o[y_]=mt(n).toString(),o)});return u.addEvent(_t.METHOD_OPEN),this._cleanPreviousSpanInformation(r),this._xhrMem.set(r,{span:u,spanUrl:n}),u},e.prototype._markResourceAsUsed=function(r){this._usedResources.add(r)},e.prototype._patchOpen=function(){var r=this;return function(n){var i=r;return function(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];var u=o[0],c=o[1];return i._createSpan(this,c,u),n.apply(this,o)}}},e.prototype._patchSend=function(){var r=this;function n(l,p,f,y){var v=p.callbackToRemoveEvents;typeof v=="function"&&v();var m=p.span,_=p.spanUrl,E=p.sendStartTime;m&&(r._findResourceAndAddNetworkEvents(p,m,_,E,f),m.addEvent(l,y),r._addFinalSpanAttributes(m,p,_),m.end(y),r._tasksCount--),r._clearResources()}function i(l,p){var f=r._xhrMem.get(p);if(f){f.status=p.status,f.statusText=p.statusText,r._xhrMem.delete(p),f.span&&r._applyAttributesAfterXHR(f.span,p);var y=xs(),v=Date.now();setTimeout(function(){n(l,f,y,v)},U_)}}function o(){i(_t.EVENT_ERROR,this)}function a(){i(_t.EVENT_ABORT,this)}function u(){i(_t.EVENT_TIMEOUT,this)}function c(){this.status<299?i(_t.EVENT_LOAD,this):i(_t.EVENT_ERROR,this)}function s(l){l.removeEventListener("abort",a),l.removeEventListener("error",o),l.removeEventListener("load",c),l.removeEventListener("timeout",u);var p=r._xhrMem.get(l);p&&(p.callbackToRemoveEvents=void 0)}return function(l){return function(){for(var p=this,f=[],y=0;y<arguments.length;y++)f[y]=arguments[y];var v=r._xhrMem.get(this);if(!v)return l.apply(this,f);var m=v.span,_=v.spanUrl;if(m&&_){if(r.getConfig().measureRequestSize&&f!=null&&f[0]){var E=f[0],R=I_(E);R!==void 0&&m.setAttribute(T_,R)}N.with(x.setSpan(N.active(),m),function(){r._tasksCount++,v.sendStartTime=xs(),m.addEvent(_t.METHOD_SEND),p.addEventListener("abort",a),p.addEventListener("error",o),p.addEventListener("load",c),p.addEventListener("timeout",u),v.callbackToRemoveEvents=function(){s(p),v.createdResources&&v.createdResources.observer.disconnect()},r._addHeaders(p,_),r._addResourceObserver(p,_)})}return l.apply(this,f)}}},e.prototype.enable=function(){this._diag.debug("applying patch to",this.moduleName,this.version),Rs(XMLHttpRequest.prototype.open)&&(this._unwrap(XMLHttpRequest.prototype,"open"),this._diag.debug("removing previous patch from method open")),Rs(XMLHttpRequest.prototype.send)&&(this._unwrap(XMLHttpRequest.prototype,"send"),this._diag.debug("removing previous patch from method send")),this._wrap(XMLHttpRequest.prototype,"open",this._patchOpen()),this._wrap(XMLHttpRequest.prototype,"send",this._patchSend())},e.prototype.disable=function(){this._diag.debug("removing patch from",this.moduleName,this.version),this._unwrap(XMLHttpRequest.prototype,"open"),this._unwrap(XMLHttpRequest.prototype,"send"),this._tasksCount=0,this._xhrMem=new WeakMap,this._usedResources=new WeakSet},e}(a_);const Ms=(t,e,r)=>{var n,i;const o=P({},e);return r?((n=Object.keys(o))==null||n.forEach(a=>{[...r].includes(a?.toLowerCase())||(o[a]="[REDACTED]")}),o):((i=Object.keys(o))==null||i.forEach(a=>{[...B_,...t].includes(a?.toLowerCase())&&(o[a]="[REDACTED]")}),o)},B_=["authorization","cookie","proxy-authorization","set-cookie","token"],$_=["https://www.googleapis.com/identitytoolkit","https://securetoken.googleapis.com"],F_=["awsaccesskeyid","signature","sig","x-goog-signature"],ks=t=>{var e,r;try{return new URL(t)}catch{return new URL(t,(r=(e=globalThis.location)==null?void 0:e.origin)!=null?r:"http://example.com")}},Ds=t=>{try{const e=ks(t);(e.username||e.password)&&(e.username="REDACTED",e.password="REDACTED");const r=e.searchParams;if(F_.forEach(n=>{for(const i of Array.from(r.keys()))i.toLowerCase()===n&&r.set(i,"REDACTED")}),!t.includes("://")&&!t.startsWith("//"))return e.pathname+e.search+e.hash;if(t.startsWith("//")){let n="//";return(e.username||e.password)&&(n+=e.username+":"+e.password+"@"),n+=e.host+e.pathname+e.search+e.hash,n}return e.toString()}catch{return t}},V_=new RegExp("sdk\\/evalx\\/[^/]+\\/contexts\\/(?<context>[^/?]*)\\??.*?"),G_=new RegExp("\\/eval\\/[^/]+\\/(?<context>[^/?]*)\\??.*?");function H_(t){return!!(t.includes("/sdk/evalx")&&t.match(V_)||t.includes("/eval/")&&t.match(G_))}const z_=t=>["events.ld.catamorphic.com","events.launchdarkly.com"].some(e=>t.toLocaleLowerCase().includes(e)),X_=t=>H_(t),q_=(t,e)=>e.some(r=>t.toLocaleLowerCase().includes(r)),K_=(t,e,r)=>!q_(t,e)&&!X_(t)&&!z_(t),W_=(t,e,r)=>{var n;if(r.some(a=>t.toLowerCase().includes(a)))return!1;let i=[];e===!0?(i=["localhost",/^\//],(n=window?.location)!=null&&n.host&&i.push(window.location.host)):e instanceof Array&&(i=e);let o=!1;return i.forEach(a=>{t.match(a)&&(o=!0)}),o},Us=64*1024,Y_={"application/json":64*1024*1024,"text/plain":64*1024*1024},Ii=(t,e,r,n)=>{var i,o,a;let u=Us;if(n){let c="";typeof n.get=="function"?c=(i=n.get("content-type"))!=null?i:"":c=(o=n["content-type"])!=null?o:"";try{c=c.split(";")[0]}catch{}u=(a=Y_[c])!=null?a:Us}if(t){if(e)try{const c=JSON.parse(t);Array.isArray(c)?c.forEach(s=>{Object.keys(s).forEach(l=>{e.includes(l.toLocaleLowerCase())&&(s[l]="[REDACTED]")})}):Object.keys(c).forEach(s=>{e.includes(s.toLocaleLowerCase())&&(c[s]="[REDACTED]")}),t=JSON.stringify(c)}catch{}if(r)try{const c=JSON.parse(t);Object.keys(c).forEach(s=>{r.includes(s.toLocaleLowerCase())||(c[s]="[REDACTED]")}),t=JSON.stringify(c)}catch{}}try{t=t.slice(0,u)}catch{}return t},J_=(t,e,r)=>yt(void 0,null,function*(){let n;try{const i=t.clone().body;if(i){let o=i.getReader(),a=new TextDecoder,u,c="";for(;!(u=yield o.read()).done;){let s=u.value;c+=a.decode(s)}n=c,n=Ii(n,r,e,t.headers)}else n=""}catch(i){n=`Unable to clone response: ${i}`}return n});var js=function(){function t(e){this._delegate=e}return t.prototype.export=function(e,r){this._delegate.export(e,r)},t.prototype.forceFlush=function(){return this._delegate.forceFlush()},t.prototype.shutdown=function(){return this._delegate.shutdown()},t}(),Q_=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Bs=function(t){Q_(e,t);function e(r,n,i){var o=t.call(this,r)||this;return o.name="OTLPExporterError",o.data=i,o.code=n,o}return e}(Error);function Z_(t){if(!Number.isNaN(t)&&Number.isFinite(t)&&t>0)return t;throw new Error("Configuration: timeoutMillis is invalid, expected number greater than 0 (actual: '"+t+"')")}function tg(t){if(t!=null)return function(){return t}}function eg(t,e,r){var n,i,o,a,u,c;return{timeoutMillis:Z_((i=(n=t.timeoutMillis)!==null&&n!==void 0?n:e.timeoutMillis)!==null&&i!==void 0?i:r.timeoutMillis),concurrencyLimit:(a=(o=t.concurrencyLimit)!==null&&o!==void 0?o:e.concurrencyLimit)!==null&&a!==void 0?a:r.concurrencyLimit,compression:(c=(u=t.compression)!==null&&u!==void 0?u:e.compression)!==null&&c!==void 0?c:r.compression}}function rg(){return{timeoutMillis:1e4,concurrencyLimit:30,compression:"none"}}var ng=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function u(l){try{s(n.next(l))}catch(p){a(p)}}function c(l){try{s(n.throw(l))}catch(p){a(p)}}function s(l){l.done?o(l.value):i(l.value).then(u,c)}s((n=n.apply(t,[])).next())})},ig=function(t,e){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(l){return c([s,l])}}function c(s){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return r.label++,{value:s[1],done:!1};case 5:r.label++,i=s[1],s=[0];continue;case 7:s=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){r.label=s[1];break}if(s[0]===6&&r.label<o[1]){r.label=o[1],o=s;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(s);break}o[2]&&r.ops.pop(),r.trys.pop();continue}s=e.call(t,r)}catch(l){s=[6,l],i=0}finally{n=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},og=function(){function t(e){this._sendingPromises=[],this._concurrencyLimit=e}return t.prototype.pushPromise=function(e){var r=this;if(this.hasReachedLimit())throw new Error("Concurrency Limit reached");this._sendingPromises.push(e);var n=function(){var i=r._sendingPromises.indexOf(e);r._sendingPromises.splice(i,1)};e.then(n,n)},t.prototype.hasReachedLimit=function(){return this._sendingPromises.length>=this._concurrencyLimit},t.prototype.awaitAll=function(){return ng(this,void 0,void 0,function(){return ig(this,function(e){switch(e.label){case 0:return[4,Promise.all(this._sendingPromises)];case 1:return e.sent(),[2]}})})},t}();function ag(t){return new og(t.concurrencyLimit)}function sg(t){return Object.prototype.hasOwnProperty.call(t,"partialSuccess")}function ug(){return{handleResponse:function(t){t==null||!sg(t)||t.partialSuccess==null||Object.keys(t.partialSuccess).length===0||T.warn("Received Partial Success response:",JSON.stringify(t.partialSuccess))}}}var cg=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function u(l){try{s(n.next(l))}catch(p){a(p)}}function c(l){try{s(n.throw(l))}catch(p){a(p)}}function s(l){l.done?o(l.value):i(l.value).then(u,c)}s((n=n.apply(t,[])).next())})},lg=function(t,e){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(l){return c([s,l])}}function c(s){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return r.label++,{value:s[1],done:!1};case 5:r.label++,i=s[1],s=[0];continue;case 7:s=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){r.label=s[1];break}if(s[0]===6&&r.label<o[1]){r.label=o[1],o=s;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(s);break}o[2]&&r.ops.pop(),r.trys.pop();continue}s=e.call(t,r)}catch(l){s=[6,l],i=0}finally{n=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},pg=function(){function t(e,r,n,i,o){this._transport=e,this._serializer=r,this._responseHandler=n,this._promiseQueue=i,this._timeout=o,this._diagLogger=T.createComponentLogger({namespace:"OTLPExportDelegate"})}return t.prototype.export=function(e,r){var n=this;if(this._diagLogger.debug("items to be sent",e),this._promiseQueue.hasReachedLimit()){r({code:Z.FAILED,error:new Error("Concurrent export limit reached")});return}var i=this._serializer.serializeRequest(e);if(i==null){r({code:Z.FAILED,error:new Error("Nothing to send")});return}this._promiseQueue.pushPromise(this._transport.send(i,this._timeout).then(function(o){if(o.status==="success"){if(o.data!=null)try{n._responseHandler.handleResponse(n._serializer.deserializeResponse(o.data))}catch(a){n._diagLogger.warn("Export succeeded but could not deserialize response - is the response specification compliant?",a,o.data)}r({code:Z.SUCCESS});return}else if(o.status==="failure"&&o.error){r({code:Z.FAILED,error:o.error});return}else o.status==="retryable"?r({code:Z.FAILED,error:new Bs("Export failed with retryable status")}):r({code:Z.FAILED,error:new Bs("Export failed with unknown error")})},function(o){return r({code:Z.FAILED,error:o})}))},t.prototype.forceFlush=function(){return this._promiseQueue.awaitAll()},t.prototype.shutdown=function(){return cg(this,void 0,void 0,function(){return lg(this,function(e){switch(e.label){case 0:return this._diagLogger.debug("shutdown started"),[4,this.forceFlush()];case 1:return e.sent(),this._transport.shutdown(),[2]}})})},t}();function fg(t,e){return new pg(t.transport,t.serializer,ug(),t.promiseHandler,e.timeout)}function $s(t,e,r){return fg({transport:r,serializer:e,promiseHandler:ag(t)},{timeout:t.timeoutMillis})}function Fs(t){return t>=48&&t<=57?t-48:t>=97&&t<=102?t-87:t-55}function Mi(t){for(var e=new Uint8Array(t.length/2),r=0,n=0;n<t.length;n+=2){var i=Fs(t.charCodeAt(n)),o=Fs(t.charCodeAt(n+1));e[r++]=i<<4|o}return e}var hg=9,dg=Math.pow(10,hg);function vg(t){return t[0]*dg+t[1]}function Vs(t){var e=BigInt(1e9);return BigInt(t[0])*e+BigInt(t[1])}function yg(t){var e=Number(BigInt.asUintN(32,t)),r=Number(BigInt.asUintN(32,t>>BigInt(32)));return{low:e,high:r}}function Gs(t){var e=Vs(t);return yg(e)}function mg(t){var e=Vs(t);return e.toString()}var _g=typeof BigInt<"u"?mg:vg;function Hs(t){return t}function zs(t){if(t!==void 0)return Mi(t)}var gg={encodeHrTime:Gs,encodeSpanContext:Mi,encodeOptionalSpanContext:zs};function Xs(t){var e,r;if(t===void 0)return gg;var n=(e=t.useLongBits)!==null&&e!==void 0?e:!0,i=(r=t.useHex)!==null&&r!==void 0?r:!1;return{encodeHrTime:n?Gs:_g,encodeSpanContext:i?Hs:Mi,encodeOptionalSpanContext:i?Hs:zs}}var Eg=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o};function qs(t){return{attributes:$t(t.attributes),droppedAttributesCount:0}}function Ks(t){return{name:t.name,version:t.version}}function $t(t){return Object.keys(t).map(function(e){return Ws(e,t[e])})}function Ws(t,e){return{key:t,value:Ys(e)}}function Ys(t){var e=typeof t;return e==="string"?{stringValue:t}:e==="number"?Number.isInteger(t)?{intValue:t}:{doubleValue:t}:e==="boolean"?{boolValue:t}:t instanceof Uint8Array?{bytesValue:t}:Array.isArray(t)?{arrayValue:{values:t.map(Ys)}}:e==="object"&&t!=null?{kvlistValue:{values:Object.entries(t).map(function(r){var n=Eg(r,2),i=n[0],o=n[1];return Ws(i,o)})}}:{}}var ct;(function(t){t[t.DELTA=0]="DELTA",t[t.CUMULATIVE=1]="CUMULATIVE"})(ct||(ct={}));var ht;(function(t){t[t.HISTOGRAM=0]="HISTOGRAM",t[t.EXPONENTIAL_HISTOGRAM=1]="EXPONENTIAL_HISTOGRAM",t[t.GAUGE=2]="GAUGE",t[t.SUM=3]="SUM"})(ht||(ht={}));var Tg=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Js=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function u(l){try{s(n.next(l))}catch(p){a(p)}}function c(l){try{s(n.throw(l))}catch(p){a(p)}}function s(l){l.done?o(l.value):i(l.value).then(u,c)}s((n=n.apply(t,[])).next())})},Qs=function(t,e){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(l){return c([s,l])}}function c(s){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return r.label++,{value:s[1],done:!1};case 5:r.label++,i=s[1],s=[0];continue;case 7:s=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){r.label=s[1];break}if(s[0]===6&&r.label<o[1]){r.label=o[1],o=s;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(s);break}o[2]&&r.ops.pop(),r.trys.pop();continue}s=e.call(t,r)}catch(l){s=[6,l],i=0}finally{n=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},bg=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,o=[],a;try{for(;!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},Og=function(t,e,r){if(arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return t.concat(o||Array.prototype.slice.call(e))},Sg=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};function wg(t){return t!=null}function Zs(t){var e=Object.keys(t);return e.length===0?"":(e=e.sort(),JSON.stringify(e.map(function(r){return[r,t[r]]})))}function Ag(t){var e,r;return t.name+":"+((e=t.version)!==null&&e!==void 0?e:"")+":"+((r=t.schemaUrl)!==null&&r!==void 0?r:"")}var tu=function(t){Tg(e,t);function e(r){var n=t.call(this,r)||this;return Object.setPrototypeOf(n,e.prototype),n}return e}(Error);function Xe(t,e){var r,n=new Promise(function(i,o){r=setTimeout(function(){o(new tu("Operation timed out."))},e)});return Promise.race([t,n]).then(function(i){return clearTimeout(r),i},function(i){throw clearTimeout(r),i})}function Lg(t){return Js(this,void 0,void 0,function(){var e=this;return Qs(this,function(r){return[2,Promise.all(t.map(function(n){return Js(e,void 0,void 0,function(){var i,o;return Qs(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),[4,n];case 1:return i=a.sent(),[2,{status:"fulfilled",value:i}];case 2:return o=a.sent(),[2,{status:"rejected",reason:o}];case 3:return[2]}})})}))]})})}function Rg(t){return t.status==="rejected"}function eu(t,e){var r=[];return t.forEach(function(n){r.push.apply(r,Og([],bg(e(n)),!1))}),r}function Ng(t,e){var r,n;if(t.size!==e.size)return!1;try{for(var i=Sg(t),o=i.next();!o.done;o=i.next()){var a=o.value;if(!e.has(a))return!1}}catch(u){r={error:u}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return!0}function Cg(t,e){for(var r=0,n=t.length-1,i=t.length;n>=r;){var o=r+Math.trunc((n-r)/2);t[o]<e?r=o+1:(i=o,n=o-1)}return i}function xg(t,e){return t.toLowerCase()===e.toLowerCase()}var Ft;(function(t){t[t.DROP=0]="DROP",t[t.SUM=1]="SUM",t[t.LAST_VALUE=2]="LAST_VALUE",t[t.HISTOGRAM=3]="HISTOGRAM",t[t.EXPONENTIAL_HISTOGRAM=4]="EXPONENTIAL_HISTOGRAM"})(Ft||(Ft={}));var Pg=function(){function t(){this.kind=Ft.DROP}return t.prototype.createAccumulation=function(){},t.prototype.merge=function(e,r){},t.prototype.diff=function(e,r){},t.prototype.toMetricData=function(e,r,n,i){},t}(),w;(function(t){t.COUNTER="COUNTER",t.GAUGE="GAUGE",t.HISTOGRAM="HISTOGRAM",t.UP_DOWN_COUNTER="UP_DOWN_COUNTER",t.OBSERVABLE_COUNTER="OBSERVABLE_COUNTER",t.OBSERVABLE_GAUGE="OBSERVABLE_GAUGE",t.OBSERVABLE_UP_DOWN_COUNTER="OBSERVABLE_UP_DOWN_COUNTER"})(w||(w={}));function Nt(t,e,r){var n,i,o,a;return Dg(t)||T.warn('Invalid metric name: "'+t+'". The metric name should be a ASCII string with a length no greater than 255 characters.'),{name:t,type:e,description:(n=r?.description)!==null&&n!==void 0?n:"",unit:(i=r?.unit)!==null&&i!==void 0?i:"",valueType:(o=r?.valueType)!==null&&o!==void 0?o:St.DOUBLE,advice:(a=r?.advice)!==null&&a!==void 0?a:{}}}function Ig(t,e){var r,n;return{name:(r=t.name)!==null&&r!==void 0?r:e.name,description:(n=t.description)!==null&&n!==void 0?n:e.description,type:e.type,unit:e.unit,valueType:e.valueType,advice:e.advice}}function Mg(t,e){return xg(t.name,e.name)&&t.unit===e.unit&&t.type===e.type&&t.valueType===e.valueType}var kg=/^[a-z][a-z0-9_.\-/]{0,254}$/i;function Dg(t){return t.match(kg)!=null}var Ug=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o};function jg(t){var e=t.map(function(){return 0});return e.push(0),{buckets:{boundaries:t,counts:e},sum:0,count:0,hasMinMax:!1,min:1/0,max:-1/0}}var ki=function(){function t(e,r,n,i){n===void 0&&(n=!0),i===void 0&&(i=jg(r)),this.startTime=e,this._boundaries=r,this._recordMinMax=n,this._current=i}return t.prototype.record=function(e){if(!Number.isNaN(e)){this._current.count+=1,this._current.sum+=e,this._recordMinMax&&(this._current.min=Math.min(e,this._current.min),this._current.max=Math.max(e,this._current.max),this._current.hasMinMax=!0);var r=Cg(this._boundaries,e);this._current.buckets.counts[r]+=1}},t.prototype.setStartTime=function(e){this.startTime=e},t.prototype.toPointValue=function(){return this._current},t}(),ru=function(){function t(e,r){this._boundaries=e,this._recordMinMax=r,this.kind=Ft.HISTOGRAM}return t.prototype.createAccumulation=function(e){return new ki(e,this._boundaries,this._recordMinMax)},t.prototype.merge=function(e,r){for(var n=e.toPointValue(),i=r.toPointValue(),o=n.buckets.counts,a=i.buckets.counts,u=new Array(o.length),c=0;c<o.length;c++)u[c]=o[c]+a[c];var s=1/0,l=-1/0;return this._recordMinMax&&(n.hasMinMax&&i.hasMinMax?(s=Math.min(n.min,i.min),l=Math.max(n.max,i.max)):n.hasMinMax?(s=n.min,l=n.max):i.hasMinMax&&(s=i.min,l=i.max)),new ki(e.startTime,n.buckets.boundaries,this._recordMinMax,{buckets:{boundaries:n.buckets.boundaries,counts:u},count:n.count+i.count,sum:n.sum+i.sum,hasMinMax:this._recordMinMax&&(n.hasMinMax||i.hasMinMax),min:s,max:l})},t.prototype.diff=function(e,r){for(var n=e.toPointValue(),i=r.toPointValue(),o=n.buckets.counts,a=i.buckets.counts,u=new Array(o.length),c=0;c<o.length;c++)u[c]=a[c]-o[c];return new ki(r.startTime,n.buckets.boundaries,this._recordMinMax,{buckets:{boundaries:n.buckets.boundaries,counts:u},count:i.count-n.count,sum:i.sum-n.sum,hasMinMax:!1,min:1/0,max:-1/0})},t.prototype.toMetricData=function(e,r,n,i){return{descriptor:e,aggregationTemporality:r,dataPointType:ht.HISTOGRAM,dataPoints:n.map(function(o){var a=Ug(o,2),u=a[0],c=a[1],s=c.toPointValue(),l=e.type===w.GAUGE||e.type===w.UP_DOWN_COUNTER||e.type===w.OBSERVABLE_GAUGE||e.type===w.OBSERVABLE_UP_DOWN_COUNTER;return{attributes:u,startTime:c.startTime,endTime:i,value:{min:s.hasMinMax?s.min:void 0,max:s.hasMinMax?s.max:void 0,sum:l?void 0:s.sum,buckets:s.buckets,count:s.count}}})}},t}(),Di=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,o=[],a;try{for(;!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},Ui=function(t,e,r){if(arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return t.concat(o||Array.prototype.slice.call(e))},nu=function(){function t(e,r,n,i){e===void 0&&(e=new Bg),r===void 0&&(r=0),n===void 0&&(n=0),i===void 0&&(i=0),this.backing=e,this.indexBase=r,this.indexStart=n,this.indexEnd=i}return Object.defineProperty(t.prototype,"offset",{get:function(){return this.indexStart},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"length",{get:function(){return this.backing.length===0||this.indexEnd===this.indexStart&&this.at(0)===0?0:this.indexEnd-this.indexStart+1},enumerable:!1,configurable:!0}),t.prototype.counts=function(){var e=this;return Array.from({length:this.length},function(r,n){return e.at(n)})},t.prototype.at=function(e){var r=this.indexBase-this.indexStart;return e<r&&(e+=this.backing.length),e-=r,this.backing.countAt(e)},t.prototype.incrementBucket=function(e,r){this.backing.increment(e,r)},t.prototype.decrementBucket=function(e,r){this.backing.decrement(e,r)},t.prototype.trim=function(){for(var e=0;e<this.length;e++)if(this.at(e)!==0){this.indexStart+=e;break}else if(e===this.length-1){this.indexStart=this.indexEnd=this.indexBase=0;return}for(var e=this.length-1;e>=0;e--)if(this.at(e)!==0){this.indexEnd-=this.length-e-1;break}this._rotate()},t.prototype.downscale=function(e){this._rotate();for(var r=1+this.indexEnd-this.indexStart,n=1<<e,i=0,o=0,a=this.indexStart;a<=this.indexEnd;){var u=a%n;u<0&&(u+=n);for(var c=u;c<n&&i<r;c++)this._relocateBucket(o,i),i++,a++;o++}this.indexStart>>=e,this.indexEnd>>=e,this.indexBase=this.indexStart},t.prototype.clone=function(){return new t(this.backing.clone(),this.indexBase,this.indexStart,this.indexEnd)},t.prototype._rotate=function(){var e=this.indexBase-this.indexStart;e!==0&&(e>0?(this.backing.reverse(0,this.backing.length),this.backing.reverse(0,e),this.backing.reverse(e,this.backing.length)):(this.backing.reverse(0,this.backing.length),this.backing.reverse(0,this.backing.length+e)),this.indexBase=this.indexStart)},t.prototype._relocateBucket=function(e,r){e!==r&&this.incrementBucket(e,this.backing.emptyBucket(r))},t}(),Bg=function(){function t(e){e===void 0&&(e=[0]),this._counts=e}return Object.defineProperty(t.prototype,"length",{get:function(){return this._counts.length},enumerable:!1,configurable:!0}),t.prototype.countAt=function(e){return this._counts[e]},t.prototype.growTo=function(e,r,n){var i=new Array(e).fill(0);i.splice.apply(i,Ui([n,this._counts.length-r],Di(this._counts.slice(r)),!1)),i.splice.apply(i,Ui([0,r],Di(this._counts.slice(0,r)),!1)),this._counts=i},t.prototype.reverse=function(e,r){for(var n=Math.floor((e+r)/2)-e,i=0;i<n;i++){var o=this._counts[e+i];this._counts[e+i]=this._counts[r-i-1],this._counts[r-i-1]=o}},t.prototype.emptyBucket=function(e){var r=this._counts[e];return this._counts[e]=0,r},t.prototype.increment=function(e,r){this._counts[e]+=r},t.prototype.decrement=function(e,r){this._counts[e]>=r?this._counts[e]-=r:this._counts[e]=0},t.prototype.clone=function(){return new t(Ui([],Di(this._counts),!1))},t}(),$g=52,Fg=2146435072,Vg=1048575,ji=1023,iu=-ji+1,ou=ji,Bi=Math.pow(2,-1022);function au(t){var e=new DataView(new ArrayBuffer(8));e.setFloat64(0,t);var r=e.getUint32(0),n=(r&Fg)>>20;return n-ji}function su(t){var e=new DataView(new ArrayBuffer(8));e.setFloat64(0,t);var r=e.getUint32(0),n=e.getUint32(4),i=(r&Vg)*Math.pow(2,32);return i+n}function $i(t,e){return t===0||t===Number.POSITIVE_INFINITY||t===Number.NEGATIVE_INFINITY||Number.isNaN(t)?t:t*Math.pow(2,e)}function Gg(t){return t--,t|=t>>1,t|=t>>2,t|=t>>4,t|=t>>8,t|=t>>16,t++,t}var Hg=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),qe=function(t){Hg(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(Error),zg=function(){function t(e){this._shift=-e}return t.prototype.mapToIndex=function(e){if(e<Bi)return this._minNormalLowerBoundaryIndex();var r=au(e),n=this._rightShift(su(e)-1,$g);return r+n>>this._shift},t.prototype.lowerBoundary=function(e){var r=this._minNormalLowerBoundaryIndex();if(e<r)throw new qe("underflow: "+e+" is < minimum lower boundary: "+r);var n=this._maxNormalLowerBoundaryIndex();if(e>n)throw new qe("overflow: "+e+" is > maximum lower boundary: "+n);return $i(1,e<<this._shift)},Object.defineProperty(t.prototype,"scale",{get:function(){return this._shift===0?0:-this._shift},enumerable:!1,configurable:!0}),t.prototype._minNormalLowerBoundaryIndex=function(){var e=iu>>this._shift;return this._shift<2&&e--,e},t.prototype._maxNormalLowerBoundaryIndex=function(){return ou>>this._shift},t.prototype._rightShift=function(e,r){return Math.floor(e*Math.pow(2,-r))},t}(),Xg=function(){function t(e){this._scale=e,this._scaleFactor=$i(Math.LOG2E,e),this._inverseFactor=$i(Math.LN2,-e)}return t.prototype.mapToIndex=function(e){if(e<=Bi)return this._minNormalLowerBoundaryIndex()-1;if(su(e)===0){var r=au(e);return(r<<this._scale)-1}var n=Math.floor(Math.log(e)*this._scaleFactor),i=this._maxNormalLowerBoundaryIndex();return n>=i?i:n},t.prototype.lowerBoundary=function(e){var r=this._maxNormalLowerBoundaryIndex();if(e>=r){if(e===r)return 2*Math.exp((e-(1<<this._scale))/this._scaleFactor);throw new qe("overflow: "+e+" is > maximum lower boundary: "+r)}var n=this._minNormalLowerBoundaryIndex();if(e<=n){if(e===n)return Bi;if(e===n-1)return Math.exp((e+(1<<this._scale))/this._scaleFactor)/2;throw new qe("overflow: "+e+" is < minimum lower boundary: "+n)}return Math.exp(e*this._inverseFactor)},Object.defineProperty(t.prototype,"scale",{get:function(){return this._scale},enumerable:!1,configurable:!0}),t.prototype._minNormalLowerBoundaryIndex=function(){return iu<<this._scale},t.prototype._maxNormalLowerBoundaryIndex=function(){return(ou+1<<this._scale)-1},t}(),uu=-10,cu=20,qg=Array.from({length:31},function(t,e){return e>10?new Xg(e-10):new zg(e-10)});function lu(t){if(t>cu||t<uu)throw new qe("expected scale >= "+uu+" && <= "+cu+", got: "+t);return qg[t+10]}var Kg=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},Dr=function(){function t(e,r){this.low=e,this.high=r}return t.combine=function(e,r){return new t(Math.min(e.low,r.low),Math.max(e.high,r.high))},t}(),Wg=20,Yg=160,Fi=2,Jg=function(){function t(e,r,n,i,o,a,u,c,s,l,p){e===void 0&&(e=e),r===void 0&&(r=Yg),n===void 0&&(n=!0),i===void 0&&(i=0),o===void 0&&(o=0),a===void 0&&(a=0),u===void 0&&(u=Number.POSITIVE_INFINITY),c===void 0&&(c=Number.NEGATIVE_INFINITY),s===void 0&&(s=new nu),l===void 0&&(l=new nu),p===void 0&&(p=lu(Wg)),this.startTime=e,this._maxSize=r,this._recordMinMax=n,this._sum=i,this._count=o,this._zeroCount=a,this._min=u,this._max=c,this._positive=s,this._negative=l,this._mapping=p,this._maxSize<Fi&&(T.warn("Exponential Histogram Max Size set to "+this._maxSize+", changing to the minimum size of: "+Fi),this._maxSize=Fi)}return t.prototype.record=function(e){this.updateByIncrement(e,1)},t.prototype.setStartTime=function(e){this.startTime=e},t.prototype.toPointValue=function(){return{hasMinMax:this._recordMinMax,min:this.min,max:this.max,sum:this.sum,positive:{offset:this.positive.offset,bucketCounts:this.positive.counts()},negative:{offset:this.negative.offset,bucketCounts:this.negative.counts()},count:this.count,scale:this.scale,zeroCount:this.zeroCount}},Object.defineProperty(t.prototype,"sum",{get:function(){return this._sum},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"min",{get:function(){return this._min},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"max",{get:function(){return this._max},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"count",{get:function(){return this._count},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"zeroCount",{get:function(){return this._zeroCount},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"scale",{get:function(){return this._count===this._zeroCount?0:this._mapping.scale},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"positive",{get:function(){return this._positive},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"negative",{get:function(){return this._negative},enumerable:!1,configurable:!0}),t.prototype.updateByIncrement=function(e,r){if(!Number.isNaN(e)){if(e>this._max&&(this._max=e),e<this._min&&(this._min=e),this._count+=r,e===0){this._zeroCount+=r;return}this._sum+=e*r,e>0?this._updateBuckets(this._positive,e,r):this._updateBuckets(this._negative,-e,r)}},t.prototype.merge=function(e){this._count===0?(this._min=e.min,this._max=e.max):e.count!==0&&(e.min<this.min&&(this._min=e.min),e.max>this.max&&(this._max=e.max)),this.startTime=e.startTime,this._sum+=e.sum,this._count+=e.count,this._zeroCount+=e.zeroCount;var r=this._minScale(e);this._downscale(this.scale-r),this._mergeBuckets(this.positive,e,e.positive,r),this._mergeBuckets(this.negative,e,e.negative,r)},t.prototype.diff=function(e){this._min=1/0,this._max=-1/0,this._sum-=e.sum,this._count-=e.count,this._zeroCount-=e.zeroCount;var r=this._minScale(e);this._downscale(this.scale-r),this._diffBuckets(this.positive,e,e.positive,r),this._diffBuckets(this.negative,e,e.negative,r)},t.prototype.clone=function(){return new t(this.startTime,this._maxSize,this._recordMinMax,this._sum,this._count,this._zeroCount,this._min,this._max,this.positive.clone(),this.negative.clone(),this._mapping)},t.prototype._updateBuckets=function(e,r,n){var i=this._mapping.mapToIndex(r),o=!1,a=0,u=0;if(e.length===0?(e.indexStart=i,e.indexEnd=e.indexStart,e.indexBase=e.indexStart):i<e.indexStart&&e.indexEnd-i>=this._maxSize?(o=!0,u=i,a=e.indexEnd):i>e.indexEnd&&i-e.indexStart>=this._maxSize&&(o=!0,u=e.indexStart,a=i),o){var c=this._changeScale(a,u);this._downscale(c),i=this._mapping.mapToIndex(r)}this._incrementIndexBy(e,i,n)},t.prototype._incrementIndexBy=function(e,r,n){if(n!==0){if(e.length===0&&(e.indexStart=e.indexEnd=e.indexBase=r),r<e.indexStart){var i=e.indexEnd-r;i>=e.backing.length&&this._grow(e,i+1),e.indexStart=r}else if(r>e.indexEnd){var i=r-e.indexStart;i>=e.backing.length&&this._grow(e,i+1),e.indexEnd=r}var o=r-e.indexBase;o<0&&(o+=e.backing.length),e.incrementBucket(o,n)}},t.prototype._grow=function(e,r){var n=e.backing.length,i=e.indexBase-e.indexStart,o=n-i,a=Gg(r);a>this._maxSize&&(a=this._maxSize);var u=a-i;e.backing.growTo(a,o,u)},t.prototype._changeScale=function(e,r){for(var n=0;e-r>=this._maxSize;)e>>=1,r>>=1,n++;return n},t.prototype._downscale=function(e){if(e!==0){if(e<0)throw new Error("impossible change of scale: "+this.scale);var r=this._mapping.scale-e;this._positive.downscale(e),this._negative.downscale(e),this._mapping=lu(r)}},t.prototype._minScale=function(e){var r=Math.min(this.scale,e.scale),n=Dr.combine(this._highLowAtScale(this.positive,this.scale,r),this._highLowAtScale(e.positive,e.scale,r)),i=Dr.combine(this._highLowAtScale(this.negative,this.scale,r),this._highLowAtScale(e.negative,e.scale,r));return Math.min(r-this._changeScale(n.high,n.low),r-this._changeScale(i.high,i.low))},t.prototype._highLowAtScale=function(e,r,n){if(e.length===0)return new Dr(0,-1);var i=r-n;return new Dr(e.indexStart>>i,e.indexEnd>>i)},t.prototype._mergeBuckets=function(e,r,n,i){for(var o=n.offset,a=r.scale-i,u=0;u<n.length;u++)this._incrementIndexBy(e,o+u>>a,n.at(u))},t.prototype._diffBuckets=function(e,r,n,i){for(var o=n.offset,a=r.scale-i,u=0;u<n.length;u++){var c=o+u>>a,s=c-e.indexBase;s<0&&(s+=e.backing.length),e.decrementBucket(s,n.at(u))}e.trim()},t}(),Qg=function(){function t(e,r){this._maxSize=e,this._recordMinMax=r,this.kind=Ft.EXPONENTIAL_HISTOGRAM}return t.prototype.createAccumulation=function(e){return new Jg(e,this._maxSize,this._recordMinMax)},t.prototype.merge=function(e,r){var n=r.clone();return n.merge(e),n},t.prototype.diff=function(e,r){var n=r.clone();return n.diff(e),n},t.prototype.toMetricData=function(e,r,n,i){return{descriptor:e,aggregationTemporality:r,dataPointType:ht.EXPONENTIAL_HISTOGRAM,dataPoints:n.map(function(o){var a=Kg(o,2),u=a[0],c=a[1],s=c.toPointValue(),l=e.type===w.GAUGE||e.type===w.UP_DOWN_COUNTER||e.type===w.OBSERVABLE_GAUGE||e.type===w.OBSERVABLE_UP_DOWN_COUNTER;return{attributes:u,startTime:c.startTime,endTime:i,value:{min:s.hasMinMax?s.min:void 0,max:s.hasMinMax?s.max:void 0,sum:l?void 0:s.sum,positive:{offset:s.positive.offset,bucketCounts:s.positive.bucketCounts},negative:{offset:s.negative.offset,bucketCounts:s.negative.bucketCounts},count:s.count,scale:s.scale,zeroCount:s.zeroCount}}})}},t}(),Zg=Ce("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function tE(t){return t.setValue(Zg,!0)}function eE(){return function(t){T.error(rE(t))}}function rE(t){return typeof t=="string"?t:JSON.stringify(nE(t))}function nE(t){for(var e={},r=t;r!==null;)Object.getOwnPropertyNames(r).forEach(function(n){if(!e[n]){var i=r[n];i&&(e[n]=String(i))}}),r=Object.getPrototypeOf(r);return e}var iE=eE();function pu(t){try{iE(t)}catch{}}var oE=6,aE=Math.pow(10,oE);function Vi(t){var e=t/1e3,r=Math.trunc(e),n=Math.round(t%1e3*aE);return[r,n]}function Ur(t){return t[0]*1e6+t[1]/1e3}var Gi;(function(t){t[t.SUCCESS=0]="SUCCESS",t[t.FAILED=1]="FAILED"})(Gi||(Gi={}));function sE(t,e){return new Promise(function(r){N.with(tE(N.active()),function(){t.export(e,function(n){r(n)})})})}var uE={_export:sE},cE=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},Hi=function(){function t(e,r,n){r===void 0&&(r=0),n===void 0&&(n=[0,0]),this.startTime=e,this._current=r,this.sampleTime=n}return t.prototype.record=function(e){this._current=e,this.sampleTime=Vi(Date.now())},t.prototype.setStartTime=function(e){this.startTime=e},t.prototype.toPointValue=function(){return this._current},t}(),lE=function(){function t(){this.kind=Ft.LAST_VALUE}return t.prototype.createAccumulation=function(e){return new Hi(e)},t.prototype.merge=function(e,r){var n=Ur(r.sampleTime)>=Ur(e.sampleTime)?r:e;return new Hi(e.startTime,n.toPointValue(),n.sampleTime)},t.prototype.diff=function(e,r){var n=Ur(r.sampleTime)>=Ur(e.sampleTime)?r:e;return new Hi(r.startTime,n.toPointValue(),n.sampleTime)},t.prototype.toMetricData=function(e,r,n,i){return{descriptor:e,aggregationTemporality:r,dataPointType:ht.GAUGE,dataPoints:n.map(function(o){var a=cE(o,2),u=a[0],c=a[1];return{attributes:u,startTime:c.startTime,endTime:i,value:c.toPointValue()}})}},t}(),pE=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},Ke=function(){function t(e,r,n,i){n===void 0&&(n=0),i===void 0&&(i=!1),this.startTime=e,this.monotonic=r,this._current=n,this.reset=i}return t.prototype.record=function(e){this.monotonic&&e<0||(this._current+=e)},t.prototype.setStartTime=function(e){this.startTime=e},t.prototype.toPointValue=function(){return this._current},t}(),fu=function(){function t(e){this.monotonic=e,this.kind=Ft.SUM}return t.prototype.createAccumulation=function(e){return new Ke(e,this.monotonic)},t.prototype.merge=function(e,r){var n=e.toPointValue(),i=r.toPointValue();return r.reset?new Ke(r.startTime,this.monotonic,i,r.reset):new Ke(e.startTime,this.monotonic,n+i)},t.prototype.diff=function(e,r){var n=e.toPointValue(),i=r.toPointValue();return this.monotonic&&n>i?new Ke(r.startTime,this.monotonic,i,!0):new Ke(r.startTime,this.monotonic,i-n)},t.prototype.toMetricData=function(e,r,n,i){return{descriptor:e,aggregationTemporality:r,dataPointType:ht.SUM,dataPoints:n.map(function(o){var a=pE(o,2),u=a[0],c=a[1];return{attributes:u,startTime:c.startTime,endTime:i,value:c.toPointValue()}}),isMonotonic:this.monotonic}},t}(),Vt=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),gt=function(){function t(){}return t.Drop=function(){return hu},t.Sum=function(){return du},t.LastValue=function(){return vu},t.Histogram=function(){return yu},t.ExponentialHistogram=function(){return gE},t.Default=function(){return EE},t}(),fE=function(t){Vt(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.createAggregator=function(r){return e.DEFAULT_INSTANCE},e.DEFAULT_INSTANCE=new Pg,e}(gt),hE=function(t){Vt(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.createAggregator=function(r){switch(r.type){case w.COUNTER:case w.OBSERVABLE_COUNTER:case w.HISTOGRAM:return e.MONOTONIC_INSTANCE;default:return e.NON_MONOTONIC_INSTANCE}},e.MONOTONIC_INSTANCE=new fu(!0),e.NON_MONOTONIC_INSTANCE=new fu(!1),e}(gt),dE=function(t){Vt(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.createAggregator=function(r){return e.DEFAULT_INSTANCE},e.DEFAULT_INSTANCE=new lE,e}(gt),vE=function(t){Vt(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.createAggregator=function(r){return e.DEFAULT_INSTANCE},e.DEFAULT_INSTANCE=new ru([0,5,10,25,50,75,100,250,500,750,1e3,2500,5e3,7500,1e4],!0),e}(gt),yE=function(t){Vt(e,t);function e(r,n){n===void 0&&(n=!0);var i=t.call(this)||this;if(i._recordMinMax=n,r==null)throw new Error("ExplicitBucketHistogramAggregation should be created with explicit boundaries, if a single bucket histogram is required, please pass an empty array");r=r.concat(),r=r.sort(function(u,c){return u-c});var o=r.lastIndexOf(-1/0),a=r.indexOf(1/0);return a===-1&&(a=void 0),i._boundaries=r.slice(o+1,a),i}return e.prototype.createAggregator=function(r){return new ru(this._boundaries,this._recordMinMax)},e}(gt),mE=function(t){Vt(e,t);function e(r,n){r===void 0&&(r=160),n===void 0&&(n=!0);var i=t.call(this)||this;return i._maxSize=r,i._recordMinMax=n,i}return e.prototype.createAggregator=function(r){return new Qg(this._maxSize,this._recordMinMax)},e}(gt),_E=function(t){Vt(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype._resolve=function(r){switch(r.type){case w.COUNTER:case w.UP_DOWN_COUNTER:case w.OBSERVABLE_COUNTER:case w.OBSERVABLE_UP_DOWN_COUNTER:return du;case w.GAUGE:case w.OBSERVABLE_GAUGE:return vu;case w.HISTOGRAM:return r.advice.explicitBucketBoundaries?new yE(r.advice.explicitBucketBoundaries):yu}return T.warn("Unable to recognize instrument type: "+r.type),hu},e.prototype.createAggregator=function(r){return this._resolve(r).createAggregator(r)},e}(gt),hu=new fE,du=new hE,vu=new dE,yu=new vE,gE=new mE,EE=new _E,TE=function(t){return gt.Default()},bE=function(t){return ct.CUMULATIVE},zi=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function u(l){try{s(n.next(l))}catch(p){a(p)}}function c(l){try{s(n.throw(l))}catch(p){a(p)}}function s(l){l.done?o(l.value):i(l.value).then(u,c)}s((n=n.apply(t,[])).next())})},Xi=function(t,e){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(l){return c([s,l])}}function c(s){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return r.label++,{value:s[1],done:!1};case 5:r.label++,i=s[1],s=[0];continue;case 7:s=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){r.label=s[1];break}if(s[0]===6&&r.label<o[1]){r.label=o[1],o=s;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(s);break}o[2]&&r.ops.pop(),r.trys.pop();continue}s=e.call(t,r)}catch(l){s=[6,l],i=0}finally{n=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},mu=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},OE=function(t,e,r){if(arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return t.concat(o||Array.prototype.slice.call(e))},SE=function(){function t(e){var r,n,i;this._shutdown=!1,this._aggregationSelector=(r=e?.aggregationSelector)!==null&&r!==void 0?r:TE,this._aggregationTemporalitySelector=(n=e?.aggregationTemporalitySelector)!==null&&n!==void 0?n:bE,this._metricProducers=(i=e?.metricProducers)!==null&&i!==void 0?i:[],this._cardinalitySelector=e?.cardinalitySelector}return t.prototype.setMetricProducer=function(e){if(this._sdkMetricProducer)throw new Error("MetricReader can not be bound to a MeterProvider again.");this._sdkMetricProducer=e,this.onInitialized()},t.prototype.selectAggregation=function(e){return this._aggregationSelector(e)},t.prototype.selectAggregationTemporality=function(e){return this._aggregationTemporalitySelector(e)},t.prototype.selectCardinalityLimit=function(e){return this._cardinalitySelector?this._cardinalitySelector(e):2e3},t.prototype.onInitialized=function(){},t.prototype.collect=function(e){return zi(this,void 0,void 0,function(){var r,n,i,o,a,u;return Xi(this,function(c){switch(c.label){case 0:if(this._sdkMetricProducer===void 0)throw new Error("MetricReader is not bound to a MetricProducer");if(this._shutdown)throw new Error("MetricReader is shutdown");return[4,Promise.all(OE([this._sdkMetricProducer.collect({timeoutMillis:e?.timeoutMillis})],mu(this._metricProducers.map(function(s){return s.collect({timeoutMillis:e?.timeoutMillis})})),!1))];case 1:return r=mu.apply(void 0,[c.sent()]),n=r[0],i=r.slice(1),o=n.errors.concat(eu(i,function(s){return s.errors})),a=n.resourceMetrics.resource,u=n.resourceMetrics.scopeMetrics.concat(eu(i,function(s){return s.resourceMetrics.scopeMetrics})),[2,{resourceMetrics:{resource:a,scopeMetrics:u},errors:o}]}})})},t.prototype.shutdown=function(e){return zi(this,void 0,void 0,function(){return Xi(this,function(r){switch(r.label){case 0:return this._shutdown?(T.error("Cannot call shutdown twice."),[2]):e?.timeoutMillis!=null?[3,2]:[4,this.onShutdown()];case 1:return r.sent(),[3,4];case 2:return[4,Xe(this.onShutdown(),e.timeoutMillis)];case 3:r.sent(),r.label=4;case 4:return this._shutdown=!0,[2]}})})},t.prototype.forceFlush=function(e){return zi(this,void 0,void 0,function(){return Xi(this,function(r){switch(r.label){case 0:return this._shutdown?(T.warn("Cannot forceFlush on already shutdown MetricReader."),[2]):e?.timeoutMillis!=null?[3,2]:[4,this.onForceFlush()];case 1:return r.sent(),[2];case 2:return[4,Xe(this.onForceFlush(),e.timeoutMillis)];case 3:return r.sent(),[2]}})})},t}(),wE=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),jr=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function u(l){try{s(n.next(l))}catch(p){a(p)}}function c(l){try{s(n.throw(l))}catch(p){a(p)}}function s(l){l.done?o(l.value):i(l.value).then(u,c)}s((n=n.apply(t,[])).next())})},Br=function(t,e){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(l){return c([s,l])}}function c(s){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return r.label++,{value:s[1],done:!1};case 5:r.label++,i=s[1],s=[0];continue;case 7:s=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){r.label=s[1];break}if(s[0]===6&&r.label<o[1]){r.label=o[1],o=s;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(s);break}o[2]&&r.ops.pop(),r.trys.pop();continue}s=e.call(t,r)}catch(l){s=[6,l],i=0}finally{n=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},AE=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,o=[],a;try{for(;!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},LE=function(t,e,r){if(arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return t.concat(o||Array.prototype.slice.call(e))},RE=function(t){wE(e,t);function e(r){var n,i,o,a,u=t.call(this,{aggregationSelector:(n=r.exporter.selectAggregation)===null||n===void 0?void 0:n.bind(r.exporter),aggregationTemporalitySelector:(i=r.exporter.selectAggregationTemporality)===null||i===void 0?void 0:i.bind(r.exporter),metricProducers:r.metricProducers})||this;if(r.exportIntervalMillis!==void 0&&r.exportIntervalMillis<=0)throw Error("exportIntervalMillis must be greater than 0");if(r.exportTimeoutMillis!==void 0&&r.exportTimeoutMillis<=0)throw Error("exportTimeoutMillis must be greater than 0");if(r.exportTimeoutMillis!==void 0&&r.exportIntervalMillis!==void 0&&r.exportIntervalMillis<r.exportTimeoutMillis)throw Error("exportIntervalMillis must be greater than or equal to exportTimeoutMillis");return u._exportInterval=(o=r.exportIntervalMillis)!==null&&o!==void 0?o:6e4,u._exportTimeout=(a=r.exportTimeoutMillis)!==null&&a!==void 0?a:3e4,u._exporter=r.exporter,u}return e.prototype._runOnce=function(){return jr(this,void 0,void 0,function(){var r;return Br(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,Xe(this._doRun(),this._exportTimeout)];case 1:return n.sent(),[3,3];case 2:return r=n.sent(),r instanceof tu?(T.error("Export took longer than %s milliseconds and timed out.",this._exportTimeout),[2]):(pu(r),[3,3]);case 3:return[2]}})})},e.prototype._doRun=function(){var r,n;return jr(this,void 0,void 0,function(){var i,o,a,u,c,s;return Br(this,function(l){switch(l.label){case 0:return[4,this.collect({timeoutMillis:this._exportTimeout})];case 1:if(i=l.sent(),o=i.resourceMetrics,a=i.errors,a.length>0&&(s=T).error.apply(s,LE(["PeriodicExportingMetricReader: metrics collection errors"],AE(a),!1)),!o.resource.asyncAttributesPending)return[3,5];l.label=2;case 2:return l.trys.push([2,4,,5]),[4,(n=(r=o.resource).waitForAsyncAttributes)===null||n===void 0?void 0:n.call(r)];case 3:return l.sent(),[3,5];case 4:return u=l.sent(),T.debug("Error while resolving async portion of resource: ",u),pu(u),[3,5];case 5:return o.scopeMetrics.length===0?[2]:[4,uE._export(this._exporter,o)];case 6:if(c=l.sent(),c.code!==Gi.SUCCESS)throw new Error("PeriodicExportingMetricReader: metrics export failed (error "+c.error+")");return[2]}})})},e.prototype.onInitialized=function(){var r=this;this._interval=setInterval(function(){r._runOnce()},this._exportInterval)},e.prototype.onForceFlush=function(){return jr(this,void 0,void 0,function(){return Br(this,function(r){switch(r.label){case 0:return[4,this._runOnce()];case 1:return r.sent(),[4,this._exporter.forceFlush()];case 2:return r.sent(),[2]}})})},e.prototype.onShutdown=function(){return jr(this,void 0,void 0,function(){return Br(this,function(r){switch(r.label){case 0:return this._interval&&clearInterval(this._interval),[4,this.onForceFlush()];case 1:return r.sent(),[4,this._exporter.shutdown()];case 2:return r.sent(),[2]}})})},e}(SE),NE=function(){function t(){this._registeredViews=[]}return t.prototype.addView=function(e){this._registeredViews.push(e)},t.prototype.findViews=function(e,r){var n=this,i=this._registeredViews.filter(function(o){return n._matchInstrument(o.instrumentSelector,e)&&n._matchMeter(o.meterSelector,r)});return i},t.prototype._matchInstrument=function(e,r){return(e.getType()===void 0||r.type===e.getType())&&e.getNameFilter().match(r.name)&&e.getUnitFilter().match(r.unit)},t.prototype._matchMeter=function(e,r){return e.getNameFilter().match(r.name)&&(r.version===void 0||e.getVersionFilter().match(r.version))&&(r.schemaUrl===void 0||e.getSchemaUrlFilter().match(r.schemaUrl))},t}(),Gt=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),$r=function(){function t(e,r){this._writableMetricStorage=e,this._descriptor=r}return t.prototype._record=function(e,r,n){if(r===void 0&&(r={}),n===void 0&&(n=N.active()),typeof e!="number"){T.warn("non-number value provided to metric "+this._descriptor.name+": "+e);return}this._descriptor.valueType===St.INT&&!Number.isInteger(e)&&(T.warn("INT value type cannot accept a floating-point value for "+this._descriptor.name+", ignoring the fractional digits."),e=Math.trunc(e),!Number.isInteger(e))||this._writableMetricStorage.record(e,r,n,Vi(Date.now()))},t}(),CE=function(t){Gt(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.add=function(r,n,i){this._record(r,n,i)},e}($r),xE=function(t){Gt(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.add=function(r,n,i){if(r<0){T.warn("negative value provided to counter "+this._descriptor.name+": "+r);return}this._record(r,n,i)},e}($r),PE=function(t){Gt(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.record=function(r,n,i){this._record(r,n,i)},e}($r),IE=function(t){Gt(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.record=function(r,n,i){if(r<0){T.warn("negative value provided to histogram "+this._descriptor.name+": "+r);return}this._record(r,n,i)},e}($r),Fr=function(){function t(e,r,n){this._observableRegistry=n,this._descriptor=e,this._metricStorages=r}return t.prototype.addCallback=function(e){this._observableRegistry.addCallback(e,this)},t.prototype.removeCallback=function(e){this._observableRegistry.removeCallback(e,this)},t}(),ME=function(t){Gt(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(Fr),kE=function(t){Gt(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(Fr),DE=function(t){Gt(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(Fr);function qi(t){return t instanceof Fr}var UE=function(){function t(e){this._meterSharedState=e}return t.prototype.createGauge=function(e,r){var n=Nt(e,w.GAUGE,r),i=this._meterSharedState.registerMetricStorage(n);return new PE(i,n)},t.prototype.createHistogram=function(e,r){var n=Nt(e,w.HISTOGRAM,r),i=this._meterSharedState.registerMetricStorage(n);return new IE(i,n)},t.prototype.createCounter=function(e,r){var n=Nt(e,w.COUNTER,r),i=this._meterSharedState.registerMetricStorage(n);return new xE(i,n)},t.prototype.createUpDownCounter=function(e,r){var n=Nt(e,w.UP_DOWN_COUNTER,r),i=this._meterSharedState.registerMetricStorage(n);return new CE(i,n)},t.prototype.createObservableGauge=function(e,r){var n=Nt(e,w.OBSERVABLE_GAUGE,r),i=this._meterSharedState.registerAsyncMetricStorage(n);return new kE(n,i,this._meterSharedState.observableRegistry)},t.prototype.createObservableCounter=function(e,r){var n=Nt(e,w.OBSERVABLE_COUNTER,r),i=this._meterSharedState.registerAsyncMetricStorage(n);return new ME(n,i,this._meterSharedState.observableRegistry)},t.prototype.createObservableUpDownCounter=function(e,r){var n=Nt(e,w.OBSERVABLE_UP_DOWN_COUNTER,r),i=this._meterSharedState.registerAsyncMetricStorage(n);return new DE(n,i,this._meterSharedState.observableRegistry)},t.prototype.addBatchObservableCallback=function(e,r){this._meterSharedState.observableRegistry.addBatchCallback(e,r)},t.prototype.removeBatchObservableCallback=function(e,r){this._meterSharedState.observableRegistry.removeBatchCallback(e,r)},t}(),_u=function(){function t(e){this._instrumentDescriptor=e}return t.prototype.getInstrumentDescriptor=function(){return this._instrumentDescriptor},t.prototype.updateDescription=function(e){this._instrumentDescriptor=Nt(this._instrumentDescriptor.name,this._instrumentDescriptor.type,{description:e,valueType:this._instrumentDescriptor.valueType,unit:this._instrumentDescriptor.unit,advice:this._instrumentDescriptor.advice})},t}(),jE=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),gu=function(t,e){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(l){return c([s,l])}}function c(s){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return r.label++,{value:s[1],done:!1};case 5:r.label++,i=s[1],s=[0];continue;case 7:s=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){r.label=s[1];break}if(s[0]===6&&r.label<o[1]){r.label=o[1],o=s;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(s);break}o[2]&&r.ops.pop(),r.trys.pop();continue}s=e.call(t,r)}catch(l){s=[6,l],i=0}finally{n=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},BE=function(){function t(e){this._hash=e,this._valueMap=new Map,this._keyMap=new Map}return t.prototype.get=function(e,r){return r!=null||(r=this._hash(e)),this._valueMap.get(r)},t.prototype.getOrDefault=function(e,r){var n=this._hash(e);if(this._valueMap.has(n))return this._valueMap.get(n);var i=r();return this._keyMap.has(n)||this._keyMap.set(n,e),this._valueMap.set(n,i),i},t.prototype.set=function(e,r,n){n!=null||(n=this._hash(e)),this._keyMap.has(n)||this._keyMap.set(n,e),this._valueMap.set(n,r)},t.prototype.has=function(e,r){return r!=null||(r=this._hash(e)),this._valueMap.has(r)},t.prototype.keys=function(){var e,r;return gu(this,function(n){switch(n.label){case 0:e=this._keyMap.entries(),r=e.next(),n.label=1;case 1:return r.done===!0?[3,3]:[4,[r.value[1],r.value[0]]];case 2:return n.sent(),r=e.next(),[3,1];case 3:return[2]}})},t.prototype.entries=function(){var e,r;return gu(this,function(n){switch(n.label){case 0:e=this._valueMap.entries(),r=e.next(),n.label=1;case 1:return r.done===!0?[3,3]:[4,[this._keyMap.get(r.value[0]),r.value[1],r.value[0]]];case 2:return n.sent(),r=e.next(),[3,1];case 3:return[2]}})},Object.defineProperty(t.prototype,"size",{get:function(){return this._valueMap.size},enumerable:!1,configurable:!0}),t}(),Ht=function(t){jE(e,t);function e(){return t.call(this,Zs)||this}return e}(BE),$E=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},Eu=function(){function t(e,r){this._aggregator=e,this._activeCollectionStorage=new Ht,this._cumulativeMemoStorage=new Ht,this._overflowAttributes={"otel.metric.overflow":!0},this._cardinalityLimit=(r??2e3)-1,this._overflowHashCode=Zs(this._overflowAttributes)}return t.prototype.record=function(e,r,n,i){var o=this,a=this._activeCollectionStorage.get(r);if(!a){if(this._activeCollectionStorage.size>=this._cardinalityLimit){var u=this._activeCollectionStorage.getOrDefault(this._overflowAttributes,function(){return o._aggregator.createAccumulation(i)});u?.record(e);return}a=this._aggregator.createAccumulation(i),this._activeCollectionStorage.set(r,a)}a?.record(e)},t.prototype.batchCumulate=function(e,r){var n=this;Array.from(e.entries()).forEach(function(i){var o=$E(i,3),a=o[0],u=o[1],c=o[2],s=n._aggregator.createAccumulation(r);s?.record(u);var l=s;if(n._cumulativeMemoStorage.has(a,c)){var p=n._cumulativeMemoStorage.get(a,c);l=n._aggregator.diff(p,s)}else if(n._cumulativeMemoStorage.size>=n._cardinalityLimit&&(a=n._overflowAttributes,c=n._overflowHashCode,n._cumulativeMemoStorage.has(a,c))){var p=n._cumulativeMemoStorage.get(a,c);l=n._aggregator.diff(p,s)}if(n._activeCollectionStorage.has(a,c)){var f=n._activeCollectionStorage.get(a,c);l=n._aggregator.merge(f,l)}n._cumulativeMemoStorage.set(a,s,c),n._activeCollectionStorage.set(a,l,c)})},t.prototype.collect=function(){var e=this._activeCollectionStorage;return this._activeCollectionStorage=new Ht,e},t}(),Ki=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Tu=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},bu=function(){function t(e,r){var n=this;this._aggregator=e,this._unreportedAccumulations=new Map,this._reportHistory=new Map,r.forEach(function(i){n._unreportedAccumulations.set(i,[])})}return t.prototype.buildMetrics=function(e,r,n,i){this._stashAccumulations(n);var o=this._getMergedUnreportedAccumulations(e),a=o,u;if(this._reportHistory.has(e)){var c=this._reportHistory.get(e),s=c.collectionTime;u=c.aggregationTemporality,u===ct.CUMULATIVE?a=t.merge(c.accumulations,o,this._aggregator):a=t.calibrateStartTime(c.accumulations,o,s)}else u=e.selectAggregationTemporality(r.type);this._reportHistory.set(e,{accumulations:a,collectionTime:i,aggregationTemporality:u});var l=FE(a);if(l.length!==0)return this._aggregator.toMetricData(r,u,l,i)},t.prototype._stashAccumulations=function(e){var r,n,i=this._unreportedAccumulations.keys();try{for(var o=Ki(i),a=o.next();!a.done;a=o.next()){var u=a.value,c=this._unreportedAccumulations.get(u);c===void 0&&(c=[],this._unreportedAccumulations.set(u,c)),c.push(e)}}catch(s){r={error:s}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}},t.prototype._getMergedUnreportedAccumulations=function(e){var r,n,i=new Ht,o=this._unreportedAccumulations.get(e);if(this._unreportedAccumulations.set(e,[]),o===void 0)return i;try{for(var a=Ki(o),u=a.next();!u.done;u=a.next()){var c=u.value;i=t.merge(i,c,this._aggregator)}}catch(s){r={error:s}}finally{try{u&&!u.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}return i},t.merge=function(e,r,n){for(var i=e,o=r.entries(),a=o.next();a.done!==!0;){var u=Tu(a.value,3),c=u[0],s=u[1],l=u[2];if(e.has(c,l)){var p=e.get(c,l),f=n.merge(p,s);i.set(c,f,l)}else i.set(c,s,l);a=o.next()}return i},t.calibrateStartTime=function(e,r,n){var i,o;try{for(var a=Ki(e.keys()),u=a.next();!u.done;u=a.next()){var c=Tu(u.value,2),s=c[0],l=c[1],p=r.get(s,l);p?.setStartTime(n)}}catch(f){i={error:f}}finally{try{u&&!u.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}return r},t}();function FE(t){return Array.from(t.entries())}var VE=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),GE=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},HE=function(t){VE(e,t);function e(r,n,i,o,a){var u=t.call(this,r)||this;return u._attributesProcessor=i,u._aggregationCardinalityLimit=a,u._deltaMetricStorage=new Eu(n,u._aggregationCardinalityLimit),u._temporalMetricStorage=new bu(n,o),u}return e.prototype.record=function(r,n){var i=this,o=new Ht;Array.from(r.entries()).forEach(function(a){var u=GE(a,2),c=u[0],s=u[1];o.set(i._attributesProcessor.process(c),s)}),this._deltaMetricStorage.batchCumulate(o,n)},e.prototype.collect=function(r,n){var i=this._deltaMetricStorage.collect();return this._temporalMetricStorage.buildMetrics(r,this._instrumentDescriptor,i,n)},e}(_u);function Ou(t,e){var r="";return t.unit!==e.unit&&(r+=" - Unit '"+t.unit+"' does not match '"+e.unit+`'
|
|
297
|
-
`),t.type!==e.type&&(
|
|
298
|
-
`),t.valueType!==e.valueType&&(
|
|
299
|
-
`),t.description!==e.description&&(
|
|
300
|
-
`),
|
|
301
|
-
- OR - create a new view with the name `+t.name+" and description '"+t.description+"' and InstrumentSelector "+
|
|
302
|
-
- OR - create a new view with the name `+e.name+" and description '"+t.description+"' and InstrumentSelector "+
|
|
294
|
+
`),s=[],l=2,p=c.length;l<p;l+=2){var f=u.exec(c[l]);f&&s.push(new n({fileName:f[2],lineNumber:f[1],source:c[l]}))}return s},parseOpera10:function(a){for(var u=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,c=a.stacktrace.split(`
|
|
295
|
+
`),s=[],l=0,p=c.length;l<p;l+=2){var f=u.exec(c[l]);f&&s.push(new n({functionName:f[3]||void 0,fileName:f[2],lineNumber:f[1],source:c[l]}))}return s},parseOpera11:function(a){var u=a.stack.split(`
|
|
296
|
+
`).filter(function(c){return!!c.match(r)&&!c.match(/^Error created at/)},this);return u.map(function(c){var s=c.split("@"),l=this.extractLocation(s.pop()),p=s.shift()||"",f=p.replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^)]*\)/g,"")||void 0,y;p.match(/\(([^)]*)\)/)&&(y=p.replace(/^[^(]+\(([^)]*)\)$/,"$1"));var v=y===void 0||y==="[arguments not available]"?void 0:y.split(",");return new n({functionName:f,args:v,fileName:l[0],lineNumber:l[1],columnNumber:l[2],source:c})},this)}}})})(pa);var Qp=pa.exports;const da=pn(Qp);function En(t){try{return da.parse(t)}catch(e){try{return da.parse(new Error)}catch(n){return console.warn("Highlight Warning: failed to parse error",{originalError:e,secondaryError:n}),[]}}}function Zp(t,e){const n=e.logger;let r;r=window[n];const i=[];if(e.level.includes("error")&&window){const a=u=>{const{message:c,error:s}=u;let l=[];s&&(l=En(s));const p=[gr(c,e.stringifyOptions)];t({type:"Error",trace:l,time:Date.now(),value:p})};window.addEventListener("error",a),i.push(()=>{window&&window.removeEventListener("error",a)})}for(const a of e.level)i.push(o(r,a));return()=>{i.forEach(a=>a())};function o(a,u){return a[u]?Yl(a,u,c=>(...s)=>{c.apply(this,s);try{t(tf(u,e,...s))}catch(l){c("highlight logger error:",l,...s)}}):()=>{}}}function tf(t,e,...n){const r=En(new Error),i=e.serializeConsoleAttributes?n.map(o=>typeof o=="object"?gr(o,e.stringifyOptions):o):n.filter(o=>typeof o!="object").map(o=>`${o}`);return{type:t,trace:r,value:i,attributes:gr(n.filter(o=>typeof o=="object").reduce((o,a)=>x(x({},o),a),{}),e.stringifyOptions),time:Date.now()}}const ef={start:0,end:3},nf={start:4,end:5},Mr={start:6,end:7},kr={start:8,end:8},rf={start:9,end:9},of={start:10,end:15};function af(){if(crypto&&crypto.getRandomValues){const e=new Uint8Array(16);return crypto.getRandomValues(e),[...e.values()]}const t=[];for(let e=0;e<16;e+=1)t.push(Math.floor(Math.random()*256));return t}function ae(t,e){let n="";for(let r=e.start;r<=e.end;r+=1)n+=t[r].toString(16).padStart(2,"0");return n}function sf(t){return t[kr.start]=(t[kr.start]|128)&191,t[Mr.start]=t[Mr.start]&15|64,`${ae(t,ef)}-${ae(t,nf)}-${ae(t,Mr)}-${ae(t,kr)}${ae(t,rf)}-${ae(t,of)}`}function uf(){const t=af();return sf(t)}function va(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():uf()}function Dr(t,e,n,r){var i,o,a,u;let c=r??e,s=En(c),l={};e instanceof Error&&(e=e.message,e.cause&&(l={"exception.cause":e.cause}));const p=lf(s);t({error:c,event:Ae(e),type:"window.onerror",url:window.location.href,source:n??"",lineNumber:(i=p[0])!=null&&i.lineNumber?(o=p[0])==null?void 0:o.lineNumber:0,columnNumber:(a=p[0])!=null&&a.columnNumber?(u=p[0])==null?void 0:u.columnNumber:0,stackTrace:p,timestamp:new Date().toISOString(),payload:l?Ae(l):void 0,id:va()})}const cf=(t,{enablePromisePatch:e})=>{if(typeof window>"u")return()=>{};const n=window.onerror=(a,u,c,s,l)=>{Dr(t,a,u,l)},r=window.onunhandledrejection=a=>{if(a.reason){const u=a.promise;u.getStack?Dr(t,a.reason,a.type,u.getStack()):Dr(t,a.reason,a.type)}},i=window.Promise,o=class extends i{constructor(a){super(a),D(this,"promiseCreationError"),this.promiseCreationError=new Error}getStack(){return this.promiseCreationError}static shouldPatch(){const a=typeof window.Zone>"u";return e&&a}};return o.shouldPatch()&&(window.Promise=o),()=>{window.Promise=i,window.onunhandledrejection=r,window.onerror=n}},lf=t=>{var e,n;if(t.length===0)return t;const r=t[0];return(e=r.fileName)!=null&&e.includes("highlight.run")||(n=r.fileName)!=null&&n.includes("highlight.io")||r.functionName==="new highlightPromise"?t.slice(1):t},pf=['["\\"Script error.\\""]','"Script error."','["\\"Load failed.\\""]','"Load failed."','["\\"Network request failed.\\""]','"Network request failed."','["\\"Document is not focused.\\""]','"Document is not focused."','["\\"Failed to fetch\\""]','"Failed to fetch"','[{"isTrusted":true}]','{"isTrusted":true}','["{}"]','"{}"','[""]','""','["\\"\\""]','""'],ff=["websocket error",'\\"ResizeObserver loop'];var hf=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{},Mt="1.9.0",ya=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;function df(t){var e=new Set([t]),n=new Set,r=t.match(ya);if(!r)return function(){return!1};var i={major:+r[1],minor:+r[2],patch:+r[3],prerelease:r[4]};if(i.prerelease!=null)return function(u){return u===t};function o(u){return n.add(u),!1}function a(u){return e.add(u),!0}return function(u){if(e.has(u))return!0;if(n.has(u))return!1;var c=u.match(ya);if(!c)return o(u);var s={major:+c[1],minor:+c[2],patch:+c[3],prerelease:c[4]};return s.prerelease!=null||i.major!==s.major?o(u):i.major===0?i.minor===s.minor&&i.patch<=s.patch?a(u):o(u):i.minor<=s.minor?a(u):o(u)}}var vf=df(Mt),yf=Mt.split(".")[0],Ne=Symbol.for("opentelemetry.js.api."+yf),xe=hf;function Pe(t,e,n,r){var i;r===void 0&&(r=!1);var o=xe[Ne]=(i=xe[Ne])!==null&&i!==void 0?i:{version:Mt};if(!r&&o[t]){var a=new Error("@opentelemetry/api: Attempted duplicate registration of API: "+t);return n.error(a.stack||a.message),!1}if(o.version!==Mt){var a=new Error("@opentelemetry/api: Registration of version v"+o.version+" for "+t+" does not match previously registered API v"+Mt);return n.error(a.stack||a.message),!1}return o[t]=e,n.debug("@opentelemetry/api: Registered a global for "+t+" v"+Mt+"."),!0}function kt(t){var e,n,r=(e=xe[Ne])===null||e===void 0?void 0:e.version;if(!(!r||!vf(r)))return(n=xe[Ne])===null||n===void 0?void 0:n[t]}function Ie(t,e){e.debug("@opentelemetry/api: Unregistering a global for "+t+" v"+Mt+".");var n=xe[Ne];n&&delete n[t]}var mf=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},_f=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},gf=function(){function t(e){this._namespace=e.namespace||"DiagComponentLogger"}return t.prototype.debug=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return Me("debug",this._namespace,e)},t.prototype.error=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return Me("error",this._namespace,e)},t.prototype.info=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return Me("info",this._namespace,e)},t.prototype.warn=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return Me("warn",this._namespace,e)},t.prototype.verbose=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return Me("verbose",this._namespace,e)},t}();function Me(t,e,n){var r=kt("diag");if(r)return n.unshift(e),r[t].apply(r,_f([],mf(n),!1))}var k;(function(t){t[t.NONE=0]="NONE",t[t.ERROR=30]="ERROR",t[t.WARN=50]="WARN",t[t.INFO=60]="INFO",t[t.DEBUG=70]="DEBUG",t[t.VERBOSE=80]="VERBOSE",t[t.ALL=9999]="ALL"})(k||(k={}));function Ef(t,e){t<k.NONE?t=k.NONE:t>k.ALL&&(t=k.ALL),e=e||{};function n(r,i){var o=e[r];return typeof o=="function"&&t>=i?o.bind(e):function(){}}return{error:n("error",k.ERROR),warn:n("warn",k.WARN),info:n("info",k.INFO),debug:n("debug",k.DEBUG),verbose:n("verbose",k.VERBOSE)}}var Tf=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},bf=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},Of="diag",ft=function(){function t(){function e(i){return function(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];var u=kt("diag");if(u)return u[i].apply(u,bf([],Tf(o),!1))}}var n=this,r=function(i,o){var a,u,c;if(o===void 0&&(o={logLevel:k.INFO}),i===n){var s=new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");return n.error((a=s.stack)!==null&&a!==void 0?a:s.message),!1}typeof o=="number"&&(o={logLevel:o});var l=kt("diag"),p=Ef((u=o.logLevel)!==null&&u!==void 0?u:k.INFO,i);if(l&&!o.suppressOverrideMessage){var f=(c=new Error().stack)!==null&&c!==void 0?c:"<failed to generate stacktrace>";l.warn("Current logger will be overwritten from "+f),p.warn("Current logger will overwrite one already registered from "+f)}return Pe("diag",p,n,!0)};n.setLogger=r,n.disable=function(){Ie(Of,n)},n.createComponentLogger=function(i){return new gf(i)},n.verbose=e("verbose"),n.debug=e("debug"),n.info=e("info"),n.warn=e("warn"),n.error=e("error")}return t.instance=function(){return this._instance||(this._instance=new t),this._instance},t}(),Sf=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},wf=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Af=function(){function t(e){this._entries=e?new Map(e):new Map}return t.prototype.getEntry=function(e){var n=this._entries.get(e);if(n)return Object.assign({},n)},t.prototype.getAllEntries=function(){return Array.from(this._entries.entries()).map(function(e){var n=Sf(e,2),r=n[0],i=n[1];return[r,i]})},t.prototype.setEntry=function(e,n){var r=new t(this._entries);return r._entries.set(e,n),r},t.prototype.removeEntry=function(e){var n=new t(this._entries);return n._entries.delete(e),n},t.prototype.removeEntries=function(){for(var e,n,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var o=new t(this._entries);try{for(var a=wf(r),u=a.next();!u.done;u=a.next()){var c=u.value;o._entries.delete(c)}}catch(s){e={error:s}}finally{try{u&&!u.done&&(n=a.return)&&n.call(a)}finally{if(e)throw e.error}}return o},t.prototype.clear=function(){return new t},t}(),Lf=Symbol("BaggageEntryMetadata"),Rf=ft.instance();function Cf(t){return t===void 0&&(t={}),new Af(new Map(Object.entries(t)))}function ma(t){return typeof t!="string"&&(Rf.error("Cannot create baggage metadata from unknown type: "+typeof t),t=""),{__TYPE__:Lf,toString:function(){return t}}}function ke(t){return Symbol.for(t)}var Nf=function(){function t(e){var n=this;n._currentContext=e?new Map(e):new Map,n.getValue=function(r){return n._currentContext.get(r)},n.setValue=function(r,i){var o=new t(n._currentContext);return o._currentContext.set(r,i),o},n.deleteValue=function(r){var i=new t(n._currentContext);return i._currentContext.delete(r),i}}return t}(),Dt=new Nf,Ut=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),xf=function(){function t(){}return t.prototype.createGauge=function(e,n){return $f},t.prototype.createHistogram=function(e,n){return Ff},t.prototype.createCounter=function(e,n){return Bf},t.prototype.createUpDownCounter=function(e,n){return Vf},t.prototype.createObservableGauge=function(e,n){return Gf},t.prototype.createObservableCounter=function(e,n){return Hf},t.prototype.createObservableUpDownCounter=function(e,n){return qf},t.prototype.addBatchObservableCallback=function(e,n){},t.prototype.removeBatchObservableCallback=function(e){},t}(),Tn=function(){function t(){}return t}(),Pf=function(t){Ut(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.add=function(n,r){},e}(Tn),If=function(t){Ut(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.add=function(n,r){},e}(Tn),Mf=function(t){Ut(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.record=function(n,r){},e}(Tn),kf=function(t){Ut(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.record=function(n,r){},e}(Tn),Ur=function(){function t(){}return t.prototype.addCallback=function(e){},t.prototype.removeCallback=function(e){},t}(),Df=function(t){Ut(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(Ur),Uf=function(t){Ut(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(Ur),jf=function(t){Ut(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(Ur),_a=new xf,Bf=new Pf,$f=new Mf,Ff=new kf,Vf=new If,Hf=new Df,Gf=new Uf,qf=new jf;function zf(){return _a}var St;(function(t){t[t.INT=0]="INT",t[t.DOUBLE=1]="DOUBLE"})(St||(St={}));var Xf={get:function(t,e){if(t!=null)return t[e]},keys:function(t){return t==null?[]:Object.keys(t)}},Kf={set:function(t,e,n){t!=null&&(t[e]=n)}},Wf=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},Yf=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},Jf=function(){function t(){}return t.prototype.active=function(){return Dt},t.prototype.with=function(e,n,r){for(var i=[],o=3;o<arguments.length;o++)i[o-3]=arguments[o];return n.call.apply(n,Yf([r],Wf(i),!1))},t.prototype.bind=function(e,n){return n},t.prototype.enable=function(){return this},t.prototype.disable=function(){return this},t}(),Qf=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},Zf=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},jr="context",th=new Jf,bn=function(){function t(){}return t.getInstance=function(){return this._instance||(this._instance=new t),this._instance},t.prototype.setGlobalContextManager=function(e){return Pe(jr,e,ft.instance())},t.prototype.active=function(){return this._getContextManager().active()},t.prototype.with=function(e,n,r){for(var i,o=[],a=3;a<arguments.length;a++)o[a-3]=arguments[a];return(i=this._getContextManager()).with.apply(i,Zf([e,n,r],Qf(o),!1))},t.prototype.bind=function(e,n){return this._getContextManager().bind(e,n)},t.prototype._getContextManager=function(){return kt(jr)||th},t.prototype.disable=function(){this._getContextManager().disable(),Ie(jr,ft.instance())},t}(),ht;(function(t){t[t.NONE=0]="NONE",t[t.SAMPLED=1]="SAMPLED"})(ht||(ht={}));var ga="0000000000000000",Ea="00000000000000000000000000000000",Ta={traceId:Ea,spanId:ga,traceFlags:ht.NONE},De=function(){function t(e){e===void 0&&(e=Ta),this._spanContext=e}return t.prototype.spanContext=function(){return this._spanContext},t.prototype.setAttribute=function(e,n){return this},t.prototype.setAttributes=function(e){return this},t.prototype.addEvent=function(e,n){return this},t.prototype.addLink=function(e){return this},t.prototype.addLinks=function(e){return this},t.prototype.setStatus=function(e){return this},t.prototype.updateName=function(e){return this},t.prototype.end=function(e){},t.prototype.isRecording=function(){return!1},t.prototype.recordException=function(e,n){},t}(),Br=ke("OpenTelemetry Context Key SPAN");function $r(t){return t.getValue(Br)||void 0}function eh(){return $r(bn.getInstance().active())}function Fr(t,e){return t.setValue(Br,e)}function nh(t){return t.deleteValue(Br)}function rh(t,e){return Fr(t,new De(e))}function ba(t){var e;return(e=$r(t))===null||e===void 0?void 0:e.spanContext()}var ih=/^([0-9a-f]{32})$/i,oh=/^[0-9a-f]{16}$/i;function Oa(t){return ih.test(t)&&t!==Ea}function ah(t){return oh.test(t)&&t!==ga}function Ue(t){return Oa(t.traceId)&&ah(t.spanId)}function sh(t){return new De(t)}var Vr=bn.getInstance(),Sa=function(){function t(){}return t.prototype.startSpan=function(e,n,r){r===void 0&&(r=Vr.active());var i=!!(n!=null&&n.root);if(i)return new De;var o=r&&ba(r);return uh(o)&&Ue(o)?new De(o):new De},t.prototype.startActiveSpan=function(e,n,r,i){var o,a,u;if(!(arguments.length<2)){arguments.length===2?u=n:arguments.length===3?(o=n,u=r):(o=n,a=r,u=i);var c=a??Vr.active(),s=this.startSpan(e,o,c),l=Fr(c,s);return Vr.with(l,u,void 0,s)}},t}();function uh(t){return typeof t=="object"&&typeof t.spanId=="string"&&typeof t.traceId=="string"&&typeof t.traceFlags=="number"}var ch=new Sa,lh=function(){function t(e,n,r,i){this._provider=e,this.name=n,this.version=r,this.options=i}return t.prototype.startSpan=function(e,n,r){return this._getTracer().startSpan(e,n,r)},t.prototype.startActiveSpan=function(e,n,r,i){var o=this._getTracer();return Reflect.apply(o.startActiveSpan,o,arguments)},t.prototype._getTracer=function(){if(this._delegate)return this._delegate;var e=this._provider.getDelegateTracer(this.name,this.version,this.options);return e?(this._delegate=e,this._delegate):ch},t}(),ph=function(){function t(){}return t.prototype.getTracer=function(e,n,r){return new Sa},t}(),fh=new ph,wa=function(){function t(){}return t.prototype.getTracer=function(e,n,r){var i;return(i=this.getDelegateTracer(e,n,r))!==null&&i!==void 0?i:new lh(this,e,n,r)},t.prototype.getDelegate=function(){var e;return(e=this._delegate)!==null&&e!==void 0?e:fh},t.prototype.setDelegate=function(e){this._delegate=e},t.prototype.getDelegateTracer=function(e,n,r){var i;return(i=this._delegate)===null||i===void 0?void 0:i.getTracer(e,n,r)},t}(),On;(function(t){t[t.NOT_RECORD=0]="NOT_RECORD",t[t.RECORD=1]="RECORD",t[t.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(On||(On={}));var je;(function(t){t[t.INTERNAL=0]="INTERNAL",t[t.SERVER=1]="SERVER",t[t.CLIENT=2]="CLIENT",t[t.PRODUCER=3]="PRODUCER",t[t.CONSUMER=4]="CONSUMER"})(je||(je={}));var Sn;(function(t){t[t.UNSET=0]="UNSET",t[t.OK=1]="OK",t[t.ERROR=2]="ERROR"})(Sn||(Sn={}));var C=bn.getInstance(),T=ft.instance(),hh=function(){function t(){}return t.prototype.getMeter=function(e,n,r){return _a},t}(),dh=new hh,Hr="metrics",vh=function(){function t(){}return t.getInstance=function(){return this._instance||(this._instance=new t),this._instance},t.prototype.setGlobalMeterProvider=function(e){return Pe(Hr,e,ft.instance())},t.prototype.getMeterProvider=function(){return kt(Hr)||dh},t.prototype.getMeter=function(e,n,r){return this.getMeterProvider().getMeter(e,n,r)},t.prototype.disable=function(){Ie(Hr,ft.instance())},t}(),se=vh.getInstance(),yh=function(){function t(){}return t.prototype.inject=function(e,n){},t.prototype.extract=function(e,n){return e},t.prototype.fields=function(){return[]},t}(),Gr=ke("OpenTelemetry Baggage Key");function Aa(t){return t.getValue(Gr)||void 0}function mh(){return Aa(bn.getInstance().active())}function _h(t,e){return t.setValue(Gr,e)}function gh(t){return t.deleteValue(Gr)}var qr="propagation",Eh=new yh,Th=function(){function t(){this.createBaggage=Cf,this.getBaggage=Aa,this.getActiveBaggage=mh,this.setBaggage=_h,this.deleteBaggage=gh}return t.getInstance=function(){return this._instance||(this._instance=new t),this._instance},t.prototype.setGlobalPropagator=function(e){return Pe(qr,e,ft.instance())},t.prototype.inject=function(e,n,r){return r===void 0&&(r=Kf),this._getGlobalPropagator().inject(e,n,r)},t.prototype.extract=function(e,n,r){return r===void 0&&(r=Xf),this._getGlobalPropagator().extract(e,n,r)},t.prototype.fields=function(){return this._getGlobalPropagator().fields()},t.prototype.disable=function(){Ie(qr,ft.instance())},t.prototype._getGlobalPropagator=function(){return kt(qr)||Eh},t}(),Q=Th.getInstance(),zr="trace",bh=function(){function t(){this._proxyTracerProvider=new wa,this.wrapSpanContext=sh,this.isSpanContextValid=Ue,this.deleteSpan=nh,this.getSpan=$r,this.getActiveSpan=eh,this.getSpanContext=ba,this.setSpan=Fr,this.setSpanContext=rh}return t.getInstance=function(){return this._instance||(this._instance=new t),this._instance},t.prototype.setGlobalTracerProvider=function(e){var n=Pe(zr,this._proxyTracerProvider,ft.instance());return n&&this._proxyTracerProvider.setDelegate(e),n},t.prototype.getTracerProvider=function(){return kt(zr)||this._proxyTracerProvider},t.prototype.getTracer=function(e,n){return this.getTracerProvider().getTracer(e,n)},t.prototype.disable=function(){Ie(zr,ft.instance()),this._proxyTracerProvider=new wa},t}(),P=bh.getInstance(),Oh=ke("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function La(t){return t.getValue(Oh)===!0}var Sh="=",Xr=";",Kr=",",Wr="baggage",wh=180,Ah=4096,Lh=8192,Rh=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o};function Ch(t){return t.reduce(function(e,n){var r=""+e+(e!==""?Kr:"")+n;return r.length>Lh?e:r},"")}function Nh(t){return t.getAllEntries().map(function(e){var n=Rh(e,2),r=n[0],i=n[1],o=encodeURIComponent(r)+"="+encodeURIComponent(i.value);return i.metadata!==void 0&&(o+=Xr+i.metadata.toString()),o})}function xh(t){var e=t.split(Xr);if(!(e.length<=0)){var n=e.shift();if(n){var r=n.indexOf(Sh);if(!(r<=0)){var i=decodeURIComponent(n.substring(0,r).trim()),o=decodeURIComponent(n.substring(r+1).trim()),a;return e.length>0&&(a=ma(e.join(Xr))),{key:i,value:o,metadata:a}}}}}var Ph=function(){function t(){}return t.prototype.inject=function(e,n,r){var i=Q.getBaggage(e);if(!(!i||La(e))){var o=Nh(i).filter(function(u){return u.length<=Ah}).slice(0,wh),a=Ch(o);a.length>0&&r.set(n,Wr,a)}},t.prototype.extract=function(e,n,r){var i=r.get(n,Wr),o=Array.isArray(i)?i.join(Kr):i;if(!o)return e;var a={};if(o.length===0)return e;var u=o.split(Kr);return u.forEach(function(c){var s=xh(c);if(s){var l={value:s.value};s.metadata&&(l.metadata=s.metadata),a[s.key]=l}}),Object.entries(a).length===0?e:Q.setBaggage(e,Q.createBaggage(a))},t.prototype.fields=function(){return[Wr]},t}(),Yr;(function(t){t.AlwaysOff="always_off",t.AlwaysOn="always_on",t.ParentBasedAlwaysOff="parentbased_always_off",t.ParentBasedAlwaysOn="parentbased_always_on",t.ParentBasedTraceIdRatio="parentbased_traceidratio",t.TraceIdRatio="traceidratio"})(Yr||(Yr={}));var Ih=",",Mh=["OTEL_SDK_DISABLED"];function kh(t){return Mh.indexOf(t)>-1}var Dh=["OTEL_BSP_EXPORT_TIMEOUT","OTEL_BSP_MAX_EXPORT_BATCH_SIZE","OTEL_BSP_MAX_QUEUE_SIZE","OTEL_BSP_SCHEDULE_DELAY","OTEL_BLRP_EXPORT_TIMEOUT","OTEL_BLRP_MAX_EXPORT_BATCH_SIZE","OTEL_BLRP_MAX_QUEUE_SIZE","OTEL_BLRP_SCHEDULE_DELAY","OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_ATTRIBUTE_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT","OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT","OTEL_SPAN_EVENT_COUNT_LIMIT","OTEL_SPAN_LINK_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT","OTEL_EXPORTER_OTLP_TIMEOUT","OTEL_EXPORTER_OTLP_TRACES_TIMEOUT","OTEL_EXPORTER_OTLP_METRICS_TIMEOUT","OTEL_EXPORTER_OTLP_LOGS_TIMEOUT","OTEL_EXPORTER_JAEGER_AGENT_PORT"];function Uh(t){return Dh.indexOf(t)>-1}var jh=["OTEL_NO_PATCH_MODULES","OTEL_PROPAGATORS","OTEL_SEMCONV_STABILITY_OPT_IN"];function Bh(t){return jh.indexOf(t)>-1}var Jr=1/0,Qr=128,$h=128,Fh=128,Ra={OTEL_SDK_DISABLED:!1,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_BLRP_EXPORT_TIMEOUT:3e4,OTEL_BLRP_MAX_EXPORT_BATCH_SIZE:512,OTEL_BLRP_MAX_QUEUE_SIZE:2048,OTEL_BLRP_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_LOGS_ENDPOINT:"",OTEL_EXPORTER_OTLP_HEADERS:"",OTEL_EXPORTER_OTLP_TRACES_HEADERS:"",OTEL_EXPORTER_OTLP_METRICS_HEADERS:"",OTEL_EXPORTER_OTLP_LOGS_HEADERS:"",OTEL_EXPORTER_OTLP_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_TRACES_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_METRICS_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_LOGS_TIMEOUT:1e4,OTEL_EXPORTER_ZIPKIN_ENDPOINT:"http://localhost:9411/api/v2/spans",OTEL_LOG_LEVEL:k.INFO,OTEL_NO_PATCH_MODULES:[],OTEL_PROPAGATORS:["tracecontext","baggage"],OTEL_RESOURCE_ATTRIBUTES:"",OTEL_SERVICE_NAME:"",OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT:Jr,OTEL_ATTRIBUTE_COUNT_LIMIT:Qr,OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT:Jr,OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT:Qr,OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT:Jr,OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT:Qr,OTEL_SPAN_EVENT_COUNT_LIMIT:128,OTEL_SPAN_LINK_COUNT_LIMIT:128,OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT:$h,OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT:Fh,OTEL_TRACES_EXPORTER:"",OTEL_TRACES_SAMPLER:Yr.ParentBasedAlwaysOn,OTEL_TRACES_SAMPLER_ARG:"",OTEL_LOGS_EXPORTER:"",OTEL_EXPORTER_OTLP_INSECURE:"",OTEL_EXPORTER_OTLP_TRACES_INSECURE:"",OTEL_EXPORTER_OTLP_METRICS_INSECURE:"",OTEL_EXPORTER_OTLP_LOGS_INSECURE:"",OTEL_EXPORTER_OTLP_CERTIFICATE:"",OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE:"",OTEL_EXPORTER_OTLP_METRICS_CERTIFICATE:"",OTEL_EXPORTER_OTLP_LOGS_CERTIFICATE:"",OTEL_EXPORTER_OTLP_COMPRESSION:"",OTEL_EXPORTER_OTLP_TRACES_COMPRESSION:"",OTEL_EXPORTER_OTLP_METRICS_COMPRESSION:"",OTEL_EXPORTER_OTLP_LOGS_COMPRESSION:"",OTEL_EXPORTER_OTLP_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_TRACES_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_METRICS_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_LOGS_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_TRACES_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_METRICS_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_LOGS_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_TRACES_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_METRICS_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_LOGS_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE:"cumulative",OTEL_SEMCONV_STABILITY_OPT_IN:[]};function Vh(t,e,n){if(typeof n[t]<"u"){var r=String(n[t]);e[t]=r.toLowerCase()==="true"}}function Hh(t,e,n,r,i){if(r===void 0&&(r=-1/0),i===void 0&&(i=1/0),typeof n[t]<"u"){var o=Number(n[t]);isNaN(o)||(o<r?e[t]=r:o>i?e[t]=i:e[t]=o)}}function Gh(t,e,n,r){r===void 0&&(r=Ih);var i=n[t];typeof i=="string"&&(e[t]=i.split(r).map(function(o){return o.trim()}))}var qh={ALL:k.ALL,VERBOSE:k.VERBOSE,DEBUG:k.DEBUG,INFO:k.INFO,WARN:k.WARN,ERROR:k.ERROR,NONE:k.NONE};function zh(t,e,n){var r=n[t];if(typeof r=="string"){var i=qh[r.toUpperCase()];i!=null&&(e[t]=i)}}function Xh(t){var e={};for(var n in Ra){var r=n;switch(r){case"OTEL_LOG_LEVEL":zh(r,e,t);break;default:if(kh(r))Vh(r,e,t);else if(Uh(r))Hh(r,e,t);else if(Bh(r))Gh(r,e,t);else{var i=t[r];typeof i<"u"&&i!==null&&(e[r]=String(i))}}}return e}var Kh=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{};function Wh(){var t=Xh(Kh);return Object.assign({},Ra,t)}var Zr=performance,Yh=9,Jh=6,Qh=Math.pow(10,Jh),Ca=Math.pow(10,Yh);function Na(t){var e=t/1e3,n=Math.trunc(e),r=Math.round(t%1e3*Qh);return[n,r]}function Zh(){var t=Zr.timeOrigin;if(typeof t!="number"){var e=Zr;t=e.timing&&e.timing.fetchStart}return t}function td(t){var e=Na(Zh()),n=Na(Zr.now());return ed(e,n)}function ed(t,e){var n=[t[0]+e[0],t[1]+e[1]];return n[1]>=Ca&&(n[1]-=Ca,n[0]+=1),n}var Z;(function(t){t[t.SUCCESS=0]="SUCCESS",t[t.FAILED=1]="FAILED"})(Z||(Z={}));var nd=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},rd=function(){function t(e){e===void 0&&(e={});var n;this._propagators=(n=e.propagators)!==null&&n!==void 0?n:[],this._fields=Array.from(new Set(this._propagators.map(function(r){return typeof r.fields=="function"?r.fields():[]}).reduce(function(r,i){return r.concat(i)},[])))}return t.prototype.inject=function(e,n,r){var i,o;try{for(var a=nd(this._propagators),u=a.next();!u.done;u=a.next()){var c=u.value;try{c.inject(e,n,r)}catch(s){T.warn("Failed to inject with "+c.constructor.name+". Err: "+s.message)}}}catch(s){i={error:s}}finally{try{u&&!u.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}},t.prototype.extract=function(e,n,r){return this._propagators.reduce(function(i,o){try{return o.extract(i,n,r)}catch(a){T.warn("Failed to extract with "+o.constructor.name+". Err: "+a.message)}return i},e)},t.prototype.fields=function(){return this._fields.slice()},t}(),ti="[_0-9a-z-*/]",id="[a-z]"+ti+"{0,255}",od="[a-z0-9]"+ti+"{0,240}@[a-z]"+ti+"{0,13}",ad=new RegExp("^(?:"+id+"|"+od+")$"),sd=/^[ -~]{0,255}[!-~]$/,ud=/,|=/;function cd(t){return ad.test(t)}function ld(t){return sd.test(t)&&!ud.test(t)}var xa=32,pd=512,Pa=",",Ia="=",fd=function(){function t(e){this._internalState=new Map,e&&this._parse(e)}return t.prototype.set=function(e,n){var r=this._clone();return r._internalState.has(e)&&r._internalState.delete(e),r._internalState.set(e,n),r},t.prototype.unset=function(e){var n=this._clone();return n._internalState.delete(e),n},t.prototype.get=function(e){return this._internalState.get(e)},t.prototype.serialize=function(){var e=this;return this._keys().reduce(function(n,r){return n.push(r+Ia+e.get(r)),n},[]).join(Pa)},t.prototype._parse=function(e){e.length>pd||(this._internalState=e.split(Pa).reverse().reduce(function(n,r){var i=r.trim(),o=i.indexOf(Ia);if(o!==-1){var a=i.slice(0,o),u=i.slice(o+1,r.length);cd(a)&&ld(u)&&n.set(a,u)}return n},new Map),this._internalState.size>xa&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,xa))))},t.prototype._keys=function(){return Array.from(this._internalState.keys()).reverse()},t.prototype._clone=function(){var e=new t;return e._internalState=new Map(this._internalState),e},t}(),ei="traceparent",ni="tracestate",hd="00",dd="(?!ff)[\\da-f]{2}",vd="(?![0]{32})[\\da-f]{32}",yd="(?![0]{16})[\\da-f]{16}",md="[\\da-f]{2}",_d=new RegExp("^\\s?("+dd+")-("+vd+")-("+yd+")-("+md+")(-.*)?\\s?$");function gd(t){var e=_d.exec(t);return!e||e[1]==="00"&&e[5]?null:{traceId:e[2],spanId:e[3],traceFlags:parseInt(e[4],16)}}var Ed=function(){function t(){}return t.prototype.inject=function(e,n,r){var i=P.getSpanContext(e);if(!(!i||La(e)||!Ue(i))){var o=hd+"-"+i.traceId+"-"+i.spanId+"-0"+Number(i.traceFlags||ht.NONE).toString(16);r.set(n,ei,o),i.traceState&&r.set(n,ni,i.traceState.serialize())}},t.prototype.extract=function(e,n,r){var i=r.get(n,ei);if(!i)return e;var o=Array.isArray(i)?i[0]:i;if(typeof o!="string")return e;var a=gd(o);if(!a)return e;a.isRemote=!0;var u=r.get(n,ni);if(u){var c=Array.isArray(u)?u.join(","):u;a.traceState=new fd(typeof c=="string"?c:void 0)}return P.setSpanContext(e,a)},t.prototype.fields=function(){return[ei,ni]},t}(),Td="[object Object]",bd="[object Null]",Od="[object Undefined]",Sd=Function.prototype,Ma=Sd.toString,wd=Ma.call(Object),Ad=Ld(Object.getPrototypeOf,Object),ka=Object.prototype,Da=ka.hasOwnProperty,jt=Symbol?Symbol.toStringTag:void 0,Ua=ka.toString;function Ld(t,e){return function(n){return t(e(n))}}function ja(t){if(!Rd(t)||Cd(t)!==Td)return!1;var e=Ad(t);if(e===null)return!0;var n=Da.call(e,"constructor")&&e.constructor;return typeof n=="function"&&n instanceof n&&Ma.call(n)===wd}function Rd(t){return t!=null&&typeof t=="object"}function Cd(t){return t==null?t===void 0?Od:bd:jt&&jt in Object(t)?Nd(t):xd(t)}function Nd(t){var e=Da.call(t,jt),n=t[jt],r=!1;try{t[jt]=void 0,r=!0}catch{}var i=Ua.call(t);return r&&(e?t[jt]=n:delete t[jt]),i}function xd(t){return Ua.call(t)}var Pd=20;function Id(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n=t.shift(),r=new WeakMap;t.length>0;)n=Ba(n,t.shift(),0,r);return n}function ri(t){return wn(t)?t.slice():t}function Ba(t,e,n,r){n===void 0&&(n=0);var i;if(!(n>Pd)){if(n++,An(t)||An(e)||Fa(e))i=ri(e);else if(wn(t)){if(i=t.slice(),wn(e))for(var o=0,a=e.length;o<a;o++)i.push(ri(e[o]));else if(Be(e))for(var u=Object.keys(e),o=0,a=u.length;o<a;o++){var c=u[o];i[c]=ri(e[c])}}else if(Be(t))if(Be(e)){if(!Md(t,e))return e;i=Object.assign({},t);for(var u=Object.keys(e),o=0,a=u.length;o<a;o++){var c=u[o],s=e[c];if(An(s))typeof s>"u"?delete i[c]:i[c]=s;else{var l=i[c],p=s;if($a(t,c,r)||$a(e,c,r))delete i[c];else{if(Be(l)&&Be(p)){var f=r.get(l)||[],y=r.get(p)||[];f.push({obj:t,key:c}),y.push({obj:e,key:c}),r.set(l,f),r.set(p,y)}i[c]=Ba(i[c],s,n,r)}}}}else i=e;return i}}function $a(t,e,n){for(var r=n.get(t[e])||[],i=0,o=r.length;i<o;i++){var a=r[i];if(a.key===e&&a.obj===t)return!0}return!1}function wn(t){return Array.isArray(t)}function Fa(t){return typeof t=="function"}function Be(t){return!An(t)&&!wn(t)&&!Fa(t)&&typeof t=="object"}function An(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t>"u"||t instanceof Date||t instanceof RegExp||t===null}function Md(t,e){return!(!ja(t)||!ja(e))}var Va=function(){function t(){}return t.prototype.emit=function(e){},t}(),kd=new Va,Dd=function(){function t(){}return t.prototype.getLogger=function(e,n,r){return new Va},t}(),Ha=new Dd,Ud=function(){function t(e,n,r,i){this._provider=e,this.name=n,this.version=r,this.options=i}return t.prototype.emit=function(e){this._getLogger().emit(e)},t.prototype._getLogger=function(){if(this._delegate)return this._delegate;var e=this._provider.getDelegateLogger(this.name,this.version,this.options);return e?(this._delegate=e,this._delegate):kd},t}(),Ga=function(){function t(){}return t.prototype.getLogger=function(e,n,r){var i;return(i=this.getDelegateLogger(e,n,r))!==null&&i!==void 0?i:new Ud(this,e,n,r)},t.prototype.getDelegate=function(){var e;return(e=this._delegate)!==null&&e!==void 0?e:Ha},t.prototype.setDelegate=function(e){this._delegate=e},t.prototype.getDelegateLogger=function(e,n,r){var i;return(i=this._delegate)===null||i===void 0?void 0:i.getLogger(e,n,r)},t}(),jd=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{},Ln=Symbol.for("io.opentelemetry.js.api.logs"),$e=jd;function Bd(t,e,n){return function(r){return r===t?e:n}}var qa=1,$d=function(){function t(){this._proxyLoggerProvider=new Ga}return t.getInstance=function(){return this._instance||(this._instance=new t),this._instance},t.prototype.setGlobalLoggerProvider=function(e){return $e[Ln]?this.getLoggerProvider():($e[Ln]=Bd(qa,e,Ha),this._proxyLoggerProvider.setDelegate(e),e)},t.prototype.getLoggerProvider=function(){var e,n;return(n=(e=$e[Ln])===null||e===void 0?void 0:e.call($e,qa))!==null&&n!==void 0?n:this._proxyLoggerProvider},t.prototype.getLogger=function(e,n,r){return this.getLoggerProvider().getLogger(e,n,r)},t.prototype.disable=function(){delete $e[Ln],this._proxyLoggerProvider=new Ga},t}(),Fe=$d.getInstance();function Fd(t,e,n,r){for(var i=0,o=t.length;i<o;i++){var a=t[i];e&&a.setTracerProvider(e),n&&a.setMeterProvider(n),r&&a.setLoggerProvider&&a.setLoggerProvider(r),a.getConfig().enabled||a.enable()}}function Vd(t){t.forEach(function(e){return e.disable()})}function Hd(t){var e,n,r=t.tracerProvider||P.getTracerProvider(),i=t.meterProvider||se.getMeterProvider(),o=t.loggerProvider||Fe.getLoggerProvider(),a=(n=(e=t.instrumentations)===null||e===void 0?void 0:e.flat())!==null&&n!==void 0?n:[];return Fd(a,r,i,o),function(){Vd(a)}}function ii(t){return typeof t=="function"}var tt=console.error.bind(console);function Ve(t,e,n){var r=!!t[e]&&t.propertyIsEnumerable(e);Object.defineProperty(t,e,{configurable:!0,enumerable:r,writable:!0,value:n})}function He(t){t&&t.logger&&(ii(t.logger)?tt=t.logger:tt("new logger isn't a function, not replacing"))}function za(t,e,n){if(!t||!t[e]){tt("no original function "+e+" to wrap");return}if(!n){tt("no wrapper function"),tt(new Error().stack);return}if(!ii(t[e])||!ii(n)){tt("original object and wrapper must be functions");return}var r=t[e],i=n(r,e);return Ve(i,"__original",r),Ve(i,"__unwrap",function(){t[e]===i&&Ve(t,e,r)}),Ve(i,"__wrapped",!0),Ve(t,e,i),i}function Gd(t,e,n){if(t)Array.isArray(t)||(t=[t]);else{tt("must provide one or more modules to patch"),tt(new Error().stack);return}if(!(e&&Array.isArray(e))){tt("must provide one or more functions to wrap on modules");return}t.forEach(function(r){e.forEach(function(i){za(r,i,n)})})}function Xa(t,e){if(!t||!t[e]){tt("no function to unwrap."),tt(new Error().stack);return}if(!t[e].__unwrap)tt("no original to unwrap to -- has "+e+" already been unwrapped?");else return t[e].__unwrap()}function qd(t,e){if(t)Array.isArray(t)||(t=[t]);else{tt("must provide one or more modules to patch"),tt(new Error().stack);return}if(!(e&&Array.isArray(e))){tt("must provide one or more functions to unwrap on modules");return}t.forEach(function(n){e.forEach(function(r){Xa(n,r)})})}He.wrap=za,He.massWrap=Gd,He.unwrap=Xa,He.massUnwrap=qd;var X=He,oi=function(){return oi=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},oi.apply(this,arguments)},zd=function(){function t(e,n,r){this.instrumentationName=e,this.instrumentationVersion=n,this._config={},this._wrap=X.wrap,this._unwrap=X.unwrap,this._massWrap=X.massWrap,this._massUnwrap=X.massUnwrap,this.setConfig(r),this._diag=T.createComponentLogger({namespace:e}),this._tracer=P.getTracer(e,n),this._meter=se.getMeter(e,n),this._logger=Fe.getLogger(e,n),this._updateMetricInstruments()}return Object.defineProperty(t.prototype,"meter",{get:function(){return this._meter},enumerable:!1,configurable:!0}),t.prototype.setMeterProvider=function(e){this._meter=e.getMeter(this.instrumentationName,this.instrumentationVersion),this._updateMetricInstruments()},Object.defineProperty(t.prototype,"logger",{get:function(){return this._logger},enumerable:!1,configurable:!0}),t.prototype.setLoggerProvider=function(e){this._logger=e.getLogger(this.instrumentationName,this.instrumentationVersion)},t.prototype.getModuleDefinitions=function(){var e,n=(e=this.init())!==null&&e!==void 0?e:[];return Array.isArray(n)?n:[n]},t.prototype._updateMetricInstruments=function(){},t.prototype.getConfig=function(){return this._config},t.prototype.setConfig=function(e){this._config=oi({enabled:!0},e)},t.prototype.setTracerProvider=function(e){this._tracer=e.getTracer(this.instrumentationName,this.instrumentationVersion)},Object.defineProperty(t.prototype,"tracer",{get:function(){return this._tracer},enumerable:!1,configurable:!0}),t.prototype._runSpanCustomizationHook=function(e,n,r,i){if(e)try{e(r,i)}catch(o){this._diag.error("Error running span customization hook due to exception in handler",{triggerName:n},o)}},t}(),Xd=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Kd=function(t){Xd(e,t);function e(n,r,i){var o=t.call(this,n,r,i)||this;return o._config.enabled&&o.enable(),o}return e}(zd);function et(t){return typeof t=="function"&&typeof t.__original=="function"&&typeof t.__unwrap=="function"&&t.__wrapped===!0}var Rn=performance,Wd="traceparent",Ka=ke("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function Yd(t){return t.setValue(Ka,!0)}function ai(t){return t.getValue(Ka)===!0}var Jd="=",si=";",ui=",",ci="baggage",Qd=180,Zd=4096,tv=8192,ev=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o};function nv(t){return t.reduce(function(e,n){var r=""+e+(e!==""?ui:"")+n;return r.length>tv?e:r},"")}function rv(t){return t.getAllEntries().map(function(e){var n=ev(e,2),r=n[0],i=n[1],o=encodeURIComponent(r)+"="+encodeURIComponent(i.value);return i.metadata!==void 0&&(o+=si+i.metadata.toString()),o})}function iv(t){var e=t.split(si);if(!(e.length<=0)){var n=e.shift();if(n){var r=n.indexOf(Jd);if(!(r<=0)){var i=decodeURIComponent(n.substring(0,r).trim()),o=decodeURIComponent(n.substring(r+1).trim()),a;return e.length>0&&(a=ma(e.join(si))),{key:i,value:o,metadata:a}}}}}var ov=function(){function t(){}return t.prototype.inject=function(e,n,r){var i=Q.getBaggage(e);if(!(!i||ai(e))){var o=rv(i).filter(function(u){return u.length<=Zd}).slice(0,Qd),a=nv(o);a.length>0&&r.set(n,ci,a)}},t.prototype.extract=function(e,n,r){var i=r.get(n,ci),o=Array.isArray(i)?i.join(ui):i;if(!o)return e;var a={};if(o.length===0)return e;var u=o.split(ui);return u.forEach(function(c){var s=iv(c);if(s){var l={value:s.value};s.metadata&&(l.metadata=s.metadata),a[s.key]=l}}),Object.entries(a).length===0?e:Q.setBaggage(e,Q.createBaggage(a))},t.prototype.fields=function(){return[ci]},t}(),Wa=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},av=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o};function Cn(t){var e,n,r={};if(typeof t!="object"||t==null)return r;try{for(var i=Wa(Object.entries(t)),o=i.next();!o.done;o=i.next()){var a=av(o.value,2),u=a[0],c=a[1];if(!sv(u)){T.warn("Invalid attribute key: "+u);continue}if(!Ya(c)){T.warn("Invalid attribute value set for key: "+u);continue}Array.isArray(c)?r[u]=c.slice():r[u]=c}}catch(s){e={error:s}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return r}function sv(t){return typeof t=="string"&&t.length>0}function Ya(t){return t==null?!0:Array.isArray(t)?uv(t):Ja(t)}function uv(t){var e,n,r;try{for(var i=Wa(t),o=i.next();!o.done;o=i.next()){var a=o.value;if(a!=null){if(!r){if(Ja(a)){r=typeof a;continue}return!1}if(typeof a!==r)return!1}}}catch(u){e={error:u}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return!0}function Ja(t){switch(typeof t){case"number":case"boolean":case"string":return!0}return!1}function cv(){return function(t){T.error(lv(t))}}function lv(t){return typeof t=="string"?t:JSON.stringify(pv(t))}function pv(t){for(var e={},n=t;n!==null;)Object.getOwnPropertyNames(n).forEach(function(r){if(!e[r]){var i=n[r];i&&(e[r]=String(i))}}),n=Object.getPrototypeOf(n);return e}var fv=cv();function ue(t){try{fv(t)}catch{}}var dt;(function(t){t.AlwaysOff="always_off",t.AlwaysOn="always_on",t.ParentBasedAlwaysOff="parentbased_always_off",t.ParentBasedAlwaysOn="parentbased_always_on",t.ParentBasedTraceIdRatio="parentbased_traceidratio",t.TraceIdRatio="traceidratio"})(dt||(dt={}));var hv=",",dv=["OTEL_SDK_DISABLED"];function vv(t){return dv.indexOf(t)>-1}var yv=["OTEL_BSP_EXPORT_TIMEOUT","OTEL_BSP_MAX_EXPORT_BATCH_SIZE","OTEL_BSP_MAX_QUEUE_SIZE","OTEL_BSP_SCHEDULE_DELAY","OTEL_BLRP_EXPORT_TIMEOUT","OTEL_BLRP_MAX_EXPORT_BATCH_SIZE","OTEL_BLRP_MAX_QUEUE_SIZE","OTEL_BLRP_SCHEDULE_DELAY","OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_ATTRIBUTE_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT","OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT","OTEL_SPAN_EVENT_COUNT_LIMIT","OTEL_SPAN_LINK_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT","OTEL_EXPORTER_OTLP_TIMEOUT","OTEL_EXPORTER_OTLP_TRACES_TIMEOUT","OTEL_EXPORTER_OTLP_METRICS_TIMEOUT","OTEL_EXPORTER_OTLP_LOGS_TIMEOUT","OTEL_EXPORTER_JAEGER_AGENT_PORT"];function mv(t){return yv.indexOf(t)>-1}var _v=["OTEL_NO_PATCH_MODULES","OTEL_PROPAGATORS","OTEL_SEMCONV_STABILITY_OPT_IN"];function gv(t){return _v.indexOf(t)>-1}var Nn=1/0,xn=128,Ev=128,Tv=128,Qa={OTEL_SDK_DISABLED:!1,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_BLRP_EXPORT_TIMEOUT:3e4,OTEL_BLRP_MAX_EXPORT_BATCH_SIZE:512,OTEL_BLRP_MAX_QUEUE_SIZE:2048,OTEL_BLRP_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_LOGS_ENDPOINT:"",OTEL_EXPORTER_OTLP_HEADERS:"",OTEL_EXPORTER_OTLP_TRACES_HEADERS:"",OTEL_EXPORTER_OTLP_METRICS_HEADERS:"",OTEL_EXPORTER_OTLP_LOGS_HEADERS:"",OTEL_EXPORTER_OTLP_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_TRACES_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_METRICS_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_LOGS_TIMEOUT:1e4,OTEL_EXPORTER_ZIPKIN_ENDPOINT:"http://localhost:9411/api/v2/spans",OTEL_LOG_LEVEL:k.INFO,OTEL_NO_PATCH_MODULES:[],OTEL_PROPAGATORS:["tracecontext","baggage"],OTEL_RESOURCE_ATTRIBUTES:"",OTEL_SERVICE_NAME:"",OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT:Nn,OTEL_ATTRIBUTE_COUNT_LIMIT:xn,OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT:Nn,OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT:xn,OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT:Nn,OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT:xn,OTEL_SPAN_EVENT_COUNT_LIMIT:128,OTEL_SPAN_LINK_COUNT_LIMIT:128,OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT:Ev,OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT:Tv,OTEL_TRACES_EXPORTER:"",OTEL_TRACES_SAMPLER:dt.ParentBasedAlwaysOn,OTEL_TRACES_SAMPLER_ARG:"",OTEL_LOGS_EXPORTER:"",OTEL_EXPORTER_OTLP_INSECURE:"",OTEL_EXPORTER_OTLP_TRACES_INSECURE:"",OTEL_EXPORTER_OTLP_METRICS_INSECURE:"",OTEL_EXPORTER_OTLP_LOGS_INSECURE:"",OTEL_EXPORTER_OTLP_CERTIFICATE:"",OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE:"",OTEL_EXPORTER_OTLP_METRICS_CERTIFICATE:"",OTEL_EXPORTER_OTLP_LOGS_CERTIFICATE:"",OTEL_EXPORTER_OTLP_COMPRESSION:"",OTEL_EXPORTER_OTLP_TRACES_COMPRESSION:"",OTEL_EXPORTER_OTLP_METRICS_COMPRESSION:"",OTEL_EXPORTER_OTLP_LOGS_COMPRESSION:"",OTEL_EXPORTER_OTLP_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_TRACES_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_METRICS_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_LOGS_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_TRACES_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_METRICS_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_LOGS_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_TRACES_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_METRICS_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_LOGS_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE:"cumulative",OTEL_SEMCONV_STABILITY_OPT_IN:[]};function bv(t,e,n){if(typeof n[t]<"u"){var r=String(n[t]);e[t]=r.toLowerCase()==="true"}}function Ov(t,e,n,r,i){if(r===void 0&&(r=-1/0),i===void 0&&(i=1/0),typeof n[t]<"u"){var o=Number(n[t]);isNaN(o)||(o<r?e[t]=r:o>i?e[t]=i:e[t]=o)}}function Sv(t,e,n,r){r===void 0&&(r=hv);var i=n[t];typeof i=="string"&&(e[t]=i.split(r).map(function(o){return o.trim()}))}var wv={ALL:k.ALL,VERBOSE:k.VERBOSE,DEBUG:k.DEBUG,INFO:k.INFO,WARN:k.WARN,ERROR:k.ERROR,NONE:k.NONE};function Av(t,e,n){var r=n[t];if(typeof r=="string"){var i=wv[r.toUpperCase()];i!=null&&(e[t]=i)}}function Za(t){var e={};for(var n in Qa){var r=n;switch(r){case"OTEL_LOG_LEVEL":Av(r,e,t);break;default:if(vv(r))bv(r,e,t);else if(mv(r))Ov(r,e,t);else if(gv(r))Sv(r,e,t);else{var i=t[r];typeof i<"u"&&i!==null&&(e[r]=String(i))}}}return e}var ts=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{};function Ge(){var t=Za(ts);return Object.assign({},Qa,t)}function Lv(){return Za(ts)}var ce=performance,Rv="exception.type",Cv="exception.message",Nv="exception.stacktrace",xv="http.response_content_length",Pv="http.response_content_length_uncompressed",li=Rv,pi=Cv,Iv=Nv,Mv=xv,kv=Pv,Dv=9,Uv=6,jv=Math.pow(10,Uv),Pn=Math.pow(10,Dv);function wt(t){var e=t/1e3,n=Math.trunc(e),r=Math.round(t%1e3*jv);return[n,r]}function fi(){var t=ce.timeOrigin;if(typeof t!="number"){var e=ce;t=e.timing&&e.timing.fetchStart}return t}function es(t){var e=wt(fi()),n=wt(typeof t=="number"?t:ce.now());return rs(e,n)}function qe(t){if(hi(t))return t;if(typeof t=="number")return t<fi()?es(t):wt(t);if(t instanceof Date)return wt(t.getTime());throw TypeError("Invalid input type")}function Bv(t,e){var n=e[0]-t[0],r=e[1]-t[1];return r<0&&(n-=1,r+=Pn),[n,r]}function At(t){return t[0]*Pn+t[1]}function hi(t){return Array.isArray(t)&&t.length===2&&typeof t[0]=="number"&&typeof t[1]=="number"}function ns(t){return hi(t)||typeof t=="number"||t instanceof Date}function rs(t,e){var n=[t[0]+e[0],t[1]+e[1]];return n[1]>=Pn&&(n[1]-=Pn,n[0]+=1),n}var di;(function(t){t[t.SUCCESS=0]="SUCCESS",t[t.FAILED=1]="FAILED"})(di||(di={}));var $v=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Fv=function(){function t(e){e===void 0&&(e={});var n;this._propagators=(n=e.propagators)!==null&&n!==void 0?n:[],this._fields=Array.from(new Set(this._propagators.map(function(r){return typeof r.fields=="function"?r.fields():[]}).reduce(function(r,i){return r.concat(i)},[])))}return t.prototype.inject=function(e,n,r){var i,o;try{for(var a=$v(this._propagators),u=a.next();!u.done;u=a.next()){var c=u.value;try{c.inject(e,n,r)}catch(s){T.warn("Failed to inject with "+c.constructor.name+". Err: "+s.message)}}}catch(s){i={error:s}}finally{try{u&&!u.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}},t.prototype.extract=function(e,n,r){return this._propagators.reduce(function(i,o){try{return o.extract(i,n,r)}catch(a){T.warn("Failed to extract with "+o.constructor.name+". Err: "+a.message)}return i},e)},t.prototype.fields=function(){return this._fields.slice()},t}(),vi="[_0-9a-z-*/]",Vv="[a-z]"+vi+"{0,255}",Hv="[a-z0-9]"+vi+"{0,240}@[a-z]"+vi+"{0,13}",Gv=new RegExp("^(?:"+Vv+"|"+Hv+")$"),qv=/^[ -~]{0,255}[!-~]$/,zv=/,|=/;function Xv(t){return Gv.test(t)}function Kv(t){return qv.test(t)&&!zv.test(t)}var is=32,Wv=512,os=",",as="=",Yv=function(){function t(e){this._internalState=new Map,e&&this._parse(e)}return t.prototype.set=function(e,n){var r=this._clone();return r._internalState.has(e)&&r._internalState.delete(e),r._internalState.set(e,n),r},t.prototype.unset=function(e){var n=this._clone();return n._internalState.delete(e),n},t.prototype.get=function(e){return this._internalState.get(e)},t.prototype.serialize=function(){var e=this;return this._keys().reduce(function(n,r){return n.push(r+as+e.get(r)),n},[]).join(os)},t.prototype._parse=function(e){e.length>Wv||(this._internalState=e.split(os).reverse().reduce(function(n,r){var i=r.trim(),o=i.indexOf(as);if(o!==-1){var a=i.slice(0,o),u=i.slice(o+1,r.length);Xv(a)&&Kv(u)&&n.set(a,u)}return n},new Map),this._internalState.size>is&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,is))))},t.prototype._keys=function(){return Array.from(this._internalState.keys()).reverse()},t.prototype._clone=function(){var e=new t;return e._internalState=new Map(this._internalState),e},t}(),yi="traceparent",mi="tracestate",Jv="00",Qv="(?!ff)[\\da-f]{2}",Zv="(?![0]{32})[\\da-f]{32}",ty="(?![0]{16})[\\da-f]{16}",ey="[\\da-f]{2}",ny=new RegExp("^\\s?("+Qv+")-("+Zv+")-("+ty+")-("+ey+")(-.*)?\\s?$");function ry(t){var e=ny.exec(t);return!e||e[1]==="00"&&e[5]?null:{traceId:e[2],spanId:e[3],traceFlags:parseInt(e[4],16)}}var iy=function(){function t(){}return t.prototype.inject=function(e,n,r){var i=P.getSpanContext(e);if(!(!i||ai(e)||!Ue(i))){var o=Jv+"-"+i.traceId+"-"+i.spanId+"-0"+Number(i.traceFlags||ht.NONE).toString(16);r.set(n,yi,o),i.traceState&&r.set(n,mi,i.traceState.serialize())}},t.prototype.extract=function(e,n,r){var i=r.get(n,yi);if(!i)return e;var o=Array.isArray(i)?i[0]:i;if(typeof o!="string")return e;var a=ry(o);if(!a)return e;a.isRemote=!0;var u=r.get(n,mi);if(u){var c=Array.isArray(u)?u.join(","):u;a.traceState=new Yv(typeof c=="string"?c:void 0)}return P.setSpanContext(e,a)},t.prototype.fields=function(){return[yi,mi]},t}(),oy="[object Object]",ay="[object Null]",sy="[object Undefined]",uy=Function.prototype,ss=uy.toString,cy=ss.call(Object),ly=py(Object.getPrototypeOf,Object),us=Object.prototype,cs=us.hasOwnProperty,Bt=Symbol?Symbol.toStringTag:void 0,ls=us.toString;function py(t,e){return function(n){return t(e(n))}}function ps(t){if(!fy(t)||hy(t)!==oy)return!1;var e=ly(t);if(e===null)return!0;var n=cs.call(e,"constructor")&&e.constructor;return typeof n=="function"&&n instanceof n&&ss.call(n)===cy}function fy(t){return t!=null&&typeof t=="object"}function hy(t){return t==null?t===void 0?sy:ay:Bt&&Bt in Object(t)?dy(t):vy(t)}function dy(t){var e=cs.call(t,Bt),n=t[Bt],r=!1;try{t[Bt]=void 0,r=!0}catch{}var i=ls.call(t);return r&&(e?t[Bt]=n:delete t[Bt]),i}function vy(t){return ls.call(t)}var yy=20;function my(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n=t.shift(),r=new WeakMap;t.length>0;)n=fs(n,t.shift(),0,r);return n}function _i(t){return In(t)?t.slice():t}function fs(t,e,n,r){n===void 0&&(n=0);var i;if(!(n>yy)){if(n++,Mn(t)||Mn(e)||ds(e))i=_i(e);else if(In(t)){if(i=t.slice(),In(e))for(var o=0,a=e.length;o<a;o++)i.push(_i(e[o]));else if(ze(e))for(var u=Object.keys(e),o=0,a=u.length;o<a;o++){var c=u[o];i[c]=_i(e[c])}}else if(ze(t))if(ze(e)){if(!_y(t,e))return e;i=Object.assign({},t);for(var u=Object.keys(e),o=0,a=u.length;o<a;o++){var c=u[o],s=e[c];if(Mn(s))typeof s>"u"?delete i[c]:i[c]=s;else{var l=i[c],p=s;if(hs(t,c,r)||hs(e,c,r))delete i[c];else{if(ze(l)&&ze(p)){var f=r.get(l)||[],y=r.get(p)||[];f.push({obj:t,key:c}),y.push({obj:e,key:c}),r.set(l,f),r.set(p,y)}i[c]=fs(i[c],s,n,r)}}}}else i=e;return i}}function hs(t,e,n){for(var r=n.get(t[e])||[],i=0,o=r.length;i<o;i++){var a=r[i];if(a.key===e&&a.obj===t)return!0}return!1}function In(t){return Array.isArray(t)}function ds(t){return typeof t=="function"}function ze(t){return!Mn(t)&&!In(t)&&!ds(t)&&typeof t=="object"}function Mn(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t>"u"||t instanceof Date||t instanceof RegExp||t===null}function _y(t,e){return!(!ps(t)||!ps(e))}function gy(t,e){return typeof e=="string"?t===e:!!t.match(e)}var Ey=function(){function t(){var e=this;this._promise=new Promise(function(n,r){e._resolve=n,e._reject=r})}return Object.defineProperty(t.prototype,"promise",{get:function(){return this._promise},enumerable:!1,configurable:!0}),t.prototype.resolve=function(e){this._resolve(e)},t.prototype.reject=function(e){this._reject(e)},t}(),Ty=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},by=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},Oy=function(){function t(e,n){this._callback=e,this._that=n,this._isCalled=!1,this._deferred=new Ey}return Object.defineProperty(t.prototype,"isCalled",{get:function(){return this._isCalled},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"promise",{get:function(){return this._deferred.promise},enumerable:!1,configurable:!0}),t.prototype.call=function(){for(var e,n=this,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];if(!this._isCalled){this._isCalled=!0;try{Promise.resolve((e=this._callback).call.apply(e,by([this._that],Ty(r),!1))).then(function(o){return n._deferred.resolve(o)},function(o){return n._deferred.reject(o)})}catch(o){this._deferred.reject(o)}}return this._deferred.promise},t}(),Sy="exception",gi=function(){return gi=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},gi.apply(this,arguments)},wy=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},vs=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},Ay=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},Ly=function(){function t(e,n,r,i,o,a,u,c,s,l){u===void 0&&(u=[]),this.attributes={},this.links=[],this.events=[],this._droppedAttributesCount=0,this._droppedEventsCount=0,this._droppedLinksCount=0,this.status={code:Sn.UNSET},this.endTime=[0,0],this._ended=!1,this._duration=[-1,-1],this.name=r,this._spanContext=i,this.parentSpanId=a,this.kind=o,this.links=u;var p=Date.now();this._performanceStartTime=ce.now(),this._performanceOffset=p-(this._performanceStartTime+fi()),this._startTimeProvided=c!=null,this.startTime=this._getTime(c??p),this.resource=e.resource,this.instrumentationLibrary=e.instrumentationLibrary,this._spanLimits=e.getSpanLimits(),this._attributeValueLengthLimit=this._spanLimits.attributeValueLengthLimit||0,l!=null&&this.setAttributes(l),this._spanProcessor=e.getActiveSpanProcessor(),this._spanProcessor.onStart(this,n)}return t.prototype.spanContext=function(){return this._spanContext},t.prototype.setAttribute=function(e,n){return n==null||this._isSpanEnded()?this:e.length===0?(T.warn("Invalid attribute key: "+e),this):Ya(n)?Object.keys(this.attributes).length>=this._spanLimits.attributeCountLimit&&!Object.prototype.hasOwnProperty.call(this.attributes,e)?(this._droppedAttributesCount++,this):(this.attributes[e]=this._truncateToSize(n),this):(T.warn("Invalid attribute value set for key: "+e),this)},t.prototype.setAttributes=function(e){var n,r;try{for(var i=wy(Object.entries(e)),o=i.next();!o.done;o=i.next()){var a=vs(o.value,2),u=a[0],c=a[1];this.setAttribute(u,c)}}catch(s){n={error:s}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return this},t.prototype.addEvent=function(e,n,r){if(this._isSpanEnded())return this;if(this._spanLimits.eventCountLimit===0)return T.warn("No events allowed."),this._droppedEventsCount++,this;this.events.length>=this._spanLimits.eventCountLimit&&(this._droppedEventsCount===0&&T.debug("Dropping extra events."),this.events.shift(),this._droppedEventsCount++),ns(n)&&(ns(r)||(r=n),n=void 0);var i=Cn(n);return this.events.push({name:e,attributes:i,time:this._getTime(r),droppedAttributesCount:0}),this},t.prototype.addLink=function(e){return this.links.push(e),this},t.prototype.addLinks=function(e){var n;return(n=this.links).push.apply(n,Ay([],vs(e),!1)),this},t.prototype.setStatus=function(e){return this._isSpanEnded()?this:(this.status=gi({},e),this.status.message!=null&&typeof e.message!="string"&&(T.warn("Dropping invalid status.message of type '"+typeof e.message+"', expected 'string'"),delete this.status.message),this)},t.prototype.updateName=function(e){return this._isSpanEnded()?this:(this.name=e,this)},t.prototype.end=function(e){if(this._isSpanEnded()){T.error(this.name+" "+this._spanContext.traceId+"-"+this._spanContext.spanId+" - You can only call end() on a span once.");return}this._ended=!0,this.endTime=this._getTime(e),this._duration=Bv(this.startTime,this.endTime),this._duration[0]<0&&(T.warn("Inconsistent start and end time, startTime > endTime. Setting span duration to 0ms.",this.startTime,this.endTime),this.endTime=this.startTime.slice(),this._duration=[0,0]),this._droppedEventsCount>0&&T.warn("Dropped "+this._droppedEventsCount+" events because eventCountLimit reached"),this._spanProcessor.onEnd(this)},t.prototype._getTime=function(e){if(typeof e=="number"&&e<=ce.now())return es(e+this._performanceOffset);if(typeof e=="number")return wt(e);if(e instanceof Date)return wt(e.getTime());if(hi(e))return e;if(this._startTimeProvided)return wt(Date.now());var n=ce.now()-this._performanceStartTime;return rs(this.startTime,wt(n))},t.prototype.isRecording=function(){return this._ended===!1},t.prototype.recordException=function(e,n){var r={};typeof e=="string"?r[pi]=e:e&&(e.code?r[li]=e.code.toString():e.name&&(r[li]=e.name),e.message&&(r[pi]=e.message),e.stack&&(r[Iv]=e.stack)),r[li]||r[pi]?this.addEvent(Sy,r,n):T.warn("Failed to record an exception "+e)},Object.defineProperty(t.prototype,"duration",{get:function(){return this._duration},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ended",{get:function(){return this._ended},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"droppedAttributesCount",{get:function(){return this._droppedAttributesCount},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"droppedEventsCount",{get:function(){return this._droppedEventsCount},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"droppedLinksCount",{get:function(){return this._droppedLinksCount},enumerable:!1,configurable:!0}),t.prototype._isSpanEnded=function(){return this._ended&&T.warn("Can not execute the operation on ended Span {traceId: "+this._spanContext.traceId+", spanId: "+this._spanContext.spanId+"}"),this._ended},t.prototype._truncateToLimitUtil=function(e,n){return e.length<=n?e:e.substring(0,n)},t.prototype._truncateToSize=function(e){var n=this,r=this._attributeValueLengthLimit;return r<=0?(T.warn("Attribute value limit must be positive, got "+r),e):typeof e=="string"?this._truncateToLimitUtil(e,r):Array.isArray(e)?e.map(function(i){return typeof i=="string"?n._truncateToLimitUtil(i,r):i}):e},t}(),le;(function(t){t[t.NOT_RECORD=0]="NOT_RECORD",t[t.RECORD=1]="RECORD",t[t.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(le||(le={}));var kn=function(){function t(){}return t.prototype.shouldSample=function(){return{decision:le.NOT_RECORD}},t.prototype.toString=function(){return"AlwaysOffSampler"},t}(),pe=function(){function t(){}return t.prototype.shouldSample=function(){return{decision:le.RECORD_AND_SAMPLED}},t.prototype.toString=function(){return"AlwaysOnSampler"},t}(),Ei=function(){function t(e){var n,r,i,o;this._root=e.root,this._root||(ue(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new pe),this._remoteParentSampled=(n=e.remoteParentSampled)!==null&&n!==void 0?n:new pe,this._remoteParentNotSampled=(r=e.remoteParentNotSampled)!==null&&r!==void 0?r:new kn,this._localParentSampled=(i=e.localParentSampled)!==null&&i!==void 0?i:new pe,this._localParentNotSampled=(o=e.localParentNotSampled)!==null&&o!==void 0?o:new kn}return t.prototype.shouldSample=function(e,n,r,i,o,a){var u=P.getSpanContext(e);return!u||!Ue(u)?this._root.shouldSample(e,n,r,i,o,a):u.isRemote?u.traceFlags&ht.SAMPLED?this._remoteParentSampled.shouldSample(e,n,r,i,o,a):this._remoteParentNotSampled.shouldSample(e,n,r,i,o,a):u.traceFlags&ht.SAMPLED?this._localParentSampled.shouldSample(e,n,r,i,o,a):this._localParentNotSampled.shouldSample(e,n,r,i,o,a)},t.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()+"}"},t}(),ys=function(){function t(e){e===void 0&&(e=0),this._ratio=e,this._ratio=this._normalize(e),this._upperBound=Math.floor(this._ratio*4294967295)}return t.prototype.shouldSample=function(e,n){return{decision:Oa(n)&&this._accumulate(n)<this._upperBound?le.RECORD_AND_SAMPLED:le.NOT_RECORD}},t.prototype.toString=function(){return"TraceIdRatioBased{"+this._ratio+"}"},t.prototype._normalize=function(e){return typeof e!="number"||isNaN(e)?0:e>=1?1:e<=0?0:e},t.prototype._accumulate=function(e){for(var n=0,r=0;r<e.length/8;r++){var i=r*8,o=parseInt(e.slice(i,i+8),16);n=(n^o)>>>0}return n},t}(),Ry=dt.AlwaysOn,fe=1;function ms(){var t=Ge();return{sampler:_s(t),forceFlushTimeoutMillis:3e4,generalLimits:{attributeValueLengthLimit:t.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:t.OTEL_ATTRIBUTE_COUNT_LIMIT},spanLimits:{attributeValueLengthLimit:t.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:t.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT,linkCountLimit:t.OTEL_SPAN_LINK_COUNT_LIMIT,eventCountLimit:t.OTEL_SPAN_EVENT_COUNT_LIMIT,attributePerEventCountLimit:t.OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT,attributePerLinkCountLimit:t.OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT},mergeResourceWithDefaults:!0}}function _s(t){switch(t===void 0&&(t=Ge()),t.OTEL_TRACES_SAMPLER){case dt.AlwaysOn:return new pe;case dt.AlwaysOff:return new kn;case dt.ParentBasedAlwaysOn:return new Ei({root:new pe});case dt.ParentBasedAlwaysOff:return new Ei({root:new kn});case dt.TraceIdRatio:return new ys(gs(t));case dt.ParentBasedTraceIdRatio:return new Ei({root:new ys(gs(t))});default:return T.error('OTEL_TRACES_SAMPLER value "'+t.OTEL_TRACES_SAMPLER+" invalid, defaulting to "+Ry+'".'),new pe}}function gs(t){if(t.OTEL_TRACES_SAMPLER_ARG===void 0||t.OTEL_TRACES_SAMPLER_ARG==="")return T.error("OTEL_TRACES_SAMPLER_ARG is blank, defaulting to "+fe+"."),fe;var e=Number(t.OTEL_TRACES_SAMPLER_ARG);return isNaN(e)?(T.error("OTEL_TRACES_SAMPLER_ARG="+t.OTEL_TRACES_SAMPLER_ARG+" was given, but it is invalid, defaulting to "+fe+"."),fe):e<0||e>1?(T.error("OTEL_TRACES_SAMPLER_ARG="+t.OTEL_TRACES_SAMPLER_ARG+" was given, but it is out of range ([0..1]), defaulting to "+fe+"."),fe):e}function Cy(t){var e={sampler:_s()},n=ms(),r=Object.assign({},n,e,t);return r.generalLimits=Object.assign({},n.generalLimits,t.generalLimits||{}),r.spanLimits=Object.assign({},n.spanLimits,t.spanLimits||{}),r}function Ny(t){var e,n,r,i,o,a,u,c,s,l,p,f,y=Object.assign({},t.spanLimits),v=Lv();return y.attributeCountLimit=(a=(o=(i=(n=(e=t.spanLimits)===null||e===void 0?void 0:e.attributeCountLimit)!==null&&n!==void 0?n:(r=t.generalLimits)===null||r===void 0?void 0:r.attributeCountLimit)!==null&&i!==void 0?i:v.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT)!==null&&o!==void 0?o:v.OTEL_ATTRIBUTE_COUNT_LIMIT)!==null&&a!==void 0?a:xn,y.attributeValueLengthLimit=(f=(p=(l=(c=(u=t.spanLimits)===null||u===void 0?void 0:u.attributeValueLengthLimit)!==null&&c!==void 0?c:(s=t.generalLimits)===null||s===void 0?void 0:s.attributeValueLengthLimit)!==null&&l!==void 0?l:v.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&p!==void 0?p:v.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&f!==void 0?f:Nn,Object.assign({},t,{spanLimits:y})}var xy=function(){function t(e,n){this._exporter=e,this._isExporting=!1,this._finishedSpans=[],this._droppedSpansCount=0;var r=Ge();this._maxExportBatchSize=typeof n?.maxExportBatchSize=="number"?n.maxExportBatchSize:r.OTEL_BSP_MAX_EXPORT_BATCH_SIZE,this._maxQueueSize=typeof n?.maxQueueSize=="number"?n.maxQueueSize:r.OTEL_BSP_MAX_QUEUE_SIZE,this._scheduledDelayMillis=typeof n?.scheduledDelayMillis=="number"?n.scheduledDelayMillis:r.OTEL_BSP_SCHEDULE_DELAY,this._exportTimeoutMillis=typeof n?.exportTimeoutMillis=="number"?n.exportTimeoutMillis:r.OTEL_BSP_EXPORT_TIMEOUT,this._shutdownOnce=new Oy(this._shutdown,this),this._maxExportBatchSize>this._maxQueueSize&&(T.warn("BatchSpanProcessor: maxExportBatchSize must be smaller or equal to maxQueueSize, setting maxExportBatchSize to match maxQueueSize"),this._maxExportBatchSize=this._maxQueueSize)}return t.prototype.forceFlush=function(){return this._shutdownOnce.isCalled?this._shutdownOnce.promise:this._flushAll()},t.prototype.onStart=function(e,n){},t.prototype.onEnd=function(e){this._shutdownOnce.isCalled||(e.spanContext().traceFlags&ht.SAMPLED)!==0&&this._addToBuffer(e)},t.prototype.shutdown=function(){return this._shutdownOnce.call()},t.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()})},t.prototype._addToBuffer=function(e){if(this._finishedSpans.length>=this._maxQueueSize){this._droppedSpansCount===0&&T.debug("maxQueueSize reached, dropping spans"),this._droppedSpansCount++;return}this._droppedSpansCount>0&&(T.warn("Dropped "+this._droppedSpansCount+" spans because maxQueueSize reached"),this._droppedSpansCount=0),this._finishedSpans.push(e),this._maybeStartTimer()},t.prototype._flushAll=function(){var e=this;return new Promise(function(n,r){for(var i=[],o=Math.ceil(e._finishedSpans.length/e._maxExportBatchSize),a=0,u=o;a<u;a++)i.push(e._flushOneBatch());Promise.all(i).then(function(){n()}).catch(r)})},t.prototype._flushOneBatch=function(){var e=this;return this._clearTimer(),this._finishedSpans.length===0?Promise.resolve():new Promise(function(n,r){var i=setTimeout(function(){r(new Error("Timeout"))},e._exportTimeoutMillis);C.with(Yd(C.active()),function(){var o;e._finishedSpans.length<=e._maxExportBatchSize?(o=e._finishedSpans,e._finishedSpans=[]):o=e._finishedSpans.splice(0,e._maxExportBatchSize);for(var a=function(){return e._exporter.export(o,function(p){var f;clearTimeout(i),p.code===di.SUCCESS?n():r((f=p.error)!==null&&f!==void 0?f:new Error("BatchSpanProcessor: span export failed"))})},u=null,c=0,s=o.length;c<s;c++){var l=o[c];l.resource.asyncAttributesPending&&l.resource.waitForAsyncAttributes&&(u!=null||(u=[]),u.push(l.resource.waitForAsyncAttributes()))}u===null?a():Promise.all(u).then(a,function(p){ue(p),r(p)})})})},t.prototype._maybeStartTimer=function(){var e=this;if(!this._isExporting){var n=function(){e._isExporting=!0,e._flushOneBatch().finally(function(){e._isExporting=!1,e._finishedSpans.length>0&&(e._clearTimer(),e._maybeStartTimer())}).catch(function(r){e._isExporting=!1,ue(r)})};if(this._finishedSpans.length>=this._maxExportBatchSize)return n();this._timer===void 0&&(this._timer=setTimeout(function(){return n()},this._scheduledDelayMillis))}},t.prototype._clearTimer=function(){this._timer!==void 0&&(clearTimeout(this._timer),this._timer=void 0)},t}(),Py=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Es=function(t){Py(e,t);function e(n,r){var i=t.call(this,n,r)||this;return i.onInit(r),i}return e.prototype.onInit=function(n){var r=this;n?.disableAutoFlushOnDocumentHide!==!0&&typeof document<"u"&&(this._visibilityChangeListener=function(){document.visibilityState==="hidden"&&r.forceFlush().catch(function(i){ue(i)})},this._pageHideListener=function(){r.forceFlush().catch(function(i){ue(i)})},document.addEventListener("visibilitychange",this._visibilityChangeListener),document.addEventListener("pagehide",this._pageHideListener))},e.prototype.onShutdown=function(){typeof document<"u"&&(this._visibilityChangeListener&&document.removeEventListener("visibilitychange",this._visibilityChangeListener),this._pageHideListener&&document.removeEventListener("pagehide",this._pageHideListener))},e}(xy),Iy=8,My=16,ky=function(){function t(){this.generateTraceId=Ts(My),this.generateSpanId=Ts(Iy)}return t}(),Dn=Array(32);function Ts(t){return function(){for(var e=0;e<t*2;e++)Dn[e]=Math.floor(Math.random()*16)+48,Dn[e]>=58&&(Dn[e]+=39);return String.fromCharCode.apply(null,Dn.slice(0,t*2))}}var Dy=function(){function t(e,n,r){this._tracerProvider=r;var i=Cy(n);this._sampler=i.sampler,this._generalLimits=i.generalLimits,this._spanLimits=i.spanLimits,this._idGenerator=n.idGenerator||new ky,this.resource=r.resource,this.instrumentationLibrary=e}return t.prototype.startSpan=function(e,n,r){var i,o,a;n===void 0&&(n={}),r===void 0&&(r=C.active()),n.root&&(r=P.deleteSpan(r));var u=P.getSpan(r);if(ai(r)){T.debug("Instrumentation suppressed, returning Noop Span");var c=P.wrapSpanContext(Ta);return c}var s=u?.spanContext(),l=this._idGenerator.generateSpanId(),p,f,y;!s||!P.isSpanContextValid(s)?p=this._idGenerator.generateTraceId():(p=s.traceId,f=s.traceState,y=s.spanId);var v=(i=n.kind)!==null&&i!==void 0?i:je.INTERNAL,m=((o=n.links)!==null&&o!==void 0?o:[]).map(function(F){return{context:F.context,attributes:Cn(F.attributes)}}),_=Cn(n.attributes),E=this._sampler.shouldSample(r,p,e,v,_,m);f=(a=E.traceState)!==null&&a!==void 0?a:f;var S=E.decision===On.RECORD_AND_SAMPLED?ht.SAMPLED:ht.NONE,I={traceId:p,spanId:l,traceFlags:S,traceState:f};if(E.decision===On.NOT_RECORD){T.debug("Recording is off, propagating context in a non-recording span");var c=P.wrapSpanContext(I);return c}var U=Cn(Object.assign(_,E.attributes)),z=new Ly(this,r,e,I,v,y,m,n.startTime,void 0,U);return z},t.prototype.startActiveSpan=function(e,n,r,i){var o,a,u;if(!(arguments.length<2)){arguments.length===2?u=n:arguments.length===3?(o=n,u=r):(o=n,a=r,u=i);var c=a??C.active(),s=this.startSpan(e,o,c),l=P.setSpan(c,s);return C.with(l,u,void 0,s)}},t.prototype.getGeneralLimits=function(){return this._generalLimits},t.prototype.getSpanLimits=function(){return this._spanLimits},t.prototype.getActiveSpanProcessor=function(){return this._tracerProvider.getActiveSpanProcessor()},t}(),Uy="process.runtime.name",jy="service.name",By="telemetry.sdk.name",$y="telemetry.sdk.language",Fy="telemetry.sdk.version",Vy=Uy,Hy=jy,Ti=By,bi=$y,Oi=Fy,Gy="webjs",qy=Gy,zy="1.30.1",he,Si=(he={},he[Ti]="opentelemetry",he[Vy]="browser",he[bi]=qy,he[Oi]=zy,he);function Xy(){return"unknown_service"}var Lt=function(){return Lt=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Lt.apply(this,arguments)},Ky=function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function u(l){try{s(r.next(l))}catch(p){a(p)}}function c(l){try{s(r.throw(l))}catch(p){a(p)}}function s(l){l.done?o(l.value):i(l.value).then(u,c)}s((r=r.apply(t,[])).next())})},Wy=function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(l){return c([s,l])}}function c(s){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,i=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){n.label=s[1];break}if(s[0]===6&&n.label<o[1]){n.label=o[1],o=s;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(s);break}o[2]&&n.ops.pop(),n.trys.pop();continue}s=e.call(t,n)}catch(l){s=[6,l],i=0}finally{r=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},Yy=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},Xe=function(){function t(e,n){var r=this,i;this._attributes=e,this.asyncAttributesPending=n!=null,this._syncAttributes=(i=this._attributes)!==null&&i!==void 0?i:{},this._asyncAttributesPromise=n?.then(function(o){return r._attributes=Object.assign({},r._attributes,o),r.asyncAttributesPending=!1,o},function(o){return T.debug("a resource's async attributes promise rejected: %s",o),r.asyncAttributesPending=!1,{}})}return t.empty=function(){return t.EMPTY},t.default=function(){var e;return new t((e={},e[Hy]=Xy(),e[bi]=Si[bi],e[Ti]=Si[Ti],e[Oi]=Si[Oi],e))},Object.defineProperty(t.prototype,"attributes",{get:function(){var e;return this.asyncAttributesPending&&T.error("Accessing resource attributes before async attributes settled"),(e=this._attributes)!==null&&e!==void 0?e:{}},enumerable:!1,configurable:!0}),t.prototype.waitForAsyncAttributes=function(){return Ky(this,void 0,void 0,function(){return Wy(this,function(e){switch(e.label){case 0:return this.asyncAttributesPending?[4,this._asyncAttributesPromise]:[3,2];case 1:e.sent(),e.label=2;case 2:return[2]}})})},t.prototype.merge=function(e){var n=this,r;if(!e)return this;var i=Lt(Lt({},this._syncAttributes),(r=e._syncAttributes)!==null&&r!==void 0?r:e.attributes);if(!this._asyncAttributesPromise&&!e._asyncAttributesPromise)return new t(i);var o=Promise.all([this._asyncAttributesPromise,e._asyncAttributesPromise]).then(function(a){var u,c=Yy(a,2),s=c[0],l=c[1];return Lt(Lt(Lt(Lt({},n._syncAttributes),s),(u=e._syncAttributes)!==null&&u!==void 0?u:e.attributes),l)});return new t(i,o)},t.EMPTY=new t({}),t}(),Un=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},bs=function(){function t(e){this._spanProcessors=e}return t.prototype.forceFlush=function(){var e,n,r=[];try{for(var i=Un(this._spanProcessors),o=i.next();!o.done;o=i.next()){var a=o.value;r.push(a.forceFlush())}}catch(u){e={error:u}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return new Promise(function(u){Promise.all(r).then(function(){u()}).catch(function(c){ue(c||new Error("MultiSpanProcessor: forceFlush failed")),u()})})},t.prototype.onStart=function(e,n){var r,i;try{for(var o=Un(this._spanProcessors),a=o.next();!a.done;a=o.next()){var u=a.value;u.onStart(e,n)}}catch(c){r={error:c}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}},t.prototype.onEnd=function(e){var n,r;try{for(var i=Un(this._spanProcessors),o=i.next();!o.done;o=i.next()){var a=o.value;a.onEnd(e)}}catch(u){n={error:u}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}},t.prototype.shutdown=function(){var e,n,r=[];try{for(var i=Un(this._spanProcessors),o=i.next();!o.done;o=i.next()){var a=o.value;r.push(a.shutdown())}}catch(u){e={error:u}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return new Promise(function(u,c){Promise.all(r).then(function(){u()},c)})},t}(),Jy=function(){function t(){}return t.prototype.onStart=function(e,n){},t.prototype.onEnd=function(e){},t.prototype.shutdown=function(){return Promise.resolve()},t.prototype.forceFlush=function(){return Promise.resolve()},t}(),Qy=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},Zy=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},$t;(function(t){t[t.resolved=0]="resolved",t[t.timeout=1]="timeout",t[t.error=2]="error",t[t.unresolved=3]="unresolved"})($t||($t={}));var tm=function(){function t(e){e===void 0&&(e={});var n,r;this._registeredSpanProcessors=[],this._tracers=new Map;var i=my({},ms(),Ny(e));if(this.resource=(n=i.resource)!==null&&n!==void 0?n:Xe.empty(),i.mergeResourceWithDefaults&&(this.resource=Xe.default().merge(this.resource)),this._config=Object.assign({},i,{resource:this.resource}),!((r=e.spanProcessors)===null||r===void 0)&&r.length)this._registeredSpanProcessors=Zy([],Qy(e.spanProcessors),!1),this.activeSpanProcessor=new bs(this._registeredSpanProcessors);else{var o=this._buildExporterFromEnv();if(o!==void 0){var a=new Es(o);this.activeSpanProcessor=a}else this.activeSpanProcessor=new Jy}}return t.prototype.getTracer=function(e,n,r){var i=e+"@"+(n||"")+":"+(r?.schemaUrl||"");return this._tracers.has(i)||this._tracers.set(i,new Dy({name:e,version:n,schemaUrl:r?.schemaUrl},this._config,this)),this._tracers.get(i)},t.prototype.addSpanProcessor=function(e){this._registeredSpanProcessors.length===0&&this.activeSpanProcessor.shutdown().catch(function(n){return T.error("Error while trying to shutdown current span processor",n)}),this._registeredSpanProcessors.push(e),this.activeSpanProcessor=new bs(this._registeredSpanProcessors)},t.prototype.getActiveSpanProcessor=function(){return this.activeSpanProcessor},t.prototype.register=function(e){e===void 0&&(e={}),P.setGlobalTracerProvider(this),e.propagator===void 0&&(e.propagator=this._buildPropagatorFromEnv()),e.contextManager&&C.setGlobalContextManager(e.contextManager),e.propagator&&Q.setGlobalPropagator(e.propagator)},t.prototype.forceFlush=function(){var e=this._config.forceFlushTimeoutMillis,n=this._registeredSpanProcessors.map(function(r){return new Promise(function(i){var o,a=setTimeout(function(){i(new Error("Span processor did not completed within timeout period of "+e+" ms")),o=$t.timeout},e);r.forceFlush().then(function(){clearTimeout(a),o!==$t.timeout&&(o=$t.resolved,i(o))}).catch(function(u){clearTimeout(a),o=$t.error,i(u)})})});return new Promise(function(r,i){Promise.all(n).then(function(o){var a=o.filter(function(u){return u!==$t.resolved});a.length>0?i(a):r()}).catch(function(o){return i([o])})})},t.prototype.shutdown=function(){return this.activeSpanProcessor.shutdown()},t.prototype._getPropagator=function(e){var n;return(n=this.constructor._registeredPropagators.get(e))===null||n===void 0?void 0:n()},t.prototype._getSpanExporter=function(e){var n;return(n=this.constructor._registeredExporters.get(e))===null||n===void 0?void 0:n()},t.prototype._buildPropagatorFromEnv=function(){var e=this,n=Array.from(new Set(Ge().OTEL_PROPAGATORS)),r=n.map(function(o){var a=e._getPropagator(o);return a||T.warn('Propagator "'+o+'" requested through environment variable is unavailable.'),a}),i=r.reduce(function(o,a){return a&&o.push(a),o},[]);if(i.length!==0)return n.length===1?i[0]:new Fv({propagators:i})},t.prototype._buildExporterFromEnv=function(){var e=Ge().OTEL_TRACES_EXPORTER;if(!(e==="none"||e==="")){var n=this._getSpanExporter(e);return n||T.error('Exporter "'+e+'" requested through environment variable is unavailable.'),n}},t._registeredPropagators=new Map([["tracecontext",function(){return new iy}],["baggage",function(){return new ov}]]),t._registeredExporters=new Map,t}(),em=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},nm=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},Os=function(){function t(){this._enabled=!1,this._currentContext=Dt}return t.prototype._bindFunction=function(e,n){e===void 0&&(e=Dt);var r=this,i=function(){for(var o=this,a=[],u=0;u<arguments.length;u++)a[u]=arguments[u];return r.with(e,function(){return n.apply(o,a)})};return Object.defineProperty(i,"length",{enumerable:!1,configurable:!0,writable:!1,value:n.length}),i},t.prototype.active=function(){return this._currentContext},t.prototype.bind=function(e,n){return e===void 0&&(e=this.active()),typeof n=="function"?this._bindFunction(e,n):n},t.prototype.disable=function(){return this._currentContext=Dt,this._enabled=!1,this},t.prototype.enable=function(){return this._enabled?this:(this._enabled=!0,this._currentContext=Dt,this)},t.prototype.with=function(e,n,r){for(var i=[],o=3;o<arguments.length;o++)i[o-3]=arguments[o];var a=this._currentContext;this._currentContext=e||Dt;try{return n.call.apply(n,nm([r],em(i),!1))}finally{this._currentContext=a}},t}(),rm=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),im=function(t){rm(e,t);function e(n){n===void 0&&(n={});var r=t.call(this,n)||this;if(n.contextManager)throw"contextManager should be defined in register method not in constructor";if(n.propagator)throw"propagator should be defined in register method not in constructor";return r}return e.prototype.register=function(n){n===void 0&&(n={}),n.contextManager===void 0&&(n.contextManager=new Os),n.contextManager&&n.contextManager.enable(),t.prototype.register.call(this,n)},e}(tm),w;(function(t){t.CONNECT_END="connectEnd",t.CONNECT_START="connectStart",t.DECODED_BODY_SIZE="decodedBodySize",t.DOM_COMPLETE="domComplete",t.DOM_CONTENT_LOADED_EVENT_END="domContentLoadedEventEnd",t.DOM_CONTENT_LOADED_EVENT_START="domContentLoadedEventStart",t.DOM_INTERACTIVE="domInteractive",t.DOMAIN_LOOKUP_END="domainLookupEnd",t.DOMAIN_LOOKUP_START="domainLookupStart",t.ENCODED_BODY_SIZE="encodedBodySize",t.FETCH_START="fetchStart",t.LOAD_EVENT_END="loadEventEnd",t.LOAD_EVENT_START="loadEventStart",t.NAVIGATION_START="navigationStart",t.REDIRECT_END="redirectEnd",t.REDIRECT_START="redirectStart",t.REQUEST_START="requestStart",t.RESPONSE_END="responseEnd",t.RESPONSE_START="responseStart",t.SECURE_CONNECTION_START="secureConnectionStart",t.UNLOAD_EVENT_END="unloadEventEnd",t.UNLOAD_EVENT_START="unloadEventStart"})(w||(w={}));var wi;function om(){return wi||(wi=document.createElement("a")),wi}function Rt(t,e){return e in t}function q(t,e,n,r){var i=void 0,o=void 0;Rt(n,e)&&typeof n[e]=="number"&&(i=n[e]);var a=w.FETCH_START;if(Rt(n,a)&&typeof n[a]=="number"&&(o=n[a]),i!==void 0&&o!==void 0&&i>=o)return t.addEvent(e,i),t}function de(t,e,n){n===void 0&&(n=!1),n||(q(t,w.FETCH_START,e),q(t,w.DOMAIN_LOOKUP_START,e),q(t,w.DOMAIN_LOOKUP_END,e),q(t,w.CONNECT_START,e),Rt(e,"name")&&e.name.startsWith("https:")&&q(t,w.SECURE_CONNECTION_START,e),q(t,w.CONNECT_END,e),q(t,w.REQUEST_START,e),q(t,w.RESPONSE_START,e),q(t,w.RESPONSE_END,e));var r=e[w.ENCODED_BODY_SIZE];r!==void 0&&t.setAttribute(Mv,r);var i=e[w.DECODED_BODY_SIZE];i!==void 0&&r!==i&&t.setAttribute(kv,i)}function am(t){return t.slice().sort(function(e,n){var r=e[w.FETCH_START],i=n[w.FETCH_START];return r>i?1:r<i?-1:0})}function Ss(){return typeof location<"u"?location.origin:void 0}function ws(t,e,n,r,i,o){i===void 0&&(i=new WeakSet);var a=_t(t);t=a.toString();var u=um(t,e,n,r,i,o);if(u.length===0)return{mainRequest:void 0};if(u.length===1)return{mainRequest:u[0]};var c=am(u);if(a.origin!==Ss()&&c.length>1){var s=c[0],l=sm(c,s[w.RESPONSE_END],n),p=s[w.RESPONSE_END],f=l[w.FETCH_START];return f<p&&(l=s,s=void 0),{corsPreFlightRequest:s,mainRequest:l}}else return{mainRequest:u[0]}}function sm(t,e,n){for(var r=At(n),i=At(qe(e)),o=t[1],a,u=t.length,c=1;c<u;c++){var s=t[c],l=At(qe(s[w.FETCH_START])),p=At(qe(s[w.RESPONSE_END])),f=r-p;l>=i&&(!a||f<a)&&(a=f,o=s)}return o}function um(t,e,n,r,i,o){var a=At(e),u=At(n),c=r.filter(function(s){var l=At(qe(s[w.FETCH_START])),p=At(qe(s[w.RESPONSE_END]));return s.initiatorType.toLowerCase()===(o||"xmlhttprequest")&&s.name===t&&l>=a&&p<=u});return c.length>0&&(c=c.filter(function(s){return!i.has(s)})),c}function _t(t){if(typeof URL=="function")return new URL(t,typeof document<"u"?document.baseURI:typeof location<"u"?location.href:void 0);var e=om();return e.href=t,e}function As(t,e){if(t.nodeType===Node.DOCUMENT_NODE)return"/";var n=lm(t,e);if(e&&n.indexOf("@id")>0)return n;var r="";return t.parentNode&&(r+=As(t.parentNode,!1)),r+=n,r}function cm(t){if(!t.parentNode)return 0;var e=[t.nodeType];t.nodeType===Node.CDATA_SECTION_NODE&&e.push(Node.TEXT_NODE);var n=Array.from(t.parentNode.childNodes);return n=n.filter(function(r){var i=r.localName;return e.indexOf(r.nodeType)>=0&&i===t.localName}),n.length>=1?n.indexOf(t)+1:0}function lm(t,e){var n=t.nodeType,r=cm(t),i="";if(n===Node.ELEMENT_NODE){var o=t.getAttribute("id");if(e&&o)return'//*[@id="'+o+'"]';i=t.localName}else if(n===Node.TEXT_NODE||n===Node.CDATA_SECTION_NODE)i="text()";else if(n===Node.COMMENT_NODE)i="comment()";else return"";return i&&r>1?"/"+i+"["+r+"]":"/"+i}function Ls(t,e){var n=e||[];(typeof n=="string"||n instanceof RegExp)&&(n=[n]);var r=_t(t);return r.origin===Ss()?!0:n.some(function(i){return gy(t,i)})}var Ai=function(){return Ai=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Ai.apply(this,arguments)},pm=function(){function t(e,n,r){this.instrumentationName=e,this.instrumentationVersion=n,this._config={},this._wrap=X.wrap,this._unwrap=X.unwrap,this._massWrap=X.massWrap,this._massUnwrap=X.massUnwrap,this.setConfig(r),this._diag=T.createComponentLogger({namespace:e}),this._tracer=P.getTracer(e,n),this._meter=se.getMeter(e,n),this._logger=Fe.getLogger(e,n),this._updateMetricInstruments()}return Object.defineProperty(t.prototype,"meter",{get:function(){return this._meter},enumerable:!1,configurable:!0}),t.prototype.setMeterProvider=function(e){this._meter=e.getMeter(this.instrumentationName,this.instrumentationVersion),this._updateMetricInstruments()},Object.defineProperty(t.prototype,"logger",{get:function(){return this._logger},enumerable:!1,configurable:!0}),t.prototype.setLoggerProvider=function(e){this._logger=e.getLogger(this.instrumentationName,this.instrumentationVersion)},t.prototype.getModuleDefinitions=function(){var e,n=(e=this.init())!==null&&e!==void 0?e:[];return Array.isArray(n)?n:[n]},t.prototype._updateMetricInstruments=function(){},t.prototype.getConfig=function(){return this._config},t.prototype.setConfig=function(e){this._config=Ai({enabled:!0},e)},t.prototype.setTracerProvider=function(e){this._tracer=e.getTracer(this.instrumentationName,this.instrumentationVersion)},Object.defineProperty(t.prototype,"tracer",{get:function(){return this._tracer},enumerable:!1,configurable:!0}),t.prototype._runSpanCustomizationHook=function(e,n,r,i){if(e)try{e(r,i)}catch(o){this._diag.error("Error running span customization hook due to exception in handler",{triggerName:n},o)}},t}(),fm=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),hm=function(t){fm(e,t);function e(n,r,i){var o=t.call(this,n,r,i)||this;return o._config.enabled&&o.enable(),o}return e}(pm);function Rs(t,e,n){var r,i;try{i=t()}catch(o){r=o}finally{return e(r,i),i}}var Ke;(function(t){t.DOCUMENT_LOAD="documentLoad",t.DOCUMENT_FETCH="documentFetch",t.RESOURCE_FETCH="resourceFetch"})(Ke||(Ke={}));var dm="0.44.0",vm="@opentelemetry/instrumentation-document-load";const ym="http.url",mm="http.user_agent",ve=ym,_m=mm;var jn;(function(t){t.FIRST_PAINT="firstPaint",t.FIRST_CONTENTFUL_PAINT="firstContentfulPaint"})(jn||(jn={}));var gm=function(){var t,e,n={},r=(e=(t=Rn).getEntriesByType)===null||e===void 0?void 0:e.call(t,"navigation")[0];if(r){var i=Object.values(w);i.forEach(function(u){if(Rt(r,u)){var c=r[u];typeof c=="number"&&(n[u]=c)}})}else{var o=Rn,a=o.timing;if(a){var i=Object.values(w);i.forEach(function(c){if(Rt(a,c)){var s=a[c];typeof s=="number"&&(n[c]=s)}})}}return n},Cs={"first-paint":jn.FIRST_PAINT,"first-contentful-paint":jn.FIRST_CONTENTFUL_PAINT},Em=function(t){var e,n,r=(n=(e=Rn).getEntriesByType)===null||n===void 0?void 0:n.call(e,"paint");r&&r.forEach(function(i){var o=i.name,a=i.startTime;Rt(Cs,o)&&t.addEvent(Cs[o],a)})},Tm=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),bm=function(t){Tm(e,t);function e(n){n===void 0&&(n={});var r=t.call(this,vm,dm,n)||this;return r.component="document-load",r.version="1",r.moduleName=r.component,r}return e.prototype.init=function(){},e.prototype._onDocumentLoaded=function(){var n=this;window.setTimeout(function(){n._collectPerformance()})},e.prototype._addResourcesSpans=function(n){var r=this,i,o,a=(o=(i=Rn).getEntriesByType)===null||o===void 0?void 0:o.call(i,"resource");a&&a.forEach(function(u){r._initResourceSpan(u,n)})},e.prototype._collectPerformance=function(){var n=this,r=Array.from(document.getElementsByTagName("meta")).find(function(a){return a.getAttribute("name")===Wd}),i=gm(),o=r&&r.content||"";C.with(Q.extract(Dt,{traceparent:o}),function(){var a,u=n._startSpan(Ke.DOCUMENT_LOAD,w.FETCH_START,i);u&&(C.with(P.setSpan(C.active(),u),function(){var c=n._startSpan(Ke.DOCUMENT_FETCH,w.FETCH_START,i);c&&(c.setAttribute(ve,location.href),C.with(P.setSpan(C.active(),c),function(){var s;n.getConfig().ignoreNetworkEvents||de(c,i),n._addCustomAttributesOnSpan(c,(s=n.getConfig().applyCustomAttributesOnSpan)===null||s===void 0?void 0:s.documentFetch),n._endSpan(c,w.RESPONSE_END,i)}))}),u.setAttribute(ve,location.href),u.setAttribute(_m,navigator.userAgent),n._addResourcesSpans(u),n.getConfig().ignoreNetworkEvents||(q(u,w.FETCH_START,i),q(u,w.UNLOAD_EVENT_START,i),q(u,w.UNLOAD_EVENT_END,i),q(u,w.DOM_INTERACTIVE,i),q(u,w.DOM_CONTENT_LOADED_EVENT_START,i),q(u,w.DOM_CONTENT_LOADED_EVENT_END,i),q(u,w.DOM_COMPLETE,i),q(u,w.LOAD_EVENT_START,i),q(u,w.LOAD_EVENT_END,i)),n.getConfig().ignorePerformancePaintEvents||Em(u),n._addCustomAttributesOnSpan(u,(a=n.getConfig().applyCustomAttributesOnSpan)===null||a===void 0?void 0:a.documentLoad),n._endSpan(u,w.LOAD_EVENT_END,i))})},e.prototype._endSpan=function(n,r,i){n&&(Rt(i,r)?n.end(i[r]):n.end())},e.prototype._initResourceSpan=function(n,r){var i,o=this._startSpan(Ke.RESOURCE_FETCH,w.FETCH_START,n,r);o&&(o.setAttribute(ve,n.name),this.getConfig().ignoreNetworkEvents||de(o,n),this._addCustomAttributesOnResourceSpan(o,n,(i=this.getConfig().applyCustomAttributesOnSpan)===null||i===void 0?void 0:i.resourceFetch),this._endSpan(o,w.RESPONSE_END,n))},e.prototype._startSpan=function(n,r,i,o){if(Rt(i,r)&&typeof i[r]=="number"){var a=this.tracer.startSpan(n,{startTime:i[r]},o?P.setSpan(C.active(),o):void 0);return a}},e.prototype._waitForPageLoad=function(){window.document.readyState==="complete"?this._onDocumentLoaded():(this._onDocumentLoaded=this._onDocumentLoaded.bind(this),window.addEventListener("load",this._onDocumentLoaded))},e.prototype._addCustomAttributesOnSpan=function(n,r){var i=this;r&&Rs(function(){return r(n)},function(o){o&&i._diag.error("addCustomAttributesOnSpan",o)})},e.prototype._addCustomAttributesOnResourceSpan=function(n,r,i){var o=this;i&&Rs(function(){return i(n,r)},function(a){a&&o._diag.error("addCustomAttributesOnResourceSpan",a)})},e.prototype.enable=function(){window.removeEventListener("load",this._onDocumentLoaded),this._waitForPageLoad()},e.prototype.disable=function(){window.removeEventListener("load",this._onDocumentLoaded)},e}(hm),Li=function(){return Li=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Li.apply(this,arguments)},Om=function(){function t(e,n,r){this.instrumentationName=e,this.instrumentationVersion=n,this._config={},this._wrap=X.wrap,this._unwrap=X.unwrap,this._massWrap=X.massWrap,this._massUnwrap=X.massUnwrap,this.setConfig(r),this._diag=T.createComponentLogger({namespace:e}),this._tracer=P.getTracer(e,n),this._meter=se.getMeter(e,n),this._logger=Fe.getLogger(e,n),this._updateMetricInstruments()}return Object.defineProperty(t.prototype,"meter",{get:function(){return this._meter},enumerable:!1,configurable:!0}),t.prototype.setMeterProvider=function(e){this._meter=e.getMeter(this.instrumentationName,this.instrumentationVersion),this._updateMetricInstruments()},Object.defineProperty(t.prototype,"logger",{get:function(){return this._logger},enumerable:!1,configurable:!0}),t.prototype.setLoggerProvider=function(e){this._logger=e.getLogger(this.instrumentationName,this.instrumentationVersion)},t.prototype.getModuleDefinitions=function(){var e,n=(e=this.init())!==null&&e!==void 0?e:[];return Array.isArray(n)?n:[n]},t.prototype._updateMetricInstruments=function(){},t.prototype.getConfig=function(){return this._config},t.prototype.setConfig=function(e){this._config=Li({enabled:!0},e)},t.prototype.setTracerProvider=function(e){this._tracer=e.getTracer(this.instrumentationName,this.instrumentationVersion)},Object.defineProperty(t.prototype,"tracer",{get:function(){return this._tracer},enumerable:!1,configurable:!0}),t.prototype._runSpanCustomizationHook=function(e,n,r,i){if(e)try{e(r,i)}catch(o){this._diag.error("Error running span customization hook due to exception in handler",{triggerName:n},o)}},t}(),Sm=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),wm=function(t){Sm(e,t);function e(n,r,i){var o=t.call(this,n,r,i)||this;return o._config.enabled&&o.enable(),o}return e}(Om);function Am(t,e,n){var r,i;try{i=t()}catch(o){r=o}finally{return e(r,i),i}}function Lm(t){return typeof t=="function"&&typeof t.__original=="function"&&typeof t.__unwrap=="function"&&t.__wrapped===!0}var Ri=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{},Ci=performance,Rm="http.method",Cm="http.url",Nm="http.host",xm="http.scheme",Pm="http.status_code",Im="http.user_agent",Mm="http.request_content_length_uncompressed",km=Rm,Dm=Cm,Um=Nm,jm=xm,Bm=Pm,$m=Im,Fm=Mm,Vm=9,Hm=6,Gm=Math.pow(10,Hm),Ns=Math.pow(10,Vm);function Ni(t){var e=t/1e3,n=Math.trunc(e),r=Math.round(t%1e3*Gm);return[n,r]}function qm(){var t=Ci.timeOrigin;if(typeof t!="number"){var e=Ci;t=e.timing&&e.timing.fetchStart}return t}function xs(t){var e=Ni(qm()),n=Ni(Ci.now());return zm(e,n)}function zm(t,e){var n=[t[0]+e[0],t[1]+e[1]];return n[1]>=Ns&&(n[1]-=Ns,n[0]+=1),n}var Xm=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};function Km(t,e){return typeof e=="string"?t===e:!!t.match(e)}function Wm(t,e){var n,r;if(!e)return!1;try{for(var i=Xm(e),o=i.next();!o.done;o=i.next()){var a=o.value;if(Km(t,a))return!0}}catch(u){n={error:u}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return!1}var Bn;(function(t){t.COMPONENT="component",t.HTTP_ERROR_NAME="http.error_name",t.HTTP_STATUS_TEXT="http.status_text"})(Bn||(Bn={}));var Ym=function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function u(l){try{s(r.next(l))}catch(p){a(p)}}function c(l){try{s(r.throw(l))}catch(p){a(p)}}function s(l){l.done?o(l.value):i(l.value).then(u,c)}s((r=r.apply(t,[])).next())})},Jm=function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(l){return c([s,l])}}function c(s){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,i=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){n.label=s[1];break}if(s[0]===6&&n.label<o[1]){n.label=o[1],o=s;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(s);break}o[2]&&n.ops.pop(),n.trys.pop();continue}s=e.call(t,n)}catch(l){s=[6,l],i=0}finally{r=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},Qm=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Zm=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},Ps=T.createComponentLogger({namespace:"@opentelemetry/opentelemetry-instrumentation-fetch/utils"});function t_(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(t[0]instanceof URL||typeof t[0]=="string"){var n=t[1];if(!(n!=null&&n.body))return Promise.resolve();if(n.body instanceof ReadableStream){var r=e_(n.body),i=r.body,o=r.length;return n.body=i,o}else return Promise.resolve(n_(n.body))}else{var a=t[0];return a!=null&&a.body?a.clone().text().then(function(u){return xi(u)}):Promise.resolve()}}function e_(t){if(!t.pipeThrough)return Ps.warn("Platform has ReadableStream but not pipeThrough!"),{body:t,length:Promise.resolve(void 0)};var e=0,n,r=new Promise(function(o){n=o}),i=new TransformStream({start:function(){},transform:function(o,a){return Ym(this,void 0,void 0,function(){var u;return Jm(this,function(c){switch(c.label){case 0:return[4,o];case 1:return u=c.sent(),e+=u.byteLength,a.enqueue(o),[2]}})})},flush:function(){n(e)}});return{body:t.pipeThrough(i),length:r}}function n_(t){if(typeof Document<"u"&&t instanceof Document)return new XMLSerializer().serializeToString(document).length;if(t instanceof Blob)return t.size;if(t.byteLength!==void 0)return t.byteLength;if(t instanceof FormData)return i_(t);if(t instanceof URLSearchParams)return xi(t.toString());if(typeof t=="string")return xi(t);Ps.warn("unknown body type")}var r_=new TextEncoder;function xi(t){return r_.encode(t).byteLength}function i_(t){var e,n,r=0;try{for(var i=Qm(t.entries()),o=i.next();!o.done;o=i.next()){var a=Zm(o.value,2),u=a[0],c=a[1];r+=u.length,c instanceof Blob?r+=c.size:r+=c.length}}catch(s){e={error:s}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return r}var Is="0.57.2",o_=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),a_=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},s_=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},Pi,u_=300,Ms=typeof process=="object"&&((Pi=process.release)===null||Pi===void 0?void 0:Pi.name)==="node",c_=function(t){o_(e,t);function e(n){n===void 0&&(n={});var r=t.call(this,"@opentelemetry/instrumentation-fetch",Is,n)||this;return r.component="fetch",r.version=Is,r.moduleName=r.component,r._usedResources=new WeakSet,r._tasksCount=0,r}return e.prototype.init=function(){},e.prototype._addChildSpan=function(n,r){var i=this.tracer.startSpan("CORS Preflight",{startTime:r[w.FETCH_START]},P.setSpan(C.active(),n));de(i,r,this.getConfig().ignoreNetworkEvents),i.end(r[w.RESPONSE_END])},e.prototype._addFinalSpanAttributes=function(n,r){var i=_t(r.url);n.setAttribute(Bm,r.status),r.statusText!=null&&n.setAttribute(Bn.HTTP_STATUS_TEXT,r.statusText),n.setAttribute(Um,i.host),n.setAttribute(jm,i.protocol.replace(":","")),typeof navigator<"u"&&n.setAttribute($m,navigator.userAgent)},e.prototype._addHeaders=function(n,r){if(!Ls(r,this.getConfig().propagateTraceHeaderCorsUrls)){var i={};Q.inject(C.active(),i),Object.keys(i).length>0&&this._diag.debug("headers inject skipped due to CORS policy");return}if(n instanceof Request)Q.inject(C.active(),n.headers,{set:function(o,a,u){return o.set(a,typeof u=="string"?u:String(u))}});else if(n.headers instanceof Headers)Q.inject(C.active(),n.headers,{set:function(o,a,u){return o.set(a,typeof u=="string"?u:String(u))}});else if(n.headers instanceof Map)Q.inject(C.active(),n.headers,{set:function(o,a,u){return o.set(a,typeof u=="string"?u:String(u))}});else{var i={};Q.inject(C.active(),i),n.headers=Object.assign({},i,n.headers||{})}},e.prototype._clearResources=function(){this._tasksCount===0&&this.getConfig().clearTimingResources&&(performance.clearResourceTimings(),this._usedResources=new WeakSet)},e.prototype._createSpan=function(n,r){var i;if(r===void 0&&(r={}),Wm(n,this.getConfig().ignoreUrls)){this._diag.debug("ignoring span as url matches ignored url");return}var o=(r.method||"GET").toUpperCase(),a="HTTP "+o;return this.tracer.startSpan(a,{kind:je.CLIENT,attributes:(i={},i[Bn.COMPONENT]=this.moduleName,i[km]=o,i[Dm]=n,i)})},e.prototype._findResourceAndAddNetworkEvents=function(n,r,i){var o=r.entries;if(!o.length){if(!performance.getEntriesByType)return;o=performance.getEntriesByType("resource")}var a=ws(r.spanUrl,r.startTime,i,o,this._usedResources,"fetch");if(a.mainRequest){var u=a.mainRequest;this._markResourceAsUsed(u);var c=a.corsPreFlightRequest;c&&(this._addChildSpan(n,c),this._markResourceAsUsed(c)),de(n,u,this.getConfig().ignoreNetworkEvents)}},e.prototype._markResourceAsUsed=function(n){this._usedResources.add(n)},e.prototype._endSpan=function(n,r,i){var o=this,a=Ni(Date.now()),u=xs();this._addFinalSpanAttributes(n,i),setTimeout(function(){var c;(c=r.observer)===null||c===void 0||c.disconnect(),o._findResourceAndAddNetworkEvents(n,r,u),o._tasksCount--,o._clearResources(),n.end(a)},u_)},e.prototype._patchConstructor=function(){var n=this;return function(r){var i=n;return function(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];var u=this,c=_t(o[0]instanceof Request?o[0].url:String(o[0])).href,s=o[0]instanceof Request?o[0]:o[1]||{},l=i._createSpan(c,s);if(!l)return r.apply(this,o);var p=i._prepareSpanData(c);i.getConfig().measureRequestSize&&t_.apply(void 0,s_([],a_(o),!1)).then(function(_){_&&l.setAttribute(Fm,_)}).catch(function(_){i._diag.warn("getFetchBodyLength",_)});function f(_,E){i._applyAttributesAfterFetch(_,s,E),i._endSpan(_,p,{status:E.status||0,statusText:E.message,url:c})}function y(_,E){i._applyAttributesAfterFetch(_,s,E),E.status>=200&&E.status<400?i._endSpan(_,p,E):i._endSpan(_,p,{status:E.status,statusText:E.statusText,url:c})}function v(_,E,S){try{var I=S.clone(),U=S.clone(),z=I.body;if(z){var F=z.getReader(),j=function(){F.read().then(function(V){var st=V.done;st?y(_,U):j()},function(V){f(_,V)})};j()}else y(_,S)}finally{E(S)}}function m(_,E,S){try{f(_,S)}finally{E(S)}}return new Promise(function(_,E){return C.with(P.setSpan(C.active(),l),function(){return i._addHeaders(s,c),i._tasksCount++,r.apply(u,s instanceof Request?[s]:[c,s]).then(v.bind(u,l,_),m.bind(u,l,E))})})}}},e.prototype._applyAttributesAfterFetch=function(n,r,i){var o=this,a=this.getConfig().applyCustomAttributesOnSpan;a&&Am(function(){return a(n,r,i)},function(u){u&&o._diag.error("applyCustomAttributesOnSpan",u)})},e.prototype._prepareSpanData=function(n){var r=xs(),i=[];if(typeof PerformanceObserver!="function")return{entries:i,startTime:r,spanUrl:n};var o=new PerformanceObserver(function(a){var u=a.getEntries();u.forEach(function(c){c.initiatorType==="fetch"&&c.name===n&&i.push(c)})});return o.observe({entryTypes:["resource"]}),{entries:i,observer:o,startTime:r,spanUrl:n}},e.prototype.enable=function(){if(Ms){this._diag.warn("this instrumentation is intended for web usage only, it does not instrument Node.js's fetch()");return}Lm(fetch)&&(this._unwrap(Ri,"fetch"),this._diag.debug("removing previous patch for constructor")),this._wrap(Ri,"fetch",this._patchConstructor())},e.prototype.disable=function(){Ms||(this._unwrap(Ri,"fetch"),this._usedResources=new WeakSet)},e}(wm),Ii=function(){return Ii=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Ii.apply(this,arguments)},l_=function(){function t(e,n,r){this.instrumentationName=e,this.instrumentationVersion=n,this._config={},this._wrap=X.wrap,this._unwrap=X.unwrap,this._massWrap=X.massWrap,this._massUnwrap=X.massUnwrap,this.setConfig(r),this._diag=T.createComponentLogger({namespace:e}),this._tracer=P.getTracer(e,n),this._meter=se.getMeter(e,n),this._logger=Fe.getLogger(e,n),this._updateMetricInstruments()}return Object.defineProperty(t.prototype,"meter",{get:function(){return this._meter},enumerable:!1,configurable:!0}),t.prototype.setMeterProvider=function(e){this._meter=e.getMeter(this.instrumentationName,this.instrumentationVersion),this._updateMetricInstruments()},Object.defineProperty(t.prototype,"logger",{get:function(){return this._logger},enumerable:!1,configurable:!0}),t.prototype.setLoggerProvider=function(e){this._logger=e.getLogger(this.instrumentationName,this.instrumentationVersion)},t.prototype.getModuleDefinitions=function(){var e,n=(e=this.init())!==null&&e!==void 0?e:[];return Array.isArray(n)?n:[n]},t.prototype._updateMetricInstruments=function(){},t.prototype.getConfig=function(){return this._config},t.prototype.setConfig=function(e){this._config=Ii({enabled:!0},e)},t.prototype.setTracerProvider=function(e){this._tracer=e.getTracer(this.instrumentationName,this.instrumentationVersion)},Object.defineProperty(t.prototype,"tracer",{get:function(){return this._tracer},enumerable:!1,configurable:!0}),t.prototype._runSpanCustomizationHook=function(e,n,r,i){if(e)try{e(r,i)}catch(o){this._diag.error("Error running span customization hook due to exception in handler",{triggerName:n},o)}},t}(),p_=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),f_=function(t){p_(e,t);function e(n,r,i){var o=t.call(this,n,r,i)||this;return o._config.enabled&&o.enable(),o}return e}(l_);function h_(t,e,n){var r,i;try{i=t()}catch(o){r=o}finally{return e(r,i),i}}function ks(t){return typeof t=="function"&&typeof t.__original=="function"&&typeof t.__unwrap=="function"&&t.__wrapped===!0}var We=performance,d_="http.method",v_="http.url",y_="http.host",m_="http.scheme",__="http.status_code",g_="http.user_agent",E_="http.request_content_length_uncompressed",T_=d_,b_=v_,O_=y_,S_=m_,w_=__,A_=g_,L_=E_,R_=9,C_=6,N_=Math.pow(10,C_),Ds=Math.pow(10,R_);function Us(t){var e=t/1e3,n=Math.trunc(e),r=Math.round(t%1e3*N_);return[n,r]}function x_(){var t=We.timeOrigin;if(typeof t!="number"){var e=We;t=e.timing&&e.timing.fetchStart}return t}function js(t){var e=Us(x_()),n=Us(We.now());return P_(e,n)}function P_(t,e){var n=[t[0]+e[0],t[1]+e[1]];return n[1]>=Ds&&(n[1]-=Ds,n[0]+=1),n}var I_=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};function M_(t,e){return typeof e=="string"?t===e:!!t.match(e)}function k_(t,e){var n,r;if(!e)return!1;try{for(var i=I_(e),o=i.next();!o.done;o=i.next()){var a=o.value;if(M_(t,a))return!0}}catch(u){n={error:u}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return!1}var gt;(function(t){t.METHOD_OPEN="open",t.METHOD_SEND="send",t.EVENT_ABORT="abort",t.EVENT_ERROR="error",t.EVENT_LOAD="loaded",t.EVENT_TIMEOUT="timeout"})(gt||(gt={}));var D_=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},U_=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},j_=T.createComponentLogger({namespace:"@opentelemetry/opentelemetry-instrumentation-xml-http-request/utils"});function B_(t){if(typeof Document<"u"&&t instanceof Document)return new XMLSerializer().serializeToString(document).length;if(t instanceof Blob)return t.size;if(t.byteLength!==void 0)return t.byteLength;if(t instanceof FormData)return F_(t);if(t instanceof URLSearchParams)return Bs(t.toString());if(typeof t=="string")return Bs(t);j_.warn("unknown body type")}var $_=new TextEncoder;function Bs(t){return $_.encode(t).byteLength}function F_(t){var e,n,r=0;try{for(var i=D_(t.entries()),o=i.next();!o.done;o=i.next()){var a=U_(o.value,2),u=a[0],c=a[1];r+=u.length,c instanceof Blob?r+=c.size:r+=c.length}}catch(s){e={error:s}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return r}var $s="0.57.2",Mi;(function(t){t.HTTP_STATUS_TEXT="http.status_text"})(Mi||(Mi={}));var V_=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),H_=300,G_=function(t){V_(e,t);function e(n){n===void 0&&(n={});var r=t.call(this,"@opentelemetry/instrumentation-xml-http-request",$s,n)||this;return r.component="xml-http-request",r.version=$s,r.moduleName=r.component,r._tasksCount=0,r._xhrMem=new WeakMap,r._usedResources=new WeakSet,r}return e.prototype.init=function(){},e.prototype._addHeaders=function(n,r){var i=_t(r).href;if(!Ls(i,this.getConfig().propagateTraceHeaderCorsUrls)){var o={};Q.inject(C.active(),o),Object.keys(o).length>0&&this._diag.debug("headers inject skipped due to CORS policy");return}var a={};Q.inject(C.active(),a),Object.keys(a).forEach(function(u){n.setRequestHeader(u,String(a[u]))})},e.prototype._addChildSpan=function(n,r){var i=this;C.with(P.setSpan(C.active(),n),function(){var o=i.tracer.startSpan("CORS Preflight",{startTime:r[w.FETCH_START]});de(o,r,i.getConfig().ignoreNetworkEvents),o.end(r[w.RESPONSE_END])})},e.prototype._addFinalSpanAttributes=function(n,r,i){if(typeof i=="string"){var o=_t(i);r.status!==void 0&&n.setAttribute(w_,r.status),r.statusText!==void 0&&n.setAttribute(Mi.HTTP_STATUS_TEXT,r.statusText),n.setAttribute(O_,o.host),n.setAttribute(S_,o.protocol.replace(":","")),n.setAttribute(A_,navigator.userAgent)}},e.prototype._applyAttributesAfterXHR=function(n,r){var i=this,o=this.getConfig().applyCustomAttributesOnSpan;typeof o=="function"&&h_(function(){return o(n,r)},function(a){a&&i._diag.error("applyCustomAttributesOnSpan",a)})},e.prototype._addResourceObserver=function(n,r){var i=this._xhrMem.get(n);!i||typeof PerformanceObserver!="function"||typeof PerformanceResourceTiming!="function"||(i.createdResources={observer:new PerformanceObserver(function(o){var a=o.getEntries(),u=_t(r);a.forEach(function(c){c.initiatorType==="xmlhttprequest"&&c.name===u.href&&i.createdResources&&i.createdResources.entries.push(c)})}),entries:[]},i.createdResources.observer.observe({entryTypes:["resource"]}))},e.prototype._clearResources=function(){this._tasksCount===0&&this.getConfig().clearTimingResources&&(We.clearResourceTimings(),this._xhrMem=new WeakMap,this._usedResources=new WeakSet)},e.prototype._findResourceAndAddNetworkEvents=function(n,r,i,o,a){if(!(!i||!o||!a||!n.createdResources)){var u=n.createdResources.entries;(!u||!u.length)&&(u=We.getEntriesByType("resource"));var c=ws(_t(i).href,o,a,u,this._usedResources);if(c.mainRequest){var s=c.mainRequest;this._markResourceAsUsed(s);var l=c.corsPreFlightRequest;l&&(this._addChildSpan(r,l),this._markResourceAsUsed(l)),de(r,s,this.getConfig().ignoreNetworkEvents)}}},e.prototype._cleanPreviousSpanInformation=function(n){var r=this._xhrMem.get(n);if(r){var i=r.callbackToRemoveEvents;i&&i(),this._xhrMem.delete(n)}},e.prototype._createSpan=function(n,r,i){var o;if(k_(r,this.getConfig().ignoreUrls)){this._diag.debug("ignoring span as url matches ignored url");return}var a=i.toUpperCase(),u=this.tracer.startSpan(a,{kind:je.CLIENT,attributes:(o={},o[T_]=i,o[b_]=_t(r).toString(),o)});return u.addEvent(gt.METHOD_OPEN),this._cleanPreviousSpanInformation(n),this._xhrMem.set(n,{span:u,spanUrl:r}),u},e.prototype._markResourceAsUsed=function(n){this._usedResources.add(n)},e.prototype._patchOpen=function(){var n=this;return function(r){var i=n;return function(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];var u=o[0],c=o[1];return i._createSpan(this,c,u),r.apply(this,o)}}},e.prototype._patchSend=function(){var n=this;function r(l,p,f,y){var v=p.callbackToRemoveEvents;typeof v=="function"&&v();var m=p.span,_=p.spanUrl,E=p.sendStartTime;m&&(n._findResourceAndAddNetworkEvents(p,m,_,E,f),m.addEvent(l,y),n._addFinalSpanAttributes(m,p,_),m.end(y),n._tasksCount--),n._clearResources()}function i(l,p){var f=n._xhrMem.get(p);if(f){f.status=p.status,f.statusText=p.statusText,n._xhrMem.delete(p),f.span&&n._applyAttributesAfterXHR(f.span,p);var y=js(),v=Date.now();setTimeout(function(){r(l,f,y,v)},H_)}}function o(){i(gt.EVENT_ERROR,this)}function a(){i(gt.EVENT_ABORT,this)}function u(){i(gt.EVENT_TIMEOUT,this)}function c(){this.status<299?i(gt.EVENT_LOAD,this):i(gt.EVENT_ERROR,this)}function s(l){l.removeEventListener("abort",a),l.removeEventListener("error",o),l.removeEventListener("load",c),l.removeEventListener("timeout",u);var p=n._xhrMem.get(l);p&&(p.callbackToRemoveEvents=void 0)}return function(l){return function(){for(var p=this,f=[],y=0;y<arguments.length;y++)f[y]=arguments[y];var v=n._xhrMem.get(this);if(!v)return l.apply(this,f);var m=v.span,_=v.spanUrl;if(m&&_){if(n.getConfig().measureRequestSize&&f!=null&&f[0]){var E=f[0],S=B_(E);S!==void 0&&m.setAttribute(L_,S)}C.with(P.setSpan(C.active(),m),function(){n._tasksCount++,v.sendStartTime=js(),m.addEvent(gt.METHOD_SEND),p.addEventListener("abort",a),p.addEventListener("error",o),p.addEventListener("load",c),p.addEventListener("timeout",u),v.callbackToRemoveEvents=function(){s(p),v.createdResources&&v.createdResources.observer.disconnect()},n._addHeaders(p,_),n._addResourceObserver(p,_)})}return l.apply(this,f)}}},e.prototype.enable=function(){this._diag.debug("applying patch to",this.moduleName,this.version),ks(XMLHttpRequest.prototype.open)&&(this._unwrap(XMLHttpRequest.prototype,"open"),this._diag.debug("removing previous patch from method open")),ks(XMLHttpRequest.prototype.send)&&(this._unwrap(XMLHttpRequest.prototype,"send"),this._diag.debug("removing previous patch from method send")),this._wrap(XMLHttpRequest.prototype,"open",this._patchOpen()),this._wrap(XMLHttpRequest.prototype,"send",this._patchSend())},e.prototype.disable=function(){this._diag.debug("removing patch from",this.moduleName,this.version),this._unwrap(XMLHttpRequest.prototype,"open"),this._unwrap(XMLHttpRequest.prototype,"send"),this._tasksCount=0,this._xhrMem=new WeakMap,this._usedResources=new WeakSet},e}(f_);const ki=(t,e,n)=>{var r,i;const o=x({},e);return n?((r=Object.keys(o))==null||r.forEach(a=>{[...n].includes(a?.toLowerCase())||(o[a]="[REDACTED]")}),o):((i=Object.keys(o))==null||i.forEach(a=>{[...q_,...t].includes(a?.toLowerCase())&&(o[a]="[REDACTED]")}),o)},q_=["authorization","cookie","proxy-authorization","set-cookie","token"],z_=["https://www.googleapis.com/identitytoolkit","https://securetoken.googleapis.com"],X_=["awsaccesskeyid","signature","sig","x-goog-signature"],Fs=t=>{var e,n;try{return new URL(t)}catch{return new URL(t,(n=(e=globalThis.location)==null?void 0:e.origin)!=null?n:"http://example.com")}},Vs=t=>{try{const e=Fs(t);(e.username||e.password)&&(e.username="REDACTED",e.password="REDACTED");const n=e.searchParams;if(X_.forEach(r=>{for(const i of Array.from(n.keys()))i.toLowerCase()===r&&n.set(i,"REDACTED")}),!t.includes("://")&&!t.startsWith("//"))return e.pathname+e.search+e.hash;if(t.startsWith("//")){let r="//";return(e.username||e.password)&&(r+=e.username+":"+e.password+"@"),r+=e.host+e.pathname+e.search+e.hash,r}return e.toString()}catch{return t}},K_=new RegExp("sdk\\/evalx\\/[^/]+\\/contexts\\/(?<context>[^/?]*)\\??.*?"),W_=new RegExp("\\/eval\\/[^/]+\\/(?<context>[^/?]*)\\??.*?");function Y_(t){return!!(t.includes("/sdk/evalx")&&t.match(K_)||t.includes("/eval/")&&t.match(W_))}const J_=t=>["events.ld.catamorphic.com","events.launchdarkly.com"].some(e=>t.toLocaleLowerCase().includes(e)),Q_=t=>Y_(t),Z_=(t,e)=>e.some(n=>t.toLocaleLowerCase().includes(n)),tg=(t,e,n)=>!Z_(t,e)&&!Q_(t)&&!J_(t),eg=(t,e,n)=>{var r;if(n.some(a=>t.toLowerCase().includes(a)))return!1;let i=[];e===!0?(i=["localhost",/^\//],(r=window?.location)!=null&&r.host&&i.push(window.location.host)):e instanceof Array&&(i=e);let o=!1;return i.forEach(a=>{t.match(a)&&(o=!0)}),o},Hs=64*1024,ng={"application/json":64*1024*1024,"text/plain":64*1024*1024},Di=(t,e,n,r)=>{var i,o,a;let u=Hs;if(r){let c="";typeof r.get=="function"?c=(i=r.get("content-type"))!=null?i:"":c=(o=r["content-type"])!=null?o:"";try{c=c.split(";")[0]}catch{}u=(a=ng[c])!=null?a:Hs}if(t){if(e)try{const c=JSON.parse(t);Array.isArray(c)?c.forEach(s=>{Object.keys(s).forEach(l=>{e.includes(l.toLocaleLowerCase())&&(s[l]="[REDACTED]")})}):Object.keys(c).forEach(s=>{e.includes(s.toLocaleLowerCase())&&(c[s]="[REDACTED]")}),t=JSON.stringify(c)}catch{}if(n)try{const c=JSON.parse(t);Object.keys(c).forEach(s=>{n.includes(s.toLocaleLowerCase())||(c[s]="[REDACTED]")}),t=JSON.stringify(c)}catch{}}try{t=t.slice(0,u)}catch{}return t},rg=(t,e,n)=>ct(void 0,null,function*(){let r;try{const i=t.clone().body;if(i){let o=i.getReader(),a=new TextDecoder,u,c="";for(;!(u=yield o.read()).done;){let s=u.value;c+=a.decode(s)}r=c,r=Di(r,n,e,t.headers)}else r=""}catch(i){r=`Unable to clone response: ${i}`}return r});var Gs=function(){function t(e){this._delegate=e}return t.prototype.export=function(e,n){this._delegate.export(e,n)},t.prototype.forceFlush=function(){return this._delegate.forceFlush()},t.prototype.shutdown=function(){return this._delegate.shutdown()},t}(),ig=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),qs=function(t){ig(e,t);function e(n,r,i){var o=t.call(this,n)||this;return o.name="OTLPExporterError",o.data=i,o.code=r,o}return e}(Error);function og(t){if(!Number.isNaN(t)&&Number.isFinite(t)&&t>0)return t;throw new Error("Configuration: timeoutMillis is invalid, expected number greater than 0 (actual: '"+t+"')")}function ag(t){if(t!=null)return function(){return t}}function sg(t,e,n){var r,i,o,a,u,c;return{timeoutMillis:og((i=(r=t.timeoutMillis)!==null&&r!==void 0?r:e.timeoutMillis)!==null&&i!==void 0?i:n.timeoutMillis),concurrencyLimit:(a=(o=t.concurrencyLimit)!==null&&o!==void 0?o:e.concurrencyLimit)!==null&&a!==void 0?a:n.concurrencyLimit,compression:(c=(u=t.compression)!==null&&u!==void 0?u:e.compression)!==null&&c!==void 0?c:n.compression}}function ug(){return{timeoutMillis:1e4,concurrencyLimit:30,compression:"none"}}var cg=function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function u(l){try{s(r.next(l))}catch(p){a(p)}}function c(l){try{s(r.throw(l))}catch(p){a(p)}}function s(l){l.done?o(l.value):i(l.value).then(u,c)}s((r=r.apply(t,[])).next())})},lg=function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(l){return c([s,l])}}function c(s){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,i=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){n.label=s[1];break}if(s[0]===6&&n.label<o[1]){n.label=o[1],o=s;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(s);break}o[2]&&n.ops.pop(),n.trys.pop();continue}s=e.call(t,n)}catch(l){s=[6,l],i=0}finally{r=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},pg=function(){function t(e){this._sendingPromises=[],this._concurrencyLimit=e}return t.prototype.pushPromise=function(e){var n=this;if(this.hasReachedLimit())throw new Error("Concurrency Limit reached");this._sendingPromises.push(e);var r=function(){var i=n._sendingPromises.indexOf(e);n._sendingPromises.splice(i,1)};e.then(r,r)},t.prototype.hasReachedLimit=function(){return this._sendingPromises.length>=this._concurrencyLimit},t.prototype.awaitAll=function(){return cg(this,void 0,void 0,function(){return lg(this,function(e){switch(e.label){case 0:return[4,Promise.all(this._sendingPromises)];case 1:return e.sent(),[2]}})})},t}();function fg(t){return new pg(t.concurrencyLimit)}function hg(t){return Object.prototype.hasOwnProperty.call(t,"partialSuccess")}function dg(){return{handleResponse:function(t){t==null||!hg(t)||t.partialSuccess==null||Object.keys(t.partialSuccess).length===0||T.warn("Received Partial Success response:",JSON.stringify(t.partialSuccess))}}}var vg=function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function u(l){try{s(r.next(l))}catch(p){a(p)}}function c(l){try{s(r.throw(l))}catch(p){a(p)}}function s(l){l.done?o(l.value):i(l.value).then(u,c)}s((r=r.apply(t,[])).next())})},yg=function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(l){return c([s,l])}}function c(s){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,i=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){n.label=s[1];break}if(s[0]===6&&n.label<o[1]){n.label=o[1],o=s;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(s);break}o[2]&&n.ops.pop(),n.trys.pop();continue}s=e.call(t,n)}catch(l){s=[6,l],i=0}finally{r=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},mg=function(){function t(e,n,r,i,o){this._transport=e,this._serializer=n,this._responseHandler=r,this._promiseQueue=i,this._timeout=o,this._diagLogger=T.createComponentLogger({namespace:"OTLPExportDelegate"})}return t.prototype.export=function(e,n){var r=this;if(this._diagLogger.debug("items to be sent",e),this._promiseQueue.hasReachedLimit()){n({code:Z.FAILED,error:new Error("Concurrent export limit reached")});return}var i=this._serializer.serializeRequest(e);if(i==null){n({code:Z.FAILED,error:new Error("Nothing to send")});return}this._promiseQueue.pushPromise(this._transport.send(i,this._timeout).then(function(o){if(o.status==="success"){if(o.data!=null)try{r._responseHandler.handleResponse(r._serializer.deserializeResponse(o.data))}catch(a){r._diagLogger.warn("Export succeeded but could not deserialize response - is the response specification compliant?",a,o.data)}n({code:Z.SUCCESS});return}else if(o.status==="failure"&&o.error){n({code:Z.FAILED,error:o.error});return}else o.status==="retryable"?n({code:Z.FAILED,error:new qs("Export failed with retryable status")}):n({code:Z.FAILED,error:new qs("Export failed with unknown error")})},function(o){return n({code:Z.FAILED,error:o})}))},t.prototype.forceFlush=function(){return this._promiseQueue.awaitAll()},t.prototype.shutdown=function(){return vg(this,void 0,void 0,function(){return yg(this,function(e){switch(e.label){case 0:return this._diagLogger.debug("shutdown started"),[4,this.forceFlush()];case 1:return e.sent(),this._transport.shutdown(),[2]}})})},t}();function _g(t,e){return new mg(t.transport,t.serializer,dg(),t.promiseHandler,e.timeout)}function zs(t,e,n){return _g({transport:n,serializer:e,promiseHandler:fg(t)},{timeout:t.timeoutMillis})}function Xs(t){return t>=48&&t<=57?t-48:t>=97&&t<=102?t-87:t-55}function Ui(t){for(var e=new Uint8Array(t.length/2),n=0,r=0;r<t.length;r+=2){var i=Xs(t.charCodeAt(r)),o=Xs(t.charCodeAt(r+1));e[n++]=i<<4|o}return e}var gg=9,Eg=Math.pow(10,gg);function Tg(t){return t[0]*Eg+t[1]}function Ks(t){var e=BigInt(1e9);return BigInt(t[0])*e+BigInt(t[1])}function bg(t){var e=Number(BigInt.asUintN(32,t)),n=Number(BigInt.asUintN(32,t>>BigInt(32)));return{low:e,high:n}}function Ws(t){var e=Ks(t);return bg(e)}function Og(t){var e=Ks(t);return e.toString()}var Sg=typeof BigInt<"u"?Og:Tg;function Ys(t){return t}function Js(t){if(t!==void 0)return Ui(t)}var wg={encodeHrTime:Ws,encodeSpanContext:Ui,encodeOptionalSpanContext:Js};function Qs(t){var e,n;if(t===void 0)return wg;var r=(e=t.useLongBits)!==null&&e!==void 0?e:!0,i=(n=t.useHex)!==null&&n!==void 0?n:!1;return{encodeHrTime:r?Ws:Sg,encodeSpanContext:i?Ys:Ui,encodeOptionalSpanContext:i?Ys:Js}}var Ag=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o};function Zs(t){return{attributes:Ft(t.attributes),droppedAttributesCount:0}}function tu(t){return{name:t.name,version:t.version}}function Ft(t){return Object.keys(t).map(function(e){return eu(e,t[e])})}function eu(t,e){return{key:t,value:nu(e)}}function nu(t){var e=typeof t;return e==="string"?{stringValue:t}:e==="number"?Number.isInteger(t)?{intValue:t}:{doubleValue:t}:e==="boolean"?{boolValue:t}:t instanceof Uint8Array?{bytesValue:t}:Array.isArray(t)?{arrayValue:{values:t.map(nu)}}:e==="object"&&t!=null?{kvlistValue:{values:Object.entries(t).map(function(n){var r=Ag(n,2),i=r[0],o=r[1];return eu(i,o)})}}:{}}var pt;(function(t){t[t.DELTA=0]="DELTA",t[t.CUMULATIVE=1]="CUMULATIVE"})(pt||(pt={}));var vt;(function(t){t[t.HISTOGRAM=0]="HISTOGRAM",t[t.EXPONENTIAL_HISTOGRAM=1]="EXPONENTIAL_HISTOGRAM",t[t.GAUGE=2]="GAUGE",t[t.SUM=3]="SUM"})(vt||(vt={}));var Lg=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),ru=function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function u(l){try{s(r.next(l))}catch(p){a(p)}}function c(l){try{s(r.throw(l))}catch(p){a(p)}}function s(l){l.done?o(l.value):i(l.value).then(u,c)}s((r=r.apply(t,[])).next())})},iu=function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(l){return c([s,l])}}function c(s){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,i=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){n.label=s[1];break}if(s[0]===6&&n.label<o[1]){n.label=o[1],o=s;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(s);break}o[2]&&n.ops.pop(),n.trys.pop();continue}s=e.call(t,n)}catch(l){s=[6,l],i=0}finally{r=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},Rg=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},Cg=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},Ng=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};function xg(t){return t!=null}function ou(t){var e=Object.keys(t);return e.length===0?"":(e=e.sort(),JSON.stringify(e.map(function(n){return[n,t[n]]})))}function Pg(t){var e,n;return t.name+":"+((e=t.version)!==null&&e!==void 0?e:"")+":"+((n=t.schemaUrl)!==null&&n!==void 0?n:"")}var au=function(t){Lg(e,t);function e(n){var r=t.call(this,n)||this;return Object.setPrototypeOf(r,e.prototype),r}return e}(Error);function Ye(t,e){var n,r=new Promise(function(i,o){n=setTimeout(function(){o(new au("Operation timed out."))},e)});return Promise.race([t,r]).then(function(i){return clearTimeout(n),i},function(i){throw clearTimeout(n),i})}function Ig(t){return ru(this,void 0,void 0,function(){var e=this;return iu(this,function(n){return[2,Promise.all(t.map(function(r){return ru(e,void 0,void 0,function(){var i,o;return iu(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),[4,r];case 1:return i=a.sent(),[2,{status:"fulfilled",value:i}];case 2:return o=a.sent(),[2,{status:"rejected",reason:o}];case 3:return[2]}})})}))]})})}function Mg(t){return t.status==="rejected"}function su(t,e){var n=[];return t.forEach(function(r){n.push.apply(n,Cg([],Rg(e(r)),!1))}),n}function kg(t,e){var n,r;if(t.size!==e.size)return!1;try{for(var i=Ng(t),o=i.next();!o.done;o=i.next()){var a=o.value;if(!e.has(a))return!1}}catch(u){n={error:u}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return!0}function Dg(t,e){for(var n=0,r=t.length-1,i=t.length;r>=n;){var o=n+Math.trunc((r-n)/2);t[o]<e?n=o+1:(i=o,r=o-1)}return i}function Ug(t,e){return t.toLowerCase()===e.toLowerCase()}var Vt;(function(t){t[t.DROP=0]="DROP",t[t.SUM=1]="SUM",t[t.LAST_VALUE=2]="LAST_VALUE",t[t.HISTOGRAM=3]="HISTOGRAM",t[t.EXPONENTIAL_HISTOGRAM=4]="EXPONENTIAL_HISTOGRAM"})(Vt||(Vt={}));var jg=function(){function t(){this.kind=Vt.DROP}return t.prototype.createAccumulation=function(){},t.prototype.merge=function(e,n){},t.prototype.diff=function(e,n){},t.prototype.toMetricData=function(e,n,r,i){},t}(),A;(function(t){t.COUNTER="COUNTER",t.GAUGE="GAUGE",t.HISTOGRAM="HISTOGRAM",t.UP_DOWN_COUNTER="UP_DOWN_COUNTER",t.OBSERVABLE_COUNTER="OBSERVABLE_COUNTER",t.OBSERVABLE_GAUGE="OBSERVABLE_GAUGE",t.OBSERVABLE_UP_DOWN_COUNTER="OBSERVABLE_UP_DOWN_COUNTER"})(A||(A={}));function Ct(t,e,n){var r,i,o,a;return Vg(t)||T.warn('Invalid metric name: "'+t+'". The metric name should be a ASCII string with a length no greater than 255 characters.'),{name:t,type:e,description:(r=n?.description)!==null&&r!==void 0?r:"",unit:(i=n?.unit)!==null&&i!==void 0?i:"",valueType:(o=n?.valueType)!==null&&o!==void 0?o:St.DOUBLE,advice:(a=n?.advice)!==null&&a!==void 0?a:{}}}function Bg(t,e){var n,r;return{name:(n=t.name)!==null&&n!==void 0?n:e.name,description:(r=t.description)!==null&&r!==void 0?r:e.description,type:e.type,unit:e.unit,valueType:e.valueType,advice:e.advice}}function $g(t,e){return Ug(t.name,e.name)&&t.unit===e.unit&&t.type===e.type&&t.valueType===e.valueType}var Fg=/^[a-z][a-z0-9_.\-/]{0,254}$/i;function Vg(t){return t.match(Fg)!=null}var Hg=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o};function Gg(t){var e=t.map(function(){return 0});return e.push(0),{buckets:{boundaries:t,counts:e},sum:0,count:0,hasMinMax:!1,min:1/0,max:-1/0}}var ji=function(){function t(e,n,r,i){r===void 0&&(r=!0),i===void 0&&(i=Gg(n)),this.startTime=e,this._boundaries=n,this._recordMinMax=r,this._current=i}return t.prototype.record=function(e){if(!Number.isNaN(e)){this._current.count+=1,this._current.sum+=e,this._recordMinMax&&(this._current.min=Math.min(e,this._current.min),this._current.max=Math.max(e,this._current.max),this._current.hasMinMax=!0);var n=Dg(this._boundaries,e);this._current.buckets.counts[n]+=1}},t.prototype.setStartTime=function(e){this.startTime=e},t.prototype.toPointValue=function(){return this._current},t}(),uu=function(){function t(e,n){this._boundaries=e,this._recordMinMax=n,this.kind=Vt.HISTOGRAM}return t.prototype.createAccumulation=function(e){return new ji(e,this._boundaries,this._recordMinMax)},t.prototype.merge=function(e,n){for(var r=e.toPointValue(),i=n.toPointValue(),o=r.buckets.counts,a=i.buckets.counts,u=new Array(o.length),c=0;c<o.length;c++)u[c]=o[c]+a[c];var s=1/0,l=-1/0;return this._recordMinMax&&(r.hasMinMax&&i.hasMinMax?(s=Math.min(r.min,i.min),l=Math.max(r.max,i.max)):r.hasMinMax?(s=r.min,l=r.max):i.hasMinMax&&(s=i.min,l=i.max)),new ji(e.startTime,r.buckets.boundaries,this._recordMinMax,{buckets:{boundaries:r.buckets.boundaries,counts:u},count:r.count+i.count,sum:r.sum+i.sum,hasMinMax:this._recordMinMax&&(r.hasMinMax||i.hasMinMax),min:s,max:l})},t.prototype.diff=function(e,n){for(var r=e.toPointValue(),i=n.toPointValue(),o=r.buckets.counts,a=i.buckets.counts,u=new Array(o.length),c=0;c<o.length;c++)u[c]=a[c]-o[c];return new ji(n.startTime,r.buckets.boundaries,this._recordMinMax,{buckets:{boundaries:r.buckets.boundaries,counts:u},count:i.count-r.count,sum:i.sum-r.sum,hasMinMax:!1,min:1/0,max:-1/0})},t.prototype.toMetricData=function(e,n,r,i){return{descriptor:e,aggregationTemporality:n,dataPointType:vt.HISTOGRAM,dataPoints:r.map(function(o){var a=Hg(o,2),u=a[0],c=a[1],s=c.toPointValue(),l=e.type===A.GAUGE||e.type===A.UP_DOWN_COUNTER||e.type===A.OBSERVABLE_GAUGE||e.type===A.OBSERVABLE_UP_DOWN_COUNTER;return{attributes:u,startTime:c.startTime,endTime:i,value:{min:s.hasMinMax?s.min:void 0,max:s.hasMinMax?s.max:void 0,sum:l?void 0:s.sum,buckets:s.buckets,count:s.count}}})}},t}(),Bi=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},$i=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},cu=function(){function t(e,n,r,i){e===void 0&&(e=new qg),n===void 0&&(n=0),r===void 0&&(r=0),i===void 0&&(i=0),this.backing=e,this.indexBase=n,this.indexStart=r,this.indexEnd=i}return Object.defineProperty(t.prototype,"offset",{get:function(){return this.indexStart},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"length",{get:function(){return this.backing.length===0||this.indexEnd===this.indexStart&&this.at(0)===0?0:this.indexEnd-this.indexStart+1},enumerable:!1,configurable:!0}),t.prototype.counts=function(){var e=this;return Array.from({length:this.length},function(n,r){return e.at(r)})},t.prototype.at=function(e){var n=this.indexBase-this.indexStart;return e<n&&(e+=this.backing.length),e-=n,this.backing.countAt(e)},t.prototype.incrementBucket=function(e,n){this.backing.increment(e,n)},t.prototype.decrementBucket=function(e,n){this.backing.decrement(e,n)},t.prototype.trim=function(){for(var e=0;e<this.length;e++)if(this.at(e)!==0){this.indexStart+=e;break}else if(e===this.length-1){this.indexStart=this.indexEnd=this.indexBase=0;return}for(var e=this.length-1;e>=0;e--)if(this.at(e)!==0){this.indexEnd-=this.length-e-1;break}this._rotate()},t.prototype.downscale=function(e){this._rotate();for(var n=1+this.indexEnd-this.indexStart,r=1<<e,i=0,o=0,a=this.indexStart;a<=this.indexEnd;){var u=a%r;u<0&&(u+=r);for(var c=u;c<r&&i<n;c++)this._relocateBucket(o,i),i++,a++;o++}this.indexStart>>=e,this.indexEnd>>=e,this.indexBase=this.indexStart},t.prototype.clone=function(){return new t(this.backing.clone(),this.indexBase,this.indexStart,this.indexEnd)},t.prototype._rotate=function(){var e=this.indexBase-this.indexStart;e!==0&&(e>0?(this.backing.reverse(0,this.backing.length),this.backing.reverse(0,e),this.backing.reverse(e,this.backing.length)):(this.backing.reverse(0,this.backing.length),this.backing.reverse(0,this.backing.length+e)),this.indexBase=this.indexStart)},t.prototype._relocateBucket=function(e,n){e!==n&&this.incrementBucket(e,this.backing.emptyBucket(n))},t}(),qg=function(){function t(e){e===void 0&&(e=[0]),this._counts=e}return Object.defineProperty(t.prototype,"length",{get:function(){return this._counts.length},enumerable:!1,configurable:!0}),t.prototype.countAt=function(e){return this._counts[e]},t.prototype.growTo=function(e,n,r){var i=new Array(e).fill(0);i.splice.apply(i,$i([r,this._counts.length-n],Bi(this._counts.slice(n)),!1)),i.splice.apply(i,$i([0,n],Bi(this._counts.slice(0,n)),!1)),this._counts=i},t.prototype.reverse=function(e,n){for(var r=Math.floor((e+n)/2)-e,i=0;i<r;i++){var o=this._counts[e+i];this._counts[e+i]=this._counts[n-i-1],this._counts[n-i-1]=o}},t.prototype.emptyBucket=function(e){var n=this._counts[e];return this._counts[e]=0,n},t.prototype.increment=function(e,n){this._counts[e]+=n},t.prototype.decrement=function(e,n){this._counts[e]>=n?this._counts[e]-=n:this._counts[e]=0},t.prototype.clone=function(){return new t($i([],Bi(this._counts),!1))},t}(),zg=52,Xg=2146435072,Kg=1048575,Fi=1023,lu=-Fi+1,pu=Fi,Vi=Math.pow(2,-1022);function fu(t){var e=new DataView(new ArrayBuffer(8));e.setFloat64(0,t);var n=e.getUint32(0),r=(n&Xg)>>20;return r-Fi}function hu(t){var e=new DataView(new ArrayBuffer(8));e.setFloat64(0,t);var n=e.getUint32(0),r=e.getUint32(4),i=(n&Kg)*Math.pow(2,32);return i+r}function Hi(t,e){return t===0||t===Number.POSITIVE_INFINITY||t===Number.NEGATIVE_INFINITY||Number.isNaN(t)?t:t*Math.pow(2,e)}function Wg(t){return t--,t|=t>>1,t|=t>>2,t|=t>>4,t|=t>>8,t|=t>>16,t++,t}var Yg=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Je=function(t){Yg(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(Error),Jg=function(){function t(e){this._shift=-e}return t.prototype.mapToIndex=function(e){if(e<Vi)return this._minNormalLowerBoundaryIndex();var n=fu(e),r=this._rightShift(hu(e)-1,zg);return n+r>>this._shift},t.prototype.lowerBoundary=function(e){var n=this._minNormalLowerBoundaryIndex();if(e<n)throw new Je("underflow: "+e+" is < minimum lower boundary: "+n);var r=this._maxNormalLowerBoundaryIndex();if(e>r)throw new Je("overflow: "+e+" is > maximum lower boundary: "+r);return Hi(1,e<<this._shift)},Object.defineProperty(t.prototype,"scale",{get:function(){return this._shift===0?0:-this._shift},enumerable:!1,configurable:!0}),t.prototype._minNormalLowerBoundaryIndex=function(){var e=lu>>this._shift;return this._shift<2&&e--,e},t.prototype._maxNormalLowerBoundaryIndex=function(){return pu>>this._shift},t.prototype._rightShift=function(e,n){return Math.floor(e*Math.pow(2,-n))},t}(),Qg=function(){function t(e){this._scale=e,this._scaleFactor=Hi(Math.LOG2E,e),this._inverseFactor=Hi(Math.LN2,-e)}return t.prototype.mapToIndex=function(e){if(e<=Vi)return this._minNormalLowerBoundaryIndex()-1;if(hu(e)===0){var n=fu(e);return(n<<this._scale)-1}var r=Math.floor(Math.log(e)*this._scaleFactor),i=this._maxNormalLowerBoundaryIndex();return r>=i?i:r},t.prototype.lowerBoundary=function(e){var n=this._maxNormalLowerBoundaryIndex();if(e>=n){if(e===n)return 2*Math.exp((e-(1<<this._scale))/this._scaleFactor);throw new Je("overflow: "+e+" is > maximum lower boundary: "+n)}var r=this._minNormalLowerBoundaryIndex();if(e<=r){if(e===r)return Vi;if(e===r-1)return Math.exp((e+(1<<this._scale))/this._scaleFactor)/2;throw new Je("overflow: "+e+" is < minimum lower boundary: "+r)}return Math.exp(e*this._inverseFactor)},Object.defineProperty(t.prototype,"scale",{get:function(){return this._scale},enumerable:!1,configurable:!0}),t.prototype._minNormalLowerBoundaryIndex=function(){return lu<<this._scale},t.prototype._maxNormalLowerBoundaryIndex=function(){return(pu+1<<this._scale)-1},t}(),du=-10,vu=20,Zg=Array.from({length:31},function(t,e){return e>10?new Qg(e-10):new Jg(e-10)});function yu(t){if(t>vu||t<du)throw new Je("expected scale >= "+du+" && <= "+vu+", got: "+t);return Zg[t+10]}var tE=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},$n=function(){function t(e,n){this.low=e,this.high=n}return t.combine=function(e,n){return new t(Math.min(e.low,n.low),Math.max(e.high,n.high))},t}(),eE=20,nE=160,Gi=2,rE=function(){function t(e,n,r,i,o,a,u,c,s,l,p){e===void 0&&(e=e),n===void 0&&(n=nE),r===void 0&&(r=!0),i===void 0&&(i=0),o===void 0&&(o=0),a===void 0&&(a=0),u===void 0&&(u=Number.POSITIVE_INFINITY),c===void 0&&(c=Number.NEGATIVE_INFINITY),s===void 0&&(s=new cu),l===void 0&&(l=new cu),p===void 0&&(p=yu(eE)),this.startTime=e,this._maxSize=n,this._recordMinMax=r,this._sum=i,this._count=o,this._zeroCount=a,this._min=u,this._max=c,this._positive=s,this._negative=l,this._mapping=p,this._maxSize<Gi&&(T.warn("Exponential Histogram Max Size set to "+this._maxSize+", changing to the minimum size of: "+Gi),this._maxSize=Gi)}return t.prototype.record=function(e){this.updateByIncrement(e,1)},t.prototype.setStartTime=function(e){this.startTime=e},t.prototype.toPointValue=function(){return{hasMinMax:this._recordMinMax,min:this.min,max:this.max,sum:this.sum,positive:{offset:this.positive.offset,bucketCounts:this.positive.counts()},negative:{offset:this.negative.offset,bucketCounts:this.negative.counts()},count:this.count,scale:this.scale,zeroCount:this.zeroCount}},Object.defineProperty(t.prototype,"sum",{get:function(){return this._sum},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"min",{get:function(){return this._min},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"max",{get:function(){return this._max},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"count",{get:function(){return this._count},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"zeroCount",{get:function(){return this._zeroCount},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"scale",{get:function(){return this._count===this._zeroCount?0:this._mapping.scale},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"positive",{get:function(){return this._positive},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"negative",{get:function(){return this._negative},enumerable:!1,configurable:!0}),t.prototype.updateByIncrement=function(e,n){if(!Number.isNaN(e)){if(e>this._max&&(this._max=e),e<this._min&&(this._min=e),this._count+=n,e===0){this._zeroCount+=n;return}this._sum+=e*n,e>0?this._updateBuckets(this._positive,e,n):this._updateBuckets(this._negative,-e,n)}},t.prototype.merge=function(e){this._count===0?(this._min=e.min,this._max=e.max):e.count!==0&&(e.min<this.min&&(this._min=e.min),e.max>this.max&&(this._max=e.max)),this.startTime=e.startTime,this._sum+=e.sum,this._count+=e.count,this._zeroCount+=e.zeroCount;var n=this._minScale(e);this._downscale(this.scale-n),this._mergeBuckets(this.positive,e,e.positive,n),this._mergeBuckets(this.negative,e,e.negative,n)},t.prototype.diff=function(e){this._min=1/0,this._max=-1/0,this._sum-=e.sum,this._count-=e.count,this._zeroCount-=e.zeroCount;var n=this._minScale(e);this._downscale(this.scale-n),this._diffBuckets(this.positive,e,e.positive,n),this._diffBuckets(this.negative,e,e.negative,n)},t.prototype.clone=function(){return new t(this.startTime,this._maxSize,this._recordMinMax,this._sum,this._count,this._zeroCount,this._min,this._max,this.positive.clone(),this.negative.clone(),this._mapping)},t.prototype._updateBuckets=function(e,n,r){var i=this._mapping.mapToIndex(n),o=!1,a=0,u=0;if(e.length===0?(e.indexStart=i,e.indexEnd=e.indexStart,e.indexBase=e.indexStart):i<e.indexStart&&e.indexEnd-i>=this._maxSize?(o=!0,u=i,a=e.indexEnd):i>e.indexEnd&&i-e.indexStart>=this._maxSize&&(o=!0,u=e.indexStart,a=i),o){var c=this._changeScale(a,u);this._downscale(c),i=this._mapping.mapToIndex(n)}this._incrementIndexBy(e,i,r)},t.prototype._incrementIndexBy=function(e,n,r){if(r!==0){if(e.length===0&&(e.indexStart=e.indexEnd=e.indexBase=n),n<e.indexStart){var i=e.indexEnd-n;i>=e.backing.length&&this._grow(e,i+1),e.indexStart=n}else if(n>e.indexEnd){var i=n-e.indexStart;i>=e.backing.length&&this._grow(e,i+1),e.indexEnd=n}var o=n-e.indexBase;o<0&&(o+=e.backing.length),e.incrementBucket(o,r)}},t.prototype._grow=function(e,n){var r=e.backing.length,i=e.indexBase-e.indexStart,o=r-i,a=Wg(n);a>this._maxSize&&(a=this._maxSize);var u=a-i;e.backing.growTo(a,o,u)},t.prototype._changeScale=function(e,n){for(var r=0;e-n>=this._maxSize;)e>>=1,n>>=1,r++;return r},t.prototype._downscale=function(e){if(e!==0){if(e<0)throw new Error("impossible change of scale: "+this.scale);var n=this._mapping.scale-e;this._positive.downscale(e),this._negative.downscale(e),this._mapping=yu(n)}},t.prototype._minScale=function(e){var n=Math.min(this.scale,e.scale),r=$n.combine(this._highLowAtScale(this.positive,this.scale,n),this._highLowAtScale(e.positive,e.scale,n)),i=$n.combine(this._highLowAtScale(this.negative,this.scale,n),this._highLowAtScale(e.negative,e.scale,n));return Math.min(n-this._changeScale(r.high,r.low),n-this._changeScale(i.high,i.low))},t.prototype._highLowAtScale=function(e,n,r){if(e.length===0)return new $n(0,-1);var i=n-r;return new $n(e.indexStart>>i,e.indexEnd>>i)},t.prototype._mergeBuckets=function(e,n,r,i){for(var o=r.offset,a=n.scale-i,u=0;u<r.length;u++)this._incrementIndexBy(e,o+u>>a,r.at(u))},t.prototype._diffBuckets=function(e,n,r,i){for(var o=r.offset,a=n.scale-i,u=0;u<r.length;u++){var c=o+u>>a,s=c-e.indexBase;s<0&&(s+=e.backing.length),e.decrementBucket(s,r.at(u))}e.trim()},t}(),iE=function(){function t(e,n){this._maxSize=e,this._recordMinMax=n,this.kind=Vt.EXPONENTIAL_HISTOGRAM}return t.prototype.createAccumulation=function(e){return new rE(e,this._maxSize,this._recordMinMax)},t.prototype.merge=function(e,n){var r=n.clone();return r.merge(e),r},t.prototype.diff=function(e,n){var r=n.clone();return r.diff(e),r},t.prototype.toMetricData=function(e,n,r,i){return{descriptor:e,aggregationTemporality:n,dataPointType:vt.EXPONENTIAL_HISTOGRAM,dataPoints:r.map(function(o){var a=tE(o,2),u=a[0],c=a[1],s=c.toPointValue(),l=e.type===A.GAUGE||e.type===A.UP_DOWN_COUNTER||e.type===A.OBSERVABLE_GAUGE||e.type===A.OBSERVABLE_UP_DOWN_COUNTER;return{attributes:u,startTime:c.startTime,endTime:i,value:{min:s.hasMinMax?s.min:void 0,max:s.hasMinMax?s.max:void 0,sum:l?void 0:s.sum,positive:{offset:s.positive.offset,bucketCounts:s.positive.bucketCounts},negative:{offset:s.negative.offset,bucketCounts:s.negative.bucketCounts},count:s.count,scale:s.scale,zeroCount:s.zeroCount}}})}},t}(),oE=ke("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function aE(t){return t.setValue(oE,!0)}function sE(){return function(t){T.error(uE(t))}}function uE(t){return typeof t=="string"?t:JSON.stringify(cE(t))}function cE(t){for(var e={},n=t;n!==null;)Object.getOwnPropertyNames(n).forEach(function(r){if(!e[r]){var i=n[r];i&&(e[r]=String(i))}}),n=Object.getPrototypeOf(n);return e}var lE=sE();function mu(t){try{lE(t)}catch{}}var pE=6,fE=Math.pow(10,pE);function qi(t){var e=t/1e3,n=Math.trunc(e),r=Math.round(t%1e3*fE);return[n,r]}function Fn(t){return t[0]*1e6+t[1]/1e3}var zi;(function(t){t[t.SUCCESS=0]="SUCCESS",t[t.FAILED=1]="FAILED"})(zi||(zi={}));function hE(t,e){return new Promise(function(n){C.with(aE(C.active()),function(){t.export(e,function(r){n(r)})})})}var dE={_export:hE},vE=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},Xi=function(){function t(e,n,r){n===void 0&&(n=0),r===void 0&&(r=[0,0]),this.startTime=e,this._current=n,this.sampleTime=r}return t.prototype.record=function(e){this._current=e,this.sampleTime=qi(Date.now())},t.prototype.setStartTime=function(e){this.startTime=e},t.prototype.toPointValue=function(){return this._current},t}(),yE=function(){function t(){this.kind=Vt.LAST_VALUE}return t.prototype.createAccumulation=function(e){return new Xi(e)},t.prototype.merge=function(e,n){var r=Fn(n.sampleTime)>=Fn(e.sampleTime)?n:e;return new Xi(e.startTime,r.toPointValue(),r.sampleTime)},t.prototype.diff=function(e,n){var r=Fn(n.sampleTime)>=Fn(e.sampleTime)?n:e;return new Xi(n.startTime,r.toPointValue(),r.sampleTime)},t.prototype.toMetricData=function(e,n,r,i){return{descriptor:e,aggregationTemporality:n,dataPointType:vt.GAUGE,dataPoints:r.map(function(o){var a=vE(o,2),u=a[0],c=a[1];return{attributes:u,startTime:c.startTime,endTime:i,value:c.toPointValue()}})}},t}(),mE=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},Qe=function(){function t(e,n,r,i){r===void 0&&(r=0),i===void 0&&(i=!1),this.startTime=e,this.monotonic=n,this._current=r,this.reset=i}return t.prototype.record=function(e){this.monotonic&&e<0||(this._current+=e)},t.prototype.setStartTime=function(e){this.startTime=e},t.prototype.toPointValue=function(){return this._current},t}(),_u=function(){function t(e){this.monotonic=e,this.kind=Vt.SUM}return t.prototype.createAccumulation=function(e){return new Qe(e,this.monotonic)},t.prototype.merge=function(e,n){var r=e.toPointValue(),i=n.toPointValue();return n.reset?new Qe(n.startTime,this.monotonic,i,n.reset):new Qe(e.startTime,this.monotonic,r+i)},t.prototype.diff=function(e,n){var r=e.toPointValue(),i=n.toPointValue();return this.monotonic&&r>i?new Qe(n.startTime,this.monotonic,i,!0):new Qe(n.startTime,this.monotonic,i-r)},t.prototype.toMetricData=function(e,n,r,i){return{descriptor:e,aggregationTemporality:n,dataPointType:vt.SUM,dataPoints:r.map(function(o){var a=mE(o,2),u=a[0],c=a[1];return{attributes:u,startTime:c.startTime,endTime:i,value:c.toPointValue()}}),isMonotonic:this.monotonic}},t}(),Ht=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Et=function(){function t(){}return t.Drop=function(){return gu},t.Sum=function(){return Eu},t.LastValue=function(){return Tu},t.Histogram=function(){return bu},t.ExponentialHistogram=function(){return wE},t.Default=function(){return AE},t}(),_E=function(t){Ht(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.createAggregator=function(n){return e.DEFAULT_INSTANCE},e.DEFAULT_INSTANCE=new jg,e}(Et),gE=function(t){Ht(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.createAggregator=function(n){switch(n.type){case A.COUNTER:case A.OBSERVABLE_COUNTER:case A.HISTOGRAM:return e.MONOTONIC_INSTANCE;default:return e.NON_MONOTONIC_INSTANCE}},e.MONOTONIC_INSTANCE=new _u(!0),e.NON_MONOTONIC_INSTANCE=new _u(!1),e}(Et),EE=function(t){Ht(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.createAggregator=function(n){return e.DEFAULT_INSTANCE},e.DEFAULT_INSTANCE=new yE,e}(Et),TE=function(t){Ht(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.createAggregator=function(n){return e.DEFAULT_INSTANCE},e.DEFAULT_INSTANCE=new uu([0,5,10,25,50,75,100,250,500,750,1e3,2500,5e3,7500,1e4],!0),e}(Et),bE=function(t){Ht(e,t);function e(n,r){r===void 0&&(r=!0);var i=t.call(this)||this;if(i._recordMinMax=r,n==null)throw new Error("ExplicitBucketHistogramAggregation should be created with explicit boundaries, if a single bucket histogram is required, please pass an empty array");n=n.concat(),n=n.sort(function(u,c){return u-c});var o=n.lastIndexOf(-1/0),a=n.indexOf(1/0);return a===-1&&(a=void 0),i._boundaries=n.slice(o+1,a),i}return e.prototype.createAggregator=function(n){return new uu(this._boundaries,this._recordMinMax)},e}(Et),OE=function(t){Ht(e,t);function e(n,r){n===void 0&&(n=160),r===void 0&&(r=!0);var i=t.call(this)||this;return i._maxSize=n,i._recordMinMax=r,i}return e.prototype.createAggregator=function(n){return new iE(this._maxSize,this._recordMinMax)},e}(Et),SE=function(t){Ht(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype._resolve=function(n){switch(n.type){case A.COUNTER:case A.UP_DOWN_COUNTER:case A.OBSERVABLE_COUNTER:case A.OBSERVABLE_UP_DOWN_COUNTER:return Eu;case A.GAUGE:case A.OBSERVABLE_GAUGE:return Tu;case A.HISTOGRAM:return n.advice.explicitBucketBoundaries?new bE(n.advice.explicitBucketBoundaries):bu}return T.warn("Unable to recognize instrument type: "+n.type),gu},e.prototype.createAggregator=function(n){return this._resolve(n).createAggregator(n)},e}(Et),gu=new _E,Eu=new gE,Tu=new EE,bu=new TE,wE=new OE,AE=new SE,LE=function(t){return Et.Default()},RE=function(t){return pt.CUMULATIVE},Ki=function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function u(l){try{s(r.next(l))}catch(p){a(p)}}function c(l){try{s(r.throw(l))}catch(p){a(p)}}function s(l){l.done?o(l.value):i(l.value).then(u,c)}s((r=r.apply(t,[])).next())})},Wi=function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(l){return c([s,l])}}function c(s){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,i=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){n.label=s[1];break}if(s[0]===6&&n.label<o[1]){n.label=o[1],o=s;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(s);break}o[2]&&n.ops.pop(),n.trys.pop();continue}s=e.call(t,n)}catch(l){s=[6,l],i=0}finally{r=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},Ou=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},CE=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},NE=function(){function t(e){var n,r,i;this._shutdown=!1,this._aggregationSelector=(n=e?.aggregationSelector)!==null&&n!==void 0?n:LE,this._aggregationTemporalitySelector=(r=e?.aggregationTemporalitySelector)!==null&&r!==void 0?r:RE,this._metricProducers=(i=e?.metricProducers)!==null&&i!==void 0?i:[],this._cardinalitySelector=e?.cardinalitySelector}return t.prototype.setMetricProducer=function(e){if(this._sdkMetricProducer)throw new Error("MetricReader can not be bound to a MeterProvider again.");this._sdkMetricProducer=e,this.onInitialized()},t.prototype.selectAggregation=function(e){return this._aggregationSelector(e)},t.prototype.selectAggregationTemporality=function(e){return this._aggregationTemporalitySelector(e)},t.prototype.selectCardinalityLimit=function(e){return this._cardinalitySelector?this._cardinalitySelector(e):2e3},t.prototype.onInitialized=function(){},t.prototype.collect=function(e){return Ki(this,void 0,void 0,function(){var n,r,i,o,a,u;return Wi(this,function(c){switch(c.label){case 0:if(this._sdkMetricProducer===void 0)throw new Error("MetricReader is not bound to a MetricProducer");if(this._shutdown)throw new Error("MetricReader is shutdown");return[4,Promise.all(CE([this._sdkMetricProducer.collect({timeoutMillis:e?.timeoutMillis})],Ou(this._metricProducers.map(function(s){return s.collect({timeoutMillis:e?.timeoutMillis})})),!1))];case 1:return n=Ou.apply(void 0,[c.sent()]),r=n[0],i=n.slice(1),o=r.errors.concat(su(i,function(s){return s.errors})),a=r.resourceMetrics.resource,u=r.resourceMetrics.scopeMetrics.concat(su(i,function(s){return s.resourceMetrics.scopeMetrics})),[2,{resourceMetrics:{resource:a,scopeMetrics:u},errors:o}]}})})},t.prototype.shutdown=function(e){return Ki(this,void 0,void 0,function(){return Wi(this,function(n){switch(n.label){case 0:return this._shutdown?(T.error("Cannot call shutdown twice."),[2]):e?.timeoutMillis!=null?[3,2]:[4,this.onShutdown()];case 1:return n.sent(),[3,4];case 2:return[4,Ye(this.onShutdown(),e.timeoutMillis)];case 3:n.sent(),n.label=4;case 4:return this._shutdown=!0,[2]}})})},t.prototype.forceFlush=function(e){return Ki(this,void 0,void 0,function(){return Wi(this,function(n){switch(n.label){case 0:return this._shutdown?(T.warn("Cannot forceFlush on already shutdown MetricReader."),[2]):e?.timeoutMillis!=null?[3,2]:[4,this.onForceFlush()];case 1:return n.sent(),[2];case 2:return[4,Ye(this.onForceFlush(),e.timeoutMillis)];case 3:return n.sent(),[2]}})})},t}(),xE=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Vn=function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function u(l){try{s(r.next(l))}catch(p){a(p)}}function c(l){try{s(r.throw(l))}catch(p){a(p)}}function s(l){l.done?o(l.value):i(l.value).then(u,c)}s((r=r.apply(t,[])).next())})},Hn=function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(l){return c([s,l])}}function c(s){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,i=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){n.label=s[1];break}if(s[0]===6&&n.label<o[1]){n.label=o[1],o=s;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(s);break}o[2]&&n.ops.pop(),n.trys.pop();continue}s=e.call(t,n)}catch(l){s=[6,l],i=0}finally{r=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},PE=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},IE=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},ME=function(t){xE(e,t);function e(n){var r,i,o,a,u=t.call(this,{aggregationSelector:(r=n.exporter.selectAggregation)===null||r===void 0?void 0:r.bind(n.exporter),aggregationTemporalitySelector:(i=n.exporter.selectAggregationTemporality)===null||i===void 0?void 0:i.bind(n.exporter),metricProducers:n.metricProducers})||this;if(n.exportIntervalMillis!==void 0&&n.exportIntervalMillis<=0)throw Error("exportIntervalMillis must be greater than 0");if(n.exportTimeoutMillis!==void 0&&n.exportTimeoutMillis<=0)throw Error("exportTimeoutMillis must be greater than 0");if(n.exportTimeoutMillis!==void 0&&n.exportIntervalMillis!==void 0&&n.exportIntervalMillis<n.exportTimeoutMillis)throw Error("exportIntervalMillis must be greater than or equal to exportTimeoutMillis");return u._exportInterval=(o=n.exportIntervalMillis)!==null&&o!==void 0?o:6e4,u._exportTimeout=(a=n.exportTimeoutMillis)!==null&&a!==void 0?a:3e4,u._exporter=n.exporter,u}return e.prototype._runOnce=function(){return Vn(this,void 0,void 0,function(){var n;return Hn(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,Ye(this._doRun(),this._exportTimeout)];case 1:return r.sent(),[3,3];case 2:return n=r.sent(),n instanceof au?(T.error("Export took longer than %s milliseconds and timed out.",this._exportTimeout),[2]):(mu(n),[3,3]);case 3:return[2]}})})},e.prototype._doRun=function(){var n,r;return Vn(this,void 0,void 0,function(){var i,o,a,u,c,s;return Hn(this,function(l){switch(l.label){case 0:return[4,this.collect({timeoutMillis:this._exportTimeout})];case 1:if(i=l.sent(),o=i.resourceMetrics,a=i.errors,a.length>0&&(s=T).error.apply(s,IE(["PeriodicExportingMetricReader: metrics collection errors"],PE(a),!1)),!o.resource.asyncAttributesPending)return[3,5];l.label=2;case 2:return l.trys.push([2,4,,5]),[4,(r=(n=o.resource).waitForAsyncAttributes)===null||r===void 0?void 0:r.call(n)];case 3:return l.sent(),[3,5];case 4:return u=l.sent(),T.debug("Error while resolving async portion of resource: ",u),mu(u),[3,5];case 5:return o.scopeMetrics.length===0?[2]:[4,dE._export(this._exporter,o)];case 6:if(c=l.sent(),c.code!==zi.SUCCESS)throw new Error("PeriodicExportingMetricReader: metrics export failed (error "+c.error+")");return[2]}})})},e.prototype.onInitialized=function(){var n=this;this._interval=setInterval(function(){n._runOnce()},this._exportInterval)},e.prototype.onForceFlush=function(){return Vn(this,void 0,void 0,function(){return Hn(this,function(n){switch(n.label){case 0:return[4,this._runOnce()];case 1:return n.sent(),[4,this._exporter.forceFlush()];case 2:return n.sent(),[2]}})})},e.prototype.onShutdown=function(){return Vn(this,void 0,void 0,function(){return Hn(this,function(n){switch(n.label){case 0:return this._interval&&clearInterval(this._interval),[4,this.onForceFlush()];case 1:return n.sent(),[4,this._exporter.shutdown()];case 2:return n.sent(),[2]}})})},e}(NE),kE=function(){function t(){this._registeredViews=[]}return t.prototype.addView=function(e){this._registeredViews.push(e)},t.prototype.findViews=function(e,n){var r=this,i=this._registeredViews.filter(function(o){return r._matchInstrument(o.instrumentSelector,e)&&r._matchMeter(o.meterSelector,n)});return i},t.prototype._matchInstrument=function(e,n){return(e.getType()===void 0||n.type===e.getType())&&e.getNameFilter().match(n.name)&&e.getUnitFilter().match(n.unit)},t.prototype._matchMeter=function(e,n){return e.getNameFilter().match(n.name)&&(n.version===void 0||e.getVersionFilter().match(n.version))&&(n.schemaUrl===void 0||e.getSchemaUrlFilter().match(n.schemaUrl))},t}(),Gt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Gn=function(){function t(e,n){this._writableMetricStorage=e,this._descriptor=n}return t.prototype._record=function(e,n,r){if(n===void 0&&(n={}),r===void 0&&(r=C.active()),typeof e!="number"){T.warn("non-number value provided to metric "+this._descriptor.name+": "+e);return}this._descriptor.valueType===St.INT&&!Number.isInteger(e)&&(T.warn("INT value type cannot accept a floating-point value for "+this._descriptor.name+", ignoring the fractional digits."),e=Math.trunc(e),!Number.isInteger(e))||this._writableMetricStorage.record(e,n,r,qi(Date.now()))},t}(),DE=function(t){Gt(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.add=function(n,r,i){this._record(n,r,i)},e}(Gn),UE=function(t){Gt(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.add=function(n,r,i){if(n<0){T.warn("negative value provided to counter "+this._descriptor.name+": "+n);return}this._record(n,r,i)},e}(Gn),jE=function(t){Gt(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.record=function(n,r,i){this._record(n,r,i)},e}(Gn),BE=function(t){Gt(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.record=function(n,r,i){if(n<0){T.warn("negative value provided to histogram "+this._descriptor.name+": "+n);return}this._record(n,r,i)},e}(Gn),qn=function(){function t(e,n,r){this._observableRegistry=r,this._descriptor=e,this._metricStorages=n}return t.prototype.addCallback=function(e){this._observableRegistry.addCallback(e,this)},t.prototype.removeCallback=function(e){this._observableRegistry.removeCallback(e,this)},t}(),$E=function(t){Gt(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(qn),FE=function(t){Gt(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(qn),VE=function(t){Gt(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(qn);function Yi(t){return t instanceof qn}var HE=function(){function t(e){this._meterSharedState=e}return t.prototype.createGauge=function(e,n){var r=Ct(e,A.GAUGE,n),i=this._meterSharedState.registerMetricStorage(r);return new jE(i,r)},t.prototype.createHistogram=function(e,n){var r=Ct(e,A.HISTOGRAM,n),i=this._meterSharedState.registerMetricStorage(r);return new BE(i,r)},t.prototype.createCounter=function(e,n){var r=Ct(e,A.COUNTER,n),i=this._meterSharedState.registerMetricStorage(r);return new UE(i,r)},t.prototype.createUpDownCounter=function(e,n){var r=Ct(e,A.UP_DOWN_COUNTER,n),i=this._meterSharedState.registerMetricStorage(r);return new DE(i,r)},t.prototype.createObservableGauge=function(e,n){var r=Ct(e,A.OBSERVABLE_GAUGE,n),i=this._meterSharedState.registerAsyncMetricStorage(r);return new FE(r,i,this._meterSharedState.observableRegistry)},t.prototype.createObservableCounter=function(e,n){var r=Ct(e,A.OBSERVABLE_COUNTER,n),i=this._meterSharedState.registerAsyncMetricStorage(r);return new $E(r,i,this._meterSharedState.observableRegistry)},t.prototype.createObservableUpDownCounter=function(e,n){var r=Ct(e,A.OBSERVABLE_UP_DOWN_COUNTER,n),i=this._meterSharedState.registerAsyncMetricStorage(r);return new VE(r,i,this._meterSharedState.observableRegistry)},t.prototype.addBatchObservableCallback=function(e,n){this._meterSharedState.observableRegistry.addBatchCallback(e,n)},t.prototype.removeBatchObservableCallback=function(e,n){this._meterSharedState.observableRegistry.removeBatchCallback(e,n)},t}(),Su=function(){function t(e){this._instrumentDescriptor=e}return t.prototype.getInstrumentDescriptor=function(){return this._instrumentDescriptor},t.prototype.updateDescription=function(e){this._instrumentDescriptor=Ct(this._instrumentDescriptor.name,this._instrumentDescriptor.type,{description:e,valueType:this._instrumentDescriptor.valueType,unit:this._instrumentDescriptor.unit,advice:this._instrumentDescriptor.advice})},t}(),GE=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),wu=function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(l){return c([s,l])}}function c(s){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,i=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){n.label=s[1];break}if(s[0]===6&&n.label<o[1]){n.label=o[1],o=s;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(s);break}o[2]&&n.ops.pop(),n.trys.pop();continue}s=e.call(t,n)}catch(l){s=[6,l],i=0}finally{r=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},qE=function(){function t(e){this._hash=e,this._valueMap=new Map,this._keyMap=new Map}return t.prototype.get=function(e,n){return n!=null||(n=this._hash(e)),this._valueMap.get(n)},t.prototype.getOrDefault=function(e,n){var r=this._hash(e);if(this._valueMap.has(r))return this._valueMap.get(r);var i=n();return this._keyMap.has(r)||this._keyMap.set(r,e),this._valueMap.set(r,i),i},t.prototype.set=function(e,n,r){r!=null||(r=this._hash(e)),this._keyMap.has(r)||this._keyMap.set(r,e),this._valueMap.set(r,n)},t.prototype.has=function(e,n){return n!=null||(n=this._hash(e)),this._valueMap.has(n)},t.prototype.keys=function(){var e,n;return wu(this,function(r){switch(r.label){case 0:e=this._keyMap.entries(),n=e.next(),r.label=1;case 1:return n.done===!0?[3,3]:[4,[n.value[1],n.value[0]]];case 2:return r.sent(),n=e.next(),[3,1];case 3:return[2]}})},t.prototype.entries=function(){var e,n;return wu(this,function(r){switch(r.label){case 0:e=this._valueMap.entries(),n=e.next(),r.label=1;case 1:return n.done===!0?[3,3]:[4,[this._keyMap.get(n.value[0]),n.value[1],n.value[0]]];case 2:return r.sent(),n=e.next(),[3,1];case 3:return[2]}})},Object.defineProperty(t.prototype,"size",{get:function(){return this._valueMap.size},enumerable:!1,configurable:!0}),t}(),qt=function(t){GE(e,t);function e(){return t.call(this,ou)||this}return e}(qE),zE=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},Au=function(){function t(e,n){this._aggregator=e,this._activeCollectionStorage=new qt,this._cumulativeMemoStorage=new qt,this._overflowAttributes={"otel.metric.overflow":!0},this._cardinalityLimit=(n??2e3)-1,this._overflowHashCode=ou(this._overflowAttributes)}return t.prototype.record=function(e,n,r,i){var o=this,a=this._activeCollectionStorage.get(n);if(!a){if(this._activeCollectionStorage.size>=this._cardinalityLimit){var u=this._activeCollectionStorage.getOrDefault(this._overflowAttributes,function(){return o._aggregator.createAccumulation(i)});u?.record(e);return}a=this._aggregator.createAccumulation(i),this._activeCollectionStorage.set(n,a)}a?.record(e)},t.prototype.batchCumulate=function(e,n){var r=this;Array.from(e.entries()).forEach(function(i){var o=zE(i,3),a=o[0],u=o[1],c=o[2],s=r._aggregator.createAccumulation(n);s?.record(u);var l=s;if(r._cumulativeMemoStorage.has(a,c)){var p=r._cumulativeMemoStorage.get(a,c);l=r._aggregator.diff(p,s)}else if(r._cumulativeMemoStorage.size>=r._cardinalityLimit&&(a=r._overflowAttributes,c=r._overflowHashCode,r._cumulativeMemoStorage.has(a,c))){var p=r._cumulativeMemoStorage.get(a,c);l=r._aggregator.diff(p,s)}if(r._activeCollectionStorage.has(a,c)){var f=r._activeCollectionStorage.get(a,c);l=r._aggregator.merge(f,l)}r._cumulativeMemoStorage.set(a,s,c),r._activeCollectionStorage.set(a,l,c)})},t.prototype.collect=function(){var e=this._activeCollectionStorage;return this._activeCollectionStorage=new qt,e},t}(),Ji=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Lu=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},Ru=function(){function t(e,n){var r=this;this._aggregator=e,this._unreportedAccumulations=new Map,this._reportHistory=new Map,n.forEach(function(i){r._unreportedAccumulations.set(i,[])})}return t.prototype.buildMetrics=function(e,n,r,i){this._stashAccumulations(r);var o=this._getMergedUnreportedAccumulations(e),a=o,u;if(this._reportHistory.has(e)){var c=this._reportHistory.get(e),s=c.collectionTime;u=c.aggregationTemporality,u===pt.CUMULATIVE?a=t.merge(c.accumulations,o,this._aggregator):a=t.calibrateStartTime(c.accumulations,o,s)}else u=e.selectAggregationTemporality(n.type);this._reportHistory.set(e,{accumulations:a,collectionTime:i,aggregationTemporality:u});var l=XE(a);if(l.length!==0)return this._aggregator.toMetricData(n,u,l,i)},t.prototype._stashAccumulations=function(e){var n,r,i=this._unreportedAccumulations.keys();try{for(var o=Ji(i),a=o.next();!a.done;a=o.next()){var u=a.value,c=this._unreportedAccumulations.get(u);c===void 0&&(c=[],this._unreportedAccumulations.set(u,c)),c.push(e)}}catch(s){n={error:s}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}},t.prototype._getMergedUnreportedAccumulations=function(e){var n,r,i=new qt,o=this._unreportedAccumulations.get(e);if(this._unreportedAccumulations.set(e,[]),o===void 0)return i;try{for(var a=Ji(o),u=a.next();!u.done;u=a.next()){var c=u.value;i=t.merge(i,c,this._aggregator)}}catch(s){n={error:s}}finally{try{u&&!u.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return i},t.merge=function(e,n,r){for(var i=e,o=n.entries(),a=o.next();a.done!==!0;){var u=Lu(a.value,3),c=u[0],s=u[1],l=u[2];if(e.has(c,l)){var p=e.get(c,l),f=r.merge(p,s);i.set(c,f,l)}else i.set(c,s,l);a=o.next()}return i},t.calibrateStartTime=function(e,n,r){var i,o;try{for(var a=Ji(e.keys()),u=a.next();!u.done;u=a.next()){var c=Lu(u.value,2),s=c[0],l=c[1],p=n.get(s,l);p?.setStartTime(r)}}catch(f){i={error:f}}finally{try{u&&!u.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}return n},t}();function XE(t){return Array.from(t.entries())}var KE=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),WE=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},YE=function(t){KE(e,t);function e(n,r,i,o,a){var u=t.call(this,n)||this;return u._attributesProcessor=i,u._aggregationCardinalityLimit=a,u._deltaMetricStorage=new Au(r,u._aggregationCardinalityLimit),u._temporalMetricStorage=new Ru(r,o),u}return e.prototype.record=function(n,r){var i=this,o=new qt;Array.from(n.entries()).forEach(function(a){var u=WE(a,2),c=u[0],s=u[1];o.set(i._attributesProcessor.process(c),s)}),this._deltaMetricStorage.batchCumulate(o,r)},e.prototype.collect=function(n,r){var i=this._deltaMetricStorage.collect();return this._temporalMetricStorage.buildMetrics(n,this._instrumentDescriptor,i,r)},e}(Su);function Cu(t,e){var n="";return t.unit!==e.unit&&(n+=" - Unit '"+t.unit+"' does not match '"+e.unit+`'
|
|
297
|
+
`),t.type!==e.type&&(n+=" - Type '"+t.type+"' does not match '"+e.type+`'
|
|
298
|
+
`),t.valueType!==e.valueType&&(n+=" - Value Type '"+t.valueType+"' does not match '"+e.valueType+`'
|
|
299
|
+
`),t.description!==e.description&&(n+=" - Description '"+t.description+"' does not match '"+e.description+`'
|
|
300
|
+
`),n}function JE(t,e){return" - use valueType '"+t.valueType+"' on instrument creation or use an instrument name other than '"+e.name+"'"}function QE(t,e){return" - use unit '"+t.unit+"' on instrument creation or use an instrument name other than '"+e.name+"'"}function ZE(t,e){var n={name:e.name,type:e.type,unit:e.unit},r=JSON.stringify(n);return" - create a new view with a name other than '"+t.name+"' and InstrumentSelector '"+r+"'"}function tT(t,e){var n={name:e.name,type:e.type,unit:e.unit},r=JSON.stringify(n);return" - create a new view with a name other than '"+t.name+"' and InstrumentSelector '"+r+`'
|
|
301
|
+
- OR - create a new view with the name `+t.name+" and description '"+t.description+"' and InstrumentSelector "+r+`
|
|
302
|
+
- OR - create a new view with the name `+e.name+" and description '"+t.description+"' and InstrumentSelector "+r}function Nu(t,e){return t.valueType!==e.valueType?JE(t,e):t.unit!==e.unit?QE(t,e):t.type!==e.type?ZE(t,e):t.description!==e.description?tT(t,e):""}var Qi=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},eT=function(){function t(){this._sharedRegistry=new Map,this._perCollectorRegistry=new Map}return t.create=function(){return new t},t.prototype.getStorages=function(e){var n,r,i,o,a=[];try{for(var u=Qi(this._sharedRegistry.values()),c=u.next();!c.done;c=u.next()){var s=c.value;a=a.concat(s)}}catch(y){n={error:y}}finally{try{c&&!c.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}var l=this._perCollectorRegistry.get(e);if(l!=null)try{for(var p=Qi(l.values()),f=p.next();!f.done;f=p.next()){var s=f.value;a=a.concat(s)}}catch(y){i={error:y}}finally{try{f&&!f.done&&(o=p.return)&&o.call(p)}finally{if(i)throw i.error}}return a},t.prototype.register=function(e){this._registerStorage(e,this._sharedRegistry)},t.prototype.registerForCollector=function(e,n){var r=this._perCollectorRegistry.get(e);r==null&&(r=new Map,this._perCollectorRegistry.set(e,r)),this._registerStorage(n,r)},t.prototype.findOrUpdateCompatibleStorage=function(e){var n=this._sharedRegistry.get(e.name);return n===void 0?null:this._findOrUpdateCompatibleStorage(e,n)},t.prototype.findOrUpdateCompatibleCollectorStorage=function(e,n){var r=this._perCollectorRegistry.get(e);if(r===void 0)return null;var i=r.get(n.name);return i===void 0?null:this._findOrUpdateCompatibleStorage(n,i)},t.prototype._registerStorage=function(e,n){var r=e.getInstrumentDescriptor(),i=n.get(r.name);if(i===void 0){n.set(r.name,[e]);return}i.push(e)},t.prototype._findOrUpdateCompatibleStorage=function(e,n){var r,i,o=null;try{for(var a=Qi(n),u=a.next();!u.done;u=a.next()){var c=u.value,s=c.getInstrumentDescriptor();$g(s,e)?(s.description!==e.description&&(e.description.length>s.description.length&&c.updateDescription(e.description),T.warn("A view or instrument with the name ",e.name,` has already been registered, but has a different description and is incompatible with another registered view.
|
|
303
303
|
`,`Details:
|
|
304
|
-
`,
|
|
305
|
-
To resolve the conflict:`,
|
|
304
|
+
`,Cu(s,e),`The longer description will be used.
|
|
305
|
+
To resolve the conflict:`,Nu(s,e))),o=c):T.warn("A view or instrument with the name ",e.name,` has already been registered and is incompatible with another registered view.
|
|
306
306
|
`,`Details:
|
|
307
|
-
`,
|
|
308
|
-
`,Su(s,e))}}catch(l){n={error:l}}finally{try{u&&!u.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}return o},t}(),YE=function(){function t(e){this._backingStorages=e}return t.prototype.record=function(e,r,n,i){this._backingStorages.forEach(function(o){o.record(e,r,n,i)})},t}(),JE=function(){function t(e,r){this._instrumentName=e,this._valueType=r,this._buffer=new Ht}return t.prototype.observe=function(e,r){if(r===void 0&&(r={}),typeof e!="number"){T.warn("non-number value provided to metric "+this._instrumentName+": "+e);return}this._valueType===St.INT&&!Number.isInteger(e)&&(T.warn("INT value type cannot accept a floating-point value for "+this._instrumentName+", ignoring the fractional digits."),e=Math.trunc(e),!Number.isInteger(e))||this._buffer.set(r,e)},t}(),QE=function(){function t(){this._buffer=new Map}return t.prototype.observe=function(e,r,n){if(n===void 0&&(n={}),!!qi(e)){var i=this._buffer.get(e);if(i==null&&(i=new Ht,this._buffer.set(e,i)),typeof r!="number"){T.warn("non-number value provided to metric "+e._descriptor.name+": "+r);return}e._descriptor.valueType===St.INT&&!Number.isInteger(r)&&(T.warn("INT value type cannot accept a floating-point value for "+e._descriptor.name+", ignoring the fractional digits."),r=Math.trunc(r),!Number.isInteger(r))||i.set(n,r)}},t}(),Yi=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function u(l){try{s(n.next(l))}catch(p){a(p)}}function c(l){try{s(n.throw(l))}catch(p){a(p)}}function s(l){l.done?o(l.value):i(l.value).then(u,c)}s((n=n.apply(t,[])).next())})},Ji=function(t,e){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(l){return c([s,l])}}function c(s){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return r.label++,{value:s[1],done:!1};case 5:r.label++,i=s[1],s=[0];continue;case 7:s=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){r.label=s[1];break}if(s[0]===6&&r.label<o[1]){r.label=o[1],o=s;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(s);break}o[2]&&r.ops.pop(),r.trys.pop();continue}s=e.call(t,r)}catch(l){s=[6,l],i=0}finally{n=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},wu=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,o=[],a;try{for(;!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},Au=function(t,e,r){if(arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return t.concat(o||Array.prototype.slice.call(e))},ZE=function(){function t(){this._callbacks=[],this._batchCallbacks=[]}return t.prototype.addCallback=function(e,r){var n=this._findCallback(e,r);n>=0||this._callbacks.push({callback:e,instrument:r})},t.prototype.removeCallback=function(e,r){var n=this._findCallback(e,r);n<0||this._callbacks.splice(n,1)},t.prototype.addBatchCallback=function(e,r){var n=new Set(r.filter(qi));if(n.size===0){T.error("BatchObservableCallback is not associated with valid instruments",r);return}var i=this._findBatchCallback(e,n);i>=0||this._batchCallbacks.push({callback:e,instruments:n})},t.prototype.removeBatchCallback=function(e,r){var n=new Set(r.filter(qi)),i=this._findBatchCallback(e,n);i<0||this._batchCallbacks.splice(i,1)},t.prototype.observe=function(e,r){return Yi(this,void 0,void 0,function(){var n,i,o,a;return Ji(this,function(u){switch(u.label){case 0:return n=this._observeCallbacks(e,r),i=this._observeBatchCallbacks(e,r),[4,Lg(Au(Au([],wu(n),!1),wu(i),!1))];case 1:return o=u.sent(),a=o.filter(Rg).map(function(c){return c.reason}),[2,a]}})})},t.prototype._observeCallbacks=function(e,r){var n=this;return this._callbacks.map(function(i){var o=i.callback,a=i.instrument;return Yi(n,void 0,void 0,function(){var u,c;return Ji(this,function(s){switch(s.label){case 0:return u=new JE(a._descriptor.name,a._descriptor.valueType),c=Promise.resolve(o(u)),r!=null&&(c=Xe(c,r)),[4,c];case 1:return s.sent(),a._metricStorages.forEach(function(l){l.record(u._buffer,e)}),[2]}})})})},t.prototype._observeBatchCallbacks=function(e,r){var n=this;return this._batchCallbacks.map(function(i){var o=i.callback,a=i.instruments;return Yi(n,void 0,void 0,function(){var u,c;return Ji(this,function(s){switch(s.label){case 0:return u=new QE,c=Promise.resolve(o(u)),r!=null&&(c=Xe(c,r)),[4,c];case 1:return s.sent(),a.forEach(function(l){var p=u._buffer.get(l);p!=null&&l._metricStorages.forEach(function(f){f.record(p,e)})}),[2]}})})})},t.prototype._findCallback=function(e,r){return this._callbacks.findIndex(function(n){return n.callback===e&&n.instrument===r})},t.prototype._findBatchCallback=function(e,r){return this._batchCallbacks.findIndex(function(n){return n.callback===e&&Ng(n.instruments,r)})},t}(),tT=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),eT=function(t){tT(e,t);function e(r,n,i,o,a){var u=t.call(this,r)||this;return u._attributesProcessor=i,u._aggregationCardinalityLimit=a,u._deltaMetricStorage=new Eu(n,u._aggregationCardinalityLimit),u._temporalMetricStorage=new bu(n,o),u}return e.prototype.record=function(r,n,i,o){n=this._attributesProcessor.process(n,i),this._deltaMetricStorage.record(r,n,i,o)},e.prototype.collect=function(r,n){var i=this._deltaMetricStorage.collect();return this._temporalMetricStorage.buildMetrics(r,this._instrumentDescriptor,i,n)},e}(_u),Lu=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Qi=function(){function t(){}return t.Noop=function(){return nT},t}(),rT=function(t){Lu(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.process=function(r,n){return r},e}(Qi);(function(t){Lu(e,t);function e(r){var n=t.call(this)||this;return n._allowedAttributeNames=r,n}return e.prototype.process=function(r,n){var i=this,o={};return Object.keys(r).filter(function(a){return i._allowedAttributeNames.includes(a)}).forEach(function(a){return o[a]=r[a]}),o},e})(Qi);var nT=new rT,iT=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function u(l){try{s(n.next(l))}catch(p){a(p)}}function c(l){try{s(n.throw(l))}catch(p){a(p)}}function s(l){l.done?o(l.value):i(l.value).then(u,c)}s((n=n.apply(t,[])).next())})},oT=function(t,e){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(l){return c([s,l])}}function c(s){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return r.label++,{value:s[1],done:!1};case 5:r.label++,i=s[1],s=[0];continue;case 7:s=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){r.label=s[1];break}if(s[0]===6&&r.label<o[1]){r.label=o[1],o=s;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(s);break}o[2]&&r.ops.pop(),r.trys.pop();continue}s=e.call(t,r)}catch(l){s=[6,l],i=0}finally{n=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},aT=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},sT=function(){function t(e,r){this._meterProviderSharedState=e,this._instrumentationScope=r,this.metricStorageRegistry=new WE,this.observableRegistry=new ZE,this.meter=new UE(this)}return t.prototype.registerMetricStorage=function(e){var r=this._registerMetricStorage(e,eT);return r.length===1?r[0]:new YE(r)},t.prototype.registerAsyncMetricStorage=function(e){var r=this._registerMetricStorage(e,HE);return r},t.prototype.collect=function(e,r,n){return iT(this,void 0,void 0,function(){var i,o,a;return oT(this,function(u){switch(u.label){case 0:return[4,this.observableRegistry.observe(r,n?.timeoutMillis)];case 1:return i=u.sent(),o=this.metricStorageRegistry.getStorages(e),o.length===0?[2,null]:(a=o.map(function(c){return c.collect(e,r)}).filter(wg),a.length===0?[2,{errors:i}]:[2,{scopeMetrics:{scope:this._instrumentationScope,metrics:a},errors:i}])}})})},t.prototype._registerMetricStorage=function(e,r){var n=this,i=this._meterProviderSharedState.viewRegistry.findViews(e,this._instrumentationScope),o=i.map(function(c){var s=Ig(c,e),l=n.metricStorageRegistry.findOrUpdateCompatibleStorage(s);if(l!=null)return l;var p=c.aggregation.createAggregator(s),f=new r(s,p,c.attributesProcessor,n._meterProviderSharedState.metricCollectors,c.aggregationCardinalityLimit);return n.metricStorageRegistry.register(f),f});if(o.length===0){var a=this._meterProviderSharedState.selectAggregations(e.type),u=a.map(function(c){var s=aT(c,2),l=s[0],p=s[1],f=n.metricStorageRegistry.findOrUpdateCompatibleCollectorStorage(l,e);if(f!=null)return f;var y=p.createAggregator(e),v=l.selectCardinalityLimit(e.type),m=new r(e,y,Qi.Noop(),[l],v);return n.metricStorageRegistry.registerForCollector(l,m),m});o=o.concat(u)}return o},t}(),uT=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},cT=function(){function t(e){this.resource=e,this.viewRegistry=new NE,this.metricCollectors=[],this.meterSharedStates=new Map}return t.prototype.getMeterSharedState=function(e){var r=Ag(e),n=this.meterSharedStates.get(r);return n==null&&(n=new sT(this,e),this.meterSharedStates.set(r,n)),n},t.prototype.selectAggregations=function(e){var r,n,i=[];try{for(var o=uT(this.metricCollectors),a=o.next();!a.done;a=o.next()){var u=a.value;i.push([u,u.selectAggregation(e)])}}catch(c){r={error:c}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return i},t}(),Vr=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function u(l){try{s(n.next(l))}catch(p){a(p)}}function c(l){try{s(n.throw(l))}catch(p){a(p)}}function s(l){l.done?o(l.value):i(l.value).then(u,c)}s((n=n.apply(t,[])).next())})},Gr=function(t,e){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(l){return c([s,l])}}function c(s){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return r.label++,{value:s[1],done:!1};case 5:r.label++,i=s[1],s=[0];continue;case 7:s=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){r.label=s[1];break}if(s[0]===6&&r.label<o[1]){r.label=o[1],o=s;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(s);break}o[2]&&r.ops.pop(),r.trys.pop();continue}s=e.call(t,r)}catch(l){s=[6,l],i=0}finally{n=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},lT=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,o=[],a;try{for(;!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},pT=function(t,e,r){if(arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return t.concat(o||Array.prototype.slice.call(e))},fT=function(){function t(e,r){this._sharedState=e,this._metricReader=r}return t.prototype.collect=function(e){return Vr(this,void 0,void 0,function(){var r,n,i,o,a=this;return Gr(this,function(u){switch(u.label){case 0:return r=Vi(Date.now()),n=[],i=[],o=Array.from(this._sharedState.meterSharedStates.values()).map(function(c){return Vr(a,void 0,void 0,function(){var s;return Gr(this,function(l){switch(l.label){case 0:return[4,c.collect(this,r,e)];case 1:return s=l.sent(),s?.scopeMetrics!=null&&n.push(s.scopeMetrics),s?.errors!=null&&i.push.apply(i,pT([],lT(s.errors),!1)),[2]}})})}),[4,Promise.all(o)];case 1:return u.sent(),[2,{resourceMetrics:{resource:this._sharedState.resource,scopeMetrics:n},errors:i}]}})})},t.prototype.forceFlush=function(e){return Vr(this,void 0,void 0,function(){return Gr(this,function(r){switch(r.label){case 0:return[4,this._metricReader.forceFlush(e)];case 1:return r.sent(),[2]}})})},t.prototype.shutdown=function(e){return Vr(this,void 0,void 0,function(){return Gr(this,function(r){switch(r.label){case 0:return[4,this._metricReader.shutdown(e)];case 1:return r.sent(),[2]}})})},t.prototype.selectAggregationTemporality=function(e){return this._metricReader.selectAggregationTemporality(e)},t.prototype.selectAggregation=function(e){return this._metricReader.selectAggregation(e)},t.prototype.selectCardinalityLimit=function(e){var r,n,i;return(i=(n=(r=this._metricReader).selectCardinalityLimit)===null||n===void 0?void 0:n.call(r,e))!==null&&i!==void 0?i:2e3},t}(),Ru=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function u(l){try{s(n.next(l))}catch(p){a(p)}}function c(l){try{s(n.throw(l))}catch(p){a(p)}}function s(l){l.done?o(l.value):i(l.value).then(u,c)}s((n=n.apply(t,[])).next())})},Nu=function(t,e){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(l){return c([s,l])}}function c(s){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return r.label++,{value:s[1],done:!1};case 5:r.label++,i=s[1],s=[0];continue;case 7:s=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){r.label=s[1];break}if(s[0]===6&&r.label<o[1]){r.label=o[1],o=s;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(s);break}o[2]&&r.ops.pop(),r.trys.pop();continue}s=e.call(t,r)}catch(l){s=[6,l],i=0}finally{n=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},Cu=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};function hT(t,e){var r=e??Ve.empty();return t?Ve.default().merge(r):r}var dT=function(){function t(e){var r,n,i,o,a;if(this._shutdown=!1,this._sharedState=new cT(hT((a=e?.mergeResourceWithDefaults)!==null&&a!==void 0?a:!0,e?.resource)),e?.views!=null&&e.views.length>0)try{for(var u=Cu(e.views),c=u.next();!c.done;c=u.next()){var s=c.value;this._sharedState.viewRegistry.addView(s)}}catch(y){r={error:y}}finally{try{c&&!c.done&&(n=u.return)&&n.call(u)}finally{if(r)throw r.error}}if(e?.readers!=null&&e.readers.length>0)try{for(var l=Cu(e.readers),p=l.next();!p.done;p=l.next()){var f=p.value;this.addMetricReader(f)}}catch(y){i={error:y}}finally{try{p&&!p.done&&(o=l.return)&&o.call(l)}finally{if(i)throw i.error}}}return t.prototype.getMeter=function(e,r,n){return r===void 0&&(r=""),n===void 0&&(n={}),this._shutdown?(T.warn("A shutdown MeterProvider cannot provide a Meter"),$f()):this._sharedState.getMeterSharedState({name:e,version:r,schemaUrl:n.schemaUrl}).meter},t.prototype.addMetricReader=function(e){var r=new fT(this._sharedState,e);e.setMetricProducer(r),this._sharedState.metricCollectors.push(r)},t.prototype.shutdown=function(e){return Ru(this,void 0,void 0,function(){return Nu(this,function(r){switch(r.label){case 0:return this._shutdown?(T.warn("shutdown may only be called once per MeterProvider"),[2]):(this._shutdown=!0,[4,Promise.all(this._sharedState.metricCollectors.map(function(n){return n.shutdown(e)}))]);case 1:return r.sent(),[2]}})})},t.prototype.forceFlush=function(e){return Ru(this,void 0,void 0,function(){return Nu(this,function(r){switch(r.label){case 0:return this._shutdown?(T.warn("invalid attempt to force flush after MeterProvider shutdown"),[2]):[4,Promise.all(this._sharedState.metricCollectors.map(function(n){return n.forceFlush(e)}))];case 1:return r.sent(),[2]}})})},t}();function vT(t,e){var r=Xs(e);return{resource:qs(t.resource),schemaUrl:void 0,scopeMetrics:yT(t.scopeMetrics,r)}}function yT(t,e){return Array.from(t.map(function(r){return{scope:Ks(r.scope),metrics:r.metrics.map(function(n){return mT(n,e)}),schemaUrl:r.scope.schemaUrl}}))}function mT(t,e){var r={name:t.descriptor.name,description:t.descriptor.description,unit:t.descriptor.unit},n=TT(t.aggregationTemporality);switch(t.dataPointType){case ht.SUM:r.sum={aggregationTemporality:n,isMonotonic:t.isMonotonic,dataPoints:xu(t,e)};break;case ht.GAUGE:r.gauge={dataPoints:xu(t,e)};break;case ht.HISTOGRAM:r.histogram={aggregationTemporality:n,dataPoints:gT(t,e)};break;case ht.EXPONENTIAL_HISTOGRAM:r.exponentialHistogram={aggregationTemporality:n,dataPoints:ET(t,e)};break}return r}function _T(t,e,r){var n={attributes:$t(t.attributes),startTimeUnixNano:r.encodeHrTime(t.startTime),timeUnixNano:r.encodeHrTime(t.endTime)};switch(e){case St.INT:n.asInt=t.value;break;case St.DOUBLE:n.asDouble=t.value;break}return n}function xu(t,e){return t.dataPoints.map(function(r){return _T(r,t.descriptor.valueType,e)})}function gT(t,e){return t.dataPoints.map(function(r){var n=r.value;return{attributes:$t(r.attributes),bucketCounts:n.buckets.counts,explicitBounds:n.buckets.boundaries,count:n.count,sum:n.sum,min:n.min,max:n.max,startTimeUnixNano:e.encodeHrTime(r.startTime),timeUnixNano:e.encodeHrTime(r.endTime)}})}function ET(t,e){return t.dataPoints.map(function(r){var n=r.value;return{attributes:$t(r.attributes),count:n.count,min:n.min,max:n.max,sum:n.sum,positive:{offset:n.positive.offset,bucketCounts:n.positive.bucketCounts},negative:{offset:n.negative.offset,bucketCounts:n.negative.bucketCounts},scale:n.scale,zeroCount:n.zeroCount,startTimeUnixNano:e.encodeHrTime(r.startTime),timeUnixNano:e.encodeHrTime(r.endTime)}})}function TT(t){switch(t){case ct.DELTA:return 1;case ct.CUMULATIVE:return 2}}function bT(t,e){return{resourceMetrics:t.map(function(r){return vT(r,e)})}}var OT=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},ST=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o};function wT(t,e){var r,n=t.spanContext(),i=t.status;return{traceId:e.encodeSpanContext(n.traceId),spanId:e.encodeSpanContext(n.spanId),parentSpanId:e.encodeOptionalSpanContext(t.parentSpanId),traceState:(r=n.traceState)===null||r===void 0?void 0:r.serialize(),name:t.name,kind:t.kind==null?0:t.kind+1,startTimeUnixNano:e.encodeHrTime(t.startTime),endTimeUnixNano:e.encodeHrTime(t.endTime),attributes:$t(t.attributes),droppedAttributesCount:t.droppedAttributesCount,events:t.events.map(function(o){return LT(o,e)}),droppedEventsCount:t.droppedEventsCount,status:{code:i.code,message:i.message},links:t.links.map(function(o){return AT(o,e)}),droppedLinksCount:t.droppedLinksCount}}function AT(t,e){var r;return{attributes:t.attributes?$t(t.attributes):[],spanId:e.encodeSpanContext(t.context.spanId),traceId:e.encodeSpanContext(t.context.traceId),traceState:(r=t.context.traceState)===null||r===void 0?void 0:r.serialize(),droppedAttributesCount:t.droppedAttributesCount||0}}function LT(t,e){return{attributes:t.attributes?$t(t.attributes):[],name:t.name,timeUnixNano:e.encodeHrTime(t.time),droppedAttributesCount:t.droppedAttributesCount||0}}function RT(t,e){var r=Xs(e);return{resourceSpans:CT(t,r)}}function NT(t){var e,r,n=new Map;try{for(var i=OT(t),o=i.next();!o.done;o=i.next()){var a=o.value,u=n.get(a.resource);u||(u=new Map,n.set(a.resource,u));var c=a.instrumentationLibrary.name+"@"+(a.instrumentationLibrary.version||"")+":"+(a.instrumentationLibrary.schemaUrl||""),s=u.get(c);s||(s=[],u.set(c,s)),s.push(a)}}catch(l){e={error:l}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}return n}function CT(t,e){for(var r=NT(t),n=[],i=r.entries(),o=i.next();!o.done;){for(var a=ST(o.value,2),u=a[0],c=a[1],s=[],l=c.values(),p=l.next();!p.done;){var f=p.value;if(f.length>0){var y=f.map(function(m){return wT(m,e)});s.push({scope:Ks(f[0].instrumentationLibrary),spans:y,schemaUrl:f[0].instrumentationLibrary.schemaUrl})}p=l.next()}var v={resource:qs(u),scopeSpans:s,schemaUrl:void 0};n.push(v),o=i.next()}return n}var xT={serializeRequest:function(t){var e=bT([t],{useLongBits:!1}),r=new TextEncoder;return r.encode(JSON.stringify(e))},deserializeResponse:function(t){var e=new TextDecoder;return JSON.parse(e.decode(t))}},PT={serializeRequest:function(t){var e=RT(t,{useHex:!0,useLongBits:!1}),r=new TextEncoder;return r.encode(JSON.stringify(e))},deserializeResponse:function(t){var e=new TextDecoder;return JSON.parse(e.decode(t))}},IT=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function u(l){try{s(n.next(l))}catch(p){a(p)}}function c(l){try{s(n.throw(l))}catch(p){a(p)}}function s(l){l.done?o(l.value):i(l.value).then(u,c)}s((n=n.apply(t,[])).next())})},MT=function(t,e){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(l){return c([s,l])}}function c(s){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return r.label++,{value:s[1],done:!1};case 5:r.label++,i=s[1],s=[0];continue;case 7:s=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){r.label=s[1];break}if(s[0]===6&&r.label<o[1]){r.label=o[1],o=s;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(s);break}o[2]&&r.ops.pop(),r.trys.pop();continue}s=e.call(t,r)}catch(l){s=[6,l],i=0}finally{n=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},kT=5,DT=1e3,UT=5e3,jT=1.5,Pu=.2;function BT(){return Math.random()*(2*Pu)-Pu}var $T=function(){function t(e){this._transport=e}return t.prototype.retry=function(e,r,n){var i=this;return new Promise(function(o,a){setTimeout(function(){i._transport.send(e,r).then(o,a)},n)})},t.prototype.send=function(e,r){var n;return IT(this,void 0,void 0,function(){var i,o,a,u,c,s,l;return MT(this,function(p){switch(p.label){case 0:return i=Date.now()+r,[4,this._transport.send(e,r)];case 1:o=p.sent(),a=kT,u=DT,p.label=2;case 2:return o.status==="retryable"&&a>0?(a--,c=Math.max(Math.min(u,UT)+BT(),0),u=u*jT,s=(n=o.retryInMillis)!==null&&n!==void 0?n:c,l=i-Date.now(),s>l?[2,o]:[4,this.retry(e,l,s)]):[3,4];case 3:return o=p.sent(),[3,2];case 4:return[2,o]}})})},t.prototype.shutdown=function(){return this._transport.shutdown()},t}();function Iu(t){return new $T(t.transport)}function FT(t){var e=[429,502,503,504];return e.includes(t)}function VT(t){if(t!=null){var e=Number.parseInt(t,10);if(Number.isInteger(e))return e>0?e*1e3:-1;var r=new Date(t).getTime()-Date.now();return r>=0?r:0}}var GT=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},HT=function(){function t(e){this._parameters=e}return t.prototype.send=function(e,r){var n=this;return new Promise(function(i){var o=new XMLHttpRequest;o.timeout=r,o.open("POST",n._parameters.url);var a=n._parameters.headers();Object.entries(a).forEach(function(u){var c=GT(u,2),s=c[0],l=c[1];o.setRequestHeader(s,l)}),o.ontimeout=function(u){i({status:"failure",error:new Error("XHR request timed out")})},o.onreadystatechange=function(){o.status>=200&&o.status<=299?(T.debug("XHR success"),i({status:"success"})):o.status&&FT(o.status)?i({status:"retryable",retryInMillis:VT(o.getResponseHeader("Retry-After"))}):o.status!==0&&i({status:"failure",error:new Error("XHR request failed with non-retryable status")})},o.onabort=function(){i({status:"failure",error:new Error("XHR request aborted")})},o.onerror=function(){i({status:"failure",error:new Error("XHR request errored")})},o.send(e)})},t.prototype.shutdown=function(){},t}();function zT(t){return new HT(t)}var XT=function(){function t(e){this._params=e}return t.prototype.send=function(e){var r=this;return new Promise(function(n){navigator.sendBeacon(r._params.url,new Blob([e],{type:r._params.blobType}))?(T.debug("SendBeacon success"),n({status:"success"})):n({status:"failure",error:new Error("SendBeacon failed")})})},t.prototype.shutdown=function(){},t}();function qT(t){return new XT(t)}function KT(t,e){return $s(t,e,Iu({transport:zT(t)}))}function WT(t,e){return $s(t,e,Iu({transport:qT({url:t.url,blobType:t.headers()["Content-Type"]})}))}var YT=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o};function JT(t){return function(){var e,r={};return Object.entries((e=t?.())!==null&&e!==void 0?e:{}).forEach(function(n){var i=YT(n,2),o=i[0],a=i[1];typeof a<"u"?r[o]=String(a):T.warn('Header "'+o+'" has invalid value ('+a+") and will be ignored")}),r}}var zt=function(){return zt=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++){e=arguments[r];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},zt.apply(this,arguments)};function QT(t,e,r){var n=zt({},r()),i={};return function(){return e!=null&&Object.assign(i,e()),t!=null&&Object.assign(i,t()),Object.assign(i,n)}}function ZT(t){if(t!=null)try{return new URL(t),t}catch{throw new Error("Configuration: Could not parse user-provided export URL: '"+t+"'")}}function tb(t,e,r){var n,i,o,a;return zt(zt({},eg(t,e,r)),{headers:QT(JT(t.headers),e.headers,r.headers),url:(i=(n=ZT(t.url))!==null&&n!==void 0?n:e.url)!==null&&i!==void 0?i:r.url,agentOptions:(a=(o=t.agentOptions)!==null&&o!==void 0?o:e.agentOptions)!==null&&a!==void 0?a:r.agentOptions})}function eb(t,e){return zt(zt({},rg()),{headers:function(){return t},url:"http://localhost:4318/"+e,agentOptions:{keepAlive:!0}})}function rb(t,e,r){return tb({url:t.url,timeoutMillis:t.timeoutMillis,headers:tg(t.headers),concurrencyLimit:t.concurrencyLimit},{},eb(r,e))}function Mu(t,e,r,n){var i=!!t.headers||typeof navigator.sendBeacon!="function",o=rb(t,r,n);return i?KT(o,e):WT(o,e)}var nb=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),ib=function(t){nb(e,t);function e(r){return r===void 0&&(r={}),t.call(this,Mu(r,PT,"v1/traces",{"Content-Type":"application/json"}))||this}return e}(js),Hr;(function(t){t[t.DELTA=0]="DELTA",t[t.CUMULATIVE=1]="CUMULATIVE",t[t.LOWMEMORY=2]="LOWMEMORY"})(Hr||(Hr={}));var ob=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Zi=function(){return ct.CUMULATIVE},ku=function(t){switch(t){case w.COUNTER:case w.OBSERVABLE_COUNTER:case w.GAUGE:case w.HISTOGRAM:case w.OBSERVABLE_GAUGE:return ct.DELTA;case w.UP_DOWN_COUNTER:case w.OBSERVABLE_UP_DOWN_COUNTER:return ct.CUMULATIVE}},Du=function(t){switch(t){case w.COUNTER:case w.HISTOGRAM:return ct.DELTA;case w.GAUGE:case w.UP_DOWN_COUNTER:case w.OBSERVABLE_UP_DOWN_COUNTER:case w.OBSERVABLE_COUNTER:case w.OBSERVABLE_GAUGE:return ct.CUMULATIVE}};function ab(){var t=Gh(),e=t.OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE.trim().toLowerCase();return e==="cumulative"?Zi:e==="delta"?ku:e==="lowmemory"?Du:(T.warn("OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE is set to '"+t.OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE+"', but only 'cumulative' and 'delta' are allowed. Using default ('cumulative') instead."),Zi)}function sb(t){return t!=null?t===Hr.DELTA?ku:t===Hr.LOWMEMORY?Du:Zi:ab()}function ub(t){return t!=null&&t.aggregationPreference?t.aggregationPreference:function(e){return gt.Default()}}var cb=function(t){ob(e,t);function e(r,n){var i=t.call(this,r)||this;return i._aggregationSelector=ub(n),i._aggregationTemporalitySelector=sb(n?.temporalityPreference),i}return e.prototype.selectAggregation=function(r){return this._aggregationSelector(r)},e.prototype.selectAggregationTemporality=function(r){return this._aggregationTemporalitySelector(r)},e}(js),lb=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),pb=function(t){lb(e,t);function e(r){return t.call(this,Mu(r??{},xT,"v1/metrics",{"Content-Type":"application/json"}),r)||this}return e}(cb);function fb(t,e){const r=t.spanContext();return{name:t.name,kind:t.kind,spanContext:()=>r,parentSpanId:t.parentSpanId,startTime:t.startTime,endTime:t.endTime,status:t.status,attributes:Ld(t.attributes,e),links:t.links,events:t.events,duration:t.duration,ended:t.ended,resource:t.resource,instrumentationLibrary:t.instrumentationLibrary,droppedAttributesCount:t.droppedAttributesCount,droppedEventsCount:t.droppedEventsCount,droppedLinksCount:t.droppedLinksCount}}function hb(t,e){if(!e.isSamplingEnabled())return t;const r=[],n={},i={};for(const o of t){o.parentSpanId&&(i[o.parentSpanId]=i[o.parentSpanId]||[],i[o.parentSpanId].push(o.spanContext().spanId));const a=e.shouldSample(o);a.sample?a.attributes?n[o.spanContext().spanId]=fb(o,a.attributes):n[o.spanContext().spanId]=o:r.push(o.spanContext().spanId)}for(;r.length>0;){const o=r.shift(),a=i[o];if(a)for(const u of a)delete n[u],r.push(u)}return Object.values(n)}class db extends ib{constructor(e,r){super(rt(P({},e),{headers:{}})),this.sampler=r}export(e,r){const n=hb(e,this.sampler);if(n.length===0)return;let i=0;const o=a=>{if(a.code===Z.SUCCESS)return r({code:Z.SUCCESS});if(i++,i>An)return r({code:Z.FAILED,error:a.error});new Promise(u=>setTimeout(u,Ln+Rn*Math.pow(2,i))).then(()=>{super.export(n,o)})};super.export(n,o)}}class vb extends pb{constructor(e){super(rt(P({},e),{headers:{}}))}export(e,r){let n=0;const i=o=>{var a;if(o.code===Z.SUCCESS)return r({code:Z.SUCCESS});if(n++,n>An)return console.error(`[@launchdarkly/observability] failed to export OTeL metrics: ${(a=o.error)==null?void 0:a.message}`,o.error),r({code:Z.FAILED,error:o.error});new Promise(u=>setTimeout(u,Ln+Rn*Math.pow(2,n))).then(()=>{var u;console.warn(`[@launchdarkly/observability] retry ${n}, failed to export OTeL metrics: ${(u=o.error)==null?void 0:u.message}`,o.error),super.export(e,i)})};super.export(e,i)}}const yb="OT_ZONE_CONTEXT",mb="Navigation:",_b=["click","input","submit"];function gb(){return!1}const to=class Wt extends Vd{constructor(e={}){var r;super(Wt.moduleName,Wt.version,e),k(this,"_spansData",new WeakMap),k(this,"_zonePatched"),k(this,"_wrappedListeners",new WeakMap),k(this,"_eventsSpanMap",new WeakMap),k(this,"_eventNames"),k(this,"_shouldPreventSpanCreation"),this._eventNames=new Set((r=e?.eventNames)!=null?r:_b),this._shouldPreventSpanCreation=typeof e?.shouldPreventSpanCreation=="function"?e.shouldPreventSpanCreation:gb}init(){}_checkForTimeout(e,r){const n=this._spansData.get(r);n&&(e.source==="setTimeout"?n.hrTimeLastTimeout=Kh():e.source!=="Promise.then"&&e.source!=="setTimeout"&&(n.hrTimeLastTimeout=void 0))}_allowEventName(e){return this._eventNames.has(e)}_createSpan(e,r){var n;const i=e?.target,o=e?.type;if(!(i instanceof HTMLElement)||!i.getAttribute||i.hasAttribute("disabled")||!this._allowEventName(o))return;const a=gs(i,!0);try{const u=this.tracer.startSpan(o,{attributes:{"event.type":o,"event.tag":i.tagName,"event.xpath":a,"event.id":i.id,"event.classname":i.className,"event.text":(n=i.textContent)!=null?n:"","event.url":window.location.href,"viewport.width":window.innerWidth,"viewport.height":window.innerHeight}},r?x.setSpan(N.active(),r):void 0);return e instanceof MouseEvent&&(u.setAttribute("event.x",e.clientX),u.setAttribute("event.y",e.clientY),u.setAttribute("event.relativeX",e.clientX/window.innerWidth),u.setAttribute("event.relativeY",e.clientY/window.innerHeight),o==="scroll"&&(u.setAttribute("event.scrollX",window.scrollX),u.setAttribute("event.scrollY",window.scrollY))),this._shouldPreventSpanCreation(o,i,u)===!0?void 0:(this._spansData.set(u,{taskCount:0}),u)}catch(u){this._diag.error("failed to start create new user interaction span",u)}}_decrementTask(e){const r=this._spansData.get(e);r&&(r.taskCount--,r.taskCount===0&&this._tryToEndSpan(e,r.hrTimeLastTimeout))}_getCurrentSpan(e){const r=e.get(yb);return r&&x.getSpan(r)}_incrementTask(e){const r=this._spansData.get(e);r&&r.taskCount++}addPatchedListener(e,r,n,i){let o=this._wrappedListeners.get(n);o||(o=new Map,this._wrappedListeners.set(n,o));let a=o.get(r);return a||(a=new Map,o.set(r,a)),a.has(e)?!1:(a.set(e,i),!0)}removePatchedListener(e,r,n){const i=this._wrappedListeners.get(n);if(!i)return;const o=i.get(r);if(!o)return;const a=o.get(e);return a&&(o.delete(e),o.size===0&&(i.delete(r),i.size===0&&this._wrappedListeners.delete(n))),a}_invokeListener(e,r,n){return typeof e=="function"?e.apply(r,n):e.handleEvent(n[0])}_patchAddEventListener(){const e=this;let r=new Map;return n=>function(i,o,a){if(!o)return n.call(this,i,o,a);const u=a&&typeof a=="object"&&a.once,c=function(...s){var l;let p;const f=s[0];if(!(f!=null&&f.type))return e._invokeListener(o,this,s);if(Date.now()-((l=r.get(f.type))!=null?l:0)<1e3/60)return e._invokeListener(o,this,s);r.set(f.type,Date.now()),f&&(p=e._eventsSpanMap.get(f)),u&&e.removePatchedListener(this,i,o);const y=e._createSpan(f,p);return y?(f&&e._eventsSpanMap.set(f,y),N.with(x.setSpan(N.active(),y),()=>{const v=e._invokeListener(o,this,s);return y.end(),v})):e._invokeListener(o,this,s)};if(e.addPatchedListener(this,i,o,c))return n.call(this,i,c,a)}}_patchRemoveEventListener(){const e=this;return r=>function(n,i,o){const a=e.removePatchedListener(this,n,i);return a?r.call(this,n,a,o):r.call(this,n,i,o)}}_getPatchableEventTargets(){return window.EventTarget?[EventTarget.prototype]:[Node.prototype,Window.prototype]}_patchHistoryApi(){this._unpatchHistoryApi(),this._wrap(history,"replaceState",this._patchHistoryMethod()),this._wrap(history,"pushState",this._patchHistoryMethod()),this._wrap(history,"back",this._patchHistoryMethod()),this._wrap(history,"forward",this._patchHistoryMethod()),this._wrap(history,"go",this._patchHistoryMethod())}_patchHistoryMethod(){const e=this;return r=>function(...n){const i=`${location.pathname}${location.hash}${location.search}`,o=r.apply(this,n),a=`${location.pathname}${location.hash}${location.search}`;return i!==a&&e._updateInteractionName(a),o}}_unpatchHistoryApi(){et(history.replaceState)&&this._unwrap(history,"replaceState"),et(history.pushState)&&this._unwrap(history,"pushState"),et(history.back)&&this._unwrap(history,"back"),et(history.forward)&&this._unwrap(history,"forward"),et(history.go)&&this._unwrap(history,"go")}_updateInteractionName(e){const r=x.getSpan(N.active());r&&typeof r.updateName=="function"&&r.updateName(`${mb} ${e}`)}_patchZoneCancelTask(){const e=this;return r=>function(n){const i=Zone.current,o=e._getCurrentSpan(i);return o&&e._shouldCountTask(n,i)&&e._decrementTask(o),r.call(this,n)}}_patchZoneScheduleTask(){const e=this;return r=>function(n){const i=Zone.current,o=e._getCurrentSpan(i);return o&&e._shouldCountTask(n,i)&&(e._incrementTask(o),e._checkForTimeout(n,o)),r.call(this,n)}}_patchZoneRunTask(){const e=this;return r=>function(n,i,o){const a=Array.isArray(o)&&o[0]instanceof Event?o[0]:void 0,u=a?.target;let c;const s=this;if(u){if(c=e._createSpan(a),c)return e._incrementTask(c),s.run(()=>{try{return N.with(x.setSpan(N.active(),c),()=>{const l=Zone.current;return n._zone=l,r.call(l,n,i,o)})}finally{e._decrementTask(c)}})}else c=e._getCurrentSpan(s);try{return r.call(s,n,i,o)}finally{c&&e._shouldCountTask(n,s)&&e._decrementTask(c)}}}_shouldCountTask(e,r){if(e._zone&&(r=e._zone),!r||!e.data||e.data.isPeriodic)return!1;const n=this._getCurrentSpan(r);return!n||!this._spansData.get(n)?!1:e.type==="macroTask"||e.type==="microTask"}_tryToEndSpan(e,r){e&&this._spansData.get(e)&&(e.end(r),this._spansData.delete(e))}enable(){const e=this._getZoneWithPrototype();this._diag.debug("applying patch to",Wt.moduleName,Wt.version,"zone:",!!e),e?(et(e.prototype.runTask)&&(this._unwrap(e.prototype,"runTask"),this._diag.debug("removing previous patch from method runTask")),et(e.prototype.scheduleTask)&&(this._unwrap(e.prototype,"scheduleTask"),this._diag.debug("removing previous patch from method scheduleTask")),et(e.prototype.cancelTask)&&(this._unwrap(e.prototype,"cancelTask"),this._diag.debug("removing previous patch from method cancelTask")),this._zonePatched=!0,this._wrap(e.prototype,"runTask",this._patchZoneRunTask()),this._wrap(e.prototype,"scheduleTask",this._patchZoneScheduleTask()),this._wrap(e.prototype,"cancelTask",this._patchZoneCancelTask())):(this._zonePatched=!1,this._getPatchableEventTargets().forEach(r=>{et(r.addEventListener)&&(this._unwrap(r,"addEventListener"),this._diag.debug("removing previous patch from method addEventListener")),et(r.removeEventListener)&&(this._unwrap(r,"removeEventListener"),this._diag.debug("removing previous patch from method removeEventListener")),this._wrap(r,"addEventListener",this._patchAddEventListener()),this._wrap(r,"removeEventListener",this._patchRemoveEventListener())})),this._patchHistoryApi()}disable(){const e=this._getZoneWithPrototype();this._diag.debug("removing patch from",Wt.moduleName,Wt.version,"zone:",!!e),e&&this._zonePatched?(et(e.prototype.runTask)&&this._unwrap(e.prototype,"runTask"),et(e.prototype.scheduleTask)&&this._unwrap(e.prototype,"scheduleTask"),et(e.prototype.cancelTask)&&this._unwrap(e.prototype,"cancelTask")):this._getPatchableEventTargets().forEach(r=>{et(r.addEventListener)&&this._unwrap(r,"addEventListener"),et(r.removeEventListener)&&this._unwrap(r,"removeEventListener")}),this._unpatchHistoryApi()}_getZoneWithPrototype(){return window.Zone}};k(to,"version","0.1.1"),k(to,"moduleName","user-interaction");let Eb=to,q={},fe;const zr="highlight.record",Tb="highlight.session_id",Uu="launchdarkly.js.log",bb="launchdarkly.exception.id",ju="launchdarkly.sampling.ratio",Bu="log.severity",$u="log.message",Ob=(t,e)=>{var r,n,i,o,a,u,c,s,l;if(q.tracerProvider||q.meterProvider){console.warn("OTEL already initialized. Skipping...");return}fe=t;const p=t.backendUrl||void 0||"https://pub.highlight.io",f=[...(n=(r=t.networkRecordingOptions)==null?void 0:r.urlBlocklist)!=null?n:[],...$_],y=(i=t.environment)!=null?i:"production",v={url:t.otlpEndpoint+"/v1/traces",concurrencyLimit:10,timeoutMillis:3e4,compression:"gzip",keepAlive:!0,httpAgentOptions:{timeout:6e4,keepAlive:!0}},m=new db(v,e),_=new Sb(m,{maxExportBatchSize:1024,maxQueueSize:2048,exportTimeoutMillis:v.timeoutMillis,scheduledDelayMillis:v.timeoutMillis}),E=new Ve({[Jl]:(o=t.serviceName)!=null?o:"highlight-browser",[Ql]:t.serviceVersion,"deployment.environment.name":y,"highlight.project_id":t.projectId,[rp]:navigator.userAgent,"browser.language":navigator.language,"telemetry.distro.name":"@highlight-run/observability","telemetry.distro.version":Pp});q.tracerProvider=new Qy({resource:E,mergeResourceWithDefaults:!0,spanProcessors:[_]}),x.setGlobalTracerProvider(q.tracerProvider);const R=new vb(rt(P({},v),{url:t.otlpEndpoint+"/v1/metrics"})),U=new RE({exporter:R,exportIntervalMillis:v.timeoutMillis,exportTimeoutMillis:v.timeoutMillis});q.meterProvider=new dT({resource:E,readers:[U]}),ie.setGlobalMeterProvider(q.meterProvider);let D=[];((a=t.instrumentations)==null?void 0:a["@opentelemetry/instrumentation-document-load"])!==!1&&D.push(new ym({applyCustomAttributesOnSpan:{documentLoad:Xu,documentFetch:Xu,resourceFetch:Pb}})),((u=t.instrumentations)==null?void 0:u["@opentelemetry/instrumentation-user-interaction"])!==!1&&D.push(new Eb({eventNames:t.eventNames})),(c=t.networkRecordingOptions)!=null&&c.enabled&&(((s=t.instrumentations)==null?void 0:s["@opentelemetry/instrumentation-fetch"])!==!1&&D.push(new n_({propagateTraceHeaderCorsUrls:Ku(t.tracingOrigins),applyCustomAttributesOnSpan:(j,H,B)=>yt(void 0,null,function*(){var Et,qt,K;if(!(!j.attributes||j.attributes[zr]===!1)){if(Gu(j,H.body,H.headers,t.networkRecordingOptions),!(B instanceof Response)){j.setAttributes({"http.response.error":B.message,[Wl]:B.status});return}if((Et=t.networkRecordingOptions)!=null&&Et.recordHeadersAndBody){const ye=yield J_(B,(qt=t.networkRecordingOptions)==null?void 0:qt.bodyKeysToRecord,(K=t.networkRecordingOptions)==null?void 0:K.networkBodyKeysToRedact),Kt=Object.fromEntries(B.headers.entries());zu(j,Kt,ye,t.networkRecordingOptions)}}})})),((l=t.instrumentations)==null?void 0:l["@opentelemetry/instrumentation-xml-http-request"])!==!1&&D.push(new j_({propagateTraceHeaderCorsUrls:Ku(t.tracingOrigins),applyCustomAttributesOnSpan:(j,H)=>{var B,Et,qt;const K=H;if(!(!j.attributes||j.attributes[zr]===!1)&&(Gu(j,K._body,K._requestHeaders,t.networkRecordingOptions),(B=t.networkRecordingOptions)!=null&&B.recordHeadersAndBody)){let ye="";(H.responseType===""||H.responseType==="text")&&(ye=Ii(H.responseText,(Et=t.networkRecordingOptions)==null?void 0:Et.networkBodyKeysToRedact,(qt=t.networkRecordingOptions)==null?void 0:qt.bodyKeysToRecord,void 0));const Kt=Rb(H.getAllResponseHeaders());zu(j,Kt,ye,t.networkRecordingOptions)}}}))),Ud({instrumentations:D});const G=new ys;return G.enable(),q.tracerProvider.register({contextManager:G,propagator:new Jh({propagators:[new Ah,new wb({backendUrl:p,otlpEndpoint:t.otlpEndpoint,tracingOrigins:t.tracingOrigins,urlBlocklist:f})]})}),q};class Sb extends hs{onStart(e,r){e.setAttribute(Tb,Ot()),super.onStart(e,r)}onEnd(e){e.attributes[zr]!==!1&&super.onEnd(e)}}class wb extends dd{constructor(e){super(),k(this,"highlightEndpoints"),k(this,"tracingOrigins"),k(this,"urlBlocklist"),this.highlightEndpoints=[e.backendUrl,`${e.otlpEndpoint}/v1/traces`,`${e.otlpEndpoint}/v1/logs`,`${e.otlpEndpoint}/v1/metrics`],this.tracingOrigins=e.tracingOrigins,this.urlBlocklist=e.urlBlocklist}inject(e,r,n){var i;const o=x.getSpan(e);if(!o||!o.attributes)return;const a=Wu(o);typeof a=="string"&&(xb(a,this.highlightEndpoints,this.tracingOrigins,this.urlBlocklist)||o.setAttribute(zr,!1),!W_(a,(i=this.tracingOrigins)!=null?i:[],this.urlBlocklist))||super.inject(e,r,n)}}const Fu="highlight-browser",Ab=Fu,Vu=()=>{var t;return(t=q.tracerProvider)==null?void 0:t.getTracer(Fu)},Xr=()=>{var t;return(t=q.meterProvider)==null?void 0:t.getMeter(Ab)},Lb=()=>yt(void 0,null,function*(){yield Promise.allSettled([yt(void 0,null,function*(){q.tracerProvider?(yield q.tracerProvider.shutdown(),q.tracerProvider=void 0):console.warn("OTEL shutdown called without initialized tracerProvider.")}),yt(void 0,null,function*(){q.meterProvider?(yield q.meterProvider.shutdown(),q.meterProvider=void 0):console.warn("OTEL shutdown called without initialized meterProvider.")})])}),Gu=(t,e,r,n)=>{var i;if(!t.attributes)return;const o=Wu(t),a=Ds(o),u=ks(a),c=typeof e=="string"?e:String(e);try{const l=e?JSON.parse(c):void 0;l!=null&&l.operationName&&t.setAttribute("graphql.operation.name",l.operationName)}catch{}t.setAttributes({"highlight.type":"http.request",[He]:a,[pr]:a,[Bo]:u.pathname,[ep]:u.search});const s=Array.from(u.searchParams.entries());if(s.length>0&&t.setAttribute("url.query_params",JSON.stringify(Object.fromEntries(s))),n!=null&&n.recordHeadersAndBody){const l=Ii(e,n.networkBodyKeysToRedact,n.bodyKeysToRecord,r);t.setAttribute("http.request.body",l);const p=Ms((i=n.networkHeadersToRedact)!=null?i:[],r,n.headerKeysToRecord),f=Hu(p,"http.request.header");t.setAttributes(f)}},Rb=t=>{const e={};return t&&t.trim().split(/[\r\n]+/).forEach(r=>{const n=r.split(": "),i=n.shift();i&&(e[i]=n.join(": "))}),e},Hu=(t,e)=>{const r={};return Object.entries(t).forEach(([n,i])=>{const o=n.toLowerCase().replace(/_/g,"-"),a=`${e}.${o}`,u=Cb(o,i);if(r[a]){const c=r[a];Array.isArray(c)?r[a]=[...c,...u]:r[a]=[c,...u]}else r[a]=u.length===1?u[0]:u}),r},Nb=new Set(["accept","accept-charset","accept-encoding","accept-language","accept-ranges","allow","cache-control","connection","content-encoding","content-language","expect","if-match","if-none-match","pragma","proxy-authenticate","te","trailer","transfer-encoding","upgrade","vary","via","warning","www-authenticate","access-control-allow-headers","access-control-allow-methods","access-control-expose-headers","access-control-request-headers"]),Cb=(t,e)=>Nb.has(t)?e.split(",").map(r=>r.trim()).filter(r=>r.length>0):[e],zu=(t,e,r,n)=>{var i;t.setAttribute("http.response.body",r);const o=Ms((i=n.networkHeadersToRedact)!=null?i:[],e,n.headerKeysToRecord),a=Hu(o,"http.response.header");t.setAttributes(a)},xb=(t,e,r,n)=>n!=null&&n.some(i=>t.toLowerCase().includes(i))?!1:K_(t,e),Xu=t=>{var e,r,n;if(!t.events)return;const i=t.events,o={unload:it("unloadEventStart","unloadEventEnd",i),dom_interactive:it("fetchStart","domInteractive",i),dom_content_loaded:it("domContentLoadedEventStart","domContentLoadedEventEnd",i),dom_complete:it("fetchStart","domComplete",i),load_event:it("loadEventStart","loadEventEnd",i),document_load:it("fetchStart","loadEventEnd",i),first_paint:it("fetchStart","firstPaint",i),first_contentful_paint:it("fetchStart","firstContentfulPaint",i),domain_lookup:it("domainLookupStart","domainLookupEnd",i),connect:it("connectStart","connectEnd",i),request:it("requestStart","requestEnd",i),response:it("responseStart","responseEnd",i)},a=(r=(e=fe?.getIntegrations)==null?void 0:e.call(fe))!=null?r:[];if(o.document_load!==void 0)for(const u of a)u.recordGauge((n=fe?.sessionSecureId)!=null?n:"",{name:Ap,value:o.document_load/1e6});Object.entries(o).forEach(([u,c])=>{c!==void 0&&(t.setAttribute(`timings.${u}.ns`,c),t.setAttribute(`timings.${u}.readable`,qu(c)))})};function it(t,e,r){const n=r.find(a=>a.name===t),i=r.find(a=>a.name===e);if(!n||!i)return;const o=n.time[0]*1e9+n.time[1];return i.time[0]*1e9+i.time[1]-o}const Pb=(t,e)=>{const r={domain_lookup:(e.domainLookupEnd-e.domainLookupStart)*1e9,connect:(e.connectEnd-e.connectStart)*1e9,request:(e.responseEnd-e.requestStart)*1e9,response:(e.responseEnd-e.responseStart)*1e9};Object.entries(r).forEach(([n,i])=>{t.setAttribute(`timings.${n}.ns`,i),t.setAttribute(`timings.${n}.readable`,qu(i))})},qu=t=>{if(t>=36e11){const e=t/36e11;return`${Number(e.toFixed(1))}h`}else if(t>=6e10){const e=t/6e10;return`${Number(e.toFixed(1))}m`}else if(t>=1e9){const e=t/1e9;return`${Number(e.toFixed(1))}s`}else if(t>=1e6){const e=t/1e6;return`${Number(e.toFixed(1))}ms`}else if(t>=1e3){const e=t/1e3;return`${Number(e.toFixed(1))}µs`}else return`${Number(t.toFixed(1))}ns`},Ku=t=>t===!0?[/localhost/,/^\//,new RegExp(window.location.host)]:Array.isArray(t)?t.map(e=>typeof e=="string"?new RegExp(e):e):/^$/,Wu=t=>t.attributes[pr]?t.attributes[pr]:t.attributes[He],Ib=30,Mb=()=>new Promise(t=>requestAnimationFrame(e=>requestAnimationFrame(r=>t(r-e)))),kb=()=>yt(void 0,null,function*(){const t=[];for(let e=0;e<Ib;e++)t.push(yield Mb());return t.reduce((e,r)=>e+r,0)/t.length}),Db=(t,e)=>{let r={},n=16.666666666666668;kb().then(c=>n=c);const i=c=>{var s;r!=null&&r.event||(r={event:c,location:window.location.href,timerStart:(s=window.performance)==null?void 0:s.now()},window.requestAnimationFrame(o))},o=()=>{if(!(r!=null&&r.timerStart))return;const c=window.performance.now()-r.timerStart-n;a(c),r={}},a=c=>{const s=(new Date().getTime()-e)/1e3;t({relativeTimestamp:s,jankAmount:c,querySelector:u(),newLocation:window.location.href!=r.location?window.location.href:void 0})},u=()=>{var c;return(c=r?.event)!=null&&c.target?Ip(r.event.target):""};return window.addEventListener("click",i,!0),window.addEventListener("keydown",i,!0),()=>{window.removeEventListener("keydown",i,!0),window.removeEventListener("click",i,!0)}},Ub=typeof window<"u",Yu=Ub&&"performance"in window&&"memory"in performance?performance:{memory:{}},jb=(t,e)=>{let r=0,n=0;const i=()=>{const s=(new Date().getTime()-e)/1e3,l=Yu.memory.jsHeapSizeLimit||0,p=Yu.memory.usedJSHeapSize||0;t({jsHeapSizeLimit:l,usedJSHeapSize:p,relativeTimestamp:s,fps:r})};i();let o;o=setInterval(()=>{i()},1e3);let a=0,u=Date.now();const c=function(){var s=Date.now();a++,s>1e3+u&&(r=Math.round(a*1e3/(s-u)),a=0,u=s),n=requestAnimationFrame(c)};return c(),()=>{clearInterval(o),cancelAnimationFrame(n)}};var Ct,We,Ju,qr,eo,Qu=-1,Xt=function(t){addEventListener("pageshow",function(e){e.persisted&&(Qu=e.timeStamp,t(e))},!0)},ro=function(){return window.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]},Kr=function(){var t=ro();return t&&t.activationStart||0},ot=function(t,e){var r=ro(),n="navigate";return Qu>=0?n="back-forward-cache":r&&(document.prerendering||Kr()>0?n="prerender":document.wasDiscarded?n="restore":r.type&&(n=r.type.replace(/_/g,"-"))),{name:t,value:e===void 0?-1:e,rating:"good",delta:0,entries:[],id:"v3-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:n}},he=function(t,e,r){try{if(PerformanceObserver.supportedEntryTypes.includes(t)){var n=new PerformanceObserver(function(i){Promise.resolve().then(function(){e(i.getEntries())})});return n.observe(Object.assign({type:t,buffered:!0},r||{})),n}}catch{}},at=function(t,e,r,n){var i,o;return function(a){e.value>=0&&(a||n)&&((o=e.value-(i||0))||i===void 0)&&(i=e.value,e.delta=o,e.rating=function(u,c){return u>c[1]?"poor":u>c[0]?"needs-improvement":"good"}(e.value,r),t(e))}},no=function(t){requestAnimationFrame(function(){return requestAnimationFrame(function(){return t()})})},Wr=function(t){var e=function(r){r.type!=="pagehide"&&document.visibilityState!=="hidden"||t(r)};addEventListener("visibilitychange",e,!0),addEventListener("pagehide",e,!0)},io=function(t){var e=!1;return function(r){e||(t(r),e=!0)}},de=-1,Zu=function(){return document.visibilityState!=="hidden"||document.prerendering?1/0:0},Yr=function(t){document.visibilityState==="hidden"&&de>-1&&(de=t.type==="visibilitychange"?t.timeStamp:0,Bb())},tc=function(){addEventListener("visibilitychange",Yr,!0),addEventListener("prerenderingchange",Yr,!0)},Bb=function(){removeEventListener("visibilitychange",Yr,!0),removeEventListener("prerenderingchange",Yr,!0)},oo=function(){return de<0&&(de=Zu(),tc(),Xt(function(){setTimeout(function(){de=Zu(),tc()},0)})),{get firstHiddenTime(){return de}}},Ye=function(t){document.prerendering?addEventListener("prerenderingchange",function(){return t()},!0):t()},ec=[1800,3e3],rc=function(t,e){e=e||{},Ye(function(){var r,n=oo(),i=ot("FCP"),o=he("paint",function(a){a.forEach(function(u){u.name==="first-contentful-paint"&&(o.disconnect(),u.startTime<n.firstHiddenTime&&(i.value=Math.max(u.startTime-Kr(),0),i.entries.push(u),r(!0)))})});o&&(r=at(t,i,ec,e.reportAllChanges),Xt(function(a){i=ot("FCP"),r=at(t,i,ec,e.reportAllChanges),no(function(){i.value=performance.now()-a.timeStamp,r(!0)})}))})},nc=[.1,.25],$b=function(t,e){e=e||{},rc(io(function(){var r,n=ot("CLS",0),i=0,o=[],a=function(c){c.forEach(function(s){if(!s.hadRecentInput){var l=o[0],p=o[o.length-1];i&&s.startTime-p.startTime<1e3&&s.startTime-l.startTime<5e3?(i+=s.value,o.push(s)):(i=s.value,o=[s])}}),i>n.value&&(n.value=i,n.entries=o,r())},u=he("layout-shift",a);u&&(r=at(t,n,nc,e.reportAllChanges),Wr(function(){a(u.takeRecords()),r(!0)}),Xt(function(){i=0,n=ot("CLS",0),r=at(t,n,nc,e.reportAllChanges),no(function(){return r()})}),setTimeout(r,0))}))},Je={passive:!0,capture:!0},Fb=new Date,ic=function(t,e){Ct||(Ct=e,We=t,Ju=new Date,ac(removeEventListener),oc())},oc=function(){if(We>=0&&We<Ju-Fb){var t={entryType:"first-input",name:Ct.type,target:Ct.target,cancelable:Ct.cancelable,startTime:Ct.timeStamp,processingStart:Ct.timeStamp+We};qr.forEach(function(e){e(t)}),qr=[]}},Vb=function(t){if(t.cancelable){var e=(t.timeStamp>1e12?new Date:performance.now())-t.timeStamp;t.type=="pointerdown"?function(r,n){var i=function(){ic(r,n),a()},o=function(){a()},a=function(){removeEventListener("pointerup",i,Je),removeEventListener("pointercancel",o,Je)};addEventListener("pointerup",i,Je),addEventListener("pointercancel",o,Je)}(e,t):ic(e,t)}},ac=function(t){["mousedown","keydown","touchstart","pointerdown"].forEach(function(e){return t(e,Vb,Je)})},sc=[100,300],Gb=function(t,e){e=e||{},Ye(function(){var r,n=oo(),i=ot("FID"),o=function(c){c.startTime<n.firstHiddenTime&&(i.value=c.processingStart-c.startTime,i.entries.push(c),r(!0))},a=function(c){c.forEach(o)},u=he("first-input",a);r=at(t,i,sc,e.reportAllChanges),u&&Wr(io(function(){a(u.takeRecords()),u.disconnect()})),u&&Xt(function(){var c;i=ot("FID"),r=at(t,i,sc,e.reportAllChanges),qr=[],We=-1,Ct=null,ac(addEventListener),c=o,qr.push(c),oc()})})},uc=0,ao=1/0,Jr=0,Hb=function(t){t.forEach(function(e){e.interactionId&&(ao=Math.min(ao,e.interactionId),Jr=Math.max(Jr,e.interactionId),uc=Jr?(Jr-ao)/7+1:0)})},cc=function(){return eo?uc:performance.interactionCount||0},zb=function(){"interactionCount"in performance||eo||(eo=he("event",Hb,{type:"event",buffered:!0,durationThreshold:0}))},lc=[200,500],pc=0,fc=function(){return cc()-pc},dt=[],so={},hc=function(t){var e=dt[dt.length-1],r=so[t.interactionId];if(r||dt.length<10||t.duration>e.latency){if(r)r.entries.push(t),r.latency=Math.max(r.latency,t.duration);else{var n={id:t.interactionId,latency:t.duration,entries:[t]};so[n.id]=n,dt.push(n)}dt.sort(function(i,o){return o.latency-i.latency}),dt.splice(10).forEach(function(i){delete so[i.id]})}},Xb=function(t,e){e=e||{},Ye(function(){var r;zb();var n,i=ot("INP"),o=function(u){u.forEach(function(l){l.interactionId&&hc(l),l.entryType==="first-input"&&!dt.some(function(p){return p.entries.some(function(f){return l.duration===f.duration&&l.startTime===f.startTime})})&&hc(l)});var c,s=(c=Math.min(dt.length-1,Math.floor(fc()/50)),dt[c]);s&&s.latency!==i.value&&(i.value=s.latency,i.entries=s.entries,n())},a=he("event",o,{durationThreshold:(r=e.durationThreshold)!==null&&r!==void 0?r:40});n=at(t,i,lc,e.reportAllChanges),a&&("interactionId"in PerformanceEventTiming.prototype&&a.observe({type:"first-input",buffered:!0}),Wr(function(){o(a.takeRecords()),i.value<0&&fc()>0&&(i.value=0,i.entries=[]),n(!0)}),Xt(function(){dt=[],pc=cc(),i=ot("INP"),n=at(t,i,lc,e.reportAllChanges)}))})},dc=[2500,4e3],uo={},qb=function(t,e){e=e||{},Ye(function(){var r,n=oo(),i=ot("LCP"),o=function(c){var s=c[c.length-1];s&&s.startTime<n.firstHiddenTime&&(i.value=Math.max(s.startTime-Kr(),0),i.entries=[s],r())},a=he("largest-contentful-paint",o);if(a){r=at(t,i,dc,e.reportAllChanges);var u=io(function(){uo[i.id]||(o(a.takeRecords()),a.disconnect(),uo[i.id]=!0,r(!0))});["keydown","click"].forEach(function(c){addEventListener(c,function(){return setTimeout(u,0)},!0)}),Wr(u),Xt(function(c){i=ot("LCP"),r=at(t,i,dc,e.reportAllChanges),no(function(){i.value=performance.now()-c.timeStamp,uo[i.id]=!0,r(!0)})})}})},vc=[800,1800],Kb=function t(e){document.prerendering?Ye(function(){return t(e)}):document.readyState!=="complete"?addEventListener("load",function(){return t(e)},!0):setTimeout(e,0)},Wb=function(t,e){e=e||{};var r=ot("TTFB"),n=at(t,r,vc,e.reportAllChanges);Kb(function(){var i=ro();if(i){var o=i.responseStart;if(o<=0||o>performance.now())return;r.value=Math.max(o-Kr(),0),r.entries=[i],n(!0),Xt(function(){r=ot("TTFB",0),(n=at(t,r,vc,e.reportAllChanges))(!0)})}})};const Yb=t=>($b(t),rc(t),Gb(t),qb(t),Wb(t),Xb(t),()=>{}),ve=typeof navigator<"u"&&"connection"in navigator?navigator.connection:{},Jb=(t,e)=>{const r=()=>{const i=(new Date().getTime()-e)/1e3;t({relativeTimestamp:i,downlink:ve.downlink,downlinkMax:ve.downlinkMax,effectiveType:ve.effectiveType,rtt:ve.rtt,saveData:ve.saveData,type:ve.type})};r();let n;return n=setInterval(()=>{r()},1e3),()=>{clearInterval(n)}},Qb=()=>{if(!("performance"in window&&"memory"in performance))return{getDeviceDetails:void 0,getCurrentDeviceDetails:void 0};const t=window.performance;return{getDeviceDetails:()=>({deviceMemory:Zb(navigator.deviceMemory||0)}),getCurrentDeviceDetails:()=>{const e=co(t.memory.jsHeapSizeLimit),r=co(t.memory.totalJSHeapSize),n=co(t.memory.usedJSHeapSize);return{jsHeapSizeLimit:e,totalJSHeapSize:r,usedJSHeapSize:n}}}},co=t=>t/Math.pow(1e3,2),Zb=t=>1024*t;function tO(t){return"regexValue"in t}function eO(t){return"matchValue"in t}function rO(t){const e=Math.trunc(t);return e===1?!0:e===0?!1:Math.floor(Math.random()*e)===0}class nO{constructor(e=rO){k(this,"regexCache",new Map),k(this,"config"),this.sampler=e}setConfig(e){this.config=e}isSamplingEnabled(){var e,r,n,i;return!!((r=(e=this.config)==null?void 0:e.logs)!=null&&r.length||(i=(n=this.config)==null?void 0:n.spans)!=null&&i.length)}shouldSample(e){var r,n;return e.name===Uu?this.sampleLog((r=this.config)==null?void 0:r.logs,e):this.sampleSpan((n=this.config)==null?void 0:n.spans,e)}matchesValue(e,r){if(!e)return!1;if(eO(e))return e.matchValue===r;if(tO(e)){const n=e.regexValue;if(n===null)return!1;this.regexCache.has(n)||this.regexCache.set(n,new RegExp(n));const i=this.regexCache.get(n);if(typeof r=="string")return i.test(r)}return!1}matchesAttributes(e,r){if(e)for(const n of e){let i=!1;for(const o of Object.keys(r))if(this.matchesValue(n.key,o)){const a=r[o];if(this.matchesValue(n.attribute,a)){i=!0;break}}if(!i)return!1}return!0}matchEvent(e,r){return!(e.name&&!this.matchesValue(e.name,r.name)||e.attributes&&(!r.attributes||!this.matchesAttributes(e.attributes,r.attributes)))}matchesEvents(e,r){if(e)for(const n of e){let i=!1;for(const o of r)if(this.matchEvent(n,o)){i=!0;break}if(!i)return!1}return!0}matchesSpanConfig(e,r){return!(e.name&&!this.matchesValue(e.name,r.name)||!this.matchesAttributes(e.attributes,r.attributes)||!this.matchesEvents(e.events,r.events))}matchesLogConfig(e,r){if(e.severityText){const n=r[Bu];if(!this.matchesValue(e.severityText,n))return!1}if(e.message){const n=r[$u];if(!this.matchesValue(e.message,n))return!1}return!!this.matchesAttributes(e.attributes,r)}sampleSpan(e,r){if(e){for(const n of e)if(this.matchesSpanConfig(n,r))return{sample:this.sampler(n.samplingRatio),attributes:{[ju]:n.samplingRatio}}}return{sample:!0}}sampleLog(e,r){if(e){for(const n of e)if(this.matchesLogConfig(n,r.attributes))return{sample:this.sampler(n.samplingRatio),attributes:{[ju]:n.samplingRatio}}}return{sample:!0}}}const yc=()=>{const t={end:()=>{},spanContext:()=>({traceId:"",spanId:"",traceFlags:0}),setAttribute:(e,r)=>t,setAttributes:e=>t,addEvent:(e,r,n)=>t,addLinks:e=>t,setStatus:e=>t,recordException:()=>{},addLink:()=>t,updateName:()=>t,isRecording:()=>!1};return t},iO="exception",oO=function(t,e,r){if(!t)return;const n=P({},r);typeof e=="string"?n[_n]=e:e&&(e.code?n[gn]=e.code.toString():e.name&&(n[gn]=e.name),e.message&&(n[_n]=e.message),e.stack&&(n[Kl]=e.stack)),n[gn]||n[_n]?t.addEvent(iO,n):bt("otel","recordException","warn",`Failed to record an exception ${e}`)};class aO{constructor(e){k(this,"organizationID"),k(this,"_options"),k(this,"_integrations",[]),k(this,"_gauges",new Map),k(this,"_counters",new Map),k(this,"_histograms",new Map),k(this,"_up_down_counters",new Map),k(this,"sampler",new nO),k(this,"_started",!1),k(this,"graphqlSDK"),this._options=e,this.organizationID=e.projectId}start(){return yt(this,null,function*(){var e,r,n,i,o,a,u,c,s,l,p,f,y,v,m,_,E;if(this._started)return;this._started=!0,Ob({backendUrl:(r=(e=this._options)==null?void 0:e.backendUrl)!=null?r:"https://pub.observability.app.launchdarkly.com",otlpEndpoint:(o=(i=(n=this._options)==null?void 0:n.otel)==null?void 0:i.otlpEndpoint)!=null?o:"https://otel.observability.app.launchdarkly.com",projectId:this._options.projectId,sessionSecureId:this._options.sessionSecureId,environment:(u=(a=this._options)==null?void 0:a.environment)!=null?u:"production",networkRecordingOptions:typeof((c=this._options)==null?void 0:c.networkRecording)=="object"?this._options.networkRecording:void 0,tracingOrigins:(s=this._options)==null?void 0:s.tracingOrigins,serviceName:(p=(l=this._options)==null?void 0:l.serviceName)!=null?p:"browser",serviceVersion:(f=this._options)==null?void 0:f.version,instrumentations:(v=(y=this._options)==null?void 0:y.otel)==null?void 0:v.instrumentations,eventNames:(_=(m=this._options)==null?void 0:m.otel)==null?void 0:_.eventNames,getIntegrations:()=>this._integrations},this.sampler),this._gauges.clear(),this._counters.clear(),this._histograms.clear(),this._up_down_counters.clear();const R=new bl((E=this._options.backendUrl)!=null?E:"https://pub.observability.app.launchdarkly.com",{headers:{}});this.graphqlSDK=Hl(R,dp()),yield this.configureSampling(),this.setupListeners()})}stop(){return yt(this,null,function*(){this._started&&(this._started=!1,yield Lb())})}configureSampling(){return yt(this,null,function*(){try{const e=yield this.graphqlSDK.GetSamplingConfig({organization_verbose_id:`${this.organizationID}`});this.sampler.setConfig(e.sampling)}catch(e){Tt("sampling","warn",`LaunchDarkly Observability: Failed to configure sampling: ${e}`)}})}_recordLog(e,r,n,i){this.startSpan(Uu,o=>{const a=typeof e=="string"?e:be(e),u=i?be(i.map(c=>c.toString())):void 0;if(o?.addEvent("log",P({[Bu]:r,[$u]:a,"code.stacktrace":u},n)),this._options.reportConsoleErrors&&r==="error"){o?.recordException(new Error(a)),o?.setStatus({code:Er.ERROR,message:a});const c=new Error(a);i&&(c.stack=u),this.recordError(c)}})}_recordErrorMessage(e,r){try{e.payload&&(r=P(P({},JSON.parse(e.payload)),r||{}))}catch{}this.startSpan("highlight.exception",o=>{var a;oO(o,(a=e.error)!=null?a:new Error(e.event),{[bb]:e.id}),o?.setAttributes(P({event:e.event,type:e.type,url:e.url,source:e.source,lineNumber:e.lineNumber,columnNumber:e.columnNumber},r))});const n=e,i=Gp(n,["payload"]);for(const o of this._integrations)o.error(Ot(),rt(P({},i),{payload:JSON.stringify(r)}))}recordError(e,r,n,i,o){var a,u,c,s;e=e||new Error("Unknown error"),e instanceof Error&&e.cause&&(n=rt(P({},n),{"exception.cause":JSON.stringify(e.cause)}));let l=r?r+":"+e.message:e.message;o==="React.ErrorBoundary"&&(l="ErrorBoundary: "+l);const p=yr(e),f={error:e,event:l,type:o??"custom",url:window.location.href,source:i??"frontend",lineNumber:(a=p[0])!=null&&a.lineNumber?(u=p[0])==null?void 0:u.lineNumber:0,columnNumber:(c=p[0])!=null&&c.columnNumber?(s=p[0])==null?void 0:s.columnNumber:0,stackTrace:p,timestamp:new Date().toISOString(),id:ua()};this._recordErrorMessage(f,n)}recordCount(e){var r;let n=this._counters.get(e.name);if(!n){if(n=(r=Xr())==null?void 0:r.createCounter(e.name),!n)return;this._counters.set(e.name,n)}n.add(e.value,rt(P({},e.attributes),{"highlight.session_id":Ot()}))}recordGauge(e){var r,n,i,o;let a=this._gauges.get(e.name);if(!a){if(a=(r=Xr())==null?void 0:r.createGauge(e.name),!a)return;this._gauges.set(e.name,a)}a.record(e.value,rt(P({},e.attributes),{"highlight.session_id":Ot()}));const u={name:e.name,value:e.value,category:(n=e.attributes)==null?void 0:n.category,group:(o=(i=e.attributes)==null?void 0:i.group)==null?void 0:o.toString(),tags:e.attributes?Object.entries(e.attributes).map(([c,s])=>{var l;return{name:c??"",value:(l=s?.toString())!=null?l:""}}):[]};for(const c of this._integrations)c.recordGauge(Ot(),u)}recordIncr(e){this.recordCount(rt(P({},e),{value:1}))}recordHistogram(e){var r;let n=this._histograms.get(e.name);if(!n){if(n=(r=Xr())==null?void 0:r.createHistogram(e.name),!n)return;this._histograms.set(e.name,n)}n.record(e.value,rt(P({},e.attributes),{"highlight.session_id":Ot()}))}recordUpDownCounter(e){var r;let n=this._up_down_counters.get(e.name);if(!n){if(n=(r=Xr())==null?void 0:r.createUpDownCounter(e.name),!n)return;this._up_down_counters.set(e.name,n)}n.add(e.value,rt(P({},e.attributes),{"highlight.session_id":Ot()}))}startSpan(e,r,n,i){const o=Vu();if(!o){const u=yc();return i===void 0&&n===void 0?r(u):i===void 0?n(u):i(u)}const a=(u,c)=>{const s=c(u);return s instanceof Promise?s.finally(()=>u.end()):(u.end(),s)};return i===void 0&&n===void 0?o.startActiveSpan(e,u=>a(u,r)):i===void 0?o.startActiveSpan(e,r,u=>a(u,n)):o.startActiveSpan(e,r,n,u=>a(u,i))}startManualSpan(e,r,n,i){const o=Vu();if(!o){const a=yc();return i===void 0&&n===void 0?r(a):i===void 0?n(a):i(a)}return i===void 0&&n===void 0?o.startActiveSpan(e,r):i===void 0?o.startActiveSpan(e,r,n):o.startActiveSpan(e,r,n,i)}register(e,r){this._integrations.push(new Np(e,r))}getHooks(e){return this._integrations.flatMap(r=>{var n,i;return(i=(n=r.getHooks)==null?void 0:n.call(r,e))!=null?i:[]})}submitViewportMetrics({height:e,width:r,availHeight:n,availWidth:i}){this.recordGauge({name:Pt.ViewportHeight,value:e,attributes:{category:ut.Device,group:window.location.href}}),this.recordGauge({name:Pt.ViewportWidth,value:r,attributes:{category:ut.Device,group:window.location.href}}),this.recordGauge({name:Pt.ScreenHeight,value:n,attributes:{category:ut.Device,group:window.location.href}}),this.recordGauge({name:Pt.ScreenWidth,value:i,attributes:{category:ut.Device,group:window.location.href}}),this.recordGauge({name:Pt.ViewportArea,value:e*r,attributes:{category:ut.Device,group:window.location.href}})}setupListeners(){var e;this._options.disableConsoleRecording||qp(n=>{var i;this._recordLog((i=n.value)==null?void 0:i.join(" "),n.type,n.attributes?JSON.parse(n.attributes):{},n.trace)},{level:(e=this._options.consoleMethodsToRecord)!=null?e:[...Hp],logger:"console",stringifyOptions:{depthOfLimit:10,numOfKeysLimit:100,stringLengthLimit:1e3}}),this._options.enablePerformanceRecording!==!1&&(jb(n=>{Object.entries(n).filter(([i])=>i!=="relativeTimestamp").forEach(([i,o])=>o&&this.recordGauge({name:i,value:o,attributes:{category:ut.Performance,group:window.location.href}}))},0),Db(n=>{this.recordGauge({name:"Jank",value:n.jankAmount,attributes:{category:ut.WebVital,group:n.querySelector}})},0)),rf(n=>{var i;if(of.includes(n.event)||af.some(u=>n.event.includes(u)))return;const o=new Error(n.event);o.stack=be(n.stackTrace.map(u=>u.toString()));let a={};try{n.payload&&(a=JSON.parse(n.payload))}catch{}this._recordErrorMessage(rt(P({},n),{error:(i=n.error)!=null?i:o}),a)},{enablePromisePatch:!!this._options.enablePromisePatch}),Yb(n=>{const{name:i,value:o}=n,{hostname:a,pathname:u,href:c}=window.location;this.recordGauge({name:i,value:o,attributes:{group:window.location.pathname,category:ut.WebVital,[pr]:Ds(c),[Bo]:u,[Yl]:a}})}),Mp(n=>{this.submitViewportMetrics(n)}),Jb(n=>{const i={category:ut.Performance,group:window.location.href};n.saveData!==void 0&&(i.saveData=n.saveData.toString()),n.effectiveType!==void 0&&(i.effectiveType=n.effectiveType.toString()),n.type!==void 0&&(i.type=n.type.toString()),Object.entries(n).filter(([o])=>o!=="relativeTimestamp").forEach(([o,a])=>{ql(a)&&this.recordGauge({name:o,value:a,attributes:i})})},new Date().getTime());const{getDeviceDetails:r}=Qb();r&&this.recordGauge({name:Pt.DeviceMemory,value:r().deviceMemory,attributes:{category:ut.Device,group:window.location.href}})}recordLog(e,r,n){return this._recordLog(e,r,n)}}class sO extends jp{constructor(e){super(e),k(this,"observe"),k(this,"options"),this.options=e}initialize(e,r){try{if(typeof window>"u"||typeof document>"u"){console.warn("@launchdarkly/observability is not initializing because it is not supported in this environment.");return}if(!e){console.warn("@launchdarkly/observability is not initializing because the SDK credential is undefined.");return}this.configureSession(e,r),this.observe=new aO(rt(P({},r),{projectId:e,sessionSecureId:this.sessionSecureID})),r!=null&&r.manualStart||this.observe.start(),nt.LDObserve.load(this.observe)}catch(n){Tt("Error initializing @launchdarkly/observability SDK","error",n)}}getMetadata(){return{name:"@launchdarkly/observability"}}register(e,r){var n;(n=this.observe)==null||n.register(e,r)}getHooks(e){var r,n,i,o;const a=P(P({[Zl]:e.sdk.name,[tp]:e.sdk.version,[yp]:e.clientSideId,[Tp]:"LaunchDarkly"},(r=e.application)!=null&&r.id?{[Op]:e.application.id}:{}),(n=e.application)!=null&&n.version?{[Sp]:e.application.version}:{});return this.initialize((o=(i=e.sdkKey)!=null?i:e.mobileKey)!=null?o:e.clientSideId,this.options),[{getMetadata:()=>({name:"@launchdarkly/observability/hooks"}),afterIdentify:(u,c,s)=>{var l,p,f,y,v,m,_,E;for(const R of(f=(p=(l=this.observe)==null?void 0:l.getHooks)==null?void 0:p.call(l,e))!=null?f:[])(y=R.afterIdentify)==null||y.call(R,u,c,s);if(s.status==="completed"){const R=rt(P({},Qo(u.context)),{key:(_=(m=(v=this.options)==null?void 0:v.contextFriendlyName)==null?void 0:m.call(v,u.context))!=null?_:Nn(u.context),timeout:u.timeout,canonicalKey:Nn(u.context),[Lp]:s.status});(E=this.observe)==null||E.recordLog("LD.identify","info",P(P({},a),R))}return c},afterEvaluation:(u,c,s)=>{var l,p,f,y,v;for(const E of(f=(p=(l=this.observe)==null?void 0:l.getHooks)==null?void 0:p.call(l,e))!=null?f:[])(y=E.afterEvaluation)==null||y.call(E,u,c,s);const m=P({[mp]:u.flagKey,[Ep]:JSON.stringify(s.value)},s.variationIndex?{[bp]:s.variationIndex}:{});if(s.reason)for(const E in Ko){const R=E,U=s.reason[R];U&&(m[Ko[R]]=U)}u.context&&(m[_p]=JSON.stringify(Qo(u.context)),m[gp]=Nn(u.context));const _=P(P({},a),m);return(v=this.observe)==null||v.startSpan(vp,E=>{E&&E.addEvent(J,_)}),c},afterTrack:u=>{var c,s,l,p,f;for(const y of(l=(s=(c=this.observe)==null?void 0:c.getHooks)==null?void 0:s.call(c,e))!=null?l:[])(p=y.afterTrack)==null||p.call(y,u);(f=this.observe)==null||f.recordLog("LD.track","info",P(rt(P({},a),{key:u.key,value:u.metricValue}),typeof u.data=="object"?u.data:{}))}}]}}nt.default=sO,Object.defineProperties(nt,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
307
|
+
`,Cu(s,e),`To resolve the conflict:
|
|
308
|
+
`,Nu(s,e))}}catch(l){r={error:l}}finally{try{u&&!u.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}return o},t}(),nT=function(){function t(e){this._backingStorages=e}return t.prototype.record=function(e,n,r,i){this._backingStorages.forEach(function(o){o.record(e,n,r,i)})},t}(),rT=function(){function t(e,n){this._instrumentName=e,this._valueType=n,this._buffer=new qt}return t.prototype.observe=function(e,n){if(n===void 0&&(n={}),typeof e!="number"){T.warn("non-number value provided to metric "+this._instrumentName+": "+e);return}this._valueType===St.INT&&!Number.isInteger(e)&&(T.warn("INT value type cannot accept a floating-point value for "+this._instrumentName+", ignoring the fractional digits."),e=Math.trunc(e),!Number.isInteger(e))||this._buffer.set(n,e)},t}(),iT=function(){function t(){this._buffer=new Map}return t.prototype.observe=function(e,n,r){if(r===void 0&&(r={}),!!Yi(e)){var i=this._buffer.get(e);if(i==null&&(i=new qt,this._buffer.set(e,i)),typeof n!="number"){T.warn("non-number value provided to metric "+e._descriptor.name+": "+n);return}e._descriptor.valueType===St.INT&&!Number.isInteger(n)&&(T.warn("INT value type cannot accept a floating-point value for "+e._descriptor.name+", ignoring the fractional digits."),n=Math.trunc(n),!Number.isInteger(n))||i.set(r,n)}},t}(),Zi=function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function u(l){try{s(r.next(l))}catch(p){a(p)}}function c(l){try{s(r.throw(l))}catch(p){a(p)}}function s(l){l.done?o(l.value):i(l.value).then(u,c)}s((r=r.apply(t,[])).next())})},to=function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(l){return c([s,l])}}function c(s){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,i=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){n.label=s[1];break}if(s[0]===6&&n.label<o[1]){n.label=o[1],o=s;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(s);break}o[2]&&n.ops.pop(),n.trys.pop();continue}s=e.call(t,n)}catch(l){s=[6,l],i=0}finally{r=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},xu=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},Pu=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},oT=function(){function t(){this._callbacks=[],this._batchCallbacks=[]}return t.prototype.addCallback=function(e,n){var r=this._findCallback(e,n);r>=0||this._callbacks.push({callback:e,instrument:n})},t.prototype.removeCallback=function(e,n){var r=this._findCallback(e,n);r<0||this._callbacks.splice(r,1)},t.prototype.addBatchCallback=function(e,n){var r=new Set(n.filter(Yi));if(r.size===0){T.error("BatchObservableCallback is not associated with valid instruments",n);return}var i=this._findBatchCallback(e,r);i>=0||this._batchCallbacks.push({callback:e,instruments:r})},t.prototype.removeBatchCallback=function(e,n){var r=new Set(n.filter(Yi)),i=this._findBatchCallback(e,r);i<0||this._batchCallbacks.splice(i,1)},t.prototype.observe=function(e,n){return Zi(this,void 0,void 0,function(){var r,i,o,a;return to(this,function(u){switch(u.label){case 0:return r=this._observeCallbacks(e,n),i=this._observeBatchCallbacks(e,n),[4,Ig(Pu(Pu([],xu(r),!1),xu(i),!1))];case 1:return o=u.sent(),a=o.filter(Mg).map(function(c){return c.reason}),[2,a]}})})},t.prototype._observeCallbacks=function(e,n){var r=this;return this._callbacks.map(function(i){var o=i.callback,a=i.instrument;return Zi(r,void 0,void 0,function(){var u,c;return to(this,function(s){switch(s.label){case 0:return u=new rT(a._descriptor.name,a._descriptor.valueType),c=Promise.resolve(o(u)),n!=null&&(c=Ye(c,n)),[4,c];case 1:return s.sent(),a._metricStorages.forEach(function(l){l.record(u._buffer,e)}),[2]}})})})},t.prototype._observeBatchCallbacks=function(e,n){var r=this;return this._batchCallbacks.map(function(i){var o=i.callback,a=i.instruments;return Zi(r,void 0,void 0,function(){var u,c;return to(this,function(s){switch(s.label){case 0:return u=new iT,c=Promise.resolve(o(u)),n!=null&&(c=Ye(c,n)),[4,c];case 1:return s.sent(),a.forEach(function(l){var p=u._buffer.get(l);p!=null&&l._metricStorages.forEach(function(f){f.record(p,e)})}),[2]}})})})},t.prototype._findCallback=function(e,n){return this._callbacks.findIndex(function(r){return r.callback===e&&r.instrument===n})},t.prototype._findBatchCallback=function(e,n){return this._batchCallbacks.findIndex(function(r){return r.callback===e&&kg(r.instruments,n)})},t}(),aT=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),sT=function(t){aT(e,t);function e(n,r,i,o,a){var u=t.call(this,n)||this;return u._attributesProcessor=i,u._aggregationCardinalityLimit=a,u._deltaMetricStorage=new Au(r,u._aggregationCardinalityLimit),u._temporalMetricStorage=new Ru(r,o),u}return e.prototype.record=function(n,r,i,o){r=this._attributesProcessor.process(r,i),this._deltaMetricStorage.record(n,r,i,o)},e.prototype.collect=function(n,r){var i=this._deltaMetricStorage.collect();return this._temporalMetricStorage.buildMetrics(n,this._instrumentDescriptor,i,r)},e}(Su),Iu=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),eo=function(){function t(){}return t.Noop=function(){return cT},t}(),uT=function(t){Iu(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.process=function(n,r){return n},e}(eo);(function(t){Iu(e,t);function e(n){var r=t.call(this)||this;return r._allowedAttributeNames=n,r}return e.prototype.process=function(n,r){var i=this,o={};return Object.keys(n).filter(function(a){return i._allowedAttributeNames.includes(a)}).forEach(function(a){return o[a]=n[a]}),o},e})(eo);var cT=new uT,lT=function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function u(l){try{s(r.next(l))}catch(p){a(p)}}function c(l){try{s(r.throw(l))}catch(p){a(p)}}function s(l){l.done?o(l.value):i(l.value).then(u,c)}s((r=r.apply(t,[])).next())})},pT=function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(l){return c([s,l])}}function c(s){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,i=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){n.label=s[1];break}if(s[0]===6&&n.label<o[1]){n.label=o[1],o=s;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(s);break}o[2]&&n.ops.pop(),n.trys.pop();continue}s=e.call(t,n)}catch(l){s=[6,l],i=0}finally{r=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},fT=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},hT=function(){function t(e,n){this._meterProviderSharedState=e,this._instrumentationScope=n,this.metricStorageRegistry=new eT,this.observableRegistry=new oT,this.meter=new HE(this)}return t.prototype.registerMetricStorage=function(e){var n=this._registerMetricStorage(e,sT);return n.length===1?n[0]:new nT(n)},t.prototype.registerAsyncMetricStorage=function(e){var n=this._registerMetricStorage(e,YE);return n},t.prototype.collect=function(e,n,r){return lT(this,void 0,void 0,function(){var i,o,a;return pT(this,function(u){switch(u.label){case 0:return[4,this.observableRegistry.observe(n,r?.timeoutMillis)];case 1:return i=u.sent(),o=this.metricStorageRegistry.getStorages(e),o.length===0?[2,null]:(a=o.map(function(c){return c.collect(e,n)}).filter(xg),a.length===0?[2,{errors:i}]:[2,{scopeMetrics:{scope:this._instrumentationScope,metrics:a},errors:i}])}})})},t.prototype._registerMetricStorage=function(e,n){var r=this,i=this._meterProviderSharedState.viewRegistry.findViews(e,this._instrumentationScope),o=i.map(function(c){var s=Bg(c,e),l=r.metricStorageRegistry.findOrUpdateCompatibleStorage(s);if(l!=null)return l;var p=c.aggregation.createAggregator(s),f=new n(s,p,c.attributesProcessor,r._meterProviderSharedState.metricCollectors,c.aggregationCardinalityLimit);return r.metricStorageRegistry.register(f),f});if(o.length===0){var a=this._meterProviderSharedState.selectAggregations(e.type),u=a.map(function(c){var s=fT(c,2),l=s[0],p=s[1],f=r.metricStorageRegistry.findOrUpdateCompatibleCollectorStorage(l,e);if(f!=null)return f;var y=p.createAggregator(e),v=l.selectCardinalityLimit(e.type),m=new n(e,y,eo.Noop(),[l],v);return r.metricStorageRegistry.registerForCollector(l,m),m});o=o.concat(u)}return o},t}(),dT=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},vT=function(){function t(e){this.resource=e,this.viewRegistry=new kE,this.metricCollectors=[],this.meterSharedStates=new Map}return t.prototype.getMeterSharedState=function(e){var n=Pg(e),r=this.meterSharedStates.get(n);return r==null&&(r=new hT(this,e),this.meterSharedStates.set(n,r)),r},t.prototype.selectAggregations=function(e){var n,r,i=[];try{for(var o=dT(this.metricCollectors),a=o.next();!a.done;a=o.next()){var u=a.value;i.push([u,u.selectAggregation(e)])}}catch(c){n={error:c}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i},t}(),zn=function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function u(l){try{s(r.next(l))}catch(p){a(p)}}function c(l){try{s(r.throw(l))}catch(p){a(p)}}function s(l){l.done?o(l.value):i(l.value).then(u,c)}s((r=r.apply(t,[])).next())})},Xn=function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(l){return c([s,l])}}function c(s){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,i=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){n.label=s[1];break}if(s[0]===6&&n.label<o[1]){n.label=o[1],o=s;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(s);break}o[2]&&n.ops.pop(),n.trys.pop();continue}s=e.call(t,n)}catch(l){s=[6,l],i=0}finally{r=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},yT=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},mT=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},_T=function(){function t(e,n){this._sharedState=e,this._metricReader=n}return t.prototype.collect=function(e){return zn(this,void 0,void 0,function(){var n,r,i,o,a=this;return Xn(this,function(u){switch(u.label){case 0:return n=qi(Date.now()),r=[],i=[],o=Array.from(this._sharedState.meterSharedStates.values()).map(function(c){return zn(a,void 0,void 0,function(){var s;return Xn(this,function(l){switch(l.label){case 0:return[4,c.collect(this,n,e)];case 1:return s=l.sent(),s?.scopeMetrics!=null&&r.push(s.scopeMetrics),s?.errors!=null&&i.push.apply(i,mT([],yT(s.errors),!1)),[2]}})})}),[4,Promise.all(o)];case 1:return u.sent(),[2,{resourceMetrics:{resource:this._sharedState.resource,scopeMetrics:r},errors:i}]}})})},t.prototype.forceFlush=function(e){return zn(this,void 0,void 0,function(){return Xn(this,function(n){switch(n.label){case 0:return[4,this._metricReader.forceFlush(e)];case 1:return n.sent(),[2]}})})},t.prototype.shutdown=function(e){return zn(this,void 0,void 0,function(){return Xn(this,function(n){switch(n.label){case 0:return[4,this._metricReader.shutdown(e)];case 1:return n.sent(),[2]}})})},t.prototype.selectAggregationTemporality=function(e){return this._metricReader.selectAggregationTemporality(e)},t.prototype.selectAggregation=function(e){return this._metricReader.selectAggregation(e)},t.prototype.selectCardinalityLimit=function(e){var n,r,i;return(i=(r=(n=this._metricReader).selectCardinalityLimit)===null||r===void 0?void 0:r.call(n,e))!==null&&i!==void 0?i:2e3},t}(),Mu=function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function u(l){try{s(r.next(l))}catch(p){a(p)}}function c(l){try{s(r.throw(l))}catch(p){a(p)}}function s(l){l.done?o(l.value):i(l.value).then(u,c)}s((r=r.apply(t,[])).next())})},ku=function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(l){return c([s,l])}}function c(s){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,i=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){n.label=s[1];break}if(s[0]===6&&n.label<o[1]){n.label=o[1],o=s;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(s);break}o[2]&&n.ops.pop(),n.trys.pop();continue}s=e.call(t,n)}catch(l){s=[6,l],i=0}finally{r=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},Du=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};function gT(t,e){var n=e??Xe.empty();return t?Xe.default().merge(n):n}var ET=function(){function t(e){var n,r,i,o,a;if(this._shutdown=!1,this._sharedState=new vT(gT((a=e?.mergeResourceWithDefaults)!==null&&a!==void 0?a:!0,e?.resource)),e?.views!=null&&e.views.length>0)try{for(var u=Du(e.views),c=u.next();!c.done;c=u.next()){var s=c.value;this._sharedState.viewRegistry.addView(s)}}catch(y){n={error:y}}finally{try{c&&!c.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}if(e?.readers!=null&&e.readers.length>0)try{for(var l=Du(e.readers),p=l.next();!p.done;p=l.next()){var f=p.value;this.addMetricReader(f)}}catch(y){i={error:y}}finally{try{p&&!p.done&&(o=l.return)&&o.call(l)}finally{if(i)throw i.error}}}return t.prototype.getMeter=function(e,n,r){return n===void 0&&(n=""),r===void 0&&(r={}),this._shutdown?(T.warn("A shutdown MeterProvider cannot provide a Meter"),zf()):this._sharedState.getMeterSharedState({name:e,version:n,schemaUrl:r.schemaUrl}).meter},t.prototype.addMetricReader=function(e){var n=new _T(this._sharedState,e);e.setMetricProducer(n),this._sharedState.metricCollectors.push(n)},t.prototype.shutdown=function(e){return Mu(this,void 0,void 0,function(){return ku(this,function(n){switch(n.label){case 0:return this._shutdown?(T.warn("shutdown may only be called once per MeterProvider"),[2]):(this._shutdown=!0,[4,Promise.all(this._sharedState.metricCollectors.map(function(r){return r.shutdown(e)}))]);case 1:return n.sent(),[2]}})})},t.prototype.forceFlush=function(e){return Mu(this,void 0,void 0,function(){return ku(this,function(n){switch(n.label){case 0:return this._shutdown?(T.warn("invalid attempt to force flush after MeterProvider shutdown"),[2]):[4,Promise.all(this._sharedState.metricCollectors.map(function(r){return r.forceFlush(e)}))];case 1:return n.sent(),[2]}})})},t}();function TT(t,e){var n=Qs(e);return{resource:Zs(t.resource),schemaUrl:void 0,scopeMetrics:bT(t.scopeMetrics,n)}}function bT(t,e){return Array.from(t.map(function(n){return{scope:tu(n.scope),metrics:n.metrics.map(function(r){return OT(r,e)}),schemaUrl:n.scope.schemaUrl}}))}function OT(t,e){var n={name:t.descriptor.name,description:t.descriptor.description,unit:t.descriptor.unit},r=LT(t.aggregationTemporality);switch(t.dataPointType){case vt.SUM:n.sum={aggregationTemporality:r,isMonotonic:t.isMonotonic,dataPoints:Uu(t,e)};break;case vt.GAUGE:n.gauge={dataPoints:Uu(t,e)};break;case vt.HISTOGRAM:n.histogram={aggregationTemporality:r,dataPoints:wT(t,e)};break;case vt.EXPONENTIAL_HISTOGRAM:n.exponentialHistogram={aggregationTemporality:r,dataPoints:AT(t,e)};break}return n}function ST(t,e,n){var r={attributes:Ft(t.attributes),startTimeUnixNano:n.encodeHrTime(t.startTime),timeUnixNano:n.encodeHrTime(t.endTime)};switch(e){case St.INT:r.asInt=t.value;break;case St.DOUBLE:r.asDouble=t.value;break}return r}function Uu(t,e){return t.dataPoints.map(function(n){return ST(n,t.descriptor.valueType,e)})}function wT(t,e){return t.dataPoints.map(function(n){var r=n.value;return{attributes:Ft(n.attributes),bucketCounts:r.buckets.counts,explicitBounds:r.buckets.boundaries,count:r.count,sum:r.sum,min:r.min,max:r.max,startTimeUnixNano:e.encodeHrTime(n.startTime),timeUnixNano:e.encodeHrTime(n.endTime)}})}function AT(t,e){return t.dataPoints.map(function(n){var r=n.value;return{attributes:Ft(n.attributes),count:r.count,min:r.min,max:r.max,sum:r.sum,positive:{offset:r.positive.offset,bucketCounts:r.positive.bucketCounts},negative:{offset:r.negative.offset,bucketCounts:r.negative.bucketCounts},scale:r.scale,zeroCount:r.zeroCount,startTimeUnixNano:e.encodeHrTime(n.startTime),timeUnixNano:e.encodeHrTime(n.endTime)}})}function LT(t){switch(t){case pt.DELTA:return 1;case pt.CUMULATIVE:return 2}}function RT(t,e){return{resourceMetrics:t.map(function(n){return TT(n,e)})}}var CT=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},NT=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o};function xT(t,e){var n,r=t.spanContext(),i=t.status;return{traceId:e.encodeSpanContext(r.traceId),spanId:e.encodeSpanContext(r.spanId),parentSpanId:e.encodeOptionalSpanContext(t.parentSpanId),traceState:(n=r.traceState)===null||n===void 0?void 0:n.serialize(),name:t.name,kind:t.kind==null?0:t.kind+1,startTimeUnixNano:e.encodeHrTime(t.startTime),endTimeUnixNano:e.encodeHrTime(t.endTime),attributes:Ft(t.attributes),droppedAttributesCount:t.droppedAttributesCount,events:t.events.map(function(o){return IT(o,e)}),droppedEventsCount:t.droppedEventsCount,status:{code:i.code,message:i.message},links:t.links.map(function(o){return PT(o,e)}),droppedLinksCount:t.droppedLinksCount}}function PT(t,e){var n;return{attributes:t.attributes?Ft(t.attributes):[],spanId:e.encodeSpanContext(t.context.spanId),traceId:e.encodeSpanContext(t.context.traceId),traceState:(n=t.context.traceState)===null||n===void 0?void 0:n.serialize(),droppedAttributesCount:t.droppedAttributesCount||0}}function IT(t,e){return{attributes:t.attributes?Ft(t.attributes):[],name:t.name,timeUnixNano:e.encodeHrTime(t.time),droppedAttributesCount:t.droppedAttributesCount||0}}function MT(t,e){var n=Qs(e);return{resourceSpans:DT(t,n)}}function kT(t){var e,n,r=new Map;try{for(var i=CT(t),o=i.next();!o.done;o=i.next()){var a=o.value,u=r.get(a.resource);u||(u=new Map,r.set(a.resource,u));var c=a.instrumentationLibrary.name+"@"+(a.instrumentationLibrary.version||"")+":"+(a.instrumentationLibrary.schemaUrl||""),s=u.get(c);s||(s=[],u.set(c,s)),s.push(a)}}catch(l){e={error:l}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return r}function DT(t,e){for(var n=kT(t),r=[],i=n.entries(),o=i.next();!o.done;){for(var a=NT(o.value,2),u=a[0],c=a[1],s=[],l=c.values(),p=l.next();!p.done;){var f=p.value;if(f.length>0){var y=f.map(function(m){return xT(m,e)});s.push({scope:tu(f[0].instrumentationLibrary),spans:y,schemaUrl:f[0].instrumentationLibrary.schemaUrl})}p=l.next()}var v={resource:Zs(u),scopeSpans:s,schemaUrl:void 0};r.push(v),o=i.next()}return r}var UT={serializeRequest:function(t){var e=RT([t],{useLongBits:!1}),n=new TextEncoder;return n.encode(JSON.stringify(e))},deserializeResponse:function(t){var e=new TextDecoder;return JSON.parse(e.decode(t))}},jT={serializeRequest:function(t){var e=MT(t,{useHex:!0,useLongBits:!1}),n=new TextEncoder;return n.encode(JSON.stringify(e))},deserializeResponse:function(t){var e=new TextDecoder;return JSON.parse(e.decode(t))}},BT=function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function u(l){try{s(r.next(l))}catch(p){a(p)}}function c(l){try{s(r.throw(l))}catch(p){a(p)}}function s(l){l.done?o(l.value):i(l.value).then(u,c)}s((r=r.apply(t,[])).next())})},$T=function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(l){return c([s,l])}}function c(s){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,i=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){n.label=s[1];break}if(s[0]===6&&n.label<o[1]){n.label=o[1],o=s;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(s);break}o[2]&&n.ops.pop(),n.trys.pop();continue}s=e.call(t,n)}catch(l){s=[6,l],i=0}finally{r=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},FT=5,VT=1e3,HT=5e3,GT=1.5,ju=.2;function qT(){return Math.random()*(2*ju)-ju}var zT=function(){function t(e){this._transport=e}return t.prototype.retry=function(e,n,r){var i=this;return new Promise(function(o,a){setTimeout(function(){i._transport.send(e,n).then(o,a)},r)})},t.prototype.send=function(e,n){var r;return BT(this,void 0,void 0,function(){var i,o,a,u,c,s,l;return $T(this,function(p){switch(p.label){case 0:return i=Date.now()+n,[4,this._transport.send(e,n)];case 1:o=p.sent(),a=FT,u=VT,p.label=2;case 2:return o.status==="retryable"&&a>0?(a--,c=Math.max(Math.min(u,HT)+qT(),0),u=u*GT,s=(r=o.retryInMillis)!==null&&r!==void 0?r:c,l=i-Date.now(),s>l?[2,o]:[4,this.retry(e,l,s)]):[3,4];case 3:return o=p.sent(),[3,2];case 4:return[2,o]}})})},t.prototype.shutdown=function(){return this._transport.shutdown()},t}();function Bu(t){return new zT(t.transport)}function XT(t){var e=[429,502,503,504];return e.includes(t)}function KT(t){if(t!=null){var e=Number.parseInt(t,10);if(Number.isInteger(e))return e>0?e*1e3:-1;var n=new Date(t).getTime()-Date.now();return n>=0?n:0}}var WT=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},YT=function(){function t(e){this._parameters=e}return t.prototype.send=function(e,n){var r=this;return new Promise(function(i){var o=new XMLHttpRequest;o.timeout=n,o.open("POST",r._parameters.url);var a=r._parameters.headers();Object.entries(a).forEach(function(u){var c=WT(u,2),s=c[0],l=c[1];o.setRequestHeader(s,l)}),o.ontimeout=function(u){i({status:"failure",error:new Error("XHR request timed out")})},o.onreadystatechange=function(){o.status>=200&&o.status<=299?(T.debug("XHR success"),i({status:"success"})):o.status&&XT(o.status)?i({status:"retryable",retryInMillis:KT(o.getResponseHeader("Retry-After"))}):o.status!==0&&i({status:"failure",error:new Error("XHR request failed with non-retryable status")})},o.onabort=function(){i({status:"failure",error:new Error("XHR request aborted")})},o.onerror=function(){i({status:"failure",error:new Error("XHR request errored")})},o.send(e)})},t.prototype.shutdown=function(){},t}();function JT(t){return new YT(t)}var QT=function(){function t(e){this._params=e}return t.prototype.send=function(e){var n=this;return new Promise(function(r){navigator.sendBeacon(n._params.url,new Blob([e],{type:n._params.blobType}))?(T.debug("SendBeacon success"),r({status:"success"})):r({status:"failure",error:new Error("SendBeacon failed")})})},t.prototype.shutdown=function(){},t}();function ZT(t){return new QT(t)}function tb(t,e){return zs(t,e,Bu({transport:JT(t)}))}function eb(t,e){return zs(t,e,Bu({transport:ZT({url:t.url,blobType:t.headers()["Content-Type"]})}))}var nb=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o};function rb(t){return function(){var e,n={};return Object.entries((e=t?.())!==null&&e!==void 0?e:{}).forEach(function(r){var i=nb(r,2),o=i[0],a=i[1];typeof a<"u"?n[o]=String(a):T.warn('Header "'+o+'" has invalid value ('+a+") and will be ignored")}),n}}var zt=function(){return zt=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},zt.apply(this,arguments)};function ib(t,e,n){var r=zt({},n()),i={};return function(){return e!=null&&Object.assign(i,e()),t!=null&&Object.assign(i,t()),Object.assign(i,r)}}function ob(t){if(t!=null)try{return new URL(t),t}catch{throw new Error("Configuration: Could not parse user-provided export URL: '"+t+"'")}}function ab(t,e,n){var r,i,o,a;return zt(zt({},sg(t,e,n)),{headers:ib(rb(t.headers),e.headers,n.headers),url:(i=(r=ob(t.url))!==null&&r!==void 0?r:e.url)!==null&&i!==void 0?i:n.url,agentOptions:(a=(o=t.agentOptions)!==null&&o!==void 0?o:e.agentOptions)!==null&&a!==void 0?a:n.agentOptions})}function sb(t,e){return zt(zt({},ug()),{headers:function(){return t},url:"http://localhost:4318/"+e,agentOptions:{keepAlive:!0}})}function ub(t,e,n){return ab({url:t.url,timeoutMillis:t.timeoutMillis,headers:ag(t.headers),concurrencyLimit:t.concurrencyLimit},{},sb(n,e))}function $u(t,e,n,r){var i=!!t.headers||typeof navigator.sendBeacon!="function",o=ub(t,n,r);return i?tb(o,e):eb(o,e)}var cb=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),lb=function(t){cb(e,t);function e(n){return n===void 0&&(n={}),t.call(this,$u(n,jT,"v1/traces",{"Content-Type":"application/json"}))||this}return e}(Gs),Kn;(function(t){t[t.DELTA=0]="DELTA",t[t.CUMULATIVE=1]="CUMULATIVE",t[t.LOWMEMORY=2]="LOWMEMORY"})(Kn||(Kn={}));var pb=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),no=function(){return pt.CUMULATIVE},Fu=function(t){switch(t){case A.COUNTER:case A.OBSERVABLE_COUNTER:case A.GAUGE:case A.HISTOGRAM:case A.OBSERVABLE_GAUGE:return pt.DELTA;case A.UP_DOWN_COUNTER:case A.OBSERVABLE_UP_DOWN_COUNTER:return pt.CUMULATIVE}},Vu=function(t){switch(t){case A.COUNTER:case A.HISTOGRAM:return pt.DELTA;case A.GAUGE:case A.UP_DOWN_COUNTER:case A.OBSERVABLE_UP_DOWN_COUNTER:case A.OBSERVABLE_COUNTER:case A.OBSERVABLE_GAUGE:return pt.CUMULATIVE}};function fb(){var t=Wh(),e=t.OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE.trim().toLowerCase();return e==="cumulative"?no:e==="delta"?Fu:e==="lowmemory"?Vu:(T.warn("OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE is set to '"+t.OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE+"', but only 'cumulative' and 'delta' are allowed. Using default ('cumulative') instead."),no)}function hb(t){return t!=null?t===Kn.DELTA?Fu:t===Kn.LOWMEMORY?Vu:no:fb()}function db(t){return t!=null&&t.aggregationPreference?t.aggregationPreference:function(e){return Et.Default()}}var vb=function(t){pb(e,t);function e(n,r){var i=t.call(this,n)||this;return i._aggregationSelector=db(r),i._aggregationTemporalitySelector=hb(r?.temporalityPreference),i}return e.prototype.selectAggregation=function(n){return this._aggregationSelector(n)},e.prototype.selectAggregationTemporality=function(n){return this._aggregationTemporalitySelector(n)},e}(Gs),yb=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),mb=function(t){yb(e,t);function e(n){return t.call(this,$u(n??{},UT,"v1/metrics",{"Content-Type":"application/json"}),n)||this}return e}(vb);function _b(t,e){const n=t.spanContext();return{name:t.name,kind:t.kind,spanContext:()=>n,parentSpanId:t.parentSpanId,startTime:t.startTime,endTime:t.endTime,status:t.status,attributes:Id(t.attributes,e),links:t.links,events:t.events,duration:t.duration,ended:t.ended,resource:t.resource,instrumentationLibrary:t.instrumentationLibrary,droppedAttributesCount:t.droppedAttributesCount,droppedEventsCount:t.droppedEventsCount,droppedLinksCount:t.droppedLinksCount}}function gb(t,e){if(!e.isSamplingEnabled())return t;const n=[],r={},i={};for(const o of t){o.parentSpanId&&(i[o.parentSpanId]=i[o.parentSpanId]||[],i[o.parentSpanId].push(o.spanContext().spanId));const a=e.shouldSample(o);a.sample?a.attributes?r[o.spanContext().spanId]=_b(o,a.attributes):r[o.spanContext().spanId]=o:n.push(o.spanContext().spanId)}for(;n.length>0;){const o=n.shift(),a=i[o];if(a)for(const u of a)delete r[u],n.push(u)}return Object.values(r)}class Eb extends lb{constructor(e,n){super(nt(x({},e),{headers:{}})),this.sampler=n}export(e,n){const r=gb(e,this.sampler);if(r.length===0)return;let i=0;const o=a=>{if(a.code===Z.SUCCESS)return n({code:Z.SUCCESS});if(i++,i>Rr)return n({code:Z.FAILED,error:a.error});new Promise(u=>setTimeout(u,Cr+Nr*Math.pow(2,i))).then(()=>{super.export(r,o)})};super.export(r,o)}}class Tb extends mb{constructor(e){super(nt(x({},e),{headers:{}}))}export(e,n){let r=0;const i=o=>{var a;if(o.code===Z.SUCCESS)return n({code:Z.SUCCESS});if(r++,r>Rr)return console.error(`[@launchdarkly/observability] failed to export OTeL metrics: ${(a=o.error)==null?void 0:a.message}`,o.error),n({code:Z.FAILED,error:o.error});new Promise(u=>setTimeout(u,Cr+Nr*Math.pow(2,r))).then(()=>{var u;console.warn(`[@launchdarkly/observability] retry ${r}, failed to export OTeL metrics: ${(u=o.error)==null?void 0:u.message}`,o.error),super.export(e,i)})};super.export(e,i)}}const bb="OT_ZONE_CONTEXT",Ob="Navigation:",Sb=["click","input","submit"];function wb(){return!1}const ro=class Qt extends Kd{constructor(e={}){var n;super(Qt.moduleName,Qt.version,e),D(this,"_spansData",new WeakMap),D(this,"_zonePatched"),D(this,"_wrappedListeners",new WeakMap),D(this,"_eventsSpanMap",new WeakMap),D(this,"_eventNames"),D(this,"_shouldPreventSpanCreation"),this._eventNames=new Set((n=e?.eventNames)!=null?n:Sb),this._shouldPreventSpanCreation=typeof e?.shouldPreventSpanCreation=="function"?e.shouldPreventSpanCreation:wb}init(){}_checkForTimeout(e,n){const r=this._spansData.get(n);r&&(e.source==="setTimeout"?r.hrTimeLastTimeout=td():e.source!=="Promise.then"&&e.source!=="setTimeout"&&(r.hrTimeLastTimeout=void 0))}_allowEventName(e){return this._eventNames.has(e)}_createSpan(e,n){var r;const i=e?.target,o=e?.type;if(!(i instanceof HTMLElement)||!i.getAttribute||i.hasAttribute("disabled")||!this._allowEventName(o))return;const a=As(i,!0);try{const u=this.tracer.startSpan(o,{attributes:{"event.type":o,"event.tag":i.tagName,"event.xpath":a,"event.id":i.id,"event.classname":i.className,"event.text":(r=i.textContent)!=null?r:"","event.url":window.location.href,"viewport.width":window.innerWidth,"viewport.height":window.innerHeight}},n?P.setSpan(C.active(),n):void 0);return e instanceof MouseEvent&&(u.setAttribute("event.x",e.clientX),u.setAttribute("event.y",e.clientY),u.setAttribute("event.relativeX",e.clientX/window.innerWidth),u.setAttribute("event.relativeY",e.clientY/window.innerHeight),o==="scroll"&&(u.setAttribute("event.scrollX",window.scrollX),u.setAttribute("event.scrollY",window.scrollY))),this._shouldPreventSpanCreation(o,i,u)===!0?void 0:(this._spansData.set(u,{taskCount:0}),u)}catch(u){this._diag.error("failed to start create new user interaction span",u)}}_decrementTask(e){const n=this._spansData.get(e);n&&(n.taskCount--,n.taskCount===0&&this._tryToEndSpan(e,n.hrTimeLastTimeout))}_getCurrentSpan(e){const n=e.get(bb);return n&&P.getSpan(n)}_incrementTask(e){const n=this._spansData.get(e);n&&n.taskCount++}addPatchedListener(e,n,r,i){let o=this._wrappedListeners.get(r);o||(o=new Map,this._wrappedListeners.set(r,o));let a=o.get(n);return a||(a=new Map,o.set(n,a)),a.has(e)?!1:(a.set(e,i),!0)}removePatchedListener(e,n,r){const i=this._wrappedListeners.get(r);if(!i)return;const o=i.get(n);if(!o)return;const a=o.get(e);return a&&(o.delete(e),o.size===0&&(i.delete(n),i.size===0&&this._wrappedListeners.delete(r))),a}_invokeListener(e,n,r){return typeof e=="function"?e.apply(n,r):e.handleEvent(r[0])}_patchAddEventListener(){const e=this;let n=new Map;return r=>function(i,o,a){if(!o)return r.call(this,i,o,a);const u=a&&typeof a=="object"&&a.once,c=function(...s){var l;let p;const f=s[0];if(!(f!=null&&f.type))return e._invokeListener(o,this,s);if(Date.now()-((l=n.get(f.type))!=null?l:0)<1e3/60)return e._invokeListener(o,this,s);n.set(f.type,Date.now()),f&&(p=e._eventsSpanMap.get(f)),u&&e.removePatchedListener(this,i,o);const y=e._createSpan(f,p);return y?(f&&e._eventsSpanMap.set(f,y),C.with(P.setSpan(C.active(),y),()=>{const v=e._invokeListener(o,this,s);return y.end(),v})):e._invokeListener(o,this,s)};if(e.addPatchedListener(this,i,o,c))return r.call(this,i,c,a)}}_patchRemoveEventListener(){const e=this;return n=>function(r,i,o){const a=e.removePatchedListener(this,r,i);return a?n.call(this,r,a,o):n.call(this,r,i,o)}}_getPatchableEventTargets(){return window.EventTarget?[EventTarget.prototype]:[Node.prototype,Window.prototype]}_patchHistoryApi(){this._unpatchHistoryApi(),this._wrap(history,"replaceState",this._patchHistoryMethod()),this._wrap(history,"pushState",this._patchHistoryMethod()),this._wrap(history,"back",this._patchHistoryMethod()),this._wrap(history,"forward",this._patchHistoryMethod()),this._wrap(history,"go",this._patchHistoryMethod())}_patchHistoryMethod(){const e=this;return n=>function(...r){const i=`${location.pathname}${location.hash}${location.search}`,o=n.apply(this,r),a=`${location.pathname}${location.hash}${location.search}`;return i!==a&&e._updateInteractionName(a),o}}_unpatchHistoryApi(){et(history.replaceState)&&this._unwrap(history,"replaceState"),et(history.pushState)&&this._unwrap(history,"pushState"),et(history.back)&&this._unwrap(history,"back"),et(history.forward)&&this._unwrap(history,"forward"),et(history.go)&&this._unwrap(history,"go")}_updateInteractionName(e){const n=P.getSpan(C.active());n&&typeof n.updateName=="function"&&n.updateName(`${Ob} ${e}`)}_patchZoneCancelTask(){const e=this;return n=>function(r){const i=Zone.current,o=e._getCurrentSpan(i);return o&&e._shouldCountTask(r,i)&&e._decrementTask(o),n.call(this,r)}}_patchZoneScheduleTask(){const e=this;return n=>function(r){const i=Zone.current,o=e._getCurrentSpan(i);return o&&e._shouldCountTask(r,i)&&(e._incrementTask(o),e._checkForTimeout(r,o)),n.call(this,r)}}_patchZoneRunTask(){const e=this;return n=>function(r,i,o){const a=Array.isArray(o)&&o[0]instanceof Event?o[0]:void 0,u=a?.target;let c;const s=this;if(u){if(c=e._createSpan(a),c)return e._incrementTask(c),s.run(()=>{try{return C.with(P.setSpan(C.active(),c),()=>{const l=Zone.current;return r._zone=l,n.call(l,r,i,o)})}finally{e._decrementTask(c)}})}else c=e._getCurrentSpan(s);try{return n.call(s,r,i,o)}finally{c&&e._shouldCountTask(r,s)&&e._decrementTask(c)}}}_shouldCountTask(e,n){if(e._zone&&(n=e._zone),!n||!e.data||e.data.isPeriodic)return!1;const r=this._getCurrentSpan(n);return!r||!this._spansData.get(r)?!1:e.type==="macroTask"||e.type==="microTask"}_tryToEndSpan(e,n){e&&this._spansData.get(e)&&(e.end(n),this._spansData.delete(e))}enable(){const e=this._getZoneWithPrototype();this._diag.debug("applying patch to",Qt.moduleName,Qt.version,"zone:",!!e),e?(et(e.prototype.runTask)&&(this._unwrap(e.prototype,"runTask"),this._diag.debug("removing previous patch from method runTask")),et(e.prototype.scheduleTask)&&(this._unwrap(e.prototype,"scheduleTask"),this._diag.debug("removing previous patch from method scheduleTask")),et(e.prototype.cancelTask)&&(this._unwrap(e.prototype,"cancelTask"),this._diag.debug("removing previous patch from method cancelTask")),this._zonePatched=!0,this._wrap(e.prototype,"runTask",this._patchZoneRunTask()),this._wrap(e.prototype,"scheduleTask",this._patchZoneScheduleTask()),this._wrap(e.prototype,"cancelTask",this._patchZoneCancelTask())):(this._zonePatched=!1,this._getPatchableEventTargets().forEach(n=>{et(n.addEventListener)&&(this._unwrap(n,"addEventListener"),this._diag.debug("removing previous patch from method addEventListener")),et(n.removeEventListener)&&(this._unwrap(n,"removeEventListener"),this._diag.debug("removing previous patch from method removeEventListener")),this._wrap(n,"addEventListener",this._patchAddEventListener()),this._wrap(n,"removeEventListener",this._patchRemoveEventListener())})),this._patchHistoryApi()}disable(){const e=this._getZoneWithPrototype();this._diag.debug("removing patch from",Qt.moduleName,Qt.version,"zone:",!!e),e&&this._zonePatched?(et(e.prototype.runTask)&&this._unwrap(e.prototype,"runTask"),et(e.prototype.scheduleTask)&&this._unwrap(e.prototype,"scheduleTask"),et(e.prototype.cancelTask)&&this._unwrap(e.prototype,"cancelTask")):this._getPatchableEventTargets().forEach(n=>{et(n.addEventListener)&&this._unwrap(n,"addEventListener"),et(n.removeEventListener)&&this._unwrap(n,"removeEventListener")}),this._unpatchHistoryApi()}_getZoneWithPrototype(){return window.Zone}};D(ro,"version","0.1.1"),D(ro,"moduleName","user-interaction");let Ab=ro,K={},ye;const Xt="highlight.record",Lb="highlight.session_id",io=new Map,Hu=t=>`${t.spanContext().traceId}:${t.spanContext().spanId}`,Gu="launchdarkly.js.log",Rb="launchdarkly.exception.id",qu="launchdarkly.sampling.ratio",zu="log.severity",Xu="log.message",Cb=(t,e)=>{var n,r,i,o,a,u,c,s,l;if(K.tracerProvider||K.meterProvider){console.warn("OTEL already initialized. Skipping...");return}ye=t;const p=t.backendUrl||void 0||"https://pub.highlight.io",f=[...(r=(n=t.networkRecordingOptions)==null?void 0:n.urlBlocklist)!=null?r:[],...z_],y=(i=t.environment)!=null?i:"production",v={url:t.otlpEndpoint+"/v1/traces",concurrencyLimit:10,timeoutMillis:3e4,compression:"gzip",keepAlive:!0,httpAgentOptions:{timeout:6e4,keepAlive:!0}},m=new Eb(v,e),_=new Wn(m,{maxExportBatchSize:1024,maxQueueSize:2048,exportTimeoutMillis:v.timeoutMillis,scheduledDelayMillis:v.timeoutMillis}),E=new Xe({[ep]:(o=t.serviceName)!=null?o:"highlight-browser",[np]:t.serviceVersion,"deployment.environment.name":y,"highlight.project_id":t.projectId,[ap]:navigator.userAgent,"browser.language":navigator.language,"telemetry.distro.name":"@highlight-run/observability","telemetry.distro.version":Dp});K.tracerProvider=new im({resource:E,mergeResourceWithDefaults:!0,spanProcessors:[_]}),P.setGlobalTracerProvider(K.tracerProvider);const S=new Tb(nt(x({},v),{url:t.otlpEndpoint+"/v1/metrics"})),I=new ME({exporter:S,exportIntervalMillis:v.timeoutMillis,exportTimeoutMillis:v.timeoutMillis});K.meterProvider=new ET({resource:E,readers:[I]}),se.setGlobalMeterProvider(K.meterProvider);let U=[];if(((a=t.instrumentations)==null?void 0:a["@opentelemetry/instrumentation-document-load"])!==!1&&U.push(new bm({applyCustomAttributesOnSpan:{documentLoad:Ju,documentFetch:Ju,resourceFetch:jb}})),((u=t.instrumentations)==null?void 0:u["@opentelemetry/instrumentation-user-interaction"])!==!1&&U.push(new Ab({eventNames:t.eventNames})),(c=t.networkRecordingOptions)!=null&&c.enabled){if(((s=t.instrumentations)==null?void 0:s["@opentelemetry/instrumentation-fetch"])!==!1){const F=new c_({propagateTraceHeaderCorsUrls:Zu(t.tracingOrigins),applyCustomAttributesOnSpan:(j,V,st)=>{var Wt,W;if(!j.attributes)return;const Yt=j;if(Yt.attributes[Xt]!==!1){if(Yu(j,V.body,V.headers,t.networkRecordingOptions),!(st instanceof Response)){j.setAttributes({"http.response.error":st.message,[Go]:st.status});return}if(!((Wt=t.networkRecordingOptions)!=null&&Wt.requestResponseSanitizer&&(ao(j,t.networkRecordingOptions.requestResponseSanitizer),Yt.attributes[Xt]===!1))&&(W=t.networkRecordingOptions)!=null&&W.recordHeadersAndBody){const xt=ct(void 0,null,function*(){var h,g,L,H,$,M;const Ee=yield rg(st,(h=t.networkRecordingOptions)==null?void 0:h.bodyKeysToRecord,(g=t.networkRecordingOptions)==null?void 0:g.networkBodyKeysToRedact),Jt=Object.fromEntries(st.headers.entries()),nn=ki((H=(L=t.networkRecordingOptions)==null?void 0:L.networkHeadersToRedact)!=null?H:[],Jt,($=t.networkRecordingOptions)==null?void 0:$.headerKeysToRecord),dO=oo(nn,"http.response.header");Object.assign(j.attributes,x({"http.response.body":Ee},dO)),(M=t.networkRecordingOptions)!=null&&M.requestResponseSanitizer&&ao(j,t.networkRecordingOptions.requestResponseSanitizer)});io.set(Hu(j),xt)}}}});U.push(F)}((l=t.instrumentations)==null?void 0:l["@opentelemetry/instrumentation-xml-http-request"])!==!1&&U.push(new G_({propagateTraceHeaderCorsUrls:Zu(t.tracingOrigins),applyCustomAttributesOnSpan:(F,j)=>{var V,st,Wt,W;const Yt=j;if(!(!F.attributes||F.attributes[Xt]===!1)){if(Yu(F,Yt._body,Yt._requestHeaders,t.networkRecordingOptions),(V=t.networkRecordingOptions)!=null&&V.recordHeadersAndBody){let xt="";(j.responseType===""||j.responseType==="text")&&(xt=Di(j.responseText,(st=t.networkRecordingOptions)==null?void 0:st.networkBodyKeysToRedact,(Wt=t.networkRecordingOptions)==null?void 0:Wt.bodyKeysToRecord,void 0));const h=Ib(j.getAllResponseHeaders());Db(F,h,xt,t.networkRecordingOptions)}(W=t.networkRecordingOptions)!=null&&W.requestResponseSanitizer&&ao(F,t.networkRecordingOptions.requestResponseSanitizer)}}}))}Hd({instrumentations:U});const z=new Os;return z.enable(),K.tracerProvider.register({contextManager:z,propagator:new rd({propagators:[new Ph,new Nb({backendUrl:p,otlpEndpoint:t.otlpEndpoint,tracingOrigins:t.tracingOrigins,urlBlocklist:f})]})}),K};class Wn extends Es{constructor(){super(...arguments),D(this,"_pendingSpans",new Set)}onStart(e,n){e.setAttribute(Lb,Ot()),super.onStart(e,n)}onEnd(e){if(e.attributes[Xt]===!1)return;const n=Hu(e),r=io.get(n);if(r){const i=r.catch(o=>{console.warn("[CustomBatchSpanProcessor] Failed to capture response body attributes",o)}).finally(()=>{io.delete(n),this._pendingSpans.delete(i),e.attributes[Xt]!==!1&&super.onEnd(e)});this._pendingSpans.add(i);return}super.onEnd(e)}shutdown(){return ct(this,null,function*(){return yield Promise.allSettled(this._pendingSpans),la(Wn.prototype,this,"shutdown").call(this)})}forceFlush(){return ct(this,null,function*(){return yield Promise.allSettled(this._pendingSpans),la(Wn.prototype,this,"forceFlush").call(this)})}}class Nb extends Ed{constructor(e){super(),D(this,"highlightEndpoints"),D(this,"tracingOrigins"),D(this,"urlBlocklist"),this.highlightEndpoints=[e.backendUrl,`${e.otlpEndpoint}/v1/traces`,`${e.otlpEndpoint}/v1/logs`,`${e.otlpEndpoint}/v1/metrics`],this.tracingOrigins=e.tracingOrigins,this.urlBlocklist=e.urlBlocklist}inject(e,n,r){var i;const o=P.getSpan(e);if(!o||!o.attributes)return;const a=tc(o);typeof a=="string"&&(Ub(a,this.highlightEndpoints,this.tracingOrigins,this.urlBlocklist)||o.setAttribute(Xt,!1),!eg(a,(i=this.tracingOrigins)!=null?i:[],this.urlBlocklist))||super.inject(e,n,r)}}const Ku="highlight-browser",xb=Ku,Wu=()=>{var t;return(t=K.tracerProvider)==null?void 0:t.getTracer(Ku)},Yn=()=>{var t;return(t=K.meterProvider)==null?void 0:t.getMeter(xb)},Pb=()=>ct(void 0,null,function*(){yield Promise.allSettled([ct(void 0,null,function*(){K.tracerProvider?(yield K.tracerProvider.shutdown(),K.tracerProvider=void 0):console.warn("OTEL shutdown called without initialized tracerProvider.")}),ct(void 0,null,function*(){K.meterProvider?(yield K.meterProvider.shutdown(),K.meterProvider=void 0):console.warn("OTEL shutdown called without initialized meterProvider.")})])}),Yu=(t,e,n,r)=>{var i;if(!t.attributes)return;const o=tc(t),a=Vs(o),u=Fs(a),c=typeof e=="string"?e:String(e);try{const l=e?JSON.parse(c):void 0;l!=null&&l.operationName&&t.setAttribute("graphql.operation.name",l.operationName)}catch{}t.setAttributes({"highlight.type":"http.request",[ve]:a,[Re]:a,[qo]:u.pathname,[op]:u.search});const s=Array.from(u.searchParams.entries());if(s.length>0&&t.setAttribute("url.query_params",JSON.stringify(Object.fromEntries(s))),r!=null&&r.recordHeadersAndBody){const l=Di(e,r.networkBodyKeysToRedact,r.bodyKeysToRecord,n);t.setAttribute("http.request.body",l);const p=ki((i=r.networkHeadersToRedact)!=null?i:[],n,r.headerKeysToRecord),f=oo(p,"http.request.header");t.setAttributes(f)}},Ib=t=>{const e={};return t&&t.trim().split(/[\r\n]+/).forEach(n=>{const r=n.split(": "),i=r.shift();i&&(e[i]=r.join(": "))}),e},oo=(t,e)=>{const n={};return Object.entries(t).forEach(([r,i])=>{const o=r.toLowerCase().replace(/_/g,"-"),a=`${e}.${o}`,u=kb(o,i);if(n[a]){const c=n[a];Array.isArray(c)?n[a]=[...c,...u]:n[a]=[c,...u]}else n[a]=u.length===1?u[0]:u}),n},Mb=new Set(["accept","accept-charset","accept-encoding","accept-language","accept-ranges","allow","cache-control","connection","content-encoding","content-language","expect","if-match","if-none-match","pragma","proxy-authenticate","te","trailer","transfer-encoding","upgrade","vary","via","warning","www-authenticate","access-control-allow-headers","access-control-allow-methods","access-control-expose-headers","access-control-request-headers"]),kb=(t,e)=>Mb.has(t)?e.split(",").map(n=>n.trim()).filter(n=>n.length>0):[e],Db=(t,e,n,r)=>{var i;t.setAttribute("http.response.body",n);const o=ki((i=r.networkHeadersToRedact)!=null?i:[],e,r.headerKeysToRecord),a=oo(o,"http.response.header");t.setAttributes(a)},ao=(t,e)=>{var n,r,i,o,a,u,c,s,l,p;const f=t.attributes,y={},v={};for(const[I,U]of Object.entries(f))I.startsWith("http.request.header.")&&(y[I.slice(20)]=String(U)),I.startsWith("http.response.header.")&&(v[I.slice(21)]=String(U));let m={request:{sessionSecureID:"",id:"",url:(r=(n=f[Re])!=null?n:f[ve])!=null?r:"",verb:(i=f["http.request.method"])!=null?i:"GET",headers:y,body:(o=f["http.request.body"])!=null?o:""},response:{status:Number((a=f[Go])!=null?a:0),headers:v,body:(u=f["http.response.body"])!=null?u:""},urlBlocked:!1},_=!0;try{m.request.body=JSON.parse(m.request.body)}catch{_=!1}let E=!0;try{m.response.body=JSON.parse(m.response.body)}catch{E=!1}let S;try{S=e(m)}catch{return}if(!S){Object.assign(t.attributes,{[Xt]:!1});return}_&&(c=S.request)!=null&&c.body&&(S.request.body=JSON.stringify(S.request.body)),E&&(s=S.response)!=null&&s.body&&(S.response.body=JSON.stringify(S.response.body)),Object.assign(t.attributes,{"http.request.body":(l=S.request.body)!=null?l:"","http.response.body":(p=S.response.body)!=null?p:""})},Ub=(t,e,n,r)=>r!=null&&r.some(i=>t.toLowerCase().includes(i))?!1:tg(t,e),Ju=t=>{var e,n,r;if(!t.events)return;const i=t.events,o={unload:it("unloadEventStart","unloadEventEnd",i),dom_interactive:it("fetchStart","domInteractive",i),dom_content_loaded:it("domContentLoadedEventStart","domContentLoadedEventEnd",i),dom_complete:it("fetchStart","domComplete",i),load_event:it("loadEventStart","loadEventEnd",i),document_load:it("fetchStart","loadEventEnd",i),first_paint:it("fetchStart","firstPaint",i),first_contentful_paint:it("fetchStart","firstContentfulPaint",i),domain_lookup:it("domainLookupStart","domainLookupEnd",i),connect:it("connectStart","connectEnd",i),request:it("requestStart","requestEnd",i),response:it("responseStart","responseEnd",i)},a=(n=(e=ye?.getIntegrations)==null?void 0:e.call(ye))!=null?n:[];if(o.document_load!==void 0)for(const u of a)u.recordGauge((r=ye?.sessionSecureId)!=null?r:"",{name:Np,value:o.document_load/1e6});Object.entries(o).forEach(([u,c])=>{c!==void 0&&(t.setAttribute(`timings.${u}.ns`,c),t.setAttribute(`timings.${u}.readable`,Qu(c)))})};function it(t,e,n){const r=n.find(a=>a.name===t),i=n.find(a=>a.name===e);if(!r||!i)return;const o=r.time[0]*1e9+r.time[1];return i.time[0]*1e9+i.time[1]-o}const jb=(t,e)=>{const n={domain_lookup:(e.domainLookupEnd-e.domainLookupStart)*1e9,connect:(e.connectEnd-e.connectStart)*1e9,request:(e.responseEnd-e.requestStart)*1e9,response:(e.responseEnd-e.responseStart)*1e9};Object.entries(n).forEach(([r,i])=>{t.setAttribute(`timings.${r}.ns`,i),t.setAttribute(`timings.${r}.readable`,Qu(i))})},Qu=t=>{if(t>=36e11){const e=t/36e11;return`${Number(e.toFixed(1))}h`}else if(t>=6e10){const e=t/6e10;return`${Number(e.toFixed(1))}m`}else if(t>=1e9){const e=t/1e9;return`${Number(e.toFixed(1))}s`}else if(t>=1e6){const e=t/1e6;return`${Number(e.toFixed(1))}ms`}else if(t>=1e3){const e=t/1e3;return`${Number(e.toFixed(1))}µs`}else return`${Number(t.toFixed(1))}ns`},Zu=t=>t===!0?[/localhost/,/^\//,new RegExp(window.location.host)]:Array.isArray(t)?t.map(e=>typeof e=="string"?new RegExp(e):e):/^$/,tc=t=>t.attributes[Re]?t.attributes[Re]:t.attributes[ve],Bb=30,$b=()=>new Promise(t=>requestAnimationFrame(e=>requestAnimationFrame(n=>t(n-e)))),Fb=()=>ct(void 0,null,function*(){const t=[];for(let e=0;e<Bb;e++)t.push(yield $b());return t.reduce((e,n)=>e+n,0)/t.length}),Vb=(t,e)=>{let n={},r=16.666666666666668;Fb().then(c=>r=c);const i=c=>{var s;n!=null&&n.event||(n={event:c,location:window.location.href,timerStart:(s=window.performance)==null?void 0:s.now()},window.requestAnimationFrame(o))},o=()=>{if(!(n!=null&&n.timerStart))return;const c=window.performance.now()-n.timerStart-r;a(c),n={}},a=c=>{const s=(new Date().getTime()-e)/1e3;t({relativeTimestamp:s,jankAmount:c,querySelector:u(),newLocation:window.location.href!=n.location?window.location.href:void 0})},u=()=>{var c;return(c=n?.event)!=null&&c.target?Up(n.event.target):""};return window.addEventListener("click",i,!0),window.addEventListener("keydown",i,!0),()=>{window.removeEventListener("keydown",i,!0),window.removeEventListener("click",i,!0)}},Hb=typeof window<"u",ec=Hb&&"performance"in window&&"memory"in performance?performance:{memory:{}},Gb=(t,e)=>{let n=0,r=0;const i=()=>{const s=(new Date().getTime()-e)/1e3,l=ec.memory.jsHeapSizeLimit||0,p=ec.memory.usedJSHeapSize||0;t({jsHeapSizeLimit:l,usedJSHeapSize:p,relativeTimestamp:s,fps:n})};i();let o;o=setInterval(()=>{i()},1e3);let a=0,u=Date.now();const c=function(){var s=Date.now();a++,s>1e3+u&&(n=Math.round(a*1e3/(s-u)),a=0,u=s),r=requestAnimationFrame(c)};return c(),()=>{clearInterval(o),cancelAnimationFrame(r)}};var Nt,Ze,nc,Jn,so,rc=-1,Kt=function(t){addEventListener("pageshow",function(e){e.persisted&&(rc=e.timeStamp,t(e))},!0)},uo=function(){return window.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]},Qn=function(){var t=uo();return t&&t.activationStart||0},ot=function(t,e){var n=uo(),r="navigate";return rc>=0?r="back-forward-cache":n&&(document.prerendering||Qn()>0?r="prerender":document.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:t,value:e===void 0?-1:e,rating:"good",delta:0,entries:[],id:"v3-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:r}},me=function(t,e,n){try{if(PerformanceObserver.supportedEntryTypes.includes(t)){var r=new PerformanceObserver(function(i){Promise.resolve().then(function(){e(i.getEntries())})});return r.observe(Object.assign({type:t,buffered:!0},n||{})),r}}catch{}},at=function(t,e,n,r){var i,o;return function(a){e.value>=0&&(a||r)&&((o=e.value-(i||0))||i===void 0)&&(i=e.value,e.delta=o,e.rating=function(u,c){return u>c[1]?"poor":u>c[0]?"needs-improvement":"good"}(e.value,n),t(e))}},co=function(t){requestAnimationFrame(function(){return requestAnimationFrame(function(){return t()})})},Zn=function(t){var e=function(n){n.type!=="pagehide"&&document.visibilityState!=="hidden"||t(n)};addEventListener("visibilitychange",e,!0),addEventListener("pagehide",e,!0)},lo=function(t){var e=!1;return function(n){e||(t(n),e=!0)}},_e=-1,ic=function(){return document.visibilityState!=="hidden"||document.prerendering?1/0:0},tr=function(t){document.visibilityState==="hidden"&&_e>-1&&(_e=t.type==="visibilitychange"?t.timeStamp:0,qb())},oc=function(){addEventListener("visibilitychange",tr,!0),addEventListener("prerenderingchange",tr,!0)},qb=function(){removeEventListener("visibilitychange",tr,!0),removeEventListener("prerenderingchange",tr,!0)},po=function(){return _e<0&&(_e=ic(),oc(),Kt(function(){setTimeout(function(){_e=ic(),oc()},0)})),{get firstHiddenTime(){return _e}}},tn=function(t){document.prerendering?addEventListener("prerenderingchange",function(){return t()},!0):t()},ac=[1800,3e3],sc=function(t,e){e=e||{},tn(function(){var n,r=po(),i=ot("FCP"),o=me("paint",function(a){a.forEach(function(u){u.name==="first-contentful-paint"&&(o.disconnect(),u.startTime<r.firstHiddenTime&&(i.value=Math.max(u.startTime-Qn(),0),i.entries.push(u),n(!0)))})});o&&(n=at(t,i,ac,e.reportAllChanges),Kt(function(a){i=ot("FCP"),n=at(t,i,ac,e.reportAllChanges),co(function(){i.value=performance.now()-a.timeStamp,n(!0)})}))})},uc=[.1,.25],zb=function(t,e){e=e||{},sc(lo(function(){var n,r=ot("CLS",0),i=0,o=[],a=function(c){c.forEach(function(s){if(!s.hadRecentInput){var l=o[0],p=o[o.length-1];i&&s.startTime-p.startTime<1e3&&s.startTime-l.startTime<5e3?(i+=s.value,o.push(s)):(i=s.value,o=[s])}}),i>r.value&&(r.value=i,r.entries=o,n())},u=me("layout-shift",a);u&&(n=at(t,r,uc,e.reportAllChanges),Zn(function(){a(u.takeRecords()),n(!0)}),Kt(function(){i=0,r=ot("CLS",0),n=at(t,r,uc,e.reportAllChanges),co(function(){return n()})}),setTimeout(n,0))}))},en={passive:!0,capture:!0},Xb=new Date,cc=function(t,e){Nt||(Nt=e,Ze=t,nc=new Date,pc(removeEventListener),lc())},lc=function(){if(Ze>=0&&Ze<nc-Xb){var t={entryType:"first-input",name:Nt.type,target:Nt.target,cancelable:Nt.cancelable,startTime:Nt.timeStamp,processingStart:Nt.timeStamp+Ze};Jn.forEach(function(e){e(t)}),Jn=[]}},Kb=function(t){if(t.cancelable){var e=(t.timeStamp>1e12?new Date:performance.now())-t.timeStamp;t.type=="pointerdown"?function(n,r){var i=function(){cc(n,r),a()},o=function(){a()},a=function(){removeEventListener("pointerup",i,en),removeEventListener("pointercancel",o,en)};addEventListener("pointerup",i,en),addEventListener("pointercancel",o,en)}(e,t):cc(e,t)}},pc=function(t){["mousedown","keydown","touchstart","pointerdown"].forEach(function(e){return t(e,Kb,en)})},fc=[100,300],Wb=function(t,e){e=e||{},tn(function(){var n,r=po(),i=ot("FID"),o=function(c){c.startTime<r.firstHiddenTime&&(i.value=c.processingStart-c.startTime,i.entries.push(c),n(!0))},a=function(c){c.forEach(o)},u=me("first-input",a);n=at(t,i,fc,e.reportAllChanges),u&&Zn(lo(function(){a(u.takeRecords()),u.disconnect()})),u&&Kt(function(){var c;i=ot("FID"),n=at(t,i,fc,e.reportAllChanges),Jn=[],Ze=-1,Nt=null,pc(addEventListener),c=o,Jn.push(c),lc()})})},hc=0,fo=1/0,er=0,Yb=function(t){t.forEach(function(e){e.interactionId&&(fo=Math.min(fo,e.interactionId),er=Math.max(er,e.interactionId),hc=er?(er-fo)/7+1:0)})},dc=function(){return so?hc:performance.interactionCount||0},Jb=function(){"interactionCount"in performance||so||(so=me("event",Yb,{type:"event",buffered:!0,durationThreshold:0}))},vc=[200,500],yc=0,mc=function(){return dc()-yc},yt=[],ho={},_c=function(t){var e=yt[yt.length-1],n=ho[t.interactionId];if(n||yt.length<10||t.duration>e.latency){if(n)n.entries.push(t),n.latency=Math.max(n.latency,t.duration);else{var r={id:t.interactionId,latency:t.duration,entries:[t]};ho[r.id]=r,yt.push(r)}yt.sort(function(i,o){return o.latency-i.latency}),yt.splice(10).forEach(function(i){delete ho[i.id]})}},Qb=function(t,e){e=e||{},tn(function(){var n;Jb();var r,i=ot("INP"),o=function(u){u.forEach(function(l){l.interactionId&&_c(l),l.entryType==="first-input"&&!yt.some(function(p){return p.entries.some(function(f){return l.duration===f.duration&&l.startTime===f.startTime})})&&_c(l)});var c,s=(c=Math.min(yt.length-1,Math.floor(mc()/50)),yt[c]);s&&s.latency!==i.value&&(i.value=s.latency,i.entries=s.entries,r())},a=me("event",o,{durationThreshold:(n=e.durationThreshold)!==null&&n!==void 0?n:40});r=at(t,i,vc,e.reportAllChanges),a&&("interactionId"in PerformanceEventTiming.prototype&&a.observe({type:"first-input",buffered:!0}),Zn(function(){o(a.takeRecords()),i.value<0&&mc()>0&&(i.value=0,i.entries=[]),r(!0)}),Kt(function(){yt=[],yc=dc(),i=ot("INP"),r=at(t,i,vc,e.reportAllChanges)}))})},gc=[2500,4e3],vo={},Zb=function(t,e){e=e||{},tn(function(){var n,r=po(),i=ot("LCP"),o=function(c){var s=c[c.length-1];s&&s.startTime<r.firstHiddenTime&&(i.value=Math.max(s.startTime-Qn(),0),i.entries=[s],n())},a=me("largest-contentful-paint",o);if(a){n=at(t,i,gc,e.reportAllChanges);var u=lo(function(){vo[i.id]||(o(a.takeRecords()),a.disconnect(),vo[i.id]=!0,n(!0))});["keydown","click"].forEach(function(c){addEventListener(c,function(){return setTimeout(u,0)},!0)}),Zn(u),Kt(function(c){i=ot("LCP"),n=at(t,i,gc,e.reportAllChanges),co(function(){i.value=performance.now()-c.timeStamp,vo[i.id]=!0,n(!0)})})}})},Ec=[800,1800],tO=function t(e){document.prerendering?tn(function(){return t(e)}):document.readyState!=="complete"?addEventListener("load",function(){return t(e)},!0):setTimeout(e,0)},eO=function(t,e){e=e||{};var n=ot("TTFB"),r=at(t,n,Ec,e.reportAllChanges);tO(function(){var i=uo();if(i){var o=i.responseStart;if(o<=0||o>performance.now())return;n.value=Math.max(o-Qn(),0),n.entries=[i],r(!0),Kt(function(){n=ot("TTFB",0),(r=at(t,n,Ec,e.reportAllChanges))(!0)})}})};const nO=t=>(zb(t),sc(t),Wb(t),Zb(t),eO(t),Qb(t),()=>{}),ge=typeof navigator<"u"&&"connection"in navigator?navigator.connection:{},rO=(t,e)=>{const n=()=>{const i=(new Date().getTime()-e)/1e3;t({relativeTimestamp:i,downlink:ge.downlink,downlinkMax:ge.downlinkMax,effectiveType:ge.effectiveType,rtt:ge.rtt,saveData:ge.saveData,type:ge.type})};n();let r;return r=setInterval(()=>{n()},1e3),()=>{clearInterval(r)}},iO=()=>{if(!("performance"in window&&"memory"in performance))return{getDeviceDetails:void 0,getCurrentDeviceDetails:void 0};const t=window.performance;return{getDeviceDetails:()=>({deviceMemory:oO(navigator.deviceMemory||0)}),getCurrentDeviceDetails:()=>{const e=yo(t.memory.jsHeapSizeLimit),n=yo(t.memory.totalJSHeapSize),r=yo(t.memory.usedJSHeapSize);return{jsHeapSizeLimit:e,totalJSHeapSize:n,usedJSHeapSize:r}}}},yo=t=>t/Math.pow(1e3,2),oO=t=>1024*t;function aO(t){return"regexValue"in t}function sO(t){return"matchValue"in t}function uO(t){const e=Math.trunc(t);return e===1?!0:e===0?!1:Math.floor(Math.random()*e)===0}class cO{constructor(e=uO){D(this,"regexCache",new Map),D(this,"config"),this.sampler=e}setConfig(e){this.config=e}isSamplingEnabled(){var e,n,r,i;return!!((n=(e=this.config)==null?void 0:e.logs)!=null&&n.length||(i=(r=this.config)==null?void 0:r.spans)!=null&&i.length)}shouldSample(e){var n,r;return e.name===Gu?this.sampleLog((n=this.config)==null?void 0:n.logs,e):this.sampleSpan((r=this.config)==null?void 0:r.spans,e)}matchesValue(e,n){if(!e)return!1;if(sO(e))return e.matchValue===n;if(aO(e)){const r=e.regexValue;if(r===null)return!1;this.regexCache.has(r)||this.regexCache.set(r,new RegExp(r));const i=this.regexCache.get(r);if(typeof n=="string")return i.test(n)}return!1}matchesAttributes(e,n){if(e)for(const r of e){let i=!1;for(const o of Object.keys(n))if(this.matchesValue(r.key,o)){const a=n[o];if(this.matchesValue(r.attribute,a)){i=!0;break}}if(!i)return!1}return!0}matchEvent(e,n){return!(e.name&&!this.matchesValue(e.name,n.name)||e.attributes&&(!n.attributes||!this.matchesAttributes(e.attributes,n.attributes)))}matchesEvents(e,n){if(e)for(const r of e){let i=!1;for(const o of n)if(this.matchEvent(r,o)){i=!0;break}if(!i)return!1}return!0}matchesSpanConfig(e,n){return!(e.name&&!this.matchesValue(e.name,n.name)||!this.matchesAttributes(e.attributes,n.attributes)||!this.matchesEvents(e.events,n.events))}matchesLogConfig(e,n){if(e.severityText){const r=n[zu];if(!this.matchesValue(e.severityText,r))return!1}if(e.message){const r=n[Xu];if(!this.matchesValue(e.message,r))return!1}return!!this.matchesAttributes(e.attributes,n)}sampleSpan(e,n){if(e){for(const r of e)if(this.matchesSpanConfig(r,n))return{sample:this.sampler(r.samplingRatio),attributes:{[qu]:r.samplingRatio}}}return{sample:!0}}sampleLog(e,n){if(e){for(const r of e)if(this.matchesLogConfig(r,n.attributes))return{sample:this.sampler(r.samplingRatio),attributes:{[qu]:r.samplingRatio}}}return{sample:!0}}}const Tc=()=>{const t={end:()=>{},spanContext:()=>({traceId:"",spanId:"",traceFlags:0}),setAttribute:(e,n)=>t,setAttributes:e=>t,addEvent:(e,n,r)=>t,addLinks:e=>t,setStatus:e=>t,recordException:()=>{},addLink:()=>t,updateName:()=>t,isRecording:()=>!1};return t},lO="exception",pO=function(t,e,n){if(!t)return;const r=x({},n);typeof e=="string"?r[Er]=e:e&&(e.code?r[Tr]=e.code.toString():e.name&&(r[Tr]=e.name),e.message&&(r[Er]=e.message),e.stack&&(r[Zl]=e.stack)),r[Tr]||r[Er]?t.addEvent(lO,r):bt("otel","recordException","warn",`Failed to record an exception ${e}`)};class fO{constructor(e){D(this,"organizationID"),D(this,"_options"),D(this,"_integrations",[]),D(this,"_gauges",new Map),D(this,"_counters",new Map),D(this,"_histograms",new Map),D(this,"_up_down_counters",new Map),D(this,"sampler",new cO),D(this,"_started",!1),D(this,"graphqlSDK"),this._options=e,this.organizationID=e.projectId}start(){return ct(this,null,function*(){var e,n,r,i,o,a,u,c,s,l,p,f,y,v,m,_,E;if(this._started)return;this._started=!0,Cb({backendUrl:(n=(e=this._options)==null?void 0:e.backendUrl)!=null?n:"https://pub.observability.app.launchdarkly.com",otlpEndpoint:(o=(i=(r=this._options)==null?void 0:r.otel)==null?void 0:i.otlpEndpoint)!=null?o:"https://otel.observability.app.launchdarkly.com",projectId:this._options.projectId,sessionSecureId:this._options.sessionSecureId,environment:(u=(a=this._options)==null?void 0:a.environment)!=null?u:"production",networkRecordingOptions:typeof((c=this._options)==null?void 0:c.networkRecording)=="object"?this._options.networkRecording:void 0,tracingOrigins:(s=this._options)==null?void 0:s.tracingOrigins,serviceName:(p=(l=this._options)==null?void 0:l.serviceName)!=null?p:"browser",serviceVersion:(f=this._options)==null?void 0:f.version,instrumentations:(v=(y=this._options)==null?void 0:y.otel)==null?void 0:v.instrumentations,eventNames:(_=(m=this._options)==null?void 0:m.otel)==null?void 0:_.eventNames,getIntegrations:()=>this._integrations},this.sampler),this._gauges.clear(),this._counters.clear(),this._histograms.clear(),this._up_down_counters.clear();const S=new Ll((E=this._options.backendUrl)!=null?E:"https://pub.observability.app.launchdarkly.com",{headers:{}});this.graphqlSDK=Wl(S,_p()),yield this.configureSampling(),this.setupListeners()})}stop(){return ct(this,null,function*(){this._started&&(this._started=!1,yield Pb())})}configureSampling(){return ct(this,null,function*(){try{const e=yield this.graphqlSDK.GetSamplingConfig({organization_verbose_id:`${this.organizationID}`});this.sampler.setConfig(e.sampling)}catch(e){Tt("sampling","warn",`LaunchDarkly Observability: Failed to configure sampling: ${e}`)}})}_recordLog(e,n,r,i){this.startSpan(Gu,o=>{const a=typeof e=="string"?e:Ae(e),u=i?Ae(i.map(c=>c.toString())):void 0;if(o?.addEvent("log",x({[zu]:n,[Xu]:a,"code.stacktrace":u},r)),this._options.reportConsoleErrors&&n==="error"){o?.recordException(new Error(a)),o?.setStatus({code:Sn.ERROR,message:a});const c=new Error(a);i&&(c.stack=u),this.recordError(c)}})}_recordErrorMessage(e,n){try{e.payload&&(n=x(x({},JSON.parse(e.payload)),n||{}))}catch{}this.startSpan("highlight.exception",o=>{var a;pO(o,(a=e.error)!=null?a:new Error(e.event),{[Rb]:e.id}),o?.setAttributes(x({event:e.event,type:e.type,url:e.url,source:e.source,lineNumber:e.lineNumber,columnNumber:e.columnNumber},n))});const r=e,i=Wp(r,["payload"]);for(const o of this._integrations)o.error(Ot(),nt(x({},i),{payload:JSON.stringify(n)}))}recordError(e,n,r,i,o){var a,u,c,s;e=e||new Error("Unknown error"),e instanceof Error&&e.cause&&(r=nt(x({},r),{"exception.cause":JSON.stringify(e.cause)}));let l=n?n+":"+e.message:e.message;o==="React.ErrorBoundary"&&(l="ErrorBoundary: "+l);const p=En(e),f={error:e,event:l,type:o??"custom",url:window.location.href,source:i??"frontend",lineNumber:(a=p[0])!=null&&a.lineNumber?(u=p[0])==null?void 0:u.lineNumber:0,columnNumber:(c=p[0])!=null&&c.columnNumber?(s=p[0])==null?void 0:s.columnNumber:0,stackTrace:p,timestamp:new Date().toISOString(),id:va()};this._recordErrorMessage(f,r)}recordCount(e){var n;let r=this._counters.get(e.name);if(!r){if(r=(n=Yn())==null?void 0:n.createCounter(e.name),!r)return;this._counters.set(e.name,r)}r.add(e.value,nt(x({},e.attributes),{"highlight.session_id":Ot()}))}recordGauge(e){var n,r,i,o;let a=this._gauges.get(e.name);if(!a){if(a=(n=Yn())==null?void 0:n.createGauge(e.name),!a)return;this._gauges.set(e.name,a)}a.record(e.value,nt(x({},e.attributes),{"highlight.session_id":Ot()}));const u={name:e.name,value:e.value,category:(r=e.attributes)==null?void 0:r.category,group:(o=(i=e.attributes)==null?void 0:i.group)==null?void 0:o.toString(),tags:e.attributes?Object.entries(e.attributes).map(([c,s])=>{var l;return{name:c??"",value:(l=s?.toString())!=null?l:""}}):[]};for(const c of this._integrations)c.recordGauge(Ot(),u)}recordIncr(e){this.recordCount(nt(x({},e),{value:1}))}recordHistogram(e){var n;let r=this._histograms.get(e.name);if(!r){if(r=(n=Yn())==null?void 0:n.createHistogram(e.name),!r)return;this._histograms.set(e.name,r)}r.record(e.value,nt(x({},e.attributes),{"highlight.session_id":Ot()}))}recordUpDownCounter(e){var n;let r=this._up_down_counters.get(e.name);if(!r){if(r=(n=Yn())==null?void 0:n.createUpDownCounter(e.name),!r)return;this._up_down_counters.set(e.name,r)}r.add(e.value,nt(x({},e.attributes),{"highlight.session_id":Ot()}))}startSpan(e,n,r,i){const o=Wu();if(!o){const u=Tc();return i===void 0&&r===void 0?n(u):i===void 0?r(u):i(u)}const a=(u,c)=>{const s=c(u);return s instanceof Promise?s.finally(()=>u.end()):(u.end(),s)};return i===void 0&&r===void 0?o.startActiveSpan(e,u=>a(u,n)):i===void 0?o.startActiveSpan(e,n,u=>a(u,r)):o.startActiveSpan(e,n,r,u=>a(u,i))}startManualSpan(e,n,r,i){const o=Wu();if(!o){const a=Tc();return i===void 0&&r===void 0?n(a):i===void 0?r(a):i(a)}return i===void 0&&r===void 0?o.startActiveSpan(e,n):i===void 0?o.startActiveSpan(e,n,r):o.startActiveSpan(e,n,r,i)}register(e,n){this._integrations.push(new Ip(e,n))}getHooks(e){return this._integrations.flatMap(n=>{var r,i;return(i=(r=n.getHooks)==null?void 0:r.call(n,e))!=null?i:[]})}submitViewportMetrics({height:e,width:n,availHeight:r,availWidth:i}){this.recordGauge({name:It.ViewportHeight,value:e,attributes:{category:lt.Device,group:window.location.href}}),this.recordGauge({name:It.ViewportWidth,value:n,attributes:{category:lt.Device,group:window.location.href}}),this.recordGauge({name:It.ScreenHeight,value:r,attributes:{category:lt.Device,group:window.location.href}}),this.recordGauge({name:It.ScreenWidth,value:i,attributes:{category:lt.Device,group:window.location.href}}),this.recordGauge({name:It.ViewportArea,value:e*n,attributes:{category:lt.Device,group:window.location.href}})}setupListeners(){var e;this._options.disableConsoleRecording||Zp(r=>{var i;this._recordLog((i=r.value)==null?void 0:i.join(" "),r.type,r.attributes?JSON.parse(r.attributes):{},r.trace)},{level:(e=this._options.consoleMethodsToRecord)!=null?e:[...Yp],logger:"console",stringifyOptions:{depthOfLimit:10,numOfKeysLimit:100,stringLengthLimit:1e3}}),this._options.enablePerformanceRecording!==!1&&(Gb(r=>{Object.entries(r).filter(([i])=>i!=="relativeTimestamp").forEach(([i,o])=>o&&this.recordGauge({name:i,value:o,attributes:{category:lt.Performance,group:window.location.href}}))},0),Vb(r=>{this.recordGauge({name:"Jank",value:r.jankAmount,attributes:{category:lt.WebVital,group:r.querySelector}})},0)),cf(r=>{var i;if(pf.includes(r.event)||ff.some(u=>r.event.includes(u)))return;const o=new Error(r.event);o.stack=Ae(r.stackTrace.map(u=>u.toString()));let a={};try{r.payload&&(a=JSON.parse(r.payload))}catch{}this._recordErrorMessage(nt(x({},r),{error:(i=r.error)!=null?i:o}),a)},{enablePromisePatch:!!this._options.enablePromisePatch}),nO(r=>{const{name:i,value:o}=r,{hostname:a,pathname:u,href:c}=window.location;this.recordGauge({name:i,value:o,attributes:{group:window.location.pathname,category:lt.WebVital,[Re]:Vs(c),[qo]:u,[tp]:a}})}),jp(r=>{this.submitViewportMetrics(r)}),rO(r=>{const i={category:lt.Performance,group:window.location.href};r.saveData!==void 0&&(i.saveData=r.saveData.toString()),r.effectiveType!==void 0&&(i.effectiveType=r.effectiveType.toString()),r.type!==void 0&&(i.type=r.type.toString()),Object.entries(r).filter(([o])=>o!=="relativeTimestamp").forEach(([o,a])=>{Ql(a)&&this.recordGauge({name:o,value:a,attributes:i})})},new Date().getTime());const{getDeviceDetails:n}=iO();n&&this.recordGauge({name:It.DeviceMemory,value:n().deviceMemory,attributes:{category:lt.Device,group:window.location.href}})}recordLog(e,n,r){return this._recordLog(e,n,r)}}class hO extends Vp{constructor(e){super(e),D(this,"observe"),D(this,"options"),this.options=e}initialize(e,n){try{if(typeof window>"u"||typeof document>"u"){console.warn("@launchdarkly/observability is not initializing because it is not supported in this environment.");return}if(!e){console.warn("@launchdarkly/observability is not initializing because the SDK credential is undefined.");return}this.configureSession(e,n),this.observe=new fO(nt(x({},n),{projectId:e,sessionSecureId:this.sessionSecureID})),n!=null&&n.manualStart||this.observe.start(),rt.LDObserve.load(this.observe)}catch(r){Tt("Error initializing @launchdarkly/observability SDK","error",r)}}getMetadata(){return{name:"@launchdarkly/observability"}}register(e,n){var r;(r=this.observe)==null||r.register(e,n)}getHooks(e){var n,r,i,o;const a=x(x({[rp]:e.sdk.name,[ip]:e.sdk.version,[Ep]:e.clientSideId,[wp]:"LaunchDarkly"},(n=e.application)!=null&&n.id?{[Lp]:e.application.id}:{}),(r=e.application)!=null&&r.version?{[Rp]:e.application.version}:{});return this.initialize((o=(i=e.sdkKey)!=null?i:e.mobileKey)!=null?o:e.clientSideId,this.options),[{getMetadata:()=>({name:"@launchdarkly/observability/hooks"}),afterIdentify:(u,c,s)=>{var l,p,f,y,v,m,_,E;for(const S of(f=(p=(l=this.observe)==null?void 0:l.getHooks)==null?void 0:p.call(l,e))!=null?f:[])(y=S.afterIdentify)==null||y.call(S,u,c,s);if(s.status==="completed"){const S=nt(x({},ia(u.context)),{key:(_=(m=(v=this.options)==null?void 0:v.contextFriendlyName)==null?void 0:m.call(v,u.context))!=null?_:xr(u.context),timeout:u.timeout,canonicalKey:xr(u.context),[xp]:s.status});(E=this.observe)==null||E.recordLog("LD.identify","info",x(x({},a),S))}return c},afterEvaluation:(u,c,s)=>{var l,p,f,y,v;for(const E of(f=(p=(l=this.observe)==null?void 0:l.getHooks)==null?void 0:p.call(l,e))!=null?f:[])(y=E.afterEvaluation)==null||y.call(E,u,c,s);const m=x({[Tp]:u.flagKey,[Sp]:JSON.stringify(s.value)},s.variationIndex?{[Ap]:s.variationIndex}:{});if(s.reason)for(const E in ta){const S=E,I=s.reason[S];I&&(m[ta[S]]=I)}u.context&&(m[bp]=JSON.stringify(ia(u.context)),m[Op]=xr(u.context));const _=x(x({},a),m);return(v=this.observe)==null||v.startSpan(gp,E=>{E&&E.addEvent(J,_)}),c},afterTrack:u=>{var c,s,l,p,f;for(const y of(l=(s=(c=this.observe)==null?void 0:c.getHooks)==null?void 0:s.call(c,e))!=null?l:[])(p=y.afterTrack)==null||p.call(y,u);(f=this.observe)==null||f.recordLog("LD.track","info",x(nt(x({},a),{key:u.key,value:u.metricValue}),typeof u.data=="object"?u.data:{}))}}]}}rt.default=hO,Object.defineProperties(rt,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
309
309
|
//# sourceMappingURL=index.umd.js.map
|