@launchdarkly/o11y 1.3.1 → 1.4.0
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 +15 -0
- package/dist/LDObserve-BQr7RYVC.js +130 -0
- package/dist/LDObserve-BQr7RYVC.js.map +1 -0
- package/dist/LDObserve.d.ts +73 -1
- package/dist/LDObserve.js +2 -2
- package/dist/LDRecord.d.ts +73 -1
- package/dist/LDRecord.js +43 -24
- package/dist/LDRecord.js.map +1 -1
- package/dist/buffer-CwCRPuMA.js +248 -0
- package/dist/buffer-CwCRPuMA.js.map +1 -0
- package/dist/{common-BjaGmQrE.js → common-7gIdCuSo.js} +721 -689
- package/dist/{common-BjaGmQrE.js.map → common-7gIdCuSo.js.map} +1 -1
- package/dist/index.d.ts +103 -5
- package/dist/index.js +335 -365
- package/dist/index.js.map +1 -1
- package/dist/index.umd.js +112 -112
- package/dist/index.umd.js.map +1 -1
- package/dist/{observe-D78YYNE1.js → observe-DVzqBVcI.js} +2053 -2043
- package/dist/{observe-D78YYNE1.js.map → observe-DVzqBVcI.js.map} +1 -1
- package/dist/observe.d.ts +21 -1
- package/dist/observe.js +4 -4
- package/dist/{record-BZHDLKsW.js → record-CwkFdJT0.js} +38 -47
- package/dist/{record-BZHDLKsW.js.map → record-CwkFdJT0.js.map} +1 -1
- package/dist/record.d.ts +24 -2
- package/dist/record.js +3 -3
- package/package.json +1 -1
- package/dist/LDObserve-DhF3vCDR.js +0 -92
- package/dist/LDObserve-DhF3vCDR.js.map +0 -1
- package/dist/buffer-BjzLorpP.js +0 -124
- package/dist/buffer-BjzLorpP.js.map +0 -1
package/dist/index.umd.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
(function(A,
|
|
2
|
-
`,h=n.split(/\r\n|[\n\r]/g),
|
|
3
|
-
`)}function
|
|
1
|
+
(function(A,j){typeof exports=="object"&&typeof module!="undefined"?j(exports):typeof define=="function"&&define.amd?define(["exports"],j):(A=typeof globalThis!="undefined"?globalThis:A||self,j(A.LD={}))})(this,function(A){"use strict";var vO=Object.defineProperty,SO=Object.defineProperties;var wO=Object.getOwnPropertyDescriptors;var lo=Object.getOwnPropertySymbols,RO=Object.getPrototypeOf,ab=Object.prototype.hasOwnProperty,lb=Object.prototype.propertyIsEnumerable,_O=Reflect.get;var bu=(A,j)=>(j=Symbol[A])?j:Symbol.for("Symbol."+A),Su=A=>{throw TypeError(A)};var vu=(A,j,ae)=>j in A?vO(A,j,{enumerable:!0,configurable:!0,writable:!0,value:ae}):A[j]=ae,x=(A,j)=>{for(var ae in j||(j={}))ab.call(j,ae)&&vu(A,ae,j[ae]);if(lo)for(var ae of lo(j))lb.call(j,ae)&&vu(A,ae,j[ae]);return A},B=(A,j)=>SO(A,wO(j));var nt=(A,j)=>{var ae={};for(var Ze in A)ab.call(A,Ze)&&j.indexOf(Ze)<0&&(ae[Ze]=A[Ze]);if(A!=null&&lo)for(var Ze of lo(A))j.indexOf(Ze)<0&&lb.call(A,Ze)&&(ae[Ze]=A[Ze]);return ae};var L=(A,j,ae)=>vu(A,typeof j!="symbol"?j+"":j,ae),cb=(A,j,ae)=>j.has(A)||Su("Cannot "+ae);var co=(A,j,ae)=>(cb(A,j,"read from private field"),ae?ae.call(A):j.get(A)),uo=(A,j,ae)=>j.has(A)?Su("Cannot add the same private member more than once"):j instanceof WeakSet?j.add(A):j.set(A,ae),ho=(A,j,ae,Ze)=>(cb(A,j,"write to private field"),Ze?Ze.call(A,ae):j.set(A,ae),ae);var wu=(A,j,ae)=>_O(RO(A),ae,j);var z=(A,j,ae)=>new Promise((Ze,qe)=>{var ct=et=>{try{ur(ae.next(et))}catch(dn){qe(dn)}},Xt=et=>{try{ur(ae.throw(et))}catch(dn){qe(dn)}},ur=et=>et.done?Ze(et.value):Promise.resolve(et.value).then(ct,Xt);ur((ae=ae.apply(A,j)).next())}),TO=function(A,j){this[0]=A,this[1]=j};var Ru=A=>{var j=A[bu("asyncIterator")],ae=!1,Ze,qe={};return j==null?(j=A[bu("iterator")](),Ze=ct=>qe[ct]=Xt=>j[ct](Xt)):(j=j.call(A),Ze=ct=>qe[ct]=Xt=>{if(ae){if(ae=!1,ct==="throw")throw Xt;return Xt}return ae=!0,{done:!1,value:new TO(new Promise(ur=>{var et=j[ct](Xt);et instanceof Object||Su("Object expected"),ur(et)}),1)}}),qe[bu("iterator")]=()=>qe,Ze("next"),"throw"in j?Ze("throw"):qe.throw=ct=>{throw ct},"return"in j&&Ze("return"),qe};var ci,ui,di;const j={key:"_sid"},ae="rrweb/sequential-id@1",Ze=e=>{const t=j;let r=0;return{name:ae,eventProcessor(n){return Object.assign(n,{[t.key]:++r}),n},options:t}};function qe(e,t){if(!!!e)throw new Error(t)}function ct(e){return typeof e=="object"&&e!==null}function Xt(e,t){if(!!!e)throw new Error("Unexpected invariant triggered.")}const ur=/\r\n|[\n\r]/g;function et(e,t){let r=0,n=1;for(const i of e.body.matchAll(ur)){if(typeof i.index=="number"||Xt(!1),i.index>=t)break;r=i.index+i[0].length,n+=1}return{line:n,column:t+1-r}}function dn(e){return _u(e.source,et(e.source,e.start))}function _u(e,t){const r=e.locationOffset.column-1,n="".padStart(r)+e.body,i=t.line-1,s=e.locationOffset.line-1,o=t.line+s,l=t.line===1?r:0,c=t.column+l,a=`${e.name}:${o}:${c}
|
|
2
|
+
`,h=n.split(/\r\n|[\n\r]/g),u=h[i];if(u.length>120){const f=Math.floor(c/80),d=c%80,p=[];for(let m=0;m<u.length;m+=80)p.push(u.slice(m,m+80));return a+Tu([[`${o} |`,p[0]],...p.slice(1,f+1).map(m=>["|",m]),["|","^".padStart(d)],["|",p[f+1]]])}return a+Tu([[`${o-1} |`,h[i-1]],[`${o} |`,u],["|","^".padStart(c)],[`${o+1} |`,h[i+1]]])}function Tu(e){const t=e.filter(([n,i])=>i!==void 0),r=Math.max(...t.map(([n])=>n.length));return t.map(([n,i])=>n.padStart(r)+(i?" "+i:"")).join(`
|
|
3
|
+
`)}function ub(e){const t=e[0];return t==null||"kind"in t||"length"in t?{nodes:t,source:e[1],positions:e[2],path:e[3],originalError:e[4],extensions:e[5]}:t}class fo extends Error{constructor(t,...r){var n,i,s;const{nodes:o,source:l,positions:c,path:a,originalError:h,extensions:u}=ub(r);super(t),this.name="GraphQLError",this.path=a!=null?a:void 0,this.originalError=h!=null?h:void 0,this.nodes=Eu(Array.isArray(o)?o:o?[o]:void 0);const f=Eu((n=this.nodes)===null||n===void 0?void 0:n.map(p=>p.loc).filter(p=>p!=null));this.source=l!=null?l:f==null||(i=f[0])===null||i===void 0?void 0:i.source,this.positions=c!=null?c:f==null?void 0:f.map(p=>p.start),this.locations=c&&l?c.map(p=>et(l,p)):f==null?void 0:f.map(p=>et(p.source,p.start));const d=ct(h==null?void 0:h.extensions)?h==null?void 0:h.extensions:void 0;this.extensions=(s=u!=null?u:d)!==null&&s!==void 0?s: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}}),h!=null&&h.stack?Object.defineProperty(this,"stack",{value:h.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,fo):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let t=this.message;if(this.nodes)for(const r of this.nodes)r.loc&&(t+=`
|
|
4
4
|
|
|
5
5
|
`+dn(r.loc));else if(this.source&&this.locations)for(const r of this.locations)t+=`
|
|
6
6
|
|
|
7
|
-
`+
|
|
8
|
-
`),
|
|
9
|
-
`),'"""'+
|
|
10
|
-
`,size:2};case 114:return{value:"\r",size:2};case 116:return{value:" ",size:2}}throw
|
|
11
|
-
`));return e.line+=
|
|
7
|
+
`+_u(this.source,r);return t}toJSON(){const t={message:this.message};return this.locations!=null&&(t.locations=this.locations),this.path!=null&&(t.path=this.path),this.extensions!=null&&Object.keys(this.extensions).length>0&&(t.extensions=this.extensions),t}}function Eu(e){return e===void 0||e.length===0?void 0:e}function Me(e,t,r){return new fo(`Syntax Error: ${r}`,{source:e,positions:[t]})}class db{constructor(t,r,n){this.start=t.start,this.end=r.end,this.startToken=t,this.endToken=r,this.source=n}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}}class Iu{constructor(t,r,n,i,s,o){this.kind=t,this.start=r,this.end=n,this.line=i,this.column=s,this.value=o,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 Cu={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"]},hb=new Set(Object.keys(Cu));function Zu(e){const t=e==null?void 0:e.kind;return typeof t=="string"&&hb.has(t)}var kr;(function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"})(kr||(kr={}));var po;(function(e){e.QUERY="QUERY",e.MUTATION="MUTATION",e.SUBSCRIPTION="SUBSCRIPTION",e.FIELD="FIELD",e.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",e.FRAGMENT_SPREAD="FRAGMENT_SPREAD",e.INLINE_FRAGMENT="INLINE_FRAGMENT",e.VARIABLE_DEFINITION="VARIABLE_DEFINITION",e.SCHEMA="SCHEMA",e.SCALAR="SCALAR",e.OBJECT="OBJECT",e.FIELD_DEFINITION="FIELD_DEFINITION",e.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",e.INTERFACE="INTERFACE",e.UNION="UNION",e.ENUM="ENUM",e.ENUM_VALUE="ENUM_VALUE",e.INPUT_OBJECT="INPUT_OBJECT",e.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION"})(po||(po={}));var ee;(function(e){e.NAME="Name",e.DOCUMENT="Document",e.OPERATION_DEFINITION="OperationDefinition",e.VARIABLE_DEFINITION="VariableDefinition",e.SELECTION_SET="SelectionSet",e.FIELD="Field",e.ARGUMENT="Argument",e.FRAGMENT_SPREAD="FragmentSpread",e.INLINE_FRAGMENT="InlineFragment",e.FRAGMENT_DEFINITION="FragmentDefinition",e.VARIABLE="Variable",e.INT="IntValue",e.FLOAT="FloatValue",e.STRING="StringValue",e.BOOLEAN="BooleanValue",e.NULL="NullValue",e.ENUM="EnumValue",e.LIST="ListValue",e.OBJECT="ObjectValue",e.OBJECT_FIELD="ObjectField",e.DIRECTIVE="Directive",e.NAMED_TYPE="NamedType",e.LIST_TYPE="ListType",e.NON_NULL_TYPE="NonNullType",e.SCHEMA_DEFINITION="SchemaDefinition",e.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",e.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",e.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",e.FIELD_DEFINITION="FieldDefinition",e.INPUT_VALUE_DEFINITION="InputValueDefinition",e.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",e.UNION_TYPE_DEFINITION="UnionTypeDefinition",e.ENUM_TYPE_DEFINITION="EnumTypeDefinition",e.ENUM_VALUE_DEFINITION="EnumValueDefinition",e.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",e.DIRECTIVE_DEFINITION="DirectiveDefinition",e.SCHEMA_EXTENSION="SchemaExtension",e.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",e.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",e.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",e.UNION_TYPE_EXTENSION="UnionTypeExtension",e.ENUM_TYPE_EXTENSION="EnumTypeExtension",e.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension"})(ee||(ee={}));function mo(e){return e===9||e===32}function hn(e){return e>=48&&e<=57}function Lu(e){return e>=97&&e<=122||e>=65&&e<=90}function xu(e){return Lu(e)||e===95}function fb(e){return Lu(e)||hn(e)||e===95}function pb(e){var t;let r=Number.MAX_SAFE_INTEGER,n=null,i=-1;for(let o=0;o<e.length;++o){var s;const l=e[o],c=mb(l);c!==l.length&&(n=(s=n)!==null&&s!==void 0?s:o,i=o,o!==0&&c<r&&(r=c))}return e.map((o,l)=>l===0?o:o.slice(r)).slice((t=n)!==null&&t!==void 0?t:0,i+1)}function mb(e){let t=0;for(;t<e.length&&mo(e.charCodeAt(t));)++t;return t}function gb(e,t){const r=e.replace(/"""/g,'\\"""'),n=r.split(/\r\n|[\n\r]/g),i=n.length===1,s=n.length>1&&n.slice(1).every(d=>d.length===0||mo(d.charCodeAt(0))),o=r.endsWith('\\"""'),l=e.endsWith('"')&&!o,c=e.endsWith("\\"),a=l||c,h=!i||e.length>70||a||s||o;let u="";const f=i&&mo(e.charCodeAt(0));return(h&&!f||s)&&(u+=`
|
|
8
|
+
`),u+=r,(h||a)&&(u+=`
|
|
9
|
+
`),'"""'+u+'"""'}var V;(function(e){e.SOF="<SOF>",e.EOF="<EOF>",e.BANG="!",e.DOLLAR="$",e.AMP="&",e.PAREN_L="(",e.PAREN_R=")",e.SPREAD="...",e.COLON=":",e.EQUALS="=",e.AT="@",e.BRACKET_L="[",e.BRACKET_R="]",e.BRACE_L="{",e.PIPE="|",e.BRACE_R="}",e.NAME="Name",e.INT="Int",e.FLOAT="Float",e.STRING="String",e.BLOCK_STRING="BlockString",e.COMMENT="Comment"})(V||(V={}));class yb{constructor(t){const r=new Iu(V.SOF,0,0,0,0);this.source=t,this.lastToken=r,this.token=r,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){return this.lastToken=this.token,this.token=this.lookahead()}lookahead(){let t=this.token;if(t.kind!==V.EOF)do if(t.next)t=t.next;else{const r=vb(this,t.end);t.next=r,r.prev=t,t=r}while(t.kind===V.COMMENT);return t}}function bb(e){return e===V.BANG||e===V.DOLLAR||e===V.AMP||e===V.PAREN_L||e===V.PAREN_R||e===V.SPREAD||e===V.COLON||e===V.EQUALS||e===V.AT||e===V.BRACKET_L||e===V.BRACKET_R||e===V.BRACE_L||e===V.PIPE||e===V.BRACE_R}function Xr(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function hi(e,t){return Nu(e.charCodeAt(t))&&Ou(e.charCodeAt(t+1))}function Nu(e){return e>=55296&&e<=56319}function Ou(e){return e>=56320&&e<=57343}function dr(e,t){const r=e.source.body.codePointAt(t);if(r===void 0)return V.EOF;if(r>=32&&r<=126){const n=String.fromCodePoint(r);return n==='"'?`'"'`:`"${n}"`}return"U+"+r.toString(16).toUpperCase().padStart(4,"0")}function Ve(e,t,r,n,i){const s=e.line,o=1+r-e.lineStart;return new Iu(t,r,n,s,o,i)}function vb(e,t){const r=e.source.body,n=r.length;let i=t;for(;i<n;){const s=r.charCodeAt(i);switch(s){case 65279:case 9:case 32:case 44:++i;continue;case 10:++i,++e.line,e.lineStart=i;continue;case 13:r.charCodeAt(i+1)===10?i+=2:++i,++e.line,e.lineStart=i;continue;case 35:return Sb(e,i);case 33:return Ve(e,V.BANG,i,i+1);case 36:return Ve(e,V.DOLLAR,i,i+1);case 38:return Ve(e,V.AMP,i,i+1);case 40:return Ve(e,V.PAREN_L,i,i+1);case 41:return Ve(e,V.PAREN_R,i,i+1);case 46:if(r.charCodeAt(i+1)===46&&r.charCodeAt(i+2)===46)return Ve(e,V.SPREAD,i,i+3);break;case 58:return Ve(e,V.COLON,i,i+1);case 61:return Ve(e,V.EQUALS,i,i+1);case 64:return Ve(e,V.AT,i,i+1);case 91:return Ve(e,V.BRACKET_L,i,i+1);case 93:return Ve(e,V.BRACKET_R,i,i+1);case 123:return Ve(e,V.BRACE_L,i,i+1);case 124:return Ve(e,V.PIPE,i,i+1);case 125:return Ve(e,V.BRACE_R,i,i+1);case 34:return r.charCodeAt(i+1)===34&&r.charCodeAt(i+2)===34?Ib(e,i):Rb(e,i)}if(hn(s)||s===45)return wb(e,i,s);if(xu(s))return Cb(e,i);throw Me(e.source,i,s===39?`Unexpected single quote character ('), did you mean to use a double quote (")?`:Xr(s)||hi(r,i)?`Unexpected character: ${dr(e,i)}.`:`Invalid character: ${dr(e,i)}.`)}return Ve(e,V.EOF,n,n)}function Sb(e,t){const r=e.source.body,n=r.length;let i=t+1;for(;i<n;){const s=r.charCodeAt(i);if(s===10||s===13)break;if(Xr(s))++i;else if(hi(r,i))i+=2;else break}return Ve(e,V.COMMENT,t,i,r.slice(t+1,i))}function wb(e,t,r){const n=e.source.body;let i=t,s=r,o=!1;if(s===45&&(s=n.charCodeAt(++i)),s===48){if(s=n.charCodeAt(++i),hn(s))throw Me(e.source,i,`Invalid number, unexpected digit after 0: ${dr(e,i)}.`)}else i=go(e,i,s),s=n.charCodeAt(i);if(s===46&&(o=!0,s=n.charCodeAt(++i),i=go(e,i,s),s=n.charCodeAt(i)),(s===69||s===101)&&(o=!0,s=n.charCodeAt(++i),(s===43||s===45)&&(s=n.charCodeAt(++i)),i=go(e,i,s),s=n.charCodeAt(i)),s===46||xu(s))throw Me(e.source,i,`Invalid number, expected digit but got: ${dr(e,i)}.`);return Ve(e,o?V.FLOAT:V.INT,t,i,n.slice(t,i))}function go(e,t,r){if(!hn(r))throw Me(e.source,t,`Invalid number, expected digit but got: ${dr(e,t)}.`);const n=e.source.body;let i=t+1;for(;hn(n.charCodeAt(i));)++i;return i}function Rb(e,t){const r=e.source.body,n=r.length;let i=t+1,s=i,o="";for(;i<n;){const l=r.charCodeAt(i);if(l===34)return o+=r.slice(s,i),Ve(e,V.STRING,t,i+1,o);if(l===92){o+=r.slice(s,i);const c=r.charCodeAt(i+1)===117?r.charCodeAt(i+2)===123?_b(e,i):Tb(e,i):Eb(e,i);o+=c.value,i+=c.size,s=i;continue}if(l===10||l===13)break;if(Xr(l))++i;else if(hi(r,i))i+=2;else throw Me(e.source,i,`Invalid character within String: ${dr(e,i)}.`)}throw Me(e.source,i,"Unterminated string.")}function _b(e,t){const r=e.source.body;let n=0,i=3;for(;i<12;){const s=r.charCodeAt(t+i++);if(s===125){if(i<5||!Xr(n))break;return{value:String.fromCodePoint(n),size:i}}if(n=n<<4|fn(s),n<0)break}throw Me(e.source,t,`Invalid Unicode escape sequence: "${r.slice(t,t+i)}".`)}function Tb(e,t){const r=e.source.body,n=Gu(r,t+2);if(Xr(n))return{value:String.fromCodePoint(n),size:6};if(Nu(n)&&r.charCodeAt(t+6)===92&&r.charCodeAt(t+7)===117){const i=Gu(r,t+8);if(Ou(i))return{value:String.fromCodePoint(n,i),size:12}}throw Me(e.source,t,`Invalid Unicode escape sequence: "${r.slice(t,t+6)}".`)}function Gu(e,t){return fn(e.charCodeAt(t))<<12|fn(e.charCodeAt(t+1))<<8|fn(e.charCodeAt(t+2))<<4|fn(e.charCodeAt(t+3))}function fn(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function Eb(e,t){const r=e.source.body;switch(r.charCodeAt(t+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 Me(e.source,t,`Invalid character escape sequence: "${r.slice(t,t+2)}".`)}function Ib(e,t){const r=e.source.body,n=r.length;let i=e.lineStart,s=t+3,o=s,l="";const c=[];for(;s<n;){const a=r.charCodeAt(s);if(a===34&&r.charCodeAt(s+1)===34&&r.charCodeAt(s+2)===34){l+=r.slice(o,s),c.push(l);const h=Ve(e,V.BLOCK_STRING,t,s+3,pb(c).join(`
|
|
11
|
+
`));return e.line+=c.length-1,e.lineStart=i,h}if(a===92&&r.charCodeAt(s+1)===34&&r.charCodeAt(s+2)===34&&r.charCodeAt(s+3)===34){l+=r.slice(o,s),o=s+1,s+=4;continue}if(a===10||a===13){l+=r.slice(o,s),c.push(l),a===13&&r.charCodeAt(s+1)===10?s+=2:++s,l="",o=s,i=s;continue}if(Xr(a))++s;else if(hi(r,s))s+=2;else throw Me(e.source,s,`Invalid character within String: ${dr(e,s)}.`)}throw Me(e.source,s,"Unterminated string.")}function Cb(e,t){const r=e.source.body,n=r.length;let i=t+1;for(;i<n;){const s=r.charCodeAt(i);if(fb(s))++i;else break}return Ve(e,V.NAME,t,i,r.slice(t,i))}const Zb=10,Vu=2;function yo(e){return fi(e,[])}function fi(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return Lb(e,t);default:return String(e)}}function Lb(e,t){if(e===null)return"null";if(t.includes(e))return"[Circular]";const r=[...t,e];if(xb(e)){const n=e.toJSON();if(n!==e)return typeof n=="string"?n:fi(n,r)}else if(Array.isArray(e))return Ob(e,r);return Nb(e,r)}function xb(e){return typeof e.toJSON=="function"}function Nb(e,t){const r=Object.entries(e);return r.length===0?"{}":t.length>Vu?"["+Gb(e)+"]":"{ "+r.map(([i,s])=>i+": "+fi(s,t)).join(", ")+" }"}function Ob(e,t){if(e.length===0)return"[]";if(t.length>Vu)return"[Array]";const r=Math.min(Zb,e.length),n=e.length-r,i=[];for(let s=0;s<r;++s)i.push(fi(e[s],t));return n===1?i.push("... 1 more item"):n>1&&i.push(`... ${n} more items`),"["+i.join(", ")+"]"}function Gb(e){const t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if(t==="Object"&&typeof e.constructor=="function"){const r=e.constructor.name;if(typeof r=="string"&&r!=="")return r}return t}const Vb=globalThis.process&&process.env.NODE_ENV==="production"?function(t,r){return t instanceof r}:function(t,r){if(t instanceof r)return!0;if(typeof t=="object"&&t!==null){var n;const i=r.prototype[Symbol.toStringTag],s=Symbol.toStringTag in t?t[Symbol.toStringTag]:(n=t.constructor)===null||n===void 0?void 0:n.name;if(i===s){const o=yo(t);throw new Error(`Cannot use ${i} "${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,98 +19,98 @@ 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};class Gc{constructor(t,r="GraphQL request",n={line:1,column:1}){typeof t=="string"||et(!1,`Body must be a string. Received: ${go(t)}.`),this.body=t,this.name=r,this.locationOffset=n,this.locationOffset.line>0||et(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||et(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}}function xb(e){return Lb(e,Gc)}function Vc(e,t){const r=new Nb(e,t),n=r.parseDocument();return Object.defineProperty(n,"tokenCount",{enumerable:!1,value:r.tokenCount}),n}class Nb{constructor(t,r={}){const n=xb(t)?t:new Gc(t);this._lexer=new hb(n),this._options=r,this._tokenCounter=0}get tokenCount(){return this._tokenCounter}parseName(){const t=this.expectToken(V.NAME);return this.node(t,{kind:ee.NAME,value:t.value})}parseDocument(){return this.node(this._lexer.token,{kind:ee.DOCUMENT,definitions:this.many(V.SOF,this.parseDefinition,V.EOF)})}parseDefinition(){if(this.peek(V.BRACE_L))return this.parseOperationDefinition();const t=this.peekDescription(),r=t?this._lexer.lookahead():this._lexer.token;if(r.kind===V.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(t)throw Pe(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 t=this._lexer.token;if(this.peek(V.BRACE_L))return this.node(t,{kind:ee.OPERATION_DEFINITION,operation:Vr.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});const r=this.parseOperationType();let n;return this.peek(V.NAME)&&(n=this.parseName()),this.node(t,{kind:ee.OPERATION_DEFINITION,operation:r,name:n,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){const t=this.expectToken(V.NAME);switch(t.value){case"query":return Vr.QUERY;case"mutation":return Vr.MUTATION;case"subscription":return Vr.SUBSCRIPTION}throw this.unexpected(t)}parseVariableDefinitions(){return this.optionalMany(V.PAREN_L,this.parseVariableDefinition,V.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:ee.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(V.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(V.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){const t=this._lexer.token;return this.expectToken(V.DOLLAR),this.node(t,{kind:ee.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:ee.SELECTION_SET,selections:this.many(V.BRACE_L,this.parseSelection,V.BRACE_R)})}parseSelection(){return this.peek(V.SPREAD)?this.parseFragment():this.parseField()}parseField(){const t=this._lexer.token,r=this.parseName();let n,i;return this.expectOptionalToken(V.COLON)?(n=r,i=this.parseName()):i=r,this.node(t,{kind:ee.FIELD,alias:n,name:i,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(V.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(t){const r=t?this.parseConstArgument:this.parseArgument;return this.optionalMany(V.PAREN_L,r,V.PAREN_R)}parseArgument(t=!1){const r=this._lexer.token,n=this.parseName();return this.expectToken(V.COLON),this.node(r,{kind:ee.ARGUMENT,name:n,value:this.parseValueLiteral(t)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){const t=this._lexer.token;this.expectToken(V.SPREAD);const r=this.expectOptionalKeyword("on");return!r&&this.peek(V.NAME)?this.node(t,{kind:ee.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(t,{kind:ee.INLINE_FRAGMENT,typeCondition:r?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){const t=this._lexer.token;return this.expectKeyword("fragment"),this._options.allowLegacyFragmentVariables===!0?this.node(t,{kind:ee.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(t,{kind:ee.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(t){const r=this._lexer.token;switch(r.kind){case V.BRACKET_L:return this.parseList(t);case V.BRACE_L:return this.parseObject(t);case V.INT:return this.advanceLexer(),this.node(r,{kind:ee.INT,value:r.value});case V.FLOAT:return this.advanceLexer(),this.node(r,{kind:ee.FLOAT,value:r.value});case V.STRING:case V.BLOCK_STRING:return this.parseStringLiteral();case V.NAME:switch(this.advanceLexer(),r.value){case"true":return this.node(r,{kind:ee.BOOLEAN,value:!0});case"false":return this.node(r,{kind:ee.BOOLEAN,value:!1});case"null":return this.node(r,{kind:ee.NULL});default:return this.node(r,{kind:ee.ENUM,value:r.value})}case V.DOLLAR:if(t)if(this.expectToken(V.DOLLAR),this._lexer.token.kind===V.NAME){const n=this._lexer.token.value;throw Pe(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 t=this._lexer.token;return this.advanceLexer(),this.node(t,{kind:ee.STRING,value:t.value,block:t.kind===V.BLOCK_STRING})}parseList(t){const r=()=>this.parseValueLiteral(t);return this.node(this._lexer.token,{kind:ee.LIST,values:this.any(V.BRACKET_L,r,V.BRACKET_R)})}parseObject(t){const r=()=>this.parseObjectField(t);return this.node(this._lexer.token,{kind:ee.OBJECT,fields:this.any(V.BRACE_L,r,V.BRACE_R)})}parseObjectField(t){const r=this._lexer.token,n=this.parseName();return this.expectToken(V.COLON),this.node(r,{kind:ee.OBJECT_FIELD,name:n,value:this.parseValueLiteral(t)})}parseDirectives(t){const r=[];for(;this.peek(V.AT);)r.push(this.parseDirective(t));return r}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(t){const r=this._lexer.token;return this.expectToken(V.AT),this.node(r,{kind:ee.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(t)})}parseTypeReference(){const t=this._lexer.token;let r;if(this.expectOptionalToken(V.BRACKET_L)){const n=this.parseTypeReference();this.expectToken(V.BRACKET_R),r=this.node(t,{kind:ee.LIST_TYPE,type:n})}else r=this.parseNamedType();return this.expectOptionalToken(V.BANG)?this.node(t,{kind:ee.NON_NULL_TYPE,type:r}):r}parseNamedType(){return this.node(this._lexer.token,{kind:ee.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(V.STRING)||this.peek(V.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){const t=this._lexer.token,r=this.parseDescription();this.expectKeyword("schema");const n=this.parseConstDirectives(),i=this.many(V.BRACE_L,this.parseOperationTypeDefinition,V.BRACE_R);return this.node(t,{kind:ee.SCHEMA_DEFINITION,description:r,directives:n,operationTypes:i})}parseOperationTypeDefinition(){const t=this._lexer.token,r=this.parseOperationType();this.expectToken(V.COLON);const n=this.parseNamedType();return this.node(t,{kind:ee.OPERATION_TYPE_DEFINITION,operation:r,type:n})}parseScalarTypeDefinition(){const t=this._lexer.token,r=this.parseDescription();this.expectKeyword("scalar");const n=this.parseName(),i=this.parseConstDirectives();return this.node(t,{kind:ee.SCALAR_TYPE_DEFINITION,description:r,name:n,directives:i})}parseObjectTypeDefinition(){const t=this._lexer.token,r=this.parseDescription();this.expectKeyword("type");const n=this.parseName(),i=this.parseImplementsInterfaces(),s=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(t,{kind:ee.OBJECT_TYPE_DEFINITION,description:r,name:n,interfaces:i,directives:s,fields:o})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(V.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(V.BRACE_L,this.parseFieldDefinition,V.BRACE_R)}parseFieldDefinition(){const t=this._lexer.token,r=this.parseDescription(),n=this.parseName(),i=this.parseArgumentDefs();this.expectToken(V.COLON);const s=this.parseTypeReference(),o=this.parseConstDirectives();return this.node(t,{kind:ee.FIELD_DEFINITION,description:r,name:n,arguments:i,type:s,directives:o})}parseArgumentDefs(){return this.optionalMany(V.PAREN_L,this.parseInputValueDef,V.PAREN_R)}parseInputValueDef(){const t=this._lexer.token,r=this.parseDescription(),n=this.parseName();this.expectToken(V.COLON);const i=this.parseTypeReference();let s;this.expectOptionalToken(V.EQUALS)&&(s=this.parseConstValueLiteral());const o=this.parseConstDirectives();return this.node(t,{kind:ee.INPUT_VALUE_DEFINITION,description:r,name:n,type:i,defaultValue:s,directives:o})}parseInterfaceTypeDefinition(){const t=this._lexer.token,r=this.parseDescription();this.expectKeyword("interface");const n=this.parseName(),i=this.parseImplementsInterfaces(),s=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(t,{kind:ee.INTERFACE_TYPE_DEFINITION,description:r,name:n,interfaces:i,directives:s,fields:o})}parseUnionTypeDefinition(){const t=this._lexer.token,r=this.parseDescription();this.expectKeyword("union");const n=this.parseName(),i=this.parseConstDirectives(),s=this.parseUnionMemberTypes();return this.node(t,{kind:ee.UNION_TYPE_DEFINITION,description:r,name:n,directives:i,types:s})}parseUnionMemberTypes(){return this.expectOptionalToken(V.EQUALS)?this.delimitedMany(V.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){const t=this._lexer.token,r=this.parseDescription();this.expectKeyword("enum");const n=this.parseName(),i=this.parseConstDirectives(),s=this.parseEnumValuesDefinition();return this.node(t,{kind:ee.ENUM_TYPE_DEFINITION,description:r,name:n,directives:i,values:s})}parseEnumValuesDefinition(){return this.optionalMany(V.BRACE_L,this.parseEnumValueDefinition,V.BRACE_R)}parseEnumValueDefinition(){const t=this._lexer.token,r=this.parseDescription(),n=this.parseEnumValueName(),i=this.parseConstDirectives();return this.node(t,{kind:ee.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 Pe(this._lexer.source,this._lexer.token.start,`${di(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){const t=this._lexer.token,r=this.parseDescription();this.expectKeyword("input");const n=this.parseName(),i=this.parseConstDirectives(),s=this.parseInputFieldsDefinition();return this.node(t,{kind:ee.INPUT_OBJECT_TYPE_DEFINITION,description:r,name:n,directives:i,fields:s})}parseInputFieldsDefinition(){return this.optionalMany(V.BRACE_L,this.parseInputValueDef,V.BRACE_R)}parseTypeSystemExtension(){const t=this._lexer.lookahead();if(t.kind===V.NAME)switch(t.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(t)}parseSchemaExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");const r=this.parseConstDirectives(),n=this.optionalMany(V.BRACE_L,this.parseOperationTypeDefinition,V.BRACE_R);if(r.length===0&&n.length===0)throw this.unexpected();return this.node(t,{kind:ee.SCHEMA_EXTENSION,directives:r,operationTypes:n})}parseScalarTypeExtension(){const t=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(t,{kind:ee.SCALAR_TYPE_EXTENSION,name:r,directives:n})}parseObjectTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");const r=this.parseName(),n=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),s=this.parseFieldsDefinition();if(n.length===0&&i.length===0&&s.length===0)throw this.unexpected();return this.node(t,{kind:ee.OBJECT_TYPE_EXTENSION,name:r,interfaces:n,directives:i,fields:s})}parseInterfaceTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");const r=this.parseName(),n=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),s=this.parseFieldsDefinition();if(n.length===0&&i.length===0&&s.length===0)throw this.unexpected();return this.node(t,{kind:ee.INTERFACE_TYPE_EXTENSION,name:r,interfaces:n,directives:i,fields:s})}parseUnionTypeExtension(){const t=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(t,{kind:ee.UNION_TYPE_EXTENSION,name:r,directives:n,types:i})}parseEnumTypeExtension(){const t=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(t,{kind:ee.ENUM_TYPE_EXTENSION,name:r,directives:n,values:i})}parseInputObjectTypeExtension(){const t=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(t,{kind:ee.INPUT_OBJECT_TYPE_EXTENSION,name:r,directives:n,fields:i})}parseDirectiveDefinition(){const t=this._lexer.token,r=this.parseDescription();this.expectKeyword("directive"),this.expectToken(V.AT);const n=this.parseName(),i=this.parseArgumentDefs(),s=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");const o=this.parseDirectiveLocations();return this.node(t,{kind:ee.DIRECTIVE_DEFINITION,description:r,name:n,arguments:i,repeatable:s,locations:o})}parseDirectiveLocations(){return this.delimitedMany(V.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){const t=this._lexer.token,r=this.parseName();if(Object.prototype.hasOwnProperty.call(fo,r.value))return r;throw this.unexpected(t)}node(t,r){return this._options.noLocation!==!0&&(r.loc=new ob(t,this._lexer.lastToken,this._lexer.source)),r}peek(t){return this._lexer.token.kind===t}expectToken(t){const r=this._lexer.token;if(r.kind===t)return this.advanceLexer(),r;throw Pe(this._lexer.source,r.start,`Expected ${kc(t)}, found ${di(r)}.`)}expectOptionalToken(t){return this._lexer.token.kind===t?(this.advanceLexer(),!0):!1}expectKeyword(t){const r=this._lexer.token;if(r.kind===V.NAME&&r.value===t)this.advanceLexer();else throw Pe(this._lexer.source,r.start,`Expected "${t}", found ${di(r)}.`)}expectOptionalKeyword(t){const r=this._lexer.token;return r.kind===V.NAME&&r.value===t?(this.advanceLexer(),!0):!1}unexpected(t){const r=t!=null?t:this._lexer.token;return Pe(this._lexer.source,r.start,`Unexpected ${di(r)}.`)}any(t,r,n){this.expectToken(t);const i=[];for(;!this.expectOptionalToken(n);)i.push(r.call(this));return i}optionalMany(t,r,n){if(this.expectOptionalToken(t)){const i=[];do i.push(r.call(this));while(!this.expectOptionalToken(n));return i}return[]}many(t,r,n){this.expectToken(t);const i=[];do i.push(r.call(this));while(!this.expectOptionalToken(n));return i}delimitedMany(t,r){this.expectOptionalToken(t);const n=[];do n.push(r.call(this));while(this.expectOptionalToken(t));return n}advanceLexer(){const{maxTokens:t}=this._options,r=this._lexer.advance();if(r.kind!==V.EOF&&(++this._tokenCounter,t!==void 0&&this._tokenCounter>t))throw Pe(this._lexer.source,r.start,`Document contains more that ${t} tokens. Parsing aborted.`)}}function di(e){const t=e.value;return kc(e.kind)+(t!=null?` "${t}"`:"")}function kc(e){return fb(e)?`"${e}"`:e}function Ob(e){return`"${e.replace(Gb,Vb)}"`}const Gb=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function Vb(e){return kb[e.charCodeAt(0)]}const kb=["\\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"],Xb=Object.freeze({});function Wb(e,t,r=Ec){const n=new Map;for(const v of Object.values(ee))n.set(v,Pb(t,v));let i,s=Array.isArray(e),o=[e],l=-1,u=[],a=e,h,c;const f=[],d=[];do{l++;const v=l===o.length,y=v&&u.length!==0;if(v){if(h=d.length===0?void 0:f[f.length-1],a=c,c=d.pop(),y)if(s){a=a.slice();let _=0;for(const[S,b]of u){const R=S-_;b===null?(a.splice(R,1),_++):a[R]=b}}else{a=x({},a);for(const[_,S]of u)a[_]=S}l=i.index,o=i.keys,u=i.edits,s=i.inArray,i=i.prev}else if(c){if(h=s?l:o[l],a=c[h],a==null)continue;f.push(h)}let w;if(!Array.isArray(a)){var p,m;Ic(a)||et(!1,`Invalid AST Node: ${go(a)}.`);const _=v?(p=n.get(a.kind))===null||p===void 0?void 0:p.leave:(m=n.get(a.kind))===null||m===void 0?void 0:m.enter;if(w=_==null?void 0:_.call(t,a,h,c,f,d),w===Xb)break;if(w===!1){if(!v){f.pop();continue}}else if(w!==void 0&&(u.push([h,w]),!v))if(Ic(w))a=w;else{f.pop();continue}}if(w===void 0&&y&&u.push([h,a]),v)f.pop();else{var g;i={inArray:s,index:l,keys:o,edits:u,prev:i},s=Array.isArray(a),o=s?a:(g=r[a.kind])!==null&&g!==void 0?g:[],l=-1,u=[],c&&d.push(c),c=a}}while(i!==void 0);return u.length!==0?u[u.length-1][1]:e}function Pb(e,t){const r=e[t];return typeof r=="object"?r:typeof r=="function"?{enter:r,leave:void 0}:{enter:e.enter,leave:e.leave}}function yo(e){return Wb(e,Ab)}const Mb=80,Ab={Name:{leave:e=>e.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>J(e.definitions,`
|
|
22
|
+
spurious results.`)}}return!1};class ku{constructor(t,r="GraphQL request",n={line:1,column:1}){typeof t=="string"||qe(!1,`Body must be a string. Received: ${yo(t)}.`),this.body=t,this.name=r,this.locationOffset=n,this.locationOffset.line>0||qe(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||qe(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}}function kb(e){return Vb(e,ku)}function Xu(e,t){const r=new Xb(e,t),n=r.parseDocument();return Object.defineProperty(n,"tokenCount",{enumerable:!1,value:r.tokenCount}),n}class Xb{constructor(t,r={}){const n=kb(t)?t:new ku(t);this._lexer=new yb(n),this._options=r,this._tokenCounter=0}get tokenCount(){return this._tokenCounter}parseName(){const t=this.expectToken(V.NAME);return this.node(t,{kind:ee.NAME,value:t.value})}parseDocument(){return this.node(this._lexer.token,{kind:ee.DOCUMENT,definitions:this.many(V.SOF,this.parseDefinition,V.EOF)})}parseDefinition(){if(this.peek(V.BRACE_L))return this.parseOperationDefinition();const t=this.peekDescription(),r=t?this._lexer.lookahead():this._lexer.token;if(r.kind===V.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(t)throw Me(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 t=this._lexer.token;if(this.peek(V.BRACE_L))return this.node(t,{kind:ee.OPERATION_DEFINITION,operation:kr.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});const r=this.parseOperationType();let n;return this.peek(V.NAME)&&(n=this.parseName()),this.node(t,{kind:ee.OPERATION_DEFINITION,operation:r,name:n,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){const t=this.expectToken(V.NAME);switch(t.value){case"query":return kr.QUERY;case"mutation":return kr.MUTATION;case"subscription":return kr.SUBSCRIPTION}throw this.unexpected(t)}parseVariableDefinitions(){return this.optionalMany(V.PAREN_L,this.parseVariableDefinition,V.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:ee.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(V.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(V.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){const t=this._lexer.token;return this.expectToken(V.DOLLAR),this.node(t,{kind:ee.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:ee.SELECTION_SET,selections:this.many(V.BRACE_L,this.parseSelection,V.BRACE_R)})}parseSelection(){return this.peek(V.SPREAD)?this.parseFragment():this.parseField()}parseField(){const t=this._lexer.token,r=this.parseName();let n,i;return this.expectOptionalToken(V.COLON)?(n=r,i=this.parseName()):i=r,this.node(t,{kind:ee.FIELD,alias:n,name:i,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(V.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(t){const r=t?this.parseConstArgument:this.parseArgument;return this.optionalMany(V.PAREN_L,r,V.PAREN_R)}parseArgument(t=!1){const r=this._lexer.token,n=this.parseName();return this.expectToken(V.COLON),this.node(r,{kind:ee.ARGUMENT,name:n,value:this.parseValueLiteral(t)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){const t=this._lexer.token;this.expectToken(V.SPREAD);const r=this.expectOptionalKeyword("on");return!r&&this.peek(V.NAME)?this.node(t,{kind:ee.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(t,{kind:ee.INLINE_FRAGMENT,typeCondition:r?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){const t=this._lexer.token;return this.expectKeyword("fragment"),this._options.allowLegacyFragmentVariables===!0?this.node(t,{kind:ee.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(t,{kind:ee.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(t){const r=this._lexer.token;switch(r.kind){case V.BRACKET_L:return this.parseList(t);case V.BRACE_L:return this.parseObject(t);case V.INT:return this.advanceLexer(),this.node(r,{kind:ee.INT,value:r.value});case V.FLOAT:return this.advanceLexer(),this.node(r,{kind:ee.FLOAT,value:r.value});case V.STRING:case V.BLOCK_STRING:return this.parseStringLiteral();case V.NAME:switch(this.advanceLexer(),r.value){case"true":return this.node(r,{kind:ee.BOOLEAN,value:!0});case"false":return this.node(r,{kind:ee.BOOLEAN,value:!1});case"null":return this.node(r,{kind:ee.NULL});default:return this.node(r,{kind:ee.ENUM,value:r.value})}case V.DOLLAR:if(t)if(this.expectToken(V.DOLLAR),this._lexer.token.kind===V.NAME){const n=this._lexer.token.value;throw Me(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 t=this._lexer.token;return this.advanceLexer(),this.node(t,{kind:ee.STRING,value:t.value,block:t.kind===V.BLOCK_STRING})}parseList(t){const r=()=>this.parseValueLiteral(t);return this.node(this._lexer.token,{kind:ee.LIST,values:this.any(V.BRACKET_L,r,V.BRACKET_R)})}parseObject(t){const r=()=>this.parseObjectField(t);return this.node(this._lexer.token,{kind:ee.OBJECT,fields:this.any(V.BRACE_L,r,V.BRACE_R)})}parseObjectField(t){const r=this._lexer.token,n=this.parseName();return this.expectToken(V.COLON),this.node(r,{kind:ee.OBJECT_FIELD,name:n,value:this.parseValueLiteral(t)})}parseDirectives(t){const r=[];for(;this.peek(V.AT);)r.push(this.parseDirective(t));return r}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(t){const r=this._lexer.token;return this.expectToken(V.AT),this.node(r,{kind:ee.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(t)})}parseTypeReference(){const t=this._lexer.token;let r;if(this.expectOptionalToken(V.BRACKET_L)){const n=this.parseTypeReference();this.expectToken(V.BRACKET_R),r=this.node(t,{kind:ee.LIST_TYPE,type:n})}else r=this.parseNamedType();return this.expectOptionalToken(V.BANG)?this.node(t,{kind:ee.NON_NULL_TYPE,type:r}):r}parseNamedType(){return this.node(this._lexer.token,{kind:ee.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(V.STRING)||this.peek(V.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){const t=this._lexer.token,r=this.parseDescription();this.expectKeyword("schema");const n=this.parseConstDirectives(),i=this.many(V.BRACE_L,this.parseOperationTypeDefinition,V.BRACE_R);return this.node(t,{kind:ee.SCHEMA_DEFINITION,description:r,directives:n,operationTypes:i})}parseOperationTypeDefinition(){const t=this._lexer.token,r=this.parseOperationType();this.expectToken(V.COLON);const n=this.parseNamedType();return this.node(t,{kind:ee.OPERATION_TYPE_DEFINITION,operation:r,type:n})}parseScalarTypeDefinition(){const t=this._lexer.token,r=this.parseDescription();this.expectKeyword("scalar");const n=this.parseName(),i=this.parseConstDirectives();return this.node(t,{kind:ee.SCALAR_TYPE_DEFINITION,description:r,name:n,directives:i})}parseObjectTypeDefinition(){const t=this._lexer.token,r=this.parseDescription();this.expectKeyword("type");const n=this.parseName(),i=this.parseImplementsInterfaces(),s=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(t,{kind:ee.OBJECT_TYPE_DEFINITION,description:r,name:n,interfaces:i,directives:s,fields:o})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(V.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(V.BRACE_L,this.parseFieldDefinition,V.BRACE_R)}parseFieldDefinition(){const t=this._lexer.token,r=this.parseDescription(),n=this.parseName(),i=this.parseArgumentDefs();this.expectToken(V.COLON);const s=this.parseTypeReference(),o=this.parseConstDirectives();return this.node(t,{kind:ee.FIELD_DEFINITION,description:r,name:n,arguments:i,type:s,directives:o})}parseArgumentDefs(){return this.optionalMany(V.PAREN_L,this.parseInputValueDef,V.PAREN_R)}parseInputValueDef(){const t=this._lexer.token,r=this.parseDescription(),n=this.parseName();this.expectToken(V.COLON);const i=this.parseTypeReference();let s;this.expectOptionalToken(V.EQUALS)&&(s=this.parseConstValueLiteral());const o=this.parseConstDirectives();return this.node(t,{kind:ee.INPUT_VALUE_DEFINITION,description:r,name:n,type:i,defaultValue:s,directives:o})}parseInterfaceTypeDefinition(){const t=this._lexer.token,r=this.parseDescription();this.expectKeyword("interface");const n=this.parseName(),i=this.parseImplementsInterfaces(),s=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(t,{kind:ee.INTERFACE_TYPE_DEFINITION,description:r,name:n,interfaces:i,directives:s,fields:o})}parseUnionTypeDefinition(){const t=this._lexer.token,r=this.parseDescription();this.expectKeyword("union");const n=this.parseName(),i=this.parseConstDirectives(),s=this.parseUnionMemberTypes();return this.node(t,{kind:ee.UNION_TYPE_DEFINITION,description:r,name:n,directives:i,types:s})}parseUnionMemberTypes(){return this.expectOptionalToken(V.EQUALS)?this.delimitedMany(V.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){const t=this._lexer.token,r=this.parseDescription();this.expectKeyword("enum");const n=this.parseName(),i=this.parseConstDirectives(),s=this.parseEnumValuesDefinition();return this.node(t,{kind:ee.ENUM_TYPE_DEFINITION,description:r,name:n,directives:i,values:s})}parseEnumValuesDefinition(){return this.optionalMany(V.BRACE_L,this.parseEnumValueDefinition,V.BRACE_R)}parseEnumValueDefinition(){const t=this._lexer.token,r=this.parseDescription(),n=this.parseEnumValueName(),i=this.parseConstDirectives();return this.node(t,{kind:ee.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 Me(this._lexer.source,this._lexer.token.start,`${pi(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){const t=this._lexer.token,r=this.parseDescription();this.expectKeyword("input");const n=this.parseName(),i=this.parseConstDirectives(),s=this.parseInputFieldsDefinition();return this.node(t,{kind:ee.INPUT_OBJECT_TYPE_DEFINITION,description:r,name:n,directives:i,fields:s})}parseInputFieldsDefinition(){return this.optionalMany(V.BRACE_L,this.parseInputValueDef,V.BRACE_R)}parseTypeSystemExtension(){const t=this._lexer.lookahead();if(t.kind===V.NAME)switch(t.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(t)}parseSchemaExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");const r=this.parseConstDirectives(),n=this.optionalMany(V.BRACE_L,this.parseOperationTypeDefinition,V.BRACE_R);if(r.length===0&&n.length===0)throw this.unexpected();return this.node(t,{kind:ee.SCHEMA_EXTENSION,directives:r,operationTypes:n})}parseScalarTypeExtension(){const t=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(t,{kind:ee.SCALAR_TYPE_EXTENSION,name:r,directives:n})}parseObjectTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");const r=this.parseName(),n=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),s=this.parseFieldsDefinition();if(n.length===0&&i.length===0&&s.length===0)throw this.unexpected();return this.node(t,{kind:ee.OBJECT_TYPE_EXTENSION,name:r,interfaces:n,directives:i,fields:s})}parseInterfaceTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");const r=this.parseName(),n=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),s=this.parseFieldsDefinition();if(n.length===0&&i.length===0&&s.length===0)throw this.unexpected();return this.node(t,{kind:ee.INTERFACE_TYPE_EXTENSION,name:r,interfaces:n,directives:i,fields:s})}parseUnionTypeExtension(){const t=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(t,{kind:ee.UNION_TYPE_EXTENSION,name:r,directives:n,types:i})}parseEnumTypeExtension(){const t=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(t,{kind:ee.ENUM_TYPE_EXTENSION,name:r,directives:n,values:i})}parseInputObjectTypeExtension(){const t=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(t,{kind:ee.INPUT_OBJECT_TYPE_EXTENSION,name:r,directives:n,fields:i})}parseDirectiveDefinition(){const t=this._lexer.token,r=this.parseDescription();this.expectKeyword("directive"),this.expectToken(V.AT);const n=this.parseName(),i=this.parseArgumentDefs(),s=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");const o=this.parseDirectiveLocations();return this.node(t,{kind:ee.DIRECTIVE_DEFINITION,description:r,name:n,arguments:i,repeatable:s,locations:o})}parseDirectiveLocations(){return this.delimitedMany(V.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){const t=this._lexer.token,r=this.parseName();if(Object.prototype.hasOwnProperty.call(po,r.value))return r;throw this.unexpected(t)}node(t,r){return this._options.noLocation!==!0&&(r.loc=new db(t,this._lexer.lastToken,this._lexer.source)),r}peek(t){return this._lexer.token.kind===t}expectToken(t){const r=this._lexer.token;if(r.kind===t)return this.advanceLexer(),r;throw Me(this._lexer.source,r.start,`Expected ${Wu(t)}, found ${pi(r)}.`)}expectOptionalToken(t){return this._lexer.token.kind===t?(this.advanceLexer(),!0):!1}expectKeyword(t){const r=this._lexer.token;if(r.kind===V.NAME&&r.value===t)this.advanceLexer();else throw Me(this._lexer.source,r.start,`Expected "${t}", found ${pi(r)}.`)}expectOptionalKeyword(t){const r=this._lexer.token;return r.kind===V.NAME&&r.value===t?(this.advanceLexer(),!0):!1}unexpected(t){const r=t!=null?t:this._lexer.token;return Me(this._lexer.source,r.start,`Unexpected ${pi(r)}.`)}any(t,r,n){this.expectToken(t);const i=[];for(;!this.expectOptionalToken(n);)i.push(r.call(this));return i}optionalMany(t,r,n){if(this.expectOptionalToken(t)){const i=[];do i.push(r.call(this));while(!this.expectOptionalToken(n));return i}return[]}many(t,r,n){this.expectToken(t);const i=[];do i.push(r.call(this));while(!this.expectOptionalToken(n));return i}delimitedMany(t,r){this.expectOptionalToken(t);const n=[];do n.push(r.call(this));while(this.expectOptionalToken(t));return n}advanceLexer(){const{maxTokens:t}=this._options,r=this._lexer.advance();if(r.kind!==V.EOF&&(++this._tokenCounter,t!==void 0&&this._tokenCounter>t))throw Me(this._lexer.source,r.start,`Document contains more that ${t} tokens. Parsing aborted.`)}}function pi(e){const t=e.value;return Wu(e.kind)+(t!=null?` "${t}"`:"")}function Wu(e){return bb(e)?`"${e}"`:e}function Wb(e){return`"${e.replace(Pb,Mb)}"`}const Pb=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function Mb(e){return Ab[e.charCodeAt(0)]}const Ab=["\\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"],Ub=Object.freeze({});function Db(e,t,r=Cu){const n=new Map;for(const v of Object.values(ee))n.set(v,Fb(t,v));let i,s=Array.isArray(e),o=[e],l=-1,c=[],a=e,h,u;const f=[],d=[];do{l++;const v=l===o.length,y=v&&c.length!==0;if(v){if(h=d.length===0?void 0:f[f.length-1],a=u,u=d.pop(),y)if(s){a=a.slice();let _=0;for(const[S,b]of c){const R=S-_;b===null?(a.splice(R,1),_++):a[R]=b}}else{a=x({},a);for(const[_,S]of c)a[_]=S}l=i.index,o=i.keys,c=i.edits,s=i.inArray,i=i.prev}else if(u){if(h=s?l:o[l],a=u[h],a==null)continue;f.push(h)}let w;if(!Array.isArray(a)){var p,m;Zu(a)||qe(!1,`Invalid AST Node: ${yo(a)}.`);const _=v?(p=n.get(a.kind))===null||p===void 0?void 0:p.leave:(m=n.get(a.kind))===null||m===void 0?void 0:m.enter;if(w=_==null?void 0:_.call(t,a,h,u,f,d),w===Ub)break;if(w===!1){if(!v){f.pop();continue}}else if(w!==void 0&&(c.push([h,w]),!v))if(Zu(w))a=w;else{f.pop();continue}}if(w===void 0&&y&&c.push([h,a]),v)f.pop();else{var g;i={inArray:s,index:l,keys:o,edits:c,prev:i},s=Array.isArray(a),o=s?a:(g=r[a.kind])!==null&&g!==void 0?g:[],l=-1,c=[],u&&d.push(u),u=a}}while(i!==void 0);return c.length!==0?c[c.length-1][1]:e}function Fb(e,t){const r=e[t];return typeof r=="object"?r:typeof r=="function"?{enter:r,leave:void 0}:{enter:e.enter,leave:e.leave}}function bo(e){return Db(e,Hb)}const Jb=80,Hb={Name:{leave:e=>e.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>J(e.definitions,`
|
|
23
23
|
|
|
24
|
-
`)},OperationDefinition:{leave(e){const t=
|
|
25
|
-
`,
|
|
24
|
+
`)},OperationDefinition:{leave(e){const t=ue("(",J(e.variableDefinitions,", "),")"),r=J([e.operation,J([e.name,t]),J(e.directives," ")]," ");return(r==="query"?"":r+" ")+e.selectionSet}},VariableDefinition:{leave:({variable:e,type:t,defaultValue:r,directives:n})=>e+": "+t+ue(" = ",r)+ue(" ",J(n," "))},SelectionSet:{leave:({selections:e})=>wt(e)},Field:{leave({alias:e,name:t,arguments:r,directives:n,selectionSet:i}){const s=ue("",e,": ")+t;let o=s+ue("(",J(r,", "),")");return o.length>Jb&&(o=s+ue(`(
|
|
25
|
+
`,mi(J(r,`
|
|
26
26
|
`)),`
|
|
27
|
-
)`)),J([o,J(n," "),i]," ")}},Argument:{leave:({name:e,value:t})=>e+": "+t},FragmentSpread:{leave:({name:e,directives:t})=>"..."+e+
|
|
28
|
-
`)+J(["schema",J(t," "),wt(r)]," ")},OperationTypeDefinition:{leave:({operation:e,type:t})=>e+": "+t},ScalarTypeDefinition:{leave:({description:e,name:t,directives:r})=>
|
|
29
|
-
`)+J(["scalar",t,J(r," ")]," ")},ObjectTypeDefinition:{leave:({description:e,name:t,interfaces:r,directives:n,fields:i})=>
|
|
30
|
-
`)+J(["type",t,
|
|
31
|
-
`)+t+(
|
|
32
|
-
`,
|
|
27
|
+
)`)),J([o,J(n," "),i]," ")}},Argument:{leave:({name:e,value:t})=>e+": "+t},FragmentSpread:{leave:({name:e,directives:t})=>"..."+e+ue(" ",J(t," "))},InlineFragment:{leave:({typeCondition:e,directives:t,selectionSet:r})=>J(["...",ue("on ",e),J(t," "),r]," ")},FragmentDefinition:{leave:({name:e,typeCondition:t,variableDefinitions:r,directives:n,selectionSet:i})=>`fragment ${e}${ue("(",J(r,", "),")")} on ${t} ${ue("",J(n," ")," ")}`+i},IntValue:{leave:({value:e})=>e},FloatValue:{leave:({value:e})=>e},StringValue:{leave:({value:e,block:t})=>t?gb(e):Wb(e)},BooleanValue:{leave:({value:e})=>e?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:e})=>e},ListValue:{leave:({values:e})=>"["+J(e,", ")+"]"},ObjectValue:{leave:({fields:e})=>"{"+J(e,", ")+"}"},ObjectField:{leave:({name:e,value:t})=>e+": "+t},Directive:{leave:({name:e,arguments:t})=>"@"+e+ue("(",J(t,", "),")")},NamedType:{leave:({name:e})=>e},ListType:{leave:({type:e})=>"["+e+"]"},NonNullType:{leave:({type:e})=>e+"!"},SchemaDefinition:{leave:({description:e,directives:t,operationTypes:r})=>ue("",e,`
|
|
28
|
+
`)+J(["schema",J(t," "),wt(r)]," ")},OperationTypeDefinition:{leave:({operation:e,type:t})=>e+": "+t},ScalarTypeDefinition:{leave:({description:e,name:t,directives:r})=>ue("",e,`
|
|
29
|
+
`)+J(["scalar",t,J(r," ")]," ")},ObjectTypeDefinition:{leave:({description:e,name:t,interfaces:r,directives:n,fields:i})=>ue("",e,`
|
|
30
|
+
`)+J(["type",t,ue("implements ",J(r," & ")),J(n," "),wt(i)]," ")},FieldDefinition:{leave:({description:e,name:t,arguments:r,type:n,directives:i})=>ue("",e,`
|
|
31
|
+
`)+t+(Pu(r)?ue(`(
|
|
32
|
+
`,mi(J(r,`
|
|
33
33
|
`)),`
|
|
34
|
-
)`):
|
|
35
|
-
`)+J([t+": "+r,
|
|
36
|
-
`)+J(["interface",t,
|
|
37
|
-
`)+J(["union",t,J(r," "),
|
|
38
|
-
`)+J(["enum",t,J(r," "),wt(n)]," ")},EnumValueDefinition:{leave:({description:e,name:t,directives:r})=>
|
|
39
|
-
`)+J([t,J(r," ")]," ")},InputObjectTypeDefinition:{leave:({description:e,name:t,directives:r,fields:n})=>
|
|
40
|
-
`)+J(["input",t,J(r," "),wt(n)]," ")},DirectiveDefinition:{leave:({description:e,name:t,arguments:r,repeatable:n,locations:i})=>
|
|
41
|
-
`)+"directive @"+t+(
|
|
42
|
-
`,
|
|
34
|
+
)`):ue("(",J(r,", "),")"))+": "+n+ue(" ",J(i," "))},InputValueDefinition:{leave:({description:e,name:t,type:r,defaultValue:n,directives:i})=>ue("",e,`
|
|
35
|
+
`)+J([t+": "+r,ue("= ",n),J(i," ")]," ")},InterfaceTypeDefinition:{leave:({description:e,name:t,interfaces:r,directives:n,fields:i})=>ue("",e,`
|
|
36
|
+
`)+J(["interface",t,ue("implements ",J(r," & ")),J(n," "),wt(i)]," ")},UnionTypeDefinition:{leave:({description:e,name:t,directives:r,types:n})=>ue("",e,`
|
|
37
|
+
`)+J(["union",t,J(r," "),ue("= ",J(n," | "))]," ")},EnumTypeDefinition:{leave:({description:e,name:t,directives:r,values:n})=>ue("",e,`
|
|
38
|
+
`)+J(["enum",t,J(r," "),wt(n)]," ")},EnumValueDefinition:{leave:({description:e,name:t,directives:r})=>ue("",e,`
|
|
39
|
+
`)+J([t,J(r," ")]," ")},InputObjectTypeDefinition:{leave:({description:e,name:t,directives:r,fields:n})=>ue("",e,`
|
|
40
|
+
`)+J(["input",t,J(r," "),wt(n)]," ")},DirectiveDefinition:{leave:({description:e,name:t,arguments:r,repeatable:n,locations:i})=>ue("",e,`
|
|
41
|
+
`)+"directive @"+t+(Pu(r)?ue(`(
|
|
42
|
+
`,mi(J(r,`
|
|
43
43
|
`)),`
|
|
44
|
-
)`):
|
|
45
|
-
`,
|
|
44
|
+
)`):ue("(",J(r,", "),")"))+(n?" repeatable":"")+" on "+J(i," | ")},SchemaExtension:{leave:({directives:e,operationTypes:t})=>J(["extend schema",J(e," "),wt(t)]," ")},ScalarTypeExtension:{leave:({name:e,directives:t})=>J(["extend scalar",e,J(t," ")]," ")},ObjectTypeExtension:{leave:({name:e,interfaces:t,directives:r,fields:n})=>J(["extend type",e,ue("implements ",J(t," & ")),J(r," "),wt(n)]," ")},InterfaceTypeExtension:{leave:({name:e,interfaces:t,directives:r,fields:n})=>J(["extend interface",e,ue("implements ",J(t," & ")),J(r," "),wt(n)]," ")},UnionTypeExtension:{leave:({name:e,directives:t,types:r})=>J(["extend union",e,J(t," "),ue("= ",J(r," | "))]," ")},EnumTypeExtension:{leave:({name:e,directives:t,values:r})=>J(["extend enum",e,J(t," "),wt(r)]," ")},InputObjectTypeExtension:{leave:({name:e,directives:t,fields:r})=>J(["extend input",e,J(t," "),wt(r)]," ")}};function J(e,t=""){var r;return(r=e==null?void 0:e.filter(n=>n).join(t))!==null&&r!==void 0?r:""}function wt(e){return ue(`{
|
|
45
|
+
`,mi(J(e,`
|
|
46
46
|
`)),`
|
|
47
|
-
}`)}function
|
|
48
|
-
`))}function
|
|
49
|
-
`)))!==null&&t!==void 0?t:!1}const bo=JSON,Ub=e=>e.toUpperCase(),Db=e=>{const t={};return e.forEach((r,n)=>{t[n]=r}),t},Fb=(e,t,r)=>e.document?e:{document:e,variables:t,requestHeaders:r,signal:void 0},Jb=(e,t,r)=>e.query?e:{query:e,variables:t,requestHeaders:r,signal:void 0},Hb=(e,t)=>e.documents?e:{documents:e,requestHeaders:t,signal:void 0},Wc=e=>{var n,i;let t;const r=e.definitions.filter(s=>s.kind==="OperationDefinition");return r.length===1&&(t=(i=(n=r[0])==null?void 0:n.name)==null?void 0:i.value),t},vo=e=>{if(typeof e=="string"){let r;try{const n=Vc(e);r=Wc(n)}catch(n){}return{query:e,operationName:r}}const t=Wc(e);return{query:yo(e),operationName:t}};class Xr extends Error{constructor(t,r){const n=`${Xr.extractMessage(t)}: ${JSON.stringify({response:t,request:r})}`;super(n),Object.setPrototypeOf(this,Xr.prototype),this.response=t,this.request=r,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,Xr)}static extractMessage(t){var r,n,i;return(i=(n=(r=t.errors)==null?void 0:r[0])==null?void 0:n.message)!=null?i:`GraphQL Error (Code: ${t.status})`}}var So=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function fi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var wo={exports:{}};(function(e,t){var r=typeof self!="undefined"?self:So,n=function(){function s(){this.fetch=!1,this.DOMException=r.DOMException}return s.prototype=r,new s}();(function(s){(function(o){var l={searchParams:"URLSearchParams"in s,iterable:"Symbol"in s&&"iterator"in Symbol,blob:"FileReader"in s&&"Blob"in s&&function(){try{return new Blob,!0}catch(Z){return!1}}(),formData:"FormData"in s,arrayBuffer:"ArrayBuffer"in s};function u(Z){return Z&&DataView.prototype.isPrototypeOf(Z)}if(l.arrayBuffer)var a=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],h=ArrayBuffer.isView||function(Z){return Z&&a.indexOf(Object.prototype.toString.call(Z))>-1};function c(Z){if(typeof Z!="string"&&(Z=String(Z)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(Z))throw new TypeError("Invalid character in header field name");return Z.toLowerCase()}function f(Z){return typeof Z!="string"&&(Z=String(Z)),Z}function d(Z){var T={next:function(){var W=Z.shift();return{done:W===void 0,value:W}}};return l.iterable&&(T[Symbol.iterator]=function(){return T}),T}function p(Z){this.map={},Z instanceof p?Z.forEach(function(T,W){this.append(W,T)},this):Array.isArray(Z)?Z.forEach(function(T){this.append(T[0],T[1])},this):Z&&Object.getOwnPropertyNames(Z).forEach(function(T){this.append(T,Z[T])},this)}p.prototype.append=function(Z,T){Z=c(Z),T=f(T);var W=this.map[Z];this.map[Z]=W?W+", "+T:T},p.prototype.delete=function(Z){delete this.map[c(Z)]},p.prototype.get=function(Z){return Z=c(Z),this.has(Z)?this.map[Z]:null},p.prototype.has=function(Z){return this.map.hasOwnProperty(c(Z))},p.prototype.set=function(Z,T){this.map[c(Z)]=f(T)},p.prototype.forEach=function(Z,T){for(var W in this.map)this.map.hasOwnProperty(W)&&Z.call(T,this.map[W],W,this)},p.prototype.keys=function(){var Z=[];return this.forEach(function(T,W){Z.push(W)}),d(Z)},p.prototype.values=function(){var Z=[];return this.forEach(function(T){Z.push(T)}),d(Z)},p.prototype.entries=function(){var Z=[];return this.forEach(function(T,W){Z.push([W,T])}),d(Z)},l.iterable&&(p.prototype[Symbol.iterator]=p.prototype.entries);function m(Z){if(Z.bodyUsed)return Promise.reject(new TypeError("Already read"));Z.bodyUsed=!0}function g(Z){return new Promise(function(T,W){Z.onload=function(){T(Z.result)},Z.onerror=function(){W(Z.error)}})}function v(Z){var T=new FileReader,W=g(T);return T.readAsArrayBuffer(Z),W}function y(Z){var T=new FileReader,W=g(T);return T.readAsText(Z),W}function w(Z){for(var T=new Uint8Array(Z),W=new Array(T.length),k=0;k<T.length;k++)W[k]=String.fromCharCode(T[k]);return W.join("")}function _(Z){if(Z.slice)return Z.slice(0);var T=new Uint8Array(Z.byteLength);return T.set(new Uint8Array(Z)),T.buffer}function S(){return this.bodyUsed=!1,this._initBody=function(Z){this._bodyInit=Z,Z?typeof Z=="string"?this._bodyText=Z:l.blob&&Blob.prototype.isPrototypeOf(Z)?this._bodyBlob=Z:l.formData&&FormData.prototype.isPrototypeOf(Z)?this._bodyFormData=Z:l.searchParams&&URLSearchParams.prototype.isPrototypeOf(Z)?this._bodyText=Z.toString():l.arrayBuffer&&l.blob&&u(Z)?(this._bodyArrayBuffer=_(Z.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):l.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(Z)||h(Z))?this._bodyArrayBuffer=_(Z):this._bodyText=Z=Object.prototype.toString.call(Z):this._bodyText="",this.headers.get("content-type")||(typeof Z=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):l.searchParams&&URLSearchParams.prototype.isPrototypeOf(Z)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},l.blob&&(this.blob=function(){var Z=m(this);if(Z)return Z;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(v)}),this.text=function(){var Z=m(this);if(Z)return Z;if(this._bodyBlob)return y(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(w(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},l.formData&&(this.formData=function(){return this.text().then(E)}),this.json=function(){return this.text().then(JSON.parse)},this}var b=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function R(Z){var T=Z.toUpperCase();return b.indexOf(T)>-1?T:Z}function I(Z,T){T=T||{};var W=T.body;if(Z instanceof I){if(Z.bodyUsed)throw new TypeError("Already read");this.url=Z.url,this.credentials=Z.credentials,T.headers||(this.headers=new p(Z.headers)),this.method=Z.method,this.mode=Z.mode,this.signal=Z.signal,!W&&Z._bodyInit!=null&&(W=Z._bodyInit,Z.bodyUsed=!0)}else this.url=String(Z);if(this.credentials=T.credentials||this.credentials||"same-origin",(T.headers||!this.headers)&&(this.headers=new p(T.headers)),this.method=R(T.method||this.method||"GET"),this.mode=T.mode||this.mode||null,this.signal=T.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&W)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(W)}I.prototype.clone=function(){return new I(this,{body:this._bodyInit})};function E(Z){var T=new FormData;return Z.trim().split("&").forEach(function(W){if(W){var k=W.split("="),M=k.shift().replace(/\+/g," "),P=k.join("=").replace(/\+/g," ");T.append(decodeURIComponent(M),decodeURIComponent(P))}}),T}function C(Z){var T=new p,W=Z.replace(/\r?\n[\t ]+/g," ");return W.split(/\r?\n/).forEach(function(k){var M=k.split(":"),P=M.shift().trim();if(P){var U=M.join(":").trim();T.append(P,U)}}),T}S.call(I.prototype);function N(Z,T){T||(T={}),this.type="default",this.status=T.status===void 0?200:T.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in T?T.statusText:"OK",this.headers=new p(T.headers),this.url=T.url||"",this._initBody(Z)}S.call(N.prototype),N.prototype.clone=function(){return new N(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new p(this.headers),url:this.url})},N.error=function(){var Z=new N(null,{status:0,statusText:""});return Z.type="error",Z};var G=[301,302,303,307,308];N.redirect=function(Z,T){if(G.indexOf(T)===-1)throw new RangeError("Invalid status code");return new N(null,{status:T,headers:{location:Z}})},o.DOMException=s.DOMException;try{new o.DOMException}catch(Z){o.DOMException=function(T,W){this.message=T,this.name=W;var k=Error(T);this.stack=k.stack},o.DOMException.prototype=Object.create(Error.prototype),o.DOMException.prototype.constructor=o.DOMException}function $(Z,T){return new Promise(function(W,k){var M=new I(Z,T);if(M.signal&&M.signal.aborted)return k(new o.DOMException("Aborted","AbortError"));var P=new XMLHttpRequest;function U(){P.abort()}P.onload=function(){var Q={status:P.status,statusText:P.statusText,headers:C(P.getAllResponseHeaders()||"")};Q.url="responseURL"in P?P.responseURL:Q.headers.get("X-Request-URL");var me="response"in P?P.response:P.responseText;W(new N(me,Q))},P.onerror=function(){k(new TypeError("Network request failed"))},P.ontimeout=function(){k(new TypeError("Network request failed"))},P.onabort=function(){k(new o.DOMException("Aborted","AbortError"))},P.open(M.method,M.url,!0),M.credentials==="include"?P.withCredentials=!0:M.credentials==="omit"&&(P.withCredentials=!1),"responseType"in P&&l.blob&&(P.responseType="blob"),M.headers.forEach(function(Q,me){P.setRequestHeader(me,Q)}),M.signal&&(M.signal.addEventListener("abort",U),P.onreadystatechange=function(){P.readyState===4&&M.signal.removeEventListener("abort",U)}),P.send(typeof M._bodyInit=="undefined"?null:M._bodyInit)})}return $.polyfill=!0,s.fetch||(s.fetch=$,s.Headers=p,s.Request=I,s.Response=N),o.Headers=p,o.Request=I,o.Response=N,o.fetch=$,Object.defineProperty(o,"__esModule",{value:!0}),o})({})})(n),n.fetch.ponyfill=!0,delete n.fetch.polyfill;var i=n;t=i.fetch,t.default=i.fetch,t.fetch=i.fetch,t.Headers=i.Headers,t.Request=i.Request,t.Response=i.Response,e.exports=t})(wo,wo.exports);var Ro=wo.exports;const pi=fi(Ro),Yb=Object.freeze(Object.defineProperty({__proto__:null,default:pi},Symbol.toStringTag,{value:"Module"})),Wr=e=>{let t={};return e&&(typeof Headers!="undefined"&&e instanceof Headers||Yb&&Ro.Headers&&e instanceof Ro.Headers?t=Db(e):Array.isArray(e)?e.forEach(([r,n])=>{r&&n!==void 0&&(t[r]=n)}):t=e),t},Pc=e=>e.replace(/([\s,]|#[^\n\r]+)+/g," ").trim(),Bb=e=>{if(!Array.isArray(e.query)){const n=e,i=[`query=${encodeURIComponent(Pc(n.query))}`];return e.variables&&i.push(`variables=${encodeURIComponent(n.jsonSerializer.stringify(n.variables))}`),n.operationName&&i.push(`operationName=${encodeURIComponent(n.operationName)}`),i.join("&")}if(typeof e.variables!="undefined"&&!Array.isArray(e.variables))throw new Error("Cannot create query with given variable type, array expected");const t=e,r=e.query.reduce((n,i,s)=>(n.push({query:Pc(i),variables:t.variables?t.jsonSerializer.stringify(t.variables[s]):void 0}),n),[]);return`query=${encodeURIComponent(t.jsonSerializer.stringify(r))}`},zb=e=>t=>q(this,null,function*(){var m;const{url:r,query:n,variables:i,operationName:s,fetch:o,fetchOptions:l,middleware:u}=t,a=x({},t.headers);let h="",c;e==="POST"?(c=Kb(n,i,s,l.jsonSerializer),typeof c=="string"&&(a["Content-Type"]="application/json")):h=Bb({query:n,variables:i,operationName:s,jsonSerializer:(m=l.jsonSerializer)!=null?m:bo});const f=x({method:e,headers:a,body:c},l);let d=r,p=f;if(u){const g=yield Promise.resolve(u(B(x({},f),{url:r,operationName:s,variables:i}))),{url:y}=g,w=nt(g,["url"]);d=y,p=w}return h&&(d=`${d}?${h}`),yield o(d,p)});class _o{constructor(t,r={}){this.url=t,this.requestConfig=r,this.rawRequest=(...n)=>q(this,null,function*(){const[i,s,o]=n,l=Jb(i,s,o),g=this.requestConfig,{headers:u,fetch:a=pi,method:h="POST",requestMiddleware:c,responseMiddleware:f}=g,d=nt(g,["headers","fetch","method","requestMiddleware","responseMiddleware"]),{url:p}=this;l.signal!==void 0&&(d.signal=l.signal);const{operationName:m}=vo(l.query);return To({url:p,query:l.query,variables:l.variables,headers:x(x({},Wr(Eo(u))),Wr(l.requestHeaders)),operationName:m,fetch:a,method:h,fetchOptions:d,middleware:c}).then(v=>(f&&f(v),v)).catch(v=>{throw f&&f(v),v})})}request(t,...r){return q(this,null,function*(){const[n,i]=r,s=Fb(t,n,i),m=this.requestConfig,{headers:o,fetch:l=pi,method:u="POST",requestMiddleware:a,responseMiddleware:h}=m,c=nt(m,["headers","fetch","method","requestMiddleware","responseMiddleware"]),{url:f}=this;s.signal!==void 0&&(c.signal=s.signal);const{query:d,operationName:p}=vo(s.document);return To({url:f,query:d,variables:s.variables,headers:x(x({},Wr(Eo(o))),Wr(s.requestHeaders)),operationName:p,fetch:l,method:u,fetchOptions:c,middleware:a}).then(g=>(h&&h(g),g.data)).catch(g=>{throw h&&h(g),g})})}batchRequests(t,r){var a;const n=Hb(t,r),u=this.requestConfig,{headers:i}=u,s=nt(u,["headers"]);n.signal!==void 0&&(s.signal=n.signal);const o=n.documents.map(({document:h})=>vo(h).query),l=n.documents.map(({variables:h})=>h);return To({url:this.url,query:o,variables:l,headers:x(x({},Wr(Eo(i))),Wr(n.requestHeaders)),operationName:void 0,fetch:(a=this.requestConfig.fetch)!=null?a:pi,method:this.requestConfig.method||"POST",fetchOptions:s,middleware:this.requestConfig.requestMiddleware}).then(h=>(this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(h),h.data)).catch(h=>{throw this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(h),h})}setHeaders(t){return this.requestConfig.headers=t,this}setHeader(t,r){const{headers:n}=this.requestConfig;return n?n[t]=r:this.requestConfig.headers={[t]:r},this}setEndpoint(t){return this.url=t,this}}const To=e=>q(this,null,function*(){var h,c;const{query:t,variables:r,fetchOptions:n}=e,i=zb(Ub((h=e.method)!=null?h:"post")),s=Array.isArray(e.query),o=yield i(e),l=yield jb(o,(c=n.jsonSerializer)!=null?c:bo),u=Array.isArray(l)?!l.some(({data:d})=>!d):!!l.data,a=Array.isArray(l)||!l.errors||Array.isArray(l.errors)&&!l.errors.length||n.errorPolicy==="all"||n.errorPolicy==="ignore";if(o.ok&&a&&u){const f=(Array.isArray(l),l),{errors:d}=f,p=nt(f,["errors"]),m=n.errorPolicy==="ignore"?p:l;return B(x({},s?{data:m}:m),{headers:o.headers,status:o.status})}else{const d=typeof l=="string"?{error:l}:l;throw new Xr(B(x({},d),{status:o.status,headers:o.headers}),{query:t,variables:r})}}),Kb=(e,t,r,n)=>{const i=n!=null?n:bo;if(!Array.isArray(e))return i.stringify({query:e,variables:t,operationName:r});if(typeof t!="undefined"&&!Array.isArray(t))throw new Error("Cannot create request body with given variable type, array expected");const s=e.reduce((o,l,u)=>(o.push({query:l,variables:t?t[u]:void 0}),o),[]);return i.stringify(s)},jb=(e,t)=>q(this,null,function*(){let r;return e.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"))?t.parse(yield e.text()):e.text()}),Eo=e=>typeof e=="function"?e():e;var Io={exports:{}};(function(e,t){t=e.exports=r,t.getSerialize=n;function r(i,s,o,l){return JSON.stringify(i,n(s,l),o)}function n(i,s){var o=[],l=[];return s==null&&(s=function(u,a){return o[0]===a?"[Circular ~]":"[Circular ~."+l.slice(0,o.indexOf(a)).join(".")+"]"}),function(u,a){if(o.length>0){var h=o.indexOf(this);~h?o.splice(h+1):o.push(this),~h?l.splice(h,1/0,u):l.push(u),~o.indexOf(a)&&(a=s.call(this,u,a))}else o.push(a);return i==null?a:i.call(this,u,a)}}})(Io,Io.exports);var Qb=Io.exports;const Rt=fi(Qb);var $b=Object.defineProperty,qb=(e,t,r)=>t in e?$b(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,X=(e,t,r)=>qb(e,typeof t!="symbol"?t+"":t,r),Mc,ev=Object.defineProperty,tv=(e,t,r)=>t in e?ev(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ac=(e,t,r)=>tv(e,typeof t!="symbol"?t+"":t,r),ke=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(ke||{});const mi=new Map,Uc=new WeakSet;function Dc(e){return e!==null&&typeof e=="object"&&"complete"in e&&"naturalWidth"in e&&"naturalHeight"in e&&"src"in e&&"onload"in e}function rv(e){if(Uc.has(e))return;Uc.add(e);const t=e.drawImage.bind(e);e.drawImage=function(r,...n){const i=mi.get(e);i&&(i.cancelled=!0);const s=()=>{n.length===2&&Dc(r)&&n.push(r.naturalWidth||r.width,r.naturalHeight||r.height),t(r,...n)};if(Dc(r)&&!r.complete){const o={cancelled:!1};mi.set(e,o);const l=()=>{o.cancelled||(mi.delete(e),s())},u=()=>{if(!o.cancelled){mi.delete(e);try{s()}catch(a){}}};r.onload=l,r.onerror=u}else s()}}const Fc={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Jc={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},gi={},Hc={},nv=()=>!!globalThis.Zone;function Co(e){if(gi[e])return gi[e];const t=globalThis[e],r=t.prototype,n=e in Fc?Fc[e]:void 0,i=!!(n&&n.every(l=>{var u,a;return!!((a=(u=Object.getOwnPropertyDescriptor(r,l))==null?void 0:u.get)!=null&&a.toString().includes("[native code]"))})),s=e in Jc?Jc[e]:void 0,o=!!(s&&s.every(l=>{var u;return typeof r[l]=="function"&&((u=r[l])==null?void 0:u.toString().includes("[native code]"))}));if(i&&o&&!nv())return gi[e]=t.prototype,t.prototype;try{const l=document.createElement("iframe");l.style.display="none",document.body.appendChild(l);const u=l.contentWindow;if(!u)return t.prototype;const a=u[e].prototype;if(!a)return l.remove(),r;const h=navigator.userAgent;return h.includes("Safari")&&!h.includes("Chrome")?(l.classList.add("rr-block"),l.setAttribute("__rrwebUntaintedMutationObserver",""),Hc[e]=()=>l.remove()):l.remove(),gi[e]=a}catch(l){return r}}const Zo={};function kt(e,t,r){var n;const i=`${e}.${String(r)}`;if(Zo[i])return Zo[i].call(t);const s=Co(e),o=(n=Object.getOwnPropertyDescriptor(s,r))==null?void 0:n.get;return o?(Zo[i]=o,o.call(t)):t[r]}const Lo={};function Yc(e,t,r){const n=`${e}.${String(r)}`;if(Lo[n])return Lo[n].bind(t);const s=Co(e)[r];return typeof s!="function"?t[r]:(Lo[n]=s,s.bind(t))}function iv(e){return kt("Node",e,"ownerDocument")}function sv(e){return kt("Node",e,"childNodes")}function ov(e){return kt("Node",e,"parentNode")}function av(e){return kt("Node",e,"parentElement")}function lv(e){return kt("Node",e,"textContent")}function uv(e,t){return Yc("Node",e,"contains")(t)}function cv(e){return Yc("Node",e,"getRootNode")()}function dv(e){return!e||!("host"in e)?null:kt("ShadowRoot",e,"host")}function hv(e){return e.styleSheets}function fv(e){return!e||!("shadowRoot"in e)?null:kt("Element",e,"shadowRoot")}function pv(e,t){return kt("Element",e,"querySelector")(t)}function mv(e,t){return kt("Element",e,"querySelectorAll")(t)}function gv(){var e;return[Co("MutationObserver").constructor,(e=Hc.MutationObserver)!=null?e:()=>{}]}let Bc=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(Bc=()=>new Date().getTime());function yv(e,t,r){try{if(!(t in e))return()=>{};const n=e[t],i=r(n);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:n}})),e[t]=i,()=>{e[t]=n}}catch(n){return()=>{}}}const Fe={ownerDocument:iv,childNodes:sv,parentNode:ov,parentElement:av,textContent:lv,contains:uv,getRootNode:cv,host:dv,styleSheets:hv,shadowRoot:fv,querySelector:pv,querySelectorAll:mv,nowTimestamp:Bc,mutationObserverCtor:gv,patch:yv,wrapCanvasContextDrawImage:rv};function zc(e){return e.nodeType===e.ELEMENT_NODE}function pn(e){const t=e&&"host"in e&&"mode"in e&&Fe.host(e)||null;return!!(t&&"shadowRoot"in t&&Fe.shadowRoot(t)===e)}function mn(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function bv(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),e}function vv(e){const{cssText:t}=e;if(t.split('"').length<3)return t;const r=["@import",`url(${JSON.stringify(e.href)})`];return e.layerName===""?r.push("layer"):e.layerName&&r.push(`layer(${e.layerName})`),e.supportsText&&r.push(`supports(${e.supportsText})`),e.media.length&&r.push(e.media.mediaText),r.join(" ")+";"}function xo(e){try{const t=e.rules||e.cssRules;if(!t)return null;let r=e.href;!r&&e.ownerNode&&(r=e.ownerNode.baseURI);const n=Array.from(t,i=>Kc(i,r)).join("");return bv(n)}catch(t){return null}}function Kc(e,t){if(jc(e)){let r;try{r=xo(e.styleSheet)||vv(e)}catch(n){r=e.cssText}return e.styleSheet.href?vi(r,e.styleSheet.href):r}else{let r=e.cssText;return wv(e)&&e.selectorText.includes(":")&&(r=Sv(r)),t?vi(r,t):r}}function Sv(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function jc(e){return"styleSheet"in e}function wv(e){return"selectorText"in e}class Qc{constructor(){Ac(this,"idNodeMap",new Map),Ac(this,"nodeMetaMap",new WeakMap)}getId(t){var r;if(!t)return-1;const n=(r=this.getMeta(t))==null?void 0:r.id;return n!=null?n:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const r=this.getId(t);this.idNodeMap.delete(r),t.childNodes&&t.childNodes.forEach(n=>this.removeNodeFromMap(n))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,r){const n=r.id;this.idNodeMap.set(n,t),this.nodeMetaMap.set(t,r)}replace(t,r){const n=this.getNode(t);if(n){const i=this.nodeMetaMap.get(n);i&&this.nodeMetaMap.set(r,i)}this.idNodeMap.set(t,r)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function Rv(){return new Qc}function yi({element:e,maskInputOptions:t,tagName:r,type:n,value:i,overwriteRecord:s,maskInputFn:o}){let l=i||"";return td({maskInputOptions:t,tagName:r,type:n,overwriteRecord:s})&&(o?l=o(l,e):l="*".repeat(l.length)),l}function hr(e){return e.toLowerCase()}const $c="__rrweb_original__";function _v(e){const t=e.getContext("2d");if(!t)return!0;const r=50;for(let n=0;n<e.width;n+=r)for(let i=0;i<e.height;i+=r){const s=t.getImageData,o=$c in s?s[$c]:s;if(new Uint32Array(o.call(t,n,i,Math.min(r,e.width-n),Math.min(r,e.height-i)).data.buffer).some(u=>u!==0))return!1}return!0}function bi(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?hr(t):null}function qc(e,t){var s;let r;try{r=new URL(e,window.location.href)}catch(o){return null}const n=/\.([0-9a-z]+)(?:$)/i,i=r.pathname.match(n);return(s=i==null?void 0:i[1])!=null?s:null}function Tv(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}const Ev=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Iv=/^(?:[a-z+]+:)?\/\//i,Cv=/^www\..*/i,Zv=/^(data:)([^,]*),(.*)/i;function vi(e,t){return(e||"").replace(Ev,(r,n,i,s,o,l)=>{const u=i||o||l,a=n||s||"";if(!u)return r;if(Iv.test(u)||Cv.test(u))return`url(${a}${u}${a})`;if(Zv.test(u))return`url(${a}${u}${a})`;if(u[0]==="/")return`url(${a}${Tv(t)+u}${a})`;const h=u.split("#")[0],c=u.substring(h.length),f=t.split("#")[0].split("/"),d=h.split("/");f.pop();for(const p of d)p!=="."&&(p===".."?f.pop():f.push(p));return`url(${a}${f.join("/")}${c}${a})`})}function Si(e,t=!1){return t?e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function Lv(e,t,r=!1){const n=Array.from(t.childNodes),i=[];let s=0;if(n.length>1&&e&&typeof e=="string"){let o=Si(e,r);const l=o.length/e.length;for(let u=1;u<n.length;u++)if(n[u].textContent&&typeof n[u].textContent=="string"){const a=Si(n[u].textContent,r),h=100;let c=3;for(;c<a.length&&(a[c].match(/[a-zA-Z0-9]/)||a.indexOf(a.substring(0,c),1)!==-1);c++);for(;c<a.length;c++){let f=a.substring(0,c),d=o.split(f),p=-1;if(d.length===2)p=d[0].length;else if(d.length>2&&d[0]===""&&n[u-1].textContent!=="")p=o.indexOf(f,1);else if(d.length===1){if(f=f.substring(0,f.length-1),d=o.split(f),d.length<=1)return i.push(e),i;c=h+1}else c===a.length-1&&(p=o.indexOf(f));if(d.length>=2&&c>h){const m=n[u-1].textContent;if(m&&typeof m=="string"){const g=Si(m).length;p=o.indexOf(f,g)}p===-1&&(p=d[0].length)}if(p!==-1){let m=Math.floor(p/l);for(;m>0&&m<e.length;){if(s+=1,s>50*n.length)return i.push(e),i;const g=Si(e.substring(0,m),r);if(g.length===p){i.push(e.substring(0,m)),e=e.substring(m),o=o.substring(p);break}else g.length<p?m+=Math.max(1,Math.floor((p-g.length)/l)):m-=Math.max(1,Math.floor((g.length-p)*l))}break}}}}return i.push(e),i}function xv(e,t){return Lv(e,t).join("/* rr_split */")}function No(e){return e=e.replace(/[^ -~]+/g,""),e=(e==null?void 0:e.split(" ").map(t=>t?Math.random().toString(20).substring(2,t.length+2):"").join(" "))||"",e}function Oo(e){return e==="img"||e==="video"||e==="audio"||e==="source"}const Nv=new RegExp(/[a-zA-Z0-9.!#$%&'*+=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:.[a-zA-Z0-9-]+)*/),Ov=new RegExp(/[0-9]{9,16}/),Gv=new RegExp(/[0-9]{3}-?[0-9]{2}-?[0-9]{4}/),Vv=new RegExp(/[+]?[(]?[0-9]{3}[)]?[-\s.]?[0-9]{3}[-\s.]?[0-9]{4,6}/),kv=new RegExp(/[0-9]{4}-?[0-9]{4}-?[0-9]{4}-?[0-9]{4}/),Xv=new RegExp(/[0-9]{1,5}.?[0-9]{0,3}\s[a-zA-Z]{2,30}\s[a-zA-Z]{2,15}/),Wv=new RegExp(/(?:[0-9]{1,3}.){3}[0-9]{1,3}/),Pv=[Nv,Ov,Gv,Vv,kv,Xv,Wv];function ed(e){return e?Pv.some(t=>t.test(e)):!1}const td=({maskInputOptions:e,tagName:t,type:r,overwriteRecord:n})=>{const i=r&&r.toLowerCase();return n!=="true"&&(!!e[t.toLowerCase()]||!!(i&&e[i]))};let Mv=1;const Av=new RegExp("[^a-z0-9-_:]"),gn=-2;function rd(){return Mv++}function Uv(e){if(e instanceof HTMLFormElement)return"form";const t=hr(e.tagName);return Av.test(t)?"div":t}let Pr,nd;const Dv=/^[^ \t\n\r\u000c]+/,Fv=/^[, \t\n\r\u000c]+/;function Jv(e,t){if(t.trim()==="")return t;let r=0;function n(s){let o;const l=s.exec(t.substring(r));return l?(o=l[0],r+=o.length,o):""}const i=[];for(;n(Fv),!(r>=t.length);){let s=n(Dv);if(s.slice(-1)===",")s=Mr(e,s.substring(0,s.length-1)),i.push(s);else{let o="";s=Mr(e,s);let l=!1;for(;;){const u=t.charAt(r);if(u===""){i.push((s+o).trim());break}else if(l)u===")"&&(l=!1);else if(u===","){r+=1,i.push((s+o).trim());break}else u==="("&&(l=!0);o+=u,r+=1}}}return i.join(", ")}const id=new WeakMap;function Mr(e,t){return!t||t.trim()===""?t:Go(e,t)}function Hv(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function Go(e,t){let r=id.get(e);if(r||(r=e.createElement("a"),id.set(e,r)),!t)t="";else if(t.startsWith("blob:")||t.startsWith("data:"))return t;return r.setAttribute("href",t),r.href}function sd(e,t,r,n){return n&&(r==="src"||r==="href"&&!(t==="use"&&n[0]==="#")||r==="xlink:href"&&n[0]!=="#"||r==="background"&&["table","td","th"].includes(t)?Mr(e,n):r==="srcset"?Jv(e,n):r==="style"?vi(n,Go(e)):t==="object"&&r==="data"?Mr(e,n):n)}function od(e,t,r){return["video","audio"].includes(e)&&t==="autoplay"}function ad(e,t,r){try{if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(let n=e.classList.length;n--;){const i=e.classList[n];if(t.test(i))return!0}if(r)return e.matches(r)}catch(n){}return!1}function wi(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return r?wi(Fe.parentNode(e),t,r):!1;for(let n=e.classList.length;n--;){const i=e.classList[n];if(t.test(i))return!0}return r?wi(Fe.parentNode(e),t,r):!1}function ld(e,t,r,n){let i;if(zc(e)){if(i=e,!Fe.childNodes(i).length)return!1}else{if(Fe.parentElement(e)===null)return!1;i=Fe.parentElement(e)}try{if(typeof t=="string"){if(n){if(i.closest(`.${t}`))return!0}else if(i.classList.contains(t))return!0}else if(wi(i,t,n))return!0;if(r){if(n){if(i.closest(r))return!0}else if(i.matches(r))return!0}}catch(s){}return!1}function Yv(e,t,r){const n=e.contentWindow;if(!n)return;let i=!1,s;try{s=n.document.readyState}catch(l){return}if(s!=="complete"){const l=setTimeout(()=>{i||(t(),i=!0)},r);e.addEventListener("load",()=>{clearTimeout(l),i=!0,t()});return}const o="about:blank";if(n.location.href!==o||e.src===o||e.src==="")return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function Bv(e,t,r){let n=!1,i;try{i=e.sheet}catch(o){return}if(i)return;const s=setTimeout(()=>{n||(t(),n=!0)},r);e.addEventListener("load",()=>{clearTimeout(s),n=!0,t()})}function zv(e,t){const{doc:r,mirror:n,blockClass:i,blockSelector:s,needsMask:o,inlineStylesheet:l,maskInputOptions:u={},maskTextClass:a,maskTextFn:h,maskInputFn:c,dataURLOptions:f={},inlineImages:d,inlineVideos:p,recordCanvas:m,keepIframeSrcFn:g,newlyAddedElement:v=!1,cssCaptured:y=!1,privacySetting:w}=t,_=Kv(r,n);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:ke.Document,childNodes:[],compatMode:e.compatMode}:{type:ke.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:ke.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:_};case e.ELEMENT_NODE:return Qv(e,{doc:r,blockClass:i,blockSelector:s,inlineStylesheet:l,maskInputOptions:u,maskInputFn:c,maskTextClass:a,dataURLOptions:f,inlineImages:d,inlineVideos:p,recordCanvas:m,keepIframeSrcFn:g,newlyAddedElement:v,privacySetting:w,rootId:_});case e.TEXT_NODE:return jv(e,{doc:r,needsMask:o,maskTextFn:h,privacySetting:w,rootId:_,cssCaptured:y});case e.CDATA_SECTION_NODE:return{type:ke.CDATA,textContent:"",rootId:_};case e.COMMENT_NODE:return{type:ke.Comment,textContent:Fe.textContent(e)||"",rootId:_};default:return!1}}function Kv(e,t){if(!t.hasNode(e))return;const r=t.getId(e);return r===1?void 0:r}function jv(e,t){var r;const{needsMask:n,maskTextFn:i,privacySetting:s,rootId:o,cssCaptured:l}=t,u=Fe.parentNode(e),a=u&&u.tagName;let h="";const c=a==="STYLE"?!0:void 0,f=a==="SCRIPT"?!0:void 0;f?h="SCRIPT_PLACEHOLDER":l||(h=Fe.textContent(e),c&&h&&(h=vi(h,Go(t.doc)))),!c&&!f&&h&&n&&(h=i?i(h,Fe.parentElement(e)):h.replace(/[\S]/g,"*"));const d=s==="strict",p=(r=e.parentElement)==null?void 0:r.getAttribute("data-hl-record"),m=s==="default"&&ed(h);return(d||m)&&!p&&a&&!new Set(["HEAD","TITLE","STYLE","SCRIPT","HTML","BODY","NOSCRIPT"]).has(a)&&h&&(h=No(h)),{type:ke.Text,textContent:h||"",rootId:o}}function Qv(e,t){const{doc:r,blockClass:n,blockSelector:i,inlineStylesheet:s,maskInputOptions:o={},maskInputFn:l,maskTextClass:u,dataURLOptions:a={},inlineImages:h,inlineVideos:c,recordCanvas:f,keepIframeSrcFn:d,newlyAddedElement:p=!1,privacySetting:m,rootId:g}=t;let v=ad(e,n,i);const y=ad(e,u,null),w=m==="strict";let _=Uv(e),S={};const b=e.attributes.length;for(let E=0;E<b;E++){const C=e.attributes[E];od(_,C.name)||(S[C.name]=sd(r,_,hr(C.name),C.value))}if(_==="link"&&s){const E=Array.from(r.styleSheets).find(N=>N.href===e.href);let C=null;E&&(C=xo(E)),C&&(delete S.rel,delete S.href,S._cssText=C)}if(_==="style"&&e.sheet){let E=xo(e.sheet);E&&(e.childNodes.length>1&&(E=xv(E,e)),S._cssText=E)}if(["input","textarea","select"].includes(_)){const E=e.value,C=e.checked;S.type!=="radio"&&S.type!=="checkbox"&&S.type!=="submit"&&S.type!=="button"&&E?S.value=yi({element:e,type:bi(e),tagName:_,value:E,overwriteRecord:e.getAttribute("data-hl-record"),maskInputOptions:o,maskInputFn:l}):C&&(S.checked=C)}if(_==="option"&&(e.selected&&!o.select?S.selected=!0:delete S.selected),_==="dialog"&&e.open&&(S.rr_open_mode=e.matches("dialog:modal")?"modal":"non-modal"),_==="canvas"&&f){if(e.__context==="2d")_v(e);else if(!("__context"in e)){const E=e.toDataURL(a.type,a.quality),C=r.createElement("canvas");C.width=e.width,C.height=e.height;const N=C.toDataURL(a.type,a.quality);E!==N&&(S.rr_dataURL=E)}}if(_==="img"&&h&&!v&&!y&&!w){Pr||(Pr=r.createElement("canvas"),nd=Pr.getContext("2d"));const E=e,C=E.currentSrc||E.getAttribute("src")||"<unknown-src>",N=E.crossOrigin,G=()=>{E.removeEventListener("load",G);try{Pr.width=E.naturalWidth,Pr.height=E.naturalHeight,nd.drawImage(E,0,0),S.rr_dataURL=Pr.toDataURL(a.type,a.quality)}catch($){if(E.crossOrigin!=="anonymous"){E.crossOrigin="anonymous",E.complete&&E.naturalWidth!==0?G():E.addEventListener("load",G);return}else console.warn(`Cannot inline img src=${C}! Error: ${$}`)}E.crossOrigin==="anonymous"&&(N?S.crossOrigin=N:E.removeAttribute("crossorigin"))};E.complete&&E.naturalWidth!==0?G():E.addEventListener("load",G)}if(["audio","video"].includes(_)){const E=S;E.rr_mediaState=e.paused?"paused":"played",E.rr_mediaCurrentTime=e.currentTime,E.rr_mediaPlaybackRate=e.playbackRate,E.rr_mediaMuted=e.muted,E.rr_mediaLoop=e.loop,E.rr_mediaVolume=e.volume}if(p||(e.scrollLeft&&(S.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(S.rr_scrollTop=e.scrollTop)),v||y||w&&Oo(_)){const{width:E,height:C}=e.getBoundingClientRect();S={class:S.class,rr_width:`${E}px`,rr_height:`${C}px`}}w&&Oo(_)&&(v=!0),_==="iframe"&&!d(S.src)&&(e.contentDocument||(S.rr_src=S.src),delete S.src);let R;try{customElements.get(_)&&(R=!0)}catch(E){}const I=E=>{const{width:C,height:N}=E.getBoundingClientRect();S={width:C,height:N,rr_width:`${C}px`,rr_height:`${N}px`,rr_inlined_video:!0,class:S.class,style:S.style},_="canvas";const G=r.createElement("canvas");G.width=e.width,G.height=e.height,S.rr_dataURL=G.toDataURL(a.type,a.quality)};if(_==="video"){const E=e;h&&(E.src===""||E.src.indexOf("blob:")!==-1)&&I(E),c&&E.src!==""&&E.src.indexOf("blob:")===-1&&I(E)}return{type:ke.Element,tagName:_,attributes:S,childNodes:[],isSVG:Hv(e)||void 0,needBlock:v,needMask:y,rootId:g,isCustom:R}}function Re(e){return e==null?"":e.toLowerCase()}function ud(e){return e===!0||e==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:e==="all",headMetaDescKeywords:e==="all",headTitleMutations:e==="all"}:e||{}}function $v(e,t){if(t.comment&&e.type===ke.Comment)return!0;if(e.type===ke.Element){if(t.script&&(e.tagName==="script"||e.tagName==="link"&&(e.attributes.rel==="preload"&&e.attributes.as==="script"||e.attributes.rel==="modulepreload")||e.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&qc(e.attributes.href)==="js"))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(Re(e.attributes.name).match(/^msapplication-tile(image|color)$/)||Re(e.attributes.name)==="application-name"||Re(e.attributes.rel)==="icon"||Re(e.attributes.rel)==="apple-touch-icon"||Re(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&Re(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(Re(e.attributes.property).match(/^(og|twitter|fb):/)||Re(e.attributes.name).match(/^(og|twitter):/)||Re(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(Re(e.attributes.name)==="robots"||Re(e.attributes.name)==="googlebot"||Re(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(Re(e.attributes.name)==="author"||Re(e.attributes.name)==="generator"||Re(e.attributes.name)==="framework"||Re(e.attributes.name)==="publisher"||Re(e.attributes.name)==="progid"||Re(e.attributes.property).match(/^article:/)||Re(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(Re(e.attributes.name)==="google-site-verification"||Re(e.attributes.name)==="yandex-verification"||Re(e.attributes.name)==="csrf-token"||Re(e.attributes.name)==="p:domain_verify"||Re(e.attributes.name)==="verify-v1"||Re(e.attributes.name)==="verification"||Re(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Ar(e,t){const{doc:r,mirror:n,blockClass:i,blockSelector:s,maskTextClass:o,maskTextSelector:l,skipChild:u=!1,inlineStylesheet:a=!0,maskInputOptions:h={},maskTextFn:c,maskInputFn:f,slimDOMOptions:d,dataURLOptions:p={},inlineImages:m=!1,inlineVideos:g=!1,recordCanvas:v=!1,onSerialize:y,onIframeLoad:w,iframeLoadTimeout:_=5e3,onStylesheetLoad:S,stylesheetLoadTimeout:b=5e3,keepIframeSrcFn:R=()=>!1,newlyAddedElement:I=!1,cssCaptured:E=!1,privacySetting:C}=t;let{needsMask:N}=t,{preserveWhiteSpace:G=!0}=t;N||(N=ld(e,o,l,N===void 0));const $=zv(e,{doc:r,mirror:n,blockClass:i,blockSelector:s,needsMask:N,inlineStylesheet:a,maskInputOptions:h,maskTextClass:o,maskTextFn:c,maskInputFn:f,dataURLOptions:p,inlineImages:m,inlineVideos:g,recordCanvas:v,keepIframeSrcFn:R,newlyAddedElement:I,cssCaptured:E,privacySetting:C});if(!$)return console.warn(e,"not serialized"),null;let Z;n.hasNode(e)?Z=n.getId(e):$v($,d)||!G&&$.type===ke.Text&&!$.textContent.replace(/^\s+|\s+$/gm,"").length?Z=gn:Z=rd();const T=Object.assign($,{id:Z});if(n.add(e,T),Z===gn)return null;y&&y(e);let W=!u,k=C,M=C==="strict";if(T.type===ke.Element){if(W=W&&!T.needBlock,M||(M=!!T.needBlock||!!T.needMask),k=M?"strict":k,M&&Oo(T.tagName)){const Q=e.cloneNode();Q.src="",n.add(Q,T)}delete T.needBlock,delete T.needMask;const U=Fe.shadowRoot(e);U&&mn(U)&&(T.isShadowHost=!0)}if((T.type===ke.Document||T.type===ke.Element)&&W){d.headWhitespace&&T.type===ke.Element&&T.tagName==="head"&&(G=!1);const U={doc:r,mirror:n,blockClass:i,blockSelector:s,needsMask:N,maskTextClass:o,maskTextSelector:l,skipChild:u,inlineStylesheet:a,maskInputOptions:h,maskTextFn:c,maskInputFn:f,slimDOMOptions:d,dataURLOptions:p,inlineImages:m,inlineVideos:g,recordCanvas:v,preserveWhiteSpace:G,onSerialize:y,onIframeLoad:w,iframeLoadTimeout:_,onStylesheetLoad:S,stylesheetLoadTimeout:b,keepIframeSrcFn:R,cssCaptured:!1,privacySetting:k};if(!(T.type===ke.Element&&T.tagName==="textarea"&&T.attributes.value!==void 0)){T.type===ke.Element&&T.attributes._cssText!==void 0&&typeof T.attributes._cssText=="string"&&(U.cssCaptured=!0);for(const me of Array.from(Fe.childNodes(e))){const O=Ar(me,U);O&&T.childNodes.push(O)}}let Q=null;if(zc(e)&&(Q=Fe.shadowRoot(e)))for(const me of Array.from(Fe.childNodes(Q))){const O=Ar(me,U);O&&(mn(Q)&&(O.isShadow=!0),T.childNodes.push(O))}}const P=Fe.parentNode(e);return P&&pn(P)&&mn(P)&&(T.isShadow=!0),T.type===ke.Element&&T.tagName==="iframe"&&Yv(e,()=>{const U=e.contentDocument;if(U&&w){const Q=Ar(U,{doc:U,mirror:n,blockClass:i,blockSelector:s,needsMask:N,maskTextClass:o,maskTextSelector:l,skipChild:!1,inlineStylesheet:a,maskInputOptions:h,maskTextFn:c,maskInputFn:f,slimDOMOptions:d,dataURLOptions:p,inlineImages:m,inlineVideos:g,recordCanvas:v,preserveWhiteSpace:G,onSerialize:y,onIframeLoad:w,iframeLoadTimeout:_,onStylesheetLoad:S,stylesheetLoadTimeout:b,keepIframeSrcFn:R,privacySetting:C});Q&&w(e,Q)}},_),T.type===ke.Element&&T.tagName==="link"&&typeof T.attributes.rel=="string"&&(T.attributes.rel==="stylesheet"||T.attributes.rel==="preload"&&typeof T.attributes.href=="string"&&qc(T.attributes.href)==="css")&&Bv(e,()=>{if(S){const U=Ar(e,{doc:r,mirror:n,blockClass:i,blockSelector:s,needsMask:N,maskTextClass:o,maskTextSelector:l,skipChild:!1,inlineStylesheet:a,maskInputOptions:h,maskTextFn:c,maskInputFn:f,slimDOMOptions:d,dataURLOptions:p,inlineImages:m,inlineVideos:g,recordCanvas:v,preserveWhiteSpace:G,onSerialize:y,onIframeLoad:w,iframeLoadTimeout:_,onStylesheetLoad:S,stylesheetLoadTimeout:b,keepIframeSrcFn:R,privacySetting:C});U&&S(e,U)}},b),T}function qv(e,t){const{mirror:r=new Qc,blockClass:n="highlight-block",blockSelector:i=null,maskTextClass:s="highlight-mask",maskTextSelector:o=null,inlineStylesheet:l=!0,inlineImages:u=!1,inlineVideos:a=!1,recordCanvas:h=!1,maskAllInputs:c=!1,maskTextFn:f,maskInputFn:d,slimDOM:p=!1,dataURLOptions:m,preserveWhiteSpace:g,onSerialize:v,onIframeLoad:y,iframeLoadTimeout:w,onStylesheetLoad:_,stylesheetLoadTimeout:S,keepIframeSrcFn:b=()=>!1,privacySetting:R="default"}=t||{},I=c===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:c===!1?{password:!0}:c,E=ud(p);return Ar(e,{doc:e,mirror:r,blockClass:n,blockSelector:i,maskTextClass:s,maskTextSelector:o,skipChild:!1,inlineStylesheet:l,maskInputOptions:I,maskTextFn:f,maskInputFn:d,slimDOMOptions:E,dataURLOptions:m,inlineImages:u,inlineVideos:a,recordCanvas:h,preserveWhiteSpace:g,onSerialize:v,onIframeLoad:y,iframeLoadTimeout:w,onStylesheetLoad:_,stylesheetLoadTimeout:S,keepIframeSrcFn:b,newlyAddedElement:!1,privacySetting:R})}function e0(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var r=function n(){return this instanceof n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return e[n]}})}),r}var Ri={exports:{}},cd;function t0(){if(cd)return Ri.exports;cd=1;var e=String,t=function(){return{isColorSupported:!1,reset:e,bold:e,dim:e,italic:e,underline:e,inverse:e,hidden:e,strikethrough:e,black:e,red:e,green:e,yellow:e,blue:e,magenta:e,cyan:e,white:e,gray:e,bgBlack:e,bgRed:e,bgGreen:e,bgYellow:e,bgBlue:e,bgMagenta:e,bgCyan:e,bgWhite:e,blackBright:e,redBright:e,greenBright:e,yellowBright:e,blueBright:e,magentaBright:e,cyanBright:e,whiteBright:e,bgBlackBright:e,bgRedBright:e,bgGreenBright:e,bgYellowBright:e,bgBlueBright:e,bgMagentaBright:e,bgCyanBright:e,bgWhiteBright:e}};return Ri.exports=t(),Ri.exports.createColors=t,Ri.exports}const _t=e0(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var Vo,dd;function ko(){if(dd)return Vo;dd=1;let e=t0(),t=_t;class r extends Error{constructor(i,s,o,l,u,a){super(i),this.name="CssSyntaxError",this.reason=i,u&&(this.file=u),l&&(this.source=l),a&&(this.plugin=a),typeof s!="undefined"&&typeof o!="undefined"&&(typeof s=="number"?(this.line=s,this.column=o):(this.line=s.line,this.column=s.column,this.endLine=o.line,this.endColumn=o.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,r)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line!="undefined"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(i){if(!this.source)return"";let s=this.source;i==null&&(i=e.isColorSupported);let o=d=>d,l=d=>d,u=d=>d;if(i){let{bold:d,gray:p,red:m}=e.createColors(!0);l=g=>d(m(g)),o=g=>p(g),t&&(u=g=>t(g))}let a=s.split(/\r?\n/),h=Math.max(this.line-3,0),c=Math.min(this.line+2,a.length),f=String(c).length;return a.slice(h,c).map((d,p)=>{let m=h+1+p,g=" "+(" "+m).slice(-f)+" | ";if(m===this.line){if(d.length>160){let y=20,w=Math.max(0,this.column-y),_=Math.max(this.column+y,this.endColumn+y),S=d.slice(w,_),b=o(g.replace(/\d/g," "))+d.slice(0,Math.min(this.column-1,y-1)).replace(/[^\t]/g," ");return l(">")+o(g)+u(S)+`
|
|
50
|
-
`+b+l("^")}let v=o(g.replace(/\d/g," "))+d.slice(0,this.column-1).replace(/[^\t]/g," ");return l(">")+o(g)+
|
|
51
|
-
`+v+l("^")}return" "+o(g)+
|
|
47
|
+
}`)}function ue(e,t,r=""){return t!=null&&t!==""?e+t+r:""}function mi(e){return ue(" ",e.replace(/\n/g,`
|
|
48
|
+
`))}function Pu(e){var t;return(t=e==null?void 0:e.some(r=>r.includes(`
|
|
49
|
+
`)))!==null&&t!==void 0?t:!1}const vo=JSON,Yb=e=>e.toUpperCase(),Bb=e=>{const t={};return e.forEach((r,n)=>{t[n]=r}),t},zb=(e,t,r)=>e.document?e:{document:e,variables:t,requestHeaders:r,signal:void 0},Kb=(e,t,r)=>e.query?e:{query:e,variables:t,requestHeaders:r,signal:void 0},jb=(e,t)=>e.documents?e:{documents:e,requestHeaders:t,signal:void 0},Mu=e=>{var n,i;let t;const r=e.definitions.filter(s=>s.kind==="OperationDefinition");return r.length===1&&(t=(i=(n=r[0])==null?void 0:n.name)==null?void 0:i.value),t},So=e=>{if(typeof e=="string"){let r;try{const n=Xu(e);r=Mu(n)}catch(n){}return{query:e,operationName:r}}const t=Mu(e);return{query:bo(e),operationName:t}};class Wr extends Error{constructor(t,r){const n=`${Wr.extractMessage(t)}: ${JSON.stringify({response:t,request:r})}`;super(n),Object.setPrototypeOf(this,Wr.prototype),this.response=t,this.request=r,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,Wr)}static extractMessage(t){var r,n,i;return(i=(n=(r=t.errors)==null?void 0:r[0])==null?void 0:n.message)!=null?i:`GraphQL Error (Code: ${t.status})`}}var wo=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function gi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ro={exports:{}};(function(e,t){var r=typeof self!="undefined"?self:wo,n=function(){function s(){this.fetch=!1,this.DOMException=r.DOMException}return s.prototype=r,new s}();(function(s){(function(o){var l={searchParams:"URLSearchParams"in s,iterable:"Symbol"in s&&"iterator"in Symbol,blob:"FileReader"in s&&"Blob"in s&&function(){try{return new Blob,!0}catch(Z){return!1}}(),formData:"FormData"in s,arrayBuffer:"ArrayBuffer"in s};function c(Z){return Z&&DataView.prototype.isPrototypeOf(Z)}if(l.arrayBuffer)var a=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],h=ArrayBuffer.isView||function(Z){return Z&&a.indexOf(Object.prototype.toString.call(Z))>-1};function u(Z){if(typeof Z!="string"&&(Z=String(Z)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(Z))throw new TypeError("Invalid character in header field name");return Z.toLowerCase()}function f(Z){return typeof Z!="string"&&(Z=String(Z)),Z}function d(Z){var T={next:function(){var W=Z.shift();return{done:W===void 0,value:W}}};return l.iterable&&(T[Symbol.iterator]=function(){return T}),T}function p(Z){this.map={},Z instanceof p?Z.forEach(function(T,W){this.append(W,T)},this):Array.isArray(Z)?Z.forEach(function(T){this.append(T[0],T[1])},this):Z&&Object.getOwnPropertyNames(Z).forEach(function(T){this.append(T,Z[T])},this)}p.prototype.append=function(Z,T){Z=u(Z),T=f(T);var W=this.map[Z];this.map[Z]=W?W+", "+T:T},p.prototype.delete=function(Z){delete this.map[u(Z)]},p.prototype.get=function(Z){return Z=u(Z),this.has(Z)?this.map[Z]:null},p.prototype.has=function(Z){return this.map.hasOwnProperty(u(Z))},p.prototype.set=function(Z,T){this.map[u(Z)]=f(T)},p.prototype.forEach=function(Z,T){for(var W in this.map)this.map.hasOwnProperty(W)&&Z.call(T,this.map[W],W,this)},p.prototype.keys=function(){var Z=[];return this.forEach(function(T,W){Z.push(W)}),d(Z)},p.prototype.values=function(){var Z=[];return this.forEach(function(T){Z.push(T)}),d(Z)},p.prototype.entries=function(){var Z=[];return this.forEach(function(T,W){Z.push([W,T])}),d(Z)},l.iterable&&(p.prototype[Symbol.iterator]=p.prototype.entries);function m(Z){if(Z.bodyUsed)return Promise.reject(new TypeError("Already read"));Z.bodyUsed=!0}function g(Z){return new Promise(function(T,W){Z.onload=function(){T(Z.result)},Z.onerror=function(){W(Z.error)}})}function v(Z){var T=new FileReader,W=g(T);return T.readAsArrayBuffer(Z),W}function y(Z){var T=new FileReader,W=g(T);return T.readAsText(Z),W}function w(Z){for(var T=new Uint8Array(Z),W=new Array(T.length),k=0;k<T.length;k++)W[k]=String.fromCharCode(T[k]);return W.join("")}function _(Z){if(Z.slice)return Z.slice(0);var T=new Uint8Array(Z.byteLength);return T.set(new Uint8Array(Z)),T.buffer}function S(){return this.bodyUsed=!1,this._initBody=function(Z){this._bodyInit=Z,Z?typeof Z=="string"?this._bodyText=Z:l.blob&&Blob.prototype.isPrototypeOf(Z)?this._bodyBlob=Z:l.formData&&FormData.prototype.isPrototypeOf(Z)?this._bodyFormData=Z:l.searchParams&&URLSearchParams.prototype.isPrototypeOf(Z)?this._bodyText=Z.toString():l.arrayBuffer&&l.blob&&c(Z)?(this._bodyArrayBuffer=_(Z.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):l.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(Z)||h(Z))?this._bodyArrayBuffer=_(Z):this._bodyText=Z=Object.prototype.toString.call(Z):this._bodyText="",this.headers.get("content-type")||(typeof Z=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):l.searchParams&&URLSearchParams.prototype.isPrototypeOf(Z)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},l.blob&&(this.blob=function(){var Z=m(this);if(Z)return Z;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(v)}),this.text=function(){var Z=m(this);if(Z)return Z;if(this._bodyBlob)return y(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(w(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},l.formData&&(this.formData=function(){return this.text().then(E)}),this.json=function(){return this.text().then(JSON.parse)},this}var b=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function R(Z){var T=Z.toUpperCase();return b.indexOf(T)>-1?T:Z}function I(Z,T){T=T||{};var W=T.body;if(Z instanceof I){if(Z.bodyUsed)throw new TypeError("Already read");this.url=Z.url,this.credentials=Z.credentials,T.headers||(this.headers=new p(Z.headers)),this.method=Z.method,this.mode=Z.mode,this.signal=Z.signal,!W&&Z._bodyInit!=null&&(W=Z._bodyInit,Z.bodyUsed=!0)}else this.url=String(Z);if(this.credentials=T.credentials||this.credentials||"same-origin",(T.headers||!this.headers)&&(this.headers=new p(T.headers)),this.method=R(T.method||this.method||"GET"),this.mode=T.mode||this.mode||null,this.signal=T.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&W)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(W)}I.prototype.clone=function(){return new I(this,{body:this._bodyInit})};function E(Z){var T=new FormData;return Z.trim().split("&").forEach(function(W){if(W){var k=W.split("="),M=k.shift().replace(/\+/g," "),P=k.join("=").replace(/\+/g," ");T.append(decodeURIComponent(M),decodeURIComponent(P))}}),T}function C(Z){var T=new p,W=Z.replace(/\r?\n[\t ]+/g," ");return W.split(/\r?\n/).forEach(function(k){var M=k.split(":"),P=M.shift().trim();if(P){var U=M.join(":").trim();T.append(P,U)}}),T}S.call(I.prototype);function N(Z,T){T||(T={}),this.type="default",this.status=T.status===void 0?200:T.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in T?T.statusText:"OK",this.headers=new p(T.headers),this.url=T.url||"",this._initBody(Z)}S.call(N.prototype),N.prototype.clone=function(){return new N(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new p(this.headers),url:this.url})},N.error=function(){var Z=new N(null,{status:0,statusText:""});return Z.type="error",Z};var G=[301,302,303,307,308];N.redirect=function(Z,T){if(G.indexOf(T)===-1)throw new RangeError("Invalid status code");return new N(null,{status:T,headers:{location:Z}})},o.DOMException=s.DOMException;try{new o.DOMException}catch(Z){o.DOMException=function(T,W){this.message=T,this.name=W;var k=Error(T);this.stack=k.stack},o.DOMException.prototype=Object.create(Error.prototype),o.DOMException.prototype.constructor=o.DOMException}function q(Z,T){return new Promise(function(W,k){var M=new I(Z,T);if(M.signal&&M.signal.aborted)return k(new o.DOMException("Aborted","AbortError"));var P=new XMLHttpRequest;function U(){P.abort()}P.onload=function(){var $={status:P.status,statusText:P.statusText,headers:C(P.getAllResponseHeaders()||"")};$.url="responseURL"in P?P.responseURL:$.headers.get("X-Request-URL");var me="response"in P?P.response:P.responseText;W(new N(me,$))},P.onerror=function(){k(new TypeError("Network request failed"))},P.ontimeout=function(){k(new TypeError("Network request failed"))},P.onabort=function(){k(new o.DOMException("Aborted","AbortError"))},P.open(M.method,M.url,!0),M.credentials==="include"?P.withCredentials=!0:M.credentials==="omit"&&(P.withCredentials=!1),"responseType"in P&&l.blob&&(P.responseType="blob"),M.headers.forEach(function($,me){P.setRequestHeader(me,$)}),M.signal&&(M.signal.addEventListener("abort",U),P.onreadystatechange=function(){P.readyState===4&&M.signal.removeEventListener("abort",U)}),P.send(typeof M._bodyInit=="undefined"?null:M._bodyInit)})}return q.polyfill=!0,s.fetch||(s.fetch=q,s.Headers=p,s.Request=I,s.Response=N),o.Headers=p,o.Request=I,o.Response=N,o.fetch=q,Object.defineProperty(o,"__esModule",{value:!0}),o})({})})(n),n.fetch.ponyfill=!0,delete n.fetch.polyfill;var i=n;t=i.fetch,t.default=i.fetch,t.fetch=i.fetch,t.Headers=i.Headers,t.Request=i.Request,t.Response=i.Response,e.exports=t})(Ro,Ro.exports);var _o=Ro.exports;const yi=gi(_o),Qb=Object.freeze(Object.defineProperty({__proto__:null,default:yi},Symbol.toStringTag,{value:"Module"})),Pr=e=>{let t={};return e&&(typeof Headers!="undefined"&&e instanceof Headers||Qb&&_o.Headers&&e instanceof _o.Headers?t=Bb(e):Array.isArray(e)?e.forEach(([r,n])=>{r&&n!==void 0&&(t[r]=n)}):t=e),t},Au=e=>e.replace(/([\s,]|#[^\n\r]+)+/g," ").trim(),$b=e=>{if(!Array.isArray(e.query)){const n=e,i=[`query=${encodeURIComponent(Au(n.query))}`];return e.variables&&i.push(`variables=${encodeURIComponent(n.jsonSerializer.stringify(n.variables))}`),n.operationName&&i.push(`operationName=${encodeURIComponent(n.operationName)}`),i.join("&")}if(typeof e.variables!="undefined"&&!Array.isArray(e.variables))throw new Error("Cannot create query with given variable type, array expected");const t=e,r=e.query.reduce((n,i,s)=>(n.push({query:Au(i),variables:t.variables?t.jsonSerializer.stringify(t.variables[s]):void 0}),n),[]);return`query=${encodeURIComponent(t.jsonSerializer.stringify(r))}`},qb=e=>t=>z(this,null,function*(){var m;const{url:r,query:n,variables:i,operationName:s,fetch:o,fetchOptions:l,middleware:c}=t,a=x({},t.headers);let h="",u;e==="POST"?(u=ev(n,i,s,l.jsonSerializer),typeof u=="string"&&(a["Content-Type"]="application/json")):h=$b({query:n,variables:i,operationName:s,jsonSerializer:(m=l.jsonSerializer)!=null?m:vo});const f=x({method:e,headers:a,body:u},l);let d=r,p=f;if(c){const g=yield Promise.resolve(c(B(x({},f),{url:r,operationName:s,variables:i}))),{url:y}=g,w=nt(g,["url"]);d=y,p=w}return h&&(d=`${d}?${h}`),yield o(d,p)});class To{constructor(t,r={}){this.url=t,this.requestConfig=r,this.rawRequest=(...n)=>z(this,null,function*(){const[i,s,o]=n,l=Kb(i,s,o),g=this.requestConfig,{headers:c,fetch:a=yi,method:h="POST",requestMiddleware:u,responseMiddleware:f}=g,d=nt(g,["headers","fetch","method","requestMiddleware","responseMiddleware"]),{url:p}=this;l.signal!==void 0&&(d.signal=l.signal);const{operationName:m}=So(l.query);return Eo({url:p,query:l.query,variables:l.variables,headers:x(x({},Pr(Io(c))),Pr(l.requestHeaders)),operationName:m,fetch:a,method:h,fetchOptions:d,middleware:u}).then(v=>(f&&f(v),v)).catch(v=>{throw f&&f(v),v})})}request(t,...r){return z(this,null,function*(){const[n,i]=r,s=zb(t,n,i),m=this.requestConfig,{headers:o,fetch:l=yi,method:c="POST",requestMiddleware:a,responseMiddleware:h}=m,u=nt(m,["headers","fetch","method","requestMiddleware","responseMiddleware"]),{url:f}=this;s.signal!==void 0&&(u.signal=s.signal);const{query:d,operationName:p}=So(s.document);return Eo({url:f,query:d,variables:s.variables,headers:x(x({},Pr(Io(o))),Pr(s.requestHeaders)),operationName:p,fetch:l,method:c,fetchOptions:u,middleware:a}).then(g=>(h&&h(g),g.data)).catch(g=>{throw h&&h(g),g})})}batchRequests(t,r){var a;const n=jb(t,r),c=this.requestConfig,{headers:i}=c,s=nt(c,["headers"]);n.signal!==void 0&&(s.signal=n.signal);const o=n.documents.map(({document:h})=>So(h).query),l=n.documents.map(({variables:h})=>h);return Eo({url:this.url,query:o,variables:l,headers:x(x({},Pr(Io(i))),Pr(n.requestHeaders)),operationName:void 0,fetch:(a=this.requestConfig.fetch)!=null?a:yi,method:this.requestConfig.method||"POST",fetchOptions:s,middleware:this.requestConfig.requestMiddleware}).then(h=>(this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(h),h.data)).catch(h=>{throw this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(h),h})}setHeaders(t){return this.requestConfig.headers=t,this}setHeader(t,r){const{headers:n}=this.requestConfig;return n?n[t]=r:this.requestConfig.headers={[t]:r},this}setEndpoint(t){return this.url=t,this}}const Eo=e=>z(this,null,function*(){var h,u;const{query:t,variables:r,fetchOptions:n}=e,i=qb(Yb((h=e.method)!=null?h:"post")),s=Array.isArray(e.query),o=yield i(e),l=yield tv(o,(u=n.jsonSerializer)!=null?u:vo),c=Array.isArray(l)?!l.some(({data:d})=>!d):!!l.data,a=Array.isArray(l)||!l.errors||Array.isArray(l.errors)&&!l.errors.length||n.errorPolicy==="all"||n.errorPolicy==="ignore";if(o.ok&&a&&c){const f=(Array.isArray(l),l),{errors:d}=f,p=nt(f,["errors"]),m=n.errorPolicy==="ignore"?p:l;return B(x({},s?{data:m}:m),{headers:o.headers,status:o.status})}else{const d=typeof l=="string"?{error:l}:l;throw new Wr(B(x({},d),{status:o.status,headers:o.headers}),{query:t,variables:r})}}),ev=(e,t,r,n)=>{const i=n!=null?n:vo;if(!Array.isArray(e))return i.stringify({query:e,variables:t,operationName:r});if(typeof t!="undefined"&&!Array.isArray(t))throw new Error("Cannot create request body with given variable type, array expected");const s=e.reduce((o,l,c)=>(o.push({query:l,variables:t?t[c]:void 0}),o),[]);return i.stringify(s)},tv=(e,t)=>z(this,null,function*(){let r;return e.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"))?t.parse(yield e.text()):e.text()}),Io=e=>typeof e=="function"?e():e;var Co={exports:{}};(function(e,t){t=e.exports=r,t.getSerialize=n;function r(i,s,o,l){return JSON.stringify(i,n(s,l),o)}function n(i,s){var o=[],l=[];return s==null&&(s=function(c,a){return o[0]===a?"[Circular ~]":"[Circular ~."+l.slice(0,o.indexOf(a)).join(".")+"]"}),function(c,a){if(o.length>0){var h=o.indexOf(this);~h?o.splice(h+1):o.push(this),~h?l.splice(h,1/0,c):l.push(c),~o.indexOf(a)&&(a=s.call(this,c,a))}else o.push(a);return i==null?a:i.call(this,c,a)}}})(Co,Co.exports);var rv=Co.exports;const Rt=gi(rv);var nv=Object.defineProperty,iv=(e,t,r)=>t in e?nv(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,X=(e,t,r)=>iv(e,typeof t!="symbol"?t+"":t,r),Uu,sv=Object.defineProperty,ov=(e,t,r)=>t in e?sv(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Du=(e,t,r)=>ov(e,typeof t!="symbol"?t+"":t,r),ke=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(ke||{});const bi=new Map,Fu=new WeakSet;function Ju(e){return e!==null&&typeof e=="object"&&"complete"in e&&"naturalWidth"in e&&"naturalHeight"in e&&"src"in e&&"onload"in e}function av(e){if(Fu.has(e))return;Fu.add(e);const t=e.drawImage.bind(e);e.drawImage=function(r,...n){const i=bi.get(e);i&&(i.cancelled=!0);const s=()=>{n.length===2&&Ju(r)&&n.push(r.naturalWidth||r.width,r.naturalHeight||r.height),t(r,...n)};if(Ju(r)&&!r.complete){const o={cancelled:!1};bi.set(e,o);const l=()=>{o.cancelled||(bi.delete(e),s())},c=()=>{if(!o.cancelled){bi.delete(e);try{s()}catch(a){}}};r.onload=l,r.onerror=c}else s()}}const Hu={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Yu={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},vi={},Bu={},lv=()=>!!globalThis.Zone;function Zo(e){if(vi[e])return vi[e];const t=globalThis[e],r=t.prototype,n=e in Hu?Hu[e]:void 0,i=!!(n&&n.every(l=>{var c,a;return!!((a=(c=Object.getOwnPropertyDescriptor(r,l))==null?void 0:c.get)!=null&&a.toString().includes("[native code]"))})),s=e in Yu?Yu[e]:void 0,o=!!(s&&s.every(l=>{var c;return typeof r[l]=="function"&&((c=r[l])==null?void 0:c.toString().includes("[native code]"))}));if(i&&o&&!lv())return vi[e]=t.prototype,t.prototype;try{const l=document.createElement("iframe");l.style.display="none",document.body.appendChild(l);const c=l.contentWindow;if(!c)return t.prototype;const a=c[e].prototype;if(!a)return l.remove(),r;const h=navigator.userAgent;return h.includes("Safari")&&!h.includes("Chrome")?(l.classList.add("rr-block"),l.setAttribute("__rrwebUntaintedMutationObserver",""),Bu[e]=()=>l.remove()):l.remove(),vi[e]=a}catch(l){return r}}const Lo={};function Wt(e,t,r){var n;const i=`${e}.${String(r)}`;if(Lo[i])return Lo[i].call(t);const s=Zo(e),o=(n=Object.getOwnPropertyDescriptor(s,r))==null?void 0:n.get;return o?(Lo[i]=o,o.call(t)):t[r]}const xo={};function zu(e,t,r){const n=`${e}.${String(r)}`;if(xo[n])return xo[n].bind(t);const s=Zo(e)[r];return typeof s!="function"?t[r]:(xo[n]=s,s.bind(t))}function cv(e){return Wt("Node",e,"ownerDocument")}function uv(e){return Wt("Node",e,"childNodes")}function dv(e){return Wt("Node",e,"parentNode")}function hv(e){return Wt("Node",e,"parentElement")}function fv(e){return Wt("Node",e,"textContent")}function pv(e,t){return zu("Node",e,"contains")(t)}function mv(e){return zu("Node",e,"getRootNode")()}function gv(e){return!e||!("host"in e)?null:Wt("ShadowRoot",e,"host")}function yv(e){return e.styleSheets}function bv(e){return!e||!("shadowRoot"in e)?null:Wt("Element",e,"shadowRoot")}function vv(e,t){return Wt("Element",e,"querySelector")(t)}function Sv(e,t){return Wt("Element",e,"querySelectorAll")(t)}function wv(){var e;return[Zo("MutationObserver").constructor,(e=Bu.MutationObserver)!=null?e:()=>{}]}let Ku=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(Ku=()=>new Date().getTime());function Rv(e,t,r){try{if(!(t in e))return()=>{};const n=e[t],i=r(n);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:n}})),e[t]=i,()=>{e[t]=n}}catch(n){return()=>{}}}const Fe={ownerDocument:cv,childNodes:uv,parentNode:dv,parentElement:hv,textContent:fv,contains:pv,getRootNode:mv,host:gv,styleSheets:yv,shadowRoot:bv,querySelector:vv,querySelectorAll:Sv,nowTimestamp:Ku,mutationObserverCtor:wv,patch:Rv,wrapCanvasContextDrawImage:av};function ju(e){return e.nodeType===e.ELEMENT_NODE}function pn(e){const t=e&&"host"in e&&"mode"in e&&Fe.host(e)||null;return!!(t&&"shadowRoot"in t&&Fe.shadowRoot(t)===e)}function mn(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function _v(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),e}function Tv(e){const{cssText:t}=e;if(t.split('"').length<3)return t;const r=["@import",`url(${JSON.stringify(e.href)})`];return e.layerName===""?r.push("layer"):e.layerName&&r.push(`layer(${e.layerName})`),e.supportsText&&r.push(`supports(${e.supportsText})`),e.media.length&&r.push(e.media.mediaText),r.join(" ")+";"}function No(e){try{const t=e.rules||e.cssRules;if(!t)return null;let r=e.href;!r&&e.ownerNode&&(r=e.ownerNode.baseURI);const n=Array.from(t,i=>Qu(i,r)).join("");return _v(n)}catch(t){return null}}function Qu(e,t){if($u(e)){let r;try{r=No(e.styleSheet)||Tv(e)}catch(n){r=e.cssText}return e.styleSheet.href?Ri(r,e.styleSheet.href):r}else{let r=e.cssText;return Iv(e)&&e.selectorText.includes(":")&&(r=Ev(r)),t?Ri(r,t):r}}function Ev(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function $u(e){return"styleSheet"in e}function Iv(e){return"selectorText"in e}class qu{constructor(){Du(this,"idNodeMap",new Map),Du(this,"nodeMetaMap",new WeakMap)}getId(t){var r;if(!t)return-1;const n=(r=this.getMeta(t))==null?void 0:r.id;return n!=null?n:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const r=this.getId(t);this.idNodeMap.delete(r),t.childNodes&&t.childNodes.forEach(n=>this.removeNodeFromMap(n))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,r){const n=r.id;this.idNodeMap.set(n,t),this.nodeMetaMap.set(t,r)}replace(t,r){const n=this.getNode(t);if(n){const i=this.nodeMetaMap.get(n);i&&this.nodeMetaMap.set(r,i)}this.idNodeMap.set(t,r)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function Cv(){return new qu}function Si({element:e,maskInputOptions:t,tagName:r,type:n,value:i,overwriteRecord:s,maskInputFn:o}){let l=i||"";return nd({maskInputOptions:t,tagName:r,type:n,overwriteRecord:s})&&(o?l=o(l,e):l="*".repeat(l.length)),l}function hr(e){return e.toLowerCase()}const ed="__rrweb_original__";function Zv(e){const t=e.getContext("2d");if(!t)return!0;const r=50;for(let n=0;n<e.width;n+=r)for(let i=0;i<e.height;i+=r){const s=t.getImageData,o=ed in s?s[ed]:s;if(new Uint32Array(o.call(t,n,i,Math.min(r,e.width-n),Math.min(r,e.height-i)).data.buffer).some(c=>c!==0))return!1}return!0}function wi(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?hr(t):null}function td(e,t){var s;let r;try{r=new URL(e,window.location.href)}catch(o){return null}const n=/\.([0-9a-z]+)(?:$)/i,i=r.pathname.match(n);return(s=i==null?void 0:i[1])!=null?s:null}function Lv(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}const xv=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Nv=/^(?:[a-z+]+:)?\/\//i,Ov=/^www\..*/i,Gv=/^(data:)([^,]*),(.*)/i;function Ri(e,t){return(e||"").replace(xv,(r,n,i,s,o,l)=>{const c=i||o||l,a=n||s||"";if(!c)return r;if(Nv.test(c)||Ov.test(c))return`url(${a}${c}${a})`;if(Gv.test(c))return`url(${a}${c}${a})`;if(c[0]==="/")return`url(${a}${Lv(t)+c}${a})`;const h=c.split("#")[0],u=c.substring(h.length),f=t.split("#")[0].split("/"),d=h.split("/");f.pop();for(const p of d)p!=="."&&(p===".."?f.pop():f.push(p));return`url(${a}${f.join("/")}${u}${a})`})}function _i(e,t=!1){return t?e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function Vv(e,t,r=!1){const n=Array.from(t.childNodes),i=[];let s=0;if(n.length>1&&e&&typeof e=="string"){let o=_i(e,r);const l=o.length/e.length;for(let c=1;c<n.length;c++)if(n[c].textContent&&typeof n[c].textContent=="string"){const a=_i(n[c].textContent,r),h=100;let u=3;for(;u<a.length&&(a[u].match(/[a-zA-Z0-9]/)||a.indexOf(a.substring(0,u),1)!==-1);u++);for(;u<a.length;u++){let f=a.substring(0,u),d=o.split(f),p=-1;if(d.length===2)p=d[0].length;else if(d.length>2&&d[0]===""&&n[c-1].textContent!=="")p=o.indexOf(f,1);else if(d.length===1){if(f=f.substring(0,f.length-1),d=o.split(f),d.length<=1)return i.push(e),i;u=h+1}else u===a.length-1&&(p=o.indexOf(f));if(d.length>=2&&u>h){const m=n[c-1].textContent;if(m&&typeof m=="string"){const g=_i(m).length;p=o.indexOf(f,g)}p===-1&&(p=d[0].length)}if(p!==-1){let m=Math.floor(p/l);for(;m>0&&m<e.length;){if(s+=1,s>50*n.length)return i.push(e),i;const g=_i(e.substring(0,m),r);if(g.length===p){i.push(e.substring(0,m)),e=e.substring(m),o=o.substring(p);break}else g.length<p?m+=Math.max(1,Math.floor((p-g.length)/l)):m-=Math.max(1,Math.floor((g.length-p)*l))}break}}}}return i.push(e),i}function kv(e,t){return Vv(e,t).join("/* rr_split */")}function Oo(e){return e=e.replace(/[^ -~]+/g,""),e=(e==null?void 0:e.split(" ").map(t=>t?Math.random().toString(20).substring(2,t.length+2):"").join(" "))||"",e}function Go(e){return e==="img"||e==="video"||e==="audio"||e==="source"}const Xv=new RegExp(/[a-zA-Z0-9.!#$%&'*+=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:.[a-zA-Z0-9-]+)*/),Wv=new RegExp(/[0-9]{9,16}/),Pv=new RegExp(/[0-9]{3}-?[0-9]{2}-?[0-9]{4}/),Mv=new RegExp(/[+]?[(]?[0-9]{3}[)]?[-\s.]?[0-9]{3}[-\s.]?[0-9]{4,6}/),Av=new RegExp(/[0-9]{4}-?[0-9]{4}-?[0-9]{4}-?[0-9]{4}/),Uv=new RegExp(/[0-9]{1,5}.?[0-9]{0,3}\s[a-zA-Z]{2,30}\s[a-zA-Z]{2,15}/),Dv=new RegExp(/(?:[0-9]{1,3}.){3}[0-9]{1,3}/),Fv=[Xv,Wv,Pv,Mv,Av,Uv,Dv];function rd(e){return e?Fv.some(t=>t.test(e)):!1}const nd=({maskInputOptions:e,tagName:t,type:r,overwriteRecord:n})=>{const i=r&&r.toLowerCase();return n!=="true"&&(!!e[t.toLowerCase()]||!!(i&&e[i]))};let Jv=1;const Hv=new RegExp("[^a-z0-9-_:]"),gn=-2;function id(){return Jv++}function Yv(e){if(e instanceof HTMLFormElement)return"form";const t=hr(e.tagName);return Hv.test(t)?"div":t}let Mr,sd;const Bv=/^[^ \t\n\r\u000c]+/,zv=/^[, \t\n\r\u000c]+/;function Kv(e,t){if(t.trim()==="")return t;let r=0;function n(s){let o;const l=s.exec(t.substring(r));return l?(o=l[0],r+=o.length,o):""}const i=[];for(;n(zv),!(r>=t.length);){let s=n(Bv);if(s.slice(-1)===",")s=Ar(e,s.substring(0,s.length-1)),i.push(s);else{let o="";s=Ar(e,s);let l=!1;for(;;){const c=t.charAt(r);if(c===""){i.push((s+o).trim());break}else if(l)c===")"&&(l=!1);else if(c===","){r+=1,i.push((s+o).trim());break}else c==="("&&(l=!0);o+=c,r+=1}}}return i.join(", ")}const od=new WeakMap;function Ar(e,t){return!t||t.trim()===""?t:Vo(e,t)}function jv(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function Vo(e,t){let r=od.get(e);if(r||(r=e.createElement("a"),od.set(e,r)),!t)t="";else if(t.startsWith("blob:")||t.startsWith("data:"))return t;return r.setAttribute("href",t),r.href}function ad(e,t,r,n){return n&&(r==="src"||r==="href"&&!(t==="use"&&n[0]==="#")||r==="xlink:href"&&n[0]!=="#"||r==="background"&&["table","td","th"].includes(t)?Ar(e,n):r==="srcset"?Kv(e,n):r==="style"?Ri(n,Vo(e)):t==="object"&&r==="data"?Ar(e,n):n)}function ld(e,t,r){return["video","audio"].includes(e)&&t==="autoplay"}function cd(e,t,r){try{if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(let n=e.classList.length;n--;){const i=e.classList[n];if(t.test(i))return!0}if(r)return e.matches(r)}catch(n){}return!1}function Ti(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return r?Ti(Fe.parentNode(e),t,r):!1;for(let n=e.classList.length;n--;){const i=e.classList[n];if(t.test(i))return!0}return r?Ti(Fe.parentNode(e),t,r):!1}function ud(e,t,r,n){let i;if(ju(e)){if(i=e,!Fe.childNodes(i).length)return!1}else{if(Fe.parentElement(e)===null)return!1;i=Fe.parentElement(e)}try{if(typeof t=="string"){if(n){if(i.closest(`.${t}`))return!0}else if(i.classList.contains(t))return!0}else if(Ti(i,t,n))return!0;if(r){if(n){if(i.closest(r))return!0}else if(i.matches(r))return!0}}catch(s){}return!1}function Qv(e,t,r){const n=e.contentWindow;if(!n)return;let i=!1,s;try{s=n.document.readyState}catch(l){return}if(s!=="complete"){const l=setTimeout(()=>{i||(t(),i=!0)},r);e.addEventListener("load",()=>{clearTimeout(l),i=!0,t()});return}const o="about:blank";if(n.location.href!==o||e.src===o||e.src==="")return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function $v(e,t,r){let n=!1,i;try{i=e.sheet}catch(o){return}if(i)return;const s=setTimeout(()=>{n||(t(),n=!0)},r);e.addEventListener("load",()=>{clearTimeout(s),n=!0,t()})}function qv(e,t){const{doc:r,mirror:n,blockClass:i,blockSelector:s,needsMask:o,inlineStylesheet:l,maskInputOptions:c={},maskTextClass:a,maskTextFn:h,maskInputFn:u,dataURLOptions:f={},inlineImages:d,inlineVideos:p,recordCanvas:m,keepIframeSrcFn:g,newlyAddedElement:v=!1,cssCaptured:y=!1,privacySetting:w}=t,_=e0(r,n);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:ke.Document,childNodes:[],compatMode:e.compatMode}:{type:ke.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:ke.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:_};case e.ELEMENT_NODE:return r0(e,{doc:r,blockClass:i,blockSelector:s,inlineStylesheet:l,maskInputOptions:c,maskInputFn:u,maskTextClass:a,dataURLOptions:f,inlineImages:d,inlineVideos:p,recordCanvas:m,keepIframeSrcFn:g,newlyAddedElement:v,privacySetting:w,rootId:_});case e.TEXT_NODE:return t0(e,{doc:r,needsMask:o,maskTextFn:h,privacySetting:w,rootId:_,cssCaptured:y});case e.CDATA_SECTION_NODE:return{type:ke.CDATA,textContent:"",rootId:_};case e.COMMENT_NODE:return{type:ke.Comment,textContent:Fe.textContent(e)||"",rootId:_};default:return!1}}function e0(e,t){if(!t.hasNode(e))return;const r=t.getId(e);return r===1?void 0:r}function t0(e,t){var r;const{needsMask:n,maskTextFn:i,privacySetting:s,rootId:o,cssCaptured:l}=t,c=Fe.parentNode(e),a=c&&c.tagName;let h="";const u=a==="STYLE"?!0:void 0,f=a==="SCRIPT"?!0:void 0;f?h="SCRIPT_PLACEHOLDER":l||(h=Fe.textContent(e),u&&h&&(h=Ri(h,Vo(t.doc)))),!u&&!f&&h&&n&&(h=i?i(h,Fe.parentElement(e)):h.replace(/[\S]/g,"*"));const d=s==="strict",p=(r=e.parentElement)==null?void 0:r.getAttribute("data-hl-record"),m=s==="default"&&rd(h);return(d||m)&&!p&&a&&!new Set(["HEAD","TITLE","STYLE","SCRIPT","HTML","BODY","NOSCRIPT"]).has(a)&&h&&(h=Oo(h)),{type:ke.Text,textContent:h||"",rootId:o}}function r0(e,t){const{doc:r,blockClass:n,blockSelector:i,inlineStylesheet:s,maskInputOptions:o={},maskInputFn:l,maskTextClass:c,dataURLOptions:a={},inlineImages:h,inlineVideos:u,recordCanvas:f,keepIframeSrcFn:d,newlyAddedElement:p=!1,privacySetting:m,rootId:g}=t;let v=cd(e,n,i);const y=cd(e,c,null),w=m==="strict";let _=Yv(e),S={};const b=e.attributes.length;for(let E=0;E<b;E++){const C=e.attributes[E];ld(_,C.name)||(S[C.name]=ad(r,_,hr(C.name),C.value))}if(_==="link"&&s){const E=Array.from(r.styleSheets).find(N=>N.href===e.href);let C=null;E&&(C=No(E)),C&&(delete S.rel,delete S.href,S._cssText=C)}if(_==="style"&&e.sheet){let E=No(e.sheet);E&&(e.childNodes.length>1&&(E=kv(E,e)),S._cssText=E)}if(["input","textarea","select"].includes(_)){const E=e.value,C=e.checked;S.type!=="radio"&&S.type!=="checkbox"&&S.type!=="submit"&&S.type!=="button"&&E?S.value=Si({element:e,type:wi(e),tagName:_,value:E,overwriteRecord:e.getAttribute("data-hl-record"),maskInputOptions:o,maskInputFn:l}):C&&(S.checked=C)}if(_==="option"&&(e.selected&&!o.select?S.selected=!0:delete S.selected),_==="dialog"&&e.open&&(S.rr_open_mode=e.matches("dialog:modal")?"modal":"non-modal"),_==="canvas"&&f){if(e.__context==="2d")Zv(e);else if(!("__context"in e)){const E=e.toDataURL(a.type,a.quality),C=r.createElement("canvas");C.width=e.width,C.height=e.height;const N=C.toDataURL(a.type,a.quality);E!==N&&(S.rr_dataURL=E)}}if(_==="img"&&h&&!v&&!y&&!w){Mr||(Mr=r.createElement("canvas"),sd=Mr.getContext("2d"));const E=e,C=E.currentSrc||E.getAttribute("src")||"<unknown-src>",N=E.crossOrigin,G=()=>{E.removeEventListener("load",G);try{Mr.width=E.naturalWidth,Mr.height=E.naturalHeight,sd.drawImage(E,0,0),S.rr_dataURL=Mr.toDataURL(a.type,a.quality)}catch(q){if(E.crossOrigin!=="anonymous"){E.crossOrigin="anonymous",E.complete&&E.naturalWidth!==0?G():E.addEventListener("load",G);return}else console.warn(`Cannot inline img src=${C}! Error: ${q}`)}E.crossOrigin==="anonymous"&&(N?S.crossOrigin=N:E.removeAttribute("crossorigin"))};E.complete&&E.naturalWidth!==0?G():E.addEventListener("load",G)}if(["audio","video"].includes(_)){const E=S;E.rr_mediaState=e.paused?"paused":"played",E.rr_mediaCurrentTime=e.currentTime,E.rr_mediaPlaybackRate=e.playbackRate,E.rr_mediaMuted=e.muted,E.rr_mediaLoop=e.loop,E.rr_mediaVolume=e.volume}if(p||(e.scrollLeft&&(S.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(S.rr_scrollTop=e.scrollTop)),v||y||w&&Go(_)){const{width:E,height:C}=e.getBoundingClientRect();S={class:S.class,rr_width:`${E}px`,rr_height:`${C}px`}}w&&Go(_)&&(v=!0),_==="iframe"&&!d(S.src)&&(e.contentDocument||(S.rr_src=S.src),delete S.src);let R;try{customElements.get(_)&&(R=!0)}catch(E){}const I=E=>{const{width:C,height:N}=E.getBoundingClientRect();S={width:C,height:N,rr_width:`${C}px`,rr_height:`${N}px`,rr_inlined_video:!0,class:S.class,style:S.style},_="canvas";const G=r.createElement("canvas");G.width=e.width,G.height=e.height,S.rr_dataURL=G.toDataURL(a.type,a.quality)};if(_==="video"){const E=e;h&&(E.src===""||E.src.indexOf("blob:")!==-1)&&I(E),u&&E.src!==""&&E.src.indexOf("blob:")===-1&&I(E)}return{type:ke.Element,tagName:_,attributes:S,childNodes:[],isSVG:jv(e)||void 0,needBlock:v,needMask:y,rootId:g,isCustom:R}}function Re(e){return e==null?"":e.toLowerCase()}function dd(e){return e===!0||e==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:e==="all",headMetaDescKeywords:e==="all",headTitleMutations:e==="all"}:e||{}}function n0(e,t){if(t.comment&&e.type===ke.Comment)return!0;if(e.type===ke.Element){if(t.script&&(e.tagName==="script"||e.tagName==="link"&&(e.attributes.rel==="preload"&&e.attributes.as==="script"||e.attributes.rel==="modulepreload")||e.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&td(e.attributes.href)==="js"))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(Re(e.attributes.name).match(/^msapplication-tile(image|color)$/)||Re(e.attributes.name)==="application-name"||Re(e.attributes.rel)==="icon"||Re(e.attributes.rel)==="apple-touch-icon"||Re(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&Re(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(Re(e.attributes.property).match(/^(og|twitter|fb):/)||Re(e.attributes.name).match(/^(og|twitter):/)||Re(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(Re(e.attributes.name)==="robots"||Re(e.attributes.name)==="googlebot"||Re(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(Re(e.attributes.name)==="author"||Re(e.attributes.name)==="generator"||Re(e.attributes.name)==="framework"||Re(e.attributes.name)==="publisher"||Re(e.attributes.name)==="progid"||Re(e.attributes.property).match(/^article:/)||Re(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(Re(e.attributes.name)==="google-site-verification"||Re(e.attributes.name)==="yandex-verification"||Re(e.attributes.name)==="csrf-token"||Re(e.attributes.name)==="p:domain_verify"||Re(e.attributes.name)==="verify-v1"||Re(e.attributes.name)==="verification"||Re(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Ur(e,t){const{doc:r,mirror:n,blockClass:i,blockSelector:s,maskTextClass:o,maskTextSelector:l,skipChild:c=!1,inlineStylesheet:a=!0,maskInputOptions:h={},maskTextFn:u,maskInputFn:f,slimDOMOptions:d,dataURLOptions:p={},inlineImages:m=!1,inlineVideos:g=!1,recordCanvas:v=!1,onSerialize:y,onIframeLoad:w,iframeLoadTimeout:_=5e3,onStylesheetLoad:S,stylesheetLoadTimeout:b=5e3,keepIframeSrcFn:R=()=>!1,newlyAddedElement:I=!1,cssCaptured:E=!1,privacySetting:C}=t;let{needsMask:N}=t,{preserveWhiteSpace:G=!0}=t;N||(N=ud(e,o,l,N===void 0));const q=qv(e,{doc:r,mirror:n,blockClass:i,blockSelector:s,needsMask:N,inlineStylesheet:a,maskInputOptions:h,maskTextClass:o,maskTextFn:u,maskInputFn:f,dataURLOptions:p,inlineImages:m,inlineVideos:g,recordCanvas:v,keepIframeSrcFn:R,newlyAddedElement:I,cssCaptured:E,privacySetting:C});if(!q)return console.warn(e,"not serialized"),null;let Z;n.hasNode(e)?Z=n.getId(e):n0(q,d)||!G&&q.type===ke.Text&&!q.textContent.replace(/^\s+|\s+$/gm,"").length?Z=gn:Z=id();const T=Object.assign(q,{id:Z});if(n.add(e,T),Z===gn)return null;y&&y(e);let W=!c,k=C,M=C==="strict";if(T.type===ke.Element){if(W=W&&!T.needBlock,M||(M=!!T.needBlock||!!T.needMask),k=M?"strict":k,M&&Go(T.tagName)){const $=e.cloneNode();$.src="",n.add($,T)}delete T.needBlock,delete T.needMask;const U=Fe.shadowRoot(e);U&&mn(U)&&(T.isShadowHost=!0)}if((T.type===ke.Document||T.type===ke.Element)&&W){d.headWhitespace&&T.type===ke.Element&&T.tagName==="head"&&(G=!1);const U={doc:r,mirror:n,blockClass:i,blockSelector:s,needsMask:N,maskTextClass:o,maskTextSelector:l,skipChild:c,inlineStylesheet:a,maskInputOptions:h,maskTextFn:u,maskInputFn:f,slimDOMOptions:d,dataURLOptions:p,inlineImages:m,inlineVideos:g,recordCanvas:v,preserveWhiteSpace:G,onSerialize:y,onIframeLoad:w,iframeLoadTimeout:_,onStylesheetLoad:S,stylesheetLoadTimeout:b,keepIframeSrcFn:R,cssCaptured:!1,privacySetting:k};if(!(T.type===ke.Element&&T.tagName==="textarea"&&T.attributes.value!==void 0)){T.type===ke.Element&&T.attributes._cssText!==void 0&&typeof T.attributes._cssText=="string"&&(U.cssCaptured=!0);for(const me of Array.from(Fe.childNodes(e))){const O=Ur(me,U);O&&T.childNodes.push(O)}}let $=null;if(ju(e)&&($=Fe.shadowRoot(e)))for(const me of Array.from(Fe.childNodes($))){const O=Ur(me,U);O&&(mn($)&&(O.isShadow=!0),T.childNodes.push(O))}}const P=Fe.parentNode(e);return P&&pn(P)&&mn(P)&&(T.isShadow=!0),T.type===ke.Element&&T.tagName==="iframe"&&Qv(e,()=>{const U=e.contentDocument;if(U&&w){const $=Ur(U,{doc:U,mirror:n,blockClass:i,blockSelector:s,needsMask:N,maskTextClass:o,maskTextSelector:l,skipChild:!1,inlineStylesheet:a,maskInputOptions:h,maskTextFn:u,maskInputFn:f,slimDOMOptions:d,dataURLOptions:p,inlineImages:m,inlineVideos:g,recordCanvas:v,preserveWhiteSpace:G,onSerialize:y,onIframeLoad:w,iframeLoadTimeout:_,onStylesheetLoad:S,stylesheetLoadTimeout:b,keepIframeSrcFn:R,privacySetting:C});$&&w(e,$)}},_),T.type===ke.Element&&T.tagName==="link"&&typeof T.attributes.rel=="string"&&(T.attributes.rel==="stylesheet"||T.attributes.rel==="preload"&&typeof T.attributes.href=="string"&&td(T.attributes.href)==="css")&&$v(e,()=>{if(S){const U=Ur(e,{doc:r,mirror:n,blockClass:i,blockSelector:s,needsMask:N,maskTextClass:o,maskTextSelector:l,skipChild:!1,inlineStylesheet:a,maskInputOptions:h,maskTextFn:u,maskInputFn:f,slimDOMOptions:d,dataURLOptions:p,inlineImages:m,inlineVideos:g,recordCanvas:v,preserveWhiteSpace:G,onSerialize:y,onIframeLoad:w,iframeLoadTimeout:_,onStylesheetLoad:S,stylesheetLoadTimeout:b,keepIframeSrcFn:R,privacySetting:C});U&&S(e,U)}},b),T}function i0(e,t){const{mirror:r=new qu,blockClass:n="highlight-block",blockSelector:i=null,maskTextClass:s="highlight-mask",maskTextSelector:o=null,inlineStylesheet:l=!0,inlineImages:c=!1,inlineVideos:a=!1,recordCanvas:h=!1,maskAllInputs:u=!1,maskTextFn:f,maskInputFn:d,slimDOM:p=!1,dataURLOptions:m,preserveWhiteSpace:g,onSerialize:v,onIframeLoad:y,iframeLoadTimeout:w,onStylesheetLoad:_,stylesheetLoadTimeout:S,keepIframeSrcFn:b=()=>!1,privacySetting:R="default"}=t||{},I=u===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:u===!1?{password:!0}:u,E=dd(p);return Ur(e,{doc:e,mirror:r,blockClass:n,blockSelector:i,maskTextClass:s,maskTextSelector:o,skipChild:!1,inlineStylesheet:l,maskInputOptions:I,maskTextFn:f,maskInputFn:d,slimDOMOptions:E,dataURLOptions:m,inlineImages:c,inlineVideos:a,recordCanvas:h,preserveWhiteSpace:g,onSerialize:v,onIframeLoad:y,iframeLoadTimeout:w,onStylesheetLoad:_,stylesheetLoadTimeout:S,keepIframeSrcFn:b,newlyAddedElement:!1,privacySetting:R})}function s0(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var r=function n(){return this instanceof n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return e[n]}})}),r}var Ei={exports:{}},hd;function o0(){if(hd)return Ei.exports;hd=1;var e=String,t=function(){return{isColorSupported:!1,reset:e,bold:e,dim:e,italic:e,underline:e,inverse:e,hidden:e,strikethrough:e,black:e,red:e,green:e,yellow:e,blue:e,magenta:e,cyan:e,white:e,gray:e,bgBlack:e,bgRed:e,bgGreen:e,bgYellow:e,bgBlue:e,bgMagenta:e,bgCyan:e,bgWhite:e,blackBright:e,redBright:e,greenBright:e,yellowBright:e,blueBright:e,magentaBright:e,cyanBright:e,whiteBright:e,bgBlackBright:e,bgRedBright:e,bgGreenBright:e,bgYellowBright:e,bgBlueBright:e,bgMagentaBright:e,bgCyanBright:e,bgWhiteBright:e}};return Ei.exports=t(),Ei.exports.createColors=t,Ei.exports}const _t=s0(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var ko,fd;function Xo(){if(fd)return ko;fd=1;let e=o0(),t=_t;class r extends Error{constructor(i,s,o,l,c,a){super(i),this.name="CssSyntaxError",this.reason=i,c&&(this.file=c),l&&(this.source=l),a&&(this.plugin=a),typeof s!="undefined"&&typeof o!="undefined"&&(typeof s=="number"?(this.line=s,this.column=o):(this.line=s.line,this.column=s.column,this.endLine=o.line,this.endColumn=o.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,r)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line!="undefined"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(i){if(!this.source)return"";let s=this.source;i==null&&(i=e.isColorSupported);let o=d=>d,l=d=>d,c=d=>d;if(i){let{bold:d,gray:p,red:m}=e.createColors(!0);l=g=>d(m(g)),o=g=>p(g),t&&(c=g=>t(g))}let a=s.split(/\r?\n/),h=Math.max(this.line-3,0),u=Math.min(this.line+2,a.length),f=String(u).length;return a.slice(h,u).map((d,p)=>{let m=h+1+p,g=" "+(" "+m).slice(-f)+" | ";if(m===this.line){if(d.length>160){let y=20,w=Math.max(0,this.column-y),_=Math.max(this.column+y,this.endColumn+y),S=d.slice(w,_),b=o(g.replace(/\d/g," "))+d.slice(0,Math.min(this.column-1,y-1)).replace(/[^\t]/g," ");return l(">")+o(g)+c(S)+`
|
|
50
|
+
`+b+l("^")}let v=o(g.replace(/\d/g," "))+d.slice(0,this.column-1).replace(/[^\t]/g," ");return l(">")+o(g)+c(d)+`
|
|
51
|
+
`+v+l("^")}return" "+o(g)+c(d)}).join(`
|
|
52
52
|
`)}toString(){let i=this.showSourceCode();return i&&(i=`
|
|
53
53
|
|
|
54
54
|
`+i+`
|
|
55
|
-
`),this.name+": "+this.message+i}}return
|
|
55
|
+
`),this.name+": "+this.message+i}}return ko=r,r.default=r,ko}var Wo,pd;function md(){if(pd)return Wo;pd=1;const e=/(<)(\/?style\b)/gi,t=/(<)(!--)/g,r=/[\t\n\f\r "#'()/;[\\\]{}]/;function n(h){return typeof h!="string"||!h.includes("<")?h:h.replace(e,"\\3c $2").replace(t,"\\3c $2")}const i={after:`
|
|
56
56
|
`,beforeClose:`
|
|
57
57
|
`,beforeComment:`
|
|
58
58
|
`,beforeDecl:`
|
|
59
59
|
`,beforeOpen:" ",beforeRule:`
|
|
60
|
-
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function s(h){return h[0].toUpperCase()+h.slice(1)}function o(h,
|
|
61
|
-
`)){let g=this.raw(
|
|
62
|
-
`)&&(f=f.replace(/[^\n]+$/,"")),!1}),f&&(f=f.replace(/\S/g,"")),f}rawBeforeComment(
|
|
63
|
-
`)&&(d=d.replace(/[^\n]+$/,"")),!1}),typeof d=="undefined"?d=this.raw(f,null,"beforeDecl"):d&&(d=d.replace(/\S/g,"")),d}rawBeforeDecl(
|
|
64
|
-
`)&&(d=d.replace(/[^\n]+$/,"")),!1}),typeof d=="undefined"?d=this.raw(f,null,"beforeRule"):d&&(d=d.replace(/\S/g,"")),d}rawBeforeOpen(
|
|
65
|
-
`)&&(f=f.replace(/[^\n]+$/,"")),!1}),f&&(f=f.replace(/\S/g,"")),f}rawColon(
|
|
66
|
-
`);return f=m[m.length-1],f=f.replace(/\S/g,""),!1}}),f}rawSemicolon(
|
|
67
|
-
`?(h=1,
|
|
68
|
-
`?(h=1,c+=1):h+=1;return{column:h,line:c,offset:p}}prev(){if(!this.parent)return;let a=this.parent.index(this);return this.parent.nodes[a-1]}rangeBy(a={}){let h="document"in this.source.input?this.source.input.document:this.source.input.css,c={column:this.source.start.column,line:this.source.start.line,offset:o(h,this.source.start)},f=this.source.end?{column:this.source.end.column+1,line:this.source.end.line,offset:typeof this.source.end.offset=="number"?this.source.end.offset:o(h,this.source.end)+1}:{column:c.column+1,line:c.line,offset:c.offset+1};if(a.word){let p=h.slice(o(h,this.source.start),o(h,this.source.end)).indexOf(a.word);p!==-1&&(c=this.positionInside(p),f=this.positionInside(p+a.word.length))}else a.start?c={column:a.start.column,line:a.start.line,offset:o(h,a.start)}:typeof a.index=="number"&&(c=this.positionInside(a.index)),a.end?f={column:a.end.column,line:a.end.line,offset:o(h,a.end)}:typeof a.endIndex=="number"?f=this.positionInside(a.endIndex):typeof a.index=="number"&&(f=this.positionInside(a.index+1));return(f.line<c.line||f.line===c.line&&f.column<=c.column)&&(f={column:c.column+1,line:c.line,offset:c.offset+1}),{end:f,start:c}}raw(a,h){return new t().raw(this,a,h)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...a){if(this.parent){let h=this,c=!1;for(let f of a)f===this?c=!0:c?(this.parent.insertAfter(h,f),h=f):this.parent.insertBefore(h,f);c||this.remove()}return this}root(){let a=this;for(;a.parent&&a.parent.type!=="document";)a=a.parent;return a}toJSON(a,h){let c=h==null;h=h||new Map;let f=[],d=[[this,f,0]];for(let m=0;m<d.length;m++){let[g,v,y]=d[m],w={};v[y]=w;for(let _ in g){if(!Object.prototype.hasOwnProperty.call(g,_)||_==="parent"||_==="proxyCache")continue;let S=g[_];if(Array.isArray(S)){let b=[];w[_]=b;for(let R=0;R<S.length;R++){let I=S[R];typeof I=="object"&&I.toJSON?I.toJSON===l.prototype.toJSON?d.push([I,b,R]):b[R]=I.toJSON(null,h):b[R]=I}}else if(typeof S=="object"&&S.toJSON)S.toJSON===l.prototype.toJSON?d.push([S,w,_]):w[_]=S.toJSON(null,h);else if(_==="source"){if(S==null)continue;let b=h.get(S.input);b==null&&(b=h.size,h.set(S.input,b)),w[_]={end:S.end,inputId:b,start:S.start}}else w[_]=S}}let p=f[0];return c&&(p.inputs=[...h.keys()].map(m=>m.toJSON())),p}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(a=r){a.stringify&&(a=a.stringify);let h="";return a(this,c=>{h+=c}),h}warn(a,h,c={}){let f={node:this};for(let d in c)f[d]=c[d];return a.warn(h,f)}}return Po=l,l.default=l,Po}var Mo,yd;function Ci(){if(yd)return Mo;yd=1;let e=Ii();class t extends e{constructor(n){super(n),this.type="comment"}}return Mo=t,t.default=t,Mo}var Ao,bd;function Zi(){if(bd)return Ao;bd=1;let e=Ii();class t extends e{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(n){n&&typeof n.value!="undefined"&&typeof n.value!="string"&&(n=B(x({},n),{value:String(n.value)})),super(n),this.type="decl"}}return Ao=t,t.default=t,Ao}var Uo,vd;function zt(){if(vd)return Uo;vd=1;let e=Ci(),t=Zi(),r=Ii(),{isClean:n,my:i}=Ei(),s,o,l,u;function a(f){let d=f.slice();for(;d.length>0;){let p=d.pop();if(delete p.source,p.nodes){p.nodes=p.nodes.slice();for(let m of p.nodes)d.push(m)}}return f.slice()}function h(f){let d=[f];for(;d.length>0;){let p=d.pop();if(p[n]=!1,p.proxyOf.nodes)for(let m of p.proxyOf.nodes)d.push(m)}}class c extends r{get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}append(...d){for(let p of d){let m=this.normalize(p,this.last);for(let g of m)this.proxyOf.nodes.push(g)}return this.markDirty(),this}cleanRaws(d){let p=[this];for(;p.length>0;){let m=p.pop();if(m!==this&&m.cleanRaws!==c.prototype.cleanRaws){m.cleanRaws(d);continue}if(r.prototype.cleanRaws.call(m,d),m.nodes)for(let g of m.nodes)p.push(g)}}each(d){if(!this.proxyOf.nodes)return;let p=this.getIterator(),m,g;for(;this.indexes[p]<this.proxyOf.nodes.length&&(m=this.indexes[p],g=d(this.proxyOf.nodes[m],m),g!==!1);)this.indexes[p]+=1;return delete this.indexes[p],g}every(d){return this.nodes.every(d)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let d=this.lastEach;return this.indexes[d]=0,d}getProxyProcessor(){return{get(d,p){return p==="proxyOf"?d:d[p]?p==="each"||typeof p=="string"&&p.startsWith("walk")?(...m)=>d[p](...m.map(g=>typeof g=="function"?(v,y)=>g(v.toProxy(),y):g)):p==="every"||p==="some"?m=>d[p]((g,...v)=>m(g.toProxy(),...v)):p==="root"?()=>d.root().toProxy():p==="nodes"?d.nodes.map(m=>m.toProxy()):p==="first"||p==="last"?d[p].toProxy():d[p]:d[p]},set(d,p,m){return d[p]===m||(d[p]=m,(p==="name"||p==="params"||p==="selector")&&d.markDirty()),!0}}}index(d){return typeof d=="number"?d:(d.proxyOf&&(d=d.proxyOf),this.proxyOf.nodes.indexOf(d))}insertAfter(d,p){let m=this.index(d),g=this.normalize(p,this.proxyOf.nodes[m]).reverse();m=this.index(d);for(let y of g)this.proxyOf.nodes.splice(m+1,0,y);let v;for(let y in this.indexes)v=this.indexes[y],m<v&&(this.indexes[y]=v+g.length);return this.markDirty(),this}insertBefore(d,p){let m=this.index(d),g=m===0?"prepend":!1,v=this.normalize(p,this.proxyOf.nodes[m],g).reverse();m=this.index(d);for(let w of v)this.proxyOf.nodes.splice(m,0,w);let y;for(let w in this.indexes)y=this.indexes[w],m<=y&&(this.indexes[w]=y+v.length);return this.markDirty(),this}normalize(d,p){if(typeof d=="string")d=a(o(d).nodes);else if(typeof d=="undefined")d=[];else if(Array.isArray(d)){d=d.slice(0);for(let g of d)g.parent&&g.parent.removeChild(g,"ignore")}else if(d.type==="root"&&this.type!=="document"){d=d.nodes.slice(0);for(let g of d)g.parent&&g.parent.removeChild(g,"ignore")}else if(d.type)d=[d];else if(d.prop){if(typeof d.value=="undefined")throw new Error("Value field is missed in node creation");typeof d.value!="string"&&(d.value=String(d.value)),d=[new t(d)]}else if(d.selector||d.selectors)d=[new u(d)];else if(d.name)d=[new s(d)];else if(d.text)d=[new e(d)];else throw new Error("Unknown node type in node creation");return d.map(g=>(g[i]||c.rebuild(g),g=g.proxyOf,g.parent&&g.parent.removeChild(g),g[n]&&h(g),g.raws||(g.raws={}),typeof g.raws.before=="undefined"&&p&&typeof p.raws.before!="undefined"&&(g.raws.before=p.raws.before.replace(/\S/g,"")),g.parent=this.proxyOf,g))}prepend(...d){d=d.reverse();for(let p of d){let m=this.normalize(p,this.first,"prepend").reverse();for(let g of m)this.proxyOf.nodes.unshift(g);for(let g in this.indexes)this.indexes[g]=this.indexes[g]+m.length}return this.markDirty(),this}push(d){return d.parent=this,this.proxyOf.nodes.push(d),this}removeAll(){for(let d of this.proxyOf.nodes)d.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(d){d=this.index(d),this.proxyOf.nodes[d].parent=void 0,this.proxyOf.nodes.splice(d,1);let p;for(let m in this.indexes)p=this.indexes[m],p>=d&&(this.indexes[m]=p-1);return this.markDirty(),this}replaceValues(d,p,m){return m||(m=p,p={}),this.walkDecls(g=>{p.props&&!p.props.includes(g.prop)||p.fast&&!g.value.includes(p.fast)||(g.value=g.value.replace(d,m))}),this.markDirty(),this}some(d){return this.nodes.some(d)}walk(d){if(!this.proxyOf.nodes)return;let p=[{iterator:this.getIterator(),node:this.proxyOf}];for(;p.length>0;){let{iterator:m,node:g}=p[p.length-1],v=g.indexes[m];if(v>=g.proxyOf.nodes.length){delete g.indexes[m],p.pop();let _=p[p.length-1];_&&(_.node.indexes[_.iterator]+=1);continue}let y=g.proxyOf.nodes[v],w;try{w=d(y,v)}catch(_){throw y.addToError(_)}if(w===!1){for(let _ of p)delete _.node.indexes[_.iterator];return!1}y.walk&&y.proxyOf.nodes?p.push({iterator:y.getIterator(),node:y}):g.indexes[m]+=1}}walkAtRules(d,p){return p?d instanceof RegExp?this.walk((m,g)=>{if(m.type==="atrule"&&d.test(m.name))return p(m,g)}):this.walk((m,g)=>{if(m.type==="atrule"&&m.name===d)return p(m,g)}):(p=d,this.walk((m,g)=>{if(m.type==="atrule")return p(m,g)}))}walkComments(d){return this.walk((p,m)=>{if(p.type==="comment")return d(p,m)})}walkDecls(d,p){return p?d instanceof RegExp?this.walk((m,g)=>{if(m.type==="decl"&&d.test(m.prop))return p(m,g)}):this.walk((m,g)=>{if(m.type==="decl"&&m.prop===d)return p(m,g)}):(p=d,this.walk((m,g)=>{if(m.type==="decl")return p(m,g)}))}walkRules(d,p){return p?d instanceof RegExp?this.walk((m,g)=>{if(m.type==="rule"&&d.test(m.selector))return p(m,g)}):this.walk((m,g)=>{if(m.type==="rule"&&m.selector===d)return p(m,g)}):(p=d,this.walk((m,g)=>{if(m.type==="rule")return p(m,g)}))}}return c.registerParse=f=>{o=f},c.registerRule=f=>{u=f},c.registerAtRule=f=>{s=f},c.registerRoot=f=>{l=f},Uo=c,c.default=c,c.rebuild=f=>{let d=[f];for(;d.length>0;){let p=d.pop();if(p.type==="atrule"?Object.setPrototypeOf(p,s.prototype):p.type==="rule"?Object.setPrototypeOf(p,u.prototype):p.type==="decl"?Object.setPrototypeOf(p,t.prototype):p.type==="comment"?Object.setPrototypeOf(p,e.prototype):p.type==="root"&&Object.setPrototypeOf(p,l.prototype),p[i]=!0,p.nodes)for(let m of p.nodes)d.push(m)}},Uo}var Do,Sd;function Fo(){if(Sd)return Do;Sd=1;let e=zt();class t extends e{constructor(n){super(n),this.type="atrule"}append(...n){return this.proxyOf.nodes||(this.nodes=[]),super.append(...n)}prepend(...n){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...n)}}return Do=t,t.default=t,e.registerAtRule(t),Do}var Jo,wd;function Ho(){if(wd)return Jo;wd=1;let e=zt(),t,r;class n extends e{constructor(s){super(x({type:"document"},s)),this.nodes||(this.nodes=[])}toResult(s={}){return new t(new r,this,s).stringify()}}return n.registerLazyResult=i=>{t=i},n.registerProcessor=i=>{r=i},Jo=n,n.default=n,Jo}var Yo,Rd;function r0(){if(Rd)return Yo;Rd=1;let e="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";return Yo={nanoid:(n=21)=>{let i="",s=n|0;for(;s-- >0;)i+=e[Math.random()*64|0];return i},customAlphabet:(n,i=21)=>(s=i)=>{let o="",l=s|0;for(;l-- >0;)o+=n[Math.random()*n.length|0];return o}},Yo}var Bo,_d;function Td(){if(_d)return Bo;_d=1;let{existsSync:e,readFileSync:t,realpathSync:r}=_t,{dirname:n,isAbsolute:i,join:s,relative:o,sep:l}=_t,{SourceMapConsumer:u,SourceMapGenerator:a}=_t;function h(d){try{return r(d)}catch(p){return d}}function c(d){return Buffer?Buffer.from(d,"base64").toString():window.atob(d)}class f{constructor(p,m){if(m.map===!1)return;m.unsafeMap&&(this.unsafeMap=!0),this.loadAnnotation(p),this.inline=this.startWith(this.annotation,"data:");let g=m.map?m.map.prev:void 0,v=this.loadMap(m.from,g);!this.mapFile&&m.from&&(this.mapFile=m.from),this.mapFile&&(this.root=n(this.mapFile)),v&&(this.text=v)}consumer(){return this.consumerCache||(this.consumerCache=new u(this.json||this.text)),this.consumerCache}decodeInline(p){let m=/^data:application\/json;charset=utf-?8;base64,/,g=/^data:application\/json;base64,/,v=/^data:application\/json;charset=utf-?8,/,y=/^data:application\/json,/,w=p.match(v)||p.match(y);if(w)return decodeURIComponent(p.substr(w[0].length));let _=p.match(m)||p.match(g);if(_)return c(p.substr(_[0].length));let S=p.slice(22);throw S=S.slice(0,S.indexOf(",")),new Error("Unsupported source map encoding "+S)}getAnnotationURL(p){return p.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(p){return typeof p!="object"?!1:typeof p.mappings=="string"||typeof p._mappings=="string"||Array.isArray(p.sections)}loadAnnotation(p){let m=p.match(/\/\*\s*# sourceMappingURL=/g);if(!m)return;let g=p.lastIndexOf(m.pop()),v=p.indexOf("*/",g);g>-1&&v>-1&&(this.annotation=this.getAnnotationURL(p.substring(g,v)))}loadFile(p,m,g){if(!g&&!this.unsafeMap){if(!/\.map$/i.test(p)||!m)return;let v=o(h(n(m)),h(p));if(v===".."||v.startsWith(".."+l)||i(v))return}if(this.root=n(p),e(p))return this.mapFile=p,t(p,"utf-8").toString().trim()}loadMap(p,m){if(m===!1)return!1;if(m){if(typeof m=="string")return m;if(typeof m=="function"){let g=m(p);if(g){let v=this.loadFile(g,p,!0);if(!v)throw new Error("Unable to load previous source map: "+g.toString());return v}}else{if(m instanceof u)return a.fromSourceMap(m).toString();if(m instanceof a)return m.toString();if(this.isMap(m))return JSON.stringify(m);throw new Error("Unsupported previous source map format: "+m.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let g=this.annotation;p&&(g=s(n(p),g));let v=this.loadFile(g,p,!1);if(v)try{this.json=JSON.parse(v.replace(/^\)]}'[^\n]*\n/,""))}catch(y){return}return v}}}startWith(p,m){return p?p.substr(0,m.length)===m:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return Bo=f,f.default=f,Bo}var zo,Ed;function Li(){if(Ed)return zo;Ed=1;let{nanoid:e}=r0(),{isAbsolute:t,resolve:r}=_t,{SourceMapConsumer:n,SourceMapGenerator:i}=_t,{fileURLToPath:s,pathToFileURL:o}=_t,l=ko(),u=Td(),a=_t,h=Symbol("lineToIndexCache"),c=!!(n&&i),f=!!(r&&t);function d(m){if(m[h])return m[h];let g=m.css.split(`
|
|
69
|
-
`),v=new Array(g.length),y=0;for(let w=0,_=g.length;w<_;w++)v[w]=y,y+=g[w].length+1;return m[h]=v,v}class p{get from(){return this.file||this.id}constructor(g,v={}){if(g===null||typeof g=="undefined"||typeof g=="object"&&!g.toString)throw new Error(`PostCSS received ${g} instead of CSS string`);if(this.css=g.toString(),this.css[0]==="\uFEFF"||this.css[0]===""?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,v.document&&(this.document=v.document.toString()),v.from&&(!f||/^\w+:\/\//.test(v.from)||t(v.from)?this.file=v.from:this.file=r(v.from)),f&&
|
|
70
|
-
`," "];return e.split(t,r)},split(t,r,n){if(typeof t!="string")return[];let i=[],s="",o=!1,l=0,
|
|
60
|
+
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function s(h){return h[0].toUpperCase()+h.slice(1)}function o(h,u){let f="@"+u.name,d=u.params?h.rawValue(u,"params"):"",p=u.raws.afterName;return typeof p=="undefined"?p=d?" ":"":p===""&&d&&!r.test(d[0])&&(p=" "),f+p+d}function l(h,u,f){let d=f.nodes,p=d.length-1;for(;p>0&&d[p].type==="comment";)p-=1;let m=h.raw(f,"semicolon"),g=f.type==="document";for(let v=d.length-1;v>=0;v--){let y=d[v],w=p!==v||m;!w&&v<d.length-1&&(y.type==="atrule"&&!y.nodes||y.type==="decl"&&y.prop.startsWith("--"))&&(w=!0),u.push({document:g,node:y,semicolon:w})}}function c(h,u,f,d){let p=h.raw(f,"between","beforeOpen");h.builder(n(d+p)+"{",f,"start");let m=f.nodes&&f.nodes.length,g=()=>{let v=m?h.raw(f,"after"):h.raw(f,"after","emptyBody");v&&h.builder(n(v)),h.builder("}",f,"end"),f.type==="rule"&&f.raws.ownSemicolon&&h.builder(n(f.raws.ownSemicolon),f,"end")};m?(u.push(g),l(h,u,f)):g()}class a{constructor(u){this.builder=u}atrule(u,f){let d=o(this,u);if(u.nodes)this.block(u,d);else{let p=(u.raws.between||"")+(f?";":"");this.builder(n(d+p),u)}}beforeAfter(u,f){let d;u.type==="decl"?d=this.raw(u,null,"beforeDecl"):u.type==="comment"?d=this.raw(u,null,"beforeComment"):f==="before"?d=this.raw(u,null,"beforeRule"):d=this.raw(u,null,"beforeClose");let p=u.parent,m=0;for(;p&&p.type!=="root";)m+=1,p=p.parent;if(d.includes(`
|
|
61
|
+
`)){let g=this.raw(u,null,"indent");if(g.length)for(let v=0;v<m;v++)d+=g}return d}block(u,f){let d=this.raw(u,"between","beforeOpen");this.builder(n(f+d)+"{",u,"start");let p;u.nodes&&u.nodes.length?(this.body(u),p=this.raw(u,"after")):p=this.raw(u,"after","emptyBody"),p&&this.builder(n(p)),this.builder("}",u,"end")}body(u){let f=a.prototype,d=["atrule","block","body","rule","stringify"].every(m=>this[m]===f[m]),p=[];for(l(this,p,u);p.length>0;){let m=p.pop();if(typeof m=="function"){m();continue}let g=m.node,v=this.raw(g,"before");v&&this.builder(m.document?v:n(v)),d&&g.type==="rule"?c(this,p,g,this.rawValue(g,"selector")):d&&g.type==="atrule"&&g.nodes?c(this,p,g,o(this,g)):this.stringify(g,m.semicolon)}}comment(u){let f=this.raw(u,"left","commentLeft"),d=this.raw(u,"right","commentRight");this.builder(n("/*"+f+u.text+d+"*/"),u)}decl(u,f){let d=u.raws,p=this.raw(u,"between","colon"),m=u.prop+p+this.rawValue(u,"value");u.important&&(m+=d.important||" !important"),f&&(m+=";"),this.builder(n(m),u)}document(u){this.body(u)}raw(u,f,d){let p;if(d||(d=f),f&&(p=u.raws[f],typeof p!="undefined"))return p;let m=u.parent;if(d==="before"&&(!m||m.type==="root"&&m.first===u||m&&m.type==="document"))return"";if(!m)return i[d];let g=u.root(),v=g.rawCache||(g.rawCache={});if(typeof v[d]!="undefined")return v[d];if(d==="before"||d==="after")return this.beforeAfter(u,d);{let y="raw"+s(d);this[y]?p=this[y](g,u):g.walk(w=>{if(p=w.raws[f],typeof p!="undefined")return!1})}return typeof p=="undefined"&&(p=i[d]),v[d]=p,p}rawBeforeClose(u){let f;return u.walk(d=>{if(d.nodes&&d.nodes.length>0&&typeof d.raws.after!="undefined")return f=d.raws.after,f.includes(`
|
|
62
|
+
`)&&(f=f.replace(/[^\n]+$/,"")),!1}),f&&(f=f.replace(/\S/g,"")),f}rawBeforeComment(u,f){let d;return u.walkComments(p=>{if(typeof p.raws.before!="undefined")return d=p.raws.before,d.includes(`
|
|
63
|
+
`)&&(d=d.replace(/[^\n]+$/,"")),!1}),typeof d=="undefined"?d=this.raw(f,null,"beforeDecl"):d&&(d=d.replace(/\S/g,"")),d}rawBeforeDecl(u,f){let d;return u.walkDecls(p=>{if(typeof p.raws.before!="undefined")return d=p.raws.before,d.includes(`
|
|
64
|
+
`)&&(d=d.replace(/[^\n]+$/,"")),!1}),typeof d=="undefined"?d=this.raw(f,null,"beforeRule"):d&&(d=d.replace(/\S/g,"")),d}rawBeforeOpen(u){let f;return u.walk(d=>{if(d.type!=="decl"&&(f=d.raws.between,typeof f!="undefined"))return!1}),f}rawBeforeRule(u){let f;return u.walk(d=>{if(d.nodes&&(d.parent!==u||u.first!==d)&&typeof d.raws.before!="undefined")return f=d.raws.before,f.includes(`
|
|
65
|
+
`)&&(f=f.replace(/[^\n]+$/,"")),!1}),f&&(f=f.replace(/\S/g,"")),f}rawColon(u){let f;return u.walkDecls(d=>{if(typeof d.raws.between!="undefined")return f=d.raws.between.replace(/[^\s:]/g,""),!1}),f}rawEmptyBody(u){let f;return u.walk(d=>{if(d.nodes&&d.nodes.length===0&&(f=d.raws.after,typeof f!="undefined"))return!1}),f}rawIndent(u){if(u.raws.indent)return u.raws.indent;let f;return u.walk(d=>{let p=d.parent;if(p&&p!==u&&p.parent&&p.parent===u&&typeof d.raws.before!="undefined"){let m=d.raws.before.split(`
|
|
66
|
+
`);return f=m[m.length-1],f=f.replace(/\S/g,""),!1}}),f}rawSemicolon(u){let f;return u.walk(d=>{if(d.nodes&&d.nodes.length&&d.last.type==="decl"&&(f=d.raws.semicolon,typeof f!="undefined"))return!1}),f}rawValue(u,f){let d=u[f],p=u.raws[f];return p&&p.value===d?p.raw:d}root(u){if(u.source&&u.source.input.hasBOM&&this.builder("\uFEFF",u,"start"),this.body(u),u.raws.after){let f=u.raws.after,d=u.parent&&u.parent.type==="document";this.builder(d?f:n(f))}}rule(u){this.block(u,this.rawValue(u,"selector")),u.raws.ownSemicolon&&this.builder(n(u.raws.ownSemicolon),u,"end")}stringify(u,f){if(!this[u.type])throw new Error("Unknown AST node type "+u.type+". Maybe you need to change PostCSS stringifier.");this[u.type](u,f)}}return Wo=a,a.default=a,Wo}var Po,gd;function Ii(){if(gd)return Po;gd=1;let e=md();function t(r,n){new e(n).stringify(r)}return Po=t,t.default=t,Po}var Ci={},yd;function Zi(){return yd||(yd=1,Ci.isClean=Symbol("isClean"),Ci.my=Symbol("my")),Ci}var Mo,bd;function Li(){if(bd)return Mo;bd=1;let e=Xo(),t=md(),r=Ii(),{isClean:n,my:i}=Zi();function s(c,a){let h=new c.constructor,u=[[c,h,a]];for(;u.length>0;){let[f,d,p]=u.pop();for(let m in f){if(!Object.prototype.hasOwnProperty.call(f,m)||m==="proxyCache")continue;let g=f[m],v=typeof g;if(m==="parent"&&v==="object")p&&(d[m]=p);else if(m==="source")d[m]=g;else if(Array.isArray(g)){let y=[];d[m]=y;for(let w of g){let _=new w.constructor;y.push(_),u.push([w,_,d])}}else{if(v==="object"&&g!==null){let y=new g.constructor;u.push([g,y,void 0]),g=y}d[m]=g}}}return h}function o(c,a){if(a&&typeof a.offset!="undefined")return a.offset;let h=1,u=1,f=0;for(let d=0;d<c.length;d++){if(u===a.line&&h===a.column){f=d;break}c[d]===`
|
|
67
|
+
`?(h=1,u+=1):h+=1}return f}class l{get proxyOf(){return this}constructor(a={}){this.raws={},this[n]=!1,this[i]=!0;for(let h of Object.keys(a))if(h!=="__proto__")if(h==="nodes"){this.nodes=[];for(let u of a[h])typeof u.clone=="function"&&u.parent?this.append(u.clone()):this.append(u)}else this[h]=a[h]}addToError(a){if(a.postcssNode=this,a.stack&&this.source&&/\n\s{4}at /.test(a.stack)){let h=this.source;a.stack=a.stack.replace(/\n\s{4}at /,`$&${h.input.from}:${h.start.line}:${h.start.column}$&`)}return a}after(a){return this.parent.insertAfter(this,a),this}assign(a={}){for(let h in a)this[h]=a[h];return this}before(a){return this.parent.insertBefore(this,a),this}cleanRaws(a){delete this.raws.before,delete this.raws.after,a||delete this.raws.between}clone(a={}){let h=s(this);for(let u in a)h[u]=a[u];return h}cloneAfter(a={}){let h=this.clone(a);return this.parent.insertAfter(this,h),h}cloneBefore(a={}){let h=this.clone(a);return this.parent.insertBefore(this,h),h}error(a,h={}){if(this.source){let{end:u,start:f}=this.rangeBy(h);return this.source.input.error(a,{column:f.column,line:f.line},{column:u.column,line:u.line},h)}return new e(a)}getProxyProcessor(){return{get(a,h){return h==="proxyOf"?a:h==="root"?()=>a.root().toProxy():a[h]},set(a,h,u){return a[h]===u||(a[h]=u,(h==="prop"||h==="value"||h==="name"||h==="params"||h==="important"||h==="text")&&a.markDirty()),!0}}}markClean(){this[n]=!0}markDirty(){if(this[n]){this[n]=!1;let a=this;for(;a=a.parent;)a[n]=!1}}next(){if(!this.parent)return;let a=this.parent.index(this);return this.parent.nodes[a+1]}positionBy(a={}){let h="document"in this.source.input?this.source.input.document:this.source.input.css,u={column:this.source.start.column,line:this.source.start.line,offset:o(h,this.source.start)};if(a.index)u=this.positionInside(a.index);else if(a.word){let d=h.slice(o(h,this.source.start),o(h,this.source.end)).indexOf(a.word);d!==-1&&(u=this.positionInside(d))}return u}positionInside(a){let h=this.source.start.column,u=this.source.start.line,f="document"in this.source.input?this.source.input.document:this.source.input.css,d=o(f,this.source.start),p=d+a;for(let m=d;m<p;m++)f[m]===`
|
|
68
|
+
`?(h=1,u+=1):h+=1;return{column:h,line:u,offset:p}}prev(){if(!this.parent)return;let a=this.parent.index(this);return this.parent.nodes[a-1]}rangeBy(a={}){let h="document"in this.source.input?this.source.input.document:this.source.input.css,u={column:this.source.start.column,line:this.source.start.line,offset:o(h,this.source.start)},f=this.source.end?{column:this.source.end.column+1,line:this.source.end.line,offset:typeof this.source.end.offset=="number"?this.source.end.offset:o(h,this.source.end)+1}:{column:u.column+1,line:u.line,offset:u.offset+1};if(a.word){let p=h.slice(o(h,this.source.start),o(h,this.source.end)).indexOf(a.word);p!==-1&&(u=this.positionInside(p),f=this.positionInside(p+a.word.length))}else a.start?u={column:a.start.column,line:a.start.line,offset:o(h,a.start)}:typeof a.index=="number"&&(u=this.positionInside(a.index)),a.end?f={column:a.end.column,line:a.end.line,offset:o(h,a.end)}:typeof a.endIndex=="number"?f=this.positionInside(a.endIndex):typeof a.index=="number"&&(f=this.positionInside(a.index+1));return(f.line<u.line||f.line===u.line&&f.column<=u.column)&&(f={column:u.column+1,line:u.line,offset:u.offset+1}),{end:f,start:u}}raw(a,h){return new t().raw(this,a,h)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...a){if(this.parent){let h=this,u=!1;for(let f of a)f===this?u=!0:u?(this.parent.insertAfter(h,f),h=f):this.parent.insertBefore(h,f);u||this.remove()}return this}root(){let a=this;for(;a.parent&&a.parent.type!=="document";)a=a.parent;return a}toJSON(a,h){let u=h==null;h=h||new Map;let f=[],d=[[this,f,0]];for(let m=0;m<d.length;m++){let[g,v,y]=d[m],w={};v[y]=w;for(let _ in g){if(!Object.prototype.hasOwnProperty.call(g,_)||_==="parent"||_==="proxyCache")continue;let S=g[_];if(Array.isArray(S)){let b=[];w[_]=b;for(let R=0;R<S.length;R++){let I=S[R];typeof I=="object"&&I.toJSON?I.toJSON===l.prototype.toJSON?d.push([I,b,R]):b[R]=I.toJSON(null,h):b[R]=I}}else if(typeof S=="object"&&S.toJSON)S.toJSON===l.prototype.toJSON?d.push([S,w,_]):w[_]=S.toJSON(null,h);else if(_==="source"){if(S==null)continue;let b=h.get(S.input);b==null&&(b=h.size,h.set(S.input,b)),w[_]={end:S.end,inputId:b,start:S.start}}else w[_]=S}}let p=f[0];return u&&(p.inputs=[...h.keys()].map(m=>m.toJSON())),p}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(a=r){a.stringify&&(a=a.stringify);let h="";return a(this,u=>{h+=u}),h}warn(a,h,u={}){let f={node:this};for(let d in u)f[d]=u[d];return a.warn(h,f)}}return Mo=l,l.default=l,Mo}var Ao,vd;function xi(){if(vd)return Ao;vd=1;let e=Li();class t extends e{constructor(n){super(n),this.type="comment"}}return Ao=t,t.default=t,Ao}var Uo,Sd;function Ni(){if(Sd)return Uo;Sd=1;let e=Li();class t extends e{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(n){n&&typeof n.value!="undefined"&&typeof n.value!="string"&&(n=B(x({},n),{value:String(n.value)})),super(n),this.type="decl"}}return Uo=t,t.default=t,Uo}var Do,wd;function zt(){if(wd)return Do;wd=1;let e=xi(),t=Ni(),r=Li(),{isClean:n,my:i}=Zi(),s,o,l,c;function a(f){let d=f.slice();for(;d.length>0;){let p=d.pop();if(delete p.source,p.nodes){p.nodes=p.nodes.slice();for(let m of p.nodes)d.push(m)}}return f.slice()}function h(f){let d=[f];for(;d.length>0;){let p=d.pop();if(p[n]=!1,p.proxyOf.nodes)for(let m of p.proxyOf.nodes)d.push(m)}}class u extends r{get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}append(...d){for(let p of d){let m=this.normalize(p,this.last);for(let g of m)this.proxyOf.nodes.push(g)}return this.markDirty(),this}cleanRaws(d){let p=[this];for(;p.length>0;){let m=p.pop();if(m!==this&&m.cleanRaws!==u.prototype.cleanRaws){m.cleanRaws(d);continue}if(r.prototype.cleanRaws.call(m,d),m.nodes)for(let g of m.nodes)p.push(g)}}each(d){if(!this.proxyOf.nodes)return;let p=this.getIterator(),m,g;for(;this.indexes[p]<this.proxyOf.nodes.length&&(m=this.indexes[p],g=d(this.proxyOf.nodes[m],m),g!==!1);)this.indexes[p]+=1;return delete this.indexes[p],g}every(d){return this.nodes.every(d)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let d=this.lastEach;return this.indexes[d]=0,d}getProxyProcessor(){return{get(d,p){return p==="proxyOf"?d:d[p]?p==="each"||typeof p=="string"&&p.startsWith("walk")?(...m)=>d[p](...m.map(g=>typeof g=="function"?(v,y)=>g(v.toProxy(),y):g)):p==="every"||p==="some"?m=>d[p]((g,...v)=>m(g.toProxy(),...v)):p==="root"?()=>d.root().toProxy():p==="nodes"?d.nodes.map(m=>m.toProxy()):p==="first"||p==="last"?d[p].toProxy():d[p]:d[p]},set(d,p,m){return d[p]===m||(d[p]=m,(p==="name"||p==="params"||p==="selector")&&d.markDirty()),!0}}}index(d){return typeof d=="number"?d:(d.proxyOf&&(d=d.proxyOf),this.proxyOf.nodes.indexOf(d))}insertAfter(d,p){let m=this.index(d),g=this.normalize(p,this.proxyOf.nodes[m]).reverse();m=this.index(d);for(let y of g)this.proxyOf.nodes.splice(m+1,0,y);let v;for(let y in this.indexes)v=this.indexes[y],m<v&&(this.indexes[y]=v+g.length);return this.markDirty(),this}insertBefore(d,p){let m=this.index(d),g=m===0?"prepend":!1,v=this.normalize(p,this.proxyOf.nodes[m],g).reverse();m=this.index(d);for(let w of v)this.proxyOf.nodes.splice(m,0,w);let y;for(let w in this.indexes)y=this.indexes[w],m<=y&&(this.indexes[w]=y+v.length);return this.markDirty(),this}normalize(d,p){if(typeof d=="string")d=a(o(d).nodes);else if(typeof d=="undefined")d=[];else if(Array.isArray(d)){d=d.slice(0);for(let g of d)g.parent&&g.parent.removeChild(g,"ignore")}else if(d.type==="root"&&this.type!=="document"){d=d.nodes.slice(0);for(let g of d)g.parent&&g.parent.removeChild(g,"ignore")}else if(d.type)d=[d];else if(d.prop){if(typeof d.value=="undefined")throw new Error("Value field is missed in node creation");typeof d.value!="string"&&(d.value=String(d.value)),d=[new t(d)]}else if(d.selector||d.selectors)d=[new c(d)];else if(d.name)d=[new s(d)];else if(d.text)d=[new e(d)];else throw new Error("Unknown node type in node creation");return d.map(g=>(g[i]||u.rebuild(g),g=g.proxyOf,g.parent&&g.parent.removeChild(g),g[n]&&h(g),g.raws||(g.raws={}),typeof g.raws.before=="undefined"&&p&&typeof p.raws.before!="undefined"&&(g.raws.before=p.raws.before.replace(/\S/g,"")),g.parent=this.proxyOf,g))}prepend(...d){d=d.reverse();for(let p of d){let m=this.normalize(p,this.first,"prepend").reverse();for(let g of m)this.proxyOf.nodes.unshift(g);for(let g in this.indexes)this.indexes[g]=this.indexes[g]+m.length}return this.markDirty(),this}push(d){return d.parent=this,this.proxyOf.nodes.push(d),this}removeAll(){for(let d of this.proxyOf.nodes)d.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(d){d=this.index(d),this.proxyOf.nodes[d].parent=void 0,this.proxyOf.nodes.splice(d,1);let p;for(let m in this.indexes)p=this.indexes[m],p>=d&&(this.indexes[m]=p-1);return this.markDirty(),this}replaceValues(d,p,m){return m||(m=p,p={}),this.walkDecls(g=>{p.props&&!p.props.includes(g.prop)||p.fast&&!g.value.includes(p.fast)||(g.value=g.value.replace(d,m))}),this.markDirty(),this}some(d){return this.nodes.some(d)}walk(d){if(!this.proxyOf.nodes)return;let p=[{iterator:this.getIterator(),node:this.proxyOf}];for(;p.length>0;){let{iterator:m,node:g}=p[p.length-1],v=g.indexes[m];if(v>=g.proxyOf.nodes.length){delete g.indexes[m],p.pop();let _=p[p.length-1];_&&(_.node.indexes[_.iterator]+=1);continue}let y=g.proxyOf.nodes[v],w;try{w=d(y,v)}catch(_){throw y.addToError(_)}if(w===!1){for(let _ of p)delete _.node.indexes[_.iterator];return!1}y.walk&&y.proxyOf.nodes?p.push({iterator:y.getIterator(),node:y}):g.indexes[m]+=1}}walkAtRules(d,p){return p?d instanceof RegExp?this.walk((m,g)=>{if(m.type==="atrule"&&d.test(m.name))return p(m,g)}):this.walk((m,g)=>{if(m.type==="atrule"&&m.name===d)return p(m,g)}):(p=d,this.walk((m,g)=>{if(m.type==="atrule")return p(m,g)}))}walkComments(d){return this.walk((p,m)=>{if(p.type==="comment")return d(p,m)})}walkDecls(d,p){return p?d instanceof RegExp?this.walk((m,g)=>{if(m.type==="decl"&&d.test(m.prop))return p(m,g)}):this.walk((m,g)=>{if(m.type==="decl"&&m.prop===d)return p(m,g)}):(p=d,this.walk((m,g)=>{if(m.type==="decl")return p(m,g)}))}walkRules(d,p){return p?d instanceof RegExp?this.walk((m,g)=>{if(m.type==="rule"&&d.test(m.selector))return p(m,g)}):this.walk((m,g)=>{if(m.type==="rule"&&m.selector===d)return p(m,g)}):(p=d,this.walk((m,g)=>{if(m.type==="rule")return p(m,g)}))}}return u.registerParse=f=>{o=f},u.registerRule=f=>{c=f},u.registerAtRule=f=>{s=f},u.registerRoot=f=>{l=f},Do=u,u.default=u,u.rebuild=f=>{let d=[f];for(;d.length>0;){let p=d.pop();if(p.type==="atrule"?Object.setPrototypeOf(p,s.prototype):p.type==="rule"?Object.setPrototypeOf(p,c.prototype):p.type==="decl"?Object.setPrototypeOf(p,t.prototype):p.type==="comment"?Object.setPrototypeOf(p,e.prototype):p.type==="root"&&Object.setPrototypeOf(p,l.prototype),p[i]=!0,p.nodes)for(let m of p.nodes)d.push(m)}},Do}var Fo,Rd;function Jo(){if(Rd)return Fo;Rd=1;let e=zt();class t extends e{constructor(n){super(n),this.type="atrule"}append(...n){return this.proxyOf.nodes||(this.nodes=[]),super.append(...n)}prepend(...n){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...n)}}return Fo=t,t.default=t,e.registerAtRule(t),Fo}var Ho,_d;function Yo(){if(_d)return Ho;_d=1;let e=zt(),t,r;class n extends e{constructor(s){super(x({type:"document"},s)),this.nodes||(this.nodes=[])}toResult(s={}){return new t(new r,this,s).stringify()}}return n.registerLazyResult=i=>{t=i},n.registerProcessor=i=>{r=i},Ho=n,n.default=n,Ho}var Bo,Td;function a0(){if(Td)return Bo;Td=1;let e="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";return Bo={nanoid:(n=21)=>{let i="",s=n|0;for(;s-- >0;)i+=e[Math.random()*64|0];return i},customAlphabet:(n,i=21)=>(s=i)=>{let o="",l=s|0;for(;l-- >0;)o+=n[Math.random()*n.length|0];return o}},Bo}var zo,Ed;function Id(){if(Ed)return zo;Ed=1;let{existsSync:e,readFileSync:t,realpathSync:r}=_t,{dirname:n,isAbsolute:i,join:s,relative:o,sep:l}=_t,{SourceMapConsumer:c,SourceMapGenerator:a}=_t;function h(d){try{return r(d)}catch(p){return d}}function u(d){return Buffer?Buffer.from(d,"base64").toString():window.atob(d)}class f{constructor(p,m){if(m.map===!1)return;m.unsafeMap&&(this.unsafeMap=!0),this.loadAnnotation(p),this.inline=this.startWith(this.annotation,"data:");let g=m.map?m.map.prev:void 0,v=this.loadMap(m.from,g);!this.mapFile&&m.from&&(this.mapFile=m.from),this.mapFile&&(this.root=n(this.mapFile)),v&&(this.text=v)}consumer(){return this.consumerCache||(this.consumerCache=new c(this.json||this.text)),this.consumerCache}decodeInline(p){let m=/^data:application\/json;charset=utf-?8;base64,/,g=/^data:application\/json;base64,/,v=/^data:application\/json;charset=utf-?8,/,y=/^data:application\/json,/,w=p.match(v)||p.match(y);if(w)return decodeURIComponent(p.substr(w[0].length));let _=p.match(m)||p.match(g);if(_)return u(p.substr(_[0].length));let S=p.slice(22);throw S=S.slice(0,S.indexOf(",")),new Error("Unsupported source map encoding "+S)}getAnnotationURL(p){return p.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(p){return typeof p!="object"?!1:typeof p.mappings=="string"||typeof p._mappings=="string"||Array.isArray(p.sections)}loadAnnotation(p){let m=p.match(/\/\*\s*# sourceMappingURL=/g);if(!m)return;let g=p.lastIndexOf(m.pop()),v=p.indexOf("*/",g);g>-1&&v>-1&&(this.annotation=this.getAnnotationURL(p.substring(g,v)))}loadFile(p,m,g){if(!g&&!this.unsafeMap){if(!/\.map$/i.test(p)||!m)return;let v=o(h(n(m)),h(p));if(v===".."||v.startsWith(".."+l)||i(v))return}if(this.root=n(p),e(p))return this.mapFile=p,t(p,"utf-8").toString().trim()}loadMap(p,m){if(m===!1)return!1;if(m){if(typeof m=="string")return m;if(typeof m=="function"){let g=m(p);if(g){let v=this.loadFile(g,p,!0);if(!v)throw new Error("Unable to load previous source map: "+g.toString());return v}}else{if(m instanceof c)return a.fromSourceMap(m).toString();if(m instanceof a)return m.toString();if(this.isMap(m))return JSON.stringify(m);throw new Error("Unsupported previous source map format: "+m.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let g=this.annotation;p&&(g=s(n(p),g));let v=this.loadFile(g,p,!1);if(v)try{this.json=JSON.parse(v.replace(/^\)]}'[^\n]*\n/,""))}catch(y){return}return v}}}startWith(p,m){return p?p.substr(0,m.length)===m:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return zo=f,f.default=f,zo}var Ko,Cd;function Oi(){if(Cd)return Ko;Cd=1;let{nanoid:e}=a0(),{isAbsolute:t,resolve:r}=_t,{SourceMapConsumer:n,SourceMapGenerator:i}=_t,{fileURLToPath:s,pathToFileURL:o}=_t,l=Xo(),c=Id(),a=_t,h=Symbol("lineToIndexCache"),u=!!(n&&i),f=!!(r&&t);function d(m){if(m[h])return m[h];let g=m.css.split(`
|
|
69
|
+
`),v=new Array(g.length),y=0;for(let w=0,_=g.length;w<_;w++)v[w]=y,y+=g[w].length+1;return m[h]=v,v}class p{get from(){return this.file||this.id}constructor(g,v={}){if(g===null||typeof g=="undefined"||typeof g=="object"&&!g.toString)throw new Error(`PostCSS received ${g} instead of CSS string`);if(this.css=g.toString(),this.css[0]==="\uFEFF"||this.css[0]===""?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,v.document&&(this.document=v.document.toString()),v.from&&(!f||/^\w+:\/\//.test(v.from)||t(v.from)?this.file=v.from:this.file=r(v.from)),f&&u){let y=new c(this.css,v);if(y.text){this.map=y;let w=y.consumer().file;!this.file&&w&&(this.file=this.mapResolve(w))}}this.file||(this.id="<input css "+e(6)+">"),this.map&&(this.map.file=this.from)}error(g,v,y,w={}){let _,S,b,R,I;if(v&&typeof v=="object"){let C=v,N=y;if(typeof C.offset=="number"){R=C.offset;let G=this.fromOffset(R);v=G.line,y=G.col}else v=C.line,y=C.column,R=this.fromLineAndColumn(v,y);if(typeof N.offset=="number"){b=N.offset;let G=this.fromOffset(b);S=G.line,_=G.col}else S=N.line,_=N.column,b=this.fromLineAndColumn(N.line,N.column)}else if(y)R=this.fromLineAndColumn(v,y);else{R=v;let C=this.fromOffset(R);v=C.line,y=C.col}let E=this.origin(v,y,S,_);return E?I=new l(g,E.endLine===void 0?E.line:{column:E.column,line:E.line},E.endLine===void 0?E.column:{column:E.endColumn,line:E.endLine},E.source,E.file,w.plugin):I=new l(g,S===void 0?v:{column:y,line:v},S===void 0?y:{column:_,line:S},this.css,this.file,w.plugin),I.input={column:y,endColumn:_,endLine:S,endOffset:b,line:v,offset:R,source:this.css},this.file&&(o&&(I.input.url=o(this.file).toString()),I.input.file=this.file),I}fromLineAndColumn(g,v){return d(this)[g-1]+v-1}fromOffset(g){let v=d(this),y=v[v.length-1],w=0;if(g>=y)w=v.length-1;else{let _=v.length-2,S;for(;w<_;)if(S=w+(_-w>>1),g<v[S])_=S-1;else if(g>=v[S+1])w=S+1;else{w=S;break}}return{col:g-v[w]+1,line:w+1}}mapResolve(g){return/^\w+:\/\//.test(g)?g:r(this.map.consumer().sourceRoot||this.map.root||".",g)}origin(g,v,y,w){if(!this.map)return!1;let _=this.map.consumer(),S=_.originalPositionFor({column:v-1,line:g});if(!S.source)return!1;let b;if(typeof y=="number"){let C=_.originalPositionFor({column:w-1,line:y});C.source&&(b=C)}let R;t(S.source)?R=o(S.source):R=new URL(S.source,this.map.consumer().sourceRoot||o(this.map.mapFile));let I={column:S.column+1,endColumn:b&&b.column+1,endLine:b&&b.line,line:S.line,url:R.toString()};if(R.protocol==="file:")if(s)I.file=s(R);else throw new Error("file: protocol is not available in this PostCSS build");let E=_.sourceContentFor(S.source);return E&&(I.source=E),I}toJSON(){let g={};for(let v of["hasBOM","css","file","id"])this[v]!=null&&(g[v]=this[v]);return this.map&&(g.map=x({},this.map),g.map.consumerCache&&(g.map.consumerCache=void 0)),g}}return Ko=p,p.default=p,a&&a.registerInput&&a.registerInput(p),Ko}var jo,Zd;function yn(){if(Zd)return jo;Zd=1;let e=zt(),t,r;class n extends e{constructor(s){super(s),this.type="root",this.nodes||(this.nodes=[])}normalize(s,o,l){let c=new Set;for(let h of Array.isArray(s)?s:[s])h&&typeof h=="object"&&!h.parent&&h.raws&&typeof h.raws.before!="undefined"&&c.add(h.raws);let a=super.normalize(s);if(o){if(l==="prepend")this.nodes.length>1?o.raws.before=this.nodes[1].raws.before:delete o.raws.before;else if(this.first!==o)for(let h of a)c.has(h.raws)||(h.raws.before=o.raws.before)}return a}removeChild(s,o){let l=this.index(s);return!o&&l===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[l].raws.before),super.removeChild(s)}toResult(s={}){return new t(new r,this,s).stringify()}}return n.registerLazyResult=i=>{t=i},n.registerProcessor=i=>{r=i},jo=n,n.default=n,e.registerRoot(n),jo}var Qo,Ld;function xd(){if(Ld)return Qo;Ld=1;let e={comma(t){return e.split(t,[","],!0)},space(t){let r=[" ",`
|
|
70
|
+
`," "];return e.split(t,r)},split(t,r,n){if(typeof t!="string")return[];let i=[],s="",o=!1,l=0,c=!1,a="",h=!1;for(let u of t)h?h=!1:u==="\\"?h=!0:c?u===a&&(c=!1):u==='"'||u==="'"?(c=!0,a=u):u==="("?l+=1:u===")"?l>0&&(l-=1):l===0&&r.includes(u)&&(o=!0),o?(s!==""&&i.push(s.trim()),s="",o=!1):s+=u;return(n||s!=="")&&i.push(s.trim()),i}};return Qo=e,e.default=e,Qo}var $o,Nd;function qo(){if(Nd)return $o;Nd=1;let e=zt(),t=xd();class r extends e{get selectors(){return t.comma(this.selector)}set selectors(i){let s=this.selector?this.selector.match(/,\s*/):null,o=s?s[0]:","+this.raw("between","beforeOpen");this.selector=i.join(o)}constructor(i){super(i),this.type="rule",this.nodes||(this.nodes=[])}}return $o=r,r.default=r,e.registerRule(r),$o}var ea,Od;function l0(){if(Od)return ea;Od=1;let e=Jo(),t=xi(),r=Ni(),n=Oi(),i=Id(),s=yn(),o=qo();function l(h,u){return h.inputs?h.inputs.map(f=>{let d=B(x({},f),{__proto__:n.prototype});return d.map&&(d.map=B(x({},d.map),{__proto__:i.prototype})),d}):u}function c(h,u,f){let d=x({},h);if(delete d.inputs,delete d.nodes,d.source){let m=d.source,{inputId:g}=m,v=nt(m,["inputId"]);d.source=v,g!=null&&(d.source.input=u[g])}let p;if(d.type==="root")p=new s(d);else if(d.type==="decl")p=new r(d);else if(d.type==="rule")p=new o(d);else if(d.type==="comment")p=new t(d);else if(d.type==="atrule")p=new e(d);else throw new Error("Unknown node type: "+h.type);if(f){p.nodes=f;for(let g of f)g.parent=p}return p}function a(h,u){if(Array.isArray(h))return h.map(p=>a(p));let f,d=[{childIndex:0,children:[],inputs:l(h,u),json:h}];for(;d.length>0;){let p=d[d.length-1],m=p.json.nodes;if(m&&p.childIndex<m.length){let v=m[p.childIndex];p.childIndex+=1,d.push({childIndex:0,children:[],inputs:l(v,p.inputs),json:v});continue}d.pop();let g=c(p.json,p.inputs,m?p.children:void 0);d.length>0?d[d.length-1].children.push(g):f=g}return f}return ea=a,a.default=a,ea}var ta,Gd;function Vd(){if(Gd)return ta;Gd=1;let{dirname:e,relative:t,resolve:r,sep:n}=_t,{SourceMapConsumer:i,SourceMapGenerator:s}=_t,{pathToFileURL:o}=_t,l=Oi(),c=!!(i&&s),a=!!(e&&r&&t&&n);class h{constructor(f,d,p,m){this.stringify=f,this.mapOpts=p.map||{},this.root=d,this.opts=p,this.css=m,this.originalCSS=m,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let f;this.isInline()?f="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?f=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?f=this.mapOpts.annotation(this.opts.to,this.root):f=this.outputFile()+".map";let d=`
|
|
71
71
|
`;this.css.includes(`\r
|
|
72
72
|
`)&&(d=`\r
|
|
73
73
|
`),this.css+=d+"/*# sourceMappingURL="+f+" */"}applyPrevMaps(){for(let f of this.previous()){let d=this.toUrl(this.path(f.file)),p=f.root||e(f.file),m;this.mapOpts.sourcesContent===!1?(m=new i(f.text),m.sourcesContent&&(m.sourcesContent=null)):m=f.consumer(),this.map.applySourceMap(m,d,this.toUrl(this.path(p)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1){if(this.root){let f;for(let d=this.root.nodes.length-1;d>=0;d--)f=this.root.nodes[d],f.type==="comment"&&f.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(d)}else if(this.css){let f;for(;(f=this.css.lastIndexOf("/*#"))!==-1;){let d=this.css.indexOf("*/",f+3);if(d===-1)break;for(;f>0&&this.css[f-1]===`
|
|
74
|
-
`;)f--;this.css=this.css.slice(0,f)+this.css.slice(d+2)}}}}generate(){if(this.clearAnnotation(),a&&
|
|
75
|
-
`),d=y.length-g):d+=y.length,w&&_!=="start"){let S=w.parent||{raws:{}};(!(w.type==="decl"||w.type==="atrule"&&!w.nodes)||w!==S.last||S.raws.semicolon)&&(w.source&&w.source.end?(m.source=this.sourcePath(w),m.original.line=w.source.end.line,m.original.column=w.source.end.column-1,m.generated.line=f,m.generated.column=d-2,this.map.addMapping(m)):(m.source=p,m.original.line=1,m.original.column=0,m.generated.line=f,m.generated.column=d-1,this.map.addMapping(m)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation!="undefined"?this.mapOpts.annotation:this.previous().length?this.previous().some(f=>f.annotation):!0}isInline(){if(typeof this.mapOpts.inline!="undefined")return this.mapOpts.inline;let f=this.mapOpts.annotation;return typeof f!="undefined"&&f!==!0?!1:this.previous().length?this.previous().some(d=>d.inline):!0}isMap(){return typeof this.opts.map!="undefined"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent!="undefined"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(f=>f.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(f){if(this.mapOpts.absolute||f.charCodeAt(0)===60||/^\w+:\/\//.test(f))return f;let d=this.memoizedPaths.get(f);if(d)return d;let p=this.opts.to?e(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(p=e(r(p,this.mapOpts.annotation)));let m=t(p,f);return this.memoizedPaths.set(f,m),m}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(f=>{if(f.source&&f.source.input.map){let d=f.source.input.map;this.previousMaps.includes(d)||this.previousMaps.push(d)}});else{let f=new l(this.originalCSS,this.opts);f.map&&this.previousMaps.push(f.map)}return this.previousMaps}setSourcesContent(){let f={};if(this.root)this.root.walk(d=>{if(d.source){let p=d.source.input.from;if(p&&!f[p]){f[p]=!0;let m=this.usesFileUrls?this.toFileUrl(p):this.toUrl(this.path(p));this.map.setSourceContent(m,d.source.input.css)}}});else if(this.css){let d=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(d,this.css)}}sourcePath(f){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(f.source.input.from):this.toUrl(this.path(f.source.input.from))}toBase64(f){return Buffer?Buffer.from(f).toString("base64"):window.btoa(unescape(encodeURIComponent(f)))}toFileUrl(f){let d=this.memoizedFileURLs.get(f);if(d)return d;if(o){let p=o(f).toString();return this.memoizedFileURLs.set(f,p),p}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(f){let d=this.memoizedURLs.get(f);if(d)return d;n==="\\"&&(f=f.replace(/\\/g,"/"));let p=encodeURI(f).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(f,p),p}}return ea=h,ea}var ta,Gd;function i0(){if(Gd)return ta;Gd=1;const e=39,t=34,r=92,n=47,i=10,s=32,o=12,l=9,u=13,a=91,h=93,c=40,f=41,d=123,p=125,m=59,g=42,v=58,y=64,w=/[\t\n\f\r "#'()/;[\\\]{}]/g,_=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,S=/.[\r\n"'(/\\]/,b=/[\da-f]/i;return ta=function(I,E={}){let C=I.css.valueOf(),N=E.ignoreErrors,G,$,Z,T,W,k,M,P,U,Q,me=C.length,O=0,ye=[],de=[],ve=-1;function D(){return O}function F(z){throw I.error("Unclosed "+z,O)}function H(){return de.length===0&&O>=me}function j(z){if(de.length)return de.pop();if(O>=me)return;let ie=z?z.ignoreUnclosed:!1;switch(G=C.charCodeAt(O),G){case i:case s:case l:case u:case o:{T=O;do T+=1,G=C.charCodeAt(T);while(G===s||G===i||G===l||G===u||G===o);k=["space",C.slice(O,T)],O=T-1;break}case a:case h:case d:case p:case v:case m:case f:{let ue=String.fromCharCode(G);k=[ue,ue,O];break}case c:{if(Q=ye.length?ye.pop()[1]:"",U=C.charCodeAt(O+1),Q==="url"&&U!==e&&U!==t&&U!==s&&U!==i&&U!==l&&U!==o&&U!==u){T=O;do{if(M=!1,T=C.indexOf(")",T+1),T===-1)if(N||ie){T=O;break}else F("bracket");for(P=T;C.charCodeAt(P-1)===r;)P-=1,M=!M}while(M);k=["brackets",C.slice(O,T+1),O,T],O=T}else O<=ve?k=["(","(",O]:(T=C.indexOf(")",O+1),$=C.slice(O,T+1),T===-1||S.test($)?(ve=T===-1?me:T,k=["(","(",O]):(k=["brackets",$,O,T],O=T));break}case e:case t:{W=G===e?"'":'"',T=O;do{if(M=!1,T=C.indexOf(W,T+1),T===-1)if(N||ie){T=O+1;break}else F("string");for(P=T;C.charCodeAt(P-1)===r;)P-=1,M=!M}while(M);k=["string",C.slice(O,T+1),O,T],O=T;break}case y:{w.lastIndex=O+1,w.test(C),w.lastIndex===0?T=C.length-1:T=w.lastIndex-2,k=["at-word",C.slice(O,T+1),O,T],O=T;break}case r:{for(T=O,Z=!0;C.charCodeAt(T+1)===r;)T+=1,Z=!Z;if(G=C.charCodeAt(T+1),Z&&G!==n&&G!==s&&G!==i&&G!==l&&G!==u&&G!==o&&(T+=1,b.test(C.charAt(T)))){for(;b.test(C.charAt(T+1));)T+=1;C.charCodeAt(T+1)===s&&(T+=1)}k=["word",C.slice(O,T+1),O,T],O=T;break}default:{G===n&&C.charCodeAt(O+1)===g?(T=C.indexOf("*/",O+2)+1,T===0&&(N||ie?T=C.length:F("comment")),k=["comment",C.slice(O,T+1),O,T],O=T):(_.lastIndex=O+1,_.test(C),_.lastIndex===0?T=C.length-1:T=_.lastIndex-2,k=["word",C.slice(O,T+1),O,T],ye.push(k),O=T);break}}return O++,k}function te(z){de.push(z)}return{back:te,endOfFile:H,nextToken:j,position:D}},ta}var ra,Vd;function s0(){if(Vd)return ra;Vd=1;let e=Fo(),t=Ci(),r=Zi(),n=yn(),i=$o(),s=i0();const o={empty:!0,space:!0};function l(h){for(let c=h.length-1;c>=0;c--){let f=h[c],d=f[3]||f[2];if(d)return d}}function u(h,c,f){let d="";for(let p=c;p<f;p++)d+=h[p][1];return d}class a{constructor(c){this.input=c,this.root=new n,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:c,start:{column:1,line:1,offset:0}}}atrule(c){let f=new e;f.name=c[1].slice(1),f.name===""&&this.unnamedAtrule(f,c),this.init(f,c[2]);let d,p,m,g=!1,v=!1,y=[],w=[];for(;!this.tokenizer.endOfFile();){if(c=this.tokenizer.nextToken(),d=c[0],d==="("||d==="["?w.push(d==="("?")":"]"):d==="{"&&w.length>0?w.push("}"):d===w[w.length-1]&&w.pop(),w.length===0)if(d===";"){f.source.end=this.getPosition(c[2]),f.source.end.offset++,this.semicolon=!0;break}else if(d==="{"){v=!0;break}else if(d==="}"){if(y.length>0){for(m=y.length-1,p=y[m];p&&p[0]==="space";)p=y[--m];p&&(f.source.end=this.getPosition(p[3]||p[2]),f.source.end.offset++)}this.end(c);break}else y.push(c);else y.push(c);if(this.tokenizer.endOfFile()){g=!0;break}}f.raws.between=this.spacesAndCommentsFromEnd(y),y.length?(f.raws.afterName=this.spacesAndCommentsFromStart(y),this.raw(f,"params",y),g&&(c=y[y.length-1],f.source.end=this.getPosition(c[3]||c[2]),f.source.end.offset++,this.spaces=f.raws.between,f.raws.between="")):(f.raws.afterName="",f.params=""),v&&(f.nodes=[],this.current=f)}checkMissedSemicolon(c){let f=this.colon(c);if(f===!1)return;let d=0,p;for(let m=f-1;m>=0&&(p=c[m],!(p[0]!=="space"&&(d+=1,d===2)));m--);throw this.input.error("Missed semicolon",p[0]==="word"?p[3]+1:p[2])}colon(c){let f=0,d,p,m;for(let[g,v]of c.entries()){if(p=v,m=p[0],m==="("&&(f+=1),m===")"&&(f-=1),f===0&&m===":")if(!d)this.doubleColon(p);else{if(d[0]==="word"&&d[1]==="progid")continue;return g}d=p}return!1}comment(c){let f=new t;this.init(f,c[2]),f.source.end=this.getPosition(c[3]||c[2]),f.source.end.offset++;let d=c[1].slice(2,-2);if(!d.trim())f.text="",f.raws.left=d,f.raws.right="";else{let p=d.match(/^(\s*)([^]*\S)(\s*)$/);f.text=p[2],f.raws.left=p[1],f.raws.right=p[3]}}createTokenizer(){this.tokenizer=s(this.input)}decl(c,f){let d=new r;this.init(d,c[0][2]);let p=c[c.length-1];p[0]===";"&&(this.semicolon=!0,c.pop()),d.source.end=this.getPosition(p[3]||p[2]||l(c)),d.source.end.offset++;let m=0;for(;c[m][0]!=="word";)m===c.length-1&&this.unknownWord([c[m]]),m++;d.raws.before+=u(c,0,m),d.source.start=this.getPosition(c[m][2]);let g=m;for(;m<c.length;){let b=c[m][0];if(b===":"||b==="space"||b==="comment")break;m++}d.prop=u(c,g,m);let v=m,y;for(;m<c.length&&(y=c[m],m++,y[0]!==":");)y[0]==="word"&&/\w/.test(y[1])&&this.unknownWord([y]);d.raws.between=u(c,v,m),(d.prop[0]==="_"||d.prop[0]==="*")&&(d.raws.before+=d.prop[0],d.prop=d.prop.slice(1));let w=m;for(;m<c.length;){let b=c[m][0];if(b!=="space"&&b!=="comment")break;m++}let _=c.slice(w,m);c=c.slice(m),this.precheckMissedSemicolon(c);for(let b=c.length-1;b>=0;b--){if(y=c[b],y[1].toLowerCase()==="!important"){d.important=!0;let R=this.stringFrom(c,b);R=this.spacesFromEnd(c)+R,R!==" !important"&&(d.raws.important=R);break}else if(y[1].toLowerCase()==="important"){let R=c.slice(0),I="";for(let E=b;E>0;E--){let C=R[E][0];if(I.trim().startsWith("!")&&C!=="space")break;I=R.pop()[1]+I}I.trim().startsWith("!")&&(d.important=!0,d.raws.important=I,c=R)}if(y[0]!=="space"&&y[0]!=="comment")break}c.some(b=>b[0]!=="space"&&b[0]!=="comment")&&(d.raws.between+=_.map(b=>b[1]).join(""),_=[]),this.raw(d,"value",_.concat(c),f),d.value.includes(":")&&!f&&this.checkMissedSemicolon(c)}doubleColon(c){throw this.input.error("Double colon",{offset:c[2]},{offset:c[2]+c[1].length})}emptyRule(c){let f=new i;this.init(f,c[2]),f.selector="",f.raws.between="",this.current=f}end(c){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(c[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(c)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(c){if(this.spaces+=c[1],this.current.nodes){let f=this.current.nodes[this.current.nodes.length-1];f&&f.type==="rule"&&!f.raws.ownSemicolon&&(f.raws.ownSemicolon=this.spaces,this.spaces="",f.source.end=this.getPosition(c[2]),f.source.end.offset+=f.raws.ownSemicolon.length)}}getPosition(c){let f=this.input.fromOffset(c);return{column:f.col,line:f.line,offset:c}}init(c,f){this.current.push(c),c.source={input:this.input,start:this.getPosition(f)},c.raws.before=this.spaces,this.spaces="",c.type!=="comment"&&(this.semicolon=!1)}other(c){let f=!1,d=null,p=!1,m=null,g=[],v=c[1].startsWith("--"),y=[],w=c;for(;w;){if(d=w[0],y.push(w),d==="("||d==="[")m||(m=w),g.push(d==="("?")":"]");else if(v&&p&&d==="{")m||(m=w),g.push("}");else if(g.length===0)if(d===";")if(p){this.decl(y,v);return}else break;else if(d==="{"){this.rule(y);return}else if(d==="}"){this.tokenizer.back(y.pop()),f=!0;break}else d===":"&&(p=!0);else d===g[g.length-1]&&(g.pop(),g.length===0&&(m=null));w=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(f=!0),g.length>0&&this.unclosedBracket(m),f&&p){if(!v)for(;y.length&&(w=y[y.length-1][0],!(w!=="space"&&w!=="comment"));)this.tokenizer.back(y.pop());this.decl(y,v)}else this.unknownWord(y)}parse(){let c;for(;!this.tokenizer.endOfFile();)switch(c=this.tokenizer.nextToken(),c[0]){case"space":this.spaces+=c[1];break;case";":this.freeSemicolon(c);break;case"}":this.end(c);break;case"comment":this.comment(c);break;case"at-word":this.atrule(c);break;case"{":this.emptyRule(c);break;default:this.other(c);break}this.endFile()}precheckMissedSemicolon(){}raw(c,f,d,p){let m,g,v=d.length,y="",w=!0,_,S;for(let b=0;b<v;b+=1)m=d[b],g=m[0],g==="space"&&b===v-1&&!p?w=!1:g==="comment"?(S=d[b-1]?d[b-1][0]:"empty",_=d[b+1]?d[b+1][0]:"empty",!o[S]&&!o[_]?y.slice(-1)===","?w=!1:y+=m[1]:w=!1):y+=m[1];if(!w){let b=d.reduce((R,I)=>R+I[1],"");c.raws[f]={raw:b,value:y}}c[f]=y}rule(c){c.pop();let f=new i;this.init(f,c[0][2]),f.raws.between=this.spacesAndCommentsFromEnd(c),this.raw(f,"selector",c),this.current=f}spacesAndCommentsFromEnd(c){let f,d="";for(;c.length&&(f=c[c.length-1][0],!(f!=="space"&&f!=="comment"));)d=c.pop()[1]+d;return d}spacesAndCommentsFromStart(c){let f,d="";for(;c.length&&(f=c[0][0],!(f!=="space"&&f!=="comment"));)d+=c.shift()[1];return d}spacesFromEnd(c){let f,d="";for(;c.length&&(f=c[c.length-1][0],f==="space");)d=c.pop()[1]+d;return d}stringFrom(c,f){let d="";for(let p=f;p<c.length;p++)d+=c[p][1];return c.splice(f,c.length-f),d}unclosedBlock(){let c=this.current.source.start;throw this.input.error("Unclosed block",c.line,c.column)}unclosedBracket(c){throw this.input.error("Unclosed bracket",{offset:c[2]},{offset:c[2]+1})}unexpectedClose(c){throw this.input.error("Unexpected }",{offset:c[2]},{offset:c[2]+1})}unknownWord(c){throw this.input.error("Unknown word "+c[0][1],{offset:c[0][2]},{offset:c[0][2]+c[0][1].length})}unnamedAtrule(c,f){throw this.input.error("At-rule without name",{offset:f[2]},{offset:f[2]+f[1].length})}}return ra=a,ra}var na,kd;function ia(){if(kd)return na;kd=1;let e=zt(),t=Li(),r=s0();function n(i,s){let o=new t(i,s),l=new r(o);try{l.parse()}catch(u){throw process.env.NODE_ENV!=="production"&&u.name==="CssSyntaxError"&&s&&s.from&&(/\.scss$/i.test(s.from)?u.message+=`
|
|
76
|
-
You tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser`:/\.sass/i.test(s.from)?
|
|
77
|
-
You tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser`:/\.less$/i.test(s.from)&&(
|
|
78
|
-
You tried to parse Less with the standard CSS parser; try again with the postcss-less parser`)),u}return l.root}return na=n,n.default=n,e.registerParse(n),na}var sa,Xd;function Wd(){if(Xd)return sa;Xd=1;let e=zt(),{my:t}=Ei();class r{constructor(i,s={}){if(this.type="warning",this.text=i,s.node&&s.node.source){s.node[t]||e.rebuild(s.node);let o=s.node.rangeBy(s);this.line=o.start.line,this.column=o.start.column,this.endLine=o.end.line,this.endColumn=o.end.column}for(let o in s)this[o]=s[o]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}return sa=r,r.default=r,sa}var oa,Pd;function aa(){if(Pd)return oa;Pd=1;let e=Wd();class t{get content(){return this.css}constructor(n,i,s){this.processor=n,this.messages=[],this.root=i,this.opts=s,this.css="",this.map=void 0}toString(){return this.css}warn(n,i={}){i.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(i.plugin=this.lastPlugin.postcssPlugin);let s=new e(n,i);return this.messages.push(s),s}warnings(){return this.messages.filter(n=>n.type==="warning")}}return oa=t,t.default=t,oa}var la,Md;function Ad(){if(Md)return la;Md=1;let e={};return la=function(r){e[r]||(e[r]=!0,typeof console!="undefined"&&console.warn&&console.warn(r))},la}var ua,Ud;function Dd(){if(Ud)return ua;Ud=1;let e=zt(),t=Ho(),r=Od(),n=ia(),i=aa(),s=yn(),o=_i(),{isClean:l,my:u}=Ei(),a=Ad();const h={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},c={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},f={Once:!0,postcssPlugin:!0,prepare:!0},d=0;function p(_){return typeof _=="object"&&typeof _.then=="function"}function m(_){let S=!1,b=h[_.type];return _.type==="decl"?S=_.prop.toLowerCase():_.type==="atrule"&&(S=_.name.toLowerCase()),S&&_.append?[b,b+"-"+S,d,b+"Exit",b+"Exit-"+S]:S?[b,b+"-"+S,b+"Exit",b+"Exit-"+S]:_.append?[b,d,b+"Exit"]:[b,b+"Exit"]}function g(_){let S;return _.type==="document"?S=["Document",d,"DocumentExit"]:_.type==="root"?S=["Root",d,"RootExit"]:S=m(_),{eventIndex:0,events:S,iterator:0,node:_,visitorIndex:0,visitors:[]}}function v(_){let S=[_];for(;S.length>0;){let b=S.pop();if(b[l]=!1,b.nodes)for(let R of b.nodes)S.push(R)}return _}let y={};class w{get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}constructor(S,b,R){this.stringified=!1,this.processed=!1;let I;if(typeof b=="object"&&b!==null&&(b.type==="root"||b.type==="document"))I=v(b);else if(b instanceof w||b instanceof i)I=v(b.root),b.map&&(typeof R.map=="undefined"&&(R.map={}),R.map.inline||(R.map.inline=!1),R.map.prev=b.map);else{let E=n;R.syntax&&(E=R.syntax.parse),R.parser&&(E=R.parser),E.parse&&(E=E.parse);try{I=E(b,R)}catch(C){this.processed=!0,this.error=C}I&&!I[u]&&e.rebuild(I)}this.result=new i(S,I,R),this.helpers=B(x({},y),{postcss:y,result:this.result}),this.plugins=this.processor.plugins.map(E=>typeof E=="object"&&E.prepare?x(x({},E),E.prepare(this.result)):E)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(S){return this.async().catch(S)}finally(S){return this.async().then(S,S)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(S,b){let R=this.result.lastPlugin;try{if(b&&b.addToError(S),this.error=S,S.name==="CssSyntaxError"&&!S.plugin)S.plugin=R.postcssPlugin,S.setMessage();else if(R.postcssVersion&&process.env.NODE_ENV!=="production"){let I=R.postcssPlugin,E=R.postcssVersion,C=this.result.processor.version,N=E.split("."),G=C.split(".");(N[0]!==G[0]||parseInt(N[1])>parseInt(G[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+C+", but "+I+" uses "+E+". Perhaps this is the source of the error below.")}}catch(I){console&&console.error&&console.error(I)}return S}prepareVisitors(){this.listeners={};let S=(b,R,I)=>{this.listeners[R]||(this.listeners[R]=[]),this.listeners[R].push([b,I])};for(let b of this.plugins)if(typeof b=="object")for(let R in b){if(!c[R]&&/^[A-Z]/.test(R))throw new Error(`Unknown event ${R} in ${b.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!f[R])if(typeof b[R]=="object")for(let I in b[R])I==="*"?S(b,R,b[R][I]):S(b,R+"-"+I.toLowerCase(),b[R][I]);else typeof b[R]=="function"&&S(b,R,b[R])}this.hasListener=Object.keys(this.listeners).length>0}runAsync(){return q(this,null,function*(){this.plugin=0;for(let S=0;S<this.plugins.length;S++){let b=this.plugins[S],R=this.runOnRoot(b);if(p(R))try{yield R}catch(I){throw this.handleError(I)}}if(this.prepareVisitors(),this.hasListener){let S=this.result.root;for(;!S[l];){S[l]=!0;let b=[g(S)];for(;b.length>0;){let R=this.visitTick(b);if(p(R))try{yield R}catch(I){let E=b[b.length-1].node;throw this.handleError(I,E)}}}if(this.listeners.OnceExit)for(let[b,R]of this.listeners.OnceExit){this.result.lastPlugin=b;try{if(S.type==="document"){let I=S.nodes.map(E=>R(E,this.helpers));yield Promise.all(I)}else yield R(S,this.helpers)}catch(I){throw this.handleError(I)}}}return this.processed=!0,this.stringify()})}runOnRoot(S){this.result.lastPlugin=S;try{if(typeof S=="object"&&S.Once){if(this.result.root.type==="document"){let b=this.result.root.nodes.map(R=>S.Once(R,this.helpers));return p(b[0])?Promise.all(b):b}return S.Once(this.result.root,this.helpers)}else if(typeof S=="function")return S(this.result.root,this.result)}catch(b){throw this.handleError(b)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let S=this.result.opts,b=o;S.syntax&&(b=S.syntax.stringify),S.stringifier&&(b=S.stringifier),b.stringify&&(b=b.stringify);let R=this.result.root.source;if(S.map===void 0&&!(R&&R.input&&R.input.map)){let C="";return b(this.result.root,N=>{C+=N}),this.result.css=C,this.result}let E=new r(b,this.result.root,this.result.opts).generate();return this.result.css=E[0],this.result.map=E[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let S of this.plugins){let b=this.runOnRoot(S);if(p(b))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let S=this.result.root;for(;!S[l];)S[l]=!0,this.walkSync(S);if(this.listeners.OnceExit)if(S.type==="document")for(let b of S.nodes)this.visitSync(this.listeners.OnceExit,b);else this.visitSync(this.listeners.OnceExit,S)}return this.result}then(S,b){return process.env.NODE_ENV!=="production"&&("from"in this.opts||a("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(S,b)}toString(){return this.css}visitSync(S,b){for(let[R,I]of S){this.result.lastPlugin=R;let E;try{E=I(b,this.helpers)}catch(C){throw this.handleError(C,b.proxyOf)}if(b.type!=="root"&&b.type!=="document"&&!b.parent)return!0;if(p(E))throw this.getAsyncError()}}visitTick(S){let b=S[S.length-1],{node:R,visitors:I}=b;if(R.type!=="root"&&R.type!=="document"&&!R.parent){S.pop();return}if(I.length>0&&b.visitorIndex<I.length){let[C,N]=I[b.visitorIndex];b.visitorIndex+=1,b.visitorIndex===I.length&&(b.visitors=[],b.visitorIndex=0),this.result.lastPlugin=C;try{return N(R.toProxy(),this.helpers)}catch(G){throw this.handleError(G,R)}}if(b.iterator!==0){let C=b.iterator;b.descending&&(b.descending=!1,R.indexes[C]+=1);let N;for(;N=R.nodes[R.indexes[C]];){if(!N[l]){N[l]=!0,b.descending=!0,S.push(g(N));return}R.indexes[C]+=1}b.iterator=0,delete R.indexes[C]}let E=b.events;for(;b.eventIndex<E.length;){let C=E[b.eventIndex];if(b.eventIndex+=1,C===d){R.nodes&&R.nodes.length&&(R[l]=!0,b.iterator=R.getIterator());return}else if(this.listeners[C]){b.visitors=this.listeners[C];return}}S.pop()}walkSync(S){S[l]=!0;let b=[{eventIndex:0,events:m(S),iterator:0,node:S}];for(;b.length>0;){let R=b[b.length-1],I=R.node;if(R.iterator!==0){let E=R.iterator;R.descending&&(R.descending=!1,I.indexes[E]+=1);let C,N=!1;for(;C=I.nodes[I.indexes[E]];){if(!C[l]){C[l]=!0,R.descending=!0,b.push({eventIndex:0,events:m(C),iterator:0,node:C}),N=!0;break}I.indexes[E]+=1}if(N)continue;R.iterator=0,delete I.indexes[E]}if(R.eventIndex<R.events.length){let E=R.events[R.eventIndex];if(R.eventIndex+=1,E===d)I.nodes&&I.nodes.length&&(R.iterator=I.getIterator());else{let C=this.listeners[E];C&&this.visitSync(C,I.toProxy())&&b.pop()}continue}b.pop()}}warnings(){return this.sync().warnings()}}return w.registerPostcss=_=>{y=_},ua=w,w.default=w,s.registerLazyResult(w),t.registerLazyResult(w),ua}var ca,Fd;function o0(){if(Fd)return ca;Fd=1;let e=Od(),t=ia(),r=aa(),n=_i(),i=Ad();class s{get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let l,u=t;try{l=u(this._css,this._opts)}catch(a){this.error=a}if(this.error)throw this.error;return this._root=l,l}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(l,u,a){u=u.toString(),this.stringified=!1,this._processor=l,this._css=u,this._opts=a,this._map=void 0;let h=n;this.result=new r(this._processor,void 0,this._opts),this.result.css=u;let c=this;Object.defineProperty(this.result,"root",{get(){return c.root}});let f=new e(h,void 0,this._opts,u);if(f.isMap()){let[d,p]=f.generate();d&&(this.result.css=d),p&&(this.result.map=p)}else f.clearAnnotation(),this.result.css=f.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(l){return this.async().catch(l)}finally(l){return this.async().then(l,l)}sync(){if(this.error)throw this.error;return this.result}then(l,u){return process.env.NODE_ENV!=="production"&&("from"in this._opts||i("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(l,u)}toString(){return this._css}warnings(){return[]}}return ca=s,s.default=s,ca}var da,Jd;function a0(){if(Jd)return da;Jd=1;let e=Ho(),t=Dd(),r=o0(),n=yn();class i{constructor(o=[]){this.version="8.5.26",this.plugins=this.normalize(o)}normalize(o){let l=[];for(let u of o)if(u.postcss===!0?u=u():u.postcss&&(u=u.postcss),typeof u=="object"&&Array.isArray(u.plugins))l=l.concat(u.plugins);else if(typeof u=="object"&&u.postcssPlugin)l.push(u);else if(typeof u=="function")l.push(u);else if(typeof u=="object"&&(u.parse||u.stringify)){if(process.env.NODE_ENV!=="production")throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}else throw new Error(u+" is not a PostCSS plugin");return l}process(o,l={}){return!this.plugins.length&&!l.parser&&!l.stringifier&&!l.syntax?new r(this,o,l):new t(this,o,l)}use(o){return this.plugins=this.plugins.concat(this.normalize([o])),this}}return da=i,i.default=i,n.registerProcessor(i),e.registerProcessor(i),da}var ha,Hd;function l0(){if(Hd)return ha;Hd=1;let e=Fo(),t=Ci(),r=zt(),n=ko(),i=Zi(),s=Ho(),o=n0(),l=Li(),u=Dd(),a=Zd(),h=Ii(),c=ia(),f=a0(),d=aa(),p=yn(),m=$o(),g=_i(),v=Wd();function y(...w){return w.length===1&&Array.isArray(w[0])&&(w=w[0]),new f(w)}return y.plugin=function(_,S){let b=!1;function R(...E){console&&console.warn&&!b&&(b=!0,console.warn(_+`: postcss.plugin was deprecated. Migration guide:
|
|
74
|
+
`;)f--;this.css=this.css.slice(0,f)+this.css.slice(d+2)}}}}generate(){if(this.clearAnnotation(),a&&c&&this.isMap())return this.generateMap();{let f="";return this.stringify(this.root,d=>{f+=d}),[f]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let f=this.previous()[0].consumer();f.file=this.outputFile(),this.map=s.fromSourceMap(f,{ignoreInvalidMapping:!0})}else this.map=new s({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new s({file:this.outputFile(),ignoreInvalidMapping:!0});let f=1,d=1,p="<no source>",m={generated:{column:0,line:0},original:{column:0,line:0},source:""},g,v;this.stringify(this.root,(y,w,_)=>{if(this.css+=y,w&&_!=="end"&&(m.generated.line=f,m.generated.column=d-1,w.source&&w.source.start?(m.source=this.sourcePath(w),m.original.line=w.source.start.line,m.original.column=w.source.start.column-1,this.map.addMapping(m)):(m.source=p,m.original.line=1,m.original.column=0,this.map.addMapping(m))),v=y.match(/\n/g),v?(f+=v.length,g=y.lastIndexOf(`
|
|
75
|
+
`),d=y.length-g):d+=y.length,w&&_!=="start"){let S=w.parent||{raws:{}};(!(w.type==="decl"||w.type==="atrule"&&!w.nodes)||w!==S.last||S.raws.semicolon)&&(w.source&&w.source.end?(m.source=this.sourcePath(w),m.original.line=w.source.end.line,m.original.column=w.source.end.column-1,m.generated.line=f,m.generated.column=d-2,this.map.addMapping(m)):(m.source=p,m.original.line=1,m.original.column=0,m.generated.line=f,m.generated.column=d-1,this.map.addMapping(m)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation!="undefined"?this.mapOpts.annotation:this.previous().length?this.previous().some(f=>f.annotation):!0}isInline(){if(typeof this.mapOpts.inline!="undefined")return this.mapOpts.inline;let f=this.mapOpts.annotation;return typeof f!="undefined"&&f!==!0?!1:this.previous().length?this.previous().some(d=>d.inline):!0}isMap(){return typeof this.opts.map!="undefined"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent!="undefined"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(f=>f.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(f){if(this.mapOpts.absolute||f.charCodeAt(0)===60||/^\w+:\/\//.test(f))return f;let d=this.memoizedPaths.get(f);if(d)return d;let p=this.opts.to?e(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(p=e(r(p,this.mapOpts.annotation)));let m=t(p,f);return this.memoizedPaths.set(f,m),m}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(f=>{if(f.source&&f.source.input.map){let d=f.source.input.map;this.previousMaps.includes(d)||this.previousMaps.push(d)}});else{let f=new l(this.originalCSS,this.opts);f.map&&this.previousMaps.push(f.map)}return this.previousMaps}setSourcesContent(){let f={};if(this.root)this.root.walk(d=>{if(d.source){let p=d.source.input.from;if(p&&!f[p]){f[p]=!0;let m=this.usesFileUrls?this.toFileUrl(p):this.toUrl(this.path(p));this.map.setSourceContent(m,d.source.input.css)}}});else if(this.css){let d=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(d,this.css)}}sourcePath(f){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(f.source.input.from):this.toUrl(this.path(f.source.input.from))}toBase64(f){return Buffer?Buffer.from(f).toString("base64"):window.btoa(unescape(encodeURIComponent(f)))}toFileUrl(f){let d=this.memoizedFileURLs.get(f);if(d)return d;if(o){let p=o(f).toString();return this.memoizedFileURLs.set(f,p),p}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(f){let d=this.memoizedURLs.get(f);if(d)return d;n==="\\"&&(f=f.replace(/\\/g,"/"));let p=encodeURI(f).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(f,p),p}}return ta=h,ta}var ra,kd;function c0(){if(kd)return ra;kd=1;const e=39,t=34,r=92,n=47,i=10,s=32,o=12,l=9,c=13,a=91,h=93,u=40,f=41,d=123,p=125,m=59,g=42,v=58,y=64,w=/[\t\n\f\r "#'()/;[\\\]{}]/g,_=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,S=/.[\r\n"'(/\\]/,b=/[\da-f]/i;return ra=function(I,E={}){let C=I.css.valueOf(),N=E.ignoreErrors,G,q,Z,T,W,k,M,P,U,$,me=C.length,O=0,ye=[],de=[],ve=-1;function D(){return O}function F(K){throw I.error("Unclosed "+K,O)}function H(){return de.length===0&&O>=me}function Q(K){if(de.length)return de.pop();if(O>=me)return;let ie=K?K.ignoreUnclosed:!1;switch(G=C.charCodeAt(O),G){case i:case s:case l:case c:case o:{T=O;do T+=1,G=C.charCodeAt(T);while(G===s||G===i||G===l||G===c||G===o);k=["space",C.slice(O,T)],O=T-1;break}case a:case h:case d:case p:case v:case m:case f:{let ce=String.fromCharCode(G);k=[ce,ce,O];break}case u:{if($=ye.length?ye.pop()[1]:"",U=C.charCodeAt(O+1),$==="url"&&U!==e&&U!==t&&U!==s&&U!==i&&U!==l&&U!==o&&U!==c){T=O;do{if(M=!1,T=C.indexOf(")",T+1),T===-1)if(N||ie){T=O;break}else F("bracket");for(P=T;C.charCodeAt(P-1)===r;)P-=1,M=!M}while(M);k=["brackets",C.slice(O,T+1),O,T],O=T}else O<=ve?k=["(","(",O]:(T=C.indexOf(")",O+1),q=C.slice(O,T+1),T===-1||S.test(q)?(ve=T===-1?me:T,k=["(","(",O]):(k=["brackets",q,O,T],O=T));break}case e:case t:{W=G===e?"'":'"',T=O;do{if(M=!1,T=C.indexOf(W,T+1),T===-1)if(N||ie){T=O+1;break}else F("string");for(P=T;C.charCodeAt(P-1)===r;)P-=1,M=!M}while(M);k=["string",C.slice(O,T+1),O,T],O=T;break}case y:{w.lastIndex=O+1,w.test(C),w.lastIndex===0?T=C.length-1:T=w.lastIndex-2,k=["at-word",C.slice(O,T+1),O,T],O=T;break}case r:{for(T=O,Z=!0;C.charCodeAt(T+1)===r;)T+=1,Z=!Z;if(G=C.charCodeAt(T+1),Z&&G!==n&&G!==s&&G!==i&&G!==l&&G!==c&&G!==o&&(T+=1,b.test(C.charAt(T)))){for(;b.test(C.charAt(T+1));)T+=1;C.charCodeAt(T+1)===s&&(T+=1)}k=["word",C.slice(O,T+1),O,T],O=T;break}default:{G===n&&C.charCodeAt(O+1)===g?(T=C.indexOf("*/",O+2)+1,T===0&&(N||ie?T=C.length:F("comment")),k=["comment",C.slice(O,T+1),O,T],O=T):(_.lastIndex=O+1,_.test(C),_.lastIndex===0?T=C.length-1:T=_.lastIndex-2,k=["word",C.slice(O,T+1),O,T],ye.push(k),O=T);break}}return O++,k}function te(K){de.push(K)}return{back:te,endOfFile:H,nextToken:Q,position:D}},ra}var na,Xd;function u0(){if(Xd)return na;Xd=1;let e=Jo(),t=xi(),r=Ni(),n=yn(),i=qo(),s=c0();const o={empty:!0,space:!0};function l(h){for(let u=h.length-1;u>=0;u--){let f=h[u],d=f[3]||f[2];if(d)return d}}function c(h,u,f){let d="";for(let p=u;p<f;p++)d+=h[p][1];return d}class a{constructor(u){this.input=u,this.root=new n,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:u,start:{column:1,line:1,offset:0}}}atrule(u){let f=new e;f.name=u[1].slice(1),f.name===""&&this.unnamedAtrule(f,u),this.init(f,u[2]);let d,p,m,g=!1,v=!1,y=[],w=[];for(;!this.tokenizer.endOfFile();){if(u=this.tokenizer.nextToken(),d=u[0],d==="("||d==="["?w.push(d==="("?")":"]"):d==="{"&&w.length>0?w.push("}"):d===w[w.length-1]&&w.pop(),w.length===0)if(d===";"){f.source.end=this.getPosition(u[2]),f.source.end.offset++,this.semicolon=!0;break}else if(d==="{"){v=!0;break}else if(d==="}"){if(y.length>0){for(m=y.length-1,p=y[m];p&&p[0]==="space";)p=y[--m];p&&(f.source.end=this.getPosition(p[3]||p[2]),f.source.end.offset++)}this.end(u);break}else y.push(u);else y.push(u);if(this.tokenizer.endOfFile()){g=!0;break}}f.raws.between=this.spacesAndCommentsFromEnd(y),y.length?(f.raws.afterName=this.spacesAndCommentsFromStart(y),this.raw(f,"params",y),g&&(u=y[y.length-1],f.source.end=this.getPosition(u[3]||u[2]),f.source.end.offset++,this.spaces=f.raws.between,f.raws.between="")):(f.raws.afterName="",f.params=""),v&&(f.nodes=[],this.current=f)}checkMissedSemicolon(u){let f=this.colon(u);if(f===!1)return;let d=0,p;for(let m=f-1;m>=0&&(p=u[m],!(p[0]!=="space"&&(d+=1,d===2)));m--);throw this.input.error("Missed semicolon",p[0]==="word"?p[3]+1:p[2])}colon(u){let f=0,d,p,m;for(let[g,v]of u.entries()){if(p=v,m=p[0],m==="("&&(f+=1),m===")"&&(f-=1),f===0&&m===":")if(!d)this.doubleColon(p);else{if(d[0]==="word"&&d[1]==="progid")continue;return g}d=p}return!1}comment(u){let f=new t;this.init(f,u[2]),f.source.end=this.getPosition(u[3]||u[2]),f.source.end.offset++;let d=u[1].slice(2,-2);if(!d.trim())f.text="",f.raws.left=d,f.raws.right="";else{let p=d.match(/^(\s*)([^]*\S)(\s*)$/);f.text=p[2],f.raws.left=p[1],f.raws.right=p[3]}}createTokenizer(){this.tokenizer=s(this.input)}decl(u,f){let d=new r;this.init(d,u[0][2]);let p=u[u.length-1];p[0]===";"&&(this.semicolon=!0,u.pop()),d.source.end=this.getPosition(p[3]||p[2]||l(u)),d.source.end.offset++;let m=0;for(;u[m][0]!=="word";)m===u.length-1&&this.unknownWord([u[m]]),m++;d.raws.before+=c(u,0,m),d.source.start=this.getPosition(u[m][2]);let g=m;for(;m<u.length;){let b=u[m][0];if(b===":"||b==="space"||b==="comment")break;m++}d.prop=c(u,g,m);let v=m,y;for(;m<u.length&&(y=u[m],m++,y[0]!==":");)y[0]==="word"&&/\w/.test(y[1])&&this.unknownWord([y]);d.raws.between=c(u,v,m),(d.prop[0]==="_"||d.prop[0]==="*")&&(d.raws.before+=d.prop[0],d.prop=d.prop.slice(1));let w=m;for(;m<u.length;){let b=u[m][0];if(b!=="space"&&b!=="comment")break;m++}let _=u.slice(w,m);u=u.slice(m),this.precheckMissedSemicolon(u);for(let b=u.length-1;b>=0;b--){if(y=u[b],y[1].toLowerCase()==="!important"){d.important=!0;let R=this.stringFrom(u,b);R=this.spacesFromEnd(u)+R,R!==" !important"&&(d.raws.important=R);break}else if(y[1].toLowerCase()==="important"){let R=u.slice(0),I="";for(let E=b;E>0;E--){let C=R[E][0];if(I.trim().startsWith("!")&&C!=="space")break;I=R.pop()[1]+I}I.trim().startsWith("!")&&(d.important=!0,d.raws.important=I,u=R)}if(y[0]!=="space"&&y[0]!=="comment")break}u.some(b=>b[0]!=="space"&&b[0]!=="comment")&&(d.raws.between+=_.map(b=>b[1]).join(""),_=[]),this.raw(d,"value",_.concat(u),f),d.value.includes(":")&&!f&&this.checkMissedSemicolon(u)}doubleColon(u){throw this.input.error("Double colon",{offset:u[2]},{offset:u[2]+u[1].length})}emptyRule(u){let f=new i;this.init(f,u[2]),f.selector="",f.raws.between="",this.current=f}end(u){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(u[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(u)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(u){if(this.spaces+=u[1],this.current.nodes){let f=this.current.nodes[this.current.nodes.length-1];f&&f.type==="rule"&&!f.raws.ownSemicolon&&(f.raws.ownSemicolon=this.spaces,this.spaces="",f.source.end=this.getPosition(u[2]),f.source.end.offset+=f.raws.ownSemicolon.length)}}getPosition(u){let f=this.input.fromOffset(u);return{column:f.col,line:f.line,offset:u}}init(u,f){this.current.push(u),u.source={input:this.input,start:this.getPosition(f)},u.raws.before=this.spaces,this.spaces="",u.type!=="comment"&&(this.semicolon=!1)}other(u){let f=!1,d=null,p=!1,m=null,g=[],v=u[1].startsWith("--"),y=[],w=u;for(;w;){if(d=w[0],y.push(w),d==="("||d==="[")m||(m=w),g.push(d==="("?")":"]");else if(v&&p&&d==="{")m||(m=w),g.push("}");else if(g.length===0)if(d===";")if(p){this.decl(y,v);return}else break;else if(d==="{"){this.rule(y);return}else if(d==="}"){this.tokenizer.back(y.pop()),f=!0;break}else d===":"&&(p=!0);else d===g[g.length-1]&&(g.pop(),g.length===0&&(m=null));w=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(f=!0),g.length>0&&this.unclosedBracket(m),f&&p){if(!v)for(;y.length&&(w=y[y.length-1][0],!(w!=="space"&&w!=="comment"));)this.tokenizer.back(y.pop());this.decl(y,v)}else this.unknownWord(y)}parse(){let u;for(;!this.tokenizer.endOfFile();)switch(u=this.tokenizer.nextToken(),u[0]){case"space":this.spaces+=u[1];break;case";":this.freeSemicolon(u);break;case"}":this.end(u);break;case"comment":this.comment(u);break;case"at-word":this.atrule(u);break;case"{":this.emptyRule(u);break;default:this.other(u);break}this.endFile()}precheckMissedSemicolon(){}raw(u,f,d,p){let m,g,v=d.length,y="",w=!0,_,S;for(let b=0;b<v;b+=1)m=d[b],g=m[0],g==="space"&&b===v-1&&!p?w=!1:g==="comment"?(S=d[b-1]?d[b-1][0]:"empty",_=d[b+1]?d[b+1][0]:"empty",!o[S]&&!o[_]?y.slice(-1)===","?w=!1:y+=m[1]:w=!1):y+=m[1];if(!w){let b=d.reduce((R,I)=>R+I[1],"");u.raws[f]={raw:b,value:y}}u[f]=y}rule(u){u.pop();let f=new i;this.init(f,u[0][2]),f.raws.between=this.spacesAndCommentsFromEnd(u),this.raw(f,"selector",u),this.current=f}spacesAndCommentsFromEnd(u){let f,d="";for(;u.length&&(f=u[u.length-1][0],!(f!=="space"&&f!=="comment"));)d=u.pop()[1]+d;return d}spacesAndCommentsFromStart(u){let f,d="";for(;u.length&&(f=u[0][0],!(f!=="space"&&f!=="comment"));)d+=u.shift()[1];return d}spacesFromEnd(u){let f,d="";for(;u.length&&(f=u[u.length-1][0],f==="space");)d=u.pop()[1]+d;return d}stringFrom(u,f){let d="";for(let p=f;p<u.length;p++)d+=u[p][1];return u.splice(f,u.length-f),d}unclosedBlock(){let u=this.current.source.start;throw this.input.error("Unclosed block",u.line,u.column)}unclosedBracket(u){throw this.input.error("Unclosed bracket",{offset:u[2]},{offset:u[2]+1})}unexpectedClose(u){throw this.input.error("Unexpected }",{offset:u[2]},{offset:u[2]+1})}unknownWord(u){throw this.input.error("Unknown word "+u[0][1],{offset:u[0][2]},{offset:u[0][2]+u[0][1].length})}unnamedAtrule(u,f){throw this.input.error("At-rule without name",{offset:f[2]},{offset:f[2]+f[1].length})}}return na=a,na}var ia,Wd;function sa(){if(Wd)return ia;Wd=1;let e=zt(),t=Oi(),r=u0();function n(i,s){let o=new t(i,s),l=new r(o);try{l.parse()}catch(c){throw process.env.NODE_ENV!=="production"&&c.name==="CssSyntaxError"&&s&&s.from&&(/\.scss$/i.test(s.from)?c.message+=`
|
|
76
|
+
You tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser`:/\.sass/i.test(s.from)?c.message+=`
|
|
77
|
+
You tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser`:/\.less$/i.test(s.from)&&(c.message+=`
|
|
78
|
+
You tried to parse Less with the standard CSS parser; try again with the postcss-less parser`)),c}return l.root}return ia=n,n.default=n,e.registerParse(n),ia}var oa,Pd;function Md(){if(Pd)return oa;Pd=1;let e=zt(),{my:t}=Zi();class r{constructor(i,s={}){if(this.type="warning",this.text=i,s.node&&s.node.source){s.node[t]||e.rebuild(s.node);let o=s.node.rangeBy(s);this.line=o.start.line,this.column=o.start.column,this.endLine=o.end.line,this.endColumn=o.end.column}for(let o in s)this[o]=s[o]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}return oa=r,r.default=r,oa}var aa,Ad;function la(){if(Ad)return aa;Ad=1;let e=Md();class t{get content(){return this.css}constructor(n,i,s){this.processor=n,this.messages=[],this.root=i,this.opts=s,this.css="",this.map=void 0}toString(){return this.css}warn(n,i={}){i.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(i.plugin=this.lastPlugin.postcssPlugin);let s=new e(n,i);return this.messages.push(s),s}warnings(){return this.messages.filter(n=>n.type==="warning")}}return aa=t,t.default=t,aa}var ca,Ud;function Dd(){if(Ud)return ca;Ud=1;let e={};return ca=function(r){e[r]||(e[r]=!0,typeof console!="undefined"&&console.warn&&console.warn(r))},ca}var ua,Fd;function Jd(){if(Fd)return ua;Fd=1;let e=zt(),t=Yo(),r=Vd(),n=sa(),i=la(),s=yn(),o=Ii(),{isClean:l,my:c}=Zi(),a=Dd();const h={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},u={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},f={Once:!0,postcssPlugin:!0,prepare:!0},d=0;function p(_){return typeof _=="object"&&typeof _.then=="function"}function m(_){let S=!1,b=h[_.type];return _.type==="decl"?S=_.prop.toLowerCase():_.type==="atrule"&&(S=_.name.toLowerCase()),S&&_.append?[b,b+"-"+S,d,b+"Exit",b+"Exit-"+S]:S?[b,b+"-"+S,b+"Exit",b+"Exit-"+S]:_.append?[b,d,b+"Exit"]:[b,b+"Exit"]}function g(_){let S;return _.type==="document"?S=["Document",d,"DocumentExit"]:_.type==="root"?S=["Root",d,"RootExit"]:S=m(_),{eventIndex:0,events:S,iterator:0,node:_,visitorIndex:0,visitors:[]}}function v(_){let S=[_];for(;S.length>0;){let b=S.pop();if(b[l]=!1,b.nodes)for(let R of b.nodes)S.push(R)}return _}let y={};class w{get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}constructor(S,b,R){this.stringified=!1,this.processed=!1;let I;if(typeof b=="object"&&b!==null&&(b.type==="root"||b.type==="document"))I=v(b);else if(b instanceof w||b instanceof i)I=v(b.root),b.map&&(typeof R.map=="undefined"&&(R.map={}),R.map.inline||(R.map.inline=!1),R.map.prev=b.map);else{let E=n;R.syntax&&(E=R.syntax.parse),R.parser&&(E=R.parser),E.parse&&(E=E.parse);try{I=E(b,R)}catch(C){this.processed=!0,this.error=C}I&&!I[c]&&e.rebuild(I)}this.result=new i(S,I,R),this.helpers=B(x({},y),{postcss:y,result:this.result}),this.plugins=this.processor.plugins.map(E=>typeof E=="object"&&E.prepare?x(x({},E),E.prepare(this.result)):E)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(S){return this.async().catch(S)}finally(S){return this.async().then(S,S)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(S,b){let R=this.result.lastPlugin;try{if(b&&b.addToError(S),this.error=S,S.name==="CssSyntaxError"&&!S.plugin)S.plugin=R.postcssPlugin,S.setMessage();else if(R.postcssVersion&&process.env.NODE_ENV!=="production"){let I=R.postcssPlugin,E=R.postcssVersion,C=this.result.processor.version,N=E.split("."),G=C.split(".");(N[0]!==G[0]||parseInt(N[1])>parseInt(G[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+C+", but "+I+" uses "+E+". Perhaps this is the source of the error below.")}}catch(I){console&&console.error&&console.error(I)}return S}prepareVisitors(){this.listeners={};let S=(b,R,I)=>{this.listeners[R]||(this.listeners[R]=[]),this.listeners[R].push([b,I])};for(let b of this.plugins)if(typeof b=="object")for(let R in b){if(!u[R]&&/^[A-Z]/.test(R))throw new Error(`Unknown event ${R} in ${b.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!f[R])if(typeof b[R]=="object")for(let I in b[R])I==="*"?S(b,R,b[R][I]):S(b,R+"-"+I.toLowerCase(),b[R][I]);else typeof b[R]=="function"&&S(b,R,b[R])}this.hasListener=Object.keys(this.listeners).length>0}runAsync(){return z(this,null,function*(){this.plugin=0;for(let S=0;S<this.plugins.length;S++){let b=this.plugins[S],R=this.runOnRoot(b);if(p(R))try{yield R}catch(I){throw this.handleError(I)}}if(this.prepareVisitors(),this.hasListener){let S=this.result.root;for(;!S[l];){S[l]=!0;let b=[g(S)];for(;b.length>0;){let R=this.visitTick(b);if(p(R))try{yield R}catch(I){let E=b[b.length-1].node;throw this.handleError(I,E)}}}if(this.listeners.OnceExit)for(let[b,R]of this.listeners.OnceExit){this.result.lastPlugin=b;try{if(S.type==="document"){let I=S.nodes.map(E=>R(E,this.helpers));yield Promise.all(I)}else yield R(S,this.helpers)}catch(I){throw this.handleError(I)}}}return this.processed=!0,this.stringify()})}runOnRoot(S){this.result.lastPlugin=S;try{if(typeof S=="object"&&S.Once){if(this.result.root.type==="document"){let b=this.result.root.nodes.map(R=>S.Once(R,this.helpers));return p(b[0])?Promise.all(b):b}return S.Once(this.result.root,this.helpers)}else if(typeof S=="function")return S(this.result.root,this.result)}catch(b){throw this.handleError(b)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let S=this.result.opts,b=o;S.syntax&&(b=S.syntax.stringify),S.stringifier&&(b=S.stringifier),b.stringify&&(b=b.stringify);let R=this.result.root.source;if(S.map===void 0&&!(R&&R.input&&R.input.map)){let C="";return b(this.result.root,N=>{C+=N}),this.result.css=C,this.result}let E=new r(b,this.result.root,this.result.opts).generate();return this.result.css=E[0],this.result.map=E[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let S of this.plugins){let b=this.runOnRoot(S);if(p(b))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let S=this.result.root;for(;!S[l];)S[l]=!0,this.walkSync(S);if(this.listeners.OnceExit)if(S.type==="document")for(let b of S.nodes)this.visitSync(this.listeners.OnceExit,b);else this.visitSync(this.listeners.OnceExit,S)}return this.result}then(S,b){return process.env.NODE_ENV!=="production"&&("from"in this.opts||a("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(S,b)}toString(){return this.css}visitSync(S,b){for(let[R,I]of S){this.result.lastPlugin=R;let E;try{E=I(b,this.helpers)}catch(C){throw this.handleError(C,b.proxyOf)}if(b.type!=="root"&&b.type!=="document"&&!b.parent)return!0;if(p(E))throw this.getAsyncError()}}visitTick(S){let b=S[S.length-1],{node:R,visitors:I}=b;if(R.type!=="root"&&R.type!=="document"&&!R.parent){S.pop();return}if(I.length>0&&b.visitorIndex<I.length){let[C,N]=I[b.visitorIndex];b.visitorIndex+=1,b.visitorIndex===I.length&&(b.visitors=[],b.visitorIndex=0),this.result.lastPlugin=C;try{return N(R.toProxy(),this.helpers)}catch(G){throw this.handleError(G,R)}}if(b.iterator!==0){let C=b.iterator;b.descending&&(b.descending=!1,R.indexes[C]+=1);let N;for(;N=R.nodes[R.indexes[C]];){if(!N[l]){N[l]=!0,b.descending=!0,S.push(g(N));return}R.indexes[C]+=1}b.iterator=0,delete R.indexes[C]}let E=b.events;for(;b.eventIndex<E.length;){let C=E[b.eventIndex];if(b.eventIndex+=1,C===d){R.nodes&&R.nodes.length&&(R[l]=!0,b.iterator=R.getIterator());return}else if(this.listeners[C]){b.visitors=this.listeners[C];return}}S.pop()}walkSync(S){S[l]=!0;let b=[{eventIndex:0,events:m(S),iterator:0,node:S}];for(;b.length>0;){let R=b[b.length-1],I=R.node;if(R.iterator!==0){let E=R.iterator;R.descending&&(R.descending=!1,I.indexes[E]+=1);let C,N=!1;for(;C=I.nodes[I.indexes[E]];){if(!C[l]){C[l]=!0,R.descending=!0,b.push({eventIndex:0,events:m(C),iterator:0,node:C}),N=!0;break}I.indexes[E]+=1}if(N)continue;R.iterator=0,delete I.indexes[E]}if(R.eventIndex<R.events.length){let E=R.events[R.eventIndex];if(R.eventIndex+=1,E===d)I.nodes&&I.nodes.length&&(R.iterator=I.getIterator());else{let C=this.listeners[E];C&&this.visitSync(C,I.toProxy())&&b.pop()}continue}b.pop()}}warnings(){return this.sync().warnings()}}return w.registerPostcss=_=>{y=_},ua=w,w.default=w,s.registerLazyResult(w),t.registerLazyResult(w),ua}var da,Hd;function d0(){if(Hd)return da;Hd=1;let e=Vd(),t=sa(),r=la(),n=Ii(),i=Dd();class s{get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let l,c=t;try{l=c(this._css,this._opts)}catch(a){this.error=a}if(this.error)throw this.error;return this._root=l,l}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(l,c,a){c=c.toString(),this.stringified=!1,this._processor=l,this._css=c,this._opts=a,this._map=void 0;let h=n;this.result=new r(this._processor,void 0,this._opts),this.result.css=c;let u=this;Object.defineProperty(this.result,"root",{get(){return u.root}});let f=new e(h,void 0,this._opts,c);if(f.isMap()){let[d,p]=f.generate();d&&(this.result.css=d),p&&(this.result.map=p)}else f.clearAnnotation(),this.result.css=f.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(l){return this.async().catch(l)}finally(l){return this.async().then(l,l)}sync(){if(this.error)throw this.error;return this.result}then(l,c){return process.env.NODE_ENV!=="production"&&("from"in this._opts||i("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(l,c)}toString(){return this._css}warnings(){return[]}}return da=s,s.default=s,da}var ha,Yd;function h0(){if(Yd)return ha;Yd=1;let e=Yo(),t=Jd(),r=d0(),n=yn();class i{constructor(o=[]){this.version="8.5.26",this.plugins=this.normalize(o)}normalize(o){let l=[];for(let c of o)if(c.postcss===!0?c=c():c.postcss&&(c=c.postcss),typeof c=="object"&&Array.isArray(c.plugins))l=l.concat(c.plugins);else if(typeof c=="object"&&c.postcssPlugin)l.push(c);else if(typeof c=="function")l.push(c);else if(typeof c=="object"&&(c.parse||c.stringify)){if(process.env.NODE_ENV!=="production")throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}else throw new Error(c+" is not a PostCSS plugin");return l}process(o,l={}){return!this.plugins.length&&!l.parser&&!l.stringifier&&!l.syntax?new r(this,o,l):new t(this,o,l)}use(o){return this.plugins=this.plugins.concat(this.normalize([o])),this}}return ha=i,i.default=i,n.registerProcessor(i),e.registerProcessor(i),ha}var fa,Bd;function f0(){if(Bd)return fa;Bd=1;let e=Jo(),t=xi(),r=zt(),n=Xo(),i=Ni(),s=Yo(),o=l0(),l=Oi(),c=Jd(),a=xd(),h=Li(),u=sa(),f=h0(),d=la(),p=yn(),m=qo(),g=Ii(),v=Md();function y(...w){return w.length===1&&Array.isArray(w[0])&&(w=w[0]),new f(w)}return y.plugin=function(_,S){let b=!1;function R(...E){console&&console.warn&&!b&&(b=!0,console.warn(_+`: postcss.plugin was deprecated. Migration guide:
|
|
79
79
|
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(_+`: 里面 postcss.plugin 被弃用. 迁移指南:
|
|
80
|
-
https://www.w3ctech.com/topic/2226`));let C=S(...E);return C.postcssPlugin=_,C.postcssVersion=new f().version,C}let I;return Object.defineProperty(R,"postcss",{get(){return I||(I=R()),I}}),R.process=function(E,C,N){return y([R(N)]).process(E,C)},R},y.stringify=g,y.parse=
|
|
81
|
-
`+b+l("^")}let v=o(g.replace(/\d/g," "))+d.slice(0,this.column-1).replace(/[^\t]/g," ");return l(">")+o(g)+
|
|
82
|
-
`+v+l("^")}return" "+o(g)+
|
|
80
|
+
https://www.w3ctech.com/topic/2226`));let C=S(...E);return C.postcssPlugin=_,C.postcssVersion=new f().version,C}let I;return Object.defineProperty(R,"postcss",{get(){return I||(I=R()),I}}),R.process=function(E,C,N){return y([R(N)]).process(E,C)},R},y.stringify=g,y.parse=u,y.fromJSON=o,y.list=a,y.comment=w=>new t(w),y.atRule=w=>new e(w),y.decl=w=>new i(w),y.rule=w=>new m(w),y.root=w=>new p(w),y.document=w=>new s(w),y.CssSyntaxError=n,y.Declaration=i,y.Container=r,y.Processor=f,y.Document=s,y.Comment=t,y.Warning=v,y.AtRule=e,y.Result=d,y.Input=l,y.Rule=m,y.Root=p,y.Node=h,c.registerPostcss(y),fa=y,y.default=y,fa}f0();var p0=Object.defineProperty,m0=(e,t,r)=>t in e?p0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ut=(e,t,r)=>m0(e,typeof t!="symbol"?t+"":t,r);Date.now().toString();function g0(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var r=function n(){return this instanceof n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return e[n]}})}),r}var Gi={exports:{}},zd;function y0(){if(zd)return Gi.exports;zd=1;var e=String,t=function(){return{isColorSupported:!1,reset:e,bold:e,dim:e,italic:e,underline:e,inverse:e,hidden:e,strikethrough:e,black:e,red:e,green:e,yellow:e,blue:e,magenta:e,cyan:e,white:e,gray:e,bgBlack:e,bgRed:e,bgGreen:e,bgYellow:e,bgBlue:e,bgMagenta:e,bgCyan:e,bgWhite:e,blackBright:e,redBright:e,greenBright:e,yellowBright:e,blueBright:e,magentaBright:e,cyanBright:e,whiteBright:e,bgBlackBright:e,bgRedBright:e,bgGreenBright:e,bgYellowBright:e,bgBlueBright:e,bgMagentaBright:e,bgCyanBright:e,bgWhiteBright:e}};return Gi.exports=t(),Gi.exports.createColors=t,Gi.exports}const Tt=g0(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var pa,Kd;function ma(){if(Kd)return pa;Kd=1;let e=y0(),t=Tt;class r extends Error{constructor(i,s,o,l,c,a){super(i),this.name="CssSyntaxError",this.reason=i,c&&(this.file=c),l&&(this.source=l),a&&(this.plugin=a),typeof s!="undefined"&&typeof o!="undefined"&&(typeof s=="number"?(this.line=s,this.column=o):(this.line=s.line,this.column=s.column,this.endLine=o.line,this.endColumn=o.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,r)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line!="undefined"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(i){if(!this.source)return"";let s=this.source;i==null&&(i=e.isColorSupported);let o=d=>d,l=d=>d,c=d=>d;if(i){let{bold:d,gray:p,red:m}=e.createColors(!0);l=g=>d(m(g)),o=g=>p(g),t&&(c=g=>t(g))}let a=s.split(/\r?\n/),h=Math.max(this.line-3,0),u=Math.min(this.line+2,a.length),f=String(u).length;return a.slice(h,u).map((d,p)=>{let m=h+1+p,g=" "+(" "+m).slice(-f)+" | ";if(m===this.line){if(d.length>160){let y=20,w=Math.max(0,this.column-y),_=Math.max(this.column+y,this.endColumn+y),S=d.slice(w,_),b=o(g.replace(/\d/g," "))+d.slice(0,Math.min(this.column-1,y-1)).replace(/[^\t]/g," ");return l(">")+o(g)+c(S)+`
|
|
81
|
+
`+b+l("^")}let v=o(g.replace(/\d/g," "))+d.slice(0,this.column-1).replace(/[^\t]/g," ");return l(">")+o(g)+c(d)+`
|
|
82
|
+
`+v+l("^")}return" "+o(g)+c(d)}).join(`
|
|
83
83
|
`)}toString(){let i=this.showSourceCode();return i&&(i=`
|
|
84
84
|
|
|
85
85
|
`+i+`
|
|
86
|
-
`),this.name+": "+this.message+i}}return
|
|
86
|
+
`),this.name+": "+this.message+i}}return pa=r,r.default=r,pa}var ga,jd;function Qd(){if(jd)return ga;jd=1;const e=/(<)(\/?style\b)/gi,t=/(<)(!--)/g,r=/[\t\n\f\r "#'()/;[\\\]{}]/;function n(h){return typeof h!="string"||!h.includes("<")?h:h.replace(e,"\\3c $2").replace(t,"\\3c $2")}const i={after:`
|
|
87
87
|
`,beforeClose:`
|
|
88
88
|
`,beforeComment:`
|
|
89
89
|
`,beforeDecl:`
|
|
90
90
|
`,beforeOpen:" ",beforeRule:`
|
|
91
|
-
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function s(h){return h[0].toUpperCase()+h.slice(1)}function o(h,
|
|
92
|
-
`)){let g=this.raw(
|
|
93
|
-
`)&&(f=f.replace(/[^\n]+$/,"")),!1}),f&&(f=f.replace(/\S/g,"")),f}rawBeforeComment(
|
|
94
|
-
`)&&(d=d.replace(/[^\n]+$/,"")),!1}),typeof d=="undefined"?d=this.raw(f,null,"beforeDecl"):d&&(d=d.replace(/\S/g,"")),d}rawBeforeDecl(
|
|
95
|
-
`)&&(d=d.replace(/[^\n]+$/,"")),!1}),typeof d=="undefined"?d=this.raw(f,null,"beforeRule"):d&&(d=d.replace(/\S/g,"")),d}rawBeforeOpen(
|
|
96
|
-
`)&&(f=f.replace(/[^\n]+$/,"")),!1}),f&&(f=f.replace(/\S/g,"")),f}rawColon(
|
|
97
|
-
`);return f=m[m.length-1],f=f.replace(/\S/g,""),!1}}),f}rawSemicolon(
|
|
98
|
-
`?(h=1,
|
|
99
|
-
`?(h=1,c+=1):h+=1;return{column:h,line:c,offset:p}}prev(){if(!this.parent)return;let a=this.parent.index(this);return this.parent.nodes[a-1]}rangeBy(a={}){let h="document"in this.source.input?this.source.input.document:this.source.input.css,c={column:this.source.start.column,line:this.source.start.line,offset:o(h,this.source.start)},f=this.source.end?{column:this.source.end.column+1,line:this.source.end.line,offset:typeof this.source.end.offset=="number"?this.source.end.offset:o(h,this.source.end)+1}:{column:c.column+1,line:c.line,offset:c.offset+1};if(a.word){let p=h.slice(o(h,this.source.start),o(h,this.source.end)).indexOf(a.word);p!==-1&&(c=this.positionInside(p),f=this.positionInside(p+a.word.length))}else a.start?c={column:a.start.column,line:a.start.line,offset:o(h,a.start)}:typeof a.index=="number"&&(c=this.positionInside(a.index)),a.end?f={column:a.end.column,line:a.end.line,offset:o(h,a.end)}:typeof a.endIndex=="number"?f=this.positionInside(a.endIndex):typeof a.index=="number"&&(f=this.positionInside(a.index+1));return(f.line<c.line||f.line===c.line&&f.column<=c.column)&&(f={column:c.column+1,line:c.line,offset:c.offset+1}),{end:f,start:c}}raw(a,h){return new t().raw(this,a,h)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...a){if(this.parent){let h=this,c=!1;for(let f of a)f===this?c=!0:c?(this.parent.insertAfter(h,f),h=f):this.parent.insertBefore(h,f);c||this.remove()}return this}root(){let a=this;for(;a.parent&&a.parent.type!=="document";)a=a.parent;return a}toJSON(a,h){let c=h==null;h=h||new Map;let f=[],d=[[this,f,0]];for(let m=0;m<d.length;m++){let[g,v,y]=d[m],w={};v[y]=w;for(let _ in g){if(!Object.prototype.hasOwnProperty.call(g,_)||_==="parent"||_==="proxyCache")continue;let S=g[_];if(Array.isArray(S)){let b=[];w[_]=b;for(let R=0;R<S.length;R++){let I=S[R];typeof I=="object"&&I.toJSON?I.toJSON===l.prototype.toJSON?d.push([I,b,R]):b[R]=I.toJSON(null,h):b[R]=I}}else if(typeof S=="object"&&S.toJSON)S.toJSON===l.prototype.toJSON?d.push([S,w,_]):w[_]=S.toJSON(null,h);else if(_==="source"){if(S==null)continue;let b=h.get(S.input);b==null&&(b=h.size,h.set(S.input,b)),w[_]={end:S.end,inputId:b,start:S.start}}else w[_]=S}}let p=f[0];return c&&(p.inputs=[...h.keys()].map(m=>m.toJSON())),p}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(a=r){a.stringify&&(a=a.stringify);let h="";return a(this,c=>{h+=c}),h}warn(a,h,c={}){let f={node:this};for(let d in c)f[d]=c[d];return a.warn(h,f)}}return ya=l,l.default=l,ya}var ba,qd;function ki(){if(qd)return ba;qd=1;let e=Vi();class t extends e{constructor(n){super(n),this.type="comment"}}return ba=t,t.default=t,ba}var va,eh;function Xi(){if(eh)return va;eh=1;let e=Vi();class t extends e{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(n){n&&typeof n.value!="undefined"&&typeof n.value!="string"&&(n=B(x({},n),{value:String(n.value)})),super(n),this.type="decl"}}return va=t,t.default=t,va}var Sa,th;function Kt(){if(th)return Sa;th=1;let e=ki(),t=Xi(),r=Vi(),{isClean:n,my:i}=Gi(),s,o,l,u;function a(f){let d=f.slice();for(;d.length>0;){let p=d.pop();if(delete p.source,p.nodes){p.nodes=p.nodes.slice();for(let m of p.nodes)d.push(m)}}return f.slice()}function h(f){let d=[f];for(;d.length>0;){let p=d.pop();if(p[n]=!1,p.proxyOf.nodes)for(let m of p.proxyOf.nodes)d.push(m)}}class c extends r{get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}append(...d){for(let p of d){let m=this.normalize(p,this.last);for(let g of m)this.proxyOf.nodes.push(g)}return this.markDirty(),this}cleanRaws(d){let p=[this];for(;p.length>0;){let m=p.pop();if(m!==this&&m.cleanRaws!==c.prototype.cleanRaws){m.cleanRaws(d);continue}if(r.prototype.cleanRaws.call(m,d),m.nodes)for(let g of m.nodes)p.push(g)}}each(d){if(!this.proxyOf.nodes)return;let p=this.getIterator(),m,g;for(;this.indexes[p]<this.proxyOf.nodes.length&&(m=this.indexes[p],g=d(this.proxyOf.nodes[m],m),g!==!1);)this.indexes[p]+=1;return delete this.indexes[p],g}every(d){return this.nodes.every(d)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let d=this.lastEach;return this.indexes[d]=0,d}getProxyProcessor(){return{get(d,p){return p==="proxyOf"?d:d[p]?p==="each"||typeof p=="string"&&p.startsWith("walk")?(...m)=>d[p](...m.map(g=>typeof g=="function"?(v,y)=>g(v.toProxy(),y):g)):p==="every"||p==="some"?m=>d[p]((g,...v)=>m(g.toProxy(),...v)):p==="root"?()=>d.root().toProxy():p==="nodes"?d.nodes.map(m=>m.toProxy()):p==="first"||p==="last"?d[p].toProxy():d[p]:d[p]},set(d,p,m){return d[p]===m||(d[p]=m,(p==="name"||p==="params"||p==="selector")&&d.markDirty()),!0}}}index(d){return typeof d=="number"?d:(d.proxyOf&&(d=d.proxyOf),this.proxyOf.nodes.indexOf(d))}insertAfter(d,p){let m=this.index(d),g=this.normalize(p,this.proxyOf.nodes[m]).reverse();m=this.index(d);for(let y of g)this.proxyOf.nodes.splice(m+1,0,y);let v;for(let y in this.indexes)v=this.indexes[y],m<v&&(this.indexes[y]=v+g.length);return this.markDirty(),this}insertBefore(d,p){let m=this.index(d),g=m===0?"prepend":!1,v=this.normalize(p,this.proxyOf.nodes[m],g).reverse();m=this.index(d);for(let w of v)this.proxyOf.nodes.splice(m,0,w);let y;for(let w in this.indexes)y=this.indexes[w],m<=y&&(this.indexes[w]=y+v.length);return this.markDirty(),this}normalize(d,p){if(typeof d=="string")d=a(o(d).nodes);else if(typeof d=="undefined")d=[];else if(Array.isArray(d)){d=d.slice(0);for(let g of d)g.parent&&g.parent.removeChild(g,"ignore")}else if(d.type==="root"&&this.type!=="document"){d=d.nodes.slice(0);for(let g of d)g.parent&&g.parent.removeChild(g,"ignore")}else if(d.type)d=[d];else if(d.prop){if(typeof d.value=="undefined")throw new Error("Value field is missed in node creation");typeof d.value!="string"&&(d.value=String(d.value)),d=[new t(d)]}else if(d.selector||d.selectors)d=[new u(d)];else if(d.name)d=[new s(d)];else if(d.text)d=[new e(d)];else throw new Error("Unknown node type in node creation");return d.map(g=>(g[i]||c.rebuild(g),g=g.proxyOf,g.parent&&g.parent.removeChild(g),g[n]&&h(g),g.raws||(g.raws={}),typeof g.raws.before=="undefined"&&p&&typeof p.raws.before!="undefined"&&(g.raws.before=p.raws.before.replace(/\S/g,"")),g.parent=this.proxyOf,g))}prepend(...d){d=d.reverse();for(let p of d){let m=this.normalize(p,this.first,"prepend").reverse();for(let g of m)this.proxyOf.nodes.unshift(g);for(let g in this.indexes)this.indexes[g]=this.indexes[g]+m.length}return this.markDirty(),this}push(d){return d.parent=this,this.proxyOf.nodes.push(d),this}removeAll(){for(let d of this.proxyOf.nodes)d.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(d){d=this.index(d),this.proxyOf.nodes[d].parent=void 0,this.proxyOf.nodes.splice(d,1);let p;for(let m in this.indexes)p=this.indexes[m],p>=d&&(this.indexes[m]=p-1);return this.markDirty(),this}replaceValues(d,p,m){return m||(m=p,p={}),this.walkDecls(g=>{p.props&&!p.props.includes(g.prop)||p.fast&&!g.value.includes(p.fast)||(g.value=g.value.replace(d,m))}),this.markDirty(),this}some(d){return this.nodes.some(d)}walk(d){if(!this.proxyOf.nodes)return;let p=[{iterator:this.getIterator(),node:this.proxyOf}];for(;p.length>0;){let{iterator:m,node:g}=p[p.length-1],v=g.indexes[m];if(v>=g.proxyOf.nodes.length){delete g.indexes[m],p.pop();let _=p[p.length-1];_&&(_.node.indexes[_.iterator]+=1);continue}let y=g.proxyOf.nodes[v],w;try{w=d(y,v)}catch(_){throw y.addToError(_)}if(w===!1){for(let _ of p)delete _.node.indexes[_.iterator];return!1}y.walk&&y.proxyOf.nodes?p.push({iterator:y.getIterator(),node:y}):g.indexes[m]+=1}}walkAtRules(d,p){return p?d instanceof RegExp?this.walk((m,g)=>{if(m.type==="atrule"&&d.test(m.name))return p(m,g)}):this.walk((m,g)=>{if(m.type==="atrule"&&m.name===d)return p(m,g)}):(p=d,this.walk((m,g)=>{if(m.type==="atrule")return p(m,g)}))}walkComments(d){return this.walk((p,m)=>{if(p.type==="comment")return d(p,m)})}walkDecls(d,p){return p?d instanceof RegExp?this.walk((m,g)=>{if(m.type==="decl"&&d.test(m.prop))return p(m,g)}):this.walk((m,g)=>{if(m.type==="decl"&&m.prop===d)return p(m,g)}):(p=d,this.walk((m,g)=>{if(m.type==="decl")return p(m,g)}))}walkRules(d,p){return p?d instanceof RegExp?this.walk((m,g)=>{if(m.type==="rule"&&d.test(m.selector))return p(m,g)}):this.walk((m,g)=>{if(m.type==="rule"&&m.selector===d)return p(m,g)}):(p=d,this.walk((m,g)=>{if(m.type==="rule")return p(m,g)}))}}return c.registerParse=f=>{o=f},c.registerRule=f=>{u=f},c.registerAtRule=f=>{s=f},c.registerRoot=f=>{l=f},Sa=c,c.default=c,c.rebuild=f=>{let d=[f];for(;d.length>0;){let p=d.pop();if(p.type==="atrule"?Object.setPrototypeOf(p,s.prototype):p.type==="rule"?Object.setPrototypeOf(p,u.prototype):p.type==="decl"?Object.setPrototypeOf(p,t.prototype):p.type==="comment"?Object.setPrototypeOf(p,e.prototype):p.type==="root"&&Object.setPrototypeOf(p,l.prototype),p[i]=!0,p.nodes)for(let m of p.nodes)d.push(m)}},Sa}var wa,rh;function Ra(){if(rh)return wa;rh=1;let e=Kt();class t extends e{constructor(n){super(n),this.type="atrule"}append(...n){return this.proxyOf.nodes||(this.nodes=[]),super.append(...n)}prepend(...n){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...n)}}return wa=t,t.default=t,e.registerAtRule(t),wa}var _a,nh;function Ta(){if(nh)return _a;nh=1;let e=Kt(),t,r;class n extends e{constructor(s){super(x({type:"document"},s)),this.nodes||(this.nodes=[])}toResult(s={}){return new t(new r,this,s).stringify()}}return n.registerLazyResult=i=>{t=i},n.registerProcessor=i=>{r=i},_a=n,n.default=n,_a}var Ea,ih;function f0(){if(ih)return Ea;ih=1;let e="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";return Ea={nanoid:(n=21)=>{let i="",s=n|0;for(;s-- >0;)i+=e[Math.random()*64|0];return i},customAlphabet:(n,i=21)=>(s=i)=>{let o="",l=s|0;for(;l-- >0;)o+=n[Math.random()*n.length|0];return o}},Ea}var Ia,sh;function oh(){if(sh)return Ia;sh=1;let{existsSync:e,readFileSync:t,realpathSync:r}=Tt,{dirname:n,isAbsolute:i,join:s,relative:o,sep:l}=Tt,{SourceMapConsumer:u,SourceMapGenerator:a}=Tt;function h(d){try{return r(d)}catch(p){return d}}function c(d){return Buffer?Buffer.from(d,"base64").toString():window.atob(d)}class f{constructor(p,m){if(m.map===!1)return;m.unsafeMap&&(this.unsafeMap=!0),this.loadAnnotation(p),this.inline=this.startWith(this.annotation,"data:");let g=m.map?m.map.prev:void 0,v=this.loadMap(m.from,g);!this.mapFile&&m.from&&(this.mapFile=m.from),this.mapFile&&(this.root=n(this.mapFile)),v&&(this.text=v)}consumer(){return this.consumerCache||(this.consumerCache=new u(this.json||this.text)),this.consumerCache}decodeInline(p){let m=/^data:application\/json;charset=utf-?8;base64,/,g=/^data:application\/json;base64,/,v=/^data:application\/json;charset=utf-?8,/,y=/^data:application\/json,/,w=p.match(v)||p.match(y);if(w)return decodeURIComponent(p.substr(w[0].length));let _=p.match(m)||p.match(g);if(_)return c(p.substr(_[0].length));let S=p.slice(22);throw S=S.slice(0,S.indexOf(",")),new Error("Unsupported source map encoding "+S)}getAnnotationURL(p){return p.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(p){return typeof p!="object"?!1:typeof p.mappings=="string"||typeof p._mappings=="string"||Array.isArray(p.sections)}loadAnnotation(p){let m=p.match(/\/\*\s*# sourceMappingURL=/g);if(!m)return;let g=p.lastIndexOf(m.pop()),v=p.indexOf("*/",g);g>-1&&v>-1&&(this.annotation=this.getAnnotationURL(p.substring(g,v)))}loadFile(p,m,g){if(!g&&!this.unsafeMap){if(!/\.map$/i.test(p)||!m)return;let v=o(h(n(m)),h(p));if(v===".."||v.startsWith(".."+l)||i(v))return}if(this.root=n(p),e(p))return this.mapFile=p,t(p,"utf-8").toString().trim()}loadMap(p,m){if(m===!1)return!1;if(m){if(typeof m=="string")return m;if(typeof m=="function"){let g=m(p);if(g){let v=this.loadFile(g,p,!0);if(!v)throw new Error("Unable to load previous source map: "+g.toString());return v}}else{if(m instanceof u)return a.fromSourceMap(m).toString();if(m instanceof a)return m.toString();if(this.isMap(m))return JSON.stringify(m);throw new Error("Unsupported previous source map format: "+m.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let g=this.annotation;p&&(g=s(n(p),g));let v=this.loadFile(g,p,!1);if(v)try{this.json=JSON.parse(v.replace(/^\)]}'[^\n]*\n/,""))}catch(y){return}return v}}}startWith(p,m){return p?p.substr(0,m.length)===m:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return Ia=f,f.default=f,Ia}var Ca,ah;function Wi(){if(ah)return Ca;ah=1;let{nanoid:e}=f0(),{isAbsolute:t,resolve:r}=Tt,{SourceMapConsumer:n,SourceMapGenerator:i}=Tt,{fileURLToPath:s,pathToFileURL:o}=Tt,l=pa(),u=oh(),a=Tt,h=Symbol("lineToIndexCache"),c=!!(n&&i),f=!!(r&&t);function d(m){if(m[h])return m[h];let g=m.css.split(`
|
|
100
|
-
`),v=new Array(g.length),y=0;for(let w=0,_=g.length;w<_;w++)v[w]=y,y+=g[w].length+1;return m[h]=v,v}class p{get from(){return this.file||this.id}constructor(g,v={}){if(g===null||typeof g=="undefined"||typeof g=="object"&&!g.toString)throw new Error(`PostCSS received ${g} instead of CSS string`);if(this.css=g.toString(),this.css[0]==="\uFEFF"||this.css[0]===""?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,v.document&&(this.document=v.document.toString()),v.from&&(!f||/^\w+:\/\//.test(v.from)||t(v.from)?this.file=v.from:this.file=r(v.from)),f&&
|
|
101
|
-
`," "];return e.split(t,r)},split(t,r,n){if(typeof t!="string")return[];let i=[],s="",o=!1,l=0,
|
|
91
|
+
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function s(h){return h[0].toUpperCase()+h.slice(1)}function o(h,u){let f="@"+u.name,d=u.params?h.rawValue(u,"params"):"",p=u.raws.afterName;return typeof p=="undefined"?p=d?" ":"":p===""&&d&&!r.test(d[0])&&(p=" "),f+p+d}function l(h,u,f){let d=f.nodes,p=d.length-1;for(;p>0&&d[p].type==="comment";)p-=1;let m=h.raw(f,"semicolon"),g=f.type==="document";for(let v=d.length-1;v>=0;v--){let y=d[v],w=p!==v||m;!w&&v<d.length-1&&(y.type==="atrule"&&!y.nodes||y.type==="decl"&&y.prop.startsWith("--"))&&(w=!0),u.push({document:g,node:y,semicolon:w})}}function c(h,u,f,d){let p=h.raw(f,"between","beforeOpen");h.builder(n(d+p)+"{",f,"start");let m=f.nodes&&f.nodes.length,g=()=>{let v=m?h.raw(f,"after"):h.raw(f,"after","emptyBody");v&&h.builder(n(v)),h.builder("}",f,"end"),f.type==="rule"&&f.raws.ownSemicolon&&h.builder(n(f.raws.ownSemicolon),f,"end")};m?(u.push(g),l(h,u,f)):g()}class a{constructor(u){this.builder=u}atrule(u,f){let d=o(this,u);if(u.nodes)this.block(u,d);else{let p=(u.raws.between||"")+(f?";":"");this.builder(n(d+p),u)}}beforeAfter(u,f){let d;u.type==="decl"?d=this.raw(u,null,"beforeDecl"):u.type==="comment"?d=this.raw(u,null,"beforeComment"):f==="before"?d=this.raw(u,null,"beforeRule"):d=this.raw(u,null,"beforeClose");let p=u.parent,m=0;for(;p&&p.type!=="root";)m+=1,p=p.parent;if(d.includes(`
|
|
92
|
+
`)){let g=this.raw(u,null,"indent");if(g.length)for(let v=0;v<m;v++)d+=g}return d}block(u,f){let d=this.raw(u,"between","beforeOpen");this.builder(n(f+d)+"{",u,"start");let p;u.nodes&&u.nodes.length?(this.body(u),p=this.raw(u,"after")):p=this.raw(u,"after","emptyBody"),p&&this.builder(n(p)),this.builder("}",u,"end")}body(u){let f=a.prototype,d=["atrule","block","body","rule","stringify"].every(m=>this[m]===f[m]),p=[];for(l(this,p,u);p.length>0;){let m=p.pop();if(typeof m=="function"){m();continue}let g=m.node,v=this.raw(g,"before");v&&this.builder(m.document?v:n(v)),d&&g.type==="rule"?c(this,p,g,this.rawValue(g,"selector")):d&&g.type==="atrule"&&g.nodes?c(this,p,g,o(this,g)):this.stringify(g,m.semicolon)}}comment(u){let f=this.raw(u,"left","commentLeft"),d=this.raw(u,"right","commentRight");this.builder(n("/*"+f+u.text+d+"*/"),u)}decl(u,f){let d=u.raws,p=this.raw(u,"between","colon"),m=u.prop+p+this.rawValue(u,"value");u.important&&(m+=d.important||" !important"),f&&(m+=";"),this.builder(n(m),u)}document(u){this.body(u)}raw(u,f,d){let p;if(d||(d=f),f&&(p=u.raws[f],typeof p!="undefined"))return p;let m=u.parent;if(d==="before"&&(!m||m.type==="root"&&m.first===u||m&&m.type==="document"))return"";if(!m)return i[d];let g=u.root(),v=g.rawCache||(g.rawCache={});if(typeof v[d]!="undefined")return v[d];if(d==="before"||d==="after")return this.beforeAfter(u,d);{let y="raw"+s(d);this[y]?p=this[y](g,u):g.walk(w=>{if(p=w.raws[f],typeof p!="undefined")return!1})}return typeof p=="undefined"&&(p=i[d]),v[d]=p,p}rawBeforeClose(u){let f;return u.walk(d=>{if(d.nodes&&d.nodes.length>0&&typeof d.raws.after!="undefined")return f=d.raws.after,f.includes(`
|
|
93
|
+
`)&&(f=f.replace(/[^\n]+$/,"")),!1}),f&&(f=f.replace(/\S/g,"")),f}rawBeforeComment(u,f){let d;return u.walkComments(p=>{if(typeof p.raws.before!="undefined")return d=p.raws.before,d.includes(`
|
|
94
|
+
`)&&(d=d.replace(/[^\n]+$/,"")),!1}),typeof d=="undefined"?d=this.raw(f,null,"beforeDecl"):d&&(d=d.replace(/\S/g,"")),d}rawBeforeDecl(u,f){let d;return u.walkDecls(p=>{if(typeof p.raws.before!="undefined")return d=p.raws.before,d.includes(`
|
|
95
|
+
`)&&(d=d.replace(/[^\n]+$/,"")),!1}),typeof d=="undefined"?d=this.raw(f,null,"beforeRule"):d&&(d=d.replace(/\S/g,"")),d}rawBeforeOpen(u){let f;return u.walk(d=>{if(d.type!=="decl"&&(f=d.raws.between,typeof f!="undefined"))return!1}),f}rawBeforeRule(u){let f;return u.walk(d=>{if(d.nodes&&(d.parent!==u||u.first!==d)&&typeof d.raws.before!="undefined")return f=d.raws.before,f.includes(`
|
|
96
|
+
`)&&(f=f.replace(/[^\n]+$/,"")),!1}),f&&(f=f.replace(/\S/g,"")),f}rawColon(u){let f;return u.walkDecls(d=>{if(typeof d.raws.between!="undefined")return f=d.raws.between.replace(/[^\s:]/g,""),!1}),f}rawEmptyBody(u){let f;return u.walk(d=>{if(d.nodes&&d.nodes.length===0&&(f=d.raws.after,typeof f!="undefined"))return!1}),f}rawIndent(u){if(u.raws.indent)return u.raws.indent;let f;return u.walk(d=>{let p=d.parent;if(p&&p!==u&&p.parent&&p.parent===u&&typeof d.raws.before!="undefined"){let m=d.raws.before.split(`
|
|
97
|
+
`);return f=m[m.length-1],f=f.replace(/\S/g,""),!1}}),f}rawSemicolon(u){let f;return u.walk(d=>{if(d.nodes&&d.nodes.length&&d.last.type==="decl"&&(f=d.raws.semicolon,typeof f!="undefined"))return!1}),f}rawValue(u,f){let d=u[f],p=u.raws[f];return p&&p.value===d?p.raw:d}root(u){if(u.source&&u.source.input.hasBOM&&this.builder("\uFEFF",u,"start"),this.body(u),u.raws.after){let f=u.raws.after,d=u.parent&&u.parent.type==="document";this.builder(d?f:n(f))}}rule(u){this.block(u,this.rawValue(u,"selector")),u.raws.ownSemicolon&&this.builder(n(u.raws.ownSemicolon),u,"end")}stringify(u,f){if(!this[u.type])throw new Error("Unknown AST node type "+u.type+". Maybe you need to change PostCSS stringifier.");this[u.type](u,f)}}return ga=a,a.default=a,ga}var ya,$d;function Vi(){if($d)return ya;$d=1;let e=Qd();function t(r,n){new e(n).stringify(r)}return ya=t,t.default=t,ya}var ki={},qd;function Xi(){return qd||(qd=1,ki.isClean=Symbol("isClean"),ki.my=Symbol("my")),ki}var ba,eh;function Wi(){if(eh)return ba;eh=1;let e=ma(),t=Qd(),r=Vi(),{isClean:n,my:i}=Xi();function s(c,a){let h=new c.constructor,u=[[c,h,a]];for(;u.length>0;){let[f,d,p]=u.pop();for(let m in f){if(!Object.prototype.hasOwnProperty.call(f,m)||m==="proxyCache")continue;let g=f[m],v=typeof g;if(m==="parent"&&v==="object")p&&(d[m]=p);else if(m==="source")d[m]=g;else if(Array.isArray(g)){let y=[];d[m]=y;for(let w of g){let _=new w.constructor;y.push(_),u.push([w,_,d])}}else{if(v==="object"&&g!==null){let y=new g.constructor;u.push([g,y,void 0]),g=y}d[m]=g}}}return h}function o(c,a){if(a&&typeof a.offset!="undefined")return a.offset;let h=1,u=1,f=0;for(let d=0;d<c.length;d++){if(u===a.line&&h===a.column){f=d;break}c[d]===`
|
|
98
|
+
`?(h=1,u+=1):h+=1}return f}class l{get proxyOf(){return this}constructor(a={}){this.raws={},this[n]=!1,this[i]=!0;for(let h of Object.keys(a))if(h!=="__proto__")if(h==="nodes"){this.nodes=[];for(let u of a[h])typeof u.clone=="function"&&u.parent?this.append(u.clone()):this.append(u)}else this[h]=a[h]}addToError(a){if(a.postcssNode=this,a.stack&&this.source&&/\n\s{4}at /.test(a.stack)){let h=this.source;a.stack=a.stack.replace(/\n\s{4}at /,`$&${h.input.from}:${h.start.line}:${h.start.column}$&`)}return a}after(a){return this.parent.insertAfter(this,a),this}assign(a={}){for(let h in a)this[h]=a[h];return this}before(a){return this.parent.insertBefore(this,a),this}cleanRaws(a){delete this.raws.before,delete this.raws.after,a||delete this.raws.between}clone(a={}){let h=s(this);for(let u in a)h[u]=a[u];return h}cloneAfter(a={}){let h=this.clone(a);return this.parent.insertAfter(this,h),h}cloneBefore(a={}){let h=this.clone(a);return this.parent.insertBefore(this,h),h}error(a,h={}){if(this.source){let{end:u,start:f}=this.rangeBy(h);return this.source.input.error(a,{column:f.column,line:f.line},{column:u.column,line:u.line},h)}return new e(a)}getProxyProcessor(){return{get(a,h){return h==="proxyOf"?a:h==="root"?()=>a.root().toProxy():a[h]},set(a,h,u){return a[h]===u||(a[h]=u,(h==="prop"||h==="value"||h==="name"||h==="params"||h==="important"||h==="text")&&a.markDirty()),!0}}}markClean(){this[n]=!0}markDirty(){if(this[n]){this[n]=!1;let a=this;for(;a=a.parent;)a[n]=!1}}next(){if(!this.parent)return;let a=this.parent.index(this);return this.parent.nodes[a+1]}positionBy(a={}){let h="document"in this.source.input?this.source.input.document:this.source.input.css,u={column:this.source.start.column,line:this.source.start.line,offset:o(h,this.source.start)};if(a.index)u=this.positionInside(a.index);else if(a.word){let d=h.slice(o(h,this.source.start),o(h,this.source.end)).indexOf(a.word);d!==-1&&(u=this.positionInside(d))}return u}positionInside(a){let h=this.source.start.column,u=this.source.start.line,f="document"in this.source.input?this.source.input.document:this.source.input.css,d=o(f,this.source.start),p=d+a;for(let m=d;m<p;m++)f[m]===`
|
|
99
|
+
`?(h=1,u+=1):h+=1;return{column:h,line:u,offset:p}}prev(){if(!this.parent)return;let a=this.parent.index(this);return this.parent.nodes[a-1]}rangeBy(a={}){let h="document"in this.source.input?this.source.input.document:this.source.input.css,u={column:this.source.start.column,line:this.source.start.line,offset:o(h,this.source.start)},f=this.source.end?{column:this.source.end.column+1,line:this.source.end.line,offset:typeof this.source.end.offset=="number"?this.source.end.offset:o(h,this.source.end)+1}:{column:u.column+1,line:u.line,offset:u.offset+1};if(a.word){let p=h.slice(o(h,this.source.start),o(h,this.source.end)).indexOf(a.word);p!==-1&&(u=this.positionInside(p),f=this.positionInside(p+a.word.length))}else a.start?u={column:a.start.column,line:a.start.line,offset:o(h,a.start)}:typeof a.index=="number"&&(u=this.positionInside(a.index)),a.end?f={column:a.end.column,line:a.end.line,offset:o(h,a.end)}:typeof a.endIndex=="number"?f=this.positionInside(a.endIndex):typeof a.index=="number"&&(f=this.positionInside(a.index+1));return(f.line<u.line||f.line===u.line&&f.column<=u.column)&&(f={column:u.column+1,line:u.line,offset:u.offset+1}),{end:f,start:u}}raw(a,h){return new t().raw(this,a,h)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...a){if(this.parent){let h=this,u=!1;for(let f of a)f===this?u=!0:u?(this.parent.insertAfter(h,f),h=f):this.parent.insertBefore(h,f);u||this.remove()}return this}root(){let a=this;for(;a.parent&&a.parent.type!=="document";)a=a.parent;return a}toJSON(a,h){let u=h==null;h=h||new Map;let f=[],d=[[this,f,0]];for(let m=0;m<d.length;m++){let[g,v,y]=d[m],w={};v[y]=w;for(let _ in g){if(!Object.prototype.hasOwnProperty.call(g,_)||_==="parent"||_==="proxyCache")continue;let S=g[_];if(Array.isArray(S)){let b=[];w[_]=b;for(let R=0;R<S.length;R++){let I=S[R];typeof I=="object"&&I.toJSON?I.toJSON===l.prototype.toJSON?d.push([I,b,R]):b[R]=I.toJSON(null,h):b[R]=I}}else if(typeof S=="object"&&S.toJSON)S.toJSON===l.prototype.toJSON?d.push([S,w,_]):w[_]=S.toJSON(null,h);else if(_==="source"){if(S==null)continue;let b=h.get(S.input);b==null&&(b=h.size,h.set(S.input,b)),w[_]={end:S.end,inputId:b,start:S.start}}else w[_]=S}}let p=f[0];return u&&(p.inputs=[...h.keys()].map(m=>m.toJSON())),p}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(a=r){a.stringify&&(a=a.stringify);let h="";return a(this,u=>{h+=u}),h}warn(a,h,u={}){let f={node:this};for(let d in u)f[d]=u[d];return a.warn(h,f)}}return ba=l,l.default=l,ba}var va,th;function Pi(){if(th)return va;th=1;let e=Wi();class t extends e{constructor(n){super(n),this.type="comment"}}return va=t,t.default=t,va}var Sa,rh;function Mi(){if(rh)return Sa;rh=1;let e=Wi();class t extends e{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(n){n&&typeof n.value!="undefined"&&typeof n.value!="string"&&(n=B(x({},n),{value:String(n.value)})),super(n),this.type="decl"}}return Sa=t,t.default=t,Sa}var wa,nh;function Kt(){if(nh)return wa;nh=1;let e=Pi(),t=Mi(),r=Wi(),{isClean:n,my:i}=Xi(),s,o,l,c;function a(f){let d=f.slice();for(;d.length>0;){let p=d.pop();if(delete p.source,p.nodes){p.nodes=p.nodes.slice();for(let m of p.nodes)d.push(m)}}return f.slice()}function h(f){let d=[f];for(;d.length>0;){let p=d.pop();if(p[n]=!1,p.proxyOf.nodes)for(let m of p.proxyOf.nodes)d.push(m)}}class u extends r{get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}append(...d){for(let p of d){let m=this.normalize(p,this.last);for(let g of m)this.proxyOf.nodes.push(g)}return this.markDirty(),this}cleanRaws(d){let p=[this];for(;p.length>0;){let m=p.pop();if(m!==this&&m.cleanRaws!==u.prototype.cleanRaws){m.cleanRaws(d);continue}if(r.prototype.cleanRaws.call(m,d),m.nodes)for(let g of m.nodes)p.push(g)}}each(d){if(!this.proxyOf.nodes)return;let p=this.getIterator(),m,g;for(;this.indexes[p]<this.proxyOf.nodes.length&&(m=this.indexes[p],g=d(this.proxyOf.nodes[m],m),g!==!1);)this.indexes[p]+=1;return delete this.indexes[p],g}every(d){return this.nodes.every(d)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let d=this.lastEach;return this.indexes[d]=0,d}getProxyProcessor(){return{get(d,p){return p==="proxyOf"?d:d[p]?p==="each"||typeof p=="string"&&p.startsWith("walk")?(...m)=>d[p](...m.map(g=>typeof g=="function"?(v,y)=>g(v.toProxy(),y):g)):p==="every"||p==="some"?m=>d[p]((g,...v)=>m(g.toProxy(),...v)):p==="root"?()=>d.root().toProxy():p==="nodes"?d.nodes.map(m=>m.toProxy()):p==="first"||p==="last"?d[p].toProxy():d[p]:d[p]},set(d,p,m){return d[p]===m||(d[p]=m,(p==="name"||p==="params"||p==="selector")&&d.markDirty()),!0}}}index(d){return typeof d=="number"?d:(d.proxyOf&&(d=d.proxyOf),this.proxyOf.nodes.indexOf(d))}insertAfter(d,p){let m=this.index(d),g=this.normalize(p,this.proxyOf.nodes[m]).reverse();m=this.index(d);for(let y of g)this.proxyOf.nodes.splice(m+1,0,y);let v;for(let y in this.indexes)v=this.indexes[y],m<v&&(this.indexes[y]=v+g.length);return this.markDirty(),this}insertBefore(d,p){let m=this.index(d),g=m===0?"prepend":!1,v=this.normalize(p,this.proxyOf.nodes[m],g).reverse();m=this.index(d);for(let w of v)this.proxyOf.nodes.splice(m,0,w);let y;for(let w in this.indexes)y=this.indexes[w],m<=y&&(this.indexes[w]=y+v.length);return this.markDirty(),this}normalize(d,p){if(typeof d=="string")d=a(o(d).nodes);else if(typeof d=="undefined")d=[];else if(Array.isArray(d)){d=d.slice(0);for(let g of d)g.parent&&g.parent.removeChild(g,"ignore")}else if(d.type==="root"&&this.type!=="document"){d=d.nodes.slice(0);for(let g of d)g.parent&&g.parent.removeChild(g,"ignore")}else if(d.type)d=[d];else if(d.prop){if(typeof d.value=="undefined")throw new Error("Value field is missed in node creation");typeof d.value!="string"&&(d.value=String(d.value)),d=[new t(d)]}else if(d.selector||d.selectors)d=[new c(d)];else if(d.name)d=[new s(d)];else if(d.text)d=[new e(d)];else throw new Error("Unknown node type in node creation");return d.map(g=>(g[i]||u.rebuild(g),g=g.proxyOf,g.parent&&g.parent.removeChild(g),g[n]&&h(g),g.raws||(g.raws={}),typeof g.raws.before=="undefined"&&p&&typeof p.raws.before!="undefined"&&(g.raws.before=p.raws.before.replace(/\S/g,"")),g.parent=this.proxyOf,g))}prepend(...d){d=d.reverse();for(let p of d){let m=this.normalize(p,this.first,"prepend").reverse();for(let g of m)this.proxyOf.nodes.unshift(g);for(let g in this.indexes)this.indexes[g]=this.indexes[g]+m.length}return this.markDirty(),this}push(d){return d.parent=this,this.proxyOf.nodes.push(d),this}removeAll(){for(let d of this.proxyOf.nodes)d.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(d){d=this.index(d),this.proxyOf.nodes[d].parent=void 0,this.proxyOf.nodes.splice(d,1);let p;for(let m in this.indexes)p=this.indexes[m],p>=d&&(this.indexes[m]=p-1);return this.markDirty(),this}replaceValues(d,p,m){return m||(m=p,p={}),this.walkDecls(g=>{p.props&&!p.props.includes(g.prop)||p.fast&&!g.value.includes(p.fast)||(g.value=g.value.replace(d,m))}),this.markDirty(),this}some(d){return this.nodes.some(d)}walk(d){if(!this.proxyOf.nodes)return;let p=[{iterator:this.getIterator(),node:this.proxyOf}];for(;p.length>0;){let{iterator:m,node:g}=p[p.length-1],v=g.indexes[m];if(v>=g.proxyOf.nodes.length){delete g.indexes[m],p.pop();let _=p[p.length-1];_&&(_.node.indexes[_.iterator]+=1);continue}let y=g.proxyOf.nodes[v],w;try{w=d(y,v)}catch(_){throw y.addToError(_)}if(w===!1){for(let _ of p)delete _.node.indexes[_.iterator];return!1}y.walk&&y.proxyOf.nodes?p.push({iterator:y.getIterator(),node:y}):g.indexes[m]+=1}}walkAtRules(d,p){return p?d instanceof RegExp?this.walk((m,g)=>{if(m.type==="atrule"&&d.test(m.name))return p(m,g)}):this.walk((m,g)=>{if(m.type==="atrule"&&m.name===d)return p(m,g)}):(p=d,this.walk((m,g)=>{if(m.type==="atrule")return p(m,g)}))}walkComments(d){return this.walk((p,m)=>{if(p.type==="comment")return d(p,m)})}walkDecls(d,p){return p?d instanceof RegExp?this.walk((m,g)=>{if(m.type==="decl"&&d.test(m.prop))return p(m,g)}):this.walk((m,g)=>{if(m.type==="decl"&&m.prop===d)return p(m,g)}):(p=d,this.walk((m,g)=>{if(m.type==="decl")return p(m,g)}))}walkRules(d,p){return p?d instanceof RegExp?this.walk((m,g)=>{if(m.type==="rule"&&d.test(m.selector))return p(m,g)}):this.walk((m,g)=>{if(m.type==="rule"&&m.selector===d)return p(m,g)}):(p=d,this.walk((m,g)=>{if(m.type==="rule")return p(m,g)}))}}return u.registerParse=f=>{o=f},u.registerRule=f=>{c=f},u.registerAtRule=f=>{s=f},u.registerRoot=f=>{l=f},wa=u,u.default=u,u.rebuild=f=>{let d=[f];for(;d.length>0;){let p=d.pop();if(p.type==="atrule"?Object.setPrototypeOf(p,s.prototype):p.type==="rule"?Object.setPrototypeOf(p,c.prototype):p.type==="decl"?Object.setPrototypeOf(p,t.prototype):p.type==="comment"?Object.setPrototypeOf(p,e.prototype):p.type==="root"&&Object.setPrototypeOf(p,l.prototype),p[i]=!0,p.nodes)for(let m of p.nodes)d.push(m)}},wa}var Ra,ih;function _a(){if(ih)return Ra;ih=1;let e=Kt();class t extends e{constructor(n){super(n),this.type="atrule"}append(...n){return this.proxyOf.nodes||(this.nodes=[]),super.append(...n)}prepend(...n){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...n)}}return Ra=t,t.default=t,e.registerAtRule(t),Ra}var Ta,sh;function Ea(){if(sh)return Ta;sh=1;let e=Kt(),t,r;class n extends e{constructor(s){super(x({type:"document"},s)),this.nodes||(this.nodes=[])}toResult(s={}){return new t(new r,this,s).stringify()}}return n.registerLazyResult=i=>{t=i},n.registerProcessor=i=>{r=i},Ta=n,n.default=n,Ta}var Ia,oh;function b0(){if(oh)return Ia;oh=1;let e="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";return Ia={nanoid:(n=21)=>{let i="",s=n|0;for(;s-- >0;)i+=e[Math.random()*64|0];return i},customAlphabet:(n,i=21)=>(s=i)=>{let o="",l=s|0;for(;l-- >0;)o+=n[Math.random()*n.length|0];return o}},Ia}var Ca,ah;function lh(){if(ah)return Ca;ah=1;let{existsSync:e,readFileSync:t,realpathSync:r}=Tt,{dirname:n,isAbsolute:i,join:s,relative:o,sep:l}=Tt,{SourceMapConsumer:c,SourceMapGenerator:a}=Tt;function h(d){try{return r(d)}catch(p){return d}}function u(d){return Buffer?Buffer.from(d,"base64").toString():window.atob(d)}class f{constructor(p,m){if(m.map===!1)return;m.unsafeMap&&(this.unsafeMap=!0),this.loadAnnotation(p),this.inline=this.startWith(this.annotation,"data:");let g=m.map?m.map.prev:void 0,v=this.loadMap(m.from,g);!this.mapFile&&m.from&&(this.mapFile=m.from),this.mapFile&&(this.root=n(this.mapFile)),v&&(this.text=v)}consumer(){return this.consumerCache||(this.consumerCache=new c(this.json||this.text)),this.consumerCache}decodeInline(p){let m=/^data:application\/json;charset=utf-?8;base64,/,g=/^data:application\/json;base64,/,v=/^data:application\/json;charset=utf-?8,/,y=/^data:application\/json,/,w=p.match(v)||p.match(y);if(w)return decodeURIComponent(p.substr(w[0].length));let _=p.match(m)||p.match(g);if(_)return u(p.substr(_[0].length));let S=p.slice(22);throw S=S.slice(0,S.indexOf(",")),new Error("Unsupported source map encoding "+S)}getAnnotationURL(p){return p.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(p){return typeof p!="object"?!1:typeof p.mappings=="string"||typeof p._mappings=="string"||Array.isArray(p.sections)}loadAnnotation(p){let m=p.match(/\/\*\s*# sourceMappingURL=/g);if(!m)return;let g=p.lastIndexOf(m.pop()),v=p.indexOf("*/",g);g>-1&&v>-1&&(this.annotation=this.getAnnotationURL(p.substring(g,v)))}loadFile(p,m,g){if(!g&&!this.unsafeMap){if(!/\.map$/i.test(p)||!m)return;let v=o(h(n(m)),h(p));if(v===".."||v.startsWith(".."+l)||i(v))return}if(this.root=n(p),e(p))return this.mapFile=p,t(p,"utf-8").toString().trim()}loadMap(p,m){if(m===!1)return!1;if(m){if(typeof m=="string")return m;if(typeof m=="function"){let g=m(p);if(g){let v=this.loadFile(g,p,!0);if(!v)throw new Error("Unable to load previous source map: "+g.toString());return v}}else{if(m instanceof c)return a.fromSourceMap(m).toString();if(m instanceof a)return m.toString();if(this.isMap(m))return JSON.stringify(m);throw new Error("Unsupported previous source map format: "+m.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let g=this.annotation;p&&(g=s(n(p),g));let v=this.loadFile(g,p,!1);if(v)try{this.json=JSON.parse(v.replace(/^\)]}'[^\n]*\n/,""))}catch(y){return}return v}}}startWith(p,m){return p?p.substr(0,m.length)===m:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return Ca=f,f.default=f,Ca}var Za,ch;function Ai(){if(ch)return Za;ch=1;let{nanoid:e}=b0(),{isAbsolute:t,resolve:r}=Tt,{SourceMapConsumer:n,SourceMapGenerator:i}=Tt,{fileURLToPath:s,pathToFileURL:o}=Tt,l=ma(),c=lh(),a=Tt,h=Symbol("lineToIndexCache"),u=!!(n&&i),f=!!(r&&t);function d(m){if(m[h])return m[h];let g=m.css.split(`
|
|
100
|
+
`),v=new Array(g.length),y=0;for(let w=0,_=g.length;w<_;w++)v[w]=y,y+=g[w].length+1;return m[h]=v,v}class p{get from(){return this.file||this.id}constructor(g,v={}){if(g===null||typeof g=="undefined"||typeof g=="object"&&!g.toString)throw new Error(`PostCSS received ${g} instead of CSS string`);if(this.css=g.toString(),this.css[0]==="\uFEFF"||this.css[0]===""?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,v.document&&(this.document=v.document.toString()),v.from&&(!f||/^\w+:\/\//.test(v.from)||t(v.from)?this.file=v.from:this.file=r(v.from)),f&&u){let y=new c(this.css,v);if(y.text){this.map=y;let w=y.consumer().file;!this.file&&w&&(this.file=this.mapResolve(w))}}this.file||(this.id="<input css "+e(6)+">"),this.map&&(this.map.file=this.from)}error(g,v,y,w={}){let _,S,b,R,I;if(v&&typeof v=="object"){let C=v,N=y;if(typeof C.offset=="number"){R=C.offset;let G=this.fromOffset(R);v=G.line,y=G.col}else v=C.line,y=C.column,R=this.fromLineAndColumn(v,y);if(typeof N.offset=="number"){b=N.offset;let G=this.fromOffset(b);S=G.line,_=G.col}else S=N.line,_=N.column,b=this.fromLineAndColumn(N.line,N.column)}else if(y)R=this.fromLineAndColumn(v,y);else{R=v;let C=this.fromOffset(R);v=C.line,y=C.col}let E=this.origin(v,y,S,_);return E?I=new l(g,E.endLine===void 0?E.line:{column:E.column,line:E.line},E.endLine===void 0?E.column:{column:E.endColumn,line:E.endLine},E.source,E.file,w.plugin):I=new l(g,S===void 0?v:{column:y,line:v},S===void 0?y:{column:_,line:S},this.css,this.file,w.plugin),I.input={column:y,endColumn:_,endLine:S,endOffset:b,line:v,offset:R,source:this.css},this.file&&(o&&(I.input.url=o(this.file).toString()),I.input.file=this.file),I}fromLineAndColumn(g,v){return d(this)[g-1]+v-1}fromOffset(g){let v=d(this),y=v[v.length-1],w=0;if(g>=y)w=v.length-1;else{let _=v.length-2,S;for(;w<_;)if(S=w+(_-w>>1),g<v[S])_=S-1;else if(g>=v[S+1])w=S+1;else{w=S;break}}return{col:g-v[w]+1,line:w+1}}mapResolve(g){return/^\w+:\/\//.test(g)?g:r(this.map.consumer().sourceRoot||this.map.root||".",g)}origin(g,v,y,w){if(!this.map)return!1;let _=this.map.consumer(),S=_.originalPositionFor({column:v-1,line:g});if(!S.source)return!1;let b;if(typeof y=="number"){let C=_.originalPositionFor({column:w-1,line:y});C.source&&(b=C)}let R;t(S.source)?R=o(S.source):R=new URL(S.source,this.map.consumer().sourceRoot||o(this.map.mapFile));let I={column:S.column+1,endColumn:b&&b.column+1,endLine:b&&b.line,line:S.line,url:R.toString()};if(R.protocol==="file:")if(s)I.file=s(R);else throw new Error("file: protocol is not available in this PostCSS build");let E=_.sourceContentFor(S.source);return E&&(I.source=E),I}toJSON(){let g={};for(let v of["hasBOM","css","file","id"])this[v]!=null&&(g[v]=this[v]);return this.map&&(g.map=x({},this.map),g.map.consumerCache&&(g.map.consumerCache=void 0)),g}}return Za=p,p.default=p,a&&a.registerInput&&a.registerInput(p),Za}var La,uh;function bn(){if(uh)return La;uh=1;let e=Kt(),t,r;class n extends e{constructor(s){super(s),this.type="root",this.nodes||(this.nodes=[])}normalize(s,o,l){let c=new Set;for(let h of Array.isArray(s)?s:[s])h&&typeof h=="object"&&!h.parent&&h.raws&&typeof h.raws.before!="undefined"&&c.add(h.raws);let a=super.normalize(s);if(o){if(l==="prepend")this.nodes.length>1?o.raws.before=this.nodes[1].raws.before:delete o.raws.before;else if(this.first!==o)for(let h of a)c.has(h.raws)||(h.raws.before=o.raws.before)}return a}removeChild(s,o){let l=this.index(s);return!o&&l===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[l].raws.before),super.removeChild(s)}toResult(s={}){return new t(new r,this,s).stringify()}}return n.registerLazyResult=i=>{t=i},n.registerProcessor=i=>{r=i},La=n,n.default=n,e.registerRoot(n),La}var xa,dh;function hh(){if(dh)return xa;dh=1;let e={comma(t){return e.split(t,[","],!0)},space(t){let r=[" ",`
|
|
101
|
+
`," "];return e.split(t,r)},split(t,r,n){if(typeof t!="string")return[];let i=[],s="",o=!1,l=0,c=!1,a="",h=!1;for(let u of t)h?h=!1:u==="\\"?h=!0:c?u===a&&(c=!1):u==='"'||u==="'"?(c=!0,a=u):u==="("?l+=1:u===")"?l>0&&(l-=1):l===0&&r.includes(u)&&(o=!0),o?(s!==""&&i.push(s.trim()),s="",o=!1):s+=u;return(n||s!=="")&&i.push(s.trim()),i}};return xa=e,e.default=e,xa}var Na,fh;function Oa(){if(fh)return Na;fh=1;let e=Kt(),t=hh();class r extends e{get selectors(){return t.comma(this.selector)}set selectors(i){let s=this.selector?this.selector.match(/,\s*/):null,o=s?s[0]:","+this.raw("between","beforeOpen");this.selector=i.join(o)}constructor(i){super(i),this.type="rule",this.nodes||(this.nodes=[])}}return Na=r,r.default=r,e.registerRule(r),Na}var Ga,ph;function v0(){if(ph)return Ga;ph=1;let e=_a(),t=Pi(),r=Mi(),n=Ai(),i=lh(),s=bn(),o=Oa();function l(h,u){return h.inputs?h.inputs.map(f=>{let d=B(x({},f),{__proto__:n.prototype});return d.map&&(d.map=B(x({},d.map),{__proto__:i.prototype})),d}):u}function c(h,u,f){let d=x({},h);if(delete d.inputs,delete d.nodes,d.source){let m=d.source,{inputId:g}=m,v=nt(m,["inputId"]);d.source=v,g!=null&&(d.source.input=u[g])}let p;if(d.type==="root")p=new s(d);else if(d.type==="decl")p=new r(d);else if(d.type==="rule")p=new o(d);else if(d.type==="comment")p=new t(d);else if(d.type==="atrule")p=new e(d);else throw new Error("Unknown node type: "+h.type);if(f){p.nodes=f;for(let g of f)g.parent=p}return p}function a(h,u){if(Array.isArray(h))return h.map(p=>a(p));let f,d=[{childIndex:0,children:[],inputs:l(h,u),json:h}];for(;d.length>0;){let p=d[d.length-1],m=p.json.nodes;if(m&&p.childIndex<m.length){let v=m[p.childIndex];p.childIndex+=1,d.push({childIndex:0,children:[],inputs:l(v,p.inputs),json:v});continue}d.pop();let g=c(p.json,p.inputs,m?p.children:void 0);d.length>0?d[d.length-1].children.push(g):f=g}return f}return Ga=a,a.default=a,Ga}var Va,mh;function gh(){if(mh)return Va;mh=1;let{dirname:e,relative:t,resolve:r,sep:n}=Tt,{SourceMapConsumer:i,SourceMapGenerator:s}=Tt,{pathToFileURL:o}=Tt,l=Ai(),c=!!(i&&s),a=!!(e&&r&&t&&n);class h{constructor(f,d,p,m){this.stringify=f,this.mapOpts=p.map||{},this.root=d,this.opts=p,this.css=m,this.originalCSS=m,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let f;this.isInline()?f="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?f=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?f=this.mapOpts.annotation(this.opts.to,this.root):f=this.outputFile()+".map";let d=`
|
|
102
102
|
`;this.css.includes(`\r
|
|
103
103
|
`)&&(d=`\r
|
|
104
104
|
`),this.css+=d+"/*# sourceMappingURL="+f+" */"}applyPrevMaps(){for(let f of this.previous()){let d=this.toUrl(this.path(f.file)),p=f.root||e(f.file),m;this.mapOpts.sourcesContent===!1?(m=new i(f.text),m.sourcesContent&&(m.sourcesContent=null)):m=f.consumer(),this.map.applySourceMap(m,d,this.toUrl(this.path(p)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1){if(this.root){let f;for(let d=this.root.nodes.length-1;d>=0;d--)f=this.root.nodes[d],f.type==="comment"&&f.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(d)}else if(this.css){let f;for(;(f=this.css.lastIndexOf("/*#"))!==-1;){let d=this.css.indexOf("*/",f+3);if(d===-1)break;for(;f>0&&this.css[f-1]===`
|
|
105
|
-
`;)f--;this.css=this.css.slice(0,f)+this.css.slice(d+2)}}}}generate(){if(this.clearAnnotation(),a&&
|
|
106
|
-
`),d=y.length-g):d+=y.length,w&&_!=="start"){let S=w.parent||{raws:{}};(!(w.type==="decl"||w.type==="atrule"&&!w.nodes)||w!==S.last||S.raws.semicolon)&&(w.source&&w.source.end?(m.source=this.sourcePath(w),m.original.line=w.source.end.line,m.original.column=w.source.end.column-1,m.generated.line=f,m.generated.column=d-2,this.map.addMapping(m)):(m.source=p,m.original.line=1,m.original.column=0,m.generated.line=f,m.generated.column=d-1,this.map.addMapping(m)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation!="undefined"?this.mapOpts.annotation:this.previous().length?this.previous().some(f=>f.annotation):!0}isInline(){if(typeof this.mapOpts.inline!="undefined")return this.mapOpts.inline;let f=this.mapOpts.annotation;return typeof f!="undefined"&&f!==!0?!1:this.previous().length?this.previous().some(d=>d.inline):!0}isMap(){return typeof this.opts.map!="undefined"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent!="undefined"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(f=>f.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(f){if(this.mapOpts.absolute||f.charCodeAt(0)===60||/^\w+:\/\//.test(f))return f;let d=this.memoizedPaths.get(f);if(d)return d;let p=this.opts.to?e(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(p=e(r(p,this.mapOpts.annotation)));let m=t(p,f);return this.memoizedPaths.set(f,m),m}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(f=>{if(f.source&&f.source.input.map){let d=f.source.input.map;this.previousMaps.includes(d)||this.previousMaps.push(d)}});else{let f=new l(this.originalCSS,this.opts);f.map&&this.previousMaps.push(f.map)}return this.previousMaps}setSourcesContent(){let f={};if(this.root)this.root.walk(d=>{if(d.source){let p=d.source.input.from;if(p&&!f[p]){f[p]=!0;let m=this.usesFileUrls?this.toFileUrl(p):this.toUrl(this.path(p));this.map.setSourceContent(m,d.source.input.css)}}});else if(this.css){let d=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(d,this.css)}}sourcePath(f){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(f.source.input.from):this.toUrl(this.path(f.source.input.from))}toBase64(f){return Buffer?Buffer.from(f).toString("base64"):window.btoa(unescape(encodeURIComponent(f)))}toFileUrl(f){let d=this.memoizedFileURLs.get(f);if(d)return d;if(o){let p=o(f).toString();return this.memoizedFileURLs.set(f,p),p}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(f){let d=this.memoizedURLs.get(f);if(d)return d;n==="\\"&&(f=f.replace(/\\/g,"/"));let p=encodeURI(f).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(f,p),p}}return Ga=h,Ga}var Va,mh;function m0(){if(mh)return Va;mh=1;const e=39,t=34,r=92,n=47,i=10,s=32,o=12,l=9,u=13,a=91,h=93,c=40,f=41,d=123,p=125,m=59,g=42,v=58,y=64,w=/[\t\n\f\r "#'()/;[\\\]{}]/g,_=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,S=/.[\r\n"'(/\\]/,b=/[\da-f]/i;return Va=function(I,E={}){let C=I.css.valueOf(),N=E.ignoreErrors,G,$,Z,T,W,k,M,P,U,Q,me=C.length,O=0,ye=[],de=[],ve=-1;function D(){return O}function F(z){throw I.error("Unclosed "+z,O)}function H(){return de.length===0&&O>=me}function j(z){if(de.length)return de.pop();if(O>=me)return;let ie=z?z.ignoreUnclosed:!1;switch(G=C.charCodeAt(O),G){case i:case s:case l:case u:case o:{T=O;do T+=1,G=C.charCodeAt(T);while(G===s||G===i||G===l||G===u||G===o);k=["space",C.slice(O,T)],O=T-1;break}case a:case h:case d:case p:case v:case m:case f:{let ue=String.fromCharCode(G);k=[ue,ue,O];break}case c:{if(Q=ye.length?ye.pop()[1]:"",U=C.charCodeAt(O+1),Q==="url"&&U!==e&&U!==t&&U!==s&&U!==i&&U!==l&&U!==o&&U!==u){T=O;do{if(M=!1,T=C.indexOf(")",T+1),T===-1)if(N||ie){T=O;break}else F("bracket");for(P=T;C.charCodeAt(P-1)===r;)P-=1,M=!M}while(M);k=["brackets",C.slice(O,T+1),O,T],O=T}else O<=ve?k=["(","(",O]:(T=C.indexOf(")",O+1),$=C.slice(O,T+1),T===-1||S.test($)?(ve=T===-1?me:T,k=["(","(",O]):(k=["brackets",$,O,T],O=T));break}case e:case t:{W=G===e?"'":'"',T=O;do{if(M=!1,T=C.indexOf(W,T+1),T===-1)if(N||ie){T=O+1;break}else F("string");for(P=T;C.charCodeAt(P-1)===r;)P-=1,M=!M}while(M);k=["string",C.slice(O,T+1),O,T],O=T;break}case y:{w.lastIndex=O+1,w.test(C),w.lastIndex===0?T=C.length-1:T=w.lastIndex-2,k=["at-word",C.slice(O,T+1),O,T],O=T;break}case r:{for(T=O,Z=!0;C.charCodeAt(T+1)===r;)T+=1,Z=!Z;if(G=C.charCodeAt(T+1),Z&&G!==n&&G!==s&&G!==i&&G!==l&&G!==u&&G!==o&&(T+=1,b.test(C.charAt(T)))){for(;b.test(C.charAt(T+1));)T+=1;C.charCodeAt(T+1)===s&&(T+=1)}k=["word",C.slice(O,T+1),O,T],O=T;break}default:{G===n&&C.charCodeAt(O+1)===g?(T=C.indexOf("*/",O+2)+1,T===0&&(N||ie?T=C.length:F("comment")),k=["comment",C.slice(O,T+1),O,T],O=T):(_.lastIndex=O+1,_.test(C),_.lastIndex===0?T=C.length-1:T=_.lastIndex-2,k=["word",C.slice(O,T+1),O,T],ye.push(k),O=T);break}}return O++,k}function te(z){de.push(z)}return{back:te,endOfFile:H,nextToken:j,position:D}},Va}var ka,gh;function g0(){if(gh)return ka;gh=1;let e=Ra(),t=ki(),r=Xi(),n=bn(),i=Na(),s=m0();const o={empty:!0,space:!0};function l(h){for(let c=h.length-1;c>=0;c--){let f=h[c],d=f[3]||f[2];if(d)return d}}function u(h,c,f){let d="";for(let p=c;p<f;p++)d+=h[p][1];return d}class a{constructor(c){this.input=c,this.root=new n,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:c,start:{column:1,line:1,offset:0}}}atrule(c){let f=new e;f.name=c[1].slice(1),f.name===""&&this.unnamedAtrule(f,c),this.init(f,c[2]);let d,p,m,g=!1,v=!1,y=[],w=[];for(;!this.tokenizer.endOfFile();){if(c=this.tokenizer.nextToken(),d=c[0],d==="("||d==="["?w.push(d==="("?")":"]"):d==="{"&&w.length>0?w.push("}"):d===w[w.length-1]&&w.pop(),w.length===0)if(d===";"){f.source.end=this.getPosition(c[2]),f.source.end.offset++,this.semicolon=!0;break}else if(d==="{"){v=!0;break}else if(d==="}"){if(y.length>0){for(m=y.length-1,p=y[m];p&&p[0]==="space";)p=y[--m];p&&(f.source.end=this.getPosition(p[3]||p[2]),f.source.end.offset++)}this.end(c);break}else y.push(c);else y.push(c);if(this.tokenizer.endOfFile()){g=!0;break}}f.raws.between=this.spacesAndCommentsFromEnd(y),y.length?(f.raws.afterName=this.spacesAndCommentsFromStart(y),this.raw(f,"params",y),g&&(c=y[y.length-1],f.source.end=this.getPosition(c[3]||c[2]),f.source.end.offset++,this.spaces=f.raws.between,f.raws.between="")):(f.raws.afterName="",f.params=""),v&&(f.nodes=[],this.current=f)}checkMissedSemicolon(c){let f=this.colon(c);if(f===!1)return;let d=0,p;for(let m=f-1;m>=0&&(p=c[m],!(p[0]!=="space"&&(d+=1,d===2)));m--);throw this.input.error("Missed semicolon",p[0]==="word"?p[3]+1:p[2])}colon(c){let f=0,d,p,m;for(let[g,v]of c.entries()){if(p=v,m=p[0],m==="("&&(f+=1),m===")"&&(f-=1),f===0&&m===":")if(!d)this.doubleColon(p);else{if(d[0]==="word"&&d[1]==="progid")continue;return g}d=p}return!1}comment(c){let f=new t;this.init(f,c[2]),f.source.end=this.getPosition(c[3]||c[2]),f.source.end.offset++;let d=c[1].slice(2,-2);if(!d.trim())f.text="",f.raws.left=d,f.raws.right="";else{let p=d.match(/^(\s*)([^]*\S)(\s*)$/);f.text=p[2],f.raws.left=p[1],f.raws.right=p[3]}}createTokenizer(){this.tokenizer=s(this.input)}decl(c,f){let d=new r;this.init(d,c[0][2]);let p=c[c.length-1];p[0]===";"&&(this.semicolon=!0,c.pop()),d.source.end=this.getPosition(p[3]||p[2]||l(c)),d.source.end.offset++;let m=0;for(;c[m][0]!=="word";)m===c.length-1&&this.unknownWord([c[m]]),m++;d.raws.before+=u(c,0,m),d.source.start=this.getPosition(c[m][2]);let g=m;for(;m<c.length;){let b=c[m][0];if(b===":"||b==="space"||b==="comment")break;m++}d.prop=u(c,g,m);let v=m,y;for(;m<c.length&&(y=c[m],m++,y[0]!==":");)y[0]==="word"&&/\w/.test(y[1])&&this.unknownWord([y]);d.raws.between=u(c,v,m),(d.prop[0]==="_"||d.prop[0]==="*")&&(d.raws.before+=d.prop[0],d.prop=d.prop.slice(1));let w=m;for(;m<c.length;){let b=c[m][0];if(b!=="space"&&b!=="comment")break;m++}let _=c.slice(w,m);c=c.slice(m),this.precheckMissedSemicolon(c);for(let b=c.length-1;b>=0;b--){if(y=c[b],y[1].toLowerCase()==="!important"){d.important=!0;let R=this.stringFrom(c,b);R=this.spacesFromEnd(c)+R,R!==" !important"&&(d.raws.important=R);break}else if(y[1].toLowerCase()==="important"){let R=c.slice(0),I="";for(let E=b;E>0;E--){let C=R[E][0];if(I.trim().startsWith("!")&&C!=="space")break;I=R.pop()[1]+I}I.trim().startsWith("!")&&(d.important=!0,d.raws.important=I,c=R)}if(y[0]!=="space"&&y[0]!=="comment")break}c.some(b=>b[0]!=="space"&&b[0]!=="comment")&&(d.raws.between+=_.map(b=>b[1]).join(""),_=[]),this.raw(d,"value",_.concat(c),f),d.value.includes(":")&&!f&&this.checkMissedSemicolon(c)}doubleColon(c){throw this.input.error("Double colon",{offset:c[2]},{offset:c[2]+c[1].length})}emptyRule(c){let f=new i;this.init(f,c[2]),f.selector="",f.raws.between="",this.current=f}end(c){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(c[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(c)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(c){if(this.spaces+=c[1],this.current.nodes){let f=this.current.nodes[this.current.nodes.length-1];f&&f.type==="rule"&&!f.raws.ownSemicolon&&(f.raws.ownSemicolon=this.spaces,this.spaces="",f.source.end=this.getPosition(c[2]),f.source.end.offset+=f.raws.ownSemicolon.length)}}getPosition(c){let f=this.input.fromOffset(c);return{column:f.col,line:f.line,offset:c}}init(c,f){this.current.push(c),c.source={input:this.input,start:this.getPosition(f)},c.raws.before=this.spaces,this.spaces="",c.type!=="comment"&&(this.semicolon=!1)}other(c){let f=!1,d=null,p=!1,m=null,g=[],v=c[1].startsWith("--"),y=[],w=c;for(;w;){if(d=w[0],y.push(w),d==="("||d==="[")m||(m=w),g.push(d==="("?")":"]");else if(v&&p&&d==="{")m||(m=w),g.push("}");else if(g.length===0)if(d===";")if(p){this.decl(y,v);return}else break;else if(d==="{"){this.rule(y);return}else if(d==="}"){this.tokenizer.back(y.pop()),f=!0;break}else d===":"&&(p=!0);else d===g[g.length-1]&&(g.pop(),g.length===0&&(m=null));w=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(f=!0),g.length>0&&this.unclosedBracket(m),f&&p){if(!v)for(;y.length&&(w=y[y.length-1][0],!(w!=="space"&&w!=="comment"));)this.tokenizer.back(y.pop());this.decl(y,v)}else this.unknownWord(y)}parse(){let c;for(;!this.tokenizer.endOfFile();)switch(c=this.tokenizer.nextToken(),c[0]){case"space":this.spaces+=c[1];break;case";":this.freeSemicolon(c);break;case"}":this.end(c);break;case"comment":this.comment(c);break;case"at-word":this.atrule(c);break;case"{":this.emptyRule(c);break;default:this.other(c);break}this.endFile()}precheckMissedSemicolon(){}raw(c,f,d,p){let m,g,v=d.length,y="",w=!0,_,S;for(let b=0;b<v;b+=1)m=d[b],g=m[0],g==="space"&&b===v-1&&!p?w=!1:g==="comment"?(S=d[b-1]?d[b-1][0]:"empty",_=d[b+1]?d[b+1][0]:"empty",!o[S]&&!o[_]?y.slice(-1)===","?w=!1:y+=m[1]:w=!1):y+=m[1];if(!w){let b=d.reduce((R,I)=>R+I[1],"");c.raws[f]={raw:b,value:y}}c[f]=y}rule(c){c.pop();let f=new i;this.init(f,c[0][2]),f.raws.between=this.spacesAndCommentsFromEnd(c),this.raw(f,"selector",c),this.current=f}spacesAndCommentsFromEnd(c){let f,d="";for(;c.length&&(f=c[c.length-1][0],!(f!=="space"&&f!=="comment"));)d=c.pop()[1]+d;return d}spacesAndCommentsFromStart(c){let f,d="";for(;c.length&&(f=c[0][0],!(f!=="space"&&f!=="comment"));)d+=c.shift()[1];return d}spacesFromEnd(c){let f,d="";for(;c.length&&(f=c[c.length-1][0],f==="space");)d=c.pop()[1]+d;return d}stringFrom(c,f){let d="";for(let p=f;p<c.length;p++)d+=c[p][1];return c.splice(f,c.length-f),d}unclosedBlock(){let c=this.current.source.start;throw this.input.error("Unclosed block",c.line,c.column)}unclosedBracket(c){throw this.input.error("Unclosed bracket",{offset:c[2]},{offset:c[2]+1})}unexpectedClose(c){throw this.input.error("Unexpected }",{offset:c[2]},{offset:c[2]+1})}unknownWord(c){throw this.input.error("Unknown word "+c[0][1],{offset:c[0][2]},{offset:c[0][2]+c[0][1].length})}unnamedAtrule(c,f){throw this.input.error("At-rule without name",{offset:f[2]},{offset:f[2]+f[1].length})}}return ka=a,ka}var Xa,yh;function Wa(){if(yh)return Xa;yh=1;let e=Kt(),t=Wi(),r=g0();function n(i,s){let o=new t(i,s),l=new r(o);try{l.parse()}catch(u){throw process.env.NODE_ENV!=="production"&&u.name==="CssSyntaxError"&&s&&s.from&&(/\.scss$/i.test(s.from)?u.message+=`
|
|
107
|
-
You tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser`:/\.sass/i.test(s.from)?
|
|
108
|
-
You tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser`:/\.less$/i.test(s.from)&&(
|
|
109
|
-
You tried to parse Less with the standard CSS parser; try again with the postcss-less parser`)),u}return l.root}return Xa=n,n.default=n,e.registerParse(n),Xa}var Pa,bh;function vh(){if(bh)return Pa;bh=1;let e=Kt(),{my:t}=Gi();class r{constructor(i,s={}){if(this.type="warning",this.text=i,s.node&&s.node.source){s.node[t]||e.rebuild(s.node);let o=s.node.rangeBy(s);this.line=o.start.line,this.column=o.start.column,this.endLine=o.end.line,this.endColumn=o.end.column}for(let o in s)this[o]=s[o]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}return Pa=r,r.default=r,Pa}var Ma,Sh;function Aa(){if(Sh)return Ma;Sh=1;let e=vh();class t{get content(){return this.css}constructor(n,i,s){this.processor=n,this.messages=[],this.root=i,this.opts=s,this.css="",this.map=void 0}toString(){return this.css}warn(n,i={}){i.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(i.plugin=this.lastPlugin.postcssPlugin);let s=new e(n,i);return this.messages.push(s),s}warnings(){return this.messages.filter(n=>n.type==="warning")}}return Ma=t,t.default=t,Ma}var Ua,wh;function Rh(){if(wh)return Ua;wh=1;let e={};return Ua=function(r){e[r]||(e[r]=!0,typeof console!="undefined"&&console.warn&&console.warn(r))},Ua}var Da,_h;function Th(){if(_h)return Da;_h=1;let e=Kt(),t=Ta(),r=ph(),n=Wa(),i=Aa(),s=bn(),o=Ni(),{isClean:l,my:u}=Gi(),a=Rh();const h={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},c={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},f={Once:!0,postcssPlugin:!0,prepare:!0},d=0;function p(_){return typeof _=="object"&&typeof _.then=="function"}function m(_){let S=!1,b=h[_.type];return _.type==="decl"?S=_.prop.toLowerCase():_.type==="atrule"&&(S=_.name.toLowerCase()),S&&_.append?[b,b+"-"+S,d,b+"Exit",b+"Exit-"+S]:S?[b,b+"-"+S,b+"Exit",b+"Exit-"+S]:_.append?[b,d,b+"Exit"]:[b,b+"Exit"]}function g(_){let S;return _.type==="document"?S=["Document",d,"DocumentExit"]:_.type==="root"?S=["Root",d,"RootExit"]:S=m(_),{eventIndex:0,events:S,iterator:0,node:_,visitorIndex:0,visitors:[]}}function v(_){let S=[_];for(;S.length>0;){let b=S.pop();if(b[l]=!1,b.nodes)for(let R of b.nodes)S.push(R)}return _}let y={};class w{get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}constructor(S,b,R){this.stringified=!1,this.processed=!1;let I;if(typeof b=="object"&&b!==null&&(b.type==="root"||b.type==="document"))I=v(b);else if(b instanceof w||b instanceof i)I=v(b.root),b.map&&(typeof R.map=="undefined"&&(R.map={}),R.map.inline||(R.map.inline=!1),R.map.prev=b.map);else{let E=n;R.syntax&&(E=R.syntax.parse),R.parser&&(E=R.parser),E.parse&&(E=E.parse);try{I=E(b,R)}catch(C){this.processed=!0,this.error=C}I&&!I[u]&&e.rebuild(I)}this.result=new i(S,I,R),this.helpers=B(x({},y),{postcss:y,result:this.result}),this.plugins=this.processor.plugins.map(E=>typeof E=="object"&&E.prepare?x(x({},E),E.prepare(this.result)):E)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(S){return this.async().catch(S)}finally(S){return this.async().then(S,S)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(S,b){let R=this.result.lastPlugin;try{if(b&&b.addToError(S),this.error=S,S.name==="CssSyntaxError"&&!S.plugin)S.plugin=R.postcssPlugin,S.setMessage();else if(R.postcssVersion&&process.env.NODE_ENV!=="production"){let I=R.postcssPlugin,E=R.postcssVersion,C=this.result.processor.version,N=E.split("."),G=C.split(".");(N[0]!==G[0]||parseInt(N[1])>parseInt(G[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+C+", but "+I+" uses "+E+". Perhaps this is the source of the error below.")}}catch(I){console&&console.error&&console.error(I)}return S}prepareVisitors(){this.listeners={};let S=(b,R,I)=>{this.listeners[R]||(this.listeners[R]=[]),this.listeners[R].push([b,I])};for(let b of this.plugins)if(typeof b=="object")for(let R in b){if(!c[R]&&/^[A-Z]/.test(R))throw new Error(`Unknown event ${R} in ${b.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!f[R])if(typeof b[R]=="object")for(let I in b[R])I==="*"?S(b,R,b[R][I]):S(b,R+"-"+I.toLowerCase(),b[R][I]);else typeof b[R]=="function"&&S(b,R,b[R])}this.hasListener=Object.keys(this.listeners).length>0}runAsync(){return q(this,null,function*(){this.plugin=0;for(let S=0;S<this.plugins.length;S++){let b=this.plugins[S],R=this.runOnRoot(b);if(p(R))try{yield R}catch(I){throw this.handleError(I)}}if(this.prepareVisitors(),this.hasListener){let S=this.result.root;for(;!S[l];){S[l]=!0;let b=[g(S)];for(;b.length>0;){let R=this.visitTick(b);if(p(R))try{yield R}catch(I){let E=b[b.length-1].node;throw this.handleError(I,E)}}}if(this.listeners.OnceExit)for(let[b,R]of this.listeners.OnceExit){this.result.lastPlugin=b;try{if(S.type==="document"){let I=S.nodes.map(E=>R(E,this.helpers));yield Promise.all(I)}else yield R(S,this.helpers)}catch(I){throw this.handleError(I)}}}return this.processed=!0,this.stringify()})}runOnRoot(S){this.result.lastPlugin=S;try{if(typeof S=="object"&&S.Once){if(this.result.root.type==="document"){let b=this.result.root.nodes.map(R=>S.Once(R,this.helpers));return p(b[0])?Promise.all(b):b}return S.Once(this.result.root,this.helpers)}else if(typeof S=="function")return S(this.result.root,this.result)}catch(b){throw this.handleError(b)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let S=this.result.opts,b=o;S.syntax&&(b=S.syntax.stringify),S.stringifier&&(b=S.stringifier),b.stringify&&(b=b.stringify);let R=this.result.root.source;if(S.map===void 0&&!(R&&R.input&&R.input.map)){let C="";return b(this.result.root,N=>{C+=N}),this.result.css=C,this.result}let E=new r(b,this.result.root,this.result.opts).generate();return this.result.css=E[0],this.result.map=E[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let S of this.plugins){let b=this.runOnRoot(S);if(p(b))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let S=this.result.root;for(;!S[l];)S[l]=!0,this.walkSync(S);if(this.listeners.OnceExit)if(S.type==="document")for(let b of S.nodes)this.visitSync(this.listeners.OnceExit,b);else this.visitSync(this.listeners.OnceExit,S)}return this.result}then(S,b){return process.env.NODE_ENV!=="production"&&("from"in this.opts||a("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(S,b)}toString(){return this.css}visitSync(S,b){for(let[R,I]of S){this.result.lastPlugin=R;let E;try{E=I(b,this.helpers)}catch(C){throw this.handleError(C,b.proxyOf)}if(b.type!=="root"&&b.type!=="document"&&!b.parent)return!0;if(p(E))throw this.getAsyncError()}}visitTick(S){let b=S[S.length-1],{node:R,visitors:I}=b;if(R.type!=="root"&&R.type!=="document"&&!R.parent){S.pop();return}if(I.length>0&&b.visitorIndex<I.length){let[C,N]=I[b.visitorIndex];b.visitorIndex+=1,b.visitorIndex===I.length&&(b.visitors=[],b.visitorIndex=0),this.result.lastPlugin=C;try{return N(R.toProxy(),this.helpers)}catch(G){throw this.handleError(G,R)}}if(b.iterator!==0){let C=b.iterator;b.descending&&(b.descending=!1,R.indexes[C]+=1);let N;for(;N=R.nodes[R.indexes[C]];){if(!N[l]){N[l]=!0,b.descending=!0,S.push(g(N));return}R.indexes[C]+=1}b.iterator=0,delete R.indexes[C]}let E=b.events;for(;b.eventIndex<E.length;){let C=E[b.eventIndex];if(b.eventIndex+=1,C===d){R.nodes&&R.nodes.length&&(R[l]=!0,b.iterator=R.getIterator());return}else if(this.listeners[C]){b.visitors=this.listeners[C];return}}S.pop()}walkSync(S){S[l]=!0;let b=[{eventIndex:0,events:m(S),iterator:0,node:S}];for(;b.length>0;){let R=b[b.length-1],I=R.node;if(R.iterator!==0){let E=R.iterator;R.descending&&(R.descending=!1,I.indexes[E]+=1);let C,N=!1;for(;C=I.nodes[I.indexes[E]];){if(!C[l]){C[l]=!0,R.descending=!0,b.push({eventIndex:0,events:m(C),iterator:0,node:C}),N=!0;break}I.indexes[E]+=1}if(N)continue;R.iterator=0,delete I.indexes[E]}if(R.eventIndex<R.events.length){let E=R.events[R.eventIndex];if(R.eventIndex+=1,E===d)I.nodes&&I.nodes.length&&(R.iterator=I.getIterator());else{let C=this.listeners[E];C&&this.visitSync(C,I.toProxy())&&b.pop()}continue}b.pop()}}warnings(){return this.sync().warnings()}}return w.registerPostcss=_=>{y=_},Da=w,w.default=w,s.registerLazyResult(w),t.registerLazyResult(w),Da}var Fa,Eh;function y0(){if(Eh)return Fa;Eh=1;let e=ph(),t=Wa(),r=Aa(),n=Ni(),i=Rh();class s{get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let l,u=t;try{l=u(this._css,this._opts)}catch(a){this.error=a}if(this.error)throw this.error;return this._root=l,l}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(l,u,a){u=u.toString(),this.stringified=!1,this._processor=l,this._css=u,this._opts=a,this._map=void 0;let h=n;this.result=new r(this._processor,void 0,this._opts),this.result.css=u;let c=this;Object.defineProperty(this.result,"root",{get(){return c.root}});let f=new e(h,void 0,this._opts,u);if(f.isMap()){let[d,p]=f.generate();d&&(this.result.css=d),p&&(this.result.map=p)}else f.clearAnnotation(),this.result.css=f.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(l){return this.async().catch(l)}finally(l){return this.async().then(l,l)}sync(){if(this.error)throw this.error;return this.result}then(l,u){return process.env.NODE_ENV!=="production"&&("from"in this._opts||i("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(l,u)}toString(){return this._css}warnings(){return[]}}return Fa=s,s.default=s,Fa}var Ja,Ih;function b0(){if(Ih)return Ja;Ih=1;let e=Ta(),t=Th(),r=y0(),n=bn();class i{constructor(o=[]){this.version="8.5.26",this.plugins=this.normalize(o)}normalize(o){let l=[];for(let u of o)if(u.postcss===!0?u=u():u.postcss&&(u=u.postcss),typeof u=="object"&&Array.isArray(u.plugins))l=l.concat(u.plugins);else if(typeof u=="object"&&u.postcssPlugin)l.push(u);else if(typeof u=="function")l.push(u);else if(typeof u=="object"&&(u.parse||u.stringify)){if(process.env.NODE_ENV!=="production")throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}else throw new Error(u+" is not a PostCSS plugin");return l}process(o,l={}){return!this.plugins.length&&!l.parser&&!l.stringifier&&!l.syntax?new r(this,o,l):new t(this,o,l)}use(o){return this.plugins=this.plugins.concat(this.normalize([o])),this}}return Ja=i,i.default=i,n.registerProcessor(i),e.registerProcessor(i),Ja}var Ha,Ch;function v0(){if(Ch)return Ha;Ch=1;let e=Ra(),t=ki(),r=Kt(),n=pa(),i=Xi(),s=Ta(),o=p0(),l=Wi(),u=Th(),a=ch(),h=Vi(),c=Wa(),f=b0(),d=Aa(),p=bn(),m=Na(),g=Ni(),v=vh();function y(...w){return w.length===1&&Array.isArray(w[0])&&(w=w[0]),new f(w)}return y.plugin=function(_,S){let b=!1;function R(...E){console&&console.warn&&!b&&(b=!0,console.warn(_+`: postcss.plugin was deprecated. Migration guide:
|
|
105
|
+
`;)f--;this.css=this.css.slice(0,f)+this.css.slice(d+2)}}}}generate(){if(this.clearAnnotation(),a&&c&&this.isMap())return this.generateMap();{let f="";return this.stringify(this.root,d=>{f+=d}),[f]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let f=this.previous()[0].consumer();f.file=this.outputFile(),this.map=s.fromSourceMap(f,{ignoreInvalidMapping:!0})}else this.map=new s({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new s({file:this.outputFile(),ignoreInvalidMapping:!0});let f=1,d=1,p="<no source>",m={generated:{column:0,line:0},original:{column:0,line:0},source:""},g,v;this.stringify(this.root,(y,w,_)=>{if(this.css+=y,w&&_!=="end"&&(m.generated.line=f,m.generated.column=d-1,w.source&&w.source.start?(m.source=this.sourcePath(w),m.original.line=w.source.start.line,m.original.column=w.source.start.column-1,this.map.addMapping(m)):(m.source=p,m.original.line=1,m.original.column=0,this.map.addMapping(m))),v=y.match(/\n/g),v?(f+=v.length,g=y.lastIndexOf(`
|
|
106
|
+
`),d=y.length-g):d+=y.length,w&&_!=="start"){let S=w.parent||{raws:{}};(!(w.type==="decl"||w.type==="atrule"&&!w.nodes)||w!==S.last||S.raws.semicolon)&&(w.source&&w.source.end?(m.source=this.sourcePath(w),m.original.line=w.source.end.line,m.original.column=w.source.end.column-1,m.generated.line=f,m.generated.column=d-2,this.map.addMapping(m)):(m.source=p,m.original.line=1,m.original.column=0,m.generated.line=f,m.generated.column=d-1,this.map.addMapping(m)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation!="undefined"?this.mapOpts.annotation:this.previous().length?this.previous().some(f=>f.annotation):!0}isInline(){if(typeof this.mapOpts.inline!="undefined")return this.mapOpts.inline;let f=this.mapOpts.annotation;return typeof f!="undefined"&&f!==!0?!1:this.previous().length?this.previous().some(d=>d.inline):!0}isMap(){return typeof this.opts.map!="undefined"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent!="undefined"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(f=>f.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(f){if(this.mapOpts.absolute||f.charCodeAt(0)===60||/^\w+:\/\//.test(f))return f;let d=this.memoizedPaths.get(f);if(d)return d;let p=this.opts.to?e(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(p=e(r(p,this.mapOpts.annotation)));let m=t(p,f);return this.memoizedPaths.set(f,m),m}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(f=>{if(f.source&&f.source.input.map){let d=f.source.input.map;this.previousMaps.includes(d)||this.previousMaps.push(d)}});else{let f=new l(this.originalCSS,this.opts);f.map&&this.previousMaps.push(f.map)}return this.previousMaps}setSourcesContent(){let f={};if(this.root)this.root.walk(d=>{if(d.source){let p=d.source.input.from;if(p&&!f[p]){f[p]=!0;let m=this.usesFileUrls?this.toFileUrl(p):this.toUrl(this.path(p));this.map.setSourceContent(m,d.source.input.css)}}});else if(this.css){let d=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(d,this.css)}}sourcePath(f){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(f.source.input.from):this.toUrl(this.path(f.source.input.from))}toBase64(f){return Buffer?Buffer.from(f).toString("base64"):window.btoa(unescape(encodeURIComponent(f)))}toFileUrl(f){let d=this.memoizedFileURLs.get(f);if(d)return d;if(o){let p=o(f).toString();return this.memoizedFileURLs.set(f,p),p}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(f){let d=this.memoizedURLs.get(f);if(d)return d;n==="\\"&&(f=f.replace(/\\/g,"/"));let p=encodeURI(f).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(f,p),p}}return Va=h,Va}var ka,yh;function S0(){if(yh)return ka;yh=1;const e=39,t=34,r=92,n=47,i=10,s=32,o=12,l=9,c=13,a=91,h=93,u=40,f=41,d=123,p=125,m=59,g=42,v=58,y=64,w=/[\t\n\f\r "#'()/;[\\\]{}]/g,_=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,S=/.[\r\n"'(/\\]/,b=/[\da-f]/i;return ka=function(I,E={}){let C=I.css.valueOf(),N=E.ignoreErrors,G,q,Z,T,W,k,M,P,U,$,me=C.length,O=0,ye=[],de=[],ve=-1;function D(){return O}function F(K){throw I.error("Unclosed "+K,O)}function H(){return de.length===0&&O>=me}function Q(K){if(de.length)return de.pop();if(O>=me)return;let ie=K?K.ignoreUnclosed:!1;switch(G=C.charCodeAt(O),G){case i:case s:case l:case c:case o:{T=O;do T+=1,G=C.charCodeAt(T);while(G===s||G===i||G===l||G===c||G===o);k=["space",C.slice(O,T)],O=T-1;break}case a:case h:case d:case p:case v:case m:case f:{let ce=String.fromCharCode(G);k=[ce,ce,O];break}case u:{if($=ye.length?ye.pop()[1]:"",U=C.charCodeAt(O+1),$==="url"&&U!==e&&U!==t&&U!==s&&U!==i&&U!==l&&U!==o&&U!==c){T=O;do{if(M=!1,T=C.indexOf(")",T+1),T===-1)if(N||ie){T=O;break}else F("bracket");for(P=T;C.charCodeAt(P-1)===r;)P-=1,M=!M}while(M);k=["brackets",C.slice(O,T+1),O,T],O=T}else O<=ve?k=["(","(",O]:(T=C.indexOf(")",O+1),q=C.slice(O,T+1),T===-1||S.test(q)?(ve=T===-1?me:T,k=["(","(",O]):(k=["brackets",q,O,T],O=T));break}case e:case t:{W=G===e?"'":'"',T=O;do{if(M=!1,T=C.indexOf(W,T+1),T===-1)if(N||ie){T=O+1;break}else F("string");for(P=T;C.charCodeAt(P-1)===r;)P-=1,M=!M}while(M);k=["string",C.slice(O,T+1),O,T],O=T;break}case y:{w.lastIndex=O+1,w.test(C),w.lastIndex===0?T=C.length-1:T=w.lastIndex-2,k=["at-word",C.slice(O,T+1),O,T],O=T;break}case r:{for(T=O,Z=!0;C.charCodeAt(T+1)===r;)T+=1,Z=!Z;if(G=C.charCodeAt(T+1),Z&&G!==n&&G!==s&&G!==i&&G!==l&&G!==c&&G!==o&&(T+=1,b.test(C.charAt(T)))){for(;b.test(C.charAt(T+1));)T+=1;C.charCodeAt(T+1)===s&&(T+=1)}k=["word",C.slice(O,T+1),O,T],O=T;break}default:{G===n&&C.charCodeAt(O+1)===g?(T=C.indexOf("*/",O+2)+1,T===0&&(N||ie?T=C.length:F("comment")),k=["comment",C.slice(O,T+1),O,T],O=T):(_.lastIndex=O+1,_.test(C),_.lastIndex===0?T=C.length-1:T=_.lastIndex-2,k=["word",C.slice(O,T+1),O,T],ye.push(k),O=T);break}}return O++,k}function te(K){de.push(K)}return{back:te,endOfFile:H,nextToken:Q,position:D}},ka}var Xa,bh;function w0(){if(bh)return Xa;bh=1;let e=_a(),t=Pi(),r=Mi(),n=bn(),i=Oa(),s=S0();const o={empty:!0,space:!0};function l(h){for(let u=h.length-1;u>=0;u--){let f=h[u],d=f[3]||f[2];if(d)return d}}function c(h,u,f){let d="";for(let p=u;p<f;p++)d+=h[p][1];return d}class a{constructor(u){this.input=u,this.root=new n,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:u,start:{column:1,line:1,offset:0}}}atrule(u){let f=new e;f.name=u[1].slice(1),f.name===""&&this.unnamedAtrule(f,u),this.init(f,u[2]);let d,p,m,g=!1,v=!1,y=[],w=[];for(;!this.tokenizer.endOfFile();){if(u=this.tokenizer.nextToken(),d=u[0],d==="("||d==="["?w.push(d==="("?")":"]"):d==="{"&&w.length>0?w.push("}"):d===w[w.length-1]&&w.pop(),w.length===0)if(d===";"){f.source.end=this.getPosition(u[2]),f.source.end.offset++,this.semicolon=!0;break}else if(d==="{"){v=!0;break}else if(d==="}"){if(y.length>0){for(m=y.length-1,p=y[m];p&&p[0]==="space";)p=y[--m];p&&(f.source.end=this.getPosition(p[3]||p[2]),f.source.end.offset++)}this.end(u);break}else y.push(u);else y.push(u);if(this.tokenizer.endOfFile()){g=!0;break}}f.raws.between=this.spacesAndCommentsFromEnd(y),y.length?(f.raws.afterName=this.spacesAndCommentsFromStart(y),this.raw(f,"params",y),g&&(u=y[y.length-1],f.source.end=this.getPosition(u[3]||u[2]),f.source.end.offset++,this.spaces=f.raws.between,f.raws.between="")):(f.raws.afterName="",f.params=""),v&&(f.nodes=[],this.current=f)}checkMissedSemicolon(u){let f=this.colon(u);if(f===!1)return;let d=0,p;for(let m=f-1;m>=0&&(p=u[m],!(p[0]!=="space"&&(d+=1,d===2)));m--);throw this.input.error("Missed semicolon",p[0]==="word"?p[3]+1:p[2])}colon(u){let f=0,d,p,m;for(let[g,v]of u.entries()){if(p=v,m=p[0],m==="("&&(f+=1),m===")"&&(f-=1),f===0&&m===":")if(!d)this.doubleColon(p);else{if(d[0]==="word"&&d[1]==="progid")continue;return g}d=p}return!1}comment(u){let f=new t;this.init(f,u[2]),f.source.end=this.getPosition(u[3]||u[2]),f.source.end.offset++;let d=u[1].slice(2,-2);if(!d.trim())f.text="",f.raws.left=d,f.raws.right="";else{let p=d.match(/^(\s*)([^]*\S)(\s*)$/);f.text=p[2],f.raws.left=p[1],f.raws.right=p[3]}}createTokenizer(){this.tokenizer=s(this.input)}decl(u,f){let d=new r;this.init(d,u[0][2]);let p=u[u.length-1];p[0]===";"&&(this.semicolon=!0,u.pop()),d.source.end=this.getPosition(p[3]||p[2]||l(u)),d.source.end.offset++;let m=0;for(;u[m][0]!=="word";)m===u.length-1&&this.unknownWord([u[m]]),m++;d.raws.before+=c(u,0,m),d.source.start=this.getPosition(u[m][2]);let g=m;for(;m<u.length;){let b=u[m][0];if(b===":"||b==="space"||b==="comment")break;m++}d.prop=c(u,g,m);let v=m,y;for(;m<u.length&&(y=u[m],m++,y[0]!==":");)y[0]==="word"&&/\w/.test(y[1])&&this.unknownWord([y]);d.raws.between=c(u,v,m),(d.prop[0]==="_"||d.prop[0]==="*")&&(d.raws.before+=d.prop[0],d.prop=d.prop.slice(1));let w=m;for(;m<u.length;){let b=u[m][0];if(b!=="space"&&b!=="comment")break;m++}let _=u.slice(w,m);u=u.slice(m),this.precheckMissedSemicolon(u);for(let b=u.length-1;b>=0;b--){if(y=u[b],y[1].toLowerCase()==="!important"){d.important=!0;let R=this.stringFrom(u,b);R=this.spacesFromEnd(u)+R,R!==" !important"&&(d.raws.important=R);break}else if(y[1].toLowerCase()==="important"){let R=u.slice(0),I="";for(let E=b;E>0;E--){let C=R[E][0];if(I.trim().startsWith("!")&&C!=="space")break;I=R.pop()[1]+I}I.trim().startsWith("!")&&(d.important=!0,d.raws.important=I,u=R)}if(y[0]!=="space"&&y[0]!=="comment")break}u.some(b=>b[0]!=="space"&&b[0]!=="comment")&&(d.raws.between+=_.map(b=>b[1]).join(""),_=[]),this.raw(d,"value",_.concat(u),f),d.value.includes(":")&&!f&&this.checkMissedSemicolon(u)}doubleColon(u){throw this.input.error("Double colon",{offset:u[2]},{offset:u[2]+u[1].length})}emptyRule(u){let f=new i;this.init(f,u[2]),f.selector="",f.raws.between="",this.current=f}end(u){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(u[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(u)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(u){if(this.spaces+=u[1],this.current.nodes){let f=this.current.nodes[this.current.nodes.length-1];f&&f.type==="rule"&&!f.raws.ownSemicolon&&(f.raws.ownSemicolon=this.spaces,this.spaces="",f.source.end=this.getPosition(u[2]),f.source.end.offset+=f.raws.ownSemicolon.length)}}getPosition(u){let f=this.input.fromOffset(u);return{column:f.col,line:f.line,offset:u}}init(u,f){this.current.push(u),u.source={input:this.input,start:this.getPosition(f)},u.raws.before=this.spaces,this.spaces="",u.type!=="comment"&&(this.semicolon=!1)}other(u){let f=!1,d=null,p=!1,m=null,g=[],v=u[1].startsWith("--"),y=[],w=u;for(;w;){if(d=w[0],y.push(w),d==="("||d==="[")m||(m=w),g.push(d==="("?")":"]");else if(v&&p&&d==="{")m||(m=w),g.push("}");else if(g.length===0)if(d===";")if(p){this.decl(y,v);return}else break;else if(d==="{"){this.rule(y);return}else if(d==="}"){this.tokenizer.back(y.pop()),f=!0;break}else d===":"&&(p=!0);else d===g[g.length-1]&&(g.pop(),g.length===0&&(m=null));w=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(f=!0),g.length>0&&this.unclosedBracket(m),f&&p){if(!v)for(;y.length&&(w=y[y.length-1][0],!(w!=="space"&&w!=="comment"));)this.tokenizer.back(y.pop());this.decl(y,v)}else this.unknownWord(y)}parse(){let u;for(;!this.tokenizer.endOfFile();)switch(u=this.tokenizer.nextToken(),u[0]){case"space":this.spaces+=u[1];break;case";":this.freeSemicolon(u);break;case"}":this.end(u);break;case"comment":this.comment(u);break;case"at-word":this.atrule(u);break;case"{":this.emptyRule(u);break;default:this.other(u);break}this.endFile()}precheckMissedSemicolon(){}raw(u,f,d,p){let m,g,v=d.length,y="",w=!0,_,S;for(let b=0;b<v;b+=1)m=d[b],g=m[0],g==="space"&&b===v-1&&!p?w=!1:g==="comment"?(S=d[b-1]?d[b-1][0]:"empty",_=d[b+1]?d[b+1][0]:"empty",!o[S]&&!o[_]?y.slice(-1)===","?w=!1:y+=m[1]:w=!1):y+=m[1];if(!w){let b=d.reduce((R,I)=>R+I[1],"");u.raws[f]={raw:b,value:y}}u[f]=y}rule(u){u.pop();let f=new i;this.init(f,u[0][2]),f.raws.between=this.spacesAndCommentsFromEnd(u),this.raw(f,"selector",u),this.current=f}spacesAndCommentsFromEnd(u){let f,d="";for(;u.length&&(f=u[u.length-1][0],!(f!=="space"&&f!=="comment"));)d=u.pop()[1]+d;return d}spacesAndCommentsFromStart(u){let f,d="";for(;u.length&&(f=u[0][0],!(f!=="space"&&f!=="comment"));)d+=u.shift()[1];return d}spacesFromEnd(u){let f,d="";for(;u.length&&(f=u[u.length-1][0],f==="space");)d=u.pop()[1]+d;return d}stringFrom(u,f){let d="";for(let p=f;p<u.length;p++)d+=u[p][1];return u.splice(f,u.length-f),d}unclosedBlock(){let u=this.current.source.start;throw this.input.error("Unclosed block",u.line,u.column)}unclosedBracket(u){throw this.input.error("Unclosed bracket",{offset:u[2]},{offset:u[2]+1})}unexpectedClose(u){throw this.input.error("Unexpected }",{offset:u[2]},{offset:u[2]+1})}unknownWord(u){throw this.input.error("Unknown word "+u[0][1],{offset:u[0][2]},{offset:u[0][2]+u[0][1].length})}unnamedAtrule(u,f){throw this.input.error("At-rule without name",{offset:f[2]},{offset:f[2]+f[1].length})}}return Xa=a,Xa}var Wa,vh;function Pa(){if(vh)return Wa;vh=1;let e=Kt(),t=Ai(),r=w0();function n(i,s){let o=new t(i,s),l=new r(o);try{l.parse()}catch(c){throw process.env.NODE_ENV!=="production"&&c.name==="CssSyntaxError"&&s&&s.from&&(/\.scss$/i.test(s.from)?c.message+=`
|
|
107
|
+
You tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser`:/\.sass/i.test(s.from)?c.message+=`
|
|
108
|
+
You tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser`:/\.less$/i.test(s.from)&&(c.message+=`
|
|
109
|
+
You tried to parse Less with the standard CSS parser; try again with the postcss-less parser`)),c}return l.root}return Wa=n,n.default=n,e.registerParse(n),Wa}var Ma,Sh;function wh(){if(Sh)return Ma;Sh=1;let e=Kt(),{my:t}=Xi();class r{constructor(i,s={}){if(this.type="warning",this.text=i,s.node&&s.node.source){s.node[t]||e.rebuild(s.node);let o=s.node.rangeBy(s);this.line=o.start.line,this.column=o.start.column,this.endLine=o.end.line,this.endColumn=o.end.column}for(let o in s)this[o]=s[o]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}return Ma=r,r.default=r,Ma}var Aa,Rh;function Ua(){if(Rh)return Aa;Rh=1;let e=wh();class t{get content(){return this.css}constructor(n,i,s){this.processor=n,this.messages=[],this.root=i,this.opts=s,this.css="",this.map=void 0}toString(){return this.css}warn(n,i={}){i.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(i.plugin=this.lastPlugin.postcssPlugin);let s=new e(n,i);return this.messages.push(s),s}warnings(){return this.messages.filter(n=>n.type==="warning")}}return Aa=t,t.default=t,Aa}var Da,_h;function Th(){if(_h)return Da;_h=1;let e={};return Da=function(r){e[r]||(e[r]=!0,typeof console!="undefined"&&console.warn&&console.warn(r))},Da}var Fa,Eh;function Ih(){if(Eh)return Fa;Eh=1;let e=Kt(),t=Ea(),r=gh(),n=Pa(),i=Ua(),s=bn(),o=Vi(),{isClean:l,my:c}=Xi(),a=Th();const h={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},u={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},f={Once:!0,postcssPlugin:!0,prepare:!0},d=0;function p(_){return typeof _=="object"&&typeof _.then=="function"}function m(_){let S=!1,b=h[_.type];return _.type==="decl"?S=_.prop.toLowerCase():_.type==="atrule"&&(S=_.name.toLowerCase()),S&&_.append?[b,b+"-"+S,d,b+"Exit",b+"Exit-"+S]:S?[b,b+"-"+S,b+"Exit",b+"Exit-"+S]:_.append?[b,d,b+"Exit"]:[b,b+"Exit"]}function g(_){let S;return _.type==="document"?S=["Document",d,"DocumentExit"]:_.type==="root"?S=["Root",d,"RootExit"]:S=m(_),{eventIndex:0,events:S,iterator:0,node:_,visitorIndex:0,visitors:[]}}function v(_){let S=[_];for(;S.length>0;){let b=S.pop();if(b[l]=!1,b.nodes)for(let R of b.nodes)S.push(R)}return _}let y={};class w{get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}constructor(S,b,R){this.stringified=!1,this.processed=!1;let I;if(typeof b=="object"&&b!==null&&(b.type==="root"||b.type==="document"))I=v(b);else if(b instanceof w||b instanceof i)I=v(b.root),b.map&&(typeof R.map=="undefined"&&(R.map={}),R.map.inline||(R.map.inline=!1),R.map.prev=b.map);else{let E=n;R.syntax&&(E=R.syntax.parse),R.parser&&(E=R.parser),E.parse&&(E=E.parse);try{I=E(b,R)}catch(C){this.processed=!0,this.error=C}I&&!I[c]&&e.rebuild(I)}this.result=new i(S,I,R),this.helpers=B(x({},y),{postcss:y,result:this.result}),this.plugins=this.processor.plugins.map(E=>typeof E=="object"&&E.prepare?x(x({},E),E.prepare(this.result)):E)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(S){return this.async().catch(S)}finally(S){return this.async().then(S,S)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(S,b){let R=this.result.lastPlugin;try{if(b&&b.addToError(S),this.error=S,S.name==="CssSyntaxError"&&!S.plugin)S.plugin=R.postcssPlugin,S.setMessage();else if(R.postcssVersion&&process.env.NODE_ENV!=="production"){let I=R.postcssPlugin,E=R.postcssVersion,C=this.result.processor.version,N=E.split("."),G=C.split(".");(N[0]!==G[0]||parseInt(N[1])>parseInt(G[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+C+", but "+I+" uses "+E+". Perhaps this is the source of the error below.")}}catch(I){console&&console.error&&console.error(I)}return S}prepareVisitors(){this.listeners={};let S=(b,R,I)=>{this.listeners[R]||(this.listeners[R]=[]),this.listeners[R].push([b,I])};for(let b of this.plugins)if(typeof b=="object")for(let R in b){if(!u[R]&&/^[A-Z]/.test(R))throw new Error(`Unknown event ${R} in ${b.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!f[R])if(typeof b[R]=="object")for(let I in b[R])I==="*"?S(b,R,b[R][I]):S(b,R+"-"+I.toLowerCase(),b[R][I]);else typeof b[R]=="function"&&S(b,R,b[R])}this.hasListener=Object.keys(this.listeners).length>0}runAsync(){return z(this,null,function*(){this.plugin=0;for(let S=0;S<this.plugins.length;S++){let b=this.plugins[S],R=this.runOnRoot(b);if(p(R))try{yield R}catch(I){throw this.handleError(I)}}if(this.prepareVisitors(),this.hasListener){let S=this.result.root;for(;!S[l];){S[l]=!0;let b=[g(S)];for(;b.length>0;){let R=this.visitTick(b);if(p(R))try{yield R}catch(I){let E=b[b.length-1].node;throw this.handleError(I,E)}}}if(this.listeners.OnceExit)for(let[b,R]of this.listeners.OnceExit){this.result.lastPlugin=b;try{if(S.type==="document"){let I=S.nodes.map(E=>R(E,this.helpers));yield Promise.all(I)}else yield R(S,this.helpers)}catch(I){throw this.handleError(I)}}}return this.processed=!0,this.stringify()})}runOnRoot(S){this.result.lastPlugin=S;try{if(typeof S=="object"&&S.Once){if(this.result.root.type==="document"){let b=this.result.root.nodes.map(R=>S.Once(R,this.helpers));return p(b[0])?Promise.all(b):b}return S.Once(this.result.root,this.helpers)}else if(typeof S=="function")return S(this.result.root,this.result)}catch(b){throw this.handleError(b)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let S=this.result.opts,b=o;S.syntax&&(b=S.syntax.stringify),S.stringifier&&(b=S.stringifier),b.stringify&&(b=b.stringify);let R=this.result.root.source;if(S.map===void 0&&!(R&&R.input&&R.input.map)){let C="";return b(this.result.root,N=>{C+=N}),this.result.css=C,this.result}let E=new r(b,this.result.root,this.result.opts).generate();return this.result.css=E[0],this.result.map=E[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let S of this.plugins){let b=this.runOnRoot(S);if(p(b))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let S=this.result.root;for(;!S[l];)S[l]=!0,this.walkSync(S);if(this.listeners.OnceExit)if(S.type==="document")for(let b of S.nodes)this.visitSync(this.listeners.OnceExit,b);else this.visitSync(this.listeners.OnceExit,S)}return this.result}then(S,b){return process.env.NODE_ENV!=="production"&&("from"in this.opts||a("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(S,b)}toString(){return this.css}visitSync(S,b){for(let[R,I]of S){this.result.lastPlugin=R;let E;try{E=I(b,this.helpers)}catch(C){throw this.handleError(C,b.proxyOf)}if(b.type!=="root"&&b.type!=="document"&&!b.parent)return!0;if(p(E))throw this.getAsyncError()}}visitTick(S){let b=S[S.length-1],{node:R,visitors:I}=b;if(R.type!=="root"&&R.type!=="document"&&!R.parent){S.pop();return}if(I.length>0&&b.visitorIndex<I.length){let[C,N]=I[b.visitorIndex];b.visitorIndex+=1,b.visitorIndex===I.length&&(b.visitors=[],b.visitorIndex=0),this.result.lastPlugin=C;try{return N(R.toProxy(),this.helpers)}catch(G){throw this.handleError(G,R)}}if(b.iterator!==0){let C=b.iterator;b.descending&&(b.descending=!1,R.indexes[C]+=1);let N;for(;N=R.nodes[R.indexes[C]];){if(!N[l]){N[l]=!0,b.descending=!0,S.push(g(N));return}R.indexes[C]+=1}b.iterator=0,delete R.indexes[C]}let E=b.events;for(;b.eventIndex<E.length;){let C=E[b.eventIndex];if(b.eventIndex+=1,C===d){R.nodes&&R.nodes.length&&(R[l]=!0,b.iterator=R.getIterator());return}else if(this.listeners[C]){b.visitors=this.listeners[C];return}}S.pop()}walkSync(S){S[l]=!0;let b=[{eventIndex:0,events:m(S),iterator:0,node:S}];for(;b.length>0;){let R=b[b.length-1],I=R.node;if(R.iterator!==0){let E=R.iterator;R.descending&&(R.descending=!1,I.indexes[E]+=1);let C,N=!1;for(;C=I.nodes[I.indexes[E]];){if(!C[l]){C[l]=!0,R.descending=!0,b.push({eventIndex:0,events:m(C),iterator:0,node:C}),N=!0;break}I.indexes[E]+=1}if(N)continue;R.iterator=0,delete I.indexes[E]}if(R.eventIndex<R.events.length){let E=R.events[R.eventIndex];if(R.eventIndex+=1,E===d)I.nodes&&I.nodes.length&&(R.iterator=I.getIterator());else{let C=this.listeners[E];C&&this.visitSync(C,I.toProxy())&&b.pop()}continue}b.pop()}}warnings(){return this.sync().warnings()}}return w.registerPostcss=_=>{y=_},Fa=w,w.default=w,s.registerLazyResult(w),t.registerLazyResult(w),Fa}var Ja,Ch;function R0(){if(Ch)return Ja;Ch=1;let e=gh(),t=Pa(),r=Ua(),n=Vi(),i=Th();class s{get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let l,c=t;try{l=c(this._css,this._opts)}catch(a){this.error=a}if(this.error)throw this.error;return this._root=l,l}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(l,c,a){c=c.toString(),this.stringified=!1,this._processor=l,this._css=c,this._opts=a,this._map=void 0;let h=n;this.result=new r(this._processor,void 0,this._opts),this.result.css=c;let u=this;Object.defineProperty(this.result,"root",{get(){return u.root}});let f=new e(h,void 0,this._opts,c);if(f.isMap()){let[d,p]=f.generate();d&&(this.result.css=d),p&&(this.result.map=p)}else f.clearAnnotation(),this.result.css=f.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(l){return this.async().catch(l)}finally(l){return this.async().then(l,l)}sync(){if(this.error)throw this.error;return this.result}then(l,c){return process.env.NODE_ENV!=="production"&&("from"in this._opts||i("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(l,c)}toString(){return this._css}warnings(){return[]}}return Ja=s,s.default=s,Ja}var Ha,Zh;function _0(){if(Zh)return Ha;Zh=1;let e=Ea(),t=Ih(),r=R0(),n=bn();class i{constructor(o=[]){this.version="8.5.26",this.plugins=this.normalize(o)}normalize(o){let l=[];for(let c of o)if(c.postcss===!0?c=c():c.postcss&&(c=c.postcss),typeof c=="object"&&Array.isArray(c.plugins))l=l.concat(c.plugins);else if(typeof c=="object"&&c.postcssPlugin)l.push(c);else if(typeof c=="function")l.push(c);else if(typeof c=="object"&&(c.parse||c.stringify)){if(process.env.NODE_ENV!=="production")throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}else throw new Error(c+" is not a PostCSS plugin");return l}process(o,l={}){return!this.plugins.length&&!l.parser&&!l.stringifier&&!l.syntax?new r(this,o,l):new t(this,o,l)}use(o){return this.plugins=this.plugins.concat(this.normalize([o])),this}}return Ha=i,i.default=i,n.registerProcessor(i),e.registerProcessor(i),Ha}var Ya,Lh;function T0(){if(Lh)return Ya;Lh=1;let e=_a(),t=Pi(),r=Kt(),n=ma(),i=Mi(),s=Ea(),o=v0(),l=Ai(),c=Ih(),a=hh(),h=Wi(),u=Pa(),f=_0(),d=Ua(),p=bn(),m=Oa(),g=Vi(),v=wh();function y(...w){return w.length===1&&Array.isArray(w[0])&&(w=w[0]),new f(w)}return y.plugin=function(_,S){let b=!1;function R(...E){console&&console.warn&&!b&&(b=!0,console.warn(_+`: postcss.plugin was deprecated. Migration guide:
|
|
110
110
|
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(_+`: 里面 postcss.plugin 被弃用. 迁移指南:
|
|
111
|
-
https://www.w3ctech.com/topic/2226`));let C=S(...E);return C.postcssPlugin=_,C.postcssVersion=new f().version,C}let I;return Object.defineProperty(R,"postcss",{get(){return I||(I=R()),I}}),R.process=function(E,C,N){return y([R(N)]).process(E,C)},R},y.stringify=g,y.parse=
|
|
111
|
+
https://www.w3ctech.com/topic/2226`));let C=S(...E);return C.postcssPlugin=_,C.postcssVersion=new f().version,C}let I;return Object.defineProperty(R,"postcss",{get(){return I||(I=R()),I}}),R.process=function(E,C,N){return y([R(N)]).process(E,C)},R},y.stringify=g,y.parse=u,y.fromJSON=o,y.list=a,y.comment=w=>new t(w),y.atRule=w=>new e(w),y.decl=w=>new i(w),y.rule=w=>new m(w),y.root=w=>new p(w),y.document=w=>new s(w),y.CssSyntaxError=n,y.Declaration=i,y.Container=r,y.Processor=f,y.Document=s,y.Comment=t,y.Warning=v,y.AtRule=e,y.Result=d,y.Input=l,y.Rule=m,y.Root=p,y.Node=h,c.registerPostcss(y),Ya=y,y.default=y,Ya}T0();class Ba{constructor(...t){ut(this,"parentElement",null),ut(this,"parentNode",null),ut(this,"ownerDocument"),ut(this,"firstChild",null),ut(this,"lastChild",null),ut(this,"previousSibling",null),ut(this,"nextSibling",null),ut(this,"ELEMENT_NODE",1),ut(this,"TEXT_NODE",3),ut(this,"nodeType"),ut(this,"nodeName"),ut(this,"RRNodeType")}get childNodes(){const t=[];let r=this.firstChild;for(;r;)t.push(r),r=r.nextSibling;return t}contains(t){if(t instanceof Ba){if(t.ownerDocument!==this.ownerDocument)return!1;if(t===this)return!0}else return!1;for(;t.parentNode;){if(t.parentNode===this)return!0;t=t.parentNode}return!1}appendChild(t){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(t,r){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(t){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}Date.now().toString();const Ui=new Map,xh=new WeakSet;function Nh(e){return e!==null&&typeof e=="object"&&"complete"in e&&"naturalWidth"in e&&"naturalHeight"in e&&"src"in e&&"onload"in e}function E0(e){if(xh.has(e))return;xh.add(e);const t=e.drawImage.bind(e);e.drawImage=function(r,...n){const i=Ui.get(e);i&&(i.cancelled=!0);const s=()=>{n.length===2&&Nh(r)&&n.push(r.naturalWidth||r.width,r.naturalHeight||r.height),t(r,...n)};if(Nh(r)&&!r.complete){const o={cancelled:!1};Ui.set(e,o);const l=()=>{o.cancelled||(Ui.delete(e),s())},c=()=>{if(!o.cancelled){Ui.delete(e);try{s()}catch(a){}}};r.onload=l,r.onerror=c}else s()}}const Oh={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Gh={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Di={},Vh={},I0=()=>!!globalThis.Zone;function za(e){if(Di[e])return Di[e];const t=globalThis[e],r=t.prototype,n=e in Oh?Oh[e]:void 0,i=!!(n&&n.every(l=>{var c,a;return!!((a=(c=Object.getOwnPropertyDescriptor(r,l))==null?void 0:c.get)!=null&&a.toString().includes("[native code]"))})),s=e in Gh?Gh[e]:void 0,o=!!(s&&s.every(l=>{var c;return typeof r[l]=="function"&&((c=r[l])==null?void 0:c.toString().includes("[native code]"))}));if(i&&o&&!I0())return Di[e]=t.prototype,t.prototype;try{const l=document.createElement("iframe");l.style.display="none",document.body.appendChild(l);const c=l.contentWindow;if(!c)return t.prototype;const a=c[e].prototype;if(!a)return l.remove(),r;const h=navigator.userAgent;return h.includes("Safari")&&!h.includes("Chrome")?(l.classList.add("rr-block"),l.setAttribute("__rrwebUntaintedMutationObserver",""),Vh[e]=()=>l.remove()):l.remove(),Di[e]=a}catch(l){return r}}const Ka={};function Pt(e,t,r){var n;const i=`${e}.${String(r)}`;if(Ka[i])return Ka[i].call(t);const s=za(e),o=(n=Object.getOwnPropertyDescriptor(s,r))==null?void 0:n.get;return o?(Ka[i]=o,o.call(t)):t[r]}const ja={};function kh(e,t,r){const n=`${e}.${String(r)}`;if(ja[n])return ja[n].bind(t);const s=za(e)[r];return typeof s!="function"?t[r]:(ja[n]=s,s.bind(t))}function C0(e){return Pt("Node",e,"ownerDocument")}function Z0(e){return Pt("Node",e,"childNodes")}function L0(e){return Pt("Node",e,"parentNode")}function x0(e){return Pt("Node",e,"parentElement")}function N0(e){return Pt("Node",e,"textContent")}function O0(e,t){return kh("Node",e,"contains")(t)}function G0(e){return kh("Node",e,"getRootNode")()}function V0(e){return!e||!("host"in e)?null:Pt("ShadowRoot",e,"host")}function k0(e){return e.styleSheets}function X0(e){return!e||!("shadowRoot"in e)?null:Pt("Element",e,"shadowRoot")}function W0(e,t){return Pt("Element",e,"querySelector")(t)}function P0(e,t){return Pt("Element",e,"querySelectorAll")(t)}function Xh(){var e;return[za("MutationObserver").constructor,(e=Vh.MutationObserver)!=null?e:()=>{}]}let vn=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(vn=()=>new Date().getTime());function fr(e,t,r){try{if(!(t in e))return()=>{};const n=e[t],i=r(n);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:n}})),e[t]=i,()=>{e[t]=n}}catch(n){return()=>{}}}const le={ownerDocument:C0,childNodes:Z0,parentNode:L0,parentElement:x0,textContent:N0,contains:O0,getRootNode:G0,host:V0,styleSheets:k0,shadowRoot:X0,querySelector:W0,querySelectorAll:P0,nowTimestamp:vn,mutationObserverCtor:Xh,patch:fr,wrapCanvasContextDrawImage:E0};function ze(e,t,r=document){const n={capture:!0};return r.addEventListener(e,t,n),()=>r.removeEventListener(e,t,n)}const Dr=`Please stop import mirror directly. Instead of that,\r
|
|
112
112
|
now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
|
|
113
|
-
or you can use record.mirror to access the mirror instance during recording.`;let kh={map:{},getId(){return console.error(Ur),-1},getNode(){return console.error(Ur),null},removeNodeFromMap(){console.error(Ur)},has(){return console.error(Ur),!1},reset(){console.error(Ur)}};typeof window!="undefined"&&window.Proxy&&window.Reflect&&(kh=new Proxy(kh,{get(e,t,r){return t==="map"&&console.error(Ur),Reflect.get(e,t,r)}}));function Sn(e,t,r={}){let n=null,i=0;return function(...s){const o=Date.now();!i&&r.leading===!1&&(i=o);const l=t-(o-i),u=this;l<=0||l>t?(n&&(clearTimeout(n),n=null),i=o,e.apply(u,s)):!n&&r.trailing!==!1&&(n=setTimeout(()=>{i=r.leading===!1?0:Date.now(),n=null,e.apply(u,s)},l))}}function Ai(e,t,r,n,i=window){const s=i.Object.getOwnPropertyDescriptor(e,t);return i.Object.defineProperty(e,t,n?r:{set(o){setTimeout(()=>{r.set.call(this,o)},0),s&&s.set&&s.set.call(this,o)}}),()=>Ai(e,t,s||{},!0)}function Xh(e){var t,r,n,i;const s=e.document;return{left:s.scrollingElement?s.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:s.documentElement.scrollLeft||(s==null?void 0:s.body)&&((t=le.parentElement(s.body))==null?void 0:t.scrollLeft)||((r=s==null?void 0:s.body)==null?void 0:r.scrollLeft)||0,top:s.scrollingElement?s.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:(s==null?void 0:s.documentElement.scrollTop)||(s==null?void 0:s.body)&&((n=le.parentElement(s.body))==null?void 0:n.scrollTop)||((i=s==null?void 0:s.body)==null?void 0:i.scrollTop)||0}}function Wh(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Ph(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Mh(e){return e?e.nodeType===e.ELEMENT_NODE?e:le.parentElement(e):null}const V0=e=>{try{if(e instanceof HTMLElement)return e.tagName==="CANVAS"}catch(t){return!1}return!1};function Je(e,t,r,n){if(!e)return!1;const i=Mh(e);if(!i)return!1;try{if(typeof t=="string"){if(i.classList.contains(t)||n&&i.closest("."+t)!==null)return!0}else if(wi(i,t,n))return!0}catch(s){}return!!(r&&(i.matches(r)||n&&i.closest(r)!==null))}function k0(e,t){return t.getId(e)!==-1}function ja(e,t,r){return e.tagName==="TITLE"&&r.headTitleMutations?!0:t.getId(e)===gn}function Ah(e,t){if(pn(e))return!1;const r=t.getId(e);if(!t.has(r))return!0;const n=le.parentNode(e);return n&&n.nodeType===e.DOCUMENT_NODE?!1:n?Ah(n,t):!0}function Qa(e){return!!e.changedTouches}function X0(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach)}function Uh(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function Dh(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function $a(e){return e?e instanceof Ya&&"shadowRoot"in e?!!e.shadowRoot:!!le.shadowRoot(e):!1}class W0{constructor(){X(this,"id",1),X(this,"styleIDMap",new WeakMap),X(this,"idStyleMap",new Map)}getId(t){var r;return(r=this.styleIDMap.get(t))!=null?r:-1}has(t){return this.styleIDMap.has(t)}add(t,r){if(this.has(t))return this.getId(t);let n;return r===void 0?n=this.id++:n=r,this.styleIDMap.set(t,n),this.idStyleMap.set(n,t),n}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function Fh(e){var t;let r=null;return"getRootNode"in e&&((t=le.getRootNode(e))==null?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&le.host(le.getRootNode(e))&&(r=le.host(le.getRootNode(e))),r}function P0(e){let t=e,r;for(;r=Fh(t);)t=r;return t}function M0(e){const t=le.ownerDocument(e);if(!t)return!1;const r=P0(e);return le.contains(t,r)}function Jh(e){const t=le.ownerDocument(e);return t?le.contains(t,e)||M0(e):!1}var ge=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e[e.Asset=7]="Asset",e))(ge||{}),he=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(he||{}),rt=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(rt||{}),jt=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(jt||{}),Dr=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(Dr||{}),Fr=(e=>(e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e[e.RateChange=4]="RateChange",e))(Fr||{}),Hh=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(Hh||{});function Yh(e){return"__ln"in e}class A0{constructor(){X(this,"length",0),X(this,"head",null),X(this,"tail",null)}get(t){if(t>=this.length)throw new Error("Position outside of list range");let r=this.head;for(let n=0;n<t;n++)r=(r==null?void 0:r.next)||null;return r}addNode(t){const r={value:t,previous:null,next:null};if(t.__ln=r,t.previousSibling&&Yh(t.previousSibling)){const n=t.previousSibling.__ln.next;r.next=n,r.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=r,n&&(n.previous=r)}else if(t.nextSibling&&Yh(t.nextSibling)&&t.nextSibling.__ln.previous){const n=t.nextSibling.__ln.previous;r.previous=n,r.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=r,n&&(n.next=r)}else this.head&&(this.head.previous=r),r.next=this.head,this.head=r;r.next===null&&(this.tail=r),this.length++}removeNode(t){const r=t.__ln;this.head&&(r.previous?(r.previous.next=r.next,r.next?r.next.previous=r.previous:this.tail=r.previous):(this.head=r.next,this.head?this.head.previous=null:this.tail=null),t.__ln&&delete t.__ln,this.length--)}}const Bh=(e,t)=>`${e}@${t}`;class U0{constructor(){X(this,"frozen",!1),X(this,"locked",!1),X(this,"texts",[]),X(this,"attributes",[]),X(this,"attributeMap",new WeakMap),X(this,"removes",[]),X(this,"mapRemoves",[]),X(this,"movedMap",{}),X(this,"addedSet",new Set),X(this,"movedSet",new Set),X(this,"droppedSet",new Set),X(this,"removesSubTreeCache",new Set),X(this,"mutationCb"),X(this,"blockClass"),X(this,"blockSelector"),X(this,"maskTextClass"),X(this,"maskTextSelector"),X(this,"inlineStylesheet"),X(this,"maskInputOptions"),X(this,"maskTextFn"),X(this,"maskInputFn"),X(this,"keepIframeSrcFn"),X(this,"recordCanvas"),X(this,"inlineImages"),X(this,"inlineVideos"),X(this,"privacySetting"),X(this,"slimDOMOptions"),X(this,"dataURLOptions"),X(this,"doc"),X(this,"mirror"),X(this,"iframeManager"),X(this,"stylesheetManager"),X(this,"shadowDomManager"),X(this,"canvasManager"),X(this,"processedNodeManager"),X(this,"unattachedDoc"),X(this,"processMutations",t=>{t.forEach(this.processMutation),this.emit()}),X(this,"emit",()=>{if(this.frozen||this.locked)return;const t=[],r=new Set,n=new A0,i=u=>{let a=u,h=gn;for(;h===gn;)a=a&&a.nextSibling,h=a&&this.mirror.getId(a);return h},s=u=>{const a=le.parentNode(u);if(!a||!Jh(u))return;let h=!1;if(u.nodeType===Node.TEXT_NODE){const p=a.tagName;if(p==="TEXTAREA")return;p==="STYLE"&&this.addedSet.has(a)&&(h=!0)}const c=pn(a)?this.mirror.getId(Fh(u)):this.mirror.getId(a),f=i(u);if(c===-1||f===-1)return n.addNode(u);const d=Ar(u,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,inlineVideos:this.inlineVideos,privacySetting:this.privacySetting,onSerialize:p=>{Uh(p,this.mirror)&&this.iframeManager.addIframe(p),Dh(p,this.mirror)&&this.stylesheetManager.trackLinkElement(p),$a(u)&&this.shadowDomManager.addShadowRoot(le.shadowRoot(u),this.doc)},onIframeLoad:(p,m)=>{this.iframeManager.attachIframe(p,m),this.shadowDomManager.observeAttachShadow(p)},onStylesheetLoad:(p,m)=>{this.stylesheetManager.attachLinkElement(p,m)},cssCaptured:h});d&&(t.push({parentId:c,nextId:f,node:d}),r.add(d.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const u of this.movedSet)zh(this.removesSubTreeCache,u)&&!this.movedSet.has(le.parentNode(u))||s(u);for(const u of this.addedSet)!Kh(this.droppedSet,u)&&!zh(this.removesSubTreeCache,u)||Kh(this.movedSet,u)?s(u):this.droppedSet.add(u);let o=null;for(;n.length;){let u=null;if(o){const a=this.mirror.getId(le.parentNode(o.value)),h=i(o.value);a!==-1&&h!==-1&&(u=o)}if(!u){let a=n.tail;for(;a;){const h=a;if(a=a.previous,h){const c=this.mirror.getId(le.parentNode(h.value));if(i(h.value)===-1)continue;if(c!==-1){u=h;break}else{const d=h.value,p=le.parentNode(d);if(p&&p.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const m=le.host(p);if(this.mirror.getId(m)!==-1){u=h;break}}}}}}if(!u){for(;n.head;)n.removeNode(n.head.value);break}o=u.previous,n.removeNode(u.value),s(u.value)}const l={texts:this.texts.map(u=>{var a,h;const c=u.node,f=le.parentNode(c);f&&f.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(f);let d=u.value;const p=this.privacySetting==="strict",m=this.privacySetting==="default"&&ed(d),g=(h=(a=u.node)==null?void 0:a.parentElement)==null?void 0:h.getAttribute("data-hl-record");return(p||m)&&!g&&d&&(d=No(d)),{id:this.mirror.getId(c),value:d}}).filter(u=>!r.has(u.id)).filter(u=>this.mirror.has(u.id)),attributes:this.attributes.map(u=>{const{attributes:a}=u;if(typeof a.style=="string"){const h=JSON.stringify(u.styleDiff),c=JSON.stringify(u._unchangedStyles);h.length<a.style.length&&(h+c).split("var(").length===a.style.split("var(").length&&(a.style=u.styleDiff)}return{id:this.mirror.getId(u.node),attributes:a}}).filter(u=>!r.has(u.id)).filter(u=>this.mirror.has(u.id)),removes:this.removes,adds:t};!l.texts.length&&!l.attributes.length&&!l.removes.length&&!l.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.removesSubTreeCache=new Set,this.movedMap={},this.mutationCb(l))}),X(this,"genTextAreaValueMutation",t=>{let r=this.attributeMap.get(t);r||(r={node:t,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(r),this.attributeMap.set(t,r));const n=Array.from(le.childNodes(t),i=>le.textContent(i)||"").join("");r.attributes.value=yi({overwriteRecord:null,element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:bi(t),value:n,maskInputFn:this.maskInputFn})}),X(this,"processMutation",t=>{if(!ja(t.target,this.mirror,this.slimDOMOptions))switch(t.type){case"characterData":{const r=le.textContent(t.target);!Je(t.target,this.blockClass,this.blockSelector,!1)&&r!==t.oldValue&&this.texts.push({value:ld(t.target,this.maskTextClass,this.maskTextSelector,!0)&&r?this.maskTextFn?this.maskTextFn(r,Mh(t.target)):r.replace(/[\S]/g,"*"):r,node:t.target});break}case"attributes":{const r=t.target;let n=t.attributeName,i=t.target.getAttribute(n);if(n==="value"){const o=bi(r);i=yi({element:r,maskInputOptions:this.maskInputOptions,tagName:r.tagName,type:o,value:i,overwriteRecord:r.getAttribute("data-hl-record"),maskInputFn:this.maskInputFn})}if(Je(t.target,this.blockClass,this.blockSelector,!1)||i===t.oldValue)return;let s=this.attributeMap.get(t.target);if(r.tagName==="IFRAME"&&n==="src"&&!this.keepIframeSrcFn(i))if(!r.contentDocument)n="rr_src";else return;if(s||(s={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(s),this.attributeMap.set(t.target,s)),n==="type"&&r.tagName==="INPUT"&&(t.oldValue||"").toLowerCase()==="password"&&r.setAttribute("data-rr-is-password","true"),!od(r.tagName,n)){if(t.target.tagName==="INPUT"){const l=t.target;if(l.type==="password"){s.attributes.value="*".repeat(l.value.length);break}}if(s.attributes[n]=sd(this.doc,hr(r.tagName),hr(n),i),n==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(u){this.unattachedDoc=this.doc}const l=this.unattachedDoc.createElement("span");t.oldValue&&l.setAttribute("style",t.oldValue);for(const u of Array.from(r.style)){const a=r.style.getPropertyValue(u),h=r.style.getPropertyPriority(u);a!==l.style.getPropertyValue(u)||h!==l.style.getPropertyPriority(u)?h===""?s.styleDiff[u]=a:s.styleDiff[u]=[a,h]:s._unchangedStyles[u]=[a,h]}for(const u of Array.from(l.style))r.style.getPropertyValue(u)===""&&(s.styleDiff[u]=!1)}else n==="open"&&r.tagName==="DIALOG"&&(r.matches("dialog:modal")?s.attributes.rr_open_mode="modal":s.attributes.rr_open_mode="non-modal")}break}case"childList":{if(Je(t.target,this.blockClass,this.blockSelector,!0))return;if(t.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(t.target);return}t.addedNodes.forEach(r=>this.genAdds(r,t.target)),t.removedNodes.forEach(r=>{const n=this.mirror.getId(r),i=pn(t.target)?this.mirror.getId(le.host(t.target)):this.mirror.getId(t.target);Je(t.target,this.blockClass,this.blockSelector,!1)||ja(r,this.mirror,this.slimDOMOptions)||!k0(r,this.mirror)||(this.addedSet.has(r)?(qa(this.addedSet,r),this.droppedSet.add(r)):this.addedSet.has(t.target)&&n===-1||Ah(t.target,this.mirror)||(this.movedSet.has(r)&&this.movedMap[Bh(n,i)]?qa(this.movedSet,r):(this.removes.push({parentId:i,id:n,isShadow:pn(t.target)&&mn(t.target)?!0:void 0}),D0(r,this.removesSubTreeCache))),this.mapRemoves.push(r))});break}}}),X(this,"genAdds",(t,r)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!(this.addedSet.has(t)||this.movedSet.has(t))){if(this.mirror.hasNode(t)){if(ja(t,this.mirror,this.slimDOMOptions))return;this.movedSet.add(t);let n=null;r&&this.mirror.hasNode(r)&&(n=this.mirror.getId(r)),n&&n!==-1&&(this.movedMap[Bh(this.mirror.getId(t),n)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);Je(t,this.blockClass,this.blockSelector,!1)||(le.childNodes(t).forEach(n=>this.genAdds(n)),$a(t)&&le.childNodes(le.shadowRoot(t)).forEach(n=>{this.processedNodeManager.add(n,this),this.genAdds(n,t)}))}})}init(t){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","inlineVideos","privacySetting","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(r=>{this[r]=t[r]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function qa(e,t){e.delete(t),le.childNodes(t).forEach(r=>qa(e,r))}function D0(e,t){const r=[e];for(;r.length;){const n=r.pop();t.has(n)||(t.add(n),le.childNodes(n).forEach(i=>r.push(i)))}}function zh(e,t,r){return e.size===0?!1:F0(e,t)}function F0(e,t,r){const n=le.parentNode(t);return n?e.has(n):!1}function Kh(e,t){return e.size===0?!1:jh(e,t)}function jh(e,t){const r=le.parentNode(t);return r?e.has(r)?!0:jh(e,r):!1}let wn;function J0(e){wn=e}function H0(){wn=void 0}const fe=e=>wn?(...r)=>{try{return e(...r)}catch(n){if(wn&&wn(n)===!0)return;throw n}}:e,pr=[];function Rn(e){try{if("composedPath"in e){const t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch(t){}return e&&e.target}function Qh(e,t){const r=new U0;pr.push(r),r.init(e);const[n,i]=Vh(),s=new n(fe(r.processMutations.bind(r)));return s.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),[s,i]}function Y0({mousemoveCb:e,sampling:t,doc:r,mirror:n}){if(t.mousemove===!1)return()=>{};const i=typeof t.mousemove=="number"?t.mousemove:50,s=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500;let o=[],l;const u=Sn(fe(c=>{const f=Date.now()-l;e(o.map(d=>(d.timeOffset-=f,d)),c),o=[],l=null}),s),a=fe(Sn(fe(c=>{const f=Rn(c),{clientX:d,clientY:p}=Qa(c)?c.changedTouches[0]:c;l||(l=vn()),o.push({x:d,y:p,id:n.getId(f),timeOffset:vn()-l}),u(typeof DragEvent!="undefined"&&c instanceof DragEvent?he.Drag:c instanceof MouseEvent?he.MouseMove:he.TouchMove)}),i,{trailing:!1})),h=[ze("mousemove",a,r),ze("touchmove",a,r),ze("drag",a,r)];return fe(()=>{h.forEach(c=>c())})}function B0({mouseInteractionCb:e,doc:t,mirror:r,blockClass:n,blockSelector:i,sampling:s}){if(s.mouseInteraction===!1)return()=>{};const o=s.mouseInteraction===!0||s.mouseInteraction===void 0?{}:s.mouseInteraction,l=[];let u=null;const a=h=>c=>{const f=Rn(c);if(Je(f,n,i,!0)||V0(f))return;let d=null,p=h;if("pointerType"in c){switch(c.pointerType){case"mouse":d=jt.Mouse;break;case"touch":d=jt.Touch;break;case"pen":d=jt.Pen;break}d===jt.Touch&&(rt[h]===rt.MouseDown?p="TouchStart":rt[h]===rt.MouseUp&&(p="TouchEnd"))}else Qa(c)&&(d=jt.Touch);d!==null?(u=d,(p.startsWith("Touch")&&d===jt.Touch||p.startsWith("Mouse")&&d===jt.Mouse)&&(d=null)):rt[h]===rt.Click&&(d=u,u=null);const m=Qa(c)?c.changedTouches[0]:c;if(!m)return;const g=r.getId(f),{clientX:v,clientY:y}=m;fe(e)(x({type:rt[p],id:g,x:v,y},d!==null&&{pointerType:d}))};return Object.keys(rt).filter(h=>Number.isNaN(Number(h))&&!h.endsWith("_Departed")&&o[h]!==!1).forEach(h=>{let c=hr(h);const f=a(h);if(window.PointerEvent)switch(rt[h]){case rt.MouseDown:case rt.MouseUp:c=c.replace("mouse","pointer");break;case rt.TouchStart:case rt.TouchEnd:return}l.push(ze(c,f,t))}),fe(()=>{l.forEach(h=>h())})}function $h({scrollCb:e,doc:t,mirror:r,blockClass:n,blockSelector:i,sampling:s}){const o=fe(Sn(fe(l=>{const u=Rn(l);if(!u||Je(u,n,i,!0))return;const a=r.getId(u);if(u===t&&t.defaultView){const h=Xh(t.defaultView);e({id:a,x:h.left,y:h.top})}else e({id:a,x:u.scrollLeft,y:u.scrollTop})}),s.scroll||100));return ze("scroll",o,t)}function z0({viewportResizeCb:e},{win:t}){let r=-1,n=-1;const i=fe(Sn(fe(()=>{const s=Wh(),o=Ph();(r!==s||n!==o)&&(e({width:Number(o),height:Number(s)}),r=s,n=o)}),200));return ze("resize",i,t)}const K0=["INPUT","TEXTAREA","SELECT"],qh=new WeakMap;function j0({inputCb:e,doc:t,mirror:r,blockClass:n,blockSelector:i,ignoreClass:s,ignoreSelector:o,maskInputOptions:l,maskInputFn:u,sampling:a,userTriggeredOnInput:h}){function c(y){let w=Rn(y);const _=y.isTrusted,S=w&&w.tagName;if(w&&S==="OPTION"&&(w=le.parentElement(w)),!w||!S||K0.indexOf(S)<0||Je(w,n,i,!0)||w.classList.contains(s)||o&&w.matches(o))return;let b=w.value,R=!1;const I=bi(w)||"",E=w.getAttribute("data-hl-record");I==="radio"||I==="checkbox"?R=w.checked:td({maskInputOptions:l,type:I,tagName:S,overwriteRecord:E})&&(b=yi({element:w,maskInputOptions:l,tagName:S,type:I,value:b,overwriteRecord:E,maskInputFn:u})),f(w,h?{text:b,isChecked:R,userTriggered:_}:{text:b,isChecked:R});const C=w.name;I==="radio"&&C&&R&&t.querySelectorAll(`input[type="radio"][name="${C}"]`).forEach(N=>{if(N!==w){const G=N.value;f(N,h?{text:G,isChecked:!R,userTriggered:!1}:{text:G,isChecked:!R})}})}function f(y,w){const _=qh.get(y);if(!_||_.text!==w.text||_.isChecked!==w.isChecked){qh.set(y,w);const S=r.getId(y);fe(e)(B(x({},w),{id:S}))}}const p=(a.input==="last"?["change"]:["input","change"]).map(y=>ze(y,fe(c),t)),m=t.defaultView;if(!m)return()=>{p.forEach(y=>y())};const g=m.Object.getOwnPropertyDescriptor(m.HTMLInputElement.prototype,"value"),v=[[m.HTMLInputElement.prototype,"value"],[m.HTMLInputElement.prototype,"checked"],[m.HTMLSelectElement.prototype,"value"],[m.HTMLTextAreaElement.prototype,"value"],[m.HTMLSelectElement.prototype,"selectedIndex"],[m.HTMLOptionElement.prototype,"selected"]];return g&&g.set&&p.push(...v.map(y=>Ai(y[0],y[1],{set(){fe(c)({target:this,isTrusted:!1})}},!1,m))),fe(()=>{p.forEach(y=>y())})}function Ui(e){const t=[];function r(n,i){if(Di("CSSGroupingRule")&&n.parentRule instanceof CSSGroupingRule||Di("CSSMediaRule")&&n.parentRule instanceof CSSMediaRule||Di("CSSSupportsRule")&&n.parentRule instanceof CSSSupportsRule||Di("CSSConditionRule")&&n.parentRule instanceof CSSConditionRule){const o=Array.from(n.parentRule.cssRules).indexOf(n);return i.unshift(o),r(n.parentRule,i)}else if(n.parentStyleSheet){const o=Array.from(n.parentStyleSheet.cssRules).indexOf(n);i.unshift(o)}return i}return r(e,t)}function Qt(e,t,r){let n,i;return e?(e.ownerNode?n=t.getId(e.ownerNode):i=r.getId(e),{styleId:i,id:n}):{}}function $t(e,t,r,n){e[t]===r&&(e[t]=n)}const Q0=5;function $0({styleSheetRuleCb:e,mirror:t,stylesheetManager:r,doc:n,styleSheetResyncInterval:i},{win:s}){if(!s.CSSStyleSheet||!s.CSSStyleSheet.prototype)return()=>{};const o=new WeakMap,l=new WeakSet;let u=!1,a=!1,h=!1,c,f=!1,d=!1,p=!1;const m=(D,F,H)=>{const j=o.get(D),te=D.cssRules[H];!j||!te||j.splice(Math.min(F!=null?F:0,j.length),0,te)},g=(D,F)=>{const H=o.get(D);H&&F>=0&&F<H.length&&H.splice(F,1)},v=D=>new Proxy(D,{apply:fe((F,H,j)=>{if(u)return a=!0,F.apply(H,j);if(f||d)return F.apply(H,j);const[te,z]=j,{id:ie,styleId:ue}=Qt(H,t,r.styleMirror),Ce=ie&&ie!==-1||ue&&ue!==-1;Ce&&e({id:ie,styleId:ue,adds:[{rule:te,index:z}]}),d=!0;let ot;try{ot=F.apply(H,j)}finally{d=!1}return Ce&&m(H,z,typeof ot=="number"?ot:z!=null?z:0),ot})}),y=D=>new Proxy(D,{apply:fe((F,H,j)=>{if(u)return h=!0,F.apply(H,j);if(f||p)return F.apply(H,j);const[te]=j,{id:z,styleId:ie}=Qt(H,t,r.styleMirror),ue=z&&z!==-1||ie&&ie!==-1;ue&&e({id:z,styleId:ie,removes:[{index:te}]}),p=!0;let Ce;try{Ce=F.apply(H,j)}finally{p=!1}return ue&&g(H,te),Ce})}),w=s.CSSStyleSheet.prototype.insertRule;let _=v(w),S=w;s.CSSStyleSheet.prototype.insertRule=_;const b=s.CSSStyleSheet.prototype.addRule,R=function(D,F,H=this.cssRules.length){const j=`${D} { ${F} }`;return s.CSSStyleSheet.prototype.insertRule.apply(this,[j,H])};s.CSSStyleSheet.prototype.addRule=R;const I=s.CSSStyleSheet.prototype.deleteRule;let E=y(I),C=I;s.CSSStyleSheet.prototype.deleteRule=E;const N=s.CSSStyleSheet.prototype.removeRule,G=function(D){return s.CSSStyleSheet.prototype.deleteRule.apply(this,[D])};s.CSSStyleSheet.prototype.removeRule=G;let $,Z;s.CSSStyleSheet.prototype.replace&&($=s.CSSStyleSheet.prototype.replace,Z=new Proxy($,{apply:fe((D,F,H)=>{if(f)return D.apply(F,H);const[j]=H,{id:te,styleId:z}=Qt(F,t,r.styleMirror);return(te&&te!==-1||z&&z!==-1)&&e({id:te,styleId:z,replace:j}),D.apply(F,H)})}),s.CSSStyleSheet.prototype.replace=Z);let T,W;s.CSSStyleSheet.prototype.replaceSync&&(T=s.CSSStyleSheet.prototype.replaceSync,W=new Proxy(T,{apply:fe((D,F,H)=>{if(f)return D.apply(F,H);const[j]=H,{id:te,styleId:z}=Qt(F,t,r.styleMirror);return(te&&te!==-1||z&&z!==-1)&&e({id:te,styleId:z,replaceSync:j}),D.apply(F,H)})}),s.CSSStyleSheet.prototype.replaceSync=W);const k={};Fi("CSSGroupingRule")?k.CSSGroupingRule=s.CSSGroupingRule:(Fi("CSSMediaRule")&&(k.CSSMediaRule=s.CSSMediaRule),Fi("CSSConditionRule")&&(k.CSSConditionRule=s.CSSConditionRule),Fi("CSSSupportsRule")&&(k.CSSSupportsRule=s.CSSSupportsRule));const M={},P={};Object.entries(k).forEach(([D,F])=>{M[D]={insertRule:F.prototype.insertRule,deleteRule:F.prototype.deleteRule},P[D]={},P[D].insertRule=new Proxy(M[D].insertRule,{apply:fe((H,j,te)=>{if(f)return H.apply(j,te);const[z,ie]=te,{id:ue,styleId:Ce}=Qt(j.parentStyleSheet,t,r.styleMirror);return(ue&&ue!==-1||Ce&&Ce!==-1)&&e({id:ue,styleId:Ce,adds:[{rule:z,index:[...Ui(j),ie||0]}]}),H.apply(j,te)})}),P[D].deleteRule=new Proxy(M[D].deleteRule,{apply:fe((H,j,te)=>{if(f)return H.apply(j,te);const[z]=te,{id:ie,styleId:ue}=Qt(j.parentStyleSheet,t,r.styleMirror);return(ie&&ie!==-1||ue&&ue!==-1)&&e({id:ie,styleId:ue,removes:[{index:[...Ui(j),z]}]}),H.apply(j,te)})}),F.prototype.insertRule=P[D].insertRule,F.prototype.deleteRule=P[D].deleteRule});const U=()=>{u=!0,a=!1,h=!1;try{const D=c!=null?c:c=new s.CSSStyleSheet;D.insertRule(":root {}",0),D.deleteRule(0)}catch(D){return{insertRule:s.CSSStyleSheet.prototype.insertRule===_,deleteRule:s.CSSStyleSheet.prototype.deleteRule===E}}finally{u=!1}return{insertRule:a,deleteRule:h}};let Q=0;const me=D=>{Q>=Q0||(Q+=1,D.insertRule||(S=s.CSSStyleSheet.prototype.insertRule,_=v(S),s.CSSStyleSheet.prototype.insertRule=_),D.deleteRule||(C=s.CSSStyleSheet.prototype.deleteRule,E=y(C),s.CSSStyleSheet.prototype.deleteRule=E))},O=D=>{for(let F=0;F<n.styleSheets.length;F++){const H=n.styleSheets[F];if(l.has(H))continue;const j=H.ownerNode;if(!j||hr(j.nodeName)!=="style"||(j.textContent||"").trim().length)continue;const te=t.getId(j);if(!te||te===-1)continue;let z;try{z=H.cssRules}catch(ue){continue}const ie=o.get(H);if(!ie){if(Array.from(z).some(ue=>jc(ue))){l.add(H);continue}if(o.set(H,Array.from(z)),D)continue;de(te,z);continue}D&&z.length===ie.length||ye(te,H,ie,z)}};function ye(D,F,H,j){const te=Array.from(j);if(te.length===H.length&&te.every((oe,We)=>oe===H[We]))return;const z=new Map(te.map((oe,We)=>[oe,We])),ie=new Set;let ue=-1;const Ce=[];H.forEach((oe,We)=>{const Te=z.get(oe);Te!==void 0&&Te>ue&&!ie.has(oe)?(ie.add(oe),ue=Te):Ce.push({index:We})}),Ce.reverse();const ot=[];te.forEach((oe,We)=>{ie.has(oe)||ot.push({rule:oe.cssText,index:We})}),Ce.length&&e({id:D,removes:Ce}),ot.length&&e({id:D,adds:ot}),o.set(F,te)}function de(D,F){const H=[];for(let j=F.length-1;j>=0;j--)H.push({index:j});H.length&&e({id:D,removes:H}),e({id:D,adds:Array.from(F,(j,te)=>({rule:j.cssText,index:te}))})}let ve;return i>0&&(ve=s.setInterval(fe(()=>{const D=U(),F=D.insertRule&&D.deleteRule;F||me(D),O(F)}),i)),fe(()=>{ve!==void 0&&s.clearInterval(ve),f=!0;const D=s.CSSStyleSheet.prototype;$t(D,"insertRule",_,S),$t(D,"deleteRule",E,C),$t(D,"addRule",R,b),$t(D,"removeRule",G,N),Z&&$t(D,"replace",Z,$),W&&$t(D,"replaceSync",W,T),Object.entries(k).forEach(([F,H])=>{$t(H.prototype,"insertRule",P[F].insertRule,M[F].insertRule),$t(H.prototype,"deleteRule",P[F].deleteRule,M[F].deleteRule)})})}function ef({mirror:e,stylesheetManager:t},r){var n,i,s;let o=null;r.nodeName==="#document"?o=e.getId(r):o=e.getId(le.host(r));const l=r.nodeName==="#document"?(n=r.defaultView)==null?void 0:n.Document:(s=(i=r.ownerDocument)==null?void 0:i.defaultView)==null?void 0:s.ShadowRoot,u=l!=null&&l.prototype?Object.getOwnPropertyDescriptor(l==null?void 0:l.prototype,"adoptedStyleSheets"):void 0;return o===null||o===-1||!l||!u?()=>{}:(Object.defineProperty(r,"adoptedStyleSheets",{configurable:u.configurable,enumerable:u.enumerable,get(){var a;return(a=u.get)==null?void 0:a.call(this)},set(a){var h;const c=(h=u.set)==null?void 0:h.call(this,a);if(o!==null&&o!==-1)try{t.adoptStyleSheets(a,o)}catch(f){}return c}}),fe(()=>{Object.defineProperty(r,"adoptedStyleSheets",{configurable:u.configurable,enumerable:u.enumerable,get:u.get,set:u.set})}))}function q0({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:r,stylesheetManager:n},{win:i}){const s=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(s,{apply:fe((l,u,a)=>{var h;const[c,f,d]=a;if(r.has(c))return s.apply(u,[c,f,d]);const{id:p,styleId:m}=Qt((h=u.parentRule)==null?void 0:h.parentStyleSheet,t,n.styleMirror);return(p&&p!==-1||m&&m!==-1)&&e({id:p,styleId:m,set:{property:c,value:f,priority:d},index:Ui(u.parentRule)}),l.apply(u,a)})});const o=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:fe((l,u,a)=>{var h;const[c]=a;if(r.has(c))return o.apply(u,[c]);const{id:f,styleId:d}=Qt((h=u.parentRule)==null?void 0:h.parentStyleSheet,t,n.styleMirror);return(f&&f!==-1||d&&d!==-1)&&e({id:f,styleId:d,remove:{property:c},index:Ui(u.parentRule)}),l.apply(u,a)})}),fe(()=>{i.CSSStyleDeclaration.prototype.setProperty=s,i.CSSStyleDeclaration.prototype.removeProperty=o})}function eS({mediaInteractionCb:e,blockClass:t,blockSelector:r,mirror:n,sampling:i,doc:s}){const o=fe(u=>Sn(fe(a=>{const h=Rn(a);if(!h||Je(h,t,r,!0))return;const{currentTime:c,volume:f,muted:d,playbackRate:p,loop:m}=h;e({type:u,id:n.getId(h),currentTime:c,volume:f,muted:d,playbackRate:p,loop:m})}),i.media||500)),l=[ze("play",o(Fr.Play),s),ze("pause",o(Fr.Pause),s),ze("seeked",o(Fr.Seeked),s),ze("volumechange",o(Fr.VolumeChange),s),ze("ratechange",o(Fr.RateChange),s)];return fe(()=>{l.forEach(u=>u())})}function tS({fontCb:e,doc:t}){const r=t.defaultView;if(!r)return()=>{};const n=[],i=new WeakMap,s=r.FontFace;r.FontFace=function(u,a,h){const c=new s(u,a,h);return i.set(c,{family:u,buffer:typeof a!="string",descriptors:h,fontSource:typeof a=="string"?a:JSON.stringify(Array.from(new Uint8Array(a)))}),c};const o=fr(t.fonts,"add",function(l){return function(u){return setTimeout(fe(()=>{const a=i.get(u);a&&(e(a),i.delete(u))}),0),l.apply(this,[u])}});return n.push(()=>{r.FontFace=s}),n.push(o),fe(()=>{n.forEach(l=>l())})}function rS(e){const{doc:t,mirror:r,blockClass:n,blockSelector:i,selectionCb:s}=e;let o=!0;const l=fe(()=>{const u=t.getSelection();if(!u||o&&(u!=null&&u.isCollapsed))return;o=u.isCollapsed||!1;const a=[],h=u.rangeCount||0;for(let c=0;c<h;c++){const f=u.getRangeAt(c),{startContainer:d,startOffset:p,endContainer:m,endOffset:g}=f;Je(d,n,i,!0)||Je(m,n,i,!0)||a.push({start:r.getId(d),startOffset:p,end:r.getId(m),endOffset:g})}s({ranges:a})});return l(),ze("selectionchange",l)}function nS({doc:e,customElementCb:t}){const r=e.defaultView;return!r||!r.customElements?()=>{}:fr(r.customElements,"define",function(i){return function(s,o,l){try{t({define:{name:s}})}catch(u){console.warn(`Custom element callback failed for ${s}`)}return i.apply(this,[s,o,l])}})}function iS(e,t){const{mutationCb:r,mousemoveCb:n,mouseInteractionCb:i,scrollCb:s,viewportResizeCb:o,inputCb:l,mediaInteractionCb:u,styleSheetRuleCb:a,styleDeclarationCb:h,canvasMutationCb:c,fontCb:f,selectionCb:d,customElementCb:p}=e;e.mutationCb=(...m)=>{t.mutation&&t.mutation(...m),r(...m)},e.mousemoveCb=(...m)=>{t.mousemove&&t.mousemove(...m),n(...m)},e.mouseInteractionCb=(...m)=>{t.mouseInteraction&&t.mouseInteraction(...m),i(...m)},e.scrollCb=(...m)=>{t.scroll&&t.scroll(...m),s(...m)},e.viewportResizeCb=(...m)=>{t.viewportResize&&t.viewportResize(...m),o(...m)},e.inputCb=(...m)=>{t.input&&t.input(...m),l(...m)},e.mediaInteractionCb=(...m)=>{t.mediaInteaction&&t.mediaInteaction(...m),u(...m)},e.styleSheetRuleCb=(...m)=>{t.styleSheetRule&&t.styleSheetRule(...m),a(...m)},e.styleDeclarationCb=(...m)=>{t.styleDeclaration&&t.styleDeclaration(...m),h(...m)},e.canvasMutationCb=(...m)=>{t.canvasMutation&&t.canvasMutation(...m),c(...m)},e.fontCb=(...m)=>{t.font&&t.font(...m),f(...m)},e.selectionCb=(...m)=>{t.selection&&t.selection(...m),d(...m)},e.customElementCb=(...m)=>{t.customElement&&t.customElement(...m),p(...m)}}function sS(e,t={}){const r=e.doc.defaultView;if(!r)return()=>{};iS(e,t);let n,i=()=>{};e.recordDOM&&([n,i]=Qh(e,e.doc));const s=Y0(e),o=B0(e),l=$h(e),u=z0(e,{win:r}),a=j0(e),h=eS(e);let c=()=>{},f=()=>{},d=()=>{},p=()=>{};e.recordDOM&&(c=$0(e,{win:r}),f=ef(e,e.doc),d=q0(e,{win:r}),e.collectFonts&&(p=tS(e)));const m=rS(e),g=nS(e),v=[];for(const y of e.plugins)v.push(y.observer(y.callback,r,y.options));return fe(()=>{pr.forEach(y=>y.reset()),n==null||n.disconnect(),i(),s(),o(),l(),u(),a(),h(),c(),f(),d(),p(),m(),g(),v.forEach(y=>y())})}function Di(e){return typeof window[e]!="undefined"}function Fi(e){return!!(typeof window[e]!="undefined"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class tf{constructor(t){X(this,"iframeIdToRemoteIdMap",new WeakMap),X(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=t}getId(t,r,n,i){const s=n||this.getIdToRemoteIdMap(t),o=i||this.getRemoteIdToIdMap(t);let l=s.get(r);return l||(l=this.generateIdFn(),s.set(r,l),o.set(l,r)),l}getIds(t,r){const n=this.getIdToRemoteIdMap(t),i=this.getRemoteIdToIdMap(t);return r.map(s=>this.getId(t,s,n,i))}getRemoteId(t,r,n){const i=n||this.getRemoteIdToIdMap(t);if(typeof r!="number")return r;const s=i.get(r);return s||-1}getRemoteIds(t,r){const n=this.getRemoteIdToIdMap(t);return r.map(i=>this.getRemoteId(t,i,n))}reset(t){if(!t){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){let r=this.iframeIdToRemoteIdMap.get(t);return r||(r=new Map,this.iframeIdToRemoteIdMap.set(t,r)),r}getRemoteIdToIdMap(t){let r=this.iframeRemoteIdToIdMap.get(t);return r||(r=new Map,this.iframeRemoteIdToIdMap.set(t,r)),r}}class oS{constructor(t){X(this,"iframes",new WeakMap),X(this,"crossOriginIframeMap",new WeakMap),X(this,"crossOriginIframeMirror",new tf(rd)),X(this,"crossOriginIframeStyleMirror"),X(this,"crossOriginIframeRootIdMap",new WeakMap),X(this,"mirror"),X(this,"mutationCb"),X(this,"wrappedEmit"),X(this,"loadListener"),X(this,"stylesheetManager"),X(this,"recordCrossOriginIframes"),this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new tf(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(t){this.iframes.set(t,!0),t.contentWindow&&this.crossOriginIframeMap.set(t.contentWindow,t)}addLoadListener(t){this.loadListener=t}attachIframe(t,r){var n,i;this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:r}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&((n=t.contentWindow)==null||n.addEventListener("message",this.handleMessage.bind(this))),(i=this.loadListener)==null||i.call(this,t),t.contentDocument&&t.contentDocument.adoptedStyleSheets&&t.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(t.contentDocument.adoptedStyleSheets,this.mirror.getId(t.contentDocument))}handleMessage(t){const r=t;if(r.data.type!=="rrweb"||r.origin!==r.data.origin)return;const n=t.source;if(!n)return;const i=this.crossOriginIframeMap.get(n);if(!i)return;const s=this.transformCrossOriginEvent(i,r.data.event);s&&this.wrappedEmit(s,r.data.isCheckout)}transformCrossOriginEvent(t,r){var n;switch(r.type){case ge.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(r.data.node,t);const i=r.data.node.id;return this.crossOriginIframeRootIdMap.set(t,i),this.patchRootIdOnNode(r.data.node,i),{timestamp:r.timestamp,type:ge.IncrementalSnapshot,data:{source:he.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:r.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case ge.Meta:case ge.Load:case ge.DomContentLoaded:return!1;case ge.Plugin:return r;case ge.Custom:return this.replaceIds(r.data.payload,t,["id","parentId","previousId","nextId"]),r;case ge.IncrementalSnapshot:switch(r.data.source){case he.Mutation:return r.data.adds.forEach(i=>{this.replaceIds(i,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(i.node,t);const s=this.crossOriginIframeRootIdMap.get(t);s&&this.patchRootIdOnNode(i.node,s)}),r.data.removes.forEach(i=>{this.replaceIds(i,t,["parentId","id"])}),r.data.attributes.forEach(i=>{this.replaceIds(i,t,["id"])}),r.data.texts.forEach(i=>{this.replaceIds(i,t,["id"])}),r;case he.Drag:case he.TouchMove:case he.MouseMove:return r.data.positions.forEach(i=>{this.replaceIds(i,t,["id"])}),r;case he.ViewportResize:return!1;case he.MediaInteraction:case he.MouseInteraction:case he.Scroll:case he.CanvasMutation:case he.Input:return this.replaceIds(r.data,t,["id"]),r;case he.StyleSheetRule:case he.StyleDeclaration:return this.replaceIds(r.data,t,["id"]),this.replaceStyleIds(r.data,t,["styleId"]),r;case he.Font:return r;case he.Selection:return r.data.ranges.forEach(i=>{this.replaceIds(i,t,["start","end"])}),r;case he.AdoptedStyleSheet:return this.replaceIds(r.data,t,["id"]),this.replaceStyleIds(r.data,t,["styleIds"]),(n=r.data.styles)==null||n.forEach(i=>{this.replaceStyleIds(i,t,["styleId"])}),r}}return!1}replace(t,r,n,i){for(const s of i)!Array.isArray(r[s])&&typeof r[s]!="number"||(Array.isArray(r[s])?r[s]=t.getIds(n,r[s]):r[s]=t.getId(n,r[s]));return r}replaceIds(t,r,n){return this.replace(this.crossOriginIframeMirror,t,r,n)}replaceStyleIds(t,r,n){return this.replace(this.crossOriginIframeStyleMirror,t,r,n)}replaceIdOnNode(t,r){this.replaceIds(t,r,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach(n=>{this.replaceIdOnNode(n,r)})}patchRootIdOnNode(t,r){t.type!==Hh.Document&&!t.rootId&&(t.rootId=r),"childNodes"in t&&t.childNodes.forEach(n=>{this.patchRootIdOnNode(n,r)})}}class aS{constructor(t){X(this,"shadowDoms",new WeakSet),X(this,"mutationCb"),X(this,"scrollCb"),X(this,"bypassOptions"),X(this,"mirror"),X(this,"restoreHandlers",[]),this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(t,r){if(!mn(t)||this.shadowDoms.has(t))return;this.shadowDoms.add(t);const[n]=Qh(B(x({},this.bypassOptions),{doc:r,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),t);this.restoreHandlers.push(()=>n.disconnect()),this.restoreHandlers.push($h(B(x({},this.bypassOptions),{scrollCb:this.scrollCb,doc:t,mirror:this.mirror}))),setTimeout(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(le.host(t))),this.restoreHandlers.push(ef({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))},0)}observeAttachShadow(t){!t.contentWindow||!t.contentDocument||this.patchAttachShadow(t.contentWindow.Element,t.contentDocument)}patchAttachShadow(t,r){const n=this;this.restoreHandlers.push(fr(t.prototype,"attachShadow",function(i){return function(s){const o=i.call(this,s),l=le.shadowRoot(this);return l&&Jh(this)&&n.addShadowRoot(l,r),o}}))}reset(){this.restoreHandlers.forEach(t=>{try{t()}catch(r){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}for(var Jr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",lS=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),Ji=0;Ji<Jr.length;Ji++)lS[Jr.charCodeAt(Ji)]=Ji;var uS=function(e){var t=new Uint8Array(e),r,n=t.length,i="";for(r=0;r<n;r+=3)i+=Jr[t[r]>>2],i+=Jr[(t[r]&3)<<4|t[r+1]>>4],i+=Jr[(t[r+1]&15)<<2|t[r+2]>>6],i+=Jr[t[r+2]&63];return n%3===2?i=i.substring(0,i.length-1)+"=":n%3===1&&(i=i.substring(0,i.length-2)+"=="),i};const rf=new Map;function cS(e,t){let r=rf.get(e);return r||(r=new Map,rf.set(e,r)),r.has(t)||r.set(t,[]),r.get(t)}const nf=(e,t,r)=>{if(!e||!(of(e,t)||typeof e=="object"))return;const n=e.constructor.name,i=cS(r,n);let s=i.indexOf(e);return s===-1&&(s=i.length,i.push(e)),s};function Hi(e,t,r){if(e instanceof Array)return e.map(n=>Hi(n,t,r));if(e===null)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray)return{rr_type:e.constructor.name,args:[Object.values(e)]};if(e instanceof ArrayBuffer){const n=e.constructor.name,i=uS(e);return{rr_type:n,base64:i}}else{if(e instanceof DataView)return{rr_type:e.constructor.name,args:[Hi(e.buffer,t,r),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){const n=e.constructor.name,{src:i}=e;return{rr_type:n,src:i}}else if(e instanceof HTMLCanvasElement){const n="HTMLImageElement",i=e.toDataURL();return{rr_type:n,src:i}}else{if(e instanceof ImageData)return{rr_type:e.constructor.name,args:[Hi(e.data,t,r),e.width,e.height]};if(of(e,t)||typeof e=="object"){const n=e.constructor.name,i=nf(e,t,r);return{rr_type:n,index:i}}}}return e}const sf=(e,t,r)=>e.map(n=>Hi(n,t,r)),of=(e,t)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(i=>typeof t[i]=="function").find(i=>e instanceof t[i]);function dS(e,t,r,n){const i=[],s=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const o of s)try{if(typeof t.CanvasRenderingContext2D.prototype[o]!="function")continue;const l=fr(t.CanvasRenderingContext2D.prototype,o,function(u){return function(...a){return Je(this.canvas,r,n,!0)||setTimeout(()=>{const h=sf(a,t,this);e(this.canvas,{type:Dr["2D"],property:o,args:h})},0),u.apply(this,a)}});i.push(l)}catch(l){const u=Ai(t.CanvasRenderingContext2D.prototype,o,{set(a){e(this.canvas,{type:Dr["2D"],property:o,args:[a],setter:!0})}});i.push(u)}return()=>{i.forEach(o=>o())}}function hS(e){return e==="experimental-webgl"?"webgl":e}function af(e,t,r,n){const i=[];try{const s=fr(e.HTMLCanvasElement.prototype,"getContext",function(o){return function(l,...u){if(!Je(this,t,r,!0)){const a=hS(l);if("__context"in this||(this.__context=a),n&&["webgl","webgl2"].includes(a))if(u[0]&&typeof u[0]=="object"){const h=u[0];h.preserveDrawingBuffer||(h.preserveDrawingBuffer=!0)}else u.splice(0,1,{preserveDrawingBuffer:!0})}return o.apply(this,[l,...u])}});i.push(s)}catch(s){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach(s=>s())}}function lf(e,t,r,n,i,s){const o=[],l=Object.getOwnPropertyNames(e);for(const u of l)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(u))try{if(typeof e[u]!="function")continue;const a=fr(e,u,function(h){return function(...c){const f=h.apply(this,c);if(nf(f,s,this),"tagName"in this.canvas&&!Je(this.canvas,n,i,!0)){const d=sf(c,s,this),p={type:t,property:u,args:d};r(this.canvas,p)}return f}});o.push(a)}catch(a){const h=Ai(e,u,{set(c){r(this.canvas,{type:t,property:u,args:[c],setter:!0})}});o.push(h)}return o}function fS(e,t,r,n){const i=[];return typeof t.WebGLRenderingContext!="undefined"&&i.push(...lf(t.WebGLRenderingContext.prototype,Dr.WebGL,e,r,n,t)),typeof t.WebGL2RenderingContext!="undefined"&&i.push(...lf(t.WebGL2RenderingContext.prototype,Dr.WebGL2,e,r,n,t)),()=>{i.forEach(s=>s())}}const uf=`(function() {
|
|
113
|
+
or you can use record.mirror to access the mirror instance during recording.`;let Wh={map:{},getId(){return console.error(Dr),-1},getNode(){return console.error(Dr),null},removeNodeFromMap(){console.error(Dr)},has(){return console.error(Dr),!1},reset(){console.error(Dr)}};typeof window!="undefined"&&window.Proxy&&window.Reflect&&(Wh=new Proxy(Wh,{get(e,t,r){return t==="map"&&console.error(Dr),Reflect.get(e,t,r)}}));function Sn(e,t,r={}){let n=null,i=0;return function(...s){const o=Date.now();!i&&r.leading===!1&&(i=o);const l=t-(o-i),c=this;l<=0||l>t?(n&&(clearTimeout(n),n=null),i=o,e.apply(c,s)):!n&&r.trailing!==!1&&(n=setTimeout(()=>{i=r.leading===!1?0:Date.now(),n=null,e.apply(c,s)},l))}}function Fi(e,t,r,n,i=window){const s=i.Object.getOwnPropertyDescriptor(e,t);return i.Object.defineProperty(e,t,n?r:{set(o){setTimeout(()=>{r.set.call(this,o)},0),s&&s.set&&s.set.call(this,o)}}),()=>Fi(e,t,s||{},!0)}function Ph(e){var t,r,n,i;const s=e.document;return{left:s.scrollingElement?s.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:s.documentElement.scrollLeft||(s==null?void 0:s.body)&&((t=le.parentElement(s.body))==null?void 0:t.scrollLeft)||((r=s==null?void 0:s.body)==null?void 0:r.scrollLeft)||0,top:s.scrollingElement?s.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:(s==null?void 0:s.documentElement.scrollTop)||(s==null?void 0:s.body)&&((n=le.parentElement(s.body))==null?void 0:n.scrollTop)||((i=s==null?void 0:s.body)==null?void 0:i.scrollTop)||0}}function Mh(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Ah(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Uh(e){return e?e.nodeType===e.ELEMENT_NODE?e:le.parentElement(e):null}const M0=e=>{try{if(e instanceof HTMLElement)return e.tagName==="CANVAS"}catch(t){return!1}return!1};function Je(e,t,r,n){if(!e)return!1;const i=Uh(e);if(!i)return!1;try{if(typeof t=="string"){if(i.classList.contains(t)||n&&i.closest("."+t)!==null)return!0}else if(Ti(i,t,n))return!0}catch(s){}return!!(r&&(i.matches(r)||n&&i.closest(r)!==null))}function A0(e,t){return t.getId(e)!==-1}function Qa(e,t,r){return e.tagName==="TITLE"&&r.headTitleMutations?!0:t.getId(e)===gn}function Dh(e,t){if(pn(e))return!1;const r=t.getId(e);if(!t.has(r))return!0;const n=le.parentNode(e);return n&&n.nodeType===e.DOCUMENT_NODE?!1:n?Dh(n,t):!0}function $a(e){return!!e.changedTouches}function U0(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach)}function Fh(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function Jh(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function qa(e){return e?e instanceof Ba&&"shadowRoot"in e?!!e.shadowRoot:!!le.shadowRoot(e):!1}class D0{constructor(){X(this,"id",1),X(this,"styleIDMap",new WeakMap),X(this,"idStyleMap",new Map)}getId(t){var r;return(r=this.styleIDMap.get(t))!=null?r:-1}has(t){return this.styleIDMap.has(t)}add(t,r){if(this.has(t))return this.getId(t);let n;return r===void 0?n=this.id++:n=r,this.styleIDMap.set(t,n),this.idStyleMap.set(n,t),n}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function Hh(e){var t;let r=null;return"getRootNode"in e&&((t=le.getRootNode(e))==null?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&le.host(le.getRootNode(e))&&(r=le.host(le.getRootNode(e))),r}function F0(e){let t=e,r;for(;r=Hh(t);)t=r;return t}function J0(e){const t=le.ownerDocument(e);if(!t)return!1;const r=F0(e);return le.contains(t,r)}function Yh(e){const t=le.ownerDocument(e);return t?le.contains(t,e)||J0(e):!1}var ge=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e[e.Asset=7]="Asset",e))(ge||{}),he=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(he||{}),tt=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(tt||{}),jt=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(jt||{}),Fr=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(Fr||{}),Jr=(e=>(e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e[e.RateChange=4]="RateChange",e))(Jr||{}),Bh=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(Bh||{});function zh(e){return"__ln"in e}class H0{constructor(){X(this,"length",0),X(this,"head",null),X(this,"tail",null)}get(t){if(t>=this.length)throw new Error("Position outside of list range");let r=this.head;for(let n=0;n<t;n++)r=(r==null?void 0:r.next)||null;return r}addNode(t){const r={value:t,previous:null,next:null};if(t.__ln=r,t.previousSibling&&zh(t.previousSibling)){const n=t.previousSibling.__ln.next;r.next=n,r.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=r,n&&(n.previous=r)}else if(t.nextSibling&&zh(t.nextSibling)&&t.nextSibling.__ln.previous){const n=t.nextSibling.__ln.previous;r.previous=n,r.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=r,n&&(n.next=r)}else this.head&&(this.head.previous=r),r.next=this.head,this.head=r;r.next===null&&(this.tail=r),this.length++}removeNode(t){const r=t.__ln;this.head&&(r.previous?(r.previous.next=r.next,r.next?r.next.previous=r.previous:this.tail=r.previous):(this.head=r.next,this.head?this.head.previous=null:this.tail=null),t.__ln&&delete t.__ln,this.length--)}}const Kh=(e,t)=>`${e}@${t}`;class Y0{constructor(){X(this,"frozen",!1),X(this,"locked",!1),X(this,"texts",[]),X(this,"attributes",[]),X(this,"attributeMap",new WeakMap),X(this,"removes",[]),X(this,"mapRemoves",[]),X(this,"movedMap",{}),X(this,"addedSet",new Set),X(this,"movedSet",new Set),X(this,"droppedSet",new Set),X(this,"removesSubTreeCache",new Set),X(this,"mutationCb"),X(this,"blockClass"),X(this,"blockSelector"),X(this,"maskTextClass"),X(this,"maskTextSelector"),X(this,"inlineStylesheet"),X(this,"maskInputOptions"),X(this,"maskTextFn"),X(this,"maskInputFn"),X(this,"keepIframeSrcFn"),X(this,"recordCanvas"),X(this,"inlineImages"),X(this,"inlineVideos"),X(this,"privacySetting"),X(this,"slimDOMOptions"),X(this,"dataURLOptions"),X(this,"doc"),X(this,"mirror"),X(this,"iframeManager"),X(this,"stylesheetManager"),X(this,"shadowDomManager"),X(this,"canvasManager"),X(this,"processedNodeManager"),X(this,"unattachedDoc"),X(this,"processMutations",t=>{t.forEach(this.processMutation),this.emit()}),X(this,"emit",()=>{if(this.frozen||this.locked)return;const t=[],r=new Set,n=new H0,i=c=>{let a=c,h=gn;for(;h===gn;)a=a&&a.nextSibling,h=a&&this.mirror.getId(a);return h},s=c=>{const a=le.parentNode(c);if(!a||!Yh(c))return;let h=!1;if(c.nodeType===Node.TEXT_NODE){const p=a.tagName;if(p==="TEXTAREA")return;p==="STYLE"&&this.addedSet.has(a)&&(h=!0)}const u=pn(a)?this.mirror.getId(Hh(c)):this.mirror.getId(a),f=i(c);if(u===-1||f===-1)return n.addNode(c);const d=Ur(c,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,inlineVideos:this.inlineVideos,privacySetting:this.privacySetting,onSerialize:p=>{Fh(p,this.mirror)&&this.iframeManager.addIframe(p),Jh(p,this.mirror)&&this.stylesheetManager.trackLinkElement(p),qa(c)&&this.shadowDomManager.addShadowRoot(le.shadowRoot(c),this.doc)},onIframeLoad:(p,m)=>{this.iframeManager.attachIframe(p,m),this.shadowDomManager.observeAttachShadow(p)},onStylesheetLoad:(p,m)=>{this.stylesheetManager.attachLinkElement(p,m)},cssCaptured:h});d&&(t.push({parentId:u,nextId:f,node:d}),r.add(d.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const c of this.movedSet)jh(this.removesSubTreeCache,c)&&!this.movedSet.has(le.parentNode(c))||s(c);for(const c of this.addedSet)!Qh(this.droppedSet,c)&&!jh(this.removesSubTreeCache,c)||Qh(this.movedSet,c)?s(c):this.droppedSet.add(c);let o=null;for(;n.length;){let c=null;if(o){const a=this.mirror.getId(le.parentNode(o.value)),h=i(o.value);a!==-1&&h!==-1&&(c=o)}if(!c){let a=n.tail;for(;a;){const h=a;if(a=a.previous,h){const u=this.mirror.getId(le.parentNode(h.value));if(i(h.value)===-1)continue;if(u!==-1){c=h;break}else{const d=h.value,p=le.parentNode(d);if(p&&p.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const m=le.host(p);if(this.mirror.getId(m)!==-1){c=h;break}}}}}}if(!c){for(;n.head;)n.removeNode(n.head.value);break}o=c.previous,n.removeNode(c.value),s(c.value)}const l={texts:this.texts.map(c=>{var a,h;const u=c.node,f=le.parentNode(u);f&&f.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(f);let d=c.value;const p=this.privacySetting==="strict",m=this.privacySetting==="default"&&rd(d),g=(h=(a=c.node)==null?void 0:a.parentElement)==null?void 0:h.getAttribute("data-hl-record");return(p||m)&&!g&&d&&(d=Oo(d)),{id:this.mirror.getId(u),value:d}}).filter(c=>!r.has(c.id)).filter(c=>this.mirror.has(c.id)),attributes:this.attributes.map(c=>{const{attributes:a}=c;if(typeof a.style=="string"){const h=JSON.stringify(c.styleDiff),u=JSON.stringify(c._unchangedStyles);h.length<a.style.length&&(h+u).split("var(").length===a.style.split("var(").length&&(a.style=c.styleDiff)}return{id:this.mirror.getId(c.node),attributes:a}}).filter(c=>!r.has(c.id)).filter(c=>this.mirror.has(c.id)),removes:this.removes,adds:t};!l.texts.length&&!l.attributes.length&&!l.removes.length&&!l.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.removesSubTreeCache=new Set,this.movedMap={},this.mutationCb(l))}),X(this,"genTextAreaValueMutation",t=>{let r=this.attributeMap.get(t);r||(r={node:t,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(r),this.attributeMap.set(t,r));const n=Array.from(le.childNodes(t),i=>le.textContent(i)||"").join("");r.attributes.value=Si({overwriteRecord:null,element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:wi(t),value:n,maskInputFn:this.maskInputFn})}),X(this,"processMutation",t=>{if(!Qa(t.target,this.mirror,this.slimDOMOptions))switch(t.type){case"characterData":{const r=le.textContent(t.target);!Je(t.target,this.blockClass,this.blockSelector,!1)&&r!==t.oldValue&&this.texts.push({value:ud(t.target,this.maskTextClass,this.maskTextSelector,!0)&&r?this.maskTextFn?this.maskTextFn(r,Uh(t.target)):r.replace(/[\S]/g,"*"):r,node:t.target});break}case"attributes":{const r=t.target;let n=t.attributeName,i=t.target.getAttribute(n);if(n==="value"){const o=wi(r);i=Si({element:r,maskInputOptions:this.maskInputOptions,tagName:r.tagName,type:o,value:i,overwriteRecord:r.getAttribute("data-hl-record"),maskInputFn:this.maskInputFn})}if(Je(t.target,this.blockClass,this.blockSelector,!1)||i===t.oldValue)return;let s=this.attributeMap.get(t.target);if(r.tagName==="IFRAME"&&n==="src"&&!this.keepIframeSrcFn(i))if(!r.contentDocument)n="rr_src";else return;if(s||(s={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(s),this.attributeMap.set(t.target,s)),n==="type"&&r.tagName==="INPUT"&&(t.oldValue||"").toLowerCase()==="password"&&r.setAttribute("data-rr-is-password","true"),!ld(r.tagName,n)){if(t.target.tagName==="INPUT"){const l=t.target;if(l.type==="password"){s.attributes.value="*".repeat(l.value.length);break}}if(s.attributes[n]=ad(this.doc,hr(r.tagName),hr(n),i),n==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(c){this.unattachedDoc=this.doc}const l=this.unattachedDoc.createElement("span");t.oldValue&&l.setAttribute("style",t.oldValue);for(const c of Array.from(r.style)){const a=r.style.getPropertyValue(c),h=r.style.getPropertyPriority(c);a!==l.style.getPropertyValue(c)||h!==l.style.getPropertyPriority(c)?h===""?s.styleDiff[c]=a:s.styleDiff[c]=[a,h]:s._unchangedStyles[c]=[a,h]}for(const c of Array.from(l.style))r.style.getPropertyValue(c)===""&&(s.styleDiff[c]=!1)}else n==="open"&&r.tagName==="DIALOG"&&(r.matches("dialog:modal")?s.attributes.rr_open_mode="modal":s.attributes.rr_open_mode="non-modal")}break}case"childList":{if(Je(t.target,this.blockClass,this.blockSelector,!0))return;if(t.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(t.target);return}t.addedNodes.forEach(r=>this.genAdds(r,t.target)),t.removedNodes.forEach(r=>{const n=this.mirror.getId(r),i=pn(t.target)?this.mirror.getId(le.host(t.target)):this.mirror.getId(t.target);Je(t.target,this.blockClass,this.blockSelector,!1)||Qa(r,this.mirror,this.slimDOMOptions)||!A0(r,this.mirror)||(this.addedSet.has(r)?(el(this.addedSet,r),this.droppedSet.add(r)):this.addedSet.has(t.target)&&n===-1||Dh(t.target,this.mirror)||(this.movedSet.has(r)&&this.movedMap[Kh(n,i)]?el(this.movedSet,r):(this.removes.push({parentId:i,id:n,isShadow:pn(t.target)&&mn(t.target)?!0:void 0}),B0(r,this.removesSubTreeCache))),this.mapRemoves.push(r))});break}}}),X(this,"genAdds",(t,r)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!(this.addedSet.has(t)||this.movedSet.has(t))){if(this.mirror.hasNode(t)){if(Qa(t,this.mirror,this.slimDOMOptions))return;this.movedSet.add(t);let n=null;r&&this.mirror.hasNode(r)&&(n=this.mirror.getId(r)),n&&n!==-1&&(this.movedMap[Kh(this.mirror.getId(t),n)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);Je(t,this.blockClass,this.blockSelector,!1)||(le.childNodes(t).forEach(n=>this.genAdds(n)),qa(t)&&le.childNodes(le.shadowRoot(t)).forEach(n=>{this.processedNodeManager.add(n,this),this.genAdds(n,t)}))}})}init(t){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","inlineVideos","privacySetting","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(r=>{this[r]=t[r]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function el(e,t){e.delete(t),le.childNodes(t).forEach(r=>el(e,r))}function B0(e,t){const r=[e];for(;r.length;){const n=r.pop();t.has(n)||(t.add(n),le.childNodes(n).forEach(i=>r.push(i)))}}function jh(e,t,r){return e.size===0?!1:z0(e,t)}function z0(e,t,r){const n=le.parentNode(t);return n?e.has(n):!1}function Qh(e,t){return e.size===0?!1:$h(e,t)}function $h(e,t){const r=le.parentNode(t);return r?e.has(r)?!0:$h(e,r):!1}let wn;function K0(e){wn=e}function j0(){wn=void 0}const fe=e=>wn?(...r)=>{try{return e(...r)}catch(n){if(wn&&wn(n)===!0)return;throw n}}:e,pr=[];function Rn(e){try{if("composedPath"in e){const t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch(t){}return e&&e.target}function qh(e,t){const r=new Y0;pr.push(r),r.init(e);const[n,i]=Xh(),s=new n(fe(r.processMutations.bind(r)));return s.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),[s,i]}function Q0({mousemoveCb:e,sampling:t,doc:r,mirror:n}){if(t.mousemove===!1)return()=>{};const i=typeof t.mousemove=="number"?t.mousemove:50,s=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500;let o=[],l;const c=Sn(fe(u=>{const f=Date.now()-l;e(o.map(d=>(d.timeOffset-=f,d)),u),o=[],l=null}),s),a=fe(Sn(fe(u=>{const f=Rn(u),{clientX:d,clientY:p}=$a(u)?u.changedTouches[0]:u;l||(l=vn()),o.push({x:d,y:p,id:n.getId(f),timeOffset:vn()-l}),c(typeof DragEvent!="undefined"&&u instanceof DragEvent?he.Drag:u instanceof MouseEvent?he.MouseMove:he.TouchMove)}),i,{trailing:!1})),h=[ze("mousemove",a,r),ze("touchmove",a,r),ze("drag",a,r)];return fe(()=>{h.forEach(u=>u())})}function $0({mouseInteractionCb:e,doc:t,mirror:r,blockClass:n,blockSelector:i,sampling:s}){if(s.mouseInteraction===!1)return()=>{};const o=s.mouseInteraction===!0||s.mouseInteraction===void 0?{}:s.mouseInteraction,l=[];let c=null;const a=h=>u=>{const f=Rn(u);if(Je(f,n,i,!0)||M0(f))return;let d=null,p=h;if("pointerType"in u){switch(u.pointerType){case"mouse":d=jt.Mouse;break;case"touch":d=jt.Touch;break;case"pen":d=jt.Pen;break}d===jt.Touch&&(tt[h]===tt.MouseDown?p="TouchStart":tt[h]===tt.MouseUp&&(p="TouchEnd"))}else $a(u)&&(d=jt.Touch);d!==null?(c=d,(p.startsWith("Touch")&&d===jt.Touch||p.startsWith("Mouse")&&d===jt.Mouse)&&(d=null)):tt[h]===tt.Click&&(d=c,c=null);const m=$a(u)?u.changedTouches[0]:u;if(!m)return;const g=r.getId(f),{clientX:v,clientY:y}=m;fe(e)(x({type:tt[p],id:g,x:v,y},d!==null&&{pointerType:d}))};return Object.keys(tt).filter(h=>Number.isNaN(Number(h))&&!h.endsWith("_Departed")&&o[h]!==!1).forEach(h=>{let u=hr(h);const f=a(h);if(window.PointerEvent)switch(tt[h]){case tt.MouseDown:case tt.MouseUp:u=u.replace("mouse","pointer");break;case tt.TouchStart:case tt.TouchEnd:return}l.push(ze(u,f,t))}),fe(()=>{l.forEach(h=>h())})}function ef({scrollCb:e,doc:t,mirror:r,blockClass:n,blockSelector:i,sampling:s}){const o=fe(Sn(fe(l=>{const c=Rn(l);if(!c||Je(c,n,i,!0))return;const a=r.getId(c);if(c===t&&t.defaultView){const h=Ph(t.defaultView);e({id:a,x:h.left,y:h.top})}else e({id:a,x:c.scrollLeft,y:c.scrollTop})}),s.scroll||100));return ze("scroll",o,t)}function q0({viewportResizeCb:e},{win:t}){let r=-1,n=-1;const i=fe(Sn(fe(()=>{const s=Mh(),o=Ah();(r!==s||n!==o)&&(e({width:Number(o),height:Number(s)}),r=s,n=o)}),200));return ze("resize",i,t)}const eS=["INPUT","TEXTAREA","SELECT"],tf=new WeakMap;function tS({inputCb:e,doc:t,mirror:r,blockClass:n,blockSelector:i,ignoreClass:s,ignoreSelector:o,maskInputOptions:l,maskInputFn:c,sampling:a,userTriggeredOnInput:h}){function u(y){let w=Rn(y);const _=y.isTrusted,S=w&&w.tagName;if(w&&S==="OPTION"&&(w=le.parentElement(w)),!w||!S||eS.indexOf(S)<0||Je(w,n,i,!0)||w.classList.contains(s)||o&&w.matches(o))return;let b=w.value,R=!1;const I=wi(w)||"",E=w.getAttribute("data-hl-record");I==="radio"||I==="checkbox"?R=w.checked:nd({maskInputOptions:l,type:I,tagName:S,overwriteRecord:E})&&(b=Si({element:w,maskInputOptions:l,tagName:S,type:I,value:b,overwriteRecord:E,maskInputFn:c})),f(w,h?{text:b,isChecked:R,userTriggered:_}:{text:b,isChecked:R});const C=w.name;I==="radio"&&C&&R&&t.querySelectorAll(`input[type="radio"][name="${C}"]`).forEach(N=>{if(N!==w){const G=N.value;f(N,h?{text:G,isChecked:!R,userTriggered:!1}:{text:G,isChecked:!R})}})}function f(y,w){const _=tf.get(y);if(!_||_.text!==w.text||_.isChecked!==w.isChecked){tf.set(y,w);const S=r.getId(y);fe(e)(B(x({},w),{id:S}))}}const p=(a.input==="last"?["change"]:["input","change"]).map(y=>ze(y,fe(u),t)),m=t.defaultView;if(!m)return()=>{p.forEach(y=>y())};const g=m.Object.getOwnPropertyDescriptor(m.HTMLInputElement.prototype,"value"),v=[[m.HTMLInputElement.prototype,"value"],[m.HTMLInputElement.prototype,"checked"],[m.HTMLSelectElement.prototype,"value"],[m.HTMLTextAreaElement.prototype,"value"],[m.HTMLSelectElement.prototype,"selectedIndex"],[m.HTMLOptionElement.prototype,"selected"]];return g&&g.set&&p.push(...v.map(y=>Fi(y[0],y[1],{set(){fe(u)({target:this,isTrusted:!1})}},!1,m))),fe(()=>{p.forEach(y=>y())})}function Ji(e){const t=[];function r(n,i){if(Hi("CSSGroupingRule")&&n.parentRule instanceof CSSGroupingRule||Hi("CSSMediaRule")&&n.parentRule instanceof CSSMediaRule||Hi("CSSSupportsRule")&&n.parentRule instanceof CSSSupportsRule||Hi("CSSConditionRule")&&n.parentRule instanceof CSSConditionRule){const o=Array.from(n.parentRule.cssRules).indexOf(n);return i.unshift(o),r(n.parentRule,i)}else if(n.parentStyleSheet){const o=Array.from(n.parentStyleSheet.cssRules).indexOf(n);i.unshift(o)}return i}return r(e,t)}function Qt(e,t,r){let n,i;return e?(e.ownerNode?n=t.getId(e.ownerNode):i=r.getId(e),{styleId:i,id:n}):{}}function $t(e,t,r,n){e[t]===r&&(e[t]=n)}const rS=5;function nS({styleSheetRuleCb:e,mirror:t,stylesheetManager:r,doc:n,styleSheetResyncInterval:i},{win:s}){if(!s.CSSStyleSheet||!s.CSSStyleSheet.prototype)return()=>{};const o=new WeakMap,l=new WeakSet;let c=!1,a=!1,h=!1,u,f=!1,d=!1,p=!1;const m=(D,F,H)=>{const Q=o.get(D),te=D.cssRules[H];!Q||!te||Q.splice(Math.min(F!=null?F:0,Q.length),0,te)},g=(D,F)=>{const H=o.get(D);H&&F>=0&&F<H.length&&H.splice(F,1)},v=D=>new Proxy(D,{apply:fe((F,H,Q)=>{if(c)return a=!0,F.apply(H,Q);if(f||d)return F.apply(H,Q);const[te,K]=Q,{id:ie,styleId:ce}=Qt(H,t,r.styleMirror),Ce=ie&&ie!==-1||ce&&ce!==-1;Ce&&e({id:ie,styleId:ce,adds:[{rule:te,index:K}]}),d=!0;let at;try{at=F.apply(H,Q)}finally{d=!1}return Ce&&m(H,K,typeof at=="number"?at:K!=null?K:0),at})}),y=D=>new Proxy(D,{apply:fe((F,H,Q)=>{if(c)return h=!0,F.apply(H,Q);if(f||p)return F.apply(H,Q);const[te]=Q,{id:K,styleId:ie}=Qt(H,t,r.styleMirror),ce=K&&K!==-1||ie&&ie!==-1;ce&&e({id:K,styleId:ie,removes:[{index:te}]}),p=!0;let Ce;try{Ce=F.apply(H,Q)}finally{p=!1}return ce&&g(H,te),Ce})}),w=s.CSSStyleSheet.prototype.insertRule;let _=v(w),S=w;s.CSSStyleSheet.prototype.insertRule=_;const b=s.CSSStyleSheet.prototype.addRule,R=function(D,F,H=this.cssRules.length){const Q=`${D} { ${F} }`;return s.CSSStyleSheet.prototype.insertRule.apply(this,[Q,H])};s.CSSStyleSheet.prototype.addRule=R;const I=s.CSSStyleSheet.prototype.deleteRule;let E=y(I),C=I;s.CSSStyleSheet.prototype.deleteRule=E;const N=s.CSSStyleSheet.prototype.removeRule,G=function(D){return s.CSSStyleSheet.prototype.deleteRule.apply(this,[D])};s.CSSStyleSheet.prototype.removeRule=G;let q,Z;s.CSSStyleSheet.prototype.replace&&(q=s.CSSStyleSheet.prototype.replace,Z=new Proxy(q,{apply:fe((D,F,H)=>{if(f)return D.apply(F,H);const[Q]=H,{id:te,styleId:K}=Qt(F,t,r.styleMirror);return(te&&te!==-1||K&&K!==-1)&&e({id:te,styleId:K,replace:Q}),D.apply(F,H)})}),s.CSSStyleSheet.prototype.replace=Z);let T,W;s.CSSStyleSheet.prototype.replaceSync&&(T=s.CSSStyleSheet.prototype.replaceSync,W=new Proxy(T,{apply:fe((D,F,H)=>{if(f)return D.apply(F,H);const[Q]=H,{id:te,styleId:K}=Qt(F,t,r.styleMirror);return(te&&te!==-1||K&&K!==-1)&&e({id:te,styleId:K,replaceSync:Q}),D.apply(F,H)})}),s.CSSStyleSheet.prototype.replaceSync=W);const k={};Yi("CSSGroupingRule")?k.CSSGroupingRule=s.CSSGroupingRule:(Yi("CSSMediaRule")&&(k.CSSMediaRule=s.CSSMediaRule),Yi("CSSConditionRule")&&(k.CSSConditionRule=s.CSSConditionRule),Yi("CSSSupportsRule")&&(k.CSSSupportsRule=s.CSSSupportsRule));const M={},P={};Object.entries(k).forEach(([D,F])=>{M[D]={insertRule:F.prototype.insertRule,deleteRule:F.prototype.deleteRule},P[D]={},P[D].insertRule=new Proxy(M[D].insertRule,{apply:fe((H,Q,te)=>{if(f)return H.apply(Q,te);const[K,ie]=te,{id:ce,styleId:Ce}=Qt(Q.parentStyleSheet,t,r.styleMirror);return(ce&&ce!==-1||Ce&&Ce!==-1)&&e({id:ce,styleId:Ce,adds:[{rule:K,index:[...Ji(Q),ie||0]}]}),H.apply(Q,te)})}),P[D].deleteRule=new Proxy(M[D].deleteRule,{apply:fe((H,Q,te)=>{if(f)return H.apply(Q,te);const[K]=te,{id:ie,styleId:ce}=Qt(Q.parentStyleSheet,t,r.styleMirror);return(ie&&ie!==-1||ce&&ce!==-1)&&e({id:ie,styleId:ce,removes:[{index:[...Ji(Q),K]}]}),H.apply(Q,te)})}),F.prototype.insertRule=P[D].insertRule,F.prototype.deleteRule=P[D].deleteRule});const U=()=>{c=!0,a=!1,h=!1;try{const D=u!=null?u:u=new s.CSSStyleSheet;D.insertRule(":root {}",0),D.deleteRule(0)}catch(D){return{insertRule:s.CSSStyleSheet.prototype.insertRule===_,deleteRule:s.CSSStyleSheet.prototype.deleteRule===E}}finally{c=!1}return{insertRule:a,deleteRule:h}};let $=0;const me=D=>{$>=rS||($+=1,D.insertRule||(S=s.CSSStyleSheet.prototype.insertRule,_=v(S),s.CSSStyleSheet.prototype.insertRule=_),D.deleteRule||(C=s.CSSStyleSheet.prototype.deleteRule,E=y(C),s.CSSStyleSheet.prototype.deleteRule=E))},O=D=>{for(let F=0;F<n.styleSheets.length;F++){const H=n.styleSheets[F];if(l.has(H))continue;const Q=H.ownerNode;if(!Q||hr(Q.nodeName)!=="style"||(Q.textContent||"").trim().length)continue;const te=t.getId(Q);if(!te||te===-1)continue;let K;try{K=H.cssRules}catch(ce){continue}const ie=o.get(H);if(!ie){if(Array.from(K).some(ce=>$u(ce))){l.add(H);continue}if(o.set(H,Array.from(K)),D)continue;de(te,K);continue}D&&K.length===ie.length||ye(te,H,ie,K)}};function ye(D,F,H,Q){const te=Array.from(Q);if(te.length===H.length&&te.every((oe,Pe)=>oe===H[Pe]))return;const K=new Map(te.map((oe,Pe)=>[oe,Pe])),ie=new Set;let ce=-1;const Ce=[];H.forEach((oe,Pe)=>{const Te=K.get(oe);Te!==void 0&&Te>ce&&!ie.has(oe)?(ie.add(oe),ce=Te):Ce.push({index:Pe})}),Ce.reverse();const at=[];te.forEach((oe,Pe)=>{ie.has(oe)||at.push({rule:oe.cssText,index:Pe})}),Ce.length&&e({id:D,removes:Ce}),at.length&&e({id:D,adds:at}),o.set(F,te)}function de(D,F){const H=[];for(let Q=F.length-1;Q>=0;Q--)H.push({index:Q});H.length&&e({id:D,removes:H}),e({id:D,adds:Array.from(F,(Q,te)=>({rule:Q.cssText,index:te}))})}let ve;return i>0&&(ve=s.setInterval(fe(()=>{const D=U(),F=D.insertRule&&D.deleteRule;F||me(D),O(F)}),i)),fe(()=>{ve!==void 0&&s.clearInterval(ve),f=!0;const D=s.CSSStyleSheet.prototype;$t(D,"insertRule",_,S),$t(D,"deleteRule",E,C),$t(D,"addRule",R,b),$t(D,"removeRule",G,N),Z&&$t(D,"replace",Z,q),W&&$t(D,"replaceSync",W,T),Object.entries(k).forEach(([F,H])=>{$t(H.prototype,"insertRule",P[F].insertRule,M[F].insertRule),$t(H.prototype,"deleteRule",P[F].deleteRule,M[F].deleteRule)})})}function rf({mirror:e,stylesheetManager:t},r){var n,i,s;let o=null;r.nodeName==="#document"?o=e.getId(r):o=e.getId(le.host(r));const l=r.nodeName==="#document"?(n=r.defaultView)==null?void 0:n.Document:(s=(i=r.ownerDocument)==null?void 0:i.defaultView)==null?void 0:s.ShadowRoot,c=l!=null&&l.prototype?Object.getOwnPropertyDescriptor(l==null?void 0:l.prototype,"adoptedStyleSheets"):void 0;return o===null||o===-1||!l||!c?()=>{}:(Object.defineProperty(r,"adoptedStyleSheets",{configurable:c.configurable,enumerable:c.enumerable,get(){var a;return(a=c.get)==null?void 0:a.call(this)},set(a){var h;const u=(h=c.set)==null?void 0:h.call(this,a);if(o!==null&&o!==-1)try{t.adoptStyleSheets(a,o)}catch(f){}return u}}),fe(()=>{Object.defineProperty(r,"adoptedStyleSheets",{configurable:c.configurable,enumerable:c.enumerable,get:c.get,set:c.set})}))}function iS({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:r,stylesheetManager:n},{win:i}){const s=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(s,{apply:fe((l,c,a)=>{var h;const[u,f,d]=a;if(r.has(u))return s.apply(c,[u,f,d]);const{id:p,styleId:m}=Qt((h=c.parentRule)==null?void 0:h.parentStyleSheet,t,n.styleMirror);return(p&&p!==-1||m&&m!==-1)&&e({id:p,styleId:m,set:{property:u,value:f,priority:d},index:Ji(c.parentRule)}),l.apply(c,a)})});const o=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:fe((l,c,a)=>{var h;const[u]=a;if(r.has(u))return o.apply(c,[u]);const{id:f,styleId:d}=Qt((h=c.parentRule)==null?void 0:h.parentStyleSheet,t,n.styleMirror);return(f&&f!==-1||d&&d!==-1)&&e({id:f,styleId:d,remove:{property:u},index:Ji(c.parentRule)}),l.apply(c,a)})}),fe(()=>{i.CSSStyleDeclaration.prototype.setProperty=s,i.CSSStyleDeclaration.prototype.removeProperty=o})}function sS({mediaInteractionCb:e,blockClass:t,blockSelector:r,mirror:n,sampling:i,doc:s}){const o=fe(c=>Sn(fe(a=>{const h=Rn(a);if(!h||Je(h,t,r,!0))return;const{currentTime:u,volume:f,muted:d,playbackRate:p,loop:m}=h;e({type:c,id:n.getId(h),currentTime:u,volume:f,muted:d,playbackRate:p,loop:m})}),i.media||500)),l=[ze("play",o(Jr.Play),s),ze("pause",o(Jr.Pause),s),ze("seeked",o(Jr.Seeked),s),ze("volumechange",o(Jr.VolumeChange),s),ze("ratechange",o(Jr.RateChange),s)];return fe(()=>{l.forEach(c=>c())})}function oS({fontCb:e,doc:t}){const r=t.defaultView;if(!r)return()=>{};const n=[],i=new WeakMap,s=r.FontFace;r.FontFace=function(c,a,h){const u=new s(c,a,h);return i.set(u,{family:c,buffer:typeof a!="string",descriptors:h,fontSource:typeof a=="string"?a:JSON.stringify(Array.from(new Uint8Array(a)))}),u};const o=fr(t.fonts,"add",function(l){return function(c){return setTimeout(fe(()=>{const a=i.get(c);a&&(e(a),i.delete(c))}),0),l.apply(this,[c])}});return n.push(()=>{r.FontFace=s}),n.push(o),fe(()=>{n.forEach(l=>l())})}function aS(e){const{doc:t,mirror:r,blockClass:n,blockSelector:i,selectionCb:s}=e;let o=!0;const l=fe(()=>{const c=t.getSelection();if(!c||o&&(c!=null&&c.isCollapsed))return;o=c.isCollapsed||!1;const a=[],h=c.rangeCount||0;for(let u=0;u<h;u++){const f=c.getRangeAt(u),{startContainer:d,startOffset:p,endContainer:m,endOffset:g}=f;Je(d,n,i,!0)||Je(m,n,i,!0)||a.push({start:r.getId(d),startOffset:p,end:r.getId(m),endOffset:g})}s({ranges:a})});return l(),ze("selectionchange",l)}function lS({doc:e,customElementCb:t}){const r=e.defaultView;return!r||!r.customElements?()=>{}:fr(r.customElements,"define",function(i){return function(s,o,l){try{t({define:{name:s}})}catch(c){console.warn(`Custom element callback failed for ${s}`)}return i.apply(this,[s,o,l])}})}function cS(e,t){const{mutationCb:r,mousemoveCb:n,mouseInteractionCb:i,scrollCb:s,viewportResizeCb:o,inputCb:l,mediaInteractionCb:c,styleSheetRuleCb:a,styleDeclarationCb:h,canvasMutationCb:u,fontCb:f,selectionCb:d,customElementCb:p}=e;e.mutationCb=(...m)=>{t.mutation&&t.mutation(...m),r(...m)},e.mousemoveCb=(...m)=>{t.mousemove&&t.mousemove(...m),n(...m)},e.mouseInteractionCb=(...m)=>{t.mouseInteraction&&t.mouseInteraction(...m),i(...m)},e.scrollCb=(...m)=>{t.scroll&&t.scroll(...m),s(...m)},e.viewportResizeCb=(...m)=>{t.viewportResize&&t.viewportResize(...m),o(...m)},e.inputCb=(...m)=>{t.input&&t.input(...m),l(...m)},e.mediaInteractionCb=(...m)=>{t.mediaInteaction&&t.mediaInteaction(...m),c(...m)},e.styleSheetRuleCb=(...m)=>{t.styleSheetRule&&t.styleSheetRule(...m),a(...m)},e.styleDeclarationCb=(...m)=>{t.styleDeclaration&&t.styleDeclaration(...m),h(...m)},e.canvasMutationCb=(...m)=>{t.canvasMutation&&t.canvasMutation(...m),u(...m)},e.fontCb=(...m)=>{t.font&&t.font(...m),f(...m)},e.selectionCb=(...m)=>{t.selection&&t.selection(...m),d(...m)},e.customElementCb=(...m)=>{t.customElement&&t.customElement(...m),p(...m)}}function uS(e,t={}){const r=e.doc.defaultView;if(!r)return()=>{};cS(e,t);let n,i=()=>{};e.recordDOM&&([n,i]=qh(e,e.doc));const s=Q0(e),o=$0(e),l=ef(e),c=q0(e,{win:r}),a=tS(e),h=sS(e);let u=()=>{},f=()=>{},d=()=>{},p=()=>{};e.recordDOM&&(u=nS(e,{win:r}),f=rf(e,e.doc),d=iS(e,{win:r}),e.collectFonts&&(p=oS(e)));const m=aS(e),g=lS(e),v=[];for(const y of e.plugins)v.push(y.observer(y.callback,r,y.options));return fe(()=>{pr.forEach(y=>y.reset()),n==null||n.disconnect(),i(),s(),o(),l(),c(),a(),h(),u(),f(),d(),p(),m(),g(),v.forEach(y=>y())})}function Hi(e){return typeof window[e]!="undefined"}function Yi(e){return!!(typeof window[e]!="undefined"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class nf{constructor(t){X(this,"iframeIdToRemoteIdMap",new WeakMap),X(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=t}getId(t,r,n,i){const s=n||this.getIdToRemoteIdMap(t),o=i||this.getRemoteIdToIdMap(t);let l=s.get(r);return l||(l=this.generateIdFn(),s.set(r,l),o.set(l,r)),l}getIds(t,r){const n=this.getIdToRemoteIdMap(t),i=this.getRemoteIdToIdMap(t);return r.map(s=>this.getId(t,s,n,i))}getRemoteId(t,r,n){const i=n||this.getRemoteIdToIdMap(t);if(typeof r!="number")return r;const s=i.get(r);return s||-1}getRemoteIds(t,r){const n=this.getRemoteIdToIdMap(t);return r.map(i=>this.getRemoteId(t,i,n))}reset(t){if(!t){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){let r=this.iframeIdToRemoteIdMap.get(t);return r||(r=new Map,this.iframeIdToRemoteIdMap.set(t,r)),r}getRemoteIdToIdMap(t){let r=this.iframeRemoteIdToIdMap.get(t);return r||(r=new Map,this.iframeRemoteIdToIdMap.set(t,r)),r}}class dS{constructor(t){X(this,"iframes",new WeakMap),X(this,"crossOriginIframeMap",new WeakMap),X(this,"crossOriginIframeMirror",new nf(id)),X(this,"crossOriginIframeStyleMirror"),X(this,"crossOriginIframeRootIdMap",new WeakMap),X(this,"mirror"),X(this,"mutationCb"),X(this,"wrappedEmit"),X(this,"loadListener"),X(this,"stylesheetManager"),X(this,"recordCrossOriginIframes"),this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new nf(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(t){this.iframes.set(t,!0),t.contentWindow&&this.crossOriginIframeMap.set(t.contentWindow,t)}addLoadListener(t){this.loadListener=t}attachIframe(t,r){var n,i;this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:r}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&((n=t.contentWindow)==null||n.addEventListener("message",this.handleMessage.bind(this))),(i=this.loadListener)==null||i.call(this,t),t.contentDocument&&t.contentDocument.adoptedStyleSheets&&t.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(t.contentDocument.adoptedStyleSheets,this.mirror.getId(t.contentDocument))}handleMessage(t){const r=t;if(r.data.type!=="rrweb"||r.origin!==r.data.origin)return;const n=t.source;if(!n)return;const i=this.crossOriginIframeMap.get(n);if(!i)return;const s=this.transformCrossOriginEvent(i,r.data.event);s&&this.wrappedEmit(s,r.data.isCheckout)}transformCrossOriginEvent(t,r){var n;switch(r.type){case ge.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(r.data.node,t);const i=r.data.node.id;return this.crossOriginIframeRootIdMap.set(t,i),this.patchRootIdOnNode(r.data.node,i),{timestamp:r.timestamp,type:ge.IncrementalSnapshot,data:{source:he.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:r.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case ge.Meta:case ge.Load:case ge.DomContentLoaded:return!1;case ge.Plugin:return r;case ge.Custom:return this.replaceIds(r.data.payload,t,["id","parentId","previousId","nextId"]),r;case ge.IncrementalSnapshot:switch(r.data.source){case he.Mutation:return r.data.adds.forEach(i=>{this.replaceIds(i,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(i.node,t);const s=this.crossOriginIframeRootIdMap.get(t);s&&this.patchRootIdOnNode(i.node,s)}),r.data.removes.forEach(i=>{this.replaceIds(i,t,["parentId","id"])}),r.data.attributes.forEach(i=>{this.replaceIds(i,t,["id"])}),r.data.texts.forEach(i=>{this.replaceIds(i,t,["id"])}),r;case he.Drag:case he.TouchMove:case he.MouseMove:return r.data.positions.forEach(i=>{this.replaceIds(i,t,["id"])}),r;case he.ViewportResize:return!1;case he.MediaInteraction:case he.MouseInteraction:case he.Scroll:case he.CanvasMutation:case he.Input:return this.replaceIds(r.data,t,["id"]),r;case he.StyleSheetRule:case he.StyleDeclaration:return this.replaceIds(r.data,t,["id"]),this.replaceStyleIds(r.data,t,["styleId"]),r;case he.Font:return r;case he.Selection:return r.data.ranges.forEach(i=>{this.replaceIds(i,t,["start","end"])}),r;case he.AdoptedStyleSheet:return this.replaceIds(r.data,t,["id"]),this.replaceStyleIds(r.data,t,["styleIds"]),(n=r.data.styles)==null||n.forEach(i=>{this.replaceStyleIds(i,t,["styleId"])}),r}}return!1}replace(t,r,n,i){for(const s of i)!Array.isArray(r[s])&&typeof r[s]!="number"||(Array.isArray(r[s])?r[s]=t.getIds(n,r[s]):r[s]=t.getId(n,r[s]));return r}replaceIds(t,r,n){return this.replace(this.crossOriginIframeMirror,t,r,n)}replaceStyleIds(t,r,n){return this.replace(this.crossOriginIframeStyleMirror,t,r,n)}replaceIdOnNode(t,r){this.replaceIds(t,r,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach(n=>{this.replaceIdOnNode(n,r)})}patchRootIdOnNode(t,r){t.type!==Bh.Document&&!t.rootId&&(t.rootId=r),"childNodes"in t&&t.childNodes.forEach(n=>{this.patchRootIdOnNode(n,r)})}}class hS{constructor(t){X(this,"shadowDoms",new WeakSet),X(this,"mutationCb"),X(this,"scrollCb"),X(this,"bypassOptions"),X(this,"mirror"),X(this,"restoreHandlers",[]),this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(t,r){if(!mn(t)||this.shadowDoms.has(t))return;this.shadowDoms.add(t);const[n]=qh(B(x({},this.bypassOptions),{doc:r,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),t);this.restoreHandlers.push(()=>n.disconnect()),this.restoreHandlers.push(ef(B(x({},this.bypassOptions),{scrollCb:this.scrollCb,doc:t,mirror:this.mirror}))),setTimeout(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(le.host(t))),this.restoreHandlers.push(rf({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))},0)}observeAttachShadow(t){!t.contentWindow||!t.contentDocument||this.patchAttachShadow(t.contentWindow.Element,t.contentDocument)}patchAttachShadow(t,r){const n=this;this.restoreHandlers.push(fr(t.prototype,"attachShadow",function(i){return function(s){const o=i.call(this,s),l=le.shadowRoot(this);return l&&Yh(this)&&n.addShadowRoot(l,r),o}}))}reset(){this.restoreHandlers.forEach(t=>{try{t()}catch(r){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}for(var Hr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",fS=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),Bi=0;Bi<Hr.length;Bi++)fS[Hr.charCodeAt(Bi)]=Bi;var pS=function(e){var t=new Uint8Array(e),r,n=t.length,i="";for(r=0;r<n;r+=3)i+=Hr[t[r]>>2],i+=Hr[(t[r]&3)<<4|t[r+1]>>4],i+=Hr[(t[r+1]&15)<<2|t[r+2]>>6],i+=Hr[t[r+2]&63];return n%3===2?i=i.substring(0,i.length-1)+"=":n%3===1&&(i=i.substring(0,i.length-2)+"=="),i};const sf=new Map;function mS(e,t){let r=sf.get(e);return r||(r=new Map,sf.set(e,r)),r.has(t)||r.set(t,[]),r.get(t)}const of=(e,t,r)=>{if(!e||!(lf(e,t)||typeof e=="object"))return;const n=e.constructor.name,i=mS(r,n);let s=i.indexOf(e);return s===-1&&(s=i.length,i.push(e)),s};function zi(e,t,r){if(e instanceof Array)return e.map(n=>zi(n,t,r));if(e===null)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray)return{rr_type:e.constructor.name,args:[Object.values(e)]};if(e instanceof ArrayBuffer){const n=e.constructor.name,i=pS(e);return{rr_type:n,base64:i}}else{if(e instanceof DataView)return{rr_type:e.constructor.name,args:[zi(e.buffer,t,r),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){const n=e.constructor.name,{src:i}=e;return{rr_type:n,src:i}}else if(e instanceof HTMLCanvasElement){const n="HTMLImageElement",i=e.toDataURL();return{rr_type:n,src:i}}else{if(e instanceof ImageData)return{rr_type:e.constructor.name,args:[zi(e.data,t,r),e.width,e.height]};if(lf(e,t)||typeof e=="object"){const n=e.constructor.name,i=of(e,t,r);return{rr_type:n,index:i}}}}return e}const af=(e,t,r)=>e.map(n=>zi(n,t,r)),lf=(e,t)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(i=>typeof t[i]=="function").find(i=>e instanceof t[i]);function gS(e,t,r,n){const i=[],s=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const o of s)try{if(typeof t.CanvasRenderingContext2D.prototype[o]!="function")continue;const l=fr(t.CanvasRenderingContext2D.prototype,o,function(c){return function(...a){return Je(this.canvas,r,n,!0)||setTimeout(()=>{const h=af(a,t,this);e(this.canvas,{type:Fr["2D"],property:o,args:h})},0),c.apply(this,a)}});i.push(l)}catch(l){const c=Fi(t.CanvasRenderingContext2D.prototype,o,{set(a){e(this.canvas,{type:Fr["2D"],property:o,args:[a],setter:!0})}});i.push(c)}return()=>{i.forEach(o=>o())}}function yS(e){return e==="experimental-webgl"?"webgl":e}function cf(e,t,r,n){const i=[];try{const s=fr(e.HTMLCanvasElement.prototype,"getContext",function(o){return function(l,...c){if(!Je(this,t,r,!0)){const a=yS(l);if("__context"in this||(this.__context=a),n&&["webgl","webgl2"].includes(a))if(c[0]&&typeof c[0]=="object"){const h=c[0];h.preserveDrawingBuffer||(h.preserveDrawingBuffer=!0)}else c.splice(0,1,{preserveDrawingBuffer:!0})}return o.apply(this,[l,...c])}});i.push(s)}catch(s){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach(s=>s())}}function uf(e,t,r,n,i,s){const o=[],l=Object.getOwnPropertyNames(e);for(const c of l)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(c))try{if(typeof e[c]!="function")continue;const a=fr(e,c,function(h){return function(...u){const f=h.apply(this,u);if(of(f,s,this),"tagName"in this.canvas&&!Je(this.canvas,n,i,!0)){const d=af(u,s,this),p={type:t,property:c,args:d};r(this.canvas,p)}return f}});o.push(a)}catch(a){const h=Fi(e,c,{set(u){r(this.canvas,{type:t,property:c,args:[u],setter:!0})}});o.push(h)}return o}function bS(e,t,r,n){const i=[];return typeof t.WebGLRenderingContext!="undefined"&&i.push(...uf(t.WebGLRenderingContext.prototype,Fr.WebGL,e,r,n,t)),typeof t.WebGL2RenderingContext!="undefined"&&i.push(...uf(t.WebGL2RenderingContext.prototype,Fr.WebGL2,e,r,n,t)),()=>{i.forEach(s=>s())}}const df=`(function() {
|
|
114
114
|
"use strict";
|
|
115
115
|
var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
116
116
|
var lookup = typeof Uint8Array === "undefined" ? [] : new Uint8Array(256);
|
|
@@ -210,14 +210,14 @@ or you can use record.mirror to access the mirror instance during recording.`;le
|
|
|
210
210
|
};
|
|
211
211
|
})();
|
|
212
212
|
//# sourceMappingURL=image-bitmap-data-url-worker-DwtK8A0z.js.map
|
|
213
|
-
`,cf=typeof self!="undefined"&&self.Blob&&new Blob([uf],{type:"text/javascript;charset=utf-8"});function pS(e){let t;try{if(t=cf&&(self.URL||self.webkitURL).createObjectURL(cf),!t)throw"";const r=new Worker(t,{name:e==null?void 0:e.name});return r.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(t)}),r}catch(r){return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(uf),{name:e==null?void 0:e.name})}finally{t&&(self.URL||self.webkitURL).revokeObjectURL(t)}}class mS{constructor(t){X(this,"pendingCanvasMutations",new Map),X(this,"rafStamps",{latestId:0,invokeId:null}),X(this,"mirror"),X(this,"logger"),X(this,"worker"),X(this,"snapshotInProgressMap",new Map),X(this,"lastSnapshotTime",new Map),X(this,"options"),X(this,"mutationCb"),X(this,"resetObservers"),X(this,"frozen",!1),X(this,"locked",!1),X(this,"processMutation",(c,f)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(c)||this.pendingCanvasMutations.set(c,[]),this.pendingCanvasMutations.get(c).push(f)});const{sampling:r,win:n,blockClass:i,blockSelector:s,recordCanvas:o,recordLocalVideos:l,recordRemoteVideos:u,initialSnapshotDelay:a,dataURLOptions:h}=t;this.mutationCb=t.mutationCb,this.mirror=t.mirror,this.logger=t.logger,this.worker=new pS,this.worker.onmessage=c=>{const{id:f}=c.data;if(this.snapshotInProgressMap.set(f,!1),!("base64"in c.data)){this.debug(null,"canvas worker received empty message",{id:f,data:c.data,status:c.data.status});return}const{base64:d,type:p,dx:m,dy:g,dw:v,dh:y}=c.data,w={id:f,type:Dr["2D"],commands:[{property:"clearRect",args:[m,g,v,y]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:d}],type:p}]},m,g,v,y]}]};this.debug(null,"canvas worker recording mutation",w),this.mutationCb(w)},this.options=t,o&&r==="all"?(this.debug(null,"initializing canvas mutation observer",{sampling:r}),this.initCanvasMutationObserver(n,i,s)):o&&typeof r=="number"&&(this.debug(null,"initializing canvas fps observer",{sampling:r}),this.initCanvasFPSObserver(l,u,r,n,i,s,{initialSnapshotDelay:a,dataURLOptions:h},t.resizeFactor,t.maxSnapshotDimension))}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}debug(t,...r){if(!this.logger)return;const n=this.mirror.getId(t);let i="[highlight-canvas-manager]";t&&(i=`[highlight-canvas] [id:${n}]`,t.tagName.toLowerCase()==="canvas"&&(i+=` [ctx:${t.__context}]`)),this.logger.debug(i,t,...r)}snapshot(t){return q(this,null,function*(){var r;const n=this.mirror.getId(t);if(this.snapshotInProgressMap.get(n)){this.debug(t,"snapshotting already in progress for",n);return}const i=1e3/(typeof this.options.samplingManual=="number"?this.options.samplingManual:1),s=this.lastSnapshotTime.get(n);if(!(s&&new Date().getTime()-s<i)){if(this.debug(t,"starting snapshotting"),t.width===0||t.height===0){this.debug(t,"not yet ready",{width:t.width,height:t.height});return}this.lastSnapshotTime.set(n,new Date().getTime()),this.snapshotInProgressMap.set(n,!0);try{if(this.options.clearWebGLBuffer!==!1&&["webgl","webgl2"].includes(t.__context)){const h=t.getContext(t.__context);((r=h==null?void 0:h.getContextAttributes())==null?void 0:r.preserveDrawingBuffer)===!1&&(h.clear(h.COLOR_BUFFER_BIT),this.debug(t,"cleared webgl canvas to load it into memory",{attributes:h==null?void 0:h.getContextAttributes()}))}if(t.width===0||t.height===0){this.debug(t,"not yet ready",{width:t.width,height:t.height});return}let o=this.options.resizeFactor||1;if(this.options.maxSnapshotDimension){const h=Math.max(t.width,t.height);o=Math.min(o,this.options.maxSnapshotDimension/h)}const l=t.width*o,u=t.height*o,a=yield createImageBitmap(t,{resizeWidth:l,resizeHeight:u});this.debug(t,"created image bitmap",{width:a.width,height:a.height}),this.worker.postMessage({id:n,bitmap:a,width:l,height:u,dx:0,dy:0,dw:t.width,dh:t.height,dataURLOptions:this.options.dataURLOptions,logDebug:!!this.logger},[a]),this.debug(t,"sent message")}catch(o){this.debug(t,"failed to snapshot",o)}finally{this.snapshotInProgressMap.set(n,!1)}}})}initCanvasFPSObserver(t,r,n,i,s,o,l,u,a){const h=af(i,s,o,!0),c=1e3/n;let f=0,d;const p=new Map,m=(w,_)=>{const S=[];w.querySelectorAll(_).forEach(I=>S.push(I));const b=document.createNodeIterator(w,Node.ELEMENT_NODE);let R;for(;R=b.nextNode();)R!=null&&R.shadowRoot&&S.push(...m(R.shadowRoot,_));return S},g=w=>{const _=[];return m(i.document,"canvas").forEach(S=>{if(!Je(S,s,o,!0)){this.debug(S,"discovered canvas"),_.push(S);const b=this.mirror.getId(S);p.has(b)||p.set(b,w)}}),_},v=w=>{const _=[];return(t||r)&&m(i.document,"video").forEach(S=>{if(!(!r&&S.src!==""&&S.src.indexOf("blob:")===-1)&&!(!t&&(S.src===""||S.src.indexOf("blob:")!==-1))&&!Je(S,s,o,!0)){_.push(S);const b=this.mirror.getId(S);p.has(b)||p.set(b,w)}}),_},y=w=>q(this,null,function*(){if(f&&w-f<c){d=requestAnimationFrame(b=>void y(b));return}f=w;const _=b=>{const R=this.mirror.getId(b),I=p.get(R),E=!l.initialSnapshotDelay||w-I>l.initialSnapshotDelay;return this.debug(b,{delay:l.initialSnapshotDelay,delta:w-I,hadLoadingTime:E}),E},S=[];S.push(...g(w).filter(_).map(b=>this.snapshot(b))),S.push(...v(w).filter(_).map(b=>q(this,null,function*(){this.debug(b,"starting video snapshotting");const R=this.mirror.getId(b);if(this.snapshotInProgressMap.get(R)){this.debug(b,"video snapshotting already in progress for",R);return}this.snapshotInProgressMap.set(R,!0);try{const{width:I,height:E}=b.getBoundingClientRect(),{actualWidth:C,actualHeight:N}={actualWidth:b.videoWidth,actualHeight:b.videoHeight},G=Math.max(C,N);if(G===0){this.debug(b,"not yet ready",{width:b.width,height:b.height,actualWidth:C,actualHeight:N,boxWidth:I,boxHeight:E});return}let $=u||1;a&&($=Math.min($,a/G));const Z=C*$,T=N*$,W=yield createImageBitmap(b,{resizeWidth:Z,resizeHeight:T}),k=Math.max(I,E)/G,M=C*k,P=N*k,U=(I-M)/2,Q=(E-P)/2;this.debug(b,"created image bitmap",{actualWidth:C,actualHeight:N,boxWidth:I,boxHeight:E,outputWidth:M,outputHeight:P,resizeWidth:Z,resizeHeight:T,scale:$,outputScale:k,offsetX:U,offsetY:Q}),this.worker.postMessage({id:R,bitmap:W,width:Z,height:T,dx:U,dy:Q,dw:M,dh:P,dataURLOptions:l.dataURLOptions,logDebug:!!this.logger},[W]),this.debug(b,"send message")}catch(I){this.debug(b,"failed to snapshot",I)}finally{this.snapshotInProgressMap.set(R,!1)}}))),yield Promise.all(S).catch(console.error),d=requestAnimationFrame(b=>void y(b))});d=requestAnimationFrame(w=>void y(w)),this.resetObservers=()=>{h(),d&&cancelAnimationFrame(d)}}initCanvasMutationObserver(t,r,n){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const i=af(t,r,n,!1),s=dS(this.processMutation.bind(this),t,r,n),o=fS(this.processMutation.bind(this),t,r,n);this.resetObservers=()=>{i(),s(),o()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const t=r=>{this.rafStamps.latestId=r,requestAnimationFrame(t)};requestAnimationFrame(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,r)=>{const n=this.mirror.getId(r);this.flushPendingCanvasMutationFor(r,n)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,r){if(this.frozen||this.locked)return;const n=this.pendingCanvasMutations.get(t);if(!n||r===-1)return;const i=n.map(o=>{const a=o,{type:l}=a;return nt(a,["type"])}),{type:s}=n[0];this.mutationCb({id:r,type:s,commands:i}),this.pendingCanvasMutations.delete(t)}}class gS{constructor(t){X(this,"trackedLinkElements",new WeakSet),X(this,"mutationCb"),X(this,"adoptedStyleSheetCb"),X(this,"styleMirror",new W0),this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,r){"_cssText"in r.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:r.id,attributes:r.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,r){if(t.length===0)return;const n={id:r,styleIds:[]},i=[];for(const s of t){let o;this.styleMirror.has(s)?o=this.styleMirror.getId(s):(o=this.styleMirror.add(s),i.push({styleId:o,rules:Array.from(s.rules||CSSRule,(l,u)=>({rule:Kc(l,s.href),index:u}))})),n.styleIds.push(o)}i.length>0&&(n.styles=i),this.adoptedStyleSheetCb(n)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}}class yS{constructor(){X(this,"nodeMap",new WeakMap),X(this,"active",!1)}inOtherBuffer(t,r){const n=this.nodeMap.get(t);return n&&Array.from(n).some(i=>i!==r)}add(t,r){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(r))}destroy(){}}let Le,Yi,_n,Bi=!1;try{if(Array.from([1],e=>e*2)[0]!==2){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=((Mc=e.contentWindow)==null?void 0:Mc.Array.from)||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}const Et=Rv();function ct(e={}){var t;const{emit:r,checkoutEveryNms:n,checkoutEveryNth:i,blockClass:s="highlight-block",blockSelector:o=null,ignoreClass:l="highlight-ignore",ignoreSelector:u=null,maskTextClass:a="highlight-mask",maskTextSelector:h=null,inlineStylesheet:c=!0,maskAllInputs:f,maskInputOptions:d,slimDOMOptions:p,maskInputFn:m,maskTextFn:g=No,hooks:v,packFn:y,sampling:w={},mousemoveWait:_,recordDOM:S=!0,recordCanvas:b=!1,recordCrossOriginIframes:R=!1,recordAfter:I=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:E=!1,collectFonts:C=!1,inlineImages:N=!1,inlineVideos:G=!1,plugins:$,keepIframeSrcFn:Z=()=>!1,privacySetting:T="default",ignoreCSSAttributes:W=new Set([]),styleSheetResyncInterval:k=2e3,errorHandler:M,logger:P}=e,U=x(x({},e.dataURLOptions),typeof((t=e.sampling)==null?void 0:t.canvas)=="object"?e.sampling.canvas.dataURLOptions:void 0);J0(M);const Q=R?window.parent===window:!0;let me=!1;if(!Q)try{window.parent.document&&(me=!1)}catch(oe){me=!0}if(Q&&!r)throw new Error("emit function is required");if(!Q&&!me)return()=>{};_!==void 0&&w.mousemove===void 0&&(w.mousemove=_),Et.reset();const O=f===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:d!==void 0?d:{password:!0},ye=ud(p);X0();let de,ve=0;const D=oe=>{for(const We of $||[])We.eventProcessor&&(oe=We.eventProcessor(oe));return y&&!me&&(oe=y(oe)),oe};Le=(oe,We)=>{var Te;const Oe=oe;if(Oe.timestamp=vn(),(Te=pr[0])!=null&&Te.isFrozen()&&Oe.type!==ge.FullSnapshot&&!(Oe.type===ge.IncrementalSnapshot&&Oe.data.source===he.Mutation)&&pr.forEach(at=>at.unfreeze()),Q)r==null||r(D(Oe),We);else if(me){const at={type:"rrweb",event:D(Oe),origin:window.location.origin,isCheckout:We};window.parent.postMessage(at,"*")}if(Oe.type===ge.FullSnapshot)de=Oe,ve=0;else if(Oe.type===ge.IncrementalSnapshot){if(Oe.data.source===he.Mutation&&Oe.data.isAttachIframe)return;ve++;const at=i&&ve>=i,Se=n&&Oe.timestamp-de.timestamp>n;(at||Se)&&Yi(!0)}};const F=oe=>{Le({type:ge.IncrementalSnapshot,data:x({source:he.Mutation},oe)})},H=oe=>Le({type:ge.IncrementalSnapshot,data:x({source:he.Scroll},oe)}),j=oe=>Le({type:ge.IncrementalSnapshot,data:x({source:he.CanvasMutation},oe)}),te=oe=>Le({type:ge.IncrementalSnapshot,data:x({source:he.AdoptedStyleSheet},oe)}),z=new gS({mutationCb:F,adoptedStyleSheetCb:te}),ie=new oS({mirror:Et,mutationCb:F,stylesheetManager:z,recordCrossOriginIframes:R,wrappedEmit:Le});for(const oe of $||[])oe.getMirror&&oe.getMirror({nodeMirror:Et,crossOriginIframeMirror:ie.crossOriginIframeMirror,crossOriginIframeStyleMirror:ie.crossOriginIframeStyleMirror});const ue=new yS,Ce=typeof(w==null?void 0:w.canvas)=="object"?w.canvas:{fps:w==null?void 0:w.canvas};_n=new mS({recordCanvas:b,recordLocalVideos:N,recordRemoteVideos:G,mutationCb:j,win:window,blockClass:s,blockSelector:o,mirror:Et,sampling:Ce.fps,samplingManual:Ce.fpsManual,clearWebGLBuffer:Ce.clearWebGLBuffer,initialSnapshotDelay:Ce.initialSnapshotDelay,dataURLOptions:U,resizeFactor:Ce.resizeFactor,maxSnapshotDimension:Ce.maxSnapshotDimension,logger:P});const ot=new aS({mutationCb:F,scrollCb:H,bypassOptions:{blockClass:s,blockSelector:o,maskTextClass:a,maskTextSelector:h,inlineStylesheet:c,maskInputOptions:O,dataURLOptions:U,maskTextFn:g,maskInputFn:m,recordCanvas:b,inlineImages:N,inlineVideos:G,privacySetting:T,sampling:w,slimDOMOptions:ye,iframeManager:ie,stylesheetManager:z,canvasManager:_n,keepIframeSrcFn:Z,processedNodeManager:ue},mirror:Et});Yi=(oe=!1)=>{if(!S)return;Le({type:ge.Meta,data:{href:window.location.href,width:Ph(),height:Wh()}},oe),z.reset(),ot.init(),pr.forEach(Te=>Te.lock());const We=qv(document,{mirror:Et,blockClass:s,blockSelector:o,maskTextClass:a,maskTextSelector:h,inlineStylesheet:c,maskAllInputs:O,maskTextFn:g,maskInputFn:m,slimDOM:ye,dataURLOptions:U,recordCanvas:b,inlineImages:N,inlineVideos:G,privacySetting:T,onSerialize:Te=>{Uh(Te,Et)&&ie.addIframe(Te),Dh(Te,Et)&&z.trackLinkElement(Te),$a(Te)&&ot.addShadowRoot(le.shadowRoot(Te),document)},onIframeLoad:(Te,Oe)=>{ie.attachIframe(Te,Oe),ot.observeAttachShadow(Te)},onStylesheetLoad:(Te,Oe)=>{z.attachLinkElement(Te,Oe)},keepIframeSrcFn:Z});if(!We)return console.warn("Failed to snapshot the document");Le({type:ge.FullSnapshot,data:{node:We,initialOffset:Xh(window)}},oe),pr.forEach(Te=>Te.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&z.adoptStyleSheets(document.adoptedStyleSheets,Et.getId(document))};try{const oe=[],We=Oe=>{var at;return fe(sS)({mutationCb:F,mousemoveCb:(Se,mc)=>Le({type:ge.IncrementalSnapshot,data:{source:mc,positions:Se}}),mouseInteractionCb:Se=>Le({type:ge.IncrementalSnapshot,data:x({source:he.MouseInteraction},Se)}),scrollCb:H,viewportResizeCb:Se=>Le({type:ge.IncrementalSnapshot,data:x({source:he.ViewportResize},Se)}),inputCb:Se=>Le({type:ge.IncrementalSnapshot,data:x({source:he.Input},Se)}),mediaInteractionCb:Se=>Le({type:ge.IncrementalSnapshot,data:x({source:he.MediaInteraction},Se)}),styleSheetRuleCb:Se=>Le({type:ge.IncrementalSnapshot,data:x({source:he.StyleSheetRule},Se)}),styleDeclarationCb:Se=>Le({type:ge.IncrementalSnapshot,data:x({source:he.StyleDeclaration},Se)}),canvasMutationCb:j,fontCb:Se=>Le({type:ge.IncrementalSnapshot,data:x({source:he.Font},Se)}),selectionCb:Se=>{Le({type:ge.IncrementalSnapshot,data:x({source:he.Selection},Se)})},customElementCb:Se=>{Le({type:ge.IncrementalSnapshot,data:x({source:he.CustomElement},Se)})},blockClass:s,ignoreClass:l,ignoreSelector:u,maskTextClass:a,maskTextSelector:h,maskInputOptions:O,inlineStylesheet:c,sampling:w,recordDOM:S,recordCanvas:b,inlineImages:N,inlineVideos:G,userTriggeredOnInput:E,collectFonts:C,doc:Oe,maskInputFn:m,maskTextFn:g,keepIframeSrcFn:Z,blockSelector:o,slimDOMOptions:ye,dataURLOptions:U,mirror:Et,iframeManager:ie,stylesheetManager:z,shadowDomManager:ot,processedNodeManager:ue,canvasManager:_n,ignoreCSSAttributes:W,styleSheetResyncInterval:k,privacySetting:T,plugins:((at=$==null?void 0:$.filter(Se=>Se.observer))==null?void 0:at.map(Se=>({observer:Se.observer,options:Se.options,callback:mc=>Le({type:ge.Plugin,data:{plugin:Se.name,payload:mc}})})))||[]},v)};ie.addLoadListener(Oe=>{try{oe.push(We(Oe.contentDocument))}catch(at){console.warn(at)}});const Te=()=>{Yi(),oe.push(We(document)),Bi=!0};return["interactive","complete"].includes(document.readyState)?Te():(oe.push(ze("DOMContentLoaded",()=>{Le({type:ge.DomContentLoaded,data:{}}),I==="DOMContentLoaded"&&Te()})),oe.push(ze("load",()=>{Le({type:ge.Load,data:{}}),I==="load"&&Te()},window))),()=>{oe.forEach(Oe=>{try{Oe()}catch(at){String(at).toLowerCase().includes("cross-origin")||console.warn(at)}}),ue.destroy(),Bi=!1,H0()}}catch(oe){console.warn(oe)}}ct.addCustomEvent=(e,t)=>{Bi&&Le({type:ge.Custom,data:{tag:e,payload:t}})},ct.freezePage=()=>{pr.forEach(e=>e.freeze())},ct.takeFullSnapshot=e=>{if(!Bi)throw new Error("please take full snapshot after start recording");Yi(e)},ct.snapshotCanvas=e=>q(this,null,function*(){if(!_n)throw new Error("canvas manager is not initialized");yield _n.snapshot(e)}),ct.mirror=Et;var df;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(df||(df={}));const{addCustomEvent:zi}=ct;var Ki=function(){return Ki=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(t[s]=r[s])}return t},Ki.apply(this,arguments)},ji=new Map,el=new Map,hf=!0,Qi=!1;function ff(e){return e.replace(/[\s,]+/g," ").trim()}function bS(e){return ff(e.source.body.substring(e.start,e.end))}function vS(e){var t=new Set,r=[];return e.definitions.forEach(function(n){if(n.kind==="FragmentDefinition"){var i=n.name.value,s=bS(n.loc),o=el.get(i);o&&!o.has(s)?hf&&console.warn("Warning: fragment with name "+i+` already exists.
|
|
213
|
+
`,hf=typeof self!="undefined"&&self.Blob&&new Blob([df],{type:"text/javascript;charset=utf-8"});function vS(e){let t;try{if(t=hf&&(self.URL||self.webkitURL).createObjectURL(hf),!t)throw"";const r=new Worker(t,{name:e==null?void 0:e.name});return r.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(t)}),r}catch(r){return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(df),{name:e==null?void 0:e.name})}finally{t&&(self.URL||self.webkitURL).revokeObjectURL(t)}}class SS{constructor(t){X(this,"pendingCanvasMutations",new Map),X(this,"rafStamps",{latestId:0,invokeId:null}),X(this,"mirror"),X(this,"logger"),X(this,"worker"),X(this,"snapshotInProgressMap",new Map),X(this,"lastSnapshotTime",new Map),X(this,"options"),X(this,"mutationCb"),X(this,"resetObservers"),X(this,"frozen",!1),X(this,"locked",!1),X(this,"processMutation",(u,f)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(u)||this.pendingCanvasMutations.set(u,[]),this.pendingCanvasMutations.get(u).push(f)});const{sampling:r,win:n,blockClass:i,blockSelector:s,recordCanvas:o,recordLocalVideos:l,recordRemoteVideos:c,initialSnapshotDelay:a,dataURLOptions:h}=t;this.mutationCb=t.mutationCb,this.mirror=t.mirror,this.logger=t.logger,this.worker=new vS,this.worker.onmessage=u=>{const{id:f}=u.data;if(this.snapshotInProgressMap.set(f,!1),!("base64"in u.data)){this.debug(null,"canvas worker received empty message",{id:f,data:u.data,status:u.data.status});return}const{base64:d,type:p,dx:m,dy:g,dw:v,dh:y}=u.data,w={id:f,type:Fr["2D"],commands:[{property:"clearRect",args:[m,g,v,y]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:d}],type:p}]},m,g,v,y]}]};this.debug(null,"canvas worker recording mutation",w),this.mutationCb(w)},this.options=t,o&&r==="all"?(this.debug(null,"initializing canvas mutation observer",{sampling:r}),this.initCanvasMutationObserver(n,i,s)):o&&typeof r=="number"&&(this.debug(null,"initializing canvas fps observer",{sampling:r}),this.initCanvasFPSObserver(l,c,r,n,i,s,{initialSnapshotDelay:a,dataURLOptions:h},t.resizeFactor,t.maxSnapshotDimension))}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}debug(t,...r){if(!this.logger)return;const n=this.mirror.getId(t);let i="[highlight-canvas-manager]";t&&(i=`[highlight-canvas] [id:${n}]`,t.tagName.toLowerCase()==="canvas"&&(i+=` [ctx:${t.__context}]`)),this.logger.debug(i,t,...r)}snapshot(t){return z(this,null,function*(){var r;const n=this.mirror.getId(t);if(this.snapshotInProgressMap.get(n)){this.debug(t,"snapshotting already in progress for",n);return}const i=1e3/(typeof this.options.samplingManual=="number"?this.options.samplingManual:1),s=this.lastSnapshotTime.get(n);if(!(s&&new Date().getTime()-s<i)){if(this.debug(t,"starting snapshotting"),t.width===0||t.height===0){this.debug(t,"not yet ready",{width:t.width,height:t.height});return}this.lastSnapshotTime.set(n,new Date().getTime()),this.snapshotInProgressMap.set(n,!0);try{if(this.options.clearWebGLBuffer!==!1&&["webgl","webgl2"].includes(t.__context)){const h=t.getContext(t.__context);((r=h==null?void 0:h.getContextAttributes())==null?void 0:r.preserveDrawingBuffer)===!1&&(h.clear(h.COLOR_BUFFER_BIT),this.debug(t,"cleared webgl canvas to load it into memory",{attributes:h==null?void 0:h.getContextAttributes()}))}if(t.width===0||t.height===0){this.debug(t,"not yet ready",{width:t.width,height:t.height});return}let o=this.options.resizeFactor||1;if(this.options.maxSnapshotDimension){const h=Math.max(t.width,t.height);o=Math.min(o,this.options.maxSnapshotDimension/h)}const l=t.width*o,c=t.height*o,a=yield createImageBitmap(t,{resizeWidth:l,resizeHeight:c});this.debug(t,"created image bitmap",{width:a.width,height:a.height}),this.worker.postMessage({id:n,bitmap:a,width:l,height:c,dx:0,dy:0,dw:t.width,dh:t.height,dataURLOptions:this.options.dataURLOptions,logDebug:!!this.logger},[a]),this.debug(t,"sent message")}catch(o){this.debug(t,"failed to snapshot",o)}finally{this.snapshotInProgressMap.set(n,!1)}}})}initCanvasFPSObserver(t,r,n,i,s,o,l,c,a){const h=cf(i,s,o,!0),u=1e3/n;let f=0,d;const p=new Map,m=(w,_)=>{const S=[];w.querySelectorAll(_).forEach(I=>S.push(I));const b=document.createNodeIterator(w,Node.ELEMENT_NODE);let R;for(;R=b.nextNode();)R!=null&&R.shadowRoot&&S.push(...m(R.shadowRoot,_));return S},g=w=>{const _=[];return m(i.document,"canvas").forEach(S=>{if(!Je(S,s,o,!0)){this.debug(S,"discovered canvas"),_.push(S);const b=this.mirror.getId(S);p.has(b)||p.set(b,w)}}),_},v=w=>{const _=[];return(t||r)&&m(i.document,"video").forEach(S=>{if(!(!r&&S.src!==""&&S.src.indexOf("blob:")===-1)&&!(!t&&(S.src===""||S.src.indexOf("blob:")!==-1))&&!Je(S,s,o,!0)){_.push(S);const b=this.mirror.getId(S);p.has(b)||p.set(b,w)}}),_},y=w=>z(this,null,function*(){if(f&&w-f<u){d=requestAnimationFrame(b=>void y(b));return}f=w;const _=b=>{const R=this.mirror.getId(b),I=p.get(R),E=!l.initialSnapshotDelay||w-I>l.initialSnapshotDelay;return this.debug(b,{delay:l.initialSnapshotDelay,delta:w-I,hadLoadingTime:E}),E},S=[];S.push(...g(w).filter(_).map(b=>this.snapshot(b))),S.push(...v(w).filter(_).map(b=>z(this,null,function*(){this.debug(b,"starting video snapshotting");const R=this.mirror.getId(b);if(this.snapshotInProgressMap.get(R)){this.debug(b,"video snapshotting already in progress for",R);return}this.snapshotInProgressMap.set(R,!0);try{const{width:I,height:E}=b.getBoundingClientRect(),{actualWidth:C,actualHeight:N}={actualWidth:b.videoWidth,actualHeight:b.videoHeight},G=Math.max(C,N);if(G===0){this.debug(b,"not yet ready",{width:b.width,height:b.height,actualWidth:C,actualHeight:N,boxWidth:I,boxHeight:E});return}let q=c||1;a&&(q=Math.min(q,a/G));const Z=C*q,T=N*q,W=yield createImageBitmap(b,{resizeWidth:Z,resizeHeight:T}),k=Math.max(I,E)/G,M=C*k,P=N*k,U=(I-M)/2,$=(E-P)/2;this.debug(b,"created image bitmap",{actualWidth:C,actualHeight:N,boxWidth:I,boxHeight:E,outputWidth:M,outputHeight:P,resizeWidth:Z,resizeHeight:T,scale:q,outputScale:k,offsetX:U,offsetY:$}),this.worker.postMessage({id:R,bitmap:W,width:Z,height:T,dx:U,dy:$,dw:M,dh:P,dataURLOptions:l.dataURLOptions,logDebug:!!this.logger},[W]),this.debug(b,"send message")}catch(I){this.debug(b,"failed to snapshot",I)}finally{this.snapshotInProgressMap.set(R,!1)}}))),yield Promise.all(S).catch(console.error),d=requestAnimationFrame(b=>void y(b))});d=requestAnimationFrame(w=>void y(w)),this.resetObservers=()=>{h(),d&&cancelAnimationFrame(d)}}initCanvasMutationObserver(t,r,n){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const i=cf(t,r,n,!1),s=gS(this.processMutation.bind(this),t,r,n),o=bS(this.processMutation.bind(this),t,r,n);this.resetObservers=()=>{i(),s(),o()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const t=r=>{this.rafStamps.latestId=r,requestAnimationFrame(t)};requestAnimationFrame(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,r)=>{const n=this.mirror.getId(r);this.flushPendingCanvasMutationFor(r,n)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,r){if(this.frozen||this.locked)return;const n=this.pendingCanvasMutations.get(t);if(!n||r===-1)return;const i=n.map(o=>{const a=o,{type:l}=a;return nt(a,["type"])}),{type:s}=n[0];this.mutationCb({id:r,type:s,commands:i}),this.pendingCanvasMutations.delete(t)}}class wS{constructor(t){X(this,"trackedLinkElements",new WeakSet),X(this,"mutationCb"),X(this,"adoptedStyleSheetCb"),X(this,"styleMirror",new D0),this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,r){"_cssText"in r.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:r.id,attributes:r.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,r){if(t.length===0)return;const n={id:r,styleIds:[]},i=[];for(const s of t){let o;this.styleMirror.has(s)?o=this.styleMirror.getId(s):(o=this.styleMirror.add(s),i.push({styleId:o,rules:Array.from(s.rules||CSSRule,(l,c)=>({rule:Qu(l,s.href),index:c}))})),n.styleIds.push(o)}i.length>0&&(n.styles=i),this.adoptedStyleSheetCb(n)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}}class RS{constructor(){X(this,"nodeMap",new WeakMap),X(this,"active",!1)}inOtherBuffer(t,r){const n=this.nodeMap.get(t);return n&&Array.from(n).some(i=>i!==r)}add(t,r){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(r))}destroy(){}}let Le,Ki,_n,ji=!1;try{if(Array.from([1],e=>e*2)[0]!==2){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=((Uu=e.contentWindow)==null?void 0:Uu.Array.from)||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}const Et=Cv();function dt(e={}){var t;const{emit:r,checkoutEveryNms:n,checkoutEveryNth:i,blockClass:s="highlight-block",blockSelector:o=null,ignoreClass:l="highlight-ignore",ignoreSelector:c=null,maskTextClass:a="highlight-mask",maskTextSelector:h=null,inlineStylesheet:u=!0,maskAllInputs:f,maskInputOptions:d,slimDOMOptions:p,maskInputFn:m,maskTextFn:g=Oo,hooks:v,packFn:y,sampling:w={},mousemoveWait:_,recordDOM:S=!0,recordCanvas:b=!1,recordCrossOriginIframes:R=!1,recordAfter:I=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:E=!1,collectFonts:C=!1,inlineImages:N=!1,inlineVideos:G=!1,plugins:q,keepIframeSrcFn:Z=()=>!1,privacySetting:T="default",ignoreCSSAttributes:W=new Set([]),styleSheetResyncInterval:k=2e3,errorHandler:M,logger:P}=e,U=x(x({},e.dataURLOptions),typeof((t=e.sampling)==null?void 0:t.canvas)=="object"?e.sampling.canvas.dataURLOptions:void 0);K0(M);const $=R?window.parent===window:!0;let me=!1;if(!$)try{window.parent.document&&(me=!1)}catch(oe){me=!0}if($&&!r)throw new Error("emit function is required");if(!$&&!me)return()=>{};_!==void 0&&w.mousemove===void 0&&(w.mousemove=_),Et.reset();const O=f===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:d!==void 0?d:{password:!0},ye=dd(p);U0();let de,ve=0;const D=oe=>{for(const Pe of q||[])Pe.eventProcessor&&(oe=Pe.eventProcessor(oe));return y&&!me&&(oe=y(oe)),oe};Le=(oe,Pe)=>{var Te;const Oe=oe;if(Oe.timestamp=vn(),(Te=pr[0])!=null&&Te.isFrozen()&&Oe.type!==ge.FullSnapshot&&!(Oe.type===ge.IncrementalSnapshot&&Oe.data.source===he.Mutation)&&pr.forEach(lt=>lt.unfreeze()),$)r==null||r(D(Oe),Pe);else if(me){const lt={type:"rrweb",event:D(Oe),origin:window.location.origin,isCheckout:Pe};window.parent.postMessage(lt,"*")}if(Oe.type===ge.FullSnapshot)de=Oe,ve=0;else if(Oe.type===ge.IncrementalSnapshot){if(Oe.data.source===he.Mutation&&Oe.data.isAttachIframe)return;ve++;const lt=i&&ve>=i,Se=n&&Oe.timestamp-de.timestamp>n;(lt||Se)&&Ki(!0)}};const F=oe=>{Le({type:ge.IncrementalSnapshot,data:x({source:he.Mutation},oe)})},H=oe=>Le({type:ge.IncrementalSnapshot,data:x({source:he.Scroll},oe)}),Q=oe=>Le({type:ge.IncrementalSnapshot,data:x({source:he.CanvasMutation},oe)}),te=oe=>Le({type:ge.IncrementalSnapshot,data:x({source:he.AdoptedStyleSheet},oe)}),K=new wS({mutationCb:F,adoptedStyleSheetCb:te}),ie=new dS({mirror:Et,mutationCb:F,stylesheetManager:K,recordCrossOriginIframes:R,wrappedEmit:Le});for(const oe of q||[])oe.getMirror&&oe.getMirror({nodeMirror:Et,crossOriginIframeMirror:ie.crossOriginIframeMirror,crossOriginIframeStyleMirror:ie.crossOriginIframeStyleMirror});const ce=new RS,Ce=typeof(w==null?void 0:w.canvas)=="object"?w.canvas:{fps:w==null?void 0:w.canvas};_n=new SS({recordCanvas:b,recordLocalVideos:N,recordRemoteVideos:G,mutationCb:Q,win:window,blockClass:s,blockSelector:o,mirror:Et,sampling:Ce.fps,samplingManual:Ce.fpsManual,clearWebGLBuffer:Ce.clearWebGLBuffer,initialSnapshotDelay:Ce.initialSnapshotDelay,dataURLOptions:U,resizeFactor:Ce.resizeFactor,maxSnapshotDimension:Ce.maxSnapshotDimension,logger:P});const at=new hS({mutationCb:F,scrollCb:H,bypassOptions:{blockClass:s,blockSelector:o,maskTextClass:a,maskTextSelector:h,inlineStylesheet:u,maskInputOptions:O,dataURLOptions:U,maskTextFn:g,maskInputFn:m,recordCanvas:b,inlineImages:N,inlineVideos:G,privacySetting:T,sampling:w,slimDOMOptions:ye,iframeManager:ie,stylesheetManager:K,canvasManager:_n,keepIframeSrcFn:Z,processedNodeManager:ce},mirror:Et});Ki=(oe=!1)=>{if(!S)return;Le({type:ge.Meta,data:{href:window.location.href,width:Ah(),height:Mh()}},oe),K.reset(),at.init(),pr.forEach(Te=>Te.lock());const Pe=i0(document,{mirror:Et,blockClass:s,blockSelector:o,maskTextClass:a,maskTextSelector:h,inlineStylesheet:u,maskAllInputs:O,maskTextFn:g,maskInputFn:m,slimDOM:ye,dataURLOptions:U,recordCanvas:b,inlineImages:N,inlineVideos:G,privacySetting:T,onSerialize:Te=>{Fh(Te,Et)&&ie.addIframe(Te),Jh(Te,Et)&&K.trackLinkElement(Te),qa(Te)&&at.addShadowRoot(le.shadowRoot(Te),document)},onIframeLoad:(Te,Oe)=>{ie.attachIframe(Te,Oe),at.observeAttachShadow(Te)},onStylesheetLoad:(Te,Oe)=>{K.attachLinkElement(Te,Oe)},keepIframeSrcFn:Z});if(!Pe)return console.warn("Failed to snapshot the document");Le({type:ge.FullSnapshot,data:{node:Pe,initialOffset:Ph(window)}},oe),pr.forEach(Te=>Te.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&K.adoptStyleSheets(document.adoptedStyleSheets,Et.getId(document))};try{const oe=[],Pe=Oe=>{var lt;return fe(uS)({mutationCb:F,mousemoveCb:(Se,yu)=>Le({type:ge.IncrementalSnapshot,data:{source:yu,positions:Se}}),mouseInteractionCb:Se=>Le({type:ge.IncrementalSnapshot,data:x({source:he.MouseInteraction},Se)}),scrollCb:H,viewportResizeCb:Se=>Le({type:ge.IncrementalSnapshot,data:x({source:he.ViewportResize},Se)}),inputCb:Se=>Le({type:ge.IncrementalSnapshot,data:x({source:he.Input},Se)}),mediaInteractionCb:Se=>Le({type:ge.IncrementalSnapshot,data:x({source:he.MediaInteraction},Se)}),styleSheetRuleCb:Se=>Le({type:ge.IncrementalSnapshot,data:x({source:he.StyleSheetRule},Se)}),styleDeclarationCb:Se=>Le({type:ge.IncrementalSnapshot,data:x({source:he.StyleDeclaration},Se)}),canvasMutationCb:Q,fontCb:Se=>Le({type:ge.IncrementalSnapshot,data:x({source:he.Font},Se)}),selectionCb:Se=>{Le({type:ge.IncrementalSnapshot,data:x({source:he.Selection},Se)})},customElementCb:Se=>{Le({type:ge.IncrementalSnapshot,data:x({source:he.CustomElement},Se)})},blockClass:s,ignoreClass:l,ignoreSelector:c,maskTextClass:a,maskTextSelector:h,maskInputOptions:O,inlineStylesheet:u,sampling:w,recordDOM:S,recordCanvas:b,inlineImages:N,inlineVideos:G,userTriggeredOnInput:E,collectFonts:C,doc:Oe,maskInputFn:m,maskTextFn:g,keepIframeSrcFn:Z,blockSelector:o,slimDOMOptions:ye,dataURLOptions:U,mirror:Et,iframeManager:ie,stylesheetManager:K,shadowDomManager:at,processedNodeManager:ce,canvasManager:_n,ignoreCSSAttributes:W,styleSheetResyncInterval:k,privacySetting:T,plugins:((lt=q==null?void 0:q.filter(Se=>Se.observer))==null?void 0:lt.map(Se=>({observer:Se.observer,options:Se.options,callback:yu=>Le({type:ge.Plugin,data:{plugin:Se.name,payload:yu}})})))||[]},v)};ie.addLoadListener(Oe=>{try{oe.push(Pe(Oe.contentDocument))}catch(lt){console.warn(lt)}});const Te=()=>{Ki(),oe.push(Pe(document)),ji=!0};return["interactive","complete"].includes(document.readyState)?Te():(oe.push(ze("DOMContentLoaded",()=>{Le({type:ge.DomContentLoaded,data:{}}),I==="DOMContentLoaded"&&Te()})),oe.push(ze("load",()=>{Le({type:ge.Load,data:{}}),I==="load"&&Te()},window))),()=>{oe.forEach(Oe=>{try{Oe()}catch(lt){String(lt).toLowerCase().includes("cross-origin")||console.warn(lt)}}),ce.destroy(),ji=!1,j0()}}catch(oe){console.warn(oe)}}dt.addCustomEvent=(e,t)=>{ji&&Le({type:ge.Custom,data:{tag:e,payload:t}})},dt.freezePage=()=>{pr.forEach(e=>e.freeze())},dt.takeFullSnapshot=e=>{if(!ji)throw new Error("please take full snapshot after start recording");Ki(e)},dt.snapshotCanvas=e=>z(this,null,function*(){if(!_n)throw new Error("canvas manager is not initialized");yield _n.snapshot(e)}),dt.mirror=Et;var ff;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(ff||(ff={}));const{addCustomEvent:Qi}=dt;var $i=function(){return $i=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(t[s]=r[s])}return t},$i.apply(this,arguments)},qi=new Map,tl=new Map,pf=!0,es=!1;function mf(e){return e.replace(/[\s,]+/g," ").trim()}function _S(e){return mf(e.source.body.substring(e.start,e.end))}function TS(e){var t=new Set,r=[];return e.definitions.forEach(function(n){if(n.kind==="FragmentDefinition"){var i=n.name.value,s=_S(n.loc),o=tl.get(i);o&&!o.has(s)?pf&&console.warn("Warning: fragment with name "+i+` already exists.
|
|
214
214
|
graphql-tag enforces all fragment names across your application to be unique; read more about
|
|
215
|
-
this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):o||
|
|
215
|
+
this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):o||tl.set(i,o=new Set),o.add(s),t.has(s)||(t.add(s),r.push(n))}else r.push(n)}),$i($i({},e),{definitions:r})}function ES(e){var t=new Set(e.definitions);t.forEach(function(n){n.loc&&delete n.loc,Object.keys(n).forEach(function(i){var s=n[i];s&&typeof s=="object"&&t.add(s)})});var r=e.loc;return r&&(delete r.startToken,delete r.endToken),e}function IS(e){var t=mf(e);if(!qi.has(t)){var r=Xu(e,{experimentalFragmentVariables:es,allowLegacyFragmentVariables:es});if(!r||r.kind!=="Document")throw new Error("Not a valid GraphQL document.");qi.set(t,ES(TS(r)))}return qi.get(t)}function Ke(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];typeof e=="string"&&(e=[e]);var n=e[0];return t.forEach(function(i,s){i&&i.kind==="Document"?n+=i.loc.source.body:n+=i,n+=e[s+1]}),IS(n)}function CS(){qi.clear(),tl.clear()}function ZS(){pf=!1}function LS(){es=!0}function xS(){es=!1}var Tn={gql:Ke,resetCaches:CS,disableFragmentWarnings:ZS,enableExperimentalFragmentVariables:LS,disableExperimentalFragmentVariables:xS};(function(e){e.gql=Tn.gql,e.resetCaches=Tn.resetCaches,e.disableFragmentWarnings=Tn.disableFragmentWarnings,e.enableExperimentalFragmentVariables=Tn.enableExperimentalFragmentVariables,e.disableExperimentalFragmentVariables=Tn.disableExperimentalFragmentVariables})(Ke||(Ke={})),Ke.default=Ke;const gf=Ke`
|
|
216
216
|
fragment MatchParts on MatchConfig {
|
|
217
217
|
regexValue
|
|
218
218
|
matchValue
|
|
219
219
|
}
|
|
220
|
-
`,
|
|
220
|
+
`,NS=Ke`
|
|
221
221
|
mutation PushPayload(
|
|
222
222
|
$session_secure_id: String!
|
|
223
223
|
$payload_id: ID!
|
|
@@ -243,7 +243,7 @@ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):o
|
|
|
243
243
|
highlight_logs: $highlight_logs
|
|
244
244
|
)
|
|
245
245
|
}
|
|
246
|
-
`,
|
|
246
|
+
`,rl=Ke`
|
|
247
247
|
mutation PushSessionEvents(
|
|
248
248
|
$session_secure_id: String!
|
|
249
249
|
$payload_id: Int64ID!
|
|
@@ -255,7 +255,7 @@ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):o
|
|
|
255
255
|
data: $data
|
|
256
256
|
)
|
|
257
257
|
}
|
|
258
|
-
`,
|
|
258
|
+
`,OS=Ke`
|
|
259
259
|
mutation identifySession(
|
|
260
260
|
$session_secure_id: String!
|
|
261
261
|
$user_identifier: String!
|
|
@@ -267,7 +267,7 @@ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):o
|
|
|
267
267
|
user_object: $user_object
|
|
268
268
|
)
|
|
269
269
|
}
|
|
270
|
-
`,
|
|
270
|
+
`,GS=Ke`
|
|
271
271
|
mutation addSessionProperties(
|
|
272
272
|
$session_secure_id: String!
|
|
273
273
|
$properties_object: Any
|
|
@@ -277,11 +277,11 @@ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):o
|
|
|
277
277
|
properties_object: $properties_object
|
|
278
278
|
)
|
|
279
279
|
}
|
|
280
|
-
`,
|
|
280
|
+
`,VS=Ke`
|
|
281
281
|
mutation pushMetrics($metrics: [MetricInput]!) {
|
|
282
282
|
pushMetrics(metrics: $metrics)
|
|
283
283
|
}
|
|
284
|
-
`,
|
|
284
|
+
`,kS=Ke`
|
|
285
285
|
mutation addSessionFeedback(
|
|
286
286
|
$session_secure_id: String!
|
|
287
287
|
$user_name: String
|
|
@@ -297,7 +297,7 @@ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):o
|
|
|
297
297
|
timestamp: $timestamp
|
|
298
298
|
)
|
|
299
299
|
}
|
|
300
|
-
`,
|
|
300
|
+
`,XS=Ke`
|
|
301
301
|
mutation initializeSession(
|
|
302
302
|
$session_secure_id: String!
|
|
303
303
|
$session_key: String
|
|
@@ -384,12 +384,12 @@ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):o
|
|
|
384
384
|
}
|
|
385
385
|
}
|
|
386
386
|
}
|
|
387
|
-
${
|
|
388
|
-
`,
|
|
387
|
+
${gf}
|
|
388
|
+
`,WS=Ke`
|
|
389
389
|
query Ignore($id: ID!) {
|
|
390
390
|
ignore(id: $id)
|
|
391
391
|
}
|
|
392
|
-
`,
|
|
392
|
+
`,PS=Ke`
|
|
393
393
|
query GetSamplingConfig($organization_verbose_id: String!) {
|
|
394
394
|
sampling(organization_verbose_id: $organization_verbose_id) {
|
|
395
395
|
spans {
|
|
@@ -438,35 +438,35 @@ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):o
|
|
|
438
438
|
}
|
|
439
439
|
}
|
|
440
440
|
}
|
|
441
|
-
${
|
|
442
|
-
`,
|
|
443
|
-
`).filter(function(h){return!!h.match(s)},this);return a.map(function(h){h.indexOf("(eval ")>-1&&(h=h.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(\),.*$)/g,""));var
|
|
444
|
-
`).filter(function(h){return!h.match(o)},this);return a.map(function(h){if(h.indexOf(" > eval")>-1&&(h=h.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),h.indexOf("@")===-1&&h.indexOf(":")===-1)return new n({functionName:h});var
|
|
445
|
-
`)>-1&&
|
|
446
|
-
`).length>
|
|
447
|
-
`).length?this.parseOpera9(
|
|
448
|
-
`),
|
|
449
|
-
`),
|
|
450
|
-
`).filter(function(h){return!!h.match(i)&&!h.match(/^Error created at/)},this);return a.map(function(h){var c=h.split("@"),f=this.extractLocation(c.pop()),d=c.shift()||"",p=d.replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^)]*\)/g,"")||void 0,m;d.match(/\(([^)]*)\)/)&&(m=d.replace(/^[^(]+\(([^)]*)\)$/,"$1"));var g=m===void 0||m==="[arguments not available]"?void 0:m.split(",");return new n({functionName:p,args:g,fileName:f[0],lineNumber:f[1],columnNumber:f[2],source:h})},this)}}})})(bf);var MS=bf.exports;const Sf=fi(MS),al={},AS=["debug","log","info","warn","error"],ll=Symbol.for("@launchdarkly/o11y.sdkLogger"),US=(()=>{try{return(al==null?void 0:al.DEBUG)==="true"}catch(e){return!1}})(),Hr=(()=>{var r;const e=globalThis,t=(r=e[ll])!=null?r:e[ll]={debugEnabled:!1,suppressDepth:0};return US&&(t.debugEnabled=!0),t})(),ul=e=>{Hr.debugEnabled=e},wf=()=>Hr.debugEnabled,DS=()=>Hr.suppressDepth>0,cl=e=>{Hr.suppressDepth++;try{return e()}finally{Hr.suppressDepth--}},FS=e=>AS.includes(e)?e:"log",_e=(e,...t)=>{Hr.debugEnabled&&cl(()=>{var r;try{((r=console[FS(e)])!=null?r:console.log).apply(console,t)}catch(n){}})};function En(e){try{return Sf.parse(e)}catch(t){try{return Sf.parse(new Error)}catch(r){return _e("warn","Highlight Warning: failed to parse error",{originalError:t,secondaryError:r}),[]}}}const Rf=(e,t,r)=>{const n=$i(t,e.headers,r);return B(x({},e),{headers:n})},$i=(e,t,r)=>{var i,s;const n=x({},t);return r?((i=Object.keys(n))==null||i.forEach(o=>{[...r].includes(o==null?void 0:o.toLowerCase())||(n[o]="[REDACTED]")}),n):((s=Object.keys(n))==null||s.forEach(o=>{[...JS,...e].includes(o==null?void 0:o.toLowerCase())&&(n[o]="[REDACTED]")}),n)},JS=["authorization","cookie","proxy-authorization","set-cookie","token"],_f=["https://www.googleapis.com/identitytoolkit","https://securetoken.googleapis.com","browser-intake-datadoghq.com","browser-intake-datadoghq.eu","browser-intake-us3-datadoghq.com","browser-intake-us5-datadoghq.com","browser-intake-ap1-datadoghq.com","browser-intake-ddog-gov.com","r.lr-ingest.io","r.lr-in-prod.com","r.logrocket.io","data.pendo.io","ingest.sentry.io","ingest.us.sentry.io","ingest.de.sentry.io","bam.nr-data.net","bam-cell.nr-data.net","rs.fullstory.com","in.hotjar.com","api2.amplitude.com","api.mixpanel.com","api.segment.io/v1","google-analytics.com/g/collect","analytics.google.com/g/collect"],HS=["awsaccesskeyid","signature","sig","x-goog-signature","access_token","id_token","token","code","refresh_token","session_state"],YS=["access_token","id_token","token","code","refresh_token","session_state"],BS=/(\/eval\/[0-9a-f]{24}\/|\/sdk\/evalx?\/[0-9a-f]{24}\/(?:contexts|users)\/)([A-Za-z0-9+_=%-]{8,})/g,qi=e=>typeof e!="string"||!e.includes("eval")?e:e.replace(BS,"$1REDACTED"),Tf=e=>{var t,r;try{return new URL(e)}catch(n){return new URL(e,(r=(t=globalThis.location)==null?void 0:t.origin)!=null?r:"http://example.com")}},zS=e=>{if(!e||e==="#")return"";const t=e.slice(1);if(!t.includes("="))return e;const r=t.indexOf("?"),n=r>=0?t.slice(r+1):t,i=new URLSearchParams(n);for(const s of i.keys())if(YS.includes(s.toLowerCase()))return"";return e},es=e=>{try{const t=Tf(e);(t.username||t.password)&&(t.username="REDACTED",t.password="REDACTED"),t.pathname=qi(t.pathname);const r=t.searchParams;HS.forEach(i=>{for(const s of Array.from(r.keys()))s.toLowerCase()===i&&r.set(s,"REDACTED")});const n=zS(t.hash);if(t.hash=n,!e.includes("://")&&!e.startsWith("//"))return t.pathname+t.search+n;if(e.startsWith("//")){let i="//";return(t.username||t.password)&&(i+=t.username+":"+t.password+"@"),i+=t.host+t.pathname+t.search+n,i}return t.toString()}catch(t){return e}},KS=/^\s*(?:(?:debug|info|warn|error|none):\s*)?\[LaunchDarkly\]/,jS=e=>{const t=e[0];return typeof t=="string"&&KS.test(t)},Ef={level:[...nl],logger:"console",stringifyOptions:{depthOfLimit:10,numOfKeysLimit:100,stringLengthLimit:1e3}};function If(e,t){const r=t.logger;if(!r)return()=>{};let n;typeof r=="string"?n=window[r]:n=r;const i=[];if(t.level.includes("error")&&window){const o=l=>{const{message:u,error:a}=l;let h=[];a&&(h=En(a));const c=[sl(u,t.stringifyOptions)];e({type:"Error",trace:h,time:Date.now(),value:c})};window.addEventListener("error",o),i.push(()=>{window&&window.removeEventListener("error",o)})}for(const o of t.level)i.push(s(n,o));return()=>{i.forEach(o=>o())};function s(o,l){return o[l]?kS(o,l,u=>(...a)=>{if(u.apply(this,a),!DS()&&!(!t.recordLaunchDarklySdkLogs&&jS(a)))try{e(Cf(l,t,...a))}catch(h){u("highlight logger error:",h,...a)}}):()=>{}}}function Cf(e,t,...r){const n=En(new Error),i=(t.serializeConsoleAttributes?r.map(s=>typeof s=="object"?sl(s,t.stringifyOptions):s):r.filter(s=>typeof s!="object").map(s=>`${s}`)).map(s=>typeof s=="string"?qi(s):s);return{type:e,trace:n,value:i,attributes:qi(sl(r.filter(s=>typeof s=="object").reduce((s,o)=>x(x({},s),o),{}),t.stringifyOptions)),time:Date.now()}}const QS={start:0,end:3},$S={start:4,end:5},dl={start:6,end:7},hl={start:8,end:8},qS={start:9,end:9},ew={start:10,end:15};function tw(){if(crypto&&crypto.getRandomValues){const t=new Uint8Array(16);return crypto.getRandomValues(t),[...t.values()]}const e=[];for(let t=0;t<16;t+=1)e.push(Math.floor(Math.random()*256));return e}function Yr(e,t){let r="";for(let n=t.start;n<=t.end;n+=1)r+=e[n].toString(16).padStart(2,"0");return r}function rw(e){return e[hl.start]=(e[hl.start]|128)&191,e[dl.start]=e[dl.start]&15|64,`${Yr(e,QS)}-${Yr(e,$S)}-${Yr(e,dl)}-${Yr(e,hl)}${Yr(e,qS)}-${Yr(e,ew)}`}function nw(){const e=tw();return rw(e)}function In(){return typeof crypto!="undefined"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():nw()}function fl(e,t,r,n){var u,a,h,c;let i=n!=null?n:t,s=En(i),o={};if(t instanceof Error){const f=t.cause;t=t.message,f&&(o={"exception.cause":f})}const l=iw(s);e({error:i,event:Rt(t),type:"window.onerror",url:window.location.href,source:r!=null?r:"",lineNumber:(u=l[0])!=null&&u.lineNumber?(a=l[0])==null?void 0:a.lineNumber:0,columnNumber:(h=l[0])!=null&&h.columnNumber?(c=l[0])==null?void 0:c.columnNumber:0,stackTrace:l,timestamp:new Date().toISOString(),payload:o?Rt(o):void 0,id:In()})}const Zf=(e,{enablePromisePatch:t})=>{if(typeof window=="undefined")return()=>{};const r=window.onerror;window.onerror=(o,l,u,a,h)=>{fl(e,o,l,h)};const n=window.onunhandledrejection;window.onunhandledrejection=o=>{if(o.reason){const l=o.promise;l.getStack?fl(e,o.reason,o.type,l.getStack()):fl(e,o.reason,o.type)}};const i=window.Promise,s=class extends i{constructor(u){super(u);L(this,"promiseCreationError");this.promiseCreationError=new Error}getStack(){return this.promiseCreationError}static shouldPatch(){const u=typeof window.Zone=="undefined";return t&&u}};return s.shouldPatch()&&(window.Promise=s),()=>{window.Promise=i,window.onunhandledrejection=n,window.onerror=r}},iw=e=>{var r,n;if(e.length===0)return e;const t=e[0];return(r=t.fileName)!=null&&r.includes("highlight.run")||(n=t.fileName)!=null&&n.includes("highlight.io")||t.functionName==="new highlightPromise"?e.slice(1):e},pl=['["\\"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}','["{}"]','"{}"','[""]','""','["\\"\\""]','""'],ml=["websocket error",'\\"ResizeObserver loop'];var sw=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{},mr="1.9.0",Lf=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;function ow(e){var t=new Set([e]),r=new Set,n=e.match(Lf);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===e};function s(l){return r.add(l),!1}function o(l){return t.add(l),!0}return function(u){if(t.has(u))return!0;if(r.has(u))return!1;var a=u.match(Lf);if(!a)return s(u);var h={major:+a[1],minor:+a[2],patch:+a[3],prerelease:a[4]};return h.prerelease!=null||i.major!==h.major?s(u):i.major===0?i.minor===h.minor&&i.patch<=h.patch?o(u):s(u):i.minor<=h.minor?o(u):s(u)}}var aw=ow(mr),lw=mr.split(".")[0],Cn=Symbol.for("opentelemetry.js.api."+lw),Zn=sw;function Ln(e,t,r,n){var i;n===void 0&&(n=!1);var s=Zn[Cn]=(i=Zn[Cn])!==null&&i!==void 0?i:{version:mr};if(!n&&s[e]){var o=new Error("@opentelemetry/api: Attempted duplicate registration of API: "+e);return r.error(o.stack||o.message),!1}if(s.version!==mr){var o=new Error("@opentelemetry/api: Registration of version v"+s.version+" for "+e+" does not match previously registered API v"+mr);return r.error(o.stack||o.message),!1}return s[e]=t,r.debug("@opentelemetry/api: Registered a global for "+e+" v"+mr+"."),!0}function gr(e){var t,r,n=(t=Zn[Cn])===null||t===void 0?void 0:t.version;if(!(!n||!aw(n)))return(r=Zn[Cn])===null||r===void 0?void 0:r[e]}function xn(e,t){t.debug("@opentelemetry/api: Unregistering a global for "+e+" v"+mr+".");var r=Zn[Cn];r&&delete r[e]}var uw=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},cw=function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,s;n<i;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))},dw=function(){function e(t){this._namespace=t.namespace||"DiagComponentLogger"}return e.prototype.debug=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return Nn("debug",this._namespace,t)},e.prototype.error=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return Nn("error",this._namespace,t)},e.prototype.info=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return Nn("info",this._namespace,t)},e.prototype.warn=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return Nn("warn",this._namespace,t)},e.prototype.verbose=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return Nn("verbose",this._namespace,t)},e}();function Nn(e,t,r){var n=gr("diag");if(n)return r.unshift(t),n[e].apply(n,cw([],uw(r),!1))}var Ne;(function(e){e[e.NONE=0]="NONE",e[e.ERROR=30]="ERROR",e[e.WARN=50]="WARN",e[e.INFO=60]="INFO",e[e.DEBUG=70]="DEBUG",e[e.VERBOSE=80]="VERBOSE",e[e.ALL=9999]="ALL"})(Ne||(Ne={}));function hw(e,t){e<Ne.NONE?e=Ne.NONE:e>Ne.ALL&&(e=Ne.ALL),t=t||{};function r(n,i){var s=t[n];return typeof s=="function"&&e>=i?s.bind(t):function(){}}return{error:r("error",Ne.ERROR),warn:r("warn",Ne.WARN),info:r("info",Ne.INFO),debug:r("debug",Ne.DEBUG),verbose:r("verbose",Ne.VERBOSE)}}var fw=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},pw=function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,s;n<i;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))},mw="diag",Zt=function(){function e(){function t(i){return function(){for(var s=[],o=0;o<arguments.length;o++)s[o]=arguments[o];var l=gr("diag");if(l)return l[i].apply(l,pw([],fw(s),!1))}}var r=this,n=function(i,s){var o,l,u;if(s===void 0&&(s={logLevel:Ne.INFO}),i===r){var a=new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");return r.error((o=a.stack)!==null&&o!==void 0?o:a.message),!1}typeof s=="number"&&(s={logLevel:s});var h=gr("diag"),c=hw((l=s.logLevel)!==null&&l!==void 0?l:Ne.INFO,i);if(h&&!s.suppressOverrideMessage){var f=(u=new Error().stack)!==null&&u!==void 0?u:"<failed to generate stacktrace>";h.warn("Current logger will be overwritten from "+f),c.warn("Current logger will overwrite one already registered from "+f)}return Ln("diag",c,r,!0)};r.setLogger=n,r.disable=function(){xn(mw,r)},r.createComponentLogger=function(i){return new dw(i)},r.verbose=t("verbose"),r.debug=t("debug"),r.info=t("info"),r.warn=t("warn"),r.error=t("error")}return e.instance=function(){return this._instance||(this._instance=new e),this._instance},e}(),gw=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},yw=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},bw=function(){function e(t){this._entries=t?new Map(t):new Map}return e.prototype.getEntry=function(t){var r=this._entries.get(t);if(r)return Object.assign({},r)},e.prototype.getAllEntries=function(){return Array.from(this._entries.entries()).map(function(t){var r=gw(t,2),n=r[0],i=r[1];return[n,i]})},e.prototype.setEntry=function(t,r){var n=new e(this._entries);return n._entries.set(t,r),n},e.prototype.removeEntry=function(t){var r=new e(this._entries);return r._entries.delete(t),r},e.prototype.removeEntries=function(){for(var t,r,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];var s=new e(this._entries);try{for(var o=yw(n),l=o.next();!l.done;l=o.next()){var u=l.value;s._entries.delete(u)}}catch(a){t={error:a}}finally{try{l&&!l.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}return s},e.prototype.clear=function(){return new e},e}(),vw=Symbol("BaggageEntryMetadata"),Sw=Zt.instance();function ww(e){return e===void 0&&(e={}),new bw(new Map(Object.entries(e)))}function Rw(e){return typeof e!="string"&&(Sw.error("Cannot create baggage metadata from unknown type: "+typeof e),e=""),{__TYPE__:vw,toString:function(){return e}}}function gl(e){return Symbol.for(e)}var _w=function(){function e(t){var r=this;r._currentContext=t?new Map(t):new Map,r.getValue=function(n){return r._currentContext.get(n)},r.setValue=function(n,i){var s=new e(r._currentContext);return s._currentContext.set(n,i),s},r.deleteValue=function(n){var i=new e(r._currentContext);return i._currentContext.delete(n),i}}return e}(),yr=new _w,br=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Tw=function(){function e(){}return e.prototype.createGauge=function(t,r){return Gw},e.prototype.createHistogram=function(t,r){return Vw},e.prototype.createCounter=function(t,r){return Ow},e.prototype.createUpDownCounter=function(t,r){return kw},e.prototype.createObservableGauge=function(t,r){return Ww},e.prototype.createObservableCounter=function(t,r){return Xw},e.prototype.createObservableUpDownCounter=function(t,r){return Pw},e.prototype.addBatchObservableCallback=function(t,r){},e.prototype.removeBatchObservableCallback=function(t){},e}(),ts=function(){function e(){}return e}(),Ew=function(e){br(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.add=function(r,n){},t}(ts),Iw=function(e){br(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.add=function(r,n){},t}(ts),Cw=function(e){br(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.record=function(r,n){},t}(ts),Zw=function(e){br(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.record=function(r,n){},t}(ts),yl=function(){function e(){}return e.prototype.addCallback=function(t){},e.prototype.removeCallback=function(t){},e}(),Lw=function(e){br(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(yl),xw=function(e){br(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(yl),Nw=function(e){br(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(yl),xf=new Tw,Ow=new Ew,Gw=new Cw,Vw=new Zw,kw=new Iw,Xw=new Lw,Ww=new xw,Pw=new Nw;function Mw(){return xf}var qt;(function(e){e[e.INT=0]="INT",e[e.DOUBLE=1]="DOUBLE"})(qt||(qt={}));var Aw={get:function(e,t){if(e!=null)return e[t]},keys:function(e){return e==null?[]:Object.keys(e)}},Uw={set:function(e,t,r){e!=null&&(e[t]=r)}},Dw=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},Fw=function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,s;n<i;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))},Jw=function(){function e(){}return e.prototype.active=function(){return yr},e.prototype.with=function(t,r,n){for(var i=[],s=3;s<arguments.length;s++)i[s-3]=arguments[s];return r.call.apply(r,Fw([n],Dw(i),!1))},e.prototype.bind=function(t,r){return r},e.prototype.enable=function(){return this},e.prototype.disable=function(){return this},e}(),Hw=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},Yw=function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,s;n<i;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))},bl="context",Bw=new Jw,rs=function(){function e(){}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalContextManager=function(t){return Ln(bl,t,Zt.instance())},e.prototype.active=function(){return this._getContextManager().active()},e.prototype.with=function(t,r,n){for(var i,s=[],o=3;o<arguments.length;o++)s[o-3]=arguments[o];return(i=this._getContextManager()).with.apply(i,Yw([t,r,n],Hw(s),!1))},e.prototype.bind=function(t,r){return this._getContextManager().bind(t,r)},e.prototype._getContextManager=function(){return gr(bl)||Bw},e.prototype.disable=function(){this._getContextManager().disable(),xn(bl,Zt.instance())},e}(),Wt;(function(e){e[e.NONE=0]="NONE",e[e.SAMPLED=1]="SAMPLED"})(Wt||(Wt={}));var Nf="0000000000000000",Of="00000000000000000000000000000000",Gf={traceId:Of,spanId:Nf,traceFlags:Wt.NONE},On=function(){function e(t){t===void 0&&(t=Gf),this._spanContext=t}return e.prototype.spanContext=function(){return this._spanContext},e.prototype.setAttribute=function(t,r){return this},e.prototype.setAttributes=function(t){return this},e.prototype.addEvent=function(t,r){return this},e.prototype.addLink=function(t){return this},e.prototype.addLinks=function(t){return this},e.prototype.setStatus=function(t){return this},e.prototype.updateName=function(t){return this},e.prototype.end=function(t){},e.prototype.isRecording=function(){return!1},e.prototype.recordException=function(t,r){},e}(),vl=gl("OpenTelemetry Context Key SPAN");function Sl(e){return e.getValue(vl)||void 0}function zw(){return Sl(rs.getInstance().active())}function wl(e,t){return e.setValue(vl,t)}function Kw(e){return e.deleteValue(vl)}function jw(e,t){return wl(e,new On(t))}function Vf(e){var t;return(t=Sl(e))===null||t===void 0?void 0:t.spanContext()}var Qw=/^([0-9a-f]{32})$/i,$w=/^[0-9a-f]{16}$/i;function kf(e){return Qw.test(e)&&e!==Of}function qw(e){return $w.test(e)&&e!==Nf}function ns(e){return kf(e.traceId)&&qw(e.spanId)}function eR(e){return new On(e)}var Rl=rs.getInstance(),Xf=function(){function e(){}return e.prototype.startSpan=function(t,r,n){n===void 0&&(n=Rl.active());var i=!!(r!=null&&r.root);if(i)return new On;var s=n&&Vf(n);return tR(s)&&ns(s)?new On(s):new On},e.prototype.startActiveSpan=function(t,r,n,i){var s,o,l;if(!(arguments.length<2)){arguments.length===2?l=r:arguments.length===3?(s=r,l=n):(s=r,o=n,l=i);var u=o!=null?o:Rl.active(),a=this.startSpan(t,s,u),h=wl(u,a);return Rl.with(h,l,void 0,a)}},e}();function tR(e){return typeof e=="object"&&typeof e.spanId=="string"&&typeof e.traceId=="string"&&typeof e.traceFlags=="number"}var rR=new Xf,nR=function(){function e(t,r,n,i){this._provider=t,this.name=r,this.version=n,this.options=i}return e.prototype.startSpan=function(t,r,n){return this._getTracer().startSpan(t,r,n)},e.prototype.startActiveSpan=function(t,r,n,i){var s=this._getTracer();return Reflect.apply(s.startActiveSpan,s,arguments)},e.prototype._getTracer=function(){if(this._delegate)return this._delegate;var t=this._provider.getDelegateTracer(this.name,this.version,this.options);return t?(this._delegate=t,this._delegate):rR},e}(),iR=function(){function e(){}return e.prototype.getTracer=function(t,r,n){return new Xf},e}(),sR=new iR,Wf=function(){function e(){}return e.prototype.getTracer=function(t,r,n){var i;return(i=this.getDelegateTracer(t,r,n))!==null&&i!==void 0?i:new nR(this,t,r,n)},e.prototype.getDelegate=function(){var t;return(t=this._delegate)!==null&&t!==void 0?t:sR},e.prototype.setDelegate=function(t){this._delegate=t},e.prototype.getDelegateTracer=function(t,r,n){var i;return(i=this._delegate)===null||i===void 0?void 0:i.getTracer(t,r,n)},e}(),is;(function(e){e[e.NOT_RECORD=0]="NOT_RECORD",e[e.RECORD=1]="RECORD",e[e.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(is||(is={}));var Gn;(function(e){e[e.INTERNAL=0]="INTERNAL",e[e.SERVER=1]="SERVER",e[e.CLIENT=2]="CLIENT",e[e.PRODUCER=3]="PRODUCER",e[e.CONSUMER=4]="CONSUMER"})(Gn||(Gn={}));var ss;(function(e){e[e.UNSET=0]="UNSET",e[e.OK=1]="OK",e[e.ERROR=2]="ERROR"})(ss||(ss={}));var pe=rs.getInstance(),Y=Zt.instance(),oR=function(){function e(){}return e.prototype.getMeter=function(t,r,n){return xf},e}(),aR=new oR,_l="metrics",lR=function(){function e(){}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalMeterProvider=function(t){return Ln(_l,t,Zt.instance())},e.prototype.getMeterProvider=function(){return gr(_l)||aR},e.prototype.getMeter=function(t,r,n){return this.getMeterProvider().getMeter(t,r,n)},e.prototype.disable=function(){xn(_l,Zt.instance())},e}(),Tl=lR.getInstance(),uR=function(){function e(){}return e.prototype.inject=function(t,r){},e.prototype.extract=function(t,r){return t},e.prototype.fields=function(){return[]},e}(),El=gl("OpenTelemetry Baggage Key");function Pf(e){return e.getValue(El)||void 0}function cR(){return Pf(rs.getInstance().active())}function dR(e,t){return e.setValue(El,t)}function hR(e){return e.deleteValue(El)}var Il="propagation",fR=new uR,pR=function(){function e(){this.createBaggage=ww,this.getBaggage=Pf,this.getActiveBaggage=cR,this.setBaggage=dR,this.deleteBaggage=hR}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalPropagator=function(t){return Ln(Il,t,Zt.instance())},e.prototype.inject=function(t,r,n){return n===void 0&&(n=Uw),this._getGlobalPropagator().inject(t,r,n)},e.prototype.extract=function(t,r,n){return n===void 0&&(n=Aw),this._getGlobalPropagator().extract(t,r,n)},e.prototype.fields=function(){return this._getGlobalPropagator().fields()},e.prototype.disable=function(){xn(Il,Zt.instance())},e.prototype._getGlobalPropagator=function(){return gr(Il)||fR},e}(),dt=pR.getInstance(),Cl="trace",mR=function(){function e(){this._proxyTracerProvider=new Wf,this.wrapSpanContext=eR,this.isSpanContextValid=ns,this.deleteSpan=Kw,this.getSpan=Sl,this.getActiveSpan=zw,this.getSpanContext=Vf,this.setSpan=wl,this.setSpanContext=jw}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalTracerProvider=function(t){var r=Ln(Cl,this._proxyTracerProvider,Zt.instance());return r&&this._proxyTracerProvider.setDelegate(t),r},e.prototype.getTracerProvider=function(){return gr(Cl)||this._proxyTracerProvider},e.prototype.getTracer=function(t,r){return this.getTracerProvider().getTracer(t,r)},e.prototype.disable=function(){xn(Cl,Zt.instance()),this._proxyTracerProvider=new Wf},e}(),we=mR.getInstance(),Mf=gl("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function Af(e){return e.setValue(Mf,!0)}function Zl(e){return e.getValue(Mf)===!0}var gR="=",Ll=";",xl=",",Nl="baggage",yR=180,bR=4096,vR=8192,SR=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s};function wR(e){return e.reduce(function(t,r){var n=""+t+(t!==""?xl:"")+r;return n.length>vR?t:n},"")}function RR(e){return e.getAllEntries().map(function(t){var r=SR(t,2),n=r[0],i=r[1],s=encodeURIComponent(n)+"="+encodeURIComponent(i.value);return i.metadata!==void 0&&(s+=Ll+i.metadata.toString()),s})}function _R(e){var t=e.split(Ll);if(!(t.length<=0)){var r=t.shift();if(r){var n=r.indexOf(gR);if(!(n<=0)){var i=decodeURIComponent(r.substring(0,n).trim()),s=decodeURIComponent(r.substring(n+1).trim()),o;return t.length>0&&(o=Rw(t.join(Ll))),{key:i,value:s,metadata:o}}}}}var Uf=function(){function e(){}return e.prototype.inject=function(t,r,n){var i=dt.getBaggage(t);if(!(!i||Zl(t))){var s=RR(i).filter(function(l){return l.length<=bR}).slice(0,yR),o=wR(s);o.length>0&&n.set(r,Nl,o)}},e.prototype.extract=function(t,r,n){var i=n.get(r,Nl),s=Array.isArray(i)?i.join(xl):i;if(!s)return t;var o={};if(s.length===0)return t;var l=s.split(xl);return l.forEach(function(u){var a=_R(u);if(a){var h={value:a.value};a.metadata&&(h.metadata=a.metadata),o[a.key]=h}}),Object.entries(o).length===0?t:dt.setBaggage(t,dt.createBaggage(o))},e.prototype.fields=function(){return[Nl]},e}(),Df=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},TR=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s};function os(e){var t,r,n={};if(typeof e!="object"||e==null)return n;try{for(var i=Df(Object.entries(e)),s=i.next();!s.done;s=i.next()){var o=TR(s.value,2),l=o[0],u=o[1];if(!ER(l)){Y.warn("Invalid attribute key: "+l);continue}if(!Ff(u)){Y.warn("Invalid attribute value set for key: "+l);continue}Array.isArray(u)?n[l]=u.slice():n[l]=u}}catch(a){t={error:a}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return n}function ER(e){return typeof e=="string"&&e.length>0}function Ff(e){return e==null?!0:Array.isArray(e)?IR(e):Jf(e)}function IR(e){var t,r,n;try{for(var i=Df(e),s=i.next();!s.done;s=i.next()){var o=s.value;if(o!=null){if(!n){if(Jf(o)){n=typeof o;continue}return!1}if(typeof o!==n)return!1}}}catch(l){t={error:l}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return!0}function Jf(e){switch(typeof e){case"number":case"boolean":case"string":return!0}return!1}function CR(){return function(e){Y.error(ZR(e))}}function ZR(e){return typeof e=="string"?e:JSON.stringify(LR(e))}function LR(e){for(var t={},r=e;r!==null;)Object.getOwnPropertyNames(r).forEach(function(n){if(!t[n]){var i=r[n];i&&(t[n]=String(i))}}),r=Object.getPrototypeOf(r);return t}var xR=CR();function er(e){try{xR(e)}catch(t){}}var Lt;(function(e){e.AlwaysOff="always_off",e.AlwaysOn="always_on",e.ParentBasedAlwaysOff="parentbased_always_off",e.ParentBasedAlwaysOn="parentbased_always_on",e.ParentBasedTraceIdRatio="parentbased_traceidratio",e.TraceIdRatio="traceidratio"})(Lt||(Lt={}));var NR=",",OR=["OTEL_SDK_DISABLED"];function GR(e){return OR.indexOf(e)>-1}var VR=["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 kR(e){return VR.indexOf(e)>-1}var XR=["OTEL_NO_PATCH_MODULES","OTEL_PROPAGATORS","OTEL_SEMCONV_STABILITY_OPT_IN"];function WR(e){return XR.indexOf(e)>-1}var as=1/0,ls=128,PR=128,MR=128,Hf={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:Ne.INFO,OTEL_NO_PATCH_MODULES:[],OTEL_PROPAGATORS:["tracecontext","baggage"],OTEL_RESOURCE_ATTRIBUTES:"",OTEL_SERVICE_NAME:"",OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT:as,OTEL_ATTRIBUTE_COUNT_LIMIT:ls,OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT:as,OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT:ls,OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT:as,OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT:ls,OTEL_SPAN_EVENT_COUNT_LIMIT:128,OTEL_SPAN_LINK_COUNT_LIMIT:128,OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT:PR,OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT:MR,OTEL_TRACES_EXPORTER:"",OTEL_TRACES_SAMPLER:Lt.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 AR(e,t,r){if(typeof r[e]!="undefined"){var n=String(r[e]);t[e]=n.toLowerCase()==="true"}}function UR(e,t,r,n,i){if(n===void 0&&(n=-1/0),i===void 0&&(i=1/0),typeof r[e]!="undefined"){var s=Number(r[e]);isNaN(s)||(s<n?t[e]=n:s>i?t[e]=i:t[e]=s)}}function DR(e,t,r,n){n===void 0&&(n=NR);var i=r[e];typeof i=="string"&&(t[e]=i.split(n).map(function(s){return s.trim()}))}var FR={ALL:Ne.ALL,VERBOSE:Ne.VERBOSE,DEBUG:Ne.DEBUG,INFO:Ne.INFO,WARN:Ne.WARN,ERROR:Ne.ERROR,NONE:Ne.NONE};function JR(e,t,r){var n=r[e];if(typeof n=="string"){var i=FR[n.toUpperCase()];i!=null&&(t[e]=i)}}function Yf(e){var t={};for(var r in Hf){var n=r;switch(n){case"OTEL_LOG_LEVEL":JR(n,t,e);break;default:if(GR(n))AR(n,t,e);else if(kR(n))UR(n,t,e);else if(WR(n))DR(n,t,e);else{var i=e[n];typeof i!="undefined"&&i!==null&&(t[n]=String(i))}}}return t}var Vn=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{};function Br(){var e=Yf(Vn);return Object.assign({},Hf,e)}function HR(){return Yf(Vn)}function Bf(e){return e>=48&&e<=57?e-48:e>=97&&e<=102?e-87:e-55}function Ol(e){for(var t=new Uint8Array(e.length/2),r=0,n=0;n<e.length;n+=2){var i=Bf(e.charCodeAt(n)),s=Bf(e.charCodeAt(n+1));t[r++]=i<<4|s}return t}var ht=performance,YR="1.30.1",BR="process.runtime.name",zR="telemetry.sdk.name",KR="telemetry.sdk.language",jR="telemetry.sdk.version",QR=BR,$R=zR,qR=KR,e_=jR,t_="webjs",r_=t_,zr,Gl=(zr={},zr[$R]="opentelemetry",zr[QR]="browser",zr[qR]=r_,zr[e_]=YR,zr),n_=9,i_=6,s_=Math.pow(10,i_),us=Math.pow(10,n_);function ft(e){var t=e/1e3,r=Math.trunc(t),n=Math.round(e%1e3*s_);return[r,n]}function Vl(){var e=ht.timeOrigin;if(typeof e!="number"){var t=ht;e=t.timing&&t.timing.fetchStart}return e}function vr(e){var t=ft(Vl()),r=ft(typeof e=="number"?e:ht.now());return Kf(t,r)}function kn(e){if(kl(e))return e;if(typeof e=="number")return e<Vl()?vr(e):ft(e);if(e instanceof Date)return ft(e.getTime());throw TypeError("Invalid input type")}function o_(e,t){var r=t[0]-e[0],n=t[1]-e[1];return n<0&&(r-=1,n+=us),[r,n]}function Pt(e){return e[0]*us+e[1]}function cs(e){return e[0]*1e6+e[1]/1e3}function kl(e){return Array.isArray(e)&&e.length===2&&typeof e[0]=="number"&&typeof e[1]=="number"}function zf(e){return kl(e)||typeof e=="number"||e instanceof Date}function Kf(e,t){var r=[e[0]+t[0],e[1]+t[1]];return r[1]>=us&&(r[1]-=us,r[0]+=1),r}var Ie;(function(e){e[e.SUCCESS=0]="SUCCESS",e[e.FAILED=1]="FAILED"})(Ie||(Ie={}));var a_=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},jf=function(){function e(t){t===void 0&&(t={});var r;this._propagators=(r=t.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 e.prototype.inject=function(t,r,n){var i,s;try{for(var o=a_(this._propagators),l=o.next();!l.done;l=o.next()){var u=l.value;try{u.inject(t,r,n)}catch(a){Y.warn("Failed to inject with "+u.constructor.name+". Err: "+a.message)}}}catch(a){i={error:a}}finally{try{l&&!l.done&&(s=o.return)&&s.call(o)}finally{if(i)throw i.error}}},e.prototype.extract=function(t,r,n){return this._propagators.reduce(function(i,s){try{return s.extract(i,r,n)}catch(o){Y.warn("Failed to extract with "+s.constructor.name+". Err: "+o.message)}return i},t)},e.prototype.fields=function(){return this._fields.slice()},e}(),Xl="[_0-9a-z-*/]",l_="[a-z]"+Xl+"{0,255}",u_="[a-z0-9]"+Xl+"{0,240}@[a-z]"+Xl+"{0,13}",c_=new RegExp("^(?:"+l_+"|"+u_+")$"),d_=/^[ -~]{0,255}[!-~]$/,h_=/,|=/;function f_(e){return c_.test(e)}function p_(e){return d_.test(e)&&!h_.test(e)}var Qf=32,m_=512,$f=",",qf="=",g_=function(){function e(t){this._internalState=new Map,t&&this._parse(t)}return e.prototype.set=function(t,r){var n=this._clone();return n._internalState.has(t)&&n._internalState.delete(t),n._internalState.set(t,r),n},e.prototype.unset=function(t){var r=this._clone();return r._internalState.delete(t),r},e.prototype.get=function(t){return this._internalState.get(t)},e.prototype.serialize=function(){var t=this;return this._keys().reduce(function(r,n){return r.push(n+qf+t.get(n)),r},[]).join($f)},e.prototype._parse=function(t){t.length>m_||(this._internalState=t.split($f).reverse().reduce(function(r,n){var i=n.trim(),s=i.indexOf(qf);if(s!==-1){var o=i.slice(0,s),l=i.slice(s+1,n.length);f_(o)&&p_(l)&&r.set(o,l)}return r},new Map),this._internalState.size>Qf&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,Qf))))},e.prototype._keys=function(){return Array.from(this._internalState.keys()).reverse()},e.prototype._clone=function(){var t=new e;return t._internalState=new Map(this._internalState),t},e}(),ds="traceparent",Wl="tracestate",y_="00",b_="(?!ff)[\\da-f]{2}",v_="(?![0]{32})[\\da-f]{32}",S_="(?![0]{16})[\\da-f]{16}",w_="[\\da-f]{2}",R_=new RegExp("^\\s?("+b_+")-("+v_+")-("+S_+")-("+w_+")(-.*)?\\s?$");function __(e){var t=R_.exec(e);return!t||t[1]==="00"&&t[5]?null:{traceId:t[2],spanId:t[3],traceFlags:parseInt(t[4],16)}}var ep=function(){function e(){}return e.prototype.inject=function(t,r,n){var i=we.getSpanContext(t);if(!(!i||Zl(t)||!ns(i))){var s=y_+"-"+i.traceId+"-"+i.spanId+"-0"+Number(i.traceFlags||Wt.NONE).toString(16);n.set(r,ds,s),i.traceState&&n.set(r,Wl,i.traceState.serialize())}},e.prototype.extract=function(t,r,n){var i=n.get(r,ds);if(!i)return t;var s=Array.isArray(i)?i[0]:i;if(typeof s!="string")return t;var o=__(s);if(!o)return t;o.isRemote=!0;var l=n.get(r,Wl);if(l){var u=Array.isArray(l)?l.join(","):l;o.traceState=new g_(typeof u=="string"?u:void 0)}return we.setSpanContext(t,o)},e.prototype.fields=function(){return[ds,Wl]},e}(),T_="[object Object]",E_="[object Null]",I_="[object Undefined]",C_=Function.prototype,tp=C_.toString,Z_=tp.call(Object),L_=x_(Object.getPrototypeOf,Object),rp=Object.prototype,np=rp.hasOwnProperty,Sr=Symbol?Symbol.toStringTag:void 0,ip=rp.toString;function x_(e,t){return function(r){return e(t(r))}}function sp(e){if(!N_(e)||O_(e)!==T_)return!1;var t=L_(e);if(t===null)return!0;var r=np.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&tp.call(r)===Z_}function N_(e){return e!=null&&typeof e=="object"}function O_(e){return e==null?e===void 0?I_:E_:Sr&&Sr in Object(e)?G_(e):V_(e)}function G_(e){var t=np.call(e,Sr),r=e[Sr],n=!1;try{e[Sr]=void 0,n=!0}catch(s){}var i=ip.call(e);return n&&(t?e[Sr]=r:delete e[Sr]),i}function V_(e){return ip.call(e)}var k_=20;function op(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var r=e.shift(),n=new WeakMap;e.length>0;)r=ap(r,e.shift(),0,n);return r}function Pl(e){return hs(e)?e.slice():e}function ap(e,t,r,n){r===void 0&&(r=0);var i;if(!(r>k_)){if(r++,fs(e)||fs(t)||up(t))i=Pl(t);else if(hs(e)){if(i=e.slice(),hs(t))for(var s=0,o=t.length;s<o;s++)i.push(Pl(t[s]));else if(Xn(t))for(var l=Object.keys(t),s=0,o=l.length;s<o;s++){var u=l[s];i[u]=Pl(t[u])}}else if(Xn(e))if(Xn(t)){if(!X_(e,t))return t;i=Object.assign({},e);for(var l=Object.keys(t),s=0,o=l.length;s<o;s++){var u=l[s],a=t[u];if(fs(a))typeof a=="undefined"?delete i[u]:i[u]=a;else{var h=i[u],c=a;if(lp(e,u,n)||lp(t,u,n))delete i[u];else{if(Xn(h)&&Xn(c)){var f=n.get(h)||[],d=n.get(c)||[];f.push({obj:e,key:u}),d.push({obj:t,key:u}),n.set(h,f),n.set(c,d)}i[u]=ap(i[u],a,r,n)}}}}else i=t;return i}}function lp(e,t,r){for(var n=r.get(e[t])||[],i=0,s=n.length;i<s;i++){var o=n[i];if(o.key===t&&o.obj===e)return!0}return!1}function hs(e){return Array.isArray(e)}function up(e){return typeof e=="function"}function Xn(e){return!fs(e)&&!hs(e)&&!up(e)&&typeof e=="object"}function fs(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e=="undefined"||e instanceof Date||e instanceof RegExp||e===null}function X_(e,t){return!(!sp(e)||!sp(t))}var W_=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};function cp(e,t){return typeof t=="string"?e===t:!!e.match(t)}function dp(e,t){var r,n;if(!t)return!1;try{for(var i=W_(t),s=i.next();!s.done;s=i.next()){var o=s.value;if(cp(e,o))return!0}}catch(l){r={error:l}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return!1}var P_=function(){function e(){var t=this;this._promise=new Promise(function(r,n){t._resolve=r,t._reject=n})}return Object.defineProperty(e.prototype,"promise",{get:function(){return this._promise},enumerable:!1,configurable:!0}),e.prototype.resolve=function(t){this._resolve(t)},e.prototype.reject=function(t){this._reject(t)},e}(),M_=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},A_=function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,s;n<i;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))},U_=function(){function e(t,r){this._callback=t,this._that=r,this._isCalled=!1,this._deferred=new P_}return Object.defineProperty(e.prototype,"isCalled",{get:function(){return this._isCalled},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"promise",{get:function(){return this._deferred.promise},enumerable:!1,configurable:!0}),e.prototype.call=function(){for(var t,r=this,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];if(!this._isCalled){this._isCalled=!0;try{Promise.resolve((t=this._callback).call.apply(t,A_([this._that],M_(n),!1))).then(function(s){return r._deferred.resolve(s)},function(s){return r._deferred.reject(s)})}catch(s){this._deferred.reject(s)}}return this._deferred.promise},e}();function D_(e,t){return new Promise(function(r){pe.with(Af(pe.active()),function(){e.export(t,function(n){r(n)})})})}var F_={_export:D_},hp=function(){function e(){}return e.prototype.emit=function(t){},e}(),J_=new hp,H_=function(){function e(){}return e.prototype.getLogger=function(t,r,n){return new hp},e}(),fp=new H_,Y_=function(){function e(t,r,n,i){this._provider=t,this.name=r,this.version=n,this.options=i}return e.prototype.emit=function(t){this._getLogger().emit(t)},e.prototype._getLogger=function(){if(this._delegate)return this._delegate;var t=this._provider.getDelegateLogger(this.name,this.version,this.options);return t?(this._delegate=t,this._delegate):J_},e}(),pp=function(){function e(){}return e.prototype.getLogger=function(t,r,n){var i;return(i=this.getDelegateLogger(t,r,n))!==null&&i!==void 0?i:new Y_(this,t,r,n)},e.prototype.getDelegate=function(){var t;return(t=this._delegate)!==null&&t!==void 0?t:fp},e.prototype.setDelegate=function(t){this._delegate=t},e.prototype.getDelegateLogger=function(t,r,n){var i;return(i=this._delegate)===null||i===void 0?void 0:i.getLogger(t,r,n)},e}(),B_=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{},ps=Symbol.for("io.opentelemetry.js.api.logs"),Wn=B_;function z_(e,t,r){return function(n){return n===e?t:r}}var mp=1,K_=function(){function e(){this._proxyLoggerProvider=new pp}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalLoggerProvider=function(t){return Wn[ps]?this.getLoggerProvider():(Wn[ps]=z_(mp,t,fp),this._proxyLoggerProvider.setDelegate(t),t)},e.prototype.getLoggerProvider=function(){var t,r;return(r=(t=Wn[ps])===null||t===void 0?void 0:t.call(Wn,mp))!==null&&r!==void 0?r:this._proxyLoggerProvider},e.prototype.getLogger=function(t,r,n){return this.getLoggerProvider().getLogger(t,r,n)},e.prototype.disable=function(){delete Wn[ps],this._proxyLoggerProvider=new pp},e}(),gp=K_.getInstance();function j_(e,t,r,n){for(var i=0,s=e.length;i<s;i++){var o=e[i];t&&o.setTracerProvider(t),r&&o.setMeterProvider(r),n&&o.setLoggerProvider&&o.setLoggerProvider(n),o.getConfig().enabled||o.enable()}}function Q_(e){e.forEach(function(t){return t.disable()})}function $_(e){var t,r,n=e.tracerProvider||we.getTracerProvider(),i=e.meterProvider||Tl.getMeterProvider(),s=e.loggerProvider||gp.getLoggerProvider(),o=(r=(t=e.instrumentations)===null||t===void 0?void 0:t.flat())!==null&&r!==void 0?r:[];return j_(o,n,i,s),function(){Q_(o)}}function Ml(e){return typeof e=="function"}var je=console.error.bind(console);function Pn(e,t,r){var n=!!e[t]&&e.propertyIsEnumerable(t);Object.defineProperty(e,t,{configurable:!0,enumerable:n,writable:!0,value:r})}function Mn(e){e&&e.logger&&(Ml(e.logger)?je=e.logger:je("new logger isn't a function, not replacing"))}function yp(e,t,r){if(!e||!e[t]){je("no original function "+t+" to wrap");return}if(!r){je("no wrapper function"),je(new Error().stack);return}if(!Ml(e[t])||!Ml(r)){je("original object and wrapper must be functions");return}var n=e[t],i=r(n,t);return Pn(i,"__original",n),Pn(i,"__unwrap",function(){e[t]===i&&Pn(e,t,n)}),Pn(i,"__wrapped",!0),Pn(e,t,i),i}function q_(e,t,r){if(e)Array.isArray(e)||(e=[e]);else{je("must provide one or more modules to patch"),je(new Error().stack);return}if(!(t&&Array.isArray(t))){je("must provide one or more functions to wrap on modules");return}e.forEach(function(n){t.forEach(function(i){yp(n,i,r)})})}function bp(e,t){if(!e||!e[t]){je("no function to unwrap."),je(new Error().stack);return}if(!e[t].__unwrap)je("no original to unwrap to -- has "+t+" already been unwrapped?");else return e[t].__unwrap()}function eT(e,t){if(e)Array.isArray(e)||(e=[e]);else{je("must provide one or more modules to patch"),je(new Error().stack);return}if(!(t&&Array.isArray(t))){je("must provide one or more functions to unwrap on modules");return}e.forEach(function(r){t.forEach(function(n){bp(r,n)})})}Mn.wrap=yp,Mn.massWrap=q_,Mn.unwrap=bp,Mn.massUnwrap=eT;var ms=Mn,Al=function(){return Al=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Al.apply(this,arguments)},tT=function(){function e(t,r,n){this.instrumentationName=t,this.instrumentationVersion=r,this._config={},this._wrap=ms.wrap,this._unwrap=ms.unwrap,this._massWrap=ms.massWrap,this._massUnwrap=ms.massUnwrap,this.setConfig(n),this._diag=Y.createComponentLogger({namespace:t}),this._tracer=we.getTracer(t,r),this._meter=Tl.getMeter(t,r),this._logger=gp.getLogger(t,r),this._updateMetricInstruments()}return Object.defineProperty(e.prototype,"meter",{get:function(){return this._meter},enumerable:!1,configurable:!0}),e.prototype.setMeterProvider=function(t){this._meter=t.getMeter(this.instrumentationName,this.instrumentationVersion),this._updateMetricInstruments()},Object.defineProperty(e.prototype,"logger",{get:function(){return this._logger},enumerable:!1,configurable:!0}),e.prototype.setLoggerProvider=function(t){this._logger=t.getLogger(this.instrumentationName,this.instrumentationVersion)},e.prototype.getModuleDefinitions=function(){var t,r=(t=this.init())!==null&&t!==void 0?t:[];return Array.isArray(r)?r:[r]},e.prototype._updateMetricInstruments=function(){},e.prototype.getConfig=function(){return this._config},e.prototype.setConfig=function(t){this._config=Al({enabled:!0},t)},e.prototype.setTracerProvider=function(t){this._tracer=t.getTracer(this.instrumentationName,this.instrumentationVersion)},Object.defineProperty(e.prototype,"tracer",{get:function(){return this._tracer},enumerable:!1,configurable:!0}),e.prototype._runSpanCustomizationHook=function(t,r,n,i){if(t)try{t(n,i)}catch(s){this._diag.error("Error running span customization hook due to exception in handler",{triggerName:r},s)}},e}(),rT=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),An=function(e){rT(t,e);function t(r,n,i){var s=e.call(this,r,n,i)||this;return s._config.enabled&&s.enable(),s}return t}(tT);function gs(e,t,r){var n,i;try{i=e()}catch(s){n=s}finally{return t(n,i),i}}function Me(e){return typeof e=="function"&&typeof e.__original=="function"&&typeof e.__unwrap=="function"&&e.__wrapped===!0}var nT="exception.type",iT="exception.message",sT="exception.stacktrace",Ul=nT,Dl=iT,oT=sT,aT="exception",Fl=function(){return Fl=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Fl.apply(this,arguments)},lT=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},vp=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},uT=function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,s;n<i;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))},cT=function(){function e(t,r,n,i,s,o,l,u,a,h){l===void 0&&(l=[]),this.attributes={},this.links=[],this.events=[],this._droppedAttributesCount=0,this._droppedEventsCount=0,this._droppedLinksCount=0,this.status={code:ss.UNSET},this.endTime=[0,0],this._ended=!1,this._duration=[-1,-1],this.name=n,this._spanContext=i,this.parentSpanId=o,this.kind=s,this.links=l;var c=Date.now();this._performanceStartTime=ht.now(),this._performanceOffset=c-(this._performanceStartTime+Vl()),this._startTimeProvided=u!=null,this.startTime=this._getTime(u!=null?u:c),this.resource=t.resource,this.instrumentationLibrary=t.instrumentationLibrary,this._spanLimits=t.getSpanLimits(),this._attributeValueLengthLimit=this._spanLimits.attributeValueLengthLimit||0,h!=null&&this.setAttributes(h),this._spanProcessor=t.getActiveSpanProcessor(),this._spanProcessor.onStart(this,r)}return e.prototype.spanContext=function(){return this._spanContext},e.prototype.setAttribute=function(t,r){return r==null||this._isSpanEnded()?this:t.length===0?(Y.warn("Invalid attribute key: "+t),this):Ff(r)?Object.keys(this.attributes).length>=this._spanLimits.attributeCountLimit&&!Object.prototype.hasOwnProperty.call(this.attributes,t)?(this._droppedAttributesCount++,this):(this.attributes[t]=this._truncateToSize(r),this):(Y.warn("Invalid attribute value set for key: "+t),this)},e.prototype.setAttributes=function(t){var r,n;try{for(var i=lT(Object.entries(t)),s=i.next();!s.done;s=i.next()){var o=vp(s.value,2),l=o[0],u=o[1];this.setAttribute(l,u)}}catch(a){r={error:a}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return this},e.prototype.addEvent=function(t,r,n){if(this._isSpanEnded())return this;if(this._spanLimits.eventCountLimit===0)return Y.warn("No events allowed."),this._droppedEventsCount++,this;this.events.length>=this._spanLimits.eventCountLimit&&(this._droppedEventsCount===0&&Y.debug("Dropping extra events."),this.events.shift(),this._droppedEventsCount++),zf(r)&&(zf(n)||(n=r),r=void 0);var i=os(r);return this.events.push({name:t,attributes:i,time:this._getTime(n),droppedAttributesCount:0}),this},e.prototype.addLink=function(t){return this.links.push(t),this},e.prototype.addLinks=function(t){var r;return(r=this.links).push.apply(r,uT([],vp(t),!1)),this},e.prototype.setStatus=function(t){return this._isSpanEnded()?this:(this.status=Fl({},t),this.status.message!=null&&typeof t.message!="string"&&(Y.warn("Dropping invalid status.message of type '"+typeof t.message+"', expected 'string'"),delete this.status.message),this)},e.prototype.updateName=function(t){return this._isSpanEnded()?this:(this.name=t,this)},e.prototype.end=function(t){if(this._isSpanEnded()){Y.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(t),this._duration=o_(this.startTime,this.endTime),this._duration[0]<0&&(Y.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&&Y.warn("Dropped "+this._droppedEventsCount+" events because eventCountLimit reached"),this._spanProcessor.onEnd(this)},e.prototype._getTime=function(t){if(typeof t=="number"&&t<=ht.now())return vr(t+this._performanceOffset);if(typeof t=="number")return ft(t);if(t instanceof Date)return ft(t.getTime());if(kl(t))return t;if(this._startTimeProvided)return ft(Date.now());var r=ht.now()-this._performanceStartTime;return Kf(this.startTime,ft(r))},e.prototype.isRecording=function(){return this._ended===!1},e.prototype.recordException=function(t,r){var n={};typeof t=="string"?n[Dl]=t:t&&(t.code?n[Ul]=t.code.toString():t.name&&(n[Ul]=t.name),t.message&&(n[Dl]=t.message),t.stack&&(n[oT]=t.stack)),n[Ul]||n[Dl]?this.addEvent(aT,n,r):Y.warn("Failed to record an exception "+t)},Object.defineProperty(e.prototype,"duration",{get:function(){return this._duration},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ended",{get:function(){return this._ended},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"droppedAttributesCount",{get:function(){return this._droppedAttributesCount},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"droppedEventsCount",{get:function(){return this._droppedEventsCount},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"droppedLinksCount",{get:function(){return this._droppedLinksCount},enumerable:!1,configurable:!0}),e.prototype._isSpanEnded=function(){return this._ended&&Y.warn("Can not execute the operation on ended Span {traceId: "+this._spanContext.traceId+", spanId: "+this._spanContext.spanId+"}"),this._ended},e.prototype._truncateToLimitUtil=function(t,r){return t.length<=r?t:t.substring(0,r)},e.prototype._truncateToSize=function(t){var r=this,n=this._attributeValueLengthLimit;return n<=0?(Y.warn("Attribute value limit must be positive, got "+n),t):typeof t=="string"?this._truncateToLimitUtil(t,n):Array.isArray(t)?t.map(function(i){return typeof i=="string"?r._truncateToLimitUtil(i,n):i}):t},e}(),Kr;(function(e){e[e.NOT_RECORD=0]="NOT_RECORD",e[e.RECORD=1]="RECORD",e[e.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(Kr||(Kr={}));var ys=function(){function e(){}return e.prototype.shouldSample=function(){return{decision:Kr.NOT_RECORD}},e.prototype.toString=function(){return"AlwaysOffSampler"},e}(),jr=function(){function e(){}return e.prototype.shouldSample=function(){return{decision:Kr.RECORD_AND_SAMPLED}},e.prototype.toString=function(){return"AlwaysOnSampler"},e}(),Jl=function(){function e(t){var r,n,i,s;this._root=t.root,this._root||(er(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new jr),this._remoteParentSampled=(r=t.remoteParentSampled)!==null&&r!==void 0?r:new jr,this._remoteParentNotSampled=(n=t.remoteParentNotSampled)!==null&&n!==void 0?n:new ys,this._localParentSampled=(i=t.localParentSampled)!==null&&i!==void 0?i:new jr,this._localParentNotSampled=(s=t.localParentNotSampled)!==null&&s!==void 0?s:new ys}return e.prototype.shouldSample=function(t,r,n,i,s,o){var l=we.getSpanContext(t);return!l||!ns(l)?this._root.shouldSample(t,r,n,i,s,o):l.isRemote?l.traceFlags&Wt.SAMPLED?this._remoteParentSampled.shouldSample(t,r,n,i,s,o):this._remoteParentNotSampled.shouldSample(t,r,n,i,s,o):l.traceFlags&Wt.SAMPLED?this._localParentSampled.shouldSample(t,r,n,i,s,o):this._localParentNotSampled.shouldSample(t,r,n,i,s,o)},e.prototype.toString=function(){return"ParentBased{root="+this._root.toString()+", remoteParentSampled="+this._remoteParentSampled.toString()+", remoteParentNotSampled="+this._remoteParentNotSampled.toString()+", localParentSampled="+this._localParentSampled.toString()+", localParentNotSampled="+this._localParentNotSampled.toString()+"}"},e}(),Sp=function(){function e(t){t===void 0&&(t=0),this._ratio=t,this._ratio=this._normalize(t),this._upperBound=Math.floor(this._ratio*4294967295)}return e.prototype.shouldSample=function(t,r){return{decision:kf(r)&&this._accumulate(r)<this._upperBound?Kr.RECORD_AND_SAMPLED:Kr.NOT_RECORD}},e.prototype.toString=function(){return"TraceIdRatioBased{"+this._ratio+"}"},e.prototype._normalize=function(t){return typeof t!="number"||isNaN(t)?0:t>=1?1:t<=0?0:t},e.prototype._accumulate=function(t){for(var r=0,n=0;n<t.length/8;n++){var i=n*8,s=parseInt(t.slice(i,i+8),16);r=(r^s)>>>0}return r},e}(),dT=Lt.AlwaysOn,Qr=1;function wp(){var e=Br();return{sampler:Rp(e),forceFlushTimeoutMillis:3e4,generalLimits:{attributeValueLengthLimit:e.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:e.OTEL_ATTRIBUTE_COUNT_LIMIT},spanLimits:{attributeValueLengthLimit:e.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:e.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT,linkCountLimit:e.OTEL_SPAN_LINK_COUNT_LIMIT,eventCountLimit:e.OTEL_SPAN_EVENT_COUNT_LIMIT,attributePerEventCountLimit:e.OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT,attributePerLinkCountLimit:e.OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT},mergeResourceWithDefaults:!0}}function Rp(e){switch(e===void 0&&(e=Br()),e.OTEL_TRACES_SAMPLER){case Lt.AlwaysOn:return new jr;case Lt.AlwaysOff:return new ys;case Lt.ParentBasedAlwaysOn:return new Jl({root:new jr});case Lt.ParentBasedAlwaysOff:return new Jl({root:new ys});case Lt.TraceIdRatio:return new Sp(_p(e));case Lt.ParentBasedTraceIdRatio:return new Jl({root:new Sp(_p(e))});default:return Y.error('OTEL_TRACES_SAMPLER value "'+e.OTEL_TRACES_SAMPLER+" invalid, defaulting to "+dT+'".'),new jr}}function _p(e){if(e.OTEL_TRACES_SAMPLER_ARG===void 0||e.OTEL_TRACES_SAMPLER_ARG==="")return Y.error("OTEL_TRACES_SAMPLER_ARG is blank, defaulting to "+Qr+"."),Qr;var t=Number(e.OTEL_TRACES_SAMPLER_ARG);return isNaN(t)?(Y.error("OTEL_TRACES_SAMPLER_ARG="+e.OTEL_TRACES_SAMPLER_ARG+" was given, but it is invalid, defaulting to "+Qr+"."),Qr):t<0||t>1?(Y.error("OTEL_TRACES_SAMPLER_ARG="+e.OTEL_TRACES_SAMPLER_ARG+" was given, but it is out of range ([0..1]), defaulting to "+Qr+"."),Qr):t}function hT(e){var t={sampler:Rp()},r=wp(),n=Object.assign({},r,t,e);return n.generalLimits=Object.assign({},r.generalLimits,e.generalLimits||{}),n.spanLimits=Object.assign({},r.spanLimits,e.spanLimits||{}),n}function fT(e){var t,r,n,i,s,o,l,u,a,h,c,f,d=Object.assign({},e.spanLimits),p=HR();return d.attributeCountLimit=(o=(s=(i=(r=(t=e.spanLimits)===null||t===void 0?void 0:t.attributeCountLimit)!==null&&r!==void 0?r:(n=e.generalLimits)===null||n===void 0?void 0:n.attributeCountLimit)!==null&&i!==void 0?i:p.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT)!==null&&s!==void 0?s:p.OTEL_ATTRIBUTE_COUNT_LIMIT)!==null&&o!==void 0?o:ls,d.attributeValueLengthLimit=(f=(c=(h=(u=(l=e.spanLimits)===null||l===void 0?void 0:l.attributeValueLengthLimit)!==null&&u!==void 0?u:(a=e.generalLimits)===null||a===void 0?void 0:a.attributeValueLengthLimit)!==null&&h!==void 0?h:p.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&c!==void 0?c:p.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&f!==void 0?f:as,Object.assign({},e,{spanLimits:d})}var pT=function(){function e(t,r){this._exporter=t,this._isExporting=!1,this._finishedSpans=[],this._droppedSpansCount=0;var n=Br();this._maxExportBatchSize=typeof(r==null?void 0:r.maxExportBatchSize)=="number"?r.maxExportBatchSize:n.OTEL_BSP_MAX_EXPORT_BATCH_SIZE,this._maxQueueSize=typeof(r==null?void 0:r.maxQueueSize)=="number"?r.maxQueueSize:n.OTEL_BSP_MAX_QUEUE_SIZE,this._scheduledDelayMillis=typeof(r==null?void 0:r.scheduledDelayMillis)=="number"?r.scheduledDelayMillis:n.OTEL_BSP_SCHEDULE_DELAY,this._exportTimeoutMillis=typeof(r==null?void 0:r.exportTimeoutMillis)=="number"?r.exportTimeoutMillis:n.OTEL_BSP_EXPORT_TIMEOUT,this._shutdownOnce=new U_(this._shutdown,this),this._maxExportBatchSize>this._maxQueueSize&&(Y.warn("BatchSpanProcessor: maxExportBatchSize must be smaller or equal to maxQueueSize, setting maxExportBatchSize to match maxQueueSize"),this._maxExportBatchSize=this._maxQueueSize)}return e.prototype.forceFlush=function(){return this._shutdownOnce.isCalled?this._shutdownOnce.promise:this._flushAll()},e.prototype.onStart=function(t,r){},e.prototype.onEnd=function(t){this._shutdownOnce.isCalled||(t.spanContext().traceFlags&Wt.SAMPLED)!==0&&this._addToBuffer(t)},e.prototype.shutdown=function(){return this._shutdownOnce.call()},e.prototype._shutdown=function(){var t=this;return Promise.resolve().then(function(){return t.onShutdown()}).then(function(){return t._flushAll()}).then(function(){return t._exporter.shutdown()})},e.prototype._addToBuffer=function(t){if(this._finishedSpans.length>=this._maxQueueSize){this._droppedSpansCount===0&&Y.debug("maxQueueSize reached, dropping spans"),this._droppedSpansCount++;return}this._droppedSpansCount>0&&(Y.warn("Dropped "+this._droppedSpansCount+" spans because maxQueueSize reached"),this._droppedSpansCount=0),this._finishedSpans.push(t),this._maybeStartTimer()},e.prototype._flushAll=function(){var t=this;return new Promise(function(r,n){for(var i=[],s=Math.ceil(t._finishedSpans.length/t._maxExportBatchSize),o=0,l=s;o<l;o++)i.push(t._flushOneBatch());Promise.all(i).then(function(){r()}).catch(n)})},e.prototype._flushOneBatch=function(){var t=this;return this._clearTimer(),this._finishedSpans.length===0?Promise.resolve():new Promise(function(r,n){var i=setTimeout(function(){n(new Error("Timeout"))},t._exportTimeoutMillis);pe.with(Af(pe.active()),function(){var s;t._finishedSpans.length<=t._maxExportBatchSize?(s=t._finishedSpans,t._finishedSpans=[]):s=t._finishedSpans.splice(0,t._maxExportBatchSize);for(var o=function(){return t._exporter.export(s,function(c){var f;clearTimeout(i),c.code===Ie.SUCCESS?r():n((f=c.error)!==null&&f!==void 0?f:new Error("BatchSpanProcessor: span export failed"))})},l=null,u=0,a=s.length;u<a;u++){var h=s[u];h.resource.asyncAttributesPending&&h.resource.waitForAsyncAttributes&&(l!=null||(l=[]),l.push(h.resource.waitForAsyncAttributes()))}l===null?o():Promise.all(l).then(o,function(c){er(c),n(c)})})})},e.prototype._maybeStartTimer=function(){var t=this;if(!this._isExporting){var r=function(){t._isExporting=!0,t._flushOneBatch().finally(function(){t._isExporting=!1,t._finishedSpans.length>0&&(t._clearTimer(),t._maybeStartTimer())}).catch(function(n){t._isExporting=!1,er(n)})};if(this._finishedSpans.length>=this._maxExportBatchSize)return r();this._timer===void 0&&(this._timer=setTimeout(function(){return r()},this._scheduledDelayMillis))}},e.prototype._clearTimer=function(){this._timer!==void 0&&(clearTimeout(this._timer),this._timer=void 0)},e}(),mT=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Tp=function(e){mT(t,e);function t(r,n){var i=e.call(this,r,n)||this;return i.onInit(n),i}return t.prototype.onInit=function(r){var n=this;(r==null?void 0:r.disableAutoFlushOnDocumentHide)!==!0&&typeof document!="undefined"&&(this._visibilityChangeListener=function(){document.visibilityState==="hidden"&&n.forceFlush().catch(function(i){er(i)})},this._pageHideListener=function(){n.forceFlush().catch(function(i){er(i)})},document.addEventListener("visibilitychange",this._visibilityChangeListener),document.addEventListener("pagehide",this._pageHideListener))},t.prototype.onShutdown=function(){typeof document!="undefined"&&(this._visibilityChangeListener&&document.removeEventListener("visibilitychange",this._visibilityChangeListener),this._pageHideListener&&document.removeEventListener("pagehide",this._pageHideListener))},t}(pT),gT=8,yT=16,bT=function(){function e(){this.generateTraceId=Ep(yT),this.generateSpanId=Ep(gT)}return e}(),bs=Array(32);function Ep(e){return function(){for(var r=0;r<e*2;r++)bs[r]=Math.floor(Math.random()*16)+48,bs[r]>=58&&(bs[r]+=39);return String.fromCharCode.apply(null,bs.slice(0,e*2))}}var vT=function(){function e(t,r,n){this._tracerProvider=n;var i=hT(r);this._sampler=i.sampler,this._generalLimits=i.generalLimits,this._spanLimits=i.spanLimits,this._idGenerator=r.idGenerator||new bT,this.resource=n.resource,this.instrumentationLibrary=t}return e.prototype.startSpan=function(t,r,n){var i,s,o;r===void 0&&(r={}),n===void 0&&(n=pe.active()),r.root&&(n=we.deleteSpan(n));var l=we.getSpan(n);if(Zl(n)){Y.debug("Instrumentation suppressed, returning Noop Span");var u=we.wrapSpanContext(Gf);return u}var a=l==null?void 0:l.spanContext(),h=this._idGenerator.generateSpanId(),c,f,d;!a||!we.isSpanContextValid(a)?c=this._idGenerator.generateTraceId():(c=a.traceId,f=a.traceState,d=a.spanId);var p=(i=r.kind)!==null&&i!==void 0?i:Gn.INTERNAL,m=((s=r.links)!==null&&s!==void 0?s:[]).map(function(b){return{context:b.context,attributes:os(b.attributes)}}),g=os(r.attributes),v=this._sampler.shouldSample(n,c,t,p,g,m);f=(o=v.traceState)!==null&&o!==void 0?o:f;var y=v.decision===is.RECORD_AND_SAMPLED?Wt.SAMPLED:Wt.NONE,w={traceId:c,spanId:h,traceFlags:y,traceState:f};if(v.decision===is.NOT_RECORD){Y.debug("Recording is off, propagating context in a non-recording span");var u=we.wrapSpanContext(w);return u}var _=os(Object.assign(g,v.attributes)),S=new cT(this,n,t,w,p,d,m,r.startTime,void 0,_);return S},e.prototype.startActiveSpan=function(t,r,n,i){var s,o,l;if(!(arguments.length<2)){arguments.length===2?l=r:arguments.length===3?(s=r,l=n):(s=r,o=n,l=i);var u=o!=null?o:pe.active(),a=this.startSpan(t,s,u),h=we.setSpan(u,a);return pe.with(h,l,void 0,a)}},e.prototype.getGeneralLimits=function(){return this._generalLimits},e.prototype.getSpanLimits=function(){return this._spanLimits},e.prototype.getActiveSpanProcessor=function(){return this._tracerProvider.getActiveSpanProcessor()},e}(),ST="service.name",wT="telemetry.sdk.name",RT="telemetry.sdk.language",_T="telemetry.sdk.version",TT=ST,Ip=wT,Cp=RT,Zp=_T;function ET(){return"unknown_service"}var tr=function(){return tr=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},tr.apply(this,arguments)},IT=function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function l(h){try{a(n.next(h))}catch(c){o(c)}}function u(h){try{a(n.throw(h))}catch(c){o(c)}}function a(h){h.done?s(h.value):i(h.value).then(l,u)}a((n=n.apply(e,t||[])).next())})},CT=function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function l(a){return function(h){return u([a,h])}}function u(a){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(s=a[0]&2?i.return:a[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,a[1])).done)return s;switch(i=0,s&&(a=[a[0]&2,s.value]),a[0]){case 0:case 1:s=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){r.label=a[1];break}if(a[0]===6&&r.label<s[1]){r.label=s[1],s=a;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(a);break}s[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(h){a=[6,h],i=0}finally{n=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},ZT=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},Un=function(){function e(t,r){var n=this,i;this._attributes=t,this.asyncAttributesPending=r!=null,this._syncAttributes=(i=this._attributes)!==null&&i!==void 0?i:{},this._asyncAttributesPromise=r==null?void 0:r.then(function(s){return n._attributes=Object.assign({},n._attributes,s),n.asyncAttributesPending=!1,s},function(s){return Y.debug("a resource's async attributes promise rejected: %s",s),n.asyncAttributesPending=!1,{}})}return e.empty=function(){return e.EMPTY},e.default=function(){var t;return new e((t={},t[TT]=ET(),t[Cp]=Gl[Cp],t[Ip]=Gl[Ip],t[Zp]=Gl[Zp],t))},Object.defineProperty(e.prototype,"attributes",{get:function(){var t;return this.asyncAttributesPending&&Y.error("Accessing resource attributes before async attributes settled"),(t=this._attributes)!==null&&t!==void 0?t:{}},enumerable:!1,configurable:!0}),e.prototype.waitForAsyncAttributes=function(){return IT(this,void 0,void 0,function(){return CT(this,function(t){switch(t.label){case 0:return this.asyncAttributesPending?[4,this._asyncAttributesPromise]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2]}})})},e.prototype.merge=function(t){var r=this,n;if(!t)return this;var i=tr(tr({},this._syncAttributes),(n=t._syncAttributes)!==null&&n!==void 0?n:t.attributes);if(!this._asyncAttributesPromise&&!t._asyncAttributesPromise)return new e(i);var s=Promise.all([this._asyncAttributesPromise,t._asyncAttributesPromise]).then(function(o){var l,u=ZT(o,2),a=u[0],h=u[1];return tr(tr(tr(tr({},r._syncAttributes),a),(l=t._syncAttributes)!==null&&l!==void 0?l:t.attributes),h)});return new e(i,s)},e.EMPTY=new e({}),e}(),vs=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Lp=function(){function e(t){this._spanProcessors=t}return e.prototype.forceFlush=function(){var t,r,n=[];try{for(var i=vs(this._spanProcessors),s=i.next();!s.done;s=i.next()){var o=s.value;n.push(o.forceFlush())}}catch(l){t={error:l}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return new Promise(function(l){Promise.all(n).then(function(){l()}).catch(function(u){er(u||new Error("MultiSpanProcessor: forceFlush failed")),l()})})},e.prototype.onStart=function(t,r){var n,i;try{for(var s=vs(this._spanProcessors),o=s.next();!o.done;o=s.next()){var l=o.value;l.onStart(t,r)}}catch(u){n={error:u}}finally{try{o&&!o.done&&(i=s.return)&&i.call(s)}finally{if(n)throw n.error}}},e.prototype.onEnd=function(t){var r,n;try{for(var i=vs(this._spanProcessors),s=i.next();!s.done;s=i.next()){var o=s.value;o.onEnd(t)}}catch(l){r={error:l}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}},e.prototype.shutdown=function(){var t,r,n=[];try{for(var i=vs(this._spanProcessors),s=i.next();!s.done;s=i.next()){var o=s.value;n.push(o.shutdown())}}catch(l){t={error:l}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return new Promise(function(l,u){Promise.all(n).then(function(){l()},u)})},e}(),LT=function(){function e(){}return e.prototype.onStart=function(t,r){},e.prototype.onEnd=function(t){},e.prototype.shutdown=function(){return Promise.resolve()},e.prototype.forceFlush=function(){return Promise.resolve()},e}(),xT=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},NT=function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,s;n<i;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))},wr;(function(e){e[e.resolved=0]="resolved",e[e.timeout=1]="timeout",e[e.error=2]="error",e[e.unresolved=3]="unresolved"})(wr||(wr={}));var OT=function(){function e(t){t===void 0&&(t={});var r,n;this._registeredSpanProcessors=[],this._tracers=new Map;var i=op({},wp(),fT(t));if(this.resource=(r=i.resource)!==null&&r!==void 0?r:Un.empty(),i.mergeResourceWithDefaults&&(this.resource=Un.default().merge(this.resource)),this._config=Object.assign({},i,{resource:this.resource}),!((n=t.spanProcessors)===null||n===void 0)&&n.length)this._registeredSpanProcessors=NT([],xT(t.spanProcessors),!1),this.activeSpanProcessor=new Lp(this._registeredSpanProcessors);else{var s=this._buildExporterFromEnv();if(s!==void 0){var o=new Tp(s);this.activeSpanProcessor=o}else this.activeSpanProcessor=new LT}}return e.prototype.getTracer=function(t,r,n){var i=t+"@"+(r||"")+":"+((n==null?void 0:n.schemaUrl)||"");return this._tracers.has(i)||this._tracers.set(i,new vT({name:t,version:r,schemaUrl:n==null?void 0:n.schemaUrl},this._config,this)),this._tracers.get(i)},e.prototype.addSpanProcessor=function(t){this._registeredSpanProcessors.length===0&&this.activeSpanProcessor.shutdown().catch(function(r){return Y.error("Error while trying to shutdown current span processor",r)}),this._registeredSpanProcessors.push(t),this.activeSpanProcessor=new Lp(this._registeredSpanProcessors)},e.prototype.getActiveSpanProcessor=function(){return this.activeSpanProcessor},e.prototype.register=function(t){t===void 0&&(t={}),we.setGlobalTracerProvider(this),t.propagator===void 0&&(t.propagator=this._buildPropagatorFromEnv()),t.contextManager&&pe.setGlobalContextManager(t.contextManager),t.propagator&&dt.setGlobalPropagator(t.propagator)},e.prototype.forceFlush=function(){var t=this._config.forceFlushTimeoutMillis,r=this._registeredSpanProcessors.map(function(n){return new Promise(function(i){var s,o=setTimeout(function(){i(new Error("Span processor did not completed within timeout period of "+t+" ms")),s=wr.timeout},t);n.forceFlush().then(function(){clearTimeout(o),s!==wr.timeout&&(s=wr.resolved,i(s))}).catch(function(l){clearTimeout(o),s=wr.error,i(l)})})});return new Promise(function(n,i){Promise.all(r).then(function(s){var o=s.filter(function(l){return l!==wr.resolved});o.length>0?i(o):n()}).catch(function(s){return i([s])})})},e.prototype.shutdown=function(){return this.activeSpanProcessor.shutdown()},e.prototype._getPropagator=function(t){var r;return(r=this.constructor._registeredPropagators.get(t))===null||r===void 0?void 0:r()},e.prototype._getSpanExporter=function(t){var r;return(r=this.constructor._registeredExporters.get(t))===null||r===void 0?void 0:r()},e.prototype._buildPropagatorFromEnv=function(){var t=this,r=Array.from(new Set(Br().OTEL_PROPAGATORS)),n=r.map(function(s){var o=t._getPropagator(s);return o||Y.warn('Propagator "'+s+'" requested through environment variable is unavailable.'),o}),i=n.reduce(function(s,o){return o&&s.push(o),s},[]);if(i.length!==0)return r.length===1?i[0]:new jf({propagators:i})},e.prototype._buildExporterFromEnv=function(){var t=Br().OTEL_TRACES_EXPORTER;if(!(t==="none"||t==="")){var r=this._getSpanExporter(t);return r||Y.error('Exporter "'+t+'" requested through environment variable is unavailable.'),r}},e._registeredPropagators=new Map([["tracecontext",function(){return new ep}],["baggage",function(){return new Uf}]]),e._registeredExporters=new Map,e}(),GT=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},VT=function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,s;n<i;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))},xp=function(){function e(){this._enabled=!1,this._currentContext=yr}return e.prototype._bindFunction=function(t,r){t===void 0&&(t=yr);var n=this,i=function(){for(var s=this,o=[],l=0;l<arguments.length;l++)o[l]=arguments[l];return n.with(t,function(){return r.apply(s,o)})};return Object.defineProperty(i,"length",{enumerable:!1,configurable:!0,writable:!1,value:r.length}),i},e.prototype.active=function(){return this._currentContext},e.prototype.bind=function(t,r){return t===void 0&&(t=this.active()),typeof r=="function"?this._bindFunction(t,r):r},e.prototype.disable=function(){return this._currentContext=yr,this._enabled=!1,this},e.prototype.enable=function(){return this._enabled?this:(this._enabled=!0,this._currentContext=yr,this)},e.prototype.with=function(t,r,n){for(var i=[],s=3;s<arguments.length;s++)i[s-3]=arguments[s];var o=this._currentContext;this._currentContext=t||yr;try{return r.call.apply(r,VT([n],GT(i),!1))}finally{this._currentContext=o}},e}(),kT=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),XT=function(e){kT(t,e);function t(r){r===void 0&&(r={});var n=e.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 t.prototype.register=function(r){r===void 0&&(r={}),r.contextManager===void 0&&(r.contextManager=new xp),r.contextManager&&r.contextManager.enable(),e.prototype.register.call(this,r)},t}(OT),ne;(function(e){e.CONNECT_END="connectEnd",e.CONNECT_START="connectStart",e.DECODED_BODY_SIZE="decodedBodySize",e.DOM_COMPLETE="domComplete",e.DOM_CONTENT_LOADED_EVENT_END="domContentLoadedEventEnd",e.DOM_CONTENT_LOADED_EVENT_START="domContentLoadedEventStart",e.DOM_INTERACTIVE="domInteractive",e.DOMAIN_LOOKUP_END="domainLookupEnd",e.DOMAIN_LOOKUP_START="domainLookupStart",e.ENCODED_BODY_SIZE="encodedBodySize",e.FETCH_START="fetchStart",e.LOAD_EVENT_END="loadEventEnd",e.LOAD_EVENT_START="loadEventStart",e.NAVIGATION_START="navigationStart",e.REDIRECT_END="redirectEnd",e.REDIRECT_START="redirectStart",e.REQUEST_START="requestStart",e.RESPONSE_END="responseEnd",e.RESPONSE_START="responseStart",e.SECURE_CONNECTION_START="secureConnectionStart",e.UNLOAD_EVENT_END="unloadEventEnd",e.UNLOAD_EVENT_START="unloadEventStart"})(ne||(ne={}));var WT="http.response_content_length",PT="http.response_content_length_uncompressed",MT=WT,AT=PT,Hl;function UT(){return Hl||(Hl=document.createElement("a")),Hl}function rr(e,t){return t in e}function Ae(e,t,r,n){var i=void 0,s=void 0;rr(r,t)&&typeof r[t]=="number"&&(i=r[t]);var o=ne.FETCH_START;if(rr(r,o)&&typeof r[o]=="number"&&(s=r[o]),i!==void 0&&s!==void 0&&i>=s)return e.addEvent(t,i),e}function $r(e,t,r){r===void 0&&(r=!1),r||(Ae(e,ne.FETCH_START,t),Ae(e,ne.DOMAIN_LOOKUP_START,t),Ae(e,ne.DOMAIN_LOOKUP_END,t),Ae(e,ne.CONNECT_START,t),rr(t,"name")&&t.name.startsWith("https:")&&Ae(e,ne.SECURE_CONNECTION_START,t),Ae(e,ne.CONNECT_END,t),Ae(e,ne.REQUEST_START,t),Ae(e,ne.RESPONSE_START,t),Ae(e,ne.RESPONSE_END,t));var n=t[ne.ENCODED_BODY_SIZE];n!==void 0&&e.setAttribute(MT,n);var i=t[ne.DECODED_BODY_SIZE];i!==void 0&&n!==i&&e.setAttribute(AT,i)}function DT(e){return e.slice().sort(function(t,r){var n=t[ne.FETCH_START],i=r[ne.FETCH_START];return n>i?1:n<i?-1:0})}function Np(){return typeof location!="undefined"?location.origin:void 0}function Op(e,t,r,n,i,s){i===void 0&&(i=new WeakSet);var o=Mt(e);e=o.toString();var l=JT(e,t,r,n,i,s);if(l.length===0)return{mainRequest:void 0};if(l.length===1)return{mainRequest:l[0]};var u=DT(l);if(o.origin!==Np()&&u.length>1){var a=u[0],h=FT(u,a[ne.RESPONSE_END],r),c=a[ne.RESPONSE_END],f=h[ne.FETCH_START];return f<c&&(h=a,a=void 0),{corsPreFlightRequest:a,mainRequest:h}}else return{mainRequest:l[0]}}function FT(e,t,r){for(var n=Pt(r),i=Pt(kn(t)),s=e[1],o,l=e.length,u=1;u<l;u++){var a=e[u],h=Pt(kn(a[ne.FETCH_START])),c=Pt(kn(a[ne.RESPONSE_END])),f=n-c;h>=i&&(!o||f<o)&&(o=f,s=a)}return s}function JT(e,t,r,n,i,s){var o=Pt(t),l=Pt(r),u=n.filter(function(a){var h=Pt(kn(a[ne.FETCH_START])),c=Pt(kn(a[ne.RESPONSE_END]));return a.initiatorType.toLowerCase()===(s||"xmlhttprequest")&&a.name===e&&h>=o&&c<=l});return u.length>0&&(u=u.filter(function(a){return!i.has(a)})),u}function Mt(e){if(typeof URL=="function")return new URL(e,typeof document!="undefined"?document.baseURI:typeof location!="undefined"?location.href:void 0);var t=UT();return t.href=e,t}function Gp(e,t){if(e.nodeType===Node.DOCUMENT_NODE)return"/";var r=YT(e,t);if(t&&r.indexOf("@id")>0)return r;var n="";return e.parentNode&&(n+=Gp(e.parentNode,!1)),n+=r,n}function HT(e){if(!e.parentNode)return 0;var t=[e.nodeType];e.nodeType===Node.CDATA_SECTION_NODE&&t.push(Node.TEXT_NODE);var r=Array.from(e.parentNode.childNodes);return r=r.filter(function(n){var i=n.localName;return t.indexOf(n.nodeType)>=0&&i===e.localName}),r.length>=1?r.indexOf(e)+1:0}function YT(e,t){var r=e.nodeType,n=HT(e),i="";if(r===Node.ELEMENT_NODE){var s=e.getAttribute("id");if(t&&s)return'//*[@id="'+s+'"]';i=e.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 Vp(e,t){var r=t||[];(typeof r=="string"||r instanceof RegExp)&&(r=[r]);var n=Mt(e);return n.origin===Np()?!0:r.some(function(i){return cp(e,i)})}var Dn;(function(e){e.DOCUMENT_LOAD="documentLoad",e.DOCUMENT_FETCH="documentFetch",e.RESOURCE_FETCH="resourceFetch"})(Dn||(Dn={}));var BT="0.44.0",zT="@opentelemetry/instrumentation-document-load";const KT="http.method",jT="http.url",QT="http.status_code",$T="http.user_agent",qT=KT,qr=jT,eE=QT,tE=$T,Yl="exception.message",rE="exception.stacktrace",Bl="exception.type",kp="http.response.status_code",nE="server.address",iE="service.name",sE="service.version",Xp="telemetry.sdk.name",Wp="telemetry.sdk.version",nr="url.full",Ss="url.path",oE="url.query",aE="user_agent.original";var ws;(function(e){e.FIRST_PAINT="firstPaint",e.FIRST_CONTENTFUL_PAINT="firstContentfulPaint"})(ws||(ws={}));var lE=function(){var e,t,r={},n=(t=(e=ht).getEntriesByType)===null||t===void 0?void 0:t.call(e,"navigation")[0];if(n){var i=Object.values(ne);i.forEach(function(l){if(rr(n,l)){var u=n[l];typeof u=="number"&&(r[l]=u)}})}else{var s=ht,o=s.timing;if(o){var i=Object.values(ne);i.forEach(function(u){if(rr(o,u)){var a=o[u];typeof a=="number"&&(r[u]=a)}})}}return r},Pp={"first-paint":ws.FIRST_PAINT,"first-contentful-paint":ws.FIRST_CONTENTFUL_PAINT},uE=function(e){var t,r,n=(r=(t=ht).getEntriesByType)===null||r===void 0?void 0:r.call(t,"paint");n&&n.forEach(function(i){var s=i.name,o=i.startTime;rr(Pp,s)&&e.addEvent(Pp[s],o)})},cE=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),dE=function(e){cE(t,e);function t(r){r===void 0&&(r={});var n=e.call(this,zT,BT,r)||this;return n.component="document-load",n.version="1",n.moduleName=n.component,n}return t.prototype.init=function(){},t.prototype._onDocumentLoaded=function(){var r=this;window.setTimeout(function(){r._collectPerformance()})},t.prototype._addResourcesSpans=function(r){var n=this,i,s,o=(s=(i=ht).getEntriesByType)===null||s===void 0?void 0:s.call(i,"resource");o&&o.forEach(function(l){n._initResourceSpan(l,r)})},t.prototype._collectPerformance=function(){var r=this,n=Array.from(document.getElementsByTagName("meta")).find(function(o){return o.getAttribute("name")===ds}),i=lE(),s=n&&n.content||"";pe.with(dt.extract(yr,{traceparent:s}),function(){var o,l=r._startSpan(Dn.DOCUMENT_LOAD,ne.FETCH_START,i);l&&(pe.with(we.setSpan(pe.active(),l),function(){var u=r._startSpan(Dn.DOCUMENT_FETCH,ne.FETCH_START,i);u&&(u.setAttribute(qr,location.href),pe.with(we.setSpan(pe.active(),u),function(){var a;r.getConfig().ignoreNetworkEvents||$r(u,i),r._addCustomAttributesOnSpan(u,(a=r.getConfig().applyCustomAttributesOnSpan)===null||a===void 0?void 0:a.documentFetch),r._endSpan(u,ne.RESPONSE_END,i)}))}),l.setAttribute(qr,location.href),l.setAttribute(tE,navigator.userAgent),r._addResourcesSpans(l),r.getConfig().ignoreNetworkEvents||(Ae(l,ne.FETCH_START,i),Ae(l,ne.UNLOAD_EVENT_START,i),Ae(l,ne.UNLOAD_EVENT_END,i),Ae(l,ne.DOM_INTERACTIVE,i),Ae(l,ne.DOM_CONTENT_LOADED_EVENT_START,i),Ae(l,ne.DOM_CONTENT_LOADED_EVENT_END,i),Ae(l,ne.DOM_COMPLETE,i),Ae(l,ne.LOAD_EVENT_START,i),Ae(l,ne.LOAD_EVENT_END,i)),r.getConfig().ignorePerformancePaintEvents||uE(l),r._addCustomAttributesOnSpan(l,(o=r.getConfig().applyCustomAttributesOnSpan)===null||o===void 0?void 0:o.documentLoad),r._endSpan(l,ne.LOAD_EVENT_END,i))})},t.prototype._endSpan=function(r,n,i){r&&(rr(i,n)?r.end(i[n]):r.end())},t.prototype._initResourceSpan=function(r,n){var i,s=this._startSpan(Dn.RESOURCE_FETCH,ne.FETCH_START,r,n);s&&(s.setAttribute(qr,r.name),this.getConfig().ignoreNetworkEvents||$r(s,r),this._addCustomAttributesOnResourceSpan(s,r,(i=this.getConfig().applyCustomAttributesOnSpan)===null||i===void 0?void 0:i.resourceFetch),this._endSpan(s,ne.RESPONSE_END,r))},t.prototype._startSpan=function(r,n,i,s){if(rr(i,n)&&typeof i[n]=="number"){var o=this.tracer.startSpan(r,{startTime:i[n]},s?we.setSpan(pe.active(),s):void 0);return o}},t.prototype._waitForPageLoad=function(){window.document.readyState==="complete"?this._onDocumentLoaded():(this._onDocumentLoaded=this._onDocumentLoaded.bind(this),window.addEventListener("load",this._onDocumentLoaded))},t.prototype._addCustomAttributesOnSpan=function(r,n){var i=this;n&&gs(function(){return n(r)},function(s){s&&i._diag.error("addCustomAttributesOnSpan",s)})},t.prototype._addCustomAttributesOnResourceSpan=function(r,n,i){var s=this;i&&gs(function(){return i(r,n)},function(o){o&&s._diag.error("addCustomAttributesOnResourceSpan",o)})},t.prototype.enable=function(){window.removeEventListener("load",this._onDocumentLoaded),this._waitForPageLoad()},t.prototype.disable=function(){window.removeEventListener("load",this._onDocumentLoaded)},t}(An),Rs;(function(e){e.COMPONENT="component",e.HTTP_ERROR_NAME="http.error_name",e.HTTP_STATUS_TEXT="http.status_text"})(Rs||(Rs={}));var hE="http.method",fE="http.url",pE="http.host",mE="http.scheme",gE="http.status_code",yE="http.user_agent",bE="http.request_content_length_uncompressed",vE=hE,SE=fE,wE=pE,RE=mE,_E=gE,TE=yE,EE=bE,IE=function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function l(h){try{a(n.next(h))}catch(c){o(c)}}function u(h){try{a(n.throw(h))}catch(c){o(c)}}function a(h){h.done?s(h.value):i(h.value).then(l,u)}a((n=n.apply(e,t||[])).next())})},CE=function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function l(a){return function(h){return u([a,h])}}function u(a){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(s=a[0]&2?i.return:a[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,a[1])).done)return s;switch(i=0,s&&(a=[a[0]&2,s.value]),a[0]){case 0:case 1:s=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){r.label=a[1];break}if(a[0]===6&&r.label<s[1]){r.label=s[1],s=a;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(a);break}s[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(h){a=[6,h],i=0}finally{n=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},ZE=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},LE=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},Mp=Y.createComponentLogger({namespace:"@opentelemetry/opentelemetry-instrumentation-fetch/utils"});function xE(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(e[0]instanceof URL||typeof e[0]=="string"){var r=e[1];if(!(r!=null&&r.body))return Promise.resolve();if(r.body instanceof ReadableStream){var n=NE(r.body),i=n.body,s=n.length;return r.body=i,s}else return Promise.resolve(OE(r.body))}else{var o=e[0];return o!=null&&o.body?o.clone().text().then(function(l){return zl(l)}):Promise.resolve()}}function NE(e){if(!e.pipeThrough)return Mp.warn("Platform has ReadableStream but not pipeThrough!"),{body:e,length:Promise.resolve(void 0)};var t=0,r,n=new Promise(function(s){r=s}),i=new TransformStream({start:function(){},transform:function(s,o){return IE(this,void 0,void 0,function(){var l;return CE(this,function(u){switch(u.label){case 0:return[4,s];case 1:return l=u.sent(),t+=l.byteLength,o.enqueue(s),[2]}})})},flush:function(){r(t)}});return{body:e.pipeThrough(i),length:n}}function OE(e){if(typeof Document!="undefined"&&e instanceof Document)return new XMLSerializer().serializeToString(document).length;if(e instanceof Blob)return e.size;if(e.byteLength!==void 0)return e.byteLength;if(e instanceof FormData)return VE(e);if(e instanceof URLSearchParams)return zl(e.toString());if(typeof e=="string")return zl(e);Mp.warn("unknown body type")}var GE=new TextEncoder;function zl(e){return GE.encode(e).byteLength}function VE(e){var t,r,n=0;try{for(var i=ZE(e.entries()),s=i.next();!s.done;s=i.next()){var o=LE(s.value,2),l=o[0],u=o[1];n+=l.length,u instanceof Blob?n+=u.size:n+=u.length}}catch(a){t={error:a}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return n}var Ap="0.57.2",kE=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),XE=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},WE=function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,s;n<i;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))},Kl,PE=300,Up=typeof process=="object"&&((Kl=process.release)===null||Kl===void 0?void 0:Kl.name)==="node",ME=function(e){kE(t,e);function t(r){r===void 0&&(r={});var n=e.call(this,"@opentelemetry/instrumentation-fetch",Ap,r)||this;return n.component="fetch",n.version=Ap,n.moduleName=n.component,n._usedResources=new WeakSet,n._tasksCount=0,n}return t.prototype.init=function(){},t.prototype._addChildSpan=function(r,n){var i=this.tracer.startSpan("CORS Preflight",{startTime:n[ne.FETCH_START]},we.setSpan(pe.active(),r));$r(i,n,this.getConfig().ignoreNetworkEvents),i.end(n[ne.RESPONSE_END])},t.prototype._addFinalSpanAttributes=function(r,n){var i=Mt(n.url);r.setAttribute(_E,n.status),n.statusText!=null&&r.setAttribute(Rs.HTTP_STATUS_TEXT,n.statusText),r.setAttribute(wE,i.host),r.setAttribute(RE,i.protocol.replace(":","")),typeof navigator!="undefined"&&r.setAttribute(TE,navigator.userAgent)},t.prototype._addHeaders=function(r,n){if(!Vp(n,this.getConfig().propagateTraceHeaderCorsUrls)){var i={};dt.inject(pe.active(),i),Object.keys(i).length>0&&this._diag.debug("headers inject skipped due to CORS policy");return}if(r instanceof Request)dt.inject(pe.active(),r.headers,{set:function(s,o,l){return s.set(o,typeof l=="string"?l:String(l))}});else if(r.headers instanceof Headers)dt.inject(pe.active(),r.headers,{set:function(s,o,l){return s.set(o,typeof l=="string"?l:String(l))}});else if(r.headers instanceof Map)dt.inject(pe.active(),r.headers,{set:function(s,o,l){return s.set(o,typeof l=="string"?l:String(l))}});else{var i={};dt.inject(pe.active(),i),r.headers=Object.assign({},i,r.headers||{})}},t.prototype._clearResources=function(){this._tasksCount===0&&this.getConfig().clearTimingResources&&(performance.clearResourceTimings(),this._usedResources=new WeakSet)},t.prototype._createSpan=function(r,n){var i;if(n===void 0&&(n={}),dp(r,this.getConfig().ignoreUrls)){this._diag.debug("ignoring span as url matches ignored url");return}var s=(n.method||"GET").toUpperCase(),o="HTTP "+s;return this.tracer.startSpan(o,{kind:Gn.CLIENT,attributes:(i={},i[Rs.COMPONENT]=this.moduleName,i[vE]=s,i[SE]=r,i)})},t.prototype._findResourceAndAddNetworkEvents=function(r,n,i){var s=n.entries;if(!s.length){if(!performance.getEntriesByType)return;s=performance.getEntriesByType("resource")}var o=Op(n.spanUrl,n.startTime,i,s,this._usedResources,"fetch");if(o.mainRequest){var l=o.mainRequest;this._markResourceAsUsed(l);var u=o.corsPreFlightRequest;u&&(this._addChildSpan(r,u),this._markResourceAsUsed(u)),$r(r,l,this.getConfig().ignoreNetworkEvents)}},t.prototype._markResourceAsUsed=function(r){this._usedResources.add(r)},t.prototype._endSpan=function(r,n,i){var s=this,o=ft(Date.now()),l=vr();this._addFinalSpanAttributes(r,i),setTimeout(function(){var u;(u=n.observer)===null||u===void 0||u.disconnect(),s._findResourceAndAddNetworkEvents(r,n,l),s._tasksCount--,s._clearResources(),r.end(o)},PE)},t.prototype._patchConstructor=function(){var r=this;return function(n){var i=r;return function(){for(var o=[],l=0;l<arguments.length;l++)o[l]=arguments[l];var u=this,a=Mt(o[0]instanceof Request?o[0].url:String(o[0])).href,h=o[0]instanceof Request?o[0]:o[1]||{},c=i._createSpan(a,h);if(!c)return n.apply(this,o);var f=i._prepareSpanData(a);i.getConfig().measureRequestSize&&xE.apply(void 0,WE([],XE(o),!1)).then(function(v){v&&c.setAttribute(EE,v)}).catch(function(v){i._diag.warn("getFetchBodyLength",v)});function d(v,y){i._applyAttributesAfterFetch(v,h,y),i._endSpan(v,f,{status:y.status||0,statusText:y.message,url:a})}function p(v,y){i._applyAttributesAfterFetch(v,h,y),y.status>=200&&y.status<400?i._endSpan(v,f,y):i._endSpan(v,f,{status:y.status,statusText:y.statusText,url:a})}function m(v,y,w){try{var _=w.clone(),S=w.clone(),b=_.body;if(b){var R=b.getReader(),I=function(){R.read().then(function(E){var C=E.done;C?p(v,S):I()},function(E){d(v,E)})};I()}else p(v,w)}finally{y(w)}}function g(v,y,w){try{d(v,w)}finally{y(w)}}return new Promise(function(v,y){return pe.with(we.setSpan(pe.active(),c),function(){return i._addHeaders(h,a),i._tasksCount++,n.apply(u,h instanceof Request?[h]:[a,h]).then(m.bind(u,c,v),g.bind(u,c,y))})})}}},t.prototype._applyAttributesAfterFetch=function(r,n,i){var s=this,o=this.getConfig().applyCustomAttributesOnSpan;o&&gs(function(){return o(r,n,i)},function(l){l&&s._diag.error("applyCustomAttributesOnSpan",l)})},t.prototype._prepareSpanData=function(r){var n=vr(),i=[];if(typeof PerformanceObserver!="function")return{entries:i,startTime:n,spanUrl:r};var s=new PerformanceObserver(function(o){var l=o.getEntries();l.forEach(function(u){u.initiatorType==="fetch"&&u.name===r&&i.push(u)})});return s.observe({entryTypes:["resource"]}),{entries:i,observer:s,startTime:n,spanUrl:r}},t.prototype.enable=function(){if(Up){this._diag.warn("this instrumentation is intended for web usage only, it does not instrument Node.js's fetch()");return}Me(fetch)&&(this._unwrap(Vn,"fetch"),this._diag.debug("removing previous patch for constructor")),this._wrap(Vn,"fetch",this._patchConstructor())},t.prototype.disable=function(){Up||(this._unwrap(Vn,"fetch"),this._usedResources=new WeakSet)},t}(An),AE="http.method",UE="http.url",DE="http.host",FE="http.scheme",JE="http.status_code",HE="http.user_agent",YE="http.request_content_length_uncompressed",BE=AE,zE=UE,KE=DE,jE=FE,QE=JE,$E=HE,qE=YE,At;(function(e){e.METHOD_OPEN="open",e.METHOD_SEND="send",e.EVENT_ABORT="abort",e.EVENT_ERROR="error",e.EVENT_LOAD="loaded",e.EVENT_TIMEOUT="timeout"})(At||(At={}));var eI=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},tI=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},rI=Y.createComponentLogger({namespace:"@opentelemetry/opentelemetry-instrumentation-xml-http-request/utils"});function nI(e){if(typeof Document!="undefined"&&e instanceof Document)return new XMLSerializer().serializeToString(document).length;if(e instanceof Blob)return e.size;if(e.byteLength!==void 0)return e.byteLength;if(e instanceof FormData)return sI(e);if(e instanceof URLSearchParams)return Dp(e.toString());if(typeof e=="string")return Dp(e);rI.warn("unknown body type")}var iI=new TextEncoder;function Dp(e){return iI.encode(e).byteLength}function sI(e){var t,r,n=0;try{for(var i=eI(e.entries()),s=i.next();!s.done;s=i.next()){var o=tI(s.value,2),l=o[0],u=o[1];n+=l.length,u instanceof Blob?n+=u.size:n+=u.length}}catch(a){t={error:a}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return n}var Fp="0.57.2",jl;(function(e){e.HTTP_STATUS_TEXT="http.status_text"})(jl||(jl={}));var oI=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),aI=300,lI=function(e){oI(t,e);function t(r){r===void 0&&(r={});var n=e.call(this,"@opentelemetry/instrumentation-xml-http-request",Fp,r)||this;return n.component="xml-http-request",n.version=Fp,n.moduleName=n.component,n._tasksCount=0,n._xhrMem=new WeakMap,n._usedResources=new WeakSet,n}return t.prototype.init=function(){},t.prototype._addHeaders=function(r,n){var i=Mt(n).href;if(!Vp(i,this.getConfig().propagateTraceHeaderCorsUrls)){var s={};dt.inject(pe.active(),s),Object.keys(s).length>0&&this._diag.debug("headers inject skipped due to CORS policy");return}var o={};dt.inject(pe.active(),o),Object.keys(o).forEach(function(l){r.setRequestHeader(l,String(o[l]))})},t.prototype._addChildSpan=function(r,n){var i=this;pe.with(we.setSpan(pe.active(),r),function(){var s=i.tracer.startSpan("CORS Preflight",{startTime:n[ne.FETCH_START]});$r(s,n,i.getConfig().ignoreNetworkEvents),s.end(n[ne.RESPONSE_END])})},t.prototype._addFinalSpanAttributes=function(r,n,i){if(typeof i=="string"){var s=Mt(i);n.status!==void 0&&r.setAttribute(QE,n.status),n.statusText!==void 0&&r.setAttribute(jl.HTTP_STATUS_TEXT,n.statusText),r.setAttribute(KE,s.host),r.setAttribute(jE,s.protocol.replace(":","")),r.setAttribute($E,navigator.userAgent)}},t.prototype._applyAttributesAfterXHR=function(r,n){var i=this,s=this.getConfig().applyCustomAttributesOnSpan;typeof s=="function"&&gs(function(){return s(r,n)},function(o){o&&i._diag.error("applyCustomAttributesOnSpan",o)})},t.prototype._addResourceObserver=function(r,n){var i=this._xhrMem.get(r);!i||typeof PerformanceObserver!="function"||typeof PerformanceResourceTiming!="function"||(i.createdResources={observer:new PerformanceObserver(function(s){var o=s.getEntries(),l=Mt(n);o.forEach(function(u){u.initiatorType==="xmlhttprequest"&&u.name===l.href&&i.createdResources&&i.createdResources.entries.push(u)})}),entries:[]},i.createdResources.observer.observe({entryTypes:["resource"]}))},t.prototype._clearResources=function(){this._tasksCount===0&&this.getConfig().clearTimingResources&&(ht.clearResourceTimings(),this._xhrMem=new WeakMap,this._usedResources=new WeakSet)},t.prototype._findResourceAndAddNetworkEvents=function(r,n,i,s,o){if(!(!i||!s||!o||!r.createdResources)){var l=r.createdResources.entries;(!l||!l.length)&&(l=ht.getEntriesByType("resource"));var u=Op(Mt(i).href,s,o,l,this._usedResources);if(u.mainRequest){var a=u.mainRequest;this._markResourceAsUsed(a);var h=u.corsPreFlightRequest;h&&(this._addChildSpan(n,h),this._markResourceAsUsed(h)),$r(n,a,this.getConfig().ignoreNetworkEvents)}}},t.prototype._cleanPreviousSpanInformation=function(r){var n=this._xhrMem.get(r);if(n){var i=n.callbackToRemoveEvents;i&&i(),this._xhrMem.delete(r)}},t.prototype._createSpan=function(r,n,i){var s;if(dp(n,this.getConfig().ignoreUrls)){this._diag.debug("ignoring span as url matches ignored url");return}var o=i.toUpperCase(),l=this.tracer.startSpan(o,{kind:Gn.CLIENT,attributes:(s={},s[BE]=i,s[zE]=Mt(n).toString(),s)});return l.addEvent(At.METHOD_OPEN),this._cleanPreviousSpanInformation(r),this._xhrMem.set(r,{span:l,spanUrl:n}),l},t.prototype._markResourceAsUsed=function(r){this._usedResources.add(r)},t.prototype._patchOpen=function(){var r=this;return function(n){var i=r;return function(){for(var o=[],l=0;l<arguments.length;l++)o[l]=arguments[l];var u=o[0],a=o[1];return i._createSpan(this,a,u),n.apply(this,o)}}},t.prototype._patchSend=function(){var r=this;function n(h,c,f,d){var p=c.callbackToRemoveEvents;typeof p=="function"&&p();var m=c.span,g=c.spanUrl,v=c.sendStartTime;m&&(r._findResourceAndAddNetworkEvents(c,m,g,v,f),m.addEvent(h,d),r._addFinalSpanAttributes(m,c,g),m.end(d),r._tasksCount--),r._clearResources()}function i(h,c){var f=r._xhrMem.get(c);if(f){f.status=c.status,f.statusText=c.statusText,r._xhrMem.delete(c),f.span&&r._applyAttributesAfterXHR(f.span,c);var d=vr(),p=Date.now();setTimeout(function(){n(h,f,d,p)},aI)}}function s(){i(At.EVENT_ERROR,this)}function o(){i(At.EVENT_ABORT,this)}function l(){i(At.EVENT_TIMEOUT,this)}function u(){this.status<299?i(At.EVENT_LOAD,this):i(At.EVENT_ERROR,this)}function a(h){h.removeEventListener("abort",o),h.removeEventListener("error",s),h.removeEventListener("load",u),h.removeEventListener("timeout",l);var c=r._xhrMem.get(h);c&&(c.callbackToRemoveEvents=void 0)}return function(h){return function(){for(var f=this,d=[],p=0;p<arguments.length;p++)d[p]=arguments[p];var m=r._xhrMem.get(this);if(!m)return h.apply(this,d);var g=m.span,v=m.spanUrl;if(g&&v){if(r.getConfig().measureRequestSize&&(d!=null&&d[0])){var y=d[0],w=nI(y);w!==void 0&&g.setAttribute(qE,w)}pe.with(we.setSpan(pe.active(),g),function(){r._tasksCount++,m.sendStartTime=vr(),g.addEvent(At.METHOD_SEND),f.addEventListener("abort",o),f.addEventListener("error",s),f.addEventListener("load",u),f.addEventListener("timeout",l),m.callbackToRemoveEvents=function(){a(f),m.createdResources&&m.createdResources.observer.disconnect()},r._addHeaders(f,v),r._addResourceObserver(f,v)})}return h.apply(this,d)}}},t.prototype.enable=function(){this._diag.debug("applying patch to",this.moduleName,this.version),Me(XMLHttpRequest.prototype.open)&&(this._unwrap(XMLHttpRequest.prototype,"open"),this._diag.debug("removing previous patch from method open")),Me(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())},t.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},t}(An);const Ql=/\b(query|mutation|subscription)\b\s*([A-Za-z_]\w*)?/g;function uI(e){var a;const t=dI(e);if(t===null||typeof t!="object")return null;const r=Array.isArray(t)?t[0]:t;if(!r||typeof r!="object")return null;const n=r,i=typeof n.query=="string"?n.query:void 0,s=typeof n.operationName=="string"?n.operationName:void 0;if(i===void 0&&s===void 0)return null;const o=i?cI(i,s):null,l=(a=o==null?void 0:o[1])!=null?a:hI(i),u=s!=null?s:o==null?void 0:o[2];return u===void 0&&l===void 0?null:{name:u,type:l}}function cI(e,t){Ql.lastIndex=0;let r=null;for(let n=Ql.exec(e);n!==null;n=Ql.exec(e)){if(t===void 0||n[2]===t)return n;r===null&&(r=n)}return r}function dI(e){if(e==null)return null;if(typeof e=="object")return e;if(typeof e!="string")return null;try{return JSON.parse(e)}catch(t){return null}}function hI(e){if(e!==void 0&&/^\s*\{/.test(e))return"query"}const fI=0,Jp=2e3;class pI{constructor(t=fI,r=Jp){this.lastRecordedAt=new Map,this.windowMillis=t,this.maxSize=r>0?r:Jp}shouldRecord(t,r=Date.now()){if(this.windowMillis<=0)return!0;const n=this.lastRecordedAt.get(t);return n===void 0||n<=r-this.windowMillis}markRecorded(t,r=Date.now()){if(!(this.windowMillis<=0))for(this.lastRecordedAt.delete(t),this.lastRecordedAt.set(t,r);this.lastRecordedAt.size>this.maxSize;){const n=this.lastRecordedAt.keys().next().value;if(n===void 0)break;this.lastRecordedAt.delete(n)}}reset(){this.lastRecordedAt.clear()}}const _s=1e3,Hp=1e3*2,Yp=4*60*60*1e3,$l=15*60*1e3,Ts={normal:{bytes:1e7,time:4*60*1e3},canvas:{bytes:16e6,time:5e3}},Bp=100,Fn="app.highlight.io",zp="https://app.launchdarkly.com",mI={"observability.ld-stg.launchdarkly.com":"ld-stg.launchdarkly.com","observability.app.launchdarkly.com":"app.launchdarkly.com","observability.app.ld.catamorphic.com":"app.ld.catamorphic.com"},gI="/projects/default",yI=new RegExp("pub\\.(?<domain>.+)");/*! js-cookie v3.0.8 | MIT */function Es(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)n!=="__proto__"&&(e[n]=r[n])}return e}var bI={read:function(e){return e[0]==='"'&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function ql(e,t){function r(i,s,o){if(typeof document!="undefined"){o=Es({},t,o),typeof o.expires=="number"&&(o.expires=new Date(Date.now()+o.expires*864e5)),o.expires&&(o.expires=o.expires.toUTCString()),i=encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var l="";for(var u in o)o[u]&&(l+="; "+u,o[u]!==!0&&(l+="="+o[u].split(";")[0]));return document.cookie=i+"="+e.write(s,i)+l}}function n(i){if(!(typeof document=="undefined"||arguments.length&&!i)){for(var s=document.cookie?document.cookie.split("; "):[],o={},l=0;l<s.length;l++){var u=s[l].split("="),a=u.slice(1).join("=");try{var h=decodeURIComponent(u[0]);if(h in o||(o[h]=e.read(a,h)),i===h)break}catch(c){}}return i?o[i]:o}}return Object.create({set:r,get:n,remove:function(i,s){r(i,"",Es({},s,{expires:-1}))},withAttributes:function(i){return ql(this.converter,Es({},this.attributes,i))},withConverter:function(i){return ql(Es({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var Is=ql(bI,{path:"/"});const Kp=Object.create(null),He=(e,t,...r)=>{const n=`[@launchdarkly plugins]: (${e}): `;_e(t,n,...r)},Ut=(e,t,r,...n)=>{Kp[`${e}-${t}`]||(Kp[`${e}-${t}`]=!0,He(e,r,...n))};var Jn=(e=>(e.CLIENT_ID="highlightClientID",e))(Jn||{});let Cs="localStorage",eu=!0;class vI{constructor(){L(this,"storage",{})}get length(){return Object.keys(this.storage).length}key(t){var n;return(n=Object.keys(this.storage)[t])!=null?n:null}getItem(t){var r;return(r=this.storage[t])!=null?r:""}setItem(t,r){this.storage[t]=r}removeItem(t){delete this.storage[t]}}class SI{getItem(t){var r;return(r=Is.get(t))!=null?r:""}setItem(t,r){if(!eu)return;const n=new Date;n.setTime(n.getTime()+$l),Is.set(t,r,{expires:n})}removeItem(t){eu&&Is.remove(t)}keys(){var t;return Object.keys((t=Is.get())!=null?t:{})}}const en=new vI,tn=new SI,Zs=()=>{let e=null;if(typeof window=="undefined")return en;try{switch(Cs){case"localStorage":e=window.localStorage;break;case"sessionStorage":e=window.sessionStorage;break}e||(Ut("storage","getPersistentStorage","debug",`persistent storage was not found for mode ${Cs}; using global storage`),e=en)}catch(t){Ut("storage","getPersistentStorage","debug","failed to get persistent storage; using global storage",t),e=en}return e},jp=e=>{Cs=e},Ls=e=>{eu=e},Ye=e=>{try{return Zs().getItem(e)}catch(t){return Ut("storage","getItem","debug",`failed to get item ${e}; using global storage`,t),en.getItem(e)}},pt=(e,t)=>{tn.setItem(e,t);try{return Zs().setItem(e,t)}catch(r){return Ut("storage","setItem","debug",`failed to set item ${e}; using global storage`,r),en.setItem(e,t)}},rn=e=>{tn.removeItem(e);try{return Zs().removeItem(e)}catch(t){return Ut("storage","removeItem","debug",`failed to remove item ${e}; using global storage`,t),en.removeItem(e)}},wI=e=>{if(Cs==="sessionStorage"){Ut("segment","sessionStorage","warn","highlight.io cannot use local storage; segment integration will not work");return}if(typeof window=="undefined"){Ut("segment","no-window","warn","highlight.io cannot use local storage (not a window); segment integration will not work");return}const t=window.localStorage.setItem;window.localStorage.setItem=function(){const[r,n]=arguments;e({keyName:r,keyValue:n}),t.apply(this,[r,n])}};var Ge=(e=>(e.SEGMENT_LAST_SENT_HASH_KEY="HIGHLIGHT_SEGMENT_LAST_SENT_HASH_KEY",e.SESSION_ID="sessionID",e.SESSION_DATA="sessionData",e.USER_IDENTIFIER="highlightIdentifier",e.USER_OBJECT="highlightUserObject",e))(Ge||{});const xs=e=>`${Ge.SESSION_DATA}_${e}`,Dt=()=>{var e;return typeof globalThis!="undefined"&&((e=globalThis.persistentSessionSecureID)!=null&&e.length)?globalThis.persistentSessionSecureID:Qp()},RI=e=>{typeof globalThis!="undefined"&&(e!=null&&e.length)&&(globalThis.persistentSessionSecureID=e)},Qp=()=>{var e;return(e=Ye(Ge.SESSION_ID))!=null?e:""},ir=e=>{pt(Ge.SESSION_ID,e)},_I=e=>{const t=xs(e);return JSON.parse(Ye(t)||"{}")},Ft=e=>{e||(e=Qp());let t=_I(e);if(t&&t.lastPushTime&&Date.now()-t.lastPushTime<$l)return t;rn(xs(e))},mt=function(e){if(!(e!=null&&e.sessionSecureID))return;const t=e.sessionSecureID;RI(t);const r=xs(t);pt(r,JSON.stringify(e)),TI(r)},$p=function(){const e=tn.getItem(Ge.SESSION_ID);ir(e);const t=xs(e),r=tn.getItem(t);try{mt(JSON.parse(r))}catch(n){}};function TI(e){var i;const t=`${Ge.SESSION_DATA}_`,r=new Set,n=Zs();for(let s=n.length-1;s>=0;s--){const o=n.key(s);o&&o.startsWith(t)&&o!==e&&r.add(o)}for(const s of tn.keys())s.startsWith(t)&&s!==e&&r.add(s);for(const s of r){let o=!0;try{const l=Ye(s)||tn.getItem(s)||"{}",u=JSON.parse(l),a=(i=u.lastPushTime)!=null?i:u.sessionStartTime;o=a===void 0||Date.now()-a>=$l}catch(l){}o&&(Ut("highlightSession","pruneSessionData","debug",`removing session data for stale key ${s}`),rn(s))}}const EI=new RegExp("sdk\\/evalx\\/[^/]+\\/contexts\\/(?<context>[^/?]*)\\??.*?"),II=new RegExp("\\/eval\\/[^/]+\\/(?<context>[^/?]*)\\??.*?");function CI(e){return!!(e.includes("/sdk/evalx")&&e.match(EI)||e.includes("/eval/")&&e.match(II))}const qp="X-Highlight-Request",em=e=>{let t=e;return!e.startsWith("https://")&&!e.startsWith("http://")&&(t=`${window.location.origin}${t}`),t.replace(/\/+$/,"")},ZI=(e,{headersToRedact:t,headersToRecord:r,requestResponseSanitizer:n})=>{var u,a;let i=e;if(n){let c=!0;try{i.request.body=JSON.parse(i.request.body)}catch(d){c=!1}let f=!0;try{i.response.body=JSON.parse(i.response.body)}catch(d){f=!1}try{i=n(i)}catch(d){}finally{c=c&&!!((u=i==null?void 0:i.request)!=null&&u.body),f=f&&!!((a=i==null?void 0:i.response)!=null&&a.body),c&&(i.request.body=JSON.stringify(i.request.body)),f&&(i.response.body=JSON.stringify(i.response.body))}if(!i)return null}const h=i,{request:s,response:o}=h,l=nt(h,["request","response"]);return x({request:Rf(s,t,r),response:Rf(o,t,r)},l)},tm=(e,t,r,n)=>{e.sort((u,a)=>u.responseEnd-a.responseEnd);const i={xmlhttprequest:{},others:{},fetch:{}},s=e.reduce((u,a)=>{const h=em(a.name);return a.initiatorType===r?u[r][h]=[...u[r][h]||[],a]:u.others[h]=[...u.others[h]||[],a],u},i);let o={};o=t.reduce((u,a)=>{const h=em(a.request.url);return u[h]=[...u[h]||[],a],u},o);for(let u in s[r]){const a=s[r][u],h=o[u];if(!h)continue;const c=Math.max(a.length-h.length,0);for(let f=c;f<a.length;f++)a[f]&&(a[f].requestResponsePair=h[f-c])}let l=[];for(let u in s)for(let a in s[u])l=l.concat(s[u][a]);return l.sort((u,a)=>u.fetchStart-a.fetchStart).reduce((u,a)=>{let h=a.requestResponsePair;return h&&(h=ZI(a.requestResponsePair,n),!h)||(a.toJSON=function(){const c=window.performance.timeOrigin;return{initiatorType:this.initiatorType,startTimeAbs:c+this.startTime,connectStartAbs:c+this.connectStart,connectEndAbs:c+this.connectEnd,domainLookupStartAbs:c+this.domainLookupStart,domainLookupEndAbs:c+this.domainLookupEnd,fetchStartAbs:c+this.fetchStart,redirectStartAbs:c+this.redirectStart,redirectEndAbs:c+this.redirectEnd,requestStartAbs:c+this.requestStart,responseStartAbs:c+this.responseStart,responseEndAbs:c+this.responseEnd,secureConnectionStartAbs:c+this.secureConnectionStart,workerStartAbs:c+this.workerStart,name:this.name,transferSize:this.transferSize,encodedBodySize:this.encodedBodySize,decodedBodySize:this.decodedBodySize,nextHopProtocol:this.nextHopProtocol,requestResponsePairs:h}},u.push(a)),u},[])},LI=e=>["events.ld.catamorphic.com","events.launchdarkly.com"].some(t=>e.toLocaleLowerCase().includes(t)),xI=e=>CI(e),NI=(e,t)=>t.some(r=>e.toLocaleLowerCase().includes(r)),Ns=(e,t,r)=>!NI(e,t)&&!xI(e)&&!LI(e),tu=(e,t,r)=>{var o;if(r.some(l=>e.toLowerCase().includes(l)))return!1;let n=[];t===!0?(n=["localhost",/^\//],(o=window==null?void 0:window.location)!=null&&o.host&&n.push(rm(window.location.host))):t instanceof Array&&(n=t);const i=GI(e);let s=!1;return n.forEach(l=>{i.match(l)&&(s=!0)}),s},OI=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),rm=e=>new RegExp("^https?://([^/]+\\.)?"+OI(e)+"([:/?#]|$)"),GI=e=>{if(e.startsWith("/")&&!e.startsWith("//"))return e;try{return new URL(e).origin}catch(t){return e}};function VI(e){for(var t="",r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n=r.length,i=0;i<e;i++)t+=r.charAt(Math.floor(Math.random()*n));return t}const ru=()=>{const e=VI(10),t=Ex(),r=t==null?void 0:t.spanContext().traceId;return[Dt(),r!=null?r:e]},nm=(e,t)=>e+"/"+t,kI=(e,t,r,n,i,s)=>{const o=XMLHttpRequest.prototype,l=o.open,u=o.send,a=o.setRequestHeader;return o.open=function(h,c){return typeof c=="string"?this._url=c:this._url=c.toString(),this._method=h,this._requestHeaders={},this._shouldRecordHeaderAndBody=!n.some(f=>this._url.toLowerCase().includes(f)),l.apply(this,arguments)},o.setRequestHeader=function(h,c){return this._requestHeaders[h]=c,a.apply(this,arguments)},o.send=function(h){if(!Ns(this._url,t))return u.apply(this,arguments);const[c,f]=ru();tu(this._url,r,n)&&this.setRequestHeader(qp,nm(c,f));const d=this._shouldRecordHeaderAndBody,p={sessionSecureID:c,id:f,url:this._url,verb:this._method,headers:d?this._requestHeaders:{},body:void 0};if(d&&h){const m=nu(h,p.url);m&&(this._body=m,p.body=xt(m,i,s,p.headers))}return this.addEventListener("load",function(){return q(this,null,function*(){const m={status:this.status,headers:{},body:void 0};if(d){const y=this.getAllResponseHeaders().trim().split(/[\r\n]+/),w={};if(y.forEach(function(_){const S=_.split(": "),b=S.shift();w[b]=S.join(": ")}),m.headers=w,h){const _=nu(h,p.url);_&&(p.body=xt(_,i,s,m.headers))}if(this.responseType===""||this.responseType==="text")m.body=xt(this.responseText,i,s,m.headers),m.size=this.responseText.length*8;else if(this.responseType==="blob"){if(this.response instanceof Blob)try{const _=yield this.response.text();m.body=xt(_,i,s,m.headers),m.size=this.response.size}catch(_){}}else try{m.body=xt(this.response,i,s,m.headers)}catch(_){}}e({request:p,response:m,urlBlocked:!d})})}),this.addEventListener("error",function(){return q(this,null,function*(){const m={status:this.status,headers:void 0,body:void 0};e({request:p,response:m,urlBlocked:!1})})}),u.apply(this,arguments)},()=>{o.open=l,o.send=u,o.setRequestHeader=a}},XI=/^\[object (ArrayBuffer|SharedArrayBuffer|DataView|(?:Ui|I)nt(?:8|16|32)Array|Uint8ClampedArray|Float(?:16|32|64)Array|Big(?:Ui|I)nt64Array|Blob|File|FormData|URLSearchParams|ReadableStream)\]$/,WI=e=>typeof e=="object"&&e!==null&&XI.test(Object.prototype.toString.call(e)),PI=e=>{var r,n;return typeof Blob!="undefined"&&e instanceof Blob?`[Blob type="${e.type}" size=${e.size}]`:typeof FormData!="undefined"&&e instanceof FormData?"[FormData]":typeof URLSearchParams!="undefined"&&e instanceof URLSearchParams?e.toString().slice(0,iu):`[binary size=${(n=(r=e==null?void 0:e.byteLength)!=null?r:e==null?void 0:e.size)!=null?n:0}]`},nu=(e,t)=>{if(WI(e))return PI(e);if(typeof e=="string"){if(!((t!=null&&t.includes("localhost")||t!=null&&t.includes("highlight.run"))&&(e.includes("pushPayload")||e.includes("pushSessionEvents"))))return e}else if(typeof e=="object"||typeof e=="number"||typeof e=="boolean")return Rt(e);return null},iu=64*1024,MI={"application/json":256*1024,"text/plain":256*1024},im=(e,t)=>`[body omitted: ${e} bytes exceeds the ${t} byte limit]`,su=e=>{var r,n;if(!e)return iu;let t="";if(typeof e.get=="function")t=(r=e.get("content-type"))!=null?r:"";else{const i=e,s=Object.keys(i).find(o=>o.toLowerCase()==="content-type");t=s&&i[s]||""}try{t=t.split(";")[0].trim()}catch(i){}return(n=MI[t])!=null?n:iu},sm=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),xt=(e,t,r,n)=>{const i=su(n);if(typeof e=="string"&&e.length>i)return im(e.length,i);if(e){if(t)try{const s=JSON.parse(e);Array.isArray(s)?s.forEach(o=>{sm(o)&&Object.keys(o).forEach(l=>{t.includes(l.toLocaleLowerCase())&&(o[l]="[REDACTED]")})}):Object.keys(s).forEach(o=>{t.includes(o.toLocaleLowerCase())&&(s[o]="[REDACTED]")}),e=JSON.stringify(s)}catch(s){}if(r)try{const s=JSON.parse(e);Array.isArray(s)?s.forEach((o,l)=>{if(!sm(o)){s[l]="[REDACTED]";return}Object.keys(o).forEach(u=>{r.includes(u.toLocaleLowerCase())||(o[u]="[REDACTED]")})}):Object.keys(s).forEach(o=>{r.includes(o.toLocaleLowerCase())||(s[o]="[REDACTED]")}),e=JSON.stringify(s)}catch(s){}}try{e=e.slice(0,i)}catch(s){}return e},AI=(e,t,r,n,i,s)=>{const o=window._fetchProxy;return window._fetchProxy=function(l,u){const{method:a,url:h}=UI(l,u);if(!Ns(h,t))return o.call(this,l,u);const[c,f]=ru();if(tu(h,r,n)){u=u||{};let g=new Headers(u.headers);l instanceof Request&&[...l.headers].forEach(([v,y])=>g.set(v,y)),g.set(qp,nm(c,f)),u.headers=Object.fromEntries(g.entries())}const d={sessionSecureID:c,id:f,headers:{},body:void 0,url:h,verb:a},p=!n.some(g=>h.toLowerCase().includes(g));p&&(d.headers=Object.fromEntries(new Headers(u==null?void 0:u.headers).entries()),d.body=xt(u==null?void 0:u.body,i,s,u==null?void 0:u.headers));let m=o.call(this,l,u);return DI(m,d,e,p,i,s),m},()=>{window._fetchProxy=o}},UI=(e,t)=>{const r=t&&t.method||typeof e=="object"&&"method"in e&&e.method||"GET";let n;return typeof e=="object"?"url"in e&&e.url?n=e.url:n=e.toString():n=e,{method:r,url:n}},DI=(e,t,r,n,i,s)=>{const o=l=>q(this,null,function*(){let u={body:void 0,headers:void 0,status:0,size:0},a=!1,h=!n;"stack"in l||l instanceof Error?(u=B(x({},u),{body:l.message,status:0,size:void 0}),a=!0):"status"in l&&(u=B(x({},u),{status:l.status}),n&&(u.body=yield om(l,s,i),u.headers=Object.fromEntries(l.headers.entries()),u.size=u.body.length*8),(l.type==="opaque"||l.type==="opaqueredirect")&&(h=!0,u=B(x({},u),{body:"CORS blocked request"})),a=!0),a&&r({request:t,response:u,urlBlocked:h})});e.then(o).catch(()=>{})},om=(e,t,r)=>q(this,null,function*(){let n;try{const s=e.clone().body;if(s){let o=s.getReader(),l=new TextDecoder,u;const a=su(e.headers);let h="",c=!1;for(;!(u=yield o.read()).done;){let f=u.value;if(h+=l.decode(f,{stream:!0}),h.length>a){c=!0,o.cancel().catch(()=>{});break}}c||(h+=l.decode()),n=c?im(Number(e.headers.get("content-length"))||h.length,a):h,n=xt(n,r,t,e.headers)}else n=""}catch(i){n=`Unable to clone response: ${i}`}return n});var am=function(){function e(t){this._delegate=t}return e.prototype.export=function(t,r){this._delegate.export(t,r)},e.prototype.forceFlush=function(){return this._delegate.forceFlush()},e.prototype.shutdown=function(){return this._delegate.shutdown()},e}(),FI=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),lm=function(e){FI(t,e);function t(r,n,i){var s=e.call(this,r)||this;return s.name="OTLPExporterError",s.data=i,s.code=n,s}return t}(Error);function JI(e){if(!Number.isNaN(e)&&Number.isFinite(e)&&e>0)return e;throw new Error("Configuration: timeoutMillis is invalid, expected number greater than 0 (actual: '"+e+"')")}function HI(e){if(e!=null)return function(){return e}}function YI(e,t,r){var n,i,s,o,l,u;return{timeoutMillis:JI((i=(n=e.timeoutMillis)!==null&&n!==void 0?n:t.timeoutMillis)!==null&&i!==void 0?i:r.timeoutMillis),concurrencyLimit:(o=(s=e.concurrencyLimit)!==null&&s!==void 0?s:t.concurrencyLimit)!==null&&o!==void 0?o:r.concurrencyLimit,compression:(u=(l=e.compression)!==null&&l!==void 0?l:t.compression)!==null&&u!==void 0?u:r.compression}}function BI(){return{timeoutMillis:1e4,concurrencyLimit:30,compression:"none"}}var zI=function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function l(h){try{a(n.next(h))}catch(c){o(c)}}function u(h){try{a(n.throw(h))}catch(c){o(c)}}function a(h){h.done?s(h.value):i(h.value).then(l,u)}a((n=n.apply(e,t||[])).next())})},KI=function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function l(a){return function(h){return u([a,h])}}function u(a){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(s=a[0]&2?i.return:a[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,a[1])).done)return s;switch(i=0,s&&(a=[a[0]&2,s.value]),a[0]){case 0:case 1:s=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){r.label=a[1];break}if(a[0]===6&&r.label<s[1]){r.label=s[1],s=a;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(a);break}s[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(h){a=[6,h],i=0}finally{n=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},jI=function(){function e(t){this._sendingPromises=[],this._concurrencyLimit=t}return e.prototype.pushPromise=function(t){var r=this;if(this.hasReachedLimit())throw new Error("Concurrency Limit reached");this._sendingPromises.push(t);var n=function(){var i=r._sendingPromises.indexOf(t);r._sendingPromises.splice(i,1)};t.then(n,n)},e.prototype.hasReachedLimit=function(){return this._sendingPromises.length>=this._concurrencyLimit},e.prototype.awaitAll=function(){return zI(this,void 0,void 0,function(){return KI(this,function(t){switch(t.label){case 0:return[4,Promise.all(this._sendingPromises)];case 1:return t.sent(),[2]}})})},e}();function QI(e){return new jI(e.concurrencyLimit)}function $I(e){return Object.prototype.hasOwnProperty.call(e,"partialSuccess")}function qI(){return{handleResponse:function(e){e==null||!$I(e)||e.partialSuccess==null||Object.keys(e.partialSuccess).length===0||Y.warn("Received Partial Success response:",JSON.stringify(e.partialSuccess))}}}var eC=function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function l(h){try{a(n.next(h))}catch(c){o(c)}}function u(h){try{a(n.throw(h))}catch(c){o(c)}}function a(h){h.done?s(h.value):i(h.value).then(l,u)}a((n=n.apply(e,t||[])).next())})},tC=function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function l(a){return function(h){return u([a,h])}}function u(a){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(s=a[0]&2?i.return:a[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,a[1])).done)return s;switch(i=0,s&&(a=[a[0]&2,s.value]),a[0]){case 0:case 1:s=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){r.label=a[1];break}if(a[0]===6&&r.label<s[1]){r.label=s[1],s=a;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(a);break}s[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(h){a=[6,h],i=0}finally{n=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},rC=function(){function e(t,r,n,i,s){this._transport=t,this._serializer=r,this._responseHandler=n,this._promiseQueue=i,this._timeout=s,this._diagLogger=Y.createComponentLogger({namespace:"OTLPExportDelegate"})}return e.prototype.export=function(t,r){var n=this;if(this._diagLogger.debug("items to be sent",t),this._promiseQueue.hasReachedLimit()){r({code:Ie.FAILED,error:new Error("Concurrent export limit reached")});return}var i=this._serializer.serializeRequest(t);if(i==null){r({code:Ie.FAILED,error:new Error("Nothing to send")});return}this._promiseQueue.pushPromise(this._transport.send(i,this._timeout).then(function(s){if(s.status==="success"){if(s.data!=null)try{n._responseHandler.handleResponse(n._serializer.deserializeResponse(s.data))}catch(o){n._diagLogger.warn("Export succeeded but could not deserialize response - is the response specification compliant?",o,s.data)}r({code:Ie.SUCCESS});return}else if(s.status==="failure"&&s.error){r({code:Ie.FAILED,error:s.error});return}else s.status==="retryable"?r({code:Ie.FAILED,error:new lm("Export failed with retryable status")}):r({code:Ie.FAILED,error:new lm("Export failed with unknown error")})},function(s){return r({code:Ie.FAILED,error:s})}))},e.prototype.forceFlush=function(){return this._promiseQueue.awaitAll()},e.prototype.shutdown=function(){return eC(this,void 0,void 0,function(){return tC(this,function(t){switch(t.label){case 0:return this._diagLogger.debug("shutdown started"),[4,this.forceFlush()];case 1:return t.sent(),this._transport.shutdown(),[2]}})})},e}();function nC(e,t){return new rC(e.transport,e.serializer,qI(),e.promiseHandler,t.timeout)}function um(e,t,r){return nC({transport:r,serializer:t,promiseHandler:QI(e)},{timeout:e.timeoutMillis})}function cm(e){var t=BigInt(1e9);return BigInt(e[0])*t+BigInt(e[1])}function iC(e){var t=Number(BigInt.asUintN(32,e)),r=Number(BigInt.asUintN(32,e>>BigInt(32)));return{low:t,high:r}}function dm(e){var t=cm(e);return iC(t)}function sC(e){var t=cm(e);return t.toString()}var oC=typeof BigInt!="undefined"?sC:Pt;function hm(e){return e}function fm(e){if(e!==void 0)return Ol(e)}var aC={encodeHrTime:dm,encodeSpanContext:Ol,encodeOptionalSpanContext:fm};function pm(e){var t,r;if(e===void 0)return aC;var n=(t=e.useLongBits)!==null&&t!==void 0?t:!0,i=(r=e.useHex)!==null&&r!==void 0?r:!1;return{encodeHrTime:n?dm:oC,encodeSpanContext:i?hm:Ol,encodeOptionalSpanContext:i?hm:fm}}var lC=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s};function mm(e){return{attributes:Rr(e.attributes),droppedAttributesCount:0}}function gm(e){return{name:e.name,version:e.version}}function Rr(e){return Object.keys(e).map(function(t){return ym(t,e[t])})}function ym(e,t){return{key:e,value:bm(t)}}function bm(e){var t=typeof e;return t==="string"?{stringValue:e}:t==="number"?Number.isInteger(e)?{intValue:e}:{doubleValue:e}:t==="boolean"?{boolValue:e}:e instanceof Uint8Array?{bytesValue:e}:Array.isArray(e)?{arrayValue:{values:e.map(bm)}}:t==="object"&&e!=null?{kvlistValue:{values:Object.entries(e).map(function(r){var n=lC(r,2),i=n[0],s=n[1];return ym(i,s)})}}:{}}var It;(function(e){e[e.DELTA=0]="DELTA",e[e.CUMULATIVE=1]="CUMULATIVE"})(It||(It={}));var Nt;(function(e){e[e.HISTOGRAM=0]="HISTOGRAM",e[e.EXPONENTIAL_HISTOGRAM=1]="EXPONENTIAL_HISTOGRAM",e[e.GAUGE=2]="GAUGE",e[e.SUM=3]="SUM"})(Nt||(Nt={}));var uC=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),vm=function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function l(h){try{a(n.next(h))}catch(c){o(c)}}function u(h){try{a(n.throw(h))}catch(c){o(c)}}function a(h){h.done?s(h.value):i(h.value).then(l,u)}a((n=n.apply(e,t||[])).next())})},Sm=function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function l(a){return function(h){return u([a,h])}}function u(a){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(s=a[0]&2?i.return:a[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,a[1])).done)return s;switch(i=0,s&&(a=[a[0]&2,s.value]),a[0]){case 0:case 1:s=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){r.label=a[1];break}if(a[0]===6&&r.label<s[1]){r.label=s[1],s=a;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(a);break}s[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(h){a=[6,h],i=0}finally{n=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},cC=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},dC=function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,s;n<i;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))},hC=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};function fC(e){return e!=null}function wm(e){var t=Object.keys(e);return t.length===0?"":(t=t.sort(),JSON.stringify(t.map(function(r){return[r,e[r]]})))}function pC(e){var t,r;return e.name+":"+((t=e.version)!==null&&t!==void 0?t:"")+":"+((r=e.schemaUrl)!==null&&r!==void 0?r:"")}var Rm=function(e){uC(t,e);function t(r){var n=e.call(this,r)||this;return Object.setPrototypeOf(n,t.prototype),n}return t}(Error);function Hn(e,t){var r,n=new Promise(function(s,o){r=setTimeout(function(){o(new Rm("Operation timed out."))},t)});return Promise.race([e,n]).then(function(i){return clearTimeout(r),i},function(i){throw clearTimeout(r),i})}function mC(e){return vm(this,void 0,void 0,function(){var t=this;return Sm(this,function(r){return[2,Promise.all(e.map(function(n){return vm(t,void 0,void 0,function(){var i,s;return Sm(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,n];case 1:return i=o.sent(),[2,{status:"fulfilled",value:i}];case 2:return s=o.sent(),[2,{status:"rejected",reason:s}];case 3:return[2]}})})}))]})})}function gC(e){return e.status==="rejected"}function _m(e,t){var r=[];return e.forEach(function(n){r.push.apply(r,dC([],cC(t(n)),!1))}),r}function yC(e,t){var r,n;if(e.size!==t.size)return!1;try{for(var i=hC(e),s=i.next();!s.done;s=i.next()){var o=s.value;if(!t.has(o))return!1}}catch(l){r={error:l}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return!0}function bC(e,t){for(var r=0,n=e.length-1,i=e.length;n>=r;){var s=r+Math.trunc((n-r)/2);e[s]<t?r=s+1:(i=s,n=s-1)}return i}function vC(e,t){return e.toLowerCase()===t.toLowerCase()}var _r;(function(e){e[e.DROP=0]="DROP",e[e.SUM=1]="SUM",e[e.LAST_VALUE=2]="LAST_VALUE",e[e.HISTOGRAM=3]="HISTOGRAM",e[e.EXPONENTIAL_HISTOGRAM=4]="EXPONENTIAL_HISTOGRAM"})(_r||(_r={}));var SC=function(){function e(){this.kind=_r.DROP}return e.prototype.createAccumulation=function(){},e.prototype.merge=function(t,r){},e.prototype.diff=function(t,r){},e.prototype.toMetricData=function(t,r,n,i){},e}(),se;(function(e){e.COUNTER="COUNTER",e.GAUGE="GAUGE",e.HISTOGRAM="HISTOGRAM",e.UP_DOWN_COUNTER="UP_DOWN_COUNTER",e.OBSERVABLE_COUNTER="OBSERVABLE_COUNTER",e.OBSERVABLE_GAUGE="OBSERVABLE_GAUGE",e.OBSERVABLE_UP_DOWN_COUNTER="OBSERVABLE_UP_DOWN_COUNTER"})(se||(se={}));function sr(e,t,r){var n,i,s,o;return TC(e)||Y.warn('Invalid metric name: "'+e+'". The metric name should be a ASCII string with a length no greater than 255 characters.'),{name:e,type:t,description:(n=r==null?void 0:r.description)!==null&&n!==void 0?n:"",unit:(i=r==null?void 0:r.unit)!==null&&i!==void 0?i:"",valueType:(s=r==null?void 0:r.valueType)!==null&&s!==void 0?s:qt.DOUBLE,advice:(o=r==null?void 0:r.advice)!==null&&o!==void 0?o:{}}}function wC(e,t){var r,n;return{name:(r=e.name)!==null&&r!==void 0?r:t.name,description:(n=e.description)!==null&&n!==void 0?n:t.description,type:t.type,unit:t.unit,valueType:t.valueType,advice:t.advice}}function RC(e,t){return vC(e.name,t.name)&&e.unit===t.unit&&e.type===t.type&&e.valueType===t.valueType}var _C=/^[a-z][a-z0-9_.\-/]{0,254}$/i;function TC(e){return e.match(_C)!=null}var EC=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s};function IC(e){var t=e.map(function(){return 0});return t.push(0),{buckets:{boundaries:e,counts:t},sum:0,count:0,hasMinMax:!1,min:1/0,max:-1/0}}var ou=function(){function e(t,r,n,i){n===void 0&&(n=!0),i===void 0&&(i=IC(r)),this.startTime=t,this._boundaries=r,this._recordMinMax=n,this._current=i}return e.prototype.record=function(t){if(!Number.isNaN(t)){this._current.count+=1,this._current.sum+=t,this._recordMinMax&&(this._current.min=Math.min(t,this._current.min),this._current.max=Math.max(t,this._current.max),this._current.hasMinMax=!0);var r=bC(this._boundaries,t);this._current.buckets.counts[r]+=1}},e.prototype.setStartTime=function(t){this.startTime=t},e.prototype.toPointValue=function(){return this._current},e}(),Tm=function(){function e(t,r){this._boundaries=t,this._recordMinMax=r,this.kind=_r.HISTOGRAM}return e.prototype.createAccumulation=function(t){return new ou(t,this._boundaries,this._recordMinMax)},e.prototype.merge=function(t,r){for(var n=t.toPointValue(),i=r.toPointValue(),s=n.buckets.counts,o=i.buckets.counts,l=new Array(s.length),u=0;u<s.length;u++)l[u]=s[u]+o[u];var a=1/0,h=-1/0;return this._recordMinMax&&(n.hasMinMax&&i.hasMinMax?(a=Math.min(n.min,i.min),h=Math.max(n.max,i.max)):n.hasMinMax?(a=n.min,h=n.max):i.hasMinMax&&(a=i.min,h=i.max)),new ou(t.startTime,n.buckets.boundaries,this._recordMinMax,{buckets:{boundaries:n.buckets.boundaries,counts:l},count:n.count+i.count,sum:n.sum+i.sum,hasMinMax:this._recordMinMax&&(n.hasMinMax||i.hasMinMax),min:a,max:h})},e.prototype.diff=function(t,r){for(var n=t.toPointValue(),i=r.toPointValue(),s=n.buckets.counts,o=i.buckets.counts,l=new Array(s.length),u=0;u<s.length;u++)l[u]=o[u]-s[u];return new ou(r.startTime,n.buckets.boundaries,this._recordMinMax,{buckets:{boundaries:n.buckets.boundaries,counts:l},count:i.count-n.count,sum:i.sum-n.sum,hasMinMax:!1,min:1/0,max:-1/0})},e.prototype.toMetricData=function(t,r,n,i){return{descriptor:t,aggregationTemporality:r,dataPointType:Nt.HISTOGRAM,dataPoints:n.map(function(s){var o=EC(s,2),l=o[0],u=o[1],a=u.toPointValue(),h=t.type===se.GAUGE||t.type===se.UP_DOWN_COUNTER||t.type===se.OBSERVABLE_GAUGE||t.type===se.OBSERVABLE_UP_DOWN_COUNTER;return{attributes:l,startTime:u.startTime,endTime:i,value:{min:a.hasMinMax?a.min:void 0,max:a.hasMinMax?a.max:void 0,sum:h?void 0:a.sum,buckets:a.buckets,count:a.count}}})}},e}(),au=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},lu=function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,s;n<i;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))},Em=function(){function e(t,r,n,i){t===void 0&&(t=new CC),r===void 0&&(r=0),n===void 0&&(n=0),i===void 0&&(i=0),this.backing=t,this.indexBase=r,this.indexStart=n,this.indexEnd=i}return Object.defineProperty(e.prototype,"offset",{get:function(){return this.indexStart},enumerable:!1,configurable:!0}),Object.defineProperty(e.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}),e.prototype.counts=function(){var t=this;return Array.from({length:this.length},function(r,n){return t.at(n)})},e.prototype.at=function(t){var r=this.indexBase-this.indexStart;return t<r&&(t+=this.backing.length),t-=r,this.backing.countAt(t)},e.prototype.incrementBucket=function(t,r){this.backing.increment(t,r)},e.prototype.decrementBucket=function(t,r){this.backing.decrement(t,r)},e.prototype.trim=function(){for(var t=0;t<this.length;t++)if(this.at(t)!==0){this.indexStart+=t;break}else if(t===this.length-1){this.indexStart=this.indexEnd=this.indexBase=0;return}for(var t=this.length-1;t>=0;t--)if(this.at(t)!==0){this.indexEnd-=this.length-t-1;break}this._rotate()},e.prototype.downscale=function(t){this._rotate();for(var r=1+this.indexEnd-this.indexStart,n=1<<t,i=0,s=0,o=this.indexStart;o<=this.indexEnd;){var l=o%n;l<0&&(l+=n);for(var u=l;u<n&&i<r;u++)this._relocateBucket(s,i),i++,o++;s++}this.indexStart>>=t,this.indexEnd>>=t,this.indexBase=this.indexStart},e.prototype.clone=function(){return new e(this.backing.clone(),this.indexBase,this.indexStart,this.indexEnd)},e.prototype._rotate=function(){var t=this.indexBase-this.indexStart;t!==0&&(t>0?(this.backing.reverse(0,this.backing.length),this.backing.reverse(0,t),this.backing.reverse(t,this.backing.length)):(this.backing.reverse(0,this.backing.length),this.backing.reverse(0,this.backing.length+t)),this.indexBase=this.indexStart)},e.prototype._relocateBucket=function(t,r){t!==r&&this.incrementBucket(t,this.backing.emptyBucket(r))},e}(),CC=function(){function e(t){t===void 0&&(t=[0]),this._counts=t}return Object.defineProperty(e.prototype,"length",{get:function(){return this._counts.length},enumerable:!1,configurable:!0}),e.prototype.countAt=function(t){return this._counts[t]},e.prototype.growTo=function(t,r,n){var i=new Array(t).fill(0);i.splice.apply(i,lu([n,this._counts.length-r],au(this._counts.slice(r)),!1)),i.splice.apply(i,lu([0,r],au(this._counts.slice(0,r)),!1)),this._counts=i},e.prototype.reverse=function(t,r){for(var n=Math.floor((t+r)/2)-t,i=0;i<n;i++){var s=this._counts[t+i];this._counts[t+i]=this._counts[r-i-1],this._counts[r-i-1]=s}},e.prototype.emptyBucket=function(t){var r=this._counts[t];return this._counts[t]=0,r},e.prototype.increment=function(t,r){this._counts[t]+=r},e.prototype.decrement=function(t,r){this._counts[t]>=r?this._counts[t]-=r:this._counts[t]=0},e.prototype.clone=function(){return new e(lu([],au(this._counts),!1))},e}(),ZC=52,LC=2146435072,xC=1048575,uu=1023,Im=-uu+1,Cm=uu,cu=Math.pow(2,-1022);function Zm(e){var t=new DataView(new ArrayBuffer(8));t.setFloat64(0,e);var r=t.getUint32(0),n=(r&LC)>>20;return n-uu}function Lm(e){var t=new DataView(new ArrayBuffer(8));t.setFloat64(0,e);var r=t.getUint32(0),n=t.getUint32(4),i=(r&xC)*Math.pow(2,32);return i+n}function du(e,t){return e===0||e===Number.POSITIVE_INFINITY||e===Number.NEGATIVE_INFINITY||Number.isNaN(e)?e:e*Math.pow(2,t)}function NC(e){return e--,e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,e|=e>>16,e++,e}var OC=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Yn=function(e){OC(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(Error),GC=function(){function e(t){this._shift=-t}return e.prototype.mapToIndex=function(t){if(t<cu)return this._minNormalLowerBoundaryIndex();var r=Zm(t),n=this._rightShift(Lm(t)-1,ZC);return r+n>>this._shift},e.prototype.lowerBoundary=function(t){var r=this._minNormalLowerBoundaryIndex();if(t<r)throw new Yn("underflow: "+t+" is < minimum lower boundary: "+r);var n=this._maxNormalLowerBoundaryIndex();if(t>n)throw new Yn("overflow: "+t+" is > maximum lower boundary: "+n);return du(1,t<<this._shift)},Object.defineProperty(e.prototype,"scale",{get:function(){return this._shift===0?0:-this._shift},enumerable:!1,configurable:!0}),e.prototype._minNormalLowerBoundaryIndex=function(){var t=Im>>this._shift;return this._shift<2&&t--,t},e.prototype._maxNormalLowerBoundaryIndex=function(){return Cm>>this._shift},e.prototype._rightShift=function(t,r){return Math.floor(t*Math.pow(2,-r))},e}(),VC=function(){function e(t){this._scale=t,this._scaleFactor=du(Math.LOG2E,t),this._inverseFactor=du(Math.LN2,-t)}return e.prototype.mapToIndex=function(t){if(t<=cu)return this._minNormalLowerBoundaryIndex()-1;if(Lm(t)===0){var r=Zm(t);return(r<<this._scale)-1}var n=Math.floor(Math.log(t)*this._scaleFactor),i=this._maxNormalLowerBoundaryIndex();return n>=i?i:n},e.prototype.lowerBoundary=function(t){var r=this._maxNormalLowerBoundaryIndex();if(t>=r){if(t===r)return 2*Math.exp((t-(1<<this._scale))/this._scaleFactor);throw new Yn("overflow: "+t+" is > maximum lower boundary: "+r)}var n=this._minNormalLowerBoundaryIndex();if(t<=n){if(t===n)return cu;if(t===n-1)return Math.exp((t+(1<<this._scale))/this._scaleFactor)/2;throw new Yn("overflow: "+t+" is < minimum lower boundary: "+n)}return Math.exp(t*this._inverseFactor)},Object.defineProperty(e.prototype,"scale",{get:function(){return this._scale},enumerable:!1,configurable:!0}),e.prototype._minNormalLowerBoundaryIndex=function(){return Im<<this._scale},e.prototype._maxNormalLowerBoundaryIndex=function(){return(Cm+1<<this._scale)-1},e}(),xm=-10,Nm=20,kC=Array.from({length:31},function(e,t){return t>10?new VC(t-10):new GC(t-10)});function Om(e){if(e>Nm||e<xm)throw new Yn("expected scale >= "+xm+" && <= "+Nm+", got: "+e);return kC[e+10]}var XC=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},Os=function(){function e(t,r){this.low=t,this.high=r}return e.combine=function(t,r){return new e(Math.min(t.low,r.low),Math.max(t.high,r.high))},e}(),WC=20,PC=160,hu=2,MC=function(){function e(t,r,n,i,s,o,l,u,a,h,c){t===void 0&&(t=t),r===void 0&&(r=PC),n===void 0&&(n=!0),i===void 0&&(i=0),s===void 0&&(s=0),o===void 0&&(o=0),l===void 0&&(l=Number.POSITIVE_INFINITY),u===void 0&&(u=Number.NEGATIVE_INFINITY),a===void 0&&(a=new Em),h===void 0&&(h=new Em),c===void 0&&(c=Om(WC)),this.startTime=t,this._maxSize=r,this._recordMinMax=n,this._sum=i,this._count=s,this._zeroCount=o,this._min=l,this._max=u,this._positive=a,this._negative=h,this._mapping=c,this._maxSize<hu&&(Y.warn("Exponential Histogram Max Size set to "+this._maxSize+", changing to the minimum size of: "+hu),this._maxSize=hu)}return e.prototype.record=function(t){this.updateByIncrement(t,1)},e.prototype.setStartTime=function(t){this.startTime=t},e.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(e.prototype,"sum",{get:function(){return this._sum},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"min",{get:function(){return this._min},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"max",{get:function(){return this._max},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"count",{get:function(){return this._count},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"zeroCount",{get:function(){return this._zeroCount},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scale",{get:function(){return this._count===this._zeroCount?0:this._mapping.scale},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"positive",{get:function(){return this._positive},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"negative",{get:function(){return this._negative},enumerable:!1,configurable:!0}),e.prototype.updateByIncrement=function(t,r){if(!Number.isNaN(t)){if(t>this._max&&(this._max=t),t<this._min&&(this._min=t),this._count+=r,t===0){this._zeroCount+=r;return}this._sum+=t*r,t>0?this._updateBuckets(this._positive,t,r):this._updateBuckets(this._negative,-t,r)}},e.prototype.merge=function(t){this._count===0?(this._min=t.min,this._max=t.max):t.count!==0&&(t.min<this.min&&(this._min=t.min),t.max>this.max&&(this._max=t.max)),this.startTime=t.startTime,this._sum+=t.sum,this._count+=t.count,this._zeroCount+=t.zeroCount;var r=this._minScale(t);this._downscale(this.scale-r),this._mergeBuckets(this.positive,t,t.positive,r),this._mergeBuckets(this.negative,t,t.negative,r)},e.prototype.diff=function(t){this._min=1/0,this._max=-1/0,this._sum-=t.sum,this._count-=t.count,this._zeroCount-=t.zeroCount;var r=this._minScale(t);this._downscale(this.scale-r),this._diffBuckets(this.positive,t,t.positive,r),this._diffBuckets(this.negative,t,t.negative,r)},e.prototype.clone=function(){return new e(this.startTime,this._maxSize,this._recordMinMax,this._sum,this._count,this._zeroCount,this._min,this._max,this.positive.clone(),this.negative.clone(),this._mapping)},e.prototype._updateBuckets=function(t,r,n){var i=this._mapping.mapToIndex(r),s=!1,o=0,l=0;if(t.length===0?(t.indexStart=i,t.indexEnd=t.indexStart,t.indexBase=t.indexStart):i<t.indexStart&&t.indexEnd-i>=this._maxSize?(s=!0,l=i,o=t.indexEnd):i>t.indexEnd&&i-t.indexStart>=this._maxSize&&(s=!0,l=t.indexStart,o=i),s){var u=this._changeScale(o,l);this._downscale(u),i=this._mapping.mapToIndex(r)}this._incrementIndexBy(t,i,n)},e.prototype._incrementIndexBy=function(t,r,n){if(n!==0){if(t.length===0&&(t.indexStart=t.indexEnd=t.indexBase=r),r<t.indexStart){var i=t.indexEnd-r;i>=t.backing.length&&this._grow(t,i+1),t.indexStart=r}else if(r>t.indexEnd){var i=r-t.indexStart;i>=t.backing.length&&this._grow(t,i+1),t.indexEnd=r}var s=r-t.indexBase;s<0&&(s+=t.backing.length),t.incrementBucket(s,n)}},e.prototype._grow=function(t,r){var n=t.backing.length,i=t.indexBase-t.indexStart,s=n-i,o=NC(r);o>this._maxSize&&(o=this._maxSize);var l=o-i;t.backing.growTo(o,s,l)},e.prototype._changeScale=function(t,r){for(var n=0;t-r>=this._maxSize;)t>>=1,r>>=1,n++;return n},e.prototype._downscale=function(t){if(t!==0){if(t<0)throw new Error("impossible change of scale: "+this.scale);var r=this._mapping.scale-t;this._positive.downscale(t),this._negative.downscale(t),this._mapping=Om(r)}},e.prototype._minScale=function(t){var r=Math.min(this.scale,t.scale),n=Os.combine(this._highLowAtScale(this.positive,this.scale,r),this._highLowAtScale(t.positive,t.scale,r)),i=Os.combine(this._highLowAtScale(this.negative,this.scale,r),this._highLowAtScale(t.negative,t.scale,r));return Math.min(r-this._changeScale(n.high,n.low),r-this._changeScale(i.high,i.low))},e.prototype._highLowAtScale=function(t,r,n){if(t.length===0)return new Os(0,-1);var i=r-n;return new Os(t.indexStart>>i,t.indexEnd>>i)},e.prototype._mergeBuckets=function(t,r,n,i){for(var s=n.offset,o=r.scale-i,l=0;l<n.length;l++)this._incrementIndexBy(t,s+l>>o,n.at(l))},e.prototype._diffBuckets=function(t,r,n,i){for(var s=n.offset,o=r.scale-i,l=0;l<n.length;l++){var u=s+l>>o,a=u-t.indexBase;a<0&&(a+=t.backing.length),t.decrementBucket(a,n.at(l))}t.trim()},e}(),AC=function(){function e(t,r){this._maxSize=t,this._recordMinMax=r,this.kind=_r.EXPONENTIAL_HISTOGRAM}return e.prototype.createAccumulation=function(t){return new MC(t,this._maxSize,this._recordMinMax)},e.prototype.merge=function(t,r){var n=r.clone();return n.merge(t),n},e.prototype.diff=function(t,r){var n=r.clone();return n.diff(t),n},e.prototype.toMetricData=function(t,r,n,i){return{descriptor:t,aggregationTemporality:r,dataPointType:Nt.EXPONENTIAL_HISTOGRAM,dataPoints:n.map(function(s){var o=XC(s,2),l=o[0],u=o[1],a=u.toPointValue(),h=t.type===se.GAUGE||t.type===se.UP_DOWN_COUNTER||t.type===se.OBSERVABLE_GAUGE||t.type===se.OBSERVABLE_UP_DOWN_COUNTER;return{attributes:l,startTime:u.startTime,endTime:i,value:{min:a.hasMinMax?a.min:void 0,max:a.hasMinMax?a.max:void 0,sum:h?void 0:a.sum,positive:{offset:a.positive.offset,bucketCounts:a.positive.bucketCounts},negative:{offset:a.negative.offset,bucketCounts:a.negative.bucketCounts},count:a.count,scale:a.scale,zeroCount:a.zeroCount}}})}},e}(),UC=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},fu=function(){function e(t,r,n){r===void 0&&(r=0),n===void 0&&(n=[0,0]),this.startTime=t,this._current=r,this.sampleTime=n}return e.prototype.record=function(t){this._current=t,this.sampleTime=ft(Date.now())},e.prototype.setStartTime=function(t){this.startTime=t},e.prototype.toPointValue=function(){return this._current},e}(),DC=function(){function e(){this.kind=_r.LAST_VALUE}return e.prototype.createAccumulation=function(t){return new fu(t)},e.prototype.merge=function(t,r){var n=cs(r.sampleTime)>=cs(t.sampleTime)?r:t;return new fu(t.startTime,n.toPointValue(),n.sampleTime)},e.prototype.diff=function(t,r){var n=cs(r.sampleTime)>=cs(t.sampleTime)?r:t;return new fu(r.startTime,n.toPointValue(),n.sampleTime)},e.prototype.toMetricData=function(t,r,n,i){return{descriptor:t,aggregationTemporality:r,dataPointType:Nt.GAUGE,dataPoints:n.map(function(s){var o=UC(s,2),l=o[0],u=o[1];return{attributes:l,startTime:u.startTime,endTime:i,value:u.toPointValue()}})}},e}(),FC=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},Bn=function(){function e(t,r,n,i){n===void 0&&(n=0),i===void 0&&(i=!1),this.startTime=t,this.monotonic=r,this._current=n,this.reset=i}return e.prototype.record=function(t){this.monotonic&&t<0||(this._current+=t)},e.prototype.setStartTime=function(t){this.startTime=t},e.prototype.toPointValue=function(){return this._current},e}(),Gm=function(){function e(t){this.monotonic=t,this.kind=_r.SUM}return e.prototype.createAccumulation=function(t){return new Bn(t,this.monotonic)},e.prototype.merge=function(t,r){var n=t.toPointValue(),i=r.toPointValue();return r.reset?new Bn(r.startTime,this.monotonic,i,r.reset):new Bn(t.startTime,this.monotonic,n+i)},e.prototype.diff=function(t,r){var n=t.toPointValue(),i=r.toPointValue();return this.monotonic&&n>i?new Bn(r.startTime,this.monotonic,i,!0):new Bn(r.startTime,this.monotonic,i-n)},e.prototype.toMetricData=function(t,r,n,i){return{descriptor:t,aggregationTemporality:r,dataPointType:Nt.SUM,dataPoints:n.map(function(s){var o=FC(s,2),l=o[0],u=o[1];return{attributes:l,startTime:u.startTime,endTime:i,value:u.toPointValue()}}),isMonotonic:this.monotonic}},e}(),Tr=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Jt=function(){function e(){}return e.Drop=function(){return Vm},e.Sum=function(){return km},e.LastValue=function(){return Xm},e.Histogram=function(){return Wm},e.ExponentialHistogram=function(){return QC},e.Default=function(){return $C},e}(),JC=function(e){Tr(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.createAggregator=function(r){return t.DEFAULT_INSTANCE},t.DEFAULT_INSTANCE=new SC,t}(Jt),HC=function(e){Tr(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.createAggregator=function(r){switch(r.type){case se.COUNTER:case se.OBSERVABLE_COUNTER:case se.HISTOGRAM:return t.MONOTONIC_INSTANCE;default:return t.NON_MONOTONIC_INSTANCE}},t.MONOTONIC_INSTANCE=new Gm(!0),t.NON_MONOTONIC_INSTANCE=new Gm(!1),t}(Jt),YC=function(e){Tr(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.createAggregator=function(r){return t.DEFAULT_INSTANCE},t.DEFAULT_INSTANCE=new DC,t}(Jt),BC=function(e){Tr(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.createAggregator=function(r){return t.DEFAULT_INSTANCE},t.DEFAULT_INSTANCE=new Tm([0,5,10,25,50,75,100,250,500,750,1e3,2500,5e3,7500,1e4],!0),t}(Jt),zC=function(e){Tr(t,e);function t(r,n){n===void 0&&(n=!0);var i=e.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(l,u){return l-u});var s=r.lastIndexOf(-1/0),o=r.indexOf(1/0);return o===-1&&(o=void 0),i._boundaries=r.slice(s+1,o),i}return t.prototype.createAggregator=function(r){return new Tm(this._boundaries,this._recordMinMax)},t}(Jt),KC=function(e){Tr(t,e);function t(r,n){r===void 0&&(r=160),n===void 0&&(n=!0);var i=e.call(this)||this;return i._maxSize=r,i._recordMinMax=n,i}return t.prototype.createAggregator=function(r){return new AC(this._maxSize,this._recordMinMax)},t}(Jt),jC=function(e){Tr(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype._resolve=function(r){switch(r.type){case se.COUNTER:case se.UP_DOWN_COUNTER:case se.OBSERVABLE_COUNTER:case se.OBSERVABLE_UP_DOWN_COUNTER:return km;case se.GAUGE:case se.OBSERVABLE_GAUGE:return Xm;case se.HISTOGRAM:return r.advice.explicitBucketBoundaries?new zC(r.advice.explicitBucketBoundaries):Wm}return Y.warn("Unable to recognize instrument type: "+r.type),Vm},t.prototype.createAggregator=function(r){return this._resolve(r).createAggregator(r)},t}(Jt),Vm=new JC,km=new HC,Xm=new YC,Wm=new BC,QC=new KC,$C=new jC,qC=function(e){return Jt.Default()},eZ=function(e){return It.CUMULATIVE},pu=function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function l(h){try{a(n.next(h))}catch(c){o(c)}}function u(h){try{a(n.throw(h))}catch(c){o(c)}}function a(h){h.done?s(h.value):i(h.value).then(l,u)}a((n=n.apply(e,t||[])).next())})},mu=function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function l(a){return function(h){return u([a,h])}}function u(a){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(s=a[0]&2?i.return:a[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,a[1])).done)return s;switch(i=0,s&&(a=[a[0]&2,s.value]),a[0]){case 0:case 1:s=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){r.label=a[1];break}if(a[0]===6&&r.label<s[1]){r.label=s[1],s=a;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(a);break}s[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(h){a=[6,h],i=0}finally{n=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},Pm=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},tZ=function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,s;n<i;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))},rZ=function(){function e(t){var r,n,i;this._shutdown=!1,this._aggregationSelector=(r=t==null?void 0:t.aggregationSelector)!==null&&r!==void 0?r:qC,this._aggregationTemporalitySelector=(n=t==null?void 0:t.aggregationTemporalitySelector)!==null&&n!==void 0?n:eZ,this._metricProducers=(i=t==null?void 0:t.metricProducers)!==null&&i!==void 0?i:[],this._cardinalitySelector=t==null?void 0:t.cardinalitySelector}return e.prototype.setMetricProducer=function(t){if(this._sdkMetricProducer)throw new Error("MetricReader can not be bound to a MeterProvider again.");this._sdkMetricProducer=t,this.onInitialized()},e.prototype.selectAggregation=function(t){return this._aggregationSelector(t)},e.prototype.selectAggregationTemporality=function(t){return this._aggregationTemporalitySelector(t)},e.prototype.selectCardinalityLimit=function(t){return this._cardinalitySelector?this._cardinalitySelector(t):2e3},e.prototype.onInitialized=function(){},e.prototype.collect=function(t){return pu(this,void 0,void 0,function(){var r,n,i,s,o,l;return mu(this,function(u){switch(u.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(tZ([this._sdkMetricProducer.collect({timeoutMillis:t==null?void 0:t.timeoutMillis})],Pm(this._metricProducers.map(function(a){return a.collect({timeoutMillis:t==null?void 0:t.timeoutMillis})})),!1))];case 1:return r=Pm.apply(void 0,[u.sent()]),n=r[0],i=r.slice(1),s=n.errors.concat(_m(i,function(a){return a.errors})),o=n.resourceMetrics.resource,l=n.resourceMetrics.scopeMetrics.concat(_m(i,function(a){return a.resourceMetrics.scopeMetrics})),[2,{resourceMetrics:{resource:o,scopeMetrics:l},errors:s}]}})})},e.prototype.shutdown=function(t){return pu(this,void 0,void 0,function(){return mu(this,function(r){switch(r.label){case 0:return this._shutdown?(Y.error("Cannot call shutdown twice."),[2]):(t==null?void 0:t.timeoutMillis)!=null?[3,2]:[4,this.onShutdown()];case 1:return r.sent(),[3,4];case 2:return[4,Hn(this.onShutdown(),t.timeoutMillis)];case 3:r.sent(),r.label=4;case 4:return this._shutdown=!0,[2]}})})},e.prototype.forceFlush=function(t){return pu(this,void 0,void 0,function(){return mu(this,function(r){switch(r.label){case 0:return this._shutdown?(Y.warn("Cannot forceFlush on already shutdown MetricReader."),[2]):(t==null?void 0:t.timeoutMillis)!=null?[3,2]:[4,this.onForceFlush()];case 1:return r.sent(),[2];case 2:return[4,Hn(this.onForceFlush(),t.timeoutMillis)];case 3:return r.sent(),[2]}})})},e}(),nZ=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Gs=function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function l(h){try{a(n.next(h))}catch(c){o(c)}}function u(h){try{a(n.throw(h))}catch(c){o(c)}}function a(h){h.done?s(h.value):i(h.value).then(l,u)}a((n=n.apply(e,t||[])).next())})},Vs=function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function l(a){return function(h){return u([a,h])}}function u(a){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(s=a[0]&2?i.return:a[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,a[1])).done)return s;switch(i=0,s&&(a=[a[0]&2,s.value]),a[0]){case 0:case 1:s=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){r.label=a[1];break}if(a[0]===6&&r.label<s[1]){r.label=s[1],s=a;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(a);break}s[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(h){a=[6,h],i=0}finally{n=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},iZ=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},sZ=function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,s;n<i;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))},oZ=function(e){nZ(t,e);function t(r){var n,i,s,o,l=e.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 l._exportInterval=(s=r.exportIntervalMillis)!==null&&s!==void 0?s:6e4,l._exportTimeout=(o=r.exportTimeoutMillis)!==null&&o!==void 0?o:3e4,l._exporter=r.exporter,l}return t.prototype._runOnce=function(){return Gs(this,void 0,void 0,function(){var r;return Vs(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,Hn(this._doRun(),this._exportTimeout)];case 1:return n.sent(),[3,3];case 2:return r=n.sent(),r instanceof Rm?(Y.error("Export took longer than %s milliseconds and timed out.",this._exportTimeout),[2]):(er(r),[3,3]);case 3:return[2]}})})},t.prototype._doRun=function(){var r,n;return Gs(this,void 0,void 0,function(){var i,s,o,l,u,a;return Vs(this,function(h){switch(h.label){case 0:return[4,this.collect({timeoutMillis:this._exportTimeout})];case 1:if(i=h.sent(),s=i.resourceMetrics,o=i.errors,o.length>0&&(a=Y).error.apply(a,sZ(["PeriodicExportingMetricReader: metrics collection errors"],iZ(o),!1)),!s.resource.asyncAttributesPending)return[3,5];h.label=2;case 2:return h.trys.push([2,4,,5]),[4,(n=(r=s.resource).waitForAsyncAttributes)===null||n===void 0?void 0:n.call(r)];case 3:return h.sent(),[3,5];case 4:return l=h.sent(),Y.debug("Error while resolving async portion of resource: ",l),er(l),[3,5];case 5:return s.scopeMetrics.length===0?[2]:[4,F_._export(this._exporter,s)];case 6:if(u=h.sent(),u.code!==Ie.SUCCESS)throw new Error("PeriodicExportingMetricReader: metrics export failed (error "+u.error+")");return[2]}})})},t.prototype.onInitialized=function(){var r=this;this._interval=setInterval(function(){r._runOnce()},this._exportInterval)},t.prototype.onForceFlush=function(){return Gs(this,void 0,void 0,function(){return Vs(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]}})})},t.prototype.onShutdown=function(){return Gs(this,void 0,void 0,function(){return Vs(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]}})})},t}(rZ),aZ=function(){function e(){this._registeredViews=[]}return e.prototype.addView=function(t){this._registeredViews.push(t)},e.prototype.findViews=function(t,r){var n=this,i=this._registeredViews.filter(function(s){return n._matchInstrument(s.instrumentSelector,t)&&n._matchMeter(s.meterSelector,r)});return i},e.prototype._matchInstrument=function(t,r){return(t.getType()===void 0||r.type===t.getType())&&t.getNameFilter().match(r.name)&&t.getUnitFilter().match(r.unit)},e.prototype._matchMeter=function(t,r){return t.getNameFilter().match(r.name)&&(r.version===void 0||t.getVersionFilter().match(r.version))&&(r.schemaUrl===void 0||t.getSchemaUrlFilter().match(r.schemaUrl))},e}(),Er=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),ks=function(){function e(t,r){this._writableMetricStorage=t,this._descriptor=r}return e.prototype._record=function(t,r,n){if(r===void 0&&(r={}),n===void 0&&(n=pe.active()),typeof t!="number"){Y.warn("non-number value provided to metric "+this._descriptor.name+": "+t);return}this._descriptor.valueType===qt.INT&&!Number.isInteger(t)&&(Y.warn("INT value type cannot accept a floating-point value for "+this._descriptor.name+", ignoring the fractional digits."),t=Math.trunc(t),!Number.isInteger(t))||this._writableMetricStorage.record(t,r,n,ft(Date.now()))},e}(),lZ=function(e){Er(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.add=function(r,n,i){this._record(r,n,i)},t}(ks),uZ=function(e){Er(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.add=function(r,n,i){if(r<0){Y.warn("negative value provided to counter "+this._descriptor.name+": "+r);return}this._record(r,n,i)},t}(ks),cZ=function(e){Er(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.record=function(r,n,i){this._record(r,n,i)},t}(ks),dZ=function(e){Er(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.record=function(r,n,i){if(r<0){Y.warn("negative value provided to histogram "+this._descriptor.name+": "+r);return}this._record(r,n,i)},t}(ks),Xs=function(){function e(t,r,n){this._observableRegistry=n,this._descriptor=t,this._metricStorages=r}return e.prototype.addCallback=function(t){this._observableRegistry.addCallback(t,this)},e.prototype.removeCallback=function(t){this._observableRegistry.removeCallback(t,this)},e}(),hZ=function(e){Er(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(Xs),fZ=function(e){Er(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(Xs),pZ=function(e){Er(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(Xs);function gu(e){return e instanceof Xs}var mZ=function(){function e(t){this._meterSharedState=t}return e.prototype.createGauge=function(t,r){var n=sr(t,se.GAUGE,r),i=this._meterSharedState.registerMetricStorage(n);return new cZ(i,n)},e.prototype.createHistogram=function(t,r){var n=sr(t,se.HISTOGRAM,r),i=this._meterSharedState.registerMetricStorage(n);return new dZ(i,n)},e.prototype.createCounter=function(t,r){var n=sr(t,se.COUNTER,r),i=this._meterSharedState.registerMetricStorage(n);return new uZ(i,n)},e.prototype.createUpDownCounter=function(t,r){var n=sr(t,se.UP_DOWN_COUNTER,r),i=this._meterSharedState.registerMetricStorage(n);return new lZ(i,n)},e.prototype.createObservableGauge=function(t,r){var n=sr(t,se.OBSERVABLE_GAUGE,r),i=this._meterSharedState.registerAsyncMetricStorage(n);return new fZ(n,i,this._meterSharedState.observableRegistry)},e.prototype.createObservableCounter=function(t,r){var n=sr(t,se.OBSERVABLE_COUNTER,r),i=this._meterSharedState.registerAsyncMetricStorage(n);return new hZ(n,i,this._meterSharedState.observableRegistry)},e.prototype.createObservableUpDownCounter=function(t,r){var n=sr(t,se.OBSERVABLE_UP_DOWN_COUNTER,r),i=this._meterSharedState.registerAsyncMetricStorage(n);return new pZ(n,i,this._meterSharedState.observableRegistry)},e.prototype.addBatchObservableCallback=function(t,r){this._meterSharedState.observableRegistry.addBatchCallback(t,r)},e.prototype.removeBatchObservableCallback=function(t,r){this._meterSharedState.observableRegistry.removeBatchCallback(t,r)},e}(),Mm=function(){function e(t){this._instrumentDescriptor=t}return e.prototype.getInstrumentDescriptor=function(){return this._instrumentDescriptor},e.prototype.updateDescription=function(t){this._instrumentDescriptor=sr(this._instrumentDescriptor.name,this._instrumentDescriptor.type,{description:t,valueType:this._instrumentDescriptor.valueType,unit:this._instrumentDescriptor.unit,advice:this._instrumentDescriptor.advice})},e}(),gZ=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Am=function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function l(a){return function(h){return u([a,h])}}function u(a){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(s=a[0]&2?i.return:a[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,a[1])).done)return s;switch(i=0,s&&(a=[a[0]&2,s.value]),a[0]){case 0:case 1:s=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){r.label=a[1];break}if(a[0]===6&&r.label<s[1]){r.label=s[1],s=a;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(a);break}s[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(h){a=[6,h],i=0}finally{n=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},yZ=function(){function e(t){this._hash=t,this._valueMap=new Map,this._keyMap=new Map}return e.prototype.get=function(t,r){return r!=null||(r=this._hash(t)),this._valueMap.get(r)},e.prototype.getOrDefault=function(t,r){var n=this._hash(t);if(this._valueMap.has(n))return this._valueMap.get(n);var i=r();return this._keyMap.has(n)||this._keyMap.set(n,t),this._valueMap.set(n,i),i},e.prototype.set=function(t,r,n){n!=null||(n=this._hash(t)),this._keyMap.has(n)||this._keyMap.set(n,t),this._valueMap.set(n,r)},e.prototype.has=function(t,r){return r!=null||(r=this._hash(t)),this._valueMap.has(r)},e.prototype.keys=function(){var t,r;return Am(this,function(n){switch(n.label){case 0:t=this._keyMap.entries(),r=t.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=t.next(),[3,1];case 3:return[2]}})},e.prototype.entries=function(){var t,r;return Am(this,function(n){switch(n.label){case 0:t=this._valueMap.entries(),r=t.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=t.next(),[3,1];case 3:return[2]}})},Object.defineProperty(e.prototype,"size",{get:function(){return this._valueMap.size},enumerable:!1,configurable:!0}),e}(),Ir=function(e){gZ(t,e);function t(){return e.call(this,wm)||this}return t}(yZ),bZ=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},Um=function(){function e(t,r){this._aggregator=t,this._activeCollectionStorage=new Ir,this._cumulativeMemoStorage=new Ir,this._overflowAttributes={"otel.metric.overflow":!0},this._cardinalityLimit=(r!=null?r:2e3)-1,this._overflowHashCode=wm(this._overflowAttributes)}return e.prototype.record=function(t,r,n,i){var s=this,o=this._activeCollectionStorage.get(r);if(!o){if(this._activeCollectionStorage.size>=this._cardinalityLimit){var l=this._activeCollectionStorage.getOrDefault(this._overflowAttributes,function(){return s._aggregator.createAccumulation(i)});l==null||l.record(t);return}o=this._aggregator.createAccumulation(i),this._activeCollectionStorage.set(r,o)}o==null||o.record(t)},e.prototype.batchCumulate=function(t,r){var n=this;Array.from(t.entries()).forEach(function(i){var s=bZ(i,3),o=s[0],l=s[1],u=s[2],a=n._aggregator.createAccumulation(r);a==null||a.record(l);var h=a;if(n._cumulativeMemoStorage.has(o,u)){var c=n._cumulativeMemoStorage.get(o,u);h=n._aggregator.diff(c,a)}else if(n._cumulativeMemoStorage.size>=n._cardinalityLimit&&(o=n._overflowAttributes,u=n._overflowHashCode,n._cumulativeMemoStorage.has(o,u))){var c=n._cumulativeMemoStorage.get(o,u);h=n._aggregator.diff(c,a)}if(n._activeCollectionStorage.has(o,u)){var f=n._activeCollectionStorage.get(o,u);h=n._aggregator.merge(f,h)}n._cumulativeMemoStorage.set(o,a,u),n._activeCollectionStorage.set(o,h,u)})},e.prototype.collect=function(){var t=this._activeCollectionStorage;return this._activeCollectionStorage=new Ir,t},e}(),yu=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Dm=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},Fm=function(){function e(t,r){var n=this;this._aggregator=t,this._unreportedAccumulations=new Map,this._reportHistory=new Map,r.forEach(function(i){n._unreportedAccumulations.set(i,[])})}return e.prototype.buildMetrics=function(t,r,n,i){this._stashAccumulations(n);var s=this._getMergedUnreportedAccumulations(t),o=s,l;if(this._reportHistory.has(t)){var u=this._reportHistory.get(t),a=u.collectionTime;l=u.aggregationTemporality,l===It.CUMULATIVE?o=e.merge(u.accumulations,s,this._aggregator):o=e.calibrateStartTime(u.accumulations,s,a)}else l=t.selectAggregationTemporality(r.type);this._reportHistory.set(t,{accumulations:o,collectionTime:i,aggregationTemporality:l});var h=vZ(o);if(h.length!==0)return this._aggregator.toMetricData(r,l,h,i)},e.prototype._stashAccumulations=function(t){var r,n,i=this._unreportedAccumulations.keys();try{for(var s=yu(i),o=s.next();!o.done;o=s.next()){var l=o.value,u=this._unreportedAccumulations.get(l);u===void 0&&(u=[],this._unreportedAccumulations.set(l,u)),u.push(t)}}catch(a){r={error:a}}finally{try{o&&!o.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}},e.prototype._getMergedUnreportedAccumulations=function(t){var r,n,i=new Ir,s=this._unreportedAccumulations.get(t);if(this._unreportedAccumulations.set(t,[]),s===void 0)return i;try{for(var o=yu(s),l=o.next();!l.done;l=o.next()){var u=l.value;i=e.merge(i,u,this._aggregator)}}catch(a){r={error:a}}finally{try{l&&!l.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return i},e.merge=function(t,r,n){for(var i=t,s=r.entries(),o=s.next();o.done!==!0;){var l=Dm(o.value,3),u=l[0],a=l[1],h=l[2];if(t.has(u,h)){var c=t.get(u,h),f=n.merge(c,a);i.set(u,f,h)}else i.set(u,a,h);o=s.next()}return i},e.calibrateStartTime=function(t,r,n){var i,s;try{for(var o=yu(t.keys()),l=o.next();!l.done;l=o.next()){var u=Dm(l.value,2),a=u[0],h=u[1],c=r.get(a,h);c==null||c.setStartTime(n)}}catch(f){i={error:f}}finally{try{l&&!l.done&&(s=o.return)&&s.call(o)}finally{if(i)throw i.error}}return r},e}();function vZ(e){return Array.from(e.entries())}var SZ=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),wZ=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},RZ=function(e){SZ(t,e);function t(r,n,i,s,o){var l=e.call(this,r)||this;return l._attributesProcessor=i,l._aggregationCardinalityLimit=o,l._deltaMetricStorage=new Um(n,l._aggregationCardinalityLimit),l._temporalMetricStorage=new Fm(n,s),l}return t.prototype.record=function(r,n){var i=this,s=new Ir;Array.from(r.entries()).forEach(function(o){var l=wZ(o,2),u=l[0],a=l[1];s.set(i._attributesProcessor.process(u),a)}),this._deltaMetricStorage.batchCumulate(s,n)},t.prototype.collect=function(r,n){var i=this._deltaMetricStorage.collect();return this._temporalMetricStorage.buildMetrics(r,this._instrumentDescriptor,i,n)},t}(Mm);function Jm(e,t){var r="";return e.unit!==t.unit&&(r+=" - Unit '"+e.unit+"' does not match '"+t.unit+`'
|
|
441
|
+
${gf}
|
|
442
|
+
`,MS=(e,t,r,n)=>e();function nl(e,t=MS){return{PushPayload(r,n){return t(i=>e.request(NS,r,x(x({},n),i)),"PushPayload","mutation",r)},PushSessionEvents(r,n){return t(i=>e.request(rl,r,x(x({},n),i)),"PushSessionEvents","mutation",r)},identifySession(r,n){return t(i=>e.request(OS,r,x(x({},n),i)),"identifySession","mutation",r)},addSessionProperties(r,n){return t(i=>e.request(GS,r,x(x({},n),i)),"addSessionProperties","mutation",r)},pushMetrics(r,n){return t(i=>e.request(VS,r,x(x({},n),i)),"pushMetrics","mutation",r)},addSessionFeedback(r,n){return t(i=>e.request(kS,r,x(x({},n),i)),"addSessionFeedback","mutation",r)},initializeSession(r,n){return t(i=>e.request(XS,r,x(x({},n),i)),"initializeSession","mutation",r)},Ignore(r,n){return t(i=>e.request(WS,r,x(x({},n),i)),"Ignore","query",r)},GetSamplingConfig(r,n){return t(i=>e.request(PS,r,x(x({},n),i)),"GetSamplingConfig","query",r)}}}const il=["assert","count","countReset","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","table","time","timeEnd","timeLog","trace","warn"];var Xe=(e=>(e.DeviceMemory="DeviceMemory",e.ViewportHeight="ViewportHeight",e.ViewportWidth="ViewportWidth",e.ScreenHeight="ScreenHeight",e.ScreenWidth="ScreenWidth",e.ViewportArea="ViewportArea",e))(Xe||{}),xe=(e=>(e.Device="Device",e.WebVital="WebVital",e.Performance="Performance",e.Frontend="Frontend",e.Backend="Backend",e))(xe||{});function AS(e,t,r){try{if(!(t in e))return()=>{};const n=e[t],i=r(n);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:n}})),e[t]=i,()=>{e[t]=n}}catch(n){return()=>{}}}function US(e){if(!e||!e.outerHTML)return"";let t="";for(;e.parentElement;){let r=e.localName;if(!r)break;r=r.toLowerCase();let n=e.parentElement,i=[];if(n.children&&n.children.length>0)for(let s=0;s<n.children.length;s++){let o=n.children[s];o.localName&&o.localName.toLowerCase&&o.localName.toLowerCase()===r&&i.push(o)}i.length>1&&(r+=":eq("+i.indexOf(e)+")"),t=r+(t?">"+t:""),e=n}return t}function sl(e){return Object.prototype.toString.call(e)==="[object Object]"}function yf(e,t){if(t===0)return!0;const r=Object.keys(e);for(const n of r)if(sl(e[n])&&yf(e[n],t-1))return!0;return!1}function ol(e,t){const r={numOfKeysLimit:50,depthOfLimit:4};Object.assign(r,t);const n=[],i=[];return JSON.stringify(e,function(l,c){if(n.length>0){const a=n.indexOf(this);~a?n.splice(a+1):n.push(this),~a?i.splice(a,1/0,l):i.push(l),~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(s(c))return o(c);if(c instanceof Event){const a={};for(const h in c){const u=c[h];Array.isArray(u)?a[h]=US(u.length?u[0]:null):a[h]=u}return a}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 s(l){return sl(l)&&Object.keys(l).length>r.numOfKeysLimit||typeof l=="function"?!0:l instanceof Event&&l.isTrusted===!1?Object.keys(l).length===1:!!(sl(l)&&yf(l,r.depthOfLimit))}function o(l){let c=l.toString();return r.stringLengthLimit&&c.length>r.stringLengthLimit&&(c=`${c.slice(0,r.stringLengthLimit)}...`),c}}function DS(){var e=document.createElement("canvas");return e.getContext&&e.getContext("2d")?e.toDataURL("image/webp").indexOf("data:image/webp")==0:!1}function bf(){return DS()?{type:"image/webp",quality:.9}:{type:"image/jpeg",quality:.6}}function vf(e){return typeof e=="number"&&!isNaN(e)&&isFinite(e)}var Sf={exports:{}},al={exports:{}},wf;function FS(){return wf||(wf=1,function(e,t){(function(r,n){e.exports=n()})(wo,function(){function r(m){return!isNaN(parseFloat(m))&&isFinite(m)}function n(m){return m.charAt(0).toUpperCase()+m.substring(1)}function i(m){return function(){return this[m]}}var s=["isConstructor","isEval","isNative","isToplevel"],o=["columnNumber","lineNumber"],l=["fileName","functionName","source"],c=["args"],a=["evalOrigin"],h=s.concat(o,l,c,a);function u(m){if(m)for(var g=0;g<h.length;g++)m[h[g]]!==void 0&&this["set"+n(h[g])](m[h[g]])}u.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 u)this.evalOrigin=m;else if(m instanceof Object)this.evalOrigin=new u(m);else throw new TypeError("Eval Origin must be an Object or StackFrame")},toString:function(){var m=this.getFileName()||"",g=this.getLineNumber()||"",v=this.getColumnNumber()||"",y=this.getFunctionName()||"";return this.getIsEval()?m?"[eval] ("+m+":"+g+":"+v+")":"[eval]:"+g+":"+v:y?y+" ("+m+":"+g+":"+v+")":m+":"+g+":"+v}},u.fromString=function(g){var v=g.indexOf("("),y=g.lastIndexOf(")"),w=g.substring(0,v),_=g.substring(v+1,y).split(","),S=g.substring(y+1);if(S.indexOf("@")===0)var b=/@(.+?)(?::(\d+))?(?::(\d+))?$/.exec(S,""),R=b[1],I=b[2],E=b[3];return new u({functionName:w,args:_||void 0,fileName:R,lineNumber:I||void 0,columnNumber:E||void 0})};for(var f=0;f<s.length;f++)u.prototype["get"+n(s[f])]=i(s[f]),u.prototype["set"+n(s[f])]=function(m){return function(g){this[m]=!!g}}(s[f]);for(var d=0;d<o.length;d++)u.prototype["get"+n(o[d])]=i(o[d]),u.prototype["set"+n(o[d])]=function(m){return function(g){if(!r(g))throw new TypeError(m+" must be a Number");this[m]=Number(g)}}(o[d]);for(var p=0;p<l.length;p++)u.prototype["get"+n(l[p])]=i(l[p]),u.prototype["set"+n(l[p])]=function(m){return function(g){this[m]=String(g)}}(l[p]);return u})}(al)),al.exports}(function(e,t){(function(r,n){e.exports=n(FS())})(wo,function(n){var i=/(^|@)\S+:\d+/,s=/^\s*at .*(\S+:\d+|\(native\))/m,o=/^(eval@)?(\[native code])?$/;return{parse:function(c){if(typeof c.stacktrace!="undefined"||typeof c["opera#sourceloc"]!="undefined")return this.parseOpera(c);if(c.stack&&c.stack.match(s))return this.parseV8OrIE(c);if(c.stack)return this.parseFFOrSafari(c);throw new Error("Cannot parse given Error object")},extractLocation:function(c){if(c.indexOf(":")===-1)return[c];var a=/(.+?)(?::(\d+))?(?::(\d+))?$/,h=a.exec(c.replace(/[()]/g,""));return[h[1],h[2]||void 0,h[3]||void 0]},parseV8OrIE:function(c){var a=c.stack.split(`
|
|
443
|
+
`).filter(function(h){return!!h.match(s)},this);return a.map(function(h){h.indexOf("(eval ")>-1&&(h=h.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(\),.*$)/g,""));var u=h.replace(/^\s+/,"").replace(/\(eval code/g,"("),f=u.match(/ (\((.+):(\d+):(\d+)\)$)/);u=f?u.replace(f[0],""):u;var d=u.split(/\s+/).slice(1),p=this.extractLocation(f?f[1]:d.pop()),m=d.join(" ")||void 0,g=["eval","<anonymous>"].indexOf(p[0])>-1?void 0:p[0];return new n({functionName:m,fileName:g,lineNumber:p[1],columnNumber:p[2],source:h})},this)},parseFFOrSafari:function(c){var a=c.stack.split(`
|
|
444
|
+
`).filter(function(h){return!h.match(o)},this);return a.map(function(h){if(h.indexOf(" > eval")>-1&&(h=h.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),h.indexOf("@")===-1&&h.indexOf(":")===-1)return new n({functionName:h});var u=/((.*".+"[^@]*)?[^@]*)(?:@)/,f=h.match(u),d=f&&f[1]?f[1]:void 0,p=this.extractLocation(h.replace(u,""));return new n({functionName:d,fileName:p[0],lineNumber:p[1],columnNumber:p[2],source:h})},this)},parseOpera:function(c){return!c.stacktrace||c.message.indexOf(`
|
|
445
|
+
`)>-1&&c.message.split(`
|
|
446
|
+
`).length>c.stacktrace.split(`
|
|
447
|
+
`).length?this.parseOpera9(c):c.stack?this.parseOpera11(c):this.parseOpera10(c)},parseOpera9:function(c){for(var a=/Line (\d+).*script (?:in )?(\S+)/i,h=c.message.split(`
|
|
448
|
+
`),u=[],f=2,d=h.length;f<d;f+=2){var p=a.exec(h[f]);p&&u.push(new n({fileName:p[2],lineNumber:p[1],source:h[f]}))}return u},parseOpera10:function(c){for(var a=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,h=c.stacktrace.split(`
|
|
449
|
+
`),u=[],f=0,d=h.length;f<d;f+=2){var p=a.exec(h[f]);p&&u.push(new n({functionName:p[3]||void 0,fileName:p[2],lineNumber:p[1],source:h[f]}))}return u},parseOpera11:function(c){var a=c.stack.split(`
|
|
450
|
+
`).filter(function(h){return!!h.match(i)&&!h.match(/^Error created at/)},this);return a.map(function(h){var u=h.split("@"),f=this.extractLocation(u.pop()),d=u.shift()||"",p=d.replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^)]*\)/g,"")||void 0,m;d.match(/\(([^)]*)\)/)&&(m=d.replace(/^[^(]+\(([^)]*)\)$/,"$1"));var g=m===void 0||m==="[arguments not available]"?void 0:m.split(",");return new n({functionName:p,args:g,fileName:f[0],lineNumber:f[1],columnNumber:f[2],source:h})},this)}}})})(Sf);var JS=Sf.exports;const Rf=gi(JS),ll={},HS=["debug","log","info","warn","error"],cl=Symbol.for("@launchdarkly/o11y.sdkLogger"),YS=(()=>{try{return(ll==null?void 0:ll.DEBUG)==="true"}catch(e){return!1}})(),Yr=(()=>{var r;const e=globalThis,t=(r=e[cl])!=null?r:e[cl]={debugEnabled:!1,suppressDepth:0};return YS&&(t.debugEnabled=!0),t})(),ul=e=>{Yr.debugEnabled=e},_f=()=>Yr.debugEnabled,BS=()=>Yr.suppressDepth>0,dl=e=>{Yr.suppressDepth++;try{return e()}finally{Yr.suppressDepth--}},zS=e=>HS.includes(e)?e:"log",_e=(e,...t)=>{Yr.debugEnabled&&dl(()=>{var r;try{((r=console[zS(e)])!=null?r:console.log).apply(console,t)}catch(n){}})};function En(e){try{return Rf.parse(e)}catch(t){try{return Rf.parse(new Error)}catch(r){return _e("warn","Highlight Warning: failed to parse error",{originalError:t,secondaryError:r}),[]}}}const Tf=(e,t,r)=>{const n=ts(t,e.headers,r);return B(x({},e),{headers:n})},ts=(e,t,r)=>{var i,s;const n=x({},t);return r?((i=Object.keys(n))==null||i.forEach(o=>{[...r].includes(o==null?void 0:o.toLowerCase())||(n[o]="[REDACTED]")}),n):((s=Object.keys(n))==null||s.forEach(o=>{[...KS,...e].includes(o==null?void 0:o.toLowerCase())&&(n[o]="[REDACTED]")}),n)},KS=["authorization","cookie","proxy-authorization","set-cookie","token"],Ef=["https://www.googleapis.com/identitytoolkit","https://securetoken.googleapis.com","browser-intake-datadoghq.com","browser-intake-datadoghq.eu","browser-intake-us3-datadoghq.com","browser-intake-us5-datadoghq.com","browser-intake-ap1-datadoghq.com","browser-intake-ddog-gov.com","r.lr-ingest.io","r.lr-in-prod.com","r.logrocket.io","data.pendo.io","ingest.sentry.io","ingest.us.sentry.io","ingest.de.sentry.io","bam.nr-data.net","bam-cell.nr-data.net","rs.fullstory.com","in.hotjar.com","api2.amplitude.com","api.mixpanel.com","api.segment.io/v1","google-analytics.com/g/collect","analytics.google.com/g/collect"],jS=["awsaccesskeyid","signature","sig","x-goog-signature","access_token","id_token","token","code","refresh_token","session_state"],QS=["access_token","id_token","token","code","refresh_token","session_state"],$S=/(\/eval\/[0-9a-f]{24}\/|\/sdk\/evalx?\/[0-9a-f]{24}\/(?:contexts|users)\/)([A-Za-z0-9+_=%-]{8,})/g,rs=e=>typeof e!="string"||!e.includes("eval")?e:e.replace($S,"$1REDACTED"),If=e=>{var t,r;try{return new URL(e)}catch(n){return new URL(e,(r=(t=globalThis.location)==null?void 0:t.origin)!=null?r:"http://example.com")}},qS=e=>{if(!e||e==="#")return"";const t=e.slice(1);if(!t.includes("="))return e;const r=t.indexOf("?"),n=r>=0?t.slice(r+1):t,i=new URLSearchParams(n);for(const s of i.keys())if(QS.includes(s.toLowerCase()))return"";return e},ns=e=>{try{const t=If(e);(t.username||t.password)&&(t.username="REDACTED",t.password="REDACTED"),t.pathname=rs(t.pathname);const r=t.searchParams;jS.forEach(i=>{for(const s of Array.from(r.keys()))s.toLowerCase()===i&&r.set(s,"REDACTED")});const n=qS(t.hash);if(t.hash=n,!e.includes("://")&&!e.startsWith("//"))return t.pathname+t.search+n;if(e.startsWith("//")){let i="//";return(t.username||t.password)&&(i+=t.username+":"+t.password+"@"),i+=t.host+t.pathname+t.search+n,i}return t.toString()}catch(t){return e}},ew=/^\s*(?:(?:debug|info|warn|error|none):\s*)?\[LaunchDarkly\]/,tw=e=>{const t=e[0];return typeof t=="string"&&ew.test(t)},Cf={level:[...il],logger:"console",stringifyOptions:{depthOfLimit:10,numOfKeysLimit:100,stringLengthLimit:1e3}};function Zf(e,t){const r=t.logger;if(!r)return()=>{};let n;typeof r=="string"?n=window[r]:n=r;const i=[];if(t.level.includes("error")&&window){const o=l=>{const{message:c,error:a}=l;let h=[];a&&(h=En(a));const u=[ol(c,t.stringifyOptions)];e({type:"Error",trace:h,time:Date.now(),value:u})};window.addEventListener("error",o),i.push(()=>{window&&window.removeEventListener("error",o)})}for(const o of t.level)i.push(s(n,o));return()=>{i.forEach(o=>o())};function s(o,l){return o[l]?AS(o,l,c=>(...a)=>{if(c.apply(this,a),!BS()&&!(!t.recordLaunchDarklySdkLogs&&tw(a)))try{e(Lf(l,t,...a))}catch(h){c("highlight logger error:",h,...a)}}):()=>{}}}function Lf(e,t,...r){const n=En(new Error),i=(t.serializeConsoleAttributes?r.map(s=>typeof s=="object"?ol(s,t.stringifyOptions):s):r.filter(s=>typeof s!="object").map(s=>`${s}`)).map(s=>typeof s=="string"?rs(s):s);return{type:e,trace:n,value:i,attributes:rs(ol(r.filter(s=>typeof s=="object").reduce((s,o)=>x(x({},s),o),{}),t.stringifyOptions)),time:Date.now()}}const rw={start:0,end:3},nw={start:4,end:5},hl={start:6,end:7},fl={start:8,end:8},iw={start:9,end:9},sw={start:10,end:15};function ow(){if(crypto&&crypto.getRandomValues){const t=new Uint8Array(16);return crypto.getRandomValues(t),[...t.values()]}const e=[];for(let t=0;t<16;t+=1)e.push(Math.floor(Math.random()*256));return e}function Br(e,t){let r="";for(let n=t.start;n<=t.end;n+=1)r+=e[n].toString(16).padStart(2,"0");return r}function aw(e){return e[fl.start]=(e[fl.start]|128)&191,e[hl.start]=e[hl.start]&15|64,`${Br(e,rw)}-${Br(e,nw)}-${Br(e,hl)}-${Br(e,fl)}${Br(e,iw)}-${Br(e,sw)}`}function lw(){const e=ow();return aw(e)}function In(){return typeof crypto!="undefined"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():lw()}function pl(e,t,r,n){var c,a,h,u;let i=n!=null?n:t,s=En(i),o={};if(t instanceof Error){const f=t.cause;t=t.message,f&&(o={"exception.cause":f})}const l=cw(s);e({error:i,event:Rt(t),type:"window.onerror",url:window.location.href,source:r!=null?r:"",lineNumber:(c=l[0])!=null&&c.lineNumber?(a=l[0])==null?void 0:a.lineNumber:0,columnNumber:(h=l[0])!=null&&h.columnNumber?(u=l[0])==null?void 0:u.columnNumber:0,stackTrace:l,timestamp:new Date().toISOString(),payload:o?Rt(o):void 0,id:In()})}const xf=(e,{enablePromisePatch:t})=>{if(typeof window=="undefined")return()=>{};const r=window.onerror;window.onerror=(o,l,c,a,h)=>{pl(e,o,l,h)};const n=window.onunhandledrejection;window.onunhandledrejection=o=>{if(o.reason){const l=o.promise;l.getStack?pl(e,o.reason,o.type,l.getStack()):pl(e,o.reason,o.type)}};const i=window.Promise,s=class extends i{constructor(c){super(c);L(this,"promiseCreationError");this.promiseCreationError=new Error}getStack(){return this.promiseCreationError}static shouldPatch(){const c=typeof window.Zone=="undefined";return t&&c}};return s.shouldPatch()&&(window.Promise=s),()=>{window.Promise=i,window.onunhandledrejection=n,window.onerror=r}},cw=e=>{var r,n;if(e.length===0)return e;const t=e[0];return(r=t.fileName)!=null&&r.includes("highlight.run")||(n=t.fileName)!=null&&n.includes("highlight.io")||t.functionName==="new highlightPromise"?e.slice(1):e},ml=['["\\"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}','["{}"]','"{}"','[""]','""','["\\"\\""]','""'],gl=["websocket error",'\\"ResizeObserver loop'];var uw=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{},mr="1.9.0",Nf=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;function dw(e){var t=new Set([e]),r=new Set,n=e.match(Nf);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(c){return c===e};function s(l){return r.add(l),!1}function o(l){return t.add(l),!0}return function(c){if(t.has(c))return!0;if(r.has(c))return!1;var a=c.match(Nf);if(!a)return s(c);var h={major:+a[1],minor:+a[2],patch:+a[3],prerelease:a[4]};return h.prerelease!=null||i.major!==h.major?s(c):i.major===0?i.minor===h.minor&&i.patch<=h.patch?o(c):s(c):i.minor<=h.minor?o(c):s(c)}}var hw=dw(mr),fw=mr.split(".")[0],Cn=Symbol.for("opentelemetry.js.api."+fw),Zn=uw;function Ln(e,t,r,n){var i;n===void 0&&(n=!1);var s=Zn[Cn]=(i=Zn[Cn])!==null&&i!==void 0?i:{version:mr};if(!n&&s[e]){var o=new Error("@opentelemetry/api: Attempted duplicate registration of API: "+e);return r.error(o.stack||o.message),!1}if(s.version!==mr){var o=new Error("@opentelemetry/api: Registration of version v"+s.version+" for "+e+" does not match previously registered API v"+mr);return r.error(o.stack||o.message),!1}return s[e]=t,r.debug("@opentelemetry/api: Registered a global for "+e+" v"+mr+"."),!0}function gr(e){var t,r,n=(t=Zn[Cn])===null||t===void 0?void 0:t.version;if(!(!n||!hw(n)))return(r=Zn[Cn])===null||r===void 0?void 0:r[e]}function xn(e,t){t.debug("@opentelemetry/api: Unregistering a global for "+e+" v"+mr+".");var r=Zn[Cn];r&&delete r[e]}var pw=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},mw=function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,s;n<i;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))},gw=function(){function e(t){this._namespace=t.namespace||"DiagComponentLogger"}return e.prototype.debug=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return Nn("debug",this._namespace,t)},e.prototype.error=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return Nn("error",this._namespace,t)},e.prototype.info=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return Nn("info",this._namespace,t)},e.prototype.warn=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return Nn("warn",this._namespace,t)},e.prototype.verbose=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return Nn("verbose",this._namespace,t)},e}();function Nn(e,t,r){var n=gr("diag");if(n)return r.unshift(t),n[e].apply(n,mw([],pw(r),!1))}var Ne;(function(e){e[e.NONE=0]="NONE",e[e.ERROR=30]="ERROR",e[e.WARN=50]="WARN",e[e.INFO=60]="INFO",e[e.DEBUG=70]="DEBUG",e[e.VERBOSE=80]="VERBOSE",e[e.ALL=9999]="ALL"})(Ne||(Ne={}));function yw(e,t){e<Ne.NONE?e=Ne.NONE:e>Ne.ALL&&(e=Ne.ALL),t=t||{};function r(n,i){var s=t[n];return typeof s=="function"&&e>=i?s.bind(t):function(){}}return{error:r("error",Ne.ERROR),warn:r("warn",Ne.WARN),info:r("info",Ne.INFO),debug:r("debug",Ne.DEBUG),verbose:r("verbose",Ne.VERBOSE)}}var bw=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},vw=function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,s;n<i;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))},Sw="diag",Lt=function(){function e(){function t(i){return function(){for(var s=[],o=0;o<arguments.length;o++)s[o]=arguments[o];var l=gr("diag");if(l)return l[i].apply(l,vw([],bw(s),!1))}}var r=this,n=function(i,s){var o,l,c;if(s===void 0&&(s={logLevel:Ne.INFO}),i===r){var a=new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");return r.error((o=a.stack)!==null&&o!==void 0?o:a.message),!1}typeof s=="number"&&(s={logLevel:s});var h=gr("diag"),u=yw((l=s.logLevel)!==null&&l!==void 0?l:Ne.INFO,i);if(h&&!s.suppressOverrideMessage){var f=(c=new Error().stack)!==null&&c!==void 0?c:"<failed to generate stacktrace>";h.warn("Current logger will be overwritten from "+f),u.warn("Current logger will overwrite one already registered from "+f)}return Ln("diag",u,r,!0)};r.setLogger=n,r.disable=function(){xn(Sw,r)},r.createComponentLogger=function(i){return new gw(i)},r.verbose=t("verbose"),r.debug=t("debug"),r.info=t("info"),r.warn=t("warn"),r.error=t("error")}return e.instance=function(){return this._instance||(this._instance=new e),this._instance},e}(),ww=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},Rw=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},_w=function(){function e(t){this._entries=t?new Map(t):new Map}return e.prototype.getEntry=function(t){var r=this._entries.get(t);if(r)return Object.assign({},r)},e.prototype.getAllEntries=function(){return Array.from(this._entries.entries()).map(function(t){var r=ww(t,2),n=r[0],i=r[1];return[n,i]})},e.prototype.setEntry=function(t,r){var n=new e(this._entries);return n._entries.set(t,r),n},e.prototype.removeEntry=function(t){var r=new e(this._entries);return r._entries.delete(t),r},e.prototype.removeEntries=function(){for(var t,r,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];var s=new e(this._entries);try{for(var o=Rw(n),l=o.next();!l.done;l=o.next()){var c=l.value;s._entries.delete(c)}}catch(a){t={error:a}}finally{try{l&&!l.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}return s},e.prototype.clear=function(){return new e},e}(),Tw=Symbol("BaggageEntryMetadata"),Ew=Lt.instance();function Iw(e){return e===void 0&&(e={}),new _w(new Map(Object.entries(e)))}function Cw(e){return typeof e!="string"&&(Ew.error("Cannot create baggage metadata from unknown type: "+typeof e),e=""),{__TYPE__:Tw,toString:function(){return e}}}function yl(e){return Symbol.for(e)}var Zw=function(){function e(t){var r=this;r._currentContext=t?new Map(t):new Map,r.getValue=function(n){return r._currentContext.get(n)},r.setValue=function(n,i){var s=new e(r._currentContext);return s._currentContext.set(n,i),s},r.deleteValue=function(n){var i=new e(r._currentContext);return i._currentContext.delete(n),i}}return e}(),yr=new Zw,br=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Lw=function(){function e(){}return e.prototype.createGauge=function(t,r){return Pw},e.prototype.createHistogram=function(t,r){return Mw},e.prototype.createCounter=function(t,r){return Ww},e.prototype.createUpDownCounter=function(t,r){return Aw},e.prototype.createObservableGauge=function(t,r){return Dw},e.prototype.createObservableCounter=function(t,r){return Uw},e.prototype.createObservableUpDownCounter=function(t,r){return Fw},e.prototype.addBatchObservableCallback=function(t,r){},e.prototype.removeBatchObservableCallback=function(t){},e}(),is=function(){function e(){}return e}(),xw=function(e){br(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.add=function(r,n){},t}(is),Nw=function(e){br(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.add=function(r,n){},t}(is),Ow=function(e){br(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.record=function(r,n){},t}(is),Gw=function(e){br(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.record=function(r,n){},t}(is),bl=function(){function e(){}return e.prototype.addCallback=function(t){},e.prototype.removeCallback=function(t){},e}(),Vw=function(e){br(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(bl),kw=function(e){br(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(bl),Xw=function(e){br(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(bl),Of=new Lw,Ww=new xw,Pw=new Ow,Mw=new Gw,Aw=new Nw,Uw=new Vw,Dw=new kw,Fw=new Xw;function Jw(){return Of}var qt;(function(e){e[e.INT=0]="INT",e[e.DOUBLE=1]="DOUBLE"})(qt||(qt={}));var Hw={get:function(e,t){if(e!=null)return e[t]},keys:function(e){return e==null?[]:Object.keys(e)}},Yw={set:function(e,t,r){e!=null&&(e[t]=r)}},Bw=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},zw=function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,s;n<i;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))},Kw=function(){function e(){}return e.prototype.active=function(){return yr},e.prototype.with=function(t,r,n){for(var i=[],s=3;s<arguments.length;s++)i[s-3]=arguments[s];return r.call.apply(r,zw([n],Bw(i),!1))},e.prototype.bind=function(t,r){return r},e.prototype.enable=function(){return this},e.prototype.disable=function(){return this},e}(),jw=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},Qw=function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,s;n<i;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))},vl="context",$w=new Kw,ss=function(){function e(){}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalContextManager=function(t){return Ln(vl,t,Lt.instance())},e.prototype.active=function(){return this._getContextManager().active()},e.prototype.with=function(t,r,n){for(var i,s=[],o=3;o<arguments.length;o++)s[o-3]=arguments[o];return(i=this._getContextManager()).with.apply(i,Qw([t,r,n],jw(s),!1))},e.prototype.bind=function(t,r){return this._getContextManager().bind(t,r)},e.prototype._getContextManager=function(){return gr(vl)||$w},e.prototype.disable=function(){this._getContextManager().disable(),xn(vl,Lt.instance())},e}(),Mt;(function(e){e[e.NONE=0]="NONE",e[e.SAMPLED=1]="SAMPLED"})(Mt||(Mt={}));var Gf="0000000000000000",Vf="00000000000000000000000000000000",kf={traceId:Vf,spanId:Gf,traceFlags:Mt.NONE},On=function(){function e(t){t===void 0&&(t=kf),this._spanContext=t}return e.prototype.spanContext=function(){return this._spanContext},e.prototype.setAttribute=function(t,r){return this},e.prototype.setAttributes=function(t){return this},e.prototype.addEvent=function(t,r){return this},e.prototype.addLink=function(t){return this},e.prototype.addLinks=function(t){return this},e.prototype.setStatus=function(t){return this},e.prototype.updateName=function(t){return this},e.prototype.end=function(t){},e.prototype.isRecording=function(){return!1},e.prototype.recordException=function(t,r){},e}(),Sl=yl("OpenTelemetry Context Key SPAN");function wl(e){return e.getValue(Sl)||void 0}function qw(){return wl(ss.getInstance().active())}function Rl(e,t){return e.setValue(Sl,t)}function eR(e){return e.deleteValue(Sl)}function tR(e,t){return Rl(e,new On(t))}function Xf(e){var t;return(t=wl(e))===null||t===void 0?void 0:t.spanContext()}var rR=/^([0-9a-f]{32})$/i,nR=/^[0-9a-f]{16}$/i;function Wf(e){return rR.test(e)&&e!==Vf}function iR(e){return nR.test(e)&&e!==Gf}function os(e){return Wf(e.traceId)&&iR(e.spanId)}function sR(e){return new On(e)}var _l=ss.getInstance(),Pf=function(){function e(){}return e.prototype.startSpan=function(t,r,n){n===void 0&&(n=_l.active());var i=!!(r!=null&&r.root);if(i)return new On;var s=n&&Xf(n);return oR(s)&&os(s)?new On(s):new On},e.prototype.startActiveSpan=function(t,r,n,i){var s,o,l;if(!(arguments.length<2)){arguments.length===2?l=r:arguments.length===3?(s=r,l=n):(s=r,o=n,l=i);var c=o!=null?o:_l.active(),a=this.startSpan(t,s,c),h=Rl(c,a);return _l.with(h,l,void 0,a)}},e}();function oR(e){return typeof e=="object"&&typeof e.spanId=="string"&&typeof e.traceId=="string"&&typeof e.traceFlags=="number"}var aR=new Pf,lR=function(){function e(t,r,n,i){this._provider=t,this.name=r,this.version=n,this.options=i}return e.prototype.startSpan=function(t,r,n){return this._getTracer().startSpan(t,r,n)},e.prototype.startActiveSpan=function(t,r,n,i){var s=this._getTracer();return Reflect.apply(s.startActiveSpan,s,arguments)},e.prototype._getTracer=function(){if(this._delegate)return this._delegate;var t=this._provider.getDelegateTracer(this.name,this.version,this.options);return t?(this._delegate=t,this._delegate):aR},e}(),cR=function(){function e(){}return e.prototype.getTracer=function(t,r,n){return new Pf},e}(),uR=new cR,Mf=function(){function e(){}return e.prototype.getTracer=function(t,r,n){var i;return(i=this.getDelegateTracer(t,r,n))!==null&&i!==void 0?i:new lR(this,t,r,n)},e.prototype.getDelegate=function(){var t;return(t=this._delegate)!==null&&t!==void 0?t:uR},e.prototype.setDelegate=function(t){this._delegate=t},e.prototype.getDelegateTracer=function(t,r,n){var i;return(i=this._delegate)===null||i===void 0?void 0:i.getTracer(t,r,n)},e}(),as;(function(e){e[e.NOT_RECORD=0]="NOT_RECORD",e[e.RECORD=1]="RECORD",e[e.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(as||(as={}));var Gn;(function(e){e[e.INTERNAL=0]="INTERNAL",e[e.SERVER=1]="SERVER",e[e.CLIENT=2]="CLIENT",e[e.PRODUCER=3]="PRODUCER",e[e.CONSUMER=4]="CONSUMER"})(Gn||(Gn={}));var ls;(function(e){e[e.UNSET=0]="UNSET",e[e.OK=1]="OK",e[e.ERROR=2]="ERROR"})(ls||(ls={}));var pe=ss.getInstance(),Y=Lt.instance(),dR=function(){function e(){}return e.prototype.getMeter=function(t,r,n){return Of},e}(),hR=new dR,Tl="metrics",fR=function(){function e(){}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalMeterProvider=function(t){return Ln(Tl,t,Lt.instance())},e.prototype.getMeterProvider=function(){return gr(Tl)||hR},e.prototype.getMeter=function(t,r,n){return this.getMeterProvider().getMeter(t,r,n)},e.prototype.disable=function(){xn(Tl,Lt.instance())},e}(),El=fR.getInstance(),pR=function(){function e(){}return e.prototype.inject=function(t,r){},e.prototype.extract=function(t,r){return t},e.prototype.fields=function(){return[]},e}(),Il=yl("OpenTelemetry Baggage Key");function Af(e){return e.getValue(Il)||void 0}function mR(){return Af(ss.getInstance().active())}function gR(e,t){return e.setValue(Il,t)}function yR(e){return e.deleteValue(Il)}var Cl="propagation",bR=new pR,vR=function(){function e(){this.createBaggage=Iw,this.getBaggage=Af,this.getActiveBaggage=mR,this.setBaggage=gR,this.deleteBaggage=yR}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalPropagator=function(t){return Ln(Cl,t,Lt.instance())},e.prototype.inject=function(t,r,n){return n===void 0&&(n=Yw),this._getGlobalPropagator().inject(t,r,n)},e.prototype.extract=function(t,r,n){return n===void 0&&(n=Hw),this._getGlobalPropagator().extract(t,r,n)},e.prototype.fields=function(){return this._getGlobalPropagator().fields()},e.prototype.disable=function(){xn(Cl,Lt.instance())},e.prototype._getGlobalPropagator=function(){return gr(Cl)||bR},e}(),ht=vR.getInstance(),Zl="trace",SR=function(){function e(){this._proxyTracerProvider=new Mf,this.wrapSpanContext=sR,this.isSpanContextValid=os,this.deleteSpan=eR,this.getSpan=wl,this.getActiveSpan=qw,this.getSpanContext=Xf,this.setSpan=Rl,this.setSpanContext=tR}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalTracerProvider=function(t){var r=Ln(Zl,this._proxyTracerProvider,Lt.instance());return r&&this._proxyTracerProvider.setDelegate(t),r},e.prototype.getTracerProvider=function(){return gr(Zl)||this._proxyTracerProvider},e.prototype.getTracer=function(t,r){return this.getTracerProvider().getTracer(t,r)},e.prototype.disable=function(){xn(Zl,Lt.instance()),this._proxyTracerProvider=new Mf},e}(),we=SR.getInstance(),Uf=yl("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function Df(e){return e.setValue(Uf,!0)}function Ll(e){return e.getValue(Uf)===!0}var wR="=",xl=";",Nl=",",Ol="baggage",RR=180,_R=4096,TR=8192,ER=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s};function IR(e){return e.reduce(function(t,r){var n=""+t+(t!==""?Nl:"")+r;return n.length>TR?t:n},"")}function CR(e){return e.getAllEntries().map(function(t){var r=ER(t,2),n=r[0],i=r[1],s=encodeURIComponent(n)+"="+encodeURIComponent(i.value);return i.metadata!==void 0&&(s+=xl+i.metadata.toString()),s})}function ZR(e){var t=e.split(xl);if(!(t.length<=0)){var r=t.shift();if(r){var n=r.indexOf(wR);if(!(n<=0)){var i=decodeURIComponent(r.substring(0,n).trim()),s=decodeURIComponent(r.substring(n+1).trim()),o;return t.length>0&&(o=Cw(t.join(xl))),{key:i,value:s,metadata:o}}}}}var Ff=function(){function e(){}return e.prototype.inject=function(t,r,n){var i=ht.getBaggage(t);if(!(!i||Ll(t))){var s=CR(i).filter(function(l){return l.length<=_R}).slice(0,RR),o=IR(s);o.length>0&&n.set(r,Ol,o)}},e.prototype.extract=function(t,r,n){var i=n.get(r,Ol),s=Array.isArray(i)?i.join(Nl):i;if(!s)return t;var o={};if(s.length===0)return t;var l=s.split(Nl);return l.forEach(function(c){var a=ZR(c);if(a){var h={value:a.value};a.metadata&&(h.metadata=a.metadata),o[a.key]=h}}),Object.entries(o).length===0?t:ht.setBaggage(t,ht.createBaggage(o))},e.prototype.fields=function(){return[Ol]},e}(),Jf=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},LR=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s};function cs(e){var t,r,n={};if(typeof e!="object"||e==null)return n;try{for(var i=Jf(Object.entries(e)),s=i.next();!s.done;s=i.next()){var o=LR(s.value,2),l=o[0],c=o[1];if(!xR(l)){Y.warn("Invalid attribute key: "+l);continue}if(!Hf(c)){Y.warn("Invalid attribute value set for key: "+l);continue}Array.isArray(c)?n[l]=c.slice():n[l]=c}}catch(a){t={error:a}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return n}function xR(e){return typeof e=="string"&&e.length>0}function Hf(e){return e==null?!0:Array.isArray(e)?NR(e):Yf(e)}function NR(e){var t,r,n;try{for(var i=Jf(e),s=i.next();!s.done;s=i.next()){var o=s.value;if(o!=null){if(!n){if(Yf(o)){n=typeof o;continue}return!1}if(typeof o!==n)return!1}}}catch(l){t={error:l}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return!0}function Yf(e){switch(typeof e){case"number":case"boolean":case"string":return!0}return!1}function OR(){return function(e){Y.error(GR(e))}}function GR(e){return typeof e=="string"?e:JSON.stringify(VR(e))}function VR(e){for(var t={},r=e;r!==null;)Object.getOwnPropertyNames(r).forEach(function(n){if(!t[n]){var i=r[n];i&&(t[n]=String(i))}}),r=Object.getPrototypeOf(r);return t}var kR=OR();function er(e){try{kR(e)}catch(t){}}var xt;(function(e){e.AlwaysOff="always_off",e.AlwaysOn="always_on",e.ParentBasedAlwaysOff="parentbased_always_off",e.ParentBasedAlwaysOn="parentbased_always_on",e.ParentBasedTraceIdRatio="parentbased_traceidratio",e.TraceIdRatio="traceidratio"})(xt||(xt={}));var XR=",",WR=["OTEL_SDK_DISABLED"];function PR(e){return WR.indexOf(e)>-1}var MR=["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 AR(e){return MR.indexOf(e)>-1}var UR=["OTEL_NO_PATCH_MODULES","OTEL_PROPAGATORS","OTEL_SEMCONV_STABILITY_OPT_IN"];function DR(e){return UR.indexOf(e)>-1}var us=1/0,ds=128,FR=128,JR=128,Bf={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:Ne.INFO,OTEL_NO_PATCH_MODULES:[],OTEL_PROPAGATORS:["tracecontext","baggage"],OTEL_RESOURCE_ATTRIBUTES:"",OTEL_SERVICE_NAME:"",OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT:us,OTEL_ATTRIBUTE_COUNT_LIMIT:ds,OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT:us,OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT:ds,OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT:us,OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT:ds,OTEL_SPAN_EVENT_COUNT_LIMIT:128,OTEL_SPAN_LINK_COUNT_LIMIT:128,OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT:FR,OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT:JR,OTEL_TRACES_EXPORTER:"",OTEL_TRACES_SAMPLER:xt.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 HR(e,t,r){if(typeof r[e]!="undefined"){var n=String(r[e]);t[e]=n.toLowerCase()==="true"}}function YR(e,t,r,n,i){if(n===void 0&&(n=-1/0),i===void 0&&(i=1/0),typeof r[e]!="undefined"){var s=Number(r[e]);isNaN(s)||(s<n?t[e]=n:s>i?t[e]=i:t[e]=s)}}function BR(e,t,r,n){n===void 0&&(n=XR);var i=r[e];typeof i=="string"&&(t[e]=i.split(n).map(function(s){return s.trim()}))}var zR={ALL:Ne.ALL,VERBOSE:Ne.VERBOSE,DEBUG:Ne.DEBUG,INFO:Ne.INFO,WARN:Ne.WARN,ERROR:Ne.ERROR,NONE:Ne.NONE};function KR(e,t,r){var n=r[e];if(typeof n=="string"){var i=zR[n.toUpperCase()];i!=null&&(t[e]=i)}}function zf(e){var t={};for(var r in Bf){var n=r;switch(n){case"OTEL_LOG_LEVEL":KR(n,t,e);break;default:if(PR(n))HR(n,t,e);else if(AR(n))YR(n,t,e);else if(DR(n))BR(n,t,e);else{var i=e[n];typeof i!="undefined"&&i!==null&&(t[n]=String(i))}}}return t}var Vn=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{};function zr(){var e=zf(Vn);return Object.assign({},Bf,e)}function jR(){return zf(Vn)}function Kf(e){return e>=48&&e<=57?e-48:e>=97&&e<=102?e-87:e-55}function Gl(e){for(var t=new Uint8Array(e.length/2),r=0,n=0;n<e.length;n+=2){var i=Kf(e.charCodeAt(n)),s=Kf(e.charCodeAt(n+1));t[r++]=i<<4|s}return t}var ft=performance,QR="1.30.1",$R="process.runtime.name",qR="telemetry.sdk.name",e_="telemetry.sdk.language",t_="telemetry.sdk.version",r_=$R,n_=qR,i_=e_,s_=t_,o_="webjs",a_=o_,Kr,Vl=(Kr={},Kr[n_]="opentelemetry",Kr[r_]="browser",Kr[i_]=a_,Kr[s_]=QR,Kr),l_=9,c_=6,u_=Math.pow(10,c_),hs=Math.pow(10,l_);function pt(e){var t=e/1e3,r=Math.trunc(t),n=Math.round(e%1e3*u_);return[r,n]}function kl(){var e=ft.timeOrigin;if(typeof e!="number"){var t=ft;e=t.timing&&t.timing.fetchStart}return e}function vr(e){var t=pt(kl()),r=pt(typeof e=="number"?e:ft.now());return Qf(t,r)}function kn(e){if(Xl(e))return e;if(typeof e=="number")return e<kl()?vr(e):pt(e);if(e instanceof Date)return pt(e.getTime());throw TypeError("Invalid input type")}function d_(e,t){var r=t[0]-e[0],n=t[1]-e[1];return n<0&&(r-=1,n+=hs),[r,n]}function At(e){return e[0]*hs+e[1]}function fs(e){return e[0]*1e6+e[1]/1e3}function Xl(e){return Array.isArray(e)&&e.length===2&&typeof e[0]=="number"&&typeof e[1]=="number"}function jf(e){return Xl(e)||typeof e=="number"||e instanceof Date}function Qf(e,t){var r=[e[0]+t[0],e[1]+t[1]];return r[1]>=hs&&(r[1]-=hs,r[0]+=1),r}var Ie;(function(e){e[e.SUCCESS=0]="SUCCESS",e[e.FAILED=1]="FAILED"})(Ie||(Ie={}));var h_=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},$f=function(){function e(t){t===void 0&&(t={});var r;this._propagators=(r=t.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 e.prototype.inject=function(t,r,n){var i,s;try{for(var o=h_(this._propagators),l=o.next();!l.done;l=o.next()){var c=l.value;try{c.inject(t,r,n)}catch(a){Y.warn("Failed to inject with "+c.constructor.name+". Err: "+a.message)}}}catch(a){i={error:a}}finally{try{l&&!l.done&&(s=o.return)&&s.call(o)}finally{if(i)throw i.error}}},e.prototype.extract=function(t,r,n){return this._propagators.reduce(function(i,s){try{return s.extract(i,r,n)}catch(o){Y.warn("Failed to extract with "+s.constructor.name+". Err: "+o.message)}return i},t)},e.prototype.fields=function(){return this._fields.slice()},e}(),Wl="[_0-9a-z-*/]",f_="[a-z]"+Wl+"{0,255}",p_="[a-z0-9]"+Wl+"{0,240}@[a-z]"+Wl+"{0,13}",m_=new RegExp("^(?:"+f_+"|"+p_+")$"),g_=/^[ -~]{0,255}[!-~]$/,y_=/,|=/;function b_(e){return m_.test(e)}function v_(e){return g_.test(e)&&!y_.test(e)}var qf=32,S_=512,ep=",",tp="=",w_=function(){function e(t){this._internalState=new Map,t&&this._parse(t)}return e.prototype.set=function(t,r){var n=this._clone();return n._internalState.has(t)&&n._internalState.delete(t),n._internalState.set(t,r),n},e.prototype.unset=function(t){var r=this._clone();return r._internalState.delete(t),r},e.prototype.get=function(t){return this._internalState.get(t)},e.prototype.serialize=function(){var t=this;return this._keys().reduce(function(r,n){return r.push(n+tp+t.get(n)),r},[]).join(ep)},e.prototype._parse=function(t){t.length>S_||(this._internalState=t.split(ep).reverse().reduce(function(r,n){var i=n.trim(),s=i.indexOf(tp);if(s!==-1){var o=i.slice(0,s),l=i.slice(s+1,n.length);b_(o)&&v_(l)&&r.set(o,l)}return r},new Map),this._internalState.size>qf&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,qf))))},e.prototype._keys=function(){return Array.from(this._internalState.keys()).reverse()},e.prototype._clone=function(){var t=new e;return t._internalState=new Map(this._internalState),t},e}(),ps="traceparent",Pl="tracestate",R_="00",__="(?!ff)[\\da-f]{2}",T_="(?![0]{32})[\\da-f]{32}",E_="(?![0]{16})[\\da-f]{16}",I_="[\\da-f]{2}",C_=new RegExp("^\\s?("+__+")-("+T_+")-("+E_+")-("+I_+")(-.*)?\\s?$");function Z_(e){var t=C_.exec(e);return!t||t[1]==="00"&&t[5]?null:{traceId:t[2],spanId:t[3],traceFlags:parseInt(t[4],16)}}var rp=function(){function e(){}return e.prototype.inject=function(t,r,n){var i=we.getSpanContext(t);if(!(!i||Ll(t)||!os(i))){var s=R_+"-"+i.traceId+"-"+i.spanId+"-0"+Number(i.traceFlags||Mt.NONE).toString(16);n.set(r,ps,s),i.traceState&&n.set(r,Pl,i.traceState.serialize())}},e.prototype.extract=function(t,r,n){var i=n.get(r,ps);if(!i)return t;var s=Array.isArray(i)?i[0]:i;if(typeof s!="string")return t;var o=Z_(s);if(!o)return t;o.isRemote=!0;var l=n.get(r,Pl);if(l){var c=Array.isArray(l)?l.join(","):l;o.traceState=new w_(typeof c=="string"?c:void 0)}return we.setSpanContext(t,o)},e.prototype.fields=function(){return[ps,Pl]},e}(),L_="[object Object]",x_="[object Null]",N_="[object Undefined]",O_=Function.prototype,np=O_.toString,G_=np.call(Object),V_=k_(Object.getPrototypeOf,Object),ip=Object.prototype,sp=ip.hasOwnProperty,Sr=Symbol?Symbol.toStringTag:void 0,op=ip.toString;function k_(e,t){return function(r){return e(t(r))}}function ap(e){if(!X_(e)||W_(e)!==L_)return!1;var t=V_(e);if(t===null)return!0;var r=sp.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&np.call(r)===G_}function X_(e){return e!=null&&typeof e=="object"}function W_(e){return e==null?e===void 0?N_:x_:Sr&&Sr in Object(e)?P_(e):M_(e)}function P_(e){var t=sp.call(e,Sr),r=e[Sr],n=!1;try{e[Sr]=void 0,n=!0}catch(s){}var i=op.call(e);return n&&(t?e[Sr]=r:delete e[Sr]),i}function M_(e){return op.call(e)}var A_=20;function lp(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var r=e.shift(),n=new WeakMap;e.length>0;)r=cp(r,e.shift(),0,n);return r}function Ml(e){return ms(e)?e.slice():e}function cp(e,t,r,n){r===void 0&&(r=0);var i;if(!(r>A_)){if(r++,gs(e)||gs(t)||dp(t))i=Ml(t);else if(ms(e)){if(i=e.slice(),ms(t))for(var s=0,o=t.length;s<o;s++)i.push(Ml(t[s]));else if(Xn(t))for(var l=Object.keys(t),s=0,o=l.length;s<o;s++){var c=l[s];i[c]=Ml(t[c])}}else if(Xn(e))if(Xn(t)){if(!U_(e,t))return t;i=Object.assign({},e);for(var l=Object.keys(t),s=0,o=l.length;s<o;s++){var c=l[s],a=t[c];if(gs(a))typeof a=="undefined"?delete i[c]:i[c]=a;else{var h=i[c],u=a;if(up(e,c,n)||up(t,c,n))delete i[c];else{if(Xn(h)&&Xn(u)){var f=n.get(h)||[],d=n.get(u)||[];f.push({obj:e,key:c}),d.push({obj:t,key:c}),n.set(h,f),n.set(u,d)}i[c]=cp(i[c],a,r,n)}}}}else i=t;return i}}function up(e,t,r){for(var n=r.get(e[t])||[],i=0,s=n.length;i<s;i++){var o=n[i];if(o.key===t&&o.obj===e)return!0}return!1}function ms(e){return Array.isArray(e)}function dp(e){return typeof e=="function"}function Xn(e){return!gs(e)&&!ms(e)&&!dp(e)&&typeof e=="object"}function gs(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e=="undefined"||e instanceof Date||e instanceof RegExp||e===null}function U_(e,t){return!(!ap(e)||!ap(t))}var D_=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};function hp(e,t){return typeof t=="string"?e===t:!!e.match(t)}function fp(e,t){var r,n;if(!t)return!1;try{for(var i=D_(t),s=i.next();!s.done;s=i.next()){var o=s.value;if(hp(e,o))return!0}}catch(l){r={error:l}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return!1}var F_=function(){function e(){var t=this;this._promise=new Promise(function(r,n){t._resolve=r,t._reject=n})}return Object.defineProperty(e.prototype,"promise",{get:function(){return this._promise},enumerable:!1,configurable:!0}),e.prototype.resolve=function(t){this._resolve(t)},e.prototype.reject=function(t){this._reject(t)},e}(),J_=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},H_=function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,s;n<i;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))},Y_=function(){function e(t,r){this._callback=t,this._that=r,this._isCalled=!1,this._deferred=new F_}return Object.defineProperty(e.prototype,"isCalled",{get:function(){return this._isCalled},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"promise",{get:function(){return this._deferred.promise},enumerable:!1,configurable:!0}),e.prototype.call=function(){for(var t,r=this,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];if(!this._isCalled){this._isCalled=!0;try{Promise.resolve((t=this._callback).call.apply(t,H_([this._that],J_(n),!1))).then(function(s){return r._deferred.resolve(s)},function(s){return r._deferred.reject(s)})}catch(s){this._deferred.reject(s)}}return this._deferred.promise},e}();function B_(e,t){return new Promise(function(r){pe.with(Df(pe.active()),function(){e.export(t,function(n){r(n)})})})}var z_={_export:B_},pp=function(){function e(){}return e.prototype.emit=function(t){},e}(),K_=new pp,j_=function(){function e(){}return e.prototype.getLogger=function(t,r,n){return new pp},e}(),mp=new j_,Q_=function(){function e(t,r,n,i){this._provider=t,this.name=r,this.version=n,this.options=i}return e.prototype.emit=function(t){this._getLogger().emit(t)},e.prototype._getLogger=function(){if(this._delegate)return this._delegate;var t=this._provider.getDelegateLogger(this.name,this.version,this.options);return t?(this._delegate=t,this._delegate):K_},e}(),gp=function(){function e(){}return e.prototype.getLogger=function(t,r,n){var i;return(i=this.getDelegateLogger(t,r,n))!==null&&i!==void 0?i:new Q_(this,t,r,n)},e.prototype.getDelegate=function(){var t;return(t=this._delegate)!==null&&t!==void 0?t:mp},e.prototype.setDelegate=function(t){this._delegate=t},e.prototype.getDelegateLogger=function(t,r,n){var i;return(i=this._delegate)===null||i===void 0?void 0:i.getLogger(t,r,n)},e}(),$_=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{},ys=Symbol.for("io.opentelemetry.js.api.logs"),Wn=$_;function q_(e,t,r){return function(n){return n===e?t:r}}var yp=1,eT=function(){function e(){this._proxyLoggerProvider=new gp}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalLoggerProvider=function(t){return Wn[ys]?this.getLoggerProvider():(Wn[ys]=q_(yp,t,mp),this._proxyLoggerProvider.setDelegate(t),t)},e.prototype.getLoggerProvider=function(){var t,r;return(r=(t=Wn[ys])===null||t===void 0?void 0:t.call(Wn,yp))!==null&&r!==void 0?r:this._proxyLoggerProvider},e.prototype.getLogger=function(t,r,n){return this.getLoggerProvider().getLogger(t,r,n)},e.prototype.disable=function(){delete Wn[ys],this._proxyLoggerProvider=new gp},e}(),bp=eT.getInstance();function tT(e,t,r,n){for(var i=0,s=e.length;i<s;i++){var o=e[i];t&&o.setTracerProvider(t),r&&o.setMeterProvider(r),n&&o.setLoggerProvider&&o.setLoggerProvider(n),o.getConfig().enabled||o.enable()}}function rT(e){e.forEach(function(t){return t.disable()})}function nT(e){var t,r,n=e.tracerProvider||we.getTracerProvider(),i=e.meterProvider||El.getMeterProvider(),s=e.loggerProvider||bp.getLoggerProvider(),o=(r=(t=e.instrumentations)===null||t===void 0?void 0:t.flat())!==null&&r!==void 0?r:[];return tT(o,n,i,s),function(){rT(o)}}function Al(e){return typeof e=="function"}var je=console.error.bind(console);function Pn(e,t,r){var n=!!e[t]&&e.propertyIsEnumerable(t);Object.defineProperty(e,t,{configurable:!0,enumerable:n,writable:!0,value:r})}function Mn(e){e&&e.logger&&(Al(e.logger)?je=e.logger:je("new logger isn't a function, not replacing"))}function vp(e,t,r){if(!e||!e[t]){je("no original function "+t+" to wrap");return}if(!r){je("no wrapper function"),je(new Error().stack);return}if(!Al(e[t])||!Al(r)){je("original object and wrapper must be functions");return}var n=e[t],i=r(n,t);return Pn(i,"__original",n),Pn(i,"__unwrap",function(){e[t]===i&&Pn(e,t,n)}),Pn(i,"__wrapped",!0),Pn(e,t,i),i}function iT(e,t,r){if(e)Array.isArray(e)||(e=[e]);else{je("must provide one or more modules to patch"),je(new Error().stack);return}if(!(t&&Array.isArray(t))){je("must provide one or more functions to wrap on modules");return}e.forEach(function(n){t.forEach(function(i){vp(n,i,r)})})}function Sp(e,t){if(!e||!e[t]){je("no function to unwrap."),je(new Error().stack);return}if(!e[t].__unwrap)je("no original to unwrap to -- has "+t+" already been unwrapped?");else return e[t].__unwrap()}function sT(e,t){if(e)Array.isArray(e)||(e=[e]);else{je("must provide one or more modules to patch"),je(new Error().stack);return}if(!(t&&Array.isArray(t))){je("must provide one or more functions to unwrap on modules");return}e.forEach(function(r){t.forEach(function(n){Sp(r,n)})})}Mn.wrap=vp,Mn.massWrap=iT,Mn.unwrap=Sp,Mn.massUnwrap=sT;var bs=Mn,Ul=function(){return Ul=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Ul.apply(this,arguments)},oT=function(){function e(t,r,n){this.instrumentationName=t,this.instrumentationVersion=r,this._config={},this._wrap=bs.wrap,this._unwrap=bs.unwrap,this._massWrap=bs.massWrap,this._massUnwrap=bs.massUnwrap,this.setConfig(n),this._diag=Y.createComponentLogger({namespace:t}),this._tracer=we.getTracer(t,r),this._meter=El.getMeter(t,r),this._logger=bp.getLogger(t,r),this._updateMetricInstruments()}return Object.defineProperty(e.prototype,"meter",{get:function(){return this._meter},enumerable:!1,configurable:!0}),e.prototype.setMeterProvider=function(t){this._meter=t.getMeter(this.instrumentationName,this.instrumentationVersion),this._updateMetricInstruments()},Object.defineProperty(e.prototype,"logger",{get:function(){return this._logger},enumerable:!1,configurable:!0}),e.prototype.setLoggerProvider=function(t){this._logger=t.getLogger(this.instrumentationName,this.instrumentationVersion)},e.prototype.getModuleDefinitions=function(){var t,r=(t=this.init())!==null&&t!==void 0?t:[];return Array.isArray(r)?r:[r]},e.prototype._updateMetricInstruments=function(){},e.prototype.getConfig=function(){return this._config},e.prototype.setConfig=function(t){this._config=Ul({enabled:!0},t)},e.prototype.setTracerProvider=function(t){this._tracer=t.getTracer(this.instrumentationName,this.instrumentationVersion)},Object.defineProperty(e.prototype,"tracer",{get:function(){return this._tracer},enumerable:!1,configurable:!0}),e.prototype._runSpanCustomizationHook=function(t,r,n,i){if(t)try{t(n,i)}catch(s){this._diag.error("Error running span customization hook due to exception in handler",{triggerName:r},s)}},e}(),aT=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),An=function(e){aT(t,e);function t(r,n,i){var s=e.call(this,r,n,i)||this;return s._config.enabled&&s.enable(),s}return t}(oT);function vs(e,t,r){var n,i;try{i=e()}catch(s){n=s}finally{return t(n,i),i}}function Ae(e){return typeof e=="function"&&typeof e.__original=="function"&&typeof e.__unwrap=="function"&&e.__wrapped===!0}var lT="exception.type",cT="exception.message",uT="exception.stacktrace",Dl=lT,Fl=cT,dT=uT,hT="exception",Jl=function(){return Jl=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Jl.apply(this,arguments)},fT=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},wp=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},pT=function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,s;n<i;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))},mT=function(){function e(t,r,n,i,s,o,l,c,a,h){l===void 0&&(l=[]),this.attributes={},this.links=[],this.events=[],this._droppedAttributesCount=0,this._droppedEventsCount=0,this._droppedLinksCount=0,this.status={code:ls.UNSET},this.endTime=[0,0],this._ended=!1,this._duration=[-1,-1],this.name=n,this._spanContext=i,this.parentSpanId=o,this.kind=s,this.links=l;var u=Date.now();this._performanceStartTime=ft.now(),this._performanceOffset=u-(this._performanceStartTime+kl()),this._startTimeProvided=c!=null,this.startTime=this._getTime(c!=null?c:u),this.resource=t.resource,this.instrumentationLibrary=t.instrumentationLibrary,this._spanLimits=t.getSpanLimits(),this._attributeValueLengthLimit=this._spanLimits.attributeValueLengthLimit||0,h!=null&&this.setAttributes(h),this._spanProcessor=t.getActiveSpanProcessor(),this._spanProcessor.onStart(this,r)}return e.prototype.spanContext=function(){return this._spanContext},e.prototype.setAttribute=function(t,r){return r==null||this._isSpanEnded()?this:t.length===0?(Y.warn("Invalid attribute key: "+t),this):Hf(r)?Object.keys(this.attributes).length>=this._spanLimits.attributeCountLimit&&!Object.prototype.hasOwnProperty.call(this.attributes,t)?(this._droppedAttributesCount++,this):(this.attributes[t]=this._truncateToSize(r),this):(Y.warn("Invalid attribute value set for key: "+t),this)},e.prototype.setAttributes=function(t){var r,n;try{for(var i=fT(Object.entries(t)),s=i.next();!s.done;s=i.next()){var o=wp(s.value,2),l=o[0],c=o[1];this.setAttribute(l,c)}}catch(a){r={error:a}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return this},e.prototype.addEvent=function(t,r,n){if(this._isSpanEnded())return this;if(this._spanLimits.eventCountLimit===0)return Y.warn("No events allowed."),this._droppedEventsCount++,this;this.events.length>=this._spanLimits.eventCountLimit&&(this._droppedEventsCount===0&&Y.debug("Dropping extra events."),this.events.shift(),this._droppedEventsCount++),jf(r)&&(jf(n)||(n=r),r=void 0);var i=cs(r);return this.events.push({name:t,attributes:i,time:this._getTime(n),droppedAttributesCount:0}),this},e.prototype.addLink=function(t){return this.links.push(t),this},e.prototype.addLinks=function(t){var r;return(r=this.links).push.apply(r,pT([],wp(t),!1)),this},e.prototype.setStatus=function(t){return this._isSpanEnded()?this:(this.status=Jl({},t),this.status.message!=null&&typeof t.message!="string"&&(Y.warn("Dropping invalid status.message of type '"+typeof t.message+"', expected 'string'"),delete this.status.message),this)},e.prototype.updateName=function(t){return this._isSpanEnded()?this:(this.name=t,this)},e.prototype.end=function(t){if(this._isSpanEnded()){Y.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(t),this._duration=d_(this.startTime,this.endTime),this._duration[0]<0&&(Y.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&&Y.warn("Dropped "+this._droppedEventsCount+" events because eventCountLimit reached"),this._spanProcessor.onEnd(this)},e.prototype._getTime=function(t){if(typeof t=="number"&&t<=ft.now())return vr(t+this._performanceOffset);if(typeof t=="number")return pt(t);if(t instanceof Date)return pt(t.getTime());if(Xl(t))return t;if(this._startTimeProvided)return pt(Date.now());var r=ft.now()-this._performanceStartTime;return Qf(this.startTime,pt(r))},e.prototype.isRecording=function(){return this._ended===!1},e.prototype.recordException=function(t,r){var n={};typeof t=="string"?n[Fl]=t:t&&(t.code?n[Dl]=t.code.toString():t.name&&(n[Dl]=t.name),t.message&&(n[Fl]=t.message),t.stack&&(n[dT]=t.stack)),n[Dl]||n[Fl]?this.addEvent(hT,n,r):Y.warn("Failed to record an exception "+t)},Object.defineProperty(e.prototype,"duration",{get:function(){return this._duration},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ended",{get:function(){return this._ended},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"droppedAttributesCount",{get:function(){return this._droppedAttributesCount},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"droppedEventsCount",{get:function(){return this._droppedEventsCount},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"droppedLinksCount",{get:function(){return this._droppedLinksCount},enumerable:!1,configurable:!0}),e.prototype._isSpanEnded=function(){return this._ended&&Y.warn("Can not execute the operation on ended Span {traceId: "+this._spanContext.traceId+", spanId: "+this._spanContext.spanId+"}"),this._ended},e.prototype._truncateToLimitUtil=function(t,r){return t.length<=r?t:t.substring(0,r)},e.prototype._truncateToSize=function(t){var r=this,n=this._attributeValueLengthLimit;return n<=0?(Y.warn("Attribute value limit must be positive, got "+n),t):typeof t=="string"?this._truncateToLimitUtil(t,n):Array.isArray(t)?t.map(function(i){return typeof i=="string"?r._truncateToLimitUtil(i,n):i}):t},e}(),jr;(function(e){e[e.NOT_RECORD=0]="NOT_RECORD",e[e.RECORD=1]="RECORD",e[e.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(jr||(jr={}));var Ss=function(){function e(){}return e.prototype.shouldSample=function(){return{decision:jr.NOT_RECORD}},e.prototype.toString=function(){return"AlwaysOffSampler"},e}(),Qr=function(){function e(){}return e.prototype.shouldSample=function(){return{decision:jr.RECORD_AND_SAMPLED}},e.prototype.toString=function(){return"AlwaysOnSampler"},e}(),Hl=function(){function e(t){var r,n,i,s;this._root=t.root,this._root||(er(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new Qr),this._remoteParentSampled=(r=t.remoteParentSampled)!==null&&r!==void 0?r:new Qr,this._remoteParentNotSampled=(n=t.remoteParentNotSampled)!==null&&n!==void 0?n:new Ss,this._localParentSampled=(i=t.localParentSampled)!==null&&i!==void 0?i:new Qr,this._localParentNotSampled=(s=t.localParentNotSampled)!==null&&s!==void 0?s:new Ss}return e.prototype.shouldSample=function(t,r,n,i,s,o){var l=we.getSpanContext(t);return!l||!os(l)?this._root.shouldSample(t,r,n,i,s,o):l.isRemote?l.traceFlags&Mt.SAMPLED?this._remoteParentSampled.shouldSample(t,r,n,i,s,o):this._remoteParentNotSampled.shouldSample(t,r,n,i,s,o):l.traceFlags&Mt.SAMPLED?this._localParentSampled.shouldSample(t,r,n,i,s,o):this._localParentNotSampled.shouldSample(t,r,n,i,s,o)},e.prototype.toString=function(){return"ParentBased{root="+this._root.toString()+", remoteParentSampled="+this._remoteParentSampled.toString()+", remoteParentNotSampled="+this._remoteParentNotSampled.toString()+", localParentSampled="+this._localParentSampled.toString()+", localParentNotSampled="+this._localParentNotSampled.toString()+"}"},e}(),Rp=function(){function e(t){t===void 0&&(t=0),this._ratio=t,this._ratio=this._normalize(t),this._upperBound=Math.floor(this._ratio*4294967295)}return e.prototype.shouldSample=function(t,r){return{decision:Wf(r)&&this._accumulate(r)<this._upperBound?jr.RECORD_AND_SAMPLED:jr.NOT_RECORD}},e.prototype.toString=function(){return"TraceIdRatioBased{"+this._ratio+"}"},e.prototype._normalize=function(t){return typeof t!="number"||isNaN(t)?0:t>=1?1:t<=0?0:t},e.prototype._accumulate=function(t){for(var r=0,n=0;n<t.length/8;n++){var i=n*8,s=parseInt(t.slice(i,i+8),16);r=(r^s)>>>0}return r},e}(),gT=xt.AlwaysOn,$r=1;function _p(){var e=zr();return{sampler:Tp(e),forceFlushTimeoutMillis:3e4,generalLimits:{attributeValueLengthLimit:e.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:e.OTEL_ATTRIBUTE_COUNT_LIMIT},spanLimits:{attributeValueLengthLimit:e.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:e.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT,linkCountLimit:e.OTEL_SPAN_LINK_COUNT_LIMIT,eventCountLimit:e.OTEL_SPAN_EVENT_COUNT_LIMIT,attributePerEventCountLimit:e.OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT,attributePerLinkCountLimit:e.OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT},mergeResourceWithDefaults:!0}}function Tp(e){switch(e===void 0&&(e=zr()),e.OTEL_TRACES_SAMPLER){case xt.AlwaysOn:return new Qr;case xt.AlwaysOff:return new Ss;case xt.ParentBasedAlwaysOn:return new Hl({root:new Qr});case xt.ParentBasedAlwaysOff:return new Hl({root:new Ss});case xt.TraceIdRatio:return new Rp(Ep(e));case xt.ParentBasedTraceIdRatio:return new Hl({root:new Rp(Ep(e))});default:return Y.error('OTEL_TRACES_SAMPLER value "'+e.OTEL_TRACES_SAMPLER+" invalid, defaulting to "+gT+'".'),new Qr}}function Ep(e){if(e.OTEL_TRACES_SAMPLER_ARG===void 0||e.OTEL_TRACES_SAMPLER_ARG==="")return Y.error("OTEL_TRACES_SAMPLER_ARG is blank, defaulting to "+$r+"."),$r;var t=Number(e.OTEL_TRACES_SAMPLER_ARG);return isNaN(t)?(Y.error("OTEL_TRACES_SAMPLER_ARG="+e.OTEL_TRACES_SAMPLER_ARG+" was given, but it is invalid, defaulting to "+$r+"."),$r):t<0||t>1?(Y.error("OTEL_TRACES_SAMPLER_ARG="+e.OTEL_TRACES_SAMPLER_ARG+" was given, but it is out of range ([0..1]), defaulting to "+$r+"."),$r):t}function yT(e){var t={sampler:Tp()},r=_p(),n=Object.assign({},r,t,e);return n.generalLimits=Object.assign({},r.generalLimits,e.generalLimits||{}),n.spanLimits=Object.assign({},r.spanLimits,e.spanLimits||{}),n}function bT(e){var t,r,n,i,s,o,l,c,a,h,u,f,d=Object.assign({},e.spanLimits),p=jR();return d.attributeCountLimit=(o=(s=(i=(r=(t=e.spanLimits)===null||t===void 0?void 0:t.attributeCountLimit)!==null&&r!==void 0?r:(n=e.generalLimits)===null||n===void 0?void 0:n.attributeCountLimit)!==null&&i!==void 0?i:p.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT)!==null&&s!==void 0?s:p.OTEL_ATTRIBUTE_COUNT_LIMIT)!==null&&o!==void 0?o:ds,d.attributeValueLengthLimit=(f=(u=(h=(c=(l=e.spanLimits)===null||l===void 0?void 0:l.attributeValueLengthLimit)!==null&&c!==void 0?c:(a=e.generalLimits)===null||a===void 0?void 0:a.attributeValueLengthLimit)!==null&&h!==void 0?h:p.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&u!==void 0?u:p.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&f!==void 0?f:us,Object.assign({},e,{spanLimits:d})}var vT=function(){function e(t,r){this._exporter=t,this._isExporting=!1,this._finishedSpans=[],this._droppedSpansCount=0;var n=zr();this._maxExportBatchSize=typeof(r==null?void 0:r.maxExportBatchSize)=="number"?r.maxExportBatchSize:n.OTEL_BSP_MAX_EXPORT_BATCH_SIZE,this._maxQueueSize=typeof(r==null?void 0:r.maxQueueSize)=="number"?r.maxQueueSize:n.OTEL_BSP_MAX_QUEUE_SIZE,this._scheduledDelayMillis=typeof(r==null?void 0:r.scheduledDelayMillis)=="number"?r.scheduledDelayMillis:n.OTEL_BSP_SCHEDULE_DELAY,this._exportTimeoutMillis=typeof(r==null?void 0:r.exportTimeoutMillis)=="number"?r.exportTimeoutMillis:n.OTEL_BSP_EXPORT_TIMEOUT,this._shutdownOnce=new Y_(this._shutdown,this),this._maxExportBatchSize>this._maxQueueSize&&(Y.warn("BatchSpanProcessor: maxExportBatchSize must be smaller or equal to maxQueueSize, setting maxExportBatchSize to match maxQueueSize"),this._maxExportBatchSize=this._maxQueueSize)}return e.prototype.forceFlush=function(){return this._shutdownOnce.isCalled?this._shutdownOnce.promise:this._flushAll()},e.prototype.onStart=function(t,r){},e.prototype.onEnd=function(t){this._shutdownOnce.isCalled||(t.spanContext().traceFlags&Mt.SAMPLED)!==0&&this._addToBuffer(t)},e.prototype.shutdown=function(){return this._shutdownOnce.call()},e.prototype._shutdown=function(){var t=this;return Promise.resolve().then(function(){return t.onShutdown()}).then(function(){return t._flushAll()}).then(function(){return t._exporter.shutdown()})},e.prototype._addToBuffer=function(t){if(this._finishedSpans.length>=this._maxQueueSize){this._droppedSpansCount===0&&Y.debug("maxQueueSize reached, dropping spans"),this._droppedSpansCount++;return}this._droppedSpansCount>0&&(Y.warn("Dropped "+this._droppedSpansCount+" spans because maxQueueSize reached"),this._droppedSpansCount=0),this._finishedSpans.push(t),this._maybeStartTimer()},e.prototype._flushAll=function(){var t=this;return new Promise(function(r,n){for(var i=[],s=Math.ceil(t._finishedSpans.length/t._maxExportBatchSize),o=0,l=s;o<l;o++)i.push(t._flushOneBatch());Promise.all(i).then(function(){r()}).catch(n)})},e.prototype._flushOneBatch=function(){var t=this;return this._clearTimer(),this._finishedSpans.length===0?Promise.resolve():new Promise(function(r,n){var i=setTimeout(function(){n(new Error("Timeout"))},t._exportTimeoutMillis);pe.with(Df(pe.active()),function(){var s;t._finishedSpans.length<=t._maxExportBatchSize?(s=t._finishedSpans,t._finishedSpans=[]):s=t._finishedSpans.splice(0,t._maxExportBatchSize);for(var o=function(){return t._exporter.export(s,function(u){var f;clearTimeout(i),u.code===Ie.SUCCESS?r():n((f=u.error)!==null&&f!==void 0?f:new Error("BatchSpanProcessor: span export failed"))})},l=null,c=0,a=s.length;c<a;c++){var h=s[c];h.resource.asyncAttributesPending&&h.resource.waitForAsyncAttributes&&(l!=null||(l=[]),l.push(h.resource.waitForAsyncAttributes()))}l===null?o():Promise.all(l).then(o,function(u){er(u),n(u)})})})},e.prototype._maybeStartTimer=function(){var t=this;if(!this._isExporting){var r=function(){t._isExporting=!0,t._flushOneBatch().finally(function(){t._isExporting=!1,t._finishedSpans.length>0&&(t._clearTimer(),t._maybeStartTimer())}).catch(function(n){t._isExporting=!1,er(n)})};if(this._finishedSpans.length>=this._maxExportBatchSize)return r();this._timer===void 0&&(this._timer=setTimeout(function(){return r()},this._scheduledDelayMillis))}},e.prototype._clearTimer=function(){this._timer!==void 0&&(clearTimeout(this._timer),this._timer=void 0)},e}(),ST=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ip=function(e){ST(t,e);function t(r,n){var i=e.call(this,r,n)||this;return i.onInit(n),i}return t.prototype.onInit=function(r){var n=this;(r==null?void 0:r.disableAutoFlushOnDocumentHide)!==!0&&typeof document!="undefined"&&(this._visibilityChangeListener=function(){document.visibilityState==="hidden"&&n.forceFlush().catch(function(i){er(i)})},this._pageHideListener=function(){n.forceFlush().catch(function(i){er(i)})},document.addEventListener("visibilitychange",this._visibilityChangeListener),document.addEventListener("pagehide",this._pageHideListener))},t.prototype.onShutdown=function(){typeof document!="undefined"&&(this._visibilityChangeListener&&document.removeEventListener("visibilitychange",this._visibilityChangeListener),this._pageHideListener&&document.removeEventListener("pagehide",this._pageHideListener))},t}(vT),wT=8,RT=16,_T=function(){function e(){this.generateTraceId=Cp(RT),this.generateSpanId=Cp(wT)}return e}(),ws=Array(32);function Cp(e){return function(){for(var r=0;r<e*2;r++)ws[r]=Math.floor(Math.random()*16)+48,ws[r]>=58&&(ws[r]+=39);return String.fromCharCode.apply(null,ws.slice(0,e*2))}}var TT=function(){function e(t,r,n){this._tracerProvider=n;var i=yT(r);this._sampler=i.sampler,this._generalLimits=i.generalLimits,this._spanLimits=i.spanLimits,this._idGenerator=r.idGenerator||new _T,this.resource=n.resource,this.instrumentationLibrary=t}return e.prototype.startSpan=function(t,r,n){var i,s,o;r===void 0&&(r={}),n===void 0&&(n=pe.active()),r.root&&(n=we.deleteSpan(n));var l=we.getSpan(n);if(Ll(n)){Y.debug("Instrumentation suppressed, returning Noop Span");var c=we.wrapSpanContext(kf);return c}var a=l==null?void 0:l.spanContext(),h=this._idGenerator.generateSpanId(),u,f,d;!a||!we.isSpanContextValid(a)?u=this._idGenerator.generateTraceId():(u=a.traceId,f=a.traceState,d=a.spanId);var p=(i=r.kind)!==null&&i!==void 0?i:Gn.INTERNAL,m=((s=r.links)!==null&&s!==void 0?s:[]).map(function(b){return{context:b.context,attributes:cs(b.attributes)}}),g=cs(r.attributes),v=this._sampler.shouldSample(n,u,t,p,g,m);f=(o=v.traceState)!==null&&o!==void 0?o:f;var y=v.decision===as.RECORD_AND_SAMPLED?Mt.SAMPLED:Mt.NONE,w={traceId:u,spanId:h,traceFlags:y,traceState:f};if(v.decision===as.NOT_RECORD){Y.debug("Recording is off, propagating context in a non-recording span");var c=we.wrapSpanContext(w);return c}var _=cs(Object.assign(g,v.attributes)),S=new mT(this,n,t,w,p,d,m,r.startTime,void 0,_);return S},e.prototype.startActiveSpan=function(t,r,n,i){var s,o,l;if(!(arguments.length<2)){arguments.length===2?l=r:arguments.length===3?(s=r,l=n):(s=r,o=n,l=i);var c=o!=null?o:pe.active(),a=this.startSpan(t,s,c),h=we.setSpan(c,a);return pe.with(h,l,void 0,a)}},e.prototype.getGeneralLimits=function(){return this._generalLimits},e.prototype.getSpanLimits=function(){return this._spanLimits},e.prototype.getActiveSpanProcessor=function(){return this._tracerProvider.getActiveSpanProcessor()},e}(),ET="service.name",IT="telemetry.sdk.name",CT="telemetry.sdk.language",ZT="telemetry.sdk.version",LT=ET,Zp=IT,Lp=CT,xp=ZT;function xT(){return"unknown_service"}var tr=function(){return tr=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},tr.apply(this,arguments)},NT=function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function l(h){try{a(n.next(h))}catch(u){o(u)}}function c(h){try{a(n.throw(h))}catch(u){o(u)}}function a(h){h.done?s(h.value):i(h.value).then(l,c)}a((n=n.apply(e,t||[])).next())})},OT=function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function l(a){return function(h){return c([a,h])}}function c(a){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(s=a[0]&2?i.return:a[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,a[1])).done)return s;switch(i=0,s&&(a=[a[0]&2,s.value]),a[0]){case 0:case 1:s=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){r.label=a[1];break}if(a[0]===6&&r.label<s[1]){r.label=s[1],s=a;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(a);break}s[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(h){a=[6,h],i=0}finally{n=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},GT=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},Un=function(){function e(t,r){var n=this,i;this._attributes=t,this.asyncAttributesPending=r!=null,this._syncAttributes=(i=this._attributes)!==null&&i!==void 0?i:{},this._asyncAttributesPromise=r==null?void 0:r.then(function(s){return n._attributes=Object.assign({},n._attributes,s),n.asyncAttributesPending=!1,s},function(s){return Y.debug("a resource's async attributes promise rejected: %s",s),n.asyncAttributesPending=!1,{}})}return e.empty=function(){return e.EMPTY},e.default=function(){var t;return new e((t={},t[LT]=xT(),t[Lp]=Vl[Lp],t[Zp]=Vl[Zp],t[xp]=Vl[xp],t))},Object.defineProperty(e.prototype,"attributes",{get:function(){var t;return this.asyncAttributesPending&&Y.error("Accessing resource attributes before async attributes settled"),(t=this._attributes)!==null&&t!==void 0?t:{}},enumerable:!1,configurable:!0}),e.prototype.waitForAsyncAttributes=function(){return NT(this,void 0,void 0,function(){return OT(this,function(t){switch(t.label){case 0:return this.asyncAttributesPending?[4,this._asyncAttributesPromise]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2]}})})},e.prototype.merge=function(t){var r=this,n;if(!t)return this;var i=tr(tr({},this._syncAttributes),(n=t._syncAttributes)!==null&&n!==void 0?n:t.attributes);if(!this._asyncAttributesPromise&&!t._asyncAttributesPromise)return new e(i);var s=Promise.all([this._asyncAttributesPromise,t._asyncAttributesPromise]).then(function(o){var l,c=GT(o,2),a=c[0],h=c[1];return tr(tr(tr(tr({},r._syncAttributes),a),(l=t._syncAttributes)!==null&&l!==void 0?l:t.attributes),h)});return new e(i,s)},e.EMPTY=new e({}),e}(),Rs=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Np=function(){function e(t){this._spanProcessors=t}return e.prototype.forceFlush=function(){var t,r,n=[];try{for(var i=Rs(this._spanProcessors),s=i.next();!s.done;s=i.next()){var o=s.value;n.push(o.forceFlush())}}catch(l){t={error:l}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return new Promise(function(l){Promise.all(n).then(function(){l()}).catch(function(c){er(c||new Error("MultiSpanProcessor: forceFlush failed")),l()})})},e.prototype.onStart=function(t,r){var n,i;try{for(var s=Rs(this._spanProcessors),o=s.next();!o.done;o=s.next()){var l=o.value;l.onStart(t,r)}}catch(c){n={error:c}}finally{try{o&&!o.done&&(i=s.return)&&i.call(s)}finally{if(n)throw n.error}}},e.prototype.onEnd=function(t){var r,n;try{for(var i=Rs(this._spanProcessors),s=i.next();!s.done;s=i.next()){var o=s.value;o.onEnd(t)}}catch(l){r={error:l}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}},e.prototype.shutdown=function(){var t,r,n=[];try{for(var i=Rs(this._spanProcessors),s=i.next();!s.done;s=i.next()){var o=s.value;n.push(o.shutdown())}}catch(l){t={error:l}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return new Promise(function(l,c){Promise.all(n).then(function(){l()},c)})},e}(),VT=function(){function e(){}return e.prototype.onStart=function(t,r){},e.prototype.onEnd=function(t){},e.prototype.shutdown=function(){return Promise.resolve()},e.prototype.forceFlush=function(){return Promise.resolve()},e}(),kT=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},XT=function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,s;n<i;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))},wr;(function(e){e[e.resolved=0]="resolved",e[e.timeout=1]="timeout",e[e.error=2]="error",e[e.unresolved=3]="unresolved"})(wr||(wr={}));var WT=function(){function e(t){t===void 0&&(t={});var r,n;this._registeredSpanProcessors=[],this._tracers=new Map;var i=lp({},_p(),bT(t));if(this.resource=(r=i.resource)!==null&&r!==void 0?r:Un.empty(),i.mergeResourceWithDefaults&&(this.resource=Un.default().merge(this.resource)),this._config=Object.assign({},i,{resource:this.resource}),!((n=t.spanProcessors)===null||n===void 0)&&n.length)this._registeredSpanProcessors=XT([],kT(t.spanProcessors),!1),this.activeSpanProcessor=new Np(this._registeredSpanProcessors);else{var s=this._buildExporterFromEnv();if(s!==void 0){var o=new Ip(s);this.activeSpanProcessor=o}else this.activeSpanProcessor=new VT}}return e.prototype.getTracer=function(t,r,n){var i=t+"@"+(r||"")+":"+((n==null?void 0:n.schemaUrl)||"");return this._tracers.has(i)||this._tracers.set(i,new TT({name:t,version:r,schemaUrl:n==null?void 0:n.schemaUrl},this._config,this)),this._tracers.get(i)},e.prototype.addSpanProcessor=function(t){this._registeredSpanProcessors.length===0&&this.activeSpanProcessor.shutdown().catch(function(r){return Y.error("Error while trying to shutdown current span processor",r)}),this._registeredSpanProcessors.push(t),this.activeSpanProcessor=new Np(this._registeredSpanProcessors)},e.prototype.getActiveSpanProcessor=function(){return this.activeSpanProcessor},e.prototype.register=function(t){t===void 0&&(t={}),we.setGlobalTracerProvider(this),t.propagator===void 0&&(t.propagator=this._buildPropagatorFromEnv()),t.contextManager&&pe.setGlobalContextManager(t.contextManager),t.propagator&&ht.setGlobalPropagator(t.propagator)},e.prototype.forceFlush=function(){var t=this._config.forceFlushTimeoutMillis,r=this._registeredSpanProcessors.map(function(n){return new Promise(function(i){var s,o=setTimeout(function(){i(new Error("Span processor did not completed within timeout period of "+t+" ms")),s=wr.timeout},t);n.forceFlush().then(function(){clearTimeout(o),s!==wr.timeout&&(s=wr.resolved,i(s))}).catch(function(l){clearTimeout(o),s=wr.error,i(l)})})});return new Promise(function(n,i){Promise.all(r).then(function(s){var o=s.filter(function(l){return l!==wr.resolved});o.length>0?i(o):n()}).catch(function(s){return i([s])})})},e.prototype.shutdown=function(){return this.activeSpanProcessor.shutdown()},e.prototype._getPropagator=function(t){var r;return(r=this.constructor._registeredPropagators.get(t))===null||r===void 0?void 0:r()},e.prototype._getSpanExporter=function(t){var r;return(r=this.constructor._registeredExporters.get(t))===null||r===void 0?void 0:r()},e.prototype._buildPropagatorFromEnv=function(){var t=this,r=Array.from(new Set(zr().OTEL_PROPAGATORS)),n=r.map(function(s){var o=t._getPropagator(s);return o||Y.warn('Propagator "'+s+'" requested through environment variable is unavailable.'),o}),i=n.reduce(function(s,o){return o&&s.push(o),s},[]);if(i.length!==0)return r.length===1?i[0]:new $f({propagators:i})},e.prototype._buildExporterFromEnv=function(){var t=zr().OTEL_TRACES_EXPORTER;if(!(t==="none"||t==="")){var r=this._getSpanExporter(t);return r||Y.error('Exporter "'+t+'" requested through environment variable is unavailable.'),r}},e._registeredPropagators=new Map([["tracecontext",function(){return new rp}],["baggage",function(){return new Ff}]]),e._registeredExporters=new Map,e}(),PT=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},MT=function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,s;n<i;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))},Op=function(){function e(){this._enabled=!1,this._currentContext=yr}return e.prototype._bindFunction=function(t,r){t===void 0&&(t=yr);var n=this,i=function(){for(var s=this,o=[],l=0;l<arguments.length;l++)o[l]=arguments[l];return n.with(t,function(){return r.apply(s,o)})};return Object.defineProperty(i,"length",{enumerable:!1,configurable:!0,writable:!1,value:r.length}),i},e.prototype.active=function(){return this._currentContext},e.prototype.bind=function(t,r){return t===void 0&&(t=this.active()),typeof r=="function"?this._bindFunction(t,r):r},e.prototype.disable=function(){return this._currentContext=yr,this._enabled=!1,this},e.prototype.enable=function(){return this._enabled?this:(this._enabled=!0,this._currentContext=yr,this)},e.prototype.with=function(t,r,n){for(var i=[],s=3;s<arguments.length;s++)i[s-3]=arguments[s];var o=this._currentContext;this._currentContext=t||yr;try{return r.call.apply(r,MT([n],PT(i),!1))}finally{this._currentContext=o}},e}(),AT=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),UT=function(e){AT(t,e);function t(r){r===void 0&&(r={});var n=e.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 t.prototype.register=function(r){r===void 0&&(r={}),r.contextManager===void 0&&(r.contextManager=new Op),r.contextManager&&r.contextManager.enable(),e.prototype.register.call(this,r)},t}(WT),ne;(function(e){e.CONNECT_END="connectEnd",e.CONNECT_START="connectStart",e.DECODED_BODY_SIZE="decodedBodySize",e.DOM_COMPLETE="domComplete",e.DOM_CONTENT_LOADED_EVENT_END="domContentLoadedEventEnd",e.DOM_CONTENT_LOADED_EVENT_START="domContentLoadedEventStart",e.DOM_INTERACTIVE="domInteractive",e.DOMAIN_LOOKUP_END="domainLookupEnd",e.DOMAIN_LOOKUP_START="domainLookupStart",e.ENCODED_BODY_SIZE="encodedBodySize",e.FETCH_START="fetchStart",e.LOAD_EVENT_END="loadEventEnd",e.LOAD_EVENT_START="loadEventStart",e.NAVIGATION_START="navigationStart",e.REDIRECT_END="redirectEnd",e.REDIRECT_START="redirectStart",e.REQUEST_START="requestStart",e.RESPONSE_END="responseEnd",e.RESPONSE_START="responseStart",e.SECURE_CONNECTION_START="secureConnectionStart",e.UNLOAD_EVENT_END="unloadEventEnd",e.UNLOAD_EVENT_START="unloadEventStart"})(ne||(ne={}));var DT="http.response_content_length",FT="http.response_content_length_uncompressed",JT=DT,HT=FT,Yl;function YT(){return Yl||(Yl=document.createElement("a")),Yl}function rr(e,t){return t in e}function Ue(e,t,r,n){var i=void 0,s=void 0;rr(r,t)&&typeof r[t]=="number"&&(i=r[t]);var o=ne.FETCH_START;if(rr(r,o)&&typeof r[o]=="number"&&(s=r[o]),i!==void 0&&s!==void 0&&i>=s)return e.addEvent(t,i),e}function qr(e,t,r){r===void 0&&(r=!1),r||(Ue(e,ne.FETCH_START,t),Ue(e,ne.DOMAIN_LOOKUP_START,t),Ue(e,ne.DOMAIN_LOOKUP_END,t),Ue(e,ne.CONNECT_START,t),rr(t,"name")&&t.name.startsWith("https:")&&Ue(e,ne.SECURE_CONNECTION_START,t),Ue(e,ne.CONNECT_END,t),Ue(e,ne.REQUEST_START,t),Ue(e,ne.RESPONSE_START,t),Ue(e,ne.RESPONSE_END,t));var n=t[ne.ENCODED_BODY_SIZE];n!==void 0&&e.setAttribute(JT,n);var i=t[ne.DECODED_BODY_SIZE];i!==void 0&&n!==i&&e.setAttribute(HT,i)}function BT(e){return e.slice().sort(function(t,r){var n=t[ne.FETCH_START],i=r[ne.FETCH_START];return n>i?1:n<i?-1:0})}function Gp(){return typeof location!="undefined"?location.origin:void 0}function Vp(e,t,r,n,i,s){i===void 0&&(i=new WeakSet);var o=Ut(e);e=o.toString();var l=KT(e,t,r,n,i,s);if(l.length===0)return{mainRequest:void 0};if(l.length===1)return{mainRequest:l[0]};var c=BT(l);if(o.origin!==Gp()&&c.length>1){var a=c[0],h=zT(c,a[ne.RESPONSE_END],r),u=a[ne.RESPONSE_END],f=h[ne.FETCH_START];return f<u&&(h=a,a=void 0),{corsPreFlightRequest:a,mainRequest:h}}else return{mainRequest:l[0]}}function zT(e,t,r){for(var n=At(r),i=At(kn(t)),s=e[1],o,l=e.length,c=1;c<l;c++){var a=e[c],h=At(kn(a[ne.FETCH_START])),u=At(kn(a[ne.RESPONSE_END])),f=n-u;h>=i&&(!o||f<o)&&(o=f,s=a)}return s}function KT(e,t,r,n,i,s){var o=At(t),l=At(r),c=n.filter(function(a){var h=At(kn(a[ne.FETCH_START])),u=At(kn(a[ne.RESPONSE_END]));return a.initiatorType.toLowerCase()===(s||"xmlhttprequest")&&a.name===e&&h>=o&&u<=l});return c.length>0&&(c=c.filter(function(a){return!i.has(a)})),c}function Ut(e){if(typeof URL=="function")return new URL(e,typeof document!="undefined"?document.baseURI:typeof location!="undefined"?location.href:void 0);var t=YT();return t.href=e,t}function kp(e,t){if(e.nodeType===Node.DOCUMENT_NODE)return"/";var r=QT(e,t);if(t&&r.indexOf("@id")>0)return r;var n="";return e.parentNode&&(n+=kp(e.parentNode,!1)),n+=r,n}function jT(e){if(!e.parentNode)return 0;var t=[e.nodeType];e.nodeType===Node.CDATA_SECTION_NODE&&t.push(Node.TEXT_NODE);var r=Array.from(e.parentNode.childNodes);return r=r.filter(function(n){var i=n.localName;return t.indexOf(n.nodeType)>=0&&i===e.localName}),r.length>=1?r.indexOf(e)+1:0}function QT(e,t){var r=e.nodeType,n=jT(e),i="";if(r===Node.ELEMENT_NODE){var s=e.getAttribute("id");if(t&&s)return'//*[@id="'+s+'"]';i=e.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 Xp(e,t){var r=t||[];(typeof r=="string"||r instanceof RegExp)&&(r=[r]);var n=Ut(e);return n.origin===Gp()?!0:r.some(function(i){return hp(e,i)})}var Dn;(function(e){e.DOCUMENT_LOAD="documentLoad",e.DOCUMENT_FETCH="documentFetch",e.RESOURCE_FETCH="resourceFetch"})(Dn||(Dn={}));var $T="0.44.0",qT="@opentelemetry/instrumentation-document-load";const eE="http.method",tE="http.url",rE="http.status_code",nE="http.user_agent",iE=eE,en=tE,sE=rE,oE=nE,Bl="exception.message",aE="exception.stacktrace",zl="exception.type",Wp="http.response.status_code",lE="server.address",cE="service.name",uE="service.version",Pp="telemetry.sdk.name",Mp="telemetry.sdk.version",nr="url.full",_s="url.path",dE="url.query",hE="user_agent.original";var Ts;(function(e){e.FIRST_PAINT="firstPaint",e.FIRST_CONTENTFUL_PAINT="firstContentfulPaint"})(Ts||(Ts={}));var fE=function(){var e,t,r={},n=(t=(e=ft).getEntriesByType)===null||t===void 0?void 0:t.call(e,"navigation")[0];if(n){var i=Object.values(ne);i.forEach(function(l){if(rr(n,l)){var c=n[l];typeof c=="number"&&(r[l]=c)}})}else{var s=ft,o=s.timing;if(o){var i=Object.values(ne);i.forEach(function(c){if(rr(o,c)){var a=o[c];typeof a=="number"&&(r[c]=a)}})}}return r},Ap={"first-paint":Ts.FIRST_PAINT,"first-contentful-paint":Ts.FIRST_CONTENTFUL_PAINT},pE=function(e){var t,r,n=(r=(t=ft).getEntriesByType)===null||r===void 0?void 0:r.call(t,"paint");n&&n.forEach(function(i){var s=i.name,o=i.startTime;rr(Ap,s)&&e.addEvent(Ap[s],o)})},mE=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),gE=function(e){mE(t,e);function t(r){r===void 0&&(r={});var n=e.call(this,qT,$T,r)||this;return n.component="document-load",n.version="1",n.moduleName=n.component,n}return t.prototype.init=function(){},t.prototype._onDocumentLoaded=function(){var r=this;window.setTimeout(function(){r._collectPerformance()})},t.prototype._addResourcesSpans=function(r){var n=this,i,s,o=(s=(i=ft).getEntriesByType)===null||s===void 0?void 0:s.call(i,"resource");o&&o.forEach(function(l){n._initResourceSpan(l,r)})},t.prototype._collectPerformance=function(){var r=this,n=Array.from(document.getElementsByTagName("meta")).find(function(o){return o.getAttribute("name")===ps}),i=fE(),s=n&&n.content||"";pe.with(ht.extract(yr,{traceparent:s}),function(){var o,l=r._startSpan(Dn.DOCUMENT_LOAD,ne.FETCH_START,i);l&&(pe.with(we.setSpan(pe.active(),l),function(){var c=r._startSpan(Dn.DOCUMENT_FETCH,ne.FETCH_START,i);c&&(c.setAttribute(en,location.href),pe.with(we.setSpan(pe.active(),c),function(){var a;r.getConfig().ignoreNetworkEvents||qr(c,i),r._addCustomAttributesOnSpan(c,(a=r.getConfig().applyCustomAttributesOnSpan)===null||a===void 0?void 0:a.documentFetch),r._endSpan(c,ne.RESPONSE_END,i)}))}),l.setAttribute(en,location.href),l.setAttribute(oE,navigator.userAgent),r._addResourcesSpans(l),r.getConfig().ignoreNetworkEvents||(Ue(l,ne.FETCH_START,i),Ue(l,ne.UNLOAD_EVENT_START,i),Ue(l,ne.UNLOAD_EVENT_END,i),Ue(l,ne.DOM_INTERACTIVE,i),Ue(l,ne.DOM_CONTENT_LOADED_EVENT_START,i),Ue(l,ne.DOM_CONTENT_LOADED_EVENT_END,i),Ue(l,ne.DOM_COMPLETE,i),Ue(l,ne.LOAD_EVENT_START,i),Ue(l,ne.LOAD_EVENT_END,i)),r.getConfig().ignorePerformancePaintEvents||pE(l),r._addCustomAttributesOnSpan(l,(o=r.getConfig().applyCustomAttributesOnSpan)===null||o===void 0?void 0:o.documentLoad),r._endSpan(l,ne.LOAD_EVENT_END,i))})},t.prototype._endSpan=function(r,n,i){r&&(rr(i,n)?r.end(i[n]):r.end())},t.prototype._initResourceSpan=function(r,n){var i,s=this._startSpan(Dn.RESOURCE_FETCH,ne.FETCH_START,r,n);s&&(s.setAttribute(en,r.name),this.getConfig().ignoreNetworkEvents||qr(s,r),this._addCustomAttributesOnResourceSpan(s,r,(i=this.getConfig().applyCustomAttributesOnSpan)===null||i===void 0?void 0:i.resourceFetch),this._endSpan(s,ne.RESPONSE_END,r))},t.prototype._startSpan=function(r,n,i,s){if(rr(i,n)&&typeof i[n]=="number"){var o=this.tracer.startSpan(r,{startTime:i[n]},s?we.setSpan(pe.active(),s):void 0);return o}},t.prototype._waitForPageLoad=function(){window.document.readyState==="complete"?this._onDocumentLoaded():(this._onDocumentLoaded=this._onDocumentLoaded.bind(this),window.addEventListener("load",this._onDocumentLoaded))},t.prototype._addCustomAttributesOnSpan=function(r,n){var i=this;n&&vs(function(){return n(r)},function(s){s&&i._diag.error("addCustomAttributesOnSpan",s)})},t.prototype._addCustomAttributesOnResourceSpan=function(r,n,i){var s=this;i&&vs(function(){return i(r,n)},function(o){o&&s._diag.error("addCustomAttributesOnResourceSpan",o)})},t.prototype.enable=function(){window.removeEventListener("load",this._onDocumentLoaded),this._waitForPageLoad()},t.prototype.disable=function(){window.removeEventListener("load",this._onDocumentLoaded)},t}(An),Es;(function(e){e.COMPONENT="component",e.HTTP_ERROR_NAME="http.error_name",e.HTTP_STATUS_TEXT="http.status_text"})(Es||(Es={}));var yE="http.method",bE="http.url",vE="http.host",SE="http.scheme",wE="http.status_code",RE="http.user_agent",_E="http.request_content_length_uncompressed",TE=yE,EE=bE,IE=vE,CE=SE,ZE=wE,LE=RE,xE=_E,NE=function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function l(h){try{a(n.next(h))}catch(u){o(u)}}function c(h){try{a(n.throw(h))}catch(u){o(u)}}function a(h){h.done?s(h.value):i(h.value).then(l,c)}a((n=n.apply(e,t||[])).next())})},OE=function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function l(a){return function(h){return c([a,h])}}function c(a){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(s=a[0]&2?i.return:a[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,a[1])).done)return s;switch(i=0,s&&(a=[a[0]&2,s.value]),a[0]){case 0:case 1:s=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){r.label=a[1];break}if(a[0]===6&&r.label<s[1]){r.label=s[1],s=a;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(a);break}s[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(h){a=[6,h],i=0}finally{n=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},GE=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},VE=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},Up=Y.createComponentLogger({namespace:"@opentelemetry/opentelemetry-instrumentation-fetch/utils"});function kE(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(e[0]instanceof URL||typeof e[0]=="string"){var r=e[1];if(!(r!=null&&r.body))return Promise.resolve();if(r.body instanceof ReadableStream){var n=XE(r.body),i=n.body,s=n.length;return r.body=i,s}else return Promise.resolve(WE(r.body))}else{var o=e[0];return o!=null&&o.body?o.clone().text().then(function(l){return Kl(l)}):Promise.resolve()}}function XE(e){if(!e.pipeThrough)return Up.warn("Platform has ReadableStream but not pipeThrough!"),{body:e,length:Promise.resolve(void 0)};var t=0,r,n=new Promise(function(s){r=s}),i=new TransformStream({start:function(){},transform:function(s,o){return NE(this,void 0,void 0,function(){var l;return OE(this,function(c){switch(c.label){case 0:return[4,s];case 1:return l=c.sent(),t+=l.byteLength,o.enqueue(s),[2]}})})},flush:function(){r(t)}});return{body:e.pipeThrough(i),length:n}}function WE(e){if(typeof Document!="undefined"&&e instanceof Document)return new XMLSerializer().serializeToString(document).length;if(e instanceof Blob)return e.size;if(e.byteLength!==void 0)return e.byteLength;if(e instanceof FormData)return ME(e);if(e instanceof URLSearchParams)return Kl(e.toString());if(typeof e=="string")return Kl(e);Up.warn("unknown body type")}var PE=new TextEncoder;function Kl(e){return PE.encode(e).byteLength}function ME(e){var t,r,n=0;try{for(var i=GE(e.entries()),s=i.next();!s.done;s=i.next()){var o=VE(s.value,2),l=o[0],c=o[1];n+=l.length,c instanceof Blob?n+=c.size:n+=c.length}}catch(a){t={error:a}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return n}var Dp="0.57.2",AE=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),UE=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},DE=function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,s;n<i;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))},jl,FE=300,Fp=typeof process=="object"&&((jl=process.release)===null||jl===void 0?void 0:jl.name)==="node",JE=function(e){AE(t,e);function t(r){r===void 0&&(r={});var n=e.call(this,"@opentelemetry/instrumentation-fetch",Dp,r)||this;return n.component="fetch",n.version=Dp,n.moduleName=n.component,n._usedResources=new WeakSet,n._tasksCount=0,n}return t.prototype.init=function(){},t.prototype._addChildSpan=function(r,n){var i=this.tracer.startSpan("CORS Preflight",{startTime:n[ne.FETCH_START]},we.setSpan(pe.active(),r));qr(i,n,this.getConfig().ignoreNetworkEvents),i.end(n[ne.RESPONSE_END])},t.prototype._addFinalSpanAttributes=function(r,n){var i=Ut(n.url);r.setAttribute(ZE,n.status),n.statusText!=null&&r.setAttribute(Es.HTTP_STATUS_TEXT,n.statusText),r.setAttribute(IE,i.host),r.setAttribute(CE,i.protocol.replace(":","")),typeof navigator!="undefined"&&r.setAttribute(LE,navigator.userAgent)},t.prototype._addHeaders=function(r,n){if(!Xp(n,this.getConfig().propagateTraceHeaderCorsUrls)){var i={};ht.inject(pe.active(),i),Object.keys(i).length>0&&this._diag.debug("headers inject skipped due to CORS policy");return}if(r instanceof Request)ht.inject(pe.active(),r.headers,{set:function(s,o,l){return s.set(o,typeof l=="string"?l:String(l))}});else if(r.headers instanceof Headers)ht.inject(pe.active(),r.headers,{set:function(s,o,l){return s.set(o,typeof l=="string"?l:String(l))}});else if(r.headers instanceof Map)ht.inject(pe.active(),r.headers,{set:function(s,o,l){return s.set(o,typeof l=="string"?l:String(l))}});else{var i={};ht.inject(pe.active(),i),r.headers=Object.assign({},i,r.headers||{})}},t.prototype._clearResources=function(){this._tasksCount===0&&this.getConfig().clearTimingResources&&(performance.clearResourceTimings(),this._usedResources=new WeakSet)},t.prototype._createSpan=function(r,n){var i;if(n===void 0&&(n={}),fp(r,this.getConfig().ignoreUrls)){this._diag.debug("ignoring span as url matches ignored url");return}var s=(n.method||"GET").toUpperCase(),o="HTTP "+s;return this.tracer.startSpan(o,{kind:Gn.CLIENT,attributes:(i={},i[Es.COMPONENT]=this.moduleName,i[TE]=s,i[EE]=r,i)})},t.prototype._findResourceAndAddNetworkEvents=function(r,n,i){var s=n.entries;if(!s.length){if(!performance.getEntriesByType)return;s=performance.getEntriesByType("resource")}var o=Vp(n.spanUrl,n.startTime,i,s,this._usedResources,"fetch");if(o.mainRequest){var l=o.mainRequest;this._markResourceAsUsed(l);var c=o.corsPreFlightRequest;c&&(this._addChildSpan(r,c),this._markResourceAsUsed(c)),qr(r,l,this.getConfig().ignoreNetworkEvents)}},t.prototype._markResourceAsUsed=function(r){this._usedResources.add(r)},t.prototype._endSpan=function(r,n,i){var s=this,o=pt(Date.now()),l=vr();this._addFinalSpanAttributes(r,i),setTimeout(function(){var c;(c=n.observer)===null||c===void 0||c.disconnect(),s._findResourceAndAddNetworkEvents(r,n,l),s._tasksCount--,s._clearResources(),r.end(o)},FE)},t.prototype._patchConstructor=function(){var r=this;return function(n){var i=r;return function(){for(var o=[],l=0;l<arguments.length;l++)o[l]=arguments[l];var c=this,a=Ut(o[0]instanceof Request?o[0].url:String(o[0])).href,h=o[0]instanceof Request?o[0]:o[1]||{},u=i._createSpan(a,h);if(!u)return n.apply(this,o);var f=i._prepareSpanData(a);i.getConfig().measureRequestSize&&kE.apply(void 0,DE([],UE(o),!1)).then(function(v){v&&u.setAttribute(xE,v)}).catch(function(v){i._diag.warn("getFetchBodyLength",v)});function d(v,y){i._applyAttributesAfterFetch(v,h,y),i._endSpan(v,f,{status:y.status||0,statusText:y.message,url:a})}function p(v,y){i._applyAttributesAfterFetch(v,h,y),y.status>=200&&y.status<400?i._endSpan(v,f,y):i._endSpan(v,f,{status:y.status,statusText:y.statusText,url:a})}function m(v,y,w){try{var _=w.clone(),S=w.clone(),b=_.body;if(b){var R=b.getReader(),I=function(){R.read().then(function(E){var C=E.done;C?p(v,S):I()},function(E){d(v,E)})};I()}else p(v,w)}finally{y(w)}}function g(v,y,w){try{d(v,w)}finally{y(w)}}return new Promise(function(v,y){return pe.with(we.setSpan(pe.active(),u),function(){return i._addHeaders(h,a),i._tasksCount++,n.apply(c,h instanceof Request?[h]:[a,h]).then(m.bind(c,u,v),g.bind(c,u,y))})})}}},t.prototype._applyAttributesAfterFetch=function(r,n,i){var s=this,o=this.getConfig().applyCustomAttributesOnSpan;o&&vs(function(){return o(r,n,i)},function(l){l&&s._diag.error("applyCustomAttributesOnSpan",l)})},t.prototype._prepareSpanData=function(r){var n=vr(),i=[];if(typeof PerformanceObserver!="function")return{entries:i,startTime:n,spanUrl:r};var s=new PerformanceObserver(function(o){var l=o.getEntries();l.forEach(function(c){c.initiatorType==="fetch"&&c.name===r&&i.push(c)})});return s.observe({entryTypes:["resource"]}),{entries:i,observer:s,startTime:n,spanUrl:r}},t.prototype.enable=function(){if(Fp){this._diag.warn("this instrumentation is intended for web usage only, it does not instrument Node.js's fetch()");return}Ae(fetch)&&(this._unwrap(Vn,"fetch"),this._diag.debug("removing previous patch for constructor")),this._wrap(Vn,"fetch",this._patchConstructor())},t.prototype.disable=function(){Fp||(this._unwrap(Vn,"fetch"),this._usedResources=new WeakSet)},t}(An),HE="http.method",YE="http.url",BE="http.host",zE="http.scheme",KE="http.status_code",jE="http.user_agent",QE="http.request_content_length_uncompressed",$E=HE,qE=YE,eI=BE,tI=zE,rI=KE,nI=jE,iI=QE,Dt;(function(e){e.METHOD_OPEN="open",e.METHOD_SEND="send",e.EVENT_ABORT="abort",e.EVENT_ERROR="error",e.EVENT_LOAD="loaded",e.EVENT_TIMEOUT="timeout"})(Dt||(Dt={}));var sI=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},oI=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},aI=Y.createComponentLogger({namespace:"@opentelemetry/opentelemetry-instrumentation-xml-http-request/utils"});function lI(e){if(typeof Document!="undefined"&&e instanceof Document)return new XMLSerializer().serializeToString(document).length;if(e instanceof Blob)return e.size;if(e.byteLength!==void 0)return e.byteLength;if(e instanceof FormData)return uI(e);if(e instanceof URLSearchParams)return Jp(e.toString());if(typeof e=="string")return Jp(e);aI.warn("unknown body type")}var cI=new TextEncoder;function Jp(e){return cI.encode(e).byteLength}function uI(e){var t,r,n=0;try{for(var i=sI(e.entries()),s=i.next();!s.done;s=i.next()){var o=oI(s.value,2),l=o[0],c=o[1];n+=l.length,c instanceof Blob?n+=c.size:n+=c.length}}catch(a){t={error:a}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return n}var Hp="0.57.2",Ql;(function(e){e.HTTP_STATUS_TEXT="http.status_text"})(Ql||(Ql={}));var dI=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),hI=300,fI=function(e){dI(t,e);function t(r){r===void 0&&(r={});var n=e.call(this,"@opentelemetry/instrumentation-xml-http-request",Hp,r)||this;return n.component="xml-http-request",n.version=Hp,n.moduleName=n.component,n._tasksCount=0,n._xhrMem=new WeakMap,n._usedResources=new WeakSet,n}return t.prototype.init=function(){},t.prototype._addHeaders=function(r,n){var i=Ut(n).href;if(!Xp(i,this.getConfig().propagateTraceHeaderCorsUrls)){var s={};ht.inject(pe.active(),s),Object.keys(s).length>0&&this._diag.debug("headers inject skipped due to CORS policy");return}var o={};ht.inject(pe.active(),o),Object.keys(o).forEach(function(l){r.setRequestHeader(l,String(o[l]))})},t.prototype._addChildSpan=function(r,n){var i=this;pe.with(we.setSpan(pe.active(),r),function(){var s=i.tracer.startSpan("CORS Preflight",{startTime:n[ne.FETCH_START]});qr(s,n,i.getConfig().ignoreNetworkEvents),s.end(n[ne.RESPONSE_END])})},t.prototype._addFinalSpanAttributes=function(r,n,i){if(typeof i=="string"){var s=Ut(i);n.status!==void 0&&r.setAttribute(rI,n.status),n.statusText!==void 0&&r.setAttribute(Ql.HTTP_STATUS_TEXT,n.statusText),r.setAttribute(eI,s.host),r.setAttribute(tI,s.protocol.replace(":","")),r.setAttribute(nI,navigator.userAgent)}},t.prototype._applyAttributesAfterXHR=function(r,n){var i=this,s=this.getConfig().applyCustomAttributesOnSpan;typeof s=="function"&&vs(function(){return s(r,n)},function(o){o&&i._diag.error("applyCustomAttributesOnSpan",o)})},t.prototype._addResourceObserver=function(r,n){var i=this._xhrMem.get(r);!i||typeof PerformanceObserver!="function"||typeof PerformanceResourceTiming!="function"||(i.createdResources={observer:new PerformanceObserver(function(s){var o=s.getEntries(),l=Ut(n);o.forEach(function(c){c.initiatorType==="xmlhttprequest"&&c.name===l.href&&i.createdResources&&i.createdResources.entries.push(c)})}),entries:[]},i.createdResources.observer.observe({entryTypes:["resource"]}))},t.prototype._clearResources=function(){this._tasksCount===0&&this.getConfig().clearTimingResources&&(ft.clearResourceTimings(),this._xhrMem=new WeakMap,this._usedResources=new WeakSet)},t.prototype._findResourceAndAddNetworkEvents=function(r,n,i,s,o){if(!(!i||!s||!o||!r.createdResources)){var l=r.createdResources.entries;(!l||!l.length)&&(l=ft.getEntriesByType("resource"));var c=Vp(Ut(i).href,s,o,l,this._usedResources);if(c.mainRequest){var a=c.mainRequest;this._markResourceAsUsed(a);var h=c.corsPreFlightRequest;h&&(this._addChildSpan(n,h),this._markResourceAsUsed(h)),qr(n,a,this.getConfig().ignoreNetworkEvents)}}},t.prototype._cleanPreviousSpanInformation=function(r){var n=this._xhrMem.get(r);if(n){var i=n.callbackToRemoveEvents;i&&i(),this._xhrMem.delete(r)}},t.prototype._createSpan=function(r,n,i){var s;if(fp(n,this.getConfig().ignoreUrls)){this._diag.debug("ignoring span as url matches ignored url");return}var o=i.toUpperCase(),l=this.tracer.startSpan(o,{kind:Gn.CLIENT,attributes:(s={},s[$E]=i,s[qE]=Ut(n).toString(),s)});return l.addEvent(Dt.METHOD_OPEN),this._cleanPreviousSpanInformation(r),this._xhrMem.set(r,{span:l,spanUrl:n}),l},t.prototype._markResourceAsUsed=function(r){this._usedResources.add(r)},t.prototype._patchOpen=function(){var r=this;return function(n){var i=r;return function(){for(var o=[],l=0;l<arguments.length;l++)o[l]=arguments[l];var c=o[0],a=o[1];return i._createSpan(this,a,c),n.apply(this,o)}}},t.prototype._patchSend=function(){var r=this;function n(h,u,f,d){var p=u.callbackToRemoveEvents;typeof p=="function"&&p();var m=u.span,g=u.spanUrl,v=u.sendStartTime;m&&(r._findResourceAndAddNetworkEvents(u,m,g,v,f),m.addEvent(h,d),r._addFinalSpanAttributes(m,u,g),m.end(d),r._tasksCount--),r._clearResources()}function i(h,u){var f=r._xhrMem.get(u);if(f){f.status=u.status,f.statusText=u.statusText,r._xhrMem.delete(u),f.span&&r._applyAttributesAfterXHR(f.span,u);var d=vr(),p=Date.now();setTimeout(function(){n(h,f,d,p)},hI)}}function s(){i(Dt.EVENT_ERROR,this)}function o(){i(Dt.EVENT_ABORT,this)}function l(){i(Dt.EVENT_TIMEOUT,this)}function c(){this.status<299?i(Dt.EVENT_LOAD,this):i(Dt.EVENT_ERROR,this)}function a(h){h.removeEventListener("abort",o),h.removeEventListener("error",s),h.removeEventListener("load",c),h.removeEventListener("timeout",l);var u=r._xhrMem.get(h);u&&(u.callbackToRemoveEvents=void 0)}return function(h){return function(){for(var f=this,d=[],p=0;p<arguments.length;p++)d[p]=arguments[p];var m=r._xhrMem.get(this);if(!m)return h.apply(this,d);var g=m.span,v=m.spanUrl;if(g&&v){if(r.getConfig().measureRequestSize&&(d!=null&&d[0])){var y=d[0],w=lI(y);w!==void 0&&g.setAttribute(iI,w)}pe.with(we.setSpan(pe.active(),g),function(){r._tasksCount++,m.sendStartTime=vr(),g.addEvent(Dt.METHOD_SEND),f.addEventListener("abort",o),f.addEventListener("error",s),f.addEventListener("load",c),f.addEventListener("timeout",l),m.callbackToRemoveEvents=function(){a(f),m.createdResources&&m.createdResources.observer.disconnect()},r._addHeaders(f,v),r._addResourceObserver(f,v)})}return h.apply(this,d)}}},t.prototype.enable=function(){this._diag.debug("applying patch to",this.moduleName,this.version),Ae(XMLHttpRequest.prototype.open)&&(this._unwrap(XMLHttpRequest.prototype,"open"),this._diag.debug("removing previous patch from method open")),Ae(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())},t.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},t}(An);const $l=/\b(query|mutation|subscription)\b\s*([A-Za-z_]\w*)?/g;function pI(e){var a;const t=gI(e);if(t===null||typeof t!="object")return null;const r=Array.isArray(t)?t[0]:t;if(!r||typeof r!="object")return null;const n=r,i=typeof n.query=="string"?n.query:void 0,s=typeof n.operationName=="string"?n.operationName:void 0;if(i===void 0&&s===void 0)return null;const o=i?mI(i,s):null,l=(a=o==null?void 0:o[1])!=null?a:yI(i),c=s!=null?s:o==null?void 0:o[2];return c===void 0&&l===void 0?null:{name:c,type:l}}function mI(e,t){$l.lastIndex=0;let r=null;for(let n=$l.exec(e);n!==null;n=$l.exec(e)){if(t===void 0||n[2]===t)return n;r===null&&(r=n)}return r}function gI(e){if(e==null)return null;if(typeof e=="object")return e;if(typeof e!="string")return null;try{return JSON.parse(e)}catch(t){return null}}function yI(e){if(e!==void 0&&/^\s*\{/.test(e))return"query"}const bI=0,Yp=2e3;class vI{constructor(t=bI,r=Yp){this.lastRecordedAt=new Map,this.windowMillis=t,this.maxSize=r>0?r:Yp}shouldRecord(t,r=Date.now()){if(this.windowMillis<=0)return!0;const n=this.lastRecordedAt.get(t);return n===void 0||n<=r-this.windowMillis}markRecorded(t,r=Date.now()){if(!(this.windowMillis<=0))for(this.lastRecordedAt.delete(t),this.lastRecordedAt.set(t,r);this.lastRecordedAt.size>this.maxSize;){const n=this.lastRecordedAt.keys().next().value;if(n===void 0)break;this.lastRecordedAt.delete(n)}}reset(){this.lastRecordedAt.clear()}}const Is=1e3,Bp=1e3*2,ql=4*60*60*1e3,ec=15*60*1e3,Cs={normal:{bytes:1e7,time:4*60*1e3},canvas:{bytes:16e6,time:5e3}},zp=100,Fn="app.highlight.io",Kp="https://app.launchdarkly.com",SI={"observability.ld-stg.launchdarkly.com":"ld-stg.launchdarkly.com","observability.app.launchdarkly.com":"app.launchdarkly.com","observability.app.ld.catamorphic.com":"app.ld.catamorphic.com"},wI="/projects/default",RI=new RegExp("pub\\.(?<domain>.+)");/*! js-cookie v3.0.8 | MIT */function Zs(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)n!=="__proto__"&&(e[n]=r[n])}return e}var _I={read:function(e){return e[0]==='"'&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function tc(e,t){function r(i,s,o){if(typeof document!="undefined"){o=Zs({},t,o),typeof o.expires=="number"&&(o.expires=new Date(Date.now()+o.expires*864e5)),o.expires&&(o.expires=o.expires.toUTCString()),i=encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var l="";for(var c in o)o[c]&&(l+="; "+c,o[c]!==!0&&(l+="="+o[c].split(";")[0]));return document.cookie=i+"="+e.write(s,i)+l}}function n(i){if(!(typeof document=="undefined"||arguments.length&&!i)){for(var s=document.cookie?document.cookie.split("; "):[],o={},l=0;l<s.length;l++){var c=s[l].split("="),a=c.slice(1).join("=");try{var h=decodeURIComponent(c[0]);if(h in o||(o[h]=e.read(a,h)),i===h)break}catch(u){}}return i?o[i]:o}}return Object.create({set:r,get:n,remove:function(i,s){r(i,"",Zs({},s,{expires:-1}))},withAttributes:function(i){return tc(this.converter,Zs({},this.attributes,i))},withConverter:function(i){return tc(Zs({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var Ls=tc(_I,{path:"/"});const jp=Object.create(null),We=(e,t,...r)=>{const n=`[@launchdarkly plugins]: (${e}): `;_e(t,n,...r)},It=(e,t,r,...n)=>{jp[`${e}-${t}`]||(jp[`${e}-${t}`]=!0,We(e,r,...n))};var Jn=(e=>(e.CLIENT_ID="highlightClientID",e))(Jn||{});let xs="localStorage",rc=!0,Hn;class TI{constructor(){L(this,"storage",{})}get length(){return Object.keys(this.storage).length}key(t){var n;return(n=Object.keys(this.storage)[t])!=null?n:null}getItem(t){var r;return(r=this.storage[t])!=null?r:""}setItem(t,r){this.storage[t]=r}removeItem(t){delete this.storage[t]}}class EI{getItem(t){var r;return(r=Ls.get(t))!=null?r:""}setItem(t,r){if(!rc)return;const n=new Date;n.setTime(n.getTime()+ec),Ls.set(t,r,x({expires:n},Hn?{domain:Hn}:{}))}removeItem(t){rc&&Ls.remove(t,Hn?{domain:Hn}:void 0)}keys(){var t;return Object.keys((t=Ls.get())!=null?t:{})}}const tn=new TI,rn=new EI,Ns=()=>{let e=null;if(typeof window=="undefined")return tn;try{switch(xs){case"localStorage":e=window.localStorage;break;case"sessionStorage":e=window.sessionStorage;break}e||(It("storage","getPersistentStorage","debug",`persistent storage was not found for mode ${xs}; using global storage`),e=tn)}catch(t){It("storage","getPersistentStorage","debug","failed to get persistent storage; using global storage",t),e=tn}return e},Qp=e=>{xs=e},Os=e=>{rc=e},$p=e=>{Hn=e},He=e=>{try{return Ns().getItem(e)}catch(t){return It("storage","getItem","debug",`failed to get item ${e}; using global storage`,t),tn.getItem(e)}},mt=(e,t)=>{rn.setItem(e,t);try{return Ns().setItem(e,t)}catch(r){return It("storage","setItem","debug",`failed to set item ${e}; using global storage`,r),tn.setItem(e,t)}},Rr=e=>{rn.removeItem(e);try{return Ns().removeItem(e)}catch(t){return It("storage","removeItem","debug",`failed to remove item ${e}; using global storage`,t),tn.removeItem(e)}},II=e=>{if(xs==="sessionStorage"){It("segment","sessionStorage","warn","highlight.io cannot use local storage; segment integration will not work");return}if(typeof window=="undefined"){It("segment","no-window","warn","highlight.io cannot use local storage (not a window); segment integration will not work");return}const t=window.localStorage.setItem;window.localStorage.setItem=function(){const[r,n]=arguments;e({keyName:r,keyValue:n}),t.apply(this,[r,n])}};var Ge=(e=>(e.SEGMENT_LAST_SENT_HASH_KEY="HIGHLIGHT_SEGMENT_LAST_SENT_HASH_KEY",e.SESSION_ID="sessionID",e.SESSION_DATA="sessionData",e.USER_IDENTIFIER="highlightIdentifier",e.USER_OBJECT="highlightUserObject",e))(Ge||{});const Yn=e=>`${Ge.SESSION_DATA}_${e}`,Nt=()=>{var e;return typeof globalThis!="undefined"&&((e=globalThis.persistentSessionSecureID)!=null&&e.length)?globalThis.persistentSessionSecureID:qp()},CI=e=>{typeof globalThis!="undefined"&&(e!=null&&e.length)&&(globalThis.persistentSessionSecureID=e)},qp=()=>{var e;return(e=He(Ge.SESSION_ID))!=null?e:""},ir=e=>{mt(Ge.SESSION_ID,e)},em=e=>{const t=Yn(e);return JSON.parse(He(t)||"{}")},tm=(e,t)=>!e.sessionKey&&!!e.sessionStartTime&&t-e.sessionStartTime>ql,Ft=e=>{e||(e=qp());let t=em(e);if(t&&t.lastPushTime&&Date.now()-t.lastPushTime<ec&&!tm(t,Date.now()))return t;Rr(Yn(e))},ZI=10*1e3;let rm=0;const LI=()=>{const e=Date.now();if(!(e-rm<ZI)){rm=e;try{const t=em(Nt());if(!(t!=null&&t.sessionSecureID))return;if(tm(t,e)){Rr(Yn(t.sessionSecureID));return}it(B(x({},t),{lastPushTime:e}))}catch(t){It("highlightSession","touchSession","debug","failed to refresh session activity",t)}}},it=function(e){if(!(e!=null&&e.sessionSecureID))return;const t=e.sessionSecureID;CI(t);const r=Yn(t);mt(r,JSON.stringify(e)),xI(r)},nm=function(){const e=rn.getItem(Ge.SESSION_ID);ir(e);const t=Yn(e),r=rn.getItem(t);try{it(JSON.parse(r))}catch(n){}};function xI(e){var i;const t=`${Ge.SESSION_DATA}_`,r=new Set,n=Ns();for(let s=n.length-1;s>=0;s--){const o=n.key(s);o&&o.startsWith(t)&&o!==e&&r.add(o)}for(const s of rn.keys())s.startsWith(t)&&s!==e&&r.add(s);for(const s of r){let o=!0;try{const l=He(s)||rn.getItem(s)||"{}",c=JSON.parse(l),a=(i=c.lastPushTime)!=null?i:c.sessionStartTime;o=a===void 0||Date.now()-a>=ec}catch(l){}o&&(It("highlightSession","pruneSessionData","debug",`removing session data for stale key ${s}`),Rr(s))}}const NI=new RegExp("sdk\\/evalx\\/[^/]+\\/contexts\\/(?<context>[^/?]*)\\??.*?"),OI=new RegExp("\\/eval\\/[^/]+\\/(?<context>[^/?]*)\\??.*?");function GI(e){return!!(e.includes("/sdk/evalx")&&e.match(NI)||e.includes("/eval/")&&e.match(OI))}const im="X-Highlight-Request",sm=e=>{let t=e;return!e.startsWith("https://")&&!e.startsWith("http://")&&(t=`${window.location.origin}${t}`),t.replace(/\/+$/,"")},VI=(e,{headersToRedact:t,headersToRecord:r,requestResponseSanitizer:n})=>{var c,a;let i=e;if(n){let u=!0;try{i.request.body=JSON.parse(i.request.body)}catch(d){u=!1}let f=!0;try{i.response.body=JSON.parse(i.response.body)}catch(d){f=!1}try{i=n(i)}catch(d){}finally{u=u&&!!((c=i==null?void 0:i.request)!=null&&c.body),f=f&&!!((a=i==null?void 0:i.response)!=null&&a.body),u&&(i.request.body=JSON.stringify(i.request.body)),f&&(i.response.body=JSON.stringify(i.response.body))}if(!i)return null}const h=i,{request:s,response:o}=h,l=nt(h,["request","response"]);return x({request:Tf(s,t,r),response:Tf(o,t,r)},l)},om=(e,t,r,n)=>{e.sort((c,a)=>c.responseEnd-a.responseEnd);const i={xmlhttprequest:{},others:{},fetch:{}},s=e.reduce((c,a)=>{const h=sm(a.name);return a.initiatorType===r?c[r][h]=[...c[r][h]||[],a]:c.others[h]=[...c.others[h]||[],a],c},i);let o={};o=t.reduce((c,a)=>{const h=sm(a.request.url);return c[h]=[...c[h]||[],a],c},o);for(let c in s[r]){const a=s[r][c],h=o[c];if(!h)continue;const u=Math.max(a.length-h.length,0);for(let f=u;f<a.length;f++)a[f]&&(a[f].requestResponsePair=h[f-u])}let l=[];for(let c in s)for(let a in s[c])l=l.concat(s[c][a]);return l.sort((c,a)=>c.fetchStart-a.fetchStart).reduce((c,a)=>{let h=a.requestResponsePair;return h&&(h=VI(a.requestResponsePair,n),!h)||(a.toJSON=function(){const u=window.performance.timeOrigin;return{initiatorType:this.initiatorType,startTimeAbs:u+this.startTime,connectStartAbs:u+this.connectStart,connectEndAbs:u+this.connectEnd,domainLookupStartAbs:u+this.domainLookupStart,domainLookupEndAbs:u+this.domainLookupEnd,fetchStartAbs:u+this.fetchStart,redirectStartAbs:u+this.redirectStart,redirectEndAbs:u+this.redirectEnd,requestStartAbs:u+this.requestStart,responseStartAbs:u+this.responseStart,responseEndAbs:u+this.responseEnd,secureConnectionStartAbs:u+this.secureConnectionStart,workerStartAbs:u+this.workerStart,name:this.name,transferSize:this.transferSize,encodedBodySize:this.encodedBodySize,decodedBodySize:this.decodedBodySize,nextHopProtocol:this.nextHopProtocol,requestResponsePairs:h}},c.push(a)),c},[])},kI=e=>["events.ld.catamorphic.com","events.launchdarkly.com"].some(t=>e.toLocaleLowerCase().includes(t)),XI=e=>GI(e),WI=(e,t)=>t.some(r=>e.toLocaleLowerCase().includes(r)),Gs=(e,t,r)=>!WI(e,t)&&!XI(e)&&!kI(e),nc=(e,t,r)=>{var o;if(r.some(l=>e.toLowerCase().includes(l)))return!1;let n=[];t===!0?(n=["localhost",/^\//],(o=window==null?void 0:window.location)!=null&&o.host&&n.push(am(window.location.host))):t instanceof Array&&(n=t);const i=MI(e);let s=!1;return n.forEach(l=>{i.match(l)&&(s=!0)}),s},PI=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),am=e=>new RegExp("^https?://([^/]+\\.)?"+PI(e)+"([:/?#]|$)"),MI=e=>{if(e.startsWith("/")&&!e.startsWith("//"))return e;try{return new URL(e).origin}catch(t){return e}};function AI(e){for(var t="",r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n=r.length,i=0;i<e;i++)t+=r.charAt(Math.floor(Math.random()*n));return t}const ic=()=>{const e=AI(10),t=Ox(),r=t==null?void 0:t.spanContext().traceId;return[Nt(),r!=null?r:e]},lm=(e,t)=>e+"/"+t,UI=(e,t,r,n,i,s)=>{const o=XMLHttpRequest.prototype,l=o.open,c=o.send,a=o.setRequestHeader;return o.open=function(h,u){return typeof u=="string"?this._url=u:this._url=u.toString(),this._method=h,this._requestHeaders={},this._shouldRecordHeaderAndBody=!n.some(f=>this._url.toLowerCase().includes(f)),l.apply(this,arguments)},o.setRequestHeader=function(h,u){return this._requestHeaders[h]=u,a.apply(this,arguments)},o.send=function(h){if(!Gs(this._url,t))return c.apply(this,arguments);const[u,f]=ic();nc(this._url,r,n)&&this.setRequestHeader(im,lm(u,f));const d=this._shouldRecordHeaderAndBody,p={sessionSecureID:u,id:f,url:this._url,verb:this._method,headers:d?this._requestHeaders:{},body:void 0};if(d&&h){const m=sc(h,p.url);m&&(this._body=m,p.body=Ot(m,i,s,p.headers))}return this.addEventListener("load",function(){return z(this,null,function*(){const m={status:this.status,headers:{},body:void 0};if(d){const y=this.getAllResponseHeaders().trim().split(/[\r\n]+/),w={};if(y.forEach(function(_){const S=_.split(": "),b=S.shift();w[b]=S.join(": ")}),m.headers=w,h){const _=sc(h,p.url);_&&(p.body=Ot(_,i,s,m.headers))}if(this.responseType===""||this.responseType==="text")m.body=Ot(this.responseText,i,s,m.headers),m.size=this.responseText.length*8;else if(this.responseType==="blob"){if(this.response instanceof Blob)try{const _=yield this.response.text();m.body=Ot(_,i,s,m.headers),m.size=this.response.size}catch(_){}}else try{m.body=Ot(this.response,i,s,m.headers)}catch(_){}}e({request:p,response:m,urlBlocked:!d})})}),this.addEventListener("error",function(){return z(this,null,function*(){const m={status:this.status,headers:void 0,body:void 0};e({request:p,response:m,urlBlocked:!1})})}),c.apply(this,arguments)},()=>{o.open=l,o.send=c,o.setRequestHeader=a}},DI=/^\[object (ArrayBuffer|SharedArrayBuffer|DataView|(?:Ui|I)nt(?:8|16|32)Array|Uint8ClampedArray|Float(?:16|32|64)Array|Big(?:Ui|I)nt64Array|Blob|File|FormData|URLSearchParams|ReadableStream)\]$/,FI=e=>typeof e=="object"&&e!==null&&DI.test(Object.prototype.toString.call(e)),JI=e=>{var r,n;return typeof Blob!="undefined"&&e instanceof Blob?`[Blob type="${e.type}" size=${e.size}]`:typeof FormData!="undefined"&&e instanceof FormData?"[FormData]":typeof URLSearchParams!="undefined"&&e instanceof URLSearchParams?e.toString().slice(0,oc):`[binary size=${(n=(r=e==null?void 0:e.byteLength)!=null?r:e==null?void 0:e.size)!=null?n:0}]`},sc=(e,t)=>{if(FI(e))return JI(e);if(typeof e=="string"){if(!((t!=null&&t.includes("localhost")||t!=null&&t.includes("highlight.run"))&&(e.includes("pushPayload")||e.includes("pushSessionEvents"))))return e}else if(typeof e=="object"||typeof e=="number"||typeof e=="boolean")return Rt(e);return null},oc=64*1024,HI={"application/json":256*1024,"text/plain":256*1024},cm=(e,t)=>`[body omitted: ${e} bytes exceeds the ${t} byte limit]`,ac=e=>{var r,n;if(!e)return oc;let t="";if(typeof e.get=="function")t=(r=e.get("content-type"))!=null?r:"";else{const i=e,s=Object.keys(i).find(o=>o.toLowerCase()==="content-type");t=s&&i[s]||""}try{t=t.split(";")[0].trim()}catch(i){}return(n=HI[t])!=null?n:oc},um=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),Ot=(e,t,r,n)=>{const i=ac(n);if(typeof e=="string"&&e.length>i)return cm(e.length,i);if(e){if(t)try{const s=JSON.parse(e);Array.isArray(s)?s.forEach(o=>{um(o)&&Object.keys(o).forEach(l=>{t.includes(l.toLocaleLowerCase())&&(o[l]="[REDACTED]")})}):Object.keys(s).forEach(o=>{t.includes(o.toLocaleLowerCase())&&(s[o]="[REDACTED]")}),e=JSON.stringify(s)}catch(s){}if(r)try{const s=JSON.parse(e);Array.isArray(s)?s.forEach((o,l)=>{if(!um(o)){s[l]="[REDACTED]";return}Object.keys(o).forEach(c=>{r.includes(c.toLocaleLowerCase())||(o[c]="[REDACTED]")})}):Object.keys(s).forEach(o=>{r.includes(o.toLocaleLowerCase())||(s[o]="[REDACTED]")}),e=JSON.stringify(s)}catch(s){}}try{e=e.slice(0,i)}catch(s){}return e},YI=(e,t,r,n,i,s)=>{const o=window._fetchProxy;return window._fetchProxy=function(l,c){const{method:a,url:h}=BI(l,c);if(!Gs(h,t))return o.call(this,l,c);const[u,f]=ic();if(nc(h,r,n)){c=c||{};let g=new Headers(c.headers);l instanceof Request&&[...l.headers].forEach(([v,y])=>g.set(v,y)),g.set(im,lm(u,f)),c.headers=Object.fromEntries(g.entries())}const d={sessionSecureID:u,id:f,headers:{},body:void 0,url:h,verb:a},p=!n.some(g=>h.toLowerCase().includes(g));p&&(d.headers=Object.fromEntries(new Headers(c==null?void 0:c.headers).entries()),d.body=Ot(c==null?void 0:c.body,i,s,c==null?void 0:c.headers));let m=o.call(this,l,c);return zI(m,d,e,p,i,s),m},()=>{window._fetchProxy=o}},BI=(e,t)=>{const r=t&&t.method||typeof e=="object"&&"method"in e&&e.method||"GET";let n;return typeof e=="object"?"url"in e&&e.url?n=e.url:n=e.toString():n=e,{method:r,url:n}},zI=(e,t,r,n,i,s)=>{const o=l=>z(this,null,function*(){let c={body:void 0,headers:void 0,status:0,size:0},a=!1,h=!n;"stack"in l||l instanceof Error?(c=B(x({},c),{body:l.message,status:0,size:void 0}),a=!0):"status"in l&&(c=B(x({},c),{status:l.status}),n&&(c.body=yield dm(l,s,i),c.headers=Object.fromEntries(l.headers.entries()),c.size=c.body.length*8),(l.type==="opaque"||l.type==="opaqueredirect")&&(h=!0,c=B(x({},c),{body:"CORS blocked request"})),a=!0),a&&r({request:t,response:c,urlBlocked:h})});e.then(o).catch(()=>{})},dm=(e,t,r)=>z(this,null,function*(){let n;try{const s=e.clone().body;if(s){let o=s.getReader(),l=new TextDecoder,c;const a=ac(e.headers);let h="",u=!1;for(;!(c=yield o.read()).done;){let f=c.value;if(h+=l.decode(f,{stream:!0}),h.length>a){u=!0,o.cancel().catch(()=>{});break}}u||(h+=l.decode()),n=u?cm(Number(e.headers.get("content-length"))||h.length,a):h,n=Ot(n,r,t,e.headers)}else n=""}catch(i){n=`Unable to clone response: ${i}`}return n});var Ct;(function(e){e[e.DELTA=0]="DELTA",e[e.CUMULATIVE=1]="CUMULATIVE"})(Ct||(Ct={}));var Gt;(function(e){e[e.HISTOGRAM=0]="HISTOGRAM",e[e.EXPONENTIAL_HISTOGRAM=1]="EXPONENTIAL_HISTOGRAM",e[e.GAUGE=2]="GAUGE",e[e.SUM=3]="SUM"})(Gt||(Gt={}));var KI=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),hm=function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function l(h){try{a(n.next(h))}catch(u){o(u)}}function c(h){try{a(n.throw(h))}catch(u){o(u)}}function a(h){h.done?s(h.value):i(h.value).then(l,c)}a((n=n.apply(e,t||[])).next())})},fm=function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function l(a){return function(h){return c([a,h])}}function c(a){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(s=a[0]&2?i.return:a[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,a[1])).done)return s;switch(i=0,s&&(a=[a[0]&2,s.value]),a[0]){case 0:case 1:s=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){r.label=a[1];break}if(a[0]===6&&r.label<s[1]){r.label=s[1],s=a;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(a);break}s[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(h){a=[6,h],i=0}finally{n=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},jI=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},QI=function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,s;n<i;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))},$I=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};function qI(e){return e!=null}function pm(e){var t=Object.keys(e);return t.length===0?"":(t=t.sort(),JSON.stringify(t.map(function(r){return[r,e[r]]})))}function eC(e){var t,r;return e.name+":"+((t=e.version)!==null&&t!==void 0?t:"")+":"+((r=e.schemaUrl)!==null&&r!==void 0?r:"")}var mm=function(e){KI(t,e);function t(r){var n=e.call(this,r)||this;return Object.setPrototypeOf(n,t.prototype),n}return t}(Error);function Bn(e,t){var r,n=new Promise(function(s,o){r=setTimeout(function(){o(new mm("Operation timed out."))},t)});return Promise.race([e,n]).then(function(i){return clearTimeout(r),i},function(i){throw clearTimeout(r),i})}function tC(e){return hm(this,void 0,void 0,function(){var t=this;return fm(this,function(r){return[2,Promise.all(e.map(function(n){return hm(t,void 0,void 0,function(){var i,s;return fm(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,n];case 1:return i=o.sent(),[2,{status:"fulfilled",value:i}];case 2:return s=o.sent(),[2,{status:"rejected",reason:s}];case 3:return[2]}})})}))]})})}function rC(e){return e.status==="rejected"}function gm(e,t){var r=[];return e.forEach(function(n){r.push.apply(r,QI([],jI(t(n)),!1))}),r}function nC(e,t){var r,n;if(e.size!==t.size)return!1;try{for(var i=$I(e),s=i.next();!s.done;s=i.next()){var o=s.value;if(!t.has(o))return!1}}catch(l){r={error:l}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return!0}function iC(e,t){for(var r=0,n=e.length-1,i=e.length;n>=r;){var s=r+Math.trunc((n-r)/2);e[s]<t?r=s+1:(i=s,n=s-1)}return i}function sC(e,t){return e.toLowerCase()===t.toLowerCase()}var _r;(function(e){e[e.DROP=0]="DROP",e[e.SUM=1]="SUM",e[e.LAST_VALUE=2]="LAST_VALUE",e[e.HISTOGRAM=3]="HISTOGRAM",e[e.EXPONENTIAL_HISTOGRAM=4]="EXPONENTIAL_HISTOGRAM"})(_r||(_r={}));var oC=function(){function e(){this.kind=_r.DROP}return e.prototype.createAccumulation=function(){},e.prototype.merge=function(t,r){},e.prototype.diff=function(t,r){},e.prototype.toMetricData=function(t,r,n,i){},e}(),se;(function(e){e.COUNTER="COUNTER",e.GAUGE="GAUGE",e.HISTOGRAM="HISTOGRAM",e.UP_DOWN_COUNTER="UP_DOWN_COUNTER",e.OBSERVABLE_COUNTER="OBSERVABLE_COUNTER",e.OBSERVABLE_GAUGE="OBSERVABLE_GAUGE",e.OBSERVABLE_UP_DOWN_COUNTER="OBSERVABLE_UP_DOWN_COUNTER"})(se||(se={}));function sr(e,t,r){var n,i,s,o;return uC(e)||Y.warn('Invalid metric name: "'+e+'". The metric name should be a ASCII string with a length no greater than 255 characters.'),{name:e,type:t,description:(n=r==null?void 0:r.description)!==null&&n!==void 0?n:"",unit:(i=r==null?void 0:r.unit)!==null&&i!==void 0?i:"",valueType:(s=r==null?void 0:r.valueType)!==null&&s!==void 0?s:qt.DOUBLE,advice:(o=r==null?void 0:r.advice)!==null&&o!==void 0?o:{}}}function aC(e,t){var r,n;return{name:(r=e.name)!==null&&r!==void 0?r:t.name,description:(n=e.description)!==null&&n!==void 0?n:t.description,type:t.type,unit:t.unit,valueType:t.valueType,advice:t.advice}}function lC(e,t){return sC(e.name,t.name)&&e.unit===t.unit&&e.type===t.type&&e.valueType===t.valueType}var cC=/^[a-z][a-z0-9_.\-/]{0,254}$/i;function uC(e){return e.match(cC)!=null}var dC=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s};function hC(e){var t=e.map(function(){return 0});return t.push(0),{buckets:{boundaries:e,counts:t},sum:0,count:0,hasMinMax:!1,min:1/0,max:-1/0}}var lc=function(){function e(t,r,n,i){n===void 0&&(n=!0),i===void 0&&(i=hC(r)),this.startTime=t,this._boundaries=r,this._recordMinMax=n,this._current=i}return e.prototype.record=function(t){if(!Number.isNaN(t)){this._current.count+=1,this._current.sum+=t,this._recordMinMax&&(this._current.min=Math.min(t,this._current.min),this._current.max=Math.max(t,this._current.max),this._current.hasMinMax=!0);var r=iC(this._boundaries,t);this._current.buckets.counts[r]+=1}},e.prototype.setStartTime=function(t){this.startTime=t},e.prototype.toPointValue=function(){return this._current},e}(),ym=function(){function e(t,r){this._boundaries=t,this._recordMinMax=r,this.kind=_r.HISTOGRAM}return e.prototype.createAccumulation=function(t){return new lc(t,this._boundaries,this._recordMinMax)},e.prototype.merge=function(t,r){for(var n=t.toPointValue(),i=r.toPointValue(),s=n.buckets.counts,o=i.buckets.counts,l=new Array(s.length),c=0;c<s.length;c++)l[c]=s[c]+o[c];var a=1/0,h=-1/0;return this._recordMinMax&&(n.hasMinMax&&i.hasMinMax?(a=Math.min(n.min,i.min),h=Math.max(n.max,i.max)):n.hasMinMax?(a=n.min,h=n.max):i.hasMinMax&&(a=i.min,h=i.max)),new lc(t.startTime,n.buckets.boundaries,this._recordMinMax,{buckets:{boundaries:n.buckets.boundaries,counts:l},count:n.count+i.count,sum:n.sum+i.sum,hasMinMax:this._recordMinMax&&(n.hasMinMax||i.hasMinMax),min:a,max:h})},e.prototype.diff=function(t,r){for(var n=t.toPointValue(),i=r.toPointValue(),s=n.buckets.counts,o=i.buckets.counts,l=new Array(s.length),c=0;c<s.length;c++)l[c]=o[c]-s[c];return new lc(r.startTime,n.buckets.boundaries,this._recordMinMax,{buckets:{boundaries:n.buckets.boundaries,counts:l},count:i.count-n.count,sum:i.sum-n.sum,hasMinMax:!1,min:1/0,max:-1/0})},e.prototype.toMetricData=function(t,r,n,i){return{descriptor:t,aggregationTemporality:r,dataPointType:Gt.HISTOGRAM,dataPoints:n.map(function(s){var o=dC(s,2),l=o[0],c=o[1],a=c.toPointValue(),h=t.type===se.GAUGE||t.type===se.UP_DOWN_COUNTER||t.type===se.OBSERVABLE_GAUGE||t.type===se.OBSERVABLE_UP_DOWN_COUNTER;return{attributes:l,startTime:c.startTime,endTime:i,value:{min:a.hasMinMax?a.min:void 0,max:a.hasMinMax?a.max:void 0,sum:h?void 0:a.sum,buckets:a.buckets,count:a.count}}})}},e}(),cc=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},uc=function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,s;n<i;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))},bm=function(){function e(t,r,n,i){t===void 0&&(t=new fC),r===void 0&&(r=0),n===void 0&&(n=0),i===void 0&&(i=0),this.backing=t,this.indexBase=r,this.indexStart=n,this.indexEnd=i}return Object.defineProperty(e.prototype,"offset",{get:function(){return this.indexStart},enumerable:!1,configurable:!0}),Object.defineProperty(e.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}),e.prototype.counts=function(){var t=this;return Array.from({length:this.length},function(r,n){return t.at(n)})},e.prototype.at=function(t){var r=this.indexBase-this.indexStart;return t<r&&(t+=this.backing.length),t-=r,this.backing.countAt(t)},e.prototype.incrementBucket=function(t,r){this.backing.increment(t,r)},e.prototype.decrementBucket=function(t,r){this.backing.decrement(t,r)},e.prototype.trim=function(){for(var t=0;t<this.length;t++)if(this.at(t)!==0){this.indexStart+=t;break}else if(t===this.length-1){this.indexStart=this.indexEnd=this.indexBase=0;return}for(var t=this.length-1;t>=0;t--)if(this.at(t)!==0){this.indexEnd-=this.length-t-1;break}this._rotate()},e.prototype.downscale=function(t){this._rotate();for(var r=1+this.indexEnd-this.indexStart,n=1<<t,i=0,s=0,o=this.indexStart;o<=this.indexEnd;){var l=o%n;l<0&&(l+=n);for(var c=l;c<n&&i<r;c++)this._relocateBucket(s,i),i++,o++;s++}this.indexStart>>=t,this.indexEnd>>=t,this.indexBase=this.indexStart},e.prototype.clone=function(){return new e(this.backing.clone(),this.indexBase,this.indexStart,this.indexEnd)},e.prototype._rotate=function(){var t=this.indexBase-this.indexStart;t!==0&&(t>0?(this.backing.reverse(0,this.backing.length),this.backing.reverse(0,t),this.backing.reverse(t,this.backing.length)):(this.backing.reverse(0,this.backing.length),this.backing.reverse(0,this.backing.length+t)),this.indexBase=this.indexStart)},e.prototype._relocateBucket=function(t,r){t!==r&&this.incrementBucket(t,this.backing.emptyBucket(r))},e}(),fC=function(){function e(t){t===void 0&&(t=[0]),this._counts=t}return Object.defineProperty(e.prototype,"length",{get:function(){return this._counts.length},enumerable:!1,configurable:!0}),e.prototype.countAt=function(t){return this._counts[t]},e.prototype.growTo=function(t,r,n){var i=new Array(t).fill(0);i.splice.apply(i,uc([n,this._counts.length-r],cc(this._counts.slice(r)),!1)),i.splice.apply(i,uc([0,r],cc(this._counts.slice(0,r)),!1)),this._counts=i},e.prototype.reverse=function(t,r){for(var n=Math.floor((t+r)/2)-t,i=0;i<n;i++){var s=this._counts[t+i];this._counts[t+i]=this._counts[r-i-1],this._counts[r-i-1]=s}},e.prototype.emptyBucket=function(t){var r=this._counts[t];return this._counts[t]=0,r},e.prototype.increment=function(t,r){this._counts[t]+=r},e.prototype.decrement=function(t,r){this._counts[t]>=r?this._counts[t]-=r:this._counts[t]=0},e.prototype.clone=function(){return new e(uc([],cc(this._counts),!1))},e}(),pC=52,mC=2146435072,gC=1048575,dc=1023,vm=-dc+1,Sm=dc,hc=Math.pow(2,-1022);function wm(e){var t=new DataView(new ArrayBuffer(8));t.setFloat64(0,e);var r=t.getUint32(0),n=(r&mC)>>20;return n-dc}function Rm(e){var t=new DataView(new ArrayBuffer(8));t.setFloat64(0,e);var r=t.getUint32(0),n=t.getUint32(4),i=(r&gC)*Math.pow(2,32);return i+n}function fc(e,t){return e===0||e===Number.POSITIVE_INFINITY||e===Number.NEGATIVE_INFINITY||Number.isNaN(e)?e:e*Math.pow(2,t)}function yC(e){return e--,e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,e|=e>>16,e++,e}var bC=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),zn=function(e){bC(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(Error),vC=function(){function e(t){this._shift=-t}return e.prototype.mapToIndex=function(t){if(t<hc)return this._minNormalLowerBoundaryIndex();var r=wm(t),n=this._rightShift(Rm(t)-1,pC);return r+n>>this._shift},e.prototype.lowerBoundary=function(t){var r=this._minNormalLowerBoundaryIndex();if(t<r)throw new zn("underflow: "+t+" is < minimum lower boundary: "+r);var n=this._maxNormalLowerBoundaryIndex();if(t>n)throw new zn("overflow: "+t+" is > maximum lower boundary: "+n);return fc(1,t<<this._shift)},Object.defineProperty(e.prototype,"scale",{get:function(){return this._shift===0?0:-this._shift},enumerable:!1,configurable:!0}),e.prototype._minNormalLowerBoundaryIndex=function(){var t=vm>>this._shift;return this._shift<2&&t--,t},e.prototype._maxNormalLowerBoundaryIndex=function(){return Sm>>this._shift},e.prototype._rightShift=function(t,r){return Math.floor(t*Math.pow(2,-r))},e}(),SC=function(){function e(t){this._scale=t,this._scaleFactor=fc(Math.LOG2E,t),this._inverseFactor=fc(Math.LN2,-t)}return e.prototype.mapToIndex=function(t){if(t<=hc)return this._minNormalLowerBoundaryIndex()-1;if(Rm(t)===0){var r=wm(t);return(r<<this._scale)-1}var n=Math.floor(Math.log(t)*this._scaleFactor),i=this._maxNormalLowerBoundaryIndex();return n>=i?i:n},e.prototype.lowerBoundary=function(t){var r=this._maxNormalLowerBoundaryIndex();if(t>=r){if(t===r)return 2*Math.exp((t-(1<<this._scale))/this._scaleFactor);throw new zn("overflow: "+t+" is > maximum lower boundary: "+r)}var n=this._minNormalLowerBoundaryIndex();if(t<=n){if(t===n)return hc;if(t===n-1)return Math.exp((t+(1<<this._scale))/this._scaleFactor)/2;throw new zn("overflow: "+t+" is < minimum lower boundary: "+n)}return Math.exp(t*this._inverseFactor)},Object.defineProperty(e.prototype,"scale",{get:function(){return this._scale},enumerable:!1,configurable:!0}),e.prototype._minNormalLowerBoundaryIndex=function(){return vm<<this._scale},e.prototype._maxNormalLowerBoundaryIndex=function(){return(Sm+1<<this._scale)-1},e}(),_m=-10,Tm=20,wC=Array.from({length:31},function(e,t){return t>10?new SC(t-10):new vC(t-10)});function Em(e){if(e>Tm||e<_m)throw new zn("expected scale >= "+_m+" && <= "+Tm+", got: "+e);return wC[e+10]}var RC=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},Vs=function(){function e(t,r){this.low=t,this.high=r}return e.combine=function(t,r){return new e(Math.min(t.low,r.low),Math.max(t.high,r.high))},e}(),_C=20,TC=160,pc=2,EC=function(){function e(t,r,n,i,s,o,l,c,a,h,u){t===void 0&&(t=t),r===void 0&&(r=TC),n===void 0&&(n=!0),i===void 0&&(i=0),s===void 0&&(s=0),o===void 0&&(o=0),l===void 0&&(l=Number.POSITIVE_INFINITY),c===void 0&&(c=Number.NEGATIVE_INFINITY),a===void 0&&(a=new bm),h===void 0&&(h=new bm),u===void 0&&(u=Em(_C)),this.startTime=t,this._maxSize=r,this._recordMinMax=n,this._sum=i,this._count=s,this._zeroCount=o,this._min=l,this._max=c,this._positive=a,this._negative=h,this._mapping=u,this._maxSize<pc&&(Y.warn("Exponential Histogram Max Size set to "+this._maxSize+", changing to the minimum size of: "+pc),this._maxSize=pc)}return e.prototype.record=function(t){this.updateByIncrement(t,1)},e.prototype.setStartTime=function(t){this.startTime=t},e.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(e.prototype,"sum",{get:function(){return this._sum},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"min",{get:function(){return this._min},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"max",{get:function(){return this._max},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"count",{get:function(){return this._count},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"zeroCount",{get:function(){return this._zeroCount},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scale",{get:function(){return this._count===this._zeroCount?0:this._mapping.scale},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"positive",{get:function(){return this._positive},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"negative",{get:function(){return this._negative},enumerable:!1,configurable:!0}),e.prototype.updateByIncrement=function(t,r){if(!Number.isNaN(t)){if(t>this._max&&(this._max=t),t<this._min&&(this._min=t),this._count+=r,t===0){this._zeroCount+=r;return}this._sum+=t*r,t>0?this._updateBuckets(this._positive,t,r):this._updateBuckets(this._negative,-t,r)}},e.prototype.merge=function(t){this._count===0?(this._min=t.min,this._max=t.max):t.count!==0&&(t.min<this.min&&(this._min=t.min),t.max>this.max&&(this._max=t.max)),this.startTime=t.startTime,this._sum+=t.sum,this._count+=t.count,this._zeroCount+=t.zeroCount;var r=this._minScale(t);this._downscale(this.scale-r),this._mergeBuckets(this.positive,t,t.positive,r),this._mergeBuckets(this.negative,t,t.negative,r)},e.prototype.diff=function(t){this._min=1/0,this._max=-1/0,this._sum-=t.sum,this._count-=t.count,this._zeroCount-=t.zeroCount;var r=this._minScale(t);this._downscale(this.scale-r),this._diffBuckets(this.positive,t,t.positive,r),this._diffBuckets(this.negative,t,t.negative,r)},e.prototype.clone=function(){return new e(this.startTime,this._maxSize,this._recordMinMax,this._sum,this._count,this._zeroCount,this._min,this._max,this.positive.clone(),this.negative.clone(),this._mapping)},e.prototype._updateBuckets=function(t,r,n){var i=this._mapping.mapToIndex(r),s=!1,o=0,l=0;if(t.length===0?(t.indexStart=i,t.indexEnd=t.indexStart,t.indexBase=t.indexStart):i<t.indexStart&&t.indexEnd-i>=this._maxSize?(s=!0,l=i,o=t.indexEnd):i>t.indexEnd&&i-t.indexStart>=this._maxSize&&(s=!0,l=t.indexStart,o=i),s){var c=this._changeScale(o,l);this._downscale(c),i=this._mapping.mapToIndex(r)}this._incrementIndexBy(t,i,n)},e.prototype._incrementIndexBy=function(t,r,n){if(n!==0){if(t.length===0&&(t.indexStart=t.indexEnd=t.indexBase=r),r<t.indexStart){var i=t.indexEnd-r;i>=t.backing.length&&this._grow(t,i+1),t.indexStart=r}else if(r>t.indexEnd){var i=r-t.indexStart;i>=t.backing.length&&this._grow(t,i+1),t.indexEnd=r}var s=r-t.indexBase;s<0&&(s+=t.backing.length),t.incrementBucket(s,n)}},e.prototype._grow=function(t,r){var n=t.backing.length,i=t.indexBase-t.indexStart,s=n-i,o=yC(r);o>this._maxSize&&(o=this._maxSize);var l=o-i;t.backing.growTo(o,s,l)},e.prototype._changeScale=function(t,r){for(var n=0;t-r>=this._maxSize;)t>>=1,r>>=1,n++;return n},e.prototype._downscale=function(t){if(t!==0){if(t<0)throw new Error("impossible change of scale: "+this.scale);var r=this._mapping.scale-t;this._positive.downscale(t),this._negative.downscale(t),this._mapping=Em(r)}},e.prototype._minScale=function(t){var r=Math.min(this.scale,t.scale),n=Vs.combine(this._highLowAtScale(this.positive,this.scale,r),this._highLowAtScale(t.positive,t.scale,r)),i=Vs.combine(this._highLowAtScale(this.negative,this.scale,r),this._highLowAtScale(t.negative,t.scale,r));return Math.min(r-this._changeScale(n.high,n.low),r-this._changeScale(i.high,i.low))},e.prototype._highLowAtScale=function(t,r,n){if(t.length===0)return new Vs(0,-1);var i=r-n;return new Vs(t.indexStart>>i,t.indexEnd>>i)},e.prototype._mergeBuckets=function(t,r,n,i){for(var s=n.offset,o=r.scale-i,l=0;l<n.length;l++)this._incrementIndexBy(t,s+l>>o,n.at(l))},e.prototype._diffBuckets=function(t,r,n,i){for(var s=n.offset,o=r.scale-i,l=0;l<n.length;l++){var c=s+l>>o,a=c-t.indexBase;a<0&&(a+=t.backing.length),t.decrementBucket(a,n.at(l))}t.trim()},e}(),IC=function(){function e(t,r){this._maxSize=t,this._recordMinMax=r,this.kind=_r.EXPONENTIAL_HISTOGRAM}return e.prototype.createAccumulation=function(t){return new EC(t,this._maxSize,this._recordMinMax)},e.prototype.merge=function(t,r){var n=r.clone();return n.merge(t),n},e.prototype.diff=function(t,r){var n=r.clone();return n.diff(t),n},e.prototype.toMetricData=function(t,r,n,i){return{descriptor:t,aggregationTemporality:r,dataPointType:Gt.EXPONENTIAL_HISTOGRAM,dataPoints:n.map(function(s){var o=RC(s,2),l=o[0],c=o[1],a=c.toPointValue(),h=t.type===se.GAUGE||t.type===se.UP_DOWN_COUNTER||t.type===se.OBSERVABLE_GAUGE||t.type===se.OBSERVABLE_UP_DOWN_COUNTER;return{attributes:l,startTime:c.startTime,endTime:i,value:{min:a.hasMinMax?a.min:void 0,max:a.hasMinMax?a.max:void 0,sum:h?void 0:a.sum,positive:{offset:a.positive.offset,bucketCounts:a.positive.bucketCounts},negative:{offset:a.negative.offset,bucketCounts:a.negative.bucketCounts},count:a.count,scale:a.scale,zeroCount:a.zeroCount}}})}},e}(),CC=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},mc=function(){function e(t,r,n){r===void 0&&(r=0),n===void 0&&(n=[0,0]),this.startTime=t,this._current=r,this.sampleTime=n}return e.prototype.record=function(t){this._current=t,this.sampleTime=pt(Date.now())},e.prototype.setStartTime=function(t){this.startTime=t},e.prototype.toPointValue=function(){return this._current},e}(),ZC=function(){function e(){this.kind=_r.LAST_VALUE}return e.prototype.createAccumulation=function(t){return new mc(t)},e.prototype.merge=function(t,r){var n=fs(r.sampleTime)>=fs(t.sampleTime)?r:t;return new mc(t.startTime,n.toPointValue(),n.sampleTime)},e.prototype.diff=function(t,r){var n=fs(r.sampleTime)>=fs(t.sampleTime)?r:t;return new mc(r.startTime,n.toPointValue(),n.sampleTime)},e.prototype.toMetricData=function(t,r,n,i){return{descriptor:t,aggregationTemporality:r,dataPointType:Gt.GAUGE,dataPoints:n.map(function(s){var o=CC(s,2),l=o[0],c=o[1];return{attributes:l,startTime:c.startTime,endTime:i,value:c.toPointValue()}})}},e}(),LC=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},Kn=function(){function e(t,r,n,i){n===void 0&&(n=0),i===void 0&&(i=!1),this.startTime=t,this.monotonic=r,this._current=n,this.reset=i}return e.prototype.record=function(t){this.monotonic&&t<0||(this._current+=t)},e.prototype.setStartTime=function(t){this.startTime=t},e.prototype.toPointValue=function(){return this._current},e}(),Im=function(){function e(t){this.monotonic=t,this.kind=_r.SUM}return e.prototype.createAccumulation=function(t){return new Kn(t,this.monotonic)},e.prototype.merge=function(t,r){var n=t.toPointValue(),i=r.toPointValue();return r.reset?new Kn(r.startTime,this.monotonic,i,r.reset):new Kn(t.startTime,this.monotonic,n+i)},e.prototype.diff=function(t,r){var n=t.toPointValue(),i=r.toPointValue();return this.monotonic&&n>i?new Kn(r.startTime,this.monotonic,i,!0):new Kn(r.startTime,this.monotonic,i-n)},e.prototype.toMetricData=function(t,r,n,i){return{descriptor:t,aggregationTemporality:r,dataPointType:Gt.SUM,dataPoints:n.map(function(s){var o=LC(s,2),l=o[0],c=o[1];return{attributes:l,startTime:c.startTime,endTime:i,value:c.toPointValue()}}),isMonotonic:this.monotonic}},e}(),Tr=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Jt=function(){function e(){}return e.Drop=function(){return Cm},e.Sum=function(){return Zm},e.LastValue=function(){return Lm},e.Histogram=function(){return xm},e.ExponentialHistogram=function(){return WC},e.Default=function(){return PC},e}(),xC=function(e){Tr(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.createAggregator=function(r){return t.DEFAULT_INSTANCE},t.DEFAULT_INSTANCE=new oC,t}(Jt),NC=function(e){Tr(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.createAggregator=function(r){switch(r.type){case se.COUNTER:case se.OBSERVABLE_COUNTER:case se.HISTOGRAM:return t.MONOTONIC_INSTANCE;default:return t.NON_MONOTONIC_INSTANCE}},t.MONOTONIC_INSTANCE=new Im(!0),t.NON_MONOTONIC_INSTANCE=new Im(!1),t}(Jt),OC=function(e){Tr(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.createAggregator=function(r){return t.DEFAULT_INSTANCE},t.DEFAULT_INSTANCE=new ZC,t}(Jt),GC=function(e){Tr(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.createAggregator=function(r){return t.DEFAULT_INSTANCE},t.DEFAULT_INSTANCE=new ym([0,5,10,25,50,75,100,250,500,750,1e3,2500,5e3,7500,1e4],!0),t}(Jt),VC=function(e){Tr(t,e);function t(r,n){n===void 0&&(n=!0);var i=e.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(l,c){return l-c});var s=r.lastIndexOf(-1/0),o=r.indexOf(1/0);return o===-1&&(o=void 0),i._boundaries=r.slice(s+1,o),i}return t.prototype.createAggregator=function(r){return new ym(this._boundaries,this._recordMinMax)},t}(Jt),kC=function(e){Tr(t,e);function t(r,n){r===void 0&&(r=160),n===void 0&&(n=!0);var i=e.call(this)||this;return i._maxSize=r,i._recordMinMax=n,i}return t.prototype.createAggregator=function(r){return new IC(this._maxSize,this._recordMinMax)},t}(Jt),XC=function(e){Tr(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype._resolve=function(r){switch(r.type){case se.COUNTER:case se.UP_DOWN_COUNTER:case se.OBSERVABLE_COUNTER:case se.OBSERVABLE_UP_DOWN_COUNTER:return Zm;case se.GAUGE:case se.OBSERVABLE_GAUGE:return Lm;case se.HISTOGRAM:return r.advice.explicitBucketBoundaries?new VC(r.advice.explicitBucketBoundaries):xm}return Y.warn("Unable to recognize instrument type: "+r.type),Cm},t.prototype.createAggregator=function(r){return this._resolve(r).createAggregator(r)},t}(Jt),Cm=new xC,Zm=new NC,Lm=new OC,xm=new GC,WC=new kC,PC=new XC,MC=function(e){return Jt.Default()},AC=function(e){return Ct.CUMULATIVE},gc=function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function l(h){try{a(n.next(h))}catch(u){o(u)}}function c(h){try{a(n.throw(h))}catch(u){o(u)}}function a(h){h.done?s(h.value):i(h.value).then(l,c)}a((n=n.apply(e,t||[])).next())})},yc=function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function l(a){return function(h){return c([a,h])}}function c(a){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(s=a[0]&2?i.return:a[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,a[1])).done)return s;switch(i=0,s&&(a=[a[0]&2,s.value]),a[0]){case 0:case 1:s=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){r.label=a[1];break}if(a[0]===6&&r.label<s[1]){r.label=s[1],s=a;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(a);break}s[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(h){a=[6,h],i=0}finally{n=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},Nm=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},UC=function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,s;n<i;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))},DC=function(){function e(t){var r,n,i;this._shutdown=!1,this._aggregationSelector=(r=t==null?void 0:t.aggregationSelector)!==null&&r!==void 0?r:MC,this._aggregationTemporalitySelector=(n=t==null?void 0:t.aggregationTemporalitySelector)!==null&&n!==void 0?n:AC,this._metricProducers=(i=t==null?void 0:t.metricProducers)!==null&&i!==void 0?i:[],this._cardinalitySelector=t==null?void 0:t.cardinalitySelector}return e.prototype.setMetricProducer=function(t){if(this._sdkMetricProducer)throw new Error("MetricReader can not be bound to a MeterProvider again.");this._sdkMetricProducer=t,this.onInitialized()},e.prototype.selectAggregation=function(t){return this._aggregationSelector(t)},e.prototype.selectAggregationTemporality=function(t){return this._aggregationTemporalitySelector(t)},e.prototype.selectCardinalityLimit=function(t){return this._cardinalitySelector?this._cardinalitySelector(t):2e3},e.prototype.onInitialized=function(){},e.prototype.collect=function(t){return gc(this,void 0,void 0,function(){var r,n,i,s,o,l;return yc(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(UC([this._sdkMetricProducer.collect({timeoutMillis:t==null?void 0:t.timeoutMillis})],Nm(this._metricProducers.map(function(a){return a.collect({timeoutMillis:t==null?void 0:t.timeoutMillis})})),!1))];case 1:return r=Nm.apply(void 0,[c.sent()]),n=r[0],i=r.slice(1),s=n.errors.concat(gm(i,function(a){return a.errors})),o=n.resourceMetrics.resource,l=n.resourceMetrics.scopeMetrics.concat(gm(i,function(a){return a.resourceMetrics.scopeMetrics})),[2,{resourceMetrics:{resource:o,scopeMetrics:l},errors:s}]}})})},e.prototype.shutdown=function(t){return gc(this,void 0,void 0,function(){return yc(this,function(r){switch(r.label){case 0:return this._shutdown?(Y.error("Cannot call shutdown twice."),[2]):(t==null?void 0:t.timeoutMillis)!=null?[3,2]:[4,this.onShutdown()];case 1:return r.sent(),[3,4];case 2:return[4,Bn(this.onShutdown(),t.timeoutMillis)];case 3:r.sent(),r.label=4;case 4:return this._shutdown=!0,[2]}})})},e.prototype.forceFlush=function(t){return gc(this,void 0,void 0,function(){return yc(this,function(r){switch(r.label){case 0:return this._shutdown?(Y.warn("Cannot forceFlush on already shutdown MetricReader."),[2]):(t==null?void 0:t.timeoutMillis)!=null?[3,2]:[4,this.onForceFlush()];case 1:return r.sent(),[2];case 2:return[4,Bn(this.onForceFlush(),t.timeoutMillis)];case 3:return r.sent(),[2]}})})},e}(),FC=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),ks=function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function l(h){try{a(n.next(h))}catch(u){o(u)}}function c(h){try{a(n.throw(h))}catch(u){o(u)}}function a(h){h.done?s(h.value):i(h.value).then(l,c)}a((n=n.apply(e,t||[])).next())})},Xs=function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function l(a){return function(h){return c([a,h])}}function c(a){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(s=a[0]&2?i.return:a[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,a[1])).done)return s;switch(i=0,s&&(a=[a[0]&2,s.value]),a[0]){case 0:case 1:s=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){r.label=a[1];break}if(a[0]===6&&r.label<s[1]){r.label=s[1],s=a;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(a);break}s[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(h){a=[6,h],i=0}finally{n=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},JC=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},HC=function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,s;n<i;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))},YC=function(e){FC(t,e);function t(r){var n,i,s,o,l=e.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 l._exportInterval=(s=r.exportIntervalMillis)!==null&&s!==void 0?s:6e4,l._exportTimeout=(o=r.exportTimeoutMillis)!==null&&o!==void 0?o:3e4,l._exporter=r.exporter,l}return t.prototype._runOnce=function(){return ks(this,void 0,void 0,function(){var r;return Xs(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,Bn(this._doRun(),this._exportTimeout)];case 1:return n.sent(),[3,3];case 2:return r=n.sent(),r instanceof mm?(Y.error("Export took longer than %s milliseconds and timed out.",this._exportTimeout),[2]):(er(r),[3,3]);case 3:return[2]}})})},t.prototype._doRun=function(){var r,n;return ks(this,void 0,void 0,function(){var i,s,o,l,c,a;return Xs(this,function(h){switch(h.label){case 0:return[4,this.collect({timeoutMillis:this._exportTimeout})];case 1:if(i=h.sent(),s=i.resourceMetrics,o=i.errors,o.length>0&&(a=Y).error.apply(a,HC(["PeriodicExportingMetricReader: metrics collection errors"],JC(o),!1)),!s.resource.asyncAttributesPending)return[3,5];h.label=2;case 2:return h.trys.push([2,4,,5]),[4,(n=(r=s.resource).waitForAsyncAttributes)===null||n===void 0?void 0:n.call(r)];case 3:return h.sent(),[3,5];case 4:return l=h.sent(),Y.debug("Error while resolving async portion of resource: ",l),er(l),[3,5];case 5:return s.scopeMetrics.length===0?[2]:[4,z_._export(this._exporter,s)];case 6:if(c=h.sent(),c.code!==Ie.SUCCESS)throw new Error("PeriodicExportingMetricReader: metrics export failed (error "+c.error+")");return[2]}})})},t.prototype.onInitialized=function(){var r=this;this._interval=setInterval(function(){r._runOnce()},this._exportInterval)},t.prototype.onForceFlush=function(){return ks(this,void 0,void 0,function(){return Xs(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]}})})},t.prototype.onShutdown=function(){return ks(this,void 0,void 0,function(){return Xs(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]}})})},t}(DC),BC=function(){function e(){this._registeredViews=[]}return e.prototype.addView=function(t){this._registeredViews.push(t)},e.prototype.findViews=function(t,r){var n=this,i=this._registeredViews.filter(function(s){return n._matchInstrument(s.instrumentSelector,t)&&n._matchMeter(s.meterSelector,r)});return i},e.prototype._matchInstrument=function(t,r){return(t.getType()===void 0||r.type===t.getType())&&t.getNameFilter().match(r.name)&&t.getUnitFilter().match(r.unit)},e.prototype._matchMeter=function(t,r){return t.getNameFilter().match(r.name)&&(r.version===void 0||t.getVersionFilter().match(r.version))&&(r.schemaUrl===void 0||t.getSchemaUrlFilter().match(r.schemaUrl))},e}(),Er=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ws=function(){function e(t,r){this._writableMetricStorage=t,this._descriptor=r}return e.prototype._record=function(t,r,n){if(r===void 0&&(r={}),n===void 0&&(n=pe.active()),typeof t!="number"){Y.warn("non-number value provided to metric "+this._descriptor.name+": "+t);return}this._descriptor.valueType===qt.INT&&!Number.isInteger(t)&&(Y.warn("INT value type cannot accept a floating-point value for "+this._descriptor.name+", ignoring the fractional digits."),t=Math.trunc(t),!Number.isInteger(t))||this._writableMetricStorage.record(t,r,n,pt(Date.now()))},e}(),zC=function(e){Er(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.add=function(r,n,i){this._record(r,n,i)},t}(Ws),KC=function(e){Er(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.add=function(r,n,i){if(r<0){Y.warn("negative value provided to counter "+this._descriptor.name+": "+r);return}this._record(r,n,i)},t}(Ws),jC=function(e){Er(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.record=function(r,n,i){this._record(r,n,i)},t}(Ws),QC=function(e){Er(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.record=function(r,n,i){if(r<0){Y.warn("negative value provided to histogram "+this._descriptor.name+": "+r);return}this._record(r,n,i)},t}(Ws),Ps=function(){function e(t,r,n){this._observableRegistry=n,this._descriptor=t,this._metricStorages=r}return e.prototype.addCallback=function(t){this._observableRegistry.addCallback(t,this)},e.prototype.removeCallback=function(t){this._observableRegistry.removeCallback(t,this)},e}(),$C=function(e){Er(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(Ps),qC=function(e){Er(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(Ps),eZ=function(e){Er(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(Ps);function bc(e){return e instanceof Ps}var tZ=function(){function e(t){this._meterSharedState=t}return e.prototype.createGauge=function(t,r){var n=sr(t,se.GAUGE,r),i=this._meterSharedState.registerMetricStorage(n);return new jC(i,n)},e.prototype.createHistogram=function(t,r){var n=sr(t,se.HISTOGRAM,r),i=this._meterSharedState.registerMetricStorage(n);return new QC(i,n)},e.prototype.createCounter=function(t,r){var n=sr(t,se.COUNTER,r),i=this._meterSharedState.registerMetricStorage(n);return new KC(i,n)},e.prototype.createUpDownCounter=function(t,r){var n=sr(t,se.UP_DOWN_COUNTER,r),i=this._meterSharedState.registerMetricStorage(n);return new zC(i,n)},e.prototype.createObservableGauge=function(t,r){var n=sr(t,se.OBSERVABLE_GAUGE,r),i=this._meterSharedState.registerAsyncMetricStorage(n);return new qC(n,i,this._meterSharedState.observableRegistry)},e.prototype.createObservableCounter=function(t,r){var n=sr(t,se.OBSERVABLE_COUNTER,r),i=this._meterSharedState.registerAsyncMetricStorage(n);return new $C(n,i,this._meterSharedState.observableRegistry)},e.prototype.createObservableUpDownCounter=function(t,r){var n=sr(t,se.OBSERVABLE_UP_DOWN_COUNTER,r),i=this._meterSharedState.registerAsyncMetricStorage(n);return new eZ(n,i,this._meterSharedState.observableRegistry)},e.prototype.addBatchObservableCallback=function(t,r){this._meterSharedState.observableRegistry.addBatchCallback(t,r)},e.prototype.removeBatchObservableCallback=function(t,r){this._meterSharedState.observableRegistry.removeBatchCallback(t,r)},e}(),Om=function(){function e(t){this._instrumentDescriptor=t}return e.prototype.getInstrumentDescriptor=function(){return this._instrumentDescriptor},e.prototype.updateDescription=function(t){this._instrumentDescriptor=sr(this._instrumentDescriptor.name,this._instrumentDescriptor.type,{description:t,valueType:this._instrumentDescriptor.valueType,unit:this._instrumentDescriptor.unit,advice:this._instrumentDescriptor.advice})},e}(),rZ=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Gm=function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function l(a){return function(h){return c([a,h])}}function c(a){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(s=a[0]&2?i.return:a[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,a[1])).done)return s;switch(i=0,s&&(a=[a[0]&2,s.value]),a[0]){case 0:case 1:s=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){r.label=a[1];break}if(a[0]===6&&r.label<s[1]){r.label=s[1],s=a;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(a);break}s[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(h){a=[6,h],i=0}finally{n=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},nZ=function(){function e(t){this._hash=t,this._valueMap=new Map,this._keyMap=new Map}return e.prototype.get=function(t,r){return r!=null||(r=this._hash(t)),this._valueMap.get(r)},e.prototype.getOrDefault=function(t,r){var n=this._hash(t);if(this._valueMap.has(n))return this._valueMap.get(n);var i=r();return this._keyMap.has(n)||this._keyMap.set(n,t),this._valueMap.set(n,i),i},e.prototype.set=function(t,r,n){n!=null||(n=this._hash(t)),this._keyMap.has(n)||this._keyMap.set(n,t),this._valueMap.set(n,r)},e.prototype.has=function(t,r){return r!=null||(r=this._hash(t)),this._valueMap.has(r)},e.prototype.keys=function(){var t,r;return Gm(this,function(n){switch(n.label){case 0:t=this._keyMap.entries(),r=t.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=t.next(),[3,1];case 3:return[2]}})},e.prototype.entries=function(){var t,r;return Gm(this,function(n){switch(n.label){case 0:t=this._valueMap.entries(),r=t.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=t.next(),[3,1];case 3:return[2]}})},Object.defineProperty(e.prototype,"size",{get:function(){return this._valueMap.size},enumerable:!1,configurable:!0}),e}(),Ir=function(e){rZ(t,e);function t(){return e.call(this,pm)||this}return t}(nZ),iZ=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},Vm=function(){function e(t,r){this._aggregator=t,this._activeCollectionStorage=new Ir,this._cumulativeMemoStorage=new Ir,this._overflowAttributes={"otel.metric.overflow":!0},this._cardinalityLimit=(r!=null?r:2e3)-1,this._overflowHashCode=pm(this._overflowAttributes)}return e.prototype.record=function(t,r,n,i){var s=this,o=this._activeCollectionStorage.get(r);if(!o){if(this._activeCollectionStorage.size>=this._cardinalityLimit){var l=this._activeCollectionStorage.getOrDefault(this._overflowAttributes,function(){return s._aggregator.createAccumulation(i)});l==null||l.record(t);return}o=this._aggregator.createAccumulation(i),this._activeCollectionStorage.set(r,o)}o==null||o.record(t)},e.prototype.batchCumulate=function(t,r){var n=this;Array.from(t.entries()).forEach(function(i){var s=iZ(i,3),o=s[0],l=s[1],c=s[2],a=n._aggregator.createAccumulation(r);a==null||a.record(l);var h=a;if(n._cumulativeMemoStorage.has(o,c)){var u=n._cumulativeMemoStorage.get(o,c);h=n._aggregator.diff(u,a)}else if(n._cumulativeMemoStorage.size>=n._cardinalityLimit&&(o=n._overflowAttributes,c=n._overflowHashCode,n._cumulativeMemoStorage.has(o,c))){var u=n._cumulativeMemoStorage.get(o,c);h=n._aggregator.diff(u,a)}if(n._activeCollectionStorage.has(o,c)){var f=n._activeCollectionStorage.get(o,c);h=n._aggregator.merge(f,h)}n._cumulativeMemoStorage.set(o,a,c),n._activeCollectionStorage.set(o,h,c)})},e.prototype.collect=function(){var t=this._activeCollectionStorage;return this._activeCollectionStorage=new Ir,t},e}(),vc=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},km=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},Xm=function(){function e(t,r){var n=this;this._aggregator=t,this._unreportedAccumulations=new Map,this._reportHistory=new Map,r.forEach(function(i){n._unreportedAccumulations.set(i,[])})}return e.prototype.buildMetrics=function(t,r,n,i){this._stashAccumulations(n);var s=this._getMergedUnreportedAccumulations(t),o=s,l;if(this._reportHistory.has(t)){var c=this._reportHistory.get(t),a=c.collectionTime;l=c.aggregationTemporality,l===Ct.CUMULATIVE?o=e.merge(c.accumulations,s,this._aggregator):o=e.calibrateStartTime(c.accumulations,s,a)}else l=t.selectAggregationTemporality(r.type);this._reportHistory.set(t,{accumulations:o,collectionTime:i,aggregationTemporality:l});var h=sZ(o);if(h.length!==0)return this._aggregator.toMetricData(r,l,h,i)},e.prototype._stashAccumulations=function(t){var r,n,i=this._unreportedAccumulations.keys();try{for(var s=vc(i),o=s.next();!o.done;o=s.next()){var l=o.value,c=this._unreportedAccumulations.get(l);c===void 0&&(c=[],this._unreportedAccumulations.set(l,c)),c.push(t)}}catch(a){r={error:a}}finally{try{o&&!o.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}},e.prototype._getMergedUnreportedAccumulations=function(t){var r,n,i=new Ir,s=this._unreportedAccumulations.get(t);if(this._unreportedAccumulations.set(t,[]),s===void 0)return i;try{for(var o=vc(s),l=o.next();!l.done;l=o.next()){var c=l.value;i=e.merge(i,c,this._aggregator)}}catch(a){r={error:a}}finally{try{l&&!l.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return i},e.merge=function(t,r,n){for(var i=t,s=r.entries(),o=s.next();o.done!==!0;){var l=km(o.value,3),c=l[0],a=l[1],h=l[2];if(t.has(c,h)){var u=t.get(c,h),f=n.merge(u,a);i.set(c,f,h)}else i.set(c,a,h);o=s.next()}return i},e.calibrateStartTime=function(t,r,n){var i,s;try{for(var o=vc(t.keys()),l=o.next();!l.done;l=o.next()){var c=km(l.value,2),a=c[0],h=c[1],u=r.get(a,h);u==null||u.setStartTime(n)}}catch(f){i={error:f}}finally{try{l&&!l.done&&(s=o.return)&&s.call(o)}finally{if(i)throw i.error}}return r},e}();function sZ(e){return Array.from(e.entries())}var oZ=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),aZ=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},lZ=function(e){oZ(t,e);function t(r,n,i,s,o){var l=e.call(this,r)||this;return l._attributesProcessor=i,l._aggregationCardinalityLimit=o,l._deltaMetricStorage=new Vm(n,l._aggregationCardinalityLimit),l._temporalMetricStorage=new Xm(n,s),l}return t.prototype.record=function(r,n){var i=this,s=new Ir;Array.from(r.entries()).forEach(function(o){var l=aZ(o,2),c=l[0],a=l[1];s.set(i._attributesProcessor.process(c),a)}),this._deltaMetricStorage.batchCumulate(s,n)},t.prototype.collect=function(r,n){var i=this._deltaMetricStorage.collect();return this._temporalMetricStorage.buildMetrics(r,this._instrumentDescriptor,i,n)},t}(Om);function Wm(e,t){var r="";return e.unit!==t.unit&&(r+=" - Unit '"+e.unit+"' does not match '"+t.unit+`'
|
|
451
451
|
`),e.type!==t.type&&(r+=" - Type '"+e.type+"' does not match '"+t.type+`'
|
|
452
452
|
`),e.valueType!==t.valueType&&(r+=" - Value Type '"+e.valueType+"' does not match '"+t.valueType+`'
|
|
453
453
|
`),e.description!==t.description&&(r+=" - Description '"+e.description+"' does not match '"+t.description+`'
|
|
454
|
-
`),r}function
|
|
454
|
+
`),r}function cZ(e,t){return" - use valueType '"+e.valueType+"' on instrument creation or use an instrument name other than '"+t.name+"'"}function uZ(e,t){return" - use unit '"+e.unit+"' on instrument creation or use an instrument name other than '"+t.name+"'"}function dZ(e,t){var r={name:t.name,type:t.type,unit:t.unit},n=JSON.stringify(r);return" - create a new view with a name other than '"+e.name+"' and InstrumentSelector '"+n+"'"}function hZ(e,t){var r={name:t.name,type:t.type,unit:t.unit},n=JSON.stringify(r);return" - create a new view with a name other than '"+e.name+"' and InstrumentSelector '"+n+`'
|
|
455
455
|
- OR - create a new view with the name `+e.name+" and description '"+e.description+"' and InstrumentSelector "+n+`
|
|
456
|
-
- OR - create a new view with the name `+t.name+" and description '"+e.description+"' and InstrumentSelector "+n}function
|
|
456
|
+
- OR - create a new view with the name `+t.name+" and description '"+e.description+"' and InstrumentSelector "+n}function Pm(e,t){return e.valueType!==t.valueType?cZ(e,t):e.unit!==t.unit?uZ(e,t):e.type!==t.type?dZ(e,t):e.description!==t.description?hZ(e,t):""}var Sc=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},fZ=function(){function e(){this._sharedRegistry=new Map,this._perCollectorRegistry=new Map}return e.create=function(){return new e},e.prototype.getStorages=function(t){var r,n,i,s,o=[];try{for(var l=Sc(this._sharedRegistry.values()),c=l.next();!c.done;c=l.next()){var a=c.value;o=o.concat(a)}}catch(d){r={error:d}}finally{try{c&&!c.done&&(n=l.return)&&n.call(l)}finally{if(r)throw r.error}}var h=this._perCollectorRegistry.get(t);if(h!=null)try{for(var u=Sc(h.values()),f=u.next();!f.done;f=u.next()){var a=f.value;o=o.concat(a)}}catch(d){i={error:d}}finally{try{f&&!f.done&&(s=u.return)&&s.call(u)}finally{if(i)throw i.error}}return o},e.prototype.register=function(t){this._registerStorage(t,this._sharedRegistry)},e.prototype.registerForCollector=function(t,r){var n=this._perCollectorRegistry.get(t);n==null&&(n=new Map,this._perCollectorRegistry.set(t,n)),this._registerStorage(r,n)},e.prototype.findOrUpdateCompatibleStorage=function(t){var r=this._sharedRegistry.get(t.name);return r===void 0?null:this._findOrUpdateCompatibleStorage(t,r)},e.prototype.findOrUpdateCompatibleCollectorStorage=function(t,r){var n=this._perCollectorRegistry.get(t);if(n===void 0)return null;var i=n.get(r.name);return i===void 0?null:this._findOrUpdateCompatibleStorage(r,i)},e.prototype._registerStorage=function(t,r){var n=t.getInstrumentDescriptor(),i=r.get(n.name);if(i===void 0){r.set(n.name,[t]);return}i.push(t)},e.prototype._findOrUpdateCompatibleStorage=function(t,r){var n,i,s=null;try{for(var o=Sc(r),l=o.next();!l.done;l=o.next()){var c=l.value,a=c.getInstrumentDescriptor();lC(a,t)?(a.description!==t.description&&(t.description.length>a.description.length&&c.updateDescription(t.description),Y.warn("A view or instrument with the name ",t.name,` has already been registered, but has a different description and is incompatible with another registered view.
|
|
457
457
|
`,`Details:
|
|
458
|
-
`,
|
|
459
|
-
To resolve the conflict:`,
|
|
458
|
+
`,Wm(a,t),`The longer description will be used.
|
|
459
|
+
To resolve the conflict:`,Pm(a,t))),s=c):Y.warn("A view or instrument with the name ",t.name,` has already been registered and is incompatible with another registered view.
|
|
460
460
|
`,`Details:
|
|
461
|
-
`,
|
|
462
|
-
`,Hm(a,t))}}catch(h){n={error:h}}finally{try{l&&!l.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}return s},e}(),ZZ=function(){function e(t){this._backingStorages=t}return e.prototype.record=function(t,r,n,i){this._backingStorages.forEach(function(s){s.record(t,r,n,i)})},e}(),LZ=function(){function e(t,r){this._instrumentName=t,this._valueType=r,this._buffer=new Ir}return e.prototype.observe=function(t,r){if(r===void 0&&(r={}),typeof t!="number"){Y.warn("non-number value provided to metric "+this._instrumentName+": "+t);return}this._valueType===qt.INT&&!Number.isInteger(t)&&(Y.warn("INT value type cannot accept a floating-point value for "+this._instrumentName+", ignoring the fractional digits."),t=Math.trunc(t),!Number.isInteger(t))||this._buffer.set(r,t)},e}(),xZ=function(){function e(){this._buffer=new Map}return e.prototype.observe=function(t,r,n){if(n===void 0&&(n={}),!!gu(t)){var i=this._buffer.get(t);if(i==null&&(i=new Ir,this._buffer.set(t,i)),typeof r!="number"){Y.warn("non-number value provided to metric "+t._descriptor.name+": "+r);return}t._descriptor.valueType===qt.INT&&!Number.isInteger(r)&&(Y.warn("INT value type cannot accept a floating-point value for "+t._descriptor.name+", ignoring the fractional digits."),r=Math.trunc(r),!Number.isInteger(r))||i.set(n,r)}},e}(),vu=function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function l(h){try{a(n.next(h))}catch(c){o(c)}}function u(h){try{a(n.throw(h))}catch(c){o(c)}}function a(h){h.done?s(h.value):i(h.value).then(l,u)}a((n=n.apply(e,t||[])).next())})},Su=function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function l(a){return function(h){return u([a,h])}}function u(a){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(s=a[0]&2?i.return:a[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,a[1])).done)return s;switch(i=0,s&&(a=[a[0]&2,s.value]),a[0]){case 0:case 1:s=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){r.label=a[1];break}if(a[0]===6&&r.label<s[1]){r.label=s[1],s=a;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(a);break}s[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(h){a=[6,h],i=0}finally{n=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},Ym=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},Bm=function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,s;n<i;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))},NZ=function(){function e(){this._callbacks=[],this._batchCallbacks=[]}return e.prototype.addCallback=function(t,r){var n=this._findCallback(t,r);n>=0||this._callbacks.push({callback:t,instrument:r})},e.prototype.removeCallback=function(t,r){var n=this._findCallback(t,r);n<0||this._callbacks.splice(n,1)},e.prototype.addBatchCallback=function(t,r){var n=new Set(r.filter(gu));if(n.size===0){Y.error("BatchObservableCallback is not associated with valid instruments",r);return}var i=this._findBatchCallback(t,n);i>=0||this._batchCallbacks.push({callback:t,instruments:n})},e.prototype.removeBatchCallback=function(t,r){var n=new Set(r.filter(gu)),i=this._findBatchCallback(t,n);i<0||this._batchCallbacks.splice(i,1)},e.prototype.observe=function(t,r){return vu(this,void 0,void 0,function(){var n,i,s,o;return Su(this,function(l){switch(l.label){case 0:return n=this._observeCallbacks(t,r),i=this._observeBatchCallbacks(t,r),[4,mC(Bm(Bm([],Ym(n),!1),Ym(i),!1))];case 1:return s=l.sent(),o=s.filter(gC).map(function(u){return u.reason}),[2,o]}})})},e.prototype._observeCallbacks=function(t,r){var n=this;return this._callbacks.map(function(i){var s=i.callback,o=i.instrument;return vu(n,void 0,void 0,function(){var l,u;return Su(this,function(a){switch(a.label){case 0:return l=new LZ(o._descriptor.name,o._descriptor.valueType),u=Promise.resolve(s(l)),r!=null&&(u=Hn(u,r)),[4,u];case 1:return a.sent(),o._metricStorages.forEach(function(h){h.record(l._buffer,t)}),[2]}})})})},e.prototype._observeBatchCallbacks=function(t,r){var n=this;return this._batchCallbacks.map(function(i){var s=i.callback,o=i.instruments;return vu(n,void 0,void 0,function(){var l,u;return Su(this,function(a){switch(a.label){case 0:return l=new xZ,u=Promise.resolve(s(l)),r!=null&&(u=Hn(u,r)),[4,u];case 1:return a.sent(),o.forEach(function(h){var c=l._buffer.get(h);c!=null&&h._metricStorages.forEach(function(f){f.record(c,t)})}),[2]}})})})},e.prototype._findCallback=function(t,r){return this._callbacks.findIndex(function(n){return n.callback===t&&n.instrument===r})},e.prototype._findBatchCallback=function(t,r){return this._batchCallbacks.findIndex(function(n){return n.callback===t&&yC(n.instruments,r)})},e}(),OZ=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),GZ=function(e){OZ(t,e);function t(r,n,i,s,o){var l=e.call(this,r)||this;return l._attributesProcessor=i,l._aggregationCardinalityLimit=o,l._deltaMetricStorage=new Um(n,l._aggregationCardinalityLimit),l._temporalMetricStorage=new Fm(n,s),l}return t.prototype.record=function(r,n,i,s){n=this._attributesProcessor.process(n,i),this._deltaMetricStorage.record(r,n,i,s)},t.prototype.collect=function(r,n){var i=this._deltaMetricStorage.collect();return this._temporalMetricStorage.buildMetrics(r,this._instrumentDescriptor,i,n)},t}(Mm),zm=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),wu=function(){function e(){}return e.Noop=function(){return kZ},e}(),VZ=function(e){zm(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.process=function(r,n){return r},t}(wu);(function(e){zm(t,e);function t(r){var n=e.call(this)||this;return n._allowedAttributeNames=r,n}return t.prototype.process=function(r,n){var i=this,s={};return Object.keys(r).filter(function(o){return i._allowedAttributeNames.includes(o)}).forEach(function(o){return s[o]=r[o]}),s},t})(wu);var kZ=new VZ,XZ=function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function l(h){try{a(n.next(h))}catch(c){o(c)}}function u(h){try{a(n.throw(h))}catch(c){o(c)}}function a(h){h.done?s(h.value):i(h.value).then(l,u)}a((n=n.apply(e,t||[])).next())})},WZ=function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function l(a){return function(h){return u([a,h])}}function u(a){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(s=a[0]&2?i.return:a[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,a[1])).done)return s;switch(i=0,s&&(a=[a[0]&2,s.value]),a[0]){case 0:case 1:s=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){r.label=a[1];break}if(a[0]===6&&r.label<s[1]){r.label=s[1],s=a;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(a);break}s[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(h){a=[6,h],i=0}finally{n=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},PZ=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},MZ=function(){function e(t,r){this._meterProviderSharedState=t,this._instrumentationScope=r,this.metricStorageRegistry=new CZ,this.observableRegistry=new NZ,this.meter=new mZ(this)}return e.prototype.registerMetricStorage=function(t){var r=this._registerMetricStorage(t,GZ);return r.length===1?r[0]:new ZZ(r)},e.prototype.registerAsyncMetricStorage=function(t){var r=this._registerMetricStorage(t,RZ);return r},e.prototype.collect=function(t,r,n){return XZ(this,void 0,void 0,function(){var i,s,o;return WZ(this,function(l){switch(l.label){case 0:return[4,this.observableRegistry.observe(r,n==null?void 0:n.timeoutMillis)];case 1:return i=l.sent(),s=this.metricStorageRegistry.getStorages(t),s.length===0?[2,null]:(o=s.map(function(u){return u.collect(t,r)}).filter(fC),o.length===0?[2,{errors:i}]:[2,{scopeMetrics:{scope:this._instrumentationScope,metrics:o},errors:i}])}})})},e.prototype._registerMetricStorage=function(t,r){var n=this,i=this._meterProviderSharedState.viewRegistry.findViews(t,this._instrumentationScope),s=i.map(function(u){var a=wC(u,t),h=n.metricStorageRegistry.findOrUpdateCompatibleStorage(a);if(h!=null)return h;var c=u.aggregation.createAggregator(a),f=new r(a,c,u.attributesProcessor,n._meterProviderSharedState.metricCollectors,u.aggregationCardinalityLimit);return n.metricStorageRegistry.register(f),f});if(s.length===0){var o=this._meterProviderSharedState.selectAggregations(t.type),l=o.map(function(u){var a=PZ(u,2),h=a[0],c=a[1],f=n.metricStorageRegistry.findOrUpdateCompatibleCollectorStorage(h,t);if(f!=null)return f;var d=c.createAggregator(t),p=h.selectCardinalityLimit(t.type),m=new r(t,d,wu.Noop(),[h],p);return n.metricStorageRegistry.registerForCollector(h,m),m});s=s.concat(l)}return s},e}(),AZ=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},UZ=function(){function e(t){this.resource=t,this.viewRegistry=new aZ,this.metricCollectors=[],this.meterSharedStates=new Map}return e.prototype.getMeterSharedState=function(t){var r=pC(t),n=this.meterSharedStates.get(r);return n==null&&(n=new MZ(this,t),this.meterSharedStates.set(r,n)),n},e.prototype.selectAggregations=function(t){var r,n,i=[];try{for(var s=AZ(this.metricCollectors),o=s.next();!o.done;o=s.next()){var l=o.value;i.push([l,l.selectAggregation(t)])}}catch(u){r={error:u}}finally{try{o&&!o.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}return i},e}(),Ws=function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function l(h){try{a(n.next(h))}catch(c){o(c)}}function u(h){try{a(n.throw(h))}catch(c){o(c)}}function a(h){h.done?s(h.value):i(h.value).then(l,u)}a((n=n.apply(e,t||[])).next())})},Ps=function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function l(a){return function(h){return u([a,h])}}function u(a){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(s=a[0]&2?i.return:a[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,a[1])).done)return s;switch(i=0,s&&(a=[a[0]&2,s.value]),a[0]){case 0:case 1:s=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){r.label=a[1];break}if(a[0]===6&&r.label<s[1]){r.label=s[1],s=a;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(a);break}s[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(h){a=[6,h],i=0}finally{n=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},DZ=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},FZ=function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,s;n<i;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))},JZ=function(){function e(t,r){this._sharedState=t,this._metricReader=r}return e.prototype.collect=function(t){return Ws(this,void 0,void 0,function(){var r,n,i,s,o=this;return Ps(this,function(l){switch(l.label){case 0:return r=ft(Date.now()),n=[],i=[],s=Array.from(this._sharedState.meterSharedStates.values()).map(function(u){return Ws(o,void 0,void 0,function(){var a;return Ps(this,function(h){switch(h.label){case 0:return[4,u.collect(this,r,t)];case 1:return a=h.sent(),(a==null?void 0:a.scopeMetrics)!=null&&n.push(a.scopeMetrics),(a==null?void 0:a.errors)!=null&&i.push.apply(i,FZ([],DZ(a.errors),!1)),[2]}})})}),[4,Promise.all(s)];case 1:return l.sent(),[2,{resourceMetrics:{resource:this._sharedState.resource,scopeMetrics:n},errors:i}]}})})},e.prototype.forceFlush=function(t){return Ws(this,void 0,void 0,function(){return Ps(this,function(r){switch(r.label){case 0:return[4,this._metricReader.forceFlush(t)];case 1:return r.sent(),[2]}})})},e.prototype.shutdown=function(t){return Ws(this,void 0,void 0,function(){return Ps(this,function(r){switch(r.label){case 0:return[4,this._metricReader.shutdown(t)];case 1:return r.sent(),[2]}})})},e.prototype.selectAggregationTemporality=function(t){return this._metricReader.selectAggregationTemporality(t)},e.prototype.selectAggregation=function(t){return this._metricReader.selectAggregation(t)},e.prototype.selectCardinalityLimit=function(t){var r,n,i;return(i=(n=(r=this._metricReader).selectCardinalityLimit)===null||n===void 0?void 0:n.call(r,t))!==null&&i!==void 0?i:2e3},e}(),Km=function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function l(h){try{a(n.next(h))}catch(c){o(c)}}function u(h){try{a(n.throw(h))}catch(c){o(c)}}function a(h){h.done?s(h.value):i(h.value).then(l,u)}a((n=n.apply(e,t||[])).next())})},jm=function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function l(a){return function(h){return u([a,h])}}function u(a){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(s=a[0]&2?i.return:a[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,a[1])).done)return s;switch(i=0,s&&(a=[a[0]&2,s.value]),a[0]){case 0:case 1:s=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){r.label=a[1];break}if(a[0]===6&&r.label<s[1]){r.label=s[1],s=a;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(a);break}s[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(h){a=[6,h],i=0}finally{n=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},Qm=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};function HZ(e,t){var r=t!=null?t:Un.empty();return e?Un.default().merge(r):r}var YZ=function(){function e(t){var r,n,i,s,o;if(this._shutdown=!1,this._sharedState=new UZ(HZ((o=t==null?void 0:t.mergeResourceWithDefaults)!==null&&o!==void 0?o:!0,t==null?void 0:t.resource)),(t==null?void 0:t.views)!=null&&t.views.length>0)try{for(var l=Qm(t.views),u=l.next();!u.done;u=l.next()){var a=u.value;this._sharedState.viewRegistry.addView(a)}}catch(d){r={error:d}}finally{try{u&&!u.done&&(n=l.return)&&n.call(l)}finally{if(r)throw r.error}}if((t==null?void 0:t.readers)!=null&&t.readers.length>0)try{for(var h=Qm(t.readers),c=h.next();!c.done;c=h.next()){var f=c.value;this.addMetricReader(f)}}catch(d){i={error:d}}finally{try{c&&!c.done&&(s=h.return)&&s.call(h)}finally{if(i)throw i.error}}}return e.prototype.getMeter=function(t,r,n){return r===void 0&&(r=""),n===void 0&&(n={}),this._shutdown?(Y.warn("A shutdown MeterProvider cannot provide a Meter"),Mw()):this._sharedState.getMeterSharedState({name:t,version:r,schemaUrl:n.schemaUrl}).meter},e.prototype.addMetricReader=function(t){var r=new JZ(this._sharedState,t);t.setMetricProducer(r),this._sharedState.metricCollectors.push(r)},e.prototype.shutdown=function(t){return Km(this,void 0,void 0,function(){return jm(this,function(r){switch(r.label){case 0:return this._shutdown?(Y.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(t)}))]);case 1:return r.sent(),[2]}})})},e.prototype.forceFlush=function(t){return Km(this,void 0,void 0,function(){return jm(this,function(r){switch(r.label){case 0:return this._shutdown?(Y.warn("invalid attempt to force flush after MeterProvider shutdown"),[2]):[4,Promise.all(this._sharedState.metricCollectors.map(function(n){return n.forceFlush(t)}))];case 1:return r.sent(),[2]}})})},e}();function BZ(e,t){var r=pm(t);return{resource:mm(e.resource),schemaUrl:void 0,scopeMetrics:zZ(e.scopeMetrics,r)}}function zZ(e,t){return Array.from(e.map(function(r){return{scope:gm(r.scope),metrics:r.metrics.map(function(n){return KZ(n,t)}),schemaUrl:r.scope.schemaUrl}}))}function KZ(e,t){var r={name:e.descriptor.name,description:e.descriptor.description,unit:e.descriptor.unit},n=qZ(e.aggregationTemporality);switch(e.dataPointType){case Nt.SUM:r.sum={aggregationTemporality:n,isMonotonic:e.isMonotonic,dataPoints:$m(e,t)};break;case Nt.GAUGE:r.gauge={dataPoints:$m(e,t)};break;case Nt.HISTOGRAM:r.histogram={aggregationTemporality:n,dataPoints:QZ(e,t)};break;case Nt.EXPONENTIAL_HISTOGRAM:r.exponentialHistogram={aggregationTemporality:n,dataPoints:$Z(e,t)};break}return r}function jZ(e,t,r){var n={attributes:Rr(e.attributes),startTimeUnixNano:r.encodeHrTime(e.startTime),timeUnixNano:r.encodeHrTime(e.endTime)};switch(t){case qt.INT:n.asInt=e.value;break;case qt.DOUBLE:n.asDouble=e.value;break}return n}function $m(e,t){return e.dataPoints.map(function(r){return jZ(r,e.descriptor.valueType,t)})}function QZ(e,t){return e.dataPoints.map(function(r){var n=r.value;return{attributes:Rr(r.attributes),bucketCounts:n.buckets.counts,explicitBounds:n.buckets.boundaries,count:n.count,sum:n.sum,min:n.min,max:n.max,startTimeUnixNano:t.encodeHrTime(r.startTime),timeUnixNano:t.encodeHrTime(r.endTime)}})}function $Z(e,t){return e.dataPoints.map(function(r){var n=r.value;return{attributes:Rr(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:t.encodeHrTime(r.startTime),timeUnixNano:t.encodeHrTime(r.endTime)}})}function qZ(e){switch(e){case It.DELTA:return 1;case It.CUMULATIVE:return 2}}function eL(e,t){return{resourceMetrics:e.map(function(r){return BZ(r,t)})}}var tL=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},rL=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s};function nL(e,t){var r,n=e.spanContext(),i=e.status;return{traceId:t.encodeSpanContext(n.traceId),spanId:t.encodeSpanContext(n.spanId),parentSpanId:t.encodeOptionalSpanContext(e.parentSpanId),traceState:(r=n.traceState)===null||r===void 0?void 0:r.serialize(),name:e.name,kind:e.kind==null?0:e.kind+1,startTimeUnixNano:t.encodeHrTime(e.startTime),endTimeUnixNano:t.encodeHrTime(e.endTime),attributes:Rr(e.attributes),droppedAttributesCount:e.droppedAttributesCount,events:e.events.map(function(s){return sL(s,t)}),droppedEventsCount:e.droppedEventsCount,status:{code:i.code,message:i.message},links:e.links.map(function(s){return iL(s,t)}),droppedLinksCount:e.droppedLinksCount}}function iL(e,t){var r;return{attributes:e.attributes?Rr(e.attributes):[],spanId:t.encodeSpanContext(e.context.spanId),traceId:t.encodeSpanContext(e.context.traceId),traceState:(r=e.context.traceState)===null||r===void 0?void 0:r.serialize(),droppedAttributesCount:e.droppedAttributesCount||0}}function sL(e,t){return{attributes:e.attributes?Rr(e.attributes):[],name:e.name,timeUnixNano:t.encodeHrTime(e.time),droppedAttributesCount:e.droppedAttributesCount||0}}function oL(e,t){var r=pm(t);return{resourceSpans:lL(e,r)}}function aL(e){var t,r,n=new Map;try{for(var i=tL(e),s=i.next();!s.done;s=i.next()){var o=s.value,l=n.get(o.resource);l||(l=new Map,n.set(o.resource,l));var u=o.instrumentationLibrary.name+"@"+(o.instrumentationLibrary.version||"")+":"+(o.instrumentationLibrary.schemaUrl||""),a=l.get(u);a||(a=[],l.set(u,a)),a.push(o)}}catch(h){t={error:h}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return n}function lL(e,t){for(var r=aL(e),n=[],i=r.entries(),s=i.next();!s.done;){for(var o=rL(s.value,2),l=o[0],u=o[1],a=[],h=u.values(),c=h.next();!c.done;){var f=c.value;if(f.length>0){var d=f.map(function(m){return nL(m,t)});a.push({scope:gm(f[0].instrumentationLibrary),spans:d,schemaUrl:f[0].instrumentationLibrary.schemaUrl})}c=h.next()}var p={resource:mm(l),scopeSpans:a,schemaUrl:void 0};n.push(p),s=i.next()}return n}var qm={serializeRequest:function(e){var t=eL([e],{useLongBits:!1}),r=new TextEncoder;return r.encode(JSON.stringify(t))},deserializeResponse:function(e){var t=new TextDecoder;return JSON.parse(t.decode(e))}},eg={serializeRequest:function(e){var t=oL(e,{useHex:!0,useLongBits:!1}),r=new TextEncoder;return r.encode(JSON.stringify(t))},deserializeResponse:function(e){var t=new TextDecoder;return JSON.parse(t.decode(e))}},uL=function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function l(h){try{a(n.next(h))}catch(c){o(c)}}function u(h){try{a(n.throw(h))}catch(c){o(c)}}function a(h){h.done?s(h.value):i(h.value).then(l,u)}a((n=n.apply(e,t||[])).next())})},cL=function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function l(a){return function(h){return u([a,h])}}function u(a){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(s=a[0]&2?i.return:a[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,a[1])).done)return s;switch(i=0,s&&(a=[a[0]&2,s.value]),a[0]){case 0:case 1:s=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){r.label=a[1];break}if(a[0]===6&&r.label<s[1]){r.label=s[1],s=a;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(a);break}s[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(h){a=[6,h],i=0}finally{n=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},dL=5,hL=1e3,fL=5e3,pL=1.5,tg=.2;function mL(){return Math.random()*(2*tg)-tg}var gL=function(){function e(t){this._transport=t}return e.prototype.retry=function(t,r,n){var i=this;return new Promise(function(s,o){setTimeout(function(){i._transport.send(t,r).then(s,o)},n)})},e.prototype.send=function(t,r){var n;return uL(this,void 0,void 0,function(){var i,s,o,l,u,a,h;return cL(this,function(c){switch(c.label){case 0:return i=Date.now()+r,[4,this._transport.send(t,r)];case 1:s=c.sent(),o=dL,l=hL,c.label=2;case 2:return s.status==="retryable"&&o>0?(o--,u=Math.max(Math.min(l,fL)+mL(),0),l=l*pL,a=(n=s.retryInMillis)!==null&&n!==void 0?n:u,h=i-Date.now(),a>h?[2,s]:[4,this.retry(t,h,a)]):[3,4];case 3:return s=c.sent(),[3,2];case 4:return[2,s]}})})},e.prototype.shutdown=function(){return this._transport.shutdown()},e}();function rg(e){return new gL(e.transport)}function yL(e){var t=[429,502,503,504];return t.includes(e)}function bL(e){if(e!=null){var t=Number.parseInt(e,10);if(Number.isInteger(t))return t>0?t*1e3:-1;var r=new Date(e).getTime()-Date.now();return r>=0?r:0}}var vL=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},SL=function(){function e(t){this._parameters=t}return e.prototype.send=function(t,r){var n=this;return new Promise(function(i){var s=new XMLHttpRequest;s.timeout=r,s.open("POST",n._parameters.url);var o=n._parameters.headers();Object.entries(o).forEach(function(l){var u=vL(l,2),a=u[0],h=u[1];s.setRequestHeader(a,h)}),s.ontimeout=function(l){i({status:"failure",error:new Error("XHR request timed out")})},s.onreadystatechange=function(){s.status>=200&&s.status<=299?(Y.debug("XHR success"),i({status:"success"})):s.status&&yL(s.status)?i({status:"retryable",retryInMillis:bL(s.getResponseHeader("Retry-After"))}):s.status!==0&&i({status:"failure",error:new Error("XHR request failed with non-retryable status")})},s.onabort=function(){i({status:"failure",error:new Error("XHR request aborted")})},s.onerror=function(){i({status:"failure",error:new Error("XHR request errored")})},s.send(t)})},e.prototype.shutdown=function(){},e}();function wL(e){return new SL(e)}var RL=function(){function e(t){this._params=t}return e.prototype.send=function(t){var r=this;return new Promise(function(n){navigator.sendBeacon(r._params.url,new Blob([t],{type:r._params.blobType}))?(Y.debug("SendBeacon success"),n({status:"success"})):n({status:"failure",error:new Error("SendBeacon failed")})})},e.prototype.shutdown=function(){},e}();function _L(e){return new RL(e)}function TL(e,t){return um(e,t,rg({transport:wL(e)}))}function EL(e,t){return um(e,t,rg({transport:_L({url:e.url,blobType:e.headers()["Content-Type"]})}))}var IL=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s};function CL(e){return function(){var t,r={};return Object.entries((t=e==null?void 0:e())!==null&&t!==void 0?t:{}).forEach(function(n){var i=IL(n,2),s=i[0],o=i[1];typeof o!="undefined"?r[s]=String(o):Y.warn('Header "'+s+'" has invalid value ('+o+") and will be ignored")}),r}}var Cr=function(){return Cr=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Cr.apply(this,arguments)};function ZL(e,t,r){var n=Cr({},r()),i={};return function(){return t!=null&&Object.assign(i,t()),e!=null&&Object.assign(i,e()),Object.assign(i,n)}}function LL(e){if(e!=null)try{return new URL(e),e}catch(t){throw new Error("Configuration: Could not parse user-provided export URL: '"+e+"'")}}function xL(e,t,r){var n,i,s,o;return Cr(Cr({},YI(e,t,r)),{headers:ZL(CL(e.headers),t.headers,r.headers),url:(i=(n=LL(e.url))!==null&&n!==void 0?n:t.url)!==null&&i!==void 0?i:r.url,agentOptions:(o=(s=e.agentOptions)!==null&&s!==void 0?s:t.agentOptions)!==null&&o!==void 0?o:r.agentOptions})}function NL(e,t){return Cr(Cr({},BI()),{headers:function(){return e},url:"http://localhost:4318/"+t,agentOptions:{keepAlive:!0}})}function OL(e,t,r){return xL({url:e.url,timeoutMillis:e.timeoutMillis,headers:HI(e.headers),concurrencyLimit:e.concurrencyLimit},{},NL(r,t))}function ng(e,t,r,n){var i=!!e.headers||typeof navigator.sendBeacon!="function",s=OL(e,r,n);return i?TL(s,t):EL(s,t)}var GL=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),VL=function(e){GL(t,e);function t(r){return r===void 0&&(r={}),e.call(this,ng(r,eg,"v1/traces",{"Content-Type":"application/json"}))||this}return t}(am),Ms;(function(e){e[e.DELTA=0]="DELTA",e[e.CUMULATIVE=1]="CUMULATIVE",e[e.LOWMEMORY=2]="LOWMEMORY"})(Ms||(Ms={}));var kL=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ru=function(){return It.CUMULATIVE},ig=function(e){switch(e){case se.COUNTER:case se.OBSERVABLE_COUNTER:case se.GAUGE:case se.HISTOGRAM:case se.OBSERVABLE_GAUGE:return It.DELTA;case se.UP_DOWN_COUNTER:case se.OBSERVABLE_UP_DOWN_COUNTER:return It.CUMULATIVE}},sg=function(e){switch(e){case se.COUNTER:case se.HISTOGRAM:return It.DELTA;case se.GAUGE:case se.UP_DOWN_COUNTER:case se.OBSERVABLE_UP_DOWN_COUNTER:case se.OBSERVABLE_COUNTER:case se.OBSERVABLE_GAUGE:return It.CUMULATIVE}};function XL(){var e=Br(),t=e.OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE.trim().toLowerCase();return t==="cumulative"?Ru:t==="delta"?ig:t==="lowmemory"?sg:(Y.warn("OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE is set to '"+e.OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE+"', but only 'cumulative' and 'delta' are allowed. Using default ('cumulative') instead."),Ru)}function WL(e){return e!=null?e===Ms.DELTA?ig:e===Ms.LOWMEMORY?sg:Ru:XL()}function PL(e){return e!=null&&e.aggregationPreference?e.aggregationPreference:function(t){return Jt.Default()}}var ML=function(e){kL(t,e);function t(r,n){var i=e.call(this,r)||this;return i._aggregationSelector=PL(n),i._aggregationTemporalitySelector=WL(n==null?void 0:n.temporalityPreference),i}return t.prototype.selectAggregation=function(r){return this._aggregationSelector(r)},t.prototype.selectAggregationTemporality=function(r){return this._aggregationTemporalitySelector(r)},t}(am),AL=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),UL=function(e){AL(t,e);function t(r){return e.call(this,ng(r!=null?r:{},qm,"v1/metrics",{"Content-Type":"application/json"}),r)||this}return t}(ML),og=(e=>(e.BillingQuotaExceeded="BillingQuotaExceeded",e))(og||{});const _u=3,Tu=1e3,Eu=500,DL=[og.BillingQuotaExceeded.toString()],FL=e=>{var r;return((r=e.response.errors)==null?void 0:r.find(n=>DL.includes(n.message)))===void 0},Iu=()=>{const e=(t,r,n,i,s=0)=>q(this,null,function*(){try{return yield t()}catch(o){if(o instanceof Xr&&!FL(o))throw o;if(s<_u)return yield new Promise(l=>setTimeout(l,Tu+Eu*Math.pow(2,s))),yield e(t,r,n,i,s+1);throw _e("error",`highlight.io: data request failed after ${s} retries`),o}});return e};function JL(e,t){const r=e.spanContext();return{name:e.name,kind:e.kind,spanContext:()=>r,parentSpanId:e.parentSpanId,startTime:e.startTime,endTime:e.endTime,status:e.status,attributes:op(e.attributes,t),links:e.links,events:e.events,duration:e.duration,ended:e.ended,resource:e.resource,instrumentationLibrary:e.instrumentationLibrary,droppedAttributesCount:e.droppedAttributesCount,droppedEventsCount:e.droppedEventsCount,droppedLinksCount:e.droppedLinksCount}}function HL(e,t){if(!t.isSamplingEnabled())return e;const r=[],n={},i={};for(const s of e){s.parentSpanId&&(i[s.parentSpanId]=i[s.parentSpanId]||[],i[s.parentSpanId].push(s.spanContext().spanId));const o=t.shouldSample(s);o.sample?o.attributes?n[s.spanContext().spanId]=JL(s,o.attributes):n[s.spanContext().spanId]=s:r.push(s.spanContext().spanId)}for(;r.length>0;){const s=r.shift(),o=i[s];if(o)for(const l of o)delete n[l],r.push(l)}return Object.values(n)}const YL=(e,t,r)=>{if(typeof navigator=="undefined"||!navigator.sendBeacon)return!1;try{const n=new Blob([t],{type:r});return navigator.sendBeacon(e,n)}catch(n){return!1}},ag=(e,t,r,n)=>{const i=s=>{if(YL(e,t,r))return n({code:Ie.SUCCESS});n({code:Ie.FAILED,error:s})};try{const s=new Blob([t],{type:r});fetch(e,{method:"POST",body:s,keepalive:!0,headers:{"Content-Type":r},credentials:"omit"}).then(o=>{if(o.ok)return n({code:Ie.SUCCESS});n({code:Ie.FAILED,error:new Error(`keepalive fetch export failed with status ${o.status}`)})},o=>i(o))}catch(s){i(s)}};class BL extends VL{constructor(r,n){var i;super(B(x({},r),{headers:{}}));L(this,"url");L(this,"unloading",!1);this.sampler=n,this.url=(i=r==null?void 0:r.url)!=null?i:""}setUnloading(r){this.unloading=r}export(r,n){const i=HL(r,this.sampler);if(i.length===0)return n({code:Ie.SUCCESS});if(this.unloading){const l=eg.serializeRequest(i);if(!l||!this.url)return n({code:Ie.FAILED,error:new Error("keepalive export failed: serializer returned empty or url missing")});ag(this.url,l,"application/json",n);return}let s=0;const o=l=>{if(l.code===Ie.SUCCESS)return n({code:Ie.SUCCESS});if(s++,s>_u)return n({code:Ie.FAILED,error:l.error});new Promise(u=>setTimeout(u,Tu+Eu*Math.pow(2,s))).then(()=>{super.export(i,o)})};super.export(i,o)}}class zL extends UL{constructor(r){var n;super(B(x({},r),{headers:{}}));L(this,"url");L(this,"unloading",!1);this.url=(n=r==null?void 0:r.url)!=null?n:""}setUnloading(r){this.unloading=r}export(r,n){if(this.unloading){const o=qm.serializeRequest(r);if(!o||!this.url)return n({code:Ie.FAILED,error:new Error("keepalive export failed: serializer returned empty or url missing")});ag(this.url,o,"application/json",n);return}let i=0;const s=o=>{var l;if(o.code===Ie.SUCCESS)return n({code:Ie.SUCCESS});if(i++,i>_u)return _e("error",`[@launchdarkly/observability] failed to export OTeL metrics: ${(l=o.error)==null?void 0:l.message}`,o.error),n({code:Ie.FAILED,error:o.error});new Promise(u=>setTimeout(u,Tu+Eu*Math.pow(2,i))).then(()=>{var u;_e("warn",`[@launchdarkly/observability] retry ${i}, failed to export OTeL metrics: ${(u=o.error)==null?void 0:u.message}`,o.error),super.export(r,s)})};super.export(r,s)}}const KL="OT_ZONE_CONTEXT",jL="Navigation:";function QL(){return!1}const Gt=class Gt extends An{constructor(r={}){var n,i;super(Gt.moduleName,Gt.version,r);L(this,"_spansData",new WeakMap);L(this,"_zonePatched");L(this,"_wrappedListeners",new WeakMap);L(this,"_eventsSpanMap",new WeakMap);L(this,"_eventNames");L(this,"_shouldPreventSpanCreation");L(this,"_getLDContextKeyAttributes");this._getLDContextKeyAttributes=r.getLDContextKeyAttributes,this._eventNames=new Set((n=r==null?void 0:r.eventNames)!=null?n:[]),((i=r.productAnalyticsEvents)==null?void 0:i.clicks)!==!1&&this._eventNames.add("click"),this._shouldPreventSpanCreation=typeof(r==null?void 0:r.shouldPreventSpanCreation)=="function"?r.shouldPreventSpanCreation:QL}init(){}_checkForTimeout(r,n){const i=this._spansData.get(n);i&&(r.source==="setTimeout"?i.hrTimeLastTimeout=vr():r.source!=="Promise.then"&&r.source!=="setTimeout"&&(i.hrTimeLastTimeout=void 0))}_allowEventName(r){return this._eventNames.has(r)}_createSpan(r,n){var l,u;const i=r==null?void 0:r.target,s=r==null?void 0:r.type;if(!(i instanceof HTMLElement)||!i.getAttribute||i.hasAttribute("disabled")||!this._allowEventName(s))return;const o=Gp(i,!0);try{const a=this.tracer.startSpan(s,{attributes:{[nr]:window.location.href,"event.type":s,"event.tag":i.tagName,"event.xpath":o,"event.id":i.id,"event.classname":i.className,"event.text":(l=i.textContent)!=null?l:"","event.url":window.location.href,"viewport.width":window.innerWidth,"viewport.height":window.innerHeight}},n?we.setSpan(pe.active(),n):void 0);r instanceof MouseEvent&&(a.setAttribute("event.x",r.clientX),a.setAttribute("event.y",r.clientY),a.setAttribute("event.relativeX",r.clientX/window.innerWidth),a.setAttribute("event.relativeY",r.clientY/window.innerHeight),s==="scroll"&&(a.setAttribute("event.scrollX",window.scrollX),a.setAttribute("event.scrollY",window.scrollY)));const h=(u=this._getLDContextKeyAttributes)==null?void 0:u.call(this);return h&&a.setAttributes(h),this._shouldPreventSpanCreation(s,i,a)===!0?void 0:(this._spansData.set(a,{taskCount:0}),a)}catch(a){this._diag.error("failed to start create new user interaction span",a)}}_decrementTask(r){const n=this._spansData.get(r);n&&(n.taskCount--,n.taskCount===0&&this._tryToEndSpan(r,n.hrTimeLastTimeout))}_getCurrentSpan(r){const n=r.get(KL);return n&&we.getSpan(n)}_incrementTask(r){const n=this._spansData.get(r);n&&n.taskCount++}addPatchedListener(r,n,i,s){let o=this._wrappedListeners.get(i);o||(o=new Map,this._wrappedListeners.set(i,o));let l=o.get(n);return l||(l=new Map,o.set(n,l)),l.has(r)?!1:(l.set(r,s),!0)}removePatchedListener(r,n,i){const s=this._wrappedListeners.get(i);if(!s)return;const o=s.get(n);if(!o)return;const l=o.get(r);return l&&(o.delete(r),o.size===0&&(s.delete(n),s.size===0&&this._wrappedListeners.delete(i))),l}_invokeListener(r,n,i){return typeof r=="function"?r.apply(n,i):r.handleEvent(i[0])}_patchAddEventListener(){const r=this;let n=new Map;return i=>function(o,l,u){if(!l)return i.call(this,o,l,u);const a=u&&typeof u=="object"&&u.once,h=function(...c){var m;let f;const d=c[0];if(!(d!=null&&d.type))return r._invokeListener(l,this,c);if(Date.now()-((m=n.get(d.type))!=null?m:0)<1e3/60)return r._invokeListener(l,this,c);n.set(d.type,Date.now()),d&&(f=r._eventsSpanMap.get(d)),a&&r.removePatchedListener(this,o,l);const p=r._createSpan(d,f);return p?(d&&r._eventsSpanMap.set(d,p),pe.with(we.setSpan(pe.active(),p),()=>{const g=r._invokeListener(l,this,c);return p.end(),g})):r._invokeListener(l,this,c)};if(r.addPatchedListener(this,o,l,h))return i.call(this,o,h,u)}}_patchRemoveEventListener(){const r=this;return n=>function(s,o,l){const u=r.removePatchedListener(this,s,o);return u?n.call(this,s,u,l):n.call(this,s,o,l)}}_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 r=this;return n=>function(...s){const o=`${location.pathname}${location.hash}${location.search}`,l=n.apply(this,s),u=`${location.pathname}${location.hash}${location.search}`;return o!==u&&r._updateInteractionName(u),l}}_unpatchHistoryApi(){Me(history.replaceState)&&this._unwrap(history,"replaceState"),Me(history.pushState)&&this._unwrap(history,"pushState"),Me(history.back)&&this._unwrap(history,"back"),Me(history.forward)&&this._unwrap(history,"forward"),Me(history.go)&&this._unwrap(history,"go")}_updateInteractionName(r){const n=we.getSpan(pe.active());n&&typeof n.updateName=="function"&&n.updateName(`${jL} ${r}`)}_patchZoneCancelTask(){const r=this;return n=>function(s){const o=Zone.current,l=r._getCurrentSpan(o);return l&&r._shouldCountTask(s,o)&&r._decrementTask(l),n.call(this,s)}}_patchZoneScheduleTask(){const r=this;return n=>function(s){const o=Zone.current,l=r._getCurrentSpan(o);return l&&r._shouldCountTask(s,o)&&(r._incrementTask(l),r._checkForTimeout(s,l)),n.call(this,s)}}_patchZoneRunTask(){const r=this;return n=>function(s,o,l){const u=Array.isArray(l)&&l[0]instanceof Event?l[0]:void 0,a=u==null?void 0:u.target;let h;const c=this;if(a){if(h=r._createSpan(u),h)return r._incrementTask(h),c.run(()=>{try{return pe.with(we.setSpan(pe.active(),h),()=>{const f=Zone.current;return s._zone=f,n.call(f,s,o,l)})}finally{r._decrementTask(h)}})}else h=r._getCurrentSpan(c);try{return n.call(c,s,o,l)}finally{h&&r._shouldCountTask(s,c)&&r._decrementTask(h)}}}_shouldCountTask(r,n){if(r._zone&&(n=r._zone),!n||!r.data||r.data.isPeriodic)return!1;const i=this._getCurrentSpan(n);return!i||!this._spansData.get(i)?!1:r.type==="macroTask"||r.type==="microTask"}_tryToEndSpan(r,n){r&&this._spansData.get(r)&&(r.end(n),this._spansData.delete(r))}enable(){const r=this._getZoneWithPrototype();this._diag.debug("applying patch to",Gt.moduleName,Gt.version,"zone:",!!r),r?(Me(r.prototype.runTask)&&(this._unwrap(r.prototype,"runTask"),this._diag.debug("removing previous patch from method runTask")),Me(r.prototype.scheduleTask)&&(this._unwrap(r.prototype,"scheduleTask"),this._diag.debug("removing previous patch from method scheduleTask")),Me(r.prototype.cancelTask)&&(this._unwrap(r.prototype,"cancelTask"),this._diag.debug("removing previous patch from method cancelTask")),this._zonePatched=!0,this._wrap(r.prototype,"runTask",this._patchZoneRunTask()),this._wrap(r.prototype,"scheduleTask",this._patchZoneScheduleTask()),this._wrap(r.prototype,"cancelTask",this._patchZoneCancelTask())):(this._zonePatched=!1,this._getPatchableEventTargets().forEach(i=>{Me(i.addEventListener)&&(this._unwrap(i,"addEventListener"),this._diag.debug("removing previous patch from method addEventListener")),Me(i.removeEventListener)&&(this._unwrap(i,"removeEventListener"),this._diag.debug("removing previous patch from method removeEventListener")),this._wrap(i,"addEventListener",this._patchAddEventListener()),this._wrap(i,"removeEventListener",this._patchRemoveEventListener())})),this._patchHistoryApi()}disable(){const r=this._getZoneWithPrototype();this._diag.debug("removing patch from",Gt.moduleName,Gt.version,"zone:",!!r),r&&this._zonePatched?(Me(r.prototype.runTask)&&this._unwrap(r.prototype,"runTask"),Me(r.prototype.scheduleTask)&&this._unwrap(r.prototype,"scheduleTask"),Me(r.prototype.cancelTask)&&this._unwrap(r.prototype,"cancelTask")):this._getPatchableEventTargets().forEach(i=>{Me(i.addEventListener)&&this._unwrap(i,"addEventListener"),Me(i.removeEventListener)&&this._unwrap(i,"removeEventListener")}),this._unpatchHistoryApi()}_getZoneWithPrototype(){return window.Zone}};L(Gt,"version","0.1.1"),L(Gt,"moduleName","user-interaction");let Cu=Gt;const $L=e=>{if(typeof XMLHttpRequest=="undefined")return()=>{};const t=XMLHttpRequest.prototype,r=t.open,n=t.setRequestHeader,i=t.send,s=a=>!!a&&e.some(h=>a.toLowerCase().includes(h)),o=function(a,h){return this._method=a,this._url=typeof h=="string"?h:String(h),this._requestHeaders={},this._body=void 0,r.apply(this,arguments)},l=function(a,h){return this._requestHeaders||(this._requestHeaders={}),this._requestHeaders[a]=h,n.apply(this,arguments)},u=function(a){if(this._body===void 0&&a!==void 0&&a!==null&&!s(this._url)){const h=nu(a,this._url);h&&(this._body=h)}return i.apply(this,arguments)};return t.open=o,t.setRequestHeader=l,t.send=u,()=>{t.open===o&&(t.open=r),t.setRequestHeader===l&&(t.setRequestHeader=n),t.send===u&&(t.send=i)}},qL=256*1024,ex=e=>!!e&&e.split(";")[0].trim().toLowerCase()==="multipart/form-data",lg=e=>{if(!e||typeof e!="object")return{};if(typeof Headers!="undefined"&&e instanceof Headers)return Object.fromEntries(e.entries());if(Array.isArray(e))try{return Object.fromEntries(new Headers(e).entries())}catch(t){return Object.fromEntries(e.map(([r,n])=>[String(r),String(n)]))}return x({},e)},As=e=>Object.prototype.toString.call(e),tx=e=>typeof ArrayBuffer!="undefined"&&e instanceof ArrayBuffer||As(e)==="[object ArrayBuffer]"||As(e)==="[object SharedArrayBuffer]",ug=e=>{if(typeof File!="undefined"&&e instanceof File||As(e)==="[object File]"){const t=e;return`[File name="${t.name}" type="${t.type}" size=${t.size}]`}return`[Blob type="${e.type}" size=${e.size}]`},Zu=(e,t,r)=>{const n=e[t];n===void 0?e[t]=r:Array.isArray(n)?n.push(r):e[t]=[n,r]},rx=e=>{const t={};return e.forEach((r,n)=>{Zu(t,n,typeof r=="string"?r:ug(r))}),JSON.stringify(t)},nx=e=>{const t=ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e);if(t.byteLength>qL)return`[binary size=${t.byteLength}]`;try{return new TextDecoder("utf-8",{fatal:!0}).decode(t)}catch(r){return`[binary size=${t.byteLength}]`}},cg=e=>{if(e==null)return;switch(typeof e){case"string":return e;case"number":case"boolean":case"bigint":return String(e);case"object":break;default:return}const t=As(e);if(typeof URLSearchParams!="undefined"&&e instanceof URLSearchParams||t==="[object URLSearchParams]")return e.toString();if(typeof FormData!="undefined"&&e instanceof FormData||t==="[object FormData]")return rx(e);if(typeof Blob!="undefined"&&e instanceof Blob||t==="[object Blob]"||t==="[object File]")return ug(e);if(tx(e)||ArrayBuffer.isView(e))return nx(e);if(!(typeof ReadableStream!="undefined"&&e instanceof ReadableStream||t==="[object ReadableStream]")){if(typeof Document!="undefined"&&e instanceof Document)try{return new XMLSerializer().serializeToString(e)}catch(r){return}try{return Rt(e)}catch(r){return}}},Lu=new WeakMap,ix=e=>Lu.get(e),sx=(e,t)=>q(this,null,function*(){const r=e.getReader(),n=[];let i=0;for(;i<t;){const{done:s,value:o}=yield r.read();if(s)return{chunks:n,byteLength:i,truncated:!1};const l=t-i,u=o.byteLength>l?o.subarray(0,l):o;n.push(u),i+=u.byteLength}return r.cancel().catch(()=>{}),{chunks:n,byteLength:i,truncated:!0}}),ox=({chunks:e,byteLength:t})=>{const r=new Uint8Array(t);let n=0;for(const i of e)r.set(i,n),n+=i.byteLength;return r},ax=e=>{const t=new TextDecoder("utf-8",{fatal:!0});try{let r="";for(const n of e.chunks)r+=t.decode(n,{stream:!0});return e.truncated?r:r+t.decode()}catch(r){return`[binary size${e.truncated?">":"="}${e.byteLength}]`}},Us=e=>`[multipart/form-data size${e.truncated?">":"="}${e.byteLength}]`,lx=(e,t)=>{var i,s,o,l,u,a,h;const r=/;\s*boundary=(?:"([^"]*)"|([^;]*))/i.exec(t),n=(s=(i=r==null?void 0:r[1])!=null?i:r==null?void 0:r[2])==null?void 0:s.trim();if(!n)return Us(e);try{const c=ox(e),f=new TextDecoder("windows-1252").decode(c),d=`--${n}`,p={};let m=f.indexOf(d);if(m===-1)return Us(e);for(;m!==-1&&(m+=d.length,!f.startsWith("--",m));){const g=f.indexOf(`\r
|
|
461
|
+
`,Wm(a,t),`To resolve the conflict:
|
|
462
|
+
`,Pm(a,t))}}catch(h){n={error:h}}finally{try{l&&!l.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}return s},e}(),pZ=function(){function e(t){this._backingStorages=t}return e.prototype.record=function(t,r,n,i){this._backingStorages.forEach(function(s){s.record(t,r,n,i)})},e}(),mZ=function(){function e(t,r){this._instrumentName=t,this._valueType=r,this._buffer=new Ir}return e.prototype.observe=function(t,r){if(r===void 0&&(r={}),typeof t!="number"){Y.warn("non-number value provided to metric "+this._instrumentName+": "+t);return}this._valueType===qt.INT&&!Number.isInteger(t)&&(Y.warn("INT value type cannot accept a floating-point value for "+this._instrumentName+", ignoring the fractional digits."),t=Math.trunc(t),!Number.isInteger(t))||this._buffer.set(r,t)},e}(),gZ=function(){function e(){this._buffer=new Map}return e.prototype.observe=function(t,r,n){if(n===void 0&&(n={}),!!bc(t)){var i=this._buffer.get(t);if(i==null&&(i=new Ir,this._buffer.set(t,i)),typeof r!="number"){Y.warn("non-number value provided to metric "+t._descriptor.name+": "+r);return}t._descriptor.valueType===qt.INT&&!Number.isInteger(r)&&(Y.warn("INT value type cannot accept a floating-point value for "+t._descriptor.name+", ignoring the fractional digits."),r=Math.trunc(r),!Number.isInteger(r))||i.set(n,r)}},e}(),wc=function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function l(h){try{a(n.next(h))}catch(u){o(u)}}function c(h){try{a(n.throw(h))}catch(u){o(u)}}function a(h){h.done?s(h.value):i(h.value).then(l,c)}a((n=n.apply(e,t||[])).next())})},Rc=function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function l(a){return function(h){return c([a,h])}}function c(a){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(s=a[0]&2?i.return:a[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,a[1])).done)return s;switch(i=0,s&&(a=[a[0]&2,s.value]),a[0]){case 0:case 1:s=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){r.label=a[1];break}if(a[0]===6&&r.label<s[1]){r.label=s[1],s=a;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(a);break}s[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(h){a=[6,h],i=0}finally{n=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},Mm=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},Am=function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,s;n<i;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))},yZ=function(){function e(){this._callbacks=[],this._batchCallbacks=[]}return e.prototype.addCallback=function(t,r){var n=this._findCallback(t,r);n>=0||this._callbacks.push({callback:t,instrument:r})},e.prototype.removeCallback=function(t,r){var n=this._findCallback(t,r);n<0||this._callbacks.splice(n,1)},e.prototype.addBatchCallback=function(t,r){var n=new Set(r.filter(bc));if(n.size===0){Y.error("BatchObservableCallback is not associated with valid instruments",r);return}var i=this._findBatchCallback(t,n);i>=0||this._batchCallbacks.push({callback:t,instruments:n})},e.prototype.removeBatchCallback=function(t,r){var n=new Set(r.filter(bc)),i=this._findBatchCallback(t,n);i<0||this._batchCallbacks.splice(i,1)},e.prototype.observe=function(t,r){return wc(this,void 0,void 0,function(){var n,i,s,o;return Rc(this,function(l){switch(l.label){case 0:return n=this._observeCallbacks(t,r),i=this._observeBatchCallbacks(t,r),[4,tC(Am(Am([],Mm(n),!1),Mm(i),!1))];case 1:return s=l.sent(),o=s.filter(rC).map(function(c){return c.reason}),[2,o]}})})},e.prototype._observeCallbacks=function(t,r){var n=this;return this._callbacks.map(function(i){var s=i.callback,o=i.instrument;return wc(n,void 0,void 0,function(){var l,c;return Rc(this,function(a){switch(a.label){case 0:return l=new mZ(o._descriptor.name,o._descriptor.valueType),c=Promise.resolve(s(l)),r!=null&&(c=Bn(c,r)),[4,c];case 1:return a.sent(),o._metricStorages.forEach(function(h){h.record(l._buffer,t)}),[2]}})})})},e.prototype._observeBatchCallbacks=function(t,r){var n=this;return this._batchCallbacks.map(function(i){var s=i.callback,o=i.instruments;return wc(n,void 0,void 0,function(){var l,c;return Rc(this,function(a){switch(a.label){case 0:return l=new gZ,c=Promise.resolve(s(l)),r!=null&&(c=Bn(c,r)),[4,c];case 1:return a.sent(),o.forEach(function(h){var u=l._buffer.get(h);u!=null&&h._metricStorages.forEach(function(f){f.record(u,t)})}),[2]}})})})},e.prototype._findCallback=function(t,r){return this._callbacks.findIndex(function(n){return n.callback===t&&n.instrument===r})},e.prototype._findBatchCallback=function(t,r){return this._batchCallbacks.findIndex(function(n){return n.callback===t&&nC(n.instruments,r)})},e}(),bZ=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),vZ=function(e){bZ(t,e);function t(r,n,i,s,o){var l=e.call(this,r)||this;return l._attributesProcessor=i,l._aggregationCardinalityLimit=o,l._deltaMetricStorage=new Vm(n,l._aggregationCardinalityLimit),l._temporalMetricStorage=new Xm(n,s),l}return t.prototype.record=function(r,n,i,s){n=this._attributesProcessor.process(n,i),this._deltaMetricStorage.record(r,n,i,s)},t.prototype.collect=function(r,n){var i=this._deltaMetricStorage.collect();return this._temporalMetricStorage.buildMetrics(r,this._instrumentDescriptor,i,n)},t}(Om),Um=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),_c=function(){function e(){}return e.Noop=function(){return wZ},e}(),SZ=function(e){Um(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.process=function(r,n){return r},t}(_c);(function(e){Um(t,e);function t(r){var n=e.call(this)||this;return n._allowedAttributeNames=r,n}return t.prototype.process=function(r,n){var i=this,s={};return Object.keys(r).filter(function(o){return i._allowedAttributeNames.includes(o)}).forEach(function(o){return s[o]=r[o]}),s},t})(_c);var wZ=new SZ,RZ=function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function l(h){try{a(n.next(h))}catch(u){o(u)}}function c(h){try{a(n.throw(h))}catch(u){o(u)}}function a(h){h.done?s(h.value):i(h.value).then(l,c)}a((n=n.apply(e,t||[])).next())})},_Z=function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function l(a){return function(h){return c([a,h])}}function c(a){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(s=a[0]&2?i.return:a[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,a[1])).done)return s;switch(i=0,s&&(a=[a[0]&2,s.value]),a[0]){case 0:case 1:s=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){r.label=a[1];break}if(a[0]===6&&r.label<s[1]){r.label=s[1],s=a;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(a);break}s[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(h){a=[6,h],i=0}finally{n=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},TZ=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},EZ=function(){function e(t,r){this._meterProviderSharedState=t,this._instrumentationScope=r,this.metricStorageRegistry=new fZ,this.observableRegistry=new yZ,this.meter=new tZ(this)}return e.prototype.registerMetricStorage=function(t){var r=this._registerMetricStorage(t,vZ);return r.length===1?r[0]:new pZ(r)},e.prototype.registerAsyncMetricStorage=function(t){var r=this._registerMetricStorage(t,lZ);return r},e.prototype.collect=function(t,r,n){return RZ(this,void 0,void 0,function(){var i,s,o;return _Z(this,function(l){switch(l.label){case 0:return[4,this.observableRegistry.observe(r,n==null?void 0:n.timeoutMillis)];case 1:return i=l.sent(),s=this.metricStorageRegistry.getStorages(t),s.length===0?[2,null]:(o=s.map(function(c){return c.collect(t,r)}).filter(qI),o.length===0?[2,{errors:i}]:[2,{scopeMetrics:{scope:this._instrumentationScope,metrics:o},errors:i}])}})})},e.prototype._registerMetricStorage=function(t,r){var n=this,i=this._meterProviderSharedState.viewRegistry.findViews(t,this._instrumentationScope),s=i.map(function(c){var a=aC(c,t),h=n.metricStorageRegistry.findOrUpdateCompatibleStorage(a);if(h!=null)return h;var u=c.aggregation.createAggregator(a),f=new r(a,u,c.attributesProcessor,n._meterProviderSharedState.metricCollectors,c.aggregationCardinalityLimit);return n.metricStorageRegistry.register(f),f});if(s.length===0){var o=this._meterProviderSharedState.selectAggregations(t.type),l=o.map(function(c){var a=TZ(c,2),h=a[0],u=a[1],f=n.metricStorageRegistry.findOrUpdateCompatibleCollectorStorage(h,t);if(f!=null)return f;var d=u.createAggregator(t),p=h.selectCardinalityLimit(t.type),m=new r(t,d,_c.Noop(),[h],p);return n.metricStorageRegistry.registerForCollector(h,m),m});s=s.concat(l)}return s},e}(),IZ=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},CZ=function(){function e(t){this.resource=t,this.viewRegistry=new BC,this.metricCollectors=[],this.meterSharedStates=new Map}return e.prototype.getMeterSharedState=function(t){var r=eC(t),n=this.meterSharedStates.get(r);return n==null&&(n=new EZ(this,t),this.meterSharedStates.set(r,n)),n},e.prototype.selectAggregations=function(t){var r,n,i=[];try{for(var s=IZ(this.metricCollectors),o=s.next();!o.done;o=s.next()){var l=o.value;i.push([l,l.selectAggregation(t)])}}catch(c){r={error:c}}finally{try{o&&!o.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}return i},e}(),Ms=function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function l(h){try{a(n.next(h))}catch(u){o(u)}}function c(h){try{a(n.throw(h))}catch(u){o(u)}}function a(h){h.done?s(h.value):i(h.value).then(l,c)}a((n=n.apply(e,t||[])).next())})},As=function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function l(a){return function(h){return c([a,h])}}function c(a){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(s=a[0]&2?i.return:a[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,a[1])).done)return s;switch(i=0,s&&(a=[a[0]&2,s.value]),a[0]){case 0:case 1:s=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){r.label=a[1];break}if(a[0]===6&&r.label<s[1]){r.label=s[1],s=a;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(a);break}s[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(h){a=[6,h],i=0}finally{n=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},ZZ=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},LZ=function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,s;n<i;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))},xZ=function(){function e(t,r){this._sharedState=t,this._metricReader=r}return e.prototype.collect=function(t){return Ms(this,void 0,void 0,function(){var r,n,i,s,o=this;return As(this,function(l){switch(l.label){case 0:return r=pt(Date.now()),n=[],i=[],s=Array.from(this._sharedState.meterSharedStates.values()).map(function(c){return Ms(o,void 0,void 0,function(){var a;return As(this,function(h){switch(h.label){case 0:return[4,c.collect(this,r,t)];case 1:return a=h.sent(),(a==null?void 0:a.scopeMetrics)!=null&&n.push(a.scopeMetrics),(a==null?void 0:a.errors)!=null&&i.push.apply(i,LZ([],ZZ(a.errors),!1)),[2]}})})}),[4,Promise.all(s)];case 1:return l.sent(),[2,{resourceMetrics:{resource:this._sharedState.resource,scopeMetrics:n},errors:i}]}})})},e.prototype.forceFlush=function(t){return Ms(this,void 0,void 0,function(){return As(this,function(r){switch(r.label){case 0:return[4,this._metricReader.forceFlush(t)];case 1:return r.sent(),[2]}})})},e.prototype.shutdown=function(t){return Ms(this,void 0,void 0,function(){return As(this,function(r){switch(r.label){case 0:return[4,this._metricReader.shutdown(t)];case 1:return r.sent(),[2]}})})},e.prototype.selectAggregationTemporality=function(t){return this._metricReader.selectAggregationTemporality(t)},e.prototype.selectAggregation=function(t){return this._metricReader.selectAggregation(t)},e.prototype.selectCardinalityLimit=function(t){var r,n,i;return(i=(n=(r=this._metricReader).selectCardinalityLimit)===null||n===void 0?void 0:n.call(r,t))!==null&&i!==void 0?i:2e3},e}(),Dm=function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function l(h){try{a(n.next(h))}catch(u){o(u)}}function c(h){try{a(n.throw(h))}catch(u){o(u)}}function a(h){h.done?s(h.value):i(h.value).then(l,c)}a((n=n.apply(e,t||[])).next())})},Fm=function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function l(a){return function(h){return c([a,h])}}function c(a){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(s=a[0]&2?i.return:a[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,a[1])).done)return s;switch(i=0,s&&(a=[a[0]&2,s.value]),a[0]){case 0:case 1:s=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){r.label=a[1];break}if(a[0]===6&&r.label<s[1]){r.label=s[1],s=a;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(a);break}s[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(h){a=[6,h],i=0}finally{n=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},Jm=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};function NZ(e,t){var r=t!=null?t:Un.empty();return e?Un.default().merge(r):r}var OZ=function(){function e(t){var r,n,i,s,o;if(this._shutdown=!1,this._sharedState=new CZ(NZ((o=t==null?void 0:t.mergeResourceWithDefaults)!==null&&o!==void 0?o:!0,t==null?void 0:t.resource)),(t==null?void 0:t.views)!=null&&t.views.length>0)try{for(var l=Jm(t.views),c=l.next();!c.done;c=l.next()){var a=c.value;this._sharedState.viewRegistry.addView(a)}}catch(d){r={error:d}}finally{try{c&&!c.done&&(n=l.return)&&n.call(l)}finally{if(r)throw r.error}}if((t==null?void 0:t.readers)!=null&&t.readers.length>0)try{for(var h=Jm(t.readers),u=h.next();!u.done;u=h.next()){var f=u.value;this.addMetricReader(f)}}catch(d){i={error:d}}finally{try{u&&!u.done&&(s=h.return)&&s.call(h)}finally{if(i)throw i.error}}}return e.prototype.getMeter=function(t,r,n){return r===void 0&&(r=""),n===void 0&&(n={}),this._shutdown?(Y.warn("A shutdown MeterProvider cannot provide a Meter"),Jw()):this._sharedState.getMeterSharedState({name:t,version:r,schemaUrl:n.schemaUrl}).meter},e.prototype.addMetricReader=function(t){var r=new xZ(this._sharedState,t);t.setMetricProducer(r),this._sharedState.metricCollectors.push(r)},e.prototype.shutdown=function(t){return Dm(this,void 0,void 0,function(){return Fm(this,function(r){switch(r.label){case 0:return this._shutdown?(Y.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(t)}))]);case 1:return r.sent(),[2]}})})},e.prototype.forceFlush=function(t){return Dm(this,void 0,void 0,function(){return Fm(this,function(r){switch(r.label){case 0:return this._shutdown?(Y.warn("invalid attempt to force flush after MeterProvider shutdown"),[2]):[4,Promise.all(this._sharedState.metricCollectors.map(function(n){return n.forceFlush(t)}))];case 1:return r.sent(),[2]}})})},e}(),jn;(function(e){e[e.DELTA=0]="DELTA",e[e.CUMULATIVE=1]="CUMULATIVE",e[e.LOWMEMORY=2]="LOWMEMORY"})(jn||(jn={}));var Hm=function(){function e(t){this._delegate=t}return e.prototype.export=function(t,r){this._delegate.export(t,r)},e.prototype.forceFlush=function(){return this._delegate.forceFlush()},e.prototype.shutdown=function(){return this._delegate.shutdown()},e}(),GZ=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ym=function(e){GZ(t,e);function t(r,n,i){var s=e.call(this,r)||this;return s.name="OTLPExporterError",s.data=i,s.code=n,s}return t}(Error);function VZ(e){if(!Number.isNaN(e)&&Number.isFinite(e)&&e>0)return e;throw new Error("Configuration: timeoutMillis is invalid, expected number greater than 0 (actual: '"+e+"')")}function kZ(e){if(e!=null)return function(){return e}}function XZ(e,t,r){var n,i,s,o,l,c;return{timeoutMillis:VZ((i=(n=e.timeoutMillis)!==null&&n!==void 0?n:t.timeoutMillis)!==null&&i!==void 0?i:r.timeoutMillis),concurrencyLimit:(o=(s=e.concurrencyLimit)!==null&&s!==void 0?s:t.concurrencyLimit)!==null&&o!==void 0?o:r.concurrencyLimit,compression:(c=(l=e.compression)!==null&&l!==void 0?l:t.compression)!==null&&c!==void 0?c:r.compression}}function WZ(){return{timeoutMillis:1e4,concurrencyLimit:30,compression:"none"}}var PZ=function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function l(h){try{a(n.next(h))}catch(u){o(u)}}function c(h){try{a(n.throw(h))}catch(u){o(u)}}function a(h){h.done?s(h.value):i(h.value).then(l,c)}a((n=n.apply(e,t||[])).next())})},MZ=function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function l(a){return function(h){return c([a,h])}}function c(a){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(s=a[0]&2?i.return:a[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,a[1])).done)return s;switch(i=0,s&&(a=[a[0]&2,s.value]),a[0]){case 0:case 1:s=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){r.label=a[1];break}if(a[0]===6&&r.label<s[1]){r.label=s[1],s=a;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(a);break}s[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(h){a=[6,h],i=0}finally{n=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},AZ=function(){function e(t){this._sendingPromises=[],this._concurrencyLimit=t}return e.prototype.pushPromise=function(t){var r=this;if(this.hasReachedLimit())throw new Error("Concurrency Limit reached");this._sendingPromises.push(t);var n=function(){var i=r._sendingPromises.indexOf(t);r._sendingPromises.splice(i,1)};t.then(n,n)},e.prototype.hasReachedLimit=function(){return this._sendingPromises.length>=this._concurrencyLimit},e.prototype.awaitAll=function(){return PZ(this,void 0,void 0,function(){return MZ(this,function(t){switch(t.label){case 0:return[4,Promise.all(this._sendingPromises)];case 1:return t.sent(),[2]}})})},e}();function UZ(e){return new AZ(e.concurrencyLimit)}function DZ(e){return Object.prototype.hasOwnProperty.call(e,"partialSuccess")}function FZ(){return{handleResponse:function(e){e==null||!DZ(e)||e.partialSuccess==null||Object.keys(e.partialSuccess).length===0||Y.warn("Received Partial Success response:",JSON.stringify(e.partialSuccess))}}}var JZ=function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function l(h){try{a(n.next(h))}catch(u){o(u)}}function c(h){try{a(n.throw(h))}catch(u){o(u)}}function a(h){h.done?s(h.value):i(h.value).then(l,c)}a((n=n.apply(e,t||[])).next())})},HZ=function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function l(a){return function(h){return c([a,h])}}function c(a){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(s=a[0]&2?i.return:a[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,a[1])).done)return s;switch(i=0,s&&(a=[a[0]&2,s.value]),a[0]){case 0:case 1:s=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){r.label=a[1];break}if(a[0]===6&&r.label<s[1]){r.label=s[1],s=a;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(a);break}s[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(h){a=[6,h],i=0}finally{n=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},YZ=function(){function e(t,r,n,i,s){this._transport=t,this._serializer=r,this._responseHandler=n,this._promiseQueue=i,this._timeout=s,this._diagLogger=Y.createComponentLogger({namespace:"OTLPExportDelegate"})}return e.prototype.export=function(t,r){var n=this;if(this._diagLogger.debug("items to be sent",t),this._promiseQueue.hasReachedLimit()){r({code:Ie.FAILED,error:new Error("Concurrent export limit reached")});return}var i=this._serializer.serializeRequest(t);if(i==null){r({code:Ie.FAILED,error:new Error("Nothing to send")});return}this._promiseQueue.pushPromise(this._transport.send(i,this._timeout).then(function(s){if(s.status==="success"){if(s.data!=null)try{n._responseHandler.handleResponse(n._serializer.deserializeResponse(s.data))}catch(o){n._diagLogger.warn("Export succeeded but could not deserialize response - is the response specification compliant?",o,s.data)}r({code:Ie.SUCCESS});return}else if(s.status==="failure"&&s.error){r({code:Ie.FAILED,error:s.error});return}else s.status==="retryable"?r({code:Ie.FAILED,error:new Ym("Export failed with retryable status")}):r({code:Ie.FAILED,error:new Ym("Export failed with unknown error")})},function(s){return r({code:Ie.FAILED,error:s})}))},e.prototype.forceFlush=function(){return this._promiseQueue.awaitAll()},e.prototype.shutdown=function(){return JZ(this,void 0,void 0,function(){return HZ(this,function(t){switch(t.label){case 0:return this._diagLogger.debug("shutdown started"),[4,this.forceFlush()];case 1:return t.sent(),this._transport.shutdown(),[2]}})})},e}();function BZ(e,t){return new YZ(e.transport,e.serializer,FZ(),e.promiseHandler,t.timeout)}function Bm(e,t,r){return BZ({transport:r,serializer:t,promiseHandler:UZ(e)},{timeout:e.timeoutMillis})}var zZ=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Tc=function(){return Ct.CUMULATIVE},zm=function(e){switch(e){case se.COUNTER:case se.OBSERVABLE_COUNTER:case se.GAUGE:case se.HISTOGRAM:case se.OBSERVABLE_GAUGE:return Ct.DELTA;case se.UP_DOWN_COUNTER:case se.OBSERVABLE_UP_DOWN_COUNTER:return Ct.CUMULATIVE}},Km=function(e){switch(e){case se.COUNTER:case se.HISTOGRAM:return Ct.DELTA;case se.GAUGE:case se.UP_DOWN_COUNTER:case se.OBSERVABLE_UP_DOWN_COUNTER:case se.OBSERVABLE_COUNTER:case se.OBSERVABLE_GAUGE:return Ct.CUMULATIVE}};function KZ(){var e=zr(),t=e.OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE.trim().toLowerCase();return t==="cumulative"?Tc:t==="delta"?zm:t==="lowmemory"?Km:(Y.warn("OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE is set to '"+e.OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE+"', but only 'cumulative' and 'delta' are allowed. Using default ('cumulative') instead."),Tc)}function jZ(e){return e!=null?e===jn.DELTA?zm:e===jn.LOWMEMORY?Km:Tc:KZ()}function QZ(e){return e!=null&&e.aggregationPreference?e.aggregationPreference:function(t){return Jt.Default()}}var $Z=function(e){zZ(t,e);function t(r,n){var i=e.call(this,r)||this;return i._aggregationSelector=QZ(n),i._aggregationTemporalitySelector=jZ(n==null?void 0:n.temporalityPreference),i}return t.prototype.selectAggregation=function(r){return this._aggregationSelector(r)},t.prototype.selectAggregationTemporality=function(r){return this._aggregationTemporalitySelector(r)},t}(Hm);function jm(e){var t=BigInt(1e9);return BigInt(e[0])*t+BigInt(e[1])}function qZ(e){var t=Number(BigInt.asUintN(32,e)),r=Number(BigInt.asUintN(32,e>>BigInt(32)));return{low:t,high:r}}function Qm(e){var t=jm(e);return qZ(t)}function eL(e){var t=jm(e);return t.toString()}var tL=typeof BigInt!="undefined"?eL:At;function $m(e){return e}function qm(e){if(e!==void 0)return Gl(e)}var rL={encodeHrTime:Qm,encodeSpanContext:Gl,encodeOptionalSpanContext:qm};function eg(e){var t,r;if(e===void 0)return rL;var n=(t=e.useLongBits)!==null&&t!==void 0?t:!0,i=(r=e.useHex)!==null&&r!==void 0?r:!1;return{encodeHrTime:n?Qm:tL,encodeSpanContext:i?$m:Gl,encodeOptionalSpanContext:i?$m:qm}}var nL=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s};function tg(e){return{attributes:Cr(e.attributes),droppedAttributesCount:0}}function rg(e){return{name:e.name,version:e.version}}function Cr(e){return Object.keys(e).map(function(t){return ng(t,e[t])})}function ng(e,t){return{key:e,value:ig(t)}}function ig(e){var t=typeof e;return t==="string"?{stringValue:e}:t==="number"?Number.isInteger(e)?{intValue:e}:{doubleValue:e}:t==="boolean"?{boolValue:e}:e instanceof Uint8Array?{bytesValue:e}:Array.isArray(e)?{arrayValue:{values:e.map(ig)}}:t==="object"&&e!=null?{kvlistValue:{values:Object.entries(e).map(function(r){var n=nL(r,2),i=n[0],s=n[1];return ng(i,s)})}}:{}}function iL(e,t){var r=eg(t);return{resource:tg(e.resource),schemaUrl:void 0,scopeMetrics:sL(e.scopeMetrics,r)}}function sL(e,t){return Array.from(e.map(function(r){return{scope:rg(r.scope),metrics:r.metrics.map(function(n){return oL(n,t)}),schemaUrl:r.scope.schemaUrl}}))}function oL(e,t){var r={name:e.descriptor.name,description:e.descriptor.description,unit:e.descriptor.unit},n=uL(e.aggregationTemporality);switch(e.dataPointType){case Gt.SUM:r.sum={aggregationTemporality:n,isMonotonic:e.isMonotonic,dataPoints:sg(e,t)};break;case Gt.GAUGE:r.gauge={dataPoints:sg(e,t)};break;case Gt.HISTOGRAM:r.histogram={aggregationTemporality:n,dataPoints:lL(e,t)};break;case Gt.EXPONENTIAL_HISTOGRAM:r.exponentialHistogram={aggregationTemporality:n,dataPoints:cL(e,t)};break}return r}function aL(e,t,r){var n={attributes:Cr(e.attributes),startTimeUnixNano:r.encodeHrTime(e.startTime),timeUnixNano:r.encodeHrTime(e.endTime)};switch(t){case qt.INT:n.asInt=e.value;break;case qt.DOUBLE:n.asDouble=e.value;break}return n}function sg(e,t){return e.dataPoints.map(function(r){return aL(r,e.descriptor.valueType,t)})}function lL(e,t){return e.dataPoints.map(function(r){var n=r.value;return{attributes:Cr(r.attributes),bucketCounts:n.buckets.counts,explicitBounds:n.buckets.boundaries,count:n.count,sum:n.sum,min:n.min,max:n.max,startTimeUnixNano:t.encodeHrTime(r.startTime),timeUnixNano:t.encodeHrTime(r.endTime)}})}function cL(e,t){return e.dataPoints.map(function(r){var n=r.value;return{attributes:Cr(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:t.encodeHrTime(r.startTime),timeUnixNano:t.encodeHrTime(r.endTime)}})}function uL(e){switch(e){case Ct.DELTA:return 1;case Ct.CUMULATIVE:return 2}}function dL(e,t){return{resourceMetrics:e.map(function(r){return iL(r,t)})}}var hL=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},fL=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s};function pL(e,t){var r,n=e.spanContext(),i=e.status;return{traceId:t.encodeSpanContext(n.traceId),spanId:t.encodeSpanContext(n.spanId),parentSpanId:t.encodeOptionalSpanContext(e.parentSpanId),traceState:(r=n.traceState)===null||r===void 0?void 0:r.serialize(),name:e.name,kind:e.kind==null?0:e.kind+1,startTimeUnixNano:t.encodeHrTime(e.startTime),endTimeUnixNano:t.encodeHrTime(e.endTime),attributes:Cr(e.attributes),droppedAttributesCount:e.droppedAttributesCount,events:e.events.map(function(s){return gL(s,t)}),droppedEventsCount:e.droppedEventsCount,status:{code:i.code,message:i.message},links:e.links.map(function(s){return mL(s,t)}),droppedLinksCount:e.droppedLinksCount}}function mL(e,t){var r;return{attributes:e.attributes?Cr(e.attributes):[],spanId:t.encodeSpanContext(e.context.spanId),traceId:t.encodeSpanContext(e.context.traceId),traceState:(r=e.context.traceState)===null||r===void 0?void 0:r.serialize(),droppedAttributesCount:e.droppedAttributesCount||0}}function gL(e,t){return{attributes:e.attributes?Cr(e.attributes):[],name:e.name,timeUnixNano:t.encodeHrTime(e.time),droppedAttributesCount:e.droppedAttributesCount||0}}function yL(e,t){var r=eg(t);return{resourceSpans:vL(e,r)}}function bL(e){var t,r,n=new Map;try{for(var i=hL(e),s=i.next();!s.done;s=i.next()){var o=s.value,l=n.get(o.resource);l||(l=new Map,n.set(o.resource,l));var c=o.instrumentationLibrary.name+"@"+(o.instrumentationLibrary.version||"")+":"+(o.instrumentationLibrary.schemaUrl||""),a=l.get(c);a||(a=[],l.set(c,a)),a.push(o)}}catch(h){t={error:h}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return n}function vL(e,t){for(var r=bL(e),n=[],i=r.entries(),s=i.next();!s.done;){for(var o=fL(s.value,2),l=o[0],c=o[1],a=[],h=c.values(),u=h.next();!u.done;){var f=u.value;if(f.length>0){var d=f.map(function(m){return pL(m,t)});a.push({scope:rg(f[0].instrumentationLibrary),spans:d,schemaUrl:f[0].instrumentationLibrary.schemaUrl})}u=h.next()}var p={resource:tg(l),scopeSpans:a,schemaUrl:void 0};n.push(p),s=i.next()}return n}var og={serializeRequest:function(e){var t=dL([e],{useLongBits:!1}),r=new TextEncoder;return r.encode(JSON.stringify(t))},deserializeResponse:function(e){var t=new TextDecoder;return JSON.parse(t.decode(e))}},ag={serializeRequest:function(e){var t=yL(e,{useHex:!0,useLongBits:!1}),r=new TextEncoder;return r.encode(JSON.stringify(t))},deserializeResponse:function(e){var t=new TextDecoder;return JSON.parse(t.decode(e))}},SL=function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function l(h){try{a(n.next(h))}catch(u){o(u)}}function c(h){try{a(n.throw(h))}catch(u){o(u)}}function a(h){h.done?s(h.value):i(h.value).then(l,c)}a((n=n.apply(e,t||[])).next())})},wL=function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function l(a){return function(h){return c([a,h])}}function c(a){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(s=a[0]&2?i.return:a[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,a[1])).done)return s;switch(i=0,s&&(a=[a[0]&2,s.value]),a[0]){case 0:case 1:s=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){r.label=a[1];break}if(a[0]===6&&r.label<s[1]){r.label=s[1],s=a;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(a);break}s[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(h){a=[6,h],i=0}finally{n=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},RL=5,_L=1e3,TL=5e3,EL=1.5,lg=.2;function IL(){return Math.random()*(2*lg)-lg}var CL=function(){function e(t){this._transport=t}return e.prototype.retry=function(t,r,n){var i=this;return new Promise(function(s,o){setTimeout(function(){i._transport.send(t,r).then(s,o)},n)})},e.prototype.send=function(t,r){var n;return SL(this,void 0,void 0,function(){var i,s,o,l,c,a,h;return wL(this,function(u){switch(u.label){case 0:return i=Date.now()+r,[4,this._transport.send(t,r)];case 1:s=u.sent(),o=RL,l=_L,u.label=2;case 2:return s.status==="retryable"&&o>0?(o--,c=Math.max(Math.min(l,TL)+IL(),0),l=l*EL,a=(n=s.retryInMillis)!==null&&n!==void 0?n:c,h=i-Date.now(),a>h?[2,s]:[4,this.retry(t,h,a)]):[3,4];case 3:return s=u.sent(),[3,2];case 4:return[2,s]}})})},e.prototype.shutdown=function(){return this._transport.shutdown()},e}();function cg(e){return new CL(e.transport)}function ZL(e){var t=[429,502,503,504];return t.includes(e)}function LL(e){if(e!=null){var t=Number.parseInt(e,10);if(Number.isInteger(t))return t>0?t*1e3:-1;var r=new Date(e).getTime()-Date.now();return r>=0?r:0}}var xL=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},NL=function(){function e(t){this._parameters=t}return e.prototype.send=function(t,r){var n=this;return new Promise(function(i){var s=new XMLHttpRequest;s.timeout=r,s.open("POST",n._parameters.url);var o=n._parameters.headers();Object.entries(o).forEach(function(l){var c=xL(l,2),a=c[0],h=c[1];s.setRequestHeader(a,h)}),s.ontimeout=function(l){i({status:"failure",error:new Error("XHR request timed out")})},s.onreadystatechange=function(){s.status>=200&&s.status<=299?(Y.debug("XHR success"),i({status:"success"})):s.status&&ZL(s.status)?i({status:"retryable",retryInMillis:LL(s.getResponseHeader("Retry-After"))}):s.status!==0&&i({status:"failure",error:new Error("XHR request failed with non-retryable status")})},s.onabort=function(){i({status:"failure",error:new Error("XHR request aborted")})},s.onerror=function(){i({status:"failure",error:new Error("XHR request errored")})},s.send(t)})},e.prototype.shutdown=function(){},e}();function OL(e){return new NL(e)}var GL=function(){function e(t){this._params=t}return e.prototype.send=function(t){var r=this;return new Promise(function(n){navigator.sendBeacon(r._params.url,new Blob([t],{type:r._params.blobType}))?(Y.debug("SendBeacon success"),n({status:"success"})):n({status:"failure",error:new Error("SendBeacon failed")})})},e.prototype.shutdown=function(){},e}();function VL(e){return new GL(e)}function kL(e,t){return Bm(e,t,cg({transport:OL(e)}))}function XL(e,t){return Bm(e,t,cg({transport:VL({url:e.url,blobType:e.headers()["Content-Type"]})}))}var WL=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s};function PL(e){return function(){var t,r={};return Object.entries((t=e==null?void 0:e())!==null&&t!==void 0?t:{}).forEach(function(n){var i=WL(n,2),s=i[0],o=i[1];typeof o!="undefined"?r[s]=String(o):Y.warn('Header "'+s+'" has invalid value ('+o+") and will be ignored")}),r}}var Zr=function(){return Zr=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Zr.apply(this,arguments)};function ML(e,t,r){var n=Zr({},r()),i={};return function(){return t!=null&&Object.assign(i,t()),e!=null&&Object.assign(i,e()),Object.assign(i,n)}}function AL(e){if(e!=null)try{return new URL(e),e}catch(t){throw new Error("Configuration: Could not parse user-provided export URL: '"+e+"'")}}function UL(e,t,r){var n,i,s,o;return Zr(Zr({},XZ(e,t,r)),{headers:ML(PL(e.headers),t.headers,r.headers),url:(i=(n=AL(e.url))!==null&&n!==void 0?n:t.url)!==null&&i!==void 0?i:r.url,agentOptions:(o=(s=e.agentOptions)!==null&&s!==void 0?s:t.agentOptions)!==null&&o!==void 0?o:r.agentOptions})}function DL(e,t){return Zr(Zr({},WZ()),{headers:function(){return e},url:"http://localhost:4318/"+t,agentOptions:{keepAlive:!0}})}function FL(e,t,r){return UL({url:e.url,timeoutMillis:e.timeoutMillis,headers:kZ(e.headers),concurrencyLimit:e.concurrencyLimit},{},DL(r,t))}function ug(e,t,r,n){var i=!!e.headers||typeof navigator.sendBeacon!="function",s=FL(e,r,n);return i?kL(s,t):XL(s,t)}var JL=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),HL=function(e){JL(t,e);function t(r){return e.call(this,ug(r!=null?r:{},og,"v1/metrics",{"Content-Type":"application/json"}),r)||this}return t}($Z),YL=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),BL=function(e){YL(t,e);function t(r){return r===void 0&&(r={}),e.call(this,ug(r,ag,"v1/traces",{"Content-Type":"application/json"}))||this}return t}(Hm),dg=(e=>(e.BillingQuotaExceeded="BillingQuotaExceeded",e))(dg||{});const Ec=3,Ic=1e3,Cc=500,zL=[dg.BillingQuotaExceeded.toString()],KL=e=>{var r;return((r=e.response.errors)==null?void 0:r.find(n=>zL.includes(n.message)))===void 0},Zc=()=>{const e=(t,r,n,i,s=0)=>z(this,null,function*(){try{return yield t()}catch(o){if(o instanceof Wr&&!KL(o))throw o;if(s<Ec)return yield new Promise(l=>setTimeout(l,Ic+Cc*Math.pow(2,s))),yield e(t,r,n,i,s+1);throw _e("error",`highlight.io: data request failed after ${s} retries`),o}});return e};function jL(e,t){const r=e.spanContext();return{name:e.name,kind:e.kind,spanContext:()=>r,parentSpanId:e.parentSpanId,startTime:e.startTime,endTime:e.endTime,status:e.status,attributes:lp(e.attributes,t),links:e.links,events:e.events,duration:e.duration,ended:e.ended,resource:e.resource,instrumentationLibrary:e.instrumentationLibrary,droppedAttributesCount:e.droppedAttributesCount,droppedEventsCount:e.droppedEventsCount,droppedLinksCount:e.droppedLinksCount}}function QL(e,t){if(!t.isSamplingEnabled())return e;const r=[],n={},i={};for(const s of e){s.parentSpanId&&(i[s.parentSpanId]=i[s.parentSpanId]||[],i[s.parentSpanId].push(s.spanContext().spanId));const o=t.shouldSample(s);o.sample?o.attributes?n[s.spanContext().spanId]=jL(s,o.attributes):n[s.spanContext().spanId]=s:r.push(s.spanContext().spanId)}for(;r.length>0;){const s=r.shift(),o=i[s];if(o)for(const l of o)delete n[l],r.push(l)}return Object.values(n)}const $L=(e,t,r)=>{if(typeof navigator=="undefined"||!navigator.sendBeacon)return!1;try{const n=new Blob([t],{type:r});return navigator.sendBeacon(e,n)}catch(n){return!1}},hg=(e,t,r,n)=>{const i=s=>{if($L(e,t,r))return n({code:Ie.SUCCESS});n({code:Ie.FAILED,error:s})};try{const s=new Blob([t],{type:r});fetch(e,{method:"POST",body:s,keepalive:!0,headers:{"Content-Type":r},credentials:"omit"}).then(o=>{if(o.ok)return n({code:Ie.SUCCESS});n({code:Ie.FAILED,error:new Error(`keepalive fetch export failed with status ${o.status}`)})},o=>i(o))}catch(s){i(s)}};class qL extends BL{constructor(r,n){var i;super(B(x({},r),{headers:{}}));L(this,"url");L(this,"unloading",!1);this.sampler=n,this.url=(i=r==null?void 0:r.url)!=null?i:""}setUnloading(r){this.unloading=r}export(r,n){const i=QL(r,this.sampler);if(i.length===0)return n({code:Ie.SUCCESS});if(this.unloading){const l=ag.serializeRequest(i);if(!l||!this.url)return n({code:Ie.FAILED,error:new Error("keepalive export failed: serializer returned empty or url missing")});hg(this.url,l,"application/json",n);return}let s=0;const o=l=>{if(l.code===Ie.SUCCESS)return n({code:Ie.SUCCESS});if(s++,s>Ec)return n({code:Ie.FAILED,error:l.error});new Promise(c=>setTimeout(c,Ic+Cc*Math.pow(2,s))).then(()=>{super.export(i,o)})};super.export(i,o)}}class ex extends HL{constructor(r){var n;super(B(x({},r),{headers:{}}));L(this,"url");L(this,"unloading",!1);this.url=(n=r==null?void 0:r.url)!=null?n:""}setUnloading(r){this.unloading=r}export(r,n){if(this.unloading){const o=og.serializeRequest(r);if(!o||!this.url)return n({code:Ie.FAILED,error:new Error("keepalive export failed: serializer returned empty or url missing")});hg(this.url,o,"application/json",n);return}let i=0;const s=o=>{var l;if(o.code===Ie.SUCCESS)return n({code:Ie.SUCCESS});if(i++,i>Ec)return _e("error",`[@launchdarkly/observability] failed to export OTeL metrics: ${(l=o.error)==null?void 0:l.message}`,o.error),n({code:Ie.FAILED,error:o.error});new Promise(c=>setTimeout(c,Ic+Cc*Math.pow(2,i))).then(()=>{var c;_e("warn",`[@launchdarkly/observability] retry ${i}, failed to export OTeL metrics: ${(c=o.error)==null?void 0:c.message}`,o.error),super.export(r,s)})};super.export(r,s)}}const tx="OT_ZONE_CONTEXT",rx="Navigation:";function nx(){return!1}const kt=class kt extends An{constructor(r={}){var n,i;super(kt.moduleName,kt.version,r);L(this,"_spansData",new WeakMap);L(this,"_zonePatched");L(this,"_wrappedListeners",new WeakMap);L(this,"_eventsSpanMap",new WeakMap);L(this,"_eventNames");L(this,"_shouldPreventSpanCreation");L(this,"_getLDContextKeyAttributes");this._getLDContextKeyAttributes=r.getLDContextKeyAttributes,this._eventNames=new Set((n=r==null?void 0:r.eventNames)!=null?n:[]),((i=r.productAnalyticsEvents)==null?void 0:i.clicks)!==!1&&this._eventNames.add("click"),this._shouldPreventSpanCreation=typeof(r==null?void 0:r.shouldPreventSpanCreation)=="function"?r.shouldPreventSpanCreation:nx}init(){}_checkForTimeout(r,n){const i=this._spansData.get(n);i&&(r.source==="setTimeout"?i.hrTimeLastTimeout=vr():r.source!=="Promise.then"&&r.source!=="setTimeout"&&(i.hrTimeLastTimeout=void 0))}_allowEventName(r){return this._eventNames.has(r)}_createSpan(r,n){var l,c;const i=r==null?void 0:r.target,s=r==null?void 0:r.type;if(!(i instanceof HTMLElement)||!i.getAttribute||i.hasAttribute("disabled")||!this._allowEventName(s))return;const o=kp(i,!0);try{const a=this.tracer.startSpan(s,{attributes:{[nr]:window.location.href,"event.type":s,"event.tag":i.tagName,"event.xpath":o,"event.id":i.id,"event.classname":i.className,"event.text":(l=i.textContent)!=null?l:"","event.url":window.location.href,"viewport.width":window.innerWidth,"viewport.height":window.innerHeight}},n?we.setSpan(pe.active(),n):void 0);r instanceof MouseEvent&&(a.setAttribute("event.x",r.clientX),a.setAttribute("event.y",r.clientY),a.setAttribute("event.relativeX",r.clientX/window.innerWidth),a.setAttribute("event.relativeY",r.clientY/window.innerHeight),s==="scroll"&&(a.setAttribute("event.scrollX",window.scrollX),a.setAttribute("event.scrollY",window.scrollY)));const h=(c=this._getLDContextKeyAttributes)==null?void 0:c.call(this);return h&&a.setAttributes(h),this._shouldPreventSpanCreation(s,i,a)===!0?void 0:(this._spansData.set(a,{taskCount:0}),a)}catch(a){this._diag.error("failed to start create new user interaction span",a)}}_decrementTask(r){const n=this._spansData.get(r);n&&(n.taskCount--,n.taskCount===0&&this._tryToEndSpan(r,n.hrTimeLastTimeout))}_getCurrentSpan(r){const n=r.get(tx);return n&&we.getSpan(n)}_incrementTask(r){const n=this._spansData.get(r);n&&n.taskCount++}addPatchedListener(r,n,i,s){let o=this._wrappedListeners.get(i);o||(o=new Map,this._wrappedListeners.set(i,o));let l=o.get(n);return l||(l=new Map,o.set(n,l)),l.has(r)?!1:(l.set(r,s),!0)}removePatchedListener(r,n,i){const s=this._wrappedListeners.get(i);if(!s)return;const o=s.get(n);if(!o)return;const l=o.get(r);return l&&(o.delete(r),o.size===0&&(s.delete(n),s.size===0&&this._wrappedListeners.delete(i))),l}_invokeListener(r,n,i){return typeof r=="function"?r.apply(n,i):r.handleEvent(i[0])}_patchAddEventListener(){const r=this;let n=new Map;return i=>function(o,l,c){if(!l)return i.call(this,o,l,c);const a=c&&typeof c=="object"&&c.once,h=function(...u){var m;let f;const d=u[0];if(!(d!=null&&d.type))return r._invokeListener(l,this,u);if(Date.now()-((m=n.get(d.type))!=null?m:0)<1e3/60)return r._invokeListener(l,this,u);n.set(d.type,Date.now()),d&&(f=r._eventsSpanMap.get(d)),a&&r.removePatchedListener(this,o,l);const p=r._createSpan(d,f);return p?(d&&r._eventsSpanMap.set(d,p),pe.with(we.setSpan(pe.active(),p),()=>{const g=r._invokeListener(l,this,u);return p.end(),g})):r._invokeListener(l,this,u)};if(r.addPatchedListener(this,o,l,h))return i.call(this,o,h,c)}}_patchRemoveEventListener(){const r=this;return n=>function(s,o,l){const c=r.removePatchedListener(this,s,o);return c?n.call(this,s,c,l):n.call(this,s,o,l)}}_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 r=this;return n=>function(...s){const o=`${location.pathname}${location.hash}${location.search}`,l=n.apply(this,s),c=`${location.pathname}${location.hash}${location.search}`;return o!==c&&r._updateInteractionName(c),l}}_unpatchHistoryApi(){Ae(history.replaceState)&&this._unwrap(history,"replaceState"),Ae(history.pushState)&&this._unwrap(history,"pushState"),Ae(history.back)&&this._unwrap(history,"back"),Ae(history.forward)&&this._unwrap(history,"forward"),Ae(history.go)&&this._unwrap(history,"go")}_updateInteractionName(r){const n=we.getSpan(pe.active());n&&typeof n.updateName=="function"&&n.updateName(`${rx} ${r}`)}_patchZoneCancelTask(){const r=this;return n=>function(s){const o=Zone.current,l=r._getCurrentSpan(o);return l&&r._shouldCountTask(s,o)&&r._decrementTask(l),n.call(this,s)}}_patchZoneScheduleTask(){const r=this;return n=>function(s){const o=Zone.current,l=r._getCurrentSpan(o);return l&&r._shouldCountTask(s,o)&&(r._incrementTask(l),r._checkForTimeout(s,l)),n.call(this,s)}}_patchZoneRunTask(){const r=this;return n=>function(s,o,l){const c=Array.isArray(l)&&l[0]instanceof Event?l[0]:void 0,a=c==null?void 0:c.target;let h;const u=this;if(a){if(h=r._createSpan(c),h)return r._incrementTask(h),u.run(()=>{try{return pe.with(we.setSpan(pe.active(),h),()=>{const f=Zone.current;return s._zone=f,n.call(f,s,o,l)})}finally{r._decrementTask(h)}})}else h=r._getCurrentSpan(u);try{return n.call(u,s,o,l)}finally{h&&r._shouldCountTask(s,u)&&r._decrementTask(h)}}}_shouldCountTask(r,n){if(r._zone&&(n=r._zone),!n||!r.data||r.data.isPeriodic)return!1;const i=this._getCurrentSpan(n);return!i||!this._spansData.get(i)?!1:r.type==="macroTask"||r.type==="microTask"}_tryToEndSpan(r,n){r&&this._spansData.get(r)&&(r.end(n),this._spansData.delete(r))}enable(){const r=this._getZoneWithPrototype();this._diag.debug("applying patch to",kt.moduleName,kt.version,"zone:",!!r),r?(Ae(r.prototype.runTask)&&(this._unwrap(r.prototype,"runTask"),this._diag.debug("removing previous patch from method runTask")),Ae(r.prototype.scheduleTask)&&(this._unwrap(r.prototype,"scheduleTask"),this._diag.debug("removing previous patch from method scheduleTask")),Ae(r.prototype.cancelTask)&&(this._unwrap(r.prototype,"cancelTask"),this._diag.debug("removing previous patch from method cancelTask")),this._zonePatched=!0,this._wrap(r.prototype,"runTask",this._patchZoneRunTask()),this._wrap(r.prototype,"scheduleTask",this._patchZoneScheduleTask()),this._wrap(r.prototype,"cancelTask",this._patchZoneCancelTask())):(this._zonePatched=!1,this._getPatchableEventTargets().forEach(i=>{Ae(i.addEventListener)&&(this._unwrap(i,"addEventListener"),this._diag.debug("removing previous patch from method addEventListener")),Ae(i.removeEventListener)&&(this._unwrap(i,"removeEventListener"),this._diag.debug("removing previous patch from method removeEventListener")),this._wrap(i,"addEventListener",this._patchAddEventListener()),this._wrap(i,"removeEventListener",this._patchRemoveEventListener())})),this._patchHistoryApi()}disable(){const r=this._getZoneWithPrototype();this._diag.debug("removing patch from",kt.moduleName,kt.version,"zone:",!!r),r&&this._zonePatched?(Ae(r.prototype.runTask)&&this._unwrap(r.prototype,"runTask"),Ae(r.prototype.scheduleTask)&&this._unwrap(r.prototype,"scheduleTask"),Ae(r.prototype.cancelTask)&&this._unwrap(r.prototype,"cancelTask")):this._getPatchableEventTargets().forEach(i=>{Ae(i.addEventListener)&&this._unwrap(i,"addEventListener"),Ae(i.removeEventListener)&&this._unwrap(i,"removeEventListener")}),this._unpatchHistoryApi()}_getZoneWithPrototype(){return window.Zone}};L(kt,"version","0.1.1"),L(kt,"moduleName","user-interaction");let Lc=kt;const ix=e=>{if(typeof XMLHttpRequest=="undefined")return()=>{};const t=XMLHttpRequest.prototype,r=t.open,n=t.setRequestHeader,i=t.send,s=a=>!!a&&e.some(h=>a.toLowerCase().includes(h)),o=function(a,h){return this._method=a,this._url=typeof h=="string"?h:String(h),this._requestHeaders={},this._body=void 0,r.apply(this,arguments)},l=function(a,h){return this._requestHeaders||(this._requestHeaders={}),this._requestHeaders[a]=h,n.apply(this,arguments)},c=function(a){if(this._body===void 0&&a!==void 0&&a!==null&&!s(this._url)){const h=sc(a,this._url);h&&(this._body=h)}return i.apply(this,arguments)};return t.open=o,t.setRequestHeader=l,t.send=c,()=>{t.open===o&&(t.open=r),t.setRequestHeader===l&&(t.setRequestHeader=n),t.send===c&&(t.send=i)}},sx=256*1024,ox=e=>!!e&&e.split(";")[0].trim().toLowerCase()==="multipart/form-data",fg=e=>{if(!e||typeof e!="object")return{};if(typeof Headers!="undefined"&&e instanceof Headers)return Object.fromEntries(e.entries());if(Array.isArray(e))try{return Object.fromEntries(new Headers(e).entries())}catch(t){return Object.fromEntries(e.map(([r,n])=>[String(r),String(n)]))}return x({},e)},Us=e=>Object.prototype.toString.call(e),ax=e=>typeof ArrayBuffer!="undefined"&&e instanceof ArrayBuffer||Us(e)==="[object ArrayBuffer]"||Us(e)==="[object SharedArrayBuffer]",pg=e=>{if(typeof File!="undefined"&&e instanceof File||Us(e)==="[object File]"){const t=e;return`[File name="${t.name}" type="${t.type}" size=${t.size}]`}return`[Blob type="${e.type}" size=${e.size}]`},xc=(e,t,r)=>{const n=e[t];n===void 0?e[t]=r:Array.isArray(n)?n.push(r):e[t]=[n,r]},lx=e=>{const t={};return e.forEach((r,n)=>{xc(t,n,typeof r=="string"?r:pg(r))}),JSON.stringify(t)},cx=e=>{const t=ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e);if(t.byteLength>sx)return`[binary size=${t.byteLength}]`;try{return new TextDecoder("utf-8",{fatal:!0}).decode(t)}catch(r){return`[binary size=${t.byteLength}]`}},mg=e=>{if(e==null)return;switch(typeof e){case"string":return e;case"number":case"boolean":case"bigint":return String(e);case"object":break;default:return}const t=Us(e);if(typeof URLSearchParams!="undefined"&&e instanceof URLSearchParams||t==="[object URLSearchParams]")return e.toString();if(typeof FormData!="undefined"&&e instanceof FormData||t==="[object FormData]")return lx(e);if(typeof Blob!="undefined"&&e instanceof Blob||t==="[object Blob]"||t==="[object File]")return pg(e);if(ax(e)||ArrayBuffer.isView(e))return cx(e);if(!(typeof ReadableStream!="undefined"&&e instanceof ReadableStream||t==="[object ReadableStream]")){if(typeof Document!="undefined"&&e instanceof Document)try{return new XMLSerializer().serializeToString(e)}catch(r){return}try{return Rt(e)}catch(r){return}}},Nc=new WeakMap,ux=e=>Nc.get(e),dx=(e,t)=>z(this,null,function*(){const r=e.getReader(),n=[];let i=0;for(;i<t;){const{done:s,value:o}=yield r.read();if(s)return{chunks:n,byteLength:i,truncated:!1};const l=t-i,c=o.byteLength>l?o.subarray(0,l):o;n.push(c),i+=c.byteLength}return r.cancel().catch(()=>{}),{chunks:n,byteLength:i,truncated:!0}}),hx=({chunks:e,byteLength:t})=>{const r=new Uint8Array(t);let n=0;for(const i of e)r.set(i,n),n+=i.byteLength;return r},fx=e=>{const t=new TextDecoder("utf-8",{fatal:!0});try{let r="";for(const n of e.chunks)r+=t.decode(n,{stream:!0});return e.truncated?r:r+t.decode()}catch(r){return`[binary size${e.truncated?">":"="}${e.byteLength}]`}},Ds=e=>`[multipart/form-data size${e.truncated?">":"="}${e.byteLength}]`,px=(e,t)=>{var i,s,o,l,c,a,h;const r=/;\s*boundary=(?:"([^"]*)"|([^;]*))/i.exec(t),n=(s=(i=r==null?void 0:r[1])!=null?i:r==null?void 0:r[2])==null?void 0:s.trim();if(!n)return Ds(e);try{const u=hx(e),f=new TextDecoder("windows-1252").decode(u),d=`--${n}`,p={};let m=f.indexOf(d);if(m===-1)return Ds(e);for(;m!==-1&&(m+=d.length,!f.startsWith("--",m));){const g=f.indexOf(`\r
|
|
463
463
|
`,m),v=g===-1?-1:f.indexOf(`\r
|
|
464
464
|
\r
|
|
465
|
-
`,g);if(v===-1)break;const y=new TextDecoder().decode(
|
|
466
|
-
${d}`,w),S=_===-1,b=S?f.length:_,R=(o=/\bname="([^"]*)"/i.exec(y))==null?void 0:o[1];if(R!==void 0){const I=(l=/\bfilename="([^"]*)"/i.exec(y))==null?void 0:l[1];if(I!==void 0){const E=(h=(a=(u=/^content-type:[ \t]*(.*)$/im.exec(y))==null?void 0:u[1])==null?void 0:a.trim())!=null?h:"",C=b-w;Zu(p,R,`[File name="${I}" type="${E}" size${S?">=":"="}${C}]`)}else Zu(p,R,new TextDecoder().decode(c.subarray(w,b)))}m=S?-1:_+2}return e.truncated&&Object.keys(p).length===0?Us(e):JSON.stringify(p)}catch(c){return Us(e)}},ux=(e,t)=>{try{if(t&&t.body!==void 0&&t.body!==null)return Promise.resolve(cg(t.body));if(!e.body||e.bodyUsed)return Promise.resolve(void 0);const r=e.clone();if(!r.body)return Promise.resolve(void 0);const n=e.headers.get("content-type");return sx(r.body,su(e.headers)).then(i=>ex(n)?lx(i,n):ax(i)).catch(()=>{})}catch(r){return Promise.resolve(void 0)}},cx=(e=[])=>{if(typeof window=="undefined"||typeof window.fetch!="function"||typeof Request=="undefined")return()=>{};const t=i=>e.some(s=>i.toLowerCase().includes(s)),r=window.fetch,n=function(i,s){return i instanceof Request&&!Lu.has(i)&&!t(i.url)&&Lu.set(i,ux(i,s)),r.call(this!=null?this:window,i,s)};return window.fetch=n,()=>{window.fetch===n&&(window.fetch=r)}};class xu{constructor(t,r){L(this,"debug");L(this,"name");this.debug=t,this.name=r}prefix(){let t=`[${Date.now()}]`;return this.name&&(t+=` - ${this.name}`),t}log(...t){this.debug&&cl(()=>console.log.apply(console,[this.prefix(),...t]))}warn(...t){(this.debug||wf())&&cl(()=>console.warn.apply(console,[this.prefix(),...t]))}}class Nu{constructor(){L(this,"_sdk");L(this,"_isLoaded",!1);L(this,"_callBuffer",[]);L(this,"_capacity",1e5);L(this,"_droppedEvents",0);L(this,"_exceededCapacity",!1);L(this,"_logger",new xu)}_bufferCall(t,r){if(this._isLoaded)try{return this._sdk[t](...r)}catch(n){He(`Error executing buffered call to ${t}:`,"error",n)}else{this._enqueue({method:t,args:r});return}}_enqueue(t){this._callBuffer.length<this._capacity?(this._callBuffer.push(t),this._exceededCapacity=!1):(this._exceededCapacity||(this._exceededCapacity=!0,He("Exceeded event queue capacity. Increase capacity to avoid dropping events.","warn")),this._droppedEvents+=1)}load(t){this._sdk=t,this._isLoaded=!0;for(const{method:r,args:n}of this._callBuffer)try{this._sdk[r](...n)}catch(i){He(`Error executing buffered call to ${r}:`,"error",i)}this._callBuffer=[]}}const Be="feature_flag",dg="launchdarkly",Ou="evaluation",dx=`${Be}.${Ou}`,hg=`${Be}.set.id`,fg=`${Be}.key`,pg=`${Be}.contextKeys`,mg=`${Be}.context.id`,gg=`${Be}.result.value`,Gu=`${Be}.provider.name`,Ds={kind:`${Be}.result.reason.kind`,errorKind:`${Be}.result.reason.errorKind`,ruleIndex:`${Be}.result.reason.ruleIndex`,ruleId:`${Be}.result.reason.ruleId`,prerequisiteKey:`${Be}.result.reason.prerequisiteKey`,inExperiment:`${Be}.result.reason.inExperiment`,bigSegmentsStatus:`${Be}.result.reason.bigSegmentsStatus`},yg=`${Be}.result.variationIndex`,bg=`${dg}.application.id`,vg=`${dg}.application.version`,hx="context.contextKeys",fx="$ld:telemetry:session:init",Sg="$ld:telemetry:track",px="launchdarkly.track",mx="page_view",gx="document_load",yx="result.status";function wg(e){return e.includes("%")||e.includes(":")?e.replace(/%/g,"%25").replace(/:/g,"%3A"):e}function Rg(e){return e.kind==="multi"}function Zr(e){return Rg(e)?Object.keys(e).sort().filter(t=>t!=="kind").map(t=>`${t}:${wg(e[t].key)}`).join(":"):"kind"in e&&e.kind==="user"?e.key:"kind"in e?`${e.kind}:${wg(e.key)}`:e.key}function zn(e){return Rg(e)?Object.keys(e).sort().filter(t=>t!=="kind").map(t=>({[t]:e[t].key})).reduce((t,r)=>x(x({},t),r),{}):"kind"in e?{[e.kind]:e.key}:{user:e.key}}function bx(e,t,r){t.addHook({getMetadata:()=>({name:"highlight.run"}),afterIdentify:(n,i,s)=>{var l,u;const o=B(x({},zn(n.context)),{key:(u=(l=r==null?void 0:r.contextFriendlyName)==null?void 0:l.call(r,n.context))!=null?u:Zr(n.context)});return e.log("LD.identify","INFO",o),s.status==="completed"&&e.identify(o.key,o,"LaunchDarkly"),i},afterEvaluation:(n,i,s)=>{const o=x({[Gu]:"LaunchDarkly",[fg]:n.flagKey,[gg]:JSON.stringify(s.value)},s.variationIndex!==void 0&&s.variationIndex!==null?{[yg]:s.variationIndex}:{});if(s.reason)for(const l in Ds){const u=l,a=s.reason[u];a!=null&&(o[Ds[u]]=a)}return n.context&&(o[pg]=JSON.stringify(zn(n.context)),o[mg]=Zr(n.context)),e.startSpan(Ou,l=>{l&&l.addEvent(dx,o)}),i}})}class vx{constructor(t,r){L(this,"client");L(this,"metadata");this.client=t,this.metadata=r}getHooks(t){return[]}init(t){this.client.track(fx,{sessionID:t})}recordGauge(t,r){}identify(t,r,n={},i){}error(t,r){}track(t,r){const n=r.event;this.client.track(n?`${Sg}:${n}`:Sg,B(x({},r),{sessionID:t}))}}class Fs extends Nu{constructor(r,n){super();L(this,"client");this.client=new vx(r,n)}getHooks(r){return[{getMetadata:()=>({name:"highlight.run/ld"}),afterIdentify:(n,i,s)=>(this.load(this.client),i)}]}init(r){return this._bufferCall("init",[r])}recordGauge(r,n){return this._bufferCall("recordGauge",[r,n])}identify(r,n,i={},s){return this._bufferCall("identify",[r,n,i,s])}error(r,n){return this._bufferCall("error",[r,n])}track(r,n){return this._bufferCall("track",[r,n])}}const Vu=e=>{e(window.location.href);const t=history.pushState;history.pushState=(s=>function(){var l=s.apply(this,arguments);return window.dispatchEvent(new Event("pushstate")),window.dispatchEvent(new Event("locationchange")),l})(history.pushState);const r=history.replaceState;history.replaceState=(s=>function(){var l=s.apply(this,arguments);return window.dispatchEvent(new Event("replacestate")),window.dispatchEvent(new Event("locationchange")),l})(history.replaceState);const n=()=>{window.dispatchEvent(new Event("locationchange"))};window.addEventListener("popstate",n);const i=function(){e(window.location.href)};return window.addEventListener("locationchange",i),()=>{window.removeEventListener("popstate",n),window.removeEventListener("locationchange",i),history.pushState=t,history.replaceState=r}},cn=class cn extends An{constructor(r={}){super(cn.moduleName,cn.version,r);L(this,"_getLDContextKeyAttributes");L(this,"_unlisten");L(this,"_lastUrl","");this._getLDContextKeyAttributes=r.getLDContextKeyAttributes}init(){}enable(){this._lastUrl=window.location.href,this._unlisten=Vu(r=>{var i;const n=this._lastUrl;if(this._lastUrl=r,n!==r)try{const s=this.tracer.startSpan(mx,{attributes:{[nr]:r,"page_view.previous_url":n,"page_view.url":r}}),o=(i=this._getLDContextKeyAttributes)==null?void 0:i.call(this);o&&s.setAttributes(o),s.end()}catch(s){this._diag.error("failed to create page view span",s)}})}disable(){var r;(r=this._unlisten)==null||r.call(this),this._unlisten=void 0}};L(cn,"version","0.1.0"),L(cn,"moduleName","location-change");let ku=cn;const Xu={version:"1.3.1"}.version;let De={},Ht,Js,Lr,xr;const Nr="highlight.record",Sx="highlight.session_id",Hs=new Map,Wu=e=>`${e.spanContext().traceId}:${e.spanContext().spanId}`,_g="launchdarkly.js.log",wx="launchdarkly.exception.id",Tg="launchdarkly.sampling.ratio",Eg="log.severity",Ig="log.message",Cg=(e,t)=>{var g,v,y,w,_,S,b,R,I,E,C,N,G,$;if(De.tracerProvider||De.meterProvider){_e("warn","OTEL already initialized. Skipping...");return}Ht=e,wf()&&Y.setLogger({verbose:(...Z)=>_e("debug",...Z),debug:(...Z)=>_e("debug",...Z),info:(...Z)=>_e("info",...Z),warn:(...Z)=>_e("warn",...Z),error:(...Z)=>_e("error",...Z)},Ne.WARN);const r=e.backendUrl||void 0||"https://pub.highlight.io",n=[...(v=(g=e.networkRecordingOptions)==null?void 0:g.urlBlocklist)!=null?v:[],..._f],i=[r,e.otlpEndpoint].filter(Z=>!!Z).map(Z=>Z.toLowerCase()),s=(y=e.environment)!=null?y:"production",o={url:e.otlpEndpoint+"/v1/traces",concurrencyLimit:10,timeoutMillis:3e4,compression:"gzip",keepAlive:!0,httpAgentOptions:{timeout:6e4,keepAlive:!0}},l=new BL(o,t),u=new Ys(l,{maxExportBatchSize:1024,maxQueueSize:2048,exportTimeoutMillis:o.timeoutMillis,scheduledDelayMillis:5e3}),a=new Un({[iE]:(w=e.serviceName)!=null?w:"highlight-browser",[sE]:e.serviceVersion,"deployment.environment.name":s,"highlight.project_id":e.projectId,[aE]:navigator.userAgent,"browser.language":navigator.language,"telemetry.distro.name":"@highlight-run/observability","telemetry.distro.version":Xu});De.tracerProvider=new XT({resource:a,mergeResourceWithDefaults:!0,spanProcessors:[u]}),we.setGlobalTracerProvider(De.tracerProvider);const h=new zL(B(x({},o),{url:e.otlpEndpoint+"/v1/metrics"})),c=new oZ({exporter:h,exportIntervalMillis:o.timeoutMillis,exportTimeoutMillis:o.timeoutMillis});De.meterProvider=new YZ({resource:a,readers:[c]}),Tl.setGlobalMeterProvider(De.meterProvider);let f=[];if(((_=e.instrumentations)==null?void 0:_["@opentelemetry/instrumentation-document-load"])!==!1&&f.push(new dE({applyCustomAttributesOnSpan:{documentLoad:Og,documentFetch:Og,resourceFetch:Gx}})),((S=e.instrumentations)==null?void 0:S["@opentelemetry/instrumentation-user-interaction"])!==!1&&f.push(new Cu({productAnalyticsEvents:e.productAnalyticsEvents,getLDContextKeyAttributes:e.getLDContextKeyAttributes})),((b=e.productAnalyticsEvents)==null?void 0:b.pageViews)!==!1&&f.push(new ku({getLDContextKeyAttributes:e.getLDContextKeyAttributes})),(R=e.networkRecordingOptions)!=null&&R.enabled){if(((I=e.instrumentations)==null?void 0:I["@opentelemetry/instrumentation-fetch"])!==!1){const W=new ME({propagateTraceHeaderCorsUrls:Vg(e.tracingOrigins),applyCustomAttributesOnSpan:(k,M,P)=>{var de;if(!k.attributes)return;const U=k;if(U.attributes[Nr]===!1)return;const Q=typeof Request!="undefined"&&M instanceof Request,me=Q?ix(M):void 0;xg(k,Q?void 0:M.body,M.headers,e.networkRecordingOptions);const O=()=>q(this,null,function*(){const ve=yield me;ve!==void 0&&Ix(k,ve,M.headers,e.networkRecordingOptions)}),ye=()=>{var ve;return(ve=e.networkRecordingOptions)!=null&&ve.requestResponseSanitizer&&Ng(k,e.networkRecordingOptions.requestResponseSanitizer),U.attributes[Nr]!==!1};if(!(P instanceof Response)){if(k.setAttributes({"http.response.error":P.message,[kp]:P.status}),!ye())return;me&&Hs.set(Wu(k),O().then(()=>{ye()}));return}if(ye()&&(de=e.networkRecordingOptions)!=null&&de.recordHeadersAndBody){const ve=q(this,null,function*(){var te,z,ie,ue,Ce;yield O();const D=yield om(P,(te=e.networkRecordingOptions)==null?void 0:te.bodyKeysToRecord,(z=e.networkRecordingOptions)==null?void 0:z.networkBodyKeysToRedact),F=Object.fromEntries(P.headers.entries()),H=$i((ue=(ie=e.networkRecordingOptions)==null?void 0:ie.networkHeadersToRedact)!=null?ue:[],F,(Ce=e.networkRecordingOptions)==null?void 0:Ce.headerKeysToRecord),j=Mu(H,"http.response.header");Object.assign(k.attributes,x({"http.response.body":D},j)),ye()});Hs.set(Wu(k),ve)}}});f.push(W)}((E=e.instrumentations)==null?void 0:E["@opentelemetry/instrumentation-xml-http-request"])!==!1&&f.push(new lI({propagateTraceHeaderCorsUrls:Vg(e.tracingOrigins),applyCustomAttributesOnSpan:(W,k)=>{var U,Q,me,O;const M=k;if(!(!W.attributes||W.attributes[Nr]===!1)){if(xg(W,M._body,M._requestHeaders,e.networkRecordingOptions),(U=e.networkRecordingOptions)!=null&&U.recordHeadersAndBody){let ye="";(k.responseType===""||k.responseType==="text")&&(ye=xt(k.responseText,(Q=e.networkRecordingOptions)==null?void 0:Q.networkBodyKeysToRedact,(me=e.networkRecordingOptions)==null?void 0:me.bodyKeysToRecord,void 0));const de=Cx(k.getAllResponseHeaders());Nx(W,de,ye,e.networkRecordingOptions)}(O=e.networkRecordingOptions)!=null&&O.requestResponseSanitizer&&Ng(W,e.networkRecordingOptions.requestResponseSanitizer)}}}))}$_({instrumentations:f}),(C=e.networkRecordingOptions)!=null&&C.enabled&&e.networkRecordingOptions.recordHeadersAndBody&&((N=e.instrumentations)==null?void 0:N["@opentelemetry/instrumentation-xml-http-request"])!==!1&&(Lr==null||Lr(),Lr=$L([...n,...i])),(G=e.networkRecordingOptions)!=null&&G.enabled&&e.networkRecordingOptions.recordHeadersAndBody&&(($=e.instrumentations)==null?void 0:$["@opentelemetry/instrumentation-fetch"])!==!1&&(xr==null||xr(),xr=cx([...n,...i]));const m=new xp;return m.enable(),De.tracerProvider.register({contextManager:m,propagator:new jf({propagators:[new Uf,new _x({backendUrl:r,otlpEndpoint:e.otlpEndpoint,tracingOrigins:e.tracingOrigins,urlBlocklist:n})]})}),Js=Rx(l,h,u,()=>De),De},Rx=(e,t,r,n)=>{if(typeof document=="undefined"||typeof window=="undefined")return()=>{};const i=()=>{var u,a;e.setUnloading(!0),t.setUnloading(!0),r.setSkipPendingOnFlush(!0);const l=n();(u=l.tracerProvider)==null||u.forceFlush().catch(()=>{}),(a=l.meterProvider)==null||a.forceFlush().catch(()=>{})},s=()=>{document.visibilityState==="hidden"?i():document.visibilityState==="visible"&&(e.setUnloading(!1),t.setUnloading(!1),r.setSkipPendingOnFlush(!1))},o=()=>i();return document.addEventListener("visibilitychange",s),window.addEventListener("pagehide",o),()=>{document.removeEventListener("visibilitychange",s),window.removeEventListener("pagehide",o)}};class Ys extends Tp{constructor(){super(...arguments);L(this,"_pendingSpans",new Set);L(this,"_skipPendingOnFlush",!1)}setSkipPendingOnFlush(r){this._skipPendingOnFlush=r}onStart(r,n){r.setAttribute(Sx,Dt()),super.onStart(r,n)}onEnd(r){if(r.attributes[Nr]===!1)return;const n=Wu(r),i=Hs.get(n);if(i){const s=i.catch(o=>{_e("warn","[CustomBatchSpanProcessor] Failed to capture response body attributes",o)}).finally(()=>{Hs.delete(n),this._pendingSpans.delete(s),r.attributes[Nr]!==!1&&super.onEnd(r)});this._pendingSpans.add(s);return}super.onEnd(r)}shutdown(){return q(this,null,function*(){return this._skipPendingOnFlush||(yield Promise.allSettled(this._pendingSpans)),vc(Ys.prototype,this,"shutdown").call(this)})}forceFlush(){return q(this,null,function*(){return this._skipPendingOnFlush||(yield Promise.allSettled(this._pendingSpans)),vc(Ys.prototype,this,"forceFlush").call(this)})}}class _x extends ep{constructor(r){super();L(this,"highlightEndpoints");L(this,"tracingOrigins");L(this,"urlBlocklist");this.highlightEndpoints=[r.backendUrl,`${r.otlpEndpoint}/v1/traces`,`${r.otlpEndpoint}/v1/logs`,`${r.otlpEndpoint}/v1/metrics`],this.tracingOrigins=r.tracingOrigins,this.urlBlocklist=r.urlBlocklist}inject(r,n,i){var l;const s=we.getSpan(r);if(!s||!s.attributes)return;const o=kg(s);typeof o=="string"&&(Ox(o,this.highlightEndpoints,this.tracingOrigins,this.urlBlocklist)||s.setAttribute(Nr,!1),!tu(o,(l=this.tracingOrigins)!=null?l:[],this.urlBlocklist))||super.inject(r,n,i)}}const Zg="highlight-browser",Tx=Zg,Bs=()=>{var e;return(e=De.tracerProvider)==null?void 0:e.getTracer(Zg)},or=()=>{var e;return(e=De.meterProvider)==null?void 0:e.getMeter(Tx)},Ex=()=>we.getActiveSpan(),Pu=()=>q(this,null,function*(){Js&&(Js(),Js=void 0),Lr&&(Lr(),Lr=void 0),xr&&(xr(),xr=void 0),yield Promise.allSettled([q(this,null,function*(){De.tracerProvider?(yield De.tracerProvider.shutdown(),De.tracerProvider=void 0):_e("warn","OTEL shutdown called without initialized tracerProvider.")}),q(this,null,function*(){De.meterProvider?(yield De.meterProvider.shutdown(),De.meterProvider=void 0):_e("warn","OTEL shutdown called without initialized meterProvider.")})])}),Lg=e=>{const t=uI(e),r={};return t!=null&&t.name&&(r["graphql.operation.name"]=t.name),t!=null&&t.type&&(r["graphql.operation.type"]=t.type),r},Ix=(e,t,r,n)=>{if(!e.attributes)return;const i=e.attributes;Object.assign(i,Lg(t)),n!=null&&n.recordHeadersAndBody&&Object.assign(i,{"http.request.body":xt(t,n.networkBodyKeysToRedact,n.bodyKeysToRecord,lg(r))})},xg=(e,t,r,n)=>{var h;if(!e.attributes)return;const s=kg(e),o=es(s),l=Tf(o),u=cg(t),a=lg(r);if(e.setAttributes(Lg(u!=null?u:t)),e.setAttributes({"highlight.type":"http.request",[qr]:o,[nr]:o,[Ss]:l.pathname,[oE]:l.search}),e.setAttributes(Zx(l.searchParams,"url.query_params")),n!=null&&n.recordHeadersAndBody){u!==void 0&&e.setAttribute("http.request.body",xt(u,n.networkBodyKeysToRedact,n.bodyKeysToRecord,a));const c=$i((h=n.networkHeadersToRedact)!=null?h:[],a,n.headerKeysToRecord),f=Mu(c,"http.request.header");e.setAttributes(f)}},Cx=e=>{const t={};return e&&e.trim().split(/[\r\n]+/).forEach(r=>{const n=r.split(": "),i=n.shift();i&&(t[i]=n.join(": "))}),t},Mu=(e,t)=>{const r={};return Object.entries(e).forEach(([n,i])=>{const s=n.toLowerCase().replace(/_/g,"-"),o=`${t}.${s}`,l=xx(s,i);if(r[o]){const u=r[o];Array.isArray(u)?r[o]=[...u,...l]:r[o]=[u,...l]}else r[o]=l.length===1?l[0]:l}),r},Zx=(e,t)=>{const r={};for(const[n,i]of e.entries()){const s=`${t}.${n}`,o=r[s];o===void 0?r[s]=i:Array.isArray(o)?o.push(i):r[s]=[o,i]}return r},Lx=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"]),xx=(e,t)=>Lx.has(e)?t.split(",").map(r=>r.trim()).filter(r=>r.length>0):[t],Nx=(e,t,r,n)=>{var o;e.setAttribute("http.response.body",r);const i=$i((o=n.networkHeadersToRedact)!=null?o:[],t,n.headerKeysToRecord),s=Mu(i,"http.response.header");e.setAttributes(s)},Ng=(e,t)=>{var c,f,d,p,m,g,v,y,w,_,S,b;const n=e.attributes,i={},s={};for(const[R,I]of Object.entries(n))R.startsWith("http.request.header.")&&(i[R.slice(20)]=String(I)),R.startsWith("http.response.header.")&&(s[R.slice(21)]=String(I));let l={request:{sessionSecureID:"",id:"",url:(f=(c=n[nr])!=null?c:n[qr])!=null?f:"",verb:(p=(d=n["http.request.method"])!=null?d:n[qT])!=null?p:"GET",headers:i,body:(m=n["http.request.body"])!=null?m:""},response:{status:Number((v=(g=n[kp])!=null?g:n[eE])!=null?v:0),headers:s,body:(y=n["http.response.body"])!=null?y:""},urlBlocked:!1},u=!0;try{l.request.body=JSON.parse(l.request.body)}catch(R){u=!1}let a=!0;try{l.response.body=JSON.parse(l.response.body)}catch(R){a=!1}let h;try{h=t(l)}catch(R){return}if(!h){Object.assign(e.attributes,{[Nr]:!1});return}u&&((w=h.request)!=null&&w.body)&&(h.request.body=JSON.stringify(h.request.body)),a&&((_=h.response)!=null&&_.body)&&(h.response.body=JSON.stringify(h.response.body)),Object.assign(e.attributes,{"http.request.body":(S=h.request.body)!=null?S:"","http.response.body":(b=h.response.body)!=null?b:""})},Ox=(e,t,r,n)=>n!=null&&n.some(s=>e.toLowerCase().includes(s))?!1:Ns(e,t),Og=e=>{var s,o,l;if(!e.events)return;const r=e.events,n={unload:gt("unloadEventStart","unloadEventEnd",r),dom_interactive:gt("fetchStart","domInteractive",r),dom_content_loaded:gt("domContentLoadedEventStart","domContentLoadedEventEnd",r),dom_complete:gt("fetchStart","domComplete",r),load_event:gt("loadEventStart","loadEventEnd",r),document_load:gt("fetchStart","loadEventEnd",r),first_paint:gt("fetchStart","firstPaint",r),first_contentful_paint:gt("fetchStart","firstContentfulPaint",r),domain_lookup:gt("domainLookupStart","domainLookupEnd",r),connect:gt("connectStart","connectEnd",r),request:gt("requestStart","requestEnd",r),response:gt("responseStart","responseEnd",r)},i=(o=(s=Ht==null?void 0:Ht.getIntegrations)==null?void 0:s.call(Ht))!=null?o:[];if(n.document_load!==void 0)for(const u of i)u.recordGauge((l=Ht==null?void 0:Ht.sessionSecureId)!=null?l:"",{name:gx,value:n.document_load/1e6});Object.entries(n).forEach(([u,a])=>{a!==void 0&&(e.setAttribute(`timings.${u}.ns`,a),e.setAttribute(`timings.${u}.readable`,Gg(a)))})};function gt(e,t,r){const n=r.find(l=>l.name===e),i=r.find(l=>l.name===t);if(!n||!i)return;const s=n.time[0]*1e9+n.time[1];return i.time[0]*1e9+i.time[1]-s}const Gx=(e,t)=>{const r={domain_lookup:(t.domainLookupEnd-t.domainLookupStart)*1e6,connect:(t.connectEnd-t.connectStart)*1e6,request:(t.responseEnd-t.requestStart)*1e6,response:(t.responseEnd-t.responseStart)*1e6};Object.entries(r).forEach(([n,i])=>{e.setAttribute(`timings.${n}.ns`,i),e.setAttribute(`timings.${n}.readable`,Gg(i))})},Gg=e=>{if(e>=36e11){const o=e/36e11;return`${Number(o.toFixed(1))}h`}else if(e>=6e10){const o=e/6e10;return`${Number(o.toFixed(1))}m`}else if(e>=1e9){const o=e/1e9;return`${Number(o.toFixed(1))}s`}else if(e>=1e6){const o=e/1e6;return`${Number(o.toFixed(1))}ms`}else if(e>=1e3){const o=e/1e3;return`${Number(o.toFixed(1))}µs`}else return`${Number(e.toFixed(1))}ns`},Vg=e=>e===!0?[/localhost/,/^\//,rm(window.location.host)]:Array.isArray(e)?e.map(t=>typeof t=="string"?new RegExp(t):t):/^$/,kg=e=>e.attributes[nr]?e.attributes[nr]:e.attributes[qr],Vx=(e,t,r)=>{const n=window._highlightWebSocketRequestCallback;window._highlightWebSocketRequestCallback=e;const i=window._highlightWebSocketEventCallback;return window._highlightWebSocketEventCallback=s=>{const c=s,{message:o,size:l}=c,u=nt(c,["message","size"]),h=r.some(f=>s.name.toLowerCase().includes(f))?u:s;t(h)},()=>{window._highlightWebSocketRequestCallback=n,window._highlightWebSocketEventCallback=i}},kx=({xhrCallback:e,fetchCallback:t,webSocketRequestCallback:r,webSocketEventCallback:n,disableWebSocketRecording:i,bodyKeysToRedact:s,highlightEndpoints:o,tracingOrigins:l,urlBlocklist:u,bodyKeysToRecord:a})=>{const h=kI(e,o,l,u,s,a),c=AI(t,o,l,u,s,a),f=i?()=>{}:Vx(r,n,u);return()=>{h(),c(),f()}};class Yt{constructor(t){L(this,"disableConsoleRecording");L(this,"reportConsoleErrors");L(this,"enablePromisePatch");L(this,"consoleMethodsToRecord");L(this,"listeners");L(this,"errors");L(this,"messages");L(this,"options");L(this,"hasNetworkRecording",!0);L(this,"disableNetworkRecording");L(this,"enableRecordingNetworkContents");L(this,"xhrNetworkContents");L(this,"fetchNetworkContents");L(this,"disableRecordingWebSocketContents");L(this,"webSocketNetworkContents");L(this,"webSocketEventContents");L(this,"tracingOrigins");L(this,"networkHeadersToRedact");L(this,"networkBodyKeysToRedact");L(this,"networkBodyKeysToRecord");L(this,"networkHeaderKeysToRecord");L(this,"lastNetworkRequestTimestamp");L(this,"urlBlocklist");L(this,"highlightEndpoints");L(this,"requestResponseSanitizer");var r,n;this.options=t,this.disableConsoleRecording=!!t.disableConsoleRecording,this.reportConsoleErrors=(r=t.reportConsoleErrors)!=null?r:!1,this.enablePromisePatch=(n=t.enablePromisePatch)!=null?n:!1,this.consoleMethodsToRecord=t.consoleMethodsToRecord||[...nl],this.listeners=[],this.errors=[],this.messages=[],this.lastNetworkRequestTimestamp=0}isListening(){return this.listeners.length>0}startListening(){if(this.isListening())return;const t=this;this.disableConsoleRecording||this.listeners.push(If(r=>{var n,i,s;if(this.reportConsoleErrors&&(r.type==="Error"||r.type==="error")&&r.value&&r.trace){const o=Rt(r.value);if(pl.includes(o)||ml.some(l=>o.includes(l)))return;t.errors.push({event:o,type:"console.error",url:window.location.href,source:(n=r.trace[0])!=null&&n.fileName?r.trace[0].fileName:"",lineNumber:(i=r.trace[0])!=null&&i.lineNumber?r.trace[0].lineNumber:0,columnNumber:(s=r.trace[0])!=null&&s.columnNumber?r.trace[0].columnNumber:0,stackTrace:r.trace,timestamp:new Date().toISOString(),id:In()})}t.messages.push(r)},B(x({},Ef),{level:this.consoleMethodsToRecord,recordLaunchDarklySdkLogs:this.options.recordLaunchDarklySdkLogs}))),this.listeners.push(Zf(r=>{pl.includes(r.event)||ml.some(n=>r.event.includes(n))||t.errors.push(r)},{enablePromisePatch:this.enablePromisePatch})),this.listeners.push(Pu),Yt.setupNetworkListener(this,this.options)}stopListening(){this.listeners.forEach(t=>t()),this.listeners=[]}static setupNetworkListener(t,r){var s,o,l,u,a,h,c,f,d,p,m,g;const n=(r==null?void 0:r.backendUrl)||void 0||"https://pub.highlight.io",i=r.otlpEndpoint||"https://otel.highlight.io";t.highlightEndpoints=[n,`${i}/v1/traces`,`${i}/v1/logs`,`${i}/v1/metrics`],t.xhrNetworkContents=[],t.fetchNetworkContents=[],t.webSocketNetworkContents=[],t.webSocketEventContents=[],t.networkHeadersToRedact=[],t.urlBlocklist=[],t.tracingOrigins=r.tracingOrigins||[],(r==null?void 0:r.disableNetworkRecording)!==void 0?(t.disableNetworkRecording=r==null?void 0:r.disableNetworkRecording,t.enableRecordingNetworkContents=!1,t.disableRecordingWebSocketContents=!0,t.networkHeadersToRedact=[],t.networkBodyKeysToRedact=[],t.urlBlocklist=[],t.networkBodyKeysToRecord=[]):typeof(r==null?void 0:r.networkRecording)=="boolean"?(t.disableNetworkRecording=!r.networkRecording,t.enableRecordingNetworkContents=!1,t.disableRecordingWebSocketContents=!0,t.networkHeadersToRedact=[],t.networkBodyKeysToRedact=[],t.urlBlocklist=[]):(((s=r.networkRecording)==null?void 0:s.enabled)!==void 0?t.disableNetworkRecording=!r.networkRecording.enabled:t.disableNetworkRecording=!1,t.enableRecordingNetworkContents=((o=r.networkRecording)==null?void 0:o.recordHeadersAndBody)||!1,t.disableRecordingWebSocketContents=((l=r.networkRecording)==null?void 0:l.disableWebSocketEventRecordings)||!1,t.networkHeadersToRedact=((a=(u=r.networkRecording)==null?void 0:u.networkHeadersToRedact)==null?void 0:a.map(v=>v.toLowerCase()))||[],t.networkBodyKeysToRedact=((c=(h=r.networkRecording)==null?void 0:h.networkBodyKeysToRedact)==null?void 0:c.map(v=>v.toLowerCase()))||[],t.urlBlocklist=((d=(f=r.networkRecording)==null?void 0:f.urlBlocklist)==null?void 0:d.map(v=>v.toLowerCase()))||[],t.urlBlocklist=[...t.urlBlocklist,..._f],t.requestResponseSanitizer=(p=r.networkRecording)==null?void 0:p.requestResponseSanitizer,t.networkHeaderKeysToRecord=(m=r.networkRecording)==null?void 0:m.headerKeysToRecord,t.networkHeaderKeysToRecord&&(t.networkHeadersToRedact=[],t.networkHeaderKeysToRecord=t.networkHeaderKeysToRecord.map(v=>v.toLocaleLowerCase())),t.networkBodyKeysToRecord=(g=r.networkRecording)==null?void 0:g.bodyKeysToRecord,t.networkBodyKeysToRecord&&(t.networkBodyKeysToRedact=[],t.networkBodyKeysToRecord=t.networkBodyKeysToRecord.map(v=>v.toLocaleLowerCase()))),!t.disableNetworkRecording&&t.enableRecordingNetworkContents&&(t.hasNetworkRecording=!0,t.listeners.push(kx({xhrCallback:v=>{t.xhrNetworkContents.push(v)},fetchCallback:v=>{t.fetchNetworkContents.push(v)},webSocketRequestCallback:v=>{t.webSocketNetworkContents&&t.webSocketNetworkContents.push(v)},webSocketEventCallback:v=>{t.webSocketEventContents.push(v)},disableWebSocketRecording:t.disableRecordingWebSocketContents,bodyKeysToRedact:t.networkBodyKeysToRedact,highlightEndpoints:t.highlightEndpoints,tracingOrigins:t.tracingOrigins,urlBlocklist:t.urlBlocklist,bodyKeysToRecord:t.networkBodyKeysToRecord})))}static getRecordedNetworkResources(t,r){var s,o;let n=[],i=[];if(!t.disableNetworkRecording){const l=((s=window==null?void 0:window.performance)==null?void 0:s.timeOrigin)||0;n=performance.getEntriesByType("resource");const u=(r-l)*2;if(n=n.filter(a=>a.responseEnd<t.lastNetworkRequestTimestamp?!1:Ns(a.name,t.highlightEndpoints)).map(a=>B(x({},a.toJSON()),{offsetStartTime:a.startTime-u,offsetResponseEnd:a.responseEnd-u,offsetFetchStart:a.fetchStart-u})),t.lastNetworkRequestTimestamp=((o=n.at(-1))==null?void 0:o.responseEnd)||t.lastNetworkRequestTimestamp,t.enableRecordingNetworkContents){const a={headersToRedact:t.networkHeadersToRedact,headersToRecord:t.networkHeaderKeysToRecord,requestResponseSanitizer:t.requestResponseSanitizer};n=tm(n,t.xhrNetworkContents,"xmlhttprequest",a),n=tm(n,t.fetchNetworkContents,"fetch",a)}}return t.disableRecordingWebSocketContents||(i=t.webSocketNetworkContents||[]),[...n,...i]}static getRecordedWebSocketEvents(t){let r=[];return!t.disableNetworkRecording&&!t.disableRecordingWebSocketContents&&(r=t.webSocketEventContents),r}static clearRecordedNetworkResources(t){t.disableNetworkRecording||(t.xhrNetworkContents=[],t.fetchNetworkContents=[],t.webSocketNetworkContents=[],t.webSocketEventContents=[],performance.clearResourceTimings())}}const Xg=(e,t,r)=>{switch(e){case"strict":return[!0,void 0];case"default":return[!0,void 0];case"none":return[!!t,B(x({},r),{password:!0})]}},Wg=(e,t)=>e==="strict"?"strict":(t!=null?t:e==="default")?"default":"none";let yt,Au;function Pg(e,t){return e.nodeType,Node.ELEMENT_NODE,Hu(e);return Xx(e,t)}function Uu(e){if(e.id.length)return`#${e.id}`;if(e.classList.length){let t=[];for(const r of e.classList)t.push(`.${r}`);return`${e.nodeName.toLowerCase()}${t.join(",")}`}return e.nodeName.toLowerCase()}function Xx(e,t){if(e.tagName.toLowerCase()==="html")return"html";try{const r={root:document.body,idName:i=>!0,className:i=>!0,tagName:i=>!0,attr:(i,s)=>!1,seedMinLength:1,optimizedMinLength:2,threshold:50,maxNumberOfTries:1e3,optimized:!0};yt=x(x({},r),t),Au=Wx(yt.root,r);let n=Du(e,0,()=>Du(e,1,()=>Du(e,2)));if(n){if(yt.optimized){const i=Fg(Jg(n,e));i.length>0&&(n=i[0])}return zs(n)}else return Hu(e)}catch(r){return Hu(e)}}function Wx(e,t){return e.nodeType===Node.DOCUMENT_NODE?e:e===t.root?e.ownerDocument:e}function Du(e,t,r){let n=null,i=[],s=e,o=0;for(;s&&s!==yt.root.parentElement;){let l=Ks(Px(s))||Ks(...Mx(s))||Ks(...Ax(s))||Ks(Ux(s))||[Dx()];const u=Fx(s);if(t===0)u&&(l=l.concat(l.filter(Ju).map(a=>Fu(a,u))));else if(t===1)l=l.slice(0,1),u&&(l=l.concat(l.filter(Ju).map(a=>Fu(a,u))));else if(t===2){const[a]=l=l.slice(0,1);u&&Ju(a)&&(l=[Fu(a,u)])}for(let a of l)a.level=o;if(i.push(l),i.length>=yt.seedMinLength&&(n=Mg(i,r),n))break;s=s.parentElement,o++}return n||(n=Mg(i,r)),n}function Mg(e,t){const r=Fg(Dg(e));if(r.length>yt.threshold)return t?t():null;for(let n of r)if(Ug(n))return n;return null}function zs(e){let t=e[0],r=t.name;for(let n=1;n<e.length;n++){const i=e[n].level||0;t.level===i-1?r=`${e[n].name} > ${r}`:r=`${e[n].name} ${r}`,t=e[n]}return r}function Ag(e){return e.map(t=>t.penalty).reduce((t,r)=>t+r,0)}function Ug(e){switch(Au.querySelectorAll(zs(e)).length){case 0:return!0;case 1:return!0;default:return!1}}function Px(e){const t=e.getAttribute("id");return t&&yt.idName(t)?{name:"#"+js(t,{isIdentifier:!0}),penalty:0}:null}function Mx(e){return Array.from(e.attributes).filter(r=>yt.attr(r.name,r.value)).map(r=>({name:"["+js(r.name,{isIdentifier:!0})+'="'+js(r.value)+'"]',penalty:.5}))}function Ax(e){return Array.from(e.classList).filter(yt.className).map(r=>({name:"."+js(r,{isIdentifier:!0}),penalty:1}))}function Ux(e){const t=e.tagName.toLowerCase();return yt.tagName(t)?{name:t,penalty:2}:null}function Dx(){return{name:"*",penalty:3}}function Fx(e){const t=e.parentNode;if(!t)return null;let r=t.firstChild;if(!r)return null;let n=0;for(;r&&(r.nodeType===Node.ELEMENT_NODE&&n++,r!==e);)r=r.nextSibling;return n}function Fu(e,t){return{name:e.name+`:nth-child(${t})`,penalty:e.penalty+1}}function Ju(e){return e.name!=="html"&&!e.name.startsWith("#")}function Ks(...e){const t=e.filter(Jx);return t.length>0?t:null}function Jx(e){return e!=null}function*Dg(e,t=[]){if(e.length>0)for(let r of e[0])yield*Sc(Dg(e.slice(1,e.length),t.concat(r)));else yield t}function Fg(e){return Array.from(e).sort((t,r)=>Ag(t)-Ag(r))}function*Jg(e,t,r={counter:0,visited:new Map}){if(e.length>2&&e.length>yt.optimizedMinLength)for(let n=1;n<e.length-1;n++){if(r.counter>yt.maxNumberOfTries)return;r.counter+=1;const i=[...e];i.splice(n,1);const s=zs(i);if(r.visited.has(s))return;Ug(i)&&Hx(i,t)&&(yield i,r.visited.set(s,!0),yield*Sc(Jg(i,t,r)))}}function Hx(e,t){return Au.querySelector(zs(e))===t}const Yx=/[ -,\.\/:-@\[-\^`\{-~]/,Bx=/[ -,\.\/:-@\[\]\^`\{-~]/,zx=/(^|\\+)?(\\[A-F0-9]{1,6})\x20(?![a-fA-F0-9\x20])/g,Kx={escapeEverything:!1,isIdentifier:!1,quotes:"single",wrap:!1};function js(e,t={}){const r=x(x({},Kx),t);r.quotes!="single"&&r.quotes!="double"&&(r.quotes="single");const n=r.quotes=="double"?'"':"'",i=r.isIdentifier,s=e.charAt(0);let o="",l=0;const u=e.length;for(;l<u;){const a=e.charAt(l++);let h=a.charCodeAt(0),c;if(h<32||h>126){if(h>=55296&&h<=56319&&l<u){const f=e.charCodeAt(l++);(f&64512)==56320?h=((h&1023)<<10)+(f&1023)+65536:l--}c="\\"+h.toString(16).toUpperCase()+" "}else r.escapeEverything?Yx.test(a)?c="\\"+a:c="\\"+h.toString(16).toUpperCase()+" ":/[\t\n\f\r\x0B]/.test(a)?c="\\"+h.toString(16).toUpperCase()+" ":a=="\\"||!i&&(a=='"'&&n==a||a=="'"&&n==a)||i&&Bx.test(a)?c="\\"+a:c=a;o+=c}return i&&(/^-[-\d]/.test(o)?o="\\-"+o.slice(1):/\d/.test(s)&&(o="\\3"+s+" "+o.slice(1))),o=o.replace(zx,function(a,h,c){return h&&h.length%2?a:(h||"")+c}),!i&&r.wrap?n+o+n:o}const Hu=e=>{let t="";const r=e.getAttribute("class"),n=e.getAttribute("id");return n&&(t=t.concat(Hg(n,"#"))),r&&(t=t.concat(Hg(r,"."))),t===""&&(t=t.concat(e.tagName.toLowerCase())),t},Hg=(e,t)=>`${t}${e.trim().split(" ").join(t)}`,Yg=e=>{const t=n=>{if(n.target){const i=n.target,s=Pg(i);e(s,n)}},r={capture:!0};return window.addEventListener("click",t,r),()=>window.removeEventListener("click",t,r)},Bg=e=>{const t=r=>{if(r.target){const n=Pg(r.target);e(n)}};return window.addEventListener("focusin",t),()=>window.removeEventListener("focusin",t)},jx=30,Qx=()=>new Promise(e=>requestAnimationFrame(t=>requestAnimationFrame(r=>e(r-t)))),$x=()=>q(this,null,function*(){const e=[];for(let t=0;t<jx;t++)e.push(yield Qx());return e.reduce((t,r)=>t+r,0)/e.length}),zg=(e,t)=>{let r={},n=16.666666666666668;$x().then(u=>n=u);const i=u=>{var a;r!=null&&r.event||(r={event:u,location:window.location.href,timerStart:(a=window.performance)==null?void 0:a.now()},window.requestAnimationFrame(s))},s=()=>{if(!(r!=null&&r.timerStart))return;const u=window.performance.now()-r.timerStart-n;o(u),r={}},o=u=>{const a=(new Date().getTime()-t)/1e3;e({relativeTimestamp:a,jankAmount:u,querySelector:l(),newLocation:window.location.href!=r.location?window.location.href:void 0})},l=()=>{var u;return(u=r==null?void 0:r.event)!=null&&u.target?Uu(r.event.target):""};return window.addEventListener("click",i,!0),window.addEventListener("keydown",i,!0),()=>{window.removeEventListener("keydown",i,!0),window.removeEventListener("click",i,!0)}},Kg=e=>{let t,r;if(typeof document.hidden!="undefined"?(t="hidden",r="visibilitychange"):typeof document.msHidden!="undefined"?(t="msHidden",r="msvisibilitychange"):typeof document.webkitHidden!="undefined"&&(t="webkitHidden",r="webkitvisibilitychange"),r===void 0)return()=>{};if(t===void 0)return()=>{};const n=t,i=()=>{const o=document[n];e(!!o)};document.addEventListener(r,i);const s=r;return()=>document.removeEventListener(s,i)},jg=typeof window!="undefined"&&"performance"in window&&"memory"in performance?performance:{memory:{}},Qg=(e,t)=>{let r=0,n=0;const i=()=>{const h=(new Date().getTime()-t)/1e3,c=jg.memory.jsHeapSizeLimit||0,f=jg.memory.usedJSHeapSize||0;e({jsHeapSizeLimit:c,usedJSHeapSize:f,relativeTimestamp:h,fps:r})};i();let s;s=setInterval(()=>{i()},1e3);let o=0,l=Date.now();const u=function(){var a=Date.now();o++,a>1e3+l&&(r=Math.round(o*1e3/(a-l)),o=0,l=a),n=requestAnimationFrame(u)};return u(),()=>{clearInterval(s),cancelAnimationFrame(n)}},$g=e=>{e(window.location.href);var t=XMLHttpRequest.prototype.send;XMLHttpRequest.prototype.send=function(s){setTimeout(()=>{var l;var o;try{o=JSON.parse((l=s==null?void 0:s.toString())!=null?l:"")}catch(u){return}(o.type==="track"||o.type==="identify")&&Yu(o)&&e(o)},100),t.call(this,s)};const r=s=>{if(s.key==="ajs_user_id"||s.key==="ajs_anonymous_id"||s.key==="ajs_user_traits"){const{userId:o,userTraits:l}=qg();if(o){let u={};l&&(u=JSON.parse(l));const a={type:"identify",userId:o.toString(),traits:u};Yu(a)&&e(a)}}},{userId:n,userTraits:i}=qg();if(n){let s={};i&&(s=JSON.parse(i));const o={type:"identify",userId:n.toString(),traits:s};Yu(o)&&e(o)}return window.addEventListener("storage",r),wI(({keyName:s})=>{r({key:s})}),()=>{window.removeEventListener("storage",r),XMLHttpRequest.prototype.send=t}},qg=()=>{const e=Ye("ajs_user_id"),t=Ye("ajs_user_traits"),r=Ye("ajs_anonymous_id");return{userId:e,userTraits:t,anonymousId:r}},Yu=e=>{if(!e)return!1;let t="";try{t=JSON.stringify(e)}catch(i){return!1}const r=qx(t),n=Ye(Ge.SEGMENT_LAST_SENT_HASH_KEY);return n===void 0||r!==n?(pt(Ge.SEGMENT_LAST_SENT_HASH_KEY,r),!0):!1},qx=e=>{var t=0,r=e.length,n=0;if(r>0)for(;n<r;)t=(t<<5)-t+e.charCodeAt(n++)|0;return t.toString()},ey=(e,t)=>{const r=eN(e);let n=[];const i=!1,s=!0,o=[];for(let u=0;u<r.length;u++){let a=r[u].split("+");n=[],a.length>1&&(n=nN(ry,a)),a=a[a.length-1],a=a==="*"?"*":rN(a),a in Ct||(Ct[a]=[]);const h={mods:n,shortcut:r[u],key:r[u],method:t,keyup:i,keydown:s,scope:"all",splitKey:"+"};Ct[a].push(h),o.push({key:a,handler:h})}const l=u=>oN(u);return iN(document,"keydown",l),()=>{document.removeEventListener("keydown",l);for(const{key:u,handler:a}of o){const h=Ct[u],c=h?h.indexOf(a):-1;c>-1&&h.splice(c,1)}}};let Qe=[];function eN(e){typeof e!="string"&&(e=""),e=e.replace(/\s/g,"");const t=e.split(",");let r=t.lastIndexOf("");for(;r>=0;)t[r-1]+=",",t.splice(r,1),r=t.lastIndexOf("");return t}const Ct={},Bu=typeof navigator!="undefined"?navigator.userAgent.toLowerCase().indexOf("firefox")>0:!1,tN={backspace:8,tab:9,clear:12,enter:13,return:13,esc:27,escape:27,space:32,left:37,up:38,right:39,down:40,del:46,delete:46,ins:45,insert:45,home:36,end:35,pageup:33,pagedown:34,capslock:20,num_0:96,num_1:97,num_2:98,num_3:99,num_4:100,num_5:101,num_6:102,num_7:103,num_8:104,num_9:105,num_multiply:106,num_add:107,num_enter:108,num_subtract:109,num_decimal:110,num_divide:111,"⇪":20,",":188,".":190,"/":191,"`":192,"-":Bu?173:189,"=":Bu?61:187,";":Bu?59:186,"'":222,"[":219,"]":221,"\\":220},ty={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey",shiftKey:16,ctrlKey:17,altKey:18,metaKey:91},$e={16:!1,18:!1,17:!1,91:!1},ry={"⇧":16,shift:16,"⌥":18,alt:18,option:18,"⌃":17,ctrl:17,control:17,"⌘":91,cmd:91,command:91},rN=e=>tN[e.toLowerCase()]||ry[e.toLowerCase()]||e.toUpperCase().charCodeAt(0);function nN(e,t){const r=t.slice(0,t.length-1);for(let n=0;n<r.length;n++)r[n]=e[r[n].toLowerCase()];return r}function iN(e,t,r){e.addEventListener?e.addEventListener(t,r,!1):e.attachEvent&&e.attachEvent(`on${t}`,()=>{r(window.event)})}function sN(e,t,r){let n;if(t.scope===r||t.scope==="all"){n=t.mods.length>0;for(const i in $e)Object.prototype.hasOwnProperty.call($e,i)&&(!$e[i]&&t.mods.indexOf(+i)>-1||$e[i]&&t.mods.indexOf(+i)===-1)&&(n=!1);(t.mods.length===0&&!$e[16]&&!$e[18]&&!$e[17]&&!$e[91]||n||t.shortcut==="*")&&t.method(e,t)===!1&&(e.preventDefault?e.preventDefault():e.returnValue=!1,e.stopPropagation&&e.stopPropagation(),e.cancelBubble&&(e.cancelBubble=!0))}}function oN(e){const t=Ct["*"];let r=e.keyCode||e.which||e.charCode;if((r===93||r===224)&&(r=91),Qe.indexOf(r)===-1&&r!==229&&Qe.push(r),["ctrlKey","altKey","shiftKey","metaKey"].forEach(n=>{const i=ty[n];e[n]&&Qe.indexOf(i)===-1?Qe.push(i):!e[n]&&Qe.indexOf(i)>-1?Qe.splice(Qe.indexOf(i),1):n==="metaKey"&&e[n]&&Qe.length===3&&(e.ctrlKey||e.shiftKey||e.altKey||(Qe=Qe.slice(Qe.indexOf(i))))}),!(r in $e&&($e[r]=!0,!t))){for(const n in $e)Object.prototype.hasOwnProperty.call($e,n)&&($e[n]=e[ty[n]]);if(e.getModifierState&&!(e.altKey&&!e.ctrlKey)&&e.getModifierState("AltGraph")&&(Qe.indexOf(17)===-1&&Qe.push(17),Qe.indexOf(18)===-1&&Qe.push(18),$e[17]=!0,$e[18]=!0),r in Ct){for(let n=0;n<Ct[r].length;n++)if((e.type==="keydown"&&Ct[r][n].keydown||e.type==="keyup"&&Ct[r][n].keyup)&&Ct[r][n].key){const i=Ct[r][n];sN(e,i,"all")}}}}const zu=e=>{let t;const n=()=>{clearTimeout(t),t=setTimeout(()=>{var i,s;e({height:window.innerHeight,width:window.innerWidth,availHeight:window.screen.availHeight,availWidth:window.screen.availWidth,colorDepth:window.screen.colorDepth,pixelDepth:window.screen.pixelDepth,orientation:(s=(i=window.screen.orientation)==null?void 0:i.angle)!=null?s:0})},500)};return window.addEventListener("resize",n),n(),()=>window.removeEventListener("resize",n)};var ar,Kn,ny,Qs,Ku,nn=function(){return window.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]},jn=function(e){if(document.readyState==="loading")return"loading";var t=nn();if(t){if(e<t.domInteractive)return"loading";if(t.domContentLoadedEventStart===0||e<t.domContentLoadedEventStart)return"dom-interactive";if(t.domComplete===0||e<t.domComplete)return"dom-content-loaded"}return"complete"},aN=function(e){var t=e.nodeName;return e.nodeType===1?t.toLowerCase():t.toUpperCase().replace(/^#/,"")},$s=function(e,t){var r="";try{for(;e&&e.nodeType!==9;){var n=e,i=n.id?"#"+n.id:aN(n)+(n.classList&&n.classList.value&&n.classList.value.trim()&&n.classList.value.trim().length?"."+n.classList.value.trim().replace(/\s+/g,"."):"");if(r.length+i.length>99)return r||i;if(r=r?i+">"+r:i,n.id)break;e=n.parentNode}}catch(s){}return r},iy=-1,sy=function(){return iy},Or=function(e){addEventListener("pageshow",function(t){t.persisted&&(iy=t.timeStamp,e(t))},!0)},qs=function(){var e=nn();return e&&e.activationStart||0},bt=function(e,t){var r=nn(),n="navigate";return sy()>=0?n="back-forward-cache":r&&(document.prerendering||qs()>0?n="prerender":document.wasDiscarded?n="restore":r.type&&(n=r.type.replace(/_/g,"-"))),{name:e,value:t===void 0?-1:t,rating:"good",delta:0,entries:[],id:"v3-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:n}},sn=function(e,t,r){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var n=new PerformanceObserver(function(i){Promise.resolve().then(function(){t(i.getEntries())})});return n.observe(Object.assign({type:e,buffered:!0},r||{})),n}}catch(i){}},vt=function(e,t,r,n){var i,s;return function(o){t.value>=0&&(o||n)&&((s=t.value-(i||0))||i===void 0)&&(i=t.value,t.delta=s,t.rating=function(l,u){return l>u[1]?"poor":l>u[0]?"needs-improvement":"good"}(t.value,r),e(t))}},ju=function(e){requestAnimationFrame(function(){return requestAnimationFrame(function(){return e()})})},eo=function(e){var t=function(r){r.type!=="pagehide"&&document.visibilityState!=="hidden"||e(r)};addEventListener("visibilitychange",t,!0),addEventListener("pagehide",t,!0)},Qu=function(e){var t=!1;return function(r){t||(e(r),t=!0)}},on=-1,oy=function(){return document.visibilityState!=="hidden"||document.prerendering?1/0:0},to=function(e){document.visibilityState==="hidden"&&on>-1&&(on=e.type==="visibilitychange"?e.timeStamp:0,lN())},ay=function(){addEventListener("visibilitychange",to,!0),addEventListener("prerenderingchange",to,!0)},lN=function(){removeEventListener("visibilitychange",to,!0),removeEventListener("prerenderingchange",to,!0)},$u=function(){return on<0&&(on=oy(),ay(),Or(function(){setTimeout(function(){on=oy(),ay()},0)})),{get firstHiddenTime(){return on}}},Qn=function(e){document.prerendering?addEventListener("prerenderingchange",function(){return e()},!0):e()},ly=[1800,3e3],uy=function(e,t){t=t||{},Qn(function(){var r,n=$u(),i=bt("FCP"),s=sn("paint",function(o){o.forEach(function(l){l.name==="first-contentful-paint"&&(s.disconnect(),l.startTime<n.firstHiddenTime&&(i.value=Math.max(l.startTime-qs(),0),i.entries.push(l),r(!0)))})});s&&(r=vt(e,i,ly,t.reportAllChanges),Or(function(o){i=bt("FCP"),r=vt(e,i,ly,t.reportAllChanges),ju(function(){i.value=performance.now()-o.timeStamp,r(!0)})}))})},cy=[.1,.25],uN=function(e,t){(function(r,n){n=n||{},uy(Qu(function(){var i,s=bt("CLS",0),o=0,l=[],u=function(h){h.forEach(function(c){if(!c.hadRecentInput){var f=l[0],d=l[l.length-1];o&&c.startTime-d.startTime<1e3&&c.startTime-f.startTime<5e3?(o+=c.value,l.push(c)):(o=c.value,l=[c])}}),o>s.value&&(s.value=o,s.entries=l,i())},a=sn("layout-shift",u);a&&(i=vt(r,s,cy,n.reportAllChanges),eo(function(){u(a.takeRecords()),i(!0)}),Or(function(){o=0,s=bt("CLS",0),i=vt(r,s,cy,n.reportAllChanges),ju(function(){return i()})}),setTimeout(i,0))}))})(function(r){(function(n){if(n.entries.length){var i=n.entries.reduce(function(l,u){return l&&l.value>u.value?l:u});if(i&&i.sources&&i.sources.length){var s=(o=i.sources).find(function(l){return l.node&&l.node.nodeType===1})||o[0];if(s)return void(n.attribution={largestShiftTarget:$s(s.node),largestShiftTime:i.startTime,largestShiftValue:i.value,largestShiftSource:s,largestShiftEntry:i,loadState:jn(i.startTime)})}}var o;n.attribution={}})(r),e(r)},t)},cN=function(e,t){uy(function(r){(function(n){if(n.entries.length){var i=nn(),s=n.entries[n.entries.length-1];if(i){var o=i.activationStart||0,l=Math.max(0,i.responseStart-o);return void(n.attribution={timeToFirstByte:l,firstByteToFCP:n.value-l,loadState:jn(n.entries[0].startTime),navigationEntry:i,fcpEntry:s})}}n.attribution={timeToFirstByte:0,firstByteToFCP:n.value,loadState:jn(sy())}})(r),e(r)},t)},$n={passive:!0,capture:!0},dN=new Date,dy=function(e,t){ar||(ar=t,Kn=e,ny=new Date,fy(removeEventListener),hy())},hy=function(){if(Kn>=0&&Kn<ny-dN){var e={entryType:"first-input",name:ar.type,target:ar.target,cancelable:ar.cancelable,startTime:ar.timeStamp,processingStart:ar.timeStamp+Kn};Qs.forEach(function(t){t(e)}),Qs=[]}},hN=function(e){if(e.cancelable){var t=(e.timeStamp>1e12?new Date:performance.now())-e.timeStamp;e.type=="pointerdown"?function(r,n){var i=function(){dy(r,n),o()},s=function(){o()},o=function(){removeEventListener("pointerup",i,$n),removeEventListener("pointercancel",s,$n)};addEventListener("pointerup",i,$n),addEventListener("pointercancel",s,$n)}(t,e):dy(t,e)}},fy=function(e){["mousedown","keydown","touchstart","pointerdown"].forEach(function(t){return e(t,hN,$n)})},py=[100,300],fN=function(e,t){t=t||{},Qn(function(){var r,n=$u(),i=bt("FID"),s=function(u){u.startTime<n.firstHiddenTime&&(i.value=u.processingStart-u.startTime,i.entries.push(u),r(!0))},o=function(u){u.forEach(s)},l=sn("first-input",o);r=vt(e,i,py,t.reportAllChanges),l&&eo(Qu(function(){o(l.takeRecords()),l.disconnect()})),l&&Or(function(){var u;i=bt("FID"),r=vt(e,i,py,t.reportAllChanges),Qs=[],Kn=-1,ar=null,fy(addEventListener),u=s,Qs.push(u),hy()})})},pN=function(e,t){fN(function(r){(function(n){var i=n.entries[0];n.attribution={eventTarget:$s(i.target),eventType:i.name,eventTime:i.startTime,eventEntry:i,loadState:jn(i.startTime)}})(r),e(r)},t)},my=0,qu=1/0,ro=0,mN=function(e){e.forEach(function(t){t.interactionId&&(qu=Math.min(qu,t.interactionId),ro=Math.max(ro,t.interactionId),my=ro?(ro-qu)/7+1:0)})},gy=function(){return Ku?my:performance.interactionCount||0},gN=function(){"interactionCount"in performance||Ku||(Ku=sn("event",mN,{type:"event",buffered:!0,durationThreshold:0}))},yy=[200,500],by=0,vy=function(){return gy()-by},Ot=[],ec={},Sy=function(e){var t=Ot[Ot.length-1],r=ec[e.interactionId];if(r||Ot.length<10||e.duration>t.latency){if(r)r.entries.push(e),r.latency=Math.max(r.latency,e.duration);else{var n={id:e.interactionId,latency:e.duration,entries:[e]};ec[n.id]=n,Ot.push(n)}Ot.sort(function(i,s){return s.latency-i.latency}),Ot.splice(10).forEach(function(i){delete ec[i.id]})}},yN=function(e,t){t=t||{},Qn(function(){var r;gN();var n,i=bt("INP"),s=function(l){l.forEach(function(h){h.interactionId&&Sy(h),h.entryType==="first-input"&&!Ot.some(function(c){return c.entries.some(function(f){return h.duration===f.duration&&h.startTime===f.startTime})})&&Sy(h)});var u,a=(u=Math.min(Ot.length-1,Math.floor(vy()/50)),Ot[u]);a&&a.latency!==i.value&&(i.value=a.latency,i.entries=a.entries,n())},o=sn("event",s,{durationThreshold:(r=t.durationThreshold)!==null&&r!==void 0?r:40});n=vt(e,i,yy,t.reportAllChanges),o&&("interactionId"in PerformanceEventTiming.prototype&&o.observe({type:"first-input",buffered:!0}),eo(function(){s(o.takeRecords()),i.value<0&&vy()>0&&(i.value=0,i.entries=[]),n(!0)}),Or(function(){Ot=[],by=gy(),i=bt("INP"),n=vt(e,i,yy,t.reportAllChanges)}))})},bN=function(e,t){yN(function(r){(function(n){if(n.entries.length){var i=n.entries.sort(function(s,o){return o.duration-s.duration||o.processingEnd-o.processingStart-(s.processingEnd-s.processingStart)})[0];n.attribution={eventTarget:$s(i.target),eventType:i.name,eventTime:i.startTime,eventEntry:i,loadState:jn(i.startTime)}}else n.attribution={}})(r),e(r)},t)},wy=[2500,4e3],tc={},vN=function(e,t){(function(r,n){n=n||{},Qn(function(){var i,s=$u(),o=bt("LCP"),l=function(h){var c=h[h.length-1];c&&c.startTime<s.firstHiddenTime&&(o.value=Math.max(c.startTime-qs(),0),o.entries=[c],i())},u=sn("largest-contentful-paint",l);if(u){i=vt(r,o,wy,n.reportAllChanges);var a=Qu(function(){tc[o.id]||(l(u.takeRecords()),u.disconnect(),tc[o.id]=!0,i(!0))});["keydown","click"].forEach(function(h){addEventListener(h,function(){return setTimeout(a,0)},!0)}),eo(a),Or(function(h){o=bt("LCP"),i=vt(r,o,wy,n.reportAllChanges),ju(function(){o.value=performance.now()-h.timeStamp,tc[o.id]=!0,i(!0)})})}})})(function(r){(function(n){if(n.entries.length){var i=nn();if(i){var s=i.activationStart||0,o=n.entries[n.entries.length-1],l=o.url&&performance.getEntriesByType("resource").filter(function(d){return d.name===o.url})[0],u=Math.max(0,i.responseStart-s),a=Math.max(u,l?(l.requestStart||l.startTime)-s:0),h=Math.max(a,l?l.responseEnd-s:0),c=Math.max(h,o?o.startTime-s:0),f={element:$s(o.element),timeToFirstByte:u,resourceLoadDelay:a-u,resourceLoadTime:h-a,elementRenderDelay:c-h,navigationEntry:i,lcpEntry:o};return o.url&&(f.url=o.url),l&&(f.lcpResourceEntry=l),void(n.attribution=f)}}n.attribution={timeToFirstByte:0,resourceLoadDelay:0,resourceLoadTime:0,elementRenderDelay:n.value}})(r),e(r)},t)},Ry=[800,1800],SN=function e(t){document.prerendering?Qn(function(){return e(t)}):document.readyState!=="complete"?addEventListener("load",function(){return e(t)},!0):setTimeout(t,0)},wN=function(e,t){t=t||{};var r=bt("TTFB"),n=vt(e,r,Ry,t.reportAllChanges);SN(function(){var i=nn();if(i){var s=i.responseStart;if(s<=0||s>performance.now())return;r.value=Math.max(s-qs(),0),r.entries=[i],n(!0),Or(function(){r=bt("TTFB",0),(n=vt(e,r,Ry,t.reportAllChanges))(!0)})}})},RN=function(e,t){wN(function(r){(function(n){if(n.entries.length){var i=n.entries[0],s=i.activationStart||0,o=Math.max(i.domainLookupStart-s,0),l=Math.max(i.connectStart-s,0),u=Math.max(i.requestStart-s,0);n.attribution={waitingTime:o,dnsTime:l-o,connectionTime:u-l,requestTime:n.value-u,navigationEntry:i}}else n.attribution={waitingTime:0,dnsTime:0,connectionTime:0,requestTime:0}})(r),e(r)},t)};const _y=e=>(uN(e),cN(e),pN(e),vN(e),RN(e),bN(e),()=>{}),an=typeof navigator!="undefined"&&"connection"in navigator?navigator.connection:{},Ty=(e,t)=>{const r=()=>{const s=(new Date().getTime()-t)/1e3;e({relativeTimestamp:s,downlink:an.downlink,downlinkMax:an.downlinkMax,effectiveType:an.effectiveType,rtt:an.rtt,saveData:an.saveData,type:an.type})};r();let n;return n=setInterval(()=>{r()},1e3),()=>{clearInterval(n)}},no="iframe parent ready",io="iframe ok",qn="highlightLogs",_N=e=>{let t=Ye(qn)||"";t=t+"["+new Date().getTime()+"] "+e+`
|
|
467
|
-
`,
|
|
465
|
+
`,g);if(v===-1)break;const y=new TextDecoder().decode(u.subarray(g+2,v)),w=v+4,_=f.indexOf(`\r
|
|
466
|
+
${d}`,w),S=_===-1,b=S?f.length:_,R=(o=/\bname="([^"]*)"/i.exec(y))==null?void 0:o[1];if(R!==void 0){const I=(l=/\bfilename="([^"]*)"/i.exec(y))==null?void 0:l[1];if(I!==void 0){const E=(h=(a=(c=/^content-type:[ \t]*(.*)$/im.exec(y))==null?void 0:c[1])==null?void 0:a.trim())!=null?h:"",C=b-w;xc(p,R,`[File name="${I}" type="${E}" size${S?">=":"="}${C}]`)}else xc(p,R,new TextDecoder().decode(u.subarray(w,b)))}m=S?-1:_+2}return e.truncated&&Object.keys(p).length===0?Ds(e):JSON.stringify(p)}catch(u){return Ds(e)}},mx=(e,t)=>{try{if(t&&t.body!==void 0&&t.body!==null)return Promise.resolve(mg(t.body));if(!e.body||e.bodyUsed)return Promise.resolve(void 0);const r=e.clone();if(!r.body)return Promise.resolve(void 0);const n=e.headers.get("content-type");return dx(r.body,ac(e.headers)).then(i=>ox(n)?px(i,n):fx(i)).catch(()=>{})}catch(r){return Promise.resolve(void 0)}},gx=(e=[])=>{if(typeof window=="undefined"||typeof window.fetch!="function"||typeof Request=="undefined")return()=>{};const t=i=>e.some(s=>i.toLowerCase().includes(s)),r=window.fetch,n=function(i,s){return i instanceof Request&&!Nc.has(i)&&!t(i.url)&&Nc.set(i,mx(i,s)),r.call(this!=null?this:window,i,s)};return window.fetch=n,()=>{window.fetch===n&&(window.fetch=r)}};class Oc{constructor(t,r){L(this,"debug");L(this,"name");this.debug=t,this.name=r}prefix(){let t=`[${Date.now()}]`;return this.name&&(t+=` - ${this.name}`),t}log(...t){this.debug&&dl(()=>console.log.apply(console,[this.prefix(),...t]))}warn(...t){(this.debug||_f())&&dl(()=>console.warn.apply(console,[this.prefix(),...t]))}}class Gc{constructor(){L(this,"_sdk");L(this,"_isLoaded",!1);L(this,"_isReady",!1);L(this,"_callBuffer",[]);L(this,"_capacity",1e5);L(this,"_droppedEvents",0);L(this,"_exceededCapacity",!1);L(this,"_logger",new Oc);L(this,"_pendingStart");L(this,"_lastOp")}_bufferCall(t,r){if(this._isReady)return this._callSdk(t,r);this._enqueue({method:t,args:r})}_callSdk(t,r){try{return this._sdk[t](...r)}catch(n){We(`Error executing buffered call to ${t}:`,"error",n)}}_enqueue(t){this._callBuffer.length<this._capacity?(this._callBuffer.push(t),this._exceededCapacity=!1):(this._exceededCapacity||(this._exceededCapacity=!0,We("Exceeded event queue capacity. Increase capacity to avoid dropping events.","warn")),this._droppedEvents+=1)}load(t,{ready:r=!0,started:n}={}){this._sdk=t,this._isLoaded=!0;const i=this._pendingStart;this._pendingStart=void 0,r?(this.markReady(),n?this._queueOp("start",()=>z(this,null,function*(){yield n})).catch(o=>{We("Error starting the SDK","error",o)}).then(()=>i==null?void 0:i.resolve()):i==null||i.resolve()):i&&this._runPendingStart(i)}_runPendingStart(t){return z(this,null,function*(){try{yield this._start()}catch(r){We("Error starting the SDK","error",r)}t.resolve()})}_start(){var t;return this._isLoaded?((t=this._lastOp)==null?void 0:t.kind)==="start"?this._lastOp.promise:this._queueOp("start",()=>z(this,null,function*(){try{yield this._startSdk()}finally{this.markReady()}})):this._deferStart()}_stop(t){return this._isLoaded?this._queueOp("stop",()=>z(this,null,function*(){try{yield t()}catch(r){We("Error stopping the SDK","error",r)}})):(this._cancelPendingStart(),Promise.resolve())}_queueOp(t,r){var s;const n=(s=this._lastOp)==null?void 0:s.promise,i=(n?n.then(r,r):r()).finally(()=>{var o;((o=this._lastOp)==null?void 0:o.promise)===i&&(this._lastOp=void 0)});return this._lastOp={kind:t,promise:i},i}_startSdk(){return z(this,null,function*(){})}markReady(){if(!this._isReady){this._isReady=!0;for(const{method:t,args:r}of this._callBuffer)try{this._sdk[t](...r)}catch(n){We(`Error executing buffered call to ${t}:`,"error",n)}this._callBuffer=[]}}_deferStart(){if(!this._pendingStart){let t;const r=new Promise(n=>{t=n});this._pendingStart={promise:r,resolve:t}}return this._pendingStart.promise}_cancelPendingStart(){this._pendingStart&&(this._pendingStart.resolve(),this._pendingStart=void 0)}}const Ye="feature_flag",gg="launchdarkly",Vc="evaluation",yx=`${Ye}.${Vc}`,yg=`${Ye}.set.id`,bg=`${Ye}.key`,vg=`${Ye}.contextKeys`,Sg=`${Ye}.context.id`,wg=`${Ye}.result.value`,kc=`${Ye}.provider.name`,Fs={kind:`${Ye}.result.reason.kind`,errorKind:`${Ye}.result.reason.errorKind`,ruleIndex:`${Ye}.result.reason.ruleIndex`,ruleId:`${Ye}.result.reason.ruleId`,prerequisiteKey:`${Ye}.result.reason.prerequisiteKey`,inExperiment:`${Ye}.result.reason.inExperiment`,bigSegmentsStatus:`${Ye}.result.reason.bigSegmentsStatus`},Rg=`${Ye}.result.variationIndex`,_g=`${gg}.application.id`,Tg=`${gg}.application.version`,bx="context.contextKeys",vx="$ld:telemetry:session:init",Eg="$ld:telemetry:track",Sx="launchdarkly.track",wx="page_view",Rx="document_load",_x="result.status";function Ig(e){return e.includes("%")||e.includes(":")?e.replace(/%/g,"%25").replace(/:/g,"%3A"):e}function Cg(e){return e.kind==="multi"}function Lr(e){return Cg(e)?Object.keys(e).sort().filter(t=>t!=="kind").map(t=>`${t}:${Ig(e[t].key)}`).join(":"):"kind"in e&&e.kind==="user"?e.key:"kind"in e?`${e.kind}:${Ig(e.key)}`:e.key}function Qn(e){return Cg(e)?Object.keys(e).sort().filter(t=>t!=="kind").map(t=>({[t]:e[t].key})).reduce((t,r)=>x(x({},t),r),{}):"kind"in e?{[e.kind]:e.key}:{user:e.key}}function Tx(e,t,r){t.addHook({getMetadata:()=>({name:"highlight.run"}),afterIdentify:(n,i,s)=>{var l,c;const o=B(x({},Qn(n.context)),{key:(c=(l=r==null?void 0:r.contextFriendlyName)==null?void 0:l.call(r,n.context))!=null?c:Lr(n.context)});return e.log("LD.identify","INFO",o),s.status==="completed"&&e.identify(o.key,o,"LaunchDarkly"),i},afterEvaluation:(n,i,s)=>{const o=x({[kc]:"LaunchDarkly",[bg]:n.flagKey,[wg]:JSON.stringify(s.value)},s.variationIndex!==void 0&&s.variationIndex!==null?{[Rg]:s.variationIndex}:{});if(s.reason)for(const l in Fs){const c=l,a=s.reason[c];a!=null&&(o[Fs[c]]=a)}return n.context&&(o[vg]=JSON.stringify(Qn(n.context)),o[Sg]=Lr(n.context)),e.startSpan(Vc,l=>{l&&l.addEvent(yx,o)}),i}})}class Ex{constructor(t,r){L(this,"client");L(this,"metadata");this.client=t,this.metadata=r}getHooks(t){return[]}init(t){this.client.track(vx,{sessionID:t})}recordGauge(t,r){}identify(t,r,n={},i){}error(t,r){}track(t,r){const n=r.event;this.client.track(n?`${Eg}:${n}`:Eg,B(x({},r),{sessionID:t}))}}class Js extends Gc{constructor(r,n){super();L(this,"client");this.client=new Ex(r,n)}getHooks(r){return[{getMetadata:()=>({name:"highlight.run/ld"}),afterIdentify:(n,i,s)=>(this.load(this.client),i)}]}init(r){return this._bufferCall("init",[r])}recordGauge(r,n){return this._bufferCall("recordGauge",[r,n])}identify(r,n,i={},s){return this._bufferCall("identify",[r,n,i,s])}error(r,n){return this._bufferCall("error",[r,n])}track(r,n){return this._bufferCall("track",[r,n])}}const Xc=e=>{e(window.location.href);const t=history.pushState;history.pushState=(s=>function(){var l=s.apply(this,arguments);return window.dispatchEvent(new Event("pushstate")),window.dispatchEvent(new Event("locationchange")),l})(history.pushState);const r=history.replaceState;history.replaceState=(s=>function(){var l=s.apply(this,arguments);return window.dispatchEvent(new Event("replacestate")),window.dispatchEvent(new Event("locationchange")),l})(history.replaceState);const n=()=>{window.dispatchEvent(new Event("locationchange"))};window.addEventListener("popstate",n);const i=function(){e(window.location.href)};return window.addEventListener("locationchange",i),()=>{window.removeEventListener("popstate",n),window.removeEventListener("locationchange",i),history.pushState=t,history.replaceState=r}},un=class un extends An{constructor(r={}){super(un.moduleName,un.version,r);L(this,"_getLDContextKeyAttributes");L(this,"_unlisten");L(this,"_lastUrl","");this._getLDContextKeyAttributes=r.getLDContextKeyAttributes}init(){}enable(){this._lastUrl=window.location.href,this._unlisten=Xc(r=>{var i;const n=this._lastUrl;if(this._lastUrl=r,n!==r)try{const s=this.tracer.startSpan(wx,{attributes:{[nr]:r,"page_view.previous_url":n,"page_view.url":r}}),o=(i=this._getLDContextKeyAttributes)==null?void 0:i.call(this);o&&s.setAttributes(o),s.end()}catch(s){this._diag.error("failed to create page view span",s)}})}disable(){var r;(r=this._unlisten)==null||r.call(this),this._unlisten=void 0}};L(un,"version","0.1.0"),L(un,"moduleName","location-change");let Wc=un;const Pc={version:"1.4.0"}.version;let De={},Ht,Hs,xr,Nr;const Or="highlight.record",Ix="highlight.session_id",Ys=new Map,Mc=e=>`${e.spanContext().traceId}:${e.spanContext().spanId}`,Zg="launchdarkly.js.log",Cx="launchdarkly.exception.id",Lg="launchdarkly.sampling.ratio",xg="log.severity",Ng="log.message",Og=(e,t)=>{var g,v,y,w,_,S,b,R,I,E,C,N,G,q;if(De.tracerProvider||De.meterProvider){_e("warn","OTEL already initialized. Skipping...");return}Ht=e,_f()&&Y.setLogger({verbose:(...Z)=>_e("debug",...Z),debug:(...Z)=>_e("debug",...Z),info:(...Z)=>_e("info",...Z),warn:(...Z)=>_e("warn",...Z),error:(...Z)=>_e("error",...Z)},Ne.WARN);const r=e.backendUrl||void 0||"https://pub.highlight.io",n=[...(v=(g=e.networkRecordingOptions)==null?void 0:g.urlBlocklist)!=null?v:[],...Ef],i=[r,e.otlpEndpoint].filter(Z=>!!Z).map(Z=>Z.toLowerCase()),s=(y=e.environment)!=null?y:"production",o={url:e.otlpEndpoint+"/v1/traces",concurrencyLimit:10,timeoutMillis:3e4,compression:"gzip",keepAlive:!0,httpAgentOptions:{timeout:6e4,keepAlive:!0}},l=new qL(o,t),c=new Bs(l,{maxExportBatchSize:1024,maxQueueSize:2048,exportTimeoutMillis:o.timeoutMillis,scheduledDelayMillis:5e3}),a=new Un({[cE]:(w=e.serviceName)!=null?w:"highlight-browser",[uE]:e.serviceVersion,"deployment.environment.name":s,"highlight.project_id":e.projectId,[hE]:navigator.userAgent,"browser.language":navigator.language,"telemetry.distro.name":"@highlight-run/observability","telemetry.distro.version":Pc});De.tracerProvider=new UT({resource:a,mergeResourceWithDefaults:!0,spanProcessors:[c]}),we.setGlobalTracerProvider(De.tracerProvider);const h=Zx(o,e.otlpEndpoint+"/v1/metrics"),u=new YC({exporter:h,exportIntervalMillis:o.timeoutMillis,exportTimeoutMillis:o.timeoutMillis});De.meterProvider=new OZ({resource:a,readers:[u]}),El.setGlobalMeterProvider(De.meterProvider);let f=[];if(((_=e.instrumentations)==null?void 0:_["@opentelemetry/instrumentation-document-load"])!==!1&&f.push(new gE({applyCustomAttributesOnSpan:{documentLoad:Wg,documentFetch:Wg,resourceFetch:Ax}})),((S=e.instrumentations)==null?void 0:S["@opentelemetry/instrumentation-user-interaction"])!==!1&&f.push(new Lc({productAnalyticsEvents:e.productAnalyticsEvents,getLDContextKeyAttributes:e.getLDContextKeyAttributes})),((b=e.productAnalyticsEvents)==null?void 0:b.pageViews)!==!1&&f.push(new Wc({getLDContextKeyAttributes:e.getLDContextKeyAttributes})),(R=e.networkRecordingOptions)!=null&&R.enabled){if(((I=e.instrumentations)==null?void 0:I["@opentelemetry/instrumentation-fetch"])!==!1){const W=new JE({propagateTraceHeaderCorsUrls:Mg(e.tracingOrigins),applyCustomAttributesOnSpan:(k,M,P)=>{var de;if(!k.attributes)return;const U=k;if(U.attributes[Or]===!1)return;const $=typeof Request!="undefined"&&M instanceof Request,me=$?ux(M):void 0;kg(k,$?void 0:M.body,M.headers,e.networkRecordingOptions);const O=()=>z(this,null,function*(){const ve=yield me;ve!==void 0&&Gx(k,ve,M.headers,e.networkRecordingOptions)}),ye=()=>{var ve;return(ve=e.networkRecordingOptions)!=null&&ve.requestResponseSanitizer&&Xg(k,e.networkRecordingOptions.requestResponseSanitizer),U.attributes[Or]!==!1};if(!(P instanceof Response)){if(k.setAttributes({"http.response.error":P.message,[Wp]:P.status}),!ye())return;me&&Ys.set(Mc(k),O().then(()=>{ye()}));return}if(ye()&&(de=e.networkRecordingOptions)!=null&&de.recordHeadersAndBody){const ve=z(this,null,function*(){var te,K,ie,ce,Ce;yield O();const D=yield dm(P,(te=e.networkRecordingOptions)==null?void 0:te.bodyKeysToRecord,(K=e.networkRecordingOptions)==null?void 0:K.networkBodyKeysToRedact),F=Object.fromEntries(P.headers.entries()),H=ts((ce=(ie=e.networkRecordingOptions)==null?void 0:ie.networkHeadersToRedact)!=null?ce:[],F,(Ce=e.networkRecordingOptions)==null?void 0:Ce.headerKeysToRecord),Q=Uc(H,"http.response.header");Object.assign(k.attributes,x({"http.response.body":D},Q)),ye()});Ys.set(Mc(k),ve)}}});f.push(W)}((E=e.instrumentations)==null?void 0:E["@opentelemetry/instrumentation-xml-http-request"])!==!1&&f.push(new fI({propagateTraceHeaderCorsUrls:Mg(e.tracingOrigins),applyCustomAttributesOnSpan:(W,k)=>{var U,$,me,O;const M=k;if(!(!W.attributes||W.attributes[Or]===!1)){if(kg(W,M._body,M._requestHeaders,e.networkRecordingOptions),(U=e.networkRecordingOptions)!=null&&U.recordHeadersAndBody){let ye="";(k.responseType===""||k.responseType==="text")&&(ye=Ot(k.responseText,($=e.networkRecordingOptions)==null?void 0:$.networkBodyKeysToRedact,(me=e.networkRecordingOptions)==null?void 0:me.bodyKeysToRecord,void 0));const de=Vx(k.getAllResponseHeaders());Px(W,de,ye,e.networkRecordingOptions)}(O=e.networkRecordingOptions)!=null&&O.requestResponseSanitizer&&Xg(W,e.networkRecordingOptions.requestResponseSanitizer)}}}))}nT({instrumentations:f}),(C=e.networkRecordingOptions)!=null&&C.enabled&&e.networkRecordingOptions.recordHeadersAndBody&&((N=e.instrumentations)==null?void 0:N["@opentelemetry/instrumentation-xml-http-request"])!==!1&&(xr==null||xr(),xr=ix([...n,...i])),(G=e.networkRecordingOptions)!=null&&G.enabled&&e.networkRecordingOptions.recordHeadersAndBody&&((q=e.instrumentations)==null?void 0:q["@opentelemetry/instrumentation-fetch"])!==!1&&(Nr==null||Nr(),Nr=gx([...n,...i]));const m=new Op;return m.enable(),De.tracerProvider.register({contextManager:m,propagator:new $f({propagators:[new Ff,new xx({backendUrl:r,otlpEndpoint:e.otlpEndpoint,tracingOrigins:e.tracingOrigins,urlBlocklist:n})]})}),Hs=Lx(l,h,c,()=>De),De},Zx=(e,t)=>new ex(B(x({},e),{url:t,temporalityPreference:jn.DELTA})),Lx=(e,t,r,n)=>{if(typeof document=="undefined"||typeof window=="undefined")return()=>{};const i=()=>{var c,a;e.setUnloading(!0),t.setUnloading(!0),r.setSkipPendingOnFlush(!0);const l=n();(c=l.tracerProvider)==null||c.forceFlush().catch(()=>{}),(a=l.meterProvider)==null||a.forceFlush().catch(()=>{})},s=()=>{document.visibilityState==="hidden"?i():document.visibilityState==="visible"&&(e.setUnloading(!1),t.setUnloading(!1),r.setSkipPendingOnFlush(!1))},o=()=>i();return document.addEventListener("visibilitychange",s),window.addEventListener("pagehide",o),()=>{document.removeEventListener("visibilitychange",s),window.removeEventListener("pagehide",o)}};class Bs extends Ip{constructor(){super(...arguments);L(this,"_pendingSpans",new Set);L(this,"_skipPendingOnFlush",!1)}setSkipPendingOnFlush(r){this._skipPendingOnFlush=r}onStart(r,n){r.setAttribute(Ix,Nt()),super.onStart(r,n)}onEnd(r){if(r.attributes[Or]===!1)return;LI();const n=Mc(r),i=Ys.get(n);if(i){const s=i.catch(o=>{_e("warn","[CustomBatchSpanProcessor] Failed to capture response body attributes",o)}).finally(()=>{Ys.delete(n),this._pendingSpans.delete(s),r.attributes[Or]!==!1&&super.onEnd(r)});this._pendingSpans.add(s);return}super.onEnd(r)}shutdown(){return z(this,null,function*(){return this._skipPendingOnFlush||(yield Promise.allSettled(this._pendingSpans)),wu(Bs.prototype,this,"shutdown").call(this)})}forceFlush(){return z(this,null,function*(){return this._skipPendingOnFlush||(yield Promise.allSettled(this._pendingSpans)),wu(Bs.prototype,this,"forceFlush").call(this)})}}class xx extends rp{constructor(r){super();L(this,"highlightEndpoints");L(this,"tracingOrigins");L(this,"urlBlocklist");this.highlightEndpoints=[r.backendUrl,`${r.otlpEndpoint}/v1/traces`,`${r.otlpEndpoint}/v1/logs`,`${r.otlpEndpoint}/v1/metrics`],this.tracingOrigins=r.tracingOrigins,this.urlBlocklist=r.urlBlocklist}inject(r,n,i){var l;const s=we.getSpan(r);if(!s||!s.attributes)return;const o=Ag(s);typeof o=="string"&&(Mx(o,this.highlightEndpoints,this.tracingOrigins,this.urlBlocklist)||s.setAttribute(Or,!1),!nc(o,(l=this.tracingOrigins)!=null?l:[],this.urlBlocklist))||super.inject(r,n,i)}}const Gg="highlight-browser",Nx=Gg,zs=()=>{var e;return(e=De.tracerProvider)==null?void 0:e.getTracer(Gg)},or=()=>{var e;return(e=De.meterProvider)==null?void 0:e.getMeter(Nx)},Ox=()=>we.getActiveSpan(),Ac=()=>z(this,null,function*(){Hs&&(Hs(),Hs=void 0),xr&&(xr(),xr=void 0),Nr&&(Nr(),Nr=void 0),yield Promise.allSettled([z(this,null,function*(){De.tracerProvider?(yield De.tracerProvider.shutdown(),De.tracerProvider=void 0):_e("warn","OTEL shutdown called without initialized tracerProvider.")}),z(this,null,function*(){De.meterProvider?(yield De.meterProvider.shutdown(),De.meterProvider=void 0):_e("warn","OTEL shutdown called without initialized meterProvider.")})])}),Vg=e=>{const t=pI(e),r={};return t!=null&&t.name&&(r["graphql.operation.name"]=t.name),t!=null&&t.type&&(r["graphql.operation.type"]=t.type),r},Gx=(e,t,r,n)=>{if(!e.attributes)return;const i=e.attributes;Object.assign(i,Vg(t)),n!=null&&n.recordHeadersAndBody&&Object.assign(i,{"http.request.body":Ot(t,n.networkBodyKeysToRedact,n.bodyKeysToRecord,fg(r))})},kg=(e,t,r,n)=>{var h;if(!e.attributes)return;const s=Ag(e),o=ns(s),l=If(o),c=mg(t),a=fg(r);if(e.setAttributes(Vg(c!=null?c:t)),e.setAttributes({"highlight.type":"http.request",[en]:o,[nr]:o,[_s]:l.pathname,[dE]:l.search}),e.setAttributes(kx(l.searchParams,"url.query_params")),n!=null&&n.recordHeadersAndBody){c!==void 0&&e.setAttribute("http.request.body",Ot(c,n.networkBodyKeysToRedact,n.bodyKeysToRecord,a));const u=ts((h=n.networkHeadersToRedact)!=null?h:[],a,n.headerKeysToRecord),f=Uc(u,"http.request.header");e.setAttributes(f)}},Vx=e=>{const t={};return e&&e.trim().split(/[\r\n]+/).forEach(r=>{const n=r.split(": "),i=n.shift();i&&(t[i]=n.join(": "))}),t},Uc=(e,t)=>{const r={};return Object.entries(e).forEach(([n,i])=>{const s=n.toLowerCase().replace(/_/g,"-"),o=`${t}.${s}`,l=Wx(s,i);if(r[o]){const c=r[o];Array.isArray(c)?r[o]=[...c,...l]:r[o]=[c,...l]}else r[o]=l.length===1?l[0]:l}),r},kx=(e,t)=>{const r={};for(const[n,i]of e.entries()){const s=`${t}.${n}`,o=r[s];o===void 0?r[s]=i:Array.isArray(o)?o.push(i):r[s]=[o,i]}return r},Xx=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"]),Wx=(e,t)=>Xx.has(e)?t.split(",").map(r=>r.trim()).filter(r=>r.length>0):[t],Px=(e,t,r,n)=>{var o;e.setAttribute("http.response.body",r);const i=ts((o=n.networkHeadersToRedact)!=null?o:[],t,n.headerKeysToRecord),s=Uc(i,"http.response.header");e.setAttributes(s)},Xg=(e,t)=>{var u,f,d,p,m,g,v,y,w,_,S,b;const n=e.attributes,i={},s={};for(const[R,I]of Object.entries(n))R.startsWith("http.request.header.")&&(i[R.slice(20)]=String(I)),R.startsWith("http.response.header.")&&(s[R.slice(21)]=String(I));let l={request:{sessionSecureID:"",id:"",url:(f=(u=n[nr])!=null?u:n[en])!=null?f:"",verb:(p=(d=n["http.request.method"])!=null?d:n[iE])!=null?p:"GET",headers:i,body:(m=n["http.request.body"])!=null?m:""},response:{status:Number((v=(g=n[Wp])!=null?g:n[sE])!=null?v:0),headers:s,body:(y=n["http.response.body"])!=null?y:""},urlBlocked:!1},c=!0;try{l.request.body=JSON.parse(l.request.body)}catch(R){c=!1}let a=!0;try{l.response.body=JSON.parse(l.response.body)}catch(R){a=!1}let h;try{h=t(l)}catch(R){return}if(!h){Object.assign(e.attributes,{[Or]:!1});return}c&&((w=h.request)!=null&&w.body)&&(h.request.body=JSON.stringify(h.request.body)),a&&((_=h.response)!=null&&_.body)&&(h.response.body=JSON.stringify(h.response.body)),Object.assign(e.attributes,{"http.request.body":(S=h.request.body)!=null?S:"","http.response.body":(b=h.response.body)!=null?b:""})},Mx=(e,t,r,n)=>n!=null&&n.some(s=>e.toLowerCase().includes(s))?!1:Gs(e,t),Wg=e=>{var s,o,l;if(!e.events)return;const r=e.events,n={unload:gt("unloadEventStart","unloadEventEnd",r),dom_interactive:gt("fetchStart","domInteractive",r),dom_content_loaded:gt("domContentLoadedEventStart","domContentLoadedEventEnd",r),dom_complete:gt("fetchStart","domComplete",r),load_event:gt("loadEventStart","loadEventEnd",r),document_load:gt("fetchStart","loadEventEnd",r),first_paint:gt("fetchStart","firstPaint",r),first_contentful_paint:gt("fetchStart","firstContentfulPaint",r),domain_lookup:gt("domainLookupStart","domainLookupEnd",r),connect:gt("connectStart","connectEnd",r),request:gt("requestStart","requestEnd",r),response:gt("responseStart","responseEnd",r)},i=(o=(s=Ht==null?void 0:Ht.getIntegrations)==null?void 0:s.call(Ht))!=null?o:[];if(n.document_load!==void 0)for(const c of i)c.recordGauge((l=Ht==null?void 0:Ht.sessionSecureId)!=null?l:"",{name:Rx,value:n.document_load/1e6});Object.entries(n).forEach(([c,a])=>{a!==void 0&&(e.setAttribute(`timings.${c}.ns`,a),e.setAttribute(`timings.${c}.readable`,Pg(a)))})};function gt(e,t,r){const n=r.find(l=>l.name===e),i=r.find(l=>l.name===t);if(!n||!i)return;const s=n.time[0]*1e9+n.time[1];return i.time[0]*1e9+i.time[1]-s}const Ax=(e,t)=>{const r={domain_lookup:(t.domainLookupEnd-t.domainLookupStart)*1e6,connect:(t.connectEnd-t.connectStart)*1e6,request:(t.responseEnd-t.requestStart)*1e6,response:(t.responseEnd-t.responseStart)*1e6};Object.entries(r).forEach(([n,i])=>{e.setAttribute(`timings.${n}.ns`,i),e.setAttribute(`timings.${n}.readable`,Pg(i))})},Pg=e=>{if(e>=36e11){const o=e/36e11;return`${Number(o.toFixed(1))}h`}else if(e>=6e10){const o=e/6e10;return`${Number(o.toFixed(1))}m`}else if(e>=1e9){const o=e/1e9;return`${Number(o.toFixed(1))}s`}else if(e>=1e6){const o=e/1e6;return`${Number(o.toFixed(1))}ms`}else if(e>=1e3){const o=e/1e3;return`${Number(o.toFixed(1))}µs`}else return`${Number(e.toFixed(1))}ns`},Mg=e=>e===!0?[/localhost/,/^\//,am(window.location.host)]:Array.isArray(e)?e.map(t=>typeof t=="string"?new RegExp(t):t):/^$/,Ag=e=>e.attributes[nr]?e.attributes[nr]:e.attributes[en],Ux=(e,t,r)=>{const n=window._highlightWebSocketRequestCallback;window._highlightWebSocketRequestCallback=e;const i=window._highlightWebSocketEventCallback;return window._highlightWebSocketEventCallback=s=>{const u=s,{message:o,size:l}=u,c=nt(u,["message","size"]),h=r.some(f=>s.name.toLowerCase().includes(f))?c:s;t(h)},()=>{window._highlightWebSocketRequestCallback=n,window._highlightWebSocketEventCallback=i}},Dx=({xhrCallback:e,fetchCallback:t,webSocketRequestCallback:r,webSocketEventCallback:n,disableWebSocketRecording:i,bodyKeysToRedact:s,highlightEndpoints:o,tracingOrigins:l,urlBlocklist:c,bodyKeysToRecord:a})=>{const h=UI(e,o,l,c,s,a),u=YI(t,o,l,c,s,a),f=i?()=>{}:Ux(r,n,c);return()=>{h(),u(),f()}};class Yt{constructor(t){L(this,"disableConsoleRecording");L(this,"reportConsoleErrors");L(this,"enablePromisePatch");L(this,"consoleMethodsToRecord");L(this,"listeners");L(this,"errors");L(this,"messages");L(this,"options");L(this,"hasNetworkRecording",!0);L(this,"disableNetworkRecording");L(this,"enableRecordingNetworkContents");L(this,"xhrNetworkContents");L(this,"fetchNetworkContents");L(this,"disableRecordingWebSocketContents");L(this,"webSocketNetworkContents");L(this,"webSocketEventContents");L(this,"tracingOrigins");L(this,"networkHeadersToRedact");L(this,"networkBodyKeysToRedact");L(this,"networkBodyKeysToRecord");L(this,"networkHeaderKeysToRecord");L(this,"lastNetworkRequestTimestamp");L(this,"urlBlocklist");L(this,"highlightEndpoints");L(this,"requestResponseSanitizer");var r,n;this.options=t,this.disableConsoleRecording=!!t.disableConsoleRecording,this.reportConsoleErrors=(r=t.reportConsoleErrors)!=null?r:!1,this.enablePromisePatch=(n=t.enablePromisePatch)!=null?n:!1,this.consoleMethodsToRecord=t.consoleMethodsToRecord||[...il],this.listeners=[],this.errors=[],this.messages=[],this.lastNetworkRequestTimestamp=0}isListening(){return this.listeners.length>0}startListening(){if(this.isListening())return;const t=this;this.disableConsoleRecording||this.listeners.push(Zf(r=>{var n,i,s;if(this.reportConsoleErrors&&(r.type==="Error"||r.type==="error")&&r.value&&r.trace){const o=Rt(r.value);if(ml.includes(o)||gl.some(l=>o.includes(l)))return;t.errors.push({event:o,type:"console.error",url:window.location.href,source:(n=r.trace[0])!=null&&n.fileName?r.trace[0].fileName:"",lineNumber:(i=r.trace[0])!=null&&i.lineNumber?r.trace[0].lineNumber:0,columnNumber:(s=r.trace[0])!=null&&s.columnNumber?r.trace[0].columnNumber:0,stackTrace:r.trace,timestamp:new Date().toISOString(),id:In()})}t.messages.push(r)},B(x({},Cf),{level:this.consoleMethodsToRecord,recordLaunchDarklySdkLogs:this.options.recordLaunchDarklySdkLogs}))),this.listeners.push(xf(r=>{ml.includes(r.event)||gl.some(n=>r.event.includes(n))||t.errors.push(r)},{enablePromisePatch:this.enablePromisePatch})),this.listeners.push(Ac),Yt.setupNetworkListener(this,this.options)}stopListening(){this.listeners.forEach(t=>t()),this.listeners=[]}static setupNetworkListener(t,r){var s,o,l,c,a,h,u,f,d,p,m,g;const n=(r==null?void 0:r.backendUrl)||void 0||"https://pub.highlight.io",i=r.otlpEndpoint||"https://otel.highlight.io";t.highlightEndpoints=[n,`${i}/v1/traces`,`${i}/v1/logs`,`${i}/v1/metrics`],t.xhrNetworkContents=[],t.fetchNetworkContents=[],t.webSocketNetworkContents=[],t.webSocketEventContents=[],t.networkHeadersToRedact=[],t.urlBlocklist=[],t.tracingOrigins=r.tracingOrigins||[],(r==null?void 0:r.disableNetworkRecording)!==void 0?(t.disableNetworkRecording=r==null?void 0:r.disableNetworkRecording,t.enableRecordingNetworkContents=!1,t.disableRecordingWebSocketContents=!0,t.networkHeadersToRedact=[],t.networkBodyKeysToRedact=[],t.urlBlocklist=[],t.networkBodyKeysToRecord=[]):typeof(r==null?void 0:r.networkRecording)=="boolean"?(t.disableNetworkRecording=!r.networkRecording,t.enableRecordingNetworkContents=!1,t.disableRecordingWebSocketContents=!0,t.networkHeadersToRedact=[],t.networkBodyKeysToRedact=[],t.urlBlocklist=[]):(((s=r.networkRecording)==null?void 0:s.enabled)!==void 0?t.disableNetworkRecording=!r.networkRecording.enabled:t.disableNetworkRecording=!1,t.enableRecordingNetworkContents=((o=r.networkRecording)==null?void 0:o.recordHeadersAndBody)||!1,t.disableRecordingWebSocketContents=((l=r.networkRecording)==null?void 0:l.disableWebSocketEventRecordings)||!1,t.networkHeadersToRedact=((a=(c=r.networkRecording)==null?void 0:c.networkHeadersToRedact)==null?void 0:a.map(v=>v.toLowerCase()))||[],t.networkBodyKeysToRedact=((u=(h=r.networkRecording)==null?void 0:h.networkBodyKeysToRedact)==null?void 0:u.map(v=>v.toLowerCase()))||[],t.urlBlocklist=((d=(f=r.networkRecording)==null?void 0:f.urlBlocklist)==null?void 0:d.map(v=>v.toLowerCase()))||[],t.urlBlocklist=[...t.urlBlocklist,...Ef],t.requestResponseSanitizer=(p=r.networkRecording)==null?void 0:p.requestResponseSanitizer,t.networkHeaderKeysToRecord=(m=r.networkRecording)==null?void 0:m.headerKeysToRecord,t.networkHeaderKeysToRecord&&(t.networkHeadersToRedact=[],t.networkHeaderKeysToRecord=t.networkHeaderKeysToRecord.map(v=>v.toLocaleLowerCase())),t.networkBodyKeysToRecord=(g=r.networkRecording)==null?void 0:g.bodyKeysToRecord,t.networkBodyKeysToRecord&&(t.networkBodyKeysToRedact=[],t.networkBodyKeysToRecord=t.networkBodyKeysToRecord.map(v=>v.toLocaleLowerCase()))),!t.disableNetworkRecording&&t.enableRecordingNetworkContents&&(t.hasNetworkRecording=!0,t.listeners.push(Dx({xhrCallback:v=>{t.xhrNetworkContents.push(v)},fetchCallback:v=>{t.fetchNetworkContents.push(v)},webSocketRequestCallback:v=>{t.webSocketNetworkContents&&t.webSocketNetworkContents.push(v)},webSocketEventCallback:v=>{t.webSocketEventContents.push(v)},disableWebSocketRecording:t.disableRecordingWebSocketContents,bodyKeysToRedact:t.networkBodyKeysToRedact,highlightEndpoints:t.highlightEndpoints,tracingOrigins:t.tracingOrigins,urlBlocklist:t.urlBlocklist,bodyKeysToRecord:t.networkBodyKeysToRecord})))}static getRecordedNetworkResources(t,r){var s,o;let n=[],i=[];if(!t.disableNetworkRecording){const l=((s=window==null?void 0:window.performance)==null?void 0:s.timeOrigin)||0;n=performance.getEntriesByType("resource");const c=(r-l)*2;if(n=n.filter(a=>a.responseEnd<t.lastNetworkRequestTimestamp?!1:Gs(a.name,t.highlightEndpoints)).map(a=>B(x({},a.toJSON()),{offsetStartTime:a.startTime-c,offsetResponseEnd:a.responseEnd-c,offsetFetchStart:a.fetchStart-c})),t.lastNetworkRequestTimestamp=((o=n.at(-1))==null?void 0:o.responseEnd)||t.lastNetworkRequestTimestamp,t.enableRecordingNetworkContents){const a={headersToRedact:t.networkHeadersToRedact,headersToRecord:t.networkHeaderKeysToRecord,requestResponseSanitizer:t.requestResponseSanitizer};n=om(n,t.xhrNetworkContents,"xmlhttprequest",a),n=om(n,t.fetchNetworkContents,"fetch",a)}}return t.disableRecordingWebSocketContents||(i=t.webSocketNetworkContents||[]),[...n,...i]}static getRecordedWebSocketEvents(t){let r=[];return!t.disableNetworkRecording&&!t.disableRecordingWebSocketContents&&(r=t.webSocketEventContents),r}static clearRecordedNetworkResources(t){t.disableNetworkRecording||(t.xhrNetworkContents=[],t.fetchNetworkContents=[],t.webSocketNetworkContents=[],t.webSocketEventContents=[],performance.clearResourceTimings())}}const Ug=(e,t,r)=>{switch(e){case"strict":return[!0,void 0];case"default":return[!0,void 0];case"none":return[!!t,B(x({},r),{password:!0})]}},Dg=(e,t)=>e==="strict"?"strict":(t!=null?t:e==="default")?"default":"none";let yt,Dc;function Fg(e,t){return e.nodeType,Node.ELEMENT_NODE,Bc(e);return Fx(e,t)}function Fc(e){if(e.id.length)return`#${e.id}`;if(e.classList.length){let t=[];for(const r of e.classList)t.push(`.${r}`);return`${e.nodeName.toLowerCase()}${t.join(",")}`}return e.nodeName.toLowerCase()}function Fx(e,t){if(e.tagName.toLowerCase()==="html")return"html";try{const r={root:document.body,idName:i=>!0,className:i=>!0,tagName:i=>!0,attr:(i,s)=>!1,seedMinLength:1,optimizedMinLength:2,threshold:50,maxNumberOfTries:1e3,optimized:!0};yt=x(x({},r),t),Dc=Jx(yt.root,r);let n=Jc(e,0,()=>Jc(e,1,()=>Jc(e,2)));if(n){if(yt.optimized){const i=zg(Kg(n,e));i.length>0&&(n=i[0])}return Ks(n)}else return Bc(e)}catch(r){return Bc(e)}}function Jx(e,t){return e.nodeType===Node.DOCUMENT_NODE?e:e===t.root?e.ownerDocument:e}function Jc(e,t,r){let n=null,i=[],s=e,o=0;for(;s&&s!==yt.root.parentElement;){let l=js(Hx(s))||js(...Yx(s))||js(...Bx(s))||js(zx(s))||[Kx()];const c=jx(s);if(t===0)c&&(l=l.concat(l.filter(Yc).map(a=>Hc(a,c))));else if(t===1)l=l.slice(0,1),c&&(l=l.concat(l.filter(Yc).map(a=>Hc(a,c))));else if(t===2){const[a]=l=l.slice(0,1);c&&Yc(a)&&(l=[Hc(a,c)])}for(let a of l)a.level=o;if(i.push(l),i.length>=yt.seedMinLength&&(n=Jg(i,r),n))break;s=s.parentElement,o++}return n||(n=Jg(i,r)),n}function Jg(e,t){const r=zg(Bg(e));if(r.length>yt.threshold)return t?t():null;for(let n of r)if(Yg(n))return n;return null}function Ks(e){let t=e[0],r=t.name;for(let n=1;n<e.length;n++){const i=e[n].level||0;t.level===i-1?r=`${e[n].name} > ${r}`:r=`${e[n].name} ${r}`,t=e[n]}return r}function Hg(e){return e.map(t=>t.penalty).reduce((t,r)=>t+r,0)}function Yg(e){switch(Dc.querySelectorAll(Ks(e)).length){case 0:return!0;case 1:return!0;default:return!1}}function Hx(e){const t=e.getAttribute("id");return t&&yt.idName(t)?{name:"#"+Qs(t,{isIdentifier:!0}),penalty:0}:null}function Yx(e){return Array.from(e.attributes).filter(r=>yt.attr(r.name,r.value)).map(r=>({name:"["+Qs(r.name,{isIdentifier:!0})+'="'+Qs(r.value)+'"]',penalty:.5}))}function Bx(e){return Array.from(e.classList).filter(yt.className).map(r=>({name:"."+Qs(r,{isIdentifier:!0}),penalty:1}))}function zx(e){const t=e.tagName.toLowerCase();return yt.tagName(t)?{name:t,penalty:2}:null}function Kx(){return{name:"*",penalty:3}}function jx(e){const t=e.parentNode;if(!t)return null;let r=t.firstChild;if(!r)return null;let n=0;for(;r&&(r.nodeType===Node.ELEMENT_NODE&&n++,r!==e);)r=r.nextSibling;return n}function Hc(e,t){return{name:e.name+`:nth-child(${t})`,penalty:e.penalty+1}}function Yc(e){return e.name!=="html"&&!e.name.startsWith("#")}function js(...e){const t=e.filter(Qx);return t.length>0?t:null}function Qx(e){return e!=null}function*Bg(e,t=[]){if(e.length>0)for(let r of e[0])yield*Ru(Bg(e.slice(1,e.length),t.concat(r)));else yield t}function zg(e){return Array.from(e).sort((t,r)=>Hg(t)-Hg(r))}function*Kg(e,t,r={counter:0,visited:new Map}){if(e.length>2&&e.length>yt.optimizedMinLength)for(let n=1;n<e.length-1;n++){if(r.counter>yt.maxNumberOfTries)return;r.counter+=1;const i=[...e];i.splice(n,1);const s=Ks(i);if(r.visited.has(s))return;Yg(i)&&$x(i,t)&&(yield i,r.visited.set(s,!0),yield*Ru(Kg(i,t,r)))}}function $x(e,t){return Dc.querySelector(Ks(e))===t}const qx=/[ -,\.\/:-@\[-\^`\{-~]/,eN=/[ -,\.\/:-@\[\]\^`\{-~]/,tN=/(^|\\+)?(\\[A-F0-9]{1,6})\x20(?![a-fA-F0-9\x20])/g,rN={escapeEverything:!1,isIdentifier:!1,quotes:"single",wrap:!1};function Qs(e,t={}){const r=x(x({},rN),t);r.quotes!="single"&&r.quotes!="double"&&(r.quotes="single");const n=r.quotes=="double"?'"':"'",i=r.isIdentifier,s=e.charAt(0);let o="",l=0;const c=e.length;for(;l<c;){const a=e.charAt(l++);let h=a.charCodeAt(0),u;if(h<32||h>126){if(h>=55296&&h<=56319&&l<c){const f=e.charCodeAt(l++);(f&64512)==56320?h=((h&1023)<<10)+(f&1023)+65536:l--}u="\\"+h.toString(16).toUpperCase()+" "}else r.escapeEverything?qx.test(a)?u="\\"+a:u="\\"+h.toString(16).toUpperCase()+" ":/[\t\n\f\r\x0B]/.test(a)?u="\\"+h.toString(16).toUpperCase()+" ":a=="\\"||!i&&(a=='"'&&n==a||a=="'"&&n==a)||i&&eN.test(a)?u="\\"+a:u=a;o+=u}return i&&(/^-[-\d]/.test(o)?o="\\-"+o.slice(1):/\d/.test(s)&&(o="\\3"+s+" "+o.slice(1))),o=o.replace(tN,function(a,h,u){return h&&h.length%2?a:(h||"")+u}),!i&&r.wrap?n+o+n:o}const Bc=e=>{let t="";const r=e.getAttribute("class"),n=e.getAttribute("id");return n&&(t=t.concat(jg(n,"#"))),r&&(t=t.concat(jg(r,"."))),t===""&&(t=t.concat(e.tagName.toLowerCase())),t},jg=(e,t)=>`${t}${e.trim().split(" ").join(t)}`,Qg=e=>{const t=n=>{if(n.target){const i=n.target,s=Fg(i);e(s,n)}},r={capture:!0};return window.addEventListener("click",t,r),()=>window.removeEventListener("click",t,r)},$g=e=>{const t=r=>{if(r.target){const n=Fg(r.target);e(n)}};return window.addEventListener("focusin",t),()=>window.removeEventListener("focusin",t)},nN=30,iN=()=>new Promise(e=>requestAnimationFrame(t=>requestAnimationFrame(r=>e(r-t)))),sN=()=>z(this,null,function*(){const e=[];for(let t=0;t<nN;t++)e.push(yield iN());return e.reduce((t,r)=>t+r,0)/e.length}),qg=(e,t)=>{let r={},n=16.666666666666668;sN().then(c=>n=c);const i=c=>{var a;r!=null&&r.event||(r={event:c,location:window.location.href,timerStart:(a=window.performance)==null?void 0:a.now()},window.requestAnimationFrame(s))},s=()=>{if(!(r!=null&&r.timerStart))return;const c=window.performance.now()-r.timerStart-n;o(c),r={}},o=c=>{const a=(new Date().getTime()-t)/1e3;e({relativeTimestamp:a,jankAmount:c,querySelector:l(),newLocation:window.location.href!=r.location?window.location.href:void 0})},l=()=>{var c;return(c=r==null?void 0:r.event)!=null&&c.target?Fc(r.event.target):""};return window.addEventListener("click",i,!0),window.addEventListener("keydown",i,!0),()=>{window.removeEventListener("keydown",i,!0),window.removeEventListener("click",i,!0)}},ey=e=>{let t,r;if(typeof document.hidden!="undefined"?(t="hidden",r="visibilitychange"):typeof document.msHidden!="undefined"?(t="msHidden",r="msvisibilitychange"):typeof document.webkitHidden!="undefined"&&(t="webkitHidden",r="webkitvisibilitychange"),r===void 0)return()=>{};if(t===void 0)return()=>{};const n=t,i=()=>{const o=document[n];e(!!o)};document.addEventListener(r,i);const s=r;return()=>document.removeEventListener(s,i)},ty=typeof window!="undefined"&&"performance"in window&&"memory"in performance?performance:{memory:{}},ry=(e,t)=>{let r=0,n=0;const i=()=>{const h=(new Date().getTime()-t)/1e3,u=ty.memory.jsHeapSizeLimit||0,f=ty.memory.usedJSHeapSize||0;e({jsHeapSizeLimit:u,usedJSHeapSize:f,relativeTimestamp:h,fps:r})};i();let s;s=setInterval(()=>{i()},1e3);let o=0,l=Date.now();const c=function(){var a=Date.now();o++,a>1e3+l&&(r=Math.round(o*1e3/(a-l)),o=0,l=a),n=requestAnimationFrame(c)};return c(),()=>{clearInterval(s),cancelAnimationFrame(n)}},ny=e=>{e(window.location.href);var t=XMLHttpRequest.prototype.send;XMLHttpRequest.prototype.send=function(s){setTimeout(()=>{var l;var o;try{o=JSON.parse((l=s==null?void 0:s.toString())!=null?l:"")}catch(c){return}(o.type==="track"||o.type==="identify")&&zc(o)&&e(o)},100),t.call(this,s)};const r=s=>{if(s.key==="ajs_user_id"||s.key==="ajs_anonymous_id"||s.key==="ajs_user_traits"){const{userId:o,userTraits:l}=iy();if(o){let c={};l&&(c=JSON.parse(l));const a={type:"identify",userId:o.toString(),traits:c};zc(a)&&e(a)}}},{userId:n,userTraits:i}=iy();if(n){let s={};i&&(s=JSON.parse(i));const o={type:"identify",userId:n.toString(),traits:s};zc(o)&&e(o)}return window.addEventListener("storage",r),II(({keyName:s})=>{r({key:s})}),()=>{window.removeEventListener("storage",r),XMLHttpRequest.prototype.send=t}},iy=()=>{const e=He("ajs_user_id"),t=He("ajs_user_traits"),r=He("ajs_anonymous_id");return{userId:e,userTraits:t,anonymousId:r}},zc=e=>{if(!e)return!1;let t="";try{t=JSON.stringify(e)}catch(i){return!1}const r=oN(t),n=He(Ge.SEGMENT_LAST_SENT_HASH_KEY);return n===void 0||r!==n?(mt(Ge.SEGMENT_LAST_SENT_HASH_KEY,r),!0):!1},oN=e=>{var t=0,r=e.length,n=0;if(r>0)for(;n<r;)t=(t<<5)-t+e.charCodeAt(n++)|0;return t.toString()},sy=(e,t)=>{const r=aN(e);let n=[];const i=!1,s=!0,o=[];for(let c=0;c<r.length;c++){let a=r[c].split("+");n=[],a.length>1&&(n=uN(ay,a)),a=a[a.length-1],a=a==="*"?"*":cN(a),a in Zt||(Zt[a]=[]);const h={mods:n,shortcut:r[c],key:r[c],method:t,keyup:i,keydown:s,scope:"all",splitKey:"+"};Zt[a].push(h),o.push({key:a,handler:h})}const l=c=>fN(c);return dN(document,"keydown",l),()=>{document.removeEventListener("keydown",l);for(const{key:c,handler:a}of o){const h=Zt[c],u=h?h.indexOf(a):-1;u>-1&&h.splice(u,1)}}};let Qe=[];function aN(e){typeof e!="string"&&(e=""),e=e.replace(/\s/g,"");const t=e.split(",");let r=t.lastIndexOf("");for(;r>=0;)t[r-1]+=",",t.splice(r,1),r=t.lastIndexOf("");return t}const Zt={},Kc=typeof navigator!="undefined"?navigator.userAgent.toLowerCase().indexOf("firefox")>0:!1,lN={backspace:8,tab:9,clear:12,enter:13,return:13,esc:27,escape:27,space:32,left:37,up:38,right:39,down:40,del:46,delete:46,ins:45,insert:45,home:36,end:35,pageup:33,pagedown:34,capslock:20,num_0:96,num_1:97,num_2:98,num_3:99,num_4:100,num_5:101,num_6:102,num_7:103,num_8:104,num_9:105,num_multiply:106,num_add:107,num_enter:108,num_subtract:109,num_decimal:110,num_divide:111,"⇪":20,",":188,".":190,"/":191,"`":192,"-":Kc?173:189,"=":Kc?61:187,";":Kc?59:186,"'":222,"[":219,"]":221,"\\":220},oy={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey",shiftKey:16,ctrlKey:17,altKey:18,metaKey:91},$e={16:!1,18:!1,17:!1,91:!1},ay={"⇧":16,shift:16,"⌥":18,alt:18,option:18,"⌃":17,ctrl:17,control:17,"⌘":91,cmd:91,command:91},cN=e=>lN[e.toLowerCase()]||ay[e.toLowerCase()]||e.toUpperCase().charCodeAt(0);function uN(e,t){const r=t.slice(0,t.length-1);for(let n=0;n<r.length;n++)r[n]=e[r[n].toLowerCase()];return r}function dN(e,t,r){e.addEventListener?e.addEventListener(t,r,!1):e.attachEvent&&e.attachEvent(`on${t}`,()=>{r(window.event)})}function hN(e,t,r){let n;if(t.scope===r||t.scope==="all"){n=t.mods.length>0;for(const i in $e)Object.prototype.hasOwnProperty.call($e,i)&&(!$e[i]&&t.mods.indexOf(+i)>-1||$e[i]&&t.mods.indexOf(+i)===-1)&&(n=!1);(t.mods.length===0&&!$e[16]&&!$e[18]&&!$e[17]&&!$e[91]||n||t.shortcut==="*")&&t.method(e,t)===!1&&(e.preventDefault?e.preventDefault():e.returnValue=!1,e.stopPropagation&&e.stopPropagation(),e.cancelBubble&&(e.cancelBubble=!0))}}function fN(e){const t=Zt["*"];let r=e.keyCode||e.which||e.charCode;if((r===93||r===224)&&(r=91),Qe.indexOf(r)===-1&&r!==229&&Qe.push(r),["ctrlKey","altKey","shiftKey","metaKey"].forEach(n=>{const i=oy[n];e[n]&&Qe.indexOf(i)===-1?Qe.push(i):!e[n]&&Qe.indexOf(i)>-1?Qe.splice(Qe.indexOf(i),1):n==="metaKey"&&e[n]&&Qe.length===3&&(e.ctrlKey||e.shiftKey||e.altKey||(Qe=Qe.slice(Qe.indexOf(i))))}),!(r in $e&&($e[r]=!0,!t))){for(const n in $e)Object.prototype.hasOwnProperty.call($e,n)&&($e[n]=e[oy[n]]);if(e.getModifierState&&!(e.altKey&&!e.ctrlKey)&&e.getModifierState("AltGraph")&&(Qe.indexOf(17)===-1&&Qe.push(17),Qe.indexOf(18)===-1&&Qe.push(18),$e[17]=!0,$e[18]=!0),r in Zt){for(let n=0;n<Zt[r].length;n++)if((e.type==="keydown"&&Zt[r][n].keydown||e.type==="keyup"&&Zt[r][n].keyup)&&Zt[r][n].key){const i=Zt[r][n];hN(e,i,"all")}}}}const jc=e=>{let t;const n=()=>{clearTimeout(t),t=setTimeout(()=>{var i,s;e({height:window.innerHeight,width:window.innerWidth,availHeight:window.screen.availHeight,availWidth:window.screen.availWidth,colorDepth:window.screen.colorDepth,pixelDepth:window.screen.pixelDepth,orientation:(s=(i=window.screen.orientation)==null?void 0:i.angle)!=null?s:0})},500)};return window.addEventListener("resize",n),n(),()=>window.removeEventListener("resize",n)};var ar,$n,ly,$s,Qc,nn=function(){return window.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]},qn=function(e){if(document.readyState==="loading")return"loading";var t=nn();if(t){if(e<t.domInteractive)return"loading";if(t.domContentLoadedEventStart===0||e<t.domContentLoadedEventStart)return"dom-interactive";if(t.domComplete===0||e<t.domComplete)return"dom-content-loaded"}return"complete"},pN=function(e){var t=e.nodeName;return e.nodeType===1?t.toLowerCase():t.toUpperCase().replace(/^#/,"")},qs=function(e,t){var r="";try{for(;e&&e.nodeType!==9;){var n=e,i=n.id?"#"+n.id:pN(n)+(n.classList&&n.classList.value&&n.classList.value.trim()&&n.classList.value.trim().length?"."+n.classList.value.trim().replace(/\s+/g,"."):"");if(r.length+i.length>99)return r||i;if(r=r?i+">"+r:i,n.id)break;e=n.parentNode}}catch(s){}return r},cy=-1,uy=function(){return cy},Gr=function(e){addEventListener("pageshow",function(t){t.persisted&&(cy=t.timeStamp,e(t))},!0)},eo=function(){var e=nn();return e&&e.activationStart||0},bt=function(e,t){var r=nn(),n="navigate";return uy()>=0?n="back-forward-cache":r&&(document.prerendering||eo()>0?n="prerender":document.wasDiscarded?n="restore":r.type&&(n=r.type.replace(/_/g,"-"))),{name:e,value:t===void 0?-1:t,rating:"good",delta:0,entries:[],id:"v3-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:n}},sn=function(e,t,r){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var n=new PerformanceObserver(function(i){Promise.resolve().then(function(){t(i.getEntries())})});return n.observe(Object.assign({type:e,buffered:!0},r||{})),n}}catch(i){}},vt=function(e,t,r,n){var i,s;return function(o){t.value>=0&&(o||n)&&((s=t.value-(i||0))||i===void 0)&&(i=t.value,t.delta=s,t.rating=function(l,c){return l>c[1]?"poor":l>c[0]?"needs-improvement":"good"}(t.value,r),e(t))}},$c=function(e){requestAnimationFrame(function(){return requestAnimationFrame(function(){return e()})})},to=function(e){var t=function(r){r.type!=="pagehide"&&document.visibilityState!=="hidden"||e(r)};addEventListener("visibilitychange",t,!0),addEventListener("pagehide",t,!0)},qc=function(e){var t=!1;return function(r){t||(e(r),t=!0)}},on=-1,dy=function(){return document.visibilityState!=="hidden"||document.prerendering?1/0:0},ro=function(e){document.visibilityState==="hidden"&&on>-1&&(on=e.type==="visibilitychange"?e.timeStamp:0,mN())},hy=function(){addEventListener("visibilitychange",ro,!0),addEventListener("prerenderingchange",ro,!0)},mN=function(){removeEventListener("visibilitychange",ro,!0),removeEventListener("prerenderingchange",ro,!0)},eu=function(){return on<0&&(on=dy(),hy(),Gr(function(){setTimeout(function(){on=dy(),hy()},0)})),{get firstHiddenTime(){return on}}},ei=function(e){document.prerendering?addEventListener("prerenderingchange",function(){return e()},!0):e()},fy=[1800,3e3],py=function(e,t){t=t||{},ei(function(){var r,n=eu(),i=bt("FCP"),s=sn("paint",function(o){o.forEach(function(l){l.name==="first-contentful-paint"&&(s.disconnect(),l.startTime<n.firstHiddenTime&&(i.value=Math.max(l.startTime-eo(),0),i.entries.push(l),r(!0)))})});s&&(r=vt(e,i,fy,t.reportAllChanges),Gr(function(o){i=bt("FCP"),r=vt(e,i,fy,t.reportAllChanges),$c(function(){i.value=performance.now()-o.timeStamp,r(!0)})}))})},my=[.1,.25],gN=function(e,t){(function(r,n){n=n||{},py(qc(function(){var i,s=bt("CLS",0),o=0,l=[],c=function(h){h.forEach(function(u){if(!u.hadRecentInput){var f=l[0],d=l[l.length-1];o&&u.startTime-d.startTime<1e3&&u.startTime-f.startTime<5e3?(o+=u.value,l.push(u)):(o=u.value,l=[u])}}),o>s.value&&(s.value=o,s.entries=l,i())},a=sn("layout-shift",c);a&&(i=vt(r,s,my,n.reportAllChanges),to(function(){c(a.takeRecords()),i(!0)}),Gr(function(){o=0,s=bt("CLS",0),i=vt(r,s,my,n.reportAllChanges),$c(function(){return i()})}),setTimeout(i,0))}))})(function(r){(function(n){if(n.entries.length){var i=n.entries.reduce(function(l,c){return l&&l.value>c.value?l:c});if(i&&i.sources&&i.sources.length){var s=(o=i.sources).find(function(l){return l.node&&l.node.nodeType===1})||o[0];if(s)return void(n.attribution={largestShiftTarget:qs(s.node),largestShiftTime:i.startTime,largestShiftValue:i.value,largestShiftSource:s,largestShiftEntry:i,loadState:qn(i.startTime)})}}var o;n.attribution={}})(r),e(r)},t)},yN=function(e,t){py(function(r){(function(n){if(n.entries.length){var i=nn(),s=n.entries[n.entries.length-1];if(i){var o=i.activationStart||0,l=Math.max(0,i.responseStart-o);return void(n.attribution={timeToFirstByte:l,firstByteToFCP:n.value-l,loadState:qn(n.entries[0].startTime),navigationEntry:i,fcpEntry:s})}}n.attribution={timeToFirstByte:0,firstByteToFCP:n.value,loadState:qn(uy())}})(r),e(r)},t)},ti={passive:!0,capture:!0},bN=new Date,gy=function(e,t){ar||(ar=t,$n=e,ly=new Date,by(removeEventListener),yy())},yy=function(){if($n>=0&&$n<ly-bN){var e={entryType:"first-input",name:ar.type,target:ar.target,cancelable:ar.cancelable,startTime:ar.timeStamp,processingStart:ar.timeStamp+$n};$s.forEach(function(t){t(e)}),$s=[]}},vN=function(e){if(e.cancelable){var t=(e.timeStamp>1e12?new Date:performance.now())-e.timeStamp;e.type=="pointerdown"?function(r,n){var i=function(){gy(r,n),o()},s=function(){o()},o=function(){removeEventListener("pointerup",i,ti),removeEventListener("pointercancel",s,ti)};addEventListener("pointerup",i,ti),addEventListener("pointercancel",s,ti)}(t,e):gy(t,e)}},by=function(e){["mousedown","keydown","touchstart","pointerdown"].forEach(function(t){return e(t,vN,ti)})},vy=[100,300],SN=function(e,t){t=t||{},ei(function(){var r,n=eu(),i=bt("FID"),s=function(c){c.startTime<n.firstHiddenTime&&(i.value=c.processingStart-c.startTime,i.entries.push(c),r(!0))},o=function(c){c.forEach(s)},l=sn("first-input",o);r=vt(e,i,vy,t.reportAllChanges),l&&to(qc(function(){o(l.takeRecords()),l.disconnect()})),l&&Gr(function(){var c;i=bt("FID"),r=vt(e,i,vy,t.reportAllChanges),$s=[],$n=-1,ar=null,by(addEventListener),c=s,$s.push(c),yy()})})},wN=function(e,t){SN(function(r){(function(n){var i=n.entries[0];n.attribution={eventTarget:qs(i.target),eventType:i.name,eventTime:i.startTime,eventEntry:i,loadState:qn(i.startTime)}})(r),e(r)},t)},Sy=0,tu=1/0,no=0,RN=function(e){e.forEach(function(t){t.interactionId&&(tu=Math.min(tu,t.interactionId),no=Math.max(no,t.interactionId),Sy=no?(no-tu)/7+1:0)})},wy=function(){return Qc?Sy:performance.interactionCount||0},_N=function(){"interactionCount"in performance||Qc||(Qc=sn("event",RN,{type:"event",buffered:!0,durationThreshold:0}))},Ry=[200,500],_y=0,Ty=function(){return wy()-_y},Vt=[],ru={},Ey=function(e){var t=Vt[Vt.length-1],r=ru[e.interactionId];if(r||Vt.length<10||e.duration>t.latency){if(r)r.entries.push(e),r.latency=Math.max(r.latency,e.duration);else{var n={id:e.interactionId,latency:e.duration,entries:[e]};ru[n.id]=n,Vt.push(n)}Vt.sort(function(i,s){return s.latency-i.latency}),Vt.splice(10).forEach(function(i){delete ru[i.id]})}},TN=function(e,t){t=t||{},ei(function(){var r;_N();var n,i=bt("INP"),s=function(l){l.forEach(function(h){h.interactionId&&Ey(h),h.entryType==="first-input"&&!Vt.some(function(u){return u.entries.some(function(f){return h.duration===f.duration&&h.startTime===f.startTime})})&&Ey(h)});var c,a=(c=Math.min(Vt.length-1,Math.floor(Ty()/50)),Vt[c]);a&&a.latency!==i.value&&(i.value=a.latency,i.entries=a.entries,n())},o=sn("event",s,{durationThreshold:(r=t.durationThreshold)!==null&&r!==void 0?r:40});n=vt(e,i,Ry,t.reportAllChanges),o&&("interactionId"in PerformanceEventTiming.prototype&&o.observe({type:"first-input",buffered:!0}),to(function(){s(o.takeRecords()),i.value<0&&Ty()>0&&(i.value=0,i.entries=[]),n(!0)}),Gr(function(){Vt=[],_y=wy(),i=bt("INP"),n=vt(e,i,Ry,t.reportAllChanges)}))})},EN=function(e,t){TN(function(r){(function(n){if(n.entries.length){var i=n.entries.sort(function(s,o){return o.duration-s.duration||o.processingEnd-o.processingStart-(s.processingEnd-s.processingStart)})[0];n.attribution={eventTarget:qs(i.target),eventType:i.name,eventTime:i.startTime,eventEntry:i,loadState:qn(i.startTime)}}else n.attribution={}})(r),e(r)},t)},Iy=[2500,4e3],nu={},IN=function(e,t){(function(r,n){n=n||{},ei(function(){var i,s=eu(),o=bt("LCP"),l=function(h){var u=h[h.length-1];u&&u.startTime<s.firstHiddenTime&&(o.value=Math.max(u.startTime-eo(),0),o.entries=[u],i())},c=sn("largest-contentful-paint",l);if(c){i=vt(r,o,Iy,n.reportAllChanges);var a=qc(function(){nu[o.id]||(l(c.takeRecords()),c.disconnect(),nu[o.id]=!0,i(!0))});["keydown","click"].forEach(function(h){addEventListener(h,function(){return setTimeout(a,0)},!0)}),to(a),Gr(function(h){o=bt("LCP"),i=vt(r,o,Iy,n.reportAllChanges),$c(function(){o.value=performance.now()-h.timeStamp,nu[o.id]=!0,i(!0)})})}})})(function(r){(function(n){if(n.entries.length){var i=nn();if(i){var s=i.activationStart||0,o=n.entries[n.entries.length-1],l=o.url&&performance.getEntriesByType("resource").filter(function(d){return d.name===o.url})[0],c=Math.max(0,i.responseStart-s),a=Math.max(c,l?(l.requestStart||l.startTime)-s:0),h=Math.max(a,l?l.responseEnd-s:0),u=Math.max(h,o?o.startTime-s:0),f={element:qs(o.element),timeToFirstByte:c,resourceLoadDelay:a-c,resourceLoadTime:h-a,elementRenderDelay:u-h,navigationEntry:i,lcpEntry:o};return o.url&&(f.url=o.url),l&&(f.lcpResourceEntry=l),void(n.attribution=f)}}n.attribution={timeToFirstByte:0,resourceLoadDelay:0,resourceLoadTime:0,elementRenderDelay:n.value}})(r),e(r)},t)},Cy=[800,1800],CN=function e(t){document.prerendering?ei(function(){return e(t)}):document.readyState!=="complete"?addEventListener("load",function(){return e(t)},!0):setTimeout(t,0)},ZN=function(e,t){t=t||{};var r=bt("TTFB"),n=vt(e,r,Cy,t.reportAllChanges);CN(function(){var i=nn();if(i){var s=i.responseStart;if(s<=0||s>performance.now())return;r.value=Math.max(s-eo(),0),r.entries=[i],n(!0),Gr(function(){r=bt("TTFB",0),(n=vt(e,r,Cy,t.reportAllChanges))(!0)})}})},LN=function(e,t){ZN(function(r){(function(n){if(n.entries.length){var i=n.entries[0],s=i.activationStart||0,o=Math.max(i.domainLookupStart-s,0),l=Math.max(i.connectStart-s,0),c=Math.max(i.requestStart-s,0);n.attribution={waitingTime:o,dnsTime:l-o,connectionTime:c-l,requestTime:n.value-c,navigationEntry:i}}else n.attribution={waitingTime:0,dnsTime:0,connectionTime:0,requestTime:0}})(r),e(r)},t)};const Zy=e=>(gN(e),yN(e),wN(e),IN(e),LN(e),EN(e),()=>{}),an=typeof navigator!="undefined"&&"connection"in navigator?navigator.connection:{},Ly=(e,t)=>{const r=()=>{const s=(new Date().getTime()-t)/1e3;e({relativeTimestamp:s,downlink:an.downlink,downlinkMax:an.downlinkMax,effectiveType:an.effectiveType,rtt:an.rtt,saveData:an.saveData,type:an.type})};r();let n;return n=setInterval(()=>{r()},1e3),()=>{clearInterval(n)}},io="iframe parent ready",so="iframe ok",ri="highlightLogs",xN=e=>{let t=He(ri)||"";t=t+"["+new Date().getTime()+"] "+e+`
|
|
467
|
+
`,mt(ri,t)},xy=()=>He(ri)||"",Ny=e=>{if(!e)return;let t=He(ri)||"";t&&(t.startsWith(e)?(t=t.slice(e.length),mt(ri,t)):xN("Unable to clear logs "+e.replace(`
|
|
468
468
|
`," ")+" from "+t.replace(`
|
|
469
|
-
`," ")))},
|
|
469
|
+
`," ")))},Oy=()=>{if(!("performance"in window&&"memory"in performance))return{getDeviceDetails:void 0,getCurrentDeviceDetails:void 0};const e=window.performance;return{getDeviceDetails:()=>({deviceMemory:NN(navigator.deviceMemory||0)}),getCurrentDeviceDetails:()=>{const n=iu(e.memory.jsHeapSizeLimit),i=iu(e.memory.totalJSHeapSize),s=iu(e.memory.usedJSHeapSize);return{jsHeapSizeLimit:n,totalJSHeapSize:i,usedJSHeapSize:s}}}},iu=e=>e/Math.pow(1e3,2),NN=e=>1024*e;var Gy={exports:{}};/**
|
|
470
470
|
* @preserve
|
|
471
471
|
* JS Implementation of incremental MurmurHash3 (r150) (as of May 10, 2013)
|
|
472
472
|
*
|
|
@@ -476,20 +476,20 @@ ${d}`,w),S=_===-1,b=S?f.length:_,R=(o=/\bname="([^"]*)"/i.exec(y))==null?void 0:
|
|
|
476
476
|
* @see http://github.com/garycourt/murmurhash-js
|
|
477
477
|
* @author <a href="mailto:aappleby@gmail.com">Austin Appleby</a>
|
|
478
478
|
* @see http://sites.google.com/site/murmurhash/
|
|
479
|
-
*/(function(e){(function(){var t;function r(n,i){var s=this instanceof r?this:t;if(s.reset(i),typeof n=="string"&&n.length>0&&s.hash(n),s!==this)return s}r.prototype.hash=function(n){var i,s,o,l,u;switch(u=n.length,this.len+=u,s=this.k1,o=0,this.rem){case 0:s^=u>o?n.charCodeAt(o++)&65535:0;case 1:s^=u>o?(n.charCodeAt(o++)&65535)<<8:0;case 2:s^=u>o?(n.charCodeAt(o++)&65535)<<16:0;case 3:s^=u>o?(n.charCodeAt(o)&255)<<24:0,s^=u>o?(n.charCodeAt(o++)&65280)>>8:0}if(this.rem=u+this.rem&3,u-=this.rem,u>0){for(i=this.h1;s=s*11601+(s&65535)*3432906752&4294967295,s=s<<15|s>>>17,s=s*13715+(s&65535)*461832192&4294967295,i^=s,i=i<<13|i>>>19,i=i*5+3864292196&4294967295,!(o>=u);)s=n.charCodeAt(o++)&65535^(n.charCodeAt(o++)&65535)<<8^(n.charCodeAt(o++)&65535)<<16,l=n.charCodeAt(o++),s^=(l&255)<<24^(l&65280)>>8;switch(s=0,this.rem){case 3:s^=(n.charCodeAt(o+2)&65535)<<16;case 2:s^=(n.charCodeAt(o+1)&65535)<<8;case 1:s^=n.charCodeAt(o)&65535}this.h1=i}return this.k1=s,this},r.prototype.result=function(){var n,i;return n=this.k1,i=this.h1,n>0&&(n=n*11601+(n&65535)*3432906752&4294967295,n=n<<15|n>>>17,n=n*13715+(n&65535)*461832192&4294967295,i^=n),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},r.prototype.reset=function(n){return this.h1=typeof n=="number"?n:0,this.rem=this.k1=this.len=0,this},t=new r,e.exports=r})()})(Zy);var EN=Zy.exports;const IN=fi(EN),nc=28,ln="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",CN=2246822507,St=e=>{var r;var t="";if(e){const n=IN(e).result();for(let i=0;i<nc;i++){const o=((n^i*CN)>>>0)%ln.length;t+=ln.charAt(o)}}else{const n=typeof window!="undefined"&&((r=window.crypto)==null?void 0:r.getRandomValues),i=new Uint32Array(nc);n&&window.crypto.getRandomValues(i);for(let s=0;s<nc;s++)n?t+=ln.charAt(i[s]%ln.length):t+=ln.charAt(Math.floor(Math.random()*ln.length))}return t},ZN={TTFB:"ms",FCP:"ms",LCP:"ms",INP:"ms",FID:"ms",Jank:"ms",CLS:"1",usedJSHeapSize:"By",jsHeapSizeLimit:"By",totalJSHeapSize:"By",fps:"{frames}/s",[Xe.ViewportHeight]:"{px}",[Xe.ViewportWidth]:"{px}",[Xe.ScreenHeight]:"{px}",[Xe.ScreenWidth]:"{px}",[Xe.ViewportArea]:"{px2}",[Xe.DeviceMemory]:"MiBy",downlink:"Mbit/s",downlinkMax:"Mbit/s",rtt:"ms","long_task.duration":"ms"};function lr(e,t){const r=t!=null?t:ZN[e];return r?{unit:r}:void 0}var it=Uint8Array,st=Uint16Array,ic=Int32Array,sc=new it([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),oc=new it([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),Ly=new it([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),xy=function(e,t){for(var r=new st(31),n=0;n<31;++n)r[n]=t+=1<<e[n-1];for(var i=new ic(r[30]),n=1;n<30;++n)for(var s=r[n];s<r[n+1];++s)i[s]=s-r[n]<<5|n;return{b:r,r:i}},Ny=xy(sc,2),LN=Ny.b,ac=Ny.r;LN[28]=258,ac[258]=28;for(var xN=xy(oc,0),Oy=xN.r,lc=new st(32768),Ee=0;Ee<32768;++Ee){var ur=(Ee&43690)>>1|(Ee&21845)<<1;ur=(ur&52428)>>2|(ur&13107)<<2,ur=(ur&61680)>>4|(ur&3855)<<4,lc[Ee]=((ur&65280)>>8|(ur&255)<<8)>>1}for(var ei=function(e,t,r){for(var n=e.length,i=0,s=new st(t);i<n;++i)e[i]&&++s[e[i]-1];var o=new st(t);for(i=1;i<t;++i)o[i]=o[i-1]+s[i-1]<<1;var l;if(r){l=new st(1<<t);var u=15-t;for(i=0;i<n;++i)if(e[i])for(var a=i<<4|e[i],h=t-e[i],c=o[e[i]-1]++<<h,f=c|(1<<h)-1;c<=f;++c)l[lc[c]>>u]=a}else for(l=new st(n),i=0;i<n;++i)e[i]&&(l[i]=lc[o[e[i]-1]++]>>15-e[i]);return l},Gr=new it(288),Ee=0;Ee<144;++Ee)Gr[Ee]=8;for(var Ee=144;Ee<256;++Ee)Gr[Ee]=9;for(var Ee=256;Ee<280;++Ee)Gr[Ee]=7;for(var Ee=280;Ee<288;++Ee)Gr[Ee]=8;for(var so=new it(32),Ee=0;Ee<32;++Ee)so[Ee]=5;var NN=ei(Gr,9,0),ON=ei(so,5,0),Gy=function(e){return(e+7)/8|0},Vy=function(e,t,r){return(r==null||r>e.length)&&(r=e.length),new it(e.subarray(t,r))},Bt=function(e,t,r){r<<=t&7;var n=t/8|0;e[n]|=r,e[n+1]|=r>>8},ti=function(e,t,r){r<<=t&7;var n=t/8|0;e[n]|=r,e[n+1]|=r>>8,e[n+2]|=r>>16},uc=function(e,t){for(var r=[],n=0;n<e.length;++n)e[n]&&r.push({s:n,f:e[n]});var i=r.length,s=r.slice();if(!i)return{t:Py,l:0};if(i==1){var o=new it(r[0].s+1);return o[r[0].s]=1,{t:o,l:1}}r.sort(function(S,b){return S.f-b.f}),r.push({s:-1,f:25001});var l=r[0],u=r[1],a=0,h=1,c=2;for(r[0]={s:-1,f:l.f+u.f,l,r:u};h!=i-1;)l=r[r[a].f<r[c].f?a++:c++],u=r[a!=h&&r[a].f<r[c].f?a++:c++],r[h++]={s:-1,f:l.f+u.f,l,r:u};for(var f=s[0].s,n=1;n<i;++n)s[n].s>f&&(f=s[n].s);var d=new st(f+1),p=cc(r[h-1],d,0);if(p>t){var n=0,m=0,g=p-t,v=1<<g;for(s.sort(function(b,R){return d[R.s]-d[b.s]||b.f-R.f});n<i;++n){var y=s[n].s;if(d[y]>t)m+=v-(1<<p-d[y]),d[y]=t;else break}for(m>>=g;m>0;){var w=s[n].s;d[w]<t?m-=1<<t-d[w]++-1:++n}for(;n>=0&&m;--n){var _=s[n].s;d[_]==t&&(--d[_],++m)}p=t}return{t:new it(d),l:p}},cc=function(e,t,r){return e.s==-1?Math.max(cc(e.l,t,r+1),cc(e.r,t,r+1)):t[e.s]=r},ky=function(e){for(var t=e.length;t&&!e[--t];);for(var r=new st(++t),n=0,i=e[0],s=1,o=function(u){r[n++]=u},l=1;l<=t;++l)if(e[l]==i&&l!=t)++s;else{if(!i&&s>2){for(;s>138;s-=138)o(32754);s>2&&(o(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(o(i),--s;s>6;s-=6)o(8304);s>2&&(o(s-3<<5|8208),s=0)}for(;s--;)o(i);s=1,i=e[l]}return{c:r.subarray(0,n),n:t}},ri=function(e,t){for(var r=0,n=0;n<t.length;++n)r+=e[n]*t[n];return r},Xy=function(e,t,r){var n=r.length,i=Gy(t+2);e[i]=n&255,e[i+1]=n>>8,e[i+2]=e[i]^255,e[i+3]=e[i+1]^255;for(var s=0;s<n;++s)e[i+s+4]=r[s];return(i+4+n)*8},Wy=function(e,t,r,n,i,s,o,l,u,a,h){Bt(t,h++,r),++i[256];for(var c=uc(i,15),f=c.t,d=c.l,p=uc(s,15),m=p.t,g=p.l,v=ky(f),y=v.c,w=v.n,_=ky(m),S=_.c,b=_.n,R=new st(19),I=0;I<y.length;++I)++R[y[I]&31];for(var I=0;I<S.length;++I)++R[S[I]&31];for(var E=uc(R,7),C=E.t,N=E.l,G=19;G>4&&!C[Ly[G-1]];--G);var $=a+5<<3,Z=ri(i,Gr)+ri(s,so)+o,T=ri(i,f)+ri(s,m)+o+14+3*G+ri(R,C)+2*R[16]+3*R[17]+7*R[18];if(u>=0&&$<=Z&&$<=T)return Xy(t,h,e.subarray(u,u+a));var W,k,M,P;if(Bt(t,h,1+(T<Z)),h+=2,T<Z){W=ei(f,d,0),k=f,M=ei(m,g,0),P=m;var U=ei(C,N,0);Bt(t,h,w-257),Bt(t,h+5,b-1),Bt(t,h+10,G-4),h+=14;for(var I=0;I<G;++I)Bt(t,h+3*I,C[Ly[I]]);h+=3*G;for(var Q=[y,S],me=0;me<2;++me)for(var O=Q[me],I=0;I<O.length;++I){var ye=O[I]&31;Bt(t,h,U[ye]),h+=C[ye],ye>15&&(Bt(t,h,O[I]>>5&127),h+=O[I]>>12)}}else W=NN,k=Gr,M=ON,P=so;for(var I=0;I<l;++I){var de=n[I];if(de>255){var ye=de>>18&31;ti(t,h,W[ye+257]),h+=k[ye+257],ye>7&&(Bt(t,h,de>>23&31),h+=sc[ye]);var ve=de&31;ti(t,h,M[ve]),h+=P[ve],ve>3&&(ti(t,h,de>>5&8191),h+=oc[ve])}else ti(t,h,W[de]),h+=k[de]}return ti(t,h,W[256]),h+k[256]},GN=new ic([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Py=new it(0),VN=function(e,t,r,n,i,s){var o=s.z||e.length,l=new it(n+o+5*(1+Math.ceil(o/7e3))+i),u=l.subarray(n,l.length-i),a=s.l,h=(s.r||0)&7;if(t){h&&(u[0]=s.r>>3);for(var c=GN[t-1],f=c>>13,d=c&8191,p=(1<<r)-1,m=s.p||new st(32768),g=s.h||new st(p+1),v=Math.ceil(r/3),y=2*v,w=function(ue){return(e[ue]^e[ue+1]<<v^e[ue+2]<<y)&p},_=new ic(25e3),S=new st(288),b=new st(32),R=0,I=0,E=s.i||0,C=0,N=s.w||0,G=0;E+2<o;++E){var $=w(E),Z=E&32767,T=g[$];if(m[Z]=T,g[$]=Z,N<=E){var W=o-E;if((R>7e3||C>24576)&&(W>423||!a)){h=Wy(e,u,0,_,S,b,I,C,G,E-G,h),C=R=I=0,G=E;for(var k=0;k<286;++k)S[k]=0;for(var k=0;k<30;++k)b[k]=0}var M=2,P=0,U=d,Q=Z-T&32767;if(W>2&&$==w(E-Q))for(var me=Math.min(f,W)-1,O=Math.min(32767,E),ye=Math.min(258,W);Q<=O&&--U&&Z!=T;){if(e[E+M]==e[E+M-Q]){for(var de=0;de<ye&&e[E+de]==e[E+de-Q];++de);if(de>M){if(M=de,P=Q,de>me)break;for(var ve=Math.min(Q,de-2),D=0,k=0;k<ve;++k){var F=E-Q+k&32767,H=m[F],j=F-H&32767;j>D&&(D=j,T=F)}}}Z=T,T=m[Z],Q+=Z-T&32767}if(P){_[C++]=268435456|ac[M]<<18|Oy[P];var te=ac[M]&31,z=Oy[P]&31;I+=sc[te]+oc[z],++S[257+te],++b[z],N=E+M,++R}else _[C++]=e[E],++S[e[E]]}}for(E=Math.max(E,N);E<o;++E)_[C++]=e[E],++S[e[E]];h=Wy(e,u,a,_,S,b,I,C,G,E-G,h),a||(s.r=h&7|u[h/8|0]<<3,h-=7,s.h=g,s.p=m,s.i=E,s.w=N)}else{for(var E=s.w||0;E<o+a;E+=65535){var ie=E+65535;ie>=o&&(u[h/8|0]=a,ie=o),h=Xy(u,h+1,e.subarray(E,ie))}s.i=o}return Vy(l,0,n+Gy(h)+i)},kN=function(){for(var e=new Int32Array(256),t=0;t<256;++t){for(var r=t,n=9;--n;)r=(r&1&&-306674912)^r>>>1;e[t]=r}return e}(),XN=function(){var e=-1;return{p:function(t){for(var r=e,n=0;n<t.length;++n)r=kN[r&255^t[n]]^r>>>8;e=r},d:function(){return~e}}},WN=function(e,t,r,n,i){if(!i&&(i={l:1},t.dictionary)){var s=t.dictionary.subarray(-32768),o=new it(s.length+e.length);o.set(s),o.set(e,s.length),e=o,i.w=s.length}return VN(e,t.level==null?6:t.level,t.mem==null?i.l?Math.ceil(Math.max(8,Math.min(13,Math.log(e.length)))*1.5):20:12+t.mem,r,n,i)},dc=function(e,t,r){for(;r;++t)e[t]=r,r>>>=8},PN=function(e,t){var r=t.filename;if(e[0]=31,e[1]=139,e[2]=8,e[8]=t.level<2?4:t.level==9?2:0,e[9]=3,t.mtime!=0&&dc(e,4,Math.floor(new Date(t.mtime||Date.now())/1e3)),r){e[3]=8;for(var n=0;n<=r.length;++n)e[n+10]=r.charCodeAt(n)}},MN=function(e){return 10+(e.filename?e.filename.length+1:0)};function AN(e,t){t||(t={});var r=XN(),n=e.length;r.p(e);var i=WN(e,t,MN(t),8),s=i.length;return PN(i,t),dc(i,s-8,r.d()),dc(i,s-4,n),i}var My=typeof TextEncoder!="undefined"&&new TextEncoder,UN=typeof TextDecoder!="undefined"&&new TextDecoder;try{UN.decode(Py,{stream:!0})}catch(e){}function DN(e,t){var r;if(My)return My.encode(e);for(var n=e.length,i=new it(e.length+(e.length>>1)),s=0,o=function(a){i[s++]=a},r=0;r<n;++r){if(s+5>i.length){var l=new it(s+8+(n-r<<1));l.set(i),i=l}var u=e.charCodeAt(r);u<128||t?o(u):u<2048?(o(192|u>>6),o(128|u&63)):u>55295&&u<57344?(u=65536+(u&1047552)|e.charCodeAt(++r)&1023,o(240|u>>18),o(128|u>>12&63),o(128|u>>6&63),o(128|u&63)):(o(224|u>>12),o(128|u>>6&63),o(128|u&63))}return Vy(i,0,s)}function Ay(e){return q(this,null,function*(){const t=DN(JSON.stringify(e)),r=AN(t),n=yield new Promise(i=>{const s=new FileReader;s.onload=()=>i(s.result),s.readAsDataURL(new Blob([new Uint8Array(r)]))});return{compressedBase64:n.slice(n.indexOf(",")+1),compressedSize:r.length,bufferLength:t.length}})}const Uy="dmFyIFFyPU9iamVjdC5kZWZpbmVQcm9wZXJ0eSxYcj1PYmplY3QuZGVmaW5lUHJvcGVydGllczt2YXIgV3I9T2JqZWN0LmdldE93blByb3BlcnR5RGVzY3JpcHRvcnM7dmFyICRlPU9iamVjdC5nZXRPd25Qcm9wZXJ0eVN5bWJvbHM7dmFyIG9uPU9iamVjdC5wcm90b3R5cGUuaGFzT3duUHJvcGVydHksYW49T2JqZWN0LnByb3RvdHlwZS5wcm9wZXJ0eUlzRW51bWVyYWJsZTt2YXIgbXQ9KEYsQiwkKT0+QiBpbiBGP1FyKEYsQix7ZW51bWVyYWJsZTohMCxjb25maWd1cmFibGU6ITAsd3JpdGFibGU6ITAsdmFsdWU6JH0pOkZbQl09JCxEPShGLEIpPT57Zm9yKHZhciAkIGluIEJ8fChCPXt9KSlvbi5jYWxsKEIsJCkmJm10KEYsJCxCWyRdKTtpZigkZSlmb3IodmFyICQgb2YgJGUoQikpYW4uY2FsbChCLCQpJiZtdChGLCQsQlskXSk7cmV0dXJuIEZ9LFVlPShGLEIpPT5YcihGLFdyKEIpKTt2YXIgdmU9KEYsQik9Pnt2YXIgJD17fTtmb3IodmFyIGVlIGluIEYpb24uY2FsbChGLGVlKSYmQi5pbmRleE9mKGVlKTwwJiYoJFtlZV09RltlZV0pO2lmK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JldHVybn1pZighdSgpKXtkLnB1c2goZy5kYXRhLm1lc3NhZ2UpO3JldHVybn10cnl7eWllbGQgTChnLmRhdGEubWVzc2FnZSksaT0wLHlpZWxkIHEoKX1jYXRjaChFKXtzJiZjb25zb2xlLmVycm9yKEUpLGkrPTF9fSl9fX0pKCk7Ci8vIyBzb3VyY2VNYXBwaW5nVVJMPWhpZ2hsaWdodC1jbGllbnQtd29ya2VyLURyRFBSQ3J2LmpzLm1hcAo=",FN=e=>Uint8Array.from(atob(e),t=>t.charCodeAt(0)),Dy=typeof self!="undefined"&&self.Blob&&new Blob([FN(Uy)],{type:"text/javascript;charset=utf-8"});function Fy(e){let t;try{if(t=Dy&&(self.URL||self.webkitURL).createObjectURL(Dy),!t)throw"";const r=new Worker(t,{name:e==null?void 0:e.name});return r.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(t)}),r}catch(r){return new Worker("data:text/javascript;base64,"+Uy,{name:e==null?void 0:e.name})}finally{t&&(self.URL||self.webkitURL).revokeObjectURL(t)}}var Ue=(e=>(e[e.Initialize=0]="Initialize",e[e.Reset=1]="Reset",e[e.AsyncEvents=2]="AsyncEvents",e[e.Identify=3]="Identify",e[e.Properties=4]="Properties",e[e.Metrics=5]="Metrics",e[e.Feedback=6]="Feedback",e[e.CustomEvent=7]="CustomEvent",e[e.Stop=8]="Stop",e[e.GetStatus=9]="GetStatus",e))(Ue||{});function JN(e){return"regexValue"in e}function HN(e){return"matchValue"in e}function YN(e){const t=Math.trunc(e);return t===1?!0:t===0?!1:Math.floor(Math.random()*t)===0}class Jy{constructor(t=YN){L(this,"regexCache",new Map);L(this,"config");this.sampler=t}setConfig(t){this.config=t}isSamplingEnabled(){var t,r,n,i;return!!((r=(t=this.config)==null?void 0:t.logs)!=null&&r.length||(i=(n=this.config)==null?void 0:n.spans)!=null&&i.length)}shouldSample(t){var r,n;return t.name===_g?this.sampleLog((r=this.config)==null?void 0:r.logs,t):this.sampleSpan((n=this.config)==null?void 0:n.spans,t)}matchesValue(t,r){if(!t)return!1;if(HN(t))return t.matchValue===r;if(JN(t)){const n=t.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(t,r){if(t)for(const n of t){let i=!1;for(const s of Object.keys(r))if(this.matchesValue(n.key,s)){const o=r[s];if(this.matchesValue(n.attribute,o)){i=!0;break}}if(!i)return!1}return!0}matchEvent(t,r){return!(t.name&&!this.matchesValue(t.name,r.name)||t.attributes&&(!r.attributes||!this.matchesAttributes(t.attributes,r.attributes)))}matchesEvents(t,r){if(t)for(const n of t){let i=!1;for(const s of r)if(this.matchEvent(n,s)){i=!0;break}if(!i)return!1}return!0}matchesSpanConfig(t,r){return!(t.name&&!this.matchesValue(t.name,r.name)||!this.matchesAttributes(t.attributes,r.attributes)||!this.matchesEvents(t.events,r.events))}matchesLogConfig(t,r){if(t.severityText){const n=r[Eg];if(!this.matchesValue(t.severityText,n))return!1}if(t.message){const n=r[Ig];if(!this.matchesValue(t.message,n))return!1}return!!this.matchesAttributes(t.attributes,r)}sampleSpan(t,r){if(t){for(const n of t)if(this.matchesSpanConfig(n,r))return{sample:this.sampler(n.samplingRatio),attributes:{[Tg]:n.samplingRatio}}}return{sample:!0}}sampleLog(t,r){if(t){for(const n of t)if(this.matchesLogConfig(n,r.attributes))return{sample:this.sampler(n.samplingRatio),attributes:{[Tg]:n.samplingRatio}}}return{sample:!0}}}const ni=(e,t)=>{_e("warn",`Highlight Warning: (${e}): `,{output:t})},pc=class pc{constructor(t,r){L(this,"options");L(this,"isRunningOnHighlight");L(this,"organizationID");uo(this,oi);L(this,"events");L(this,"sessionData");L(this,"ready");L(this,"manualStopped");L(this,"state");L(this,"logger");L(this,"enableSegmentIntegration");L(this,"privacySetting");L(this,"enableCanvasRecording");L(this,"enablePerformanceRecording");L(this,"samplingStrategy");L(this,"inlineImages");L(this,"inlineVideos");L(this,"inlineStylesheet");L(this,"styleSheetResyncInterval");L(this,"debugOptions");L(this,"listeners");L(this,"firstloadVersion");L(this,"environment");L(this,"sessionShortcut");L(this,"appVersion");L(this,"serviceName");L(this,"_worker");L(this,"_optionsInternal");L(this,"_backendUrl");L(this,"_recordingStartTime");L(this,"_isOnLocalHost");L(this,"_onToggleFeedbackFormVisibility");L(this,"_firstLoadListeners");L(this,"_isCrossOriginIframe");L(this,"_eventBytesSinceSnapshot");L(this,"_lastSnapshotTime");L(this,"_lastVisibilityChangeTime");L(this,"pushPayloadTimerId");L(this,"hasSessionUnloaded");L(this,"hasPushedData");L(this,"reloaded");L(this,"_hasPreviouslyInitialized");L(this,"_recordStop");L(this,"_gauges",new Map);L(this,"_counters",new Map);L(this,"_histograms",new Map);L(this,"_up_down_counters",new Map);L(this,"_integrations",[]);var i,s,o,l,u;t.sessionSecureID||(t.sessionSecureID=St()),this.options=t,typeof((i=this.options)==null?void 0:i.debug)=="boolean"?this.debugOptions=this.options.debug?{clientInteractions:!0}:{}:this.debugOptions=(o=(s=this.options)==null?void 0:s.debug)!=null?o:{},this.logger=new xu(this.debugOptions.clientInteractions),t.debug&&ul(!0),t.storageMode&&(this.logger.log(`initializing in ${t.storageMode} session mode`),jp(t.storageMode)),Ls(!!(t!=null&&t.sessionCookie)),this._worker=new Fy,this._worker.onmessage=a=>{var h,c,f;((h=a.data.response)==null?void 0:h.type)===Ue.AsyncEvents?(this._eventBytesSinceSnapshot+=a.data.response.eventsSize,this.logger.log(`Web worker sent payloadID ${a.data.response.id} size ${a.data.response.eventsSize} bytes, compression ratio ${a.data.response.eventsSize/a.data.response.compressedSize}.
|
|
480
|
-
Total since snapshot: ${(this._eventBytesSinceSnapshot/1e6).toFixed(1)}MB`)):((
|
|
479
|
+
*/(function(e){(function(){var t;function r(n,i){var s=this instanceof r?this:t;if(s.reset(i),typeof n=="string"&&n.length>0&&s.hash(n),s!==this)return s}r.prototype.hash=function(n){var i,s,o,l,c;switch(c=n.length,this.len+=c,s=this.k1,o=0,this.rem){case 0:s^=c>o?n.charCodeAt(o++)&65535:0;case 1:s^=c>o?(n.charCodeAt(o++)&65535)<<8:0;case 2:s^=c>o?(n.charCodeAt(o++)&65535)<<16:0;case 3:s^=c>o?(n.charCodeAt(o)&255)<<24:0,s^=c>o?(n.charCodeAt(o++)&65280)>>8:0}if(this.rem=c+this.rem&3,c-=this.rem,c>0){for(i=this.h1;s=s*11601+(s&65535)*3432906752&4294967295,s=s<<15|s>>>17,s=s*13715+(s&65535)*461832192&4294967295,i^=s,i=i<<13|i>>>19,i=i*5+3864292196&4294967295,!(o>=c);)s=n.charCodeAt(o++)&65535^(n.charCodeAt(o++)&65535)<<8^(n.charCodeAt(o++)&65535)<<16,l=n.charCodeAt(o++),s^=(l&255)<<24^(l&65280)>>8;switch(s=0,this.rem){case 3:s^=(n.charCodeAt(o+2)&65535)<<16;case 2:s^=(n.charCodeAt(o+1)&65535)<<8;case 1:s^=n.charCodeAt(o)&65535}this.h1=i}return this.k1=s,this},r.prototype.result=function(){var n,i;return n=this.k1,i=this.h1,n>0&&(n=n*11601+(n&65535)*3432906752&4294967295,n=n<<15|n>>>17,n=n*13715+(n&65535)*461832192&4294967295,i^=n),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},r.prototype.reset=function(n){return this.h1=typeof n=="number"?n:0,this.rem=this.k1=this.len=0,this},t=new r,e.exports=r})()})(Gy);var ON=Gy.exports;const GN=gi(ON),su=28,ln="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",VN=2246822507,St=e=>{var r;var t="";if(e){const n=GN(e).result();for(let i=0;i<su;i++){const o=((n^i*VN)>>>0)%ln.length;t+=ln.charAt(o)}}else{const n=typeof window!="undefined"&&((r=window.crypto)==null?void 0:r.getRandomValues),i=new Uint32Array(su);n&&window.crypto.getRandomValues(i);for(let s=0;s<su;s++)n?t+=ln.charAt(i[s]%ln.length):t+=ln.charAt(Math.floor(Math.random()*ln.length))}return t},kN={TTFB:"ms",FCP:"ms",LCP:"ms",INP:"ms",FID:"ms",Jank:"ms",CLS:"1",usedJSHeapSize:"By",jsHeapSizeLimit:"By",totalJSHeapSize:"By",fps:"{frames}/s",[Xe.ViewportHeight]:"{px}",[Xe.ViewportWidth]:"{px}",[Xe.ScreenHeight]:"{px}",[Xe.ScreenWidth]:"{px}",[Xe.ViewportArea]:"{px2}",[Xe.DeviceMemory]:"MiBy",downlink:"Mbit/s",downlinkMax:"Mbit/s",rtt:"ms","long_task.duration":"ms"};function lr(e,t){const r=t!=null?t:kN[e];return r?{unit:r}:void 0}var st=Uint8Array,ot=Uint16Array,ou=Int32Array,au=new st([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),lu=new st([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),Vy=new st([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),ky=function(e,t){for(var r=new ot(31),n=0;n<31;++n)r[n]=t+=1<<e[n-1];for(var i=new ou(r[30]),n=1;n<30;++n)for(var s=r[n];s<r[n+1];++s)i[s]=s-r[n]<<5|n;return{b:r,r:i}},Xy=ky(au,2),XN=Xy.b,cu=Xy.r;XN[28]=258,cu[258]=28;for(var WN=ky(lu,0),Wy=WN.r,uu=new ot(32768),Ee=0;Ee<32768;++Ee){var cr=(Ee&43690)>>1|(Ee&21845)<<1;cr=(cr&52428)>>2|(cr&13107)<<2,cr=(cr&61680)>>4|(cr&3855)<<4,uu[Ee]=((cr&65280)>>8|(cr&255)<<8)>>1}for(var ni=function(e,t,r){for(var n=e.length,i=0,s=new ot(t);i<n;++i)e[i]&&++s[e[i]-1];var o=new ot(t);for(i=1;i<t;++i)o[i]=o[i-1]+s[i-1]<<1;var l;if(r){l=new ot(1<<t);var c=15-t;for(i=0;i<n;++i)if(e[i])for(var a=i<<4|e[i],h=t-e[i],u=o[e[i]-1]++<<h,f=u|(1<<h)-1;u<=f;++u)l[uu[u]>>c]=a}else for(l=new ot(n),i=0;i<n;++i)e[i]&&(l[i]=uu[o[e[i]-1]++]>>15-e[i]);return l},Vr=new st(288),Ee=0;Ee<144;++Ee)Vr[Ee]=8;for(var Ee=144;Ee<256;++Ee)Vr[Ee]=9;for(var Ee=256;Ee<280;++Ee)Vr[Ee]=7;for(var Ee=280;Ee<288;++Ee)Vr[Ee]=8;for(var oo=new st(32),Ee=0;Ee<32;++Ee)oo[Ee]=5;var PN=ni(Vr,9,0),MN=ni(oo,5,0),Py=function(e){return(e+7)/8|0},My=function(e,t,r){return(r==null||r>e.length)&&(r=e.length),new st(e.subarray(t,r))},Bt=function(e,t,r){r<<=t&7;var n=t/8|0;e[n]|=r,e[n+1]|=r>>8},ii=function(e,t,r){r<<=t&7;var n=t/8|0;e[n]|=r,e[n+1]|=r>>8,e[n+2]|=r>>16},du=function(e,t){for(var r=[],n=0;n<e.length;++n)e[n]&&r.push({s:n,f:e[n]});var i=r.length,s=r.slice();if(!i)return{t:Fy,l:0};if(i==1){var o=new st(r[0].s+1);return o[r[0].s]=1,{t:o,l:1}}r.sort(function(S,b){return S.f-b.f}),r.push({s:-1,f:25001});var l=r[0],c=r[1],a=0,h=1,u=2;for(r[0]={s:-1,f:l.f+c.f,l,r:c};h!=i-1;)l=r[r[a].f<r[u].f?a++:u++],c=r[a!=h&&r[a].f<r[u].f?a++:u++],r[h++]={s:-1,f:l.f+c.f,l,r:c};for(var f=s[0].s,n=1;n<i;++n)s[n].s>f&&(f=s[n].s);var d=new ot(f+1),p=hu(r[h-1],d,0);if(p>t){var n=0,m=0,g=p-t,v=1<<g;for(s.sort(function(b,R){return d[R.s]-d[b.s]||b.f-R.f});n<i;++n){var y=s[n].s;if(d[y]>t)m+=v-(1<<p-d[y]),d[y]=t;else break}for(m>>=g;m>0;){var w=s[n].s;d[w]<t?m-=1<<t-d[w]++-1:++n}for(;n>=0&&m;--n){var _=s[n].s;d[_]==t&&(--d[_],++m)}p=t}return{t:new st(d),l:p}},hu=function(e,t,r){return e.s==-1?Math.max(hu(e.l,t,r+1),hu(e.r,t,r+1)):t[e.s]=r},Ay=function(e){for(var t=e.length;t&&!e[--t];);for(var r=new ot(++t),n=0,i=e[0],s=1,o=function(c){r[n++]=c},l=1;l<=t;++l)if(e[l]==i&&l!=t)++s;else{if(!i&&s>2){for(;s>138;s-=138)o(32754);s>2&&(o(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(o(i),--s;s>6;s-=6)o(8304);s>2&&(o(s-3<<5|8208),s=0)}for(;s--;)o(i);s=1,i=e[l]}return{c:r.subarray(0,n),n:t}},si=function(e,t){for(var r=0,n=0;n<t.length;++n)r+=e[n]*t[n];return r},Uy=function(e,t,r){var n=r.length,i=Py(t+2);e[i]=n&255,e[i+1]=n>>8,e[i+2]=e[i]^255,e[i+3]=e[i+1]^255;for(var s=0;s<n;++s)e[i+s+4]=r[s];return(i+4+n)*8},Dy=function(e,t,r,n,i,s,o,l,c,a,h){Bt(t,h++,r),++i[256];for(var u=du(i,15),f=u.t,d=u.l,p=du(s,15),m=p.t,g=p.l,v=Ay(f),y=v.c,w=v.n,_=Ay(m),S=_.c,b=_.n,R=new ot(19),I=0;I<y.length;++I)++R[y[I]&31];for(var I=0;I<S.length;++I)++R[S[I]&31];for(var E=du(R,7),C=E.t,N=E.l,G=19;G>4&&!C[Vy[G-1]];--G);var q=a+5<<3,Z=si(i,Vr)+si(s,oo)+o,T=si(i,f)+si(s,m)+o+14+3*G+si(R,C)+2*R[16]+3*R[17]+7*R[18];if(c>=0&&q<=Z&&q<=T)return Uy(t,h,e.subarray(c,c+a));var W,k,M,P;if(Bt(t,h,1+(T<Z)),h+=2,T<Z){W=ni(f,d,0),k=f,M=ni(m,g,0),P=m;var U=ni(C,N,0);Bt(t,h,w-257),Bt(t,h+5,b-1),Bt(t,h+10,G-4),h+=14;for(var I=0;I<G;++I)Bt(t,h+3*I,C[Vy[I]]);h+=3*G;for(var $=[y,S],me=0;me<2;++me)for(var O=$[me],I=0;I<O.length;++I){var ye=O[I]&31;Bt(t,h,U[ye]),h+=C[ye],ye>15&&(Bt(t,h,O[I]>>5&127),h+=O[I]>>12)}}else W=PN,k=Vr,M=MN,P=oo;for(var I=0;I<l;++I){var de=n[I];if(de>255){var ye=de>>18&31;ii(t,h,W[ye+257]),h+=k[ye+257],ye>7&&(Bt(t,h,de>>23&31),h+=au[ye]);var ve=de&31;ii(t,h,M[ve]),h+=P[ve],ve>3&&(ii(t,h,de>>5&8191),h+=lu[ve])}else ii(t,h,W[de]),h+=k[de]}return ii(t,h,W[256]),h+k[256]},AN=new ou([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Fy=new st(0),UN=function(e,t,r,n,i,s){var o=s.z||e.length,l=new st(n+o+5*(1+Math.ceil(o/7e3))+i),c=l.subarray(n,l.length-i),a=s.l,h=(s.r||0)&7;if(t){h&&(c[0]=s.r>>3);for(var u=AN[t-1],f=u>>13,d=u&8191,p=(1<<r)-1,m=s.p||new ot(32768),g=s.h||new ot(p+1),v=Math.ceil(r/3),y=2*v,w=function(ce){return(e[ce]^e[ce+1]<<v^e[ce+2]<<y)&p},_=new ou(25e3),S=new ot(288),b=new ot(32),R=0,I=0,E=s.i||0,C=0,N=s.w||0,G=0;E+2<o;++E){var q=w(E),Z=E&32767,T=g[q];if(m[Z]=T,g[q]=Z,N<=E){var W=o-E;if((R>7e3||C>24576)&&(W>423||!a)){h=Dy(e,c,0,_,S,b,I,C,G,E-G,h),C=R=I=0,G=E;for(var k=0;k<286;++k)S[k]=0;for(var k=0;k<30;++k)b[k]=0}var M=2,P=0,U=d,$=Z-T&32767;if(W>2&&q==w(E-$))for(var me=Math.min(f,W)-1,O=Math.min(32767,E),ye=Math.min(258,W);$<=O&&--U&&Z!=T;){if(e[E+M]==e[E+M-$]){for(var de=0;de<ye&&e[E+de]==e[E+de-$];++de);if(de>M){if(M=de,P=$,de>me)break;for(var ve=Math.min($,de-2),D=0,k=0;k<ve;++k){var F=E-$+k&32767,H=m[F],Q=F-H&32767;Q>D&&(D=Q,T=F)}}}Z=T,T=m[Z],$+=Z-T&32767}if(P){_[C++]=268435456|cu[M]<<18|Wy[P];var te=cu[M]&31,K=Wy[P]&31;I+=au[te]+lu[K],++S[257+te],++b[K],N=E+M,++R}else _[C++]=e[E],++S[e[E]]}}for(E=Math.max(E,N);E<o;++E)_[C++]=e[E],++S[e[E]];h=Dy(e,c,a,_,S,b,I,C,G,E-G,h),a||(s.r=h&7|c[h/8|0]<<3,h-=7,s.h=g,s.p=m,s.i=E,s.w=N)}else{for(var E=s.w||0;E<o+a;E+=65535){var ie=E+65535;ie>=o&&(c[h/8|0]=a,ie=o),h=Uy(c,h+1,e.subarray(E,ie))}s.i=o}return My(l,0,n+Py(h)+i)},DN=function(){for(var e=new Int32Array(256),t=0;t<256;++t){for(var r=t,n=9;--n;)r=(r&1&&-306674912)^r>>>1;e[t]=r}return e}(),FN=function(){var e=-1;return{p:function(t){for(var r=e,n=0;n<t.length;++n)r=DN[r&255^t[n]]^r>>>8;e=r},d:function(){return~e}}},JN=function(e,t,r,n,i){if(!i&&(i={l:1},t.dictionary)){var s=t.dictionary.subarray(-32768),o=new st(s.length+e.length);o.set(s),o.set(e,s.length),e=o,i.w=s.length}return UN(e,t.level==null?6:t.level,t.mem==null?i.l?Math.ceil(Math.max(8,Math.min(13,Math.log(e.length)))*1.5):20:12+t.mem,r,n,i)},fu=function(e,t,r){for(;r;++t)e[t]=r,r>>>=8},HN=function(e,t){var r=t.filename;if(e[0]=31,e[1]=139,e[2]=8,e[8]=t.level<2?4:t.level==9?2:0,e[9]=3,t.mtime!=0&&fu(e,4,Math.floor(new Date(t.mtime||Date.now())/1e3)),r){e[3]=8;for(var n=0;n<=r.length;++n)e[n+10]=r.charCodeAt(n)}},YN=function(e){return 10+(e.filename?e.filename.length+1:0)};function BN(e,t){t||(t={});var r=FN(),n=e.length;r.p(e);var i=JN(e,t,YN(t),8),s=i.length;return HN(i,t),fu(i,s-8,r.d()),fu(i,s-4,n),i}var Jy=typeof TextEncoder!="undefined"&&new TextEncoder,zN=typeof TextDecoder!="undefined"&&new TextDecoder;try{zN.decode(Fy,{stream:!0})}catch(e){}function KN(e,t){var r;if(Jy)return Jy.encode(e);for(var n=e.length,i=new st(e.length+(e.length>>1)),s=0,o=function(a){i[s++]=a},r=0;r<n;++r){if(s+5>i.length){var l=new st(s+8+(n-r<<1));l.set(i),i=l}var c=e.charCodeAt(r);c<128||t?o(c):c<2048?(o(192|c>>6),o(128|c&63)):c>55295&&c<57344?(c=65536+(c&1047552)|e.charCodeAt(++r)&1023,o(240|c>>18),o(128|c>>12&63),o(128|c>>6&63),o(128|c&63)):(o(224|c>>12),o(128|c>>6&63),o(128|c&63))}return My(i,0,s)}function Hy(e){return z(this,null,function*(){const t=KN(JSON.stringify(e)),r=BN(t),n=yield new Promise(i=>{const s=new FileReader;s.onload=()=>i(s.result),s.readAsDataURL(new Blob([new Uint8Array(r)]))});return{compressedBase64:n.slice(n.indexOf(",")+1),compressedSize:r.length,bufferLength:t.length}})}const Yy="dmFyIFFyPU9iamVjdC5kZWZpbmVQcm9wZXJ0eSxYcj1PYmplY3QuZGVmaW5lUHJvcGVydGllczt2YXIgV3I9T2JqZWN0LmdldE93blByb3BlcnR5RGVzY3JpcHRvcnM7dmFyICRlPU9iamVjdC5nZXRPd25Qcm9wZXJ0eVN5bWJvbHM7dmFyIG9uPU9iamVjdC5wcm90b3R5cGUuaGFzT3duUHJvcGVydHksYW49T2JqZWN0LnByb3RvdHlwZS5wcm9wZXJ0eUlzRW51bWVyYWJsZTt2YXIgbXQ9KEYsQiwkKT0+QiBpbiBGP1FyKEYsQix7ZW51bWVyYWJsZTohMCxjb25maWd1cmFibGU6ITAsd3JpdGFibGU6ITAsdmFsdWU6JH0pOkZbQl09JCxEPShGLEIpPT57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kIHEoKTtyZXR1cm59aWYoZy5kYXRhLm1lc3NhZ2UudHlwZT09PVouUmVzZXQpe2QubGVuZ3RoPTAsaC5sZW5ndGg9MCxpPTAscj0wLG49IiIsbz0wO3JldHVybn1pZihnLmRhdGEubWVzc2FnZS50eXBlPT09Wi5HZXRTdGF0dXMpe1NlLnBvc3RNZXNzYWdlKHtyZXNwb25zZTp7dHlwZTpaLkdldFN0YXR1cyxwZW5kaW5nQ291bnQ6ZC5sZW5ndGgsaW5pdGlhbGl6ZWQ6dSgpfX0pO3JldHVybn1pZighdSgpKXtkLnB1c2goZy5kYXRhLm1lc3NhZ2UpO3JldHVybn10cnl7eWllbGQgTChnLmRhdGEubWVzc2FnZSksaT0wLHlpZWxkIHEoKX1jYXRjaChFKXtzJiZjb25zb2xlLmVycm9yKEUpLGkrPTF9fSl9fX0pKCk7Ci8vIyBzb3VyY2VNYXBwaW5nVVJMPWhpZ2hsaWdodC1jbGllbnQtd29ya2VyLURyRFBSQ3J2LmpzLm1hcAo=",jN=e=>Uint8Array.from(atob(e),t=>t.charCodeAt(0)),By=typeof self!="undefined"&&self.Blob&&new Blob([jN(Yy)],{type:"text/javascript;charset=utf-8"});function zy(e){let t;try{if(t=By&&(self.URL||self.webkitURL).createObjectURL(By),!t)throw"";const r=new Worker(t,{name:e==null?void 0:e.name});return r.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(t)}),r}catch(r){return new Worker("data:text/javascript;base64,"+Yy,{name:e==null?void 0:e.name})}finally{t&&(self.URL||self.webkitURL).revokeObjectURL(t)}}var Be=(e=>(e[e.Initialize=0]="Initialize",e[e.Reset=1]="Reset",e[e.AsyncEvents=2]="AsyncEvents",e[e.Identify=3]="Identify",e[e.Properties=4]="Properties",e[e.Metrics=5]="Metrics",e[e.Feedback=6]="Feedback",e[e.CustomEvent=7]="CustomEvent",e[e.Stop=8]="Stop",e[e.GetStatus=9]="GetStatus",e))(Be||{});function QN(e){return"regexValue"in e}function $N(e){return"matchValue"in e}function qN(e){const t=Math.trunc(e);return t===1?!0:t===0?!1:Math.floor(Math.random()*t)===0}class Ky{constructor(t=qN){L(this,"regexCache",new Map);L(this,"config");this.sampler=t}setConfig(t){this.config=t}isSamplingEnabled(){var t,r,n,i;return!!((r=(t=this.config)==null?void 0:t.logs)!=null&&r.length||(i=(n=this.config)==null?void 0:n.spans)!=null&&i.length)}shouldSample(t){var r,n;return t.name===Zg?this.sampleLog((r=this.config)==null?void 0:r.logs,t):this.sampleSpan((n=this.config)==null?void 0:n.spans,t)}matchesValue(t,r){if(!t)return!1;if($N(t))return t.matchValue===r;if(QN(t)){const n=t.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(t,r){if(t)for(const n of t){let i=!1;for(const s of Object.keys(r))if(this.matchesValue(n.key,s)){const o=r[s];if(this.matchesValue(n.attribute,o)){i=!0;break}}if(!i)return!1}return!0}matchEvent(t,r){return!(t.name&&!this.matchesValue(t.name,r.name)||t.attributes&&(!r.attributes||!this.matchesAttributes(t.attributes,r.attributes)))}matchesEvents(t,r){if(t)for(const n of t){let i=!1;for(const s of r)if(this.matchEvent(n,s)){i=!0;break}if(!i)return!1}return!0}matchesSpanConfig(t,r){return!(t.name&&!this.matchesValue(t.name,r.name)||!this.matchesAttributes(t.attributes,r.attributes)||!this.matchesEvents(t.events,r.events))}matchesLogConfig(t,r){if(t.severityText){const n=r[xg];if(!this.matchesValue(t.severityText,n))return!1}if(t.message){const n=r[Ng];if(!this.matchesValue(t.message,n))return!1}return!!this.matchesAttributes(t.attributes,r)}sampleSpan(t,r){if(t){for(const n of t)if(this.matchesSpanConfig(n,r))return{sample:this.sampler(n.samplingRatio),attributes:{[Lg]:n.samplingRatio}}}return{sample:!0}}sampleLog(t,r){if(t){for(const n of t)if(this.matchesLogConfig(n,r.attributes))return{sample:this.sampler(n.samplingRatio),attributes:{[Lg]:n.samplingRatio}}}return{sample:!0}}}const oi=(e,t)=>{_e("warn",`Highlight Warning: (${e}): `,{output:t})},gu=class gu{constructor(t,r){L(this,"options");L(this,"isRunningOnHighlight");L(this,"organizationID");uo(this,ci);L(this,"events");L(this,"sessionData");L(this,"ready");L(this,"manualStopped");L(this,"state");L(this,"logger");L(this,"enableSegmentIntegration");L(this,"privacySetting");L(this,"enableCanvasRecording");L(this,"enablePerformanceRecording");L(this,"samplingStrategy");L(this,"inlineImages");L(this,"inlineVideos");L(this,"inlineStylesheet");L(this,"styleSheetResyncInterval");L(this,"debugOptions");L(this,"listeners");L(this,"firstloadVersion");L(this,"environment");L(this,"sessionShortcut");L(this,"appVersion");L(this,"serviceName");L(this,"_worker");L(this,"_optionsInternal");L(this,"_backendUrl");L(this,"_recordingStartTime");L(this,"_isOnLocalHost");L(this,"_onToggleFeedbackFormVisibility");L(this,"_firstLoadListeners");L(this,"_isCrossOriginIframe");L(this,"_eventBytesSinceSnapshot");L(this,"_lastSnapshotTime");L(this,"_lastVisibilityChangeTime");L(this,"pushPayloadTimerId");L(this,"hasSessionUnloaded");L(this,"hasPushedData");L(this,"reloaded");L(this,"_hasPreviouslyInitialized");L(this,"_recordStop");L(this,"_gauges",new Map);L(this,"_counters",new Map);L(this,"_histograms",new Map);L(this,"_up_down_counters",new Map);L(this,"_integrations",[]);var i,s,o,l,c;t.sessionSecureID||(t.sessionSecureID=St()),this.options=t,typeof((i=this.options)==null?void 0:i.debug)=="boolean"?this.debugOptions=this.options.debug?{clientInteractions:!0}:{}:this.debugOptions=(o=(s=this.options)==null?void 0:s.debug)!=null?o:{},this.logger=new Oc(this.debugOptions.clientInteractions),t.debug&&ul(!0),t.storageMode&&(this.logger.log(`initializing in ${t.storageMode} session mode`),Qp(t.storageMode)),Os(!!(t!=null&&t.sessionCookie)),(t==null?void 0:t.sessionCookieDomain)!==void 0&&$p(t.sessionCookieDomain),this._worker=new zy,this._worker.onmessage=a=>{var h,u,f;((h=a.data.response)==null?void 0:h.type)===Be.AsyncEvents?(this._eventBytesSinceSnapshot+=a.data.response.eventsSize,this.logger.log(`Web worker sent payloadID ${a.data.response.id} size ${a.data.response.eventsSize} bytes, compression ratio ${a.data.response.eventsSize/a.data.response.compressedSize}.
|
|
480
|
+
Total since snapshot: ${(this._eventBytesSinceSnapshot/1e6).toFixed(1)}MB`)):((u=a.data.response)==null?void 0:u.type)===Be.CustomEvent?this.addCustomEvent(a.data.response.tag,a.data.response.payload):((f=a.data.response)==null?void 0:f.type)===Be.Stop&&(oi("Stopping recording due to worker failure",a.data.response),this.stopRecording(!1))};let n=Ft();if(this.reloaded=!1,!((l=this.sessionData)!=null&&l.sessionSecureID)&&(n!=null&&n.sessionSecureID))this.sessionData=n,this.options.sessionSecureID=n.sessionSecureID,this.reloaded=!0,this.logger.log(`Tab reloaded, continuing previous session: ${this.sessionData.sessionSecureID}`);else{for(const a of Object.values(Ge))Rr(a);this.sessionData={sessionSecureID:this.options.sessionSecureID,projectID:0,sessionStartTime:Date.now()}}this._hasPreviouslyInitialized=!1,this._firstLoadListeners=r||new Yt(this.options);try{window.parent.document&&(this._isCrossOriginIframe=!1)}catch(a){this._isCrossOriginIframe=(c=this.options.recordCrossOriginIframe)!=null?c:!0}this._initMembers(this.options)}static create(t){return new gu(t)}_reset(n){return z(this,arguments,function*({forceNew:t,sessionKey:r}){this.pushPayloadTimerId&&(clearTimeout(this.pushPayloadTimerId),this.pushPayloadTimerId=void 0);let i,s;if(!t)try{i=He(Ge.USER_IDENTIFIER);const o=He(Ge.USER_OBJECT);o&&(s=JSON.parse(o))}catch(o){}for(const o of Object.values(Ge))Rr(o);this.sessionData.sessionSecureID=r?St(`${this.organizationID}-${r}`):St(),this.sessionData.sessionKey=r,this.sessionData.sessionStartTime=Date.now(),this.options.sessionSecureID=this.sessionData.sessionSecureID,this.stopRecording(),this._firstLoadListeners.stopListening(),this._firstLoadListeners=new Yt(this.options),yield this.initialize(),i&&s&&this.identify(i,s)})}_initMembers(t){var s,o,l,c,a,h,u,f,d,p,m;this.sessionShortcut=!1,this._recordingStartTime=0,this._isOnLocalHost=window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1"||window.location.hostname==="",this.ready=!1,this.state="NotRecording",this.manualStopped=!1,this.enableSegmentIntegration=!!t.enableSegmentIntegration,this.privacySetting=(s=t.privacySetting)!=null?s:"default",this.enableCanvasRecording=(o=t.enableCanvasRecording)!=null?o:!1,this.enablePerformanceRecording=(l=t.enablePerformanceRecording)!=null?l:!0,this.inlineImages=(c=t.inlineImages)!=null?c:this._isOnLocalHost,this.inlineVideos=(a=t.inlineVideos)!=null?a:this._isOnLocalHost,this.inlineStylesheet=(h=t.inlineStylesheet)!=null?h:this._isOnLocalHost,this.styleSheetResyncInterval=(u=t.styleSheetResyncInterval)!=null?u:2e3,this.samplingStrategy=x({canvasFactor:.5,canvasMaxSnapshotDimension:360,canvasClearWebGLBuffer:!0,dataUrlOptions:bf()},(f=t.samplingStrategy)!=null?f:{canvas:2}),this._backendUrl=(d=t==null?void 0:t.backendUrl)!=null?d:"https://pub.highlight.io",this._backendUrl[0]==="/"&&(this._backendUrl=new URL(this._backendUrl,document.baseURI).href);const r=new To(`${this._backendUrl}`,{headers:{}});ho(this,ci,nl(r,Zc())),this.environment=(p=t.environment)!=null?p:"production",this.appVersion=t.appVersion,this.serviceName=(m=t.serviceName)!=null?m:"",typeof t.organizationID=="string"?this.organizationID=t.organizationID:this.organizationID=t.organizationID.toString(),this.isRunningOnHighlight=this.organizationID==="1"||this.organizationID==="1jdkoe52",this.firstloadVersion=t.firstloadVersion||"unknown",this.sessionShortcut=t.sessionShortcut||!1,this._onToggleFeedbackFormVisibility=()=>{};const g=t,{firstloadVersion:n}=g,i=nt(g,["firstloadVersion"]);this._optionsInternal=i,this.listeners=[],this.events=[],this.hasSessionUnloaded=!1,this.hasPushedData=!1,window.Intercom&&window.Intercom("onShow",()=>{window.Intercom("update",{highlightSessionURL:this.getCurrentSessionURLWithTimestamp()}),this.addProperties({event:"Intercom onShow"})}),this._eventBytesSinceSnapshot=0,this._lastSnapshotTime=new Date().getTime(),this._lastVisibilityChangeTime=new Date().getTime()}identify(t,r={},n){if(!t||t===""){console.warn("Highlight's identify() call was passed an empty identifier.",{user_identifier:t,user_object:r});return}this.sessionData.userIdentifier=t.toString(),this.sessionData.userObject=r,mt(Ge.USER_IDENTIFIER,t.toString()),mt(Ge.USER_OBJECT,JSON.stringify(r)),this._worker.postMessage({message:{type:Be.Identify,userIdentifier:t,userObject:r,source:n}});for(const i of this._integrations)i.identify(this.sessionData.sessionSecureID,t,r,n)}log(t,r,n){this._firstLoadListeners.messages.push(Lf(r,Cf,t,n))}pushCustomError(t,r){return this.consumeCustomError(new Error(t),void 0,r)}consumeCustomError(t,r,n){let i={};if(n)try{i=x(x({},JSON.parse(n)),i)}catch(s){}return this.consumeError(t,{message:r,payload:i})}consumeError(t,{message:r,payload:n,source:i,type:s}){var a,h,u,f;t.cause&&(n=B(x({},n),{"exception.cause":t.cause}));let o=r?r+":"+t.message:t.message;s==="React.ErrorBoundary"&&(o="ErrorBoundary: "+o);const l=En(t),c={event:o,type:s!=null?s:"custom",url:window.location.href,source:i!=null?i:"",lineNumber:(a=l[0])!=null&&a.lineNumber?(h=l[0])==null?void 0:h.lineNumber:0,columnNumber:(u=l[0])!=null&&u.columnNumber?(f=l[0])==null?void 0:f.columnNumber:0,stackTrace:l,timestamp:new Date().toISOString(),payload:JSON.stringify(n),id:In()};this._firstLoadListeners.errors.push(c);for(const d of this._integrations)d.error(this.sessionData.sessionSecureID,c)}addProperties(t={},r){const n=x({},t);Object.entries(n).forEach(([i,s])=>{try{structuredClone(s)}catch(o){delete n[i]}}),this._worker.postMessage({message:{type:Be.Properties,propertiesObject:n,propertyType:r}});for(const i of this._integrations)i.track(this.sessionData.sessionSecureID,x({sessionSecureID:this.sessionData.sessionSecureID,propertyType:r},t))}initialize(t){return z(this,null,function*(){var r,n,i,s,o,l,c,a,h,u,f,d,p,m,g,v,y,w,_,S,b,R,I,E,C;if(navigator!=null&&navigator.webdriver&&!window.Cypress||(r=navigator==null?void 0:navigator.userAgent)!=null&&r.includes("Googlebot")||(n=navigator==null?void 0:navigator.userAgent)!=null&&n.includes("AdsBot")){(i=this._firstLoadListeners)==null||i.stopListening();return}try{if(t!=null&&t.forceNew){yield this._reset(t);return}if(t!=null&&t.sessionKey&&(t==null?void 0:t.sessionKey)!==this.sessionData.sessionKey){yield this._reset(B(x({},t),{forceNew:!0}));return}const N=new Ky;Og({backendUrl:(o=(s=this.options)==null?void 0:s.backendUrl)!=null?o:"https://pub.highlight.io",otlpEndpoint:(c=(l=this.options)==null?void 0:l.otlpEndpoint)!=null?c:"https://otel.highlight.io",projectId:(a=this.options)==null?void 0:a.organizationID,sessionSecureId:(h=this.options)==null?void 0:h.sessionSecureID,environment:(f=(u=this.options)==null?void 0:u.environment)!=null?f:"production",networkRecordingOptions:typeof((d=this.options)==null?void 0:d.networkRecording)=="object"?this.options.networkRecording:void 0,tracingOrigins:(p=this.options)==null?void 0:p.tracingOrigins,serviceName:(g=(m=this.options)==null?void 0:m.serviceName)!=null?g:"highlight-browser",instrumentations:(y=(v=this.options)==null?void 0:v.otel)==null?void 0:y.instrumentations,getIntegrations:()=>[...this._integrations],productAnalyticsEvents:this._productAnalyticsEvents()},N),this._gauges.clear(),this._counters.clear(),this._histograms.clear(),this._up_down_counters.clear(),this.logger.log("Initializing...",t,this.sessionData,this.options),this.sessionData=(w=Ft(this.sessionData.sessionSecureID))!=null?w:this.sessionData,(_=this.sessionData)!=null&&_.sessionStartTime?this._recordingStartTime=(S=this.sessionData)==null?void 0:S.sessionStartTime:(this._recordingStartTime=new Date().getTime(),this.sessionData.sessionStartTime=this._recordingStartTime),ir(""),it(this.sessionData);let G=He(Jn.CLIENT_ID);G||(G=St(),mt(Jn.CLIENT_ID,G));let q;this.options.disableSessionRecording||this.options.disableNetworkRecording!==void 0||typeof this.options.networkRecording=="boolean"?q=!1:q=((b=this.options.networkRecording)==null?void 0:b.recordHeadersAndBody)||!1;let Z=[];if(typeof this.options.networkRecording=="object"&&((R=this.options.networkRecording.destinationDomains)!=null&&R.length)&&(Z=this.options.networkRecording.destinationDomains),this._isCrossOriginIframe)yield this._setupCrossOriginIframe();else{const U=yield co(this,ci).initializeSession({organization_verbose_id:this.organizationID,enable_strict_privacy:this.privacySetting==="strict",privacy_setting:this.privacySetting,enable_recording_network_contents:q,clientVersion:this.firstloadVersion,firstloadVersion:this.firstloadVersion,clientConfig:JSON.stringify(this._optionsInternal),environment:this.environment,id:G,appVersion:this.appVersion,serviceName:this.serviceName,session_secure_id:this.sessionData.sessionSecureID,session_key:this.sessionData.sessionKey,client_id:G,network_recording_domains:Z,disable_session_recording:this.options.disableSessionRecording});if(U.initializeSession.secure_id!==this.sessionData.sessionSecureID&&this.logger.log(`Unexpected secure id returned by initializeSession: ${U.initializeSession.secure_id}, expected ${this.sessionData.sessionSecureID}`),this.sessionData.sessionSecureID=U.initializeSession.secure_id,this.sessionData.projectID=parseInt(((I=U==null?void 0:U.initializeSession)==null?void 0:I.project_id)||"0"),N.setConfig(U.initializeSession.sampling),!this.sessionData.projectID||!this.sessionData.sessionSecureID){_e("error","Failed to initialize Highlight; an error occurred on our end.",this.sessionData);return}}this.logger.log(`Loaded Highlight
|
|
481
481
|
Remote: ${this._backendUrl}
|
|
482
482
|
Project ID: ${this.sessionData.projectID}
|
|
483
|
-
SessionSecureID: ${this.sessionData.sessionSecureID}`),this.options.sessionSecureID=this.sessionData.sessionSecureID,this._worker.postMessage({message:{type:Ue.Initialize,sessionSecureID:this.sessionData.sessionSecureID,backend:this._backendUrl,debug:!!this.debugOptions.clientInteractions,recordingStartTime:this._recordingStartTime}});for(const U of this._integrations)U.init(this.sessionData.sessionSecureID);if(this.sessionData.userIdentifier&&this.identify(this.sessionData.userIdentifier,this.sessionData.userObject),this._firstLoadListeners.isListening()?this._firstLoadListeners.hasNetworkRecording||Yt.setupNetworkListener(this._firstLoadListeners,this.options):this._firstLoadListeners.startListening(),this.pushPayloadTimerId&&(clearTimeout(this.pushPayloadTimerId),this.pushPayloadTimerId=void 0),this._isCrossOriginIframe||(this.pushPayloadTimerId=setTimeout(()=>{this._save()},_s)),this.options.disableSessionRecording){this.logger.log("Highlight is NOT RECORDING a session replay per H.init setting."),this.ready=!0,this.state="Recording",this.manualStopped=!1;return}const{getDeviceDetails:T}=Cy();T&&this.recordGauge({name:Xe.DeviceMemory,value:T().deviceMemory,category:xe.Device,group:window.location.href});const W=(U,Q)=>{Q&&this.logger.log("received isCheckout emit",{event:U}),this.events.push(U)};W.bind(this);const k=!!this._recordStop;this._recordStop&&(this._recordStop(),this._recordStop=void 0);const[M,P]=Xg(this.privacySetting,this.options.maskAllInputs,this.options.maskInputOptions);this._recordStop=ct({ignoreClass:(E=this.options.ignoreClass)!=null?E:"highlight-ignore",ignoreSelector:this.options.ignoreSelector,blockClass:(C=this.options.blockClass)!=null?C:"highlight-block",blockSelector:this.options.blockSelector,emit:W,recordCrossOriginIframes:this.options.recordCrossOriginIframe,privacySetting:Wg(this.privacySetting,this.options.maskPiiText),maskAllInputs:M,maskInputOptions:P,maskTextClass:this.options.maskTextClass,maskTextSelector:this.options.maskTextSelector,recordCanvas:this.enableCanvasRecording,sampling:{canvas:{fps:this.samplingStrategy.canvas,fpsManual:this.samplingStrategy.canvasManualSnapshot,resizeFactor:this.samplingStrategy.canvasFactor,clearWebGLBuffer:this.samplingStrategy.canvasClearWebGLBuffer,initialSnapshotDelay:this.samplingStrategy.canvasInitialSnapshotDelay,dataURLOptions:this.samplingStrategy.dataUrlOptions,maxSnapshotDimension:this.samplingStrategy.canvasMaxSnapshotDimension}},keepIframeSrcFn:U=>!this.options.recordCrossOriginIframe,inlineImages:this.inlineImages,inlineVideos:this.inlineVideos,collectFonts:this.inlineImages,inlineStylesheet:this.inlineStylesheet,styleSheetResyncInterval:this.styleSheetResyncInterval,plugins:[Ze()],logger:typeof this.options.debug=="boolean"&&this.options.debug||typeof this.options.debug=="object"&&this.options.debug.domRecording?{debug:this.logger.log,warn:ni}:void 0}),k||this.options.recordCrossOriginIframe&&this._setupCrossOriginIframeParent(),document.referrer&&(window&&document.referrer.includes(window.location.origin)||(this.addCustomEvent("Referrer",document.referrer),this.addProperties({referrer:document.referrer},{type:"session"}))),this.sessionData.sessionKey&&this.addProperties({sessionKey:this.sessionData.sessionKey},{type:"session"}),this._setupWindowListeners(),this.ready=!0,this.state="Recording",this.manualStopped=!1}catch(N){this._isOnLocalHost&&(_e("error",N),ni("initializeSession",N))}})}_productAnalyticsEvents(){var n;const t=(n=this.options)==null?void 0:n.productAnalytics;if(t===!1)return{};const r={clicks:!0,pageViews:!0,trackEvents:!0};if(t===void 0||t===!0)return r;for(const i of Object.keys(t))t[i]===!1&&(r[i]=!1);return r}_visibilityHandler(t){return q(this,null,function*(){if(this.manualStopped){this.logger.log("Ignoring visibility event due to manual stop.");return}new Date().getTime()-this._lastVisibilityChangeTime<Bp||(this._lastVisibilityChangeTime=new Date().getTime(),this.logger.log(`Detected window ${t?"hidden":"visible"}.`),t?(this.addCustomEvent("TabHidden",!0),this.options.disableBackgroundRecording&&this.stopRecording()):(this.options.disableBackgroundRecording&&(yield this.initialize()),this.addCustomEvent("TabHidden",!1)))})}_setupCrossOriginIframe(){return q(this,null,function*(){this.logger.log("highlight in cross-origin iframe is waiting "),yield new Promise(t=>{const r=n=>{if(n.data.highlight===no){const i=n.data;this.logger.log("highlight got window message ",i),this.sessionData.projectID=i.projectID,this.sessionData.sessionSecureID=i.sessionSecureID,window.parent.postMessage({highlight:io},"*"),window.removeEventListener("message",r),t()}};window.addEventListener("message",r)})})}_setupCrossOriginIframeParent(){this.logger.log("highlight setting up cross origin iframe parent notification"),setInterval(()=>{window.document.querySelectorAll("iframe").forEach(t=>{var r;(r=t.contentWindow)==null||r.postMessage({highlight:no,projectID:this.sessionData.projectID,sessionSecureID:this.sessionData.sessionSecureID},"*")})},_s),window.addEventListener("message",t=>{t.data.highlight===io&&this.logger.log("highlight got response from initialized iframe")})}_setupWindowListeners(){var n;try{const i=this;this.enableSegmentIntegration&&this.listeners.push($g(o=>{if(o.type==="track"){const l={};l["segment-event"]=o.event,i.addProperties(l,{type:"track",source:"segment"})}else if(o.type==="identify"){const l=o.userId.replace(/^"(.*)"$/,"$1");i.identify(l,o.traits,"segment")}})),this.listeners.push(Vu(o=>{this.reloaded?(this.addCustomEvent("Reload",o),this.reloaded=!1,i.addProperties({reload:!0},{type:"session"})):this.addCustomEvent("Navigate",o)})),this.listeners.push(zu(o=>{this.addCustomEvent("Viewport",o),this.submitViewportMetrics(o)})),this.listeners.push(Yg((o,l)=>{let u=null,a=null;if(l&&l.target){const h=l.target;u=Uu(h),a=h.textContent,a&&a.length>2e3&&(a=a.substring(0,2e3))}this.addCustomEvent("Click",{clickTarget:o,clickTextContent:a,clickSelector:u})})),this.listeners.push(Bg(o=>{o&&this.addCustomEvent("Focus",o)})),this.listeners.push(_y(o=>{const{name:l,value:u}=o,a=[],h=(c,f)=>{f&&a.push({name:c,value:f})};switch(o.name){case"LCP":{const c=o.attribution;h("web_vital.element",c.element),h("web_vital.attribution.url",c.url?es(c.url):void 0);break}case"CLS":{const c=o.attribution;h("web_vital.element",c.largestShiftTarget),h("web_vital.load_state",c.loadState);break}case"INP":{const c=o.attribution;h("web_vital.element",c.eventTarget),h("web_vital.event_type",c.eventType),h("web_vital.load_state",c.loadState);break}case"FID":{const c=o.attribution;h("web_vital.element",c.eventTarget),h("web_vital.event_type",c.eventType);break}case"FCP":{const c=o.attribution;h("web_vital.load_state",c.loadState);break}}this.recordGauge({name:l,value:u,group:window.location.href,category:xe.WebVital,tags:a.length?a:void 0})})),this.listeners.push(Ty(o=>{const l=[];o.saveData!==void 0&&l.push({name:"saveData",value:o.saveData.toString()}),o.effectiveType!==void 0&&l.push({name:"effectiveType",value:o.effectiveType.toString()}),o.type!==void 0&&l.push({name:"type",value:o.type.toString()}),Object.entries(o).forEach(([u,a])=>{yf(a)&&this.recordGauge({name:u,value:a,category:xe.Performance,group:window.location.href,tags:l})})},this._recordingStartTime)),this.sessionShortcut&&this.listeners.push(ey(this.sessionShortcut,()=>{window.open(this.getCurrentSessionURLWithTimestamp(),"_blank")})),this.enablePerformanceRecording&&(this.listeners.push(Qg(o=>{this.addCustomEvent("Performance",Rt(o)),Object.entries(o).filter(([l])=>l!=="relativeTimestamp").forEach(([l,u])=>u&&this.recordGauge({name:l,value:u,category:xe.Performance,group:window.location.href}))},this._recordingStartTime)),this.listeners.push(zg(o=>{this.addCustomEvent("Jank",Rt(o)),this.recordGauge({name:"Jank",value:o.jankAmount,category:xe.WebVital,group:o.querySelector})},this._recordingStartTime))),this._hasPreviouslyInitialized||((n=window.electron)!=null&&n.ipcRenderer?(window.electron.ipcRenderer.on("highlight.run",({visible:o})=>{this._visibilityHandler(!o)}),this.logger.log("Set up Electron highlight.run events.")):(Kg(o=>this._visibilityHandler(o)),this.logger.log("Set up document visibility listener.")),this._hasPreviouslyInitialized=!0);const s=()=>{this.hasSessionUnloaded=!0,this.pushPayloadTimerId&&(clearTimeout(this.pushPayloadTimerId),this.pushPayloadTimerId=void 0)};window.addEventListener("beforeunload",s),this.listeners.push(()=>window.removeEventListener("beforeunload",s))}catch(i){this._isOnLocalHost&&(_e("error",i),ni("initializeSession _setupWindowListeners",i))}const t=()=>{this.addCustomEvent("Page Unload",""),ir(this.sessionData.sessionSecureID),mt(this.sessionData)};if(window.addEventListener("beforeunload",t),this.listeners.push(()=>window.removeEventListener("beforeunload",t)),navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/iPhone/i)){const i=()=>{this.addCustomEvent("Page Unload",""),ir(this.sessionData.sessionSecureID),mt(this.sessionData)};window.addEventListener("pagehide",i),this.listeners.push(()=>window.removeEventListener("pagehide",i))}}submitViewportMetrics({height:t,width:r,availHeight:n,availWidth:i}){this.recordGauge({name:Xe.ViewportHeight,value:t,category:xe.Device,group:window.location.href}),this.recordGauge({name:Xe.ViewportWidth,value:r,category:xe.Device,group:window.location.href}),this.recordGauge({name:Xe.ScreenHeight,value:n,category:xe.Device,group:window.location.href}),this.recordGauge({name:Xe.ScreenWidth,value:i,category:xe.Device,group:window.location.href}),this.recordGauge({name:Xe.ViewportArea,value:t*r,category:xe.Device,group:window.location.href})}recordGauge(t){var n,i;let r=this._gauges.get(t.name);if(!r){if(r=(n=or())==null?void 0:n.createGauge(t.name,lr(t.name,t.unit)),!r)return;this._gauges.set(t.name,r)}r.record(t.value,B(x({},(i=t.tags)==null?void 0:i.reduce((s,o)=>B(x({},s),{[o.name]:o.value}),{})),{group:t.group,category:t.category,"highlight.session_id":this.sessionData.sessionSecureID}));for(const s of this._integrations)s.recordGauge(this.sessionData.sessionSecureID,t)}recordCount(t){var n,i;let r=this._counters.get(t.name);if(!r){if(r=(n=or())==null?void 0:n.createCounter(t.name,lr(t.name,t.unit)),!r)return;this._counters.set(t.name,r)}r.add(t.value,B(x({},(i=t.tags)==null?void 0:i.reduce((s,o)=>B(x({},s),{[o.name]:o.value}),{})),{group:t.group,category:t.category,"highlight.session_id":this.sessionData.sessionSecureID}))}recordIncr(t){this.recordCount(B(x({},t),{value:1}))}recordHistogram(t){var n,i;let r=this._histograms.get(t.name);if(!r){if(r=(n=or())==null?void 0:n.createHistogram(t.name,lr(t.name,t.unit)),!r)return;this._histograms.set(t.name,r)}r.record(t.value,B(x({},(i=t.tags)==null?void 0:i.reduce((s,o)=>B(x({},s),{[o.name]:o.value}),{})),{group:t.group,category:t.category,"highlight.session_id":this.sessionData.sessionSecureID}))}recordUpDownCounter(t){var n,i;let r=this._up_down_counters.get(t.name);if(!r){if(r=(n=or())==null?void 0:n.createUpDownCounter(t.name,lr(t.name,t.unit)),!r)return;this._up_down_counters.set(t.name,r)}r.add(t.value,B(x({},(i=t.tags)==null?void 0:i.reduce((s,o)=>B(x({},s),{[o.name]:o.value}),{})),{group:t.group,category:t.category,"highlight.session_id":this.sessionData.sessionSecureID}))}stopRecording(t){this.manualStopped=!!t,this.manualStopped&&this.addCustomEvent("Stop","H.stop() was called which stops Highlight from recording."),this.state="NotRecording",t&&this._recordStop&&(this._recordStop(),this._recordStop=void 0),this.listeners.forEach(r=>r()),this.listeners=[],Pu()}getCurrentSessionTimestamp(){return this._recordingStartTime}getCurrentSessionURLWithTimestamp(){const t=new Date().getTime(),{projectID:r,sessionSecureID:n}=this.sessionData,i=(t-this._recordingStartTime)/1e3;return`https://${Fn}/${r}/sessions/${n}?ts=${i}`}getCurrentSessionURL(){const t=this.sessionData.projectID,r=this.sessionData.sessionSecureID;return t&&r?`https://${Fn}/${t}/sessions/${r}`:null}snapshot(t){return q(this,null,function*(){yield ct.snapshotCanvas(t)})}addSessionFeedback({timestamp:t,verbatim:r,user_email:n,user_name:i}){var s;this._worker.postMessage({message:{type:Ue.Feedback,verbatim:r,timestamp:t,userName:i||this.sessionData.userIdentifier,userEmail:n||((s=this.sessionData.userObject)==null?void 0:s.name)}})}_save(){return q(this,null,function*(){var t;try{this.state==="Recording"&&this.listeners&&!this.sessionData.sessionKey&&this.sessionData.sessionStartTime&&Date.now()-this.sessionData.sessionStartTime>Yp&&(this.logger.log("Resetting session",{start:this.sessionData.sessionStartTime}),yield this._reset({}));let r;((t=this.options)==null?void 0:t.sendMode)==="local"&&(r=n=>q(this,null,function*(){let i=new Blob([JSON.stringify({query:yo(tl),variables:n})],{type:"application/json"});return yield window.fetch(`${this._backendUrl}`,{method:"POST",body:i}),0})),yield this._sendPayload({sendFn:r}),this.hasPushedData=!0,this.sessionData.lastPushTime=Date.now(),mt(this.sessionData)}catch(r){this._isOnLocalHost&&(_e("error",r),ni("_save",r))}this.state==="Recording"&&(this.pushPayloadTimerId&&(clearTimeout(this.pushPayloadTimerId),this.pushPayloadTimerId=void 0),this.pushPayloadTimerId=setTimeout(()=>{this._save()},Hp))})}addCustomEvent(t,r){if(this.state==="NotRecording"){let n;const i=()=>{clearInterval(n),this.state==="Recording"&&this.events.length>0?zi(t,r):n=setTimeout(i,500)};n=setTimeout(i,500)}else this.state==="Recording"&&(this.events.length>0||this.hasPushedData)&&zi(t,r)}_sendPayload(r){return q(this,arguments,function*({sendFn:t}){const n=Yt.getRecordedNetworkResources(this._firstLoadListeners,this._recordingStartTime),i=Yt.getRecordedWebSocketEvents(this._firstLoadListeners),s=[...this.events],o=[...this._firstLoadListeners.messages],l=[...this._firstLoadListeners.errors],{bytes:u,time:a}=this.enableCanvasRecording?Ts.canvas:Ts.normal;this._eventBytesSinceSnapshot>=u&&new Date().getTime()-this._lastSnapshotTime>=a&&this.takeFullSnapshot(),this.logger.log(`Sending: ${s.length} events, ${o.length} messages, ${n.length} network resources, ${l.length} errors
|
|
483
|
+
SessionSecureID: ${this.sessionData.sessionSecureID}`),this.options.sessionSecureID=this.sessionData.sessionSecureID,this._worker.postMessage({message:{type:Be.Initialize,sessionSecureID:this.sessionData.sessionSecureID,backend:this._backendUrl,debug:!!this.debugOptions.clientInteractions,recordingStartTime:this._recordingStartTime}});for(const U of this._integrations)U.init(this.sessionData.sessionSecureID);if(this.sessionData.userIdentifier&&this.identify(this.sessionData.userIdentifier,this.sessionData.userObject),this._firstLoadListeners.isListening()?this._firstLoadListeners.hasNetworkRecording||Yt.setupNetworkListener(this._firstLoadListeners,this.options):this._firstLoadListeners.startListening(),this.pushPayloadTimerId&&(clearTimeout(this.pushPayloadTimerId),this.pushPayloadTimerId=void 0),this._isCrossOriginIframe||(this.pushPayloadTimerId=setTimeout(()=>{this._save()},Is)),this.options.disableSessionRecording){this.logger.log("Highlight is NOT RECORDING a session replay per H.init setting."),this.ready=!0,this.state="Recording",this.manualStopped=!1;return}const{getDeviceDetails:T}=Oy();T&&this.recordGauge({name:Xe.DeviceMemory,value:T().deviceMemory,category:xe.Device,group:window.location.href});const W=(U,$)=>{$&&this.logger.log("received isCheckout emit",{event:U}),this.events.push(U)};W.bind(this);const k=!!this._recordStop;this._recordStop&&(this._recordStop(),this._recordStop=void 0);const[M,P]=Ug(this.privacySetting,this.options.maskAllInputs,this.options.maskInputOptions);this._recordStop=dt({ignoreClass:(E=this.options.ignoreClass)!=null?E:"highlight-ignore",ignoreSelector:this.options.ignoreSelector,blockClass:(C=this.options.blockClass)!=null?C:"highlight-block",blockSelector:this.options.blockSelector,emit:W,recordCrossOriginIframes:this.options.recordCrossOriginIframe,privacySetting:Dg(this.privacySetting,this.options.maskPiiText),maskAllInputs:M,maskInputOptions:P,maskTextClass:this.options.maskTextClass,maskTextSelector:this.options.maskTextSelector,recordCanvas:this.enableCanvasRecording,sampling:{canvas:{fps:this.samplingStrategy.canvas,fpsManual:this.samplingStrategy.canvasManualSnapshot,resizeFactor:this.samplingStrategy.canvasFactor,clearWebGLBuffer:this.samplingStrategy.canvasClearWebGLBuffer,initialSnapshotDelay:this.samplingStrategy.canvasInitialSnapshotDelay,dataURLOptions:this.samplingStrategy.dataUrlOptions,maxSnapshotDimension:this.samplingStrategy.canvasMaxSnapshotDimension}},keepIframeSrcFn:U=>!this.options.recordCrossOriginIframe,inlineImages:this.inlineImages,inlineVideos:this.inlineVideos,collectFonts:this.inlineImages,inlineStylesheet:this.inlineStylesheet,styleSheetResyncInterval:this.styleSheetResyncInterval,plugins:[Ze()],logger:typeof this.options.debug=="boolean"&&this.options.debug||typeof this.options.debug=="object"&&this.options.debug.domRecording?{debug:this.logger.log,warn:oi}:void 0}),k||this.options.recordCrossOriginIframe&&this._setupCrossOriginIframeParent(),document.referrer&&(window&&document.referrer.includes(window.location.origin)||(this.addCustomEvent("Referrer",document.referrer),this.addProperties({referrer:document.referrer},{type:"session"}))),this.sessionData.sessionKey&&this.addProperties({sessionKey:this.sessionData.sessionKey},{type:"session"}),this._setupWindowListeners(),this.ready=!0,this.state="Recording",this.manualStopped=!1}catch(N){this._isOnLocalHost&&(_e("error",N),oi("initializeSession",N))}})}_productAnalyticsEvents(){var n;const t=(n=this.options)==null?void 0:n.productAnalytics;if(t===!1)return{};const r={clicks:!0,pageViews:!0,trackEvents:!0};if(t===void 0||t===!0)return r;for(const i of Object.keys(t))t[i]===!1&&(r[i]=!1);return r}_visibilityHandler(t){return z(this,null,function*(){if(this.manualStopped){this.logger.log("Ignoring visibility event due to manual stop.");return}new Date().getTime()-this._lastVisibilityChangeTime<zp||(this._lastVisibilityChangeTime=new Date().getTime(),this.logger.log(`Detected window ${t?"hidden":"visible"}.`),t?(this.addCustomEvent("TabHidden",!0),this.options.disableBackgroundRecording&&this.stopRecording()):(this.options.disableBackgroundRecording&&(yield this.initialize()),this.addCustomEvent("TabHidden",!1)))})}_setupCrossOriginIframe(){return z(this,null,function*(){this.logger.log("highlight in cross-origin iframe is waiting "),yield new Promise(t=>{const r=n=>{if(n.data.highlight===io){const i=n.data;this.logger.log("highlight got window message ",i),this.sessionData.projectID=i.projectID,this.sessionData.sessionSecureID=i.sessionSecureID,window.parent.postMessage({highlight:so},"*"),window.removeEventListener("message",r),t()}};window.addEventListener("message",r)})})}_setupCrossOriginIframeParent(){this.logger.log("highlight setting up cross origin iframe parent notification"),setInterval(()=>{window.document.querySelectorAll("iframe").forEach(t=>{var r;(r=t.contentWindow)==null||r.postMessage({highlight:io,projectID:this.sessionData.projectID,sessionSecureID:this.sessionData.sessionSecureID},"*")})},Is),window.addEventListener("message",t=>{t.data.highlight===so&&this.logger.log("highlight got response from initialized iframe")})}_setupWindowListeners(){var n;try{const i=this;this.enableSegmentIntegration&&this.listeners.push(ny(o=>{if(o.type==="track"){const l={};l["segment-event"]=o.event,i.addProperties(l,{type:"track",source:"segment"})}else if(o.type==="identify"){const l=o.userId.replace(/^"(.*)"$/,"$1");i.identify(l,o.traits,"segment")}})),this.listeners.push(Xc(o=>{this.reloaded?(this.addCustomEvent("Reload",o),this.reloaded=!1,i.addProperties({reload:!0},{type:"session"})):this.addCustomEvent("Navigate",o)})),this.listeners.push(jc(o=>{this.addCustomEvent("Viewport",o),this.submitViewportMetrics(o)})),this.listeners.push(Qg((o,l)=>{let c=null,a=null;if(l&&l.target){const h=l.target;c=Fc(h),a=h.textContent,a&&a.length>2e3&&(a=a.substring(0,2e3))}this.addCustomEvent("Click",{clickTarget:o,clickTextContent:a,clickSelector:c})})),this.listeners.push($g(o=>{o&&this.addCustomEvent("Focus",o)})),this.listeners.push(Zy(o=>{const{name:l,value:c}=o,a=[],h=(u,f)=>{f&&a.push({name:u,value:f})};switch(o.name){case"LCP":{const u=o.attribution;h("web_vital.element",u.element),h("web_vital.attribution.url",u.url?ns(u.url):void 0);break}case"CLS":{const u=o.attribution;h("web_vital.element",u.largestShiftTarget),h("web_vital.load_state",u.loadState);break}case"INP":{const u=o.attribution;h("web_vital.element",u.eventTarget),h("web_vital.event_type",u.eventType),h("web_vital.load_state",u.loadState);break}case"FID":{const u=o.attribution;h("web_vital.element",u.eventTarget),h("web_vital.event_type",u.eventType);break}case"FCP":{const u=o.attribution;h("web_vital.load_state",u.loadState);break}}this.recordGauge({name:l,value:c,group:window.location.href,category:xe.WebVital,tags:a.length?a:void 0})})),this.listeners.push(Ly(o=>{const l=[];o.saveData!==void 0&&l.push({name:"saveData",value:o.saveData.toString()}),o.effectiveType!==void 0&&l.push({name:"effectiveType",value:o.effectiveType.toString()}),o.type!==void 0&&l.push({name:"type",value:o.type.toString()}),Object.entries(o).forEach(([c,a])=>{vf(a)&&this.recordGauge({name:c,value:a,category:xe.Performance,group:window.location.href,tags:l})})},this._recordingStartTime)),this.sessionShortcut&&this.listeners.push(sy(this.sessionShortcut,()=>{window.open(this.getCurrentSessionURLWithTimestamp(),"_blank")})),this.enablePerformanceRecording&&(this.listeners.push(ry(o=>{this.addCustomEvent("Performance",Rt(o)),Object.entries(o).filter(([l])=>l!=="relativeTimestamp").forEach(([l,c])=>c&&this.recordGauge({name:l,value:c,category:xe.Performance,group:window.location.href}))},this._recordingStartTime)),this.listeners.push(qg(o=>{this.addCustomEvent("Jank",Rt(o)),this.recordGauge({name:"Jank",value:o.jankAmount,category:xe.WebVital,group:o.querySelector})},this._recordingStartTime))),this._hasPreviouslyInitialized||((n=window.electron)!=null&&n.ipcRenderer?(window.electron.ipcRenderer.on("highlight.run",({visible:o})=>{this._visibilityHandler(!o)}),this.logger.log("Set up Electron highlight.run events.")):(ey(o=>this._visibilityHandler(o)),this.logger.log("Set up document visibility listener.")),this._hasPreviouslyInitialized=!0);const s=()=>{this.hasSessionUnloaded=!0,this.pushPayloadTimerId&&(clearTimeout(this.pushPayloadTimerId),this.pushPayloadTimerId=void 0)};window.addEventListener("beforeunload",s),this.listeners.push(()=>window.removeEventListener("beforeunload",s))}catch(i){this._isOnLocalHost&&(_e("error",i),oi("initializeSession _setupWindowListeners",i))}const t=()=>{this.addCustomEvent("Page Unload",""),ir(this.sessionData.sessionSecureID),it(this.sessionData)};if(window.addEventListener("beforeunload",t),this.listeners.push(()=>window.removeEventListener("beforeunload",t)),navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/iPhone/i)){const i=()=>{this.addCustomEvent("Page Unload",""),ir(this.sessionData.sessionSecureID),it(this.sessionData)};window.addEventListener("pagehide",i),this.listeners.push(()=>window.removeEventListener("pagehide",i))}}submitViewportMetrics({height:t,width:r,availHeight:n,availWidth:i}){this.recordGauge({name:Xe.ViewportHeight,value:t,category:xe.Device,group:window.location.href}),this.recordGauge({name:Xe.ViewportWidth,value:r,category:xe.Device,group:window.location.href}),this.recordGauge({name:Xe.ScreenHeight,value:n,category:xe.Device,group:window.location.href}),this.recordGauge({name:Xe.ScreenWidth,value:i,category:xe.Device,group:window.location.href}),this.recordGauge({name:Xe.ViewportArea,value:t*r,category:xe.Device,group:window.location.href})}recordGauge(t){var n,i;let r=this._gauges.get(t.name);if(!r){if(r=(n=or())==null?void 0:n.createGauge(t.name,lr(t.name,t.unit)),!r)return;this._gauges.set(t.name,r)}r.record(t.value,B(x({},(i=t.tags)==null?void 0:i.reduce((s,o)=>B(x({},s),{[o.name]:o.value}),{})),{group:t.group,category:t.category,"highlight.session_id":this.sessionData.sessionSecureID}));for(const s of this._integrations)s.recordGauge(this.sessionData.sessionSecureID,t)}recordCount(t){var n,i;let r=this._counters.get(t.name);if(!r){if(r=(n=or())==null?void 0:n.createCounter(t.name,lr(t.name,t.unit)),!r)return;this._counters.set(t.name,r)}r.add(t.value,B(x({},(i=t.tags)==null?void 0:i.reduce((s,o)=>B(x({},s),{[o.name]:o.value}),{})),{group:t.group,category:t.category,"highlight.session_id":this.sessionData.sessionSecureID}))}recordIncr(t){this.recordCount(B(x({},t),{value:1}))}recordHistogram(t){var n,i;let r=this._histograms.get(t.name);if(!r){if(r=(n=or())==null?void 0:n.createHistogram(t.name,lr(t.name,t.unit)),!r)return;this._histograms.set(t.name,r)}r.record(t.value,B(x({},(i=t.tags)==null?void 0:i.reduce((s,o)=>B(x({},s),{[o.name]:o.value}),{})),{group:t.group,category:t.category,"highlight.session_id":this.sessionData.sessionSecureID}))}recordUpDownCounter(t){var n,i;let r=this._up_down_counters.get(t.name);if(!r){if(r=(n=or())==null?void 0:n.createUpDownCounter(t.name,lr(t.name,t.unit)),!r)return;this._up_down_counters.set(t.name,r)}r.add(t.value,B(x({},(i=t.tags)==null?void 0:i.reduce((s,o)=>B(x({},s),{[o.name]:o.value}),{})),{group:t.group,category:t.category,"highlight.session_id":this.sessionData.sessionSecureID}))}stopRecording(t){this.manualStopped=!!t,this.manualStopped&&this.addCustomEvent("Stop","H.stop() was called which stops Highlight from recording."),this.state="NotRecording",t&&this._recordStop&&(this._recordStop(),this._recordStop=void 0),this.listeners.forEach(r=>r()),this.listeners=[],Ac()}getCurrentSessionTimestamp(){return this._recordingStartTime}getCurrentSessionURLWithTimestamp(){const t=new Date().getTime(),{projectID:r,sessionSecureID:n}=this.sessionData,i=(t-this._recordingStartTime)/1e3;return`https://${Fn}/${r}/sessions/${n}?ts=${i}`}getCurrentSessionURL(){const t=this.sessionData.projectID,r=this.sessionData.sessionSecureID;return t&&r?`https://${Fn}/${t}/sessions/${r}`:null}snapshot(t){return z(this,null,function*(){yield dt.snapshotCanvas(t)})}addSessionFeedback(t){}_save(){return z(this,null,function*(){var t;try{this.state==="Recording"&&this.listeners&&!this.sessionData.sessionKey&&this.sessionData.sessionStartTime&&Date.now()-this.sessionData.sessionStartTime>ql&&(this.logger.log("Resetting session",{start:this.sessionData.sessionStartTime}),yield this._reset({}));let r;((t=this.options)==null?void 0:t.sendMode)==="local"&&(r=n=>z(this,null,function*(){let i=new Blob([JSON.stringify({query:bo(rl),variables:n})],{type:"application/json"});return yield window.fetch(`${this._backendUrl}`,{method:"POST",body:i}),0})),yield this._sendPayload({sendFn:r}),this.hasPushedData=!0,this.sessionData.lastPushTime=Date.now(),it(this.sessionData)}catch(r){this._isOnLocalHost&&(_e("error",r),oi("_save",r))}this.state==="Recording"&&(this.pushPayloadTimerId&&(clearTimeout(this.pushPayloadTimerId),this.pushPayloadTimerId=void 0),this.pushPayloadTimerId=setTimeout(()=>{this._save()},Bp))})}addCustomEvent(t,r){if(this.state==="NotRecording"){let n;const i=()=>{clearInterval(n),this.state==="Recording"&&this.events.length>0?Qi(t,r):n=setTimeout(i,500)};n=setTimeout(i,500)}else this.state==="Recording"&&(this.events.length>0||this.hasPushedData)&&Qi(t,r)}_sendPayload(r){return z(this,arguments,function*({sendFn:t}){const n=Yt.getRecordedNetworkResources(this._firstLoadListeners,this._recordingStartTime),i=Yt.getRecordedWebSocketEvents(this._firstLoadListeners),s=[...this.events],o=[...this._firstLoadListeners.messages],l=[...this._firstLoadListeners.errors],{bytes:c,time:a}=this.enableCanvasRecording?Cs.canvas:Cs.normal;this._eventBytesSinceSnapshot>=c&&new Date().getTime()-this._lastSnapshotTime>=a&&this.takeFullSnapshot(),this.logger.log(`Sending: ${s.length} events, ${o.length} messages, ${n.length} network resources, ${l.length} errors
|
|
484
484
|
To: ${this._backendUrl}
|
|
485
485
|
Org: ${this.organizationID}
|
|
486
|
-
SessionSecureID: ${this.sessionData.sessionSecureID}`);const h=new Date().getTime(),c=Ey();if(t){const f={session_secure_id:this.sessionData.sessionSecureID,payload_id:h.toString(),events:{events:s},messages:Rt({messages:o}),resources:JSON.stringify({resources:n}),web_socket_events:JSON.stringify({webSocketEvents:i}),errors:l,is_beacon:!1,has_session_unloaded:this.hasSessionUnloaded,highlight_logs:c||void 0},{compressedBase64:d}=yield Ay(f);yield t({session_secure_id:this.sessionData.sessionSecureID,payload_id:new Date().getTime().toString(),data:d})}else this._worker.postMessage({message:{type:Ue.AsyncEvents,id:h,events:s,messages:o,errors:l,resourcesString:JSON.stringify({resources:n}),webSocketEventsString:JSON.stringify({webSocketEvents:i}),hasSessionUnloaded:this.hasSessionUnloaded,highlightLogs:c}});mt(this.sessionData),Yt.clearRecordedNetworkResources(this._firstLoadListeners),this.events=this.events.slice(s.length),this._firstLoadListeners.messages=this._firstLoadListeners.messages.slice(o.length),this._firstLoadListeners.errors=this._firstLoadListeners.errors.slice(l.length),Iy(c)})}takeFullSnapshot(){if(!this._recordStop){this.logger.log("skipping full snapshot as rrweb is not running");return}this.logger.log("taking full snapshot",{bytesSinceSnapshot:this._eventBytesSinceSnapshot,lastSnapshotTime:this._lastSnapshotTime}),ct.takeFullSnapshot(),this._eventBytesSinceSnapshot=0,this._lastSnapshotTime=new Date().getTime()}registerLD(t){this._integrations.length||this._integrations.push(new Fs(t))}};oi=new WeakMap;let hc=pc;const Hy=({apiKey:e})=>{(function(t,r){var n=t.amplitude||{_q:[],_iq:{}},i=r.createElement("script");i.type="text/javascript",i.integrity="sha384-+EO59vL/X7v6VE2s6/F4HxfHlK0nDUVWKVg8K9oUlvffAeeaShVBmbORTC2D3UF+",i.crossOrigin="anonymous",i.async=!0,i.src="https://cdn.amplitude.com/libs/amplitude-8.17.0-min.gz.js",i.onload=function(){t.amplitude.runQueuedFunctions||console.log("[Amplitude] Error: could not load SDK"),amplitude.getInstance().init(e)};var s=r.getElementsByTagName("script")[0];s.parentNode.insertBefore(i,s);function o(m,g){m.prototype[g]=function(){return this._q.push([g].concat(Array.prototype.slice.call(arguments,0))),this}}for(var l=function(){return this._q=[],this},u=["add","append","clearAll","prepend","set","setOnce","unset","preInsert","postInsert","remove"],a=0;a<u.length;a++)o(l,u[a]);n.Identify=l;for(var h=function(){return this._q=[],this},c=["setProductId","setQuantity","setPrice","setRevenueType","setEventProperties"],f=0;f<c.length;f++)o(h,c[f]);n.Revenue=h;var d=["init","logEvent","logRevenue","setUserId","setUserProperties","setOptOut","setVersionName","setDomain","setDeviceId","enableTracking","setGlobalUserProperties","identify","clearUserProperties","setGroup","logRevenueV2","regenerateDeviceId","groupIdentify","onInit","logEventWithTimestamp","logEventWithGroups","setSessionId","resetSessionId"];function p(m){function g(y){m[y]=function(){m._q.push([y].concat(Array.prototype.slice.call(arguments,0)))}}for(var v=0;v<d.length;v++)g(d[v])}p(n),n.getInstance=function(m){return m=(!m||m.length===0?"$default_instance":m).toLowerCase(),Object.prototype.hasOwnProperty.call(n._iq,m)||(n._iq[m]={_q:[]},p(n._iq[m])),n._iq[m]},t.amplitude=n})(window,document)},Yy=({projectToken:e})=>{if(window.mixpanel)return;(function(r,n){if(!n.__SV){var i,s;window.mixpanel=n,n._i=[],n.init=function(o,l,u){function a(f,d){var p=d.split(".");p.length==2&&(f=f[p[0]],d=p[1]),f[d]=function(){f.push([d].concat(Array.prototype.slice.call(arguments,0)))}}var h=n;for(typeof u!="undefined"?h=n[u]=[]:u="mixpanel",h.people=h.people||[],h.toString=function(f){var d="mixpanel";return u!=="mixpanel"&&(d+="."+u),f||(d+=" (stub)"),d},h.people.toString=function(){return h.toString(1)+".people (stub)"},i="disable time_event track track_pageview track_links track_forms track_with_groups add_group set_group remove_group register register_once alias unregister identify name_tag set_config reset opt_in_tracking opt_out_tracking has_opted_in_tracking has_opted_out_tracking clear_opt_in_out_tracking start_batch_senders people.set people.set_once people.unset people.increment people.append people.union people.track_charge people.clear_charges people.delete_user people.remove".split(" "),s=0;s<i.length;s++)a(h,i[s]);var c="set set_once union unset remove delete".split(" ");h.get_group=function(){function f(g){d[g]=function(){call2_args=arguments,call2=[g].concat(Array.prototype.slice.call(call2_args,0)),h.push([p,call2])}}for(var d={},p=["get_group"].concat(Array.prototype.slice.call(arguments,0)),m=0;m<c.length;m++)f(c[m]);return d},n._i.push([o,l,u])},n.__SV=1.2}})(document,window.mixpanel||[]);const t=document.createElement("script");t.src=BN,document.head.appendChild(t),t.addEventListener("load",()=>{var r;(r=window.mixpanel)==null||r.init(e)})},BN="https://cdn.mxpnl.com/libs/mixpanel-2-latest.min.js",zN=()=>{var e,t;typeof chrome!="undefined"&&((e=chrome==null?void 0:chrome.runtime)!=null&&e.onMessage)&&((t=chrome==null?void 0:chrome.runtime)==null||t.onMessage.addListener((r,n,i)=>{const s=r.action;switch(console.log(`[highlight] received '${s}' event from extension.`),s){case"init":{be.init(1,{debug:!0}),be.getSessionURL().then(o=>{i({url:o})});break}case"stop":{be.stop(),i({success:!0});break}}return!0}))};function KN(e){var t;e.on&&((t=e.webContents)!=null&&t.send)&&(e.on("focus",()=>{e.webContents.send("highlight.run",{visible:!0})}),e.on("blur",()=>{e.webContents.send("highlight.run",{visible:!1})}),e.on("close",()=>{e.webContents.send("highlight.run",{visible:!1})}))}const jN=({next:e,payload:t})=>{if(typeof window!="undefined"&&typeof document!="undefined"&&"H"in window){if(t.obj.type==="track"){const r=t.obj.event,n=t.obj.properties;window.H.track(r,n)}else if(t.obj.type==="identify"){const r=t.obj.userId;if(r!=null&&r.length){const n=t.obj.traits;window.H.identify(r,n)}}}e(t)},By=()=>{if(typeof window!="undefined"){if(typeof window._highlightFetchPatch!="undefined")return;window._originalFetch=window.fetch,window._fetchProxy=(e,t)=>window._originalFetch(e,t),window._highlightFetchPatch=(e,t)=>window._fetchProxy.call(window||global,e,t),window.fetch=window._highlightFetchPatch}},zy=()=>null,Ky=()=>{if(typeof window!="undefined"){if(typeof window._highlightWebSocketRequestCallback!="undefined")return;window._highlightWebSocketRequestCallback=zy,window._highlightWebSocketEventCallback=zy;const e=new Proxy(window.WebSocket,{construct(t,r){const[,n]=ru(),i=new t(...r),s=h=>{window._highlightWebSocketRequestCallback({socketId:n,initiatorType:"websocket",type:"open",name:i.url,startTimeAbs:performance.timeOrigin+h.timeStamp})},o=h=>{window._highlightWebSocketRequestCallback({socketId:n,initiatorType:"websocket",type:"close",name:i.url,responseEndAbs:performance.timeOrigin+h.timeStamp}),i.removeEventListener("open",s),i.removeEventListener("error",u),i.removeEventListener("message",l),i.removeEventListener("close",o)},l=h=>{const{data:c}=h,f=typeof c=="string"?h.data:void 0;let d;typeof c=="string"?d=c.length:c instanceof Blob?d=c.size:d=c.byteLength||0,window._highlightWebSocketEventCallback({socketId:n,type:"received",name:i.url,timeStamp:performance.timeOrigin+h.timeStamp,size:d,message:f})},u=h=>{window._highlightWebSocketEventCallback({socketId:n,type:"error",name:i.url,timeStamp:performance.timeOrigin+h.timeStamp,size:0})};i.addEventListener("open",s),i.addEventListener("error",u),i.addEventListener("message",l),i.addEventListener("close",o);const a=new Proxy(i.send,{apply:function(h,c,f){const d=f[0],p=typeof d=="string"?d:void 0;let m;typeof d=="string"?m=d.length:d instanceof Blob?m=d.size:m=d.byteLength||0,window._highlightWebSocketEventCallback({socketId:n,type:"sent",name:i.url,timeStamp:performance.timeOrigin+performance.now(),size:m,message:p}),h.apply(c,f)}});return i.send=a,i}});window.WebSocket=e}},un=()=>{const e={end:()=>{},spanContext:()=>({traceId:"",spanId:"",traceFlags:0}),setAttribute:(t,r)=>e,setAttributes:t=>e,addEvent:(t,r,n)=>e,addLinks:t=>e,setStatus:t=>e,recordException:()=>{},addLink:()=>e,updateName:()=>e,isRecording:()=>!1};return e},QN=()=>{if(typeof window=="undefined"||typeof PerformanceObserver=="undefined")return!1;const e=PerformanceObserver.supportedEntryTypes;return Array.isArray(e)&&e.includes("longtask")},$N=e=>{if(!QN())return()=>{};let t;try{t=new PerformanceObserver(r=>{var n;for(const i of r.getEntries()){const s=(n=i.attribution)==null?void 0:n[0];e({duration:i.duration,name:i.name,startTime:i.startTime,containerType:s==null?void 0:s.containerType,containerSrc:s==null?void 0:s.containerSrc,containerId:s==null?void 0:s.containerId,containerName:s==null?void 0:s.containerName})}}),t.observe({type:"longtask",buffered:!0})}catch(r){return()=>{}}return()=>{try{t.disconnect()}catch(r){}}},qN=new Set(["string","number","boolean"]),eO=()=>typeof window!="undefined"&&typeof window.ReportingObserver!="undefined",tO=e=>{const t={};if(!e||typeof e!="object")return t;for(const[r,n]of Object.entries(e))if(n!=null)if(qN.has(typeof n))t[`report.body.${r}`]=n;else try{t[`report.body.${r}`]=JSON.stringify(n)}catch(i){}return t},rO=e=>{var n;const t=(n=e.body)!=null?n:{},r=t.message||t.reason||t.id||e.type;return typeof r=="string"?r:e.type},nO=(e,t)=>{if(!eO())return()=>{};const r=["deprecation","intervention","csp-violation"],n=window.ReportingObserver;let i;try{i=new n(s=>{var o,l;for(const u of s){const a=(o=u.type)!=null?o:"unknown",h=(l=u.body)!=null?l:{},c=x({"report.type":a,"report.url":u.url},tO(h)),f=rO({type:a,body:h});e(a==="deprecation"?{kind:"log",level:"warn",type:a,message:f,url:u.url,attributes:c}:{kind:"error",type:a,message:f,url:u.url,attributes:c})}},{buffered:!0,types:r}),i.observe()}catch(s){return()=>{}}return()=>{try{i.disconnect()}catch(s){}}},iO="exception",sO=function(e,t,r){if(!e)return;const n=x({},r);typeof t=="string"?n[Yl]=t:t&&(t.code?n[Bl]=t.code.toString():t.name&&(n[Bl]=t.name),t.message&&(n[Yl]=t.message),t.stack&&(n[rE]=t.stack)),n[Bl]||n[Yl]?e.addEvent(iO,n):Ut("otel","recordException","warn",`Failed to record an exception ${t}`)};class oO{constructor(t){L(this,"organizationID");L(this,"_options");L(this,"_integrations",[]);L(this,"_gauges",new Map);L(this,"_counters",new Map);L(this,"_histograms",new Map);L(this,"_up_down_counters",new Map);L(this,"sampler",new Jy);L(this,"_started",!1);L(this,"_ldContextKeys");uo(this,ai);this._options=t,this.organizationID=t.projectId,t.debug&&ul(!0)}_productAnalyticsEvents(){var n;const t=(n=this._options)==null?void 0:n.productAnalytics;if(t===!1)return{};const r={clicks:!0,pageViews:!0,trackEvents:!0};if(t===void 0||t===!0)return r;for(const i of Object.keys(t))t[i]===!1&&(r[i]=!1);return r}setLDContextKeyAttributes(t){t&&(this._ldContextKeys=Object.fromEntries(Object.entries(t).map(([r,n])=>[`${hx}.${r}`,n])))}getLDContextKeyAttributes(){return this._ldContextKeys}start(){return q(this,null,function*(){var r,n,i,s,o,l,u,a,h,c,f,d,p,m,g;if(this._started)return;this._started=!0,Cg({backendUrl:(n=(r=this._options)==null?void 0:r.backendUrl)!=null?n:"https://pub.observability.app.launchdarkly.com",otlpEndpoint:(o=(s=(i=this._options)==null?void 0:i.otel)==null?void 0:s.otlpEndpoint)!=null?o:"https://otel.observability.app.launchdarkly.com",projectId:this._options.projectId,sessionSecureId:this._options.sessionSecureId,environment:(u=(l=this._options)==null?void 0:l.environment)!=null?u:"production",networkRecordingOptions:typeof((a=this._options)==null?void 0:a.networkRecording)=="object"?this._options.networkRecording:void 0,tracingOrigins:(h=this._options)==null?void 0:h.tracingOrigins,serviceName:(f=(c=this._options)==null?void 0:c.serviceName)!=null?f:"browser",serviceVersion:(d=this._options)==null?void 0:d.version,instrumentations:(m=(p=this._options)==null?void 0:p.otel)==null?void 0:m.instrumentations,productAnalyticsEvents:this._productAnalyticsEvents(),getLDContextKeyAttributes:()=>this.getLDContextKeyAttributes(),getIntegrations:()=>this._integrations},this.sampler),this._gauges.clear(),this._counters.clear(),this._histograms.clear(),this._up_down_counters.clear();const t=new _o((g=this._options.backendUrl)!=null?g:"https://pub.observability.app.launchdarkly.com",{headers:{}});co(this,ai,rl(t,Iu())),yield this.configureSampling(),this.setupListeners()})}stop(){return q(this,null,function*(){this._started&&(this._started=!1,yield Pu())})}configureSampling(){return q(this,null,function*(){try{const t=yield lo(this,ai).GetSamplingConfig({organization_verbose_id:`${this.organizationID}`});this.sampler.setConfig(t.sampling)}catch(t){He("sampling","warn",`LaunchDarkly Observability: Failed to configure sampling: ${t}`)}})}_recordLog(t,r,n,i){this.startSpan(_g,s=>{var u,a,h,c,f;const o=qi(typeof t=="string"?t:Rt(t)),l=i?i.map(d=>d.toString()).join(`
|
|
487
|
-
`):void 0;if(s==null||s.addEvent("log",x(x({[Eg]:r,[Ig]:o,"code.stacktrace":l},(u=this._ldContextKeys)!=null?u:{}),n)),this._options.reportConsoleErrors&&r==="error"){const d=new Error(o);s==null||s.recordException(d),s==null||s.setStatus({code:ss.ERROR,message:o}),i?this._recordErrorMessage({error:d,event:d.message,type:"custom",url:window.location.href,source:"frontend",lineNumber:(h=(a=i[0])==null?void 0:a.lineNumber)!=null?h:0,columnNumber:(f=(c=i[0])==null?void 0:c.columnNumber)!=null?f:0,stackTrace:i,timestamp:new Date().toISOString(),id:In()}):this.recordError(d)}})}_recordErrorMessage(t,r){try{t.payload&&(r=x(x({},JSON.parse(t.payload)),r||{}))}catch(o){}this.startSpan("highlight.exception",o=>{var l;sO(o,(l=t.error)!=null?l:new Error(t.event),{[wx]:t.id}),o==null||o.setAttributes(x({event:t.event,type:t.type,url:t.url,source:t.source,lineNumber:t.lineNumber,columnNumber:t.columnNumber},r))});const s=t,{payload:n}=s,i=nt(s,["payload"]);for(const o of this._integrations)o.error(Dt(),B(x({},i),{payload:JSON.stringify(r)}))}recordError(t,r,n,i,s){var a,h,c,f;t=t||new Error("Unknown error"),t instanceof Error&&t.cause&&(n=B(x({},n),{"exception.cause":JSON.stringify(t.cause)}));let o=r?r+":"+t.message:t.message;s==="React.ErrorBoundary"&&(o="ErrorBoundary: "+o);const l=En(t),u={error:t,event:o,type:s!=null?s:"custom",url:window.location.href,source:i!=null?i:"frontend",lineNumber:(a=l[0])!=null&&a.lineNumber?(h=l[0])==null?void 0:h.lineNumber:0,columnNumber:(c=l[0])!=null&&c.columnNumber?(f=l[0])==null?void 0:f.columnNumber:0,stackTrace:l,timestamp:new Date().toISOString(),id:In()};this._recordErrorMessage(u,n)}recordCount(t){var n,i;let r=this._counters.get(t.name);if(!r){if(r=(n=or())==null?void 0:n.createCounter(t.name,lr(t.name,t.unit)),!r)return;this._counters.set(t.name,r)}r.add(t.value,B(x(x({},(i=this._ldContextKeys)!=null?i:{}),t.attributes),{"highlight.session_id":Dt()}))}recordGauge(t){var s,o,l;let r=this._gauges.get(t.name);if(!r){if(r=(s=or())==null?void 0:s.createGauge(t.name,lr(t.name,t.unit)),!r)return;this._gauges.set(t.name,r)}const n=x(x({},(o=this._ldContextKeys)!=null?o:{}),t.attributes);r.record(t.value,B(x({},n),{"highlight.session_id":Dt()}));const i={name:t.name,value:t.value,unit:t.unit,category:n.category,group:(l=n.group)==null?void 0:l.toString(),tags:Object.entries(n).map(([u,a])=>{var h;return{name:u!=null?u:"",value:(h=a==null?void 0:a.toString())!=null?h:""}})};for(const u of this._integrations)u.recordGauge(Dt(),i)}recordIncr(t){this.recordCount(B(x({},t),{value:1}))}recordHistogram(t){var n,i;let r=this._histograms.get(t.name);if(!r){if(r=(n=or())==null?void 0:n.createHistogram(t.name,lr(t.name,t.unit)),!r)return;this._histograms.set(t.name,r)}r.record(t.value,B(x(x({},(i=this._ldContextKeys)!=null?i:{}),t.attributes),{"highlight.session_id":Dt()}))}recordUpDownCounter(t){var n,i;let r=this._up_down_counters.get(t.name);if(!r){if(r=(n=or())==null?void 0:n.createUpDownCounter(t.name,lr(t.name,t.unit)),!r)return;this._up_down_counters.set(t.name,r)}r.add(t.value,B(x(x({},(i=this._ldContextKeys)!=null?i:{}),t.attributes),{"highlight.session_id":Dt()}))}startSpan(t,r,n,i){const s=Bs();if(!s){const l=un();return i===void 0&&n===void 0?r(l):i===void 0?n(l):i(l)}const o=(l,u)=>{this._ldContextKeys&&l.setAttributes(this._ldContextKeys);const a=u(l);return a instanceof Promise?a.finally(()=>l.end()):(l.end(),a)};return i===void 0&&n===void 0?s.startActiveSpan(t,l=>o(l,r)):i===void 0?s.startActiveSpan(t,r,l=>o(l,n)):s.startActiveSpan(t,r,n,l=>o(l,i))}startManualSpan(t,r,n,i){const s=Bs();if(!s){const o=un();return i===void 0&&n===void 0?r(o):i===void 0?n(o):i(o)}return i===void 0&&n===void 0?s.startActiveSpan(t,r):i===void 0?s.startActiveSpan(t,r,n):s.startActiveSpan(t,r,n,i)}register(t,r){this._integrations.push(new Fs(t,r))}getHooks(t){return this._integrations.flatMap(r=>{var n,i;return(i=(n=r.getHooks)==null?void 0:n.call(r,t))!=null?i:[]})}submitViewportMetrics({height:t,width:r,availHeight:n,availWidth:i}){this.recordGauge({name:Xe.ViewportHeight,value:t,attributes:{category:xe.Device,group:window.location.href}}),this.recordGauge({name:Xe.ViewportWidth,value:r,attributes:{category:xe.Device,group:window.location.href}}),this.recordGauge({name:Xe.ScreenHeight,value:n,attributes:{category:xe.Device,group:window.location.href}}),this.recordGauge({name:Xe.ScreenWidth,value:i,attributes:{category:xe.Device,group:window.location.href}}),this.recordGauge({name:Xe.ViewportArea,value:t*r,attributes:{category:xe.Device,group:window.location.href}})}setupListeners(){var r;this._options.disableConsoleRecording||If(n=>{var i;this._recordLog((i=n.value)==null?void 0:i.join(" "),n.type,n.attributes?JSON.parse(n.attributes):{},n.trace)},{level:(r=this._options.consoleMethodsToRecord)!=null?r:[...nl],logger:"console",recordLaunchDarklySdkLogs:this._options.recordLaunchDarklySdkLogs,stringifyOptions:{depthOfLimit:10,numOfKeysLimit:100,stringLengthLimit:1e3}}),this._options.enablePerformanceRecording!==!1&&(Qg(n=>{Object.entries(n).filter(([i])=>i!=="relativeTimestamp").forEach(([i,s])=>s&&this.recordGauge({name:i,value:s,attributes:{category:xe.Performance,group:window.location.href}}))},0),zg(n=>{this.recordGauge({name:"Jank",value:n.jankAmount,attributes:{category:xe.WebVital,group:n.querySelector}})},0)),Zf(n=>{var o;if(pl.includes(n.event)||ml.some(l=>n.event.includes(l)))return;const i=new Error(n.event);i.stack=Rt(n.stackTrace.map(l=>l.toString()));let s={};try{n.payload&&(s=JSON.parse(n.payload))}catch(l){}this._recordErrorMessage(B(x({},n),{error:(o=n.error)!=null?o:i}),s)},{enablePromisePatch:!!this._options.enablePromisePatch}),_y(n=>{const{name:i,value:s}=n,{hostname:o,pathname:l,href:u}=window.location,a={group:window.location.pathname,category:xe.WebVital,[nr]:es(u),[Ss]:l,[nE]:o};switch(n.name){case"LCP":{const h=n.attribution;h.element&&(a["web_vital.element"]=h.element),h.url&&(a["web_vital.attribution.url"]=es(h.url));break}case"CLS":{const h=n.attribution;h.largestShiftTarget&&(a["web_vital.element"]=h.largestShiftTarget),h.loadState&&(a["web_vital.load_state"]=h.loadState);break}case"INP":{const h=n.attribution;h.eventTarget&&(a["web_vital.element"]=h.eventTarget),h.eventType&&(a["web_vital.event_type"]=h.eventType),h.loadState&&(a["web_vital.load_state"]=h.loadState);break}case"FID":{const h=n.attribution;h.eventTarget&&(a["web_vital.element"]=h.eventTarget),h.eventType&&(a["web_vital.event_type"]=h.eventType);break}case"FCP":{const h=n.attribution;h.loadState&&(a["web_vital.load_state"]=h.loadState);break}}this.recordGauge({name:i,value:s,attributes:a})}),zu(n=>{this.submitViewportMetrics(n)}),Ty(n=>{const i={category:xe.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(([s])=>s!=="relativeTimestamp").forEach(([s,o])=>{yf(o)&&this.recordGauge({name:s,value:o,attributes:i})})},new Date().getTime());const{getDeviceDetails:t}=Cy();t&&this.recordGauge({name:Xe.DeviceMemory,value:t().deviceMemory,attributes:{category:xe.Device,group:window.location.href}}),this._options.enableLongtaskRecording!==!1&&$N(n=>{const i={category:xe.Performance,name:n.name,[Ss]:window.location.pathname};n.containerType&&(i.container_type=n.containerType),n.containerSrc&&(i.container_src=n.containerSrc),n.containerId&&(i.container_id=n.containerId),n.containerName&&(i.container_name=n.containerName),this.recordHistogram({name:"long_task.duration",value:n.duration,attributes:i})}),this._options.enableReportingObserver!==!1&&nO(n=>{var s;const i=B(x({},n.attributes),{[Ss]:window.location.pathname});if(n.kind==="log")this._recordLog(n.message,(s=n.level)!=null?s:"warn",i);else{const o=new Error(n.message);this.recordError(o,void 0,Object.fromEntries(Object.entries(i).map(([l,u])=>[l,u===void 0?"":String(u)])),"reporting-observer","custom")}})}recordLog(t,r,n){return this._recordLog(t,r,n)}}ai=new WeakMap;function jy(e,t,r){if(typeof r=="function")return r;if(typeof t=="function")return t;if(typeof e=="function")return e}class Qy extends Nu{start(){return this._sdk.start()}stop(){return this._sdk.stop()}recordGauge(t){return this._bufferCall("recordGauge",[t])}recordCount(t){return this._bufferCall("recordCount",[t])}recordIncr(t){return this._bufferCall("recordIncr",[t])}recordHistogram(t){return this._bufferCall("recordHistogram",[t])}recordUpDownCounter(t){return this._bufferCall("recordUpDownCounter",[t])}startSpan(t,r,n,i){var s;return this._isLoaded?this._bufferCall("startSpan",[t,r,n,i]):(s=jy(r,n,i))==null?void 0:s(un())}startManualSpan(t,r,n,i){var s;return this._isLoaded?this._bufferCall("startManualSpan",[t,r,n,i]):(s=jy(r,n,i))==null?void 0:s(un())}register(t,r){return this._bufferCall("register",[t,r])}recordLog(t,r,n){return this._bufferCall("recordLog",[t,r,n])}recordError(t,r,n,i,s){return this._bufferCall("recordError",[t,r,n,i,s])}setLDContextKeyAttributes(t){return this._bufferCall("setLDContextKeyAttributes",[t])}getLDContextKeyAttributes(){return this._bufferCall("getLDContextKeyAttributes",[])}}A.LDObserve=void 0,typeof globalThis!="undefined"?globalThis.LDObserve?A.LDObserve=globalThis.LDObserve:(A.LDObserve=new Qy,globalThis.LDObserve=A.LDObserve):A.LDObserve=new Qy;class $y{constructor(t){L(this,"sessionSecureID");try{t!=null&&t.storageMode&&jp(t==null?void 0:t.storageMode),Ls(!!(t!=null&&t.sessionCookie)),t!=null&&t.sessionCookie?$p():Ls(!1)}catch(r){He("Error initializing @launchdarkly observability plugin","error",r)}}configureSession(t,r){try{const n=Dt();let i=Ft(n);i!=null&&i.sessionSecureID?this.sessionSecureID=i.sessionSecureID:(r!=null&&r.sessionKey?this.sessionSecureID=St(`${t}-${r.sessionKey}`):this.sessionSecureID=St(),ir(this.sessionSecureID),mt({sessionSecureID:this.sessionSecureID,sessionKey:r==null?void 0:r.sessionKey,projectID:0,sessionStartTime:Date.now(),lastPushTime:Date.now()}))}catch(n){He("Error configuring session in @launchdarkly observability plugin","error",n)}}}class aO extends $y{constructor(r){super(r);L(this,"observe");L(this,"options");L(this,"exposureDeduper");this.options=r,this.exposureDeduper=new pI(r==null?void 0:r.flagExposureDedupeWindowMillis,r==null?void 0:r.flagExposureDedupeMaxSize)}initialize(r,n){try{if(typeof window=="undefined"||typeof document=="undefined"){_e("warn","@launchdarkly/observability is not initializing because it is not supported in this environment.");return}if(!r){_e("warn","@launchdarkly/observability is not initializing because the SDK credential is undefined.");return}this.configureSession(r,n),this.observe=new oO(B(x({},n),{projectId:r,sessionSecureId:this.sessionSecureID})),n!=null&&n.manualStart||this.observe.start(),A.LDObserve.load(this.observe)}catch(i){He("Error initializing @launchdarkly/observability SDK","error",i)}}getMetadata(){return{name:"@launchdarkly/observability"}}register(r,n){var i;(i=this.observe)==null||i.register(r,n)}getHooks(r){var i,s,o,l;const n=x(x({[Xp]:r.sdk.name,[Wp]:r.sdk.version,[hg]:r.clientSideId,[Gu]:"LaunchDarkly"},(i=r.application)!=null&&i.id?{[bg]:r.application.id}:{}),(s=r.application)!=null&&s.version?{[vg]:r.application.version}:{});return this.initialize((l=(o=r.sdkKey)!=null?o:r.mobileKey)!=null?l:r.clientSideId,this.options),[{getMetadata:()=>({name:"@launchdarkly/observability/hooks"}),afterIdentify:(u,a,h)=>{var f,d,p,m,g,v,y,w,_;for(const S of(p=(d=(f=this.observe)==null?void 0:f.getHooks)==null?void 0:d.call(f,r))!=null?p:[])(m=S.afterIdentify)==null||m.call(S,u,a,h);const c=zn(u.context);if((g=this.observe)==null||g.setLDContextKeyAttributes(c),h.status==="completed"){this.exposureDeduper.reset();const S=B(x({},c),{key:(w=(y=(v=this.options)==null?void 0:v.contextFriendlyName)==null?void 0:y.call(v,u.context))!=null?w:Zr(u.context),timeout:u.timeout,canonicalKey:Zr(u.context),[yx]:h.status});(_=this.observe)==null||_.recordLog("LD.identify","info",x(x({},n),S))}return a},afterEvaluation:(u,a,h)=>{var m,g,v,y,w,_,S,b,R;for(const I of(v=(g=(m=this.observe)==null?void 0:m.getHooks)==null?void 0:g.call(m,r))!=null?v:[])(y=I.afterEvaluation)==null||y.call(I,u,a,h);const c=x({[fg]:u.flagKey,[gg]:JSON.stringify(h.value)},h.variationIndex!==void 0&&h.variationIndex!==null?{[yg]:h.variationIndex}:{});if(h.reason)for(const I in Ds){const E=I,C=h.reason[E];C!=null&&(c[Ds[E]]=C)}const f=u.context?Zr(u.context):void 0;u.context&&(c[pg]=JSON.stringify(zn(u.context)),c[mg]=f);const d=[u.flagKey,JSON.stringify(h.value),(w=h.variationIndex)!=null?w:"",(S=(_=h.reason)==null?void 0:_.kind)!=null?S:"",(R=(b=h.reason)==null?void 0:b.ruleId)!=null?R:"",f!=null?f:""].join("|");if(!this.observe||!this.exposureDeduper.shouldRecord(d))return a;const p=x(x({},n),c);return this.observe.startSpan(Ou,I=>{I!=null&&I.isRecording()&&(I.addEvent(Be,p),this.exposureDeduper.markRecorded(d))}),a},afterTrack:u=>{var c,f,d,p,m,g,v,y,w;for(const _ of(d=(f=(c=this.observe)==null?void 0:c.getHooks)==null?void 0:f.call(c,r))!=null?d:[])(p=_.afterTrack)==null||p.call(_,u);if(!(((m=this.options)==null?void 0:m.productAnalytics)!==!1&&(typeof((g=this.options)==null?void 0:g.productAnalytics)!="object"||this.options.productAnalytics.trackEvents!==!1)))return;const h=x(B(x(x({[nr]:window.location.href},(y=(v=this.observe)==null?void 0:v.getLDContextKeyAttributes())!=null?y:{}),n),{key:u.key,value:u.metricValue}),typeof u.data=="object"?u.data:{});(w=this.observe)==null||w.startSpan(px,_=>{_&&_.setAttributes(h)})}}]}}class lO{constructor(t){L(this,"options");L(this,"isRunningOnHighlight");L(this,"organizationID");uo(this,li);L(this,"events");L(this,"sessionData");L(this,"ready");L(this,"manualStopped");L(this,"state");L(this,"logger");L(this,"enableSegmentIntegration");L(this,"privacySetting");L(this,"enableCanvasRecording");L(this,"samplingStrategy");L(this,"inlineImages");L(this,"inlineVideos");L(this,"inlineStylesheet");L(this,"styleSheetResyncInterval");L(this,"debugOptions");L(this,"listeners");L(this,"firstloadVersion");L(this,"environment");L(this,"sessionShortcut");L(this,"appVersion");L(this,"serviceName");L(this,"_worker");L(this,"_optionsInternal");L(this,"_backendUrl");L(this,"_recordingStartTime");L(this,"_isOnLocalHost");L(this,"_onToggleFeedbackFormVisibility");L(this,"_isCrossOriginIframe");L(this,"_eventBytesSinceSnapshot");L(this,"_lastSnapshotTime");L(this,"_lastVisibilityChangeTime");L(this,"pushPayloadTimerId");L(this,"hasSessionUnloaded");L(this,"hasPushedData");L(this,"reloaded");L(this,"_hasPreviouslyInitialized");L(this,"_recordStop");L(this,"_integrations",[]);var n,i,s,o,l,u;this.options=t,typeof((n=this.options)==null?void 0:n.debug)=="boolean"?this.debugOptions=this.options.debug?{clientInteractions:!0}:{}:this.debugOptions=(s=(i=this.options)==null?void 0:i.debug)!=null?s:{},this.logger=new xu(this.debugOptions.clientInteractions),(o=this.options)!=null&&o.debug&&ul(!0),this._worker=new Fy,this._worker.onmessage=a=>{var h,c,f;((h=a.data.response)==null?void 0:h.type)===Ue.AsyncEvents?(this._eventBytesSinceSnapshot+=a.data.response.eventsSize,this.logger.log(`Web worker sent payloadID ${a.data.response.id} size ${a.data.response.eventsSize} bytes, compression ratio ${a.data.response.eventsSize/a.data.response.compressedSize}.
|
|
488
|
-
Total since snapshot: ${(this._eventBytesSinceSnapshot/1e6).toFixed(1)}MB`)):((
|
|
486
|
+
SessionSecureID: ${this.sessionData.sessionSecureID}`);const h=new Date().getTime(),u=xy();if(t){const f={session_secure_id:this.sessionData.sessionSecureID,payload_id:h.toString(),events:{events:s},messages:Rt({messages:o}),resources:JSON.stringify({resources:n}),web_socket_events:JSON.stringify({webSocketEvents:i}),errors:l,is_beacon:!1,has_session_unloaded:this.hasSessionUnloaded,highlight_logs:u||void 0},{compressedBase64:d}=yield Hy(f);yield t({session_secure_id:this.sessionData.sessionSecureID,payload_id:new Date().getTime().toString(),data:d})}else this._worker.postMessage({message:{type:Be.AsyncEvents,id:h,events:s,messages:o,errors:l,resourcesString:JSON.stringify({resources:n}),webSocketEventsString:JSON.stringify({webSocketEvents:i}),hasSessionUnloaded:this.hasSessionUnloaded,highlightLogs:u}});it(this.sessionData),Yt.clearRecordedNetworkResources(this._firstLoadListeners),this.events=this.events.slice(s.length),this._firstLoadListeners.messages=this._firstLoadListeners.messages.slice(o.length),this._firstLoadListeners.errors=this._firstLoadListeners.errors.slice(l.length),Ny(u)})}takeFullSnapshot(){if(!this._recordStop){this.logger.log("skipping full snapshot as rrweb is not running");return}this.logger.log("taking full snapshot",{bytesSinceSnapshot:this._eventBytesSinceSnapshot,lastSnapshotTime:this._lastSnapshotTime}),dt.takeFullSnapshot(),this._eventBytesSinceSnapshot=0,this._lastSnapshotTime=new Date().getTime()}registerLD(t){this._integrations.length||this._integrations.push(new Js(t))}};ci=new WeakMap;let pu=gu;const jy=({apiKey:e})=>{(function(t,r){var n=t.amplitude||{_q:[],_iq:{}},i=r.createElement("script");i.type="text/javascript",i.integrity="sha384-+EO59vL/X7v6VE2s6/F4HxfHlK0nDUVWKVg8K9oUlvffAeeaShVBmbORTC2D3UF+",i.crossOrigin="anonymous",i.async=!0,i.src="https://cdn.amplitude.com/libs/amplitude-8.17.0-min.gz.js",i.onload=function(){t.amplitude.runQueuedFunctions||console.log("[Amplitude] Error: could not load SDK"),amplitude.getInstance().init(e)};var s=r.getElementsByTagName("script")[0];s.parentNode.insertBefore(i,s);function o(m,g){m.prototype[g]=function(){return this._q.push([g].concat(Array.prototype.slice.call(arguments,0))),this}}for(var l=function(){return this._q=[],this},c=["add","append","clearAll","prepend","set","setOnce","unset","preInsert","postInsert","remove"],a=0;a<c.length;a++)o(l,c[a]);n.Identify=l;for(var h=function(){return this._q=[],this},u=["setProductId","setQuantity","setPrice","setRevenueType","setEventProperties"],f=0;f<u.length;f++)o(h,u[f]);n.Revenue=h;var d=["init","logEvent","logRevenue","setUserId","setUserProperties","setOptOut","setVersionName","setDomain","setDeviceId","enableTracking","setGlobalUserProperties","identify","clearUserProperties","setGroup","logRevenueV2","regenerateDeviceId","groupIdentify","onInit","logEventWithTimestamp","logEventWithGroups","setSessionId","resetSessionId"];function p(m){function g(y){m[y]=function(){m._q.push([y].concat(Array.prototype.slice.call(arguments,0)))}}for(var v=0;v<d.length;v++)g(d[v])}p(n),n.getInstance=function(m){return m=(!m||m.length===0?"$default_instance":m).toLowerCase(),Object.prototype.hasOwnProperty.call(n._iq,m)||(n._iq[m]={_q:[]},p(n._iq[m])),n._iq[m]},t.amplitude=n})(window,document)},Qy=({projectToken:e})=>{if(window.mixpanel)return;(function(r,n){if(!n.__SV){var i,s;window.mixpanel=n,n._i=[],n.init=function(o,l,c){function a(f,d){var p=d.split(".");p.length==2&&(f=f[p[0]],d=p[1]),f[d]=function(){f.push([d].concat(Array.prototype.slice.call(arguments,0)))}}var h=n;for(typeof c!="undefined"?h=n[c]=[]:c="mixpanel",h.people=h.people||[],h.toString=function(f){var d="mixpanel";return c!=="mixpanel"&&(d+="."+c),f||(d+=" (stub)"),d},h.people.toString=function(){return h.toString(1)+".people (stub)"},i="disable time_event track track_pageview track_links track_forms track_with_groups add_group set_group remove_group register register_once alias unregister identify name_tag set_config reset opt_in_tracking opt_out_tracking has_opted_in_tracking has_opted_out_tracking clear_opt_in_out_tracking start_batch_senders people.set people.set_once people.unset people.increment people.append people.union people.track_charge people.clear_charges people.delete_user people.remove".split(" "),s=0;s<i.length;s++)a(h,i[s]);var u="set set_once union unset remove delete".split(" ");h.get_group=function(){function f(g){d[g]=function(){call2_args=arguments,call2=[g].concat(Array.prototype.slice.call(call2_args,0)),h.push([p,call2])}}for(var d={},p=["get_group"].concat(Array.prototype.slice.call(arguments,0)),m=0;m<u.length;m++)f(u[m]);return d},n._i.push([o,l,c])},n.__SV=1.2}})(document,window.mixpanel||[]);const t=document.createElement("script");t.src=eO,document.head.appendChild(t),t.addEventListener("load",()=>{var r;(r=window.mixpanel)==null||r.init(e)})},eO="https://cdn.mxpnl.com/libs/mixpanel-2-latest.min.js",tO=()=>{var e,t;typeof chrome!="undefined"&&((e=chrome==null?void 0:chrome.runtime)!=null&&e.onMessage)&&((t=chrome==null?void 0:chrome.runtime)==null||t.onMessage.addListener((r,n,i)=>{const s=r.action;switch(console.log(`[highlight] received '${s}' event from extension.`),s){case"init":{be.init(1,{debug:!0}),be.getSessionURL().then(o=>{i({url:o})});break}case"stop":{be.stop(),i({success:!0});break}}return!0}))};function rO(e){var t;e.on&&((t=e.webContents)!=null&&t.send)&&(e.on("focus",()=>{e.webContents.send("highlight.run",{visible:!0})}),e.on("blur",()=>{e.webContents.send("highlight.run",{visible:!1})}),e.on("close",()=>{e.webContents.send("highlight.run",{visible:!1})}))}const nO=({next:e,payload:t})=>{if(typeof window!="undefined"&&typeof document!="undefined"&&"H"in window){if(t.obj.type==="track"){const r=t.obj.event,n=t.obj.properties;window.H.track(r,n)}else if(t.obj.type==="identify"){const r=t.obj.userId;if(r!=null&&r.length){const n=t.obj.traits;window.H.identify(r,n)}}}e(t)},$y=()=>{if(typeof window!="undefined"){if(typeof window._highlightFetchPatch!="undefined")return;window._originalFetch=window.fetch,window._fetchProxy=(e,t)=>window._originalFetch(e,t),window._highlightFetchPatch=(e,t)=>window._fetchProxy.call(window||global,e,t),window.fetch=window._highlightFetchPatch}},qy=()=>null,eb=()=>{if(typeof window!="undefined"){if(typeof window._highlightWebSocketRequestCallback!="undefined")return;window._highlightWebSocketRequestCallback=qy,window._highlightWebSocketEventCallback=qy;const e=new Proxy(window.WebSocket,{construct(t,r){const[,n]=ic(),i=new t(...r),s=h=>{window._highlightWebSocketRequestCallback({socketId:n,initiatorType:"websocket",type:"open",name:i.url,startTimeAbs:performance.timeOrigin+h.timeStamp})},o=h=>{window._highlightWebSocketRequestCallback({socketId:n,initiatorType:"websocket",type:"close",name:i.url,responseEndAbs:performance.timeOrigin+h.timeStamp}),i.removeEventListener("open",s),i.removeEventListener("error",c),i.removeEventListener("message",l),i.removeEventListener("close",o)},l=h=>{const{data:u}=h,f=typeof u=="string"?h.data:void 0;let d;typeof u=="string"?d=u.length:u instanceof Blob?d=u.size:d=u.byteLength||0,window._highlightWebSocketEventCallback({socketId:n,type:"received",name:i.url,timeStamp:performance.timeOrigin+h.timeStamp,size:d,message:f})},c=h=>{window._highlightWebSocketEventCallback({socketId:n,type:"error",name:i.url,timeStamp:performance.timeOrigin+h.timeStamp,size:0})};i.addEventListener("open",s),i.addEventListener("error",c),i.addEventListener("message",l),i.addEventListener("close",o);const a=new Proxy(i.send,{apply:function(h,u,f){const d=f[0],p=typeof d=="string"?d:void 0;let m;typeof d=="string"?m=d.length:d instanceof Blob?m=d.size:m=d.byteLength||0,window._highlightWebSocketEventCallback({socketId:n,type:"sent",name:i.url,timeStamp:performance.timeOrigin+performance.now(),size:m,message:p}),h.apply(u,f)}});return i.send=a,i}});window.WebSocket=e}},cn=()=>{const e={end:()=>{},spanContext:()=>({traceId:"",spanId:"",traceFlags:0}),setAttribute:(t,r)=>e,setAttributes:t=>e,addEvent:(t,r,n)=>e,addLinks:t=>e,setStatus:t=>e,recordException:()=>{},addLink:()=>e,updateName:()=>e,isRecording:()=>!1};return e},iO=()=>{if(typeof window=="undefined"||typeof PerformanceObserver=="undefined")return!1;const e=PerformanceObserver.supportedEntryTypes;return Array.isArray(e)&&e.includes("longtask")},sO=e=>{if(!iO())return()=>{};let t;try{t=new PerformanceObserver(r=>{var n;for(const i of r.getEntries()){const s=(n=i.attribution)==null?void 0:n[0];e({duration:i.duration,name:i.name,startTime:i.startTime,containerType:s==null?void 0:s.containerType,containerSrc:s==null?void 0:s.containerSrc,containerId:s==null?void 0:s.containerId,containerName:s==null?void 0:s.containerName})}}),t.observe({type:"longtask",buffered:!0})}catch(r){return()=>{}}return()=>{try{t.disconnect()}catch(r){}}},oO=new Set(["string","number","boolean"]),aO=()=>typeof window!="undefined"&&typeof window.ReportingObserver!="undefined",lO=e=>{const t={};if(!e||typeof e!="object")return t;for(const[r,n]of Object.entries(e))if(n!=null)if(oO.has(typeof n))t[`report.body.${r}`]=n;else try{t[`report.body.${r}`]=JSON.stringify(n)}catch(i){}return t},cO=e=>{var n;const t=(n=e.body)!=null?n:{},r=t.message||t.reason||t.id||e.type;return typeof r=="string"?r:e.type},uO=(e,t)=>{if(!aO())return()=>{};const r=["deprecation","intervention","csp-violation"],n=window.ReportingObserver;let i;try{i=new n(s=>{var o,l;for(const c of s){const a=(o=c.type)!=null?o:"unknown",h=(l=c.body)!=null?l:{},u=x({"report.type":a,"report.url":c.url},lO(h)),f=cO({type:a,body:h});e(a==="deprecation"?{kind:"log",level:"warn",type:a,message:f,url:c.url,attributes:u}:{kind:"error",type:a,message:f,url:c.url,attributes:u})}},{buffered:!0,types:r}),i.observe()}catch(s){return()=>{}}return()=>{try{i.disconnect()}catch(s){}}},dO="exception",hO=function(e,t,r){if(!e)return;const n=x({},r);typeof t=="string"?n[Bl]=t:t&&(t.code?n[zl]=t.code.toString():t.name&&(n[zl]=t.name),t.message&&(n[Bl]=t.message),t.stack&&(n[aE]=t.stack)),n[zl]||n[Bl]?e.addEvent(dO,n):It("otel","recordException","warn",`Failed to record an exception ${t}`)};class fO{constructor(t){L(this,"organizationID");L(this,"_options");L(this,"_integrations",[]);L(this,"_gauges",new Map);L(this,"_counters",new Map);L(this,"_histograms",new Map);L(this,"_up_down_counters",new Map);L(this,"sampler",new Ky);L(this,"_started",!1);L(this,"_ldContextKeys");uo(this,ui);this._options=t,this.organizationID=t.projectId,t.debug&&ul(!0)}_productAnalyticsEvents(){var n;const t=(n=this._options)==null?void 0:n.productAnalytics;if(t===!1)return{};const r={clicks:!0,pageViews:!0,trackEvents:!0};if(t===void 0||t===!0)return r;for(const i of Object.keys(t))t[i]===!1&&(r[i]=!1);return r}setLDContextKeyAttributes(t){t&&(this._ldContextKeys=Object.fromEntries(Object.entries(t).map(([r,n])=>[`${bx}.${r}`,n])))}getLDContextKeyAttributes(){return this._ldContextKeys}start(){return z(this,null,function*(){var r,n,i,s,o,l,c,a,h,u,f,d,p,m,g;if(this._started)return;this._started=!0,Og({backendUrl:(n=(r=this._options)==null?void 0:r.backendUrl)!=null?n:"https://pub.observability.app.launchdarkly.com",otlpEndpoint:(o=(s=(i=this._options)==null?void 0:i.otel)==null?void 0:s.otlpEndpoint)!=null?o:"https://otel.observability.app.launchdarkly.com",projectId:this._options.projectId,sessionSecureId:this._options.sessionSecureId,environment:(c=(l=this._options)==null?void 0:l.environment)!=null?c:"production",networkRecordingOptions:typeof((a=this._options)==null?void 0:a.networkRecording)=="object"?this._options.networkRecording:void 0,tracingOrigins:(h=this._options)==null?void 0:h.tracingOrigins,serviceName:(f=(u=this._options)==null?void 0:u.serviceName)!=null?f:"browser",serviceVersion:(d=this._options)==null?void 0:d.version,instrumentations:(m=(p=this._options)==null?void 0:p.otel)==null?void 0:m.instrumentations,productAnalyticsEvents:this._productAnalyticsEvents(),getLDContextKeyAttributes:()=>this.getLDContextKeyAttributes(),getIntegrations:()=>this._integrations},this.sampler),this._gauges.clear(),this._counters.clear(),this._histograms.clear(),this._up_down_counters.clear();const t=new To((g=this._options.backendUrl)!=null?g:"https://pub.observability.app.launchdarkly.com",{headers:{}});ho(this,ui,nl(t,Zc())),yield this.configureSampling(),this.setupListeners()})}stop(){return z(this,null,function*(){this._started&&(this._started=!1,yield Ac())})}configureSampling(){return z(this,null,function*(){try{const t=yield co(this,ui).GetSamplingConfig({organization_verbose_id:`${this.organizationID}`});this.sampler.setConfig(t.sampling)}catch(t){We("sampling","warn",`LaunchDarkly Observability: Failed to configure sampling: ${t}`)}})}_recordLog(t,r,n,i){this.startSpan(Zg,s=>{var c,a,h,u,f;const o=rs(typeof t=="string"?t:Rt(t)),l=i?i.map(d=>d.toString()).join(`
|
|
487
|
+
`):void 0;if(s==null||s.addEvent("log",x(x({[xg]:r,[Ng]:o,"code.stacktrace":l},(c=this._ldContextKeys)!=null?c:{}),n)),this._options.reportConsoleErrors&&r==="error"){const d=new Error(o);s==null||s.recordException(d),s==null||s.setStatus({code:ls.ERROR,message:o}),i?this._recordErrorMessage({error:d,event:d.message,type:"custom",url:window.location.href,source:"frontend",lineNumber:(h=(a=i[0])==null?void 0:a.lineNumber)!=null?h:0,columnNumber:(f=(u=i[0])==null?void 0:u.columnNumber)!=null?f:0,stackTrace:i,timestamp:new Date().toISOString(),id:In()}):this.recordError(d)}})}_recordErrorMessage(t,r){try{t.payload&&(r=x(x({},JSON.parse(t.payload)),r||{}))}catch(o){}this.startSpan("highlight.exception",o=>{var l;hO(o,(l=t.error)!=null?l:new Error(t.event),{[Cx]:t.id}),o==null||o.setAttributes(x({event:t.event,type:t.type,url:t.url,source:t.source,lineNumber:t.lineNumber,columnNumber:t.columnNumber},r))});const s=t,{payload:n}=s,i=nt(s,["payload"]);for(const o of this._integrations)o.error(Nt(),B(x({},i),{payload:JSON.stringify(r)}))}recordError(t,r,n,i,s){var a,h,u,f;t=t||new Error("Unknown error"),t instanceof Error&&t.cause&&(n=B(x({},n),{"exception.cause":JSON.stringify(t.cause)}));let o=r?r+":"+t.message:t.message;s==="React.ErrorBoundary"&&(o="ErrorBoundary: "+o);const l=En(t),c={error:t,event:o,type:s!=null?s:"custom",url:window.location.href,source:i!=null?i:"frontend",lineNumber:(a=l[0])!=null&&a.lineNumber?(h=l[0])==null?void 0:h.lineNumber:0,columnNumber:(u=l[0])!=null&&u.columnNumber?(f=l[0])==null?void 0:f.columnNumber:0,stackTrace:l,timestamp:new Date().toISOString(),id:In()};this._recordErrorMessage(c,n)}recordCount(t){var n,i;let r=this._counters.get(t.name);if(!r){if(r=(n=or())==null?void 0:n.createCounter(t.name,lr(t.name,t.unit)),!r)return;this._counters.set(t.name,r)}r.add(t.value,B(x(x({},(i=this._ldContextKeys)!=null?i:{}),t.attributes),{"highlight.session_id":Nt()}))}recordGauge(t){var s,o,l;let r=this._gauges.get(t.name);if(!r){if(r=(s=or())==null?void 0:s.createGauge(t.name,lr(t.name,t.unit)),!r)return;this._gauges.set(t.name,r)}const n=x(x({},(o=this._ldContextKeys)!=null?o:{}),t.attributes);r.record(t.value,B(x({},n),{"highlight.session_id":Nt()}));const i={name:t.name,value:t.value,unit:t.unit,category:n.category,group:(l=n.group)==null?void 0:l.toString(),tags:Object.entries(n).map(([c,a])=>{var h;return{name:c!=null?c:"",value:(h=a==null?void 0:a.toString())!=null?h:""}})};for(const c of this._integrations)c.recordGauge(Nt(),i)}recordIncr(t){this.recordCount(B(x({},t),{value:1}))}recordHistogram(t){var n,i;let r=this._histograms.get(t.name);if(!r){if(r=(n=or())==null?void 0:n.createHistogram(t.name,lr(t.name,t.unit)),!r)return;this._histograms.set(t.name,r)}r.record(t.value,B(x(x({},(i=this._ldContextKeys)!=null?i:{}),t.attributes),{"highlight.session_id":Nt()}))}recordUpDownCounter(t){var n,i;let r=this._up_down_counters.get(t.name);if(!r){if(r=(n=or())==null?void 0:n.createUpDownCounter(t.name,lr(t.name,t.unit)),!r)return;this._up_down_counters.set(t.name,r)}r.add(t.value,B(x(x({},(i=this._ldContextKeys)!=null?i:{}),t.attributes),{"highlight.session_id":Nt()}))}startSpan(t,r,n,i){const s=zs();if(!s){const l=cn();return i===void 0&&n===void 0?r(l):i===void 0?n(l):i(l)}const o=(l,c)=>{this._ldContextKeys&&l.setAttributes(this._ldContextKeys);const a=c(l);return a instanceof Promise?a.finally(()=>l.end()):(l.end(),a)};return i===void 0&&n===void 0?s.startActiveSpan(t,l=>o(l,r)):i===void 0?s.startActiveSpan(t,r,l=>o(l,n)):s.startActiveSpan(t,r,n,l=>o(l,i))}startManualSpan(t,r,n,i){const s=zs();if(!s){const o=cn();return i===void 0&&n===void 0?r(o):i===void 0?n(o):i(o)}return i===void 0&&n===void 0?s.startActiveSpan(t,r):i===void 0?s.startActiveSpan(t,r,n):s.startActiveSpan(t,r,n,i)}register(t,r){this._integrations.push(new Js(t,r))}getHooks(t){return this._integrations.flatMap(r=>{var n,i;return(i=(n=r.getHooks)==null?void 0:n.call(r,t))!=null?i:[]})}submitViewportMetrics({height:t,width:r,availHeight:n,availWidth:i}){this.recordGauge({name:Xe.ViewportHeight,value:t,attributes:{category:xe.Device,group:window.location.href}}),this.recordGauge({name:Xe.ViewportWidth,value:r,attributes:{category:xe.Device,group:window.location.href}}),this.recordGauge({name:Xe.ScreenHeight,value:n,attributes:{category:xe.Device,group:window.location.href}}),this.recordGauge({name:Xe.ScreenWidth,value:i,attributes:{category:xe.Device,group:window.location.href}}),this.recordGauge({name:Xe.ViewportArea,value:t*r,attributes:{category:xe.Device,group:window.location.href}})}setupListeners(){var r;this._options.disableConsoleRecording||Zf(n=>{var i;this._recordLog((i=n.value)==null?void 0:i.join(" "),n.type,n.attributes?JSON.parse(n.attributes):{},n.trace)},{level:(r=this._options.consoleMethodsToRecord)!=null?r:[...il],logger:"console",recordLaunchDarklySdkLogs:this._options.recordLaunchDarklySdkLogs,stringifyOptions:{depthOfLimit:10,numOfKeysLimit:100,stringLengthLimit:1e3}}),this._options.enablePerformanceRecording!==!1&&(ry(n=>{Object.entries(n).filter(([i])=>i!=="relativeTimestamp").forEach(([i,s])=>s&&this.recordGauge({name:i,value:s,attributes:{category:xe.Performance,group:window.location.href}}))},0),qg(n=>{this.recordGauge({name:"Jank",value:n.jankAmount,attributes:{category:xe.WebVital,group:n.querySelector}})},0)),xf(n=>{var o;if(ml.includes(n.event)||gl.some(l=>n.event.includes(l)))return;const i=new Error(n.event);i.stack=Rt(n.stackTrace.map(l=>l.toString()));let s={};try{n.payload&&(s=JSON.parse(n.payload))}catch(l){}this._recordErrorMessage(B(x({},n),{error:(o=n.error)!=null?o:i}),s)},{enablePromisePatch:!!this._options.enablePromisePatch}),Zy(n=>{const{name:i,value:s}=n,{hostname:o,pathname:l,href:c}=window.location,a={group:window.location.pathname,category:xe.WebVital,[nr]:ns(c),[_s]:l,[lE]:o};switch(n.name){case"LCP":{const h=n.attribution;h.element&&(a["web_vital.element"]=h.element),h.url&&(a["web_vital.attribution.url"]=ns(h.url));break}case"CLS":{const h=n.attribution;h.largestShiftTarget&&(a["web_vital.element"]=h.largestShiftTarget),h.loadState&&(a["web_vital.load_state"]=h.loadState);break}case"INP":{const h=n.attribution;h.eventTarget&&(a["web_vital.element"]=h.eventTarget),h.eventType&&(a["web_vital.event_type"]=h.eventType),h.loadState&&(a["web_vital.load_state"]=h.loadState);break}case"FID":{const h=n.attribution;h.eventTarget&&(a["web_vital.element"]=h.eventTarget),h.eventType&&(a["web_vital.event_type"]=h.eventType);break}case"FCP":{const h=n.attribution;h.loadState&&(a["web_vital.load_state"]=h.loadState);break}}this.recordGauge({name:i,value:s,attributes:a})}),jc(n=>{this.submitViewportMetrics(n)}),Ly(n=>{const i={category:xe.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(([s])=>s!=="relativeTimestamp").forEach(([s,o])=>{vf(o)&&this.recordGauge({name:s,value:o,attributes:i})})},new Date().getTime());const{getDeviceDetails:t}=Oy();t&&this.recordGauge({name:Xe.DeviceMemory,value:t().deviceMemory,attributes:{category:xe.Device,group:window.location.href}}),this._options.enableLongtaskRecording!==!1&&sO(n=>{const i={category:xe.Performance,name:n.name,[_s]:window.location.pathname};n.containerType&&(i.container_type=n.containerType),n.containerSrc&&(i.container_src=n.containerSrc),n.containerId&&(i.container_id=n.containerId),n.containerName&&(i.container_name=n.containerName),this.recordHistogram({name:"long_task.duration",value:n.duration,attributes:i})}),this._options.enableReportingObserver!==!1&&uO(n=>{var s;const i=B(x({},n.attributes),{[_s]:window.location.pathname});if(n.kind==="log")this._recordLog(n.message,(s=n.level)!=null?s:"warn",i);else{const o=new Error(n.message);this.recordError(o,void 0,Object.fromEntries(Object.entries(i).map(([l,c])=>[l,c===void 0?"":String(c)])),"reporting-observer","custom")}})}recordLog(t,r,n){return this._recordLog(t,r,n)}}ui=new WeakMap;function tb(e,t,r){if(typeof r=="function")return r;if(typeof t=="function")return t;if(typeof e=="function")return e}class rb extends Gc{_startSdk(){return z(this,null,function*(){yield this._sdk.start()})}start(){return z(this,null,function*(){return this._start()})}stop(){return z(this,null,function*(){yield this._stop(()=>this._sdk.stop())})}recordGauge(t){return this._bufferCall("recordGauge",[t])}recordCount(t){return this._bufferCall("recordCount",[t])}recordIncr(t){return this._bufferCall("recordIncr",[t])}recordHistogram(t){return this._bufferCall("recordHistogram",[t])}recordUpDownCounter(t){return this._bufferCall("recordUpDownCounter",[t])}startSpan(t,r,n,i){var s;return this._isReady?this._bufferCall("startSpan",[t,r,n,i]):(this._logNoopSpanWarning(),(s=tb(r,n,i))==null?void 0:s(cn()))}startManualSpan(t,r,n,i){var s;return this._isReady?this._bufferCall("startManualSpan",[t,r,n,i]):(this._logNoopSpanWarning(),(s=tb(r,n,i))==null?void 0:s(cn()))}_logNoopSpanWarning(){It("startSpan/startManualSpan called before start()","span-before-start","warn","The span callback runs on a no-op span and the span is not recorded.")}register(t,r){return this._bufferCall("register",[t,r])}recordLog(t,r,n){return this._bufferCall("recordLog",[t,r,n])}recordError(t,r,n,i,s){return this._bufferCall("recordError",[t,r,n,i,s])}setLDContextKeyAttributes(t){return this._bufferCall("setLDContextKeyAttributes",[t])}getLDContextKeyAttributes(){return this._isLoaded?this._callSdk("getLDContextKeyAttributes",[]):void 0}}A.LDObserve=void 0,typeof globalThis!="undefined"?globalThis.LDObserve?A.LDObserve=globalThis.LDObserve:(A.LDObserve=new rb,globalThis.LDObserve=A.LDObserve):A.LDObserve=new rb;class nb{constructor(t){L(this,"sessionSecureID");try{t!=null&&t.storageMode&&Qp(t==null?void 0:t.storageMode),Os(!!(t!=null&&t.sessionCookie)),(t==null?void 0:t.sessionCookieDomain)!==void 0&&$p(t.sessionCookieDomain),t!=null&&t.sessionCookie?nm():Os(!1)}catch(r){We("Error initializing @launchdarkly observability plugin","error",r)}}configureSession(t,r){try{const n=Nt();let i=Ft(n);i!=null&&i.sessionSecureID?this.sessionSecureID=i.sessionSecureID:(r!=null&&r.sessionKey?this.sessionSecureID=St(`${t}-${r.sessionKey}`):this.sessionSecureID=St(),ir(this.sessionSecureID),it({sessionSecureID:this.sessionSecureID,sessionKey:r==null?void 0:r.sessionKey,projectID:0,sessionStartTime:Date.now(),lastPushTime:Date.now()}))}catch(n){We("Error configuring session in @launchdarkly observability plugin","error",n)}}}class pO extends nb{constructor(r){super(r);L(this,"observe");L(this,"options");L(this,"exposureDeduper");this.options=r,this.exposureDeduper=new vI(r==null?void 0:r.flagExposureDedupeWindowMillis,r==null?void 0:r.flagExposureDedupeMaxSize)}initialize(r,n){try{if(typeof window=="undefined"||typeof document=="undefined"){_e("warn","@launchdarkly/observability is not initializing because it is not supported in this environment.");return}if(!r){_e("warn","@launchdarkly/observability is not initializing because the SDK credential is undefined.");return}this.configureSession(r,n),this.observe=new fO(B(x({},n),{projectId:r,sessionSecureId:this.sessionSecureID}));const i=n!=null&&n.manualStart?void 0:this.observe.start();A.LDObserve.load(this.observe,{ready:!(n!=null&&n.manualStart),started:i})}catch(i){We("Error initializing @launchdarkly/observability SDK","error",i)}}getMetadata(){return{name:"@launchdarkly/observability"}}register(r,n){var i;(i=this.observe)==null||i.register(r,n)}getHooks(r){var i,s,o,l;const n=x(x({[Pp]:r.sdk.name,[Mp]:r.sdk.version,[yg]:r.clientSideId,[kc]:"LaunchDarkly"},(i=r.application)!=null&&i.id?{[_g]:r.application.id}:{}),(s=r.application)!=null&&s.version?{[Tg]:r.application.version}:{});return this.initialize((l=(o=r.sdkKey)!=null?o:r.mobileKey)!=null?l:r.clientSideId,this.options),[{getMetadata:()=>({name:"@launchdarkly/observability/hooks"}),afterIdentify:(c,a,h)=>{var f,d,p,m,g,v,y,w,_;for(const S of(p=(d=(f=this.observe)==null?void 0:f.getHooks)==null?void 0:d.call(f,r))!=null?p:[])(m=S.afterIdentify)==null||m.call(S,c,a,h);const u=Qn(c.context);if((g=this.observe)==null||g.setLDContextKeyAttributes(u),h.status==="completed"){this.exposureDeduper.reset();const S=B(x({},u),{key:(w=(y=(v=this.options)==null?void 0:v.contextFriendlyName)==null?void 0:y.call(v,c.context))!=null?w:Lr(c.context),timeout:c.timeout,canonicalKey:Lr(c.context),[_x]:h.status});(_=this.observe)==null||_.recordLog("LD.identify","info",x(x({},n),S))}return a},afterEvaluation:(c,a,h)=>{var m,g,v,y,w,_,S,b,R;for(const I of(v=(g=(m=this.observe)==null?void 0:m.getHooks)==null?void 0:g.call(m,r))!=null?v:[])(y=I.afterEvaluation)==null||y.call(I,c,a,h);const u=x({[bg]:c.flagKey,[wg]:JSON.stringify(h.value)},h.variationIndex!==void 0&&h.variationIndex!==null?{[Rg]:h.variationIndex}:{});if(h.reason)for(const I in Fs){const E=I,C=h.reason[E];C!=null&&(u[Fs[E]]=C)}const f=c.context?Lr(c.context):void 0;c.context&&(u[vg]=JSON.stringify(Qn(c.context)),u[Sg]=f);const d=[c.flagKey,JSON.stringify(h.value),(w=h.variationIndex)!=null?w:"",(S=(_=h.reason)==null?void 0:_.kind)!=null?S:"",(R=(b=h.reason)==null?void 0:b.ruleId)!=null?R:"",f!=null?f:""].join("|");if(!this.observe||!this.exposureDeduper.shouldRecord(d))return a;const p=x(x({},n),u);return this.observe.startSpan(Vc,I=>{I!=null&&I.isRecording()&&(I.addEvent(Ye,p),this.exposureDeduper.markRecorded(d))}),a},afterTrack:c=>{var u,f,d,p,m,g,v,y,w;for(const _ of(d=(f=(u=this.observe)==null?void 0:u.getHooks)==null?void 0:f.call(u,r))!=null?d:[])(p=_.afterTrack)==null||p.call(_,c);if(!(((m=this.options)==null?void 0:m.productAnalytics)!==!1&&(typeof((g=this.options)==null?void 0:g.productAnalytics)!="object"||this.options.productAnalytics.trackEvents!==!1)))return;const h=x(B(x(x({[nr]:window.location.href},(y=(v=this.observe)==null?void 0:v.getLDContextKeyAttributes())!=null?y:{}),n),{key:c.key,value:c.metricValue}),typeof c.data=="object"?c.data:{});(w=this.observe)==null||w.startSpan(Sx,_=>{_&&_.setAttributes(h)})}}]}}class mO{constructor(t){L(this,"options");L(this,"isRunningOnHighlight");L(this,"organizationID");uo(this,di);L(this,"events");L(this,"sessionData");L(this,"ready");L(this,"manualStopped");L(this,"state");L(this,"logger");L(this,"enableSegmentIntegration");L(this,"privacySetting");L(this,"enableCanvasRecording");L(this,"samplingStrategy");L(this,"inlineImages");L(this,"inlineVideos");L(this,"inlineStylesheet");L(this,"styleSheetResyncInterval");L(this,"debugOptions");L(this,"listeners");L(this,"firstloadVersion");L(this,"environment");L(this,"sessionShortcut");L(this,"appVersion");L(this,"serviceName");L(this,"_worker");L(this,"_optionsInternal");L(this,"_backendUrl");L(this,"_recordingStartTime");L(this,"_isOnLocalHost");L(this,"_onToggleFeedbackFormVisibility");L(this,"_isCrossOriginIframe");L(this,"_eventBytesSinceSnapshot");L(this,"_lastSnapshotTime");L(this,"_lastVisibilityChangeTime");L(this,"pushPayloadTimerId");L(this,"hasSessionUnloaded");L(this,"hasPushedData");L(this,"reloaded");L(this,"_hasPreviouslyInitialized");L(this,"_recordStop");L(this,"_integrations",[]);var n,i,s,o,l,c;this.options=t,typeof((n=this.options)==null?void 0:n.debug)=="boolean"?this.debugOptions=this.options.debug?{clientInteractions:!0}:{}:this.debugOptions=(s=(i=this.options)==null?void 0:i.debug)!=null?s:{},this.logger=new Oc(this.debugOptions.clientInteractions),(o=this.options)!=null&&o.debug&&ul(!0),this._worker=new zy,this._worker.onmessage=a=>{var h,u,f;((h=a.data.response)==null?void 0:h.type)===Be.AsyncEvents?(this._eventBytesSinceSnapshot+=a.data.response.eventsSize,this.logger.log(`Web worker sent payloadID ${a.data.response.id} size ${a.data.response.eventsSize} bytes, compression ratio ${a.data.response.eventsSize/a.data.response.compressedSize}.
|
|
488
|
+
Total since snapshot: ${(this._eventBytesSinceSnapshot/1e6).toFixed(1)}MB`)):((u=a.data.response)==null?void 0:u.type)===Be.CustomEvent?this.addCustomEvent(a.data.response.tag,a.data.response.payload):((f=a.data.response)==null?void 0:f.type)===Be.Stop&&(We("worker.onmessage","warn","Stopping recording due to worker failure",a.data.response),this.stop(!1))};let r=Ft();if(this.reloaded=!1,!((l=this.sessionData)!=null&&l.sessionSecureID)&&(r!=null&&r.sessionSecureID))this.sessionData=r,this.options.sessionSecureID=r.sessionSecureID,this.reloaded=!0,this.logger.log(`Tab reloaded, continuing previous session: ${this.sessionData.sessionSecureID}`);else{for(const a of Object.values(Ge))Rr(a);this.sessionData={sessionSecureID:this.options.sessionSecureID,projectID:0,sessionStartTime:Date.now()}}this._hasPreviouslyInitialized=!1;try{window.parent.document&&(this._isCrossOriginIframe=!1)}catch(a){this._isCrossOriginIframe=(c=this.options.recordCrossOriginIframe)!=null?c:!0}this._initMembers(this.options)}_reset(n){return z(this,arguments,function*({forceNew:t,sessionKey:r}){this.pushPayloadTimerId&&(clearTimeout(this.pushPayloadTimerId),this.pushPayloadTimerId=void 0);let i,s;if(!t)try{i=He(Ge.USER_IDENTIFIER);const o=He(Ge.USER_OBJECT);o&&(s=JSON.parse(o))}catch(o){}for(const o of Object.values(Ge))Rr(o);this.sessionData.sessionSecureID=r?St(`${this.organizationID}-${r}`):St(),this.sessionData.sessionKey=r,this.sessionData.sessionStartTime=Date.now(),this.options.sessionSecureID=this.sessionData.sessionSecureID,this.stop(),this._worker.postMessage({message:{type:Be.Reset}}),yield this.start(),i&&s&&this.identify(i,s)})}_initMembers(t){var s,o,l,c,a,h,u,f,d,p;this.sessionShortcut=!1,this._recordingStartTime=0,this._isOnLocalHost=window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1"||window.location.hostname==="",this.ready=!1,this.state="NotRecording",this.manualStopped=!1,this.enableSegmentIntegration=!!t.enableSegmentIntegration,this.privacySetting=(s=t.privacySetting)!=null?s:"default",this.enableCanvasRecording=(o=t.enableCanvasRecording)!=null?o:!1,this.inlineImages=(l=t.inlineImages)!=null?l:this._isOnLocalHost,this.inlineVideos=(c=t.inlineVideos)!=null?c:this._isOnLocalHost,this.inlineStylesheet=(a=t.inlineStylesheet)!=null?a:this._isOnLocalHost,this.styleSheetResyncInterval=(h=t.styleSheetResyncInterval)!=null?h:2e3,this.samplingStrategy=x({canvasFactor:.5,canvasMaxSnapshotDimension:360,canvasClearWebGLBuffer:!0,dataUrlOptions:bf()},(u=t.samplingStrategy)!=null?u:{canvas:2}),this._backendUrl=(f=t==null?void 0:t.backendUrl)!=null?f:"https://pub.observability.app.launchdarkly.com",this._backendUrl[0]==="/"&&(this._backendUrl=new URL(this._backendUrl,document.baseURI).href);const r=new To(`${this._backendUrl}`,{headers:{}});ho(this,di,nl(r,Zc())),this.environment=(d=t.environment)!=null?d:"production",this.appVersion=t.appVersion,this.serviceName=(p=t.serviceName)!=null?p:"browser",typeof t.organizationID=="string"?this.organizationID=t.organizationID:this.organizationID=t.organizationID.toString(),this.isRunningOnHighlight=this.organizationID==="1"||this.organizationID==="1jdkoe52",this.firstloadVersion=t.firstloadVersion||"unknown",this.sessionShortcut=t.sessionShortcut||!1,this._onToggleFeedbackFormVisibility=()=>{};const m=t,{firstloadVersion:n}=m,i=nt(m,["firstloadVersion"]);this._optionsInternal=i,this.listeners=[],this.events=[],this.hasSessionUnloaded=!1,this.hasPushedData=!1,window.Intercom&&window.Intercom("onShow",()=>{window.Intercom("update",{highlightSessionURL:this.getCurrentSessionURLWithTimestamp()}),this.addProperties({event:"Intercom onShow"})}),this._eventBytesSinceSnapshot=0,this._lastSnapshotTime=new Date().getTime(),this._lastVisibilityChangeTime=new Date().getTime()}identify(t,r={},n){if(!t||t===""){We("identify","warn","Highlight's identify() call was passed an empty identifier.",{user_identifier:t,user_object:r});return}this.sessionData.userIdentifier=t.toString(),this.sessionData.userObject=r,mt(Ge.USER_IDENTIFIER,t.toString()),mt(Ge.USER_OBJECT,JSON.stringify(r)),this._worker.postMessage({message:{type:Be.Identify,userIdentifier:t,userObject:r,source:n}})}track(t,r){this.addProperties(B(x({},r),{event:t}))}addProperties(t={},r){const n=x({},t);Object.entries(n).forEach(([i,s])=>{try{structuredClone(s)}catch(o){delete n[i]}}),this._worker.postMessage({message:{type:Be.Properties,propertiesObject:n,propertyType:r}})}addSessionProperties(t){this.addProperties(t,{type:"session"})}start(t){return z(this,null,function*(){var r,n,i,s,o,l,c,a,h,u;if(!((r=navigator==null?void 0:navigator.userAgent)!=null&&r.includes("Googlebot")||(n=navigator==null?void 0:navigator.userAgent)!=null&&n.includes("AdsBot")))try{if(t!=null&&t.forceNew){yield this._reset(t);return}if(t!=null&&t.sessionKey&&(t==null?void 0:t.sessionKey)!==this.sessionData.sessionKey){yield this._reset(B(x({},t),{forceNew:!0}));return}this.logger.log("Initializing...",t,this.sessionData,this.options),this.sessionData=(i=Ft(this.sessionData.sessionSecureID))!=null?i:this.sessionData,(s=this.sessionData)!=null&&s.sessionStartTime?this._recordingStartTime=(o=this.sessionData)==null?void 0:o.sessionStartTime:(this._recordingStartTime=new Date().getTime(),this.sessionData.sessionStartTime=this._recordingStartTime);let f=He(Jn.CLIENT_ID);f||(f=St(),mt(Jn.CLIENT_ID,f));let d;this.options.disableSessionRecording||this.options.disableNetworkRecording!==void 0||typeof this.options.networkRecording=="boolean"?d=!1:d=((l=this.options.networkRecording)==null?void 0:l.recordHeadersAndBody)||!1;let p=[];if(typeof this.options.networkRecording=="object"&&((c=this.options.networkRecording.destinationDomains)!=null&&c.length)&&(p=this.options.networkRecording.destinationDomains),this._isCrossOriginIframe)yield this._setupCrossOriginIframe();else{const w=yield co(this,di).initializeSession({organization_verbose_id:this.organizationID,enable_strict_privacy:this.privacySetting==="strict",privacy_setting:this.privacySetting,enable_recording_network_contents:d,clientVersion:this.firstloadVersion,firstloadVersion:this.firstloadVersion,clientConfig:JSON.stringify(this._optionsInternal),environment:this.environment,id:f,appVersion:this.appVersion,serviceName:this.serviceName,session_secure_id:this.sessionData.sessionSecureID,session_key:this.sessionData.sessionKey,client_id:f,network_recording_domains:p,disable_session_recording:this.options.disableSessionRecording});if(w.initializeSession.secure_id!==this.sessionData.sessionSecureID&&this.logger.log(`Unexpected secure id returned by initializeSession: ${w.initializeSession.secure_id}, expected ${this.sessionData.sessionSecureID}`),this.sessionData.sessionSecureID=w.initializeSession.secure_id,this.sessionData.projectID=parseInt(((a=w==null?void 0:w.initializeSession)==null?void 0:a.project_id)||"0"),!this.sessionData.projectID||!this.sessionData.sessionSecureID){_e("error","Failed to initialize Highlight; an error occurred on our end.",this.sessionData);return}}ir(""),it(this.sessionData),this.logger.log(`Loaded Highlight
|
|
489
489
|
Remote: ${this._backendUrl}
|
|
490
490
|
Project ID: ${this.sessionData.projectID}
|
|
491
|
-
SessionSecureID: ${this.sessionData.sessionSecureID}`),this.options.sessionSecureID=this.sessionData.sessionSecureID,this._worker.postMessage({message:{type:
|
|
491
|
+
SessionSecureID: ${this.sessionData.sessionSecureID}`),this.options.sessionSecureID=this.sessionData.sessionSecureID,this._worker.postMessage({message:{type:Be.Initialize,sessionSecureID:this.sessionData.sessionSecureID,backend:this._backendUrl,debug:!!this.debugOptions.clientInteractions,recordingStartTime:this._recordingStartTime}});for(const w of this._integrations)w.init(this.sessionData.sessionSecureID);if(this.sessionData.userIdentifier&&this.identify(this.sessionData.userIdentifier,this.sessionData.userObject),this.pushPayloadTimerId&&(clearTimeout(this.pushPayloadTimerId),this.pushPayloadTimerId=void 0),this._isCrossOriginIframe||(this.pushPayloadTimerId=setTimeout(()=>{this._save()},Is)),this.options.disableSessionRecording){this.logger.log("Highlight is NOT RECORDING a session replay per H.init setting."),this.ready=!0,this.state="Recording",this.manualStopped=!1;return}const m=(w,_)=>{_&&this.logger.log("received isCheckout emit",{event:w}),this.events.push(w)};m.bind(this);const g=!!this._recordStop;this._recordStop&&(this._recordStop(),this._recordStop=void 0);const[v,y]=Ug(this.privacySetting,this.options.maskAllInputs,this.options.maskInputOptions);this._recordStop=dt({ignoreClass:(h=this.options.ignoreClass)!=null?h:"highlight-ignore",ignoreSelector:this.options.ignoreSelector,blockClass:(u=this.options.blockClass)!=null?u:"highlight-block",blockSelector:this.options.blockSelector,emit:m,recordCrossOriginIframes:this.options.recordCrossOriginIframe,privacySetting:Dg(this.privacySetting,this.options.maskPiiText),maskAllInputs:v,maskInputOptions:y,maskTextClass:this.options.maskTextClass,maskTextSelector:this.options.maskTextSelector,recordCanvas:this.enableCanvasRecording,sampling:{canvas:{fps:this.samplingStrategy.canvas,fpsManual:this.samplingStrategy.canvasManualSnapshot,resizeFactor:this.samplingStrategy.canvasFactor,clearWebGLBuffer:this.samplingStrategy.canvasClearWebGLBuffer,initialSnapshotDelay:this.samplingStrategy.canvasInitialSnapshotDelay,dataURLOptions:this.samplingStrategy.dataUrlOptions,maxSnapshotDimension:this.samplingStrategy.canvasMaxSnapshotDimension}},keepIframeSrcFn:w=>!this.options.recordCrossOriginIframe,inlineImages:this.inlineImages,inlineVideos:this.inlineVideos,collectFonts:this.inlineImages,inlineStylesheet:this.inlineStylesheet,styleSheetResyncInterval:this.styleSheetResyncInterval,plugins:[Ze()],logger:typeof this.options.debug=="boolean"&&this.options.debug||typeof this.options.debug=="object"&&this.options.debug.domRecording?{debug:this.logger.log,warn:We.bind(null,"RecordSDK","warn")}:void 0}),g||this.options.recordCrossOriginIframe&&this._setupCrossOriginIframeParent(),document.referrer&&(window&&document.referrer.includes(window.location.origin)||(this.addCustomEvent("Referrer",document.referrer),this.addProperties({referrer:document.referrer},{type:"session"}))),this.sessionData.sessionKey&&this.addProperties({sessionKey:this.sessionData.sessionKey},{type:"session"}),this._setupWindowListeners(),this.ready=!0,this.state="Recording",this.manualStopped=!1}catch(f){We("initializeSession _setupWindowListeners","warn",f)}})}_visibilityHandler(t){return z(this,null,function*(){if(this.manualStopped){this.logger.log("Ignoring visibility event due to manual stop.");return}new Date().getTime()-this._lastVisibilityChangeTime<zp||(this._lastVisibilityChangeTime=new Date().getTime(),this.logger.log(`Detected window ${t?"hidden":"visible"}.`),t?(this.addCustomEvent("TabHidden",!0),this.options.disableBackgroundRecording&&this.stop()):(this.options.disableBackgroundRecording&&(yield this.start()),this.addCustomEvent("TabHidden",!1)))})}_setupCrossOriginIframe(){return z(this,null,function*(){this.logger.log("highlight in cross-origin iframe is waiting "),yield new Promise(t=>{const r=n=>{if(n.data.highlight===io){const i=n.data;this.logger.log("highlight got window message ",i),this.sessionData.projectID=i.projectID,this.sessionData.sessionSecureID=i.sessionSecureID,window.parent.postMessage({highlight:so},"*"),window.removeEventListener("message",r),t()}};window.addEventListener("message",r)})})}_setupCrossOriginIframeParent(){this.logger.log("highlight setting up cross origin iframe parent notification"),setInterval(()=>{window.document.querySelectorAll("iframe").forEach(t=>{var r;(r=t.contentWindow)==null||r.postMessage({highlight:io,projectID:this.sessionData.projectID,sessionSecureID:this.sessionData.sessionSecureID},"*")})},Is),window.addEventListener("message",t=>{t.data.highlight===so&&this.logger.log("highlight got response from initialized iframe")})}_setupWindowListeners(){var n;try{const i=this;this.enableSegmentIntegration&&this.listeners.push(ny(o=>{if(o.type==="track"){const l={};l["segment-event"]=o.event,i.addProperties(l,{type:"track",source:"segment"})}else if(o.type==="identify"){const l=o.userId.replace(/^"(.*)"$/,"$1");i.identify(l,o.traits,"segment")}})),this.listeners.push(Xc(o=>{this.reloaded?(this.addCustomEvent("Reload",o),this.reloaded=!1,i.addProperties({reload:!0},{type:"session"})):this.addCustomEvent("Navigate",o)})),this.listeners.push(jc(o=>{this.addCustomEvent("Viewport",o)})),this.listeners.push(Qg((o,l)=>{let c=null,a=null;if(l&&l.target){const h=l.target;c=Fc(h),a=h.textContent,a&&a.length>2e3&&(a=a.substring(0,2e3))}this.addCustomEvent("Click",{clickTarget:o,clickTextContent:a,clickSelector:c})})),this.listeners.push($g(o=>{o&&this.addCustomEvent("Focus",o)})),this.sessionShortcut&&this.listeners.push(sy(this.sessionShortcut,()=>{window.open(this.getCurrentSessionURLWithTimestamp(),"_blank")})),this._hasPreviouslyInitialized||((n=window.electron)!=null&&n.ipcRenderer?(window.electron.ipcRenderer.on("highlight.run",({visible:o})=>{this._visibilityHandler(!o)}),this.logger.log("Set up Electron highlight.run events.")):(ey(o=>this._visibilityHandler(o)),this.logger.log("Set up document visibility listener.")),this._hasPreviouslyInitialized=!0);const s=()=>{this.hasSessionUnloaded=!0,this.pushPayloadTimerId&&(clearTimeout(this.pushPayloadTimerId),this.pushPayloadTimerId=void 0)};window.addEventListener("beforeunload",s),this.listeners.push(()=>window.removeEventListener("beforeunload",s))}catch(i){We("initializeSession _setupWindowListeners","warn",i)}const t=()=>{this.addCustomEvent("Page Unload",""),ir(this.sessionData.sessionSecureID),it(this.sessionData)};if(window.addEventListener("beforeunload",t),this.listeners.push(()=>window.removeEventListener("beforeunload",t)),navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/iPhone/i)){const i=()=>{this.addCustomEvent("Page Unload",""),ir(this.sessionData.sessionSecureID),it(this.sessionData)};window.addEventListener("pagehide",i),this.listeners.push(()=>window.removeEventListener("beforeunload",i))}}stop(t){this.manualStopped=!!t,this.manualStopped&&this.addCustomEvent("Stop","H.stop() was called which stops Highlight from recording."),this.state="NotRecording",t&&this._recordStop&&(this._recordStop(),this._recordStop=void 0),this.listeners.forEach(r=>r()),this.listeners=[]}getCurrentSessionURLWithTimestamp(){const t=new Date().getTime(),{projectID:r,sessionSecureID:n}=this.sessionData,i=(t-this._recordingStartTime)/1e3;return`https://${Fn}/${r}/sessions/${n}?ts=${i}`}getCurrentSessionURL(){const t=this.sessionData.projectID,r=this.sessionData.sessionSecureID;return t&&r?`https://${Fn}/${t}/sessions/${r}`:null}snapshot(t){return z(this,null,function*(){yield dt.snapshotCanvas(t)})}addSessionFeedback(t){}_save(){return z(this,null,function*(){var t;try{this.state==="Recording"&&this.listeners&&!this.sessionData.sessionKey&&this.sessionData.sessionStartTime&&Date.now()-this.sessionData.sessionStartTime>ql&&(this.logger.log("Resetting session",{start:this.sessionData.sessionStartTime}),yield this._reset({}));let r;((t=this.options)==null?void 0:t.sendMode)==="local"&&(r=n=>z(this,null,function*(){let i=new Blob([JSON.stringify({query:bo(rl),variables:n})],{type:"application/json"});return yield window.fetch(`${this._backendUrl}`,{method:"POST",body:i}),0})),yield this._sendPayload({sendFn:r}),this.hasPushedData=!0,this.sessionData.lastPushTime=Date.now(),it(this.sessionData)}catch(r){We("_save","warn",r)}this.state==="Recording"&&(this.pushPayloadTimerId&&(clearTimeout(this.pushPayloadTimerId),this.pushPayloadTimerId=void 0),this.pushPayloadTimerId=setTimeout(()=>{this._save()},Bp))})}addCustomEvent(t,r){if(this.state==="NotRecording"){let n;const i=()=>{clearInterval(n),this.state==="Recording"&&this.events.length>0?Qi(t,r):n=setTimeout(i,500)};n=setTimeout(i,500)}else this.state==="Recording"&&(this.events.length>0||this.hasPushedData)&&Qi(t,r)}_sendPayload(r){return z(this,arguments,function*({sendFn:t}){const n=[...this.events],{bytes:i,time:s}=this.enableCanvasRecording?Cs.canvas:Cs.normal;this._eventBytesSinceSnapshot>=i&&new Date().getTime()-this._lastSnapshotTime>=s&&this.takeFullSnapshot(),this.logger.log(`Sending: ${n.length} events,
|
|
492
492
|
To: ${this._backendUrl}
|
|
493
493
|
Org: ${this.organizationID}
|
|
494
|
-
SessionSecureID: ${this.sessionData.sessionSecureID}`);const o=new Date().getTime(),l=Ey();if(t){const u={session_secure_id:this.sessionData.sessionSecureID,payload_id:o.toString(),events:{events:n},messages:Rt({messages:[]}),resources:JSON.stringify({resources:[]}),web_socket_events:JSON.stringify({webSocketEvents:[]}),errors:[],is_beacon:!1,has_session_unloaded:this.hasSessionUnloaded,highlight_logs:l||void 0},{compressedBase64:a}=yield Ay(u);yield t({session_secure_id:this.sessionData.sessionSecureID,payload_id:o.toString(),data:a})}else this._worker.postMessage({message:{type:Ue.AsyncEvents,id:o,events:n,messages:[],errors:[],resourcesString:JSON.stringify({resources:[]}),webSocketEventsString:JSON.stringify({webSocketEvents:[]}),hasSessionUnloaded:this.hasSessionUnloaded,highlightLogs:l}});mt(this.sessionData),this.events=this.events.slice(n.length),Iy(l)})}takeFullSnapshot(){if(!this._recordStop){this.logger.log("skipping full snapshot as rrweb is not running");return}this.logger.log("taking full snapshot",{bytesSinceSnapshot:this._eventBytesSinceSnapshot,lastSnapshotTime:this._lastSnapshotTime}),ct.takeFullSnapshot(),this._eventBytesSinceSnapshot=0,this._lastSnapshotTime=new Date().getTime()}register(t,r){this._integrations.push(new Fs(t,r))}getHooks(t){return this._integrations.flatMap(r=>{var n,i;return(i=(n=r.getHooks)==null?void 0:n.call(r,t))!=null?i:[]})}getRecordingState(){var t;return(t=this==null?void 0:this.state)!=null?t:"NotRecording"}getSession(){const t=this.sessionData.sessionSecureID,r=Ft(t);if(!r)return null;const n=`${this.getFrontendUrl()}/sessions/${t}`;if(!n||!(r==null?void 0:r.sessionStartTime))return null;const s=new Date().getTime();let o;try{o=new URL(n)}catch(a){return He("identify","warn",`failed to construct session url from ${n}`,a),null}const l=new URL(o),u=(s-this._recordingStartTime)/1e3;return l.searchParams.set("ts",u.toString()),{url:o.toString(),urlWithTimestamp:l.toString(),sessionSecureID:t}}getFrontendUrl(){var r,n;const t=this._backendUrl.match(yI);if(t&&((r=t==null?void 0:t.groups)!=null&&r.domain)){const i=(n=t.groups.domain)!=null?n:"",s=mI[i];return s?`https://${s}${gI}`:zp}return zp}}li=new WeakMap;class qy extends Nu{getSession(){return this._isLoaded?this._bufferCall("getSession",[]):null}start(t){return q(this,null,function*(){return this._sdk.start(t)})}stop(){return this._sdk.stop()}addSessionProperties(t){return this._bufferCall("addSessionProperties",[t])}getRecordingState(){return this._isLoaded?this._bufferCall("getRecordingState",[]):"NotRecording"}snapshot(t){return this._isLoaded?this._bufferCall("snapshot",[t]):Promise.resolve(void 0)}register(t,r){return this._bufferCall("register",[t,r])}}A.LDRecord=void 0,typeof globalThis!="undefined"?globalThis.LDRecord?A.LDRecord=globalThis.LDRecord:(A.LDRecord=new qy,globalThis.LDRecord=A.LDRecord):A.LDRecord=new qy;class uO extends $y{constructor(r){super(r);L(this,"record");L(this,"options");this.options=r}initialize(r,n){var i,s,o,l,u,a,h,c,f;try{if(typeof window=="undefined"||typeof document=="undefined"){_e("warn","@launchdarkly/session-replay is not initializing because it is not supported in this environment.");return}if(typeof Worker=="undefined"){_e("warn","@launchdarkly/session-replay is not initializing because Worker is not supported.");return}if(!r){_e("warn","@launchdarkly/session-replay is not initializing because the SDK credential is undefined.");return}this.configureSession(r,n);const d=B(x({},n),{organizationID:r,firstloadVersion:Xu,environment:(n==null?void 0:n.environment)||"production",appVersion:n==null?void 0:n.version,sessionSecureID:this.sessionSecureID,privacySetting:(i=n==null?void 0:n.privacySetting)!=null?i:"strict"});this.record=new lO(d),n!=null&&n.manualStart||this.record.start(),A.LDRecord.load(this.record),!((o=(s=n==null?void 0:n.integrations)==null?void 0:s.mixpanel)!=null&&o.disabled)&&((u=(l=n==null?void 0:n.integrations)==null?void 0:l.mixpanel)!=null&&u.projectToken)&&Yy(n.integrations.mixpanel),!((h=(a=n==null?void 0:n.integrations)==null?void 0:a.amplitude)!=null&&h.disabled)&&((f=(c=n==null?void 0:n.integrations)==null?void 0:c.amplitude)!=null&&f.apiKey)&&Hy(n.integrations.amplitude)}catch(d){He("Error initializing @launchdarkly/session-replay SDK","error",d)}}getMetadata(){return{name:"@launchdarkly/session-replay"}}register(r,n){var i;(i=this.record)==null||i.register(r,n)}getHooks(r){var i,s,o,l;const n=x(x({[Xp]:r.sdk.name,[Wp]:r.sdk.version,[hg]:r.clientSideId,[Gu]:"LaunchDarkly"},(i=r.application)!=null&&i.id?{[bg]:r.application.id}:{}),(s=r.application)!=null&&s.version?{[vg]:r.application.version}:{});return this.initialize((l=(o=r.sdkKey)!=null?o:r.mobileKey)!=null?l:r.clientSideId,this.options),[{getMetadata:()=>({name:"@launchdarkly/session-replay/hooks"}),afterIdentify:(u,a,h)=>{var c,f,d,p,m,g,v,y;for(const w of(d=(f=(c=this.record)==null?void 0:c.getHooks)==null?void 0:f.call(c,r))!=null?d:[])(p=w.afterIdentify)==null||p.call(w,u,a,h);if(h.status==="completed"){const w=B(x({},zn(u.context)),{key:(v=(g=(m=this.options)==null?void 0:m.contextFriendlyName)==null?void 0:g.call(m,u.context))!=null?v:Zr(u.context),canonicalKey:Zr(u.context)});(y=this.record)==null||y.identify(w.key,x(x({},n),w),"LaunchDarkly")}return a},afterEvaluation:(u,a,h)=>{var c,f,d,p;for(const m of(d=(f=(c=this.record)==null?void 0:c.getHooks)==null?void 0:f.call(c,r))!=null?d:[])(p=m.afterEvaluation)==null||p.call(m,u,a,h);return a},afterTrack:u=>{var a,h,c,f,d;for(const p of(c=(h=(a=this.record)==null?void 0:a.getHooks)==null?void 0:h.call(a,r))!=null?c:[])(f=p.afterTrack)==null||f.call(p,u);(d=this.record)==null||d.track(u.key,{data:u.data,value:u.metricValue})}}]}}var eb=(e=>(e.Device="Device",e.WebVital="WebVital",e.Frontend="Frontend",e.Backend="Backend",e))(eb||{});const qe=(e,t)=>{_e("warn",`highlight.run warning: (${e}): `,t)},cO=200;let ii=[],oo,re,si,tb=[],fc=!1;const be={options:void 0,init:(e,t)=>{var r,n,i,s,o,l,u,a;try{if(be.options=t,typeof window=="undefined"||typeof document=="undefined")return;if(!e){console.info("Highlight is not initializing because projectID was passed undefined.");return}t!=null&&t.sessionCookie?$p():Ls(!1);const h=Ft();let c=St();if(t!=null&&t.sessionKey?c=St(`${e}-${t.sessionKey}`):h!=null&&h.sessionSecureID&&(c=h.sessionSecureID),fc)return{sessionSecureID:c};fc=!0,By(),Ky();const f=B(x({},t),{organizationID:e,firstloadVersion:Xu,environment:(t==null?void 0:t.environment)||"production",appVersion:t==null?void 0:t.version,sessionSecureID:c});return si=new Yt(f),t!=null&&t.manualStart||si.startListening(),re=re!=null?re:new hc(f,si),t!=null&&t.manualStart||re.initialize(),!((n=(r=t==null?void 0:t.integrations)==null?void 0:r.mixpanel)!=null&&n.disabled)&&((s=(i=t==null?void 0:t.integrations)==null?void 0:i.mixpanel)!=null&&s.projectToken)&&Yy(t.integrations.mixpanel),!((l=(o=t==null?void 0:t.integrations)==null?void 0:o.amplitude)!=null&&l.disabled)&&((a=(u=t==null?void 0:t.integrations)==null?void 0:u.amplitude)!=null&&a.apiKey)&&Hy(t.integrations.amplitude),{sessionSecureID:c}}catch(h){qe("init",h)}},snapshot:e=>q(this,null,function*(){try{if(re&&re.ready)return yield re.snapshot(e)}catch(t){qe("snapshot",t)}}),addSessionFeedback:({verbatim:e,userName:t,userEmail:r,timestampOverride:n})=>{try{be.onHighlightReady(()=>re.addSessionFeedback({verbatim:e,timestamp:n||new Date().toISOString(),user_email:r,user_name:t}))}catch(i){qe("error",i)}},consumeError:(e,t,r)=>{try{be.onHighlightReady(()=>re.consumeCustomError(e,t,JSON.stringify(r)))}catch(n){qe("error",n)}},consume:(e,t)=>{try{be.onHighlightReady(()=>re.consumeError(e,t))}catch(r){qe("error",r)}},error:(e,t)=>{try{be.onHighlightReady(()=>re.pushCustomError(e,JSON.stringify(t)))}catch(r){qe("error",r)}},track:(e,t={})=>{var r,n,i,s,o,l,u,a,h,c,f;try{be.onHighlightReady(()=>{re.addProperties(B(x({},t),{event:e})),re.log("H.track","INFO",B(x({},t!=null?t:{}),{event:e}))});const d=re==null?void 0:re.getCurrentSessionURL();(i=(n=(r=be.options)==null?void 0:r.integrations)==null?void 0:n.mixpanel)!=null&&i.disabled||(s=window.mixpanel)!=null&&s.track&&window.mixpanel.track(e,B(x({},t),{highlightSessionURL:d})),(u=(l=(o=be.options)==null?void 0:o.integrations)==null?void 0:l.amplitude)!=null&&u.disabled||(a=window.amplitude)!=null&&a.getInstance&&window.amplitude.getInstance().logEvent(e,B(x({},t),{highlightSessionURL:d})),(f=(c=(h=be.options)==null?void 0:h.integrations)==null?void 0:c.intercom)!=null&&f.disabled||window.Intercom&&window.Intercom("trackEvent",e,t)}catch(d){qe("track",d)}},log:(e,t,r)=>{try{be.onHighlightReady(()=>re.log(e,t,r!=null?r:{}))}catch(n){qe("log",n)}},start:e=>{var t;(re==null?void 0:re.state)==="Recording"&&!(e!=null&&e.forceNew)?e!=null&&e.silent||console.warn("Highlight is already recording. Please `H.stop()` the current session before starting a new one."):(((t=re==null?void 0:re._firstLoadListeners)!=null?t:si).startListening(),be.onHighlightReady(()=>q(this,null,function*(){yield re.initialize(e)}),{waitForReady:!1}))},stop:e=>{(re==null?void 0:re.state)!=="Recording"?e!=null&&e.silent||console.warn("Highlight is already stopped. Please call `H.start()`."):be.onHighlightReady(()=>re.stopRecording(!0))},identify:(e,t={},r)=>{var n,i,s,o,l,u,a,h;try{be.onHighlightReady(()=>re.identify(e,t,r))}catch(c){qe("identify",c)}if((s=(i=(n=be.options)==null?void 0:n.integrations)==null?void 0:i.mixpanel)!=null&&s.disabled||(o=window.mixpanel)!=null&&o.identify&&(window.mixpanel.identify(typeof(t==null?void 0:t.email)=="string"?t==null?void 0:t.email:e),t&&(window.mixpanel.track("identify",t),window.mixpanel.people.set(t))),!((a=(u=(l=be.options)==null?void 0:l.integrations)==null?void 0:u.amplitude)!=null&&a.disabled)&&(h=window.amplitude)!=null&&h.getInstance&&(window.amplitude.getInstance().setUserId(e),Object.keys(t).length>0)){const c=Object.keys(t).reduce((f,d)=>(f.set(d,t[d]),f),new window.amplitude.Identify);window.amplitude.getInstance().identify(c)}},metrics:e=>{try{for(const t of e)be.recordMetric(t)}catch(t){qe("metrics",t)}},recordMetric:e=>{try{be.onHighlightReady(()=>{var t;re.recordGauge(B(x({},e),{tags:(t=e.tags)!=null?t:[],group:window.location.href,category:"Frontend"}))})}catch(t){qe("recordMetric",t)}},recordCount:e=>{try{be.onHighlightReady(()=>{re.recordCount(e)})}catch(t){qe("recordCount",t)}},recordIncr:e=>{try{be.onHighlightReady(()=>{re.recordIncr(e)})}catch(t){qe("recordIncr",t)}},recordHistogram:e=>{try{be.onHighlightReady(()=>{re.recordHistogram(e)})}catch(t){qe("recordHistogram",t)}},recordUpDownCounter:e=>{try{be.onHighlightReady(()=>{re.recordUpDownCounter(e)})}catch(t){qe("recordUpDownCounter",t)}},startSpan:(e,t,r,n)=>{const i=Bs();if(!i){const o=un();return n===void 0&&r===void 0?t(o):n===void 0?r(o):n(o)}const s=(o,l)=>{const u=l(o);return u instanceof Promise?u.finally(()=>o.end()):(o.end(),u)};return n===void 0&&r===void 0?i.startActiveSpan(e,o=>s(o,t)):n===void 0?i.startActiveSpan(e,t,o=>s(o,r)):i.startActiveSpan(e,t,r,o=>s(o,n))},startManualSpan:(e,t,r,n)=>{const i=Bs();if(!i){const s=un();return n===void 0&&r===void 0?t(s):n===void 0?r(s):n(s)}return n===void 0&&r===void 0?i.startActiveSpan(e,t):n===void 0?i.startActiveSpan(e,t,r):i.startActiveSpan(e,t,r,n)},getSessionURL:()=>new Promise((e,t)=>{be.onHighlightReady(()=>{const r=re.sessionData.sessionSecureID,n=Ft(r);n?e(`https://${Fn}/${n.projectID}/sessions/${r}`):t(new Error(`Unable to get session URL: ${r}`))})}),getSessionDetails:()=>new Promise((e,t)=>{be.onHighlightReady(()=>q(this,null,function*(){try{const r=yield be.getSessionURL();if(!r)throw new Error("Could not get session URL");const n=re.sessionData.sessionSecureID,i=Ft(n),s=i==null?void 0:i.sessionStartTime;if(!s)throw new Error("Could not get session start timestamp");const o=new Date().getTime(),l=new URL(r),u=new URL(r);u.searchParams.set("ts",((o-s)/1e3).toString()),e({url:l.toString(),urlWithTimestamp:u.toString(),sessionSecureID:n})}catch(r){t(r)}}))}),getRecordingState:()=>{var e;return(e=re==null?void 0:re.state)!=null?e:"NotRecording"},onHighlightReady:(e,t)=>{if(re&&re.ready){e();return}if(ii.push({options:t,func:e}),oo!==void 0)return;const r=()=>{ii=ii.filter(i=>{var s;return!re||((s=i.options)==null?void 0:s.waitForReady)!==!1&&!re.ready?!0:(i.func(),!1)}),oo=void 0,ii.length>0&&(oo=setTimeout(r,cO))};r()},registerLD(e){tb.length||(be.onHighlightReady(()=>{re.registerLD(e)}),bx(this,e,be.options),tb.push(new Fs(e)))}};typeof window!="undefined"&&(window.H=be),zN(),By(),Ky();const dO={reset:()=>{fc=!1,re=void 0,ii=[],oo=void 0,si=void 0},setHighlightObj:e=>{re=e}};A.GenerateSecureID=St,A.H=be,A.HighlightSegmentMiddleware=jN,A.MetricCategory=eb,A.Observe=aO,A.Record=uO,A.__testing=dO,A.configureElectronHighlight=KN,Object.defineProperty(A,Symbol.toStringTag,{value:"Module"})});
|
|
494
|
+
SessionSecureID: ${this.sessionData.sessionSecureID}`);const o=new Date().getTime(),l=xy();if(t){const c={session_secure_id:this.sessionData.sessionSecureID,payload_id:o.toString(),events:{events:n},messages:Rt({messages:[]}),resources:JSON.stringify({resources:[]}),web_socket_events:JSON.stringify({webSocketEvents:[]}),errors:[],is_beacon:!1,has_session_unloaded:this.hasSessionUnloaded,highlight_logs:l||void 0},{compressedBase64:a}=yield Hy(c);yield t({session_secure_id:this.sessionData.sessionSecureID,payload_id:o.toString(),data:a})}else this._worker.postMessage({message:{type:Be.AsyncEvents,id:o,events:n,messages:[],errors:[],resourcesString:JSON.stringify({resources:[]}),webSocketEventsString:JSON.stringify({webSocketEvents:[]}),hasSessionUnloaded:this.hasSessionUnloaded,highlightLogs:l}});it(this.sessionData),this.events=this.events.slice(n.length),Ny(l)})}takeFullSnapshot(){if(!this._recordStop){this.logger.log("skipping full snapshot as rrweb is not running");return}this.logger.log("taking full snapshot",{bytesSinceSnapshot:this._eventBytesSinceSnapshot,lastSnapshotTime:this._lastSnapshotTime}),dt.takeFullSnapshot(),this._eventBytesSinceSnapshot=0,this._lastSnapshotTime=new Date().getTime()}register(t,r){this._integrations.push(new Js(t,r))}getHooks(t){return this._integrations.flatMap(r=>{var n,i;return(i=(n=r.getHooks)==null?void 0:n.call(r,t))!=null?i:[]})}getRecordingState(){var t;return(t=this==null?void 0:this.state)!=null?t:"NotRecording"}getSession(){const t=this.sessionData.sessionSecureID,r=Ft(t);if(!r)return null;const n=`${this.getFrontendUrl()}/sessions/${t}`;if(!n||!(r==null?void 0:r.sessionStartTime))return null;const s=new Date().getTime();let o;try{o=new URL(n)}catch(a){return We("identify","warn",`failed to construct session url from ${n}`,a),null}const l=new URL(o),c=(s-this._recordingStartTime)/1e3;return l.searchParams.set("ts",c.toString()),{url:o.toString(),urlWithTimestamp:l.toString(),sessionSecureID:t}}getFrontendUrl(){var r,n;const t=this._backendUrl.match(RI);if(t&&((r=t==null?void 0:t.groups)!=null&&r.domain)){const i=(n=t.groups.domain)!=null?n:"",s=SI[i];return s?`https://${s}${wI}`:Kp}return Kp}}di=new WeakMap;class ib extends Gc{constructor(){super(...arguments);L(this,"_deferredStartOptions")}getSession(){return this._isLoaded?this._callSdk("getSession",[]):null}_startSdk(){return z(this,null,function*(){const r=this._deferredStartOptions;this._deferredStartOptions=void 0,yield this._sdk.start(r)})}start(r){return z(this,null,function*(){return this._deferredStartOptions=r,this._start()})}stop(){this._stop(()=>this._sdk.stop())}addSessionProperties(r){return this._bufferCall("addSessionProperties",[r])}getRecordingState(){return this._isLoaded?this._callSdk("getRecordingState",[]):"NotRecording"}snapshot(r){return this._isLoaded?this._callSdk("snapshot",[r]):Promise.resolve(void 0)}register(r,n){return this._bufferCall("register",[r,n])}}A.LDRecord=void 0,typeof globalThis!="undefined"?globalThis.LDRecord?A.LDRecord=globalThis.LDRecord:(A.LDRecord=new ib,globalThis.LDRecord=A.LDRecord):A.LDRecord=new ib;class gO extends nb{constructor(r){super(r);L(this,"record");L(this,"options");this.options=r}initialize(r,n){var i,s,o,l,c,a,h,u,f;try{if(typeof window=="undefined"||typeof document=="undefined"){_e("warn","@launchdarkly/session-replay is not initializing because it is not supported in this environment.");return}if(typeof Worker=="undefined"){_e("warn","@launchdarkly/session-replay is not initializing because Worker is not supported.");return}if(!r){_e("warn","@launchdarkly/session-replay is not initializing because the SDK credential is undefined.");return}this.configureSession(r,n);const d=B(x({},n),{organizationID:r,firstloadVersion:Pc,environment:(n==null?void 0:n.environment)||"production",appVersion:n==null?void 0:n.version,sessionSecureID:this.sessionSecureID,privacySetting:(i=n==null?void 0:n.privacySetting)!=null?i:"strict"});this.record=new mO(d);const p=n!=null&&n.manualStart?void 0:this.record.start();A.LDRecord.load(this.record,{ready:!(n!=null&&n.manualStart),started:p}),!((o=(s=n==null?void 0:n.integrations)==null?void 0:s.mixpanel)!=null&&o.disabled)&&((c=(l=n==null?void 0:n.integrations)==null?void 0:l.mixpanel)!=null&&c.projectToken)&&Qy(n.integrations.mixpanel),!((h=(a=n==null?void 0:n.integrations)==null?void 0:a.amplitude)!=null&&h.disabled)&&((f=(u=n==null?void 0:n.integrations)==null?void 0:u.amplitude)!=null&&f.apiKey)&&jy(n.integrations.amplitude)}catch(d){We("Error initializing @launchdarkly/session-replay SDK","error",d)}}getMetadata(){return{name:"@launchdarkly/session-replay"}}register(r,n){var i;(i=this.record)==null||i.register(r,n)}getHooks(r){var i,s,o,l;const n=x(x({[Pp]:r.sdk.name,[Mp]:r.sdk.version,[yg]:r.clientSideId,[kc]:"LaunchDarkly"},(i=r.application)!=null&&i.id?{[_g]:r.application.id}:{}),(s=r.application)!=null&&s.version?{[Tg]:r.application.version}:{});return this.initialize((l=(o=r.sdkKey)!=null?o:r.mobileKey)!=null?l:r.clientSideId,this.options),[{getMetadata:()=>({name:"@launchdarkly/session-replay/hooks"}),afterIdentify:(c,a,h)=>{var u,f,d,p,m,g,v,y;for(const w of(d=(f=(u=this.record)==null?void 0:u.getHooks)==null?void 0:f.call(u,r))!=null?d:[])(p=w.afterIdentify)==null||p.call(w,c,a,h);if(h.status==="completed"){const w=B(x({},Qn(c.context)),{key:(v=(g=(m=this.options)==null?void 0:m.contextFriendlyName)==null?void 0:g.call(m,c.context))!=null?v:Lr(c.context),canonicalKey:Lr(c.context)});(y=this.record)==null||y.identify(w.key,x(x({},n),w),"LaunchDarkly")}return a},afterEvaluation:(c,a,h)=>{var u,f,d,p;for(const m of(d=(f=(u=this.record)==null?void 0:u.getHooks)==null?void 0:f.call(u,r))!=null?d:[])(p=m.afterEvaluation)==null||p.call(m,c,a,h);return a},afterTrack:c=>{var a,h,u,f,d;for(const p of(u=(h=(a=this.record)==null?void 0:a.getHooks)==null?void 0:h.call(a,r))!=null?u:[])(f=p.afterTrack)==null||f.call(p,c);(d=this.record)==null||d.track(c.key,{data:c.data,value:c.metricValue})}}]}}var sb=(e=>(e.Device="Device",e.WebVital="WebVital",e.Frontend="Frontend",e.Backend="Backend",e))(sb||{});const rt=(e,t)=>{_e("warn",`highlight.run warning: (${e}): `,t)},yO=200;let ai=[],ao,re,li,ob=[],mu=!1;const be={options:void 0,init:(e,t)=>{var r,n,i,s,o,l,c,a;try{if(be.options=t,typeof window=="undefined"||typeof document=="undefined")return;if(!e){console.info("Highlight is not initializing because projectID was passed undefined.");return}t!=null&&t.sessionCookie?nm():Os(!1);const h=Ft();let u=St();if(t!=null&&t.sessionKey?u=St(`${e}-${t.sessionKey}`):h!=null&&h.sessionSecureID&&(u=h.sessionSecureID),mu)return{sessionSecureID:u};mu=!0,$y(),eb();const f=B(x({},t),{organizationID:e,firstloadVersion:Pc,environment:(t==null?void 0:t.environment)||"production",appVersion:t==null?void 0:t.version,sessionSecureID:u});return li=new Yt(f),t!=null&&t.manualStart||li.startListening(),re=re!=null?re:new pu(f,li),t!=null&&t.manualStart||re.initialize(),!((n=(r=t==null?void 0:t.integrations)==null?void 0:r.mixpanel)!=null&&n.disabled)&&((s=(i=t==null?void 0:t.integrations)==null?void 0:i.mixpanel)!=null&&s.projectToken)&&Qy(t.integrations.mixpanel),!((l=(o=t==null?void 0:t.integrations)==null?void 0:o.amplitude)!=null&&l.disabled)&&((a=(c=t==null?void 0:t.integrations)==null?void 0:c.amplitude)!=null&&a.apiKey)&&jy(t.integrations.amplitude),{sessionSecureID:u}}catch(h){rt("init",h)}},snapshot:e=>z(this,null,function*(){try{if(re&&re.ready)return yield re.snapshot(e)}catch(t){rt("snapshot",t)}}),addSessionFeedback:()=>{},consumeError:(e,t,r)=>{try{be.onHighlightReady(()=>re.consumeCustomError(e,t,JSON.stringify(r)))}catch(n){rt("error",n)}},consume:(e,t)=>{try{be.onHighlightReady(()=>re.consumeError(e,t))}catch(r){rt("error",r)}},error:(e,t)=>{try{be.onHighlightReady(()=>re.pushCustomError(e,JSON.stringify(t)))}catch(r){rt("error",r)}},track:(e,t={})=>{var r,n,i,s,o,l,c,a,h,u,f;try{be.onHighlightReady(()=>{re.addProperties(B(x({},t),{event:e})),re.log("H.track","INFO",B(x({},t!=null?t:{}),{event:e}))});const d=re==null?void 0:re.getCurrentSessionURL();(i=(n=(r=be.options)==null?void 0:r.integrations)==null?void 0:n.mixpanel)!=null&&i.disabled||(s=window.mixpanel)!=null&&s.track&&window.mixpanel.track(e,B(x({},t),{highlightSessionURL:d})),(c=(l=(o=be.options)==null?void 0:o.integrations)==null?void 0:l.amplitude)!=null&&c.disabled||(a=window.amplitude)!=null&&a.getInstance&&window.amplitude.getInstance().logEvent(e,B(x({},t),{highlightSessionURL:d})),(f=(u=(h=be.options)==null?void 0:h.integrations)==null?void 0:u.intercom)!=null&&f.disabled||window.Intercom&&window.Intercom("trackEvent",e,t)}catch(d){rt("track",d)}},log:(e,t,r)=>{try{be.onHighlightReady(()=>re.log(e,t,r!=null?r:{}))}catch(n){rt("log",n)}},start:e=>{var t;(re==null?void 0:re.state)==="Recording"&&!(e!=null&&e.forceNew)?e!=null&&e.silent||console.warn("Highlight is already recording. Please `H.stop()` the current session before starting a new one."):(((t=re==null?void 0:re._firstLoadListeners)!=null?t:li).startListening(),be.onHighlightReady(()=>z(this,null,function*(){yield re.initialize(e)}),{waitForReady:!1}))},stop:e=>{(re==null?void 0:re.state)!=="Recording"?e!=null&&e.silent||console.warn("Highlight is already stopped. Please call `H.start()`."):be.onHighlightReady(()=>re.stopRecording(!0))},identify:(e,t={},r)=>{var n,i,s,o,l,c,a,h;try{be.onHighlightReady(()=>re.identify(e,t,r))}catch(u){rt("identify",u)}if((s=(i=(n=be.options)==null?void 0:n.integrations)==null?void 0:i.mixpanel)!=null&&s.disabled||(o=window.mixpanel)!=null&&o.identify&&(window.mixpanel.identify(typeof(t==null?void 0:t.email)=="string"?t==null?void 0:t.email:e),t&&(window.mixpanel.track("identify",t),window.mixpanel.people.set(t))),!((a=(c=(l=be.options)==null?void 0:l.integrations)==null?void 0:c.amplitude)!=null&&a.disabled)&&(h=window.amplitude)!=null&&h.getInstance&&(window.amplitude.getInstance().setUserId(e),Object.keys(t).length>0)){const u=Object.keys(t).reduce((f,d)=>(f.set(d,t[d]),f),new window.amplitude.Identify);window.amplitude.getInstance().identify(u)}},metrics:e=>{try{for(const t of e)be.recordMetric(t)}catch(t){rt("metrics",t)}},recordMetric:e=>{try{be.onHighlightReady(()=>{var t;re.recordGauge(B(x({},e),{tags:(t=e.tags)!=null?t:[],group:window.location.href,category:"Frontend"}))})}catch(t){rt("recordMetric",t)}},recordCount:e=>{try{be.onHighlightReady(()=>{re.recordCount(e)})}catch(t){rt("recordCount",t)}},recordIncr:e=>{try{be.onHighlightReady(()=>{re.recordIncr(e)})}catch(t){rt("recordIncr",t)}},recordHistogram:e=>{try{be.onHighlightReady(()=>{re.recordHistogram(e)})}catch(t){rt("recordHistogram",t)}},recordUpDownCounter:e=>{try{be.onHighlightReady(()=>{re.recordUpDownCounter(e)})}catch(t){rt("recordUpDownCounter",t)}},startSpan:(e,t,r,n)=>{const i=zs();if(!i){const o=cn();return n===void 0&&r===void 0?t(o):n===void 0?r(o):n(o)}const s=(o,l)=>{const c=l(o);return c instanceof Promise?c.finally(()=>o.end()):(o.end(),c)};return n===void 0&&r===void 0?i.startActiveSpan(e,o=>s(o,t)):n===void 0?i.startActiveSpan(e,t,o=>s(o,r)):i.startActiveSpan(e,t,r,o=>s(o,n))},startManualSpan:(e,t,r,n)=>{const i=zs();if(!i){const s=cn();return n===void 0&&r===void 0?t(s):n===void 0?r(s):n(s)}return n===void 0&&r===void 0?i.startActiveSpan(e,t):n===void 0?i.startActiveSpan(e,t,r):i.startActiveSpan(e,t,r,n)},getSessionURL:()=>new Promise((e,t)=>{be.onHighlightReady(()=>{const r=re.sessionData.sessionSecureID,n=Ft(r);n?e(`https://${Fn}/${n.projectID}/sessions/${r}`):t(new Error(`Unable to get session URL: ${r}`))})}),getSessionDetails:()=>new Promise((e,t)=>{be.onHighlightReady(()=>z(this,null,function*(){try{const r=yield be.getSessionURL();if(!r)throw new Error("Could not get session URL");const n=re.sessionData.sessionSecureID,i=Ft(n),s=i==null?void 0:i.sessionStartTime;if(!s)throw new Error("Could not get session start timestamp");const o=new Date().getTime(),l=new URL(r),c=new URL(r);c.searchParams.set("ts",((o-s)/1e3).toString()),e({url:l.toString(),urlWithTimestamp:c.toString(),sessionSecureID:n})}catch(r){t(r)}}))}),getRecordingState:()=>{var e;return(e=re==null?void 0:re.state)!=null?e:"NotRecording"},onHighlightReady:(e,t)=>{if(re&&re.ready){e();return}if(ai.push({options:t,func:e}),ao!==void 0)return;const r=()=>{ai=ai.filter(i=>{var s;return!re||((s=i.options)==null?void 0:s.waitForReady)!==!1&&!re.ready?!0:(i.func(),!1)}),ao=void 0,ai.length>0&&(ao=setTimeout(r,yO))};r()},registerLD(e){ob.length||(be.onHighlightReady(()=>{re.registerLD(e)}),Tx(this,e,be.options),ob.push(new Js(e)))}};typeof window!="undefined"&&(window.H=be),tO(),$y(),eb();const bO={reset:()=>{mu=!1,re=void 0,ai=[],ao=void 0,li=void 0},setHighlightObj:e=>{re=e}};A.GenerateSecureID=St,A.H=be,A.HighlightSegmentMiddleware=nO,A.MetricCategory=sb,A.Observe=pO,A.Record=gO,A.__testing=bO,A.configureElectronHighlight=rO,Object.defineProperty(A,Symbol.toStringTag,{value:"Module"})});
|
|
495
495
|
//# sourceMappingURL=index.umd.js.map
|