@launchdarkly/browser 0.1.11 → 0.1.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,29 +1,29 @@
1
- var Mh=Object.defineProperty,B0=Object.defineProperties;var j0=Object.getOwnPropertyDescriptors;var Uh=Object.getOwnPropertySymbols;var Q0=Object.prototype.hasOwnProperty,$0=Object.prototype.propertyIsEnumerable;var Ph=(t,e,n)=>e in t?Mh(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Fh=(t,e)=>{for(var n in e||(e={}))Q0.call(e,n)&&Ph(t,n,e[n]);if(Uh)for(var n of Uh(e))$0.call(e,n)&&Ph(t,n,e[n]);return t},Ah=(t,e)=>B0(t,j0(e));var Jh=(t,e)=>()=>(t&&(e=t(t=0)),e);var q0=(t,e)=>{for(var n in e)Mh(t,n,{get:e[n],enumerable:!0})};var jy={};q0(jy,{LDObserve:()=>Br});var $o,Br,Qy=Jh(()=>{"use strict";Nc();$o=class extends Bn{recordGauge(e){return this.h("recordGauge",[e])}recordCount(e){return this.h("recordCount",[e])}recordIncr(e){return this.h("recordIncr",[e])}recordHistogram(e){return this.h("recordHistogram",[e])}recordUpDownCounter(e){return this.h("recordUpDownCounter",[e])}startSpan(e,n,r,i){return this.h("startSpan",[e,n,r,i])}startManualSpan(e,n,r,i){return this.h("startManualSpan",[e,n,r,i])}register(e,n){return this.h("register",[e,n])}recordLog(e,n,r){return this.h("recordLog",[e,n,r])}recordError(e,n,r,i,o){return this.h("recordError",[e,n,r,i,o])}};typeof globalThis<"u"?globalThis.LDObserve?Br=globalThis.LDObserve:(Br=new $o,globalThis.LDObserve=Br):Br=new $o});function QG(t,e){for(var n=0;n<e.length;n++){let r=e[n];if(typeof r!="string"&&!Array.isArray(r)){for(let i in r)if(i!=="default"&&!(i in t)){let o=Object.getOwnPropertyDescriptor(r,i);o&&Object.defineProperty(t,i,o.get?o:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}function Is(t,e){throw new Error(e)}function $G(t){return typeof t=="object"&&t!==null}function qG(t,e){throw new Error("Unexpected invariant triggered.")}function qc(t,e){let n=0,r=1;for(let i of t.body.matchAll(tL)){if(typeof i.index=="number"||qG(),i.index>=e)break;n=i.index+i[0].length,r+=1}return{line:r,column:e+1-n}}function eL(t){return Sb(t.source,qc(t.source,t.start))}function Sb(t,e){let n=t.locationOffset.column-1,r="".padStart(n)+t.body,i=e.line-1,o=t.locationOffset.line-1,s=e.line+o,a=e.line===1?n:0,c=e.column+a,l=`${t.name}:${s}:${c}
2
- `,u=r.split(/\r\n|[\n\r]/g),h=u[i];if(h.length>120){let p=Math.floor(c/80),f=c%80,m=[];for(let d=0;d<h.length;d+=80)m.push(h.slice(d,d+80));return l+$y([[`${s} |`,m[0]],...m.slice(1,p+1).map(d=>["|",d]),["|","^".padStart(f)],["|",m[p+1]]])}return l+$y([[`${s-1} |`,u[i-1]],[`${s} |`,h],["|","^".padStart(c)],[`${s+1} |`,u[i+1]]])}function $y(t){let e=t.filter(([r,i])=>i!==void 0),n=Math.max(...e.map(([r])=>r.length));return e.map(([r,i])=>r.padStart(n)+(i?" "+i:"")).join(`
3
- `)}function nL(t){let e=t[0];return e==null||"kind"in e||"length"in e?{nodes:e,source:t[1],positions:t[2],path:t[3],originalError:t[4],extensions:t[5]}:e}function qy(t){return t===void 0||t.length===0?void 0:t}function Zt(t,e,n){return new tu(`Syntax Error: ${n}`,{source:t,positions:[e]})}function tg(t){let e=t==null?void 0:t.kind;return typeof e=="string"&&iL.has(e)}function nu(t){return t===9||t===32}function fi(t){return t>=48&&t<=57}function Eb(t){return t>=97&&t<=122||t>=65&&t<=90}function Rb(t){return Eb(t)||t===95}function oL(t){return Eb(t)||fi(t)||t===95}function sL(t){var e;let n=Number.MAX_SAFE_INTEGER,r=null,i=-1;for(let s=0;s<t.length;++s){var o;let a=t[s],c=aL(a);c!==a.length&&(r=(o=r)!==null&&o!==void 0?o:s,i=s,s!==0&&c<n&&(n=c))}return t.map((s,a)=>a===0?s:s.slice(n)).slice((e=r)!==null&&e!==void 0?e:0,i+1)}function aL(t){let e=0;for(;e<t.length&&nu(t.charCodeAt(e));)++e;return e}function lL(t,e){let n=t.replace(/"""/g,'\\"""'),r=n.split(/\r\n|[\n\r]/g),i=r.length===1,o=r.length>1&&r.slice(1).every(f=>f.length===0||nu(f.charCodeAt(0))),s=n.endsWith('\\"""'),a=t.endsWith('"')&&!s,c=t.endsWith("\\"),l=a||c,u=!i||t.length>70||l||o||s,h="",p=i&&nu(t.charCodeAt(0));return(u&&!p||o)&&(h+=`
1
+ var Kh=Object.defineProperty,aw=Object.defineProperties;var lw=Object.getOwnPropertyDescriptors;var Dh=Object.getOwnPropertySymbols;var cw=Object.prototype.hasOwnProperty,uw=Object.prototype.propertyIsEnumerable;var Yh=(t,e,n)=>e in t?Kh(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,_h=(t,e)=>{for(var n in e||(e={}))cw.call(e,n)&&Yh(t,n,e[n]);if(Dh)for(var n of Dh(e))uw.call(e,n)&&Yh(t,n,e[n]);return t},Hh=(t,e)=>aw(t,lw(e));var zh=(t,e)=>()=>(t&&(e=t(t=0)),e);var hw=(t,e)=>{for(var n in e)Kh(t,n,{get:e[n],enumerable:!0})};var lg={};hw(lg,{LDObserve:()=>Qr});var es,Qr,cg=zh(()=>{"use strict";Uc();es=class extends jn{recordGauge(e){return this.p("recordGauge",[e])}recordCount(e){return this.p("recordCount",[e])}recordIncr(e){return this.p("recordIncr",[e])}recordHistogram(e){return this.p("recordHistogram",[e])}recordUpDownCounter(e){return this.p("recordUpDownCounter",[e])}startSpan(e,n,r,i){return this.p("startSpan",[e,n,r,i])}startManualSpan(e,n,r,i){return this.p("startManualSpan",[e,n,r,i])}register(e,n){return this.p("register",[e,n])}recordLog(e,n,r){return this.p("recordLog",[e,n,r])}recordError(e,n,r,i,o){return this.p("recordError",[e,n,r,i,o])}};typeof globalThis<"u"?globalThis.LDObserve?Qr=globalThis.LDObserve:(Qr=new es,globalThis.LDObserve=Qr):Qr=new es});function bL(t,e){for(var n=0;n<e.length;n++){let r=e[n];if(typeof r!="string"&&!Array.isArray(r)){for(let i in r)if(i!=="default"&&!(i in t)){let o=Object.getOwnPropertyDescriptor(r,i);o&&Object.defineProperty(t,i,o.get?o:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}function Rs(t,e){throw new Error(e)}function vL(t){return typeof t=="object"&&t!==null}function wL(t,e){throw new Error("Unexpected invariant triggered.")}function ou(t,e){let n=0,r=1;for(let i of t.body.matchAll(SL)){if(typeof i.index=="number"||wL(),i.index>=e)break;n=i.index+i[0].length,r+=1}return{line:r,column:e+1-n}}function IL(t){return Gb(t.source,ou(t.source,t.start))}function Gb(t,e){let n=t.locationOffset.column-1,r="".padStart(n)+t.body,i=e.line-1,o=t.locationOffset.line-1,s=e.line+o,a=e.line===1?n:0,c=e.column+a,l=`${t.name}:${s}:${c}
2
+ `,u=r.split(/\r\n|[\n\r]/g),h=u[i];if(h.length>120){let p=Math.floor(c/80),f=c%80,m=[];for(let d=0;d<h.length;d+=80)m.push(h.slice(d,d+80));return l+ug([[`${s} |`,m[0]],...m.slice(1,p+1).map(d=>["|",d]),["|","^".padStart(f)],["|",m[p+1]]])}return l+ug([[`${s-1} |`,u[i-1]],[`${s} |`,h],["|","^".padStart(c)],[`${s+1} |`,u[i+1]]])}function ug(t){let e=t.filter(([r,i])=>i!==void 0),n=Math.max(...e.map(([r])=>r.length));return e.map(([r,i])=>r.padStart(n)+(i?" "+i:"")).join(`
3
+ `)}function TL(t){let e=t[0];return e==null||"kind"in e||"length"in e?{nodes:e,source:t[1],positions:t[2],path:t[3],originalError:t[4],extensions:t[5]}:e}function hg(t){return t===void 0||t.length===0?void 0:t}function Zt(t,e,n){return new su(`Syntax Error: ${n}`,{source:t,positions:[e]})}function pg(t){let e=t==null?void 0:t.kind;return typeof e=="string"&&RL.has(e)}function lu(t){return t===9||t===32}function yi(t){return t>=48&&t<=57}function Wb(t){return t>=97&&t<=122||t>=65&&t<=90}function Ub(t){return Wb(t)||t===95}function CL(t){return Wb(t)||yi(t)||t===95}function ZL(t){var e;let n=Number.MAX_SAFE_INTEGER,r=null,i=-1;for(let s=0;s<t.length;++s){var o;let a=t[s],c=kL(a);c!==a.length&&(r=(o=r)!==null&&o!==void 0?o:s,i=s,s!==0&&c<n&&(n=c))}return t.map((s,a)=>a===0?s:s.slice(n)).slice((e=r)!==null&&e!==void 0?e:0,i+1)}function kL(t){let e=0;for(;e<t.length&&lu(t.charCodeAt(e));)++e;return e}function VL(t,e){let n=t.replace(/"""/g,'\\"""'),r=n.split(/\r\n|[\n\r]/g),i=r.length===1,o=r.length>1&&r.slice(1).every(f=>f.length===0||lu(f.charCodeAt(0))),s=n.endsWith('\\"""'),a=t.endsWith('"')&&!s,c=t.endsWith("\\"),l=a||c,u=!i||t.length>70||l||o||s,h="",p=i&&lu(t.charCodeAt(0));return(u&&!p||o)&&(h+=`
4
4
  `),h+=n,(u||l)&&(h+=`
5
- `),'"""'+h+'"""'}function uL(t){return t===I.BANG||t===I.DOLLAR||t===I.AMP||t===I.PAREN_L||t===I.PAREN_R||t===I.SPREAD||t===I.COLON||t===I.EQUALS||t===I.AT||t===I.BRACKET_L||t===I.BRACKET_R||t===I.BRACE_L||t===I.PIPE||t===I.BRACE_R}function fr(t){return t>=0&&t<=55295||t>=57344&&t<=1114111}function oa(t,e){return Cb(t.charCodeAt(e))&&Zb(t.charCodeAt(e+1))}function Cb(t){return t>=55296&&t<=56319}function Zb(t){return t>=56320&&t<=57343}function En(t,e){let n=t.source.body.codePointAt(e);if(n===void 0)return I.EOF;if(n>=32&&n<=126){let r=String.fromCodePoint(n);return r==='"'?`'"'`:`"${r}"`}return"U+"+n.toString(16).toUpperCase().padStart(4,"0")}function Tt(t,e,n,r,i){let o=t.line,s=1+n-t.lineStart;return new Ib(e,n,r,o,s,i)}function hL(t,e){let n=t.source.body,r=n.length,i=e;for(;i<r;){let o=n.charCodeAt(i);switch(o){case 65279:case 9:case 32:case 44:++i;continue;case 10:++i,++t.line,t.lineStart=i;continue;case 13:n.charCodeAt(i+1)===10?i+=2:++i,++t.line,t.lineStart=i;continue;case 35:return pL(t,i);case 33:return Tt(t,I.BANG,i,i+1);case 36:return Tt(t,I.DOLLAR,i,i+1);case 38:return Tt(t,I.AMP,i,i+1);case 40:return Tt(t,I.PAREN_L,i,i+1);case 41:return Tt(t,I.PAREN_R,i,i+1);case 46:if(n.charCodeAt(i+1)===46&&n.charCodeAt(i+2)===46)return Tt(t,I.SPREAD,i,i+3);break;case 58:return Tt(t,I.COLON,i,i+1);case 61:return Tt(t,I.EQUALS,i,i+1);case 64:return Tt(t,I.AT,i,i+1);case 91:return Tt(t,I.BRACKET_L,i,i+1);case 93:return Tt(t,I.BRACKET_R,i,i+1);case 123:return Tt(t,I.BRACE_L,i,i+1);case 124:return Tt(t,I.PIPE,i,i+1);case 125:return Tt(t,I.BRACE_R,i,i+1);case 34:return n.charCodeAt(i+1)===34&&n.charCodeAt(i+2)===34?bL(t,i):fL(t,i)}if(fi(o)||o===45)return dL(t,i,o);if(Rb(o))return vL(t,i);throw Zt(t.source,i,o===39?`Unexpected single quote character ('), did you mean to use a double quote (")?`:fr(o)||oa(n,i)?`Unexpected character: ${En(t,i)}.`:`Invalid character: ${En(t,i)}.`)}return Tt(t,I.EOF,r,r)}function pL(t,e){let n=t.source.body,r=n.length,i=e+1;for(;i<r;){let o=n.charCodeAt(i);if(o===10||o===13)break;if(fr(o))++i;else if(oa(n,i))i+=2;else break}return Tt(t,I.COMMENT,e,i,n.slice(e+1,i))}function dL(t,e,n){let r=t.source.body,i=e,o=n,s=!1;if(o===45&&(o=r.charCodeAt(++i)),o===48){if(o=r.charCodeAt(++i),fi(o))throw Zt(t.source,i,`Invalid number, unexpected digit after 0: ${En(t,i)}.`)}else i=Oc(t,i,o),o=r.charCodeAt(i);if(o===46&&(s=!0,o=r.charCodeAt(++i),i=Oc(t,i,o),o=r.charCodeAt(i)),(o===69||o===101)&&(s=!0,o=r.charCodeAt(++i),(o===43||o===45)&&(o=r.charCodeAt(++i)),i=Oc(t,i,o),o=r.charCodeAt(i)),o===46||Rb(o))throw Zt(t.source,i,`Invalid number, expected digit but got: ${En(t,i)}.`);return Tt(t,s?I.FLOAT:I.INT,e,i,r.slice(e,i))}function Oc(t,e,n){if(!fi(n))throw Zt(t.source,e,`Invalid number, expected digit but got: ${En(t,e)}.`);let r=t.source.body,i=e+1;for(;fi(r.charCodeAt(i));)++i;return i}function fL(t,e){let n=t.source.body,r=n.length,i=e+1,o=i,s="";for(;i<r;){let a=n.charCodeAt(i);if(a===34)return s+=n.slice(o,i),Tt(t,I.STRING,e,i+1,s);if(a===92){s+=n.slice(o,i);let c=n.charCodeAt(i+1)===117?n.charCodeAt(i+2)===123?mL(t,i):yL(t,i):gL(t,i);s+=c.value,i+=c.size,o=i;continue}if(a===10||a===13)break;if(fr(a))++i;else if(oa(n,i))i+=2;else throw Zt(t.source,i,`Invalid character within String: ${En(t,i)}.`)}throw Zt(t.source,i,"Unterminated string.")}function mL(t,e){let n=t.source.body,r=0,i=3;for(;i<12;){let o=n.charCodeAt(e+i++);if(o===125){if(i<5||!fr(r))break;return{value:String.fromCodePoint(r),size:i}}if(r=r<<4|si(o),r<0)break}throw Zt(t.source,e,`Invalid Unicode escape sequence: "${n.slice(e,e+i)}".`)}function yL(t,e){let n=t.source.body,r=eg(n,e+2);if(fr(r))return{value:String.fromCodePoint(r),size:6};if(Cb(r)&&n.charCodeAt(e+6)===92&&n.charCodeAt(e+7)===117){let i=eg(n,e+8);if(Zb(i))return{value:String.fromCodePoint(r,i),size:12}}throw Zt(t.source,e,`Invalid Unicode escape sequence: "${n.slice(e,e+6)}".`)}function eg(t,e){return si(t.charCodeAt(e))<<12|si(t.charCodeAt(e+1))<<8|si(t.charCodeAt(e+2))<<4|si(t.charCodeAt(e+3))}function si(t){return t>=48&&t<=57?t-48:t>=65&&t<=70?t-55:t>=97&&t<=102?t-87:-1}function gL(t,e){let n=t.source.body;switch(n.charCodeAt(e+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:`
6
- `,size:2};case 114:return{value:"\r",size:2};case 116:return{value:" ",size:2}}throw Zt(t.source,e,`Invalid character escape sequence: "${n.slice(e,e+2)}".`)}function bL(t,e){let n=t.source.body,r=n.length,i=t.lineStart,o=e+3,s=o,a="",c=[];for(;o<r;){let l=n.charCodeAt(o);if(l===34&&n.charCodeAt(o+1)===34&&n.charCodeAt(o+2)===34){a+=n.slice(s,o),c.push(a);let u=Tt(t,I.BLOCK_STRING,e,o+3,sL(c).join(`
7
- `));return t.line+=c.length-1,t.lineStart=i,u}if(l===92&&n.charCodeAt(o+1)===34&&n.charCodeAt(o+2)===34&&n.charCodeAt(o+3)===34){a+=n.slice(s,o),s=o+1,o+=4;continue}if(l===10||l===13){a+=n.slice(s,o),c.push(a),l===13&&n.charCodeAt(o+1)===10?o+=2:++o,a="",s=o,i=o;continue}if(fr(l))++o;else if(oa(n,o))o+=2;else throw Zt(t.source,o,`Invalid character within String: ${En(t,o)}.`)}throw Zt(t.source,o,"Unterminated string.")}function vL(t,e){let n=t.source.body,r=n.length,i=e+1;for(;i<r;){let o=n.charCodeAt(i);if(oL(o))++i;else break}return Tt(t,I.NAME,e,i,n.slice(e,i))}function oh(t){return sa(t,[])}function sa(t,e){switch(typeof t){case"string":return JSON.stringify(t);case"function":return t.name?`[function ${t.name}]`:"[function]";case"object":return SL(t,e);default:return String(t)}}function SL(t,e){if(t===null)return"null";if(e.includes(t))return"[Circular]";let n=[...e,t];if(IL(t)){let r=t.toJSON();if(r!==t)return typeof r=="string"?r:sa(r,n)}else if(Array.isArray(t))return EL(t,n);return TL(t,n)}function IL(t){return typeof t.toJSON=="function"}function TL(t,e){let n=Object.entries(t);return n.length===0?"{}":e.length>kb?"["+RL(t)+"]":"{ "+n.map(([r,i])=>r+": "+sa(i,e)).join(", ")+" }"}function EL(t,e){if(t.length===0)return"[]";if(e.length>kb)return"[Array]";let n=Math.min(wL,t.length),r=t.length-n,i=[];for(let o=0;o<n;++o)i.push(sa(t[o],e));return r===1?i.push("... 1 more item"):r>1&&i.push(`... ${r} more items`),"["+i.join(", ")+"]"}function RL(t){let e=Object.prototype.toString.call(t).replace(/^\[object /,"").replace(/]$/,"");if(e==="Object"&&typeof t.constructor=="function"){let n=t.constructor.name;if(typeof n=="string"&&n!=="")return n}return e}function ZL(t){return CL(t,Vb)}function xb(t,e){return new kL(t,e).parseDocument()}function qo(t){let e=t.value;return Nb(t.kind)+(e!=null?` "${e}"`:"")}function Nb(t){return uL(t)?`"${t}"`:t}function VL(t){return`"${t.replace(xL,NL)}"`}function NL(t){return OL[t.charCodeAt(0)]}function LL(t,e,n=Tb){let r=new Map;for(let g of Object.values(A))r.set(g,XL(e,g));let i,o=Array.isArray(t),s=[t],a=-1,c=[],l=t,u,h,p=[],f=[];do{a++;let g=a===s.length,w=g&&c.length!==0;if(g){if(u=f.length===0?void 0:p[p.length-1],l=h,h=f.pop(),w)if(o){l=l.slice();let E=0;for(let[T,V]of c){let N=T-E;V===null?(l.splice(N,1),E++):l[N]=V}}else{l=Object.defineProperties({},Object.getOwnPropertyDescriptors(l));for(let[E,T]of c)l[E]=T}a=i.index,s=i.keys,c=i.edits,o=i.inArray,i=i.prev}else if(h){if(u=o?a:s[a],l=h[u],l==null)continue;p.push(u)}let R;if(!Array.isArray(l)){var m,d;tg(l)||Is(!1,`Invalid AST Node: ${oh(l)}.`);let E=g?(m=r.get(l.kind))===null||m===void 0?void 0:m.leave:(d=r.get(l.kind))===null||d===void 0?void 0:d.enter;if(R=E==null?void 0:E.call(e,l,u,h,p,f),R===GL)break;if(R===!1){if(!g){p.pop();continue}}else if(R!==void 0&&(c.push([u,R]),!g))if(tg(R))l=R;else{p.pop();continue}}if(R===void 0&&w&&c.push([u,l]),g)p.pop();else{var v;i={inArray:o,index:a,keys:s,edits:c,prev:i},o=Array.isArray(l),s=o?l:(v=n[l.kind])!==null&&v!==void 0?v:[],a=-1,c=[],h&&f.push(h),h=l}}while(i!==void 0);return c.length!==0?c[c.length-1][1]:t}function XL(t,e){let n=t[e];return typeof n=="object"?n:typeof n=="function"?{enter:n,leave:void 0}:{enter:t.enter,leave:t.leave}}function Ob(t){return LL(t,UL)}function W(t,e=""){var n;return(n=t==null?void 0:t.filter(r=>r).join(e))!==null&&n!==void 0?n:""}function ae(t){return Q(`{
8
- `,Ts(W(t,`
5
+ `),'"""'+h+'"""'}function OL(t){return t===I.BANG||t===I.DOLLAR||t===I.AMP||t===I.PAREN_L||t===I.PAREN_R||t===I.SPREAD||t===I.COLON||t===I.EQUALS||t===I.AT||t===I.BRACKET_L||t===I.BRACKET_R||t===I.BRACE_L||t===I.PIPE||t===I.BRACE_R}function mr(t){return t>=0&&t<=55295||t>=57344&&t<=1114111}function la(t,e){return Pb(t.charCodeAt(e))&&Mb(t.charCodeAt(e+1))}function Pb(t){return t>=55296&&t<=56319}function Mb(t){return t>=56320&&t<=57343}function Rn(t,e){let n=t.source.body.codePointAt(e);if(n===void 0)return I.EOF;if(n>=32&&n<=126){let r=String.fromCodePoint(n);return r==='"'?`'"'`:`"${r}"`}return"U+"+n.toString(16).toUpperCase().padStart(4,"0")}function Tt(t,e,n,r,i){let o=t.line,s=1+n-t.lineStart;return new Lb(e,n,r,o,s,i)}function NL(t,e){let n=t.source.body,r=n.length,i=e;for(;i<r;){let o=n.charCodeAt(i);switch(o){case 65279:case 9:case 32:case 44:++i;continue;case 10:++i,++t.line,t.lineStart=i;continue;case 13:n.charCodeAt(i+1)===10?i+=2:++i,++t.line,t.lineStart=i;continue;case 35:return GL(t,i);case 33:return Tt(t,I.BANG,i,i+1);case 36:return Tt(t,I.DOLLAR,i,i+1);case 38:return Tt(t,I.AMP,i,i+1);case 40:return Tt(t,I.PAREN_L,i,i+1);case 41:return Tt(t,I.PAREN_R,i,i+1);case 46:if(n.charCodeAt(i+1)===46&&n.charCodeAt(i+2)===46)return Tt(t,I.SPREAD,i,i+3);break;case 58:return Tt(t,I.COLON,i,i+1);case 61:return Tt(t,I.EQUALS,i,i+1);case 64:return Tt(t,I.AT,i,i+1);case 91:return Tt(t,I.BRACKET_L,i,i+1);case 93:return Tt(t,I.BRACKET_R,i,i+1);case 123:return Tt(t,I.BRACE_L,i,i+1);case 124:return Tt(t,I.PIPE,i,i+1);case 125:return Tt(t,I.BRACE_R,i,i+1);case 34:return n.charCodeAt(i+1)===34&&n.charCodeAt(i+2)===34?ML(t,i):XL(t,i)}if(yi(o)||o===45)return LL(t,i,o);if(Ub(o))return FL(t,i);throw Zt(t.source,i,o===39?`Unexpected single quote character ('), did you mean to use a double quote (")?`:mr(o)||la(n,i)?`Unexpected character: ${Rn(t,i)}.`:`Invalid character: ${Rn(t,i)}.`)}return Tt(t,I.EOF,r,r)}function GL(t,e){let n=t.source.body,r=n.length,i=e+1;for(;i<r;){let o=n.charCodeAt(i);if(o===10||o===13)break;if(mr(o))++i;else if(la(n,i))i+=2;else break}return Tt(t,I.COMMENT,e,i,n.slice(e+1,i))}function LL(t,e,n){let r=t.source.body,i=e,o=n,s=!1;if(o===45&&(o=r.charCodeAt(++i)),o===48){if(o=r.charCodeAt(++i),yi(o))throw Zt(t.source,i,`Invalid number, unexpected digit after 0: ${Rn(t,i)}.`)}else i=Pc(t,i,o),o=r.charCodeAt(i);if(o===46&&(s=!0,o=r.charCodeAt(++i),i=Pc(t,i,o),o=r.charCodeAt(i)),(o===69||o===101)&&(s=!0,o=r.charCodeAt(++i),(o===43||o===45)&&(o=r.charCodeAt(++i)),i=Pc(t,i,o),o=r.charCodeAt(i)),o===46||Ub(o))throw Zt(t.source,i,`Invalid number, expected digit but got: ${Rn(t,i)}.`);return Tt(t,s?I.FLOAT:I.INT,e,i,r.slice(e,i))}function Pc(t,e,n){if(!yi(n))throw Zt(t.source,e,`Invalid number, expected digit but got: ${Rn(t,e)}.`);let r=t.source.body,i=e+1;for(;yi(r.charCodeAt(i));)++i;return i}function XL(t,e){let n=t.source.body,r=n.length,i=e+1,o=i,s="";for(;i<r;){let a=n.charCodeAt(i);if(a===34)return s+=n.slice(o,i),Tt(t,I.STRING,e,i+1,s);if(a===92){s+=n.slice(o,i);let c=n.charCodeAt(i+1)===117?n.charCodeAt(i+2)===123?WL(t,i):UL(t,i):PL(t,i);s+=c.value,i+=c.size,o=i;continue}if(a===10||a===13)break;if(mr(a))++i;else if(la(n,i))i+=2;else throw Zt(t.source,i,`Invalid character within String: ${Rn(t,i)}.`)}throw Zt(t.source,i,"Unterminated string.")}function WL(t,e){let n=t.source.body,r=0,i=3;for(;i<12;){let o=n.charCodeAt(e+i++);if(o===125){if(i<5||!mr(r))break;return{value:String.fromCodePoint(r),size:i}}if(r=r<<4|li(o),r<0)break}throw Zt(t.source,e,`Invalid Unicode escape sequence: "${n.slice(e,e+i)}".`)}function UL(t,e){let n=t.source.body,r=dg(n,e+2);if(mr(r))return{value:String.fromCodePoint(r),size:6};if(Pb(r)&&n.charCodeAt(e+6)===92&&n.charCodeAt(e+7)===117){let i=dg(n,e+8);if(Mb(i))return{value:String.fromCodePoint(r,i),size:12}}throw Zt(t.source,e,`Invalid Unicode escape sequence: "${n.slice(e,e+6)}".`)}function dg(t,e){return li(t.charCodeAt(e))<<12|li(t.charCodeAt(e+1))<<8|li(t.charCodeAt(e+2))<<4|li(t.charCodeAt(e+3))}function li(t){return t>=48&&t<=57?t-48:t>=65&&t<=70?t-55:t>=97&&t<=102?t-87:-1}function PL(t,e){let n=t.source.body;switch(n.charCodeAt(e+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:`
6
+ `,size:2};case 114:return{value:"\r",size:2};case 116:return{value:" ",size:2}}throw Zt(t.source,e,`Invalid character escape sequence: "${n.slice(e,e+2)}".`)}function ML(t,e){let n=t.source.body,r=n.length,i=t.lineStart,o=e+3,s=o,a="",c=[];for(;o<r;){let l=n.charCodeAt(o);if(l===34&&n.charCodeAt(o+1)===34&&n.charCodeAt(o+2)===34){a+=n.slice(s,o),c.push(a);let u=Tt(t,I.BLOCK_STRING,e,o+3,ZL(c).join(`
7
+ `));return t.line+=c.length-1,t.lineStart=i,u}if(l===92&&n.charCodeAt(o+1)===34&&n.charCodeAt(o+2)===34&&n.charCodeAt(o+3)===34){a+=n.slice(s,o),s=o+1,o+=4;continue}if(l===10||l===13){a+=n.slice(s,o),c.push(a),l===13&&n.charCodeAt(o+1)===10?o+=2:++o,a="",s=o,i=o;continue}if(mr(l))++o;else if(la(n,o))o+=2;else throw Zt(t.source,o,`Invalid character within String: ${Rn(t,o)}.`)}throw Zt(t.source,o,"Unterminated string.")}function FL(t,e){let n=t.source.body,r=n.length,i=e+1;for(;i<r;){let o=n.charCodeAt(i);if(CL(o))++i;else break}return Tt(t,I.NAME,e,i,n.slice(e,i))}function hh(t){return ca(t,[])}function ca(t,e){switch(typeof t){case"string":return JSON.stringify(t);case"function":return t.name?`[function ${t.name}]`:"[function]";case"object":return JL(t,e);default:return String(t)}}function JL(t,e){if(t===null)return"null";if(e.includes(t))return"[Circular]";let n=[...e,t];if(DL(t)){let r=t.toJSON();if(r!==t)return typeof r=="string"?r:ca(r,n)}else if(Array.isArray(t))return KL(t,n);return YL(t,n)}function DL(t){return typeof t.toJSON=="function"}function YL(t,e){let n=Object.entries(t);return n.length===0?"{}":e.length>Fb?"["+_L(t)+"]":"{ "+n.map(([r,i])=>r+": "+ca(i,e)).join(", ")+" }"}function KL(t,e){if(t.length===0)return"[]";if(e.length>Fb)return"[Array]";let n=Math.min(AL,t.length),r=t.length-n,i=[];for(let o=0;o<n;++o)i.push(ca(t[o],e));return r===1?i.push("... 1 more item"):r>1&&i.push(`... ${r} more items`),"["+i.join(", ")+"]"}function _L(t){let e=Object.prototype.toString.call(t).replace(/^\[object /,"").replace(/]$/,"");if(e==="Object"&&typeof t.constructor=="function"){let n=t.constructor.name;if(typeof n=="string"&&n!=="")return n}return e}function zL(t){return HL(t,Ab)}function Jb(t,e){return new BL(t,e).parseDocument()}function ns(t){let e=t.value;return Db(t.kind)+(e!=null?` "${e}"`:"")}function Db(t){return OL(t)?`"${t}"`:t}function jL(t){return`"${t.replace(QL,$L)}"`}function $L(t){return qL[t.charCodeAt(0)]}function eX(t,e,n=Xb){let r=new Map;for(let g of Object.values(A))r.set(g,nX(e,g));let i,o=Array.isArray(t),s=[t],a=-1,c=[],l=t,u,h,p=[],f=[];do{a++;let g=a===s.length,w=g&&c.length!==0;if(g){if(u=f.length===0?void 0:p[p.length-1],l=h,h=f.pop(),w)if(o){l=l.slice();let E=0;for(let[T,x]of c){let N=T-E;x===null?(l.splice(N,1),E++):l[N]=x}}else{l=Object.defineProperties({},Object.getOwnPropertyDescriptors(l));for(let[E,T]of c)l[E]=T}a=i.index,s=i.keys,c=i.edits,o=i.inArray,i=i.prev}else if(h){if(u=o?a:s[a],l=h[u],l==null)continue;p.push(u)}let R;if(!Array.isArray(l)){var m,d;pg(l)||Rs(!1,`Invalid AST Node: ${hh(l)}.`);let E=g?(m=r.get(l.kind))===null||m===void 0?void 0:m.leave:(d=r.get(l.kind))===null||d===void 0?void 0:d.enter;if(R=E==null?void 0:E.call(e,l,u,h,p,f),R===tX)break;if(R===!1){if(!g){p.pop();continue}}else if(R!==void 0&&(c.push([u,R]),!g))if(pg(R))l=R;else{p.pop();continue}}if(R===void 0&&w&&c.push([u,l]),g)p.pop();else{var v;i={inArray:o,index:a,keys:s,edits:c,prev:i},o=Array.isArray(l),s=o?l:(v=n[l.kind])!==null&&v!==void 0?v:[],a=-1,c=[],h&&f.push(h),h=l}}while(i!==void 0);return c.length!==0?c[c.length-1][1]:t}function nX(t,e){let n=t[e];return typeof n=="object"?n:typeof n=="function"?{enter:n,leave:void 0}:{enter:t.enter,leave:t.leave}}function Yb(t){return eX(t,iX)}function W(t,e=""){var n;return(n=t==null?void 0:t.filter(r=>r).join(e))!==null&&n!==void 0?n:""}function ce(t){return Q(`{
8
+ `,Cs(W(t,`
9
9
  `)),`
10
- }`)}function Q(t,e,n=""){return e!=null&&e!==""?t+e+n:""}function Ts(t){return Q(" ",t.replace(/\n/g,`
11
- `))}function ng(t){var e;return(e=t==null?void 0:t.some(n=>n.includes(`
12
- `)))!==null&&e!==void 0?e:!1}function Lb(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Wb(t){return t.replace(/[\s,]+/g," ").trim()}function $L(t){return Wb(t.source.body.substring(t.start,t.end))}function qL(t){var e=new Set,n=[];return t.definitions.forEach(function(r){if(r.kind==="FragmentDefinition"){var i=r.name.value,o=$L(r.loc),s=ou.get(i);s&&!s.has(o)?Xb&&console.warn("Warning: fragment with name "+i+` already exists.
10
+ }`)}function Q(t,e,n=""){return e!=null&&e!==""?t+e+n:""}function Cs(t){return Q(" ",t.replace(/\n/g,`
11
+ `))}function fg(t){var e;return(e=t==null?void 0:t.some(n=>n.includes(`
12
+ `)))!==null&&e!==void 0?e:!1}function _b(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function zb(t){return t.replace(/[\s,]+/g," ").trim()}function vX(t){return zb(t.source.body.substring(t.start,t.end))}function wX(t){var e=new Set,n=[];return t.definitions.forEach(function(r){if(r.kind==="FragmentDefinition"){var i=r.name.value,o=vX(r.loc),s=hu.get(i);s&&!s.has(o)?Hb&&console.warn("Warning: fragment with name "+i+` already exists.
13
13
  graphql-tag enforces all fragment names across your application to be unique; read more about
14
- this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):s||ou.set(i,s=new Set),s.add(o),e.has(o)||(e.add(o),n.push(r))}else n.push(r)}),Ws(Ws({},t),{definitions:n})}function tX(t){var e=new Set(t.definitions);e.forEach(function(r){r.loc&&delete r.loc,Object.keys(r).forEach(function(i){var o=r[i];o&&typeof o=="object"&&e.add(o)})});var n=t.loc;return n&&(delete n.startToken,delete n.endToken),t}function eX(t){var e=Wb(t);if(!Cs.has(e)){var n=xb(t,{experimentalFragmentVariables:Us,allowLegacyFragmentVariables:Us});if(!n||n.kind!=="Document")throw new Error("Not a valid GraphQL document.");Cs.set(e,tX(qL(n)))}return Cs.get(e)}function Ft(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];typeof t=="string"&&(t=[t]);var r=t[0];return e.forEach(function(i,o){i&&i.kind==="Document"?r+=i.loc.source.body:r+=i,r+=t[o+1]}),eX(r)}function nX(){Cs.clear(),ou.clear()}function rX(){Xb=!1}function iX(){Us=!0}function oX(){Us=!1}function mX(t,e=fX){return{PushPayload(n,r){return e(i=>t.request(Pb,n,$($({},r),i)),"PushPayload","mutation",n)},PushPayloadCompressed(n,r){return e(i=>t.request(sX,n,$($({},r),i)),"PushPayloadCompressed","mutation",n)},identifySession(n,r){return e(i=>t.request(aX,n,$($({},r),i)),"identifySession","mutation",n)},addSessionProperties(n,r){return e(i=>t.request(lX,n,$($({},r),i)),"addSessionProperties","mutation",n)},pushMetrics(n,r){return e(i=>t.request(cX,n,$($({},r),i)),"pushMetrics","mutation",n)},addSessionFeedback(n,r){return e(i=>t.request(uX,n,$($({},r),i)),"addSessionFeedback","mutation",n)},initializeSession(n,r){return e(i=>t.request(hX,n,$($({},r),i)),"initializeSession","mutation",n)},Ignore(n,r){return e(i=>t.request(pX,n,$($({},r),i)),"Ignore","query",n)},GetSamplingConfig(n,r){return e(i=>t.request(dX,n,$($({},r),i)),"GetSamplingConfig","query",n)}}}function yX(){var t=document.createElement("canvas");return t.getContext&&t.getContext("2d")?t.toDataURL("image/webp").indexOf("data:image/webp")==0:!1}function gX(){return yX()?{type:"image/webp",quality:.9}:{type:"image/jpeg",quality:.6}}function ts(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)t[r]=n[r]}return t}function su(t,e){function n(i,o,s){if(typeof document<"u"){s=ts({},e,s),typeof s.expires=="number"&&(s.expires=new Date(Date.now()+s.expires*864e5)),s.expires&&(s.expires=s.expires.toUTCString()),i=encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var a="";for(var c in s)s[c]&&(a+="; "+c,s[c]!==!0&&(a+="="+s[c].split(";")[0]));return document.cookie=i+"="+t.write(o,i)+a}}function r(i){if(!(typeof document>"u"||arguments.length&&!i)){for(var o=document.cookie?document.cookie.split("; "):[],s={},a=0;a<o.length;a++){var c=o[a].split("="),l=c.slice(1).join("=");try{var u=decodeURIComponent(c[0]);if(s[u]=t.read(l,u),i===u)break}catch(h){}}return i?s[i]:s}}return Object.create({set:n,get:r,remove:function(i,o){n(i,"",ts({},o,{expires:-1}))},withAttributes:function(i){return su(this.converter,ts({},this.attributes,i))},withConverter:function(i){return su(ts({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(e)},converter:{value:Object.freeze(t)}})}function Db(t){return t.includes("%")||t.includes(":")?t.replace(/%/g,"%25").replace(/:/g,"%3A"):t}function Yb(t){return t.kind==="multi"}function DX(t){return Yb(t)?Object.keys(t).sort().filter(e=>e!=="kind").map(e=>`${e}:${Db(t[e].key)}`).join(":"):t.key}function YX(t){return Yb(t)?Object.keys(t).sort().filter(e=>e!=="kind").map(e=>({[e]:Db(t[e].key)})).reduce((e,n)=>$($({},e),n),{}):t.key}function Kb(t,e){return HX(t)}function _X(t){if(t.id.length)return`#${t.id}`;if(t.classList.length){let e=[];for(let n of t.classList)e.push(`.${n}`);return`${t.nodeName.toLowerCase()}${e.join(",")}`}return t.nodeName.toLowerCase()}function ch(t){if(es[t])return es[t];let e=globalThis[t],n=e.prototype,r=t in dg?dg[t]:void 0,i=!!(r&&r.every(a=>{var c,l;return!!((l=(c=Object.getOwnPropertyDescriptor(n,a))==null?void 0:c.get)!=null&&l.toString().includes("[native code]"))})),o=t in fg?fg[t]:void 0,s=!!(o&&o.every(a=>{var c;return typeof n[a]=="function"&&((c=n[a])==null?void 0:c.toString().includes("[native code]"))}));if(i&&s&&!aW())return es[t]=e.prototype,e.prototype;try{let a=document.createElement("iframe");document.body.appendChild(a);let c=a.contentWindow;if(!c)return e.prototype;let l=c[t].prototype;return document.body.removeChild(a),l?es[t]=l:n}catch(a){return n}}function Be(t,e,n){var r;let i=`${t}.${String(n)}`;if(Uc[i])return Uc[i].call(e);let o=ch(t),s=(r=Object.getOwnPropertyDescriptor(o,n))==null?void 0:r.get;return s?(Uc[i]=s,s.call(e)):e[n]}function zb(t,e,n){let r=`${t}.${String(n)}`;if(Pc[r])return Pc[r].bind(e);let i=ch(t)[n];return typeof i!="function"?e[n]:(Pc[r]=i,i.bind(e))}function lW(t){return Be("Node",t,"childNodes")}function cW(t){return Be("Node",t,"parentNode")}function uW(t){return Be("Node",t,"parentElement")}function hW(t){return Be("Node",t,"textContent")}function pW(t,e){return zb("Node",t,"contains")(e)}function dW(t){return zb("Node",t,"getRootNode")()}function fW(t){return!t||!("host"in t)?null:Be("ShadowRoot",t,"host")}function mW(t){return t.styleSheets}function yW(t){return!t||!("shadowRoot"in t)?null:Be("Element",t,"shadowRoot")}function gW(t,e){return Be("Element",t,"querySelector")(e)}function bW(t,e){return Be("Element",t,"querySelectorAll")(e)}function vW(){return ch("MutationObserver").constructor}function wW(t,e,n){try{if(!(e in t))return()=>{};let r=t[e],i=n(r);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),t[e]=i,()=>{t[e]=r}}catch(r){return()=>{}}}function Bb(t){return t.nodeType===t.ELEMENT_NODE}function ci(t){let e=t&&"host"in t&&"mode"in t&&xt.host(t)||null;return!!(e&&"shadowRoot"in e&&xt.shadowRoot(e)===t)}function ui(t){return Object.prototype.toString.call(t)==="[object ShadowRoot]"}function SW(t){return t.includes(" background-clip: text;")&&!t.includes(" -webkit-background-clip: text;")&&(t=t.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),t}function IW(t){let{cssText:e}=t;if(e.split('"').length<3)return e;let n=["@import",`url(${JSON.stringify(t.href)})`];return t.layerName===""?n.push("layer"):t.layerName&&n.push(`layer(${t.layerName})`),t.supportsText&&n.push(`supports(${t.supportsText})`),t.media.length&&n.push(t.media.mediaText),n.join(" ")+";"}function fu(t){try{let e=t.rules||t.cssRules;if(!e)return null;let n=t.href;!n&&t.ownerNode&&t.ownerNode.ownerDocument&&(n=t.ownerNode.ownerDocument.location.href);let r=Array.from(e,i=>jb(i,n)).join("");return SW(r)}catch(e){return null}}function jb(t,e){if(EW(t)){let n;try{n=fu(t.styleSheet)||IW(t)}catch(r){n=t.cssText}return t.styleSheet.href?Ys(n,t.styleSheet.href):n}else{let n=t.cssText;return RW(t)&&t.selectorText.includes(":")&&(n=TW(n)),e?Ys(n,e):n}}function TW(t){let e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return t.replace(e,"$1\\$2")}function EW(t){return"styleSheet"in t}function RW(t){return"selectorText"in t}function CW(){return new As}function Js({element:t,maskInputOptions:e,tagName:n,type:r,value:i,overwriteRecord:o,maskInputFn:s}){let a=i||"";return qb({maskInputOptions:e,tagName:n,type:r,overwriteRecord:o})&&(s?a=s(a,t):a="*".repeat(a.length)),a}function sr(t){return t.toLowerCase()}function ZW(t){let e=t.getContext("2d");if(!e)return!0;let n=50;for(let r=0;r<t.width;r+=n)for(let i=0;i<t.height;i+=n){let o=e.getImageData,s=mg in o?o[mg]:o;if(new Uint32Array(s.call(e,r,i,Math.min(n,t.width-r),Math.min(n,t.height-i)).data.buffer).some(a=>a!==0))return!1}return!0}function Ds(t){let e=t.type;return t.hasAttribute("data-rr-is-password")?"password":e?sr(e):null}function Qb(t,e){var n;let r;try{r=new URL(t,window.location.href)}catch(s){return null}let i=/\.([0-9a-z]+)(?:$)/i,o=r.pathname.match(i);return(n=o==null?void 0:o[1])!=null?n:null}function kW(t){let e="";return t.indexOf("//")>-1?e=t.split("/").slice(0,3).join("/"):e=t.split("/")[0],e=e.split("?")[0],e}function Ys(t,e){return(t||"").replace(VW,(n,r,i,o,s,a)=>{let c=i||s||a,l=r||o||"";if(!c)return n;if(xW.test(c)||NW.test(c))return`url(${l}${c}${l})`;if(OW.test(c))return`url(${l}${c}${l})`;if(c[0]==="/")return`url(${l}${kW(e)+c}${l})`;let u=e.split("/"),h=c.split("/");u.pop();for(let p of h)p!=="."&&(p===".."?u.pop():u.push(p));return`url(${l}${u.join("/")}${l})`})}function ns(t,e=!1){return e?t.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):t.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function GW(t,e,n=!1){let r=Array.from(e.childNodes),i=[],o=0;if(r.length>1&&t&&typeof t=="string"){let s=ns(t,n),a=s.length/t.length;for(let c=1;c<r.length;c++)if(r[c].textContent&&typeof r[c].textContent=="string"){let l=ns(r[c].textContent,n),u=100,h=3;for(;h<l.length&&(l[h].match(/[a-zA-Z0-9]/)||l.indexOf(l.substring(0,h),1)!==-1);h++);for(;h<l.length;h++){let p=l.substring(0,h),f=s.split(p),m=-1;if(f.length===2)m=f[0].length;else if(f.length>2&&f[0]===""&&r[c-1].textContent!=="")m=s.indexOf(p,1);else if(f.length===1){if(p=p.substring(0,p.length-1),f=s.split(p),f.length<=1)return i.push(t),i;h=u+1}else h===l.length-1&&(m=s.indexOf(p));if(f.length>=2&&h>u){let d=r[c-1].textContent;if(d&&typeof d=="string"){let v=ns(d).length;m=s.indexOf(p,v)}m===-1&&(m=f[0].length)}if(m!==-1){let d=Math.floor(m/a);for(;d>0&&d<t.length;){if(o+=1,o>50*r.length)return i.push(t),i;let v=ns(t.substring(0,d),n);if(v.length===m){i.push(t.substring(0,d)),t=t.substring(d),s=s.substring(m);break}else v.length<m?d+=Math.max(1,Math.floor((m-v.length)/a)):d-=Math.max(1,Math.floor((v.length-m)*a))}break}}}}return i.push(t),i}function LW(t,e){return GW(t,e).join("/* rr_split */")}function uh(t){return t=t.replace(/[^ -~]+/g,""),t=(t==null?void 0:t.split(" ").map(e=>Math.random().toString(20).substring(2,e.length)).join(" "))||"",t}function mu(t){return t==="img"||t==="video"||t==="audio"||t==="source"}function $b(t){return t?JW.some(e=>e.test(t)):!1}function tv(){return DW++}function KW(t){if(t instanceof HTMLFormElement)return"form";let e=sr(t.tagName);return YW.test(e)?"div":e}function zW(t,e){if(e.trim()==="")return e;let n=0;function r(o){let s,a=o.exec(e.substring(n));return a?(s=a[0],n+=s.length,s):""}let i=[];for(;r(HW),!(n>=e.length);){let o=r(_W);if(o.slice(-1)===",")o=Ks(t,o.substring(0,o.length-1)),i.push(o);else{let s="";o=Ks(t,o);let a=!1;for(;;){let c=e.charAt(n);if(c===""){i.push((o+s).trim());break}else if(a)c===")"&&(a=!1);else if(c===","){n+=1,i.push((o+s).trim());break}else c==="("&&(a=!0);s+=c,n+=1}}}return i.join(", ")}function Ks(t,e){return!e||e.trim()===""?e:hh(t,e)}function BW(t){return!!(t.tagName==="svg"||t.ownerSVGElement)}function hh(t,e){let n=gg.get(t);if(n||(n=t.createElement("a"),gg.set(t,n)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return n.setAttribute("href",e),n.href}function ev(t,e,n,r){return r&&(n==="src"||n==="href"&&!(e==="use"&&r[0]==="#")||n==="xlink:href"&&r[0]!=="#"||n==="background"&&(e==="table"||e==="td"||e==="th")?Ks(t,r):n==="srcset"?zW(t,r):n==="style"?Ys(r,hh(t)):e==="object"&&n==="data"?Ks(t,r):r)}function nv(t,e,n){return(t==="video"||t==="audio")&&e==="autoplay"}function bg(t,e,n){try{if(typeof e=="string"){if(t.classList.contains(e))return!0}else for(let r=t.classList.length;r--;){let i=t.classList[r];if(e.test(i))return!0}if(n)return t.matches(n)}catch(r){}return!1}function _s(t,e,n){if(!t)return!1;if(t.nodeType!==t.ELEMENT_NODE)return n?_s(xt.parentNode(t),e,n):!1;for(let r=t.classList.length;r--;){let i=t.classList[r];if(e.test(i))return!0}return n?_s(xt.parentNode(t),e,n):!1}function rv(t,e,n,r){let i;if(Bb(t)){if(i=t,!xt.childNodes(i).length)return!1}else{if(xt.parentElement(t)===null)return!1;i=xt.parentElement(t)}try{if(typeof e=="string"){if(r){if(i.closest(`.${e}`))return!0}else if(i.classList.contains(e))return!0}else if(_s(i,e,r))return!0;if(n){if(r){if(i.closest(n))return!0}else if(i.matches(n))return!0}}catch(o){}return!1}function jW(t,e,n){let r=t.contentWindow;if(!r)return;let i=!1,o;try{o=r.document.readyState}catch(a){return}if(o!=="complete"){let a=setTimeout(()=>{i||(e(),i=!0)},n);t.addEventListener("load",()=>{clearTimeout(a),i=!0,e()});return}let s="about:blank";if(r.location.href!==s||t.src===s||t.src==="")return setTimeout(e,0),t.addEventListener("load",e);t.addEventListener("load",e)}function QW(t,e,n){let r=!1,i;try{i=t.sheet}catch(s){return}if(i)return;let o=setTimeout(()=>{r||(e(),r=!0)},n);t.addEventListener("load",()=>{clearTimeout(o),r=!0,e()})}function $W(t,e){let{doc:n,mirror:r,blockClass:i,blockSelector:o,needsMask:s,inlineStylesheet:a,maskInputOptions:c={},maskTextClass:l,maskTextFn:u,maskInputFn:h,dataURLOptions:p={},inlineImages:f,inlineVideos:m,recordCanvas:d,keepIframeSrcFn:v,newlyAddedElement:g=!1,cssCaptured:w=!1,privacySetting:R}=e,E=qW(n,r);switch(t.nodeType){case t.DOCUMENT_NODE:return t.compatMode!=="CSS1Compat"?{type:Et.Document,childNodes:[],compatMode:t.compatMode}:{type:Et.Document,childNodes:[]};case t.DOCUMENT_TYPE_NODE:return{type:Et.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId,rootId:E};case t.ELEMENT_NODE:return e2(t,{doc:n,blockClass:i,blockSelector:o,inlineStylesheet:a,maskInputOptions:c,maskInputFn:h,maskTextClass:l,dataURLOptions:p,inlineImages:f,inlineVideos:m,recordCanvas:d,keepIframeSrcFn:v,newlyAddedElement:g,privacySetting:R,rootId:E});case t.TEXT_NODE:return t2(t,{doc:n,needsMask:s,maskTextFn:u,privacySetting:R,rootId:E,cssCaptured:w});case t.CDATA_SECTION_NODE:return{type:Et.CDATA,textContent:"",rootId:E};case t.COMMENT_NODE:return{type:Et.Comment,textContent:xt.textContent(t)||"",rootId:E};default:return!1}}function qW(t,e){if(!e.hasNode(t))return;let n=e.getId(t);return n===1?void 0:n}function t2(t,e){var n;let{needsMask:r,maskTextFn:i,privacySetting:o,rootId:s,cssCaptured:a}=e,c=xt.parentNode(t),l=c&&c.tagName,u="",h=l==="STYLE"?!0:void 0,p=l==="SCRIPT"?!0:void 0;p?u="SCRIPT_PLACEHOLDER":a||(u=xt.textContent(t),h&&u&&(u=Ys(u,hh(e.doc)))),!h&&!p&&u&&r&&(u=i?i(u,xt.parentElement(t)):u.replace(/[\S]/g,"*"));let f=o==="strict",m=(n=t.parentElement)==null?void 0:n.getAttribute("data-hl-record"),d=o==="default"&&$b(u);return(f||d)&&!m&&l&&!new Set(["HEAD","TITLE","STYLE","SCRIPT","HTML","BODY","NOSCRIPT"]).has(l)&&u&&(u=uh(u)),{type:Et.Text,textContent:u||"",rootId:s}}function e2(t,e){let{doc:n,blockClass:r,blockSelector:i,inlineStylesheet:o,maskInputOptions:s={},maskInputFn:a,maskTextClass:c,dataURLOptions:l={},inlineImages:u,inlineVideos:h,recordCanvas:p,keepIframeSrcFn:f,newlyAddedElement:m=!1,privacySetting:d,rootId:v}=e,g=bg(t,r,i),w=bg(t,c,null),R=d==="strict",E=KW(t),T={},V=t.attributes.length;for(let C=0;C<V;C++){let x=t.attributes[C];nv(E,x.name)||(T[x.name]=ev(n,E,sr(x.name),x.value))}if(E==="link"&&o){let C=Array.from(n.styleSheets).find(P=>P.href===t.href),x=null;C&&(x=fu(C)),x&&(delete T.rel,delete T.href,T.co=x)}if(E==="style"&&t.sheet){let C=fu(t.sheet);C&&(t.childNodes.length>1&&(C=LW(C,t)),T.co=C)}if(E==="input"||E==="textarea"||E==="select"){let C=t.value,x=t.checked;T.type!=="radio"&&T.type!=="checkbox"&&T.type!=="submit"&&T.type!=="button"&&C?T.value=Js({element:t,type:Ds(t),tagName:E,value:C,overwriteRecord:t.getAttribute("data-hl-record"),maskInputOptions:s,maskInputFn:a}):x&&(T.checked=x)}if(E==="option"&&(t.selected&&!s.select?T.selected=!0:delete T.selected),E==="dialog"&&t.open&&(T.rr_open_mode=t.matches("dialog:modal")?"modal":"non-modal"),E==="canvas"&&p){if(t.__context==="2d")ZW(t);else if(!("__context"in t)){let C=t.toDataURL(l.type,l.quality),x=n.createElement("canvas");x.width=t.width,x.height=t.height;let P=x.toDataURL(l.type,l.quality);C!==P&&(T.rr_dataURL=C)}}if(E==="img"&&u&&!g&&!w&&!R){Qn||(Qn=n.createElement("canvas"),yg=Qn.getContext("2d"));let C=t,x=C.currentSrc||C.getAttribute("src")||"<unknown-src>",P=C.crossOrigin,st=()=>{C.removeEventListener("load",st);try{Qn.width=C.naturalWidth,Qn.height=C.naturalHeight,yg.drawImage(C,0,0),T.rr_dataURL=Qn.toDataURL(l.type,l.quality)}catch(lt){if(C.crossOrigin!=="anonymous"){C.crossOrigin="anonymous",C.complete&&C.naturalWidth!==0?st():C.addEventListener("load",st);return}else console.warn(`Cannot inline img src=${x}! Error: ${lt}`)}C.crossOrigin==="anonymous"&&(P?T.crossOrigin=P:C.removeAttribute("crossorigin"))};C.complete&&C.naturalWidth!==0?st():C.addEventListener("load",st)}if(E==="audio"||E==="video"){let C=T;C.rr_mediaState=t.paused?"paused":"played",C.rr_mediaCurrentTime=t.currentTime,C.rr_mediaPlaybackRate=t.playbackRate,C.rr_mediaMuted=t.muted,C.rr_mediaLoop=t.loop,C.rr_mediaVolume=t.volume}if(m||(t.scrollLeft&&(T.rr_scrollLeft=t.scrollLeft),t.scrollTop&&(T.rr_scrollTop=t.scrollTop)),g||w||R&&mu(E)){let{width:C,height:x}=t.getBoundingClientRect();T={class:T.class,rr_width:`${C}px`,rr_height:`${x}px`}}R&&mu(E)&&(g=!0),E==="iframe"&&!f(T.src)&&(t.contentDocument||(T.rr_src=T.src),delete T.src);let N;try{customElements.get(E)&&(N=!0)}catch(C){}let U=C=>{let{width:x,height:P}=C.getBoundingClientRect();T={width:x,height:P,rr_width:`${x}px`,rr_height:`${P}px`,rr_inlined_video:!0,class:T.class,style:T.style},E="canvas";let st=n.createElement("canvas");st.width=t.width,st.height=t.height,T.rr_dataURL=st.toDataURL(l.type,l.quality)};if(E==="video"){let C=t;u&&(C.src===""||C.src.indexOf("blob:")!==-1)&&U(C),h&&C.src!==""&&C.src.indexOf("blob:")===-1&&U(C)}return{type:Et.Element,tagName:E,attributes:T,childNodes:[],isSVG:BW(t)||void 0,needBlock:g,needMask:w,rootId:v,isCustom:N}}function ft(t){return t==null?"":t.toLowerCase()}function n2(t,e){return!!(e.comment&&t.type===Et.Comment||t.type===Et.Element&&(e.script&&(t.tagName==="script"||t.tagName==="link"&&(t.attributes.rel==="preload"&&t.attributes.as==="script"||t.attributes.rel==="modulepreload")||t.tagName==="link"&&t.attributes.rel==="prefetch"&&typeof t.attributes.href=="string"&&Qb(t.attributes.href)==="js")||e.headFavicon&&(t.tagName==="link"&&t.attributes.rel==="shortcut icon"||t.tagName==="meta"&&(ft(t.attributes.name).match(/^msapplication-tile(image|color)$/)||ft(t.attributes.name)==="application-name"||ft(t.attributes.rel)==="icon"||ft(t.attributes.rel)==="apple-touch-icon"||ft(t.attributes.rel)==="shortcut icon"))||t.tagName==="meta"&&(e.headMetaDescKeywords&&ft(t.attributes.name).match(/^description|keywords$/)||e.headMetaSocial&&(ft(t.attributes.property).match(/^(og|twitter|fb):/)||ft(t.attributes.name).match(/^(og|twitter):/)||ft(t.attributes.name)==="pinterest")||e.headMetaRobots&&(ft(t.attributes.name)==="robots"||ft(t.attributes.name)==="googlebot"||ft(t.attributes.name)==="bingbot")||e.headMetaHttpEquiv&&t.attributes["http-equiv"]!==void 0||e.headMetaAuthorship&&(ft(t.attributes.name)==="author"||ft(t.attributes.name)==="generator"||ft(t.attributes.name)==="framework"||ft(t.attributes.name)==="publisher"||ft(t.attributes.name)==="progid"||ft(t.attributes.property).match(/^article:/)||ft(t.attributes.property).match(/^product:/))||e.headMetaVerification&&(ft(t.attributes.name)==="google-site-verification"||ft(t.attributes.name)==="yandex-verification"||ft(t.attributes.name)==="csrf-token"||ft(t.attributes.name)==="p:domain_verify"||ft(t.attributes.name)==="verify-v1"||ft(t.attributes.name)==="verification"||ft(t.attributes.name)==="shopify-checkout-api-token"))))}function er(t,e){let{doc:n,mirror:r,blockClass:i,blockSelector:o,maskTextClass:s,maskTextSelector:a,skipChild:c=!1,inlineStylesheet:l=!0,maskInputOptions:u={},maskTextFn:h,maskInputFn:p,slimDOMOptions:f,dataURLOptions:m={},inlineImages:d=!1,inlineVideos:v=!1,recordCanvas:g=!1,onSerialize:w,onIframeLoad:R,iframeLoadTimeout:E=5e3,onStylesheetLoad:T,stylesheetLoadTimeout:V=5e3,keepIframeSrcFn:N=()=>!1,newlyAddedElement:U=!1,cssCaptured:C=!1,privacySetting:x}=e,{needsMask:P}=e,{preserveWhiteSpace:st=!0}=e;P||(P=rv(t,s,a,P===void 0));let lt=$W(t,{doc:n,mirror:r,blockClass:i,blockSelector:o,needsMask:P,inlineStylesheet:l,maskInputOptions:u,maskTextClass:s,maskTextFn:h,maskInputFn:p,dataURLOptions:m,inlineImages:d,inlineVideos:v,recordCanvas:g,keepIframeSrcFn:N,newlyAddedElement:U,cssCaptured:C,privacySetting:x});if(!lt)return console.warn(t,"not serialized"),null;let y;r.hasNode(t)?y=r.getId(t):n2(lt,f)||!st&&lt.type===Et.Text&&!lt.textContent.replace(/^\s+|\s+$/gm,"").length?y=mi:y=tv();let b=Object.assign(lt,{id:y});if(r.add(t,b),y===mi)return null;w&&w(t);let Z=!c,D=x,M=x==="strict";if(b.type===Et.Element){if(Z=Z&&!b.needBlock,M||(M=!!b.needBlock||!!b.needMask),D=M?"strict":D,M&&mu(b.tagName)){let ct=t.cloneNode();ct.src="",r.add(ct,b)}delete b.needBlock,delete b.needMask;let it=xt.shadowRoot(t);it&&ui(it)&&(b.isShadowHost=!0)}if((b.type===Et.Document||b.type===Et.Element)&&Z){f.headWhitespace&&b.type===Et.Element&&b.tagName==="head"&&(st=!1);let it={doc:n,mirror:r,blockClass:i,blockSelector:o,needsMask:P,maskTextClass:s,maskTextSelector:a,skipChild:c,inlineStylesheet:l,maskInputOptions:u,maskTextFn:h,maskInputFn:p,slimDOMOptions:f,dataURLOptions:m,inlineImages:d,inlineVideos:v,recordCanvas:g,preserveWhiteSpace:st,onSerialize:w,onIframeLoad:R,iframeLoadTimeout:E,onStylesheetLoad:T,stylesheetLoadTimeout:V,keepIframeSrcFn:N,cssCaptured:!1,privacySetting:D};if(!(b.type===Et.Element&&b.tagName==="textarea"&&b.attributes.value!==void 0)){b.type===Et.Element&&b.attributes.co!==void 0&&typeof b.attributes.co=="string"&&(it.cssCaptured=!0);for(let Ot of Array.from(xt.childNodes(t))){let Ue=er(Ot,it);Ue&&b.childNodes.push(Ue)}}let ct=null;if(Bb(t)&&(ct=xt.shadowRoot(t)))for(let Ot of Array.from(xt.childNodes(ct))){let Ue=er(Ot,it);Ue&&(ui(ct)&&(Ue.isShadow=!0),b.childNodes.push(Ue))}}let O=xt.parentNode(t);return O&&ci(O)&&ui(O)&&(b.isShadow=!0),b.type===Et.Element&&b.tagName==="iframe"&&jW(t,()=>{let it=t.contentDocument;if(it&&R){let ct=er(it,{doc:it,mirror:r,blockClass:i,blockSelector:o,needsMask:P,maskTextClass:s,maskTextSelector:a,skipChild:!1,inlineStylesheet:l,maskInputOptions:u,maskTextFn:h,maskInputFn:p,slimDOMOptions:f,dataURLOptions:m,inlineImages:d,inlineVideos:v,recordCanvas:g,preserveWhiteSpace:st,onSerialize:w,onIframeLoad:R,iframeLoadTimeout:E,onStylesheetLoad:T,stylesheetLoadTimeout:V,keepIframeSrcFn:N,privacySetting:x});ct&&R(t,ct)}},E),b.type===Et.Element&&b.tagName==="link"&&typeof b.attributes.rel=="string"&&(b.attributes.rel==="stylesheet"||b.attributes.rel==="preload"&&typeof b.attributes.href=="string"&&Qb(b.attributes.href)==="css")&&QW(t,()=>{if(T){let it=er(t,{doc:n,mirror:r,blockClass:i,blockSelector:o,needsMask:P,maskTextClass:s,maskTextSelector:a,skipChild:!1,inlineStylesheet:l,maskInputOptions:u,maskTextFn:h,maskInputFn:p,slimDOMOptions:f,dataURLOptions:m,inlineImages:d,inlineVideos:v,recordCanvas:g,preserveWhiteSpace:st,onSerialize:w,onIframeLoad:R,iframeLoadTimeout:E,onStylesheetLoad:T,stylesheetLoadTimeout:V,keepIframeSrcFn:N,privacySetting:x});it&&T(t,it)}},V),b}function r2(t,e){let{mirror:n=new As,blockClass:r="highlight-block",blockSelector:i=null,maskTextClass:o="highlight-mask",maskTextSelector:s=null,inlineStylesheet:a=!0,inlineImages:c=!1,inlineVideos:l=!1,recordCanvas:u=!1,maskAllInputs:h=!1,maskTextFn:p,maskInputFn:f,slimDOM:m=!1,dataURLOptions:d,preserveWhiteSpace:v,onSerialize:g,onIframeLoad:w,iframeLoadTimeout:R,onStylesheetLoad:E,stylesheetLoadTimeout:T,keepIframeSrcFn:V=()=>!1,privacySetting:N="default"}=e||{};return er(t,{doc:t,mirror:n,blockClass:r,blockSelector:i,maskTextClass:o,maskTextSelector:s,skipChild:!1,inlineStylesheet:a,maskInputOptions:h===!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}:h===!1?{password:!0}:h,maskTextFn:p,maskInputFn:f,slimDOMOptions:m||m==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:m==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:m||{},dataURLOptions:d,inlineImages:c,inlineVideos:l,recordCanvas:u,preserveWhiteSpace:v,onSerialize:g,onIframeLoad:w,iframeLoadTimeout:R,onStylesheetLoad:E,stylesheetLoadTimeout:T,keepIframeSrcFn:V,newlyAddedElement:!1,privacySetting:N})}function i2(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var n=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(r){var i=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return t[r]}})}),n}function l2(t){return t[0].toUpperCase()+t.slice(1)}function bu(t,e){new c2(e).stringify(t)}function vu(t,e){let n=new t.constructor;for(let r in t){if(!Object.prototype.hasOwnProperty.call(t,r)||r==="proxyCache")continue;let i=t[r],o=typeof i;r==="parent"&&o==="object"?e&&(n[r]=e):r==="source"?n[r]=i:Array.isArray(i)?n[r]=i.map(s=>vu(s,n)):(o==="object"&&i!==null&&(i=vu(i)),n[r]=i)}return n}function $r(t,e){if(e&&typeof e.offset<"u")return e.offset;let n=1,r=1,i=0;for(let o=0;o<t.length;o++){if(r===e.line&&n===e.column){i=o;break}t[o]===`
15
- `?(n=1,r+=1):n+=1}return i}function dv(t){return t.map(e=>(e.nodes&&(e.nodes=dv(e.nodes)),delete e.source,e))}function fv(t){if(t[cv]=!1,t.proxyOf.nodes)for(let e of t.proxyOf.nodes)fv(e)}function E2(t){return Buffer?Buffer.from(t,"base64").toString():window.atob(t)}function bi(t,e){if(Array.isArray(t))return t.map(o=>bi(o));let n=t,{inputs:r}=n,i=or(n,["inputs"]);if(r){e=[];for(let o of r){let s=Kt(z({},o),{__proto__:L2.prototype});s.map&&(s.map=Kt(z({},s.map),{__proto__:X2.prototype})),e.push(s)}}if(i.nodes&&(i.nodes=t.nodes.map(o=>bi(o,e))),i.source){let o=i.source,{inputId:s}=o,a=or(o,["inputId"]);i.source=a,s!=null&&(i.source.input=e[s])}if(i.type==="root")return new W2(i);if(i.type==="decl")return new G2(i);if(i.type==="rule")return new U2(i);if(i.type==="comment")return new O2(i);if(i.type==="atrule")return new N2(i);throw new Error("Unknown node type: "+t.type)}function sU(t){for(let e=t.length-1;e>=0;e--){let n=t[e],r=n[3]||n[2];if(r)return r}}function js(t,e){let n=new uU(t,e),r=new hU(n);try{r.parse()}catch(i){throw process.env.NODE_ENV!=="production"&&i.name==="CssSyntaxError"&&e&&e.from&&(/\.scss$/i.test(e.from)?i.message+=`
14
+ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):s||hu.set(i,s=new Set),s.add(o),e.has(o)||(e.add(o),n.push(r))}else n.push(r)}),Ms(Ms({},t),{definitions:n})}function SX(t){var e=new Set(t.definitions);e.forEach(function(r){r.loc&&delete r.loc,Object.keys(r).forEach(function(i){var o=r[i];o&&typeof o=="object"&&e.add(o)})});var n=t.loc;return n&&(delete n.startToken,delete n.endToken),t}function IX(t){var e=zb(t);if(!Vs.has(e)){var n=Jb(t,{experimentalFragmentVariables:Fs,allowLegacyFragmentVariables:Fs});if(!n||n.kind!=="Document")throw new Error("Not a valid GraphQL document.");Vs.set(e,SX(wX(n)))}return Vs.get(e)}function At(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];typeof t=="string"&&(t=[t]);var r=t[0];return e.forEach(function(i,o){i&&i.kind==="Document"?r+=i.loc.source.body:r+=i,r+=t[o+1]}),IX(r)}function TX(){Vs.clear(),hu.clear()}function EX(){Hb=!1}function RX(){Fs=!0}function CX(){Fs=!1}function WX(t,e=XX){return{PushPayload(n,r){return e(i=>t.request(jb,n,$($({},r),i)),"PushPayload","mutation",n)},PushPayloadCompressed(n,r){return e(i=>t.request(ZX,n,$($({},r),i)),"PushPayloadCompressed","mutation",n)},identifySession(n,r){return e(i=>t.request(kX,n,$($({},r),i)),"identifySession","mutation",n)},addSessionProperties(n,r){return e(i=>t.request(VX,n,$($({},r),i)),"addSessionProperties","mutation",n)},pushMetrics(n,r){return e(i=>t.request(xX,n,$($({},r),i)),"pushMetrics","mutation",n)},addSessionFeedback(n,r){return e(i=>t.request(OX,n,$($({},r),i)),"addSessionFeedback","mutation",n)},initializeSession(n,r){return e(i=>t.request(NX,n,$($({},r),i)),"initializeSession","mutation",n)},Ignore(n,r){return e(i=>t.request(GX,n,$($({},r),i)),"Ignore","query",n)},GetSamplingConfig(n,r){return e(i=>t.request(LX,n,$($({},r),i)),"GetSamplingConfig","query",n)}}}function UX(){var t=document.createElement("canvas");return t.getContext&&t.getContext("2d")?t.toDataURL("image/webp").indexOf("data:image/webp")==0:!1}function PX(){return UX()?{type:"image/webp",quality:.9}:{type:"image/jpeg",quality:.6}}function rs(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)t[r]=n[r]}return t}function pu(t,e){function n(i,o,s){if(typeof document<"u"){s=rs({},e,s),typeof s.expires=="number"&&(s.expires=new Date(Date.now()+s.expires*864e5)),s.expires&&(s.expires=s.expires.toUTCString()),i=encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var a="";for(var c in s)s[c]&&(a+="; "+c,s[c]!==!0&&(a+="="+s[c].split(";")[0]));return document.cookie=i+"="+t.write(o,i)+a}}function r(i){if(!(typeof document>"u"||arguments.length&&!i)){for(var o=document.cookie?document.cookie.split("; "):[],s={},a=0;a<o.length;a++){var c=o[a].split("="),l=c.slice(1).join("=");try{var u=decodeURIComponent(c[0]);if(s[u]=t.read(l,u),i===u)break}catch(h){}}return i?s[i]:s}}return Object.create({set:n,get:r,remove:function(i,o){n(i,"",rs({},o,{expires:-1}))},withAttributes:function(i){return pu(this.converter,rs({},this.attributes,i))},withConverter:function(i){return pu(rs({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(e)},converter:{value:Object.freeze(t)}})}function ev(t){return t.includes("%")||t.includes(":")?t.replace(/%/g,"%25").replace(/:/g,"%3A"):t}function nv(t){return t.kind==="multi"}function uW(t){return nv(t)?Object.keys(t).sort().filter(e=>e!=="kind").map(e=>`${e}:${ev(t[e].key)}`).join(":"):t.key}function hW(t){return nv(t)?Object.keys(t).sort().filter(e=>e!=="kind").map(e=>({[e]:ev(t[e].key)})).reduce((e,n)=>$($({},e),n),{}):t.key}function rv(t,e){return fW(t)}function dW(t){if(t.id.length)return`#${t.id}`;if(t.classList.length){let e=[];for(let n of t.classList)e.push(`.${n}`);return`${t.nodeName.toLowerCase()}${e.join(",")}`}return t.nodeName.toLowerCase()}function mh(t){if(is[t])return is[t];let e=globalThis[t],n=e.prototype,r=t in Rg?Rg[t]:void 0,i=!!(r&&r.every(a=>{var c,l;return!!((l=(c=Object.getOwnPropertyDescriptor(n,a))==null?void 0:c.get)!=null&&l.toString().includes("[native code]"))})),o=t in Cg?Cg[t]:void 0,s=!!(o&&o.every(a=>{var c;return typeof n[a]=="function"&&((c=n[a])==null?void 0:c.toString().includes("[native code]"))}));if(i&&s&&!kW())return is[t]=e.prototype,e.prototype;try{let a=document.createElement("iframe");document.body.appendChild(a);let c=a.contentWindow;if(!c)return e.prototype;let l=c[t].prototype;return document.body.removeChild(a),l?is[t]=l:n}catch(a){return n}}function je(t,e,n){var r;let i=`${t}.${String(n)}`;if(Dc[i])return Dc[i].call(e);let o=mh(t),s=(r=Object.getOwnPropertyDescriptor(o,n))==null?void 0:r.get;return s?(Dc[i]=s,s.call(e)):e[n]}function sv(t,e,n){let r=`${t}.${String(n)}`;if(Yc[r])return Yc[r].bind(e);let i=mh(t)[n];return typeof i!="function"?e[n]:(Yc[r]=i,i.bind(e))}function VW(t){return je("Node",t,"childNodes")}function xW(t){return je("Node",t,"parentNode")}function OW(t){return je("Node",t,"parentElement")}function NW(t){return je("Node",t,"textContent")}function GW(t,e){return sv("Node",t,"contains")(e)}function LW(t){return sv("Node",t,"getRootNode")()}function XW(t){return!t||!("host"in t)?null:je("ShadowRoot",t,"host")}function WW(t){return t.styleSheets}function UW(t){return!t||!("shadowRoot"in t)?null:je("Element",t,"shadowRoot")}function PW(t,e){return je("Element",t,"querySelector")(e)}function MW(t,e){return je("Element",t,"querySelectorAll")(e)}function FW(){return mh("MutationObserver").constructor}function AW(t,e,n){try{if(!(e in t))return()=>{};let r=t[e],i=n(r);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),t[e]=i,()=>{t[e]=r}}catch(r){return()=>{}}}function av(t){return t.nodeType===t.ELEMENT_NODE}function hi(t){let e=t&&"host"in t&&"mode"in t&&Ot.host(t)||null;return!!(e&&"shadowRoot"in e&&Ot.shadowRoot(e)===t)}function pi(t){return Object.prototype.toString.call(t)==="[object ShadowRoot]"}function JW(t){return t.includes(" background-clip: text;")&&!t.includes(" -webkit-background-clip: text;")&&(t=t.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),t}function DW(t){let{cssText:e}=t;if(e.split('"').length<3)return e;let n=["@import",`url(${JSON.stringify(t.href)})`];return t.layerName===""?n.push("layer"):t.layerName&&n.push(`layer(${t.layerName})`),t.supportsText&&n.push(`supports(${t.supportsText})`),t.media.length&&n.push(t.media.mediaText),n.join(" ")+";"}function wu(t){try{let e=t.rules||t.cssRules;if(!e)return null;let n=t.href;!n&&t.ownerNode&&t.ownerNode.ownerDocument&&(n=t.ownerNode.ownerDocument.location.href);let r=Array.from(e,i=>lv(i,n)).join("");return JW(r)}catch(e){return null}}function lv(t,e){if(KW(t)){let n;try{n=wu(t.styleSheet)||DW(t)}catch(r){n=t.cssText}return t.styleSheet.href?Hs(n,t.styleSheet.href):n}else{let n=t.cssText;return _W(t)&&t.selectorText.includes(":")&&(n=YW(n)),e?Hs(n,e):n}}function YW(t){let e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return t.replace(e,"$1\\$2")}function KW(t){return"styleSheet"in t}function _W(t){return"selectorText"in t}function HW(){return new Ys}function Ks({element:t,maskInputOptions:e,tagName:n,type:r,value:i,overwriteRecord:o,maskInputFn:s}){let a=i||"";return hv({maskInputOptions:e,tagName:n,type:r,overwriteRecord:o})&&(s?a=s(a,t):a="*".repeat(a.length)),a}function ar(t){return t.toLowerCase()}function zW(t){let e=t.getContext("2d");if(!e)return!0;let n=50;for(let r=0;r<t.width;r+=n)for(let i=0;i<t.height;i+=n){let o=e.getImageData,s=Zg in o?o[Zg]:o;if(new Uint32Array(s.call(e,r,i,Math.min(n,t.width-r),Math.min(n,t.height-i)).data.buffer).some(a=>a!==0))return!1}return!0}function _s(t){let e=t.type;return t.hasAttribute("data-rr-is-password")?"password":e?ar(e):null}function cv(t,e){var n;let r;try{r=new URL(t,window.location.href)}catch(s){return null}let i=/\.([0-9a-z]+)(?:$)/i,o=r.pathname.match(i);return(n=o==null?void 0:o[1])!=null?n:null}function BW(t){let e="";return t.indexOf("//")>-1?e=t.split("/").slice(0,3).join("/"):e=t.split("/")[0],e=e.split("?")[0],e}function Hs(t,e){return(t||"").replace(jW,(n,r,i,o,s,a)=>{let c=i||s||a,l=r||o||"";if(!c)return n;if(QW.test(c)||$W.test(c))return`url(${l}${c}${l})`;if(qW.test(c))return`url(${l}${c}${l})`;if(c[0]==="/")return`url(${l}${BW(e)+c}${l})`;let u=e.split("/"),h=c.split("/");u.pop();for(let p of h)p!=="."&&(p===".."?u.pop():u.push(p));return`url(${l}${u.join("/")}${l})`})}function os(t,e=!1){return e?t.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):t.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function t2(t,e,n=!1){let r=Array.from(e.childNodes),i=[],o=0;if(r.length>1&&t&&typeof t=="string"){let s=os(t,n),a=s.length/t.length;for(let c=1;c<r.length;c++)if(r[c].textContent&&typeof r[c].textContent=="string"){let l=os(r[c].textContent,n),u=100,h=3;for(;h<l.length&&(l[h].match(/[a-zA-Z0-9]/)||l.indexOf(l.substring(0,h),1)!==-1);h++);for(;h<l.length;h++){let p=l.substring(0,h),f=s.split(p),m=-1;if(f.length===2)m=f[0].length;else if(f.length>2&&f[0]===""&&r[c-1].textContent!=="")m=s.indexOf(p,1);else if(f.length===1){if(p=p.substring(0,p.length-1),f=s.split(p),f.length<=1)return i.push(t),i;h=u+1}else h===l.length-1&&(m=s.indexOf(p));if(f.length>=2&&h>u){let d=r[c-1].textContent;if(d&&typeof d=="string"){let v=os(d).length;m=s.indexOf(p,v)}m===-1&&(m=f[0].length)}if(m!==-1){let d=Math.floor(m/a);for(;d>0&&d<t.length;){if(o+=1,o>50*r.length)return i.push(t),i;let v=os(t.substring(0,d),n);if(v.length===m){i.push(t.substring(0,d)),t=t.substring(d),s=s.substring(m);break}else v.length<m?d+=Math.max(1,Math.floor((m-v.length)/a)):d-=Math.max(1,Math.floor((v.length-m)*a))}break}}}}return i.push(t),i}function e2(t,e){return t2(t,e).join("/* rr_split */")}function yh(t){return t=t.replace(/[^ -~]+/g,""),t=(t==null?void 0:t.split(" ").map(e=>Math.random().toString(20).substring(2,e.length)).join(" "))||"",t}function Su(t){return t==="img"||t==="video"||t==="audio"||t==="source"}function uv(t){return t?c2.some(e=>e.test(t)):!1}function pv(){return u2++}function p2(t){if(t instanceof HTMLFormElement)return"form";let e=ar(t.tagName);return h2.test(e)?"div":e}function m2(t,e){if(e.trim()==="")return e;let n=0;function r(o){let s,a=o.exec(e.substring(n));return a?(s=a[0],n+=s.length,s):""}let i=[];for(;r(f2),!(n>=e.length);){let o=r(d2);if(o.slice(-1)===",")o=zs(t,o.substring(0,o.length-1)),i.push(o);else{let s="";o=zs(t,o);let a=!1;for(;;){let c=e.charAt(n);if(c===""){i.push((o+s).trim());break}else if(a)c===")"&&(a=!1);else if(c===","){n+=1,i.push((o+s).trim());break}else c==="("&&(a=!0);s+=c,n+=1}}}return i.join(", ")}function zs(t,e){return!e||e.trim()===""?e:gh(t,e)}function y2(t){return!!(t.tagName==="svg"||t.ownerSVGElement)}function gh(t,e){let n=Vg.get(t);if(n||(n=t.createElement("a"),Vg.set(t,n)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return n.setAttribute("href",e),n.href}function dv(t,e,n,r){return r&&(n==="src"||n==="href"&&!(e==="use"&&r[0]==="#")||n==="xlink:href"&&r[0]!=="#"||n==="background"&&(e==="table"||e==="td"||e==="th")?zs(t,r):n==="srcset"?m2(t,r):n==="style"?Hs(r,gh(t)):e==="object"&&n==="data"?zs(t,r):r)}function fv(t,e,n){return(t==="video"||t==="audio")&&e==="autoplay"}function xg(t,e,n){try{if(typeof e=="string"){if(t.classList.contains(e))return!0}else for(let r=t.classList.length;r--;){let i=t.classList[r];if(e.test(i))return!0}if(n)return t.matches(n)}catch(r){}return!1}function Bs(t,e,n){if(!t)return!1;if(t.nodeType!==t.ELEMENT_NODE)return n?Bs(Ot.parentNode(t),e,n):!1;for(let r=t.classList.length;r--;){let i=t.classList[r];if(e.test(i))return!0}return n?Bs(Ot.parentNode(t),e,n):!1}function mv(t,e,n,r){let i;if(av(t)){if(i=t,!Ot.childNodes(i).length)return!1}else{if(Ot.parentElement(t)===null)return!1;i=Ot.parentElement(t)}try{if(typeof e=="string"){if(r){if(i.closest(`.${e}`))return!0}else if(i.classList.contains(e))return!0}else if(Bs(i,e,r))return!0;if(n){if(r){if(i.closest(n))return!0}else if(i.matches(n))return!0}}catch(o){}return!1}function g2(t,e,n){let r=t.contentWindow;if(!r)return;let i=!1,o;try{o=r.document.readyState}catch(a){return}if(o!=="complete"){let a=setTimeout(()=>{i||(e(),i=!0)},n);t.addEventListener("load",()=>{clearTimeout(a),i=!0,e()});return}let s="about:blank";if(r.location.href!==s||t.src===s||t.src==="")return setTimeout(e,0),t.addEventListener("load",e);t.addEventListener("load",e)}function b2(t,e,n){let r=!1,i;try{i=t.sheet}catch(s){return}if(i)return;let o=setTimeout(()=>{r||(e(),r=!0)},n);t.addEventListener("load",()=>{clearTimeout(o),r=!0,e()})}function v2(t,e){let{doc:n,mirror:r,blockClass:i,blockSelector:o,needsMask:s,inlineStylesheet:a,maskInputOptions:c={},maskTextClass:l,maskTextFn:u,maskInputFn:h,dataURLOptions:p={},inlineImages:f,inlineVideos:m,recordCanvas:d,keepIframeSrcFn:v,newlyAddedElement:g=!1,cssCaptured:w=!1,privacySetting:R}=e,E=w2(n,r);switch(t.nodeType){case t.DOCUMENT_NODE:return t.compatMode!=="CSS1Compat"?{type:Et.Document,childNodes:[],compatMode:t.compatMode}:{type:Et.Document,childNodes:[]};case t.DOCUMENT_TYPE_NODE:return{type:Et.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId,rootId:E};case t.ELEMENT_NODE:return I2(t,{doc:n,blockClass:i,blockSelector:o,inlineStylesheet:a,maskInputOptions:c,maskInputFn:h,maskTextClass:l,dataURLOptions:p,inlineImages:f,inlineVideos:m,recordCanvas:d,keepIframeSrcFn:v,newlyAddedElement:g,privacySetting:R,rootId:E});case t.TEXT_NODE:return S2(t,{doc:n,needsMask:s,maskTextFn:u,privacySetting:R,rootId:E,cssCaptured:w});case t.CDATA_SECTION_NODE:return{type:Et.CDATA,textContent:"",rootId:E};case t.COMMENT_NODE:return{type:Et.Comment,textContent:Ot.textContent(t)||"",rootId:E};default:return!1}}function w2(t,e){if(!e.hasNode(t))return;let n=e.getId(t);return n===1?void 0:n}function S2(t,e){var n;let{needsMask:r,maskTextFn:i,privacySetting:o,rootId:s,cssCaptured:a}=e,c=Ot.parentNode(t),l=c&&c.tagName,u="",h=l==="STYLE"?!0:void 0,p=l==="SCRIPT"?!0:void 0;p?u="SCRIPT_PLACEHOLDER":a||(u=Ot.textContent(t),h&&u&&(u=Hs(u,gh(e.doc)))),!h&&!p&&u&&r&&(u=i?i(u,Ot.parentElement(t)):u.replace(/[\S]/g,"*"));let f=o==="strict",m=(n=t.parentElement)==null?void 0:n.getAttribute("data-hl-record"),d=o==="default"&&uv(u);return(f||d)&&!m&&l&&!new Set(["HEAD","TITLE","STYLE","SCRIPT","HTML","BODY","NOSCRIPT"]).has(l)&&u&&(u=yh(u)),{type:Et.Text,textContent:u||"",rootId:s}}function I2(t,e){let{doc:n,blockClass:r,blockSelector:i,inlineStylesheet:o,maskInputOptions:s={},maskInputFn:a,maskTextClass:c,dataURLOptions:l={},inlineImages:u,inlineVideos:h,recordCanvas:p,keepIframeSrcFn:f,newlyAddedElement:m=!1,privacySetting:d,rootId:v}=e,g=xg(t,r,i),w=xg(t,c,null),R=d==="strict",E=p2(t),T={},x=t.attributes.length;for(let C=0;C<x;C++){let O=t.attributes[C];fv(E,O.name)||(T[O.name]=dv(n,E,ar(O.name),O.value))}if(E==="link"&&o){let C=Array.from(n.styleSheets).find(P=>P.href===t.href),O=null;C&&(O=wu(C)),O&&(delete T.rel,delete T.href,T.uo=O)}if(E==="style"&&t.sheet){let C=wu(t.sheet);C&&(t.childNodes.length>1&&(C=e2(C,t)),T.uo=C)}if(E==="input"||E==="textarea"||E==="select"){let C=t.value,O=t.checked;T.type!=="radio"&&T.type!=="checkbox"&&T.type!=="submit"&&T.type!=="button"&&C?T.value=Ks({element:t,type:_s(t),tagName:E,value:C,overwriteRecord:t.getAttribute("data-hl-record"),maskInputOptions:s,maskInputFn:a}):O&&(T.checked=O)}if(E==="option"&&(t.selected&&!s.select?T.selected=!0:delete T.selected),E==="dialog"&&t.open&&(T.rr_open_mode=t.matches("dialog:modal")?"modal":"non-modal"),E==="canvas"&&p){if(t.__context==="2d")zW(t);else if(!("__context"in t)){let C=t.toDataURL(l.type,l.quality),O=n.createElement("canvas");O.width=t.width,O.height=t.height;let P=O.toDataURL(l.type,l.quality);C!==P&&(T.rr_dataURL=C)}}if(E==="img"&&u&&!g&&!w&&!R){$n||($n=n.createElement("canvas"),kg=$n.getContext("2d"));let C=t,O=C.currentSrc||C.getAttribute("src")||"<unknown-src>",P=C.crossOrigin,st=()=>{C.removeEventListener("load",st);try{$n.width=C.naturalWidth,$n.height=C.naturalHeight,kg.drawImage(C,0,0),T.rr_dataURL=$n.toDataURL(l.type,l.quality)}catch(lt){if(C.crossOrigin!=="anonymous"){C.crossOrigin="anonymous",C.complete&&C.naturalWidth!==0?st():C.addEventListener("load",st);return}else console.warn(`Cannot inline img src=${O}! Error: ${lt}`)}C.crossOrigin==="anonymous"&&(P?T.crossOrigin=P:C.removeAttribute("crossorigin"))};C.complete&&C.naturalWidth!==0?st():C.addEventListener("load",st)}if(E==="audio"||E==="video"){let C=T;C.rr_mediaState=t.paused?"paused":"played",C.rr_mediaCurrentTime=t.currentTime,C.rr_mediaPlaybackRate=t.playbackRate,C.rr_mediaMuted=t.muted,C.rr_mediaLoop=t.loop,C.rr_mediaVolume=t.volume}if(m||(t.scrollLeft&&(T.rr_scrollLeft=t.scrollLeft),t.scrollTop&&(T.rr_scrollTop=t.scrollTop)),g||w||R&&Su(E)){let{width:C,height:O}=t.getBoundingClientRect();T={class:T.class,rr_width:`${C}px`,rr_height:`${O}px`}}R&&Su(E)&&(g=!0),E==="iframe"&&!f(T.src)&&(t.contentDocument||(T.rr_src=T.src),delete T.src);let N;try{customElements.get(E)&&(N=!0)}catch(C){}let U=C=>{let{width:O,height:P}=C.getBoundingClientRect();T={width:O,height:P,rr_width:`${O}px`,rr_height:`${P}px`,rr_inlined_video:!0,class:T.class,style:T.style},E="canvas";let st=n.createElement("canvas");st.width=t.width,st.height=t.height,T.rr_dataURL=st.toDataURL(l.type,l.quality)};if(E==="video"){let C=t;u&&(C.src===""||C.src.indexOf("blob:")!==-1)&&U(C),h&&C.src!==""&&C.src.indexOf("blob:")===-1&&U(C)}return{type:Et.Element,tagName:E,attributes:T,childNodes:[],isSVG:y2(t)||void 0,needBlock:g,needMask:w,rootId:v,isCustom:N}}function ft(t){return t==null?"":t.toLowerCase()}function T2(t,e){return!!(e.comment&&t.type===Et.Comment||t.type===Et.Element&&(e.script&&(t.tagName==="script"||t.tagName==="link"&&(t.attributes.rel==="preload"&&t.attributes.as==="script"||t.attributes.rel==="modulepreload")||t.tagName==="link"&&t.attributes.rel==="prefetch"&&typeof t.attributes.href=="string"&&cv(t.attributes.href)==="js")||e.headFavicon&&(t.tagName==="link"&&t.attributes.rel==="shortcut icon"||t.tagName==="meta"&&(ft(t.attributes.name).match(/^msapplication-tile(image|color)$/)||ft(t.attributes.name)==="application-name"||ft(t.attributes.rel)==="icon"||ft(t.attributes.rel)==="apple-touch-icon"||ft(t.attributes.rel)==="shortcut icon"))||t.tagName==="meta"&&(e.headMetaDescKeywords&&ft(t.attributes.name).match(/^description|keywords$/)||e.headMetaSocial&&(ft(t.attributes.property).match(/^(og|twitter|fb):/)||ft(t.attributes.name).match(/^(og|twitter):/)||ft(t.attributes.name)==="pinterest")||e.headMetaRobots&&(ft(t.attributes.name)==="robots"||ft(t.attributes.name)==="googlebot"||ft(t.attributes.name)==="bingbot")||e.headMetaHttpEquiv&&t.attributes["http-equiv"]!==void 0||e.headMetaAuthorship&&(ft(t.attributes.name)==="author"||ft(t.attributes.name)==="generator"||ft(t.attributes.name)==="framework"||ft(t.attributes.name)==="publisher"||ft(t.attributes.name)==="progid"||ft(t.attributes.property).match(/^article:/)||ft(t.attributes.property).match(/^product:/))||e.headMetaVerification&&(ft(t.attributes.name)==="google-site-verification"||ft(t.attributes.name)==="yandex-verification"||ft(t.attributes.name)==="csrf-token"||ft(t.attributes.name)==="p:domain_verify"||ft(t.attributes.name)==="verify-v1"||ft(t.attributes.name)==="verification"||ft(t.attributes.name)==="shopify-checkout-api-token"))))}function nr(t,e){let{doc:n,mirror:r,blockClass:i,blockSelector:o,maskTextClass:s,maskTextSelector:a,skipChild:c=!1,inlineStylesheet:l=!0,maskInputOptions:u={},maskTextFn:h,maskInputFn:p,slimDOMOptions:f,dataURLOptions:m={},inlineImages:d=!1,inlineVideos:v=!1,recordCanvas:g=!1,onSerialize:w,onIframeLoad:R,iframeLoadTimeout:E=5e3,onStylesheetLoad:T,stylesheetLoadTimeout:x=5e3,keepIframeSrcFn:N=()=>!1,newlyAddedElement:U=!1,cssCaptured:C=!1,privacySetting:O}=e,{needsMask:P}=e,{preserveWhiteSpace:st=!0}=e;P||(P=mv(t,s,a,P===void 0));let lt=v2(t,{doc:n,mirror:r,blockClass:i,blockSelector:o,needsMask:P,inlineStylesheet:l,maskInputOptions:u,maskTextClass:s,maskTextFn:h,maskInputFn:p,dataURLOptions:m,inlineImages:d,inlineVideos:v,recordCanvas:g,keepIframeSrcFn:N,newlyAddedElement:U,cssCaptured:C,privacySetting:O});if(!lt)return console.warn(t,"not serialized"),null;let y;r.hasNode(t)?y=r.getId(t):T2(lt,f)||!st&&lt.type===Et.Text&&!lt.textContent.replace(/^\s+|\s+$/gm,"").length?y=gi:y=pv();let b=Object.assign(lt,{id:y});if(r.add(t,b),y===gi)return null;w&&w(t);let Z=!c,D=O,M=O==="strict";if(b.type===Et.Element){if(Z=Z&&!b.needBlock,M||(M=!!b.needBlock||!!b.needMask),D=M?"strict":D,M&&Su(b.tagName)){let ct=t.cloneNode();ct.src="",r.add(ct,b)}delete b.needBlock,delete b.needMask;let it=Ot.shadowRoot(t);it&&pi(it)&&(b.isShadowHost=!0)}if((b.type===Et.Document||b.type===Et.Element)&&Z){f.headWhitespace&&b.type===Et.Element&&b.tagName==="head"&&(st=!1);let it={doc:n,mirror:r,blockClass:i,blockSelector:o,needsMask:P,maskTextClass:s,maskTextSelector:a,skipChild:c,inlineStylesheet:l,maskInputOptions:u,maskTextFn:h,maskInputFn:p,slimDOMOptions:f,dataURLOptions:m,inlineImages:d,inlineVideos:v,recordCanvas:g,preserveWhiteSpace:st,onSerialize:w,onIframeLoad:R,iframeLoadTimeout:E,onStylesheetLoad:T,stylesheetLoadTimeout:x,keepIframeSrcFn:N,cssCaptured:!1,privacySetting:D};if(!(b.type===Et.Element&&b.tagName==="textarea"&&b.attributes.value!==void 0)){b.type===Et.Element&&b.attributes.uo!==void 0&&typeof b.attributes.uo=="string"&&(it.cssCaptured=!0);for(let Gt of Array.from(Ot.childNodes(t))){let Pe=nr(Gt,it);Pe&&b.childNodes.push(Pe)}}let ct=null;if(av(t)&&(ct=Ot.shadowRoot(t)))for(let Gt of Array.from(Ot.childNodes(ct))){let Pe=nr(Gt,it);Pe&&(pi(ct)&&(Pe.isShadow=!0),b.childNodes.push(Pe))}}let G=Ot.parentNode(t);return G&&hi(G)&&pi(G)&&(b.isShadow=!0),b.type===Et.Element&&b.tagName==="iframe"&&g2(t,()=>{let it=t.contentDocument;if(it&&R){let ct=nr(it,{doc:it,mirror:r,blockClass:i,blockSelector:o,needsMask:P,maskTextClass:s,maskTextSelector:a,skipChild:!1,inlineStylesheet:l,maskInputOptions:u,maskTextFn:h,maskInputFn:p,slimDOMOptions:f,dataURLOptions:m,inlineImages:d,inlineVideos:v,recordCanvas:g,preserveWhiteSpace:st,onSerialize:w,onIframeLoad:R,iframeLoadTimeout:E,onStylesheetLoad:T,stylesheetLoadTimeout:x,keepIframeSrcFn:N,privacySetting:O});ct&&R(t,ct)}},E),b.type===Et.Element&&b.tagName==="link"&&typeof b.attributes.rel=="string"&&(b.attributes.rel==="stylesheet"||b.attributes.rel==="preload"&&typeof b.attributes.href=="string"&&cv(b.attributes.href)==="css")&&b2(t,()=>{if(T){let it=nr(t,{doc:n,mirror:r,blockClass:i,blockSelector:o,needsMask:P,maskTextClass:s,maskTextSelector:a,skipChild:!1,inlineStylesheet:l,maskInputOptions:u,maskTextFn:h,maskInputFn:p,slimDOMOptions:f,dataURLOptions:m,inlineImages:d,inlineVideos:v,recordCanvas:g,preserveWhiteSpace:st,onSerialize:w,onIframeLoad:R,iframeLoadTimeout:E,onStylesheetLoad:T,stylesheetLoadTimeout:x,keepIframeSrcFn:N,privacySetting:O});it&&T(t,it)}},x),b}function E2(t,e){let{mirror:n=new Ys,blockClass:r="highlight-block",blockSelector:i=null,maskTextClass:o="highlight-mask",maskTextSelector:s=null,inlineStylesheet:a=!0,inlineImages:c=!1,inlineVideos:l=!1,recordCanvas:u=!1,maskAllInputs:h=!1,maskTextFn:p,maskInputFn:f,slimDOM:m=!1,dataURLOptions:d,preserveWhiteSpace:v,onSerialize:g,onIframeLoad:w,iframeLoadTimeout:R,onStylesheetLoad:E,stylesheetLoadTimeout:T,keepIframeSrcFn:x=()=>!1,privacySetting:N="default"}=e||{};return nr(t,{doc:t,mirror:n,blockClass:r,blockSelector:i,maskTextClass:o,maskTextSelector:s,skipChild:!1,inlineStylesheet:a,maskInputOptions:h===!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}:h===!1?{password:!0}:h,maskTextFn:p,maskInputFn:f,slimDOMOptions:m||m==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:m==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:m||{},dataURLOptions:d,inlineImages:c,inlineVideos:l,recordCanvas:u,preserveWhiteSpace:v,onSerialize:g,onIframeLoad:w,iframeLoadTimeout:R,onStylesheetLoad:E,stylesheetLoadTimeout:T,keepIframeSrcFn:x,newlyAddedElement:!1,privacySetting:N})}function R2(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var n=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(r){var i=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return t[r]}})}),n}function V2(t){return t[0].toUpperCase()+t.slice(1)}function Eu(t,e){new x2(e).stringify(t)}function Ru(t,e){let n=new t.constructor;for(let r in t){if(!Object.prototype.hasOwnProperty.call(t,r)||r==="proxyCache")continue;let i=t[r],o=typeof i;r==="parent"&&o==="object"?e&&(n[r]=e):r==="source"?n[r]=i:Array.isArray(i)?n[r]=i.map(s=>Ru(s,n)):(o==="object"&&i!==null&&(i=Ru(i)),n[r]=i)}return n}function ti(t,e){if(e&&typeof e.offset<"u")return e.offset;let n=1,r=1,i=0;for(let o=0;o<t.length;o++){if(r===e.line&&n===e.column){i=o;break}t[o]===`
15
+ `?(n=1,r+=1):n+=1}return i}function Rv(t){return t.map(e=>(e.nodes&&(e.nodes=Rv(e.nodes)),delete e.source,e))}function Cv(t){if(t[Sv]=!1,t.proxyOf.nodes)for(let e of t.proxyOf.nodes)Cv(e)}function K2(t){return Buffer?Buffer.from(t,"base64").toString():window.atob(t)}function wi(t,e){if(Array.isArray(t))return t.map(o=>wi(o));let n=t,{inputs:r}=n,i=sr(n,["inputs"]);if(r){e=[];for(let o of r){let s=_t(z({},o),{__proto__:eU.prototype});s.map&&(s.map=_t(z({},s.map),{__proto__:nU.prototype})),e.push(s)}}if(i.nodes&&(i.nodes=t.nodes.map(o=>wi(o,e))),i.source){let o=i.source,{inputId:s}=o,a=sr(o,["inputId"]);i.source=a,s!=null&&(i.source.input=e[s])}if(i.type==="root")return new rU(i);if(i.type==="decl")return new tU(i);if(i.type==="rule")return new iU(i);if(i.type==="comment")return new q2(i);if(i.type==="atrule")return new $2(i);throw new Error("Unknown node type: "+t.type)}function ZU(t){for(let e=t.length-1;e>=0;e--){let n=t[e],r=n[3]||n[2];if(r)return r}}function qs(t,e){let n=new OU(t,e),r=new NU(n);try{r.parse()}catch(i){throw process.env.NODE_ENV!=="production"&&i.name==="CssSyntaxError"&&e&&e.from&&(/\.scss$/i.test(e.from)?i.message+=`
16
16
  You tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser`:/\.sass/i.test(e.from)?i.message+=`
17
17
  You tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser`:/\.less$/i.test(e.from)&&(i.message+=`
18
- You tried to parse Less with the standard CSS parser; try again with the postcss-less parser`)),i}return r.root}function ti(t){return typeof t=="object"&&typeof t.then=="function"}function Ov(t){let e=!1,n=SU[t.type];return t.type==="decl"?e=t.prop.toLowerCase():t.type==="atrule"&&(e=t.name.toLowerCase()),e&&t.append?[n,n+"-"+e,lr,n+"Exit",n+"Exit-"+e]:e?[n,n+"-"+e,n+"Exit",n+"Exit-"+e]:t.append?[n,lr,n+"Exit"]:[n,n+"Exit"]}function Xg(t){let e;return t.type==="document"?e=["Document",lr,"DocumentExit"]:t.type==="root"?e=["Root",lr,"RootExit"]:e=Ov(t),{eventIndex:0,events:e,iterator:0,node:t,visitorIndex:0,visitors:[]}}function ku(t){return t[we]=!1,t.nodes&&t.nodes.forEach(e=>ku(e)),t}function ht(...t){return t.length===1&&Array.isArray(t[0])&&(t=t[0]),new Sh(t)}function zU(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var n=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(r){var i=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return t[r]}})}),n}function $U(t){return t[0].toUpperCase()+t.slice(1)}function Gu(t,e){new qU(e).stringify(t)}function Lu(t,e){let n=new t.constructor;for(let r in t){if(!Object.prototype.hasOwnProperty.call(t,r)||r==="proxyCache")continue;let i=t[r],o=typeof i;r==="parent"&&o==="object"?e&&(n[r]=e):r==="source"?n[r]=i:Array.isArray(i)?n[r]=i.map(s=>Lu(s,n)):(o==="object"&&i!==null&&(i=Lu(i)),n[r]=i)}return n}function ni(t,e){if(e&&typeof e.offset<"u")return e.offset;let n=1,r=1,i=0;for(let o=0;o<t.length;o++){if(r===e.line&&n===e.column){i=o;break}t[o]===`
19
- `?(n=1,r+=1):n+=1}return i}function jv(t){return t.map(e=>(e.nodes&&(e.nodes=jv(e.nodes)),delete e.source,e))}function Qv(t){if(t[_v]=!1,t.proxyOf.nodes)for(let e of t.proxyOf.nodes)Qv(e)}function fP(t){return Buffer?Buffer.from(t,"base64").toString():window.atob(t)}function Ii(t,e){if(Array.isArray(t))return t.map(o=>Ii(o));let n=t,{inputs:r}=n,i=or(n,["inputs"]);if(r){e=[];for(let o of r){let s=Kt(z({},o),{__proto__:EP.prototype});s.map&&(s.map=Kt(z({},s.map),{__proto__:RP.prototype})),e.push(s)}}if(i.nodes&&(i.nodes=t.nodes.map(o=>Ii(o,e))),i.source){let o=i.source,{inputId:s}=o,a=or(o,["inputId"]);i.source=a,s!=null&&(i.source.input=e[s])}if(i.type==="root")return new CP(i);if(i.type==="decl")return new TP(i);if(i.type==="rule")return new ZP(i);if(i.type==="comment")return new IP(i);if(i.type==="atrule")return new SP(i);throw new Error("Unknown node type: "+t.type)}function jP(t){for(let e=t.length-1;e>=0;e--){let n=t[e],r=n[3]||n[2];if(r)return r}}function ta(t,e){let n=new tM(t,e),r=new eM(n);try{r.parse()}catch(i){throw process.env.NODE_ENV!=="production"&&i.name==="CssSyntaxError"&&e&&e.from&&(/\.scss$/i.test(e.from)?i.message+=`
18
+ You tried to parse Less with the standard CSS parser; try again with the postcss-less parser`)),i}return r.root}function ni(t){return typeof t=="object"&&typeof t.then=="function"}function Yv(t){let e=!1,n=JU[t.type];return t.type==="decl"?e=t.prop.toLowerCase():t.type==="atrule"&&(e=t.name.toLowerCase()),e&&t.append?[n,n+"-"+e,cr,n+"Exit",n+"Exit-"+e]:e?[n,n+"-"+e,n+"Exit",n+"Exit-"+e]:t.append?[n,cr,n+"Exit"]:[n,n+"Exit"]}function Hg(t){let e;return t.type==="document"?e=["Document",cr,"DocumentExit"]:t.type==="root"?e=["Root",cr,"RootExit"]:e=Yv(t),{eventIndex:0,events:e,iterator:0,node:t,visitorIndex:0,visitors:[]}}function Lu(t){return t[Se]=!1,t.nodes&&t.nodes.forEach(e=>Lu(e)),t}function ht(...t){return t.length===1&&Array.isArray(t[0])&&(t=t[0]),new Zh(t)}function mP(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var n=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(r){var i=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return t[r]}})}),n}function vP(t){return t[0].toUpperCase()+t.slice(1)}function Mu(t,e){new wP(e).stringify(t)}function Fu(t,e){let n=new t.constructor;for(let r in t){if(!Object.prototype.hasOwnProperty.call(t,r)||r==="proxyCache")continue;let i=t[r],o=typeof i;r==="parent"&&o==="object"?e&&(n[r]=e):r==="source"?n[r]=i:Array.isArray(i)?n[r]=i.map(s=>Fu(s,n)):(o==="object"&&i!==null&&(i=Fu(i)),n[r]=i)}return n}function ii(t,e){if(e&&typeof e.offset<"u")return e.offset;let n=1,r=1,i=0;for(let o=0;o<t.length;o++){if(r===e.line&&n===e.column){i=o;break}t[o]===`
19
+ `?(n=1,r+=1):n+=1}return i}function l0(t){return t.map(e=>(e.nodes&&(e.nodes=l0(e.nodes)),delete e.source,e))}function c0(t){if(t[i0]=!1,t.proxyOf.nodes)for(let e of t.proxyOf.nodes)c0(e)}function XP(t){return Buffer?Buffer.from(t,"base64").toString():window.atob(t)}function Ei(t,e){if(Array.isArray(t))return t.map(o=>Ei(o));let n=t,{inputs:r}=n,i=sr(n,["inputs"]);if(r){e=[];for(let o of r){let s=_t(z({},o),{__proto__:KP.prototype});s.map&&(s.map=_t(z({},s.map),{__proto__:_P.prototype})),e.push(s)}}if(i.nodes&&(i.nodes=t.nodes.map(o=>Ei(o,e))),i.source){let o=i.source,{inputId:s}=o,a=sr(o,["inputId"]);i.source=a,s!=null&&(i.source.input=e[s])}if(i.type==="root")return new HP(i);if(i.type==="decl")return new YP(i);if(i.type==="rule")return new zP(i);if(i.type==="comment")return new DP(i);if(i.type==="atrule")return new JP(i);throw new Error("Unknown node type: "+t.type)}function gM(t){for(let e=t.length-1;e>=0;e--){let n=t[e],r=n[3]||n[2];if(r)return r}}function ra(t,e){let n=new SM(t,e),r=new IM(n);try{r.parse()}catch(i){throw process.env.NODE_ENV!=="production"&&i.name==="CssSyntaxError"&&e&&e.from&&(/\.scss$/i.test(e.from)?i.message+=`
20
20
  You tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser`:/\.sass/i.test(e.from)?i.message+=`
21
21
  You tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser`:/\.less$/i.test(e.from)&&(i.message+=`
22
- You tried to parse Less with the standard CSS parser; try again with the postcss-less parser`)),i}return r.root}function ii(t){return typeof t=="object"&&typeof t.then=="function"}function m0(t){let e=!1,n=hM[t.type];return t.type==="decl"?e=t.prop.toLowerCase():t.type==="atrule"&&(e=t.name.toLowerCase()),e&&t.append?[n,n+"-"+e,hr,n+"Exit",n+"Exit-"+e]:e?[n,n+"-"+e,n+"Exit",n+"Exit-"+e]:t.append?[n,hr,n+"Exit"]:[n,n+"Exit"]}function $g(t){let e;return t.type==="document"?e=["Document",hr,"DocumentExit"]:t.type==="root"?e=["Root",hr,"RootExit"]:e=m0(t),{eventIndex:0,events:e,iterator:0,node:t,visitorIndex:0,visitors:[]}}function Du(t){return t[Se]=!1,t.nodes&&t.nodes.forEach(e=>Du(e)),t}function pt(...t){return t.length===1&&Array.isArray(t[0])&&(t=t[0]),new Nh(t)}function Oh(t){if(vs[t])return vs[t];let e=globalThis[t],n=e.prototype,r=t in qg?qg[t]:void 0,i=!!(r&&r.every(a=>{var c,l;return!!((l=(c=Object.getOwnPropertyDescriptor(n,a))==null?void 0:c.get)!=null&&l.toString().includes("[native code]"))})),o=t in tb?tb[t]:void 0,s=!!(o&&o.every(a=>{var c;return typeof n[a]=="function"&&((c=n[a])==null?void 0:c.toString().includes("[native code]"))}));if(i&&s&&!WM())return vs[t]=e.prototype,e.prototype;try{let a=document.createElement("iframe");document.body.appendChild(a);let c=a.contentWindow;if(!c)return e.prototype;let l=c[t].prototype;return document.body.removeChild(a),l?vs[t]=l:n}catch(a){return n}}function je(t,e,n){var r;let i=`${t}.${String(n)}`;if(Hc[i])return Hc[i].call(e);let o=Oh(t),s=(r=Object.getOwnPropertyDescriptor(o,n))==null?void 0:r.get;return s?(Hc[i]=s,s.call(e)):e[n]}function E0(t,e,n){let r=`${t}.${String(n)}`;if(zc[r])return zc[r].bind(e);let i=Oh(t)[n];return typeof i!="function"?e[n]:(zc[r]=i,i.bind(e))}function UM(t){return je("Node",t,"childNodes")}function PM(t){return je("Node",t,"parentNode")}function MM(t){return je("Node",t,"parentElement")}function FM(t){return je("Node",t,"textContent")}function AM(t,e){return E0("Node",t,"contains")(e)}function JM(t){return E0("Node",t,"getRootNode")()}function DM(t){return!t||!("host"in t)?null:je("ShadowRoot",t,"host")}function YM(t){return t.styleSheets}function KM(t){return!t||!("shadowRoot"in t)?null:je("Element",t,"shadowRoot")}function _M(t,e){return je("Element",t,"querySelector")(e)}function HM(t,e){return je("Element",t,"querySelectorAll")(e)}function R0(){return Oh("MutationObserver").constructor}function Zn(t,e,n){try{if(!(e in t))return()=>{};let r=t[e],i=n(r);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),t[e]=i,()=>{t[e]=r}}catch(r){return()=>{}}}function Mt(t,e,n=document){let r={capture:!0};return n.addEventListener(t,e,r),()=>n.removeEventListener(t,e,r)}function Ei(t,e,n={}){let r=null,i=0;return function(...o){let s=Date.now();!i&&n.leading===!1&&(i=s);let a=e-(s-i),c=this;a<=0||a>e?(r&&(clearTimeout(r),r=null),i=s,t.apply(c,o)):!r&&n.trailing!==!1&&(r=setTimeout(()=>{i=n.leading===!1?0:Date.now(),r=null,t.apply(c,o)},a))}}function va(t,e,n,r,i=window){let o=i.Object.getOwnPropertyDescriptor(t,e);return i.Object.defineProperty(t,e,r?n:{set(s){setTimeout(()=>{n.set.call(this,s)},0),o&&o.set&&o.set.call(this,s)}}),()=>va(t,e,o||{},!0)}function C0(t){var e,n,r,i;let o=t.document;return{left:o.scrollingElement?o.scrollingElement.scrollLeft:t.pageXOffset!==void 0?t.pageXOffset:o.documentElement.scrollLeft||(o==null?void 0:o.body)&&((e=q.parentElement(o.body))==null?void 0:e.scrollLeft)||((n=o==null?void 0:o.body)==null?void 0:n.scrollLeft)||0,top:o.scrollingElement?o.scrollingElement.scrollTop:t.pageYOffset!==void 0?t.pageYOffset:(o==null?void 0:o.documentElement.scrollTop)||(o==null?void 0:o.body)&&((r=q.parentElement(o.body))==null?void 0:r.scrollTop)||((i=o==null?void 0:o.body)==null?void 0:i.scrollTop)||0}}function Z0(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function k0(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function V0(t){return t?t.nodeType===t.ELEMENT_NODE?t:q.parentElement(t):null}function Nt(t,e,n,r){if(!t)return!1;let i=V0(t);if(!i)return!1;try{if(typeof e=="string"){if(i.classList.contains(e)||r&&i.closest("."+e)!==null)return!0}else if(_s(i,e,r))return!0}catch(o){}return!!(n&&(i.matches(n)||r&&i.closest(n)!==null))}function BM(t,e){return e.getId(t)!==-1}function Bc(t,e,n){return t.tagName==="TITLE"&&n.headTitleMutations?!0:e.getId(t)===mi}function x0(t,e){if(ci(t))return!1;let n=e.getId(t);if(!e.has(n))return!0;let r=q.parentNode(t);return r&&r.nodeType===t.DOCUMENT_NODE?!1:r?x0(r,e):!0}function Hu(t){return!!t.changedTouches}function jM(t=window){"NodeList"in t&&!t.NodeList.prototype.forEach&&(t.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in t&&!t.DOMTokenList.prototype.forEach&&(t.DOMTokenList.prototype.forEach=Array.prototype.forEach)}function N0(t,e){return!!(t.nodeName==="IFRAME"&&e.getMeta(t))}function O0(t,e){return!!(t.nodeName==="LINK"&&t.nodeType===t.ELEMENT_NODE&&t.getAttribute&&t.getAttribute("rel")==="stylesheet"&&e.getMeta(t))}function zu(t){return t?t instanceof _u&&"shadowRoot"in t?!!t.shadowRoot:!!q.shadowRoot(t):!1}function G0(t){var e;let n=null;return"getRootNode"in t&&((e=q.getRootNode(t))==null?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&q.host(q.getRootNode(t))&&(n=q.host(q.getRootNode(t))),n}function QM(t){let e=t,n;for(;n=G0(e);)e=n;return e}function $M(t){let e=t.ownerDocument;if(!e)return!1;let n=QM(t);return q.contains(e,n)}function L0(t){let e=t.ownerDocument;return e?q.contains(e,t)||$M(t):!1}function nb(t){return"__ln"in t}function $u(t,e){t.delete(e),q.childNodes(e).forEach(n=>$u(t,n))}function qM(t,e){let n=[t];for(;n.length;){let r=n.pop();e.has(r)||(e.add(r),q.childNodes(r).forEach(i=>n.push(i)))}}function ib(t,e,n){return t.size===0?!1:tF(t,e)}function tF(t,e,n){let r=q.parentNode(e);return r?t.has(r):!1}function ob(t,e){return t.size===0?!1:W0(t,e)}function W0(t,e){let n=q.parentNode(e);return n?t.has(n)?!0:W0(t,n):!1}function eF(t){hi=t}function nF(){hi=void 0}function Ni(t){try{if("composedPath"in t){let e=t.composedPath();if(e.length)return e[0]}else if("path"in t&&t.path.length)return t.path[0]}catch(e){}return t&&t.target}function U0(t,e){let n=new Qu;Tn.push(n),n.init(t);let r=new(R0())(nt(n.processMutations.bind(n)));return r.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),r}function rF({mousemoveCb:t,sampling:e,doc:n,mirror:r}){if(e.mousemove===!1)return()=>{};let i=typeof e.mousemove=="number"?e.mousemove:50,o=typeof e.mousemoveCallback=="number"?e.mousemoveCallback:500,s=[],a,c=Ei(nt(h=>{let p=Date.now()-a;t(s.map(f=>(f.timeOffset-=p,f)),h),s=[],a=null}),o),l=nt(Ei(nt(h=>{let p=Ni(h),{clientX:f,clientY:m}=Hu(h)?h.changedTouches[0]:h;a||(a=ea()),s.push({x:f,y:m,id:r.getId(p),timeOffset:ea()-a}),c(typeof DragEvent<"u"&&h instanceof DragEvent?et.Drag:h instanceof MouseEvent?et.MouseMove:et.TouchMove)}),i,{trailing:!1})),u=[Mt("mousemove",l,n),Mt("touchmove",l,n),Mt("drag",l,n)];return nt(()=>{u.forEach(h=>h())})}function iF({mouseInteractionCb:t,doc:e,mirror:n,blockClass:r,blockSelector:i,sampling:o}){if(o.mouseInteraction===!1)return()=>{};let s=o.mouseInteraction===!0||o.mouseInteraction===void 0?{}:o.mouseInteraction,a=[],c=null,l=u=>h=>{let p=Ni(h);if(Nt(p,r,i,!0)||zM(p))return;let f=null,m=u;if("pointerType"in h){switch(h.pointerType){case"mouse":f=_e.Mouse;break;case"touch":f=_e.Touch;break;case"pen":f=_e.Pen;break}f===_e.Touch&&(Dt[u]===Dt.MouseDown?m="TouchStart":Dt[u]===Dt.MouseUp&&(m="TouchEnd"))}else Hu(h)&&(f=_e.Touch);f!==null?(c=f,(m.startsWith("Touch")&&f===_e.Touch||m.startsWith("Mouse")&&f===_e.Mouse)&&(f=null)):Dt[u]===Dt.Click&&(f=c,c=null);let d=Hu(h)?h.changedTouches[0]:h;if(!d)return;let v=n.getId(p),{clientX:g,clientY:w}=d;nt(t)(z({type:Dt[m],id:v,x:g,y:w},f!==null&&{pointerType:f}))};return Object.keys(Dt).filter(u=>Number.isNaN(Number(u))&&!u.endsWith("_Departed")&&s[u]!==!1).forEach(u=>{let h=sr(u),p=l(u);if(window.PointerEvent)switch(Dt[u]){case Dt.MouseDown:case Dt.MouseUp:h=h.replace("mouse","pointer");break;case Dt.TouchStart:case Dt.TouchEnd:return}a.push(Mt(h,p,e))}),nt(()=>{a.forEach(u=>u())})}function P0({scrollCb:t,doc:e,mirror:n,blockClass:r,blockSelector:i,sampling:o}){let s=nt(Ei(nt(a=>{let c=Ni(a);if(!c||Nt(c,r,i,!0))return;let l=n.getId(c);if(c===e&&e.defaultView){let u=C0(e.defaultView);t({id:l,x:u.left,y:u.top})}else t({id:l,x:c.scrollLeft,y:c.scrollTop})}),o.scroll||100));return Mt("scroll",s,e)}function oF({viewportResizeCb:t},{win:e}){let n=-1,r=-1,i=nt(Ei(nt(()=>{let o=Z0(),s=k0();(n!==o||r!==s)&&(t({width:Number(s),height:Number(o)}),n=o,r=s)}),200));return Mt("resize",i,e)}function aF({inputCb:t,doc:e,mirror:n,blockClass:r,blockSelector:i,ignoreClass:o,ignoreSelector:s,maskInputOptions:a,maskInputFn:c,sampling:l,userTriggeredOnInput:u}){function h(g){let w=Ni(g),R=g.isTrusted,E=w&&w.tagName;if(w&&E==="OPTION"&&(w=q.parentElement(w)),!w||!E||sF.indexOf(E)<0||Nt(w,r,i,!0)||w.classList.contains(o)||s&&w.matches(s))return;let T=w.value,V=!1,N=Ds(w)||"",U=w.getAttribute("data-hl-record");N==="radio"||N==="checkbox"?V=w.checked:qb({maskInputOptions:a,type:N,tagName:E,overwriteRecord:U})&&(T=Js({element:w,maskInputOptions:a,tagName:E,type:N,value:T,overwriteRecord:U,maskInputFn:c})),p(w,u?{text:T,isChecked:V,userTriggered:R}:{text:T,isChecked:V});let C=w.name;N==="radio"&&C&&V&&e.querySelectorAll(`input[type="radio"][name="${C}"]`).forEach(x=>{if(x!==w){let P=x.value;p(x,u?{text:P,isChecked:!V,userTriggered:!1}:{text:P,isChecked:!V})}})}function p(g,w){let R=sb.get(g);if(!R||R.text!==w.text||R.isChecked!==w.isChecked){sb.set(g,w);let E=n.getId(g);nt(t)(Kt(z({},w),{id:E}))}}let f=(l.input==="last"?["change"]:["input","change"]).map(g=>Mt(g,nt(h),e)),m=e.defaultView;if(!m)return()=>{f.forEach(g=>g())};let d=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 d&&d.set&&f.push(...v.map(g=>va(g[0],g[1],{set(){nt(h)({target:this,isTrusted:!1})}},!1,m))),nt(()=>{f.forEach(g=>g())})}function na(t){let e=[];function n(r,i){if(ws("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||ws("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||ws("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||ws("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){let o=Array.from(r.parentRule.cssRules).indexOf(r);i.unshift(o)}else if(r.parentStyleSheet){let o=Array.from(r.parentStyleSheet.cssRules).indexOf(r);i.unshift(o)}return i}return n(t,e)}function He(t,e,n){let r,i;return t?(t.ownerNode?r=e.getId(t.ownerNode):i=n.getId(t),{styleId:i,id:r}):{}}function lF({styleSheetRuleCb:t,mirror:e,stylesheetManager:n},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};let i=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:nt((u,h,p)=>{let[f,m]=p,{id:d,styleId:v}=He(h,e,n.styleMirror);return(d&&d!==-1||v&&v!==-1)&&t({id:d,styleId:v,adds:[{rule:f,index:m}]}),u.apply(h,p)})}),r.CSSStyleSheet.prototype.addRule=function(u,h,p=this.cssRules.length){let f=`${u} { ${h} }`;return r.CSSStyleSheet.prototype.insertRule.apply(this,[f,p])};let o=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(o,{apply:nt((u,h,p)=>{let[f]=p,{id:m,styleId:d}=He(h,e,n.styleMirror);return(m&&m!==-1||d&&d!==-1)&&t({id:m,styleId:d,removes:[{index:f}]}),u.apply(h,p)})}),r.CSSStyleSheet.prototype.removeRule=function(u){return r.CSSStyleSheet.prototype.deleteRule.apply(this,[u])};let s;r.CSSStyleSheet.prototype.replace&&(s=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(s,{apply:nt((u,h,p)=>{let[f]=p,{id:m,styleId:d}=He(h,e,n.styleMirror);return(m&&m!==-1||d&&d!==-1)&&t({id:m,styleId:d,replace:f}),u.apply(h,p)})}));let a;r.CSSStyleSheet.prototype.replaceSync&&(a=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:nt((u,h,p)=>{let[f]=p,{id:m,styleId:d}=He(h,e,n.styleMirror);return(m&&m!==-1||d&&d!==-1)&&t({id:m,styleId:d,replaceSync:f}),u.apply(h,p)})}));let c={};Ss("CSSGroupingRule")?c.CSSGroupingRule=r.CSSGroupingRule:(Ss("CSSMediaRule")&&(c.CSSMediaRule=r.CSSMediaRule),Ss("CSSConditionRule")&&(c.CSSConditionRule=r.CSSConditionRule),Ss("CSSSupportsRule")&&(c.CSSSupportsRule=r.CSSSupportsRule));let l={};return Object.entries(c).forEach(([u,h])=>{l[u]={insertRule:h.prototype.insertRule,deleteRule:h.prototype.deleteRule},h.prototype.insertRule=new Proxy(l[u].insertRule,{apply:nt((p,f,m)=>{let[d,v]=m,{id:g,styleId:w}=He(f.parentStyleSheet,e,n.styleMirror);return(g&&g!==-1||w&&w!==-1)&&t({id:g,styleId:w,adds:[{rule:d,index:[...na(f),v||0]}]}),p.apply(f,m)})}),h.prototype.deleteRule=new Proxy(l[u].deleteRule,{apply:nt((p,f,m)=>{let[d]=m,{id:v,styleId:g}=He(f.parentStyleSheet,e,n.styleMirror);return(v&&v!==-1||g&&g!==-1)&&t({id:v,styleId:g,removes:[{index:[...na(f),d]}]}),p.apply(f,m)})})}),nt(()=>{r.CSSStyleSheet.prototype.insertRule=i,r.CSSStyleSheet.prototype.deleteRule=o,s&&(r.CSSStyleSheet.prototype.replace=s),a&&(r.CSSStyleSheet.prototype.replaceSync=a),Object.entries(c).forEach(([u,h])=>{h.prototype.insertRule=l[u].insertRule,h.prototype.deleteRule=l[u].deleteRule})})}function M0({mirror:t,stylesheetManager:e},n){var r,i,o;let s=null;n.nodeName==="#document"?s=t.getId(n):s=t.getId(q.host(n));let a=n.nodeName==="#document"?(r=n.defaultView)==null?void 0:r.Document:(o=(i=n.ownerDocument)==null?void 0:i.defaultView)==null?void 0:o.ShadowRoot,c=a!=null&&a.prototype?Object.getOwnPropertyDescriptor(a==null?void 0:a.prototype,"adoptedStyleSheets"):void 0;return s===null||s===-1||!a||!c?()=>{}:(Object.defineProperty(n,"adoptedStyleSheets",{configurable:c.configurable,enumerable:c.enumerable,get(){var l;return(l=c.get)==null?void 0:l.call(this)},set(l){var u;let h=(u=c.set)==null?void 0:u.call(this,l);if(s!==null&&s!==-1)try{e.adoptStyleSheets(l,s)}catch(p){}return h}}),nt(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:c.configurable,enumerable:c.enumerable,get:c.get,set:c.set})}))}function cF({styleDeclarationCb:t,mirror:e,ignoreCSSAttributes:n,stylesheetManager:r},{win:i}){let o=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(o,{apply:nt((a,c,l)=>{var u;let[h,p,f]=l;if(n.has(h))return o.apply(c,[h,p,f]);let{id:m,styleId:d}=He((u=c.parentRule)==null?void 0:u.parentStyleSheet,e,r.styleMirror);return(m&&m!==-1||d&&d!==-1)&&t({id:m,styleId:d,set:{property:h,value:p,priority:f},index:na(c.parentRule)}),a.apply(c,l)})});let s=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(s,{apply:nt((a,c,l)=>{var u;let[h]=l;if(n.has(h))return s.apply(c,[h]);let{id:p,styleId:f}=He((u=c.parentRule)==null?void 0:u.parentStyleSheet,e,r.styleMirror);return(p&&p!==-1||f&&f!==-1)&&t({id:p,styleId:f,remove:{property:h},index:na(c.parentRule)}),a.apply(c,l)})}),nt(()=>{i.CSSStyleDeclaration.prototype.setProperty=o,i.CSSStyleDeclaration.prototype.removeProperty=s})}function uF({mediaInteractionCb:t,blockClass:e,blockSelector:n,mirror:r,sampling:i,doc:o}){let s=nt(c=>Ei(nt(l=>{let u=Ni(l);if(!u||Nt(u,e,n,!0))return;let{currentTime:h,volume:p,muted:f,playbackRate:m,loop:d}=u;t({type:c,id:r.getId(u),currentTime:h,volume:p,muted:f,playbackRate:m,loop:d})}),i.media||500)),a=[Mt("play",s(qn.Play),o),Mt("pause",s(qn.Pause),o),Mt("seeked",s(qn.Seeked),o),Mt("volumechange",s(qn.VolumeChange),o),Mt("ratechange",s(qn.RateChange),o)];return nt(()=>{a.forEach(c=>c())})}function hF({fontCb:t,doc:e}){let n=e.defaultView;if(!n)return()=>{};let r=[],i=new WeakMap,o=n.FontFace;n.FontFace=function(a,c,l){let u=new o(a,c,l);return i.set(u,{family:a,buffer:typeof c!="string",descriptors:l,fontSource:typeof c=="string"?c:JSON.stringify(Array.from(new Uint8Array(c)))}),u};let s=Zn(e.fonts,"add",function(a){return function(c){return setTimeout(nt(()=>{let l=i.get(c);l&&(t(l),i.delete(c))}),0),a.apply(this,[c])}});return r.push(()=>{n.FontFace=o}),r.push(s),nt(()=>{r.forEach(a=>a())})}function pF(t){let{doc:e,mirror:n,blockClass:r,blockSelector:i,selectionCb:o}=t,s=!0,a=nt(()=>{let c=e.getSelection();if(!c||s&&c!=null&&c.isCollapsed)return;s=c.isCollapsed||!1;let l=[],u=c.rangeCount||0;for(let h=0;h<u;h++){let p=c.getRangeAt(h),{startContainer:f,startOffset:m,endContainer:d,endOffset:v}=p;Nt(f,r,i,!0)||Nt(d,r,i,!0)||l.push({start:n.getId(f),startOffset:m,end:n.getId(d),endOffset:v})}o({ranges:l})});return a(),Mt("selectionchange",a)}function dF({doc:t,customElementCb:e}){let n=t.defaultView;return!n||!n.customElements?()=>{}:Zn(n.customElements,"define",function(r){return function(i,o,s){try{e({define:{name:i}})}catch(a){console.warn(`Custom element callback failed for ${i}`)}return r.apply(this,[i,o,s])}})}function fF(t,e){let{mutationCb:n,mousemoveCb:r,mouseInteractionCb:i,scrollCb:o,viewportResizeCb:s,inputCb:a,mediaInteractionCb:c,styleSheetRuleCb:l,styleDeclarationCb:u,canvasMutationCb:h,fontCb:p,selectionCb:f,customElementCb:m}=t;t.mutationCb=(...d)=>{e.mutation&&e.mutation(...d),n(...d)},t.mousemoveCb=(...d)=>{e.mousemove&&e.mousemove(...d),r(...d)},t.mouseInteractionCb=(...d)=>{e.mouseInteraction&&e.mouseInteraction(...d),i(...d)},t.scrollCb=(...d)=>{e.scroll&&e.scroll(...d),o(...d)},t.viewportResizeCb=(...d)=>{e.viewportResize&&e.viewportResize(...d),s(...d)},t.inputCb=(...d)=>{e.input&&e.input(...d),a(...d)},t.mediaInteractionCb=(...d)=>{e.mediaInteaction&&e.mediaInteaction(...d),c(...d)},t.styleSheetRuleCb=(...d)=>{e.styleSheetRule&&e.styleSheetRule(...d),l(...d)},t.styleDeclarationCb=(...d)=>{e.styleDeclaration&&e.styleDeclaration(...d),u(...d)},t.canvasMutationCb=(...d)=>{e.canvasMutation&&e.canvasMutation(...d),h(...d)},t.fontCb=(...d)=>{e.font&&e.font(...d),p(...d)},t.selectionCb=(...d)=>{e.selection&&e.selection(...d),f(...d)},t.customElementCb=(...d)=>{e.customElement&&e.customElement(...d),m(...d)}}function mF(t,e={}){let n=t.doc.defaultView;if(!n)return()=>{};fF(t,e);let r;t.recordDOM&&(r=U0(t,t.doc));let i=rF(t),o=iF(t),s=P0(t),a=oF(t,{win:n}),c=aF(t),l=uF(t),u=()=>{},h=()=>{},p=()=>{},f=()=>{};t.recordDOM&&(u=lF(t,{win:n}),h=M0(t,t.doc),p=cF(t,{win:n}),t.collectFonts&&(f=hF(t)));let m=pF(t),d=dF(t),v=[];for(let g of t.plugins)v.push(g.observer(g.callback,n,g.options));return nt(()=>{Tn.forEach(g=>g.reset()),r==null||r.disconnect(),i(),o(),s(),a(),c(),l(),u(),h(),p(),f(),m(),d(),v.forEach(g=>g())})}function ws(t){return typeof window[t]<"u"}function Ss(t){return!!(typeof window[t]<"u"&&window[t].prototype&&"insertRule"in window[t].prototype&&"deleteRule"in window[t].prototype)}function bF(t,e){let n=ab.get(t);return n||(n=new Map,ab.set(t,n)),n.has(e)||n.set(e,[]),n.get(e)}function Os(t,e,n){if(t instanceof Array)return t.map(r=>Os(r,e,n));if(t===null)return t;if(t instanceof Float32Array||t instanceof Float64Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Uint8Array||t instanceof Uint16Array||t instanceof Int16Array||t instanceof Int8Array||t instanceof Uint8ClampedArray)return{rr_type:t.constructor.name,args:[Object.values(t)]};if(t instanceof ArrayBuffer){let r=t.constructor.name,i=gF(t);return{rr_type:r,base64:i}}else{if(t instanceof DataView)return{rr_type:t.constructor.name,args:[Os(t.buffer,e,n),t.byteOffset,t.byteLength]};if(t instanceof HTMLImageElement){let r=t.constructor.name,{src:i}=t;return{rr_type:r,src:i}}else if(t instanceof HTMLCanvasElement){let r="HTMLImageElement",i=t.toDataURL();return{rr_type:r,src:i}}else{if(t instanceof ImageData)return{rr_type:t.constructor.name,args:[Os(t.data,e,n),t.width,t.height]};if(J0(t,e)||typeof t=="object"){let r=t.constructor.name,i=F0(t,e,n);return{rr_type:r,index:i}}}}return t}function vF(t,e,n,r){let i=[],o=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);for(let s of o)try{if(typeof e.CanvasRenderingContext2D.prototype[s]!="function")continue;let a=Zn(e.CanvasRenderingContext2D.prototype,s,function(c){return function(...l){return Nt(this.canvas,n,r,!0)||setTimeout(()=>{let u=A0(l,e,this);t(this.canvas,{type:dr["2D"],property:s,args:u})},0),c.apply(this,l)}});i.push(a)}catch(a){let c=va(e.CanvasRenderingContext2D.prototype,s,{set(l){t(this.canvas,{type:dr["2D"],property:s,args:[l],setter:!0})}});i.push(c)}return()=>{i.forEach(s=>s())}}function wF(t){return t==="experimental-webgl"?"webgl":t}function lb(t,e,n,r){let i=[];try{let o=Zn(t.HTMLCanvasElement.prototype,"getContext",function(s){return function(a,...c){if(!Nt(this,e,n,!0)){let l=wF(a);if("__context"in this||(this.__context=l),r&&["webgl","webgl2"].includes(l))if(c[0]&&typeof c[0]=="object"){let u=c[0];u.preserveDrawingBuffer||(u.preserveDrawingBuffer=!0)}else c.splice(0,1,{preserveDrawingBuffer:!0})}return s.apply(this,[a,...c])}});i.push(o)}catch(o){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach(o=>o())}}function cb(t,e,n,r,i,o){let s=[],a=Object.getOwnPropertyNames(t);for(let c of a)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(c))try{if(typeof t[c]!="function")continue;let l=Zn(t,c,function(u){return function(...h){let p=u.apply(this,h);if(F0(p,o,this),"tagName"in this.canvas&&!Nt(this.canvas,r,i,!0)){let f=A0(h,o,this),m={type:e,property:c,args:f};n(this.canvas,m)}return p}});s.push(l)}catch(l){let u=va(t,c,{set(h){n(this.canvas,{type:e,property:c,args:[h],setter:!0})}});s.push(u)}return s}function SF(t,e,n,r){let i=[];return i.push(...cb(e.WebGLRenderingContext.prototype,dr.WebGL,t,n,r,e)),typeof e.WebGL2RenderingContext<"u"&&i.push(...cb(e.WebGL2RenderingContext.prototype,dr.WebGL2,t,n,r,e)),()=>{i.forEach(o=>o())}}function TF(t){let e;try{if(e=ub&&(self.URL||self.webkitURL).createObjectURL(ub),!e)throw"";let n=new Worker(e,{name:t==null?void 0:t.name});return n.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(e)}),n}catch(n){return new Worker("data:text/javascript;base64,"+D0,{name:t==null?void 0:t.name})}finally{e&&(self.URL||self.webkitURL).revokeObjectURL(e)}}function Le(t={}){var e,n,r,i,o,s,a,c;let{emit:l,checkoutEveryNms:u,checkoutEveryNth:h,blockClass:p="highlight-block",blockSelector:f=null,ignoreClass:m="highlight-ignore",ignoreSelector:d=null,maskTextClass:v="highlight-mask",maskTextSelector:g=null,inlineStylesheet:w=!0,maskAllInputs:R,maskInputOptions:E,slimDOMOptions:T,maskInputFn:V,maskTextFn:N=uh,hooks:U,packFn:C,sampling:x={},mousemoveWait:P,recordDOM:st=!0,recordCanvas:lt=!1,recordCrossOriginIframes:y=!1,recordAfter:b=t.recordAfter==="DOMContentLoaded"?t.recordAfter:"load",userTriggeredOnInput:Z=!1,collectFonts:D=!1,inlineImages:M=!1,inlineVideos:O=!1,plugins:it,keepIframeSrcFn:ct=()=>!1,privacySetting:Ot="default",ignoreCSSAttributes:Ue=new Set([]),errorHandler:_0,logger:H0}=t,Oi=z(z({},t.dataURLOptions),(n=(e=t.sampling)==null?void 0:e.canvas)==null?void 0:n.dataURLOptions);eF(_0);let Gi=y?window.parent===window:!0,mr=!1;if(!Gi)try{window.parent.document&&(mr=!1)}catch(at){mr=!0}if(Gi&&!l)throw new Error("emit function is required");if(!Gi&&!mr)return()=>{};P!==void 0&&x.mousemove===void 0&&(x.mousemove=P),le.reset();let wa=R===!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}:E!==void 0?E:{password:!0},Sa=T===!0||T==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:T==="all",headMetaDescKeywords:T==="all",headTitleMutations:T==="all"}:T||{};jM();let Gh,Ia=0,Lh=at=>{for(let ie of it||[])ie.eventProcessor&&(at=ie.eventProcessor(at));return C&&!mr&&(at=C(at)),at};vt=(at,ie)=>{var gt;let bt=at;if(bt.timestamp=ea(),(gt=Tn[0])!=null&&gt.isFrozen()&&bt.type!==rt.FullSnapshot&&!(bt.type===rt.IncrementalSnapshot&&bt.data.source===et.Mutation)&&Tn.forEach(he=>he.unfreeze()),Gi)l==null||l(Lh(bt),ie);else if(mr){let he={type:"rrweb",event:Lh(bt),origin:window.location.origin,isCheckout:ie};window.parent.postMessage(he,"*")}if(bt.type===rt.FullSnapshot)Gh=bt,Ia=0;else if(bt.type===rt.IncrementalSnapshot){if(bt.data.source===et.Mutation&&bt.data.isAttachIframe)return;Ia++;let he=h&&Ia>=h,dt=u&&bt.timestamp-Gh.timestamp>u;(he||dt)&&Gs(!0)}};let Li=at=>{vt({type:rt.IncrementalSnapshot,data:z({source:et.Mutation},at)})},Xh=at=>vt({type:rt.IncrementalSnapshot,data:z({source:et.Scroll},at)}),Wh=at=>vt({type:rt.IncrementalSnapshot,data:z({source:et.CanvasMutation},at)}),z0=at=>vt({type:rt.IncrementalSnapshot,data:z({source:et.AdoptedStyleSheet},at)}),Qe=new nh({mutationCb:Li,adoptedStyleSheetCb:z0}),$e=new qu({mirror:le,mutationCb:Li,stylesheetManager:Qe,recordCrossOriginIframes:y,wrappedEmit:vt});for(let at of it||[])at.getMirror&&at.getMirror({nodeMirror:le,crossOriginIframeMirror:$e.crossOriginIframeMirror,crossOriginIframeStyleMirror:$e.crossOriginIframeStyleMirror});let Ta=new rh;pi=new eh({recordCanvas:lt,recordLocalVideos:M,recordRemoteVideos:O,mutationCb:Wh,win:window,blockClass:p,blockSelector:f,mirror:le,sampling:(r=x==null?void 0:x.canvas)==null?void 0:r.fps,samplingManual:(i=x==null?void 0:x.canvas)==null?void 0:i.fpsManual,clearWebGLBuffer:(o=x==null?void 0:x.canvas)==null?void 0:o.clearWebGLBuffer,initialSnapshotDelay:(s=x==null?void 0:x.canvas)==null?void 0:s.initialSnapshotDelay,dataURLOptions:Oi,resizeFactor:(a=x==null?void 0:x.canvas)==null?void 0:a.resizeFactor,maxSnapshotDimension:(c=x==null?void 0:x.canvas)==null?void 0:c.maxSnapshotDimension,logger:H0});let Xi=new th({mutationCb:Li,scrollCb:Xh,bypassOptions:{blockClass:p,blockSelector:f,maskTextClass:v,maskTextSelector:g,inlineStylesheet:w,maskInputOptions:wa,dataURLOptions:Oi,maskTextFn:N,maskInputFn:V,recordCanvas:lt,inlineImages:M,inlineVideos:O,privacySetting:Ot,sampling:x,slimDOMOptions:Sa,iframeManager:$e,stylesheetManager:Qe,canvasManager:pi,keepIframeSrcFn:ct,processedNodeManager:Ta},mirror:le});Gs=(at=!1)=>{if(!st)return;vt({type:rt.Meta,data:{href:window.location.href,width:k0(),height:Z0()}},at),Qe.reset(),Xi.init(),Tn.forEach(gt=>gt.lock());let ie=r2(document,{mirror:le,blockClass:p,blockSelector:f,maskTextClass:v,maskTextSelector:g,inlineStylesheet:w,maskAllInputs:wa,maskTextFn:N,maskInputFn:V,slimDOM:Sa,dataURLOptions:Oi,recordCanvas:lt,inlineImages:M,inlineVideos:O,privacySetting:Ot,onSerialize:gt=>{N0(gt,le)&&$e.addIframe(gt),O0(gt,le)&&Qe.trackLinkElement(gt),zu(gt)&&Xi.addShadowRoot(q.shadowRoot(gt),document)},onIframeLoad:(gt,bt)=>{$e.attachIframe(gt,bt),Xi.observeAttachShadow(gt)},onStylesheetLoad:(gt,bt)=>{Qe.attachLinkElement(gt,bt)},keepIframeSrcFn:ct});if(!ie)return console.warn("Failed to snapshot the document");vt({type:rt.FullSnapshot,data:{node:ie,initialOffset:C0(window)}},at),Tn.forEach(gt=>gt.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&Qe.adoptStyleSheets(document.adoptedStyleSheets,le.getId(document))};try{let at=[],ie=bt=>{var he;return nt(mF)({mutationCb:Li,mousemoveCb:(dt,Ea)=>vt({type:rt.IncrementalSnapshot,data:{source:Ea,positions:dt}}),mouseInteractionCb:dt=>vt({type:rt.IncrementalSnapshot,data:z({source:et.MouseInteraction},dt)}),scrollCb:Xh,viewportResizeCb:dt=>vt({type:rt.IncrementalSnapshot,data:z({source:et.ViewportResize},dt)}),inputCb:dt=>vt({type:rt.IncrementalSnapshot,data:z({source:et.Input},dt)}),mediaInteractionCb:dt=>vt({type:rt.IncrementalSnapshot,data:z({source:et.MediaInteraction},dt)}),styleSheetRuleCb:dt=>vt({type:rt.IncrementalSnapshot,data:z({source:et.StyleSheetRule},dt)}),styleDeclarationCb:dt=>vt({type:rt.IncrementalSnapshot,data:z({source:et.StyleDeclaration},dt)}),canvasMutationCb:Wh,fontCb:dt=>vt({type:rt.IncrementalSnapshot,data:z({source:et.Font},dt)}),selectionCb:dt=>{vt({type:rt.IncrementalSnapshot,data:z({source:et.Selection},dt)})},customElementCb:dt=>{vt({type:rt.IncrementalSnapshot,data:z({source:et.CustomElement},dt)})},blockClass:p,ignoreClass:m,ignoreSelector:d,maskTextClass:v,maskTextSelector:g,maskInputOptions:wa,inlineStylesheet:w,sampling:x,recordDOM:st,recordCanvas:lt,inlineImages:M,inlineVideos:O,userTriggeredOnInput:Z,collectFonts:D,doc:bt,maskInputFn:V,maskTextFn:N,keepIframeSrcFn:ct,blockSelector:f,slimDOMOptions:Sa,dataURLOptions:Oi,mirror:le,iframeManager:$e,stylesheetManager:Qe,shadowDomManager:Xi,processedNodeManager:Ta,canvasManager:pi,ignoreCSSAttributes:Ue,privacySetting:Ot,plugins:((he=it==null?void 0:it.filter(dt=>dt.observer))==null?void 0:he.map(dt=>({observer:dt.observer,options:dt.options,callback:Ea=>vt({type:rt.Plugin,data:{plugin:dt.name,payload:Ea}})})))||[]},U)};$e.addLoadListener(bt=>{try{at.push(ie(bt.contentDocument))}catch(he){console.warn(he)}});let gt=()=>{Gs(),at.push(ie(document)),ia=!0};return document.readyState==="interactive"||document.readyState==="complete"?gt():(at.push(Mt("DOMContentLoaded",()=>{vt({type:rt.DomContentLoaded,data:{}}),b==="DOMContentLoaded"&&gt()})),at.push(Mt("load",()=>{vt({type:rt.Load,data:{}}),b==="load"&&gt()},window))),()=>{at.forEach(bt=>bt()),Ta.destroy(),ia=!1,nF()}}catch(at){console.warn(at)}}function OF(t){typeof t!="string"&&(t=""),t=t.replace(/\s/g,"");let e=t.split(","),n=e.lastIndexOf("");for(;n>=0;)e[n-1]+=",",e.splice(n,1),n=e.lastIndexOf("");return e}function XF(t,e){let n=e.slice(0,e.length-1);for(let r=0;r<n.length;r++)n[r]=t[n[r].toLowerCase()];return n}function WF(t,e,n){t.addEventListener?t.addEventListener(e,n,!1):t.attachEvent&&t.attachEvent(`on${e}`,()=>{n(window.event)})}function UF(t,e,n){let r;if(e.scope===n||e.scope==="all"){r=e.mods.length>0;for(let i in Pt)Object.prototype.hasOwnProperty.call(Pt,i)&&(!Pt[i]&&e.mods.indexOf(+i)>-1||Pt[i]&&e.mods.indexOf(+i)===-1)&&(r=!1);(e.mods.length===0&&!Pt[16]&&!Pt[18]&&!Pt[17]&&!Pt[91]||r||e.shortcut==="*")&&e.method(t,e)===!1&&(t.preventDefault?t.preventDefault():t.returnValue=!1,t.stopPropagation&&t.stopPropagation(),t.cancelBubble&&(t.cancelBubble=!0))}}function PF(t){let e=Ie["*"],n=t.keyCode||t.which||t.charCode;if((n===93||n===224)&&(n=91),Ut.indexOf(n)===-1&&n!==229&&Ut.push(n),["ctrlKey","altKey","shiftKey","metaKey"].forEach(r=>{let i=fb[r];t[r]&&Ut.indexOf(i)===-1?Ut.push(i):!t[r]&&Ut.indexOf(i)>-1?Ut.splice(Ut.indexOf(i),1):r==="metaKey"&&t[r]&&Ut.length===3&&(t.ctrlKey||t.shiftKey||t.altKey||(Ut=Ut.slice(Ut.indexOf(i))))}),!(n in Pt&&(Pt[n]=!0,!e))){for(let r in Pt)Object.prototype.hasOwnProperty.call(Pt,r)&&(Pt[r]=t[fb[r]]);if(t.getModifierState&&!(t.altKey&&!t.ctrlKey)&&t.getModifierState("AltGraph")&&(Ut.indexOf(17)===-1&&Ut.push(17),Ut.indexOf(18)===-1&&Ut.push(18),Pt[17]=!0,Pt[18]=!0),n in Ie){for(let r=0;r<Ie[n].length;r++)if((t.type==="keydown"&&Ie[n][r].keydown||t.type==="keyup"&&Ie[n][r].keyup)&&Ie[n][r].key){let i=Ie[n][r];UF(t,i,"all")}}}}function DF(t){let e;try{if(e=gb&&(self.URL||self.webkitURL).createObjectURL(gb),!e)throw"";let n=new Worker(e,{name:t==null?void 0:t.name});return n.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(e)}),n}catch(n){return new Worker("data:text/javascript;base64,"+K0,{name:t==null?void 0:t.name})}finally{e&&(self.URL||self.webkitURL).revokeObjectURL(e)}}var YG,KG,Ge,_G,Ht,HG,bb,Bn,zG,BG,jG,Ls,vb,wb,$c,$,rr,ai,di,ir,t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b,yb,Ri,MF,FF,AF,K0,JF,gb,Oe,YF,KF,_F,HF,ih,Ci,Nc=Jh(()=>{"use strict";YG=Object.defineProperty,KG=(t,e,n)=>e in t?YG(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ge=(t,e,n)=>KG(t,typeof e!="symbol"?e+"":e,n),_G=(t,e,n)=>new Promise((r,i)=>{var o=c=>{try{a(n.next(c))}catch(l){i(l)}},s=c=>{try{a(n.throw(c))}catch(l){i(l)}},a=c=>c.done?r(c.value):Promise.resolve(c.value).then(o,s);a((n=n.apply(t,e)).next())}),Ht=(t,e,...n)=>{let r=`[@launchdarkly plugins]: (${t}): `;console[e].apply(console,[r,...n]),HG(r,...n)},HG=(t,...e)=>_G(void 0,null,function*(){try{let{LDObserve:n}=yield Promise.resolve().then(()=>(Qy(),jy));n.recordLog(`${t}${e}`,"warn")}catch(n){}}),bb=class{constructor(t,e){Ge(this,"debug"),Ge(this,"name"),this.debug=t,this.name=e}log(...t){if(this.debug){let e=`[${Date.now()}]`;this.name&&(e+=` - ${this.name}`),console.log.apply(console,[e,...t])}}warn(...t){let e=`[${Date.now()}]`;this.name&&(e+=` - ${this.name}`),console.warn.apply(console,[e,...t])}},Bn=class{constructor(){Ge(this,"_sdk"),Ge(this,"_isLoaded",!1),Ge(this,"_callBuffer",[]),Ge(this,"_capacity",1e5),Ge(this,"_droppedEvents",0),Ge(this,"_exceededCapacity",!1),Ge(this,"_logger",new bb)}h(e,n){if(this.xn)try{return this.Bn[e](...n)}catch(r){Ht(`Error executing buffered call to ${e}:`,"error",r)}else{this.Pr({method:e,args:n});return}}Pr(e){this.wn.length<this.Is?(this.wn.push(e),this.jn=!1):(this.jn||(this.jn=!0,Ht("Exceeded event queue capacity. Increase capacity to avoid dropping events.","warn")),this.Ts+=1)}load(e){this.Bn=e,this.xn=!0;for(let{method:n,args:r}of this.wn)try{this.Bn[n](...r)}catch(i){Ht(`Error executing buffered call to ${n}:`,"error",i)}this.wn=[]}},zG=Object.defineProperty,BG=Object.defineProperties,jG=Object.getOwnPropertyDescriptors,Ls=Object.getOwnPropertySymbols,vb=Object.prototype.hasOwnProperty,wb=Object.prototype.propertyIsEnumerable,$c=(t,e,n)=>e in t?zG(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,$=(t,e)=>{for(var n in e||(e={}))vb.call(e,n)&&$c(t,n,e[n]);if(Ls)for(var n of Ls(e))wb.call(e,n)&&$c(t,n,e[n]);return t},rr=(t,e)=>BG(t,jG(e)),ai=(t,e)=>{var n={};for(var r in t)vb.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Ls)for(var r of Ls(t))e.indexOf(r)<0&&wb.call(t,r)&&(n[r]=t[r]);return n},di=(t,e,n)=>$c(t,typeof e!="symbol"?e+"":e,n),ir=(t,e,n)=>new Promise((r,i)=>{var o=c=>{try{a(n.next(c))}catch(l){i(l)}},s=c=>{try{a(n.throw(c))}catch(l){i(l)}},a=c=>c.done?r(c.value):Promise.resolve(c.value).then(o,s);a((n=n.apply(t,e)).next())});tL=/\r\n|[\n\r]/g;tu=class t extends Error{constructor(e,...n){var r,i,o;let{nodes:s,source:a,positions:c,path:l,originalError:u,extensions:h}=nL(n);super(e),this.name="GraphQLError",this.path=l!=null?l:void 0,this.originalError=u!=null?u:void 0,this.nodes=qy(Array.isArray(s)?s:s?[s]:void 0);let p=qy((r=this.nodes)===null||r===void 0?void 0:r.map(m=>m.loc).filter(m=>m!=null));this.source=a!=null?a:p==null||(i=p[0])===null||i===void 0?void 0:i.source,this.positions=c!=null?c:p==null?void 0:p.map(m=>m.start),this.locations=c&&a?c.map(m=>qc(a,m)):p==null?void 0:p.map(m=>qc(m.source,m.start));let f=$G(u==null?void 0:u.extensions)?u==null?void 0:u.extensions:void 0;this.extensions=(o=h!=null?h:f)!==null&&o!==void 0?o:Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),u!=null&&u.stack?Object.defineProperty(this,"stack",{value:u.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,t):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let e=this.message;if(this.nodes)for(let n of this.nodes)n.loc&&(e+=`
22
+ You tried to parse Less with the standard CSS parser; try again with the postcss-less parser`)),i}return r.root}function si(t){return typeof t=="object"&&typeof t.then=="function"}function Z0(t){let e=!1,n=NM[t.type];return t.type==="decl"?e=t.prop.toLowerCase():t.type==="atrule"&&(e=t.name.toLowerCase()),e&&t.append?[n,n+"-"+e,pr,n+"Exit",n+"Exit-"+e]:e?[n,n+"-"+e,n+"Exit",n+"Exit-"+e]:t.append?[n,pr,n+"Exit"]:[n,n+"Exit"]}function ub(t){let e;return t.type==="document"?e=["Document",pr,"DocumentExit"]:t.type==="root"?e=["Root",pr,"RootExit"]:e=Z0(t),{eventIndex:0,events:e,iterator:0,node:t,visitorIndex:0,visitors:[]}}function Bu(t){return t[Ie]=!1,t.nodes&&t.nodes.forEach(e=>Bu(e)),t}function pt(...t){return t.length===1&&Array.isArray(t[0])&&(t=t[0]),new Uh(t)}function Ph(t){if(Is[t])return Is[t];let e=globalThis[t],n=e.prototype,r=t in hb?hb[t]:void 0,i=!!(r&&r.every(a=>{var c,l;return!!((l=(c=Object.getOwnPropertyDescriptor(n,a))==null?void 0:c.get)!=null&&l.toString().includes("[native code]"))})),o=t in pb?pb[t]:void 0,s=!!(o&&o.every(a=>{var c;return typeof n[a]=="function"&&((c=n[a])==null?void 0:c.toString().includes("[native code]"))}));if(i&&s&&!rF())return Is[t]=e.prototype,e.prototype;try{let a=document.createElement("iframe");document.body.appendChild(a);let c=a.contentWindow;if(!c)return e.prototype;let l=c[t].prototype;return document.body.removeChild(a),l?Is[t]=l:n}catch(a){return n}}function Qe(t,e,n){var r;let i=`${t}.${String(n)}`;if(qc[i])return qc[i].call(e);let o=Ph(t),s=(r=Object.getOwnPropertyDescriptor(o,n))==null?void 0:r.get;return s?(qc[i]=s,s.call(e)):e[n]}function W0(t,e,n){let r=`${t}.${String(n)}`;if(tu[r])return tu[r].bind(e);let i=Ph(t)[n];return typeof i!="function"?e[n]:(tu[r]=i,i.bind(e))}function iF(t){return Qe("Node",t,"childNodes")}function oF(t){return Qe("Node",t,"parentNode")}function sF(t){return Qe("Node",t,"parentElement")}function aF(t){return Qe("Node",t,"textContent")}function lF(t,e){return W0("Node",t,"contains")(e)}function cF(t){return W0("Node",t,"getRootNode")()}function uF(t){return!t||!("host"in t)?null:Qe("ShadowRoot",t,"host")}function hF(t){return t.styleSheets}function pF(t){return!t||!("shadowRoot"in t)?null:Qe("Element",t,"shadowRoot")}function dF(t,e){return Qe("Element",t,"querySelector")(e)}function fF(t,e){return Qe("Element",t,"querySelectorAll")(e)}function U0(){return Ph("MutationObserver").constructor}function kn(t,e,n){try{if(!(e in t))return()=>{};let r=t[e],i=n(r);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),t[e]=i,()=>{t[e]=r}}catch(r){return()=>{}}}function Ft(t,e,n=document){let r={capture:!0};return n.addEventListener(t,e,r),()=>n.removeEventListener(t,e,r)}function Ci(t,e,n={}){let r=null,i=0;return function(...o){let s=Date.now();!i&&n.leading===!1&&(i=s);let a=e-(s-i),c=this;a<=0||a>e?(r&&(clearTimeout(r),r=null),i=s,t.apply(c,o)):!r&&n.trailing!==!1&&(r=setTimeout(()=>{i=n.leading===!1?0:Date.now(),r=null,t.apply(c,o)},a))}}function Ia(t,e,n,r,i=window){let o=i.Object.getOwnPropertyDescriptor(t,e);return i.Object.defineProperty(t,e,r?n:{set(s){setTimeout(()=>{n.set.call(this,s)},0),o&&o.set&&o.set.call(this,s)}}),()=>Ia(t,e,o||{},!0)}function P0(t){var e,n,r,i;let o=t.document;return{left:o.scrollingElement?o.scrollingElement.scrollLeft:t.pageXOffset!==void 0?t.pageXOffset:o.documentElement.scrollLeft||(o==null?void 0:o.body)&&((e=q.parentElement(o.body))==null?void 0:e.scrollLeft)||((n=o==null?void 0:o.body)==null?void 0:n.scrollLeft)||0,top:o.scrollingElement?o.scrollingElement.scrollTop:t.pageYOffset!==void 0?t.pageYOffset:(o==null?void 0:o.documentElement.scrollTop)||(o==null?void 0:o.body)&&((r=q.parentElement(o.body))==null?void 0:r.scrollTop)||((i=o==null?void 0:o.body)==null?void 0:i.scrollTop)||0}}function M0(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function F0(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function A0(t){return t?t.nodeType===t.ELEMENT_NODE?t:q.parentElement(t):null}function Nt(t,e,n,r){if(!t)return!1;let i=A0(t);if(!i)return!1;try{if(typeof e=="string"){if(i.classList.contains(e)||r&&i.closest("."+e)!==null)return!0}else if(Bs(i,e,r))return!0}catch(o){}return!!(n&&(i.matches(n)||r&&i.closest(n)!==null))}function yF(t,e){return e.getId(t)!==-1}function eu(t,e,n){return t.tagName==="TITLE"&&n.headTitleMutations?!0:e.getId(t)===gi}function J0(t,e){if(hi(t))return!1;let n=e.getId(t);if(!e.has(n))return!0;let r=q.parentNode(t);return r&&r.nodeType===t.DOCUMENT_NODE?!1:r?J0(r,e):!0}function qu(t){return!!t.changedTouches}function gF(t=window){"NodeList"in t&&!t.NodeList.prototype.forEach&&(t.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in t&&!t.DOMTokenList.prototype.forEach&&(t.DOMTokenList.prototype.forEach=Array.prototype.forEach)}function D0(t,e){return!!(t.nodeName==="IFRAME"&&e.getMeta(t))}function Y0(t,e){return!!(t.nodeName==="LINK"&&t.nodeType===t.ELEMENT_NODE&&t.getAttribute&&t.getAttribute("rel")==="stylesheet"&&e.getMeta(t))}function th(t){return t?t instanceof $u&&"shadowRoot"in t?!!t.shadowRoot:!!q.shadowRoot(t):!1}function K0(t){var e;let n=null;return"getRootNode"in t&&((e=q.getRootNode(t))==null?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&q.host(q.getRootNode(t))&&(n=q.host(q.getRootNode(t))),n}function bF(t){let e=t,n;for(;n=K0(e);)e=n;return e}function vF(t){let e=t.ownerDocument;if(!e)return!1;let n=bF(t);return q.contains(e,n)}function _0(t){let e=t.ownerDocument;return e?q.contains(e,t)||vF(t):!1}function fb(t){return"__ln"in t}function ih(t,e){t.delete(e),q.childNodes(e).forEach(n=>ih(t,n))}function wF(t,e){let n=[t];for(;n.length;){let r=n.pop();e.has(r)||(e.add(r),q.childNodes(r).forEach(i=>n.push(i)))}}function yb(t,e,n){return t.size===0?!1:SF(t,e)}function SF(t,e,n){let r=q.parentNode(e);return r?t.has(r):!1}function gb(t,e){return t.size===0?!1:z0(t,e)}function z0(t,e){let n=q.parentNode(e);return n?t.has(n)?!0:z0(t,n):!1}function IF(t){di=t}function TF(){di=void 0}function Gi(t){try{if("composedPath"in t){let e=t.composedPath();if(e.length)return e[0]}else if("path"in t&&t.path.length)return t.path[0]}catch(e){}return t&&t.target}function B0(t,e){let n=new rh;En.push(n),n.init(t);let r=new(U0())(nt(n.processMutations.bind(n)));return r.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),r}function EF({mousemoveCb:t,sampling:e,doc:n,mirror:r}){if(e.mousemove===!1)return()=>{};let i=typeof e.mousemove=="number"?e.mousemove:50,o=typeof e.mousemoveCallback=="number"?e.mousemoveCallback:500,s=[],a,c=Ci(nt(h=>{let p=Date.now()-a;t(s.map(f=>(f.timeOffset-=p,f)),h),s=[],a=null}),o),l=nt(Ci(nt(h=>{let p=Gi(h),{clientX:f,clientY:m}=qu(h)?h.changedTouches[0]:h;a||(a=ia()),s.push({x:f,y:m,id:r.getId(p),timeOffset:ia()-a}),c(typeof DragEvent<"u"&&h instanceof DragEvent?et.Drag:h instanceof MouseEvent?et.MouseMove:et.TouchMove)}),i,{trailing:!1})),u=[Ft("mousemove",l,n),Ft("touchmove",l,n),Ft("drag",l,n)];return nt(()=>{u.forEach(h=>h())})}function RF({mouseInteractionCb:t,doc:e,mirror:n,blockClass:r,blockSelector:i,sampling:o}){if(o.mouseInteraction===!1)return()=>{};let s=o.mouseInteraction===!0||o.mouseInteraction===void 0?{}:o.mouseInteraction,a=[],c=null,l=u=>h=>{let p=Gi(h);if(Nt(p,r,i,!0)||mF(p))return;let f=null,m=u;if("pointerType"in h){switch(h.pointerType){case"mouse":f=He.Mouse;break;case"touch":f=He.Touch;break;case"pen":f=He.Pen;break}f===He.Touch&&(Yt[u]===Yt.MouseDown?m="TouchStart":Yt[u]===Yt.MouseUp&&(m="TouchEnd"))}else qu(h)&&(f=He.Touch);f!==null?(c=f,(m.startsWith("Touch")&&f===He.Touch||m.startsWith("Mouse")&&f===He.Mouse)&&(f=null)):Yt[u]===Yt.Click&&(f=c,c=null);let d=qu(h)?h.changedTouches[0]:h;if(!d)return;let v=n.getId(p),{clientX:g,clientY:w}=d;nt(t)(z({type:Yt[m],id:v,x:g,y:w},f!==null&&{pointerType:f}))};return Object.keys(Yt).filter(u=>Number.isNaN(Number(u))&&!u.endsWith("_Departed")&&s[u]!==!1).forEach(u=>{let h=ar(u),p=l(u);if(window.PointerEvent)switch(Yt[u]){case Yt.MouseDown:case Yt.MouseUp:h=h.replace("mouse","pointer");break;case Yt.TouchStart:case Yt.TouchEnd:return}a.push(Ft(h,p,e))}),nt(()=>{a.forEach(u=>u())})}function j0({scrollCb:t,doc:e,mirror:n,blockClass:r,blockSelector:i,sampling:o}){let s=nt(Ci(nt(a=>{let c=Gi(a);if(!c||Nt(c,r,i,!0))return;let l=n.getId(c);if(c===e&&e.defaultView){let u=P0(e.defaultView);t({id:l,x:u.left,y:u.top})}else t({id:l,x:c.scrollLeft,y:c.scrollTop})}),o.scroll||100));return Ft("scroll",s,e)}function CF({viewportResizeCb:t},{win:e}){let n=-1,r=-1,i=nt(Ci(nt(()=>{let o=M0(),s=F0();(n!==o||r!==s)&&(t({width:Number(s),height:Number(o)}),n=o,r=s)}),200));return Ft("resize",i,e)}function kF({inputCb:t,doc:e,mirror:n,blockClass:r,blockSelector:i,ignoreClass:o,ignoreSelector:s,maskInputOptions:a,maskInputFn:c,sampling:l,userTriggeredOnInput:u}){function h(g){let w=Gi(g),R=g.isTrusted,E=w&&w.tagName;if(w&&E==="OPTION"&&(w=q.parentElement(w)),!w||!E||ZF.indexOf(E)<0||Nt(w,r,i,!0)||w.classList.contains(o)||s&&w.matches(s))return;let T=w.value,x=!1,N=_s(w)||"",U=w.getAttribute("data-hl-record");N==="radio"||N==="checkbox"?x=w.checked:hv({maskInputOptions:a,type:N,tagName:E,overwriteRecord:U})&&(T=Ks({element:w,maskInputOptions:a,tagName:E,type:N,value:T,overwriteRecord:U,maskInputFn:c})),p(w,u?{text:T,isChecked:x,userTriggered:R}:{text:T,isChecked:x});let C=w.name;N==="radio"&&C&&x&&e.querySelectorAll(`input[type="radio"][name="${C}"]`).forEach(O=>{if(O!==w){let P=O.value;p(O,u?{text:P,isChecked:!x,userTriggered:!1}:{text:P,isChecked:!x})}})}function p(g,w){let R=bb.get(g);if(!R||R.text!==w.text||R.isChecked!==w.isChecked){bb.set(g,w);let E=n.getId(g);nt(t)(_t(z({},w),{id:E}))}}let f=(l.input==="last"?["change"]:["input","change"]).map(g=>Ft(g,nt(h),e)),m=e.defaultView;if(!m)return()=>{f.forEach(g=>g())};let d=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 d&&d.set&&f.push(...v.map(g=>Ia(g[0],g[1],{set(){nt(h)({target:this,isTrusted:!1})}},!1,m))),nt(()=>{f.forEach(g=>g())})}function oa(t){let e=[];function n(r,i){if(Ts("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||Ts("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||Ts("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||Ts("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){let o=Array.from(r.parentRule.cssRules).indexOf(r);i.unshift(o)}else if(r.parentStyleSheet){let o=Array.from(r.parentStyleSheet.cssRules).indexOf(r);i.unshift(o)}return i}return n(t,e)}function ze(t,e,n){let r,i;return t?(t.ownerNode?r=e.getId(t.ownerNode):i=n.getId(t),{styleId:i,id:r}):{}}function VF({styleSheetRuleCb:t,mirror:e,stylesheetManager:n},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};let i=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:nt((u,h,p)=>{let[f,m]=p,{id:d,styleId:v}=ze(h,e,n.styleMirror);return(d&&d!==-1||v&&v!==-1)&&t({id:d,styleId:v,adds:[{rule:f,index:m}]}),u.apply(h,p)})}),r.CSSStyleSheet.prototype.addRule=function(u,h,p=this.cssRules.length){let f=`${u} { ${h} }`;return r.CSSStyleSheet.prototype.insertRule.apply(this,[f,p])};let o=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(o,{apply:nt((u,h,p)=>{let[f]=p,{id:m,styleId:d}=ze(h,e,n.styleMirror);return(m&&m!==-1||d&&d!==-1)&&t({id:m,styleId:d,removes:[{index:f}]}),u.apply(h,p)})}),r.CSSStyleSheet.prototype.removeRule=function(u){return r.CSSStyleSheet.prototype.deleteRule.apply(this,[u])};let s;r.CSSStyleSheet.prototype.replace&&(s=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(s,{apply:nt((u,h,p)=>{let[f]=p,{id:m,styleId:d}=ze(h,e,n.styleMirror);return(m&&m!==-1||d&&d!==-1)&&t({id:m,styleId:d,replace:f}),u.apply(h,p)})}));let a;r.CSSStyleSheet.prototype.replaceSync&&(a=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:nt((u,h,p)=>{let[f]=p,{id:m,styleId:d}=ze(h,e,n.styleMirror);return(m&&m!==-1||d&&d!==-1)&&t({id:m,styleId:d,replaceSync:f}),u.apply(h,p)})}));let c={};Es("CSSGroupingRule")?c.CSSGroupingRule=r.CSSGroupingRule:(Es("CSSMediaRule")&&(c.CSSMediaRule=r.CSSMediaRule),Es("CSSConditionRule")&&(c.CSSConditionRule=r.CSSConditionRule),Es("CSSSupportsRule")&&(c.CSSSupportsRule=r.CSSSupportsRule));let l={};return Object.entries(c).forEach(([u,h])=>{l[u]={insertRule:h.prototype.insertRule,deleteRule:h.prototype.deleteRule},h.prototype.insertRule=new Proxy(l[u].insertRule,{apply:nt((p,f,m)=>{let[d,v]=m,{id:g,styleId:w}=ze(f.parentStyleSheet,e,n.styleMirror);return(g&&g!==-1||w&&w!==-1)&&t({id:g,styleId:w,adds:[{rule:d,index:[...oa(f),v||0]}]}),p.apply(f,m)})}),h.prototype.deleteRule=new Proxy(l[u].deleteRule,{apply:nt((p,f,m)=>{let[d]=m,{id:v,styleId:g}=ze(f.parentStyleSheet,e,n.styleMirror);return(v&&v!==-1||g&&g!==-1)&&t({id:v,styleId:g,removes:[{index:[...oa(f),d]}]}),p.apply(f,m)})})}),nt(()=>{r.CSSStyleSheet.prototype.insertRule=i,r.CSSStyleSheet.prototype.deleteRule=o,s&&(r.CSSStyleSheet.prototype.replace=s),a&&(r.CSSStyleSheet.prototype.replaceSync=a),Object.entries(c).forEach(([u,h])=>{h.prototype.insertRule=l[u].insertRule,h.prototype.deleteRule=l[u].deleteRule})})}function Q0({mirror:t,stylesheetManager:e},n){var r,i,o;let s=null;n.nodeName==="#document"?s=t.getId(n):s=t.getId(q.host(n));let a=n.nodeName==="#document"?(r=n.defaultView)==null?void 0:r.Document:(o=(i=n.ownerDocument)==null?void 0:i.defaultView)==null?void 0:o.ShadowRoot,c=a!=null&&a.prototype?Object.getOwnPropertyDescriptor(a==null?void 0:a.prototype,"adoptedStyleSheets"):void 0;return s===null||s===-1||!a||!c?()=>{}:(Object.defineProperty(n,"adoptedStyleSheets",{configurable:c.configurable,enumerable:c.enumerable,get(){var l;return(l=c.get)==null?void 0:l.call(this)},set(l){var u;let h=(u=c.set)==null?void 0:u.call(this,l);if(s!==null&&s!==-1)try{e.adoptStyleSheets(l,s)}catch(p){}return h}}),nt(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:c.configurable,enumerable:c.enumerable,get:c.get,set:c.set})}))}function xF({styleDeclarationCb:t,mirror:e,ignoreCSSAttributes:n,stylesheetManager:r},{win:i}){let o=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(o,{apply:nt((a,c,l)=>{var u;let[h,p,f]=l;if(n.has(h))return o.apply(c,[h,p,f]);let{id:m,styleId:d}=ze((u=c.parentRule)==null?void 0:u.parentStyleSheet,e,r.styleMirror);return(m&&m!==-1||d&&d!==-1)&&t({id:m,styleId:d,set:{property:h,value:p,priority:f},index:oa(c.parentRule)}),a.apply(c,l)})});let s=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(s,{apply:nt((a,c,l)=>{var u;let[h]=l;if(n.has(h))return s.apply(c,[h]);let{id:p,styleId:f}=ze((u=c.parentRule)==null?void 0:u.parentStyleSheet,e,r.styleMirror);return(p&&p!==-1||f&&f!==-1)&&t({id:p,styleId:f,remove:{property:h},index:oa(c.parentRule)}),a.apply(c,l)})}),nt(()=>{i.CSSStyleDeclaration.prototype.setProperty=o,i.CSSStyleDeclaration.prototype.removeProperty=s})}function OF({mediaInteractionCb:t,blockClass:e,blockSelector:n,mirror:r,sampling:i,doc:o}){let s=nt(c=>Ci(nt(l=>{let u=Gi(l);if(!u||Nt(u,e,n,!0))return;let{currentTime:h,volume:p,muted:f,playbackRate:m,loop:d}=u;t({type:c,id:r.getId(u),currentTime:h,volume:p,muted:f,playbackRate:m,loop:d})}),i.media||500)),a=[Ft("play",s(tr.Play),o),Ft("pause",s(tr.Pause),o),Ft("seeked",s(tr.Seeked),o),Ft("volumechange",s(tr.VolumeChange),o),Ft("ratechange",s(tr.RateChange),o)];return nt(()=>{a.forEach(c=>c())})}function NF({fontCb:t,doc:e}){let n=e.defaultView;if(!n)return()=>{};let r=[],i=new WeakMap,o=n.FontFace;n.FontFace=function(a,c,l){let u=new o(a,c,l);return i.set(u,{family:a,buffer:typeof c!="string",descriptors:l,fontSource:typeof c=="string"?c:JSON.stringify(Array.from(new Uint8Array(c)))}),u};let s=kn(e.fonts,"add",function(a){return function(c){return setTimeout(nt(()=>{let l=i.get(c);l&&(t(l),i.delete(c))}),0),a.apply(this,[c])}});return r.push(()=>{n.FontFace=o}),r.push(s),nt(()=>{r.forEach(a=>a())})}function GF(t){let{doc:e,mirror:n,blockClass:r,blockSelector:i,selectionCb:o}=t,s=!0,a=nt(()=>{let c=e.getSelection();if(!c||s&&c!=null&&c.isCollapsed)return;s=c.isCollapsed||!1;let l=[],u=c.rangeCount||0;for(let h=0;h<u;h++){let p=c.getRangeAt(h),{startContainer:f,startOffset:m,endContainer:d,endOffset:v}=p;Nt(f,r,i,!0)||Nt(d,r,i,!0)||l.push({start:n.getId(f),startOffset:m,end:n.getId(d),endOffset:v})}o({ranges:l})});return a(),Ft("selectionchange",a)}function LF({doc:t,customElementCb:e}){let n=t.defaultView;return!n||!n.customElements?()=>{}:kn(n.customElements,"define",function(r){return function(i,o,s){try{e({define:{name:i}})}catch(a){console.warn(`Custom element callback failed for ${i}`)}return r.apply(this,[i,o,s])}})}function XF(t,e){let{mutationCb:n,mousemoveCb:r,mouseInteractionCb:i,scrollCb:o,viewportResizeCb:s,inputCb:a,mediaInteractionCb:c,styleSheetRuleCb:l,styleDeclarationCb:u,canvasMutationCb:h,fontCb:p,selectionCb:f,customElementCb:m}=t;t.mutationCb=(...d)=>{e.mutation&&e.mutation(...d),n(...d)},t.mousemoveCb=(...d)=>{e.mousemove&&e.mousemove(...d),r(...d)},t.mouseInteractionCb=(...d)=>{e.mouseInteraction&&e.mouseInteraction(...d),i(...d)},t.scrollCb=(...d)=>{e.scroll&&e.scroll(...d),o(...d)},t.viewportResizeCb=(...d)=>{e.viewportResize&&e.viewportResize(...d),s(...d)},t.inputCb=(...d)=>{e.input&&e.input(...d),a(...d)},t.mediaInteractionCb=(...d)=>{e.mediaInteaction&&e.mediaInteaction(...d),c(...d)},t.styleSheetRuleCb=(...d)=>{e.styleSheetRule&&e.styleSheetRule(...d),l(...d)},t.styleDeclarationCb=(...d)=>{e.styleDeclaration&&e.styleDeclaration(...d),u(...d)},t.canvasMutationCb=(...d)=>{e.canvasMutation&&e.canvasMutation(...d),h(...d)},t.fontCb=(...d)=>{e.font&&e.font(...d),p(...d)},t.selectionCb=(...d)=>{e.selection&&e.selection(...d),f(...d)},t.customElementCb=(...d)=>{e.customElement&&e.customElement(...d),m(...d)}}function WF(t,e={}){let n=t.doc.defaultView;if(!n)return()=>{};XF(t,e);let r;t.recordDOM&&(r=B0(t,t.doc));let i=EF(t),o=RF(t),s=j0(t),a=CF(t,{win:n}),c=kF(t),l=OF(t),u=()=>{},h=()=>{},p=()=>{},f=()=>{};t.recordDOM&&(u=VF(t,{win:n}),h=Q0(t,t.doc),p=xF(t,{win:n}),t.collectFonts&&(f=NF(t)));let m=GF(t),d=LF(t),v=[];for(let g of t.plugins)v.push(g.observer(g.callback,n,g.options));return nt(()=>{En.forEach(g=>g.reset()),r==null||r.disconnect(),i(),o(),s(),a(),c(),l(),u(),h(),p(),f(),m(),d(),v.forEach(g=>g())})}function Ts(t){return typeof window[t]<"u"}function Es(t){return!!(typeof window[t]<"u"&&window[t].prototype&&"insertRule"in window[t].prototype&&"deleteRule"in window[t].prototype)}function MF(t,e){let n=vb.get(t);return n||(n=new Map,vb.set(t,n)),n.has(e)||n.set(e,[]),n.get(e)}function Xs(t,e,n){if(t instanceof Array)return t.map(r=>Xs(r,e,n));if(t===null)return t;if(t instanceof Float32Array||t instanceof Float64Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Uint8Array||t instanceof Uint16Array||t instanceof Int16Array||t instanceof Int8Array||t instanceof Uint8ClampedArray)return{rr_type:t.constructor.name,args:[Object.values(t)]};if(t instanceof ArrayBuffer){let r=t.constructor.name,i=PF(t);return{rr_type:r,base64:i}}else{if(t instanceof DataView)return{rr_type:t.constructor.name,args:[Xs(t.buffer,e,n),t.byteOffset,t.byteLength]};if(t instanceof HTMLImageElement){let r=t.constructor.name,{src:i}=t;return{rr_type:r,src:i}}else if(t instanceof HTMLCanvasElement){let r="HTMLImageElement",i=t.toDataURL();return{rr_type:r,src:i}}else{if(t instanceof ImageData)return{rr_type:t.constructor.name,args:[Xs(t.data,e,n),t.width,t.height]};if(tw(t,e)||typeof t=="object"){let r=t.constructor.name,i=$0(t,e,n);return{rr_type:r,index:i}}}}return t}function FF(t,e,n,r){let i=[],o=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);for(let s of o)try{if(typeof e.CanvasRenderingContext2D.prototype[s]!="function")continue;let a=kn(e.CanvasRenderingContext2D.prototype,s,function(c){return function(...l){return Nt(this.canvas,n,r,!0)||setTimeout(()=>{let u=q0(l,e,this);t(this.canvas,{type:fr["2D"],property:s,args:u})},0),c.apply(this,l)}});i.push(a)}catch(a){let c=Ia(e.CanvasRenderingContext2D.prototype,s,{set(l){t(this.canvas,{type:fr["2D"],property:s,args:[l],setter:!0})}});i.push(c)}return()=>{i.forEach(s=>s())}}function AF(t){return t==="experimental-webgl"?"webgl":t}function wb(t,e,n,r){let i=[];try{let o=kn(t.HTMLCanvasElement.prototype,"getContext",function(s){return function(a,...c){if(!Nt(this,e,n,!0)){let l=AF(a);if("__context"in this||(this.__context=l),r&&["webgl","webgl2"].includes(l))if(c[0]&&typeof c[0]=="object"){let u=c[0];u.preserveDrawingBuffer||(u.preserveDrawingBuffer=!0)}else c.splice(0,1,{preserveDrawingBuffer:!0})}return s.apply(this,[a,...c])}});i.push(o)}catch(o){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach(o=>o())}}function Sb(t,e,n,r,i,o){let s=[],a=Object.getOwnPropertyNames(t);for(let c of a)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(c))try{if(typeof t[c]!="function")continue;let l=kn(t,c,function(u){return function(...h){let p=u.apply(this,h);if($0(p,o,this),"tagName"in this.canvas&&!Nt(this.canvas,r,i,!0)){let f=q0(h,o,this),m={type:e,property:c,args:f};n(this.canvas,m)}return p}});s.push(l)}catch(l){let u=Ia(t,c,{set(h){n(this.canvas,{type:e,property:c,args:[h],setter:!0})}});s.push(u)}return s}function JF(t,e,n,r){let i=[];return i.push(...Sb(e.WebGLRenderingContext.prototype,fr.WebGL,t,n,r,e)),typeof e.WebGL2RenderingContext<"u"&&i.push(...Sb(e.WebGL2RenderingContext.prototype,fr.WebGL2,t,n,r,e)),()=>{i.forEach(o=>o())}}function YF(t){let e;try{if(e=Ib&&(self.URL||self.webkitURL).createObjectURL(Ib),!e)throw"";let n=new Worker(e,{name:t==null?void 0:t.name});return n.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(e)}),n}catch(n){return new Worker("data:text/javascript;base64,"+ew,{name:t==null?void 0:t.name})}finally{e&&(self.URL||self.webkitURL).revokeObjectURL(e)}}function Xe(t={}){var e,n,r,i,o,s,a,c;let{emit:l,checkoutEveryNms:u,checkoutEveryNth:h,blockClass:p="highlight-block",blockSelector:f=null,ignoreClass:m="highlight-ignore",ignoreSelector:d=null,maskTextClass:v="highlight-mask",maskTextSelector:g=null,inlineStylesheet:w=!0,maskAllInputs:R,maskInputOptions:E,slimDOMOptions:T,maskInputFn:x,maskTextFn:N=yh,hooks:U,packFn:C,sampling:O={},mousemoveWait:P,recordDOM:st=!0,recordCanvas:lt=!1,recordCrossOriginIframes:y=!1,recordAfter:b=t.recordAfter==="DOMContentLoaded"?t.recordAfter:"load",userTriggeredOnInput:Z=!1,collectFonts:D=!1,inlineImages:M=!1,inlineVideos:G=!1,plugins:it,keepIframeSrcFn:ct=()=>!1,privacySetting:Gt="default",ignoreCSSAttributes:Pe=new Set([]),errorHandler:iw,logger:ow}=t,Li=z(z({},t.dataURLOptions),(n=(e=t.sampling)==null?void 0:e.canvas)==null?void 0:n.dataURLOptions);IF(iw);let Xi=y?window.parent===window:!0,yr=!1;if(!Xi)try{window.parent.document&&(yr=!1)}catch(at){yr=!0}if(Xi&&!l)throw new Error("emit function is required");if(!Xi&&!yr)return()=>{};P!==void 0&&O.mousemove===void 0&&(O.mousemove=P),ue.reset();let Ta=R===!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}:E!==void 0?E:{password:!0},Ea=T===!0||T==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:T==="all",headMetaDescKeywords:T==="all",headTitleMutations:T==="all"}:T||{};gF();let Mh,Ra=0,Fh=at=>{for(let se of it||[])se.eventProcessor&&(at=se.eventProcessor(at));return C&&!yr&&(at=C(at)),at};vt=(at,se)=>{var gt;let bt=at;if(bt.timestamp=ia(),(gt=En[0])!=null&&gt.isFrozen()&&bt.type!==rt.FullSnapshot&&!(bt.type===rt.IncrementalSnapshot&&bt.data.source===et.Mutation)&&En.forEach(de=>de.unfreeze()),Xi)l==null||l(Fh(bt),se);else if(yr){let de={type:"rrweb",event:Fh(bt),origin:window.location.origin,isCheckout:se};window.parent.postMessage(de,"*")}if(bt.type===rt.FullSnapshot)Mh=bt,Ra=0;else if(bt.type===rt.IncrementalSnapshot){if(bt.data.source===et.Mutation&&bt.data.isAttachIframe)return;Ra++;let de=h&&Ra>=h,dt=u&&bt.timestamp-Mh.timestamp>u;(de||dt)&&Ws(!0)}};let Wi=at=>{vt({type:rt.IncrementalSnapshot,data:z({source:et.Mutation},at)})},Ah=at=>vt({type:rt.IncrementalSnapshot,data:z({source:et.Scroll},at)}),Jh=at=>vt({type:rt.IncrementalSnapshot,data:z({source:et.CanvasMutation},at)}),sw=at=>vt({type:rt.IncrementalSnapshot,data:z({source:et.AdoptedStyleSheet},at)}),$e=new lh({mutationCb:Wi,adoptedStyleSheetCb:sw}),qe=new oh({mirror:ue,mutationCb:Wi,stylesheetManager:$e,recordCrossOriginIframes:y,wrappedEmit:vt});for(let at of it||[])at.getMirror&&at.getMirror({nodeMirror:ue,crossOriginIframeMirror:qe.crossOriginIframeMirror,crossOriginIframeStyleMirror:qe.crossOriginIframeStyleMirror});let Ca=new ch;fi=new ah({recordCanvas:lt,recordLocalVideos:M,recordRemoteVideos:G,mutationCb:Jh,win:window,blockClass:p,blockSelector:f,mirror:ue,sampling:(r=O==null?void 0:O.canvas)==null?void 0:r.fps,samplingManual:(i=O==null?void 0:O.canvas)==null?void 0:i.fpsManual,clearWebGLBuffer:(o=O==null?void 0:O.canvas)==null?void 0:o.clearWebGLBuffer,initialSnapshotDelay:(s=O==null?void 0:O.canvas)==null?void 0:s.initialSnapshotDelay,dataURLOptions:Li,resizeFactor:(a=O==null?void 0:O.canvas)==null?void 0:a.resizeFactor,maxSnapshotDimension:(c=O==null?void 0:O.canvas)==null?void 0:c.maxSnapshotDimension,logger:ow});let Ui=new sh({mutationCb:Wi,scrollCb:Ah,bypassOptions:{blockClass:p,blockSelector:f,maskTextClass:v,maskTextSelector:g,inlineStylesheet:w,maskInputOptions:Ta,dataURLOptions:Li,maskTextFn:N,maskInputFn:x,recordCanvas:lt,inlineImages:M,inlineVideos:G,privacySetting:Gt,sampling:O,slimDOMOptions:Ea,iframeManager:qe,stylesheetManager:$e,canvasManager:fi,keepIframeSrcFn:ct,processedNodeManager:Ca},mirror:ue});Ws=(at=!1)=>{if(!st)return;vt({type:rt.Meta,data:{href:window.location.href,width:F0(),height:M0()}},at),$e.reset(),Ui.init(),En.forEach(gt=>gt.lock());let se=E2(document,{mirror:ue,blockClass:p,blockSelector:f,maskTextClass:v,maskTextSelector:g,inlineStylesheet:w,maskAllInputs:Ta,maskTextFn:N,maskInputFn:x,slimDOM:Ea,dataURLOptions:Li,recordCanvas:lt,inlineImages:M,inlineVideos:G,privacySetting:Gt,onSerialize:gt=>{D0(gt,ue)&&qe.addIframe(gt),Y0(gt,ue)&&$e.trackLinkElement(gt),th(gt)&&Ui.addShadowRoot(q.shadowRoot(gt),document)},onIframeLoad:(gt,bt)=>{qe.attachIframe(gt,bt),Ui.observeAttachShadow(gt)},onStylesheetLoad:(gt,bt)=>{$e.attachLinkElement(gt,bt)},keepIframeSrcFn:ct});if(!se)return console.warn("Failed to snapshot the document");vt({type:rt.FullSnapshot,data:{node:se,initialOffset:P0(window)}},at),En.forEach(gt=>gt.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&$e.adoptStyleSheets(document.adoptedStyleSheets,ue.getId(document))};try{let at=[],se=bt=>{var de;return nt(WF)({mutationCb:Wi,mousemoveCb:(dt,Za)=>vt({type:rt.IncrementalSnapshot,data:{source:Za,positions:dt}}),mouseInteractionCb:dt=>vt({type:rt.IncrementalSnapshot,data:z({source:et.MouseInteraction},dt)}),scrollCb:Ah,viewportResizeCb:dt=>vt({type:rt.IncrementalSnapshot,data:z({source:et.ViewportResize},dt)}),inputCb:dt=>vt({type:rt.IncrementalSnapshot,data:z({source:et.Input},dt)}),mediaInteractionCb:dt=>vt({type:rt.IncrementalSnapshot,data:z({source:et.MediaInteraction},dt)}),styleSheetRuleCb:dt=>vt({type:rt.IncrementalSnapshot,data:z({source:et.StyleSheetRule},dt)}),styleDeclarationCb:dt=>vt({type:rt.IncrementalSnapshot,data:z({source:et.StyleDeclaration},dt)}),canvasMutationCb:Jh,fontCb:dt=>vt({type:rt.IncrementalSnapshot,data:z({source:et.Font},dt)}),selectionCb:dt=>{vt({type:rt.IncrementalSnapshot,data:z({source:et.Selection},dt)})},customElementCb:dt=>{vt({type:rt.IncrementalSnapshot,data:z({source:et.CustomElement},dt)})},blockClass:p,ignoreClass:m,ignoreSelector:d,maskTextClass:v,maskTextSelector:g,maskInputOptions:Ta,inlineStylesheet:w,sampling:O,recordDOM:st,recordCanvas:lt,inlineImages:M,inlineVideos:G,userTriggeredOnInput:Z,collectFonts:D,doc:bt,maskInputFn:x,maskTextFn:N,keepIframeSrcFn:ct,blockSelector:f,slimDOMOptions:Ea,dataURLOptions:Li,mirror:ue,iframeManager:qe,stylesheetManager:$e,shadowDomManager:Ui,processedNodeManager:Ca,canvasManager:fi,ignoreCSSAttributes:Pe,privacySetting:Gt,plugins:((de=it==null?void 0:it.filter(dt=>dt.observer))==null?void 0:de.map(dt=>({observer:dt.observer,options:dt.options,callback:Za=>vt({type:rt.Plugin,data:{plugin:dt.name,payload:Za}})})))||[]},U)};qe.addLoadListener(bt=>{try{at.push(se(bt.contentDocument))}catch(de){console.warn(de)}});let gt=()=>{Ws(),at.push(se(document)),aa=!0};return document.readyState==="interactive"||document.readyState==="complete"?gt():(at.push(Ft("DOMContentLoaded",()=>{vt({type:rt.DomContentLoaded,data:{}}),b==="DOMContentLoaded"&&gt()})),at.push(Ft("load",()=>{vt({type:rt.Load,data:{}}),b==="load"&&gt()},window))),()=>{at.forEach(bt=>bt()),Ca.destroy(),aa=!1,TF()}}catch(at){console.warn(at)}}function qF(t){typeof t!="string"&&(t=""),t=t.replace(/\s/g,"");let e=t.split(","),n=e.lastIndexOf("");for(;n>=0;)e[n-1]+=",",e.splice(n,1),n=e.lastIndexOf("");return e}function nA(t,e){let n=e.slice(0,e.length-1);for(let r=0;r<n.length;r++)n[r]=t[n[r].toLowerCase()];return n}function rA(t,e,n){t.addEventListener?t.addEventListener(e,n,!1):t.attachEvent&&t.attachEvent(`on${e}`,()=>{n(window.event)})}function iA(t,e,n){let r;if(e.scope===n||e.scope==="all"){r=e.mods.length>0;for(let i in Mt)Object.prototype.hasOwnProperty.call(Mt,i)&&(!Mt[i]&&e.mods.indexOf(+i)>-1||Mt[i]&&e.mods.indexOf(+i)===-1)&&(r=!1);(e.mods.length===0&&!Mt[16]&&!Mt[18]&&!Mt[17]&&!Mt[91]||r||e.shortcut==="*")&&e.method(t,e)===!1&&(t.preventDefault?t.preventDefault():t.returnValue=!1,t.stopPropagation&&t.stopPropagation(),t.cancelBubble&&(t.cancelBubble=!0))}}function oA(t){let e=Te["*"],n=t.keyCode||t.which||t.charCode;if((n===93||n===224)&&(n=91),Pt.indexOf(n)===-1&&n!==229&&Pt.push(n),["ctrlKey","altKey","shiftKey","metaKey"].forEach(r=>{let i=Cb[r];t[r]&&Pt.indexOf(i)===-1?Pt.push(i):!t[r]&&Pt.indexOf(i)>-1?Pt.splice(Pt.indexOf(i),1):r==="metaKey"&&t[r]&&Pt.length===3&&(t.ctrlKey||t.shiftKey||t.altKey||(Pt=Pt.slice(Pt.indexOf(i))))}),!(n in Mt&&(Mt[n]=!0,!e))){for(let r in Mt)Object.prototype.hasOwnProperty.call(Mt,r)&&(Mt[r]=t[Cb[r]]);if(t.getModifierState&&!(t.altKey&&!t.ctrlKey)&&t.getModifierState("AltGraph")&&(Pt.indexOf(17)===-1&&Pt.push(17),Pt.indexOf(18)===-1&&Pt.push(18),Mt[17]=!0,Mt[18]=!0),n in Te){for(let r=0;r<Te[n].length;r++)if((t.type==="keydown"&&Te[n][r].keydown||t.type==="keyup"&&Te[n][r].keyup)&&Te[n][r].key){let i=Te[n][r];iA(t,i,"all")}}}}function uA(t){let e;try{if(e=Vb&&(self.URL||self.webkitURL).createObjectURL(Vb),!e)throw"";let n=new Worker(e,{name:t==null?void 0:t.name});return n.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(e)}),n}catch(n){return new Worker("data:text/javascript;base64,"+rw,{name:t==null?void 0:t.name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,Ib,ah,lh,ch,vt,Ws,fi,aa,ue,Tb,Eb,KF,_F,HF,zF,BF,jF,Rb,nu,QF,$F,Pt,Te,ru,tA,Cb,Mt,nw,eA,Zb,kb,Zi,sA,aA,lA,rw,cA,Vb,Ge,hA,pA,dA,fA,uh,ki,Uc=zh(()=>{"use strict";hL=Object.defineProperty,pL=(t,e,n)=>e in t?hL(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Le=(t,e,n)=>pL(t,typeof e!="symbol"?e+"":e,n),dL=(t,e,n)=>new Promise((r,i)=>{var o=c=>{try{a(n.next(c))}catch(l){i(l)}},s=c=>{try{a(n.throw(c))}catch(l){i(l)}},a=c=>c.done?r(c.value):Promise.resolve(c.value).then(o,s);a((n=n.apply(t,e)).next())}),Bt=(t,e,...n)=>{let r=`[@launchdarkly plugins]: (${t}): `;console[e].apply(console,[r,...n]),fL(r,...n)},fL=(t,...e)=>dL(void 0,null,function*(){try{let{LDObserve:n}=yield Promise.resolve().then(()=>(cg(),lg));n.recordLog(`${t}${e}`,"warn")}catch(n){}}),xb=class{constructor(t,e){Le(this,"debug"),Le(this,"name"),this.debug=t,this.name=e}log(...t){if(this.debug){let e=`[${Date.now()}]`;this.name&&(e+=` - ${this.name}`),console.log.apply(console,[e,...t])}}warn(...t){let e=`[${Date.now()}]`;this.name&&(e+=` - ${this.name}`),console.warn.apply(console,[e,...t])}},jn=class{constructor(){Le(this,"_sdk"),Le(this,"_isLoaded",!1),Le(this,"_callBuffer",[]),Le(this,"_capacity",1e5),Le(this,"_droppedEvents",0),Le(this,"_exceededCapacity",!1),Le(this,"_logger",new xb)}p(e,n){if(this.yr)try{return this.Xr[e](...n)}catch(r){Bt(`Error executing buffered call to ${e}:`,"error",r)}else{this.Ei({method:e,args:n});return}}Ei(e){this.sr.length<this.Es?(this.sr.push(e),this.Wr=!1):(this.Wr||(this.Wr=!0,Bt("Exceeded event queue capacity. Increase capacity to avoid dropping events.","warn")),this.Rs+=1)}load(e){this.Xr=e,this.yr=!0;for(let{method:n,args:r}of this.sr)try{this.Xr[n](...r)}catch(i){Bt(`Error executing buffered call to ${n}:`,"error",i)}this.sr=[]}},mL=Object.defineProperty,yL=Object.defineProperties,gL=Object.getOwnPropertyDescriptors,Us=Object.getOwnPropertySymbols,Ob=Object.prototype.hasOwnProperty,Nb=Object.prototype.propertyIsEnumerable,iu=(t,e,n)=>e in t?mL(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,$=(t,e)=>{for(var n in e||(e={}))Ob.call(e,n)&&iu(t,n,e[n]);if(Us)for(var n of Us(e))Nb.call(e,n)&&iu(t,n,e[n]);return t},ir=(t,e)=>yL(t,gL(e)),ci=(t,e)=>{var n={};for(var r in t)Ob.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Us)for(var r of Us(t))e.indexOf(r)<0&&Nb.call(t,r)&&(n[r]=t[r]);return n},mi=(t,e,n)=>iu(t,typeof e!="symbol"?e+"":e,n),or=(t,e,n)=>new Promise((r,i)=>{var o=c=>{try{a(n.next(c))}catch(l){i(l)}},s=c=>{try{a(n.throw(c))}catch(l){i(l)}},a=c=>c.done?r(c.value):Promise.resolve(c.value).then(o,s);a((n=n.apply(t,e)).next())});SL=/\r\n|[\n\r]/g;su=class t extends Error{constructor(e,...n){var r,i,o;let{nodes:s,source:a,positions:c,path:l,originalError:u,extensions:h}=TL(n);super(e),this.name="GraphQLError",this.path=l!=null?l:void 0,this.originalError=u!=null?u:void 0,this.nodes=hg(Array.isArray(s)?s:s?[s]:void 0);let p=hg((r=this.nodes)===null||r===void 0?void 0:r.map(m=>m.loc).filter(m=>m!=null));this.source=a!=null?a:p==null||(i=p[0])===null||i===void 0?void 0:i.source,this.positions=c!=null?c:p==null?void 0:p.map(m=>m.start),this.locations=c&&a?c.map(m=>ou(a,m)):p==null?void 0:p.map(m=>ou(m.source,m.start));let f=vL(u==null?void 0:u.extensions)?u==null?void 0:u.extensions:void 0;this.extensions=(o=h!=null?h:f)!==null&&o!==void 0?o:Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),u!=null&&u.stack?Object.defineProperty(this,"stack",{value:u.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,t):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let e=this.message;if(this.nodes)for(let n of this.nodes)n.loc&&(e+=`
23
23
 
24
- `+eL(n.loc));else if(this.source&&this.locations)for(let n of this.locations)e+=`
24
+ `+IL(n.loc));else if(this.source&&this.locations)for(let n of this.locations)e+=`
25
25
 
26
- `+Sb(this.source,n);return e}toJSON(){let e={message:this.message};return this.locations!=null&&(e.locations=this.locations),this.path!=null&&(e.path=this.path),this.extensions!=null&&Object.keys(this.extensions).length>0&&(e.extensions=this.extensions),e}};rL=class{constructor(t,e,n){this.start=t.start,this.end=e.end,this.startToken=t,this.endToken=e,this.source=n}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}},Ib=class{constructor(t,e,n,r,i,o){this.kind=t,this.start=e,this.end=n,this.line=r,this.column=i,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}}},Tb={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"]},iL=new Set(Object.keys(Tb));(function(t){t.QUERY="query",t.MUTATION="mutation",t.SUBSCRIPTION="subscription"})(tr||(tr={}));(function(t){t.QUERY="QUERY",t.MUTATION="MUTATION",t.SUBSCRIPTION="SUBSCRIPTION",t.FIELD="FIELD",t.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",t.FRAGMENT_SPREAD="FRAGMENT_SPREAD",t.INLINE_FRAGMENT="INLINE_FRAGMENT",t.VARIABLE_DEFINITION="VARIABLE_DEFINITION",t.SCHEMA="SCHEMA",t.SCALAR="SCALAR",t.OBJECT="OBJECT",t.FIELD_DEFINITION="FIELD_DEFINITION",t.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",t.INTERFACE="INTERFACE",t.UNION="UNION",t.ENUM="ENUM",t.ENUM_VALUE="ENUM_VALUE",t.INPUT_OBJECT="INPUT_OBJECT",t.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION"})(eu||(eu={}));(function(t){t.NAME="Name",t.DOCUMENT="Document",t.OPERATION_DEFINITION="OperationDefinition",t.VARIABLE_DEFINITION="VariableDefinition",t.SELECTION_SET="SelectionSet",t.FIELD="Field",t.ARGUMENT="Argument",t.FRAGMENT_SPREAD="FragmentSpread",t.INLINE_FRAGMENT="InlineFragment",t.FRAGMENT_DEFINITION="FragmentDefinition",t.VARIABLE="Variable",t.INT="IntValue",t.FLOAT="FloatValue",t.STRING="StringValue",t.BOOLEAN="BooleanValue",t.NULL="NullValue",t.ENUM="EnumValue",t.LIST="ListValue",t.OBJECT="ObjectValue",t.OBJECT_FIELD="ObjectField",t.DIRECTIVE="Directive",t.NAMED_TYPE="NamedType",t.LIST_TYPE="ListType",t.NON_NULL_TYPE="NonNullType",t.SCHEMA_DEFINITION="SchemaDefinition",t.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",t.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",t.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",t.FIELD_DEFINITION="FieldDefinition",t.INPUT_VALUE_DEFINITION="InputValueDefinition",t.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",t.UNION_TYPE_DEFINITION="UnionTypeDefinition",t.ENUM_TYPE_DEFINITION="EnumTypeDefinition",t.ENUM_VALUE_DEFINITION="EnumValueDefinition",t.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",t.DIRECTIVE_DEFINITION="DirectiveDefinition",t.SCHEMA_EXTENSION="SchemaExtension",t.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",t.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",t.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",t.UNION_TYPE_EXTENSION="UnionTypeExtension",t.ENUM_TYPE_EXTENSION="EnumTypeExtension",t.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension"})(A||(A={}));(function(t){t.SOF="<SOF>",t.EOF="<EOF>",t.BANG="!",t.DOLLAR="$",t.AMP="&",t.PAREN_L="(",t.PAREN_R=")",t.SPREAD="...",t.COLON=":",t.EQUALS="=",t.AT="@",t.BRACKET_L="[",t.BRACKET_R="]",t.BRACE_L="{",t.PIPE="|",t.BRACE_R="}",t.NAME="Name",t.INT="Int",t.FLOAT="Float",t.STRING="String",t.BLOCK_STRING="BlockString",t.COMMENT="Comment"})(I||(I={}));cL=class{constructor(t){let e=new Ib(I.SOF,0,0,0,0);this.source=t,this.lastToken=e,this.token=e,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!==I.EOF)do if(t.next)t=t.next;else{let e=hL(this,t.end);t.next=e,e.prev=t,t=e}while(t.kind===I.COMMENT);return t}};wL=10,kb=2;CL=globalThis.process&&globalThis.process.env.NODE_ENV==="production"?function(t,e){return t instanceof e}:function(t,e){if(t instanceof e)return!0;if(typeof t=="object"&&t!==null){var n;let r=e.prototype[Symbol.toStringTag],i=Symbol.toStringTag in t?t[Symbol.toStringTag]:(n=t.constructor)===null||n===void 0?void 0:n.name;if(r===i){let o=oh(t);throw new Error(`Cannot use ${r} "${o}" from another module or realm.
26
+ `+Gb(this.source,n);return e}toJSON(){let e={message:this.message};return this.locations!=null&&(e.locations=this.locations),this.path!=null&&(e.path=this.path),this.extensions!=null&&Object.keys(this.extensions).length>0&&(e.extensions=this.extensions),e}};EL=class{constructor(t,e,n){this.start=t.start,this.end=e.end,this.startToken=t,this.endToken=e,this.source=n}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}},Lb=class{constructor(t,e,n,r,i,o){this.kind=t,this.start=e,this.end=n,this.line=r,this.column=i,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}}},Xb={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"]},RL=new Set(Object.keys(Xb));(function(t){t.QUERY="query",t.MUTATION="mutation",t.SUBSCRIPTION="subscription"})(er||(er={}));(function(t){t.QUERY="QUERY",t.MUTATION="MUTATION",t.SUBSCRIPTION="SUBSCRIPTION",t.FIELD="FIELD",t.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",t.FRAGMENT_SPREAD="FRAGMENT_SPREAD",t.INLINE_FRAGMENT="INLINE_FRAGMENT",t.VARIABLE_DEFINITION="VARIABLE_DEFINITION",t.SCHEMA="SCHEMA",t.SCALAR="SCALAR",t.OBJECT="OBJECT",t.FIELD_DEFINITION="FIELD_DEFINITION",t.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",t.INTERFACE="INTERFACE",t.UNION="UNION",t.ENUM="ENUM",t.ENUM_VALUE="ENUM_VALUE",t.INPUT_OBJECT="INPUT_OBJECT",t.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION"})(au||(au={}));(function(t){t.NAME="Name",t.DOCUMENT="Document",t.OPERATION_DEFINITION="OperationDefinition",t.VARIABLE_DEFINITION="VariableDefinition",t.SELECTION_SET="SelectionSet",t.FIELD="Field",t.ARGUMENT="Argument",t.FRAGMENT_SPREAD="FragmentSpread",t.INLINE_FRAGMENT="InlineFragment",t.FRAGMENT_DEFINITION="FragmentDefinition",t.VARIABLE="Variable",t.INT="IntValue",t.FLOAT="FloatValue",t.STRING="StringValue",t.BOOLEAN="BooleanValue",t.NULL="NullValue",t.ENUM="EnumValue",t.LIST="ListValue",t.OBJECT="ObjectValue",t.OBJECT_FIELD="ObjectField",t.DIRECTIVE="Directive",t.NAMED_TYPE="NamedType",t.LIST_TYPE="ListType",t.NON_NULL_TYPE="NonNullType",t.SCHEMA_DEFINITION="SchemaDefinition",t.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",t.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",t.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",t.FIELD_DEFINITION="FieldDefinition",t.INPUT_VALUE_DEFINITION="InputValueDefinition",t.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",t.UNION_TYPE_DEFINITION="UnionTypeDefinition",t.ENUM_TYPE_DEFINITION="EnumTypeDefinition",t.ENUM_VALUE_DEFINITION="EnumValueDefinition",t.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",t.DIRECTIVE_DEFINITION="DirectiveDefinition",t.SCHEMA_EXTENSION="SchemaExtension",t.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",t.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",t.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",t.UNION_TYPE_EXTENSION="UnionTypeExtension",t.ENUM_TYPE_EXTENSION="EnumTypeExtension",t.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension"})(A||(A={}));(function(t){t.SOF="<SOF>",t.EOF="<EOF>",t.BANG="!",t.DOLLAR="$",t.AMP="&",t.PAREN_L="(",t.PAREN_R=")",t.SPREAD="...",t.COLON=":",t.EQUALS="=",t.AT="@",t.BRACKET_L="[",t.BRACKET_R="]",t.BRACE_L="{",t.PIPE="|",t.BRACE_R="}",t.NAME="Name",t.INT="Int",t.FLOAT="Float",t.STRING="String",t.BLOCK_STRING="BlockString",t.COMMENT="Comment"})(I||(I={}));xL=class{constructor(t){let e=new Lb(I.SOF,0,0,0,0);this.source=t,this.lastToken=e,this.token=e,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!==I.EOF)do if(t.next)t=t.next;else{let e=NL(this,t.end);t.next=e,e.prev=t,t=e}while(t.kind===I.COMMENT);return t}};AL=10,Fb=2;HL=globalThis.process&&globalThis.process.env.NODE_ENV==="production"?function(t,e){return t instanceof e}:function(t,e){if(t instanceof e)return!0;if(typeof t=="object"&&t!==null){var n;let r=e.prototype[Symbol.toStringTag],i=Symbol.toStringTag in t?t[Symbol.toStringTag]:(n=t.constructor)===null||n===void 0?void 0:n.name;if(r===i){let o=hh(t);throw new Error(`Cannot use ${r} "${o}" from another module or realm.
27
27
 
28
28
  Ensure that there is only one instance of "graphql" in the node_modules
29
29
  directory. If different versions of "graphql" are the dependencies of other
@@ -34,34 +34,34 @@ https://yarnpkg.com/en/docs/selective-version-resolutions
34
34
  Duplicate "graphql" modules cannot be used at the same time since different
35
35
  versions may have different capabilities and behavior. The data from one
36
36
  version used in the function from another could produce confusing and
37
- spurious results.`)}}return!1},Vb=class{constructor(t,e="GraphQL request",n={line:1,column:1}){typeof t=="string"||Is(!1,`Body must be a string. Received: ${oh(t)}.`),this.body=t,this.name=e,this.locationOffset=n,this.locationOffset.line>0||Is(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||Is(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}};kL=class{constructor(t,e={}){let n=ZL(t)?t:new Vb(t);this.u=new cL(n),this.Sn=e,this.Qn=0}parseName(){let t=this.expectToken(I.NAME);return this.node(t,{kind:A.NAME,value:t.value})}parseDocument(){return this.node(this.u.token,{kind:A.DOCUMENT,definitions:this.many(I.SOF,this.parseDefinition,I.EOF)})}parseDefinition(){if(this.peek(I.BRACE_L))return this.parseOperationDefinition();let t=this.peekDescription(),e=t?this.u.lookahead():this.u.token;if(e.kind===I.NAME){switch(e.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 Zt(this.u.source,this.u.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(e.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(e)}parseOperationDefinition(){let t=this.u.token;if(this.peek(I.BRACE_L))return this.node(t,{kind:A.OPERATION_DEFINITION,operation:tr.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});let e=this.parseOperationType(),n;return this.peek(I.NAME)&&(n=this.parseName()),this.node(t,{kind:A.OPERATION_DEFINITION,operation:e,name:n,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){let t=this.expectToken(I.NAME);switch(t.value){case"query":return tr.QUERY;case"mutation":return tr.MUTATION;case"subscription":return tr.SUBSCRIPTION}throw this.unexpected(t)}parseVariableDefinitions(){return this.optionalMany(I.PAREN_L,this.parseVariableDefinition,I.PAREN_R)}parseVariableDefinition(){return this.node(this.u.token,{kind:A.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(I.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(I.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){let t=this.u.token;return this.expectToken(I.DOLLAR),this.node(t,{kind:A.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this.u.token,{kind:A.SELECTION_SET,selections:this.many(I.BRACE_L,this.parseSelection,I.BRACE_R)})}parseSelection(){return this.peek(I.SPREAD)?this.parseFragment():this.parseField()}parseField(){let t=this.u.token,e=this.parseName(),n,r;return this.expectOptionalToken(I.COLON)?(n=e,r=this.parseName()):r=e,this.node(t,{kind:A.FIELD,alias:n,name:r,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(I.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(t){let e=t?this.parseConstArgument:this.parseArgument;return this.optionalMany(I.PAREN_L,e,I.PAREN_R)}parseArgument(t=!1){let e=this.u.token,n=this.parseName();return this.expectToken(I.COLON),this.node(e,{kind:A.ARGUMENT,name:n,value:this.parseValueLiteral(t)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){let t=this.u.token;this.expectToken(I.SPREAD);let e=this.expectOptionalKeyword("on");return!e&&this.peek(I.NAME)?this.node(t,{kind:A.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(t,{kind:A.INLINE_FRAGMENT,typeCondition:e?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){let t=this.u.token;return this.expectKeyword("fragment"),this.Sn.allowLegacyFragmentVariables===!0?this.node(t,{kind:A.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:A.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if(this.u.token.value==="on")throw this.unexpected();return this.parseName()}parseValueLiteral(t){let e=this.u.token;switch(e.kind){case I.BRACKET_L:return this.parseList(t);case I.BRACE_L:return this.parseObject(t);case I.INT:return this.advanceLexer(),this.node(e,{kind:A.INT,value:e.value});case I.FLOAT:return this.advanceLexer(),this.node(e,{kind:A.FLOAT,value:e.value});case I.STRING:case I.BLOCK_STRING:return this.parseStringLiteral();case I.NAME:switch(this.advanceLexer(),e.value){case"true":return this.node(e,{kind:A.BOOLEAN,value:!0});case"false":return this.node(e,{kind:A.BOOLEAN,value:!1});case"null":return this.node(e,{kind:A.NULL});default:return this.node(e,{kind:A.ENUM,value:e.value})}case I.DOLLAR:if(t)if(this.expectToken(I.DOLLAR),this.u.token.kind===I.NAME){let n=this.u.token.value;throw Zt(this.u.source,e.start,`Unexpected variable "$${n}" in constant value.`)}else throw this.unexpected(e);return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){let t=this.u.token;return this.advanceLexer(),this.node(t,{kind:A.STRING,value:t.value,block:t.kind===I.BLOCK_STRING})}parseList(t){let e=()=>this.parseValueLiteral(t);return this.node(this.u.token,{kind:A.LIST,values:this.any(I.BRACKET_L,e,I.BRACKET_R)})}parseObject(t){let e=()=>this.parseObjectField(t);return this.node(this.u.token,{kind:A.OBJECT,fields:this.any(I.BRACE_L,e,I.BRACE_R)})}parseObjectField(t){let e=this.u.token,n=this.parseName();return this.expectToken(I.COLON),this.node(e,{kind:A.OBJECT_FIELD,name:n,value:this.parseValueLiteral(t)})}parseDirectives(t){let e=[];for(;this.peek(I.AT);)e.push(this.parseDirective(t));return e}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(t){let e=this.u.token;return this.expectToken(I.AT),this.node(e,{kind:A.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(t)})}parseTypeReference(){let t=this.u.token,e;if(this.expectOptionalToken(I.BRACKET_L)){let n=this.parseTypeReference();this.expectToken(I.BRACKET_R),e=this.node(t,{kind:A.LIST_TYPE,type:n})}else e=this.parseNamedType();return this.expectOptionalToken(I.BANG)?this.node(t,{kind:A.NON_NULL_TYPE,type:e}):e}parseNamedType(){return this.node(this.u.token,{kind:A.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(I.STRING)||this.peek(I.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){let t=this.u.token,e=this.parseDescription();this.expectKeyword("schema");let n=this.parseConstDirectives(),r=this.many(I.BRACE_L,this.parseOperationTypeDefinition,I.BRACE_R);return this.node(t,{kind:A.SCHEMA_DEFINITION,description:e,directives:n,operationTypes:r})}parseOperationTypeDefinition(){let t=this.u.token,e=this.parseOperationType();this.expectToken(I.COLON);let n=this.parseNamedType();return this.node(t,{kind:A.OPERATION_TYPE_DEFINITION,operation:e,type:n})}parseScalarTypeDefinition(){let t=this.u.token,e=this.parseDescription();this.expectKeyword("scalar");let n=this.parseName(),r=this.parseConstDirectives();return this.node(t,{kind:A.SCALAR_TYPE_DEFINITION,description:e,name:n,directives:r})}parseObjectTypeDefinition(){let t=this.u.token,e=this.parseDescription();this.expectKeyword("type");let n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(t,{kind:A.OBJECT_TYPE_DEFINITION,description:e,name:n,interfaces:r,directives:i,fields:o})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(I.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(I.BRACE_L,this.parseFieldDefinition,I.BRACE_R)}parseFieldDefinition(){let t=this.u.token,e=this.parseDescription(),n=this.parseName(),r=this.parseArgumentDefs();this.expectToken(I.COLON);let i=this.parseTypeReference(),o=this.parseConstDirectives();return this.node(t,{kind:A.FIELD_DEFINITION,description:e,name:n,arguments:r,type:i,directives:o})}parseArgumentDefs(){return this.optionalMany(I.PAREN_L,this.parseInputValueDef,I.PAREN_R)}parseInputValueDef(){let t=this.u.token,e=this.parseDescription(),n=this.parseName();this.expectToken(I.COLON);let r=this.parseTypeReference(),i;this.expectOptionalToken(I.EQUALS)&&(i=this.parseConstValueLiteral());let o=this.parseConstDirectives();return this.node(t,{kind:A.INPUT_VALUE_DEFINITION,description:e,name:n,type:r,defaultValue:i,directives:o})}parseInterfaceTypeDefinition(){let t=this.u.token,e=this.parseDescription();this.expectKeyword("interface");let n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(t,{kind:A.INTERFACE_TYPE_DEFINITION,description:e,name:n,interfaces:r,directives:i,fields:o})}parseUnionTypeDefinition(){let t=this.u.token,e=this.parseDescription();this.expectKeyword("union");let n=this.parseName(),r=this.parseConstDirectives(),i=this.parseUnionMemberTypes();return this.node(t,{kind:A.UNION_TYPE_DEFINITION,description:e,name:n,directives:r,types:i})}parseUnionMemberTypes(){return this.expectOptionalToken(I.EQUALS)?this.delimitedMany(I.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){let t=this.u.token,e=this.parseDescription();this.expectKeyword("enum");let n=this.parseName(),r=this.parseConstDirectives(),i=this.parseEnumValuesDefinition();return this.node(t,{kind:A.ENUM_TYPE_DEFINITION,description:e,name:n,directives:r,values:i})}parseEnumValuesDefinition(){return this.optionalMany(I.BRACE_L,this.parseEnumValueDefinition,I.BRACE_R)}parseEnumValueDefinition(){let t=this.u.token,e=this.parseDescription(),n=this.parseEnumValueName(),r=this.parseConstDirectives();return this.node(t,{kind:A.ENUM_VALUE_DEFINITION,description:e,name:n,directives:r})}parseEnumValueName(){if(this.u.token.value==="true"||this.u.token.value==="false"||this.u.token.value==="null")throw Zt(this.u.source,this.u.token.start,`${qo(this.u.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){let t=this.u.token,e=this.parseDescription();this.expectKeyword("input");let n=this.parseName(),r=this.parseConstDirectives(),i=this.parseInputFieldsDefinition();return this.node(t,{kind:A.INPUT_OBJECT_TYPE_DEFINITION,description:e,name:n,directives:r,fields:i})}parseInputFieldsDefinition(){return this.optionalMany(I.BRACE_L,this.parseInputValueDef,I.BRACE_R)}parseTypeSystemExtension(){let t=this.u.lookahead();if(t.kind===I.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(){let t=this.u.token;this.expectKeyword("extend"),this.expectKeyword("schema");let e=this.parseConstDirectives(),n=this.optionalMany(I.BRACE_L,this.parseOperationTypeDefinition,I.BRACE_R);if(e.length===0&&n.length===0)throw this.unexpected();return this.node(t,{kind:A.SCHEMA_EXTENSION,directives:e,operationTypes:n})}parseScalarTypeExtension(){let t=this.u.token;this.expectKeyword("extend"),this.expectKeyword("scalar");let e=this.parseName(),n=this.parseConstDirectives();if(n.length===0)throw this.unexpected();return this.node(t,{kind:A.SCALAR_TYPE_EXTENSION,name:e,directives:n})}parseObjectTypeExtension(){let t=this.u.token;this.expectKeyword("extend"),this.expectKeyword("type");let e=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),i=this.parseFieldsDefinition();if(n.length===0&&r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:A.OBJECT_TYPE_EXTENSION,name:e,interfaces:n,directives:r,fields:i})}parseInterfaceTypeExtension(){let t=this.u.token;this.expectKeyword("extend"),this.expectKeyword("interface");let e=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),i=this.parseFieldsDefinition();if(n.length===0&&r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:A.INTERFACE_TYPE_EXTENSION,name:e,interfaces:n,directives:r,fields:i})}parseUnionTypeExtension(){let t=this.u.token;this.expectKeyword("extend"),this.expectKeyword("union");let e=this.parseName(),n=this.parseConstDirectives(),r=this.parseUnionMemberTypes();if(n.length===0&&r.length===0)throw this.unexpected();return this.node(t,{kind:A.UNION_TYPE_EXTENSION,name:e,directives:n,types:r})}parseEnumTypeExtension(){let t=this.u.token;this.expectKeyword("extend"),this.expectKeyword("enum");let e=this.parseName(),n=this.parseConstDirectives(),r=this.parseEnumValuesDefinition();if(n.length===0&&r.length===0)throw this.unexpected();return this.node(t,{kind:A.ENUM_TYPE_EXTENSION,name:e,directives:n,values:r})}parseInputObjectTypeExtension(){let t=this.u.token;this.expectKeyword("extend"),this.expectKeyword("input");let e=this.parseName(),n=this.parseConstDirectives(),r=this.parseInputFieldsDefinition();if(n.length===0&&r.length===0)throw this.unexpected();return this.node(t,{kind:A.INPUT_OBJECT_TYPE_EXTENSION,name:e,directives:n,fields:r})}parseDirectiveDefinition(){let t=this.u.token,e=this.parseDescription();this.expectKeyword("directive"),this.expectToken(I.AT);let n=this.parseName(),r=this.parseArgumentDefs(),i=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");let o=this.parseDirectiveLocations();return this.node(t,{kind:A.DIRECTIVE_DEFINITION,description:e,name:n,arguments:r,repeatable:i,locations:o})}parseDirectiveLocations(){return this.delimitedMany(I.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){let t=this.u.token,e=this.parseName();if(Object.prototype.hasOwnProperty.call(eu,e.value))return e;throw this.unexpected(t)}node(t,e){return this.Sn.noLocation!==!0&&(e.loc=new rL(t,this.u.lastToken,this.u.source)),e}peek(t){return this.u.token.kind===t}expectToken(t){let e=this.u.token;if(e.kind===t)return this.advanceLexer(),e;throw Zt(this.u.source,e.start,`Expected ${Nb(t)}, found ${qo(e)}.`)}expectOptionalToken(t){return this.u.token.kind===t?(this.advanceLexer(),!0):!1}expectKeyword(t){let e=this.u.token;if(e.kind===I.NAME&&e.value===t)this.advanceLexer();else throw Zt(this.u.source,e.start,`Expected "${t}", found ${qo(e)}.`)}expectOptionalKeyword(t){let e=this.u.token;return e.kind===I.NAME&&e.value===t?(this.advanceLexer(),!0):!1}unexpected(t){let e=t!=null?t:this.u.token;return Zt(this.u.source,e.start,`Unexpected ${qo(e)}.`)}any(t,e,n){this.expectToken(t);let r=[];for(;!this.expectOptionalToken(n);)r.push(e.call(this));return r}optionalMany(t,e,n){if(this.expectOptionalToken(t)){let r=[];do r.push(e.call(this));while(!this.expectOptionalToken(n));return r}return[]}many(t,e,n){this.expectToken(t);let r=[];do r.push(e.call(this));while(!this.expectOptionalToken(n));return r}delimitedMany(t,e){this.expectOptionalToken(t);let n=[];do n.push(e.call(this));while(this.expectOptionalToken(t));return n}advanceLexer(){let{maxTokens:t}=this.Sn,e=this.u.advance();if(t!==void 0&&e.kind!==I.EOF&&(++this.Qn,this.Qn>t))throw Zt(this.u.source,e.start,`Document contains more that ${t} tokens. Parsing aborted.`)}};xL=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;OL=["\\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"],GL=Object.freeze({});WL=80,UL={Name:{leave:t=>t.value},Variable:{leave:t=>"$"+t.name},Document:{leave:t=>W(t.definitions,`
37
+ spurious results.`)}}return!1},Ab=class{constructor(t,e="GraphQL request",n={line:1,column:1}){typeof t=="string"||Rs(!1,`Body must be a string. Received: ${hh(t)}.`),this.body=t,this.name=e,this.locationOffset=n,this.locationOffset.line>0||Rs(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||Rs(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}};BL=class{constructor(t,e={}){let n=zL(t)?t:new Ab(t);this.l=new xL(n),this.ar=e,this.Ur=0}parseName(){let t=this.expectToken(I.NAME);return this.node(t,{kind:A.NAME,value:t.value})}parseDocument(){return this.node(this.l.token,{kind:A.DOCUMENT,definitions:this.many(I.SOF,this.parseDefinition,I.EOF)})}parseDefinition(){if(this.peek(I.BRACE_L))return this.parseOperationDefinition();let t=this.peekDescription(),e=t?this.l.lookahead():this.l.token;if(e.kind===I.NAME){switch(e.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 Zt(this.l.source,this.l.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(e.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(e)}parseOperationDefinition(){let t=this.l.token;if(this.peek(I.BRACE_L))return this.node(t,{kind:A.OPERATION_DEFINITION,operation:er.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});let e=this.parseOperationType(),n;return this.peek(I.NAME)&&(n=this.parseName()),this.node(t,{kind:A.OPERATION_DEFINITION,operation:e,name:n,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){let t=this.expectToken(I.NAME);switch(t.value){case"query":return er.QUERY;case"mutation":return er.MUTATION;case"subscription":return er.SUBSCRIPTION}throw this.unexpected(t)}parseVariableDefinitions(){return this.optionalMany(I.PAREN_L,this.parseVariableDefinition,I.PAREN_R)}parseVariableDefinition(){return this.node(this.l.token,{kind:A.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(I.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(I.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){let t=this.l.token;return this.expectToken(I.DOLLAR),this.node(t,{kind:A.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this.l.token,{kind:A.SELECTION_SET,selections:this.many(I.BRACE_L,this.parseSelection,I.BRACE_R)})}parseSelection(){return this.peek(I.SPREAD)?this.parseFragment():this.parseField()}parseField(){let t=this.l.token,e=this.parseName(),n,r;return this.expectOptionalToken(I.COLON)?(n=e,r=this.parseName()):r=e,this.node(t,{kind:A.FIELD,alias:n,name:r,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(I.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(t){let e=t?this.parseConstArgument:this.parseArgument;return this.optionalMany(I.PAREN_L,e,I.PAREN_R)}parseArgument(t=!1){let e=this.l.token,n=this.parseName();return this.expectToken(I.COLON),this.node(e,{kind:A.ARGUMENT,name:n,value:this.parseValueLiteral(t)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){let t=this.l.token;this.expectToken(I.SPREAD);let e=this.expectOptionalKeyword("on");return!e&&this.peek(I.NAME)?this.node(t,{kind:A.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(t,{kind:A.INLINE_FRAGMENT,typeCondition:e?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){let t=this.l.token;return this.expectKeyword("fragment"),this.ar.allowLegacyFragmentVariables===!0?this.node(t,{kind:A.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:A.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if(this.l.token.value==="on")throw this.unexpected();return this.parseName()}parseValueLiteral(t){let e=this.l.token;switch(e.kind){case I.BRACKET_L:return this.parseList(t);case I.BRACE_L:return this.parseObject(t);case I.INT:return this.advanceLexer(),this.node(e,{kind:A.INT,value:e.value});case I.FLOAT:return this.advanceLexer(),this.node(e,{kind:A.FLOAT,value:e.value});case I.STRING:case I.BLOCK_STRING:return this.parseStringLiteral();case I.NAME:switch(this.advanceLexer(),e.value){case"true":return this.node(e,{kind:A.BOOLEAN,value:!0});case"false":return this.node(e,{kind:A.BOOLEAN,value:!1});case"null":return this.node(e,{kind:A.NULL});default:return this.node(e,{kind:A.ENUM,value:e.value})}case I.DOLLAR:if(t)if(this.expectToken(I.DOLLAR),this.l.token.kind===I.NAME){let n=this.l.token.value;throw Zt(this.l.source,e.start,`Unexpected variable "$${n}" in constant value.`)}else throw this.unexpected(e);return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){let t=this.l.token;return this.advanceLexer(),this.node(t,{kind:A.STRING,value:t.value,block:t.kind===I.BLOCK_STRING})}parseList(t){let e=()=>this.parseValueLiteral(t);return this.node(this.l.token,{kind:A.LIST,values:this.any(I.BRACKET_L,e,I.BRACKET_R)})}parseObject(t){let e=()=>this.parseObjectField(t);return this.node(this.l.token,{kind:A.OBJECT,fields:this.any(I.BRACE_L,e,I.BRACE_R)})}parseObjectField(t){let e=this.l.token,n=this.parseName();return this.expectToken(I.COLON),this.node(e,{kind:A.OBJECT_FIELD,name:n,value:this.parseValueLiteral(t)})}parseDirectives(t){let e=[];for(;this.peek(I.AT);)e.push(this.parseDirective(t));return e}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(t){let e=this.l.token;return this.expectToken(I.AT),this.node(e,{kind:A.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(t)})}parseTypeReference(){let t=this.l.token,e;if(this.expectOptionalToken(I.BRACKET_L)){let n=this.parseTypeReference();this.expectToken(I.BRACKET_R),e=this.node(t,{kind:A.LIST_TYPE,type:n})}else e=this.parseNamedType();return this.expectOptionalToken(I.BANG)?this.node(t,{kind:A.NON_NULL_TYPE,type:e}):e}parseNamedType(){return this.node(this.l.token,{kind:A.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(I.STRING)||this.peek(I.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){let t=this.l.token,e=this.parseDescription();this.expectKeyword("schema");let n=this.parseConstDirectives(),r=this.many(I.BRACE_L,this.parseOperationTypeDefinition,I.BRACE_R);return this.node(t,{kind:A.SCHEMA_DEFINITION,description:e,directives:n,operationTypes:r})}parseOperationTypeDefinition(){let t=this.l.token,e=this.parseOperationType();this.expectToken(I.COLON);let n=this.parseNamedType();return this.node(t,{kind:A.OPERATION_TYPE_DEFINITION,operation:e,type:n})}parseScalarTypeDefinition(){let t=this.l.token,e=this.parseDescription();this.expectKeyword("scalar");let n=this.parseName(),r=this.parseConstDirectives();return this.node(t,{kind:A.SCALAR_TYPE_DEFINITION,description:e,name:n,directives:r})}parseObjectTypeDefinition(){let t=this.l.token,e=this.parseDescription();this.expectKeyword("type");let n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(t,{kind:A.OBJECT_TYPE_DEFINITION,description:e,name:n,interfaces:r,directives:i,fields:o})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(I.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(I.BRACE_L,this.parseFieldDefinition,I.BRACE_R)}parseFieldDefinition(){let t=this.l.token,e=this.parseDescription(),n=this.parseName(),r=this.parseArgumentDefs();this.expectToken(I.COLON);let i=this.parseTypeReference(),o=this.parseConstDirectives();return this.node(t,{kind:A.FIELD_DEFINITION,description:e,name:n,arguments:r,type:i,directives:o})}parseArgumentDefs(){return this.optionalMany(I.PAREN_L,this.parseInputValueDef,I.PAREN_R)}parseInputValueDef(){let t=this.l.token,e=this.parseDescription(),n=this.parseName();this.expectToken(I.COLON);let r=this.parseTypeReference(),i;this.expectOptionalToken(I.EQUALS)&&(i=this.parseConstValueLiteral());let o=this.parseConstDirectives();return this.node(t,{kind:A.INPUT_VALUE_DEFINITION,description:e,name:n,type:r,defaultValue:i,directives:o})}parseInterfaceTypeDefinition(){let t=this.l.token,e=this.parseDescription();this.expectKeyword("interface");let n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(t,{kind:A.INTERFACE_TYPE_DEFINITION,description:e,name:n,interfaces:r,directives:i,fields:o})}parseUnionTypeDefinition(){let t=this.l.token,e=this.parseDescription();this.expectKeyword("union");let n=this.parseName(),r=this.parseConstDirectives(),i=this.parseUnionMemberTypes();return this.node(t,{kind:A.UNION_TYPE_DEFINITION,description:e,name:n,directives:r,types:i})}parseUnionMemberTypes(){return this.expectOptionalToken(I.EQUALS)?this.delimitedMany(I.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){let t=this.l.token,e=this.parseDescription();this.expectKeyword("enum");let n=this.parseName(),r=this.parseConstDirectives(),i=this.parseEnumValuesDefinition();return this.node(t,{kind:A.ENUM_TYPE_DEFINITION,description:e,name:n,directives:r,values:i})}parseEnumValuesDefinition(){return this.optionalMany(I.BRACE_L,this.parseEnumValueDefinition,I.BRACE_R)}parseEnumValueDefinition(){let t=this.l.token,e=this.parseDescription(),n=this.parseEnumValueName(),r=this.parseConstDirectives();return this.node(t,{kind:A.ENUM_VALUE_DEFINITION,description:e,name:n,directives:r})}parseEnumValueName(){if(this.l.token.value==="true"||this.l.token.value==="false"||this.l.token.value==="null")throw Zt(this.l.source,this.l.token.start,`${ns(this.l.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){let t=this.l.token,e=this.parseDescription();this.expectKeyword("input");let n=this.parseName(),r=this.parseConstDirectives(),i=this.parseInputFieldsDefinition();return this.node(t,{kind:A.INPUT_OBJECT_TYPE_DEFINITION,description:e,name:n,directives:r,fields:i})}parseInputFieldsDefinition(){return this.optionalMany(I.BRACE_L,this.parseInputValueDef,I.BRACE_R)}parseTypeSystemExtension(){let t=this.l.lookahead();if(t.kind===I.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(){let t=this.l.token;this.expectKeyword("extend"),this.expectKeyword("schema");let e=this.parseConstDirectives(),n=this.optionalMany(I.BRACE_L,this.parseOperationTypeDefinition,I.BRACE_R);if(e.length===0&&n.length===0)throw this.unexpected();return this.node(t,{kind:A.SCHEMA_EXTENSION,directives:e,operationTypes:n})}parseScalarTypeExtension(){let t=this.l.token;this.expectKeyword("extend"),this.expectKeyword("scalar");let e=this.parseName(),n=this.parseConstDirectives();if(n.length===0)throw this.unexpected();return this.node(t,{kind:A.SCALAR_TYPE_EXTENSION,name:e,directives:n})}parseObjectTypeExtension(){let t=this.l.token;this.expectKeyword("extend"),this.expectKeyword("type");let e=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),i=this.parseFieldsDefinition();if(n.length===0&&r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:A.OBJECT_TYPE_EXTENSION,name:e,interfaces:n,directives:r,fields:i})}parseInterfaceTypeExtension(){let t=this.l.token;this.expectKeyword("extend"),this.expectKeyword("interface");let e=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),i=this.parseFieldsDefinition();if(n.length===0&&r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:A.INTERFACE_TYPE_EXTENSION,name:e,interfaces:n,directives:r,fields:i})}parseUnionTypeExtension(){let t=this.l.token;this.expectKeyword("extend"),this.expectKeyword("union");let e=this.parseName(),n=this.parseConstDirectives(),r=this.parseUnionMemberTypes();if(n.length===0&&r.length===0)throw this.unexpected();return this.node(t,{kind:A.UNION_TYPE_EXTENSION,name:e,directives:n,types:r})}parseEnumTypeExtension(){let t=this.l.token;this.expectKeyword("extend"),this.expectKeyword("enum");let e=this.parseName(),n=this.parseConstDirectives(),r=this.parseEnumValuesDefinition();if(n.length===0&&r.length===0)throw this.unexpected();return this.node(t,{kind:A.ENUM_TYPE_EXTENSION,name:e,directives:n,values:r})}parseInputObjectTypeExtension(){let t=this.l.token;this.expectKeyword("extend"),this.expectKeyword("input");let e=this.parseName(),n=this.parseConstDirectives(),r=this.parseInputFieldsDefinition();if(n.length===0&&r.length===0)throw this.unexpected();return this.node(t,{kind:A.INPUT_OBJECT_TYPE_EXTENSION,name:e,directives:n,fields:r})}parseDirectiveDefinition(){let t=this.l.token,e=this.parseDescription();this.expectKeyword("directive"),this.expectToken(I.AT);let n=this.parseName(),r=this.parseArgumentDefs(),i=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");let o=this.parseDirectiveLocations();return this.node(t,{kind:A.DIRECTIVE_DEFINITION,description:e,name:n,arguments:r,repeatable:i,locations:o})}parseDirectiveLocations(){return this.delimitedMany(I.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){let t=this.l.token,e=this.parseName();if(Object.prototype.hasOwnProperty.call(au,e.value))return e;throw this.unexpected(t)}node(t,e){return this.ar.noLocation!==!0&&(e.loc=new EL(t,this.l.lastToken,this.l.source)),e}peek(t){return this.l.token.kind===t}expectToken(t){let e=this.l.token;if(e.kind===t)return this.advanceLexer(),e;throw Zt(this.l.source,e.start,`Expected ${Db(t)}, found ${ns(e)}.`)}expectOptionalToken(t){return this.l.token.kind===t?(this.advanceLexer(),!0):!1}expectKeyword(t){let e=this.l.token;if(e.kind===I.NAME&&e.value===t)this.advanceLexer();else throw Zt(this.l.source,e.start,`Expected "${t}", found ${ns(e)}.`)}expectOptionalKeyword(t){let e=this.l.token;return e.kind===I.NAME&&e.value===t?(this.advanceLexer(),!0):!1}unexpected(t){let e=t!=null?t:this.l.token;return Zt(this.l.source,e.start,`Unexpected ${ns(e)}.`)}any(t,e,n){this.expectToken(t);let r=[];for(;!this.expectOptionalToken(n);)r.push(e.call(this));return r}optionalMany(t,e,n){if(this.expectOptionalToken(t)){let r=[];do r.push(e.call(this));while(!this.expectOptionalToken(n));return r}return[]}many(t,e,n){this.expectToken(t);let r=[];do r.push(e.call(this));while(!this.expectOptionalToken(n));return r}delimitedMany(t,e){this.expectOptionalToken(t);let n=[];do n.push(e.call(this));while(this.expectOptionalToken(t));return n}advanceLexer(){let{maxTokens:t}=this.ar,e=this.l.advance();if(t!==void 0&&e.kind!==I.EOF&&(++this.Ur,this.Ur>t))throw Zt(this.l.source,e.start,`Document contains more that ${t} tokens. Parsing aborted.`)}};QL=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;qL=["\\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"],tX=Object.freeze({});rX=80,iX={Name:{leave:t=>t.value},Variable:{leave:t=>"$"+t.name},Document:{leave:t=>W(t.definitions,`
38
38
 
39
- `)},OperationDefinition:{leave(t){let e=Q("(",W(t.variableDefinitions,", "),")"),n=W([t.operation,W([t.name,e]),W(t.directives," ")]," ");return(n==="query"?"":n+" ")+t.selectionSet}},VariableDefinition:{leave:({variable:t,type:e,defaultValue:n,directives:r})=>t+": "+e+Q(" = ",n)+Q(" ",W(r," "))},SelectionSet:{leave:({selections:t})=>ae(t)},Field:{leave({alias:t,name:e,arguments:n,directives:r,selectionSet:i}){let o=Q("",t,": ")+e,s=o+Q("(",W(n,", "),")");return s.length>WL&&(s=o+Q(`(
40
- `,Ts(W(n,`
39
+ `)},OperationDefinition:{leave(t){let e=Q("(",W(t.variableDefinitions,", "),")"),n=W([t.operation,W([t.name,e]),W(t.directives," ")]," ");return(n==="query"?"":n+" ")+t.selectionSet}},VariableDefinition:{leave:({variable:t,type:e,defaultValue:n,directives:r})=>t+": "+e+Q(" = ",n)+Q(" ",W(r," "))},SelectionSet:{leave:({selections:t})=>ce(t)},Field:{leave({alias:t,name:e,arguments:n,directives:r,selectionSet:i}){let o=Q("",t,": ")+e,s=o+Q("(",W(n,", "),")");return s.length>rX&&(s=o+Q(`(
40
+ `,Cs(W(n,`
41
41
  `)),`
42
- )`)),W([s,W(r," "),i]," ")}},Argument:{leave:({name:t,value:e})=>t+": "+e},FragmentSpread:{leave:({name:t,directives:e})=>"..."+t+Q(" ",W(e," "))},InlineFragment:{leave:({typeCondition:t,directives:e,selectionSet:n})=>W(["...",Q("on ",t),W(e," "),n]," ")},FragmentDefinition:{leave:({name:t,typeCondition:e,variableDefinitions:n,directives:r,selectionSet:i})=>`fragment ${t}${Q("(",W(n,", "),")")} on ${e} ${Q("",W(r," ")," ")}`+i},IntValue:{leave:({value:t})=>t},FloatValue:{leave:({value:t})=>t},StringValue:{leave:({value:t,block:e})=>e?lL(t):VL(t)},BooleanValue:{leave:({value:t})=>t?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:t})=>t},ListValue:{leave:({values:t})=>"["+W(t,", ")+"]"},ObjectValue:{leave:({fields:t})=>"{"+W(t,", ")+"}"},ObjectField:{leave:({name:t,value:e})=>t+": "+e},Directive:{leave:({name:t,arguments:e})=>"@"+t+Q("(",W(e,", "),")")},NamedType:{leave:({name:t})=>t},ListType:{leave:({type:t})=>"["+t+"]"},NonNullType:{leave:({type:t})=>t+"!"},SchemaDefinition:{leave:({description:t,directives:e,operationTypes:n})=>Q("",t,`
43
- `)+W(["schema",W(e," "),ae(n)]," ")},OperationTypeDefinition:{leave:({operation:t,type:e})=>t+": "+e},ScalarTypeDefinition:{leave:({description:t,name:e,directives:n})=>Q("",t,`
42
+ )`)),W([s,W(r," "),i]," ")}},Argument:{leave:({name:t,value:e})=>t+": "+e},FragmentSpread:{leave:({name:t,directives:e})=>"..."+t+Q(" ",W(e," "))},InlineFragment:{leave:({typeCondition:t,directives:e,selectionSet:n})=>W(["...",Q("on ",t),W(e," "),n]," ")},FragmentDefinition:{leave:({name:t,typeCondition:e,variableDefinitions:n,directives:r,selectionSet:i})=>`fragment ${t}${Q("(",W(n,", "),")")} on ${e} ${Q("",W(r," ")," ")}`+i},IntValue:{leave:({value:t})=>t},FloatValue:{leave:({value:t})=>t},StringValue:{leave:({value:t,block:e})=>e?VL(t):jL(t)},BooleanValue:{leave:({value:t})=>t?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:t})=>t},ListValue:{leave:({values:t})=>"["+W(t,", ")+"]"},ObjectValue:{leave:({fields:t})=>"{"+W(t,", ")+"}"},ObjectField:{leave:({name:t,value:e})=>t+": "+e},Directive:{leave:({name:t,arguments:e})=>"@"+t+Q("(",W(e,", "),")")},NamedType:{leave:({name:t})=>t},ListType:{leave:({type:t})=>"["+t+"]"},NonNullType:{leave:({type:t})=>t+"!"},SchemaDefinition:{leave:({description:t,directives:e,operationTypes:n})=>Q("",t,`
43
+ `)+W(["schema",W(e," "),ce(n)]," ")},OperationTypeDefinition:{leave:({operation:t,type:e})=>t+": "+e},ScalarTypeDefinition:{leave:({description:t,name:e,directives:n})=>Q("",t,`
44
44
  `)+W(["scalar",e,W(n," ")]," ")},ObjectTypeDefinition:{leave:({description:t,name:e,interfaces:n,directives:r,fields:i})=>Q("",t,`
45
- `)+W(["type",e,Q("implements ",W(n," & ")),W(r," "),ae(i)]," ")},FieldDefinition:{leave:({description:t,name:e,arguments:n,type:r,directives:i})=>Q("",t,`
46
- `)+e+(ng(n)?Q(`(
47
- `,Ts(W(n,`
45
+ `)+W(["type",e,Q("implements ",W(n," & ")),W(r," "),ce(i)]," ")},FieldDefinition:{leave:({description:t,name:e,arguments:n,type:r,directives:i})=>Q("",t,`
46
+ `)+e+(fg(n)?Q(`(
47
+ `,Cs(W(n,`
48
48
  `)),`
49
49
  )`):Q("(",W(n,", "),")"))+": "+r+Q(" ",W(i," "))},InputValueDefinition:{leave:({description:t,name:e,type:n,defaultValue:r,directives:i})=>Q("",t,`
50
50
  `)+W([e+": "+n,Q("= ",r),W(i," ")]," ")},InterfaceTypeDefinition:{leave:({description:t,name:e,interfaces:n,directives:r,fields:i})=>Q("",t,`
51
- `)+W(["interface",e,Q("implements ",W(n," & ")),W(r," "),ae(i)]," ")},UnionTypeDefinition:{leave:({description:t,name:e,directives:n,types:r})=>Q("",t,`
51
+ `)+W(["interface",e,Q("implements ",W(n," & ")),W(r," "),ce(i)]," ")},UnionTypeDefinition:{leave:({description:t,name:e,directives:n,types:r})=>Q("",t,`
52
52
  `)+W(["union",e,W(n," "),Q("= ",W(r," | "))]," ")},EnumTypeDefinition:{leave:({description:t,name:e,directives:n,values:r})=>Q("",t,`
53
- `)+W(["enum",e,W(n," "),ae(r)]," ")},EnumValueDefinition:{leave:({description:t,name:e,directives:n})=>Q("",t,`
53
+ `)+W(["enum",e,W(n," "),ce(r)]," ")},EnumValueDefinition:{leave:({description:t,name:e,directives:n})=>Q("",t,`
54
54
  `)+W([e,W(n," ")]," ")},InputObjectTypeDefinition:{leave:({description:t,name:e,directives:n,fields:r})=>Q("",t,`
55
- `)+W(["input",e,W(n," "),ae(r)]," ")},DirectiveDefinition:{leave:({description:t,name:e,arguments:n,repeatable:r,locations:i})=>Q("",t,`
56
- `)+"directive @"+e+(ng(n)?Q(`(
57
- `,Ts(W(n,`
55
+ `)+W(["input",e,W(n," "),ce(r)]," ")},DirectiveDefinition:{leave:({description:t,name:e,arguments:n,repeatable:r,locations:i})=>Q("",t,`
56
+ `)+"directive @"+e+(fg(n)?Q(`(
57
+ `,Cs(W(n,`
58
58
  `)),`
59
- )`):Q("(",W(n,", "),")"))+(r?" repeatable":"")+" on "+W(i," | ")},SchemaExtension:{leave:({directives:t,operationTypes:e})=>W(["extend schema",W(t," "),ae(e)]," ")},ScalarTypeExtension:{leave:({name:t,directives:e})=>W(["extend scalar",t,W(e," ")]," ")},ObjectTypeExtension:{leave:({name:t,interfaces:e,directives:n,fields:r})=>W(["extend type",t,Q("implements ",W(e," & ")),W(n," "),ae(r)]," ")},InterfaceTypeExtension:{leave:({name:t,interfaces:e,directives:n,fields:r})=>W(["extend interface",t,Q("implements ",W(e," & ")),W(n," "),ae(r)]," ")},UnionTypeExtension:{leave:({name:t,directives:e,types:n})=>W(["extend union",t,W(e," "),Q("= ",W(n," | "))]," ")},EnumTypeExtension:{leave:({name:t,directives:e,values:n})=>W(["extend enum",t,W(e," "),ae(n)]," ")},InputObjectTypeExtension:{leave:({name:t,directives:e,fields:n})=>W(["extend input",t,W(e," "),ae(n)]," ")}};sh=JSON,PL=t=>t.toUpperCase(),ML=t=>{let e={};return t.forEach((n,r)=>{e[r]=n}),e},FL=(t,e,n)=>t.document?t:{document:t,variables:e,requestHeaders:n,signal:void 0},AL=(t,e,n)=>t.query?t:{query:t,variables:e,requestHeaders:n,signal:void 0},JL=(t,e)=>t.documents?t:{documents:t,requestHeaders:e,signal:void 0},rg=t=>{var e,n;let r,i=t.definitions.filter(o=>o.kind==="OperationDefinition");return i.length===1&&(r=(n=(e=i[0])==null?void 0:e.name)==null?void 0:n.value),r},Gc=t=>{if(typeof t=="string"){let n;try{let r=xb(t);n=rg(r)}catch(r){}return{query:t,operationName:n}}let e=rg(t);return{query:Ob(t),operationName:e}},Gb=class Es extends Error{constructor(e,n){let r=`${Es.extractMessage(e)}: ${JSON.stringify({response:e,request:n})}`;super(r),Object.setPrototypeOf(this,Es.prototype),this.response=e,this.request=n,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,Es)}static extractMessage(e){var n,r,i;return(i=(r=(n=e.errors)==null?void 0:n[0])==null?void 0:r.message)!=null?i:`GraphQL Error (Code: ${e.status})`}},DL=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};ru={exports:{}};(function(t,e){var n=typeof self<"u"?self:DL,r=(function(){function o(){this.fetch=!1,this.DOMException=n.DOMException}return o.prototype=n,new o})();(function(o){(function(s){var a={searchParams:"URLSearchParams"in o,iterable:"Symbol"in o&&"iterator"in Symbol,blob:"FileReader"in o&&"Blob"in o&&(function(){try{return new Blob,!0}catch(y){return!1}})(),formData:"FormData"in o,arrayBuffer:"ArrayBuffer"in o};function c(y){return y&&DataView.prototype.isPrototypeOf(y)}if(a.arrayBuffer)var l=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],u=ArrayBuffer.isView||function(y){return y&&l.indexOf(Object.prototype.toString.call(y))>-1};function h(y){if(typeof y!="string"&&(y=String(y)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(y))throw new TypeError("Invalid character in header field name");return y.toLowerCase()}function p(y){return typeof y!="string"&&(y=String(y)),y}function f(y){var b={next:function(){var Z=y.shift();return{done:Z===void 0,value:Z}}};return a.iterable&&(b[Symbol.iterator]=function(){return b}),b}function m(y){this.map={},y instanceof m?y.forEach(function(b,Z){this.append(Z,b)},this):Array.isArray(y)?y.forEach(function(b){this.append(b[0],b[1])},this):y&&Object.getOwnPropertyNames(y).forEach(function(b){this.append(b,y[b])},this)}m.prototype.append=function(y,b){y=h(y),b=p(b);var Z=this.map[y];this.map[y]=Z?Z+", "+b:b},m.prototype.delete=function(y){delete this.map[h(y)]},m.prototype.get=function(y){return y=h(y),this.has(y)?this.map[y]:null},m.prototype.has=function(y){return this.map.hasOwnProperty(h(y))},m.prototype.set=function(y,b){this.map[h(y)]=p(b)},m.prototype.forEach=function(y,b){for(var Z in this.map)this.map.hasOwnProperty(Z)&&y.call(b,this.map[Z],Z,this)},m.prototype.keys=function(){var y=[];return this.forEach(function(b,Z){y.push(Z)}),f(y)},m.prototype.values=function(){var y=[];return this.forEach(function(b){y.push(b)}),f(y)},m.prototype.entries=function(){var y=[];return this.forEach(function(b,Z){y.push([Z,b])}),f(y)},a.iterable&&(m.prototype[Symbol.iterator]=m.prototype.entries);function d(y){if(y.bodyUsed)return Promise.reject(new TypeError("Already read"));y.bodyUsed=!0}function v(y){return new Promise(function(b,Z){y.onload=function(){b(y.result)},y.onerror=function(){Z(y.error)}})}function g(y){var b=new FileReader,Z=v(b);return b.readAsArrayBuffer(y),Z}function w(y){var b=new FileReader,Z=v(b);return b.readAsText(y),Z}function R(y){for(var b=new Uint8Array(y),Z=new Array(b.length),D=0;D<b.length;D++)Z[D]=String.fromCharCode(b[D]);return Z.join("")}function E(y){if(y.slice)return y.slice(0);var b=new Uint8Array(y.byteLength);return b.set(new Uint8Array(y)),b.buffer}function T(){return this.bodyUsed=!1,this.$n=function(y){this._t=y,y?typeof y=="string"?this._e=y:a.blob&&Blob.prototype.isPrototypeOf(y)?this.Qt=y:a.formData&&FormData.prototype.isPrototypeOf(y)?this.qn=y:a.searchParams&&URLSearchParams.prototype.isPrototypeOf(y)?this._e=y.toString():a.arrayBuffer&&a.blob&&c(y)?(this.D=E(y.buffer),this._t=new Blob([this.D])):a.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(y)||u(y))?this.D=E(y):this._e=y=Object.prototype.toString.call(y):this._e="",this.headers.get("content-type")||(typeof y=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this.Qt&&this.Qt.type?this.headers.set("content-type",this.Qt.type):a.searchParams&&URLSearchParams.prototype.isPrototypeOf(y)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},a.blob&&(this.blob=function(){var y=d(this);if(y)return y;if(this.Qt)return Promise.resolve(this.Qt);if(this.D)return Promise.resolve(new Blob([this.D]));if(this.qn)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._e]))},this.arrayBuffer=function(){return this.D?d(this)||Promise.resolve(this.D):this.blob().then(g)}),this.text=function(){var y=d(this);if(y)return y;if(this.Qt)return w(this.Qt);if(this.D)return Promise.resolve(R(this.D));if(this.qn)throw new Error("could not read FormData body as text");return Promise.resolve(this._e)},a.formData&&(this.formData=function(){return this.text().then(C)}),this.json=function(){return this.text().then(JSON.parse)},this}var V=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function N(y){var b=y.toUpperCase();return V.indexOf(b)>-1?b:y}function U(y,b){b=b||{};var Z=b.body;if(y instanceof U){if(y.bodyUsed)throw new TypeError("Already read");this.url=y.url,this.credentials=y.credentials,b.headers||(this.headers=new m(y.headers)),this.method=y.method,this.mode=y.mode,this.signal=y.signal,!Z&&y._t!=null&&(Z=y._t,y.bodyUsed=!0)}else this.url=String(y);if(this.credentials=b.credentials||this.credentials||"same-origin",(b.headers||!this.headers)&&(this.headers=new m(b.headers)),this.method=N(b.method||this.method||"GET"),this.mode=b.mode||this.mode||null,this.signal=b.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&Z)throw new TypeError("Body not allowed for GET or HEAD requests");this.$n(Z)}U.prototype.clone=function(){return new U(this,{body:this._t})};function C(y){var b=new FormData;return y.trim().split("&").forEach(function(Z){if(Z){var D=Z.split("="),M=D.shift().replace(/\+/g," "),O=D.join("=").replace(/\+/g," ");b.append(decodeURIComponent(M),decodeURIComponent(O))}}),b}function x(y){var b=new m,Z=y.replace(/\r?\n[\t ]+/g," ");return Z.split(/\r?\n/).forEach(function(D){var M=D.split(":"),O=M.shift().trim();if(O){var it=M.join(":").trim();b.append(O,it)}}),b}T.call(U.prototype);function P(y,b){b||(b={}),this.type="default",this.status=b.status===void 0?200:b.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in b?b.statusText:"OK",this.headers=new m(b.headers),this.url=b.url||"",this.$n(y)}T.call(P.prototype),P.prototype.clone=function(){return new P(this._t,{status:this.status,statusText:this.statusText,headers:new m(this.headers),url:this.url})},P.error=function(){var y=new P(null,{status:0,statusText:""});return y.type="error",y};var st=[301,302,303,307,308];P.redirect=function(y,b){if(st.indexOf(b)===-1)throw new RangeError("Invalid status code");return new P(null,{status:b,headers:{location:y}})},s.DOMException=o.DOMException;try{new s.DOMException}catch(y){s.DOMException=function(b,Z){this.message=b,this.name=Z;var D=Error(b);this.stack=D.stack},s.DOMException.prototype=Object.create(Error.prototype),s.DOMException.prototype.constructor=s.DOMException}function lt(y,b){return new Promise(function(Z,D){var M=new U(y,b);if(M.signal&&M.signal.aborted)return D(new s.DOMException("Aborted","AbortError"));var O=new XMLHttpRequest;function it(){O.abort()}O.onload=function(){var ct={status:O.status,statusText:O.statusText,headers:x(O.getAllResponseHeaders()||"")};ct.url="responseURL"in O?O.responseURL:ct.headers.get("X-Request-URL");var Ot="response"in O?O.response:O.responseText;Z(new P(Ot,ct))},O.onerror=function(){D(new TypeError("Network request failed"))},O.ontimeout=function(){D(new TypeError("Network request failed"))},O.onabort=function(){D(new s.DOMException("Aborted","AbortError"))},O.open(M.method,M.url,!0),M.credentials==="include"?O.withCredentials=!0:M.credentials==="omit"&&(O.withCredentials=!1),"responseType"in O&&a.blob&&(O.responseType="blob"),M.headers.forEach(function(ct,Ot){O.setRequestHeader(Ot,ct)}),M.signal&&(M.signal.addEventListener("abort",it),O.onreadystatechange=function(){O.readyState===4&&M.signal.removeEventListener("abort",it)}),O.send(typeof M._t>"u"?null:M._t)})}return lt.polyfill=!0,o.fetch||(o.fetch=lt,o.Headers=m,o.Request=U,o.Response=P),s.Headers=m,s.Request=U,s.Response=P,s.fetch=lt,Object.defineProperty(s,"__esModule",{value:!0}),s})({})})(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var i=r;e=i.fetch,e.default=i.fetch,e.fetch=i.fetch,e.Headers=i.Headers,e.Request=i.Request,e.Response=i.Response,t.exports=e})(ru,ru.exports);Xs=ru.exports,Rs=Lb(Xs),YL=QG({__proto__:null,default:Rs},[Xs]),jn=t=>{let e={};return t&&(typeof Headers<"u"&&t instanceof Headers||YL&&Xs.Headers&&t instanceof Xs.Headers?e=ML(t):Array.isArray(t)?t.forEach(([n,r])=>{n&&r!==void 0&&(e[n]=r)}):e=t),e},ig=t=>t.replace(/([\s,]|#[^\n\r]+)+/g," ").trim(),KL=t=>{if(!Array.isArray(t.query)){let r=t,i=[`query=${encodeURIComponent(ig(r.query))}`];return t.variables&&i.push(`variables=${encodeURIComponent(r.jsonSerializer.stringify(r.variables))}`),r.operationName&&i.push(`operationName=${encodeURIComponent(r.operationName)}`),i.join("&")}if(typeof t.variables<"u"&&!Array.isArray(t.variables))throw new Error("Cannot create query with given variable type, array expected");let e=t,n=t.query.reduce((r,i,o)=>(r.push({query:ig(i),variables:e.variables?e.jsonSerializer.stringify(e.variables[o]):void 0}),r),[]);return`query=${encodeURIComponent(e.jsonSerializer.stringify(n))}`},_L=t=>e=>ir(void 0,null,function*(){var n;let{url:r,query:i,variables:o,operationName:s,fetch:a,fetchOptions:c,middleware:l}=e,u=$({},e.headers),h="",p;t==="POST"?(p=zL(i,o,s,c.jsonSerializer),typeof p=="string"&&(u["Content-Type"]="application/json")):h=KL({query:i,variables:o,operationName:s,jsonSerializer:(n=c.jsonSerializer)!=null?n:sh});let f=$({method:t,headers:u,body:p},c),m=r,d=f;if(l){let v=yield Promise.resolve(l(rr($({},f),{url:r,operationName:s,variables:o}))),{url:g}=v,w=ai(v,["url"]);m=g,d=w}return h&&(m=`${m}?${h}`),yield a(m,d)}),HL=class{constructor(t,e={}){this.url=t,this.requestConfig=e,this.rawRequest=(...n)=>ir(this,null,function*(){let[r,i,o]=n,s=AL(r,i,o),a=this.requestConfig,{headers:c,fetch:l=Rs,method:u="POST",requestMiddleware:h,responseMiddleware:p}=a,f=ai(a,["headers","fetch","method","requestMiddleware","responseMiddleware"]),{url:m}=this;s.signal!==void 0&&(f.signal=s.signal);let{operationName:d}=Gc(s.query);return Lc({url:m,query:s.query,variables:s.variables,headers:$($({},jn(Xc(c))),jn(s.requestHeaders)),operationName:d,fetch:l,method:u,fetchOptions:f,middleware:h}).then(v=>(p&&p(v),v)).catch(v=>{throw p&&p(v),v})})}request(t,...e){return ir(this,null,function*(){let[n,r]=e,i=FL(t,n,r),o=this.requestConfig,{headers:s,fetch:a=Rs,method:c="POST",requestMiddleware:l,responseMiddleware:u}=o,h=ai(o,["headers","fetch","method","requestMiddleware","responseMiddleware"]),{url:p}=this;i.signal!==void 0&&(h.signal=i.signal);let{query:f,operationName:m}=Gc(i.document);return Lc({url:p,query:f,variables:i.variables,headers:$($({},jn(Xc(s))),jn(i.requestHeaders)),operationName:m,fetch:a,method:c,fetchOptions:h,middleware:l}).then(d=>(u&&u(d),d.data)).catch(d=>{throw u&&u(d),d})})}batchRequests(t,e){var n;let r=JL(t,e),i=this.requestConfig,{headers:o}=i,s=ai(i,["headers"]);r.signal!==void 0&&(s.signal=r.signal);let a=r.documents.map(({document:l})=>Gc(l).query),c=r.documents.map(({variables:l})=>l);return Lc({url:this.url,query:a,variables:c,headers:$($({},jn(Xc(o))),jn(r.requestHeaders)),operationName:void 0,fetch:(n=this.requestConfig.fetch)!=null?n:Rs,method:this.requestConfig.method||"POST",fetchOptions:s,middleware:this.requestConfig.requestMiddleware}).then(l=>(this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(l),l.data)).catch(l=>{throw this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(l),l})}setHeaders(t){return this.requestConfig.headers=t,this}setHeader(t,e){let{headers:n}=this.requestConfig;return n?n[t]=e:this.requestConfig.headers={[t]:e},this}setEndpoint(t){return this.url=t,this}},Lc=t=>ir(void 0,null,function*(){var e,n;let{query:r,variables:i,fetchOptions:o}=t,s=_L(PL((e=t.method)!=null?e:"post")),a=Array.isArray(t.query),c=yield s(t),l=yield BL(c,(n=o.jsonSerializer)!=null?n:sh),u=Array.isArray(l)?!l.some(({data:p})=>!p):!!l.data,h=Array.isArray(l)||!l.errors||Array.isArray(l.errors)&&!l.errors.length||o.errorPolicy==="all"||o.errorPolicy==="ignore";if(c.ok&&h&&u){let p=l,f=ai(p,["errors"]),m=o.errorPolicy==="ignore"?f:l;return rr($({},a?{data:m}:m),{headers:c.headers,status:c.status})}else{let p=typeof l=="string"?{error:l}:l;throw new Gb(rr($({},p),{status:c.status,headers:c.headers}),{query:r,variables:i})}}),zL=(t,e,n,r)=>{let i=r!=null?r:sh;if(!Array.isArray(t))return i.stringify({query:t,variables:e,operationName:n});if(typeof e<"u"&&!Array.isArray(e))throw new Error("Cannot create request body with given variable type, array expected");let o=t.reduce((s,a,c)=>(s.push({query:a,variables:e?e[c]:void 0}),s),[]);return i.stringify(o)},BL=(t,e)=>ir(void 0,null,function*(){let n;return t.headers.forEach((r,i)=>{i.toLowerCase()==="content-type"&&(n=r)}),n&&(n.toLowerCase().startsWith("application/json")||n.toLowerCase().startsWith("application/graphql+json")||n.toLowerCase().startsWith("application/graphql-response+json"))?e.parse(yield t.text()):t.text()}),Xc=t=>typeof t=="function"?t():t,iu={exports:{}};(function(t,e){e=t.exports=n,e.getSerialize=r;function n(i,o,s,a){return JSON.stringify(i,r(o,a),s)}function r(i,o){var s=[],a=[];return o==null&&(o=function(c,l){return s[0]===l?"[Circular ~]":"[Circular ~."+a.slice(0,s.indexOf(l)).join(".")+"]"}),function(c,l){if(s.length>0){var u=s.indexOf(this);~u?s.splice(u+1):s.push(this),~u?a.splice(u,1/0,c):a.push(c),~s.indexOf(l)&&(l=o.call(this,c,l))}else s.push(l);return i==null?l:i.call(this,c,l)}}})(iu,iu.exports);jL=iu.exports,QL=Lb(jL),Ws=function(){return Ws=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Ws.apply(this,arguments)},Cs=new Map,ou=new Map,Xb=!0,Us=!1;jr={gql:Ft,resetCaches:nX,disableFragmentWarnings:rX,enableExperimentalFragmentVariables:iX,disableExperimentalFragmentVariables:oX};(function(t){t.gql=jr.gql,t.resetCaches=jr.resetCaches,t.disableFragmentWarnings=jr.disableFragmentWarnings,t.enableExperimentalFragmentVariables=jr.enableExperimentalFragmentVariables,t.disableExperimentalFragmentVariables=jr.disableExperimentalFragmentVariables})(Ft||(Ft={}));Ft.default=Ft;Ub=Ft`
59
+ )`):Q("(",W(n,", "),")"))+(r?" repeatable":"")+" on "+W(i," | ")},SchemaExtension:{leave:({directives:t,operationTypes:e})=>W(["extend schema",W(t," "),ce(e)]," ")},ScalarTypeExtension:{leave:({name:t,directives:e})=>W(["extend scalar",t,W(e," ")]," ")},ObjectTypeExtension:{leave:({name:t,interfaces:e,directives:n,fields:r})=>W(["extend type",t,Q("implements ",W(e," & ")),W(n," "),ce(r)]," ")},InterfaceTypeExtension:{leave:({name:t,interfaces:e,directives:n,fields:r})=>W(["extend interface",t,Q("implements ",W(e," & ")),W(n," "),ce(r)]," ")},UnionTypeExtension:{leave:({name:t,directives:e,types:n})=>W(["extend union",t,W(e," "),Q("= ",W(n," | "))]," ")},EnumTypeExtension:{leave:({name:t,directives:e,values:n})=>W(["extend enum",t,W(e," "),ce(n)]," ")},InputObjectTypeExtension:{leave:({name:t,directives:e,fields:n})=>W(["extend input",t,W(e," "),ce(n)]," ")}};ph=JSON,oX=t=>t.toUpperCase(),sX=t=>{let e={};return t.forEach((n,r)=>{e[r]=n}),e},aX=(t,e,n)=>t.document?t:{document:t,variables:e,requestHeaders:n,signal:void 0},lX=(t,e,n)=>t.query?t:{query:t,variables:e,requestHeaders:n,signal:void 0},cX=(t,e)=>t.documents?t:{documents:t,requestHeaders:e,signal:void 0},mg=t=>{var e,n;let r,i=t.definitions.filter(o=>o.kind==="OperationDefinition");return i.length===1&&(r=(n=(e=i[0])==null?void 0:e.name)==null?void 0:n.value),r},Mc=t=>{if(typeof t=="string"){let n;try{let r=Jb(t);n=mg(r)}catch(r){}return{query:t,operationName:n}}let e=mg(t);return{query:Yb(t),operationName:e}},Kb=class Zs extends Error{constructor(e,n){let r=`${Zs.extractMessage(e)}: ${JSON.stringify({response:e,request:n})}`;super(r),Object.setPrototypeOf(this,Zs.prototype),this.response=e,this.request=n,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,Zs)}static extractMessage(e){var n,r,i;return(i=(r=(n=e.errors)==null?void 0:n[0])==null?void 0:r.message)!=null?i:`GraphQL Error (Code: ${e.status})`}},uX=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};cu={exports:{}};(function(t,e){var n=typeof self<"u"?self:uX,r=(function(){function o(){this.fetch=!1,this.DOMException=n.DOMException}return o.prototype=n,new o})();(function(o){(function(s){var a={searchParams:"URLSearchParams"in o,iterable:"Symbol"in o&&"iterator"in Symbol,blob:"FileReader"in o&&"Blob"in o&&(function(){try{return new Blob,!0}catch(y){return!1}})(),formData:"FormData"in o,arrayBuffer:"ArrayBuffer"in o};function c(y){return y&&DataView.prototype.isPrototypeOf(y)}if(a.arrayBuffer)var l=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],u=ArrayBuffer.isView||function(y){return y&&l.indexOf(Object.prototype.toString.call(y))>-1};function h(y){if(typeof y!="string"&&(y=String(y)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(y))throw new TypeError("Invalid character in header field name");return y.toLowerCase()}function p(y){return typeof y!="string"&&(y=String(y)),y}function f(y){var b={next:function(){var Z=y.shift();return{done:Z===void 0,value:Z}}};return a.iterable&&(b[Symbol.iterator]=function(){return b}),b}function m(y){this.map={},y instanceof m?y.forEach(function(b,Z){this.append(Z,b)},this):Array.isArray(y)?y.forEach(function(b){this.append(b[0],b[1])},this):y&&Object.getOwnPropertyNames(y).forEach(function(b){this.append(b,y[b])},this)}m.prototype.append=function(y,b){y=h(y),b=p(b);var Z=this.map[y];this.map[y]=Z?Z+", "+b:b},m.prototype.delete=function(y){delete this.map[h(y)]},m.prototype.get=function(y){return y=h(y),this.has(y)?this.map[y]:null},m.prototype.has=function(y){return this.map.hasOwnProperty(h(y))},m.prototype.set=function(y,b){this.map[h(y)]=p(b)},m.prototype.forEach=function(y,b){for(var Z in this.map)this.map.hasOwnProperty(Z)&&y.call(b,this.map[Z],Z,this)},m.prototype.keys=function(){var y=[];return this.forEach(function(b,Z){y.push(Z)}),f(y)},m.prototype.values=function(){var y=[];return this.forEach(function(b){y.push(b)}),f(y)},m.prototype.entries=function(){var y=[];return this.forEach(function(b,Z){y.push([Z,b])}),f(y)},a.iterable&&(m.prototype[Symbol.iterator]=m.prototype.entries);function d(y){if(y.bodyUsed)return Promise.reject(new TypeError("Already read"));y.bodyUsed=!0}function v(y){return new Promise(function(b,Z){y.onload=function(){b(y.result)},y.onerror=function(){Z(y.error)}})}function g(y){var b=new FileReader,Z=v(b);return b.readAsArrayBuffer(y),Z}function w(y){var b=new FileReader,Z=v(b);return b.readAsText(y),Z}function R(y){for(var b=new Uint8Array(y),Z=new Array(b.length),D=0;D<b.length;D++)Z[D]=String.fromCharCode(b[D]);return Z.join("")}function E(y){if(y.slice)return y.slice(0);var b=new Uint8Array(y.byteLength);return b.set(new Uint8Array(y)),b.buffer}function T(){return this.bodyUsed=!1,this.Pr=function(y){this._t=y,y?typeof y=="string"?this.Ye=y:a.blob&&Blob.prototype.isPrototypeOf(y)?this.ee=y:a.formData&&FormData.prototype.isPrototypeOf(y)?this.Mr=y:a.searchParams&&URLSearchParams.prototype.isPrototypeOf(y)?this.Ye=y.toString():a.arrayBuffer&&a.blob&&c(y)?(this.F=E(y.buffer),this._t=new Blob([this.F])):a.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(y)||u(y))?this.F=E(y):this.Ye=y=Object.prototype.toString.call(y):this.Ye="",this.headers.get("content-type")||(typeof y=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this.ee&&this.ee.type?this.headers.set("content-type",this.ee.type):a.searchParams&&URLSearchParams.prototype.isPrototypeOf(y)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},a.blob&&(this.blob=function(){var y=d(this);if(y)return y;if(this.ee)return Promise.resolve(this.ee);if(this.F)return Promise.resolve(new Blob([this.F]));if(this.Mr)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this.Ye]))},this.arrayBuffer=function(){return this.F?d(this)||Promise.resolve(this.F):this.blob().then(g)}),this.text=function(){var y=d(this);if(y)return y;if(this.ee)return w(this.ee);if(this.F)return Promise.resolve(R(this.F));if(this.Mr)throw new Error("could not read FormData body as text");return Promise.resolve(this.Ye)},a.formData&&(this.formData=function(){return this.text().then(C)}),this.json=function(){return this.text().then(JSON.parse)},this}var x=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function N(y){var b=y.toUpperCase();return x.indexOf(b)>-1?b:y}function U(y,b){b=b||{};var Z=b.body;if(y instanceof U){if(y.bodyUsed)throw new TypeError("Already read");this.url=y.url,this.credentials=y.credentials,b.headers||(this.headers=new m(y.headers)),this.method=y.method,this.mode=y.mode,this.signal=y.signal,!Z&&y._t!=null&&(Z=y._t,y.bodyUsed=!0)}else this.url=String(y);if(this.credentials=b.credentials||this.credentials||"same-origin",(b.headers||!this.headers)&&(this.headers=new m(b.headers)),this.method=N(b.method||this.method||"GET"),this.mode=b.mode||this.mode||null,this.signal=b.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&Z)throw new TypeError("Body not allowed for GET or HEAD requests");this.Pr(Z)}U.prototype.clone=function(){return new U(this,{body:this._t})};function C(y){var b=new FormData;return y.trim().split("&").forEach(function(Z){if(Z){var D=Z.split("="),M=D.shift().replace(/\+/g," "),G=D.join("=").replace(/\+/g," ");b.append(decodeURIComponent(M),decodeURIComponent(G))}}),b}function O(y){var b=new m,Z=y.replace(/\r?\n[\t ]+/g," ");return Z.split(/\r?\n/).forEach(function(D){var M=D.split(":"),G=M.shift().trim();if(G){var it=M.join(":").trim();b.append(G,it)}}),b}T.call(U.prototype);function P(y,b){b||(b={}),this.type="default",this.status=b.status===void 0?200:b.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in b?b.statusText:"OK",this.headers=new m(b.headers),this.url=b.url||"",this.Pr(y)}T.call(P.prototype),P.prototype.clone=function(){return new P(this._t,{status:this.status,statusText:this.statusText,headers:new m(this.headers),url:this.url})},P.error=function(){var y=new P(null,{status:0,statusText:""});return y.type="error",y};var st=[301,302,303,307,308];P.redirect=function(y,b){if(st.indexOf(b)===-1)throw new RangeError("Invalid status code");return new P(null,{status:b,headers:{location:y}})},s.DOMException=o.DOMException;try{new s.DOMException}catch(y){s.DOMException=function(b,Z){this.message=b,this.name=Z;var D=Error(b);this.stack=D.stack},s.DOMException.prototype=Object.create(Error.prototype),s.DOMException.prototype.constructor=s.DOMException}function lt(y,b){return new Promise(function(Z,D){var M=new U(y,b);if(M.signal&&M.signal.aborted)return D(new s.DOMException("Aborted","AbortError"));var G=new XMLHttpRequest;function it(){G.abort()}G.onload=function(){var ct={status:G.status,statusText:G.statusText,headers:O(G.getAllResponseHeaders()||"")};ct.url="responseURL"in G?G.responseURL:ct.headers.get("X-Request-URL");var Gt="response"in G?G.response:G.responseText;Z(new P(Gt,ct))},G.onerror=function(){D(new TypeError("Network request failed"))},G.ontimeout=function(){D(new TypeError("Network request failed"))},G.onabort=function(){D(new s.DOMException("Aborted","AbortError"))},G.open(M.method,M.url,!0),M.credentials==="include"?G.withCredentials=!0:M.credentials==="omit"&&(G.withCredentials=!1),"responseType"in G&&a.blob&&(G.responseType="blob"),M.headers.forEach(function(ct,Gt){G.setRequestHeader(Gt,ct)}),M.signal&&(M.signal.addEventListener("abort",it),G.onreadystatechange=function(){G.readyState===4&&M.signal.removeEventListener("abort",it)}),G.send(typeof M._t>"u"?null:M._t)})}return lt.polyfill=!0,o.fetch||(o.fetch=lt,o.Headers=m,o.Request=U,o.Response=P),s.Headers=m,s.Request=U,s.Response=P,s.fetch=lt,Object.defineProperty(s,"__esModule",{value:!0}),s})({})})(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var i=r;e=i.fetch,e.default=i.fetch,e.fetch=i.fetch,e.Headers=i.Headers,e.Request=i.Request,e.Response=i.Response,t.exports=e})(cu,cu.exports);Ps=cu.exports,ks=_b(Ps),hX=bL({__proto__:null,default:ks},[Ps]),Qn=t=>{let e={};return t&&(typeof Headers<"u"&&t instanceof Headers||hX&&Ps.Headers&&t instanceof Ps.Headers?e=sX(t):Array.isArray(t)?t.forEach(([n,r])=>{n&&r!==void 0&&(e[n]=r)}):e=t),e},yg=t=>t.replace(/([\s,]|#[^\n\r]+)+/g," ").trim(),pX=t=>{if(!Array.isArray(t.query)){let r=t,i=[`query=${encodeURIComponent(yg(r.query))}`];return t.variables&&i.push(`variables=${encodeURIComponent(r.jsonSerializer.stringify(r.variables))}`),r.operationName&&i.push(`operationName=${encodeURIComponent(r.operationName)}`),i.join("&")}if(typeof t.variables<"u"&&!Array.isArray(t.variables))throw new Error("Cannot create query with given variable type, array expected");let e=t,n=t.query.reduce((r,i,o)=>(r.push({query:yg(i),variables:e.variables?e.jsonSerializer.stringify(e.variables[o]):void 0}),r),[]);return`query=${encodeURIComponent(e.jsonSerializer.stringify(n))}`},dX=t=>e=>or(void 0,null,function*(){var n;let{url:r,query:i,variables:o,operationName:s,fetch:a,fetchOptions:c,middleware:l}=e,u=$({},e.headers),h="",p;t==="POST"?(p=mX(i,o,s,c.jsonSerializer),typeof p=="string"&&(u["Content-Type"]="application/json")):h=pX({query:i,variables:o,operationName:s,jsonSerializer:(n=c.jsonSerializer)!=null?n:ph});let f=$({method:t,headers:u,body:p},c),m=r,d=f;if(l){let v=yield Promise.resolve(l(ir($({},f),{url:r,operationName:s,variables:o}))),{url:g}=v,w=ci(v,["url"]);m=g,d=w}return h&&(m=`${m}?${h}`),yield a(m,d)}),fX=class{constructor(t,e={}){this.url=t,this.requestConfig=e,this.rawRequest=(...n)=>or(this,null,function*(){let[r,i,o]=n,s=lX(r,i,o),a=this.requestConfig,{headers:c,fetch:l=ks,method:u="POST",requestMiddleware:h,responseMiddleware:p}=a,f=ci(a,["headers","fetch","method","requestMiddleware","responseMiddleware"]),{url:m}=this;s.signal!==void 0&&(f.signal=s.signal);let{operationName:d}=Mc(s.query);return Fc({url:m,query:s.query,variables:s.variables,headers:$($({},Qn(Ac(c))),Qn(s.requestHeaders)),operationName:d,fetch:l,method:u,fetchOptions:f,middleware:h}).then(v=>(p&&p(v),v)).catch(v=>{throw p&&p(v),v})})}request(t,...e){return or(this,null,function*(){let[n,r]=e,i=aX(t,n,r),o=this.requestConfig,{headers:s,fetch:a=ks,method:c="POST",requestMiddleware:l,responseMiddleware:u}=o,h=ci(o,["headers","fetch","method","requestMiddleware","responseMiddleware"]),{url:p}=this;i.signal!==void 0&&(h.signal=i.signal);let{query:f,operationName:m}=Mc(i.document);return Fc({url:p,query:f,variables:i.variables,headers:$($({},Qn(Ac(s))),Qn(i.requestHeaders)),operationName:m,fetch:a,method:c,fetchOptions:h,middleware:l}).then(d=>(u&&u(d),d.data)).catch(d=>{throw u&&u(d),d})})}batchRequests(t,e){var n;let r=cX(t,e),i=this.requestConfig,{headers:o}=i,s=ci(i,["headers"]);r.signal!==void 0&&(s.signal=r.signal);let a=r.documents.map(({document:l})=>Mc(l).query),c=r.documents.map(({variables:l})=>l);return Fc({url:this.url,query:a,variables:c,headers:$($({},Qn(Ac(o))),Qn(r.requestHeaders)),operationName:void 0,fetch:(n=this.requestConfig.fetch)!=null?n:ks,method:this.requestConfig.method||"POST",fetchOptions:s,middleware:this.requestConfig.requestMiddleware}).then(l=>(this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(l),l.data)).catch(l=>{throw this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(l),l})}setHeaders(t){return this.requestConfig.headers=t,this}setHeader(t,e){let{headers:n}=this.requestConfig;return n?n[t]=e:this.requestConfig.headers={[t]:e},this}setEndpoint(t){return this.url=t,this}},Fc=t=>or(void 0,null,function*(){var e,n;let{query:r,variables:i,fetchOptions:o}=t,s=dX(oX((e=t.method)!=null?e:"post")),a=Array.isArray(t.query),c=yield s(t),l=yield yX(c,(n=o.jsonSerializer)!=null?n:ph),u=Array.isArray(l)?!l.some(({data:p})=>!p):!!l.data,h=Array.isArray(l)||!l.errors||Array.isArray(l.errors)&&!l.errors.length||o.errorPolicy==="all"||o.errorPolicy==="ignore";if(c.ok&&h&&u){let p=l,f=ci(p,["errors"]),m=o.errorPolicy==="ignore"?f:l;return ir($({},a?{data:m}:m),{headers:c.headers,status:c.status})}else{let p=typeof l=="string"?{error:l}:l;throw new Kb(ir($({},p),{status:c.status,headers:c.headers}),{query:r,variables:i})}}),mX=(t,e,n,r)=>{let i=r!=null?r:ph;if(!Array.isArray(t))return i.stringify({query:t,variables:e,operationName:n});if(typeof e<"u"&&!Array.isArray(e))throw new Error("Cannot create request body with given variable type, array expected");let o=t.reduce((s,a,c)=>(s.push({query:a,variables:e?e[c]:void 0}),s),[]);return i.stringify(o)},yX=(t,e)=>or(void 0,null,function*(){let n;return t.headers.forEach((r,i)=>{i.toLowerCase()==="content-type"&&(n=r)}),n&&(n.toLowerCase().startsWith("application/json")||n.toLowerCase().startsWith("application/graphql+json")||n.toLowerCase().startsWith("application/graphql-response+json"))?e.parse(yield t.text()):t.text()}),Ac=t=>typeof t=="function"?t():t,uu={exports:{}};(function(t,e){e=t.exports=n,e.getSerialize=r;function n(i,o,s,a){return JSON.stringify(i,r(o,a),s)}function r(i,o){var s=[],a=[];return o==null&&(o=function(c,l){return s[0]===l?"[Circular ~]":"[Circular ~."+a.slice(0,s.indexOf(l)).join(".")+"]"}),function(c,l){if(s.length>0){var u=s.indexOf(this);~u?s.splice(u+1):s.push(this),~u?a.splice(u,1/0,c):a.push(c),~s.indexOf(l)&&(l=o.call(this,c,l))}else s.push(l);return i==null?l:i.call(this,c,l)}}})(uu,uu.exports);gX=uu.exports,bX=_b(gX),Ms=function(){return Ms=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Ms.apply(this,arguments)},Vs=new Map,hu=new Map,Hb=!0,Fs=!1;$r={gql:At,resetCaches:TX,disableFragmentWarnings:EX,enableExperimentalFragmentVariables:RX,disableExperimentalFragmentVariables:CX};(function(t){t.gql=$r.gql,t.resetCaches=$r.resetCaches,t.disableFragmentWarnings=$r.disableFragmentWarnings,t.enableExperimentalFragmentVariables=$r.enableExperimentalFragmentVariables,t.disableExperimentalFragmentVariables=$r.disableExperimentalFragmentVariables})(At||(At={}));At.default=At;Bb=At`
60
60
  fragment MatchParts on MatchConfig {
61
61
  regexValue
62
62
  matchValue
63
63
  }
64
- `,Pb=Ft`
64
+ `,jb=At`
65
65
  mutation PushPayload(
66
66
  $session_secure_id: String!
67
67
  $payload_id: ID!
@@ -87,7 +87,7 @@ spurious results.`)}}return!1},Vb=class{constructor(t,e="GraphQL request",n={lin
87
87
  highlight_logs: $highlight_logs
88
88
  )
89
89
  }
90
- `,sX=Ft`
90
+ `,ZX=At`
91
91
  mutation PushPayloadCompressed(
92
92
  $session_secure_id: String!
93
93
  $payload_id: ID!
@@ -99,7 +99,7 @@ spurious results.`)}}return!1},Vb=class{constructor(t,e="GraphQL request",n={lin
99
99
  data: $data
100
100
  )
101
101
  }
102
- `,aX=Ft`
102
+ `,kX=At`
103
103
  mutation identifySession(
104
104
  $session_secure_id: String!
105
105
  $user_identifier: String!
@@ -111,7 +111,7 @@ spurious results.`)}}return!1},Vb=class{constructor(t,e="GraphQL request",n={lin
111
111
  user_object: $user_object
112
112
  )
113
113
  }
114
- `,lX=Ft`
114
+ `,VX=At`
115
115
  mutation addSessionProperties(
116
116
  $session_secure_id: String!
117
117
  $properties_object: Any
@@ -121,11 +121,11 @@ spurious results.`)}}return!1},Vb=class{constructor(t,e="GraphQL request",n={lin
121
121
  properties_object: $properties_object
122
122
  )
123
123
  }
124
- `,cX=Ft`
124
+ `,xX=At`
125
125
  mutation pushMetrics($metrics: [MetricInput]!) {
126
126
  pushMetrics(metrics: $metrics)
127
127
  }
128
- `,uX=Ft`
128
+ `,OX=At`
129
129
  mutation addSessionFeedback(
130
130
  $session_secure_id: String!
131
131
  $user_name: String
@@ -141,7 +141,7 @@ spurious results.`)}}return!1},Vb=class{constructor(t,e="GraphQL request",n={lin
141
141
  timestamp: $timestamp
142
142
  )
143
143
  }
144
- `,hX=Ft`
144
+ `,NX=At`
145
145
  mutation initializeSession(
146
146
  $session_secure_id: String!
147
147
  $organization_verbose_id: String!
@@ -226,12 +226,12 @@ spurious results.`)}}return!1},Vb=class{constructor(t,e="GraphQL request",n={lin
226
226
  }
227
227
  }
228
228
  }
229
- ${Ub}
230
- `,pX=Ft`
229
+ ${Bb}
230
+ `,GX=At`
231
231
  query Ignore($id: ID!) {
232
232
  ignore(id: $id)
233
233
  }
234
- `,dX=Ft`
234
+ `,LX=At`
235
235
  query GetSamplingConfig($organization_verbose_id: String!) {
236
236
  sampling(organization_verbose_id: $organization_verbose_id) {
237
237
  spans {
@@ -280,82 +280,82 @@ spurious results.`)}}return!1},Vb=class{constructor(t,e="GraphQL request",n={lin
280
280
  }
281
281
  }
282
282
  }
283
- ${Ub}
284
- `,fX=(t,e,n,r)=>t();Mb=(t=>(t.Device="Device",t.WebVital="WebVital",t.Performance="Performance",t.Frontend="Frontend",t.Backend="Backend",t))(Mb||{});og=1e3,bX=1e3*2,vX=14400*1e3,Fb=900*1e3,sg={normal:{bytes:1e7,time:240*1e3},canvas:{bytes:16e6,time:5e3}},wX=100,ag="app.highlight.io",SX="app.launchdarkly.com",IX={"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"},TX="/projects/default",EX=new RegExp("pub\\.(?<domain>.+)");RX={read:function(t){return t[0]==='"'&&(t=t.slice(1,-1)),t.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(t){return encodeURIComponent(t).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};Wc=su(RX,{path:"/"}),au=(t=>(t.CLIENT_ID="highlightClientID",t))(au||{}),ah="localStorage",lu=!0,CX=class{constructor(){di(this,"storage",{})}getItem(t){var e;return(e=this.storage[t])!=null?e:""}setItem(t,e){this.storage[t]=e}removeItem(t){delete this.storage[t]}},cu=class{getItem(e){var n;return(n=Wc.get(e))!=null?n:""}setItem(e,n){if(!lu)return;let r=new Date;r.setTime(r.getTime()+Fb),Wc.set(e,n,{expires:r})}removeItem(e){lu&&Wc.remove(e)}},aa=new CX,Ps=new cu,lh=()=>{try{switch(ah){case"localStorage":return window.localStorage;case"sessionStorage":return window.sessionStorage}}catch(t){return aa}},ZX=t=>{ah=t},lg=t=>{lu=t},re=t=>{try{return lh().getItem(t)}catch(e){return Ht("storage","debug",`failed to get item ${t}; using global storage`,e),aa.getItem(t)}},ze=(t,e)=>{Ps.setItem(t,e);try{return lh().setItem(t,e)}catch(n){return Ht("storage","debug",`failed to set item ${t}; using global storage`,n),aa.setItem(t,e)}},uu=t=>{Ps.removeItem(t);try{return lh().removeItem(t)}catch(e){return Ht("storage","debug",`failed to remove item ${t}; using global storage`,e),aa.removeItem(t)}},kX=t=>{if(ah==="sessionStorage"){console.warn("highlight.io cannot use local storage; segment integration will not work");return}let e=window.localStorage.setItem;window.localStorage.setItem=function(){let[n,r]=arguments;t({keyName:n,keyValue:r}),e.apply(this,[n,r])}},_t=(t=>(t.SEGMENT_LAST_SENT_HASH_KEY="HIGHLIGHT_SEGMENT_LAST_SENT_HASH_KEY",t.SESSION_ID="sessionID",t.SESSION_DATA="sessionData",t.USER_IDENTIFIER="highlightIdentifier",t.USER_OBJECT="highlightUserObject",t))(_t||{}),la=t=>`${_t.SESSION_DATA}_${t}`,VX=()=>{var t;return typeof globalThis<"u"&&(t=globalThis.persistentSessionSecureID)!=null&&t.length?globalThis.persistentSessionSecureID:Ab()},xX=t=>{typeof globalThis<"u"&&t!=null&&t.length&&(globalThis.persistentSessionSecureID=t)},Ab=()=>{var t;return(t=re(_t.SESSION_ID))!=null?t:""},li=t=>{ze(_t.SESSION_ID,t)},NX=t=>{let e=la(t);return JSON.parse(re(e)||"{}")},Zs=t=>{t||(t=Ab());let e=NX(t);if(e&&e.lastPushTime&&Date.now()-e.lastPushTime<Fb)return e;uu(la(t))},Sn=function(t){if(!(t!=null&&t.sessionSecureID))return;let e=t.sessionSecureID;xX(e),ze(la(e),JSON.stringify(t))},OX=function(){let t=Ps.getItem(_t.SESSION_ID);li(t);let e=la(t),n=Ps.getItem(e);try{Sn(JSON.parse(n))}catch(r){}},Jb=(t=>(t.BillingQuotaExceeded="BillingQuotaExceeded",t))(Jb||{}),GX=10,LX=1e3,XX=500,WX=[Jb.BillingQuotaExceeded.toString()],UX=t=>{var e;return((e=t.response.errors)==null?void 0:e.find(n=>WX.includes(n.message)))===void 0},PX=()=>{let t=(e,n,r,i,o=0)=>ir(void 0,null,function*(){try{return yield e()}catch(s){if(s instanceof Gb&&!UX(s))throw s;if(o<GX)return yield new Promise(a=>setTimeout(a,LX+XX*Math.pow(2,o))),yield t(e,n,r,i,o+1);throw console.error(`highlight.io: data request failed after ${o} retries`),s}});return t},MX="$ld:telemetry:session:init",FX="$ld:telemetry:error",cg="$ld:telemetry:track",AX="$ld:telemetry:metric",JX="document_load";KX=class{constructor(t,e){di(this,"client"),di(this,"metadata"),this.client=t,this.metadata=e}getHooks(t){return[]}init(t){this.client.track(MX,{sessionID:t})}recordGauge(t,e){var n;e.category!==Mb.WebVital&&e.name!==JX||e.name!=="Jank"&&this.client.track(`${AX}:${e.name.toLowerCase()}`,rr($({},(n=e.tags)==null?void 0:n.map(r=>({[r.name]:r.value})).reduce((r,i)=>$($({},r),i),{})),{category:e.category,group:e.group,sessionID:t}),e.value)}identify(t,e,n={},r){}error(t,e){this.client.track(FX,rr($({},e),{sessionID:t}))}track(t,e){let n=e.event;this.client.track(n?`${cg}:${n}`:cg,rr($({},e),{sessionID:t}))}},hu=class extends Bn{constructor(e,n){super(),di(this,"client"),this.client=new KX(e,n)}getHooks(e){return[{getMetadata:()=>({name:"highlight.run/ld"}),afterIdentify:(n,r,i)=>(this.load(this.client),r)}]}init(e){return this.h("init",[e])}recordGauge(e,n){return this.h("recordGauge",[e,n])}identify(e,n,r={},i){return this.h("identify",[e,n,r,i])}error(e,n){return this.h("error",[e,n])}track(e,n){return this.h("track",[e,n])}};HX=t=>{let e="",n=t.getAttribute("class"),r=t.getAttribute("id");return r&&(e=e.concat(ug(r,"#"))),n&&(e=e.concat(ug(n,"."))),e===""&&(e=e.concat(t.tagName.toLowerCase())),e},ug=(t,e)=>`${e}${t.trim().split(" ").join(e)}`,zX=t=>{let e,n=()=>{clearTimeout(e),e=setTimeout(()=>{var r,i;t({height:window.innerHeight,width:window.innerWidth,availHeight:window.screen.availHeight,availWidth:window.screen.availWidth,colorDepth:window.screen.colorDepth,pixelDepth:window.screen.pixelDepth,orientation:(i=(r=window.screen.orientation)==null?void 0:r.angle)!=null?i:0})},500)};return window.addEventListener("resize",n),n(),()=>window.removeEventListener("resize",n)},pu=()=>{var t;let e="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";var n="";let r=typeof window<"u"&&((t=window.crypto)==null?void 0:t.getRandomValues),i=new Uint32Array(28);r&&window.crypto.getRandomValues(i);for(let o=0;o<28;o++)r?n+=e.charAt(i[o]%e.length):n+=e.charAt(Math.floor(Math.random()*e.length));return n},BX=class{constructor(t){di(this,"sessionSecureID");try{t!=null&&t.storageMode&&ZX(t==null?void 0:t.storageMode),lg(!!(t!=null&&t.sessionCookie)),t!=null&&t.sessionCookie?OX():lg(!1);let e=VX(),n=Zs(e);n!=null&&n.sessionSecureID?this.sessionSecureID=n.sessionSecureID:(this.sessionSecureID=pu(),li(this.sessionSecureID),Sn({sessionSecureID:this.sessionSecureID,projectID:0,payloadID:1,sessionStartTime:Date.now(),lastPushTime:Date.now()}))}catch(e){Ht("Error initializing @launchdarkly observability plugin","error",e)}}},jX=(t,e,n)=>new Promise((r,i)=>{var o=c=>{try{a(n.next(c))}catch(l){i(l)}},s=c=>{try{a(n.throw(c))}catch(l){i(l)}},a=c=>c.done?r(c.value):Promise.resolve(c.value).then(o,s);a((n=n.apply(t,e)).next())}),Ms=class extends Bn{getSession(){return this.xn?this.h("getSession",[]):null}start(e){return jX(this,null,function*(){return this.h("start",[e])})}stop(e){return this.h("stop",[e])}getRecordingState(){return this.xn?this.h("getRecordingState",[]):"NotRecording"}snapshot(e){return this.xn?this.h("snapshot",[e]):Promise.resolve(void 0)}register(e,n){return this.h("register",[e,n])}};typeof globalThis<"u"?globalThis.LDRecord?In=globalThis.LDRecord:(In=new Ms,globalThis.LDRecord=In):In=new Ms;QX=Object.defineProperty,$X=Object.defineProperties,qX=Object.getOwnPropertyDescriptors,Fs=Object.getOwnPropertySymbols,_b=Object.prototype.hasOwnProperty,Hb=Object.prototype.propertyIsEnumerable,du=(t,e,n)=>e in t?QX(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,z=(t,e)=>{for(var n in e||(e={}))_b.call(e,n)&&du(t,n,e[n]);if(Fs)for(var n of Fs(e))Hb.call(e,n)&&du(t,n,e[n]);return t},Kt=(t,e)=>$X(t,qX(e)),or=(t,e)=>{var n={};for(var r in t)_b.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Fs)for(var r of Fs(t))e.indexOf(r)<0&&Hb.call(t,r)&&(n[r]=t[r]);return n},Y=(t,e,n)=>du(t,typeof e!="symbol"?e+"":e,n),Yt=(t,e,n)=>new Promise((r,i)=>{var o=c=>{try{a(n.next(c))}catch(l){i(l)}},s=c=>{try{a(n.throw(c))}catch(l){i(l)}},a=c=>c.done?r(c.value):Promise.resolve(c.value).then(o,s);a((n=n.apply(t,e)).next())}),tW={key:"_sid"},eW="rrweb/sequential-id@1",nW=t=>{let e=tW,n=0;return{name:eW,eventProcessor(r){return Object.assign(r,{[e.key]:++n}),r},options:e}},rW=Object.defineProperty,iW=(t,e,n)=>e in t?rW(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,k=(t,e,n)=>iW(t,typeof e!="symbol"?e+"":e,n),oW=Object.defineProperty,sW=(t,e,n)=>e in t?oW(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,pg=(t,e,n)=>sW(t,typeof e!="symbol"?e+"":e,n),Et=(t=>(t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment",t))(Et||{}),dg={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},fg={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},es={},aW=()=>!!globalThis.Zone;Uc={};Pc={};xt={childNodes:lW,parentNode:cW,parentElement:uW,textContent:hW,contains:pW,getRootNode:dW,host:fW,styleSheets:mW,shadowRoot:yW,querySelector:gW,querySelectorAll:bW,mutationObserver:vW,patch:wW};As=class{constructor(){pg(this,"idNodeMap",new Map),pg(this,"nodeMetaMap",new WeakMap)}getId(e){var n;if(!e)return-1;let r=(n=this.getMeta(e))==null?void 0:n.id;return r!=null?r:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){let n=this.getId(e);this.idNodeMap.delete(n),e.childNodes&&e.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,n){let r=n.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,n)}replace(e,n){let r=this.getNode(e);if(r){let i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(n,i)}this.idNodeMap.set(e,n)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};mg="__rrweb_original__";VW=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,xW=/^(?:[a-z+]+:)?\/\//i,NW=/^www\..*/i,OW=/^(data:)([^,]*),(.*)/i;XW=new RegExp(/[a-zA-Z0-9.!#$%&'*+=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:.[a-zA-Z0-9-]+)*/),WW=new RegExp(/[0-9]{9,16}/),UW=new RegExp(/[0-9]{3}-?[0-9]{2}-?[0-9]{4}/),PW=new RegExp(/[+]?[(]?[0-9]{3}[)]?[-\s.]?[0-9]{3}[-\s.]?[0-9]{4,6}/),MW=new RegExp(/[0-9]{4}-?[0-9]{4}-?[0-9]{4}-?[0-9]{4}/),FW=new RegExp(/[0-9]{1,5}.?[0-9]{0,3}\s[a-zA-Z]{2,30}\s[a-zA-Z]{2,15}/),AW=new RegExp(/(?:[0-9]{1,3}.){3}[0-9]{1,3}/),JW=[XW,WW,UW,PW,MW,FW,AW];qb=({maskInputOptions:t,tagName:e,type:n,overwriteRecord:r})=>{let i=n&&n.toLowerCase();return r!=="true"&&(!!t[e.toLowerCase()]||!!(i&&t[i]))},DW=1,YW=new RegExp("[^a-z0-9-_:]"),mi=-2;_W=/^[^ \t\n\r\u000c]+/,HW=/^[, \t\n\r\u000c]+/;gg=new WeakMap;ph={exports:{}},_=String,iv=function(){return{isColorSupported:!1,reset:_,bold:_,dim:_,italic:_,underline:_,inverse:_,hidden:_,strikethrough:_,black:_,red:_,green:_,yellow:_,blue:_,magenta:_,cyan:_,white:_,gray:_,bgBlack:_,bgRed:_,bgGreen:_,bgYellow:_,bgBlue:_,bgMagenta:_,bgCyan:_,bgWhite:_,blackBright:_,redBright:_,greenBright:_,yellowBright:_,blueBright:_,magentaBright:_,cyanBright:_,whiteBright:_,bgBlackBright:_,bgRedBright:_,bgGreenBright:_,bgYellowBright:_,bgBlueBright:_,bgMagentaBright:_,bgCyanBright:_,bgWhiteBright:_}};ph.exports=iv();ph.exports.createColors=iv;o2=ph.exports,s2={},a2=Object.freeze(Object.defineProperty({__proto__:null,default:s2},Symbol.toStringTag,{value:"Module"})),ce=i2(a2),vg=o2,wg=ce,yu=class ov extends Error{constructor(e,n,r,i,o,s){super(e),this.name="CssSyntaxError",this.reason=e,o&&(this.file=o),i&&(this.source=i),s&&(this.plugin=s),typeof n<"u"&&typeof r<"u"&&(typeof n=="number"?(this.line=n,this.column=r):(this.line=n.line,this.column=n.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,ov)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let n=this.source;e==null&&(e=vg.isColorSupported);let r=u=>u,i=u=>u,o=u=>u;if(e){let{bold:u,gray:h,red:p}=vg.createColors(!0);i=f=>u(p(f)),r=f=>h(f),wg&&(o=f=>wg(f))}let s=n.split(/\r?\n/),a=Math.max(this.line-3,0),c=Math.min(this.line+2,s.length),l=String(c).length;return s.slice(a,c).map((u,h)=>{let p=a+1+h,f=" "+(" "+p).slice(-l)+" | ";if(p===this.line){if(u.length>160){let d=20,v=Math.max(0,this.column-d),g=Math.max(this.column+d,this.endColumn+d),w=u.slice(v,g),R=r(f.replace(/\d/g," "))+u.slice(0,Math.min(this.column-1,d-1)).replace(/[^\t]/g," ");return i(">")+r(f)+o(w)+`
283
+ ${Bb}
284
+ `,XX=(t,e,n,r)=>t();Qb=(t=>(t.Device="Device",t.WebVital="WebVital",t.Performance="Performance",t.Frontend="Frontend",t.Backend="Backend",t))(Qb||{});gg=1e3,MX=1e3*2,FX=14400*1e3,$b=900*1e3,bg={normal:{bytes:1e7,time:240*1e3},canvas:{bytes:16e6,time:5e3}},AX=100,vg="app.highlight.io",JX="app.launchdarkly.com",DX={"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"},YX="/projects/default",KX=new RegExp("pub\\.(?<domain>.+)");_X={read:function(t){return t[0]==='"'&&(t=t.slice(1,-1)),t.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(t){return encodeURIComponent(t).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};Jc=pu(_X,{path:"/"}),du=(t=>(t.CLIENT_ID="highlightClientID",t))(du||{}),dh="localStorage",fu=!0,HX=class{constructor(){mi(this,"storage",{})}getItem(t){var e;return(e=this.storage[t])!=null?e:""}setItem(t,e){this.storage[t]=e}removeItem(t){delete this.storage[t]}},mu=class{getItem(e){var n;return(n=Jc.get(e))!=null?n:""}setItem(e,n){if(!fu)return;let r=new Date;r.setTime(r.getTime()+$b),Jc.set(e,n,{expires:r})}removeItem(e){fu&&Jc.remove(e)}},ua=new HX,As=new mu,fh=()=>{try{switch(dh){case"localStorage":return window.localStorage;case"sessionStorage":return window.sessionStorage}}catch(t){return ua}},zX=t=>{dh=t},wg=t=>{fu=t},oe=t=>{try{return fh().getItem(t)}catch(e){return Bt("storage","debug",`failed to get item ${t}; using global storage`,e),ua.getItem(t)}},Be=(t,e)=>{As.setItem(t,e);try{return fh().setItem(t,e)}catch(n){return Bt("storage","debug",`failed to set item ${t}; using global storage`,n),ua.setItem(t,e)}},yu=t=>{As.removeItem(t);try{return fh().removeItem(t)}catch(e){return Bt("storage","debug",`failed to remove item ${t}; using global storage`,e),ua.removeItem(t)}},BX=t=>{if(dh==="sessionStorage"){console.warn("highlight.io cannot use local storage; segment integration will not work");return}let e=window.localStorage.setItem;window.localStorage.setItem=function(){let[n,r]=arguments;t({keyName:n,keyValue:r}),e.apply(this,[n,r])}},zt=(t=>(t.SEGMENT_LAST_SENT_HASH_KEY="HIGHLIGHT_SEGMENT_LAST_SENT_HASH_KEY",t.SESSION_ID="sessionID",t.SESSION_DATA="sessionData",t.USER_IDENTIFIER="highlightIdentifier",t.USER_OBJECT="highlightUserObject",t))(zt||{}),ha=t=>`${zt.SESSION_DATA}_${t}`,jX=()=>{var t;return typeof globalThis<"u"&&(t=globalThis.persistentSessionSecureID)!=null&&t.length?globalThis.persistentSessionSecureID:qb()},QX=t=>{typeof globalThis<"u"&&t!=null&&t.length&&(globalThis.persistentSessionSecureID=t)},qb=()=>{var t;return(t=oe(zt.SESSION_ID))!=null?t:""},ui=t=>{Be(zt.SESSION_ID,t)},$X=t=>{let e=ha(t);return JSON.parse(oe(e)||"{}")},xs=t=>{t||(t=qb());let e=$X(t);if(e&&e.lastPushTime&&Date.now()-e.lastPushTime<$b)return e;yu(ha(t))},In=function(t){if(!(t!=null&&t.sessionSecureID))return;let e=t.sessionSecureID;QX(e),Be(ha(e),JSON.stringify(t))},qX=function(){let t=As.getItem(zt.SESSION_ID);ui(t);let e=ha(t),n=As.getItem(e);try{In(JSON.parse(n))}catch(r){}},tv=(t=>(t.BillingQuotaExceeded="BillingQuotaExceeded",t))(tv||{}),tW=10,eW=1e3,nW=500,rW=[tv.BillingQuotaExceeded.toString()],iW=t=>{var e;return((e=t.response.errors)==null?void 0:e.find(n=>rW.includes(n.message)))===void 0},oW=()=>{let t=(e,n,r,i,o=0)=>or(void 0,null,function*(){try{return yield e()}catch(s){if(s instanceof Kb&&!iW(s))throw s;if(o<tW)return yield new Promise(a=>setTimeout(a,eW+nW*Math.pow(2,o))),yield t(e,n,r,i,o+1);throw console.error(`highlight.io: data request failed after ${o} retries`),s}});return t},sW="$ld:telemetry:session:init",aW="$ld:telemetry:error",Sg="$ld:telemetry:track",lW="$ld:telemetry:metric",cW="document_load";pW=class{constructor(t,e){mi(this,"client"),mi(this,"metadata"),this.client=t,this.metadata=e}getHooks(t){return[]}init(t){this.client.track(sW,{sessionID:t})}recordGauge(t,e){var n;e.category!==Qb.WebVital&&e.name!==cW||e.name!=="Jank"&&this.client.track(`${lW}:${e.name.toLowerCase()}`,ir($({},(n=e.tags)==null?void 0:n.map(r=>({[r.name]:r.value})).reduce((r,i)=>$($({},r),i),{})),{category:e.category,group:e.group,sessionID:t}),e.value)}identify(t,e,n={},r){}error(t,e){this.client.track(aW,ir($({},e),{sessionID:t}))}track(t,e){let n=e.event;this.client.track(n?`${Sg}:${n}`:Sg,ir($({},e),{sessionID:t}))}},gu=class extends jn{constructor(e,n){super(),mi(this,"client"),this.client=new pW(e,n)}getHooks(e){return[{getMetadata:()=>({name:"highlight.run/ld"}),afterIdentify:(n,r,i)=>(this.load(this.client),r)}]}init(e){return this.p("init",[e])}recordGauge(e,n){return this.p("recordGauge",[e,n])}identify(e,n,r={},i){return this.p("identify",[e,n,r,i])}error(e,n){return this.p("error",[e,n])}track(e,n){return this.p("track",[e,n])}};fW=t=>{let e="",n=t.getAttribute("class"),r=t.getAttribute("id");return r&&(e=e.concat(Ig(r,"#"))),n&&(e=e.concat(Ig(n,"."))),e===""&&(e=e.concat(t.tagName.toLowerCase())),e},Ig=(t,e)=>`${e}${t.trim().split(" ").join(e)}`,mW=t=>{let e,n=()=>{clearTimeout(e),e=setTimeout(()=>{var r,i;t({height:window.innerHeight,width:window.innerWidth,availHeight:window.screen.availHeight,availWidth:window.screen.availWidth,colorDepth:window.screen.colorDepth,pixelDepth:window.screen.pixelDepth,orientation:(i=(r=window.screen.orientation)==null?void 0:r.angle)!=null?i:0})},500)};return window.addEventListener("resize",n),n(),()=>window.removeEventListener("resize",n)},bu=()=>{var t;let e="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";var n="";let r=typeof window<"u"&&((t=window.crypto)==null?void 0:t.getRandomValues),i=new Uint32Array(28);r&&window.crypto.getRandomValues(i);for(let o=0;o<28;o++)r?n+=e.charAt(i[o]%e.length):n+=e.charAt(Math.floor(Math.random()*e.length));return n},yW=class{constructor(t){mi(this,"sessionSecureID");try{t!=null&&t.storageMode&&zX(t==null?void 0:t.storageMode),wg(!!(t!=null&&t.sessionCookie)),t!=null&&t.sessionCookie?qX():wg(!1);let e=jX(),n=xs(e);n!=null&&n.sessionSecureID?this.sessionSecureID=n.sessionSecureID:(this.sessionSecureID=bu(),ui(this.sessionSecureID),In({sessionSecureID:this.sessionSecureID,projectID:0,payloadID:1,sessionStartTime:Date.now(),lastPushTime:Date.now()}))}catch(e){Bt("Error initializing @launchdarkly observability plugin","error",e)}}},gW=(t,e,n)=>new Promise((r,i)=>{var o=c=>{try{a(n.next(c))}catch(l){i(l)}},s=c=>{try{a(n.throw(c))}catch(l){i(l)}},a=c=>c.done?r(c.value):Promise.resolve(c.value).then(o,s);a((n=n.apply(t,e)).next())}),Js=class extends jn{getSession(){return this.yr?this.p("getSession",[]):null}start(e){return gW(this,null,function*(){return this.p("start",[e])})}stop(e){return this.p("stop",[e])}getRecordingState(){return this.yr?this.p("getRecordingState",[]):"NotRecording"}snapshot(e){return this.yr?this.p("snapshot",[e]):Promise.resolve(void 0)}register(e,n){return this.p("register",[e,n])}};typeof globalThis<"u"?globalThis.LDRecord?Tn=globalThis.LDRecord:(Tn=new Js,globalThis.LDRecord=Tn):Tn=new Js;bW=Object.defineProperty,vW=Object.defineProperties,wW=Object.getOwnPropertyDescriptors,Ds=Object.getOwnPropertySymbols,iv=Object.prototype.hasOwnProperty,ov=Object.prototype.propertyIsEnumerable,vu=(t,e,n)=>e in t?bW(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,z=(t,e)=>{for(var n in e||(e={}))iv.call(e,n)&&vu(t,n,e[n]);if(Ds)for(var n of Ds(e))ov.call(e,n)&&vu(t,n,e[n]);return t},_t=(t,e)=>vW(t,wW(e)),sr=(t,e)=>{var n={};for(var r in t)iv.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Ds)for(var r of Ds(t))e.indexOf(r)<0&&ov.call(t,r)&&(n[r]=t[r]);return n},Y=(t,e,n)=>vu(t,typeof e!="symbol"?e+"":e,n),Kt=(t,e,n)=>new Promise((r,i)=>{var o=c=>{try{a(n.next(c))}catch(l){i(l)}},s=c=>{try{a(n.throw(c))}catch(l){i(l)}},a=c=>c.done?r(c.value):Promise.resolve(c.value).then(o,s);a((n=n.apply(t,e)).next())}),SW={key:"_sid"},IW="rrweb/sequential-id@1",TW=t=>{let e=SW,n=0;return{name:IW,eventProcessor(r){return Object.assign(r,{[e.key]:++n}),r},options:e}},EW=Object.defineProperty,RW=(t,e,n)=>e in t?EW(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,k=(t,e,n)=>RW(t,typeof e!="symbol"?e+"":e,n),CW=Object.defineProperty,ZW=(t,e,n)=>e in t?CW(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Eg=(t,e,n)=>ZW(t,typeof e!="symbol"?e+"":e,n),Et=(t=>(t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment",t))(Et||{}),Rg={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Cg={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},is={},kW=()=>!!globalThis.Zone;Dc={};Yc={};Ot={childNodes:VW,parentNode:xW,parentElement:OW,textContent:NW,contains:GW,getRootNode:LW,host:XW,styleSheets:WW,shadowRoot:UW,querySelector:PW,querySelectorAll:MW,mutationObserver:FW,patch:AW};Ys=class{constructor(){Eg(this,"idNodeMap",new Map),Eg(this,"nodeMetaMap",new WeakMap)}getId(e){var n;if(!e)return-1;let r=(n=this.getMeta(e))==null?void 0:n.id;return r!=null?r:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){let n=this.getId(e);this.idNodeMap.delete(n),e.childNodes&&e.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,n){let r=n.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,n)}replace(e,n){let r=this.getNode(e);if(r){let i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(n,i)}this.idNodeMap.set(e,n)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};Zg="__rrweb_original__";jW=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,QW=/^(?:[a-z+]+:)?\/\//i,$W=/^www\..*/i,qW=/^(data:)([^,]*),(.*)/i;n2=new RegExp(/[a-zA-Z0-9.!#$%&'*+=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:.[a-zA-Z0-9-]+)*/),r2=new RegExp(/[0-9]{9,16}/),i2=new RegExp(/[0-9]{3}-?[0-9]{2}-?[0-9]{4}/),o2=new RegExp(/[+]?[(]?[0-9]{3}[)]?[-\s.]?[0-9]{3}[-\s.]?[0-9]{4,6}/),s2=new RegExp(/[0-9]{4}-?[0-9]{4}-?[0-9]{4}-?[0-9]{4}/),a2=new RegExp(/[0-9]{1,5}.?[0-9]{0,3}\s[a-zA-Z]{2,30}\s[a-zA-Z]{2,15}/),l2=new RegExp(/(?:[0-9]{1,3}.){3}[0-9]{1,3}/),c2=[n2,r2,i2,o2,s2,a2,l2];hv=({maskInputOptions:t,tagName:e,type:n,overwriteRecord:r})=>{let i=n&&n.toLowerCase();return r!=="true"&&(!!t[e.toLowerCase()]||!!(i&&t[i]))},u2=1,h2=new RegExp("[^a-z0-9-_:]"),gi=-2;d2=/^[^ \t\n\r\u000c]+/,f2=/^[, \t\n\r\u000c]+/;Vg=new WeakMap;bh={exports:{}},_=String,yv=function(){return{isColorSupported:!1,reset:_,bold:_,dim:_,italic:_,underline:_,inverse:_,hidden:_,strikethrough:_,black:_,red:_,green:_,yellow:_,blue:_,magenta:_,cyan:_,white:_,gray:_,bgBlack:_,bgRed:_,bgGreen:_,bgYellow:_,bgBlue:_,bgMagenta:_,bgCyan:_,bgWhite:_,blackBright:_,redBright:_,greenBright:_,yellowBright:_,blueBright:_,magentaBright:_,cyanBright:_,whiteBright:_,bgBlackBright:_,bgRedBright:_,bgGreenBright:_,bgYellowBright:_,bgBlueBright:_,bgMagentaBright:_,bgCyanBright:_,bgWhiteBright:_}};bh.exports=yv();bh.exports.createColors=yv;C2=bh.exports,Z2={},k2=Object.freeze(Object.defineProperty({__proto__:null,default:Z2},Symbol.toStringTag,{value:"Module"})),he=R2(k2),Og=C2,Ng=he,Iu=class gv extends Error{constructor(e,n,r,i,o,s){super(e),this.name="CssSyntaxError",this.reason=e,o&&(this.file=o),i&&(this.source=i),s&&(this.plugin=s),typeof n<"u"&&typeof r<"u"&&(typeof n=="number"?(this.line=n,this.column=r):(this.line=n.line,this.column=n.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,gv)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let n=this.source;e==null&&(e=Og.isColorSupported);let r=u=>u,i=u=>u,o=u=>u;if(e){let{bold:u,gray:h,red:p}=Og.createColors(!0);i=f=>u(p(f)),r=f=>h(f),Ng&&(o=f=>Ng(f))}let s=n.split(/\r?\n/),a=Math.max(this.line-3,0),c=Math.min(this.line+2,s.length),l=String(c).length;return s.slice(a,c).map((u,h)=>{let p=a+1+h,f=" "+(" "+p).slice(-l)+" | ";if(p===this.line){if(u.length>160){let d=20,v=Math.max(0,this.column-d),g=Math.max(this.column+d,this.endColumn+d),w=u.slice(v,g),R=r(f.replace(/\d/g," "))+u.slice(0,Math.min(this.column-1,d-1)).replace(/[^\t]/g," ");return i(">")+r(f)+o(w)+`
285
285
  `+R+i("^")}let m=r(f.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return i(">")+r(f)+o(u)+`
286
286
  `+m+i("^")}return" "+r(f)+o(u)}).join(`
287
287
  `)}toString(){let e=this.showSourceCode();return e&&(e=`
288
288
 
289
289
  `+e+`
290
- `),this.name+": "+this.message+e}},dh=yu;yu.default=yu;Sg={after:`
290
+ `),this.name+": "+this.message+e}},vh=Iu;Iu.default=Iu;Gg={after:`
291
291
  `,beforeClose:`
292
292
  `,beforeComment:`
293
293
  `,beforeDecl:`
294
294
  `,beforeOpen:" ",beforeRule:`
295
- `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};gu=class{constructor(t){this.builder=t}atrule(t,e){let n="@"+t.name,r=t.params?this.rawValue(t,"params"):"";if(typeof t.raws.afterName<"u"?n+=t.raws.afterName:r&&(n+=" "),t.nodes)this.block(t,n+r);else{let i=(t.raws.between||"")+(e?";":"");this.builder(n+r+i,t)}}beforeAfter(t,e){let n;t.type==="decl"?n=this.raw(t,null,"beforeDecl"):t.type==="comment"?n=this.raw(t,null,"beforeComment"):e==="before"?n=this.raw(t,null,"beforeRule"):n=this.raw(t,null,"beforeClose");let r=t.parent,i=0;for(;r&&r.type!=="root";)i+=1,r=r.parent;if(n.includes(`
296
- `)){let o=this.raw(t,null,"indent");if(o.length)for(let s=0;s<i;s++)n+=o}return n}block(t,e){let n=this.raw(t,"between","beforeOpen");this.builder(e+n+"{",t,"start");let r;t.nodes&&t.nodes.length?(this.body(t),r=this.raw(t,"after")):r=this.raw(t,"after","emptyBody"),r&&this.builder(r),this.builder("}",t,"end")}body(t){let e=t.nodes.length-1;for(;e>0&&t.nodes[e].type==="comment";)e-=1;let n=this.raw(t,"semicolon");for(let r=0;r<t.nodes.length;r++){let i=t.nodes[r],o=this.raw(i,"before");o&&this.builder(o),this.stringify(i,e!==r||n)}}comment(t){let e=this.raw(t,"left","commentLeft"),n=this.raw(t,"right","commentRight");this.builder("/*"+e+t.text+n+"*/",t)}decl(t,e){let n=this.raw(t,"between","colon"),r=t.prop+n+this.rawValue(t,"value");t.important&&(r+=t.raws.important||" !important"),e&&(r+=";"),this.builder(r,t)}document(t){this.body(t)}raw(t,e,n){let r;if(n||(n=e),e&&(r=t.raws[e],typeof r<"u"))return r;let i=t.parent;if(n==="before"&&(!i||i.type==="root"&&i.first===t||i&&i.type==="document"))return"";if(!i)return Sg[n];let o=t.root();if(o.rawCache||(o.rawCache={}),typeof o.rawCache[n]<"u")return o.rawCache[n];if(n==="before"||n==="after")return this.beforeAfter(t,n);{let s="raw"+l2(n);this[s]?r=this[s](o,t):o.walk(a=>{if(r=a.raws[e],typeof r<"u")return!1})}return typeof r>"u"&&(r=Sg[n]),o.rawCache[n]=r,r}rawBeforeClose(t){let e;return t.walk(n=>{if(n.nodes&&n.nodes.length>0&&typeof n.raws.after<"u")return e=n.raws.after,e.includes(`
295
+ `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};Tu=class{constructor(t){this.builder=t}atrule(t,e){let n="@"+t.name,r=t.params?this.rawValue(t,"params"):"";if(typeof t.raws.afterName<"u"?n+=t.raws.afterName:r&&(n+=" "),t.nodes)this.block(t,n+r);else{let i=(t.raws.between||"")+(e?";":"");this.builder(n+r+i,t)}}beforeAfter(t,e){let n;t.type==="decl"?n=this.raw(t,null,"beforeDecl"):t.type==="comment"?n=this.raw(t,null,"beforeComment"):e==="before"?n=this.raw(t,null,"beforeRule"):n=this.raw(t,null,"beforeClose");let r=t.parent,i=0;for(;r&&r.type!=="root";)i+=1,r=r.parent;if(n.includes(`
296
+ `)){let o=this.raw(t,null,"indent");if(o.length)for(let s=0;s<i;s++)n+=o}return n}block(t,e){let n=this.raw(t,"between","beforeOpen");this.builder(e+n+"{",t,"start");let r;t.nodes&&t.nodes.length?(this.body(t),r=this.raw(t,"after")):r=this.raw(t,"after","emptyBody"),r&&this.builder(r),this.builder("}",t,"end")}body(t){let e=t.nodes.length-1;for(;e>0&&t.nodes[e].type==="comment";)e-=1;let n=this.raw(t,"semicolon");for(let r=0;r<t.nodes.length;r++){let i=t.nodes[r],o=this.raw(i,"before");o&&this.builder(o),this.stringify(i,e!==r||n)}}comment(t){let e=this.raw(t,"left","commentLeft"),n=this.raw(t,"right","commentRight");this.builder("/*"+e+t.text+n+"*/",t)}decl(t,e){let n=this.raw(t,"between","colon"),r=t.prop+n+this.rawValue(t,"value");t.important&&(r+=t.raws.important||" !important"),e&&(r+=";"),this.builder(r,t)}document(t){this.body(t)}raw(t,e,n){let r;if(n||(n=e),e&&(r=t.raws[e],typeof r<"u"))return r;let i=t.parent;if(n==="before"&&(!i||i.type==="root"&&i.first===t||i&&i.type==="document"))return"";if(!i)return Gg[n];let o=t.root();if(o.rawCache||(o.rawCache={}),typeof o.rawCache[n]<"u")return o.rawCache[n];if(n==="before"||n==="after")return this.beforeAfter(t,n);{let s="raw"+V2(n);this[s]?r=this[s](o,t):o.walk(a=>{if(r=a.raws[e],typeof r<"u")return!1})}return typeof r>"u"&&(r=Gg[n]),o.rawCache[n]=r,r}rawBeforeClose(t){let e;return t.walk(n=>{if(n.nodes&&n.nodes.length>0&&typeof n.raws.after<"u")return e=n.raws.after,e.includes(`
297
297
  `)&&(e=e.replace(/[^\n]+$/,"")),!1}),e&&(e=e.replace(/\S/g,"")),e}rawBeforeComment(t,e){let n;return t.walkComments(r=>{if(typeof r.raws.before<"u")return n=r.raws.before,n.includes(`
298
298
  `)&&(n=n.replace(/[^\n]+$/,"")),!1}),typeof n>"u"?n=this.raw(e,null,"beforeDecl"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeDecl(t,e){let n;return t.walkDecls(r=>{if(typeof r.raws.before<"u")return n=r.raws.before,n.includes(`
299
299
  `)&&(n=n.replace(/[^\n]+$/,"")),!1}),typeof n>"u"?n=this.raw(e,null,"beforeRule"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeOpen(t){let e;return t.walk(n=>{if(n.type!=="decl"&&(e=n.raws.between,typeof e<"u"))return!1}),e}rawBeforeRule(t){let e;return t.walk(n=>{if(n.nodes&&(n.parent!==t||t.first!==n)&&typeof n.raws.before<"u")return e=n.raws.before,e.includes(`
300
300
  `)&&(e=e.replace(/[^\n]+$/,"")),!1}),e&&(e=e.replace(/\S/g,"")),e}rawColon(t){let e;return t.walkDecls(n=>{if(typeof n.raws.between<"u")return e=n.raws.between.replace(/[^\s:]/g,""),!1}),e}rawEmptyBody(t){let e;return t.walk(n=>{if(n.nodes&&n.nodes.length===0&&(e=n.raws.after,typeof e<"u"))return!1}),e}rawIndent(t){if(t.raws.indent)return t.raws.indent;let e;return t.walk(n=>{let r=n.parent;if(r&&r!==t&&r.parent&&r.parent===t&&typeof n.raws.before<"u"){let i=n.raws.before.split(`
301
- `);return e=i[i.length-1],e=e.replace(/\S/g,""),!1}}),e}rawSemicolon(t){let e;return t.walk(n=>{if(n.nodes&&n.nodes.length&&n.last.type==="decl"&&(e=n.raws.semicolon,typeof e<"u"))return!1}),e}rawValue(t,e){let n=t[e],r=t.raws[e];return r&&r.value===n?r.raw:n}root(t){this.body(t),t.raws.after&&this.builder(t.raws.after)}rule(t){this.block(t,this.rawValue(t,"selector")),t.raws.ownSemicolon&&this.builder(t.raws.ownSemicolon,t,"end")}stringify(t,e){if(!this[t.type])throw new Error("Unknown AST node type "+t.type+". Maybe you need to change PostCSS stringifier.");this[t.type](t,e)}},sv=gu;gu.default=gu;c2=sv;ca=bu;bu.default=bu;Zi={};Zi.isClean=Symbol("isClean");Zi.my=Symbol("my");u2=dh,h2=sv,p2=ca,{isClean:Qr,my:d2}=Zi;wu=class{get proxyOf(){return this}constructor(t={}){this.raws={},this[Qr]=!1,this[d2]=!0;for(let e in t)if(e==="nodes"){this.nodes=[];for(let n of t[e])typeof n.clone=="function"?this.append(n.clone()):this.append(n)}else this[e]=t[e]}addToError(t){if(t.postcssNode=this,t.stack&&this.source&&/\n\s{4}at /.test(t.stack)){let e=this.source;t.stack=t.stack.replace(/\n\s{4}at /,`$&${e.input.from}:${e.start.line}:${e.start.column}$&`)}return t}after(t){return this.parent.insertAfter(this,t),this}assign(t={}){for(let e in t)this[e]=t[e];return this}before(t){return this.parent.insertBefore(this,t),this}cleanRaws(t){delete this.raws.before,delete this.raws.after,t||delete this.raws.between}clone(t={}){let e=vu(this);for(let n in t)e[n]=t[n];return e}cloneAfter(t={}){let e=this.clone(t);return this.parent.insertAfter(this,e),e}cloneBefore(t={}){let e=this.clone(t);return this.parent.insertBefore(this,e),e}error(t,e={}){if(this.source){let{end:n,start:r}=this.rangeBy(e);return this.source.input.error(t,{column:r.column,line:r.line},{column:n.column,line:n.line},e)}return new u2(t)}getProxyProcessor(){return{get(t,e){return e==="proxyOf"?t:e==="root"?()=>t.root().toProxy():t[e]},set(t,e,n){return t[e]===n||(t[e]=n,(e==="prop"||e==="value"||e==="name"||e==="params"||e==="important"||e==="text")&&t.markDirty()),!0}}}markClean(){this[Qr]=!0}markDirty(){if(this[Qr]){this[Qr]=!1;let t=this;for(;t=t.parent;)t[Qr]=!1}}next(){if(!this.parent)return;let t=this.parent.index(this);return this.parent.nodes[t+1]}positionBy(t){let e=this.source.start;if(t.index)e=this.positionInside(t.index);else if(t.word){let n="document"in this.source.input?this.source.input.document:this.source.input.css,r=n.slice($r(n,this.source.start),$r(n,this.source.end)).indexOf(t.word);r!==-1&&(e=this.positionInside(r))}return e}positionInside(t){let e=this.source.start.column,n=this.source.start.line,r="document"in this.source.input?this.source.input.document:this.source.input.css,i=$r(r,this.source.start),o=i+t;for(let s=i;s<o;s++)r[s]===`
302
- `?(e=1,n+=1):e+=1;return{column:e,line:n}}prev(){if(!this.parent)return;let t=this.parent.index(this);return this.parent.nodes[t-1]}rangeBy(t){let e={column:this.source.start.column,line:this.source.start.line},n=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:e.column+1,line:e.line};if(t.word){let r="document"in this.source.input?this.source.input.document:this.source.input.css,i=r.slice($r(r,this.source.start),$r(r,this.source.end)).indexOf(t.word);i!==-1&&(e=this.positionInside(i),n=this.positionInside(i+t.word.length))}else t.start?e={column:t.start.column,line:t.start.line}:t.index&&(e=this.positionInside(t.index)),t.end?n={column:t.end.column,line:t.end.line}:typeof t.endIndex=="number"?n=this.positionInside(t.endIndex):t.index&&(n=this.positionInside(t.index+1));return(n.line<e.line||n.line===e.line&&n.column<=e.column)&&(n={column:e.column+1,line:e.line}),{end:n,start:e}}raw(t,e){return new h2().raw(this,t,e)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...t){if(this.parent){let e=this,n=!1;for(let r of t)r===this?n=!0:n?(this.parent.insertAfter(e,r),e=r):this.parent.insertBefore(e,r);n||this.remove()}return this}root(){let t=this;for(;t.parent&&t.parent.type!=="document";)t=t.parent;return t}toJSON(t,e){let n={},r=e==null;e=e||new Map;let i=0;for(let o in this){if(!Object.prototype.hasOwnProperty.call(this,o)||o==="parent"||o==="proxyCache")continue;let s=this[o];if(Array.isArray(s))n[o]=s.map(a=>typeof a=="object"&&a.toJSON?a.toJSON(null,e):a);else if(typeof s=="object"&&s.toJSON)n[o]=s.toJSON(null,e);else if(o==="source"){let a=e.get(s.input);a==null&&(a=i,e.set(s.input,i),i++),n[o]={end:s.end,inputId:a,start:s.start}}else n[o]=s}return r&&(n.inputs=[...e.keys()].map(o=>o.toJSON())),n}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(t=p2){t.stringify&&(t=t.stringify);let e="";return t(this,n=>{e+=n}),e}warn(t,e,n){let r={node:this};for(let i in n)r[i]=n[i];return t.warn(e,r)}},ua=wu;wu.default=wu;f2=ua,Su=class extends f2{constructor(t){super(t),this.type="comment"}},ha=Su;Su.default=Su;m2=ua,Iu=class extends m2{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(t){t&&typeof t.value<"u"&&typeof t.value!="string"&&(t=Kt(z({},t),{value:String(t.value)})),super(t),this.type="decl"}},pa=Iu;Iu.default=Iu;av=ha,lv=pa,y2=ua,{isClean:cv,my:uv}=Zi;Xe=class mv extends y2{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(...e){for(let n of e){let r=this.normalize(n,this.last);for(let i of r)this.proxyOf.nodes.push(i)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let n of this.nodes)n.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let n=this.getIterator(),r,i;for(;this.indexes[n]<this.proxyOf.nodes.length&&(r=this.indexes[n],i=e(this.proxyOf.nodes[r],r),i!==!1);)this.indexes[n]+=1;return delete this.indexes[n],i}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,n){return n==="proxyOf"?e:e[n]?n==="each"||typeof n=="string"&&n.startsWith("walk")?(...r)=>e[n](...r.map(i=>typeof i=="function"?(o,s)=>i(o.toProxy(),s):i)):n==="every"||n==="some"?r=>e[n]((i,...o)=>r(i.toProxy(),...o)):n==="root"?()=>e.root().toProxy():n==="nodes"?e.nodes.map(r=>r.toProxy()):n==="first"||n==="last"?e[n].toProxy():e[n]:e[n]},set(e,n,r){return e[n]===r||(e[n]=r,(n==="name"||n==="params"||n==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,n){let r=this.index(e),i=this.normalize(n,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let s of i)this.proxyOf.nodes.splice(r+1,0,s);let o;for(let s in this.indexes)o=this.indexes[s],r<o&&(this.indexes[s]=o+i.length);return this.markDirty(),this}insertBefore(e,n){let r=this.index(e),i=r===0?"prepend":!1,o=this.normalize(n,this.proxyOf.nodes[r],i).reverse();r=this.index(e);for(let a of o)this.proxyOf.nodes.splice(r,0,a);let s;for(let a in this.indexes)s=this.indexes[a],r<=s&&(this.indexes[a]=s+o.length);return this.markDirty(),this}normalize(e,n){if(typeof e=="string")e=dv(hv(e).nodes);else if(typeof e>"u")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let r of e)r.parent&&r.parent.removeChild(r,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let r of e)r.parent&&r.parent.removeChild(r,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value>"u")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new lv(e)]}else if(e.selector||e.selectors)e=[new mh(e)];else if(e.name)e=[new fh(e)];else if(e.text)e=[new av(e)];else throw new Error("Unknown node type in node creation");return e.map(r=>(r[uv]||mv.rebuild(r),r=r.proxyOf,r.parent&&r.parent.removeChild(r),r[cv]&&fv(r),r.raws||(r.raws={}),typeof r.raws.before>"u"&&n&&typeof n.raws.before<"u"&&(r.raws.before=n.raws.before.replace(/\S/g,"")),r.parent=this.proxyOf,r))}prepend(...e){e=e.reverse();for(let n of e){let r=this.normalize(n,this.first,"prepend").reverse();for(let i of r)this.proxyOf.nodes.unshift(i);for(let i in this.indexes)this.indexes[i]=this.indexes[i]+r.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let n;for(let r in this.indexes)n=this.indexes[r],n>=e&&(this.indexes[r]=n-1);return this.markDirty(),this}replaceValues(e,n,r){return r||(r=n,n={}),this.walkDecls(i=>{n.props&&!n.props.includes(i.prop)||n.fast&&!i.value.includes(n.fast)||(i.value=i.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((n,r)=>{let i;try{i=e(n,r)}catch(o){throw n.addToError(o)}return i!==!1&&n.walk&&(i=n.walk(e)),i})}walkAtRules(e,n){return n?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="atrule"&&e.test(r.name))return n(r,i)}):this.walk((r,i)=>{if(r.type==="atrule"&&r.name===e)return n(r,i)}):(n=e,this.walk((r,i)=>{if(r.type==="atrule")return n(r,i)}))}walkComments(e){return this.walk((n,r)=>{if(n.type==="comment")return e(n,r)})}walkDecls(e,n){return n?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="decl"&&e.test(r.prop))return n(r,i)}):this.walk((r,i)=>{if(r.type==="decl"&&r.prop===e)return n(r,i)}):(n=e,this.walk((r,i)=>{if(r.type==="decl")return n(r,i)}))}walkRules(e,n){return n?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="rule"&&e.test(r.selector))return n(r,i)}):this.walk((r,i)=>{if(r.type==="rule"&&r.selector===e)return n(r,i)}):(n=e,this.walk((r,i)=>{if(r.type==="rule")return n(r,i)}))}};Xe.registerParse=t=>{hv=t};Xe.registerRule=t=>{mh=t};Xe.registerAtRule=t=>{fh=t};Xe.registerRoot=t=>{pv=t};Rn=Xe;Xe.default=Xe;Xe.rebuild=t=>{t.type==="atrule"?Object.setPrototypeOf(t,fh.prototype):t.type==="rule"?Object.setPrototypeOf(t,mh.prototype):t.type==="decl"?Object.setPrototypeOf(t,lv.prototype):t.type==="comment"?Object.setPrototypeOf(t,av.prototype):t.type==="root"&&Object.setPrototypeOf(t,pv.prototype),t[uv]=!0,t.nodes&&t.nodes.forEach(e=>{Xe.rebuild(e)})};yv=Rn,Hs=class extends yv{constructor(t){super(t),this.type="atrule"}append(...t){return this.proxyOf.nodes||(this.nodes=[]),super.append(...t)}prepend(...t){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...t)}},yh=Hs;Hs.default=Hs;yv.registerAtRule(Hs);g2=Rn,yi=class extends g2{constructor(t){super(z({type:"document"},t)),this.nodes||(this.nodes=[])}toResult(t={}){return new gv(new bv,this,t).stringify()}};yi.registerLazyResult=t=>{gv=t};yi.registerProcessor=t=>{bv=t};gh=yi;yi.default=yi;b2="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",v2=(t=21)=>{let e="",n=t|0;for(;n--;)e+=b2[Math.random()*64|0];return e},w2={nanoid:v2},{existsSync:S2,readFileSync:I2}=ce,{dirname:Mc,join:T2}=ce,{SourceMapConsumer:Ig,SourceMapGenerator:Tg}=ce;Tu=class{constructor(t,e){if(e.map===!1)return;this.loadAnnotation(t),this.inline=this.startWith(this.annotation,"data:");let n=e.map?e.map.prev:void 0,r=this.loadMap(e.from,n);!this.mapFile&&e.from&&(this.mapFile=e.from),this.mapFile&&(this.root=Mc(this.mapFile)),r&&(this.text=r)}consumer(){return this.consumerCache||(this.consumerCache=new Ig(this.text)),this.consumerCache}decodeInline(t){let e=/^data:application\/json;charset=utf-?8;base64,/,n=/^data:application\/json;base64,/,r=/^data:application\/json;charset=utf-?8,/,i=/^data:application\/json,/,o=t.match(r)||t.match(i);if(o)return decodeURIComponent(t.substr(o[0].length));let s=t.match(e)||t.match(n);if(s)return E2(t.substr(s[0].length));let a=t.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+a)}getAnnotationURL(t){return t.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(t){return typeof t!="object"?!1:typeof t.mappings=="string"||typeof t.ja=="string"||Array.isArray(t.sections)}loadAnnotation(t){let e=t.match(/\/\*\s*# sourceMappingURL=/g);if(!e)return;let n=t.lastIndexOf(e.pop()),r=t.indexOf("*/",n);n>-1&&r>-1&&(this.annotation=this.getAnnotationURL(t.substring(n,r)))}loadFile(t){if(this.root=Mc(t),S2(t))return this.mapFile=t,I2(t,"utf-8").toString().trim()}loadMap(t,e){if(e===!1)return!1;if(e){if(typeof e=="string")return e;if(typeof e=="function"){let n=e(t);if(n){let r=this.loadFile(n);if(!r)throw new Error("Unable to load previous source map: "+n.toString());return r}}else{if(e instanceof Ig)return Tg.fromSourceMap(e).toString();if(e instanceof Tg)return e.toString();if(this.isMap(e))return JSON.stringify(e);throw new Error("Unsupported previous source map format: "+e.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let n=this.annotation;return t&&(n=T2(Mc(t),n)),this.loadFile(n)}}}startWith(t,e){return t?t.substr(0,e.length)===e:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}},vv=Tu;Tu.default=Tu;({nanoid:R2}=w2),{isAbsolute:Eu,resolve:Ru}=ce,{SourceMapConsumer:C2,SourceMapGenerator:Z2}=ce,{fileURLToPath:Eg,pathToFileURL:rs}=ce,Rg=dh,k2=vv,Fc=ce,Ac=Symbol("fromOffsetCache"),V2=!!(C2&&Z2),Cg=!!(Ru&&Eu),zs=class{get from(){return this.file||this.id}constructor(t,e={}){if(t===null||typeof t>"u"||typeof t=="object"&&!t.toString)throw new Error(`PostCSS received ${t} instead of CSS string`);if(this.css=t.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,e.document&&(this.document=e.document.toString()),e.from&&(!Cg||/^\w+:\/\//.test(e.from)||Eu(e.from)?this.file=e.from:this.file=Ru(e.from)),Cg&&V2){let n=new k2(this.css,e);if(n.text){this.map=n;let r=n.consumer().file;!this.file&&r&&(this.file=this.mapResolve(r))}}this.file||(this.id="<input css "+R2(6)+">"),this.map&&(this.map.file=this.from)}error(t,e,n,r={}){let i,o,s;if(e&&typeof e=="object"){let c=e,l=n;if(typeof c.offset=="number"){let u=this.fromOffset(c.offset);e=u.line,n=u.col}else e=c.line,n=c.column;if(typeof l.offset=="number"){let u=this.fromOffset(l.offset);o=u.line,i=u.col}else o=l.line,i=l.column}else if(!n){let c=this.fromOffset(e);e=c.line,n=c.col}let a=this.origin(e,n,o,i);return a?s=new Rg(t,a.endLine===void 0?a.line:{column:a.column,line:a.line},a.endLine===void 0?a.column:{column:a.endColumn,line:a.endLine},a.source,a.file,r.plugin):s=new Rg(t,o===void 0?e:{column:n,line:e},o===void 0?n:{column:i,line:o},this.css,this.file,r.plugin),s.input={column:n,endColumn:i,endLine:o,line:e,source:this.css},this.file&&(rs&&(s.input.url=rs(this.file).toString()),s.input.file=this.file),s}fromOffset(t){let e,n;if(this[Ac])n=this[Ac];else{let i=this.css.split(`
303
- `);n=new Array(i.length);let o=0;for(let s=0,a=i.length;s<a;s++)n[s]=o,o+=i[s].length+1;this[Ac]=n}e=n[n.length-1];let r=0;if(t>=e)r=n.length-1;else{let i=n.length-2,o;for(;r<i;)if(o=r+(i-r>>1),t<n[o])i=o-1;else if(t>=n[o+1])r=o+1;else{r=o;break}}return{col:t-n[r]+1,line:r+1}}mapResolve(t){return/^\w+:\/\//.test(t)?t:Ru(this.map.consumer().sourceRoot||this.map.root||".",t)}origin(t,e,n,r){if(!this.map)return!1;let i=this.map.consumer(),o=i.originalPositionFor({column:e,line:t});if(!o.source)return!1;let s;typeof n=="number"&&(s=i.originalPositionFor({column:r,line:n}));let a;Eu(o.source)?a=rs(o.source):a=new URL(o.source,this.map.consumer().sourceRoot||rs(this.map.mapFile));let c={column:o.column,endColumn:s&&s.column,endLine:s&&s.line,line:o.line,url:a.toString()};if(a.protocol==="file:")if(Eg)c.file=Eg(a);else throw new Error("file: protocol is not available in this PostCSS build");let l=i.sourceContentFor(o.source);return l&&(c.source=l),c}toJSON(){let t={};for(let e of["hasBOM","css","file","id"])this[e]!=null&&(t[e]=this[e]);return this.map&&(t.map=z({},this.map),t.map.consumerCache&&(t.map.consumerCache=void 0)),t}},da=zs;zs.default=zs;Fc&&Fc.registerInput&&Fc.registerInput(zs);wv=Rn,ar=class extends wv{constructor(t){super(t),this.type="root",this.nodes||(this.nodes=[])}normalize(t,e,n){let r=super.normalize(t);if(e){if(n==="prepend")this.nodes.length>1?e.raws.before=this.nodes[1].raws.before:delete e.raws.before;else if(this.first!==e)for(let i of r)i.raws.before=e.raws.before}return r}removeChild(t,e){let n=this.index(t);return!e&&n===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[n].raws.before),super.removeChild(t)}toResult(t={}){return new Sv(new Iv,this,t).stringify()}};ar.registerLazyResult=t=>{Sv=t};ar.registerProcessor=t=>{Iv=t};ki=ar;ar.default=ar;wv.registerRoot(ar);gi={comma(t){return gi.split(t,[","],!0)},space(t){let e=[" ",`
304
- `," "];return gi.split(t,e)},split(t,e,n){let r=[],i="",o=!1,s=0,a=!1,c="",l=!1;for(let u of t)l?l=!1:u==="\\"?l=!0:a?u===c&&(a=!1):u==='"'||u==="'"?(a=!0,c=u):u==="("?s+=1:u===")"?s>0&&(s-=1):s===0&&e.includes(u)&&(o=!0),o?(i!==""&&r.push(i.trim()),i="",o=!1):i+=u;return(n||i!=="")&&r.push(i.trim()),r}},Tv=gi;gi.default=gi;Ev=Rn,x2=Tv,Bs=class extends Ev{get selectors(){return x2.comma(this.selector)}set selectors(t){let e=this.selector?this.selector.match(/,\s*/):null,n=e?e[0]:","+this.raw("between","beforeOpen");this.selector=t.join(n)}constructor(t){super(t),this.type="rule",this.nodes||(this.nodes=[])}},bh=Bs;Bs.default=Bs;Ev.registerRule(Bs);N2=yh,O2=ha,G2=pa,L2=da,X2=vv,W2=ki,U2=bh;P2=bi;bi.default=bi;({dirname:ks,relative:Rv,resolve:Cv,sep:Zv}=ce),{SourceMapConsumer:kv,SourceMapGenerator:Vs}=ce,{pathToFileURL:Zg}=ce,M2=da,F2=!!(kv&&Vs),A2=!!(ks&&Cv&&Rv&&Zv),J2=class{constructor(t,e,n,r){this.stringify=t,this.mapOpts=n.map||{},this.root=e,this.opts=n,this.css=r,this.originalCSS=r,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let t;this.isInline()?t="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?t=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?t=this.mapOpts.annotation(this.opts.to,this.root):t=this.outputFile()+".map";let e=`
301
+ `);return e=i[i.length-1],e=e.replace(/\S/g,""),!1}}),e}rawSemicolon(t){let e;return t.walk(n=>{if(n.nodes&&n.nodes.length&&n.last.type==="decl"&&(e=n.raws.semicolon,typeof e<"u"))return!1}),e}rawValue(t,e){let n=t[e],r=t.raws[e];return r&&r.value===n?r.raw:n}root(t){this.body(t),t.raws.after&&this.builder(t.raws.after)}rule(t){this.block(t,this.rawValue(t,"selector")),t.raws.ownSemicolon&&this.builder(t.raws.ownSemicolon,t,"end")}stringify(t,e){if(!this[t.type])throw new Error("Unknown AST node type "+t.type+". Maybe you need to change PostCSS stringifier.");this[t.type](t,e)}},bv=Tu;Tu.default=Tu;x2=bv;pa=Eu;Eu.default=Eu;Vi={};Vi.isClean=Symbol("isClean");Vi.my=Symbol("my");O2=vh,N2=bv,G2=pa,{isClean:qr,my:L2}=Vi;Cu=class{get proxyOf(){return this}constructor(t={}){this.raws={},this[qr]=!1,this[L2]=!0;for(let e in t)if(e==="nodes"){this.nodes=[];for(let n of t[e])typeof n.clone=="function"?this.append(n.clone()):this.append(n)}else this[e]=t[e]}addToError(t){if(t.postcssNode=this,t.stack&&this.source&&/\n\s{4}at /.test(t.stack)){let e=this.source;t.stack=t.stack.replace(/\n\s{4}at /,`$&${e.input.from}:${e.start.line}:${e.start.column}$&`)}return t}after(t){return this.parent.insertAfter(this,t),this}assign(t={}){for(let e in t)this[e]=t[e];return this}before(t){return this.parent.insertBefore(this,t),this}cleanRaws(t){delete this.raws.before,delete this.raws.after,t||delete this.raws.between}clone(t={}){let e=Ru(this);for(let n in t)e[n]=t[n];return e}cloneAfter(t={}){let e=this.clone(t);return this.parent.insertAfter(this,e),e}cloneBefore(t={}){let e=this.clone(t);return this.parent.insertBefore(this,e),e}error(t,e={}){if(this.source){let{end:n,start:r}=this.rangeBy(e);return this.source.input.error(t,{column:r.column,line:r.line},{column:n.column,line:n.line},e)}return new O2(t)}getProxyProcessor(){return{get(t,e){return e==="proxyOf"?t:e==="root"?()=>t.root().toProxy():t[e]},set(t,e,n){return t[e]===n||(t[e]=n,(e==="prop"||e==="value"||e==="name"||e==="params"||e==="important"||e==="text")&&t.markDirty()),!0}}}markClean(){this[qr]=!0}markDirty(){if(this[qr]){this[qr]=!1;let t=this;for(;t=t.parent;)t[qr]=!1}}next(){if(!this.parent)return;let t=this.parent.index(this);return this.parent.nodes[t+1]}positionBy(t){let e=this.source.start;if(t.index)e=this.positionInside(t.index);else if(t.word){let n="document"in this.source.input?this.source.input.document:this.source.input.css,r=n.slice(ti(n,this.source.start),ti(n,this.source.end)).indexOf(t.word);r!==-1&&(e=this.positionInside(r))}return e}positionInside(t){let e=this.source.start.column,n=this.source.start.line,r="document"in this.source.input?this.source.input.document:this.source.input.css,i=ti(r,this.source.start),o=i+t;for(let s=i;s<o;s++)r[s]===`
302
+ `?(e=1,n+=1):e+=1;return{column:e,line:n}}prev(){if(!this.parent)return;let t=this.parent.index(this);return this.parent.nodes[t-1]}rangeBy(t){let e={column:this.source.start.column,line:this.source.start.line},n=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:e.column+1,line:e.line};if(t.word){let r="document"in this.source.input?this.source.input.document:this.source.input.css,i=r.slice(ti(r,this.source.start),ti(r,this.source.end)).indexOf(t.word);i!==-1&&(e=this.positionInside(i),n=this.positionInside(i+t.word.length))}else t.start?e={column:t.start.column,line:t.start.line}:t.index&&(e=this.positionInside(t.index)),t.end?n={column:t.end.column,line:t.end.line}:typeof t.endIndex=="number"?n=this.positionInside(t.endIndex):t.index&&(n=this.positionInside(t.index+1));return(n.line<e.line||n.line===e.line&&n.column<=e.column)&&(n={column:e.column+1,line:e.line}),{end:n,start:e}}raw(t,e){return new N2().raw(this,t,e)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...t){if(this.parent){let e=this,n=!1;for(let r of t)r===this?n=!0:n?(this.parent.insertAfter(e,r),e=r):this.parent.insertBefore(e,r);n||this.remove()}return this}root(){let t=this;for(;t.parent&&t.parent.type!=="document";)t=t.parent;return t}toJSON(t,e){let n={},r=e==null;e=e||new Map;let i=0;for(let o in this){if(!Object.prototype.hasOwnProperty.call(this,o)||o==="parent"||o==="proxyCache")continue;let s=this[o];if(Array.isArray(s))n[o]=s.map(a=>typeof a=="object"&&a.toJSON?a.toJSON(null,e):a);else if(typeof s=="object"&&s.toJSON)n[o]=s.toJSON(null,e);else if(o==="source"){let a=e.get(s.input);a==null&&(a=i,e.set(s.input,i),i++),n[o]={end:s.end,inputId:a,start:s.start}}else n[o]=s}return r&&(n.inputs=[...e.keys()].map(o=>o.toJSON())),n}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(t=G2){t.stringify&&(t=t.stringify);let e="";return t(this,n=>{e+=n}),e}warn(t,e,n){let r={node:this};for(let i in n)r[i]=n[i];return t.warn(e,r)}},da=Cu;Cu.default=Cu;X2=da,Zu=class extends X2{constructor(t){super(t),this.type="comment"}},fa=Zu;Zu.default=Zu;W2=da,ku=class extends W2{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(t){t&&typeof t.value<"u"&&typeof t.value!="string"&&(t=_t(z({},t),{value:String(t.value)})),super(t),this.type="decl"}},ma=ku;ku.default=ku;vv=fa,wv=ma,U2=da,{isClean:Sv,my:Iv}=Vi;We=class Zv extends U2{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(...e){for(let n of e){let r=this.normalize(n,this.last);for(let i of r)this.proxyOf.nodes.push(i)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let n of this.nodes)n.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let n=this.getIterator(),r,i;for(;this.indexes[n]<this.proxyOf.nodes.length&&(r=this.indexes[n],i=e(this.proxyOf.nodes[r],r),i!==!1);)this.indexes[n]+=1;return delete this.indexes[n],i}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,n){return n==="proxyOf"?e:e[n]?n==="each"||typeof n=="string"&&n.startsWith("walk")?(...r)=>e[n](...r.map(i=>typeof i=="function"?(o,s)=>i(o.toProxy(),s):i)):n==="every"||n==="some"?r=>e[n]((i,...o)=>r(i.toProxy(),...o)):n==="root"?()=>e.root().toProxy():n==="nodes"?e.nodes.map(r=>r.toProxy()):n==="first"||n==="last"?e[n].toProxy():e[n]:e[n]},set(e,n,r){return e[n]===r||(e[n]=r,(n==="name"||n==="params"||n==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,n){let r=this.index(e),i=this.normalize(n,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let s of i)this.proxyOf.nodes.splice(r+1,0,s);let o;for(let s in this.indexes)o=this.indexes[s],r<o&&(this.indexes[s]=o+i.length);return this.markDirty(),this}insertBefore(e,n){let r=this.index(e),i=r===0?"prepend":!1,o=this.normalize(n,this.proxyOf.nodes[r],i).reverse();r=this.index(e);for(let a of o)this.proxyOf.nodes.splice(r,0,a);let s;for(let a in this.indexes)s=this.indexes[a],r<=s&&(this.indexes[a]=s+o.length);return this.markDirty(),this}normalize(e,n){if(typeof e=="string")e=Rv(Tv(e).nodes);else if(typeof e>"u")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let r of e)r.parent&&r.parent.removeChild(r,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let r of e)r.parent&&r.parent.removeChild(r,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value>"u")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new wv(e)]}else if(e.selector||e.selectors)e=[new Sh(e)];else if(e.name)e=[new wh(e)];else if(e.text)e=[new vv(e)];else throw new Error("Unknown node type in node creation");return e.map(r=>(r[Iv]||Zv.rebuild(r),r=r.proxyOf,r.parent&&r.parent.removeChild(r),r[Sv]&&Cv(r),r.raws||(r.raws={}),typeof r.raws.before>"u"&&n&&typeof n.raws.before<"u"&&(r.raws.before=n.raws.before.replace(/\S/g,"")),r.parent=this.proxyOf,r))}prepend(...e){e=e.reverse();for(let n of e){let r=this.normalize(n,this.first,"prepend").reverse();for(let i of r)this.proxyOf.nodes.unshift(i);for(let i in this.indexes)this.indexes[i]=this.indexes[i]+r.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let n;for(let r in this.indexes)n=this.indexes[r],n>=e&&(this.indexes[r]=n-1);return this.markDirty(),this}replaceValues(e,n,r){return r||(r=n,n={}),this.walkDecls(i=>{n.props&&!n.props.includes(i.prop)||n.fast&&!i.value.includes(n.fast)||(i.value=i.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((n,r)=>{let i;try{i=e(n,r)}catch(o){throw n.addToError(o)}return i!==!1&&n.walk&&(i=n.walk(e)),i})}walkAtRules(e,n){return n?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="atrule"&&e.test(r.name))return n(r,i)}):this.walk((r,i)=>{if(r.type==="atrule"&&r.name===e)return n(r,i)}):(n=e,this.walk((r,i)=>{if(r.type==="atrule")return n(r,i)}))}walkComments(e){return this.walk((n,r)=>{if(n.type==="comment")return e(n,r)})}walkDecls(e,n){return n?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="decl"&&e.test(r.prop))return n(r,i)}):this.walk((r,i)=>{if(r.type==="decl"&&r.prop===e)return n(r,i)}):(n=e,this.walk((r,i)=>{if(r.type==="decl")return n(r,i)}))}walkRules(e,n){return n?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="rule"&&e.test(r.selector))return n(r,i)}):this.walk((r,i)=>{if(r.type==="rule"&&r.selector===e)return n(r,i)}):(n=e,this.walk((r,i)=>{if(r.type==="rule")return n(r,i)}))}};We.registerParse=t=>{Tv=t};We.registerRule=t=>{Sh=t};We.registerAtRule=t=>{wh=t};We.registerRoot=t=>{Ev=t};Cn=We;We.default=We;We.rebuild=t=>{t.type==="atrule"?Object.setPrototypeOf(t,wh.prototype):t.type==="rule"?Object.setPrototypeOf(t,Sh.prototype):t.type==="decl"?Object.setPrototypeOf(t,wv.prototype):t.type==="comment"?Object.setPrototypeOf(t,vv.prototype):t.type==="root"&&Object.setPrototypeOf(t,Ev.prototype),t[Iv]=!0,t.nodes&&t.nodes.forEach(e=>{We.rebuild(e)})};kv=Cn,js=class extends kv{constructor(t){super(t),this.type="atrule"}append(...t){return this.proxyOf.nodes||(this.nodes=[]),super.append(...t)}prepend(...t){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...t)}},Ih=js;js.default=js;kv.registerAtRule(js);P2=Cn,bi=class extends P2{constructor(t){super(z({type:"document"},t)),this.nodes||(this.nodes=[])}toResult(t={}){return new Vv(new xv,this,t).stringify()}};bi.registerLazyResult=t=>{Vv=t};bi.registerProcessor=t=>{xv=t};Th=bi;bi.default=bi;M2="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",F2=(t=21)=>{let e="",n=t|0;for(;n--;)e+=M2[Math.random()*64|0];return e},A2={nanoid:F2},{existsSync:J2,readFileSync:D2}=he,{dirname:Kc,join:Y2}=he,{SourceMapConsumer:Lg,SourceMapGenerator:Xg}=he;Vu=class{constructor(t,e){if(e.map===!1)return;this.loadAnnotation(t),this.inline=this.startWith(this.annotation,"data:");let n=e.map?e.map.prev:void 0,r=this.loadMap(e.from,n);!this.mapFile&&e.from&&(this.mapFile=e.from),this.mapFile&&(this.root=Kc(this.mapFile)),r&&(this.text=r)}consumer(){return this.consumerCache||(this.consumerCache=new Lg(this.text)),this.consumerCache}decodeInline(t){let e=/^data:application\/json;charset=utf-?8;base64,/,n=/^data:application\/json;base64,/,r=/^data:application\/json;charset=utf-?8,/,i=/^data:application\/json,/,o=t.match(r)||t.match(i);if(o)return decodeURIComponent(t.substr(o[0].length));let s=t.match(e)||t.match(n);if(s)return K2(t.substr(s[0].length));let a=t.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+a)}getAnnotationURL(t){return t.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(t){return typeof t!="object"?!1:typeof t.mappings=="string"||typeof t.$a=="string"||Array.isArray(t.sections)}loadAnnotation(t){let e=t.match(/\/\*\s*# sourceMappingURL=/g);if(!e)return;let n=t.lastIndexOf(e.pop()),r=t.indexOf("*/",n);n>-1&&r>-1&&(this.annotation=this.getAnnotationURL(t.substring(n,r)))}loadFile(t){if(this.root=Kc(t),J2(t))return this.mapFile=t,D2(t,"utf-8").toString().trim()}loadMap(t,e){if(e===!1)return!1;if(e){if(typeof e=="string")return e;if(typeof e=="function"){let n=e(t);if(n){let r=this.loadFile(n);if(!r)throw new Error("Unable to load previous source map: "+n.toString());return r}}else{if(e instanceof Lg)return Xg.fromSourceMap(e).toString();if(e instanceof Xg)return e.toString();if(this.isMap(e))return JSON.stringify(e);throw new Error("Unsupported previous source map format: "+e.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let n=this.annotation;return t&&(n=Y2(Kc(t),n)),this.loadFile(n)}}}startWith(t,e){return t?t.substr(0,e.length)===e:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}},Ov=Vu;Vu.default=Vu;({nanoid:_2}=A2),{isAbsolute:xu,resolve:Ou}=he,{SourceMapConsumer:H2,SourceMapGenerator:z2}=he,{fileURLToPath:Wg,pathToFileURL:ss}=he,Ug=vh,B2=Ov,_c=he,Hc=Symbol("fromOffsetCache"),j2=!!(H2&&z2),Pg=!!(Ou&&xu),Qs=class{get from(){return this.file||this.id}constructor(t,e={}){if(t===null||typeof t>"u"||typeof t=="object"&&!t.toString)throw new Error(`PostCSS received ${t} instead of CSS string`);if(this.css=t.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,e.document&&(this.document=e.document.toString()),e.from&&(!Pg||/^\w+:\/\//.test(e.from)||xu(e.from)?this.file=e.from:this.file=Ou(e.from)),Pg&&j2){let n=new B2(this.css,e);if(n.text){this.map=n;let r=n.consumer().file;!this.file&&r&&(this.file=this.mapResolve(r))}}this.file||(this.id="<input css "+_2(6)+">"),this.map&&(this.map.file=this.from)}error(t,e,n,r={}){let i,o,s;if(e&&typeof e=="object"){let c=e,l=n;if(typeof c.offset=="number"){let u=this.fromOffset(c.offset);e=u.line,n=u.col}else e=c.line,n=c.column;if(typeof l.offset=="number"){let u=this.fromOffset(l.offset);o=u.line,i=u.col}else o=l.line,i=l.column}else if(!n){let c=this.fromOffset(e);e=c.line,n=c.col}let a=this.origin(e,n,o,i);return a?s=new Ug(t,a.endLine===void 0?a.line:{column:a.column,line:a.line},a.endLine===void 0?a.column:{column:a.endColumn,line:a.endLine},a.source,a.file,r.plugin):s=new Ug(t,o===void 0?e:{column:n,line:e},o===void 0?n:{column:i,line:o},this.css,this.file,r.plugin),s.input={column:n,endColumn:i,endLine:o,line:e,source:this.css},this.file&&(ss&&(s.input.url=ss(this.file).toString()),s.input.file=this.file),s}fromOffset(t){let e,n;if(this[Hc])n=this[Hc];else{let i=this.css.split(`
303
+ `);n=new Array(i.length);let o=0;for(let s=0,a=i.length;s<a;s++)n[s]=o,o+=i[s].length+1;this[Hc]=n}e=n[n.length-1];let r=0;if(t>=e)r=n.length-1;else{let i=n.length-2,o;for(;r<i;)if(o=r+(i-r>>1),t<n[o])i=o-1;else if(t>=n[o+1])r=o+1;else{r=o;break}}return{col:t-n[r]+1,line:r+1}}mapResolve(t){return/^\w+:\/\//.test(t)?t:Ou(this.map.consumer().sourceRoot||this.map.root||".",t)}origin(t,e,n,r){if(!this.map)return!1;let i=this.map.consumer(),o=i.originalPositionFor({column:e,line:t});if(!o.source)return!1;let s;typeof n=="number"&&(s=i.originalPositionFor({column:r,line:n}));let a;xu(o.source)?a=ss(o.source):a=new URL(o.source,this.map.consumer().sourceRoot||ss(this.map.mapFile));let c={column:o.column,endColumn:s&&s.column,endLine:s&&s.line,line:o.line,url:a.toString()};if(a.protocol==="file:")if(Wg)c.file=Wg(a);else throw new Error("file: protocol is not available in this PostCSS build");let l=i.sourceContentFor(o.source);return l&&(c.source=l),c}toJSON(){let t={};for(let e of["hasBOM","css","file","id"])this[e]!=null&&(t[e]=this[e]);return this.map&&(t.map=z({},this.map),t.map.consumerCache&&(t.map.consumerCache=void 0)),t}},ya=Qs;Qs.default=Qs;_c&&_c.registerInput&&_c.registerInput(Qs);Nv=Cn,lr=class extends Nv{constructor(t){super(t),this.type="root",this.nodes||(this.nodes=[])}normalize(t,e,n){let r=super.normalize(t);if(e){if(n==="prepend")this.nodes.length>1?e.raws.before=this.nodes[1].raws.before:delete e.raws.before;else if(this.first!==e)for(let i of r)i.raws.before=e.raws.before}return r}removeChild(t,e){let n=this.index(t);return!e&&n===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[n].raws.before),super.removeChild(t)}toResult(t={}){return new Gv(new Lv,this,t).stringify()}};lr.registerLazyResult=t=>{Gv=t};lr.registerProcessor=t=>{Lv=t};xi=lr;lr.default=lr;Nv.registerRoot(lr);vi={comma(t){return vi.split(t,[","],!0)},space(t){let e=[" ",`
304
+ `," "];return vi.split(t,e)},split(t,e,n){let r=[],i="",o=!1,s=0,a=!1,c="",l=!1;for(let u of t)l?l=!1:u==="\\"?l=!0:a?u===c&&(a=!1):u==='"'||u==="'"?(a=!0,c=u):u==="("?s+=1:u===")"?s>0&&(s-=1):s===0&&e.includes(u)&&(o=!0),o?(i!==""&&r.push(i.trim()),i="",o=!1):i+=u;return(n||i!=="")&&r.push(i.trim()),r}},Xv=vi;vi.default=vi;Wv=Cn,Q2=Xv,$s=class extends Wv{get selectors(){return Q2.comma(this.selector)}set selectors(t){let e=this.selector?this.selector.match(/,\s*/):null,n=e?e[0]:","+this.raw("between","beforeOpen");this.selector=t.join(n)}constructor(t){super(t),this.type="rule",this.nodes||(this.nodes=[])}},Eh=$s;$s.default=$s;Wv.registerRule($s);$2=Ih,q2=fa,tU=ma,eU=ya,nU=Ov,rU=xi,iU=Eh;oU=wi;wi.default=wi;({dirname:Os,relative:Uv,resolve:Pv,sep:Mv}=he),{SourceMapConsumer:Fv,SourceMapGenerator:Ns}=he,{pathToFileURL:Mg}=he,sU=ya,aU=!!(Fv&&Ns),lU=!!(Os&&Pv&&Uv&&Mv),cU=class{constructor(t,e,n,r){this.stringify=t,this.mapOpts=n.map||{},this.root=e,this.opts=n,this.css=r,this.originalCSS=r,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let t;this.isInline()?t="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?t=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?t=this.mapOpts.annotation(this.opts.to,this.root):t=this.outputFile()+".map";let e=`
305
305
  `;this.css.includes(`\r
306
306
  `)&&(e=`\r
307
- `),this.css+=e+"/*# sourceMappingURL="+t+" */"}applyPrevMaps(){for(let t of this.previous()){let e=this.toUrl(this.path(t.file)),n=t.root||ks(t.file),r;this.mapOpts.sourcesContent===!1?(r=new kv(t.text),r.sourcesContent&&(r.sourcesContent=null)):r=t.consumer(),this.map.applySourceMap(r,e,this.toUrl(this.path(n)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let t;for(let e=this.root.nodes.length-1;e>=0;e--)t=this.root.nodes[e],t.type==="comment"&&t.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(e)}else this.css&&(this.css=this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),A2&&F2&&this.isMap())return this.generateMap();{let t="";return this.stringify(this.root,e=>{t+=e}),[t]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let t=this.previous()[0].consumer();t.file=this.outputFile(),this.map=Vs.fromSourceMap(t,{ignoreInvalidMapping:!0})}else this.map=new Vs({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 Vs({file:this.outputFile(),ignoreInvalidMapping:!0});let t=1,e=1,n="<no source>",r={generated:{column:0,line:0},original:{column:0,line:0},source:""},i,o;this.stringify(this.root,(s,a,c)=>{if(this.css+=s,a&&c!=="end"&&(r.generated.line=t,r.generated.column=e-1,a.source&&a.source.start?(r.source=this.sourcePath(a),r.original.line=a.source.start.line,r.original.column=a.source.start.column-1,this.map.addMapping(r)):(r.source=n,r.original.line=1,r.original.column=0,this.map.addMapping(r))),o=s.match(/\n/g),o?(t+=o.length,i=s.lastIndexOf(`
308
- `),e=s.length-i):e+=s.length,a&&c!=="start"){let l=a.parent||{raws:{}};(!(a.type==="decl"||a.type==="atrule"&&!a.nodes)||a!==l.last||l.raws.semicolon)&&(a.source&&a.source.end?(r.source=this.sourcePath(a),r.original.line=a.source.end.line,r.original.column=a.source.end.column-1,r.generated.line=t,r.generated.column=e-2,this.map.addMapping(r)):(r.source=n,r.original.line=1,r.original.column=0,r.generated.line=t,r.generated.column=e-1,this.map.addMapping(r)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(t=>t.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let t=this.mapOpts.annotation;return typeof t<"u"&&t!==!0?!1:this.previous().length?this.previous().some(e=>e.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(t=>t.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(t){if(this.mapOpts.absolute||t.charCodeAt(0)===60||/^\w+:\/\//.test(t))return t;let e=this.memoizedPaths.get(t);if(e)return e;let n=this.opts.to?ks(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(n=ks(Cv(n,this.mapOpts.annotation)));let r=Rv(n,t);return this.memoizedPaths.set(t,r),r}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(t=>{if(t.source&&t.source.input.map){let e=t.source.input.map;this.previousMaps.includes(e)||this.previousMaps.push(e)}});else{let t=new M2(this.originalCSS,this.opts);t.map&&this.previousMaps.push(t.map)}return this.previousMaps}setSourcesContent(){let t={};if(this.root)this.root.walk(e=>{if(e.source){let n=e.source.input.from;if(n&&!t[n]){t[n]=!0;let r=this.usesFileUrls?this.toFileUrl(n):this.toUrl(this.path(n));this.map.setSourceContent(r,e.source.input.css)}}});else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(e,this.css)}}sourcePath(t){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(t.source.input.from):this.toUrl(this.path(t.source.input.from))}toBase64(t){return Buffer?Buffer.from(t).toString("base64"):window.btoa(unescape(encodeURIComponent(t)))}toFileUrl(t){let e=this.memoizedFileURLs.get(t);if(e)return e;if(Zg){let n=Zg(t).toString();return this.memoizedFileURLs.set(t,n),n}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(t){let e=this.memoizedURLs.get(t);if(e)return e;Zv==="\\"&&(t=t.replace(/\\/g,"/"));let n=encodeURI(t).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(t,n),n}},Vv=J2,Jc=39,kg=34,is=92,Vg=47,os=10,qr=32,ss=12,as=9,ls=13,D2=91,Y2=93,K2=40,_2=41,H2=123,z2=125,B2=59,j2=42,Q2=58,$2=64,cs=/[\t\n\f\r "#'()/;[\\\]{}]/g,us=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,q2=/.[\r\n"'(/\\]/,xg=/[\da-f]/i,tU=function(t,e={}){let n=t.css.valueOf(),r=e.ignoreErrors,i,o,s,a,c,l,u,h,p,f,m=n.length,d=0,v=[],g=[];function w(){return d}function R(N){throw t.error("Unclosed "+N,d)}function E(){return g.length===0&&d>=m}function T(N){if(g.length)return g.pop();if(d>=m)return;let U=N?N.ignoreUnclosed:!1;switch(i=n.charCodeAt(d),i){case os:case qr:case as:case ls:case ss:{a=d;do a+=1,i=n.charCodeAt(a);while(i===qr||i===os||i===as||i===ls||i===ss);l=["space",n.slice(d,a)],d=a-1;break}case D2:case Y2:case H2:case z2:case Q2:case B2:case _2:{let C=String.fromCharCode(i);l=[C,C,d];break}case K2:{if(f=v.length?v.pop()[1]:"",p=n.charCodeAt(d+1),f==="url"&&p!==Jc&&p!==kg&&p!==qr&&p!==os&&p!==as&&p!==ss&&p!==ls){a=d;do{if(u=!1,a=n.indexOf(")",a+1),a===-1)if(r||U){a=d;break}else R("bracket");for(h=a;n.charCodeAt(h-1)===is;)h-=1,u=!u}while(u);l=["brackets",n.slice(d,a+1),d,a],d=a}else a=n.indexOf(")",d+1),o=n.slice(d,a+1),a===-1||q2.test(o)?l=["(","(",d]:(l=["brackets",o,d,a],d=a);break}case Jc:case kg:{c=i===Jc?"'":'"',a=d;do{if(u=!1,a=n.indexOf(c,a+1),a===-1)if(r||U){a=d+1;break}else R("string");for(h=a;n.charCodeAt(h-1)===is;)h-=1,u=!u}while(u);l=["string",n.slice(d,a+1),d,a],d=a;break}case $2:{cs.lastIndex=d+1,cs.test(n),cs.lastIndex===0?a=n.length-1:a=cs.lastIndex-2,l=["at-word",n.slice(d,a+1),d,a],d=a;break}case is:{for(a=d,s=!0;n.charCodeAt(a+1)===is;)a+=1,s=!s;if(i=n.charCodeAt(a+1),s&&i!==Vg&&i!==qr&&i!==os&&i!==as&&i!==ls&&i!==ss&&(a+=1,xg.test(n.charAt(a)))){for(;xg.test(n.charAt(a+1));)a+=1;n.charCodeAt(a+1)===qr&&(a+=1)}l=["word",n.slice(d,a+1),d,a],d=a;break}default:{i===Vg&&n.charCodeAt(d+1)===j2?(a=n.indexOf("*/",d+2)+1,a===0&&(r||U?a=n.length:R("comment")),l=["comment",n.slice(d,a+1),d,a],d=a):(us.lastIndex=d+1,us.test(n),us.lastIndex===0?a=n.length-1:a=us.lastIndex-2,l=["word",n.slice(d,a+1),d,a],v.push(l),d=a);break}}return d++,l}function V(N){g.push(N)}return{back:V,endOfFile:E,nextToken:T,position:w}},eU=yh,nU=ha,rU=pa,iU=ki,Ng=bh,oU=tU,Og={empty:!0,space:!0};aU=class{constructor(t){this.input=t,this.root=new iU,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:t,start:{column:1,line:1,offset:0}}}atrule(t){let e=new eU;e.name=t[1].slice(1),e.name===""&&this.unnamedAtrule(e,t),this.init(e,t[2]);let n,r,i,o=!1,s=!1,a=[],c=[];for(;!this.tokenizer.endOfFile();){if(t=this.tokenizer.nextToken(),n=t[0],n==="("||n==="["?c.push(n==="("?")":"]"):n==="{"&&c.length>0?c.push("}"):n===c[c.length-1]&&c.pop(),c.length===0)if(n===";"){e.source.end=this.getPosition(t[2]),e.source.end.offset++,this.semicolon=!0;break}else if(n==="{"){s=!0;break}else if(n==="}"){if(a.length>0){for(i=a.length-1,r=a[i];r&&r[0]==="space";)r=a[--i];r&&(e.source.end=this.getPosition(r[3]||r[2]),e.source.end.offset++)}this.end(t);break}else a.push(t);else a.push(t);if(this.tokenizer.endOfFile()){o=!0;break}}e.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(e.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(e,"params",a),o&&(t=a[a.length-1],e.source.end=this.getPosition(t[3]||t[2]),e.source.end.offset++,this.spaces=e.raws.between,e.raws.between="")):(e.raws.afterName="",e.params=""),s&&(e.nodes=[],this.current=e)}checkMissedSemicolon(t){let e=this.colon(t);if(e===!1)return;let n=0,r;for(let i=e-1;i>=0&&(r=t[i],!(r[0]!=="space"&&(n+=1,n===2)));i--);throw this.input.error("Missed semicolon",r[0]==="word"?r[3]+1:r[2])}colon(t){let e=0,n,r,i;for(let[o,s]of t.entries()){if(r=s,i=r[0],i==="("&&(e+=1),i===")"&&(e-=1),e===0&&i===":")if(!n)this.doubleColon(r);else{if(n[0]==="word"&&n[1]==="progid")continue;return o}n=r}return!1}comment(t){let e=new nU;this.init(e,t[2]),e.source.end=this.getPosition(t[3]||t[2]),e.source.end.offset++;let n=t[1].slice(2,-2);if(/^\s*$/.test(n))e.text="",e.raws.left=n,e.raws.right="";else{let r=n.match(/^(\s*)([^]*\S)(\s*)$/);e.text=r[2],e.raws.left=r[1],e.raws.right=r[3]}}createTokenizer(){this.tokenizer=oU(this.input)}decl(t,e){let n=new rU;this.init(n,t[0][2]);let r=t[t.length-1];for(r[0]===";"&&(this.semicolon=!0,t.pop()),n.source.end=this.getPosition(r[3]||r[2]||sU(t)),n.source.end.offset++;t[0][0]!=="word";)t.length===1&&this.unknownWord(t),n.raws.before+=t.shift()[1];for(n.source.start=this.getPosition(t[0][2]),n.prop="";t.length;){let a=t[0][0];if(a===":"||a==="space"||a==="comment")break;n.prop+=t.shift()[1]}n.raws.between="";let i;for(;t.length;)if(i=t.shift(),i[0]===":"){n.raws.between+=i[1];break}else i[0]==="word"&&/\w/.test(i[1])&&this.unknownWord([i]),n.raws.between+=i[1];(n.prop[0]==="_"||n.prop[0]==="*")&&(n.raws.before+=n.prop[0],n.prop=n.prop.slice(1));let o=[],s;for(;t.length&&(s=t[0][0],!(s!=="space"&&s!=="comment"));)o.push(t.shift());this.precheckMissedSemicolon(t);for(let a=t.length-1;a>=0;a--){if(i=t[a],i[1].toLowerCase()==="!important"){n.important=!0;let c=this.stringFrom(t,a);c=this.spacesFromEnd(t)+c,c!==" !important"&&(n.raws.important=c);break}else if(i[1].toLowerCase()==="important"){let c=t.slice(0),l="";for(let u=a;u>0;u--){let h=c[u][0];if(l.trim().startsWith("!")&&h!=="space")break;l=c.pop()[1]+l}l.trim().startsWith("!")&&(n.important=!0,n.raws.important=l,t=c)}if(i[0]!=="space"&&i[0]!=="comment")break}t.some(a=>a[0]!=="space"&&a[0]!=="comment")&&(n.raws.between+=o.map(a=>a[1]).join(""),o=[]),this.raw(n,"value",o.concat(t),e),n.value.includes(":")&&!e&&this.checkMissedSemicolon(t)}doubleColon(t){throw this.input.error("Double colon",{offset:t[2]},{offset:t[2]+t[1].length})}emptyRule(t){let e=new Ng;this.init(e,t[2]),e.selector="",e.raws.between="",this.current=e}end(t){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(t[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(t)}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(t){if(this.spaces+=t[1],this.current.nodes){let e=this.current.nodes[this.current.nodes.length-1];e&&e.type==="rule"&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="",e.source.end=this.getPosition(t[2]),e.source.end.offset+=e.raws.ownSemicolon.length)}}getPosition(t){let e=this.input.fromOffset(t);return{column:e.col,line:e.line,offset:t}}init(t,e){this.current.push(t),t.source={input:this.input,start:this.getPosition(e)},t.raws.before=this.spaces,this.spaces="",t.type!=="comment"&&(this.semicolon=!1)}other(t){let e=!1,n=null,r=!1,i=null,o=[],s=t[1].startsWith("--"),a=[],c=t;for(;c;){if(n=c[0],a.push(c),n==="("||n==="[")i||(i=c),o.push(n==="("?")":"]");else if(s&&r&&n==="{")i||(i=c),o.push("}");else if(o.length===0)if(n===";")if(r){this.decl(a,s);return}else break;else if(n==="{"){this.rule(a);return}else if(n==="}"){this.tokenizer.back(a.pop()),e=!0;break}else n===":"&&(r=!0);else n===o[o.length-1]&&(o.pop(),o.length===0&&(i=null));c=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(e=!0),o.length>0&&this.unclosedBracket(i),e&&r){if(!s)for(;a.length&&(c=a[a.length-1][0],!(c!=="space"&&c!=="comment"));)this.tokenizer.back(a.pop());this.decl(a,s)}else this.unknownWord(a)}parse(){let t;for(;!this.tokenizer.endOfFile();)switch(t=this.tokenizer.nextToken(),t[0]){case"space":this.spaces+=t[1];break;case";":this.freeSemicolon(t);break;case"}":this.end(t);break;case"comment":this.comment(t);break;case"at-word":this.atrule(t);break;case"{":this.emptyRule(t);break;default:this.other(t);break}this.endFile()}precheckMissedSemicolon(){}raw(t,e,n,r){let i,o,s=n.length,a="",c=!0,l,u;for(let h=0;h<s;h+=1)i=n[h],o=i[0],o==="space"&&h===s-1&&!r?c=!1:o==="comment"?(u=n[h-1]?n[h-1][0]:"empty",l=n[h+1]?n[h+1][0]:"empty",!Og[u]&&!Og[l]?a.slice(-1)===","?c=!1:a+=i[1]:c=!1):a+=i[1];if(!c){let h=n.reduce((p,f)=>p+f[1],"");t.raws[e]={raw:h,value:a}}t[e]=a}rule(t){t.pop();let e=new Ng;this.init(e,t[0][2]),e.raws.between=this.spacesAndCommentsFromEnd(t),this.raw(e,"selector",t),this.current=e}spacesAndCommentsFromEnd(t){let e,n="";for(;t.length&&(e=t[t.length-1][0],!(e!=="space"&&e!=="comment"));)n=t.pop()[1]+n;return n}spacesAndCommentsFromStart(t){let e,n="";for(;t.length&&(e=t[0][0],!(e!=="space"&&e!=="comment"));)n+=t.shift()[1];return n}spacesFromEnd(t){let e,n="";for(;t.length&&(e=t[t.length-1][0],e==="space");)n=t.pop()[1]+n;return n}stringFrom(t,e){let n="";for(let r=e;r<t.length;r++)n+=t[r][1];return t.splice(e,t.length-e),n}unclosedBlock(){let t=this.current.source.start;throw this.input.error("Unclosed block",t.line,t.column)}unclosedBracket(t){throw this.input.error("Unclosed bracket",{offset:t[2]},{offset:t[2]+1})}unexpectedClose(t){throw this.input.error("Unexpected }",{offset:t[2]},{offset:t[2]+1})}unknownWord(t){throw this.input.error("Unknown word "+t[0][1],{offset:t[0][2]},{offset:t[0][2]+t[0][1].length})}unnamedAtrule(t,e){throw this.input.error("At-rule without name",{offset:e[2]},{offset:e[2]+e[1].length})}},lU=aU,cU=Rn,uU=da,hU=lU;vh=js;js.default=js;cU.registerParse(js);Cu=class{constructor(t,e={}){if(this.type="warning",this.text=t,e.node&&e.node.source){let n=e.node.rangeBy(e);this.line=n.start.line,this.column=n.start.column,this.endLine=n.end.line,this.endColumn=n.end.column}for(let n in e)this[n]=e[n]}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}},xv=Cu;Cu.default=Cu;pU=xv,Zu=class{get content(){return this.css}constructor(t,e,n){this.processor=t,this.messages=[],this.root=e,this.opts=n,this.css=void 0,this.map=void 0}toString(){return this.css}warn(t,e={}){e.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(e.plugin=this.lastPlugin.postcssPlugin);let n=new pU(t,e);return this.messages.push(n),n}warnings(){return this.messages.filter(t=>t.type==="warning")}},wh=Zu;Zu.default=Zu;Gg={},Nv=function(t){Gg[t]||(Gg[t]=!0,typeof console<"u"&&console.warn&&console.warn(t))},dU=Rn,fU=gh,mU=Vv,yU=vh,Lg=wh,gU=ki,bU=ca,{isClean:we,my:vU}=Zi,wU=Nv,SU={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},IU={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},TU={Once:!0,postcssPlugin:!0,prepare:!0},lr=0;Vu={},cr=class Gv{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(e,n,r){this.stringified=!1,this.processed=!1;let i;if(typeof n=="object"&&n!==null&&(n.type==="root"||n.type==="document"))i=ku(n);else if(n instanceof Gv||n instanceof Lg)i=ku(n.root),n.map&&(typeof r.map>"u"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=n.map);else{let o=yU;r.syntax&&(o=r.syntax.parse),r.parser&&(o=r.parser),o.parse&&(o=o.parse);try{i=o(n,r)}catch(s){this.processed=!0,this.error=s}i&&!i[vU]&&dU.rebuild(i)}this.result=new Lg(e,i,r),this.helpers=Kt(z({},Vu),{postcss:Vu,result:this.result}),this.plugins=this.processor.plugins.map(o=>typeof o=="object"&&o.prepare?z(z({},o),o.prepare(this.result)):o)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,n){let r=this.result.lastPlugin;try{if(n&&n.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin)e.plugin=r.postcssPlugin,e.setMessage();else if(r.postcssVersion&&process.env.NODE_ENV!=="production"){let i=r.postcssPlugin,o=r.postcssVersion,s=this.result.processor.version,a=o.split("."),c=s.split(".");(a[0]!==c[0]||parseInt(a[1])>parseInt(c[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+s+", but "+i+" uses "+o+". Perhaps this is the source of the error below.")}}catch(i){console&&console.error&&console.error(i)}return e}prepareVisitors(){this.listeners={};let e=(n,r,i)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([n,i])};for(let n of this.plugins)if(typeof n=="object")for(let r in n){if(!IU[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${n.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!TU[r])if(typeof n[r]=="object")for(let i in n[r])i==="*"?e(n,r,n[r][i]):e(n,r+"-"+i.toLowerCase(),n[r][i]);else typeof n[r]=="function"&&e(n,r,n[r])}this.hasListener=Object.keys(this.listeners).length>0}runAsync(){return Yt(this,null,function*(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let n=this.plugins[e],r=this.runOnRoot(n);if(ti(r))try{yield r}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[we];){e[we]=!0;let n=[Xg(e)];for(;n.length>0;){let r=this.visitTick(n);if(ti(r))try{yield r}catch(i){let o=n[n.length-1].node;throw this.handleError(i,o)}}}if(this.listeners.OnceExit)for(let[n,r]of this.listeners.OnceExit){this.result.lastPlugin=n;try{if(e.type==="document"){let i=e.nodes.map(o=>r(o,this.helpers));yield Promise.all(i)}else yield r(e,this.helpers)}catch(i){throw this.handleError(i)}}}return this.processed=!0,this.stringify()})}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let n=this.result.root.nodes.map(r=>e.Once(r,this.helpers));return ti(n[0])?Promise.all(n):n}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(n){throw this.handleError(n)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,n=bU;e.syntax&&(n=e.syntax.stringify),e.stringifier&&(n=e.stringifier),n.stringify&&(n=n.stringify);let r=new mU(n,this.result.root,this.result.opts).generate();return this.result.css=r[0],this.result.map=r[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 e of this.plugins){let n=this.runOnRoot(e);if(ti(n))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[we];)e[we]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let n of e.nodes)this.visitSync(this.listeners.OnceExit,n);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,n){return process.env.NODE_ENV!=="production"&&("from"in this.opts||wU("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(e,n)}toString(){return this.css}visitSync(e,n){for(let[r,i]of e){this.result.lastPlugin=r;let o;try{o=i(n,this.helpers)}catch(s){throw this.handleError(s,n.proxyOf)}if(n.type!=="root"&&n.type!=="document"&&!n.parent)return!0;if(ti(o))throw this.getAsyncError()}}visitTick(e){let n=e[e.length-1],{node:r,visitors:i}=n;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(i.length>0&&n.visitorIndex<i.length){let[s,a]=i[n.visitorIndex];n.visitorIndex+=1,n.visitorIndex===i.length&&(n.visitors=[],n.visitorIndex=0),this.result.lastPlugin=s;try{return a(r.toProxy(),this.helpers)}catch(c){throw this.handleError(c,r)}}if(n.iterator!==0){let s=n.iterator,a;for(;a=r.nodes[r.indexes[s]];)if(r.indexes[s]+=1,!a[we]){a[we]=!0,e.push(Xg(a));return}n.iterator=0,delete r.indexes[s]}let o=n.events;for(;n.eventIndex<o.length;){let s=o[n.eventIndex];if(n.eventIndex+=1,s===lr){r.nodes&&r.nodes.length&&(r[we]=!0,n.iterator=r.getIterator());return}else if(this.listeners[s]){n.visitors=this.listeners[s];return}}e.pop()}walkSync(e){e[we]=!0;let n=Ov(e);for(let r of n)if(r===lr)e.nodes&&e.each(i=>{i[we]||this.walkSync(i)});else{let i=this.listeners[r];if(i&&this.visitSync(i,e.toProxy()))return}}warnings(){return this.sync().warnings()}};cr.registerPostcss=t=>{Vu=t};Lv=cr;cr.default=cr;gU.registerLazyResult(cr);fU.registerLazyResult(cr);EU=Vv,RU=vh,CU=wh,ZU=ca,kU=Nv,xu=class{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.tn)return this.tn;let t,e=RU;try{t=e(this.mr,this.un)}catch(n){this.error=n}if(this.error)throw this.error;return this.tn=t,t}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(t,e,n){e=e.toString(),this.stringified=!1,this.uo=t,this.mr=e,this.un=n,this.Qa=void 0;let r,i=ZU;this.result=new CU(this.uo,r,this.un),this.result.css=e;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let s=new EU(i,r,this.un,e);if(s.isMap()){let[a,c]=s.generate();a&&(this.result.css=a),c&&(this.result.map=c)}else s.clearAnnotation(),this.result.css=s.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}sync(){if(this.error)throw this.error;return this.result}then(t,e){return process.env.NODE_ENV!=="production"&&("from"in this.un||kU("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(t,e)}toString(){return this.mr}warnings(){return[]}},VU=xu;xu.default=xu;xU=gh,NU=Lv,OU=VU,GU=ki,vi=class{constructor(t=[]){this.version="8.5.3",this.plugins=this.normalize(t)}normalize(t){let e=[];for(let n of t)if(n.postcss===!0?n=n():n.postcss&&(n=n.postcss),typeof n=="object"&&Array.isArray(n.plugins))e=e.concat(n.plugins);else if(typeof n=="object"&&n.postcssPlugin)e.push(n);else if(typeof n=="function")e.push(n);else if(typeof n=="object"&&(n.parse||n.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(n+" is not a PostCSS plugin");return e}process(t,e={}){return!this.plugins.length&&!e.parser&&!e.stringifier&&!e.syntax?new OU(this,t,e):new NU(this,t,e)}use(t){return this.plugins=this.plugins.concat(this.normalize([t])),this}},LU=vi;vi.default=vi;GU.registerProcessor(vi);xU.registerProcessor(vi);Xv=yh,Wv=ha,XU=Rn,WU=dh,Uv=pa,Pv=gh,UU=P2,PU=da,MU=Lv,FU=Tv,AU=ua,JU=vh,Sh=LU,DU=wh,Mv=ki,Fv=bh,YU=ca,KU=xv;ht.plugin=function(t,e){let n=!1;function r(...o){console&&console.warn&&!n&&(n=!0,console.warn(t+`: postcss.plugin was deprecated. Migration guide:
307
+ `),this.css+=e+"/*# sourceMappingURL="+t+" */"}applyPrevMaps(){for(let t of this.previous()){let e=this.toUrl(this.path(t.file)),n=t.root||Os(t.file),r;this.mapOpts.sourcesContent===!1?(r=new Fv(t.text),r.sourcesContent&&(r.sourcesContent=null)):r=t.consumer(),this.map.applySourceMap(r,e,this.toUrl(this.path(n)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let t;for(let e=this.root.nodes.length-1;e>=0;e--)t=this.root.nodes[e],t.type==="comment"&&t.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(e)}else this.css&&(this.css=this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),lU&&aU&&this.isMap())return this.generateMap();{let t="";return this.stringify(this.root,e=>{t+=e}),[t]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let t=this.previous()[0].consumer();t.file=this.outputFile(),this.map=Ns.fromSourceMap(t,{ignoreInvalidMapping:!0})}else this.map=new Ns({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 Ns({file:this.outputFile(),ignoreInvalidMapping:!0});let t=1,e=1,n="<no source>",r={generated:{column:0,line:0},original:{column:0,line:0},source:""},i,o;this.stringify(this.root,(s,a,c)=>{if(this.css+=s,a&&c!=="end"&&(r.generated.line=t,r.generated.column=e-1,a.source&&a.source.start?(r.source=this.sourcePath(a),r.original.line=a.source.start.line,r.original.column=a.source.start.column-1,this.map.addMapping(r)):(r.source=n,r.original.line=1,r.original.column=0,this.map.addMapping(r))),o=s.match(/\n/g),o?(t+=o.length,i=s.lastIndexOf(`
308
+ `),e=s.length-i):e+=s.length,a&&c!=="start"){let l=a.parent||{raws:{}};(!(a.type==="decl"||a.type==="atrule"&&!a.nodes)||a!==l.last||l.raws.semicolon)&&(a.source&&a.source.end?(r.source=this.sourcePath(a),r.original.line=a.source.end.line,r.original.column=a.source.end.column-1,r.generated.line=t,r.generated.column=e-2,this.map.addMapping(r)):(r.source=n,r.original.line=1,r.original.column=0,r.generated.line=t,r.generated.column=e-1,this.map.addMapping(r)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(t=>t.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let t=this.mapOpts.annotation;return typeof t<"u"&&t!==!0?!1:this.previous().length?this.previous().some(e=>e.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(t=>t.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(t){if(this.mapOpts.absolute||t.charCodeAt(0)===60||/^\w+:\/\//.test(t))return t;let e=this.memoizedPaths.get(t);if(e)return e;let n=this.opts.to?Os(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(n=Os(Pv(n,this.mapOpts.annotation)));let r=Uv(n,t);return this.memoizedPaths.set(t,r),r}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(t=>{if(t.source&&t.source.input.map){let e=t.source.input.map;this.previousMaps.includes(e)||this.previousMaps.push(e)}});else{let t=new sU(this.originalCSS,this.opts);t.map&&this.previousMaps.push(t.map)}return this.previousMaps}setSourcesContent(){let t={};if(this.root)this.root.walk(e=>{if(e.source){let n=e.source.input.from;if(n&&!t[n]){t[n]=!0;let r=this.usesFileUrls?this.toFileUrl(n):this.toUrl(this.path(n));this.map.setSourceContent(r,e.source.input.css)}}});else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(e,this.css)}}sourcePath(t){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(t.source.input.from):this.toUrl(this.path(t.source.input.from))}toBase64(t){return Buffer?Buffer.from(t).toString("base64"):window.btoa(unescape(encodeURIComponent(t)))}toFileUrl(t){let e=this.memoizedFileURLs.get(t);if(e)return e;if(Mg){let n=Mg(t).toString();return this.memoizedFileURLs.set(t,n),n}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(t){let e=this.memoizedURLs.get(t);if(e)return e;Mv==="\\"&&(t=t.replace(/\\/g,"/"));let n=encodeURI(t).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(t,n),n}},Av=cU,zc=39,Fg=34,as=92,Ag=47,ls=10,ei=32,cs=12,us=9,hs=13,uU=91,hU=93,pU=40,dU=41,fU=123,mU=125,yU=59,gU=42,bU=58,vU=64,ps=/[\t\n\f\r "#'()/;[\\\]{}]/g,ds=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,wU=/.[\r\n"'(/\\]/,Jg=/[\da-f]/i,SU=function(t,e={}){let n=t.css.valueOf(),r=e.ignoreErrors,i,o,s,a,c,l,u,h,p,f,m=n.length,d=0,v=[],g=[];function w(){return d}function R(N){throw t.error("Unclosed "+N,d)}function E(){return g.length===0&&d>=m}function T(N){if(g.length)return g.pop();if(d>=m)return;let U=N?N.ignoreUnclosed:!1;switch(i=n.charCodeAt(d),i){case ls:case ei:case us:case hs:case cs:{a=d;do a+=1,i=n.charCodeAt(a);while(i===ei||i===ls||i===us||i===hs||i===cs);l=["space",n.slice(d,a)],d=a-1;break}case uU:case hU:case fU:case mU:case bU:case yU:case dU:{let C=String.fromCharCode(i);l=[C,C,d];break}case pU:{if(f=v.length?v.pop()[1]:"",p=n.charCodeAt(d+1),f==="url"&&p!==zc&&p!==Fg&&p!==ei&&p!==ls&&p!==us&&p!==cs&&p!==hs){a=d;do{if(u=!1,a=n.indexOf(")",a+1),a===-1)if(r||U){a=d;break}else R("bracket");for(h=a;n.charCodeAt(h-1)===as;)h-=1,u=!u}while(u);l=["brackets",n.slice(d,a+1),d,a],d=a}else a=n.indexOf(")",d+1),o=n.slice(d,a+1),a===-1||wU.test(o)?l=["(","(",d]:(l=["brackets",o,d,a],d=a);break}case zc:case Fg:{c=i===zc?"'":'"',a=d;do{if(u=!1,a=n.indexOf(c,a+1),a===-1)if(r||U){a=d+1;break}else R("string");for(h=a;n.charCodeAt(h-1)===as;)h-=1,u=!u}while(u);l=["string",n.slice(d,a+1),d,a],d=a;break}case vU:{ps.lastIndex=d+1,ps.test(n),ps.lastIndex===0?a=n.length-1:a=ps.lastIndex-2,l=["at-word",n.slice(d,a+1),d,a],d=a;break}case as:{for(a=d,s=!0;n.charCodeAt(a+1)===as;)a+=1,s=!s;if(i=n.charCodeAt(a+1),s&&i!==Ag&&i!==ei&&i!==ls&&i!==us&&i!==hs&&i!==cs&&(a+=1,Jg.test(n.charAt(a)))){for(;Jg.test(n.charAt(a+1));)a+=1;n.charCodeAt(a+1)===ei&&(a+=1)}l=["word",n.slice(d,a+1),d,a],d=a;break}default:{i===Ag&&n.charCodeAt(d+1)===gU?(a=n.indexOf("*/",d+2)+1,a===0&&(r||U?a=n.length:R("comment")),l=["comment",n.slice(d,a+1),d,a],d=a):(ds.lastIndex=d+1,ds.test(n),ds.lastIndex===0?a=n.length-1:a=ds.lastIndex-2,l=["word",n.slice(d,a+1),d,a],v.push(l),d=a);break}}return d++,l}function x(N){g.push(N)}return{back:x,endOfFile:E,nextToken:T,position:w}},IU=Ih,TU=fa,EU=ma,RU=xi,Dg=Eh,CU=SU,Yg={empty:!0,space:!0};kU=class{constructor(t){this.input=t,this.root=new RU,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:t,start:{column:1,line:1,offset:0}}}atrule(t){let e=new IU;e.name=t[1].slice(1),e.name===""&&this.unnamedAtrule(e,t),this.init(e,t[2]);let n,r,i,o=!1,s=!1,a=[],c=[];for(;!this.tokenizer.endOfFile();){if(t=this.tokenizer.nextToken(),n=t[0],n==="("||n==="["?c.push(n==="("?")":"]"):n==="{"&&c.length>0?c.push("}"):n===c[c.length-1]&&c.pop(),c.length===0)if(n===";"){e.source.end=this.getPosition(t[2]),e.source.end.offset++,this.semicolon=!0;break}else if(n==="{"){s=!0;break}else if(n==="}"){if(a.length>0){for(i=a.length-1,r=a[i];r&&r[0]==="space";)r=a[--i];r&&(e.source.end=this.getPosition(r[3]||r[2]),e.source.end.offset++)}this.end(t);break}else a.push(t);else a.push(t);if(this.tokenizer.endOfFile()){o=!0;break}}e.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(e.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(e,"params",a),o&&(t=a[a.length-1],e.source.end=this.getPosition(t[3]||t[2]),e.source.end.offset++,this.spaces=e.raws.between,e.raws.between="")):(e.raws.afterName="",e.params=""),s&&(e.nodes=[],this.current=e)}checkMissedSemicolon(t){let e=this.colon(t);if(e===!1)return;let n=0,r;for(let i=e-1;i>=0&&(r=t[i],!(r[0]!=="space"&&(n+=1,n===2)));i--);throw this.input.error("Missed semicolon",r[0]==="word"?r[3]+1:r[2])}colon(t){let e=0,n,r,i;for(let[o,s]of t.entries()){if(r=s,i=r[0],i==="("&&(e+=1),i===")"&&(e-=1),e===0&&i===":")if(!n)this.doubleColon(r);else{if(n[0]==="word"&&n[1]==="progid")continue;return o}n=r}return!1}comment(t){let e=new TU;this.init(e,t[2]),e.source.end=this.getPosition(t[3]||t[2]),e.source.end.offset++;let n=t[1].slice(2,-2);if(/^\s*$/.test(n))e.text="",e.raws.left=n,e.raws.right="";else{let r=n.match(/^(\s*)([^]*\S)(\s*)$/);e.text=r[2],e.raws.left=r[1],e.raws.right=r[3]}}createTokenizer(){this.tokenizer=CU(this.input)}decl(t,e){let n=new EU;this.init(n,t[0][2]);let r=t[t.length-1];for(r[0]===";"&&(this.semicolon=!0,t.pop()),n.source.end=this.getPosition(r[3]||r[2]||ZU(t)),n.source.end.offset++;t[0][0]!=="word";)t.length===1&&this.unknownWord(t),n.raws.before+=t.shift()[1];for(n.source.start=this.getPosition(t[0][2]),n.prop="";t.length;){let a=t[0][0];if(a===":"||a==="space"||a==="comment")break;n.prop+=t.shift()[1]}n.raws.between="";let i;for(;t.length;)if(i=t.shift(),i[0]===":"){n.raws.between+=i[1];break}else i[0]==="word"&&/\w/.test(i[1])&&this.unknownWord([i]),n.raws.between+=i[1];(n.prop[0]==="_"||n.prop[0]==="*")&&(n.raws.before+=n.prop[0],n.prop=n.prop.slice(1));let o=[],s;for(;t.length&&(s=t[0][0],!(s!=="space"&&s!=="comment"));)o.push(t.shift());this.precheckMissedSemicolon(t);for(let a=t.length-1;a>=0;a--){if(i=t[a],i[1].toLowerCase()==="!important"){n.important=!0;let c=this.stringFrom(t,a);c=this.spacesFromEnd(t)+c,c!==" !important"&&(n.raws.important=c);break}else if(i[1].toLowerCase()==="important"){let c=t.slice(0),l="";for(let u=a;u>0;u--){let h=c[u][0];if(l.trim().startsWith("!")&&h!=="space")break;l=c.pop()[1]+l}l.trim().startsWith("!")&&(n.important=!0,n.raws.important=l,t=c)}if(i[0]!=="space"&&i[0]!=="comment")break}t.some(a=>a[0]!=="space"&&a[0]!=="comment")&&(n.raws.between+=o.map(a=>a[1]).join(""),o=[]),this.raw(n,"value",o.concat(t),e),n.value.includes(":")&&!e&&this.checkMissedSemicolon(t)}doubleColon(t){throw this.input.error("Double colon",{offset:t[2]},{offset:t[2]+t[1].length})}emptyRule(t){let e=new Dg;this.init(e,t[2]),e.selector="",e.raws.between="",this.current=e}end(t){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(t[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(t)}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(t){if(this.spaces+=t[1],this.current.nodes){let e=this.current.nodes[this.current.nodes.length-1];e&&e.type==="rule"&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="",e.source.end=this.getPosition(t[2]),e.source.end.offset+=e.raws.ownSemicolon.length)}}getPosition(t){let e=this.input.fromOffset(t);return{column:e.col,line:e.line,offset:t}}init(t,e){this.current.push(t),t.source={input:this.input,start:this.getPosition(e)},t.raws.before=this.spaces,this.spaces="",t.type!=="comment"&&(this.semicolon=!1)}other(t){let e=!1,n=null,r=!1,i=null,o=[],s=t[1].startsWith("--"),a=[],c=t;for(;c;){if(n=c[0],a.push(c),n==="("||n==="[")i||(i=c),o.push(n==="("?")":"]");else if(s&&r&&n==="{")i||(i=c),o.push("}");else if(o.length===0)if(n===";")if(r){this.decl(a,s);return}else break;else if(n==="{"){this.rule(a);return}else if(n==="}"){this.tokenizer.back(a.pop()),e=!0;break}else n===":"&&(r=!0);else n===o[o.length-1]&&(o.pop(),o.length===0&&(i=null));c=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(e=!0),o.length>0&&this.unclosedBracket(i),e&&r){if(!s)for(;a.length&&(c=a[a.length-1][0],!(c!=="space"&&c!=="comment"));)this.tokenizer.back(a.pop());this.decl(a,s)}else this.unknownWord(a)}parse(){let t;for(;!this.tokenizer.endOfFile();)switch(t=this.tokenizer.nextToken(),t[0]){case"space":this.spaces+=t[1];break;case";":this.freeSemicolon(t);break;case"}":this.end(t);break;case"comment":this.comment(t);break;case"at-word":this.atrule(t);break;case"{":this.emptyRule(t);break;default:this.other(t);break}this.endFile()}precheckMissedSemicolon(){}raw(t,e,n,r){let i,o,s=n.length,a="",c=!0,l,u;for(let h=0;h<s;h+=1)i=n[h],o=i[0],o==="space"&&h===s-1&&!r?c=!1:o==="comment"?(u=n[h-1]?n[h-1][0]:"empty",l=n[h+1]?n[h+1][0]:"empty",!Yg[u]&&!Yg[l]?a.slice(-1)===","?c=!1:a+=i[1]:c=!1):a+=i[1];if(!c){let h=n.reduce((p,f)=>p+f[1],"");t.raws[e]={raw:h,value:a}}t[e]=a}rule(t){t.pop();let e=new Dg;this.init(e,t[0][2]),e.raws.between=this.spacesAndCommentsFromEnd(t),this.raw(e,"selector",t),this.current=e}spacesAndCommentsFromEnd(t){let e,n="";for(;t.length&&(e=t[t.length-1][0],!(e!=="space"&&e!=="comment"));)n=t.pop()[1]+n;return n}spacesAndCommentsFromStart(t){let e,n="";for(;t.length&&(e=t[0][0],!(e!=="space"&&e!=="comment"));)n+=t.shift()[1];return n}spacesFromEnd(t){let e,n="";for(;t.length&&(e=t[t.length-1][0],e==="space");)n=t.pop()[1]+n;return n}stringFrom(t,e){let n="";for(let r=e;r<t.length;r++)n+=t[r][1];return t.splice(e,t.length-e),n}unclosedBlock(){let t=this.current.source.start;throw this.input.error("Unclosed block",t.line,t.column)}unclosedBracket(t){throw this.input.error("Unclosed bracket",{offset:t[2]},{offset:t[2]+1})}unexpectedClose(t){throw this.input.error("Unexpected }",{offset:t[2]},{offset:t[2]+1})}unknownWord(t){throw this.input.error("Unknown word "+t[0][1],{offset:t[0][2]},{offset:t[0][2]+t[0][1].length})}unnamedAtrule(t,e){throw this.input.error("At-rule without name",{offset:e[2]},{offset:e[2]+e[1].length})}},VU=kU,xU=Cn,OU=ya,NU=VU;Rh=qs;qs.default=qs;xU.registerParse(qs);Nu=class{constructor(t,e={}){if(this.type="warning",this.text=t,e.node&&e.node.source){let n=e.node.rangeBy(e);this.line=n.start.line,this.column=n.start.column,this.endLine=n.end.line,this.endColumn=n.end.column}for(let n in e)this[n]=e[n]}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}},Jv=Nu;Nu.default=Nu;GU=Jv,Gu=class{get content(){return this.css}constructor(t,e,n){this.processor=t,this.messages=[],this.root=e,this.opts=n,this.css=void 0,this.map=void 0}toString(){return this.css}warn(t,e={}){e.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(e.plugin=this.lastPlugin.postcssPlugin);let n=new GU(t,e);return this.messages.push(n),n}warnings(){return this.messages.filter(t=>t.type==="warning")}},Ch=Gu;Gu.default=Gu;Kg={},Dv=function(t){Kg[t]||(Kg[t]=!0,typeof console<"u"&&console.warn&&console.warn(t))},LU=Cn,XU=Th,WU=Av,UU=Rh,_g=Ch,PU=xi,MU=pa,{isClean:Se,my:FU}=Vi,AU=Dv,JU={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},DU={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},YU={Once:!0,postcssPlugin:!0,prepare:!0},cr=0;Xu={},ur=class Kv{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(e,n,r){this.stringified=!1,this.processed=!1;let i;if(typeof n=="object"&&n!==null&&(n.type==="root"||n.type==="document"))i=Lu(n);else if(n instanceof Kv||n instanceof _g)i=Lu(n.root),n.map&&(typeof r.map>"u"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=n.map);else{let o=UU;r.syntax&&(o=r.syntax.parse),r.parser&&(o=r.parser),o.parse&&(o=o.parse);try{i=o(n,r)}catch(s){this.processed=!0,this.error=s}i&&!i[FU]&&LU.rebuild(i)}this.result=new _g(e,i,r),this.helpers=_t(z({},Xu),{postcss:Xu,result:this.result}),this.plugins=this.processor.plugins.map(o=>typeof o=="object"&&o.prepare?z(z({},o),o.prepare(this.result)):o)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,n){let r=this.result.lastPlugin;try{if(n&&n.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin)e.plugin=r.postcssPlugin,e.setMessage();else if(r.postcssVersion&&process.env.NODE_ENV!=="production"){let i=r.postcssPlugin,o=r.postcssVersion,s=this.result.processor.version,a=o.split("."),c=s.split(".");(a[0]!==c[0]||parseInt(a[1])>parseInt(c[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+s+", but "+i+" uses "+o+". Perhaps this is the source of the error below.")}}catch(i){console&&console.error&&console.error(i)}return e}prepareVisitors(){this.listeners={};let e=(n,r,i)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([n,i])};for(let n of this.plugins)if(typeof n=="object")for(let r in n){if(!DU[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${n.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!YU[r])if(typeof n[r]=="object")for(let i in n[r])i==="*"?e(n,r,n[r][i]):e(n,r+"-"+i.toLowerCase(),n[r][i]);else typeof n[r]=="function"&&e(n,r,n[r])}this.hasListener=Object.keys(this.listeners).length>0}runAsync(){return Kt(this,null,function*(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let n=this.plugins[e],r=this.runOnRoot(n);if(ni(r))try{yield r}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Se];){e[Se]=!0;let n=[Hg(e)];for(;n.length>0;){let r=this.visitTick(n);if(ni(r))try{yield r}catch(i){let o=n[n.length-1].node;throw this.handleError(i,o)}}}if(this.listeners.OnceExit)for(let[n,r]of this.listeners.OnceExit){this.result.lastPlugin=n;try{if(e.type==="document"){let i=e.nodes.map(o=>r(o,this.helpers));yield Promise.all(i)}else yield r(e,this.helpers)}catch(i){throw this.handleError(i)}}}return this.processed=!0,this.stringify()})}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let n=this.result.root.nodes.map(r=>e.Once(r,this.helpers));return ni(n[0])?Promise.all(n):n}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(n){throw this.handleError(n)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,n=MU;e.syntax&&(n=e.syntax.stringify),e.stringifier&&(n=e.stringifier),n.stringify&&(n=n.stringify);let r=new WU(n,this.result.root,this.result.opts).generate();return this.result.css=r[0],this.result.map=r[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 e of this.plugins){let n=this.runOnRoot(e);if(ni(n))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Se];)e[Se]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let n of e.nodes)this.visitSync(this.listeners.OnceExit,n);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,n){return process.env.NODE_ENV!=="production"&&("from"in this.opts||AU("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(e,n)}toString(){return this.css}visitSync(e,n){for(let[r,i]of e){this.result.lastPlugin=r;let o;try{o=i(n,this.helpers)}catch(s){throw this.handleError(s,n.proxyOf)}if(n.type!=="root"&&n.type!=="document"&&!n.parent)return!0;if(ni(o))throw this.getAsyncError()}}visitTick(e){let n=e[e.length-1],{node:r,visitors:i}=n;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(i.length>0&&n.visitorIndex<i.length){let[s,a]=i[n.visitorIndex];n.visitorIndex+=1,n.visitorIndex===i.length&&(n.visitors=[],n.visitorIndex=0),this.result.lastPlugin=s;try{return a(r.toProxy(),this.helpers)}catch(c){throw this.handleError(c,r)}}if(n.iterator!==0){let s=n.iterator,a;for(;a=r.nodes[r.indexes[s]];)if(r.indexes[s]+=1,!a[Se]){a[Se]=!0,e.push(Hg(a));return}n.iterator=0,delete r.indexes[s]}let o=n.events;for(;n.eventIndex<o.length;){let s=o[n.eventIndex];if(n.eventIndex+=1,s===cr){r.nodes&&r.nodes.length&&(r[Se]=!0,n.iterator=r.getIterator());return}else if(this.listeners[s]){n.visitors=this.listeners[s];return}}e.pop()}walkSync(e){e[Se]=!0;let n=Yv(e);for(let r of n)if(r===cr)e.nodes&&e.each(i=>{i[Se]||this.walkSync(i)});else{let i=this.listeners[r];if(i&&this.visitSync(i,e.toProxy()))return}}warnings(){return this.sync().warnings()}};ur.registerPostcss=t=>{Xu=t};_v=ur;ur.default=ur;PU.registerLazyResult(ur);XU.registerLazyResult(ur);KU=Av,_U=Rh,HU=Ch,zU=pa,BU=Dv,Wu=class{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.Zn)return this.Zn;let t,e=_U;try{t=e(this.ei,this.zn)}catch(n){this.error=n}if(this.error)throw this.error;return this.Zn=t,t}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(t,e,n){e=e.toString(),this.stringified=!1,this.ho=t,this.ei=e,this.zn=n,this.qa=void 0;let r,i=zU;this.result=new HU(this.ho,r,this.zn),this.result.css=e;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let s=new KU(i,r,this.zn,e);if(s.isMap()){let[a,c]=s.generate();a&&(this.result.css=a),c&&(this.result.map=c)}else s.clearAnnotation(),this.result.css=s.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}sync(){if(this.error)throw this.error;return this.result}then(t,e){return process.env.NODE_ENV!=="production"&&("from"in this.zn||BU("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(t,e)}toString(){return this.ei}warnings(){return[]}},jU=Wu;Wu.default=Wu;QU=Th,$U=_v,qU=jU,tP=xi,Si=class{constructor(t=[]){this.version="8.5.3",this.plugins=this.normalize(t)}normalize(t){let e=[];for(let n of t)if(n.postcss===!0?n=n():n.postcss&&(n=n.postcss),typeof n=="object"&&Array.isArray(n.plugins))e=e.concat(n.plugins);else if(typeof n=="object"&&n.postcssPlugin)e.push(n);else if(typeof n=="function")e.push(n);else if(typeof n=="object"&&(n.parse||n.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(n+" is not a PostCSS plugin");return e}process(t,e={}){return!this.plugins.length&&!e.parser&&!e.stringifier&&!e.syntax?new qU(this,t,e):new $U(this,t,e)}use(t){return this.plugins=this.plugins.concat(this.normalize([t])),this}},eP=Si;Si.default=Si;tP.registerProcessor(Si);QU.registerProcessor(Si);Hv=Ih,zv=fa,nP=Cn,rP=vh,Bv=ma,jv=Th,iP=oU,oP=ya,sP=_v,aP=Xv,lP=da,cP=Rh,Zh=eP,uP=Ch,Qv=xi,$v=Eh,hP=pa,pP=Jv;ht.plugin=function(t,e){let n=!1;function r(...o){console&&console.warn&&!n&&(n=!0,console.warn(t+`: postcss.plugin was deprecated. Migration guide:
309
309
  https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(t+`: \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357:
310
- https://www.w3ctech.com/topic/2226`));let s=e(...o);return s.postcssPlugin=t,s.postcssVersion=new Sh().version,s}let i;return Object.defineProperty(r,"postcss",{get(){return i||(i=r()),i}}),r.process=function(o,s,a){return ht([r(a)]).process(o,s)},r};ht.stringify=YU;ht.parse=JU;ht.fromJSON=UU;ht.list=FU;ht.comment=t=>new Wv(t);ht.atRule=t=>new Xv(t);ht.decl=t=>new Uv(t);ht.rule=t=>new Fv(t);ht.root=t=>new Mv(t);ht.document=t=>new Pv(t);ht.CssSyntaxError=WU;ht.Declaration=Uv;ht.Container=XU;ht.Processor=Sh;ht.Document=Pv;ht.Comment=Wv;ht.Warning=KU;ht.AtRule=Xv;ht.Result=DU;ht.Input=PU;ht.Rule=Fv;ht.Root=Mv;ht.Node=AU;MU.registerPostcss(ht);ht.default=ht;_U=Object.defineProperty,HU=(t,e,n)=>e in t?_U(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ne=(t,e,n)=>HU(t,typeof e!="symbol"?e+"":e,n);Ih={exports:{}},H=String,Av=function(){return{isColorSupported:!1,reset:H,bold:H,dim:H,italic:H,underline:H,inverse:H,hidden:H,strikethrough:H,black:H,red:H,green:H,yellow:H,blue:H,magenta:H,cyan:H,white:H,gray:H,bgBlack:H,bgRed:H,bgGreen:H,bgYellow:H,bgBlue:H,bgMagenta:H,bgCyan:H,bgWhite:H,blackBright:H,redBright:H,greenBright:H,yellowBright:H,blueBright:H,magentaBright:H,cyanBright:H,whiteBright:H,bgBlackBright:H,bgRedBright:H,bgGreenBright:H,bgYellowBright:H,bgBlueBright:H,bgMagentaBright:H,bgCyanBright:H,bgWhiteBright:H}};Ih.exports=Av();Ih.exports.createColors=Av;BU=Ih.exports,jU={},QU=Object.freeze(Object.defineProperty({__proto__:null,default:jU},Symbol.toStringTag,{value:"Module"})),ue=zU(QU),Wg=BU,Ug=ue,Nu=class Jv extends Error{constructor(e,n,r,i,o,s){super(e),this.name="CssSyntaxError",this.reason=e,o&&(this.file=o),i&&(this.source=i),s&&(this.plugin=s),typeof n<"u"&&typeof r<"u"&&(typeof n=="number"?(this.line=n,this.column=r):(this.line=n.line,this.column=n.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,Jv)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let n=this.source;e==null&&(e=Wg.isColorSupported);let r=u=>u,i=u=>u,o=u=>u;if(e){let{bold:u,gray:h,red:p}=Wg.createColors(!0);i=f=>u(p(f)),r=f=>h(f),Ug&&(o=f=>Ug(f))}let s=n.split(/\r?\n/),a=Math.max(this.line-3,0),c=Math.min(this.line+2,s.length),l=String(c).length;return s.slice(a,c).map((u,h)=>{let p=a+1+h,f=" "+(" "+p).slice(-l)+" | ";if(p===this.line){if(u.length>160){let d=20,v=Math.max(0,this.column-d),g=Math.max(this.column+d,this.endColumn+d),w=u.slice(v,g),R=r(f.replace(/\d/g," "))+u.slice(0,Math.min(this.column-1,d-1)).replace(/[^\t]/g," ");return i(">")+r(f)+o(w)+`
310
+ https://www.w3ctech.com/topic/2226`));let s=e(...o);return s.postcssPlugin=t,s.postcssVersion=new Zh().version,s}let i;return Object.defineProperty(r,"postcss",{get(){return i||(i=r()),i}}),r.process=function(o,s,a){return ht([r(a)]).process(o,s)},r};ht.stringify=hP;ht.parse=cP;ht.fromJSON=iP;ht.list=aP;ht.comment=t=>new zv(t);ht.atRule=t=>new Hv(t);ht.decl=t=>new Bv(t);ht.rule=t=>new $v(t);ht.root=t=>new Qv(t);ht.document=t=>new jv(t);ht.CssSyntaxError=rP;ht.Declaration=Bv;ht.Container=nP;ht.Processor=Zh;ht.Document=jv;ht.Comment=zv;ht.Warning=pP;ht.AtRule=Hv;ht.Result=uP;ht.Input=oP;ht.Rule=$v;ht.Root=Qv;ht.Node=lP;sP.registerPostcss(ht);ht.default=ht;dP=Object.defineProperty,fP=(t,e,n)=>e in t?dP(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ie=(t,e,n)=>fP(t,typeof e!="symbol"?e+"":e,n);kh={exports:{}},H=String,qv=function(){return{isColorSupported:!1,reset:H,bold:H,dim:H,italic:H,underline:H,inverse:H,hidden:H,strikethrough:H,black:H,red:H,green:H,yellow:H,blue:H,magenta:H,cyan:H,white:H,gray:H,bgBlack:H,bgRed:H,bgGreen:H,bgYellow:H,bgBlue:H,bgMagenta:H,bgCyan:H,bgWhite:H,blackBright:H,redBright:H,greenBright:H,yellowBright:H,blueBright:H,magentaBright:H,cyanBright:H,whiteBright:H,bgBlackBright:H,bgRedBright:H,bgGreenBright:H,bgYellowBright:H,bgBlueBright:H,bgMagentaBright:H,bgCyanBright:H,bgWhiteBright:H}};kh.exports=qv();kh.exports.createColors=qv;yP=kh.exports,gP={},bP=Object.freeze(Object.defineProperty({__proto__:null,default:gP},Symbol.toStringTag,{value:"Module"})),pe=mP(bP),zg=yP,Bg=pe,Uu=class t0 extends Error{constructor(e,n,r,i,o,s){super(e),this.name="CssSyntaxError",this.reason=e,o&&(this.file=o),i&&(this.source=i),s&&(this.plugin=s),typeof n<"u"&&typeof r<"u"&&(typeof n=="number"?(this.line=n,this.column=r):(this.line=n.line,this.column=n.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,t0)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let n=this.source;e==null&&(e=zg.isColorSupported);let r=u=>u,i=u=>u,o=u=>u;if(e){let{bold:u,gray:h,red:p}=zg.createColors(!0);i=f=>u(p(f)),r=f=>h(f),Bg&&(o=f=>Bg(f))}let s=n.split(/\r?\n/),a=Math.max(this.line-3,0),c=Math.min(this.line+2,s.length),l=String(c).length;return s.slice(a,c).map((u,h)=>{let p=a+1+h,f=" "+(" "+p).slice(-l)+" | ";if(p===this.line){if(u.length>160){let d=20,v=Math.max(0,this.column-d),g=Math.max(this.column+d,this.endColumn+d),w=u.slice(v,g),R=r(f.replace(/\d/g," "))+u.slice(0,Math.min(this.column-1,d-1)).replace(/[^\t]/g," ");return i(">")+r(f)+o(w)+`
311
311
  `+R+i("^")}let m=r(f.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return i(">")+r(f)+o(u)+`
312
312
  `+m+i("^")}return" "+r(f)+o(u)}).join(`
313
313
  `)}toString(){let e=this.showSourceCode();return e&&(e=`
314
314
 
315
315
  `+e+`
316
- `),this.name+": "+this.message+e}},Th=Nu;Nu.default=Nu;Pg={after:`
316
+ `),this.name+": "+this.message+e}},Vh=Uu;Uu.default=Uu;jg={after:`
317
317
  `,beforeClose:`
318
318
  `,beforeComment:`
319
319
  `,beforeDecl:`
320
320
  `,beforeOpen:" ",beforeRule:`
321
- `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};Ou=class{constructor(t){this.builder=t}atrule(t,e){let n="@"+t.name,r=t.params?this.rawValue(t,"params"):"";if(typeof t.raws.afterName<"u"?n+=t.raws.afterName:r&&(n+=" "),t.nodes)this.block(t,n+r);else{let i=(t.raws.between||"")+(e?";":"");this.builder(n+r+i,t)}}beforeAfter(t,e){let n;t.type==="decl"?n=this.raw(t,null,"beforeDecl"):t.type==="comment"?n=this.raw(t,null,"beforeComment"):e==="before"?n=this.raw(t,null,"beforeRule"):n=this.raw(t,null,"beforeClose");let r=t.parent,i=0;for(;r&&r.type!=="root";)i+=1,r=r.parent;if(n.includes(`
322
- `)){let o=this.raw(t,null,"indent");if(o.length)for(let s=0;s<i;s++)n+=o}return n}block(t,e){let n=this.raw(t,"between","beforeOpen");this.builder(e+n+"{",t,"start");let r;t.nodes&&t.nodes.length?(this.body(t),r=this.raw(t,"after")):r=this.raw(t,"after","emptyBody"),r&&this.builder(r),this.builder("}",t,"end")}body(t){let e=t.nodes.length-1;for(;e>0&&t.nodes[e].type==="comment";)e-=1;let n=this.raw(t,"semicolon");for(let r=0;r<t.nodes.length;r++){let i=t.nodes[r],o=this.raw(i,"before");o&&this.builder(o),this.stringify(i,e!==r||n)}}comment(t){let e=this.raw(t,"left","commentLeft"),n=this.raw(t,"right","commentRight");this.builder("/*"+e+t.text+n+"*/",t)}decl(t,e){let n=this.raw(t,"between","colon"),r=t.prop+n+this.rawValue(t,"value");t.important&&(r+=t.raws.important||" !important"),e&&(r+=";"),this.builder(r,t)}document(t){this.body(t)}raw(t,e,n){let r;if(n||(n=e),e&&(r=t.raws[e],typeof r<"u"))return r;let i=t.parent;if(n==="before"&&(!i||i.type==="root"&&i.first===t||i&&i.type==="document"))return"";if(!i)return Pg[n];let o=t.root();if(o.rawCache||(o.rawCache={}),typeof o.rawCache[n]<"u")return o.rawCache[n];if(n==="before"||n==="after")return this.beforeAfter(t,n);{let s="raw"+$U(n);this[s]?r=this[s](o,t):o.walk(a=>{if(r=a.raws[e],typeof r<"u")return!1})}return typeof r>"u"&&(r=Pg[n]),o.rawCache[n]=r,r}rawBeforeClose(t){let e;return t.walk(n=>{if(n.nodes&&n.nodes.length>0&&typeof n.raws.after<"u")return e=n.raws.after,e.includes(`
321
+ `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};Pu=class{constructor(t){this.builder=t}atrule(t,e){let n="@"+t.name,r=t.params?this.rawValue(t,"params"):"";if(typeof t.raws.afterName<"u"?n+=t.raws.afterName:r&&(n+=" "),t.nodes)this.block(t,n+r);else{let i=(t.raws.between||"")+(e?";":"");this.builder(n+r+i,t)}}beforeAfter(t,e){let n;t.type==="decl"?n=this.raw(t,null,"beforeDecl"):t.type==="comment"?n=this.raw(t,null,"beforeComment"):e==="before"?n=this.raw(t,null,"beforeRule"):n=this.raw(t,null,"beforeClose");let r=t.parent,i=0;for(;r&&r.type!=="root";)i+=1,r=r.parent;if(n.includes(`
322
+ `)){let o=this.raw(t,null,"indent");if(o.length)for(let s=0;s<i;s++)n+=o}return n}block(t,e){let n=this.raw(t,"between","beforeOpen");this.builder(e+n+"{",t,"start");let r;t.nodes&&t.nodes.length?(this.body(t),r=this.raw(t,"after")):r=this.raw(t,"after","emptyBody"),r&&this.builder(r),this.builder("}",t,"end")}body(t){let e=t.nodes.length-1;for(;e>0&&t.nodes[e].type==="comment";)e-=1;let n=this.raw(t,"semicolon");for(let r=0;r<t.nodes.length;r++){let i=t.nodes[r],o=this.raw(i,"before");o&&this.builder(o),this.stringify(i,e!==r||n)}}comment(t){let e=this.raw(t,"left","commentLeft"),n=this.raw(t,"right","commentRight");this.builder("/*"+e+t.text+n+"*/",t)}decl(t,e){let n=this.raw(t,"between","colon"),r=t.prop+n+this.rawValue(t,"value");t.important&&(r+=t.raws.important||" !important"),e&&(r+=";"),this.builder(r,t)}document(t){this.body(t)}raw(t,e,n){let r;if(n||(n=e),e&&(r=t.raws[e],typeof r<"u"))return r;let i=t.parent;if(n==="before"&&(!i||i.type==="root"&&i.first===t||i&&i.type==="document"))return"";if(!i)return jg[n];let o=t.root();if(o.rawCache||(o.rawCache={}),typeof o.rawCache[n]<"u")return o.rawCache[n];if(n==="before"||n==="after")return this.beforeAfter(t,n);{let s="raw"+vP(n);this[s]?r=this[s](o,t):o.walk(a=>{if(r=a.raws[e],typeof r<"u")return!1})}return typeof r>"u"&&(r=jg[n]),o.rawCache[n]=r,r}rawBeforeClose(t){let e;return t.walk(n=>{if(n.nodes&&n.nodes.length>0&&typeof n.raws.after<"u")return e=n.raws.after,e.includes(`
323
323
  `)&&(e=e.replace(/[^\n]+$/,"")),!1}),e&&(e=e.replace(/\S/g,"")),e}rawBeforeComment(t,e){let n;return t.walkComments(r=>{if(typeof r.raws.before<"u")return n=r.raws.before,n.includes(`
324
324
  `)&&(n=n.replace(/[^\n]+$/,"")),!1}),typeof n>"u"?n=this.raw(e,null,"beforeDecl"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeDecl(t,e){let n;return t.walkDecls(r=>{if(typeof r.raws.before<"u")return n=r.raws.before,n.includes(`
325
325
  `)&&(n=n.replace(/[^\n]+$/,"")),!1}),typeof n>"u"?n=this.raw(e,null,"beforeRule"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeOpen(t){let e;return t.walk(n=>{if(n.type!=="decl"&&(e=n.raws.between,typeof e<"u"))return!1}),e}rawBeforeRule(t){let e;return t.walk(n=>{if(n.nodes&&(n.parent!==t||t.first!==n)&&typeof n.raws.before<"u")return e=n.raws.before,e.includes(`
326
326
  `)&&(e=e.replace(/[^\n]+$/,"")),!1}),e&&(e=e.replace(/\S/g,"")),e}rawColon(t){let e;return t.walkDecls(n=>{if(typeof n.raws.between<"u")return e=n.raws.between.replace(/[^\s:]/g,""),!1}),e}rawEmptyBody(t){let e;return t.walk(n=>{if(n.nodes&&n.nodes.length===0&&(e=n.raws.after,typeof e<"u"))return!1}),e}rawIndent(t){if(t.raws.indent)return t.raws.indent;let e;return t.walk(n=>{let r=n.parent;if(r&&r!==t&&r.parent&&r.parent===t&&typeof n.raws.before<"u"){let i=n.raws.before.split(`
327
- `);return e=i[i.length-1],e=e.replace(/\S/g,""),!1}}),e}rawSemicolon(t){let e;return t.walk(n=>{if(n.nodes&&n.nodes.length&&n.last.type==="decl"&&(e=n.raws.semicolon,typeof e<"u"))return!1}),e}rawValue(t,e){let n=t[e],r=t.raws[e];return r&&r.value===n?r.raw:n}root(t){this.body(t),t.raws.after&&this.builder(t.raws.after)}rule(t){this.block(t,this.rawValue(t,"selector")),t.raws.ownSemicolon&&this.builder(t.raws.ownSemicolon,t,"end")}stringify(t,e){if(!this[t.type])throw new Error("Unknown AST node type "+t.type+". Maybe you need to change PostCSS stringifier.");this[t.type](t,e)}},Dv=Ou;Ou.default=Ou;qU=Dv;fa=Gu;Gu.default=Gu;Vi={};Vi.isClean=Symbol("isClean");Vi.my=Symbol("my");tP=Th,eP=Dv,nP=fa,{isClean:ei,my:rP}=Vi;Xu=class{get proxyOf(){return this}constructor(t={}){this.raws={},this[ei]=!1,this[rP]=!0;for(let e in t)if(e==="nodes"){this.nodes=[];for(let n of t[e])typeof n.clone=="function"?this.append(n.clone()):this.append(n)}else this[e]=t[e]}addToError(t){if(t.postcssNode=this,t.stack&&this.source&&/\n\s{4}at /.test(t.stack)){let e=this.source;t.stack=t.stack.replace(/\n\s{4}at /,`$&${e.input.from}:${e.start.line}:${e.start.column}$&`)}return t}after(t){return this.parent.insertAfter(this,t),this}assign(t={}){for(let e in t)this[e]=t[e];return this}before(t){return this.parent.insertBefore(this,t),this}cleanRaws(t){delete this.raws.before,delete this.raws.after,t||delete this.raws.between}clone(t={}){let e=Lu(this);for(let n in t)e[n]=t[n];return e}cloneAfter(t={}){let e=this.clone(t);return this.parent.insertAfter(this,e),e}cloneBefore(t={}){let e=this.clone(t);return this.parent.insertBefore(this,e),e}error(t,e={}){if(this.source){let{end:n,start:r}=this.rangeBy(e);return this.source.input.error(t,{column:r.column,line:r.line},{column:n.column,line:n.line},e)}return new tP(t)}getProxyProcessor(){return{get(t,e){return e==="proxyOf"?t:e==="root"?()=>t.root().toProxy():t[e]},set(t,e,n){return t[e]===n||(t[e]=n,(e==="prop"||e==="value"||e==="name"||e==="params"||e==="important"||e==="text")&&t.markDirty()),!0}}}markClean(){this[ei]=!0}markDirty(){if(this[ei]){this[ei]=!1;let t=this;for(;t=t.parent;)t[ei]=!1}}next(){if(!this.parent)return;let t=this.parent.index(this);return this.parent.nodes[t+1]}positionBy(t){let e=this.source.start;if(t.index)e=this.positionInside(t.index);else if(t.word){let n="document"in this.source.input?this.source.input.document:this.source.input.css,r=n.slice(ni(n,this.source.start),ni(n,this.source.end)).indexOf(t.word);r!==-1&&(e=this.positionInside(r))}return e}positionInside(t){let e=this.source.start.column,n=this.source.start.line,r="document"in this.source.input?this.source.input.document:this.source.input.css,i=ni(r,this.source.start),o=i+t;for(let s=i;s<o;s++)r[s]===`
328
- `?(e=1,n+=1):e+=1;return{column:e,line:n}}prev(){if(!this.parent)return;let t=this.parent.index(this);return this.parent.nodes[t-1]}rangeBy(t){let e={column:this.source.start.column,line:this.source.start.line},n=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:e.column+1,line:e.line};if(t.word){let r="document"in this.source.input?this.source.input.document:this.source.input.css,i=r.slice(ni(r,this.source.start),ni(r,this.source.end)).indexOf(t.word);i!==-1&&(e=this.positionInside(i),n=this.positionInside(i+t.word.length))}else t.start?e={column:t.start.column,line:t.start.line}:t.index&&(e=this.positionInside(t.index)),t.end?n={column:t.end.column,line:t.end.line}:typeof t.endIndex=="number"?n=this.positionInside(t.endIndex):t.index&&(n=this.positionInside(t.index+1));return(n.line<e.line||n.line===e.line&&n.column<=e.column)&&(n={column:e.column+1,line:e.line}),{end:n,start:e}}raw(t,e){return new eP().raw(this,t,e)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...t){if(this.parent){let e=this,n=!1;for(let r of t)r===this?n=!0:n?(this.parent.insertAfter(e,r),e=r):this.parent.insertBefore(e,r);n||this.remove()}return this}root(){let t=this;for(;t.parent&&t.parent.type!=="document";)t=t.parent;return t}toJSON(t,e){let n={},r=e==null;e=e||new Map;let i=0;for(let o in this){if(!Object.prototype.hasOwnProperty.call(this,o)||o==="parent"||o==="proxyCache")continue;let s=this[o];if(Array.isArray(s))n[o]=s.map(a=>typeof a=="object"&&a.toJSON?a.toJSON(null,e):a);else if(typeof s=="object"&&s.toJSON)n[o]=s.toJSON(null,e);else if(o==="source"){let a=e.get(s.input);a==null&&(a=i,e.set(s.input,i),i++),n[o]={end:s.end,inputId:a,start:s.start}}else n[o]=s}return r&&(n.inputs=[...e.keys()].map(o=>o.toJSON())),n}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(t=nP){t.stringify&&(t=t.stringify);let e="";return t(this,n=>{e+=n}),e}warn(t,e,n){let r={node:this};for(let i in n)r[i]=n[i];return t.warn(e,r)}},ma=Xu;Xu.default=Xu;iP=ma,Wu=class extends iP{constructor(t){super(t),this.type="comment"}},ya=Wu;Wu.default=Wu;oP=ma,Uu=class extends oP{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(t){t&&typeof t.value<"u"&&typeof t.value!="string"&&(t=Kt(z({},t),{value:String(t.value)})),super(t),this.type="decl"}},ga=Uu;Uu.default=Uu;Yv=ya,Kv=ga,sP=ma,{isClean:_v,my:Hv}=Vi;We=class $v extends sP{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(...e){for(let n of e){let r=this.normalize(n,this.last);for(let i of r)this.proxyOf.nodes.push(i)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let n of this.nodes)n.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let n=this.getIterator(),r,i;for(;this.indexes[n]<this.proxyOf.nodes.length&&(r=this.indexes[n],i=e(this.proxyOf.nodes[r],r),i!==!1);)this.indexes[n]+=1;return delete this.indexes[n],i}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,n){return n==="proxyOf"?e:e[n]?n==="each"||typeof n=="string"&&n.startsWith("walk")?(...r)=>e[n](...r.map(i=>typeof i=="function"?(o,s)=>i(o.toProxy(),s):i)):n==="every"||n==="some"?r=>e[n]((i,...o)=>r(i.toProxy(),...o)):n==="root"?()=>e.root().toProxy():n==="nodes"?e.nodes.map(r=>r.toProxy()):n==="first"||n==="last"?e[n].toProxy():e[n]:e[n]},set(e,n,r){return e[n]===r||(e[n]=r,(n==="name"||n==="params"||n==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,n){let r=this.index(e),i=this.normalize(n,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let s of i)this.proxyOf.nodes.splice(r+1,0,s);let o;for(let s in this.indexes)o=this.indexes[s],r<o&&(this.indexes[s]=o+i.length);return this.markDirty(),this}insertBefore(e,n){let r=this.index(e),i=r===0?"prepend":!1,o=this.normalize(n,this.proxyOf.nodes[r],i).reverse();r=this.index(e);for(let a of o)this.proxyOf.nodes.splice(r,0,a);let s;for(let a in this.indexes)s=this.indexes[a],r<=s&&(this.indexes[a]=s+o.length);return this.markDirty(),this}normalize(e,n){if(typeof e=="string")e=jv(zv(e).nodes);else if(typeof e>"u")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let r of e)r.parent&&r.parent.removeChild(r,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let r of e)r.parent&&r.parent.removeChild(r,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value>"u")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new Kv(e)]}else if(e.selector||e.selectors)e=[new Rh(e)];else if(e.name)e=[new Eh(e)];else if(e.text)e=[new Yv(e)];else throw new Error("Unknown node type in node creation");return e.map(r=>(r[Hv]||$v.rebuild(r),r=r.proxyOf,r.parent&&r.parent.removeChild(r),r[_v]&&Qv(r),r.raws||(r.raws={}),typeof r.raws.before>"u"&&n&&typeof n.raws.before<"u"&&(r.raws.before=n.raws.before.replace(/\S/g,"")),r.parent=this.proxyOf,r))}prepend(...e){e=e.reverse();for(let n of e){let r=this.normalize(n,this.first,"prepend").reverse();for(let i of r)this.proxyOf.nodes.unshift(i);for(let i in this.indexes)this.indexes[i]=this.indexes[i]+r.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let n;for(let r in this.indexes)n=this.indexes[r],n>=e&&(this.indexes[r]=n-1);return this.markDirty(),this}replaceValues(e,n,r){return r||(r=n,n={}),this.walkDecls(i=>{n.props&&!n.props.includes(i.prop)||n.fast&&!i.value.includes(n.fast)||(i.value=i.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((n,r)=>{let i;try{i=e(n,r)}catch(o){throw n.addToError(o)}return i!==!1&&n.walk&&(i=n.walk(e)),i})}walkAtRules(e,n){return n?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="atrule"&&e.test(r.name))return n(r,i)}):this.walk((r,i)=>{if(r.type==="atrule"&&r.name===e)return n(r,i)}):(n=e,this.walk((r,i)=>{if(r.type==="atrule")return n(r,i)}))}walkComments(e){return this.walk((n,r)=>{if(n.type==="comment")return e(n,r)})}walkDecls(e,n){return n?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="decl"&&e.test(r.prop))return n(r,i)}):this.walk((r,i)=>{if(r.type==="decl"&&r.prop===e)return n(r,i)}):(n=e,this.walk((r,i)=>{if(r.type==="decl")return n(r,i)}))}walkRules(e,n){return n?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="rule"&&e.test(r.selector))return n(r,i)}):this.walk((r,i)=>{if(r.type==="rule"&&r.selector===e)return n(r,i)}):(n=e,this.walk((r,i)=>{if(r.type==="rule")return n(r,i)}))}};We.registerParse=t=>{zv=t};We.registerRule=t=>{Rh=t};We.registerAtRule=t=>{Eh=t};We.registerRoot=t=>{Bv=t};Cn=We;We.default=We;We.rebuild=t=>{t.type==="atrule"?Object.setPrototypeOf(t,Eh.prototype):t.type==="rule"?Object.setPrototypeOf(t,Rh.prototype):t.type==="decl"?Object.setPrototypeOf(t,Kv.prototype):t.type==="comment"?Object.setPrototypeOf(t,Yv.prototype):t.type==="root"&&Object.setPrototypeOf(t,Bv.prototype),t[Hv]=!0,t.nodes&&t.nodes.forEach(e=>{We.rebuild(e)})};qv=Cn,Qs=class extends qv{constructor(t){super(t),this.type="atrule"}append(...t){return this.proxyOf.nodes||(this.nodes=[]),super.append(...t)}prepend(...t){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...t)}},Ch=Qs;Qs.default=Qs;qv.registerAtRule(Qs);aP=Cn,wi=class extends aP{constructor(t){super(z({type:"document"},t)),this.nodes||(this.nodes=[])}toResult(t={}){return new t0(new e0,this,t).stringify()}};wi.registerLazyResult=t=>{t0=t};wi.registerProcessor=t=>{e0=t};Zh=wi;wi.default=wi;lP="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",cP=(t=21)=>{let e="",n=t|0;for(;n--;)e+=lP[Math.random()*64|0];return e},uP={nanoid:cP},{existsSync:hP,readFileSync:pP}=ue,{dirname:Dc,join:dP}=ue,{SourceMapConsumer:Mg,SourceMapGenerator:Fg}=ue;Pu=class{constructor(t,e){if(e.map===!1)return;this.loadAnnotation(t),this.inline=this.startWith(this.annotation,"data:");let n=e.map?e.map.prev:void 0,r=this.loadMap(e.from,n);!this.mapFile&&e.from&&(this.mapFile=e.from),this.mapFile&&(this.root=Dc(this.mapFile)),r&&(this.text=r)}consumer(){return this.consumerCache||(this.consumerCache=new Mg(this.text)),this.consumerCache}decodeInline(t){let e=/^data:application\/json;charset=utf-?8;base64,/,n=/^data:application\/json;base64,/,r=/^data:application\/json;charset=utf-?8,/,i=/^data:application\/json,/,o=t.match(r)||t.match(i);if(o)return decodeURIComponent(t.substr(o[0].length));let s=t.match(e)||t.match(n);if(s)return fP(t.substr(s[0].length));let a=t.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+a)}getAnnotationURL(t){return t.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(t){return typeof t!="object"?!1:typeof t.mappings=="string"||typeof t.ja=="string"||Array.isArray(t.sections)}loadAnnotation(t){let e=t.match(/\/\*\s*# sourceMappingURL=/g);if(!e)return;let n=t.lastIndexOf(e.pop()),r=t.indexOf("*/",n);n>-1&&r>-1&&(this.annotation=this.getAnnotationURL(t.substring(n,r)))}loadFile(t){if(this.root=Dc(t),hP(t))return this.mapFile=t,pP(t,"utf-8").toString().trim()}loadMap(t,e){if(e===!1)return!1;if(e){if(typeof e=="string")return e;if(typeof e=="function"){let n=e(t);if(n){let r=this.loadFile(n);if(!r)throw new Error("Unable to load previous source map: "+n.toString());return r}}else{if(e instanceof Mg)return Fg.fromSourceMap(e).toString();if(e instanceof Fg)return e.toString();if(this.isMap(e))return JSON.stringify(e);throw new Error("Unsupported previous source map format: "+e.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let n=this.annotation;return t&&(n=dP(Dc(t),n)),this.loadFile(n)}}}startWith(t,e){return t?t.substr(0,e.length)===e:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}},n0=Pu;Pu.default=Pu;({nanoid:mP}=uP),{isAbsolute:Mu,resolve:Fu}=ue,{SourceMapConsumer:yP,SourceMapGenerator:gP}=ue,{fileURLToPath:Ag,pathToFileURL:hs}=ue,Jg=Th,bP=n0,Yc=ue,Kc=Symbol("fromOffsetCache"),vP=!!(yP&&gP),Dg=!!(Fu&&Mu),$s=class{get from(){return this.file||this.id}constructor(t,e={}){if(t===null||typeof t>"u"||typeof t=="object"&&!t.toString)throw new Error(`PostCSS received ${t} instead of CSS string`);if(this.css=t.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,e.document&&(this.document=e.document.toString()),e.from&&(!Dg||/^\w+:\/\//.test(e.from)||Mu(e.from)?this.file=e.from:this.file=Fu(e.from)),Dg&&vP){let n=new bP(this.css,e);if(n.text){this.map=n;let r=n.consumer().file;!this.file&&r&&(this.file=this.mapResolve(r))}}this.file||(this.id="<input css "+mP(6)+">"),this.map&&(this.map.file=this.from)}error(t,e,n,r={}){let i,o,s;if(e&&typeof e=="object"){let c=e,l=n;if(typeof c.offset=="number"){let u=this.fromOffset(c.offset);e=u.line,n=u.col}else e=c.line,n=c.column;if(typeof l.offset=="number"){let u=this.fromOffset(l.offset);o=u.line,i=u.col}else o=l.line,i=l.column}else if(!n){let c=this.fromOffset(e);e=c.line,n=c.col}let a=this.origin(e,n,o,i);return a?s=new Jg(t,a.endLine===void 0?a.line:{column:a.column,line:a.line},a.endLine===void 0?a.column:{column:a.endColumn,line:a.endLine},a.source,a.file,r.plugin):s=new Jg(t,o===void 0?e:{column:n,line:e},o===void 0?n:{column:i,line:o},this.css,this.file,r.plugin),s.input={column:n,endColumn:i,endLine:o,line:e,source:this.css},this.file&&(hs&&(s.input.url=hs(this.file).toString()),s.input.file=this.file),s}fromOffset(t){let e,n;if(this[Kc])n=this[Kc];else{let i=this.css.split(`
329
- `);n=new Array(i.length);let o=0;for(let s=0,a=i.length;s<a;s++)n[s]=o,o+=i[s].length+1;this[Kc]=n}e=n[n.length-1];let r=0;if(t>=e)r=n.length-1;else{let i=n.length-2,o;for(;r<i;)if(o=r+(i-r>>1),t<n[o])i=o-1;else if(t>=n[o+1])r=o+1;else{r=o;break}}return{col:t-n[r]+1,line:r+1}}mapResolve(t){return/^\w+:\/\//.test(t)?t:Fu(this.map.consumer().sourceRoot||this.map.root||".",t)}origin(t,e,n,r){if(!this.map)return!1;let i=this.map.consumer(),o=i.originalPositionFor({column:e,line:t});if(!o.source)return!1;let s;typeof n=="number"&&(s=i.originalPositionFor({column:r,line:n}));let a;Mu(o.source)?a=hs(o.source):a=new URL(o.source,this.map.consumer().sourceRoot||hs(this.map.mapFile));let c={column:o.column,endColumn:s&&s.column,endLine:s&&s.line,line:o.line,url:a.toString()};if(a.protocol==="file:")if(Ag)c.file=Ag(a);else throw new Error("file: protocol is not available in this PostCSS build");let l=i.sourceContentFor(o.source);return l&&(c.source=l),c}toJSON(){let t={};for(let e of["hasBOM","css","file","id"])this[e]!=null&&(t[e]=this[e]);return this.map&&(t.map=z({},this.map),t.map.consumerCache&&(t.map.consumerCache=void 0)),t}},ba=$s;$s.default=$s;Yc&&Yc.registerInput&&Yc.registerInput($s);r0=Cn,ur=class extends r0{constructor(t){super(t),this.type="root",this.nodes||(this.nodes=[])}normalize(t,e,n){let r=super.normalize(t);if(e){if(n==="prepend")this.nodes.length>1?e.raws.before=this.nodes[1].raws.before:delete e.raws.before;else if(this.first!==e)for(let i of r)i.raws.before=e.raws.before}return r}removeChild(t,e){let n=this.index(t);return!e&&n===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[n].raws.before),super.removeChild(t)}toResult(t={}){return new i0(new o0,this,t).stringify()}};ur.registerLazyResult=t=>{i0=t};ur.registerProcessor=t=>{o0=t};xi=ur;ur.default=ur;r0.registerRoot(ur);Si={comma(t){return Si.split(t,[","],!0)},space(t){let e=[" ",`
330
- `," "];return Si.split(t,e)},split(t,e,n){let r=[],i="",o=!1,s=0,a=!1,c="",l=!1;for(let u of t)l?l=!1:u==="\\"?l=!0:a?u===c&&(a=!1):u==='"'||u==="'"?(a=!0,c=u):u==="("?s+=1:u===")"?s>0&&(s-=1):s===0&&e.includes(u)&&(o=!0),o?(i!==""&&r.push(i.trim()),i="",o=!1):i+=u;return(n||i!=="")&&r.push(i.trim()),r}},s0=Si;Si.default=Si;a0=Cn,wP=s0,qs=class extends a0{get selectors(){return wP.comma(this.selector)}set selectors(t){let e=this.selector?this.selector.match(/,\s*/):null,n=e?e[0]:","+this.raw("between","beforeOpen");this.selector=t.join(n)}constructor(t){super(t),this.type="rule",this.nodes||(this.nodes=[])}},kh=qs;qs.default=qs;a0.registerRule(qs);SP=Ch,IP=ya,TP=ga,EP=ba,RP=n0,CP=xi,ZP=kh;kP=Ii;Ii.default=Ii;({dirname:xs,relative:l0,resolve:c0,sep:u0}=ue),{SourceMapConsumer:h0,SourceMapGenerator:Ns}=ue,{pathToFileURL:Yg}=ue,VP=ba,xP=!!(h0&&Ns),NP=!!(xs&&c0&&l0&&u0),OP=class{constructor(t,e,n,r){this.stringify=t,this.mapOpts=n.map||{},this.root=e,this.opts=n,this.css=r,this.originalCSS=r,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let t;this.isInline()?t="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?t=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?t=this.mapOpts.annotation(this.opts.to,this.root):t=this.outputFile()+".map";let e=`
327
+ `);return e=i[i.length-1],e=e.replace(/\S/g,""),!1}}),e}rawSemicolon(t){let e;return t.walk(n=>{if(n.nodes&&n.nodes.length&&n.last.type==="decl"&&(e=n.raws.semicolon,typeof e<"u"))return!1}),e}rawValue(t,e){let n=t[e],r=t.raws[e];return r&&r.value===n?r.raw:n}root(t){this.body(t),t.raws.after&&this.builder(t.raws.after)}rule(t){this.block(t,this.rawValue(t,"selector")),t.raws.ownSemicolon&&this.builder(t.raws.ownSemicolon,t,"end")}stringify(t,e){if(!this[t.type])throw new Error("Unknown AST node type "+t.type+". Maybe you need to change PostCSS stringifier.");this[t.type](t,e)}},e0=Pu;Pu.default=Pu;wP=e0;ga=Mu;Mu.default=Mu;Oi={};Oi.isClean=Symbol("isClean");Oi.my=Symbol("my");SP=Vh,IP=e0,TP=ga,{isClean:ri,my:EP}=Oi;Au=class{get proxyOf(){return this}constructor(t={}){this.raws={},this[ri]=!1,this[EP]=!0;for(let e in t)if(e==="nodes"){this.nodes=[];for(let n of t[e])typeof n.clone=="function"?this.append(n.clone()):this.append(n)}else this[e]=t[e]}addToError(t){if(t.postcssNode=this,t.stack&&this.source&&/\n\s{4}at /.test(t.stack)){let e=this.source;t.stack=t.stack.replace(/\n\s{4}at /,`$&${e.input.from}:${e.start.line}:${e.start.column}$&`)}return t}after(t){return this.parent.insertAfter(this,t),this}assign(t={}){for(let e in t)this[e]=t[e];return this}before(t){return this.parent.insertBefore(this,t),this}cleanRaws(t){delete this.raws.before,delete this.raws.after,t||delete this.raws.between}clone(t={}){let e=Fu(this);for(let n in t)e[n]=t[n];return e}cloneAfter(t={}){let e=this.clone(t);return this.parent.insertAfter(this,e),e}cloneBefore(t={}){let e=this.clone(t);return this.parent.insertBefore(this,e),e}error(t,e={}){if(this.source){let{end:n,start:r}=this.rangeBy(e);return this.source.input.error(t,{column:r.column,line:r.line},{column:n.column,line:n.line},e)}return new SP(t)}getProxyProcessor(){return{get(t,e){return e==="proxyOf"?t:e==="root"?()=>t.root().toProxy():t[e]},set(t,e,n){return t[e]===n||(t[e]=n,(e==="prop"||e==="value"||e==="name"||e==="params"||e==="important"||e==="text")&&t.markDirty()),!0}}}markClean(){this[ri]=!0}markDirty(){if(this[ri]){this[ri]=!1;let t=this;for(;t=t.parent;)t[ri]=!1}}next(){if(!this.parent)return;let t=this.parent.index(this);return this.parent.nodes[t+1]}positionBy(t){let e=this.source.start;if(t.index)e=this.positionInside(t.index);else if(t.word){let n="document"in this.source.input?this.source.input.document:this.source.input.css,r=n.slice(ii(n,this.source.start),ii(n,this.source.end)).indexOf(t.word);r!==-1&&(e=this.positionInside(r))}return e}positionInside(t){let e=this.source.start.column,n=this.source.start.line,r="document"in this.source.input?this.source.input.document:this.source.input.css,i=ii(r,this.source.start),o=i+t;for(let s=i;s<o;s++)r[s]===`
328
+ `?(e=1,n+=1):e+=1;return{column:e,line:n}}prev(){if(!this.parent)return;let t=this.parent.index(this);return this.parent.nodes[t-1]}rangeBy(t){let e={column:this.source.start.column,line:this.source.start.line},n=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:e.column+1,line:e.line};if(t.word){let r="document"in this.source.input?this.source.input.document:this.source.input.css,i=r.slice(ii(r,this.source.start),ii(r,this.source.end)).indexOf(t.word);i!==-1&&(e=this.positionInside(i),n=this.positionInside(i+t.word.length))}else t.start?e={column:t.start.column,line:t.start.line}:t.index&&(e=this.positionInside(t.index)),t.end?n={column:t.end.column,line:t.end.line}:typeof t.endIndex=="number"?n=this.positionInside(t.endIndex):t.index&&(n=this.positionInside(t.index+1));return(n.line<e.line||n.line===e.line&&n.column<=e.column)&&(n={column:e.column+1,line:e.line}),{end:n,start:e}}raw(t,e){return new IP().raw(this,t,e)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...t){if(this.parent){let e=this,n=!1;for(let r of t)r===this?n=!0:n?(this.parent.insertAfter(e,r),e=r):this.parent.insertBefore(e,r);n||this.remove()}return this}root(){let t=this;for(;t.parent&&t.parent.type!=="document";)t=t.parent;return t}toJSON(t,e){let n={},r=e==null;e=e||new Map;let i=0;for(let o in this){if(!Object.prototype.hasOwnProperty.call(this,o)||o==="parent"||o==="proxyCache")continue;let s=this[o];if(Array.isArray(s))n[o]=s.map(a=>typeof a=="object"&&a.toJSON?a.toJSON(null,e):a);else if(typeof s=="object"&&s.toJSON)n[o]=s.toJSON(null,e);else if(o==="source"){let a=e.get(s.input);a==null&&(a=i,e.set(s.input,i),i++),n[o]={end:s.end,inputId:a,start:s.start}}else n[o]=s}return r&&(n.inputs=[...e.keys()].map(o=>o.toJSON())),n}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(t=TP){t.stringify&&(t=t.stringify);let e="";return t(this,n=>{e+=n}),e}warn(t,e,n){let r={node:this};for(let i in n)r[i]=n[i];return t.warn(e,r)}},ba=Au;Au.default=Au;RP=ba,Ju=class extends RP{constructor(t){super(t),this.type="comment"}},va=Ju;Ju.default=Ju;CP=ba,Du=class extends CP{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(t){t&&typeof t.value<"u"&&typeof t.value!="string"&&(t=_t(z({},t),{value:String(t.value)})),super(t),this.type="decl"}},wa=Du;Du.default=Du;n0=va,r0=wa,ZP=ba,{isClean:i0,my:o0}=Oi;Ue=class u0 extends ZP{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(...e){for(let n of e){let r=this.normalize(n,this.last);for(let i of r)this.proxyOf.nodes.push(i)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let n of this.nodes)n.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let n=this.getIterator(),r,i;for(;this.indexes[n]<this.proxyOf.nodes.length&&(r=this.indexes[n],i=e(this.proxyOf.nodes[r],r),i!==!1);)this.indexes[n]+=1;return delete this.indexes[n],i}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,n){return n==="proxyOf"?e:e[n]?n==="each"||typeof n=="string"&&n.startsWith("walk")?(...r)=>e[n](...r.map(i=>typeof i=="function"?(o,s)=>i(o.toProxy(),s):i)):n==="every"||n==="some"?r=>e[n]((i,...o)=>r(i.toProxy(),...o)):n==="root"?()=>e.root().toProxy():n==="nodes"?e.nodes.map(r=>r.toProxy()):n==="first"||n==="last"?e[n].toProxy():e[n]:e[n]},set(e,n,r){return e[n]===r||(e[n]=r,(n==="name"||n==="params"||n==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,n){let r=this.index(e),i=this.normalize(n,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let s of i)this.proxyOf.nodes.splice(r+1,0,s);let o;for(let s in this.indexes)o=this.indexes[s],r<o&&(this.indexes[s]=o+i.length);return this.markDirty(),this}insertBefore(e,n){let r=this.index(e),i=r===0?"prepend":!1,o=this.normalize(n,this.proxyOf.nodes[r],i).reverse();r=this.index(e);for(let a of o)this.proxyOf.nodes.splice(r,0,a);let s;for(let a in this.indexes)s=this.indexes[a],r<=s&&(this.indexes[a]=s+o.length);return this.markDirty(),this}normalize(e,n){if(typeof e=="string")e=l0(s0(e).nodes);else if(typeof e>"u")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let r of e)r.parent&&r.parent.removeChild(r,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let r of e)r.parent&&r.parent.removeChild(r,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value>"u")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new r0(e)]}else if(e.selector||e.selectors)e=[new Oh(e)];else if(e.name)e=[new xh(e)];else if(e.text)e=[new n0(e)];else throw new Error("Unknown node type in node creation");return e.map(r=>(r[o0]||u0.rebuild(r),r=r.proxyOf,r.parent&&r.parent.removeChild(r),r[i0]&&c0(r),r.raws||(r.raws={}),typeof r.raws.before>"u"&&n&&typeof n.raws.before<"u"&&(r.raws.before=n.raws.before.replace(/\S/g,"")),r.parent=this.proxyOf,r))}prepend(...e){e=e.reverse();for(let n of e){let r=this.normalize(n,this.first,"prepend").reverse();for(let i of r)this.proxyOf.nodes.unshift(i);for(let i in this.indexes)this.indexes[i]=this.indexes[i]+r.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let n;for(let r in this.indexes)n=this.indexes[r],n>=e&&(this.indexes[r]=n-1);return this.markDirty(),this}replaceValues(e,n,r){return r||(r=n,n={}),this.walkDecls(i=>{n.props&&!n.props.includes(i.prop)||n.fast&&!i.value.includes(n.fast)||(i.value=i.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((n,r)=>{let i;try{i=e(n,r)}catch(o){throw n.addToError(o)}return i!==!1&&n.walk&&(i=n.walk(e)),i})}walkAtRules(e,n){return n?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="atrule"&&e.test(r.name))return n(r,i)}):this.walk((r,i)=>{if(r.type==="atrule"&&r.name===e)return n(r,i)}):(n=e,this.walk((r,i)=>{if(r.type==="atrule")return n(r,i)}))}walkComments(e){return this.walk((n,r)=>{if(n.type==="comment")return e(n,r)})}walkDecls(e,n){return n?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="decl"&&e.test(r.prop))return n(r,i)}):this.walk((r,i)=>{if(r.type==="decl"&&r.prop===e)return n(r,i)}):(n=e,this.walk((r,i)=>{if(r.type==="decl")return n(r,i)}))}walkRules(e,n){return n?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="rule"&&e.test(r.selector))return n(r,i)}):this.walk((r,i)=>{if(r.type==="rule"&&r.selector===e)return n(r,i)}):(n=e,this.walk((r,i)=>{if(r.type==="rule")return n(r,i)}))}};Ue.registerParse=t=>{s0=t};Ue.registerRule=t=>{Oh=t};Ue.registerAtRule=t=>{xh=t};Ue.registerRoot=t=>{a0=t};Zn=Ue;Ue.default=Ue;Ue.rebuild=t=>{t.type==="atrule"?Object.setPrototypeOf(t,xh.prototype):t.type==="rule"?Object.setPrototypeOf(t,Oh.prototype):t.type==="decl"?Object.setPrototypeOf(t,r0.prototype):t.type==="comment"?Object.setPrototypeOf(t,n0.prototype):t.type==="root"&&Object.setPrototypeOf(t,a0.prototype),t[o0]=!0,t.nodes&&t.nodes.forEach(e=>{Ue.rebuild(e)})};h0=Zn,ta=class extends h0{constructor(t){super(t),this.type="atrule"}append(...t){return this.proxyOf.nodes||(this.nodes=[]),super.append(...t)}prepend(...t){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...t)}},Nh=ta;ta.default=ta;h0.registerAtRule(ta);kP=Zn,Ii=class extends kP{constructor(t){super(z({type:"document"},t)),this.nodes||(this.nodes=[])}toResult(t={}){return new p0(new d0,this,t).stringify()}};Ii.registerLazyResult=t=>{p0=t};Ii.registerProcessor=t=>{d0=t};Gh=Ii;Ii.default=Ii;VP="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",xP=(t=21)=>{let e="",n=t|0;for(;n--;)e+=VP[Math.random()*64|0];return e},OP={nanoid:xP},{existsSync:NP,readFileSync:GP}=pe,{dirname:Bc,join:LP}=pe,{SourceMapConsumer:Qg,SourceMapGenerator:$g}=pe;Yu=class{constructor(t,e){if(e.map===!1)return;this.loadAnnotation(t),this.inline=this.startWith(this.annotation,"data:");let n=e.map?e.map.prev:void 0,r=this.loadMap(e.from,n);!this.mapFile&&e.from&&(this.mapFile=e.from),this.mapFile&&(this.root=Bc(this.mapFile)),r&&(this.text=r)}consumer(){return this.consumerCache||(this.consumerCache=new Qg(this.text)),this.consumerCache}decodeInline(t){let e=/^data:application\/json;charset=utf-?8;base64,/,n=/^data:application\/json;base64,/,r=/^data:application\/json;charset=utf-?8,/,i=/^data:application\/json,/,o=t.match(r)||t.match(i);if(o)return decodeURIComponent(t.substr(o[0].length));let s=t.match(e)||t.match(n);if(s)return XP(t.substr(s[0].length));let a=t.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+a)}getAnnotationURL(t){return t.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(t){return typeof t!="object"?!1:typeof t.mappings=="string"||typeof t.$a=="string"||Array.isArray(t.sections)}loadAnnotation(t){let e=t.match(/\/\*\s*# sourceMappingURL=/g);if(!e)return;let n=t.lastIndexOf(e.pop()),r=t.indexOf("*/",n);n>-1&&r>-1&&(this.annotation=this.getAnnotationURL(t.substring(n,r)))}loadFile(t){if(this.root=Bc(t),NP(t))return this.mapFile=t,GP(t,"utf-8").toString().trim()}loadMap(t,e){if(e===!1)return!1;if(e){if(typeof e=="string")return e;if(typeof e=="function"){let n=e(t);if(n){let r=this.loadFile(n);if(!r)throw new Error("Unable to load previous source map: "+n.toString());return r}}else{if(e instanceof Qg)return $g.fromSourceMap(e).toString();if(e instanceof $g)return e.toString();if(this.isMap(e))return JSON.stringify(e);throw new Error("Unsupported previous source map format: "+e.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let n=this.annotation;return t&&(n=LP(Bc(t),n)),this.loadFile(n)}}}startWith(t,e){return t?t.substr(0,e.length)===e:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}},f0=Yu;Yu.default=Yu;({nanoid:WP}=OP),{isAbsolute:Ku,resolve:_u}=pe,{SourceMapConsumer:UP,SourceMapGenerator:PP}=pe,{fileURLToPath:qg,pathToFileURL:fs}=pe,tb=Vh,MP=f0,jc=pe,Qc=Symbol("fromOffsetCache"),FP=!!(UP&&PP),eb=!!(_u&&Ku),ea=class{get from(){return this.file||this.id}constructor(t,e={}){if(t===null||typeof t>"u"||typeof t=="object"&&!t.toString)throw new Error(`PostCSS received ${t} instead of CSS string`);if(this.css=t.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,e.document&&(this.document=e.document.toString()),e.from&&(!eb||/^\w+:\/\//.test(e.from)||Ku(e.from)?this.file=e.from:this.file=_u(e.from)),eb&&FP){let n=new MP(this.css,e);if(n.text){this.map=n;let r=n.consumer().file;!this.file&&r&&(this.file=this.mapResolve(r))}}this.file||(this.id="<input css "+WP(6)+">"),this.map&&(this.map.file=this.from)}error(t,e,n,r={}){let i,o,s;if(e&&typeof e=="object"){let c=e,l=n;if(typeof c.offset=="number"){let u=this.fromOffset(c.offset);e=u.line,n=u.col}else e=c.line,n=c.column;if(typeof l.offset=="number"){let u=this.fromOffset(l.offset);o=u.line,i=u.col}else o=l.line,i=l.column}else if(!n){let c=this.fromOffset(e);e=c.line,n=c.col}let a=this.origin(e,n,o,i);return a?s=new tb(t,a.endLine===void 0?a.line:{column:a.column,line:a.line},a.endLine===void 0?a.column:{column:a.endColumn,line:a.endLine},a.source,a.file,r.plugin):s=new tb(t,o===void 0?e:{column:n,line:e},o===void 0?n:{column:i,line:o},this.css,this.file,r.plugin),s.input={column:n,endColumn:i,endLine:o,line:e,source:this.css},this.file&&(fs&&(s.input.url=fs(this.file).toString()),s.input.file=this.file),s}fromOffset(t){let e,n;if(this[Qc])n=this[Qc];else{let i=this.css.split(`
329
+ `);n=new Array(i.length);let o=0;for(let s=0,a=i.length;s<a;s++)n[s]=o,o+=i[s].length+1;this[Qc]=n}e=n[n.length-1];let r=0;if(t>=e)r=n.length-1;else{let i=n.length-2,o;for(;r<i;)if(o=r+(i-r>>1),t<n[o])i=o-1;else if(t>=n[o+1])r=o+1;else{r=o;break}}return{col:t-n[r]+1,line:r+1}}mapResolve(t){return/^\w+:\/\//.test(t)?t:_u(this.map.consumer().sourceRoot||this.map.root||".",t)}origin(t,e,n,r){if(!this.map)return!1;let i=this.map.consumer(),o=i.originalPositionFor({column:e,line:t});if(!o.source)return!1;let s;typeof n=="number"&&(s=i.originalPositionFor({column:r,line:n}));let a;Ku(o.source)?a=fs(o.source):a=new URL(o.source,this.map.consumer().sourceRoot||fs(this.map.mapFile));let c={column:o.column,endColumn:s&&s.column,endLine:s&&s.line,line:o.line,url:a.toString()};if(a.protocol==="file:")if(qg)c.file=qg(a);else throw new Error("file: protocol is not available in this PostCSS build");let l=i.sourceContentFor(o.source);return l&&(c.source=l),c}toJSON(){let t={};for(let e of["hasBOM","css","file","id"])this[e]!=null&&(t[e]=this[e]);return this.map&&(t.map=z({},this.map),t.map.consumerCache&&(t.map.consumerCache=void 0)),t}},Sa=ea;ea.default=ea;jc&&jc.registerInput&&jc.registerInput(ea);m0=Zn,hr=class extends m0{constructor(t){super(t),this.type="root",this.nodes||(this.nodes=[])}normalize(t,e,n){let r=super.normalize(t);if(e){if(n==="prepend")this.nodes.length>1?e.raws.before=this.nodes[1].raws.before:delete e.raws.before;else if(this.first!==e)for(let i of r)i.raws.before=e.raws.before}return r}removeChild(t,e){let n=this.index(t);return!e&&n===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[n].raws.before),super.removeChild(t)}toResult(t={}){return new y0(new g0,this,t).stringify()}};hr.registerLazyResult=t=>{y0=t};hr.registerProcessor=t=>{g0=t};Ni=hr;hr.default=hr;m0.registerRoot(hr);Ti={comma(t){return Ti.split(t,[","],!0)},space(t){let e=[" ",`
330
+ `," "];return Ti.split(t,e)},split(t,e,n){let r=[],i="",o=!1,s=0,a=!1,c="",l=!1;for(let u of t)l?l=!1:u==="\\"?l=!0:a?u===c&&(a=!1):u==='"'||u==="'"?(a=!0,c=u):u==="("?s+=1:u===")"?s>0&&(s-=1):s===0&&e.includes(u)&&(o=!0),o?(i!==""&&r.push(i.trim()),i="",o=!1):i+=u;return(n||i!=="")&&r.push(i.trim()),r}},b0=Ti;Ti.default=Ti;v0=Zn,AP=b0,na=class extends v0{get selectors(){return AP.comma(this.selector)}set selectors(t){let e=this.selector?this.selector.match(/,\s*/):null,n=e?e[0]:","+this.raw("between","beforeOpen");this.selector=t.join(n)}constructor(t){super(t),this.type="rule",this.nodes||(this.nodes=[])}},Lh=na;na.default=na;v0.registerRule(na);JP=Nh,DP=va,YP=wa,KP=Sa,_P=f0,HP=Ni,zP=Lh;BP=Ei;Ei.default=Ei;({dirname:Gs,relative:w0,resolve:S0,sep:I0}=pe),{SourceMapConsumer:T0,SourceMapGenerator:Ls}=pe,{pathToFileURL:nb}=pe,jP=Sa,QP=!!(T0&&Ls),$P=!!(Gs&&S0&&w0&&I0),qP=class{constructor(t,e,n,r){this.stringify=t,this.mapOpts=n.map||{},this.root=e,this.opts=n,this.css=r,this.originalCSS=r,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let t;this.isInline()?t="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?t=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?t=this.mapOpts.annotation(this.opts.to,this.root):t=this.outputFile()+".map";let e=`
331
331
  `;this.css.includes(`\r
332
332
  `)&&(e=`\r
333
- `),this.css+=e+"/*# sourceMappingURL="+t+" */"}applyPrevMaps(){for(let t of this.previous()){let e=this.toUrl(this.path(t.file)),n=t.root||xs(t.file),r;this.mapOpts.sourcesContent===!1?(r=new h0(t.text),r.sourcesContent&&(r.sourcesContent=null)):r=t.consumer(),this.map.applySourceMap(r,e,this.toUrl(this.path(n)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let t;for(let e=this.root.nodes.length-1;e>=0;e--)t=this.root.nodes[e],t.type==="comment"&&t.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(e)}else this.css&&(this.css=this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),NP&&xP&&this.isMap())return this.generateMap();{let t="";return this.stringify(this.root,e=>{t+=e}),[t]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let t=this.previous()[0].consumer();t.file=this.outputFile(),this.map=Ns.fromSourceMap(t,{ignoreInvalidMapping:!0})}else this.map=new Ns({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 Ns({file:this.outputFile(),ignoreInvalidMapping:!0});let t=1,e=1,n="<no source>",r={generated:{column:0,line:0},original:{column:0,line:0},source:""},i,o;this.stringify(this.root,(s,a,c)=>{if(this.css+=s,a&&c!=="end"&&(r.generated.line=t,r.generated.column=e-1,a.source&&a.source.start?(r.source=this.sourcePath(a),r.original.line=a.source.start.line,r.original.column=a.source.start.column-1,this.map.addMapping(r)):(r.source=n,r.original.line=1,r.original.column=0,this.map.addMapping(r))),o=s.match(/\n/g),o?(t+=o.length,i=s.lastIndexOf(`
334
- `),e=s.length-i):e+=s.length,a&&c!=="start"){let l=a.parent||{raws:{}};(!(a.type==="decl"||a.type==="atrule"&&!a.nodes)||a!==l.last||l.raws.semicolon)&&(a.source&&a.source.end?(r.source=this.sourcePath(a),r.original.line=a.source.end.line,r.original.column=a.source.end.column-1,r.generated.line=t,r.generated.column=e-2,this.map.addMapping(r)):(r.source=n,r.original.line=1,r.original.column=0,r.generated.line=t,r.generated.column=e-1,this.map.addMapping(r)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(t=>t.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let t=this.mapOpts.annotation;return typeof t<"u"&&t!==!0?!1:this.previous().length?this.previous().some(e=>e.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(t=>t.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(t){if(this.mapOpts.absolute||t.charCodeAt(0)===60||/^\w+:\/\//.test(t))return t;let e=this.memoizedPaths.get(t);if(e)return e;let n=this.opts.to?xs(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(n=xs(c0(n,this.mapOpts.annotation)));let r=l0(n,t);return this.memoizedPaths.set(t,r),r}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(t=>{if(t.source&&t.source.input.map){let e=t.source.input.map;this.previousMaps.includes(e)||this.previousMaps.push(e)}});else{let t=new VP(this.originalCSS,this.opts);t.map&&this.previousMaps.push(t.map)}return this.previousMaps}setSourcesContent(){let t={};if(this.root)this.root.walk(e=>{if(e.source){let n=e.source.input.from;if(n&&!t[n]){t[n]=!0;let r=this.usesFileUrls?this.toFileUrl(n):this.toUrl(this.path(n));this.map.setSourceContent(r,e.source.input.css)}}});else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(e,this.css)}}sourcePath(t){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(t.source.input.from):this.toUrl(this.path(t.source.input.from))}toBase64(t){return Buffer?Buffer.from(t).toString("base64"):window.btoa(unescape(encodeURIComponent(t)))}toFileUrl(t){let e=this.memoizedFileURLs.get(t);if(e)return e;if(Yg){let n=Yg(t).toString();return this.memoizedFileURLs.set(t,n),n}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(t){let e=this.memoizedURLs.get(t);if(e)return e;u0==="\\"&&(t=t.replace(/\\/g,"/"));let n=encodeURI(t).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(t,n),n}},p0=OP,_c=39,Kg=34,ps=92,_g=47,ds=10,ri=32,fs=12,ms=9,ys=13,GP=91,LP=93,XP=40,WP=41,UP=123,PP=125,MP=59,FP=42,AP=58,JP=64,gs=/[\t\n\f\r "#'()/;[\\\]{}]/g,bs=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,DP=/.[\r\n"'(/\\]/,Hg=/[\da-f]/i,YP=function(t,e={}){let n=t.css.valueOf(),r=e.ignoreErrors,i,o,s,a,c,l,u,h,p,f,m=n.length,d=0,v=[],g=[];function w(){return d}function R(N){throw t.error("Unclosed "+N,d)}function E(){return g.length===0&&d>=m}function T(N){if(g.length)return g.pop();if(d>=m)return;let U=N?N.ignoreUnclosed:!1;switch(i=n.charCodeAt(d),i){case ds:case ri:case ms:case ys:case fs:{a=d;do a+=1,i=n.charCodeAt(a);while(i===ri||i===ds||i===ms||i===ys||i===fs);l=["space",n.slice(d,a)],d=a-1;break}case GP:case LP:case UP:case PP:case AP:case MP:case WP:{let C=String.fromCharCode(i);l=[C,C,d];break}case XP:{if(f=v.length?v.pop()[1]:"",p=n.charCodeAt(d+1),f==="url"&&p!==_c&&p!==Kg&&p!==ri&&p!==ds&&p!==ms&&p!==fs&&p!==ys){a=d;do{if(u=!1,a=n.indexOf(")",a+1),a===-1)if(r||U){a=d;break}else R("bracket");for(h=a;n.charCodeAt(h-1)===ps;)h-=1,u=!u}while(u);l=["brackets",n.slice(d,a+1),d,a],d=a}else a=n.indexOf(")",d+1),o=n.slice(d,a+1),a===-1||DP.test(o)?l=["(","(",d]:(l=["brackets",o,d,a],d=a);break}case _c:case Kg:{c=i===_c?"'":'"',a=d;do{if(u=!1,a=n.indexOf(c,a+1),a===-1)if(r||U){a=d+1;break}else R("string");for(h=a;n.charCodeAt(h-1)===ps;)h-=1,u=!u}while(u);l=["string",n.slice(d,a+1),d,a],d=a;break}case JP:{gs.lastIndex=d+1,gs.test(n),gs.lastIndex===0?a=n.length-1:a=gs.lastIndex-2,l=["at-word",n.slice(d,a+1),d,a],d=a;break}case ps:{for(a=d,s=!0;n.charCodeAt(a+1)===ps;)a+=1,s=!s;if(i=n.charCodeAt(a+1),s&&i!==_g&&i!==ri&&i!==ds&&i!==ms&&i!==ys&&i!==fs&&(a+=1,Hg.test(n.charAt(a)))){for(;Hg.test(n.charAt(a+1));)a+=1;n.charCodeAt(a+1)===ri&&(a+=1)}l=["word",n.slice(d,a+1),d,a],d=a;break}default:{i===_g&&n.charCodeAt(d+1)===FP?(a=n.indexOf("*/",d+2)+1,a===0&&(r||U?a=n.length:R("comment")),l=["comment",n.slice(d,a+1),d,a],d=a):(bs.lastIndex=d+1,bs.test(n),bs.lastIndex===0?a=n.length-1:a=bs.lastIndex-2,l=["word",n.slice(d,a+1),d,a],v.push(l),d=a);break}}return d++,l}function V(N){g.push(N)}return{back:V,endOfFile:E,nextToken:T,position:w}},KP=Ch,_P=ya,HP=ga,zP=xi,zg=kh,BP=YP,Bg={empty:!0,space:!0};QP=class{constructor(t){this.input=t,this.root=new zP,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:t,start:{column:1,line:1,offset:0}}}atrule(t){let e=new KP;e.name=t[1].slice(1),e.name===""&&this.unnamedAtrule(e,t),this.init(e,t[2]);let n,r,i,o=!1,s=!1,a=[],c=[];for(;!this.tokenizer.endOfFile();){if(t=this.tokenizer.nextToken(),n=t[0],n==="("||n==="["?c.push(n==="("?")":"]"):n==="{"&&c.length>0?c.push("}"):n===c[c.length-1]&&c.pop(),c.length===0)if(n===";"){e.source.end=this.getPosition(t[2]),e.source.end.offset++,this.semicolon=!0;break}else if(n==="{"){s=!0;break}else if(n==="}"){if(a.length>0){for(i=a.length-1,r=a[i];r&&r[0]==="space";)r=a[--i];r&&(e.source.end=this.getPosition(r[3]||r[2]),e.source.end.offset++)}this.end(t);break}else a.push(t);else a.push(t);if(this.tokenizer.endOfFile()){o=!0;break}}e.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(e.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(e,"params",a),o&&(t=a[a.length-1],e.source.end=this.getPosition(t[3]||t[2]),e.source.end.offset++,this.spaces=e.raws.between,e.raws.between="")):(e.raws.afterName="",e.params=""),s&&(e.nodes=[],this.current=e)}checkMissedSemicolon(t){let e=this.colon(t);if(e===!1)return;let n=0,r;for(let i=e-1;i>=0&&(r=t[i],!(r[0]!=="space"&&(n+=1,n===2)));i--);throw this.input.error("Missed semicolon",r[0]==="word"?r[3]+1:r[2])}colon(t){let e=0,n,r,i;for(let[o,s]of t.entries()){if(r=s,i=r[0],i==="("&&(e+=1),i===")"&&(e-=1),e===0&&i===":")if(!n)this.doubleColon(r);else{if(n[0]==="word"&&n[1]==="progid")continue;return o}n=r}return!1}comment(t){let e=new _P;this.init(e,t[2]),e.source.end=this.getPosition(t[3]||t[2]),e.source.end.offset++;let n=t[1].slice(2,-2);if(/^\s*$/.test(n))e.text="",e.raws.left=n,e.raws.right="";else{let r=n.match(/^(\s*)([^]*\S)(\s*)$/);e.text=r[2],e.raws.left=r[1],e.raws.right=r[3]}}createTokenizer(){this.tokenizer=BP(this.input)}decl(t,e){let n=new HP;this.init(n,t[0][2]);let r=t[t.length-1];for(r[0]===";"&&(this.semicolon=!0,t.pop()),n.source.end=this.getPosition(r[3]||r[2]||jP(t)),n.source.end.offset++;t[0][0]!=="word";)t.length===1&&this.unknownWord(t),n.raws.before+=t.shift()[1];for(n.source.start=this.getPosition(t[0][2]),n.prop="";t.length;){let a=t[0][0];if(a===":"||a==="space"||a==="comment")break;n.prop+=t.shift()[1]}n.raws.between="";let i;for(;t.length;)if(i=t.shift(),i[0]===":"){n.raws.between+=i[1];break}else i[0]==="word"&&/\w/.test(i[1])&&this.unknownWord([i]),n.raws.between+=i[1];(n.prop[0]==="_"||n.prop[0]==="*")&&(n.raws.before+=n.prop[0],n.prop=n.prop.slice(1));let o=[],s;for(;t.length&&(s=t[0][0],!(s!=="space"&&s!=="comment"));)o.push(t.shift());this.precheckMissedSemicolon(t);for(let a=t.length-1;a>=0;a--){if(i=t[a],i[1].toLowerCase()==="!important"){n.important=!0;let c=this.stringFrom(t,a);c=this.spacesFromEnd(t)+c,c!==" !important"&&(n.raws.important=c);break}else if(i[1].toLowerCase()==="important"){let c=t.slice(0),l="";for(let u=a;u>0;u--){let h=c[u][0];if(l.trim().startsWith("!")&&h!=="space")break;l=c.pop()[1]+l}l.trim().startsWith("!")&&(n.important=!0,n.raws.important=l,t=c)}if(i[0]!=="space"&&i[0]!=="comment")break}t.some(a=>a[0]!=="space"&&a[0]!=="comment")&&(n.raws.between+=o.map(a=>a[1]).join(""),o=[]),this.raw(n,"value",o.concat(t),e),n.value.includes(":")&&!e&&this.checkMissedSemicolon(t)}doubleColon(t){throw this.input.error("Double colon",{offset:t[2]},{offset:t[2]+t[1].length})}emptyRule(t){let e=new zg;this.init(e,t[2]),e.selector="",e.raws.between="",this.current=e}end(t){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(t[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(t)}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(t){if(this.spaces+=t[1],this.current.nodes){let e=this.current.nodes[this.current.nodes.length-1];e&&e.type==="rule"&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="",e.source.end=this.getPosition(t[2]),e.source.end.offset+=e.raws.ownSemicolon.length)}}getPosition(t){let e=this.input.fromOffset(t);return{column:e.col,line:e.line,offset:t}}init(t,e){this.current.push(t),t.source={input:this.input,start:this.getPosition(e)},t.raws.before=this.spaces,this.spaces="",t.type!=="comment"&&(this.semicolon=!1)}other(t){let e=!1,n=null,r=!1,i=null,o=[],s=t[1].startsWith("--"),a=[],c=t;for(;c;){if(n=c[0],a.push(c),n==="("||n==="[")i||(i=c),o.push(n==="("?")":"]");else if(s&&r&&n==="{")i||(i=c),o.push("}");else if(o.length===0)if(n===";")if(r){this.decl(a,s);return}else break;else if(n==="{"){this.rule(a);return}else if(n==="}"){this.tokenizer.back(a.pop()),e=!0;break}else n===":"&&(r=!0);else n===o[o.length-1]&&(o.pop(),o.length===0&&(i=null));c=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(e=!0),o.length>0&&this.unclosedBracket(i),e&&r){if(!s)for(;a.length&&(c=a[a.length-1][0],!(c!=="space"&&c!=="comment"));)this.tokenizer.back(a.pop());this.decl(a,s)}else this.unknownWord(a)}parse(){let t;for(;!this.tokenizer.endOfFile();)switch(t=this.tokenizer.nextToken(),t[0]){case"space":this.spaces+=t[1];break;case";":this.freeSemicolon(t);break;case"}":this.end(t);break;case"comment":this.comment(t);break;case"at-word":this.atrule(t);break;case"{":this.emptyRule(t);break;default:this.other(t);break}this.endFile()}precheckMissedSemicolon(){}raw(t,e,n,r){let i,o,s=n.length,a="",c=!0,l,u;for(let h=0;h<s;h+=1)i=n[h],o=i[0],o==="space"&&h===s-1&&!r?c=!1:o==="comment"?(u=n[h-1]?n[h-1][0]:"empty",l=n[h+1]?n[h+1][0]:"empty",!Bg[u]&&!Bg[l]?a.slice(-1)===","?c=!1:a+=i[1]:c=!1):a+=i[1];if(!c){let h=n.reduce((p,f)=>p+f[1],"");t.raws[e]={raw:h,value:a}}t[e]=a}rule(t){t.pop();let e=new zg;this.init(e,t[0][2]),e.raws.between=this.spacesAndCommentsFromEnd(t),this.raw(e,"selector",t),this.current=e}spacesAndCommentsFromEnd(t){let e,n="";for(;t.length&&(e=t[t.length-1][0],!(e!=="space"&&e!=="comment"));)n=t.pop()[1]+n;return n}spacesAndCommentsFromStart(t){let e,n="";for(;t.length&&(e=t[0][0],!(e!=="space"&&e!=="comment"));)n+=t.shift()[1];return n}spacesFromEnd(t){let e,n="";for(;t.length&&(e=t[t.length-1][0],e==="space");)n=t.pop()[1]+n;return n}stringFrom(t,e){let n="";for(let r=e;r<t.length;r++)n+=t[r][1];return t.splice(e,t.length-e),n}unclosedBlock(){let t=this.current.source.start;throw this.input.error("Unclosed block",t.line,t.column)}unclosedBracket(t){throw this.input.error("Unclosed bracket",{offset:t[2]},{offset:t[2]+1})}unexpectedClose(t){throw this.input.error("Unexpected }",{offset:t[2]},{offset:t[2]+1})}unknownWord(t){throw this.input.error("Unknown word "+t[0][1],{offset:t[0][2]},{offset:t[0][2]+t[0][1].length})}unnamedAtrule(t,e){throw this.input.error("At-rule without name",{offset:e[2]},{offset:e[2]+e[1].length})}},$P=QP,qP=Cn,tM=ba,eM=$P;Vh=ta;ta.default=ta;qP.registerParse(ta);Au=class{constructor(t,e={}){if(this.type="warning",this.text=t,e.node&&e.node.source){let n=e.node.rangeBy(e);this.line=n.start.line,this.column=n.start.column,this.endLine=n.end.line,this.endColumn=n.end.column}for(let n in e)this[n]=e[n]}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}},d0=Au;Au.default=Au;nM=d0,Ju=class{get content(){return this.css}constructor(t,e,n){this.processor=t,this.messages=[],this.root=e,this.opts=n,this.css=void 0,this.map=void 0}toString(){return this.css}warn(t,e={}){e.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(e.plugin=this.lastPlugin.postcssPlugin);let n=new nM(t,e);return this.messages.push(n),n}warnings(){return this.messages.filter(t=>t.type==="warning")}},xh=Ju;Ju.default=Ju;jg={},f0=function(t){jg[t]||(jg[t]=!0,typeof console<"u"&&console.warn&&console.warn(t))},rM=Cn,iM=Zh,oM=p0,sM=Vh,Qg=xh,aM=xi,lM=fa,{isClean:Se,my:cM}=Vi,uM=f0,hM={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},pM={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},dM={Once:!0,postcssPlugin:!0,prepare:!0},hr=0;Yu={},pr=class y0{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(e,n,r){this.stringified=!1,this.processed=!1;let i;if(typeof n=="object"&&n!==null&&(n.type==="root"||n.type==="document"))i=Du(n);else if(n instanceof y0||n instanceof Qg)i=Du(n.root),n.map&&(typeof r.map>"u"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=n.map);else{let o=sM;r.syntax&&(o=r.syntax.parse),r.parser&&(o=r.parser),o.parse&&(o=o.parse);try{i=o(n,r)}catch(s){this.processed=!0,this.error=s}i&&!i[cM]&&rM.rebuild(i)}this.result=new Qg(e,i,r),this.helpers=Kt(z({},Yu),{postcss:Yu,result:this.result}),this.plugins=this.processor.plugins.map(o=>typeof o=="object"&&o.prepare?z(z({},o),o.prepare(this.result)):o)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,n){let r=this.result.lastPlugin;try{if(n&&n.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin)e.plugin=r.postcssPlugin,e.setMessage();else if(r.postcssVersion&&process.env.NODE_ENV!=="production"){let i=r.postcssPlugin,o=r.postcssVersion,s=this.result.processor.version,a=o.split("."),c=s.split(".");(a[0]!==c[0]||parseInt(a[1])>parseInt(c[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+s+", but "+i+" uses "+o+". Perhaps this is the source of the error below.")}}catch(i){console&&console.error&&console.error(i)}return e}prepareVisitors(){this.listeners={};let e=(n,r,i)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([n,i])};for(let n of this.plugins)if(typeof n=="object")for(let r in n){if(!pM[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${n.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!dM[r])if(typeof n[r]=="object")for(let i in n[r])i==="*"?e(n,r,n[r][i]):e(n,r+"-"+i.toLowerCase(),n[r][i]);else typeof n[r]=="function"&&e(n,r,n[r])}this.hasListener=Object.keys(this.listeners).length>0}runAsync(){return Yt(this,null,function*(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let n=this.plugins[e],r=this.runOnRoot(n);if(ii(r))try{yield r}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Se];){e[Se]=!0;let n=[$g(e)];for(;n.length>0;){let r=this.visitTick(n);if(ii(r))try{yield r}catch(i){let o=n[n.length-1].node;throw this.handleError(i,o)}}}if(this.listeners.OnceExit)for(let[n,r]of this.listeners.OnceExit){this.result.lastPlugin=n;try{if(e.type==="document"){let i=e.nodes.map(o=>r(o,this.helpers));yield Promise.all(i)}else yield r(e,this.helpers)}catch(i){throw this.handleError(i)}}}return this.processed=!0,this.stringify()})}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let n=this.result.root.nodes.map(r=>e.Once(r,this.helpers));return ii(n[0])?Promise.all(n):n}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(n){throw this.handleError(n)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,n=lM;e.syntax&&(n=e.syntax.stringify),e.stringifier&&(n=e.stringifier),n.stringify&&(n=n.stringify);let r=new oM(n,this.result.root,this.result.opts).generate();return this.result.css=r[0],this.result.map=r[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 e of this.plugins){let n=this.runOnRoot(e);if(ii(n))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Se];)e[Se]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let n of e.nodes)this.visitSync(this.listeners.OnceExit,n);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,n){return process.env.NODE_ENV!=="production"&&("from"in this.opts||uM("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(e,n)}toString(){return this.css}visitSync(e,n){for(let[r,i]of e){this.result.lastPlugin=r;let o;try{o=i(n,this.helpers)}catch(s){throw this.handleError(s,n.proxyOf)}if(n.type!=="root"&&n.type!=="document"&&!n.parent)return!0;if(ii(o))throw this.getAsyncError()}}visitTick(e){let n=e[e.length-1],{node:r,visitors:i}=n;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(i.length>0&&n.visitorIndex<i.length){let[s,a]=i[n.visitorIndex];n.visitorIndex+=1,n.visitorIndex===i.length&&(n.visitors=[],n.visitorIndex=0),this.result.lastPlugin=s;try{return a(r.toProxy(),this.helpers)}catch(c){throw this.handleError(c,r)}}if(n.iterator!==0){let s=n.iterator,a;for(;a=r.nodes[r.indexes[s]];)if(r.indexes[s]+=1,!a[Se]){a[Se]=!0,e.push($g(a));return}n.iterator=0,delete r.indexes[s]}let o=n.events;for(;n.eventIndex<o.length;){let s=o[n.eventIndex];if(n.eventIndex+=1,s===hr){r.nodes&&r.nodes.length&&(r[Se]=!0,n.iterator=r.getIterator());return}else if(this.listeners[s]){n.visitors=this.listeners[s];return}}e.pop()}walkSync(e){e[Se]=!0;let n=m0(e);for(let r of n)if(r===hr)e.nodes&&e.each(i=>{i[Se]||this.walkSync(i)});else{let i=this.listeners[r];if(i&&this.visitSync(i,e.toProxy()))return}}warnings(){return this.sync().warnings()}};pr.registerPostcss=t=>{Yu=t};g0=pr;pr.default=pr;aM.registerLazyResult(pr);iM.registerLazyResult(pr);fM=p0,mM=Vh,yM=xh,gM=fa,bM=f0,Ku=class{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.tn)return this.tn;let t,e=mM;try{t=e(this.mr,this.un)}catch(n){this.error=n}if(this.error)throw this.error;return this.tn=t,t}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(t,e,n){e=e.toString(),this.stringified=!1,this.uo=t,this.mr=e,this.un=n,this.Qa=void 0;let r,i=gM;this.result=new yM(this.uo,r,this.un),this.result.css=e;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let s=new fM(i,r,this.un,e);if(s.isMap()){let[a,c]=s.generate();a&&(this.result.css=a),c&&(this.result.map=c)}else s.clearAnnotation(),this.result.css=s.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}sync(){if(this.error)throw this.error;return this.result}then(t,e){return process.env.NODE_ENV!=="production"&&("from"in this.un||bM("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(t,e)}toString(){return this.mr}warnings(){return[]}},vM=Ku;Ku.default=Ku;wM=Zh,SM=g0,IM=vM,TM=xi,Ti=class{constructor(t=[]){this.version="8.5.3",this.plugins=this.normalize(t)}normalize(t){let e=[];for(let n of t)if(n.postcss===!0?n=n():n.postcss&&(n=n.postcss),typeof n=="object"&&Array.isArray(n.plugins))e=e.concat(n.plugins);else if(typeof n=="object"&&n.postcssPlugin)e.push(n);else if(typeof n=="function")e.push(n);else if(typeof n=="object"&&(n.parse||n.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(n+" is not a PostCSS plugin");return e}process(t,e={}){return!this.plugins.length&&!e.parser&&!e.stringifier&&!e.syntax?new IM(this,t,e):new SM(this,t,e)}use(t){return this.plugins=this.plugins.concat(this.normalize([t])),this}},EM=Ti;Ti.default=Ti;TM.registerProcessor(Ti);wM.registerProcessor(Ti);b0=Ch,v0=ya,RM=Cn,CM=Th,w0=ga,S0=Zh,ZM=kP,kM=ba,VM=g0,xM=s0,NM=ma,OM=Vh,Nh=EM,GM=xh,I0=xi,T0=kh,LM=fa,XM=d0;pt.plugin=function(t,e){let n=!1;function r(...o){console&&console.warn&&!n&&(n=!0,console.warn(t+`: postcss.plugin was deprecated. Migration guide:
333
+ `),this.css+=e+"/*# sourceMappingURL="+t+" */"}applyPrevMaps(){for(let t of this.previous()){let e=this.toUrl(this.path(t.file)),n=t.root||Gs(t.file),r;this.mapOpts.sourcesContent===!1?(r=new T0(t.text),r.sourcesContent&&(r.sourcesContent=null)):r=t.consumer(),this.map.applySourceMap(r,e,this.toUrl(this.path(n)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let t;for(let e=this.root.nodes.length-1;e>=0;e--)t=this.root.nodes[e],t.type==="comment"&&t.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(e)}else this.css&&(this.css=this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),$P&&QP&&this.isMap())return this.generateMap();{let t="";return this.stringify(this.root,e=>{t+=e}),[t]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let t=this.previous()[0].consumer();t.file=this.outputFile(),this.map=Ls.fromSourceMap(t,{ignoreInvalidMapping:!0})}else this.map=new Ls({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 Ls({file:this.outputFile(),ignoreInvalidMapping:!0});let t=1,e=1,n="<no source>",r={generated:{column:0,line:0},original:{column:0,line:0},source:""},i,o;this.stringify(this.root,(s,a,c)=>{if(this.css+=s,a&&c!=="end"&&(r.generated.line=t,r.generated.column=e-1,a.source&&a.source.start?(r.source=this.sourcePath(a),r.original.line=a.source.start.line,r.original.column=a.source.start.column-1,this.map.addMapping(r)):(r.source=n,r.original.line=1,r.original.column=0,this.map.addMapping(r))),o=s.match(/\n/g),o?(t+=o.length,i=s.lastIndexOf(`
334
+ `),e=s.length-i):e+=s.length,a&&c!=="start"){let l=a.parent||{raws:{}};(!(a.type==="decl"||a.type==="atrule"&&!a.nodes)||a!==l.last||l.raws.semicolon)&&(a.source&&a.source.end?(r.source=this.sourcePath(a),r.original.line=a.source.end.line,r.original.column=a.source.end.column-1,r.generated.line=t,r.generated.column=e-2,this.map.addMapping(r)):(r.source=n,r.original.line=1,r.original.column=0,r.generated.line=t,r.generated.column=e-1,this.map.addMapping(r)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(t=>t.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let t=this.mapOpts.annotation;return typeof t<"u"&&t!==!0?!1:this.previous().length?this.previous().some(e=>e.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(t=>t.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(t){if(this.mapOpts.absolute||t.charCodeAt(0)===60||/^\w+:\/\//.test(t))return t;let e=this.memoizedPaths.get(t);if(e)return e;let n=this.opts.to?Gs(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(n=Gs(S0(n,this.mapOpts.annotation)));let r=w0(n,t);return this.memoizedPaths.set(t,r),r}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(t=>{if(t.source&&t.source.input.map){let e=t.source.input.map;this.previousMaps.includes(e)||this.previousMaps.push(e)}});else{let t=new jP(this.originalCSS,this.opts);t.map&&this.previousMaps.push(t.map)}return this.previousMaps}setSourcesContent(){let t={};if(this.root)this.root.walk(e=>{if(e.source){let n=e.source.input.from;if(n&&!t[n]){t[n]=!0;let r=this.usesFileUrls?this.toFileUrl(n):this.toUrl(this.path(n));this.map.setSourceContent(r,e.source.input.css)}}});else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(e,this.css)}}sourcePath(t){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(t.source.input.from):this.toUrl(this.path(t.source.input.from))}toBase64(t){return Buffer?Buffer.from(t).toString("base64"):window.btoa(unescape(encodeURIComponent(t)))}toFileUrl(t){let e=this.memoizedFileURLs.get(t);if(e)return e;if(nb){let n=nb(t).toString();return this.memoizedFileURLs.set(t,n),n}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(t){let e=this.memoizedURLs.get(t);if(e)return e;I0==="\\"&&(t=t.replace(/\\/g,"/"));let n=encodeURI(t).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(t,n),n}},E0=qP,$c=39,rb=34,ms=92,ib=47,ys=10,oi=32,gs=12,bs=9,vs=13,tM=91,eM=93,nM=40,rM=41,iM=123,oM=125,sM=59,aM=42,lM=58,cM=64,ws=/[\t\n\f\r "#'()/;[\\\]{}]/g,Ss=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,uM=/.[\r\n"'(/\\]/,ob=/[\da-f]/i,hM=function(t,e={}){let n=t.css.valueOf(),r=e.ignoreErrors,i,o,s,a,c,l,u,h,p,f,m=n.length,d=0,v=[],g=[];function w(){return d}function R(N){throw t.error("Unclosed "+N,d)}function E(){return g.length===0&&d>=m}function T(N){if(g.length)return g.pop();if(d>=m)return;let U=N?N.ignoreUnclosed:!1;switch(i=n.charCodeAt(d),i){case ys:case oi:case bs:case vs:case gs:{a=d;do a+=1,i=n.charCodeAt(a);while(i===oi||i===ys||i===bs||i===vs||i===gs);l=["space",n.slice(d,a)],d=a-1;break}case tM:case eM:case iM:case oM:case lM:case sM:case rM:{let C=String.fromCharCode(i);l=[C,C,d];break}case nM:{if(f=v.length?v.pop()[1]:"",p=n.charCodeAt(d+1),f==="url"&&p!==$c&&p!==rb&&p!==oi&&p!==ys&&p!==bs&&p!==gs&&p!==vs){a=d;do{if(u=!1,a=n.indexOf(")",a+1),a===-1)if(r||U){a=d;break}else R("bracket");for(h=a;n.charCodeAt(h-1)===ms;)h-=1,u=!u}while(u);l=["brackets",n.slice(d,a+1),d,a],d=a}else a=n.indexOf(")",d+1),o=n.slice(d,a+1),a===-1||uM.test(o)?l=["(","(",d]:(l=["brackets",o,d,a],d=a);break}case $c:case rb:{c=i===$c?"'":'"',a=d;do{if(u=!1,a=n.indexOf(c,a+1),a===-1)if(r||U){a=d+1;break}else R("string");for(h=a;n.charCodeAt(h-1)===ms;)h-=1,u=!u}while(u);l=["string",n.slice(d,a+1),d,a],d=a;break}case cM:{ws.lastIndex=d+1,ws.test(n),ws.lastIndex===0?a=n.length-1:a=ws.lastIndex-2,l=["at-word",n.slice(d,a+1),d,a],d=a;break}case ms:{for(a=d,s=!0;n.charCodeAt(a+1)===ms;)a+=1,s=!s;if(i=n.charCodeAt(a+1),s&&i!==ib&&i!==oi&&i!==ys&&i!==bs&&i!==vs&&i!==gs&&(a+=1,ob.test(n.charAt(a)))){for(;ob.test(n.charAt(a+1));)a+=1;n.charCodeAt(a+1)===oi&&(a+=1)}l=["word",n.slice(d,a+1),d,a],d=a;break}default:{i===ib&&n.charCodeAt(d+1)===aM?(a=n.indexOf("*/",d+2)+1,a===0&&(r||U?a=n.length:R("comment")),l=["comment",n.slice(d,a+1),d,a],d=a):(Ss.lastIndex=d+1,Ss.test(n),Ss.lastIndex===0?a=n.length-1:a=Ss.lastIndex-2,l=["word",n.slice(d,a+1),d,a],v.push(l),d=a);break}}return d++,l}function x(N){g.push(N)}return{back:x,endOfFile:E,nextToken:T,position:w}},pM=Nh,dM=va,fM=wa,mM=Ni,sb=Lh,yM=hM,ab={empty:!0,space:!0};bM=class{constructor(t){this.input=t,this.root=new mM,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:t,start:{column:1,line:1,offset:0}}}atrule(t){let e=new pM;e.name=t[1].slice(1),e.name===""&&this.unnamedAtrule(e,t),this.init(e,t[2]);let n,r,i,o=!1,s=!1,a=[],c=[];for(;!this.tokenizer.endOfFile();){if(t=this.tokenizer.nextToken(),n=t[0],n==="("||n==="["?c.push(n==="("?")":"]"):n==="{"&&c.length>0?c.push("}"):n===c[c.length-1]&&c.pop(),c.length===0)if(n===";"){e.source.end=this.getPosition(t[2]),e.source.end.offset++,this.semicolon=!0;break}else if(n==="{"){s=!0;break}else if(n==="}"){if(a.length>0){for(i=a.length-1,r=a[i];r&&r[0]==="space";)r=a[--i];r&&(e.source.end=this.getPosition(r[3]||r[2]),e.source.end.offset++)}this.end(t);break}else a.push(t);else a.push(t);if(this.tokenizer.endOfFile()){o=!0;break}}e.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(e.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(e,"params",a),o&&(t=a[a.length-1],e.source.end=this.getPosition(t[3]||t[2]),e.source.end.offset++,this.spaces=e.raws.between,e.raws.between="")):(e.raws.afterName="",e.params=""),s&&(e.nodes=[],this.current=e)}checkMissedSemicolon(t){let e=this.colon(t);if(e===!1)return;let n=0,r;for(let i=e-1;i>=0&&(r=t[i],!(r[0]!=="space"&&(n+=1,n===2)));i--);throw this.input.error("Missed semicolon",r[0]==="word"?r[3]+1:r[2])}colon(t){let e=0,n,r,i;for(let[o,s]of t.entries()){if(r=s,i=r[0],i==="("&&(e+=1),i===")"&&(e-=1),e===0&&i===":")if(!n)this.doubleColon(r);else{if(n[0]==="word"&&n[1]==="progid")continue;return o}n=r}return!1}comment(t){let e=new dM;this.init(e,t[2]),e.source.end=this.getPosition(t[3]||t[2]),e.source.end.offset++;let n=t[1].slice(2,-2);if(/^\s*$/.test(n))e.text="",e.raws.left=n,e.raws.right="";else{let r=n.match(/^(\s*)([^]*\S)(\s*)$/);e.text=r[2],e.raws.left=r[1],e.raws.right=r[3]}}createTokenizer(){this.tokenizer=yM(this.input)}decl(t,e){let n=new fM;this.init(n,t[0][2]);let r=t[t.length-1];for(r[0]===";"&&(this.semicolon=!0,t.pop()),n.source.end=this.getPosition(r[3]||r[2]||gM(t)),n.source.end.offset++;t[0][0]!=="word";)t.length===1&&this.unknownWord(t),n.raws.before+=t.shift()[1];for(n.source.start=this.getPosition(t[0][2]),n.prop="";t.length;){let a=t[0][0];if(a===":"||a==="space"||a==="comment")break;n.prop+=t.shift()[1]}n.raws.between="";let i;for(;t.length;)if(i=t.shift(),i[0]===":"){n.raws.between+=i[1];break}else i[0]==="word"&&/\w/.test(i[1])&&this.unknownWord([i]),n.raws.between+=i[1];(n.prop[0]==="_"||n.prop[0]==="*")&&(n.raws.before+=n.prop[0],n.prop=n.prop.slice(1));let o=[],s;for(;t.length&&(s=t[0][0],!(s!=="space"&&s!=="comment"));)o.push(t.shift());this.precheckMissedSemicolon(t);for(let a=t.length-1;a>=0;a--){if(i=t[a],i[1].toLowerCase()==="!important"){n.important=!0;let c=this.stringFrom(t,a);c=this.spacesFromEnd(t)+c,c!==" !important"&&(n.raws.important=c);break}else if(i[1].toLowerCase()==="important"){let c=t.slice(0),l="";for(let u=a;u>0;u--){let h=c[u][0];if(l.trim().startsWith("!")&&h!=="space")break;l=c.pop()[1]+l}l.trim().startsWith("!")&&(n.important=!0,n.raws.important=l,t=c)}if(i[0]!=="space"&&i[0]!=="comment")break}t.some(a=>a[0]!=="space"&&a[0]!=="comment")&&(n.raws.between+=o.map(a=>a[1]).join(""),o=[]),this.raw(n,"value",o.concat(t),e),n.value.includes(":")&&!e&&this.checkMissedSemicolon(t)}doubleColon(t){throw this.input.error("Double colon",{offset:t[2]},{offset:t[2]+t[1].length})}emptyRule(t){let e=new sb;this.init(e,t[2]),e.selector="",e.raws.between="",this.current=e}end(t){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(t[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(t)}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(t){if(this.spaces+=t[1],this.current.nodes){let e=this.current.nodes[this.current.nodes.length-1];e&&e.type==="rule"&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="",e.source.end=this.getPosition(t[2]),e.source.end.offset+=e.raws.ownSemicolon.length)}}getPosition(t){let e=this.input.fromOffset(t);return{column:e.col,line:e.line,offset:t}}init(t,e){this.current.push(t),t.source={input:this.input,start:this.getPosition(e)},t.raws.before=this.spaces,this.spaces="",t.type!=="comment"&&(this.semicolon=!1)}other(t){let e=!1,n=null,r=!1,i=null,o=[],s=t[1].startsWith("--"),a=[],c=t;for(;c;){if(n=c[0],a.push(c),n==="("||n==="[")i||(i=c),o.push(n==="("?")":"]");else if(s&&r&&n==="{")i||(i=c),o.push("}");else if(o.length===0)if(n===";")if(r){this.decl(a,s);return}else break;else if(n==="{"){this.rule(a);return}else if(n==="}"){this.tokenizer.back(a.pop()),e=!0;break}else n===":"&&(r=!0);else n===o[o.length-1]&&(o.pop(),o.length===0&&(i=null));c=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(e=!0),o.length>0&&this.unclosedBracket(i),e&&r){if(!s)for(;a.length&&(c=a[a.length-1][0],!(c!=="space"&&c!=="comment"));)this.tokenizer.back(a.pop());this.decl(a,s)}else this.unknownWord(a)}parse(){let t;for(;!this.tokenizer.endOfFile();)switch(t=this.tokenizer.nextToken(),t[0]){case"space":this.spaces+=t[1];break;case";":this.freeSemicolon(t);break;case"}":this.end(t);break;case"comment":this.comment(t);break;case"at-word":this.atrule(t);break;case"{":this.emptyRule(t);break;default:this.other(t);break}this.endFile()}precheckMissedSemicolon(){}raw(t,e,n,r){let i,o,s=n.length,a="",c=!0,l,u;for(let h=0;h<s;h+=1)i=n[h],o=i[0],o==="space"&&h===s-1&&!r?c=!1:o==="comment"?(u=n[h-1]?n[h-1][0]:"empty",l=n[h+1]?n[h+1][0]:"empty",!ab[u]&&!ab[l]?a.slice(-1)===","?c=!1:a+=i[1]:c=!1):a+=i[1];if(!c){let h=n.reduce((p,f)=>p+f[1],"");t.raws[e]={raw:h,value:a}}t[e]=a}rule(t){t.pop();let e=new sb;this.init(e,t[0][2]),e.raws.between=this.spacesAndCommentsFromEnd(t),this.raw(e,"selector",t),this.current=e}spacesAndCommentsFromEnd(t){let e,n="";for(;t.length&&(e=t[t.length-1][0],!(e!=="space"&&e!=="comment"));)n=t.pop()[1]+n;return n}spacesAndCommentsFromStart(t){let e,n="";for(;t.length&&(e=t[0][0],!(e!=="space"&&e!=="comment"));)n+=t.shift()[1];return n}spacesFromEnd(t){let e,n="";for(;t.length&&(e=t[t.length-1][0],e==="space");)n=t.pop()[1]+n;return n}stringFrom(t,e){let n="";for(let r=e;r<t.length;r++)n+=t[r][1];return t.splice(e,t.length-e),n}unclosedBlock(){let t=this.current.source.start;throw this.input.error("Unclosed block",t.line,t.column)}unclosedBracket(t){throw this.input.error("Unclosed bracket",{offset:t[2]},{offset:t[2]+1})}unexpectedClose(t){throw this.input.error("Unexpected }",{offset:t[2]},{offset:t[2]+1})}unknownWord(t){throw this.input.error("Unknown word "+t[0][1],{offset:t[0][2]},{offset:t[0][2]+t[0][1].length})}unnamedAtrule(t,e){throw this.input.error("At-rule without name",{offset:e[2]},{offset:e[2]+e[1].length})}},vM=bM,wM=Zn,SM=Sa,IM=vM;Xh=ra;ra.default=ra;wM.registerParse(ra);Hu=class{constructor(t,e={}){if(this.type="warning",this.text=t,e.node&&e.node.source){let n=e.node.rangeBy(e);this.line=n.start.line,this.column=n.start.column,this.endLine=n.end.line,this.endColumn=n.end.column}for(let n in e)this[n]=e[n]}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}},R0=Hu;Hu.default=Hu;TM=R0,zu=class{get content(){return this.css}constructor(t,e,n){this.processor=t,this.messages=[],this.root=e,this.opts=n,this.css=void 0,this.map=void 0}toString(){return this.css}warn(t,e={}){e.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(e.plugin=this.lastPlugin.postcssPlugin);let n=new TM(t,e);return this.messages.push(n),n}warnings(){return this.messages.filter(t=>t.type==="warning")}},Wh=zu;zu.default=zu;lb={},C0=function(t){lb[t]||(lb[t]=!0,typeof console<"u"&&console.warn&&console.warn(t))},EM=Zn,RM=Gh,CM=E0,ZM=Xh,cb=Wh,kM=Ni,VM=ga,{isClean:Ie,my:xM}=Oi,OM=C0,NM={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},GM={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},LM={Once:!0,postcssPlugin:!0,prepare:!0},pr=0;ju={},dr=class k0{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(e,n,r){this.stringified=!1,this.processed=!1;let i;if(typeof n=="object"&&n!==null&&(n.type==="root"||n.type==="document"))i=Bu(n);else if(n instanceof k0||n instanceof cb)i=Bu(n.root),n.map&&(typeof r.map>"u"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=n.map);else{let o=ZM;r.syntax&&(o=r.syntax.parse),r.parser&&(o=r.parser),o.parse&&(o=o.parse);try{i=o(n,r)}catch(s){this.processed=!0,this.error=s}i&&!i[xM]&&EM.rebuild(i)}this.result=new cb(e,i,r),this.helpers=_t(z({},ju),{postcss:ju,result:this.result}),this.plugins=this.processor.plugins.map(o=>typeof o=="object"&&o.prepare?z(z({},o),o.prepare(this.result)):o)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,n){let r=this.result.lastPlugin;try{if(n&&n.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin)e.plugin=r.postcssPlugin,e.setMessage();else if(r.postcssVersion&&process.env.NODE_ENV!=="production"){let i=r.postcssPlugin,o=r.postcssVersion,s=this.result.processor.version,a=o.split("."),c=s.split(".");(a[0]!==c[0]||parseInt(a[1])>parseInt(c[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+s+", but "+i+" uses "+o+". Perhaps this is the source of the error below.")}}catch(i){console&&console.error&&console.error(i)}return e}prepareVisitors(){this.listeners={};let e=(n,r,i)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([n,i])};for(let n of this.plugins)if(typeof n=="object")for(let r in n){if(!GM[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${n.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!LM[r])if(typeof n[r]=="object")for(let i in n[r])i==="*"?e(n,r,n[r][i]):e(n,r+"-"+i.toLowerCase(),n[r][i]);else typeof n[r]=="function"&&e(n,r,n[r])}this.hasListener=Object.keys(this.listeners).length>0}runAsync(){return Kt(this,null,function*(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let n=this.plugins[e],r=this.runOnRoot(n);if(si(r))try{yield r}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Ie];){e[Ie]=!0;let n=[ub(e)];for(;n.length>0;){let r=this.visitTick(n);if(si(r))try{yield r}catch(i){let o=n[n.length-1].node;throw this.handleError(i,o)}}}if(this.listeners.OnceExit)for(let[n,r]of this.listeners.OnceExit){this.result.lastPlugin=n;try{if(e.type==="document"){let i=e.nodes.map(o=>r(o,this.helpers));yield Promise.all(i)}else yield r(e,this.helpers)}catch(i){throw this.handleError(i)}}}return this.processed=!0,this.stringify()})}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let n=this.result.root.nodes.map(r=>e.Once(r,this.helpers));return si(n[0])?Promise.all(n):n}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(n){throw this.handleError(n)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,n=VM;e.syntax&&(n=e.syntax.stringify),e.stringifier&&(n=e.stringifier),n.stringify&&(n=n.stringify);let r=new CM(n,this.result.root,this.result.opts).generate();return this.result.css=r[0],this.result.map=r[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 e of this.plugins){let n=this.runOnRoot(e);if(si(n))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Ie];)e[Ie]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let n of e.nodes)this.visitSync(this.listeners.OnceExit,n);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,n){return process.env.NODE_ENV!=="production"&&("from"in this.opts||OM("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(e,n)}toString(){return this.css}visitSync(e,n){for(let[r,i]of e){this.result.lastPlugin=r;let o;try{o=i(n,this.helpers)}catch(s){throw this.handleError(s,n.proxyOf)}if(n.type!=="root"&&n.type!=="document"&&!n.parent)return!0;if(si(o))throw this.getAsyncError()}}visitTick(e){let n=e[e.length-1],{node:r,visitors:i}=n;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(i.length>0&&n.visitorIndex<i.length){let[s,a]=i[n.visitorIndex];n.visitorIndex+=1,n.visitorIndex===i.length&&(n.visitors=[],n.visitorIndex=0),this.result.lastPlugin=s;try{return a(r.toProxy(),this.helpers)}catch(c){throw this.handleError(c,r)}}if(n.iterator!==0){let s=n.iterator,a;for(;a=r.nodes[r.indexes[s]];)if(r.indexes[s]+=1,!a[Ie]){a[Ie]=!0,e.push(ub(a));return}n.iterator=0,delete r.indexes[s]}let o=n.events;for(;n.eventIndex<o.length;){let s=o[n.eventIndex];if(n.eventIndex+=1,s===pr){r.nodes&&r.nodes.length&&(r[Ie]=!0,n.iterator=r.getIterator());return}else if(this.listeners[s]){n.visitors=this.listeners[s];return}}e.pop()}walkSync(e){e[Ie]=!0;let n=Z0(e);for(let r of n)if(r===pr)e.nodes&&e.each(i=>{i[Ie]||this.walkSync(i)});else{let i=this.listeners[r];if(i&&this.visitSync(i,e.toProxy()))return}}warnings(){return this.sync().warnings()}};dr.registerPostcss=t=>{ju=t};V0=dr;dr.default=dr;kM.registerLazyResult(dr);RM.registerLazyResult(dr);XM=E0,WM=Xh,UM=Wh,PM=ga,MM=C0,Qu=class{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.Zn)return this.Zn;let t,e=WM;try{t=e(this.ei,this.zn)}catch(n){this.error=n}if(this.error)throw this.error;return this.Zn=t,t}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(t,e,n){e=e.toString(),this.stringified=!1,this.ho=t,this.ei=e,this.zn=n,this.qa=void 0;let r,i=PM;this.result=new UM(this.ho,r,this.zn),this.result.css=e;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let s=new XM(i,r,this.zn,e);if(s.isMap()){let[a,c]=s.generate();a&&(this.result.css=a),c&&(this.result.map=c)}else s.clearAnnotation(),this.result.css=s.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}sync(){if(this.error)throw this.error;return this.result}then(t,e){return process.env.NODE_ENV!=="production"&&("from"in this.zn||MM("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(t,e)}toString(){return this.ei}warnings(){return[]}},FM=Qu;Qu.default=Qu;AM=Gh,JM=V0,DM=FM,YM=Ni,Ri=class{constructor(t=[]){this.version="8.5.3",this.plugins=this.normalize(t)}normalize(t){let e=[];for(let n of t)if(n.postcss===!0?n=n():n.postcss&&(n=n.postcss),typeof n=="object"&&Array.isArray(n.plugins))e=e.concat(n.plugins);else if(typeof n=="object"&&n.postcssPlugin)e.push(n);else if(typeof n=="function")e.push(n);else if(typeof n=="object"&&(n.parse||n.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(n+" is not a PostCSS plugin");return e}process(t,e={}){return!this.plugins.length&&!e.parser&&!e.stringifier&&!e.syntax?new DM(this,t,e):new JM(this,t,e)}use(t){return this.plugins=this.plugins.concat(this.normalize([t])),this}},KM=Ri;Ri.default=Ri;YM.registerProcessor(Ri);AM.registerProcessor(Ri);x0=Nh,O0=va,_M=Zn,HM=Vh,N0=wa,G0=Gh,zM=BP,BM=Sa,jM=V0,QM=b0,$M=ba,qM=Xh,Uh=KM,tF=Wh,L0=Ni,X0=Lh,eF=ga,nF=R0;pt.plugin=function(t,e){let n=!1;function r(...o){console&&console.warn&&!n&&(n=!0,console.warn(t+`: postcss.plugin was deprecated. Migration guide:
335
335
  https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(t+`: \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357:
336
- https://www.w3ctech.com/topic/2226`));let s=e(...o);return s.postcssPlugin=t,s.postcssVersion=new Nh().version,s}let i;return Object.defineProperty(r,"postcss",{get(){return i||(i=r()),i}}),r.process=function(o,s,a){return pt([r(a)]).process(o,s)},r};pt.stringify=LM;pt.parse=OM;pt.fromJSON=ZM;pt.list=xM;pt.comment=t=>new v0(t);pt.atRule=t=>new b0(t);pt.decl=t=>new w0(t);pt.rule=t=>new T0(t);pt.root=t=>new I0(t);pt.document=t=>new S0(t);pt.CssSyntaxError=CM;pt.Declaration=w0;pt.Container=RM;pt.Processor=Nh;pt.Document=S0;pt.Comment=v0;pt.Warning=XM;pt.AtRule=b0;pt.Result=GM;pt.Input=kM;pt.Rule=T0;pt.Root=I0;pt.Node=NM;VM.registerPostcss(pt);pt.default=pt;_u=class t{constructor(...e){ne(this,"parentElement",null),ne(this,"parentNode",null),ne(this,"ownerDocument"),ne(this,"firstChild",null),ne(this,"lastChild",null),ne(this,"previousSibling",null),ne(this,"nextSibling",null),ne(this,"ELEMENT_NODE",1),ne(this,"TEXT_NODE",3),ne(this,"nodeType"),ne(this,"nodeName"),ne(this,"RRNodeType")}get childNodes(){let e=[],n=this.firstChild;for(;n;)e.push(n),n=n.nextSibling;return e}contains(e){if(e instanceof t){if(e.ownerDocument!==this.ownerDocument)return!1;if(e===this)return!0}else return!1;for(;e.parentNode;){if(e.parentNode===this)return!0;e=e.parentNode}return!1}appendChild(e){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(e,n){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}},qg={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},tb={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},vs={},WM=()=>!!globalThis.Zone;Hc={};zc={};q={childNodes:UM,parentNode:PM,parentElement:MM,textContent:FM,contains:AM,getRootNode:JM,host:DM,styleSheets:YM,shadowRoot:KM,querySelector:_M,querySelectorAll:HM,mutationObserver:R0,patch:Zn};$n=`Please stop import mirror directly. Instead of that,\r
336
+ https://www.w3ctech.com/topic/2226`));let s=e(...o);return s.postcssPlugin=t,s.postcssVersion=new Uh().version,s}let i;return Object.defineProperty(r,"postcss",{get(){return i||(i=r()),i}}),r.process=function(o,s,a){return pt([r(a)]).process(o,s)},r};pt.stringify=eF;pt.parse=qM;pt.fromJSON=zM;pt.list=QM;pt.comment=t=>new O0(t);pt.atRule=t=>new x0(t);pt.decl=t=>new N0(t);pt.rule=t=>new X0(t);pt.root=t=>new L0(t);pt.document=t=>new G0(t);pt.CssSyntaxError=HM;pt.Declaration=N0;pt.Container=_M;pt.Processor=Uh;pt.Document=G0;pt.Comment=O0;pt.Warning=nF;pt.AtRule=x0;pt.Result=tF;pt.Input=BM;pt.Rule=X0;pt.Root=L0;pt.Node=$M;jM.registerPostcss(pt);pt.default=pt;$u=class t{constructor(...e){ie(this,"parentElement",null),ie(this,"parentNode",null),ie(this,"ownerDocument"),ie(this,"firstChild",null),ie(this,"lastChild",null),ie(this,"previousSibling",null),ie(this,"nextSibling",null),ie(this,"ELEMENT_NODE",1),ie(this,"TEXT_NODE",3),ie(this,"nodeType"),ie(this,"nodeName"),ie(this,"RRNodeType")}get childNodes(){let e=[],n=this.firstChild;for(;n;)e.push(n),n=n.nextSibling;return e}contains(e){if(e instanceof t){if(e.ownerDocument!==this.ownerDocument)return!1;if(e===this)return!0}else return!1;for(;e.parentNode;){if(e.parentNode===this)return!0;e=e.parentNode}return!1}appendChild(e){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(e,n){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}},hb={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},pb={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Is={},rF=()=>!!globalThis.Zone;qc={};tu={};q={childNodes:iF,parentNode:oF,parentElement:sF,textContent:aF,contains:lF,getRootNode:cF,host:uF,styleSheets:hF,shadowRoot:pF,querySelector:dF,querySelectorAll:fF,mutationObserver:U0,patch:kn};qn=`Please stop import mirror directly. Instead of that,\r
337
337
  now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
338
- or you can use record.mirror to access the mirror instance during recording.`,eb={map:{},getId(){return console.error($n),-1},getNode(){return console.error($n),null},removeNodeFromMap(){console.error($n)},has(){return console.error($n),!1},reset(){console.error($n)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(eb=new Proxy(eb,{get(t,e,n){return e==="map"&&console.error($n),Reflect.get(t,e,n)}}));ea=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(ea=()=>new Date().getTime());zM=t=>{try{if(t instanceof HTMLElement)return t.tagName==="CANVAS"}catch(e){return!1}return!1};Bu=class{constructor(){k(this,"id",1),k(this,"styleIDMap",new WeakMap),k(this,"idStyleMap",new Map)}getId(e){var n;return(n=this.styleIDMap.get(e))!=null?n:-1}has(e){return this.styleIDMap.has(e)}add(e,n){if(this.has(e))return this.getId(e);let r;return n===void 0?r=this.id++:r=n,this.styleIDMap.set(e,r),this.idStyleMap.set(r,e),r}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}};rt=(t=>(t[t.DomContentLoaded=0]="DomContentLoaded",t[t.Load=1]="Load",t[t.FullSnapshot=2]="FullSnapshot",t[t.IncrementalSnapshot=3]="IncrementalSnapshot",t[t.Meta=4]="Meta",t[t.Custom=5]="Custom",t[t.Plugin=6]="Plugin",t))(rt||{}),et=(t=>(t[t.Mutation=0]="Mutation",t[t.MouseMove=1]="MouseMove",t[t.MouseInteraction=2]="MouseInteraction",t[t.Scroll=3]="Scroll",t[t.ViewportResize=4]="ViewportResize",t[t.Input=5]="Input",t[t.TouchMove=6]="TouchMove",t[t.MediaInteraction=7]="MediaInteraction",t[t.StyleSheetRule=8]="StyleSheetRule",t[t.CanvasMutation=9]="CanvasMutation",t[t.Font=10]="Font",t[t.Log=11]="Log",t[t.Drag=12]="Drag",t[t.StyleDeclaration=13]="StyleDeclaration",t[t.Selection=14]="Selection",t[t.AdoptedStyleSheet=15]="AdoptedStyleSheet",t[t.CustomElement=16]="CustomElement",t))(et||{}),Dt=(t=>(t[t.MouseUp=0]="MouseUp",t[t.MouseDown=1]="MouseDown",t[t.Click=2]="Click",t[t.ContextMenu=3]="ContextMenu",t[t.DblClick=4]="DblClick",t[t.Focus=5]="Focus",t[t.Blur=6]="Blur",t[t.TouchStart=7]="TouchStart",t[t.TouchMove_Departed=8]="TouchMove_Departed",t[t.TouchEnd=9]="TouchEnd",t[t.TouchCancel=10]="TouchCancel",t))(Dt||{}),_e=(t=>(t[t.Mouse=0]="Mouse",t[t.Pen=1]="Pen",t[t.Touch=2]="Touch",t))(_e||{}),dr=(t=>(t[t["2D"]=0]="2D",t[t.WebGL=1]="WebGL",t[t.WebGL2=2]="WebGL2",t))(dr||{}),qn=(t=>(t[t.Play=0]="Play",t[t.Pause=1]="Pause",t[t.Seeked=2]="Seeked",t[t.VolumeChange=3]="VolumeChange",t[t.RateChange=4]="RateChange",t))(qn||{}),X0=(t=>(t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment",t))(X0||{});ju=class{constructor(){k(this,"length",0),k(this,"head",null),k(this,"tail",null)}get(e){if(e>=this.length)throw new Error("Position outside of list range");let n=this.head;for(let r=0;r<e;r++)n=(n==null?void 0:n.next)||null;return n}addNode(e){let n={value:e,previous:null,next:null};if(e.__ln=n,e.previousSibling&&nb(e.previousSibling)){let r=e.previousSibling.__ln.next;n.next=r,n.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=n,r&&(r.previous=n)}else if(e.nextSibling&&nb(e.nextSibling)&&e.nextSibling.__ln.previous){let r=e.nextSibling.__ln.previous;n.previous=r,n.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=n,r&&(r.next=n)}else this.head&&(this.head.previous=n),n.next=this.head,this.head=n;n.next===null&&(this.tail=n),this.length++}removeNode(e){let n=e.__ln;this.head&&(n.previous?(n.previous.next=n.next,n.next?n.next.previous=n.previous:this.tail=n.previous):(this.head=n.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}},rb=(t,e)=>`${t}@${e}`,Qu=class{constructor(){k(this,"frozen",!1),k(this,"locked",!1),k(this,"texts",[]),k(this,"attributes",[]),k(this,"attributeMap",new WeakMap),k(this,"removes",[]),k(this,"mapRemoves",[]),k(this,"movedMap",{}),k(this,"addedSet",new Set),k(this,"movedSet",new Set),k(this,"droppedSet",new Set),k(this,"removesSubTreeCache",new Set),k(this,"mutationCb"),k(this,"blockClass"),k(this,"blockSelector"),k(this,"maskTextClass"),k(this,"maskTextSelector"),k(this,"inlineStylesheet"),k(this,"maskInputOptions"),k(this,"maskTextFn"),k(this,"maskInputFn"),k(this,"keepIframeSrcFn"),k(this,"recordCanvas"),k(this,"inlineImages"),k(this,"inlineVideos"),k(this,"privacySetting"),k(this,"slimDOMOptions"),k(this,"dataURLOptions"),k(this,"doc"),k(this,"mirror"),k(this,"iframeManager"),k(this,"stylesheetManager"),k(this,"shadowDomManager"),k(this,"canvasManager"),k(this,"processedNodeManager"),k(this,"unattachedDoc"),k(this,"processMutations",e=>{e.forEach(this.processMutation),this.emit()}),k(this,"emit",()=>{if(this.frozen||this.locked)return;let e=[],n=new Set,r=new ju,i=c=>{let l=c,u=mi;for(;u===mi;)l=l&&l.nextSibling,u=l&&this.mirror.getId(l);return u},o=c=>{let l=q.parentNode(c);if(!l||!L0(c))return;let u=!1;if(c.nodeType===Node.TEXT_NODE){let m=l.tagName;if(m==="TEXTAREA")return;m==="STYLE"&&this.addedSet.has(l)&&(u=!0)}let h=ci(l)?this.mirror.getId(G0(c)):this.mirror.getId(l),p=i(c);if(h===-1||p===-1)return r.addNode(c);let f=er(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:m=>{N0(m,this.mirror)&&this.iframeManager.addIframe(m),O0(m,this.mirror)&&this.stylesheetManager.trackLinkElement(m),zu(c)&&this.shadowDomManager.addShadowRoot(q.shadowRoot(c),this.doc)},onIframeLoad:(m,d)=>{this.iframeManager.attachIframe(m,d),this.shadowDomManager.observeAttachShadow(m)},onStylesheetLoad:(m,d)=>{this.stylesheetManager.attachLinkElement(m,d)},cssCaptured:u});f&&(e.push({parentId:h,nextId:p,node:f}),n.add(f.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(let c of this.movedSet)ib(this.removesSubTreeCache,c)&&!this.movedSet.has(q.parentNode(c))||o(c);for(let c of this.addedSet)!ob(this.droppedSet,c)&&!ib(this.removesSubTreeCache,c)||ob(this.movedSet,c)?o(c):this.droppedSet.add(c);let s=null;for(;r.length;){let c=null;if(s){let l=this.mirror.getId(q.parentNode(s.value)),u=i(s.value);l!==-1&&u!==-1&&(c=s)}if(!c){let l=r.tail;for(;l;){let u=l;if(l=l.previous,u){let h=this.mirror.getId(q.parentNode(u.value));if(i(u.value)===-1)continue;if(h!==-1){c=u;break}else{let p=u.value,f=q.parentNode(p);if(f&&f.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let m=q.host(f);if(this.mirror.getId(m)!==-1){c=u;break}}}}}}if(!c){for(;r.head;)r.removeNode(r.head.value);break}s=c.previous,r.removeNode(c.value),o(c.value)}let a={texts:this.texts.map(c=>{var l,u;let h=c.node,p=q.parentNode(h);p&&p.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(p);let f=c.value,m=this.privacySetting==="strict",d=this.privacySetting==="default"&&$b(f),v=(u=(l=c.node)==null?void 0:l.parentElement)==null?void 0:u.getAttribute("data-hl-record");return(m||d)&&!v&&f&&(f=uh(f)),{id:this.mirror.getId(h),value:f}}).filter(c=>!n.has(c.id)).filter(c=>this.mirror.has(c.id)),attributes:this.attributes.map(c=>{let{attributes:l}=c;if(typeof l.style=="string"){let u=JSON.stringify(c.styleDiff),h=JSON.stringify(c.ho);u.length<l.style.length&&(u+h).split("var(").length===l.style.split("var(").length&&(l.style=c.styleDiff)}return{id:this.mirror.getId(c.node),attributes:l}}).filter(c=>!n.has(c.id)).filter(c=>this.mirror.has(c.id)),removes:this.removes,adds:e};!a.texts.length&&!a.attributes.length&&!a.removes.length&&!a.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(a))}),k(this,"genTextAreaValueMutation",e=>{let n=this.attributeMap.get(e);n||(n={node:e,attributes:{},styleDiff:{},ho:{}},this.attributes.push(n),this.attributeMap.set(e,n));let r=Array.from(q.childNodes(e),i=>q.textContent(i)||"").join("");n.attributes.value=Js({overwriteRecord:null,element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:Ds(e),value:r,maskInputFn:this.maskInputFn})}),k(this,"processMutation",e=>{if(!Bc(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{let n=q.textContent(e.target);!Nt(e.target,this.blockClass,this.blockSelector,!1)&&n!==e.oldValue&&this.texts.push({value:rv(e.target,this.maskTextClass,this.maskTextSelector,!0)&&n?this.maskTextFn?this.maskTextFn(n,V0(e.target)):n.replace(/[\S]/g,"*"):n,node:e.target});break}case"attributes":{let n=e.target,r=e.attributeName,i=e.target.getAttribute(r);if(r==="value"){let s=Ds(n);i=Js({element:n,maskInputOptions:this.maskInputOptions,tagName:n.tagName,type:s,value:i,overwriteRecord:n.getAttribute("data-hl-record"),maskInputFn:this.maskInputFn})}if(Nt(e.target,this.blockClass,this.blockSelector,!1)||i===e.oldValue)return;let o=this.attributeMap.get(e.target);if(n.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(i))if(!n.contentDocument)r="rr_src";else return;if(o||(o={node:e.target,attributes:{},styleDiff:{},ho:{}},this.attributes.push(o),this.attributeMap.set(e.target,o)),r==="type"&&n.tagName==="INPUT"&&(e.oldValue||"").toLowerCase()==="password"&&n.setAttribute("data-rr-is-password","true"),!nv(n.tagName,r)){if(e.target.tagName==="INPUT"){let s=e.target;if(s.type==="password"){o.attributes.value="*".repeat(s.value.length);break}}if(o.attributes[r]=ev(this.doc,sr(n.tagName),sr(r),i),r==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(a){this.unattachedDoc=this.doc}let s=this.unattachedDoc.createElement("span");e.oldValue&&s.setAttribute("style",e.oldValue);for(let a of Array.from(n.style)){let c=n.style.getPropertyValue(a),l=n.style.getPropertyPriority(a);c!==s.style.getPropertyValue(a)||l!==s.style.getPropertyPriority(a)?l===""?o.styleDiff[a]=c:o.styleDiff[a]=[c,l]:o.ho[a]=[c,l]}for(let a of Array.from(s.style))n.style.getPropertyValue(a)===""&&(o.styleDiff[a]=!1)}else r==="open"&&n.tagName==="DIALOG"&&(n.matches("dialog:modal")?o.attributes.rr_open_mode="modal":o.attributes.rr_open_mode="non-modal")}break}case"childList":{if(Nt(e.target,this.blockClass,this.blockSelector,!0))return;if(e.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(e.target);return}e.addedNodes.forEach(n=>this.genAdds(n,e.target)),e.removedNodes.forEach(n=>{let r=this.mirror.getId(n),i=ci(e.target)?this.mirror.getId(q.host(e.target)):this.mirror.getId(e.target);Nt(e.target,this.blockClass,this.blockSelector,!1)||Bc(n,this.mirror,this.slimDOMOptions)||!BM(n,this.mirror)||(this.addedSet.has(n)?($u(this.addedSet,n),this.droppedSet.add(n)):this.addedSet.has(e.target)&&r===-1||x0(e.target,this.mirror)||(this.movedSet.has(n)&&this.movedMap[rb(r,i)]?$u(this.movedSet,n):(this.removes.push({parentId:i,id:r,isShadow:ci(e.target)&&ui(e.target)?!0:void 0}),qM(n,this.removesSubTreeCache))),this.mapRemoves.push(n))});break}}}),k(this,"genAdds",(e,n)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(Bc(e,this.mirror,this.slimDOMOptions))return;this.movedSet.add(e);let r=null;n&&this.mirror.hasNode(n)&&(r=this.mirror.getId(n)),r&&r!==-1&&(this.movedMap[rb(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);Nt(e,this.blockClass,this.blockSelector,!1)||(q.childNodes(e).forEach(r=>this.genAdds(r)),zu(e)&&q.childNodes(q.shadowRoot(e)).forEach(r=>{this.processedNodeManager.add(r,this),this.genAdds(r,e)}))}})}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","inlineVideos","privacySetting","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(n=>{this[n]=e[n]})}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()}};nt=t=>hi?(...e)=>{try{return t(...e)}catch(n){if(hi&&hi(n)===!0)return;throw n}}:t,Tn=[];sF=["INPUT","TEXTAREA","SELECT"],sb=new WeakMap;ra=class{constructor(e){k(this,"iframeIdToRemoteIdMap",new WeakMap),k(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,n,r,i){let o=r||this.getIdToRemoteIdMap(e),s=i||this.getRemoteIdToIdMap(e),a=o.get(n);return a||(a=this.generateIdFn(),o.set(n,a),s.set(a,n)),a}getIds(e,n){let r=this.getIdToRemoteIdMap(e),i=this.getRemoteIdToIdMap(e);return n.map(o=>this.getId(e,o,r,i))}getRemoteId(e,n,r){let i=r||this.getRemoteIdToIdMap(e);return typeof n!="number"?n:i.get(n)||-1}getRemoteIds(e,n){let r=this.getRemoteIdToIdMap(e);return n.map(i=>this.getRemoteId(e,i,r))}reset(e){if(!e){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let n=this.iframeIdToRemoteIdMap.get(e);return n||(n=new Map,this.iframeIdToRemoteIdMap.set(e,n)),n}getRemoteIdToIdMap(e){let n=this.iframeRemoteIdToIdMap.get(e);return n||(n=new Map,this.iframeRemoteIdToIdMap.set(e,n)),n}},qu=class{constructor(e){k(this,"iframes",new WeakMap),k(this,"crossOriginIframeMap",new WeakMap),k(this,"crossOriginIframeMirror",new ra(tv)),k(this,"crossOriginIframeStyleMirror"),k(this,"crossOriginIframeRootIdMap",new WeakMap),k(this,"mirror"),k(this,"mutationCb"),k(this,"wrappedEmit"),k(this,"loadListener"),k(this,"stylesheetManager"),k(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new ra(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,n){var r,i;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:n}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&((r=e.contentWindow)==null||r.addEventListener("message",this.handleMessage.bind(this))),(i=this.loadListener)==null||i.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}handleMessage(e){let n=e;if(n.data.type!=="rrweb"||n.origin!==n.data.origin)return;let r=e.source;if(!r)return;let i=this.crossOriginIframeMap.get(r);if(!i)return;let o=this.transformCrossOriginEvent(i,n.data.event);o&&this.wrappedEmit(o,n.data.isCheckout)}transformCrossOriginEvent(e,n){var r;switch(n.type){case rt.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(n.data.node,e);let i=n.data.node.id;return this.crossOriginIframeRootIdMap.set(e,i),this.patchRootIdOnNode(n.data.node,i),{timestamp:n.timestamp,type:rt.IncrementalSnapshot,data:{source:et.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:n.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case rt.Meta:case rt.Load:case rt.DomContentLoaded:return!1;case rt.Plugin:return n;case rt.Custom:return this.replaceIds(n.data.payload,e,["id","parentId","previousId","nextId"]),n;case rt.IncrementalSnapshot:switch(n.data.source){case et.Mutation:return n.data.adds.forEach(i=>{this.replaceIds(i,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(i.node,e);let o=this.crossOriginIframeRootIdMap.get(e);o&&this.patchRootIdOnNode(i.node,o)}),n.data.removes.forEach(i=>{this.replaceIds(i,e,["parentId","id"])}),n.data.attributes.forEach(i=>{this.replaceIds(i,e,["id"])}),n.data.texts.forEach(i=>{this.replaceIds(i,e,["id"])}),n;case et.Drag:case et.TouchMove:case et.MouseMove:return n.data.positions.forEach(i=>{this.replaceIds(i,e,["id"])}),n;case et.ViewportResize:return!1;case et.MediaInteraction:case et.MouseInteraction:case et.Scroll:case et.CanvasMutation:case et.Input:return this.replaceIds(n.data,e,["id"]),n;case et.StyleSheetRule:case et.StyleDeclaration:return this.replaceIds(n.data,e,["id"]),this.replaceStyleIds(n.data,e,["styleId"]),n;case et.Font:return n;case et.Selection:return n.data.ranges.forEach(i=>{this.replaceIds(i,e,["start","end"])}),n;case et.AdoptedStyleSheet:return this.replaceIds(n.data,e,["id"]),this.replaceStyleIds(n.data,e,["styleIds"]),(r=n.data.styles)==null||r.forEach(i=>{this.replaceStyleIds(i,e,["styleId"])}),n}}return!1}replace(e,n,r,i){for(let o of i)!Array.isArray(n[o])&&typeof n[o]!="number"||(Array.isArray(n[o])?n[o]=e.getIds(r,n[o]):n[o]=e.getId(r,n[o]));return n}replaceIds(e,n,r){return this.replace(this.crossOriginIframeMirror,e,n,r)}replaceStyleIds(e,n,r){return this.replace(this.crossOriginIframeStyleMirror,e,n,r)}replaceIdOnNode(e,n){this.replaceIds(e,n,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(r=>{this.replaceIdOnNode(r,n)})}patchRootIdOnNode(e,n){e.type!==X0.Document&&!e.rootId&&(e.rootId=n),"childNodes"in e&&e.childNodes.forEach(r=>{this.patchRootIdOnNode(r,n)})}},th=class{constructor(e){k(this,"shadowDoms",new WeakSet),k(this,"mutationCb"),k(this,"scrollCb"),k(this,"bypassOptions"),k(this,"mirror"),k(this,"restoreHandlers",[]),this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,n){if(!ui(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);let r=U0(Kt(z({},this.bypassOptions),{doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(P0(Kt(z({},this.bypassOptions),{scrollCb:this.scrollCb,doc:e,mirror:this.mirror}))),setTimeout(()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(q.host(e))),this.restoreHandlers.push(M0({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))},0)}observeAttachShadow(e){!e.contentWindow||!e.contentDocument||this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}patchAttachShadow(e,n){let r=this;this.restoreHandlers.push(Zn(e.prototype,"attachShadow",function(i){return function(o){let s=i.call(this,o),a=q.shadowRoot(this);return a&&L0(this)&&r.addShadowRoot(a,n),s}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch(n){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}},nr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",yF=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(oi=0;oi<nr.length;oi++)yF[nr.charCodeAt(oi)]=oi;gF=function(t){var e=new Uint8Array(t),n,r=e.length,i="";for(n=0;n<r;n+=3)i+=nr[e[n]>>2],i+=nr[(e[n]&3)<<4|e[n+1]>>4],i+=nr[(e[n+1]&15)<<2|e[n+2]>>6],i+=nr[e[n+2]&63];return r%3===2?i=i.substring(0,i.length-1)+"=":r%3===1&&(i=i.substring(0,i.length-2)+"=="),i},ab=new Map;F0=(t,e,n)=>{if(!t||!(J0(t,e)||typeof t=="object"))return;let r=t.constructor.name,i=bF(n,r),o=i.indexOf(t);return o===-1&&(o=i.length,i.push(t)),o};A0=(t,e,n)=>t.map(r=>Os(r,e,n)),J0=(t,e)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(n=>typeof e[n]=="function").find(n=>t instanceof e[n]);D0="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgK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VzOiAidHJhbnNwYXJlbnQiIH0pOwogICAgICB9CiAgICAgIGlmIChsYXN0QmxvYk1hcC5nZXQoaWQpID09PSBiYXNlNjQpIHsKICAgICAgICBkZWJ1ZygiW2hpZ2hsaWdodC13b3JrZXJdIGNhbnZhcyBiaXRtYXAgaXMgdW5jaGFuZ2VkIiwgewogICAgICAgICAgaWQsCiAgICAgICAgICBiYXNlNjQKICAgICAgICB9KTsKICAgICAgfQogICAgICBjb25zdCBtc2cgPSB7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0LAogICAgICAgIGR4LAogICAgICAgIGR5LAogICAgICAgIGR3LAogICAgICAgIGRoCiAgICAgIH07CiAgICAgIGRlYnVnKCJbaGlnaGxpZ2h0LXdvcmtlcl0gY2FudmFzIGJpdG1hcCBwcm9jZXNzZWQiLCBtc2cpOwogICAgICB3b3JrZXIucG9zdE1lc3NhZ2UobXNnKTsKICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgfSBlbHNlIHsKICAgICAgZGVidWcoIltoaWdobGlnaHQtd29ya2VyXSBubyBvZmZzY3JlZW5jYW52YXMgc3VwcG9ydCIsIHsKICAgICAgICBpZDogZS5kYXRhLmlkCiAgICAgIH0pOwogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCwgc3RhdHVzOiAidW5zdXBwb3J0ZWQiIH0pOwogICAgfQogIH07Cn0pKCk7Ci8vIyBzb3VyY2VNYXBwaW5nVVJMPWltYWdlLWJpdG1hcC1kYXRhLXVybC13b3JrZXItRHd0SzhBMHouanMubWFwCg==",IF=t=>Uint8Array.from(atob(t),e=>e.charCodeAt(0)),ub=typeof self<"u"&&self.Blob&&new Blob([IF(D0)],{type:"text/javascript;charset=utf-8"});eh=class{constructor(e){k(this,"pendingCanvasMutations",new Map),k(this,"rafStamps",{latestId:0,invokeId:null}),k(this,"mirror"),k(this,"logger"),k(this,"worker"),k(this,"snapshotInProgressMap",new Map),k(this,"lastSnapshotTime",new Map),k(this,"options"),k(this,"mutationCb"),k(this,"resetObservers"),k(this,"frozen",!1),k(this,"locked",!1),k(this,"processMutation",(h,p)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(h)||this.pendingCanvasMutations.set(h,[]),this.pendingCanvasMutations.get(h).push(p)});let{sampling:n,win:r,blockClass:i,blockSelector:o,recordCanvas:s,recordLocalVideos:a,recordRemoteVideos:c,initialSnapshotDelay:l,dataURLOptions:u}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,this.logger=e.logger,this.worker=new TF,this.worker.onmessage=h=>{let{id:p}=h.data;if(this.snapshotInProgressMap.set(p,!1),!("base64"in h.data)){this.debug(null,"canvas worker received empty message",{id:p,data:h.data,status:h.data.status});return}let{base64:f,type:m,dx:d,dy:v,dw:g,dh:w}=h.data,R={id:p,type:dr["2D"],commands:[{property:"clearRect",args:[d,v,g,w]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:f}],type:m}]},d,v,g,w]}]};this.debug(null,"canvas worker recording mutation",R),this.mutationCb(R)},this.options=e,s&&n==="all"?(this.debug(null,"initializing canvas mutation observer",{sampling:n}),this.initCanvasMutationObserver(r,i,o)):s&&typeof n=="number"&&(this.debug(null,"initializing canvas fps observer",{sampling:n}),this.initCanvasFPSObserver(a,c,n,r,i,o,{initialSnapshotDelay:l,dataURLOptions:u},e.resizeFactor,e.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(e,...n){if(!this.logger)return;let r=this.mirror.getId(e),i="[highlight-canvas-manager]";e&&(i=`[highlight-canvas] [id:${r}]`,e.tagName.toLowerCase()==="canvas"&&(i+=` [ctx:${e.__context}]`)),this.logger.debug(i,e,...n)}snapshot(e){return Yt(this,null,function*(){var n;let r=this.mirror.getId(e);if(this.snapshotInProgressMap.get(r)){this.debug(e,"snapshotting already in progress for",r);return}let i=1e3/(typeof this.options.samplingManual=="number"?this.options.samplingManual:1),o=this.lastSnapshotTime.get(r);if(!(o&&new Date().getTime()-o<i)){if(this.debug(e,"starting snapshotting"),e.width===0||e.height===0){this.debug(e,"not yet ready",{width:e.width,height:e.height});return}this.lastSnapshotTime.set(r,new Date().getTime()),this.snapshotInProgressMap.set(r,!0);try{if(this.options.clearWebGLBuffer!==!1&&["webgl","webgl2"].includes(e.__context)){let u=e.getContext(e.__context);((n=u==null?void 0:u.getContextAttributes())==null?void 0:n.preserveDrawingBuffer)===!1&&(u.clear(u.COLOR_BUFFER_BIT),this.debug(e,"cleared webgl canvas to load it into memory",{attributes:u==null?void 0:u.getContextAttributes()}))}if(e.width===0||e.height===0){this.debug(e,"not yet ready",{width:e.width,height:e.height});return}let s=this.options.resizeFactor||1;if(this.options.maxSnapshotDimension){let u=Math.max(e.width,e.height);s=Math.min(s,this.options.maxSnapshotDimension/u)}let a=e.width*s,c=e.height*s,l=yield createImageBitmap(e,{resizeWidth:a,resizeHeight:c});this.debug(e,"created image bitmap",{width:l.width,height:l.height}),this.worker.postMessage({id:r,bitmap:l,width:a,height:c,dx:0,dy:0,dw:e.width,dh:e.height,dataURLOptions:this.options.dataURLOptions,logDebug:!!this.logger},[l]),this.debug(e,"sent message")}catch(s){this.debug(e,"failed to snapshot",s)}finally{this.snapshotInProgressMap.set(r,!1)}}})}initCanvasFPSObserver(e,n,r,i,o,s,a,c,l){let u=lb(i,o,s,!0),h=1e3/r,p=0,f,m=new Map,d=(R,E)=>{let T=[];R.querySelectorAll(E).forEach(U=>T.push(U));let V=document.createNodeIterator(R,Node.ELEMENT_NODE),N;for(;N=V.nextNode();)N!=null&&N.shadowRoot&&T.push(...d(N.shadowRoot,E));return T},v=R=>{let E=[];return d(i.document,"canvas").forEach(T=>{if(!Nt(T,o,s,!0)){this.debug(T,"discovered canvas"),E.push(T);let V=this.mirror.getId(T);m.has(V)||m.set(V,R)}}),E},g=R=>{let E=[];return(e||n)&&d(i.document,"video").forEach(T=>{if(!(!n&&T.src!==""&&T.src.indexOf("blob:")===-1)&&!(!e&&(T.src===""||T.src.indexOf("blob:")!==-1))&&!Nt(T,o,s,!0)){E.push(T);let V=this.mirror.getId(T);m.has(V)||m.set(V,R)}}),E},w=R=>Yt(this,null,function*(){if(p&&R-p<h){f=requestAnimationFrame(w);return}p=R;let E=V=>{let N=this.mirror.getId(V),U=m.get(N),C=!a.initialSnapshotDelay||R-U>a.initialSnapshotDelay;return this.debug(V,{delay:a.initialSnapshotDelay,delta:R-U,hadLoadingTime:C}),C},T=[];T.push(...v(R).filter(E).map(V=>this.snapshot(V))),T.push(...g(R).filter(E).map(V=>Yt(this,null,function*(){this.debug(V,"starting video snapshotting");let N=this.mirror.getId(V);if(this.snapshotInProgressMap.get(N)){this.debug(V,"video snapshotting already in progress for",N);return}this.snapshotInProgressMap.set(N,!0);try{let{width:U,height:C}=V.getBoundingClientRect(),{actualWidth:x,actualHeight:P}={actualWidth:V.videoWidth,actualHeight:V.videoHeight},st=Math.max(x,P);if(st===0){this.debug(V,"not yet ready",{width:V.width,height:V.height,actualWidth:x,actualHeight:P,boxWidth:U,boxHeight:C});return}let lt=c||1;l&&(lt=Math.min(lt,l/st));let y=x*lt,b=P*lt,Z=yield createImageBitmap(V,{resizeWidth:y,resizeHeight:b}),D=Math.max(U,C)/st,M=x*D,O=P*D,it=(U-M)/2,ct=(C-O)/2;this.debug(V,"created image bitmap",{actualWidth:x,actualHeight:P,boxWidth:U,boxHeight:C,outputWidth:M,outputHeight:O,resizeWidth:y,resizeHeight:b,scale:lt,outputScale:D,offsetX:it,offsetY:ct}),this.worker.postMessage({id:N,bitmap:Z,width:y,height:b,dx:it,dy:ct,dw:M,dh:O,dataURLOptions:a.dataURLOptions,logDebug:!!this.logger},[Z]),this.debug(V,"send message")}catch(U){this.debug(V,"failed to snapshot",U)}finally{this.snapshotInProgressMap.set(N,!1)}}))),yield Promise.all(T).catch(console.error),f=requestAnimationFrame(w)});f=requestAnimationFrame(w),this.resetObservers=()=>{u(),f&&cancelAnimationFrame(f)}}initCanvasMutationObserver(e,n,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();let i=lb(e,n,r,!1),o=vF(this.processMutation.bind(this),e,n,r),s=SF(this.processMutation.bind(this),e,n,r);this.resetObservers=()=>{i(),o(),s()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){let e=n=>{this.rafStamps.latestId=n,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,n)=>{let r=this.mirror.getId(n);this.flushPendingCanvasMutationFor(n,r)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,n){if(this.frozen||this.locked)return;let r=this.pendingCanvasMutations.get(e);if(!r||n===-1)return;let i=r.map(s=>or(s,["type"])),{type:o}=r[0];this.mutationCb({id:n,type:o,commands:i}),this.pendingCanvasMutations.delete(e)}},nh=class{constructor(e){k(this,"trackedLinkElements",new WeakSet),k(this,"mutationCb"),k(this,"adoptedStyleSheetCb"),k(this,"styleMirror",new Bu),this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,n){"_cssText"in n.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:n.id,attributes:n.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,n){if(e.length===0)return;let r={id:n,styleIds:[]},i=[];for(let o of e){let s;this.styleMirror.has(o)?s=this.styleMirror.getId(o):(s=this.styleMirror.add(o),i.push({styleId:s,rules:Array.from(o.rules||CSSRule,(a,c)=>({rule:jb(a,o.href),index:c}))})),r.styleIds.push(s)}i.length>0&&(r.styles=i),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}},rh=class{constructor(){k(this,"nodeMap",new WeakMap),k(this,"active",!1)}inOtherBuffer(e,n){let r=this.nodeMap.get(e);return r&&Array.from(r).some(i=>i!==n)}add(e,n){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(n))}destroy(){}},ia=!1;try{if(Array.from([1],t=>t*2)[0]!==2){let t=document.createElement("iframe");document.body.appendChild(t),Array.from=((hg=t.contentWindow)==null?void 0:hg.Array.from)||Array.from,document.body.removeChild(t)}}catch(t){console.debug("Unable to override Array.from",t)}le=CW();Le.addCustomEvent=(t,e)=>{ia&&vt({type:rt.Custom,data:{tag:t,payload:e}})};Le.freezePage=()=>{Tn.forEach(t=>t.freeze())};Le.takeFullSnapshot=t=>{if(!ia)throw new Error("please take full snapshot after start recording");Gs(t)};Le.snapshotCanvas=t=>Yt(void 0,null,function*(){if(!pi)throw new Error("canvas manager is not initialized");yield pi.snapshot(t)});Le.mirror=le;(function(t){t[t.NotStarted=0]="NotStarted",t[t.Running=1]="Running",t[t.Stopped=2]="Stopped"})(hb||(hb={}));({addCustomEvent:pb}=Le),EF=t=>{t(window.location.href);let e=history.pushState;history.pushState=(o=>function(){var s=o.apply(this,arguments);return window.dispatchEvent(new Event("pushstate")),window.dispatchEvent(new Event("locationchange")),s})(history.pushState);let n=history.replaceState;history.replaceState=(o=>function(){var s=o.apply(this,arguments);return window.dispatchEvent(new Event("replacestate")),window.dispatchEvent(new Event("locationchange")),s})(history.replaceState);let r=()=>{window.dispatchEvent(new Event("locationchange"))};window.addEventListener("popstate",r);let i=function(){t(window.location.href)};return window.addEventListener("locationchange",i),()=>{window.removeEventListener("popstate",r),window.removeEventListener("locationchange",i),history.pushState=e,history.replaceState=n}},RF=t=>{switch(t){case"strict":return[!0,void 0];case"default":return[!0,void 0];case"none":return[!1,{password:!0}]}},CF=t=>{let e=n=>{if(n.target){let r=n.target,i=Kb(r);t(i,n)}};return window.addEventListener("click",e),()=>window.removeEventListener("click",e)},ZF=t=>{let e=n=>{if(n.target){let r=Kb(n.target);t(r)}};return window.addEventListener("focusin",e),()=>window.removeEventListener("focusin",e)},kF=t=>{let e,n;if(typeof document.hidden<"u"?(e="hidden",n="visibilitychange"):typeof document.msHidden<"u"?(e="msHidden",n="msvisibilitychange"):typeof document.webkitHidden<"u"&&(e="webkitHidden",n="webkitvisibilitychange"),n===void 0)return()=>{};if(e===void 0)return()=>{};let r=e,i=()=>{let s=document[r];t(!!s)};document.addEventListener(n,i);let o=n;return()=>document.removeEventListener(o,i)},VF=t=>{t(window.location.href);var e=XMLHttpRequest.prototype.send;XMLHttpRequest.prototype.send=function(o){setTimeout(()=>{var s,a;try{a=JSON.parse((s=o==null?void 0:o.toString())!=null?s:"")}catch(c){return}(a.type==="track"||a.type==="identify")&&jc(a)&&t(a)},100),e.call(this,o)};let n=o=>{if(o.key==="ajs_user_id"||o.key==="ajs_anonymous_id"||o.key==="ajs_user_traits"){let{userId:s,userTraits:a}=db();if(s){let c={};a&&(c=JSON.parse(a));let l={type:"identify",userId:s.toString(),traits:c};jc(l)&&t(l)}}},{userId:r,userTraits:i}=db();if(r){let o={};i&&(o=JSON.parse(i));let s={type:"identify",userId:r.toString(),traits:o};jc(s)&&t(s)}return window.addEventListener("storage",n),kX(({keyName:o})=>{n({key:o})}),()=>{window.removeEventListener("storage",n),XMLHttpRequest.prototype.send=e}},db=()=>{let t=re("ajs_user_id"),e=re("ajs_user_traits"),n=re("ajs_anonymous_id");return{userId:t,userTraits:e,anonymousId:n}},jc=t=>{if(!t)return!1;let e="";try{e=JSON.stringify(t)}catch(i){return!1}let n=xF(e),r=re(_t.SEGMENT_LAST_SENT_HASH_KEY);return r===void 0||n!==r?(ze(_t.SEGMENT_LAST_SENT_HASH_KEY,n),!0):!1},xF=t=>{var e=0,n=t.length,r=0;if(n>0)for(;r<n;)e=(e<<5)-e+t.charCodeAt(r++)|0;return e.toString()},NF=(t,e)=>{let n=OF(t),r=[],i=!1,o=!0;for(let s=0;s<n.length;s++){let a=n[s].split("+");r=[],a.length>1&&(r=XF(Y0,a)),a=a[a.length-1],a=a==="*"?"*":LF(a),a in Ie||(Ie[a]=[]),Ie[a].push({mods:r,shortcut:n[s],key:n[s],method:e,keyup:i,keydown:o,scope:"all",splitKey:"+"})}WF(document,"keydown",s=>{PF(s)})},Ut=[];Ie={},Qc=typeof navigator<"u"?navigator.userAgent.toLowerCase().indexOf("firefox")>0:!1,GF={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,"\u21EA":20,",":188,".":190,"/":191,"`":192,"-":Qc?173:189,"=":Qc?61:187,";":Qc?59:186,"'":222,"[":219,"]":221,"\\":220},fb={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey",shiftKey:16,ctrlKey:17,altKey:18,metaKey:91},Pt={16:!1,18:!1,17:!1,91:!1},Y0={"\u21E7":16,shift:16,"\u2325":18,alt:18,option:18,"\u2303":17,ctrl:17,control:17,"\u2318":91,cmd:91,command:91},LF=t=>GF[t.toLowerCase()]||Y0[t.toLowerCase()]||t.toUpperCase().charCodeAt(0);mb="iframe parent ready",yb="iframe ok",Ri="highlightLogs",MF=t=>{let e=re(Ri)||"";e=e+"["+new Date().getTime()+"] "+t+`
339
- `,ze(Ri,e)},FF=()=>re(Ri)||"",AF=t=>{if(!t)return;let e=re(Ri)||"";e&&(e.startsWith(t)?(e=e.slice(t.length),ze(Ri,e)):MF("Unable to clear logs "+t.replace(`
338
+ or you can use record.mirror to access the mirror instance during recording.`,db={map:{},getId(){return console.error(qn),-1},getNode(){return console.error(qn),null},removeNodeFromMap(){console.error(qn)},has(){return console.error(qn),!1},reset(){console.error(qn)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(db=new Proxy(db,{get(t,e,n){return e==="map"&&console.error(qn),Reflect.get(t,e,n)}}));ia=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(ia=()=>new Date().getTime());mF=t=>{try{if(t instanceof HTMLElement)return t.tagName==="CANVAS"}catch(e){return!1}return!1};eh=class{constructor(){k(this,"id",1),k(this,"styleIDMap",new WeakMap),k(this,"idStyleMap",new Map)}getId(e){var n;return(n=this.styleIDMap.get(e))!=null?n:-1}has(e){return this.styleIDMap.has(e)}add(e,n){if(this.has(e))return this.getId(e);let r;return n===void 0?r=this.id++:r=n,this.styleIDMap.set(e,r),this.idStyleMap.set(r,e),r}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}};rt=(t=>(t[t.DomContentLoaded=0]="DomContentLoaded",t[t.Load=1]="Load",t[t.FullSnapshot=2]="FullSnapshot",t[t.IncrementalSnapshot=3]="IncrementalSnapshot",t[t.Meta=4]="Meta",t[t.Custom=5]="Custom",t[t.Plugin=6]="Plugin",t))(rt||{}),et=(t=>(t[t.Mutation=0]="Mutation",t[t.MouseMove=1]="MouseMove",t[t.MouseInteraction=2]="MouseInteraction",t[t.Scroll=3]="Scroll",t[t.ViewportResize=4]="ViewportResize",t[t.Input=5]="Input",t[t.TouchMove=6]="TouchMove",t[t.MediaInteraction=7]="MediaInteraction",t[t.StyleSheetRule=8]="StyleSheetRule",t[t.CanvasMutation=9]="CanvasMutation",t[t.Font=10]="Font",t[t.Log=11]="Log",t[t.Drag=12]="Drag",t[t.StyleDeclaration=13]="StyleDeclaration",t[t.Selection=14]="Selection",t[t.AdoptedStyleSheet=15]="AdoptedStyleSheet",t[t.CustomElement=16]="CustomElement",t))(et||{}),Yt=(t=>(t[t.MouseUp=0]="MouseUp",t[t.MouseDown=1]="MouseDown",t[t.Click=2]="Click",t[t.ContextMenu=3]="ContextMenu",t[t.DblClick=4]="DblClick",t[t.Focus=5]="Focus",t[t.Blur=6]="Blur",t[t.TouchStart=7]="TouchStart",t[t.TouchMove_Departed=8]="TouchMove_Departed",t[t.TouchEnd=9]="TouchEnd",t[t.TouchCancel=10]="TouchCancel",t))(Yt||{}),He=(t=>(t[t.Mouse=0]="Mouse",t[t.Pen=1]="Pen",t[t.Touch=2]="Touch",t))(He||{}),fr=(t=>(t[t["2D"]=0]="2D",t[t.WebGL=1]="WebGL",t[t.WebGL2=2]="WebGL2",t))(fr||{}),tr=(t=>(t[t.Play=0]="Play",t[t.Pause=1]="Pause",t[t.Seeked=2]="Seeked",t[t.VolumeChange=3]="VolumeChange",t[t.RateChange=4]="RateChange",t))(tr||{}),H0=(t=>(t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment",t))(H0||{});nh=class{constructor(){k(this,"length",0),k(this,"head",null),k(this,"tail",null)}get(e){if(e>=this.length)throw new Error("Position outside of list range");let n=this.head;for(let r=0;r<e;r++)n=(n==null?void 0:n.next)||null;return n}addNode(e){let n={value:e,previous:null,next:null};if(e.__ln=n,e.previousSibling&&fb(e.previousSibling)){let r=e.previousSibling.__ln.next;n.next=r,n.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=n,r&&(r.previous=n)}else if(e.nextSibling&&fb(e.nextSibling)&&e.nextSibling.__ln.previous){let r=e.nextSibling.__ln.previous;n.previous=r,n.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=n,r&&(r.next=n)}else this.head&&(this.head.previous=n),n.next=this.head,this.head=n;n.next===null&&(this.tail=n),this.length++}removeNode(e){let n=e.__ln;this.head&&(n.previous?(n.previous.next=n.next,n.next?n.next.previous=n.previous:this.tail=n.previous):(this.head=n.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}},mb=(t,e)=>`${t}@${e}`,rh=class{constructor(){k(this,"frozen",!1),k(this,"locked",!1),k(this,"texts",[]),k(this,"attributes",[]),k(this,"attributeMap",new WeakMap),k(this,"removes",[]),k(this,"mapRemoves",[]),k(this,"movedMap",{}),k(this,"addedSet",new Set),k(this,"movedSet",new Set),k(this,"droppedSet",new Set),k(this,"removesSubTreeCache",new Set),k(this,"mutationCb"),k(this,"blockClass"),k(this,"blockSelector"),k(this,"maskTextClass"),k(this,"maskTextSelector"),k(this,"inlineStylesheet"),k(this,"maskInputOptions"),k(this,"maskTextFn"),k(this,"maskInputFn"),k(this,"keepIframeSrcFn"),k(this,"recordCanvas"),k(this,"inlineImages"),k(this,"inlineVideos"),k(this,"privacySetting"),k(this,"slimDOMOptions"),k(this,"dataURLOptions"),k(this,"doc"),k(this,"mirror"),k(this,"iframeManager"),k(this,"stylesheetManager"),k(this,"shadowDomManager"),k(this,"canvasManager"),k(this,"processedNodeManager"),k(this,"unattachedDoc"),k(this,"processMutations",e=>{e.forEach(this.processMutation),this.emit()}),k(this,"emit",()=>{if(this.frozen||this.locked)return;let e=[],n=new Set,r=new nh,i=c=>{let l=c,u=gi;for(;u===gi;)l=l&&l.nextSibling,u=l&&this.mirror.getId(l);return u},o=c=>{let l=q.parentNode(c);if(!l||!_0(c))return;let u=!1;if(c.nodeType===Node.TEXT_NODE){let m=l.tagName;if(m==="TEXTAREA")return;m==="STYLE"&&this.addedSet.has(l)&&(u=!0)}let h=hi(l)?this.mirror.getId(K0(c)):this.mirror.getId(l),p=i(c);if(h===-1||p===-1)return r.addNode(c);let f=nr(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:m=>{D0(m,this.mirror)&&this.iframeManager.addIframe(m),Y0(m,this.mirror)&&this.stylesheetManager.trackLinkElement(m),th(c)&&this.shadowDomManager.addShadowRoot(q.shadowRoot(c),this.doc)},onIframeLoad:(m,d)=>{this.iframeManager.attachIframe(m,d),this.shadowDomManager.observeAttachShadow(m)},onStylesheetLoad:(m,d)=>{this.stylesheetManager.attachLinkElement(m,d)},cssCaptured:u});f&&(e.push({parentId:h,nextId:p,node:f}),n.add(f.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(let c of this.movedSet)yb(this.removesSubTreeCache,c)&&!this.movedSet.has(q.parentNode(c))||o(c);for(let c of this.addedSet)!gb(this.droppedSet,c)&&!yb(this.removesSubTreeCache,c)||gb(this.movedSet,c)?o(c):this.droppedSet.add(c);let s=null;for(;r.length;){let c=null;if(s){let l=this.mirror.getId(q.parentNode(s.value)),u=i(s.value);l!==-1&&u!==-1&&(c=s)}if(!c){let l=r.tail;for(;l;){let u=l;if(l=l.previous,u){let h=this.mirror.getId(q.parentNode(u.value));if(i(u.value)===-1)continue;if(h!==-1){c=u;break}else{let p=u.value,f=q.parentNode(p);if(f&&f.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let m=q.host(f);if(this.mirror.getId(m)!==-1){c=u;break}}}}}}if(!c){for(;r.head;)r.removeNode(r.head.value);break}s=c.previous,r.removeNode(c.value),o(c.value)}let a={texts:this.texts.map(c=>{var l,u;let h=c.node,p=q.parentNode(h);p&&p.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(p);let f=c.value,m=this.privacySetting==="strict",d=this.privacySetting==="default"&&uv(f),v=(u=(l=c.node)==null?void 0:l.parentElement)==null?void 0:u.getAttribute("data-hl-record");return(m||d)&&!v&&f&&(f=yh(f)),{id:this.mirror.getId(h),value:f}}).filter(c=>!n.has(c.id)).filter(c=>this.mirror.has(c.id)),attributes:this.attributes.map(c=>{let{attributes:l}=c;if(typeof l.style=="string"){let u=JSON.stringify(c.styleDiff),h=JSON.stringify(c.po);u.length<l.style.length&&(u+h).split("var(").length===l.style.split("var(").length&&(l.style=c.styleDiff)}return{id:this.mirror.getId(c.node),attributes:l}}).filter(c=>!n.has(c.id)).filter(c=>this.mirror.has(c.id)),removes:this.removes,adds:e};!a.texts.length&&!a.attributes.length&&!a.removes.length&&!a.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(a))}),k(this,"genTextAreaValueMutation",e=>{let n=this.attributeMap.get(e);n||(n={node:e,attributes:{},styleDiff:{},po:{}},this.attributes.push(n),this.attributeMap.set(e,n));let r=Array.from(q.childNodes(e),i=>q.textContent(i)||"").join("");n.attributes.value=Ks({overwriteRecord:null,element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:_s(e),value:r,maskInputFn:this.maskInputFn})}),k(this,"processMutation",e=>{if(!eu(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{let n=q.textContent(e.target);!Nt(e.target,this.blockClass,this.blockSelector,!1)&&n!==e.oldValue&&this.texts.push({value:mv(e.target,this.maskTextClass,this.maskTextSelector,!0)&&n?this.maskTextFn?this.maskTextFn(n,A0(e.target)):n.replace(/[\S]/g,"*"):n,node:e.target});break}case"attributes":{let n=e.target,r=e.attributeName,i=e.target.getAttribute(r);if(r==="value"){let s=_s(n);i=Ks({element:n,maskInputOptions:this.maskInputOptions,tagName:n.tagName,type:s,value:i,overwriteRecord:n.getAttribute("data-hl-record"),maskInputFn:this.maskInputFn})}if(Nt(e.target,this.blockClass,this.blockSelector,!1)||i===e.oldValue)return;let o=this.attributeMap.get(e.target);if(n.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(i))if(!n.contentDocument)r="rr_src";else return;if(o||(o={node:e.target,attributes:{},styleDiff:{},po:{}},this.attributes.push(o),this.attributeMap.set(e.target,o)),r==="type"&&n.tagName==="INPUT"&&(e.oldValue||"").toLowerCase()==="password"&&n.setAttribute("data-rr-is-password","true"),!fv(n.tagName,r)){if(e.target.tagName==="INPUT"){let s=e.target;if(s.type==="password"){o.attributes.value="*".repeat(s.value.length);break}}if(o.attributes[r]=dv(this.doc,ar(n.tagName),ar(r),i),r==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(a){this.unattachedDoc=this.doc}let s=this.unattachedDoc.createElement("span");e.oldValue&&s.setAttribute("style",e.oldValue);for(let a of Array.from(n.style)){let c=n.style.getPropertyValue(a),l=n.style.getPropertyPriority(a);c!==s.style.getPropertyValue(a)||l!==s.style.getPropertyPriority(a)?l===""?o.styleDiff[a]=c:o.styleDiff[a]=[c,l]:o.po[a]=[c,l]}for(let a of Array.from(s.style))n.style.getPropertyValue(a)===""&&(o.styleDiff[a]=!1)}else r==="open"&&n.tagName==="DIALOG"&&(n.matches("dialog:modal")?o.attributes.rr_open_mode="modal":o.attributes.rr_open_mode="non-modal")}break}case"childList":{if(Nt(e.target,this.blockClass,this.blockSelector,!0))return;if(e.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(e.target);return}e.addedNodes.forEach(n=>this.genAdds(n,e.target)),e.removedNodes.forEach(n=>{let r=this.mirror.getId(n),i=hi(e.target)?this.mirror.getId(q.host(e.target)):this.mirror.getId(e.target);Nt(e.target,this.blockClass,this.blockSelector,!1)||eu(n,this.mirror,this.slimDOMOptions)||!yF(n,this.mirror)||(this.addedSet.has(n)?(ih(this.addedSet,n),this.droppedSet.add(n)):this.addedSet.has(e.target)&&r===-1||J0(e.target,this.mirror)||(this.movedSet.has(n)&&this.movedMap[mb(r,i)]?ih(this.movedSet,n):(this.removes.push({parentId:i,id:r,isShadow:hi(e.target)&&pi(e.target)?!0:void 0}),wF(n,this.removesSubTreeCache))),this.mapRemoves.push(n))});break}}}),k(this,"genAdds",(e,n)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(eu(e,this.mirror,this.slimDOMOptions))return;this.movedSet.add(e);let r=null;n&&this.mirror.hasNode(n)&&(r=this.mirror.getId(n)),r&&r!==-1&&(this.movedMap[mb(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);Nt(e,this.blockClass,this.blockSelector,!1)||(q.childNodes(e).forEach(r=>this.genAdds(r)),th(e)&&q.childNodes(q.shadowRoot(e)).forEach(r=>{this.processedNodeManager.add(r,this),this.genAdds(r,e)}))}})}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","inlineVideos","privacySetting","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(n=>{this[n]=e[n]})}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()}};nt=t=>di?(...e)=>{try{return t(...e)}catch(n){if(di&&di(n)===!0)return;throw n}}:t,En=[];ZF=["INPUT","TEXTAREA","SELECT"],bb=new WeakMap;sa=class{constructor(e){k(this,"iframeIdToRemoteIdMap",new WeakMap),k(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,n,r,i){let o=r||this.getIdToRemoteIdMap(e),s=i||this.getRemoteIdToIdMap(e),a=o.get(n);return a||(a=this.generateIdFn(),o.set(n,a),s.set(a,n)),a}getIds(e,n){let r=this.getIdToRemoteIdMap(e),i=this.getRemoteIdToIdMap(e);return n.map(o=>this.getId(e,o,r,i))}getRemoteId(e,n,r){let i=r||this.getRemoteIdToIdMap(e);return typeof n!="number"?n:i.get(n)||-1}getRemoteIds(e,n){let r=this.getRemoteIdToIdMap(e);return n.map(i=>this.getRemoteId(e,i,r))}reset(e){if(!e){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let n=this.iframeIdToRemoteIdMap.get(e);return n||(n=new Map,this.iframeIdToRemoteIdMap.set(e,n)),n}getRemoteIdToIdMap(e){let n=this.iframeRemoteIdToIdMap.get(e);return n||(n=new Map,this.iframeRemoteIdToIdMap.set(e,n)),n}},oh=class{constructor(e){k(this,"iframes",new WeakMap),k(this,"crossOriginIframeMap",new WeakMap),k(this,"crossOriginIframeMirror",new sa(pv)),k(this,"crossOriginIframeStyleMirror"),k(this,"crossOriginIframeRootIdMap",new WeakMap),k(this,"mirror"),k(this,"mutationCb"),k(this,"wrappedEmit"),k(this,"loadListener"),k(this,"stylesheetManager"),k(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new sa(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,n){var r,i;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:n}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&((r=e.contentWindow)==null||r.addEventListener("message",this.handleMessage.bind(this))),(i=this.loadListener)==null||i.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}handleMessage(e){let n=e;if(n.data.type!=="rrweb"||n.origin!==n.data.origin)return;let r=e.source;if(!r)return;let i=this.crossOriginIframeMap.get(r);if(!i)return;let o=this.transformCrossOriginEvent(i,n.data.event);o&&this.wrappedEmit(o,n.data.isCheckout)}transformCrossOriginEvent(e,n){var r;switch(n.type){case rt.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(n.data.node,e);let i=n.data.node.id;return this.crossOriginIframeRootIdMap.set(e,i),this.patchRootIdOnNode(n.data.node,i),{timestamp:n.timestamp,type:rt.IncrementalSnapshot,data:{source:et.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:n.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case rt.Meta:case rt.Load:case rt.DomContentLoaded:return!1;case rt.Plugin:return n;case rt.Custom:return this.replaceIds(n.data.payload,e,["id","parentId","previousId","nextId"]),n;case rt.IncrementalSnapshot:switch(n.data.source){case et.Mutation:return n.data.adds.forEach(i=>{this.replaceIds(i,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(i.node,e);let o=this.crossOriginIframeRootIdMap.get(e);o&&this.patchRootIdOnNode(i.node,o)}),n.data.removes.forEach(i=>{this.replaceIds(i,e,["parentId","id"])}),n.data.attributes.forEach(i=>{this.replaceIds(i,e,["id"])}),n.data.texts.forEach(i=>{this.replaceIds(i,e,["id"])}),n;case et.Drag:case et.TouchMove:case et.MouseMove:return n.data.positions.forEach(i=>{this.replaceIds(i,e,["id"])}),n;case et.ViewportResize:return!1;case et.MediaInteraction:case et.MouseInteraction:case et.Scroll:case et.CanvasMutation:case et.Input:return this.replaceIds(n.data,e,["id"]),n;case et.StyleSheetRule:case et.StyleDeclaration:return this.replaceIds(n.data,e,["id"]),this.replaceStyleIds(n.data,e,["styleId"]),n;case et.Font:return n;case et.Selection:return n.data.ranges.forEach(i=>{this.replaceIds(i,e,["start","end"])}),n;case et.AdoptedStyleSheet:return this.replaceIds(n.data,e,["id"]),this.replaceStyleIds(n.data,e,["styleIds"]),(r=n.data.styles)==null||r.forEach(i=>{this.replaceStyleIds(i,e,["styleId"])}),n}}return!1}replace(e,n,r,i){for(let o of i)!Array.isArray(n[o])&&typeof n[o]!="number"||(Array.isArray(n[o])?n[o]=e.getIds(r,n[o]):n[o]=e.getId(r,n[o]));return n}replaceIds(e,n,r){return this.replace(this.crossOriginIframeMirror,e,n,r)}replaceStyleIds(e,n,r){return this.replace(this.crossOriginIframeStyleMirror,e,n,r)}replaceIdOnNode(e,n){this.replaceIds(e,n,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(r=>{this.replaceIdOnNode(r,n)})}patchRootIdOnNode(e,n){e.type!==H0.Document&&!e.rootId&&(e.rootId=n),"childNodes"in e&&e.childNodes.forEach(r=>{this.patchRootIdOnNode(r,n)})}},sh=class{constructor(e){k(this,"shadowDoms",new WeakSet),k(this,"mutationCb"),k(this,"scrollCb"),k(this,"bypassOptions"),k(this,"mirror"),k(this,"restoreHandlers",[]),this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,n){if(!pi(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);let r=B0(_t(z({},this.bypassOptions),{doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(j0(_t(z({},this.bypassOptions),{scrollCb:this.scrollCb,doc:e,mirror:this.mirror}))),setTimeout(()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(q.host(e))),this.restoreHandlers.push(Q0({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))},0)}observeAttachShadow(e){!e.contentWindow||!e.contentDocument||this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}patchAttachShadow(e,n){let r=this;this.restoreHandlers.push(kn(e.prototype,"attachShadow",function(i){return function(o){let s=i.call(this,o),a=q.shadowRoot(this);return a&&_0(this)&&r.addShadowRoot(a,n),s}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch(n){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}},rr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",UF=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(ai=0;ai<rr.length;ai++)UF[rr.charCodeAt(ai)]=ai;PF=function(t){var e=new Uint8Array(t),n,r=e.length,i="";for(n=0;n<r;n+=3)i+=rr[e[n]>>2],i+=rr[(e[n]&3)<<4|e[n+1]>>4],i+=rr[(e[n+1]&15)<<2|e[n+2]>>6],i+=rr[e[n+2]&63];return r%3===2?i=i.substring(0,i.length-1)+"=":r%3===1&&(i=i.substring(0,i.length-2)+"=="),i},vb=new Map;$0=(t,e,n)=>{if(!t||!(tw(t,e)||typeof t=="object"))return;let r=t.constructor.name,i=MF(n,r),o=i.indexOf(t);return o===-1&&(o=i.length,i.push(t)),o};q0=(t,e,n)=>t.map(r=>Xs(r,e,n)),tw=(t,e)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayOb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KHsgaWQ6IGUuZGF0YS5pZCwgc3RhdHVzOiAidW5zdXBwb3J0ZWQiIH0pOwogICAgfQogIH07Cn0pKCk7Ci8vIyBzb3VyY2VNYXBwaW5nVVJMPWltYWdlLWJpdG1hcC1kYXRhLXVybC13b3JrZXItRHd0SzhBMHouanMubWFwCg==",DF=t=>Uint8Array.from(atob(t),e=>e.charCodeAt(0)),Ib=typeof self<"u"&&self.Blob&&new Blob([DF(ew)],{type:"text/javascript;charset=utf-8"});ah=class{constructor(e){k(this,"pendingCanvasMutations",new Map),k(this,"rafStamps",{latestId:0,invokeId:null}),k(this,"mirror"),k(this,"logger"),k(this,"worker"),k(this,"snapshotInProgressMap",new Map),k(this,"lastSnapshotTime",new Map),k(this,"options"),k(this,"mutationCb"),k(this,"resetObservers"),k(this,"frozen",!1),k(this,"locked",!1),k(this,"processMutation",(h,p)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(h)||this.pendingCanvasMutations.set(h,[]),this.pendingCanvasMutations.get(h).push(p)});let{sampling:n,win:r,blockClass:i,blockSelector:o,recordCanvas:s,recordLocalVideos:a,recordRemoteVideos:c,initialSnapshotDelay:l,dataURLOptions:u}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,this.logger=e.logger,this.worker=new YF,this.worker.onmessage=h=>{let{id:p}=h.data;if(this.snapshotInProgressMap.set(p,!1),!("base64"in h.data)){this.debug(null,"canvas worker received empty message",{id:p,data:h.data,status:h.data.status});return}let{base64:f,type:m,dx:d,dy:v,dw:g,dh:w}=h.data,R={id:p,type:fr["2D"],commands:[{property:"clearRect",args:[d,v,g,w]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:f}],type:m}]},d,v,g,w]}]};this.debug(null,"canvas worker recording mutation",R),this.mutationCb(R)},this.options=e,s&&n==="all"?(this.debug(null,"initializing canvas mutation observer",{sampling:n}),this.initCanvasMutationObserver(r,i,o)):s&&typeof n=="number"&&(this.debug(null,"initializing canvas fps observer",{sampling:n}),this.initCanvasFPSObserver(a,c,n,r,i,o,{initialSnapshotDelay:l,dataURLOptions:u},e.resizeFactor,e.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(e,...n){if(!this.logger)return;let r=this.mirror.getId(e),i="[highlight-canvas-manager]";e&&(i=`[highlight-canvas] [id:${r}]`,e.tagName.toLowerCase()==="canvas"&&(i+=` [ctx:${e.__context}]`)),this.logger.debug(i,e,...n)}snapshot(e){return Kt(this,null,function*(){var n;let r=this.mirror.getId(e);if(this.snapshotInProgressMap.get(r)){this.debug(e,"snapshotting already in progress for",r);return}let i=1e3/(typeof this.options.samplingManual=="number"?this.options.samplingManual:1),o=this.lastSnapshotTime.get(r);if(!(o&&new Date().getTime()-o<i)){if(this.debug(e,"starting snapshotting"),e.width===0||e.height===0){this.debug(e,"not yet ready",{width:e.width,height:e.height});return}this.lastSnapshotTime.set(r,new Date().getTime()),this.snapshotInProgressMap.set(r,!0);try{if(this.options.clearWebGLBuffer!==!1&&["webgl","webgl2"].includes(e.__context)){let u=e.getContext(e.__context);((n=u==null?void 0:u.getContextAttributes())==null?void 0:n.preserveDrawingBuffer)===!1&&(u.clear(u.COLOR_BUFFER_BIT),this.debug(e,"cleared webgl canvas to load it into memory",{attributes:u==null?void 0:u.getContextAttributes()}))}if(e.width===0||e.height===0){this.debug(e,"not yet ready",{width:e.width,height:e.height});return}let s=this.options.resizeFactor||1;if(this.options.maxSnapshotDimension){let u=Math.max(e.width,e.height);s=Math.min(s,this.options.maxSnapshotDimension/u)}let a=e.width*s,c=e.height*s,l=yield createImageBitmap(e,{resizeWidth:a,resizeHeight:c});this.debug(e,"created image bitmap",{width:l.width,height:l.height}),this.worker.postMessage({id:r,bitmap:l,width:a,height:c,dx:0,dy:0,dw:e.width,dh:e.height,dataURLOptions:this.options.dataURLOptions,logDebug:!!this.logger},[l]),this.debug(e,"sent message")}catch(s){this.debug(e,"failed to snapshot",s)}finally{this.snapshotInProgressMap.set(r,!1)}}})}initCanvasFPSObserver(e,n,r,i,o,s,a,c,l){let u=wb(i,o,s,!0),h=1e3/r,p=0,f,m=new Map,d=(R,E)=>{let T=[];R.querySelectorAll(E).forEach(U=>T.push(U));let x=document.createNodeIterator(R,Node.ELEMENT_NODE),N;for(;N=x.nextNode();)N!=null&&N.shadowRoot&&T.push(...d(N.shadowRoot,E));return T},v=R=>{let E=[];return d(i.document,"canvas").forEach(T=>{if(!Nt(T,o,s,!0)){this.debug(T,"discovered canvas"),E.push(T);let x=this.mirror.getId(T);m.has(x)||m.set(x,R)}}),E},g=R=>{let E=[];return(e||n)&&d(i.document,"video").forEach(T=>{if(!(!n&&T.src!==""&&T.src.indexOf("blob:")===-1)&&!(!e&&(T.src===""||T.src.indexOf("blob:")!==-1))&&!Nt(T,o,s,!0)){E.push(T);let x=this.mirror.getId(T);m.has(x)||m.set(x,R)}}),E},w=R=>Kt(this,null,function*(){if(p&&R-p<h){f=requestAnimationFrame(w);return}p=R;let E=x=>{let N=this.mirror.getId(x),U=m.get(N),C=!a.initialSnapshotDelay||R-U>a.initialSnapshotDelay;return this.debug(x,{delay:a.initialSnapshotDelay,delta:R-U,hadLoadingTime:C}),C},T=[];T.push(...v(R).filter(E).map(x=>this.snapshot(x))),T.push(...g(R).filter(E).map(x=>Kt(this,null,function*(){this.debug(x,"starting video snapshotting");let N=this.mirror.getId(x);if(this.snapshotInProgressMap.get(N)){this.debug(x,"video snapshotting already in progress for",N);return}this.snapshotInProgressMap.set(N,!0);try{let{width:U,height:C}=x.getBoundingClientRect(),{actualWidth:O,actualHeight:P}={actualWidth:x.videoWidth,actualHeight:x.videoHeight},st=Math.max(O,P);if(st===0){this.debug(x,"not yet ready",{width:x.width,height:x.height,actualWidth:O,actualHeight:P,boxWidth:U,boxHeight:C});return}let lt=c||1;l&&(lt=Math.min(lt,l/st));let y=O*lt,b=P*lt,Z=yield createImageBitmap(x,{resizeWidth:y,resizeHeight:b}),D=Math.max(U,C)/st,M=O*D,G=P*D,it=(U-M)/2,ct=(C-G)/2;this.debug(x,"created image bitmap",{actualWidth:O,actualHeight:P,boxWidth:U,boxHeight:C,outputWidth:M,outputHeight:G,resizeWidth:y,resizeHeight:b,scale:lt,outputScale:D,offsetX:it,offsetY:ct}),this.worker.postMessage({id:N,bitmap:Z,width:y,height:b,dx:it,dy:ct,dw:M,dh:G,dataURLOptions:a.dataURLOptions,logDebug:!!this.logger},[Z]),this.debug(x,"send message")}catch(U){this.debug(x,"failed to snapshot",U)}finally{this.snapshotInProgressMap.set(N,!1)}}))),yield Promise.all(T).catch(console.error),f=requestAnimationFrame(w)});f=requestAnimationFrame(w),this.resetObservers=()=>{u(),f&&cancelAnimationFrame(f)}}initCanvasMutationObserver(e,n,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();let i=wb(e,n,r,!1),o=FF(this.processMutation.bind(this),e,n,r),s=JF(this.processMutation.bind(this),e,n,r);this.resetObservers=()=>{i(),o(),s()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){let e=n=>{this.rafStamps.latestId=n,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,n)=>{let r=this.mirror.getId(n);this.flushPendingCanvasMutationFor(n,r)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,n){if(this.frozen||this.locked)return;let r=this.pendingCanvasMutations.get(e);if(!r||n===-1)return;let i=r.map(s=>sr(s,["type"])),{type:o}=r[0];this.mutationCb({id:n,type:o,commands:i}),this.pendingCanvasMutations.delete(e)}},lh=class{constructor(e){k(this,"trackedLinkElements",new WeakSet),k(this,"mutationCb"),k(this,"adoptedStyleSheetCb"),k(this,"styleMirror",new eh),this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,n){"_cssText"in n.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:n.id,attributes:n.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,n){if(e.length===0)return;let r={id:n,styleIds:[]},i=[];for(let o of e){let s;this.styleMirror.has(o)?s=this.styleMirror.getId(o):(s=this.styleMirror.add(o),i.push({styleId:s,rules:Array.from(o.rules||CSSRule,(a,c)=>({rule:lv(a,o.href),index:c}))})),r.styleIds.push(s)}i.length>0&&(r.styles=i),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}},ch=class{constructor(){k(this,"nodeMap",new WeakMap),k(this,"active",!1)}inOtherBuffer(e,n){let r=this.nodeMap.get(e);return r&&Array.from(r).some(i=>i!==n)}add(e,n){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(n))}destroy(){}},aa=!1;try{if(Array.from([1],t=>t*2)[0]!==2){let t=document.createElement("iframe");document.body.appendChild(t),Array.from=((Tg=t.contentWindow)==null?void 0:Tg.Array.from)||Array.from,document.body.removeChild(t)}}catch(t){console.debug("Unable to override Array.from",t)}ue=HW();Xe.addCustomEvent=(t,e)=>{aa&&vt({type:rt.Custom,data:{tag:t,payload:e}})};Xe.freezePage=()=>{En.forEach(t=>t.freeze())};Xe.takeFullSnapshot=t=>{if(!aa)throw new Error("please take full snapshot after start recording");Ws(t)};Xe.snapshotCanvas=t=>Kt(void 0,null,function*(){if(!fi)throw new Error("canvas manager is not initialized");yield fi.snapshot(t)});Xe.mirror=ue;(function(t){t[t.NotStarted=0]="NotStarted",t[t.Running=1]="Running",t[t.Stopped=2]="Stopped"})(Tb||(Tb={}));({addCustomEvent:Eb}=Xe),KF=t=>{t(window.location.href);let e=history.pushState;history.pushState=(o=>function(){var s=o.apply(this,arguments);return window.dispatchEvent(new Event("pushstate")),window.dispatchEvent(new Event("locationchange")),s})(history.pushState);let n=history.replaceState;history.replaceState=(o=>function(){var s=o.apply(this,arguments);return window.dispatchEvent(new Event("replacestate")),window.dispatchEvent(new Event("locationchange")),s})(history.replaceState);let r=()=>{window.dispatchEvent(new Event("locationchange"))};window.addEventListener("popstate",r);let i=function(){t(window.location.href)};return window.addEventListener("locationchange",i),()=>{window.removeEventListener("popstate",r),window.removeEventListener("locationchange",i),history.pushState=e,history.replaceState=n}},_F=t=>{switch(t){case"strict":return[!0,void 0];case"default":return[!0,void 0];case"none":return[!1,{password:!0}]}},HF=t=>{let e=n=>{if(n.target){let r=n.target,i=rv(r);t(i,n)}};return window.addEventListener("click",e),()=>window.removeEventListener("click",e)},zF=t=>{let e=n=>{if(n.target){let r=rv(n.target);t(r)}};return window.addEventListener("focusin",e),()=>window.removeEventListener("focusin",e)},BF=t=>{let e,n;if(typeof document.hidden<"u"?(e="hidden",n="visibilitychange"):typeof document.msHidden<"u"?(e="msHidden",n="msvisibilitychange"):typeof document.webkitHidden<"u"&&(e="webkitHidden",n="webkitvisibilitychange"),n===void 0)return()=>{};if(e===void 0)return()=>{};let r=e,i=()=>{let s=document[r];t(!!s)};document.addEventListener(n,i);let o=n;return()=>document.removeEventListener(o,i)},jF=t=>{t(window.location.href);var e=XMLHttpRequest.prototype.send;XMLHttpRequest.prototype.send=function(o){setTimeout(()=>{var s,a;try{a=JSON.parse((s=o==null?void 0:o.toString())!=null?s:"")}catch(c){return}(a.type==="track"||a.type==="identify")&&nu(a)&&t(a)},100),e.call(this,o)};let n=o=>{if(o.key==="ajs_user_id"||o.key==="ajs_anonymous_id"||o.key==="ajs_user_traits"){let{userId:s,userTraits:a}=Rb();if(s){let c={};a&&(c=JSON.parse(a));let l={type:"identify",userId:s.toString(),traits:c};nu(l)&&t(l)}}},{userId:r,userTraits:i}=Rb();if(r){let o={};i&&(o=JSON.parse(i));let s={type:"identify",userId:r.toString(),traits:o};nu(s)&&t(s)}return window.addEventListener("storage",n),BX(({keyName:o})=>{n({key:o})}),()=>{window.removeEventListener("storage",n),XMLHttpRequest.prototype.send=e}},Rb=()=>{let t=oe("ajs_user_id"),e=oe("ajs_user_traits"),n=oe("ajs_anonymous_id");return{userId:t,userTraits:e,anonymousId:n}},nu=t=>{if(!t)return!1;let e="";try{e=JSON.stringify(t)}catch(i){return!1}let n=QF(e),r=oe(zt.SEGMENT_LAST_SENT_HASH_KEY);return r===void 0||n!==r?(Be(zt.SEGMENT_LAST_SENT_HASH_KEY,n),!0):!1},QF=t=>{var e=0,n=t.length,r=0;if(n>0)for(;r<n;)e=(e<<5)-e+t.charCodeAt(r++)|0;return e.toString()},$F=(t,e)=>{let n=qF(t),r=[],i=!1,o=!0;for(let s=0;s<n.length;s++){let a=n[s].split("+");r=[],a.length>1&&(r=nA(nw,a)),a=a[a.length-1],a=a==="*"?"*":eA(a),a in Te||(Te[a]=[]),Te[a].push({mods:r,shortcut:n[s],key:n[s],method:e,keyup:i,keydown:o,scope:"all",splitKey:"+"})}rA(document,"keydown",s=>{oA(s)})},Pt=[];Te={},ru=typeof navigator<"u"?navigator.userAgent.toLowerCase().indexOf("firefox")>0:!1,tA={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,"\u21EA":20,",":188,".":190,"/":191,"`":192,"-":ru?173:189,"=":ru?61:187,";":ru?59:186,"'":222,"[":219,"]":221,"\\":220},Cb={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey",shiftKey:16,ctrlKey:17,altKey:18,metaKey:91},Mt={16:!1,18:!1,17:!1,91:!1},nw={"\u21E7":16,shift:16,"\u2325":18,alt:18,option:18,"\u2303":17,ctrl:17,control:17,"\u2318":91,cmd:91,command:91},eA=t=>tA[t.toLowerCase()]||nw[t.toLowerCase()]||t.toUpperCase().charCodeAt(0);Zb="iframe parent ready",kb="iframe ok",Zi="highlightLogs",sA=t=>{let e=oe(Zi)||"";e=e+"["+new Date().getTime()+"] "+t+`
339
+ `,Be(Zi,e)},aA=()=>oe(Zi)||"",lA=t=>{if(!t)return;let e=oe(Zi)||"";e&&(e.startsWith(t)?(e=e.slice(t.length),Be(Zi,e)):sA("Unable to clear logs "+t.replace(`
340
340
  `," ")+" from "+e.replace(`
341
- `," ")))},K0="dmFyIFZyPU9iamVjdC5kZWZpbmVQcm9wZXJ0eSxqcj1PYmplY3QuZGVmaW5lUHJvcGVydGllczt2YXIgcXI9T2JqZWN0LmdldE93blByb3BlcnR5RGVzY3JpcHRvcnM7dmFyIEJlPU9iamVjdC5nZXRPd25Qcm9wZXJ0eVN5bWJvbHM7dmFyIFF0PU9iamVjdC5wcm90b3R5cGUuaGFzT3duUHJvcGVydHksWHQ9T2JqZWN0LnByb3RvdHlwZS5wcm9wZXJ0eUlzRW51bWVyYWJsZTt2YXIgY3Q9KE0sRCxDKT0+RCBpbiBNP1ZyKE0sRCx7ZW51bWVyYWJsZTohMCxjb25maWd1cmFibGU6ITAsd3JpdGFibGU6ITAsdmFsdWU6Q30pOk1bRF09QyxQPShNLEQpPT57Zm9yKHZhciBDIGluIER8fChEPXt9KSlRdC5jYWxsKEQsQykmJmN0KE0sQyxEW0NdKTtpZihCZSlmb3IodmFyIEMgb2YgQmUoRCkpWHQuY2FsbChELEMpJiZjdChNLEMsRFtDXSk7cmV0dXJuIE19LFVlPShNLEQpPT5qcihNLHFyKEQpKTt2YXIgZ2U9KE0sRCk9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tbDJKMXQuanMubWFwCg==",JF=t=>Uint8Array.from(atob(t),e=>e.charCodeAt(0)),gb=typeof self<"u"&&self.Blob&&new Blob([JF(K0)],{type:"text/javascript;charset=utf-8"});Oe=(t=>(t[t.Initialize=0]="Initialize",t[t.AsyncEvents=1]="AsyncEvents",t[t.Identify=2]="Identify",t[t.Properties=3]="Properties",t[t.Metrics=4]="Metrics",t[t.Feedback=5]="Feedback",t[t.CustomEvent=6]="CustomEvent",t[t.Stop=7]="Stop",t))(Oe||{}),YF=({apiKey:t})=>{(function(e,n){var r=e.amplitude||{yr:[],Wr:{}},i=n.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(){e.amplitude.runQueuedFunctions||console.log("[Amplitude] Error: could not load SDK"),amplitude.getInstance().init(t)};var o=n.getElementsByTagName("script")[0];o.parentNode.insertBefore(i,o);function s(d,v){d.prototype[v]=function(){return this.yr.push([v].concat(Array.prototype.slice.call(arguments,0))),this}}for(var a=function(){return this.yr=[],this},c=["add","append","clearAll","prepend","set","setOnce","unset","preInsert","postInsert","remove"],l=0;l<c.length;l++)s(a,c[l]);r.Identify=a;for(var u=function(){return this.yr=[],this},h=["setProductId","setQuantity","setPrice","setRevenueType","setEventProperties"],p=0;p<h.length;p++)s(u,h[p]);r.Revenue=u;var f=["init","logEvent","logRevenue","setUserId","setUserProperties","setOptOut","setVersionName","setDomain","setDeviceId","enableTracking","setGlobalUserProperties","identify","clearUserProperties","setGroup","logRevenueV2","regenerateDeviceId","groupIdentify","onInit","logEventWithTimestamp","logEventWithGroups","setSessionId","resetSessionId"];function m(d){function v(w){d[w]=function(){d.yr.push([w].concat(Array.prototype.slice.call(arguments,0)))}}for(var g=0;g<f.length;g++)v(f[g])}m(r),r.getInstance=function(d){return d=(!d||d.length===0?"$default_instance":d).toLowerCase(),Object.prototype.hasOwnProperty.call(r.Wr,d)||(r.Wr[d]={yr:[]},m(r.Wr[d])),r.Wr[d]},e.amplitude=r})(window,document)},KF=({projectToken:t})=>{if(window.mixpanel)return;(function(n,r){if(!r.__SV){var i,o;window.mixpanel=r,r.$a=[],r.init=function(s,a,c){function l(p,f){var m=f.split(".");m.length==2&&(p=p[m[0]],f=m[1]),p[f]=function(){p.push([f].concat(Array.prototype.slice.call(arguments,0)))}}var u=r;for(typeof c<"u"?u=r[c]=[]:c="mixpanel",u.people=u.people||[],u.toString=function(p){var f="mixpanel";return c!=="mixpanel"&&(f+="."+c),p||(f+=" (stub)"),f},u.people.toString=function(){return u.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(" "),o=0;o<i.length;o++)l(u,i[o]);var h="set set_once union unset remove delete".split(" ");u.get_group=function(){function p(v){f[v]=function(){call2_args=arguments,call2=[v].concat(Array.prototype.slice.call(call2_args,0)),u.push([m,call2])}}for(var f={},m=["get_group"].concat(Array.prototype.slice.call(arguments,0)),d=0;d<h.length;d++)p(h[d]);return f},r.$a.push([s,a,c])},r.__SV=1.2}})(document,window.mixpanel||[]);let e=document.createElement("script");e.src=_F,document.head.appendChild(e),e.addEventListener("load",()=>{var n;(n=window.mixpanel)==null||n.init(t)})},_F="https://cdn.mxpnl.com/libs/mixpanel-2-latest.min.js",HF="9.15.0",ih=class{constructor(e){Y(this,"options"),Y(this,"isRunningOnHighlight"),Y(this,"organizationID"),Y(this,"graphqlSDK"),Y(this,"events"),Y(this,"sessionData"),Y(this,"ready"),Y(this,"manualStopped"),Y(this,"state"),Y(this,"logger"),Y(this,"enableSegmentIntegration"),Y(this,"privacySetting"),Y(this,"enableCanvasRecording"),Y(this,"samplingStrategy"),Y(this,"inlineImages"),Y(this,"inlineVideos"),Y(this,"inlineStylesheet"),Y(this,"debugOptions"),Y(this,"listeners"),Y(this,"firstloadVersion"),Y(this,"environment"),Y(this,"sessionShortcut"),Y(this,"appVersion"),Y(this,"serviceName"),Y(this,"_worker"),Y(this,"_optionsInternal"),Y(this,"_backendUrl"),Y(this,"_recordingStartTime"),Y(this,"_isOnLocalHost"),Y(this,"_onToggleFeedbackFormVisibility"),Y(this,"_isCrossOriginIframe"),Y(this,"_eventBytesSinceSnapshot"),Y(this,"_lastSnapshotTime"),Y(this,"_lastVisibilityChangeTime"),Y(this,"pushPayloadTimerId"),Y(this,"hasSessionUnloaded"),Y(this,"hasPushedData"),Y(this,"reloaded"),Y(this,"_hasPreviouslyInitialized"),Y(this,"_recordStop"),Y(this,"_integrations",[]);var n,r,i,o,s;this.options=e,typeof((n=this.options)==null?void 0:n.debug)=="boolean"?this.debugOptions=this.options.debug?{clientInteractions:!0}:{}:this.debugOptions=(i=(r=this.options)==null?void 0:r.debug)!=null?i:{},this.logger=new bb(this.debugOptions.clientInteractions),this.Hn=new DF,this.Hn.onmessage=c=>{var l,u,h;((l=c.data.response)==null?void 0:l.type)===Oe.AsyncEvents?(this.gr+=c.data.response.eventsSize,this.logger.log(`Web worker sent payloadID ${c.data.response.id} size ${c.data.response.eventsSize} bytes, compression ratio ${c.data.response.eventsSize/c.data.response.compressedSize}.
342
- Total since snapshot: ${(this.gr/1e6).toFixed(1)}MB`)):((u=c.data.response)==null?void 0:u.type)===Oe.CustomEvent?this.addCustomEvent(c.data.response.tag,c.data.response.payload):((h=c.data.response)==null?void 0:h.type)===Oe.Stop&&(Ht("worker.onmessage","warn","Stopping recording due to worker failure",c.data.response),this.stop(!1))};let a=Zs();if(this.reloaded=!1,!((o=this.sessionData)!=null&&o.sessionSecureID)&&a!=null&&a.sessionSecureID)this.sessionData=a,this.options.sessionSecureID=a.sessionSecureID,this.reloaded=!0,this.logger.log(`Tab reloaded, continuing previous session: ${this.sessionData.sessionSecureID}`);else{for(let c of Object.values(_t))uu(c);this.sessionData={sessionSecureID:this.options.sessionSecureID,projectID:0,payloadID:1,sessionStartTime:Date.now()}}this.ys=!1;try{window.parent.document&&(this.po=!1)}catch(c){this.po=(s=this.options.recordCrossOriginIframe)!=null?s:!0}this.qa(this.options)}gs(e){return Yt(this,arguments,function*({forceNew:n}){this.pushPayloadTimerId&&(clearTimeout(this.pushPayloadTimerId),this.pushPayloadTimerId=void 0);let r,i;if(!n)try{r=re(_t.USER_IDENTIFIER);let o=re(_t.USER_OBJECT);o&&(i=JSON.parse(o))}catch(o){}for(let o of Object.values(_t))uu(o);this.sessionData.sessionSecureID=pu(),this.sessionData.sessionStartTime=Date.now(),this.options.sessionSecureID=this.sessionData.sessionSecureID,this.stop(),yield this.start(),r&&i&&this.identify(r,i)})}qa(e){var n,r,i,o,s,a,c,l,u;this.sessionShortcut=!1,this.zn=0,this.fo=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=!!e.enableSegmentIntegration,this.privacySetting=(n=e.privacySetting)!=null?n:"default",this.enableCanvasRecording=(r=e.enableCanvasRecording)!=null?r:!1,this.inlineImages=(i=e.inlineImages)!=null?i:this.fo,this.inlineVideos=(o=e.inlineVideos)!=null?o:this.fo,this.inlineStylesheet=(s=e.inlineStylesheet)!=null?s:this.fo,this.samplingStrategy=z({canvasFactor:.5,canvasMaxSnapshotDimension:360,canvasClearWebGLBuffer:!0,dataUrlOptions:gX()},(a=e.samplingStrategy)!=null?a:{canvas:2}),this.hn=(c=e==null?void 0:e.backendUrl)!=null?c:"https://pub.observability.app.launchdarkly.com",this.hn[0]==="/"&&(this.hn=new URL(this.hn,document.baseURI).href);let h=new HL(`${this.hn}`,{headers:{}});this.graphqlSDK=mX(h,PX()),this.environment=(l=e.environment)!=null?l:"production",this.appVersion=e.appVersion,this.serviceName=(u=e.serviceName)!=null?u:"browser",typeof e.organizationID=="string"?this.organizationID=e.organizationID:this.organizationID=e.organizationID.toString(),this.isRunningOnHighlight=this.organizationID==="1"||this.organizationID==="1jdkoe52",this.firstloadVersion=e.firstloadVersion||"unknown",this.sessionShortcut=e.sessionShortcut||!1,this.al=()=>{};let p=e,f=or(p,["firstloadVersion"]);this.tl=f,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.gr=0,this.mo=new Date().getTime(),this.bs=new Date().getTime()}identify(e,n={},r){if(!e||e===""){console.warn("Highlight's identify() call was passed an empty identifier.",{user_identifier:e,user_object:n});return}this.sessionData.userIdentifier=e.toString(),this.sessionData.userObject=n,ze(_t.USER_IDENTIFIER,e.toString()),ze(_t.USER_OBJECT,JSON.stringify(n)),this.Hn.postMessage({message:{type:Oe.Identify,userIdentifier:e,userObject:n,source:r}})}track(e,n){this.addProperties(Kt(z({},n),{event:e}))}addProperties(e={},n){let r=z({},e);Object.entries(r).forEach(([i,o])=>{try{structuredClone(o)}catch(s){delete r[i]}}),this.Hn.postMessage({message:{type:Oe.Properties,propertiesObject:r,propertyType:n}})}start(e){return Yt(this,null,function*(){var n,r,i,o,s,a,c,l;if(!(navigator!=null&&navigator.webdriver&&!window.Cypress||(n=navigator==null?void 0:navigator.userAgent)!=null&&n.includes("Googlebot")||(r=navigator==null?void 0:navigator.userAgent)!=null&&r.includes("AdsBot")))try{if(e!=null&&e.forceNew){yield this.gs(e);return}this.logger.log("Initializing...",e,this.sessionData,this.options),this.sessionData=(i=Zs(this.sessionData.sessionSecureID))!=null?i:this.sessionData,(o=this.sessionData)!=null&&o.sessionStartTime?this.zn=(s=this.sessionData)==null?void 0:s.sessionStartTime:(this.zn=new Date().getTime(),this.sessionData.sessionStartTime=this.zn);let u=re(au.CLIENT_ID);u||(u=pu(),ze(au.CLIENT_ID,u));let h;this.options.disableSessionRecording||this.options.disableNetworkRecording!==void 0||typeof this.options.networkRecording=="boolean"?h=!1:h=((a=this.options.networkRecording)==null?void 0:a.recordHeadersAndBody)||!1;let p=[];if(typeof this.options.networkRecording=="object"&&(c=this.options.networkRecording.destinationDomains)!=null&&c.length&&(p=this.options.networkRecording.destinationDomains),this.po)yield this.el();else{let g=yield this.graphqlSDK.initializeSession({organization_verbose_id:this.organizationID,enable_strict_privacy:this.privacySetting==="strict",privacy_setting:this.privacySetting,enable_recording_network_contents:h,clientVersion:this.firstloadVersion,firstloadVersion:this.firstloadVersion,clientConfig:JSON.stringify(this.tl),environment:this.environment,id:u,appVersion:this.appVersion,serviceName:this.serviceName,session_secure_id:this.sessionData.sessionSecureID,client_id:u,network_recording_domains:p,disable_session_recording:this.options.disableSessionRecording});if(g.initializeSession.secure_id!==this.sessionData.sessionSecureID&&this.logger.log(`Unexpected secure id returned by initializeSession: ${g.initializeSession.secure_id}, expected ${this.sessionData.sessionSecureID}`),this.sessionData.sessionSecureID=g.initializeSession.secure_id,this.sessionData.projectID=parseInt(((l=g==null?void 0:g.initializeSession)==null?void 0:l.project_id)||"0"),!this.sessionData.projectID||!this.sessionData.sessionSecureID){console.error("Failed to initialize Highlight; an error occurred on our end.",this.sessionData);return}}li(""),Sn(this.sessionData),this.logger.log(`Loaded Highlight
343
- Remote: ${this.hn}
341
+ `," ")))},rw="dmFyIFZyPU9iamVjdC5kZWZpbmVQcm9wZXJ0eSxqcj1PYmplY3QuZGVmaW5lUHJvcGVydGllczt2YXIgcXI9T2JqZWN0LmdldE93blByb3BlcnR5RGVzY3JpcHRvcnM7dmFyIEJlPU9iamVjdC5nZXRPd25Qcm9wZXJ0eVN5bWJvbHM7dmFyIFF0PU9iamVjdC5wcm90b3R5cGUuaGFzT3duUHJvcGVydHksWHQ9T2JqZWN0LnByb3RvdHlwZS5wcm9wZXJ0eUlzRW51bWVyYWJs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ZXJ0aWVzP3lpZWxkIGIoZy5kYXRhLm1lc3NhZ2UpOmcuZGF0YS5tZXNzYWdlLnR5cGU9PT1LLk1ldHJpY3M/eWllbGQgbShnLmRhdGEubWVzc2FnZSk6Zy5kYXRhLm1lc3NhZ2UudHlwZT09PUsuRmVlZGJhY2smJih5aWVsZCBOKGcuZGF0YS5tZXNzYWdlKSksaT0wfWNhdGNoKEUpe3MmJmNvbnNvbGUuZXJyb3IoRSksaSs9MX19KX19fSkoKTsKLy8jIHNvdXJjZU1hcHBpbmdVUkw9aGlnaGxpZ2h0LWNsaWVudC13b3JrZXItQ3BtbDJKMXQuanMubWFwCg==",cA=t=>Uint8Array.from(atob(t),e=>e.charCodeAt(0)),Vb=typeof self<"u"&&self.Blob&&new Blob([cA(rw)],{type:"text/javascript;charset=utf-8"});Ge=(t=>(t[t.Initialize=0]="Initialize",t[t.AsyncEvents=1]="AsyncEvents",t[t.Identify=2]="Identify",t[t.Properties=3]="Properties",t[t.Metrics=4]="Metrics",t[t.Feedback=5]="Feedback",t[t.CustomEvent=6]="CustomEvent",t[t.Stop=7]="Stop",t))(Ge||{}),hA=({apiKey:t})=>{(function(e,n){var r=e.amplitude||{ni:[],Ii:{}},i=n.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(){e.amplitude.runQueuedFunctions||console.log("[Amplitude] Error: could not load SDK"),amplitude.getInstance().init(t)};var o=n.getElementsByTagName("script")[0];o.parentNode.insertBefore(i,o);function s(d,v){d.prototype[v]=function(){return this.ni.push([v].concat(Array.prototype.slice.call(arguments,0))),this}}for(var a=function(){return this.ni=[],this},c=["add","append","clearAll","prepend","set","setOnce","unset","preInsert","postInsert","remove"],l=0;l<c.length;l++)s(a,c[l]);r.Identify=a;for(var u=function(){return this.ni=[],this},h=["setProductId","setQuantity","setPrice","setRevenueType","setEventProperties"],p=0;p<h.length;p++)s(u,h[p]);r.Revenue=u;var f=["init","logEvent","logRevenue","setUserId","setUserProperties","setOptOut","setVersionName","setDomain","setDeviceId","enableTracking","setGlobalUserProperties","identify","clearUserProperties","setGroup","logRevenueV2","regenerateDeviceId","groupIdentify","onInit","logEventWithTimestamp","logEventWithGroups","setSessionId","resetSessionId"];function m(d){function v(w){d[w]=function(){d.ni.push([w].concat(Array.prototype.slice.call(arguments,0)))}}for(var g=0;g<f.length;g++)v(f[g])}m(r),r.getInstance=function(d){return d=(!d||d.length===0?"$default_instance":d).toLowerCase(),Object.prototype.hasOwnProperty.call(r.Ii,d)||(r.Ii[d]={ni:[]},m(r.Ii[d])),r.Ii[d]},e.amplitude=r})(window,document)},pA=({projectToken:t})=>{if(window.mixpanel)return;(function(n,r){if(!r.__SV){var i,o;window.mixpanel=r,r.tl=[],r.init=function(s,a,c){function l(p,f){var m=f.split(".");m.length==2&&(p=p[m[0]],f=m[1]),p[f]=function(){p.push([f].concat(Array.prototype.slice.call(arguments,0)))}}var u=r;for(typeof c<"u"?u=r[c]=[]:c="mixpanel",u.people=u.people||[],u.toString=function(p){var f="mixpanel";return c!=="mixpanel"&&(f+="."+c),p||(f+=" (stub)"),f},u.people.toString=function(){return u.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(" "),o=0;o<i.length;o++)l(u,i[o]);var h="set set_once union unset remove delete".split(" ");u.get_group=function(){function p(v){f[v]=function(){call2_args=arguments,call2=[v].concat(Array.prototype.slice.call(call2_args,0)),u.push([m,call2])}}for(var f={},m=["get_group"].concat(Array.prototype.slice.call(arguments,0)),d=0;d<h.length;d++)p(h[d]);return f},r.tl.push([s,a,c])},r.__SV=1.2}})(document,window.mixpanel||[]);let e=document.createElement("script");e.src=dA,document.head.appendChild(e),e.addEventListener("load",()=>{var n;(n=window.mixpanel)==null||n.init(t)})},dA="https://cdn.mxpnl.com/libs/mixpanel-2-latest.min.js",fA="9.15.0",uh=class{constructor(e){Y(this,"options"),Y(this,"isRunningOnHighlight"),Y(this,"organizationID"),Y(this,"graphqlSDK"),Y(this,"events"),Y(this,"sessionData"),Y(this,"ready"),Y(this,"manualStopped"),Y(this,"state"),Y(this,"logger"),Y(this,"enableSegmentIntegration"),Y(this,"privacySetting"),Y(this,"enableCanvasRecording"),Y(this,"samplingStrategy"),Y(this,"inlineImages"),Y(this,"inlineVideos"),Y(this,"inlineStylesheet"),Y(this,"debugOptions"),Y(this,"listeners"),Y(this,"firstloadVersion"),Y(this,"environment"),Y(this,"sessionShortcut"),Y(this,"appVersion"),Y(this,"serviceName"),Y(this,"_worker"),Y(this,"_optionsInternal"),Y(this,"_backendUrl"),Y(this,"_recordingStartTime"),Y(this,"_isOnLocalHost"),Y(this,"_onToggleFeedbackFormVisibility"),Y(this,"_isCrossOriginIframe"),Y(this,"_eventBytesSinceSnapshot"),Y(this,"_lastSnapshotTime"),Y(this,"_lastVisibilityChangeTime"),Y(this,"pushPayloadTimerId"),Y(this,"hasSessionUnloaded"),Y(this,"hasPushedData"),Y(this,"reloaded"),Y(this,"_hasPreviouslyInitialized"),Y(this,"_recordStop"),Y(this,"_integrations",[]);var n,r,i,o,s;this.options=e,typeof((n=this.options)==null?void 0:n.debug)=="boolean"?this.debugOptions=this.options.debug?{clientInteractions:!0}:{}:this.debugOptions=(i=(r=this.options)==null?void 0:r.debug)!=null?i:{},this.logger=new xb(this.debugOptions.clientInteractions),this.Gr=new uA,this.Gr.onmessage=c=>{var l,u,h;((l=c.data.response)==null?void 0:l.type)===Ge.AsyncEvents?(this.ri+=c.data.response.eventsSize,this.logger.log(`Web worker sent payloadID ${c.data.response.id} size ${c.data.response.eventsSize} bytes, compression ratio ${c.data.response.eventsSize/c.data.response.compressedSize}.
342
+ Total since snapshot: ${(this.ri/1e6).toFixed(1)}MB`)):((u=c.data.response)==null?void 0:u.type)===Ge.CustomEvent?this.addCustomEvent(c.data.response.tag,c.data.response.payload):((h=c.data.response)==null?void 0:h.type)===Ge.Stop&&(Bt("worker.onmessage","warn","Stopping recording due to worker failure",c.data.response),this.stop(!1))};let a=xs();if(this.reloaded=!1,!((o=this.sessionData)!=null&&o.sessionSecureID)&&a!=null&&a.sessionSecureID)this.sessionData=a,this.options.sessionSecureID=a.sessionSecureID,this.reloaded=!0,this.logger.log(`Tab reloaded, continuing previous session: ${this.sessionData.sessionSecureID}`);else{for(let c of Object.values(zt))yu(c);this.sessionData={sessionSecureID:this.options.sessionSecureID,projectID:0,payloadID:1,sessionStartTime:Date.now()}}this.gs=!1;try{window.parent.document&&(this.fo=!1)}catch(c){this.fo=(s=this.options.recordCrossOriginIframe)!=null?s:!0}this.el(this.options)}bs(e){return Kt(this,arguments,function*({forceNew:n}){this.pushPayloadTimerId&&(clearTimeout(this.pushPayloadTimerId),this.pushPayloadTimerId=void 0);let r,i;if(!n)try{r=oe(zt.USER_IDENTIFIER);let o=oe(zt.USER_OBJECT);o&&(i=JSON.parse(o))}catch(o){}for(let o of Object.values(zt))yu(o);this.sessionData.sessionSecureID=bu(),this.sessionData.sessionStartTime=Date.now(),this.options.sessionSecureID=this.sessionData.sessionSecureID,this.stop(),yield this.start(),r&&i&&this.identify(r,i)})}el(e){var n,r,i,o,s,a,c,l,u;this.sessionShortcut=!1,this.Lr=0,this.mo=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=!!e.enableSegmentIntegration,this.privacySetting=(n=e.privacySetting)!=null?n:"default",this.enableCanvasRecording=(r=e.enableCanvasRecording)!=null?r:!1,this.inlineImages=(i=e.inlineImages)!=null?i:this.mo,this.inlineVideos=(o=e.inlineVideos)!=null?o:this.mo,this.inlineStylesheet=(s=e.inlineStylesheet)!=null?s:this.mo,this.samplingStrategy=z({canvasFactor:.5,canvasMaxSnapshotDimension:360,canvasClearWebGLBuffer:!0,dataUrlOptions:PX()},(a=e.samplingStrategy)!=null?a:{canvas:2}),this.Bn=(c=e==null?void 0:e.backendUrl)!=null?c:"https://pub.observability.app.launchdarkly.com",this.Bn[0]==="/"&&(this.Bn=new URL(this.Bn,document.baseURI).href);let h=new fX(`${this.Bn}`,{headers:{}});this.graphqlSDK=WX(h,oW()),this.environment=(l=e.environment)!=null?l:"production",this.appVersion=e.appVersion,this.serviceName=(u=e.serviceName)!=null?u:"browser",typeof e.organizationID=="string"?this.organizationID=e.organizationID:this.organizationID=e.organizationID.toString(),this.isRunningOnHighlight=this.organizationID==="1"||this.organizationID==="1jdkoe52",this.firstloadVersion=e.firstloadVersion||"unknown",this.sessionShortcut=e.sessionShortcut||!1,this.cl=()=>{};let p=e,f=sr(p,["firstloadVersion"]);this.nl=f,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.ri=0,this.yo=new Date().getTime(),this.vs=new Date().getTime()}identify(e,n={},r){if(!e||e===""){console.warn("Highlight's identify() call was passed an empty identifier.",{user_identifier:e,user_object:n});return}this.sessionData.userIdentifier=e.toString(),this.sessionData.userObject=n,Be(zt.USER_IDENTIFIER,e.toString()),Be(zt.USER_OBJECT,JSON.stringify(n)),this.Gr.postMessage({message:{type:Ge.Identify,userIdentifier:e,userObject:n,source:r}})}track(e,n){this.addProperties(_t(z({},n),{event:e}))}addProperties(e={},n){let r=z({},e);Object.entries(r).forEach(([i,o])=>{try{structuredClone(o)}catch(s){delete r[i]}}),this.Gr.postMessage({message:{type:Ge.Properties,propertiesObject:r,propertyType:n}})}start(e){return Kt(this,null,function*(){var n,r,i,o,s,a,c,l;if(!(navigator!=null&&navigator.webdriver&&!window.Cypress||(n=navigator==null?void 0:navigator.userAgent)!=null&&n.includes("Googlebot")||(r=navigator==null?void 0:navigator.userAgent)!=null&&r.includes("AdsBot")))try{if(e!=null&&e.forceNew){yield this.bs(e);return}this.logger.log("Initializing...",e,this.sessionData,this.options),this.sessionData=(i=xs(this.sessionData.sessionSecureID))!=null?i:this.sessionData,(o=this.sessionData)!=null&&o.sessionStartTime?this.Lr=(s=this.sessionData)==null?void 0:s.sessionStartTime:(this.Lr=new Date().getTime(),this.sessionData.sessionStartTime=this.Lr);let u=oe(du.CLIENT_ID);u||(u=bu(),Be(du.CLIENT_ID,u));let h;this.options.disableSessionRecording||this.options.disableNetworkRecording!==void 0||typeof this.options.networkRecording=="boolean"?h=!1:h=((a=this.options.networkRecording)==null?void 0:a.recordHeadersAndBody)||!1;let p=[];if(typeof this.options.networkRecording=="object"&&(c=this.options.networkRecording.destinationDomains)!=null&&c.length&&(p=this.options.networkRecording.destinationDomains),this.fo)yield this.rl();else{let g=yield this.graphqlSDK.initializeSession({organization_verbose_id:this.organizationID,enable_strict_privacy:this.privacySetting==="strict",privacy_setting:this.privacySetting,enable_recording_network_contents:h,clientVersion:this.firstloadVersion,firstloadVersion:this.firstloadVersion,clientConfig:JSON.stringify(this.nl),environment:this.environment,id:u,appVersion:this.appVersion,serviceName:this.serviceName,session_secure_id:this.sessionData.sessionSecureID,client_id:u,network_recording_domains:p,disable_session_recording:this.options.disableSessionRecording});if(g.initializeSession.secure_id!==this.sessionData.sessionSecureID&&this.logger.log(`Unexpected secure id returned by initializeSession: ${g.initializeSession.secure_id}, expected ${this.sessionData.sessionSecureID}`),this.sessionData.sessionSecureID=g.initializeSession.secure_id,this.sessionData.projectID=parseInt(((l=g==null?void 0:g.initializeSession)==null?void 0:l.project_id)||"0"),!this.sessionData.projectID||!this.sessionData.sessionSecureID){console.error("Failed to initialize Highlight; an error occurred on our end.",this.sessionData);return}}ui(""),In(this.sessionData),this.logger.log(`Loaded Highlight
343
+ Remote: ${this.Bn}
344
344
  Project ID: ${this.sessionData.projectID}
345
- SessionSecureID: ${this.sessionData.sessionSecureID}`),this.options.sessionSecureID=this.sessionData.sessionSecureID,this.Hn.postMessage({message:{type:Oe.Initialize,sessionSecureID:this.sessionData.sessionSecureID,backend:this.hn,debug:!!this.debugOptions.clientInteractions,recordingStartTime:this.zn}});for(let g of this.Vn)g.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.po||(this.pushPayloadTimerId=setTimeout(()=>{this.vs()},og)),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}let f=(g,w)=>{w&&this.logger.log("received isCheckout emit",{event:g}),this.events.push(g)};f.bind(this);let m=!!this.vn;this.vn&&(this.vn(),this.vn=void 0);let[d,v]=RF(this.privacySetting);this.vn=Le({ignoreClass:"highlight-ignore",blockClass:"highlight-block",emit:f,recordCrossOriginIframes:this.options.recordCrossOriginIframe,privacySetting:this.privacySetting,maskAllInputs:d,maskInputOptions:v,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:g=>!this.options.recordCrossOriginIframe,inlineImages:this.inlineImages,inlineVideos:this.inlineVideos,collectFonts:this.inlineImages,inlineStylesheet:this.inlineStylesheet,plugins:[nW()],logger:typeof this.options.debug=="boolean"&&this.options.debug||typeof this.options.debug=="object"&&this.options.debug.domRecording?{debug:this.logger.log,warn:Ht.bind("RecordSDK","warn")}:void 0}),m||this.options.recordCrossOriginIframe&&this.nl(),document.referrer&&(window&&document.referrer.includes(window.location.origin)||(this.addCustomEvent("Referrer",document.referrer),this.addProperties({referrer:document.referrer},{type:"session"}))),this.rl(),this.ready=!0,this.state="Recording",this.manualStopped=!1}catch(u){Ht("initializeSession _setupWindowListeners","warn",u)}})}ws(e){return Yt(this,null,function*(){if(this.manualStopped){this.logger.log("Ignoring visibility event due to manual stop.");return}new Date().getTime()-this.bs<wX||(this.bs=new Date().getTime(),this.logger.log(`Detected window ${e?"hidden":"visible"}.`),e?(this.addCustomEvent("TabHidden",!0),this.options.disableBackgroundRecording&&this.stop()):(this.options.disableBackgroundRecording&&(yield this.start()),this.addCustomEvent("TabHidden",!1)))})}el(){return Yt(this,null,function*(){this.logger.log("highlight in cross-origin iframe is waiting "),yield new Promise(e=>{let n=r=>{if(r.data.highlight===mb){let i=r.data;this.logger.log("highlight got window message ",i),this.sessionData.projectID=i.projectID,this.sessionData.sessionSecureID=i.sessionSecureID,window.parent.postMessage({highlight:yb},"*"),window.removeEventListener("message",n),e()}};window.addEventListener("message",n)})})}nl(){this.logger.log("highlight setting up cross origin iframe parent notification"),setInterval(()=>{window.document.querySelectorAll("iframe").forEach(e=>{var n;(n=e.contentWindow)==null||n.postMessage({highlight:mb,projectID:this.sessionData.projectID,sessionSecureID:this.sessionData.sessionSecureID},"*")})},og),window.addEventListener("message",e=>{e.data.highlight===yb&&this.logger.log("highlight got response from initialized iframe")})}rl(){var e;try{let r=this;this.enableSegmentIntegration&&this.listeners.push(VF(o=>{if(o.type==="track"){let s={};s["segment-event"]=o.event,r.addProperties(s,{type:"track",source:"segment"})}else if(o.type==="identify"){let s=o.userId.replace(/^"(.*)"$/,"$1");r.identify(s,o.traits,"segment")}})),this.listeners.push(EF(o=>{this.reloaded?(this.addCustomEvent("Reload",o),this.reloaded=!1,r.addProperties({reload:!0},{type:"session"})):this.addCustomEvent("Navigate",o)})),this.listeners.push(zX(o=>{this.addCustomEvent("Viewport",o)})),this.listeners.push(CF((o,s)=>{let a=null,c=null;if(s&&s.target){let l=s.target;a=_X(l),c=l.textContent,c&&c.length>2e3&&(c=c.substring(0,2e3))}this.addCustomEvent("Click",{clickTarget:o,clickTextContent:c,clickSelector:a})})),this.listeners.push(ZF(o=>{o&&this.addCustomEvent("Focus",o)})),this.sessionShortcut&&NF(this.sessionShortcut,()=>{window.open(this.getCurrentSessionURLWithTimestamp(),"_blank")}),this.ys||((e=window.electron)!=null&&e.ipcRenderer?(window.electron.ipcRenderer.on("highlight.run",({visible:o})=>{this.ws(!o)}),this.logger.log("Set up Electron highlight.run events.")):(kF(o=>this.ws(o)),this.logger.log("Set up document visibility listener.")),this.ys=!0);let i=()=>{this.hasSessionUnloaded=!0,this.pushPayloadTimerId&&(clearTimeout(this.pushPayloadTimerId),this.pushPayloadTimerId=void 0)};window.addEventListener("beforeunload",i),this.listeners.push(()=>window.removeEventListener("beforeunload",i))}catch(r){Ht("initializeSession _setupWindowListeners","warn",r)}let n=()=>{this.addCustomEvent("Page Unload",""),li(this.sessionData.sessionSecureID),Sn(this.sessionData)};if(window.addEventListener("beforeunload",n),this.listeners.push(()=>window.removeEventListener("beforeunload",n)),navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/iPhone/i)){let r=()=>{this.addCustomEvent("Page Unload",""),li(this.sessionData.sessionSecureID),Sn(this.sessionData)};window.addEventListener("pagehide",r),this.listeners.push(()=>window.removeEventListener("beforeunload",r))}}stop(e){this.manualStopped=!!e,this.manualStopped&&this.addCustomEvent("Stop","H.stop() was called which stops Highlight from recording."),this.state="NotRecording",e&&this.vn&&(this.vn(),this.vn=void 0),this.listeners.forEach(n=>n()),this.listeners=[]}getCurrentSessionURLWithTimestamp(){let e=new Date().getTime(),{projectID:n,sessionSecureID:r}=this.sessionData,i=(e-this.zn)/1e3;return`https://${ag}/${n}/sessions/${r}?ts=${i}`}getCurrentSessionURL(){let e=this.sessionData.projectID,n=this.sessionData.sessionSecureID;return e&&n?`https://${ag}/${e}/sessions/${n}`:null}snapshot(e){return Yt(this,null,function*(){yield Le.snapshotCanvas(e)})}addSessionFeedback({timestamp:e,verbatim:n,user_email:r,user_name:i}){var o;this.Hn.postMessage({message:{type:Oe.Feedback,verbatim:n,timestamp:e,userName:i||this.sessionData.userIdentifier,userEmail:r||((o=this.sessionData.userObject)==null?void 0:o.name)}})}vs(){return Yt(this,null,function*(){var e;try{this.state==="Recording"&&this.listeners&&this.sessionData.sessionStartTime&&Date.now()-this.sessionData.sessionStartTime>vX&&(this.logger.log("Resetting session",{start:this.sessionData.sessionStartTime}),yield this.gs({}));let n;((e=this.options)==null?void 0:e.sendMode)==="local"&&(n=r=>Yt(this,null,function*(){let i=new Blob([JSON.stringify({query:Ob(Pb),variables:r})],{type:"application/json"});return yield window.fetch(`${this.hn}`,{method:"POST",body:i}),0})),yield this.il({sendFn:n}),this.hasPushedData=!0,this.sessionData.lastPushTime=Date.now(),Sn(this.sessionData)}catch(n){Ht("_save","warn",n)}this.state==="Recording"&&(this.pushPayloadTimerId&&(clearTimeout(this.pushPayloadTimerId),this.pushPayloadTimerId=void 0),this.pushPayloadTimerId=setTimeout(()=>{this.vs()},bX))})}addCustomEvent(e,n){if(this.state==="NotRecording"){let r,i=()=>{clearInterval(r),this.state==="Recording"&&this.events.length>0?pb(e,n):r=setTimeout(i,500)};r=setTimeout(i,500)}else this.state==="Recording"&&(this.events.length>0||this.hasPushedData)&&pb(e,n)}il(e){return Yt(this,arguments,function*({sendFn:n}){let r=[...this.events],{bytes:i,time:o}=this.enableCanvasRecording?sg.canvas:sg.normal;this.gr>=i&&new Date().getTime()-this.mo>=o&&this.takeFullSnapshot(),this.logger.log(`Sending: ${r.length} events,
346
- To: ${this.hn}
345
+ SessionSecureID: ${this.sessionData.sessionSecureID}`),this.options.sessionSecureID=this.sessionData.sessionSecureID,this.Gr.postMessage({message:{type:Ge.Initialize,sessionSecureID:this.sessionData.sessionSecureID,backend:this.Bn,debug:!!this.debugOptions.clientInteractions,recordingStartTime:this.Lr}});for(let g of this.mr)g.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.fo||(this.pushPayloadTimerId=setTimeout(()=>{this.ws()},gg)),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}let f=(g,w)=>{w&&this.logger.log("received isCheckout emit",{event:g}),this.events.push(g)};f.bind(this);let m=!!this.or;this.or&&(this.or(),this.or=void 0);let[d,v]=_F(this.privacySetting);this.or=Xe({ignoreClass:"highlight-ignore",blockClass:"highlight-block",emit:f,recordCrossOriginIframes:this.options.recordCrossOriginIframe,privacySetting:this.privacySetting,maskAllInputs:d,maskInputOptions:v,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:g=>!this.options.recordCrossOriginIframe,inlineImages:this.inlineImages,inlineVideos:this.inlineVideos,collectFonts:this.inlineImages,inlineStylesheet:this.inlineStylesheet,plugins:[TW()],logger:typeof this.options.debug=="boolean"&&this.options.debug||typeof this.options.debug=="object"&&this.options.debug.domRecording?{debug:this.logger.log,warn:Bt.bind("RecordSDK","warn")}:void 0}),m||this.options.recordCrossOriginIframe&&this.il(),document.referrer&&(window&&document.referrer.includes(window.location.origin)||(this.addCustomEvent("Referrer",document.referrer),this.addProperties({referrer:document.referrer},{type:"session"}))),this.ol(),this.ready=!0,this.state="Recording",this.manualStopped=!1}catch(u){Bt("initializeSession _setupWindowListeners","warn",u)}})}Ss(e){return Kt(this,null,function*(){if(this.manualStopped){this.logger.log("Ignoring visibility event due to manual stop.");return}new Date().getTime()-this.vs<AX||(this.vs=new Date().getTime(),this.logger.log(`Detected window ${e?"hidden":"visible"}.`),e?(this.addCustomEvent("TabHidden",!0),this.options.disableBackgroundRecording&&this.stop()):(this.options.disableBackgroundRecording&&(yield this.start()),this.addCustomEvent("TabHidden",!1)))})}rl(){return Kt(this,null,function*(){this.logger.log("highlight in cross-origin iframe is waiting "),yield new Promise(e=>{let n=r=>{if(r.data.highlight===Zb){let i=r.data;this.logger.log("highlight got window message ",i),this.sessionData.projectID=i.projectID,this.sessionData.sessionSecureID=i.sessionSecureID,window.parent.postMessage({highlight:kb},"*"),window.removeEventListener("message",n),e()}};window.addEventListener("message",n)})})}il(){this.logger.log("highlight setting up cross origin iframe parent notification"),setInterval(()=>{window.document.querySelectorAll("iframe").forEach(e=>{var n;(n=e.contentWindow)==null||n.postMessage({highlight:Zb,projectID:this.sessionData.projectID,sessionSecureID:this.sessionData.sessionSecureID},"*")})},gg),window.addEventListener("message",e=>{e.data.highlight===kb&&this.logger.log("highlight got response from initialized iframe")})}ol(){var e;try{let r=this;this.enableSegmentIntegration&&this.listeners.push(jF(o=>{if(o.type==="track"){let s={};s["segment-event"]=o.event,r.addProperties(s,{type:"track",source:"segment"})}else if(o.type==="identify"){let s=o.userId.replace(/^"(.*)"$/,"$1");r.identify(s,o.traits,"segment")}})),this.listeners.push(KF(o=>{this.reloaded?(this.addCustomEvent("Reload",o),this.reloaded=!1,r.addProperties({reload:!0},{type:"session"})):this.addCustomEvent("Navigate",o)})),this.listeners.push(mW(o=>{this.addCustomEvent("Viewport",o)})),this.listeners.push(HF((o,s)=>{let a=null,c=null;if(s&&s.target){let l=s.target;a=dW(l),c=l.textContent,c&&c.length>2e3&&(c=c.substring(0,2e3))}this.addCustomEvent("Click",{clickTarget:o,clickTextContent:c,clickSelector:a})})),this.listeners.push(zF(o=>{o&&this.addCustomEvent("Focus",o)})),this.sessionShortcut&&$F(this.sessionShortcut,()=>{window.open(this.getCurrentSessionURLWithTimestamp(),"_blank")}),this.gs||((e=window.electron)!=null&&e.ipcRenderer?(window.electron.ipcRenderer.on("highlight.run",({visible:o})=>{this.Ss(!o)}),this.logger.log("Set up Electron highlight.run events.")):(BF(o=>this.Ss(o)),this.logger.log("Set up document visibility listener.")),this.gs=!0);let i=()=>{this.hasSessionUnloaded=!0,this.pushPayloadTimerId&&(clearTimeout(this.pushPayloadTimerId),this.pushPayloadTimerId=void 0)};window.addEventListener("beforeunload",i),this.listeners.push(()=>window.removeEventListener("beforeunload",i))}catch(r){Bt("initializeSession _setupWindowListeners","warn",r)}let n=()=>{this.addCustomEvent("Page Unload",""),ui(this.sessionData.sessionSecureID),In(this.sessionData)};if(window.addEventListener("beforeunload",n),this.listeners.push(()=>window.removeEventListener("beforeunload",n)),navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/iPhone/i)){let r=()=>{this.addCustomEvent("Page Unload",""),ui(this.sessionData.sessionSecureID),In(this.sessionData)};window.addEventListener("pagehide",r),this.listeners.push(()=>window.removeEventListener("beforeunload",r))}}stop(e){this.manualStopped=!!e,this.manualStopped&&this.addCustomEvent("Stop","H.stop() was called which stops Highlight from recording."),this.state="NotRecording",e&&this.or&&(this.or(),this.or=void 0),this.listeners.forEach(n=>n()),this.listeners=[]}getCurrentSessionURLWithTimestamp(){let e=new Date().getTime(),{projectID:n,sessionSecureID:r}=this.sessionData,i=(e-this.Lr)/1e3;return`https://${vg}/${n}/sessions/${r}?ts=${i}`}getCurrentSessionURL(){let e=this.sessionData.projectID,n=this.sessionData.sessionSecureID;return e&&n?`https://${vg}/${e}/sessions/${n}`:null}snapshot(e){return Kt(this,null,function*(){yield Xe.snapshotCanvas(e)})}addSessionFeedback({timestamp:e,verbatim:n,user_email:r,user_name:i}){var o;this.Gr.postMessage({message:{type:Ge.Feedback,verbatim:n,timestamp:e,userName:i||this.sessionData.userIdentifier,userEmail:r||((o=this.sessionData.userObject)==null?void 0:o.name)}})}ws(){return Kt(this,null,function*(){var e;try{this.state==="Recording"&&this.listeners&&this.sessionData.sessionStartTime&&Date.now()-this.sessionData.sessionStartTime>FX&&(this.logger.log("Resetting session",{start:this.sessionData.sessionStartTime}),yield this.bs({}));let n;((e=this.options)==null?void 0:e.sendMode)==="local"&&(n=r=>Kt(this,null,function*(){let i=new Blob([JSON.stringify({query:Yb(jb),variables:r})],{type:"application/json"});return yield window.fetch(`${this.Bn}`,{method:"POST",body:i}),0})),yield this.sl({sendFn:n}),this.hasPushedData=!0,this.sessionData.lastPushTime=Date.now(),In(this.sessionData)}catch(n){Bt("_save","warn",n)}this.state==="Recording"&&(this.pushPayloadTimerId&&(clearTimeout(this.pushPayloadTimerId),this.pushPayloadTimerId=void 0),this.pushPayloadTimerId=setTimeout(()=>{this.ws()},MX))})}addCustomEvent(e,n){if(this.state==="NotRecording"){let r,i=()=>{clearInterval(r),this.state==="Recording"&&this.events.length>0?Eb(e,n):r=setTimeout(i,500)};r=setTimeout(i,500)}else this.state==="Recording"&&(this.events.length>0||this.hasPushedData)&&Eb(e,n)}sl(e){return Kt(this,arguments,function*({sendFn:n}){let r=[...this.events],{bytes:i,time:o}=this.enableCanvasRecording?bg.canvas:bg.normal;this.ri>=i&&new Date().getTime()-this.yo>=o&&this.takeFullSnapshot(),this.logger.log(`Sending: ${r.length} events,
346
+ To: ${this.Bn}
347
347
  Org: ${this.organizationID}
348
- SessionSecureID: ${this.sessionData.sessionSecureID}`);let s=FF();n?yield n({session_secure_id:this.sessionData.sessionSecureID,payload_id:(this.sessionData.payloadID++).toString(),events:{events:r},messages:QL({messages:[]}),resources:JSON.stringify({resources:[]}),web_socket_events:JSON.stringify({webSocketEvents:[]}),errors:[],is_beacon:!1,has_session_unloaded:this.hasSessionUnloaded,highlight_logs:s||void 0}):this.Hn.postMessage({message:{type:Oe.AsyncEvents,id:this.sessionData.payloadID++,events:r,messages:[],errors:[],resourcesString:JSON.stringify({resources:[]}),webSocketEventsString:JSON.stringify({webSocketEvents:[]}),hasSessionUnloaded:this.hasSessionUnloaded,highlightLogs:s}}),Sn(this.sessionData),this.events=this.events.slice(r.length),AF(s)})}takeFullSnapshot(){if(!this.vn){this.logger.log("skipping full snapshot as rrweb is not running");return}this.logger.log("taking full snapshot",{bytesSinceSnapshot:this.gr,lastSnapshotTime:this.mo}),Le.takeFullSnapshot(),this.gr=0,this.mo=new Date().getTime()}register(e,n){this.Vn.push(new hu(e,n))}getHooks(e){return this.Vn.flatMap(n=>{var r,i;return(i=(r=n.getHooks)==null?void 0:r.call(n,e))!=null?i:[]})}getRecordingState(){var e;return(e=this==null?void 0:this.state)!=null?e:"NotRecording"}getSession(){let e=this.sessionData.sessionSecureID,n=Zs(e);if(!n)return null;let r=`${this.getFrontendUrl()}/sessions/${e}`;if(!r||!(n!=null&&n.sessionStartTime))return null;let i=new Date().getTime(),o=new URL(r),s=new URL(r),a=(i-this.zn)/1e3;return s.searchParams.set("ts",a.toString()),{url:o.toString(),urlWithTimestamp:s.toString(),sessionSecureID:e}}getFrontendUrl(){var e,n;let r=this.hn.match(EX);if(r&&(e=r==null?void 0:r.groups)!=null&&e.domain){let i=(n=r.groups.domain)!=null?n:"";return`https://${IX[i]}${TX}`}return SX}},Ci=class extends BX{constructor(e,n){var r=(...f)=>(super(...f),Y(this,"record"),this),i,o,s,a,c,l,u,h,p;try{if(r(n),typeof window>"u"||typeof document>"u"){console.warn("@launchdarkly/session-replay is not initializing because it is not supported in this environment.");return}if(typeof Worker>"u"){console.warn("@launchdarkly/session-replay is not initializing because Worker is not supported.");return}if(!e){console.warn("@launchdarkly/session-replay is not initializing because projectID was passed undefined.");return}let f=Kt(z({},n),{organizationID:e,firstloadVersion:HF,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 ih(f),n!=null&&n.manualStart||this.record.start(),In.load(this.record),!((s=(o=n==null?void 0:n.integrations)==null?void 0:o.mixpanel)!=null&&s.disabled)&&(c=(a=n==null?void 0:n.integrations)==null?void 0:a.mixpanel)!=null&&c.projectToken&&KF(n.integrations.mixpanel),!((u=(l=n==null?void 0:n.integrations)==null?void 0:l.amplitude)!=null&&u.disabled)&&(p=(h=n==null?void 0:n.integrations)==null?void 0:h.amplitude)!=null&&p.apiKey&&YF(n.integrations.amplitude)}catch(f){Ht("Error initializing @launchdarkly/session-replay SDK","error",f)}}getMetadata(){return{name:"@launchdarkly/session-replay"}}register(e,n){var r;(r=this.record)==null||r.register(e,n)}getHooks(e){return[{getMetadata:()=>({name:"@launchdarkly/session-replay/hooks"}),afterIdentify:(n,r,i)=>{var o,s,a,c,l,u,h;for(let p of(a=(s=(o=this.record)==null?void 0:o.getHooks)==null?void 0:s.call(o,e))!=null?a:[])(c=p.afterIdentify)==null||c.call(p,n,r,i);if(i.status==="completed"){let p=DX(n.context),f=YX(n.context);(h=this.record)==null||h.identify(typeof f=="string"?f:(u=(l=f.user)==null?void 0:l.toString())!=null?u:p,Kt(z({key:p},typeof f=="object"?f:{}),{timeout:n.timeout}),"LaunchDarkly")}return r},afterEvaluation:(n,r,i)=>{var o,s,a,c;for(let l of(a=(s=(o=this.record)==null?void 0:o.getHooks)==null?void 0:s.call(o,e))!=null?a:[])(c=l.afterEvaluation)==null||c.call(l,n,r,i);return r},afterTrack:n=>{var r,i,o,s,a;for(let c of(o=(i=(r=this.record)==null?void 0:r.getHooks)==null?void 0:i.call(r,e))!=null?o:[])(s=c.afterTrack)==null||s.call(c,n);(a=this.record)==null||a.track(n.key,{data:n.data,value:n.metricValue})}}]}}});var tw=Object.defineProperty,ew=Object.defineProperties,nw=Object.getOwnPropertyDescriptors,Pi=Object.getOwnPropertySymbols,dp=Object.prototype.hasOwnProperty,fp=Object.prototype.propertyIsEnumerable,Dh=(t,e,n)=>e in t?tw(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ot=(t,e)=>{for(var n in e||(e={}))dp.call(e,n)&&Dh(t,n,e[n]);if(Pi)for(var n of Pi(e))fp.call(e,n)&&Dh(t,n,e[n]);return t},me=(t,e)=>ew(t,nw(e)),mp=(t,e)=>{var n={};for(var r in t)dp.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Pi)for(var r of Pi(t))e.indexOf(r)<0&&fp.call(t,r)&&(n[r]=t[r]);return n};function rw(t){return`/${t.replace(/~/g,"~0").replace(/\//g,"~1")}`}function yp(t){return t.indexOf("~")?t.replace(/~1/g,"/").replace(/~0/g,"~"):t}function iw(t){return(t.startsWith("/")?t.substring(1):t).split("/").map(e=>yp(e))}function ow(t){return!t.startsWith("/")}function sw(t){return!t.match(/\/\/|(^\/.*~[^0|^1])|~$/)}var Nn=class{constructor(t,e=!1){if(e){let n=t;this.g=[n],this.isValid=n!=="",this.redactionName=n.startsWith("/")?rw(n):n}else{if(this.redactionName=t,t===""||t==="/"||!sw(t)){this.isValid=!1,this.g=[];return}ow(t)?this.g=[t]:t.indexOf("/",1)<0?this.g=[yp(t.slice(1))]:this.g=iw(t),this.g[0]==="_meta"?this.isValid=!1:this.isValid=!0}}get(t){let{g:e,isValid:n}=this;if(!n)return;let r=t;for(let i=0;i<e.length;i+=1){let o=e[i];if(r!=null&&Object.prototype.hasOwnProperty.call(r,o)&&typeof r=="object"&&!Array.isArray(r))r=r[o];else return}return r}getComponent(t){return this.g[t]}get depth(){return this.g.length}get isKind(){return this.g.length===1&&this.g[0]==="kind"}compare(t){return this.depth===t.depth&&this.g.every((e,n)=>e===t.getComponent(n))}get components(){return[...this.g]}};Nn.InvalidReference=new Nn("");var aw=class{is(t){if(Array.isArray(t))return!1;let e=typeof t;return e==="function"||e==="object"}getType(){return"factory method or object"}},Ln=class{constructor(t,e){this.ft=t,this.typeOf=typeof e}is(t){return Array.isArray(t)?!1:typeof t===this.typeOf}getType(){return this.ft}},gp=class{constructor(t,e){this.ft=t,this.typeOf=typeof e}is(t){return Array.isArray(t)?t.length>0?t.every(e=>typeof e===this.typeOf):!0:!1}getType(){return this.ft}},bp=class extends Ln{constructor(t){super(`number with minimum value of ${t}`,0),this.min=t}is(t){return typeof t===this.typeOf&&t>=this.min}},vp=class extends Ln{constructor(t){super(`string matching ${t}`,""),this.expression=t}is(t){return typeof t=="string"&&!!t.match(this.expression)}},lw=class{is(t){return typeof t=="function"}getType(){return"function"}},cw=class{is(t){return typeof t=="boolean"||typeof t=="undefined"||t===null}getType(){return"boolean | undefined | null"}},uw=/^\d\d\d\d-\d\d-\d\dT\d\d:\d\d:\d\d(\.\d\d*)?(Z|[-+]\d\d(:\d\d)?)/,hw=class{is(t){return typeof t=="number"||typeof t=="string"&&uw.test(t)}getType(){return"date"}},pw=class extends vp{constructor(){super(/^(\w|\.|-)+$/)}is(t){return super.is(t)&&t!=="kind"}},dw=class{constructor(t){this.qt=t}is(t){return typeof t=="string"&&this.qt.includes(t)}getType(){return this.qt.join(" | ")}};function Yh(t){return t==null}var G=class{static createTypeArray(t,e){return new gp(t,e)}static numberWithMin(t){return new bp(t)}static stringMatchingRegex(t){return new vp(t)}static oneOf(...t){return new dw(t)}};G.String=new Ln("string","");G.Number=new Ln("number",0);G.ObjectOrFactory=new aw;G.Object=new Ln("object",{});G.StringArray=new gp("string[]","");G.Boolean=new Ln("boolean",!0);G.Function=new lw;G.Date=new hw;G.Kind=new pw;G.NullableBoolean=new cw;function wp(t){return"kind"in t?G.String.is(t.kind)&&t.kind!=="multi":!1}function Sp(t){return"kind"in t?G.String.is(t.kind)&&t.kind==="multi":!1}function Ip(t){return!("kind"in t)||t.kind===null||t.kind===void 0}function Mi(t,e=[]){if(t===null||typeof t!="object")return JSON.stringify(t);if(e.includes(t))throw new Error("Cycle detected");return Array.isArray(t)?`[${t.map(n=>Mi(n,[...e,t])).map(n=>n===void 0?"null":n).join(",")}]`:`{${Object.keys(t).sort().map(n=>{let r=Mi(t[n],[...e,t]);if(r!==void 0)return`${JSON.stringify(n)}:${r}`}).filter(n=>n!==void 0).join(",")}}`}var La="user";function Kh(t){return t.includes("%")||t.includes(":")?t.replace(/%/g,"%25").replace(/:/g,"%3A"):t}function fw(t){return t&&G.Object.is(t)}function _h(t){return G.Kind.is(t)}function Hh(t){return G.String.is(t)&&t!==""}function Ra(t,e=!1){return t?t.map(n=>new Nn(n,e)):[]}function mw(t){return t!=null}function yw(t){let e=me(ot({},t.custom||[]),{kind:"user",key:String(t.key)});if(mw(t.anonymous)){let n=!!t.anonymous;delete e.anonymous,e.anonymous=n}return t.name!==null&&t.name!==void 0&&(e.name=t.name),t.ip!==null&&t.ip!==void 0&&(e.ip=t.ip),t.firstName!==null&&t.firstName!==void 0&&(e.firstName=t.firstName),t.lastName!==null&&t.lastName!==void 0&&(e.lastName=t.lastName),t.email!==null&&t.email!==void 0&&(e.email=t.email),t.avatar!==null&&t.avatar!==void 0&&(e.avatar=t.avatar),t.country!==null&&t.country!==void 0&&(e.country=t.country),t.privateAttributeNames!==null&&t.privateAttributeNames!==void 0&&(e._meta={privateAttributes:t.privateAttributeNames}),e}var xn=class St{constructor(e,n,r){this.C=!1,this.Q=!1,this.Jt=!1,this.N={},this.kind=n,this.valid=e,this.message=r}static b(e,n){return new St(!1,e,n)}static Te(e,n){if(!(!n||!e.isValid))return e.depth===1&&e.getComponent(0)==="anonymous"?!!(n!=null&&n.anonymous):e.get(n)}Yt(e){if(this.C)return this.N[e];if(this.kind===e)return this.y}static Ne(e){let n=Object.keys(e).filter(c=>c!=="kind"),r=n.every(_h);if(!n.length)return St.b("multi","A multi-kind context must contain at least one kind");if(!r)return St.b("multi","Context contains invalid kinds");let i={},o=!0,s=n.reduce((c,l)=>{var u;let h=e[l];return fw(h)?(c[l]=h,i[l]=Ra((u=h._meta)==null?void 0:u.privateAttributes)):o=!1,c},{});if(!o)return St.b("multi","Context contained contexts that were not objects");if(!Object.values(s).every(c=>Hh(c.key)))return St.b("multi","Context contained invalid keys");if(n.length===1){let c=n[0],l=new St(!0,c);return l.y=me(ot({},s[c]),{kind:c}),l.tt=i,l.Q=c==="user",l}let a=new St(!0,e.kind);return a.N=s,a.tt=i,a.C=!0,a}static $e(e){var n;let{key:r,kind:i}=e,o=_h(i),s=Hh(r);if(!o)return St.b(i!=null?i:"unknown","The kind was not valid for the context");if(!s)return St.b(i,"The key for the context was not valid");let a=Ra((n=e._meta)==null?void 0:n.privateAttributes),c=new St(!0,i);return c.Q=i==="user",c.y=e,c.tt={[i]:a},c}static Re(e){if(!(e.key!==void 0&&e.key!==null))return St.b("user","The key for the context was not valid");let n=new St(!0,"user");return n.Q=!0,n.Jt=!0,n.y=yw(e),n.tt={user:Ra(e.privateAttributeNames,!0)},n}static fromLDContext(e){return e?wp(e)?St.$e(e):Sp(e)?St.Ne(e):Ip(e)?St.Re(e):St.b("unknown","Context was not of a valid kind"):St.b("unknown","No context specified. Returning default value")}static toLDContext(e){if(!e.valid)return;let n=e.getContexts();if(!e.C)return n[0][1];let r={kind:"multi"};return n.forEach(i=>{let o=i[0],s=i[1];r[o]=s}),r}valueForKind(e,n=La){return e.isKind?this.kinds:St.Te(e,this.Yt(n))}key(e=La){var n;return(n=this.Yt(e))==null?void 0:n.key}get isMultiKind(){return this.C}get canonicalKey(){return this.Q?this.y.key:this.C?Object.keys(this.N).sort().map(e=>`${e}:${Kh(this.N[e].key)}`).join(":"):`${this.kind}:${Kh(this.y.key)}`}get kinds(){return this.C?Object.keys(this.N):[this.kind]}get kindsAndKeys(){return this.C?Object.entries(this.N).reduce((e,[n,r])=>(e[n]=r.key,e),{}):{[this.kind]:this.y.key}}privateAttributes(e){var n;return((n=this.tt)==null?void 0:n[e])||[]}getContexts(){return this.C?Object.entries(this.N):[[this.kind,this.y]]}get legacy(){return this.Jt}canonicalUnfilteredJson(){if(this.valid){if(this.pt)return this.pt;try{this.pt=Mi(St.toLDContext(this))}catch(e){}return this.pt}}};xn.UserKind=La;var gw=["key","kind","_meta","anonymous"].map(t=>new Nn(t,!0)),bw=["name","ip","firstName","lastName","email","avatar","country"];function vw(t,e){return t.depth===e.length&&e.every((n,r)=>n===t.getComponent(r))}function ww(t,e){let n=[],r={},i=[];for(n.push(...Object.keys(t).map(o=>({key:o,ptr:[o],source:t,parent:r,visited:[t]})));n.length;){let o=n.pop(),s=e.find(a=>vw(a,o.ptr));if(s)i.push(s.redactionName);else{let a=o.source[o.key];a===null?o.parent[o.key]=a:Array.isArray(a)?o.parent[o.key]=[...a]:typeof a=="object"?o.visited.includes(a)||(o.parent[o.key]={},n.push(...Object.keys(a).map(c=>({key:c,ptr:[...o.ptr,c],source:a,parent:o.parent[o.key],visited:[...o.visited,a]})))):o.parent[o.key]=a}}return{cloned:r,excluded:i.sort()}}var Sw=class{constructor(t,e){this.Me=t,this.Fe=e}filter(t,e=!1){let n=t.getContexts();if(n.length===1)return this.Zt(t,n[0][1],n[0][0],e);let r={kind:"multi"};return n.forEach(([i,o])=>{r[i]=this.Zt(t,o,i,e)}),r}Ue(t,e,n,r){return(r?Object.keys(e).map(i=>new Nn(i,!0)):[...this.Fe,...t.privateAttributes(n)]).filter(i=>!gw.some(o=>o.compare(i)))}Zt(t,e,n,r){let i=this.Me||r&&e.anonymous===!0,{cloned:o,excluded:s}=ww(e,this.Ue(t,e,n,i));return t.legacy&&bw.forEach(a=>{a in o&&(o[a]=String(o[a]))}),s.length&&(o._meta||(o._meta={}),o._meta.redactedAttributes=s),o._meta&&(delete o._meta.privateAttributes,Object.keys(o._meta).length===0&&delete o._meta),o}},zh=30*1e3,Iw=.5,Tw=class{constructor(t,e,n=Math.random){this.Ve=e,this.je=n,this.mt=0,this.Xt=Math.max(1,t),this.He=Math.ceil(Math.log2(zh/this.Xt))}P(){let t=Math.min(this.mt,this.He),e=this.Xt*2**t;return Math.min(e,zh)}Ss(t){return t-Math.trunc(this.je()*Iw*t)}success(t=Date.now()){this.gt=t}fail(t=Date.now()){this.gt!==void 0&&t-this.gt>this.Ve&&(this.mt=0),this.gt=void 0;let e=this.Ss(this.P());return this.mt+=1,e}},Bh;(function(t){t[t.Valid=0]="Valid",t[t.Initializing=1]="Initializing",t[t.Interrupted=2]="Interrupted",t[t.Closed=3]="Closed"})(Bh||(Bh={}));var Fi=class extends Error{constructor(t,e,n,r=!0){super(e),this.kind=t,this.status=n,this.name="LaunchDarklyPollingError",this.recoverable=r}},Xa=class extends Error{constructor(t,e,n,r=!0){super(e),this.kind=t,this.code=n,this.name="LaunchDarklyStreamingError",this.recoverable=r}},BF=120*1e3,jF=300*1e3,At;(function(t){t.Unknown="UNKNOWN",t.NetworkError="NETWORK_ERROR",t.ErrorResponse="ERROR_RESPONSE",t.InvalidData="INVALID_DATA"})(At||(At={}));var Ai;(function(t){t[t.Disabled=0]="Disabled",t[t.Enabled=1]="Enabled"})(Ai||(Ai={}));var On;(function(t){t[t.AnalyticsEvents=0]="AnalyticsEvents",t[t.DiagnosticEvent=1]="DiagnosticEvent"})(On||(On={}));var qe;(function(t){t[t.Succeeded=0]="Succeeded",t[t.Failed=1]="Failed",t[t.FailedAndMustShutDown=2]="FailedAndMustShutDown"})(qe||(qe={}));function Vn(t){if(typeof t=="string")return t;if(t===void 0)return"undefined";if(t===null)return"null";if(Object.prototype.hasOwnProperty.call(t,"toString"))try{return t.toString()}catch(e){}if(typeof t=="bigint")return`${t}n`;try{return JSON.stringify(t)}catch(e){return e instanceof TypeError&&e.message.indexOf("circular")>=0?"[Circular]":"[Not Stringifiable]"}}function Ew(t){return typeof t=="symbol"?"NaN":typeof t=="bigint"?`${t}n`:String(Number(t))}function Rw(t){return typeof t=="symbol"?"NaN":typeof t=="bigint"?`${t}n`:String(parseInt(t,10))}function Cw(t){return typeof t=="symbol"?"NaN":String(parseFloat(t))}var Ca={s:t=>Vn(t),d:t=>Ew(t),i:t=>Rw(t),f:t=>Cw(t),j:t=>Vn(t),o:t=>Vn(t),O:t=>Vn(t),c:()=>""};function Wa(...t){var e;let n=t.shift();if(G.String.is(n)){let r="",i=0;for(;i<n.length;){let o=n.charAt(i);if(o==="%"){if(i+1<n.length){let s=n.charAt(i+1);if(s in Ca&&t.length){let a=t.shift();r+=(e=Ca[s])==null?void 0:e.call(Ca,a)}else s==="%"?r+="%":r+=`%${s}`;i+=2}}else r+=o,i+=1}return t.length&&(r.length&&(r+=" "),r+=t.map(Vn).join(" ")),r}return t.map(Vn).join(" ")}var Vt;(function(t){t[t.debug=0]="debug",t[t.info=1]="info",t[t.warn=2]="warn",t[t.error=3]="error",t[t.none=4]="none"})(Vt||(Vt={}));var Zw=["debug","info","warn","error","none"],Ma=class Tp{static get(){return new Tp({})}constructor(e){var n,r,i;if(this.Ye=(r=Vt[(n=e.level)!=null?n:"info"])!=null?r:Vt.info,this.Ze=(i=e.name)!=null?i:"LaunchDarkly",this.ne=e.formatter,typeof e.destination=="object")this.re={[Vt.debug]:e.destination.debug,[Vt.info]:e.destination.info,[Vt.warn]:e.destination.warn,[Vt.error]:e.destination.error};else if(typeof e.destination=="function"){let{destination:o}=e;this.re={[Vt.debug]:o,[Vt.info]:o,[Vt.warn]:o,[Vt.error]:o}}}Xe(...e){var n;try{return this.ne?(n=this.ne)==null?void 0:n.call(this,...e):Wa(...e)}catch(r){return Wa(...e)}}Qe(e,n){try{e(n)}catch(r){console.error(n)}}k(e,n){var r;if(e>=this.Ye){let i=`${Zw[e]}: [${this.Ze}]`;try{let o=(r=this.re)==null?void 0:r[e];o?this.Qe(o,`${i} ${this.Xe(...n)}`):console.error(...n)}catch(o){console.error(...n)}}}error(...e){this.k(Vt.error,e)}warn(...e){this.k(Vt.warn,e)}info(...e){this.k(Vt.info,e)}debug(...e){this.k(Vt.debug,e)}},kw={error:G.Function,warn:G.Function,info:G.Function,debug:G.Function},Ep=class{constructor(t,e){Object.entries(kw).forEach(([n,r])=>{if(!r.is(t[n]))throw new Error(`Provided logger instance must support logger.${n}(...) method`)}),this.t=t,this.ti=e}k(t,e){try{this.t[t](...e)}catch(n){this.ti[t](...e)}}error(...t){this.k("error",t)}warn(...t){this.k("warn",t)}info(...t){this.k("info",t)}debug(...t){this.k("debug",t)}},Rp=t=>{let e=new Ma({level:"info",destination:console.error,formatter:Wa});return t?new Ep(t,e):e},Te=class{static deprecated(t,e){return`"${t}" is deprecated, please use "${e}"`}static optionBelowMinimum(t,e,n){return`Config option "${t}" had invalid value of ${e}, using minimum of ${n} instead`}static unknownOption(t){return`Ignoring unknown config option "${t}"`}static wrongOptionType(t,e,n){return`Config option "${t}" should be of type ${e}, got ${n}, using default value`}static wrongOptionTypeBoolean(t,e){return`Config option "${t}" should be a boolean, got ${e}, converting to boolean`}static invalidTagValue(t){return`Config option "${t}" must only contain letters, numbers, ., _ or -.`}static tagValueTooLong(t){return`Value of "${t}" was longer than 64 characters and was discarded.`}static partialEndpoint(t){return`You have set custom uris without specifying the ${t} URI; connections may not work properly`}},Vw=/^(\w|\.|-)+$/,xw=G.stringMatchingRegex(Vw),Nw={is:(t,e)=>xw.is(t)?t.length>64?{valid:!1,message:Te.tagValueTooLong(e)}:{valid:!0}:{valid:!1,message:Te.invalidTagValue(e)}},Ow=class{constructor(t){let e={},n=t==null?void 0:t.application,r=t==null?void 0:t.logger;n&&Object.entries(n).forEach(([o,s])=>{if(s!=null){let{valid:a,message:c}=Nw.is(s,`application.${o}`);a?o==="versionName"?e["application-version-name"]=[s]:e[`application-${o}`]=[s]:r==null||r.warn(c)}});let i=Object.keys(e);i.length&&(this.value=i.sort().flatMap(o=>e[o].sort().map(s=>`${o}/${s}`)).join(" "))}},Gw=class{constructor(t,e,n){this.platform=n,this.basicConfiguration={tags:e.tags,logger:e.logger,offline:e.offline,serviceEndpoints:e.serviceEndpoints,sdkKey:t}}};function Za(t){return t.replace(/\/+$/,"")}function Fa(t){return t.replace(/^\/+/,"").replace(/\?$/,"")}var Ji=class Cp{constructor(e,n,r=Cp.DEFAULT_EVENTS,i="/bulk",o="/diagnostic",s=!0,a){this.streaming=Za(e),this.polling=Za(n),this.events=Za(r),this.analyticsEventPath=i,this.diagnosticEventPath=o,this.includeAuthorizationHeader=s,this.payloadFilterKey=a}};Ji.DEFAULT_EVENTS="https://events.launchdarkly.com";function Aa(t,e=[]){if(e.length===0)return t;let n=e.map(({key:r,value:i})=>`${r}=${i}`);return`${t}?${n.join("&")}`}function Lw(t,e,n){let r=Fa(e),i=[...n];return t.payloadFilterKey&&i.push({key:"filter",value:t.payloadFilterKey}),Aa(`${t.streaming}/${r}`,i)}function Xw(t,e,n=[]){let r=Fa(e),i=[...n];return t.payloadFilterKey&&i.push({key:"filter",value:t.payloadFilterKey}),Aa(`${t.polling}/${r}`,i)}function jh(t,e,n=[]){let r=Fa(e);return Aa(`${t.events}/${r}`,n)}var Zp=class extends Error{constructor(t){super(t),this.name="LaunchDarklyUnexpectedResponseError"}},Ww=class extends Error{constructor(t){super(t),this.name="LaunchDarklyClientError"}},kp=class extends Error{constructor(t){super(t),this.name="LaunchDarklyTimeoutError"}};function Ki(t){return t>=400&&t<500?t===400||t===408||t===429:!0}function Uw(t){return t===413?!0:Ki(t)}function Pw(t,e){let n,r;return{promise:new Promise((i,o)=>{r=i,n=setTimeout(()=>{let s=`${e} timed out after ${t} seconds.`;o(new kp(s))},t*1e3)}),cancel:()=>{r(),clearTimeout(n)}}}function Vp(t){return t==null?t:JSON.parse(JSON.stringify(t))}function ka(t){return Math.trunc(t*1e3)}var Mw=t=>JSON.stringify(t)==="{}",Ja=(t,e)=>t&&Object.entries(t).reduce((n,[r,i])=>(i&&!Mw(i)&&!(e!=null&&e.includes(r))&&(n[r]=typeof i=="object"?Ja(i,e):i),n),{});function Wi(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;var n,r,i;if(Array.isArray(t)){if(n=t.length,n!=e.length)return!1;for(r=n;r--!==0;)if(!Wi(t[r],e[r]))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(r of t.entries())if(!e.has(r[0]))return!1;for(r of t.entries())if(!Wi(r[1],e.get(r[0])))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(r of t.entries())if(!e.has(r[0]))return!1;return!0}if(ArrayBuffer.isView(t)&&ArrayBuffer.isView(e)){if(n=t.length,n!=e.length)return!1;for(r=n;r--!==0;)if(t[r]!==e[r])return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===e.toString();if(i=Object.keys(t),n=i.length,n!==Object.keys(e).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(e,i[r]))return!1;for(r=n;r--!==0;){var o=i[r];if(!Wi(t[o],e[o]))return!1}return!0}return t!==t&&e!==e}function Fw(t,e,n,r=!0,i="user-agent"){let{userAgentBase:o,version:s,wrapperName:a,wrapperVersion:c}=e.sdkData(),l={[i]:`${o!=null?o:"NodeJSClient"}/${s}`};return r&&(l.authorization=t),a&&(l["x-launchdarkly-wrapper"]=c?`${a}/${c}`:a),n!=null&&n.value&&(l["x-launchdarkly-tags"]=n.value),l}function Gn(t,e,n){let r;t.status?r=`error ${t.status}${t.status===401?" (invalid SDK key)":""}`:r=`I/O error (${t.message||"unknown error"})`;let i=n!=null?n:"giving up permanently";return`Received ${r} for ${e} - ${i}`}function xp({status:t}){return t?Ki(t):!0}var Qh=(t,e)=>e.btoa(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,""),Np=async(t=1e3)=>new Promise(e=>{setTimeout(e,t)}),Aw=class{constructor(t,e,n){this.p=e,this.ei=n,this.wt=[],this.se=Date.now(),this.ae=this.se,this.oe={diagnosticId:e.crypto.randomUUID(),sdkKeySuffix:t.length>6?t.substring(t.length-6):t}}createInitEvent(){var t,e,n;let r=this.p.info.sdkData(),i=this.p.info.platformData();return{kind:"diagnostic-init",id:this.oe,creationDate:this.se,sdk:r,configuration:this.ei,platform:ot({name:i.name,osArch:(t=i.os)==null?void 0:t.arch,osName:(e=i.os)==null?void 0:e.name,osVersion:(n=i.os)==null?void 0:n.version},i.additional||{})}}recordStreamInit(t,e,n){let r={timestamp:t,failed:e,durationMillis:n};this.wt.push(r)}createStatsEventAndReset(t,e,n){let r=Date.now(),i={kind:"diagnostic",id:this.oe,creationDate:r,dataSinceDate:this.ae,droppedEvents:t,deduplicatedUsers:e,eventsInLastBatch:n,streamInits:this.wt};return this.wt=[],this.ae=r,i}},Ua;(function(t){t.MalformedFlag="MALFORMED_FLAG",t.UserNotSpecified="USER_NOT_SPECIFIED",t.FlagNotFound="FLAG_NOT_FOUND",t.ClientNotReady="CLIENT_NOT_READY",t.WrongType="WRONG_TYPE"})(Ua||(Ua={}));var Jw=Ua,Op=class{static invalidMetricValue(t){return`The track function was called with a non-numeric "metricValue" (${t}), only numeric metric values are supported.`}};Op.MissingContextKeyNoEvent="Context was unspecified or had no key; event will not be sent";var Dw=class{constructor(t,e){let{basicConfiguration:n,platform:r}=t,{serviceEndpoints:{analyticsEventPath:i,diagnosticEventPath:o}}=n,{crypto:s,requests:a}=r;this.ii=ot({},e),this.ce=jh(n.serviceEndpoints,i,[]),this.ni=jh(n.serviceEndpoints,o,[]),this.V=a,this.ri=s}async et(t,e,n,r){let i={status:qe.Succeeded},o=me(ot({},this.ii),{"content-type":"application/json"});n&&(o["x-launchdarkly-payload-id"]=n,o["x-launchDarkly-event-schema"]="4");let s;try{let{status:a,headers:c}=await this.V.fetch(e,{headers:o,body:JSON.stringify(t),compressBodyIfPossible:!0,method:"POST",keepalive:!0}),l=Date.parse(c.get("date")||"");if(l&&(i.serverTime=l),a<=204)return i;if(s=new Zp(Gn({status:a,message:"some events were dropped"},"event posting")),!Ki(a))return Uw(a)?i.status=qe.Failed:i.status=qe.FailedAndMustShutDown,i.error=s,i}catch(a){s=a}return s&&!r?(i.status=qe.Failed,i.error=s,i):(await Np(),this.et(t,this.ce,n,!1))}async sendEventData(t,e){let n=t===On.AnalyticsEvents?this.ri.randomUUID():void 0,r=t===On.AnalyticsEvents?this.ce:this.ni;return this.et(e,r,n,!0)}};function Di(t){return t.kind==="feature"}function Yw(t){return t.kind==="identify"}function Kw(t){return t.kind==="migration_op"}var _w=class{constructor(t,e,n,r,i,o){this.count=t,this.key=e,this.value=n,this.version=i,this.variation=o,this.default=r}increment(){this.count+=1}};function Hw(t){return`${t.key}:${t.variation!==null&&t.variation!==void 0?t.variation:""}:${t.version!==null&&t.version!==void 0?t.version:""}`}var Gp=class{constructor(t=!1,e){this.si=t,this.x=e,this.W=0,this.it=0,this.nt={},this.rt={}}summarizeEvent(t){if(Di(t)&&!t.excludeFromSummaries){this.y||(this.y=t.context);let e=Hw(t),n=this.nt[e],r=this.rt[t.key];r||(r=new Set,this.rt[t.key]=r),t.context.kinds.forEach(i=>r.add(i)),n?n.increment():this.nt[e]=new _w(1,t.key,t.value,t.default,t.version,t.variation),(this.W===0||t.creationDate<this.W)&&(this.W=t.creationDate),t.creationDate>this.it&&(this.it=t.creationDate)}}getSummary(){var t;let e=Object.values(this.nt).reduce((r,i)=>{let o=r[i.key];o||(o={default:i.default,counters:[],contextKinds:[...this.rt[i.key]]},r[i.key]=o);let s={value:i.value,count:i.count};return i.variation!==void 0&&i.variation!==null&&(s.variation=i.variation),i.version!==void 0&&i.version!==null?s.version=i.version:s.unknown=!0,o.counters.push(s),r},{}),n={startDate:this.W,endDate:this.it,features:e,kind:"summary",context:this.y!==void 0&&this.si?(t=this.x)==null?void 0:t.filter(this.y):void 0};return this.ai(),n}ai(){this.W=0,this.it=0,this.nt={},this.rt={}}},zw=class extends Error{constructor(t){super(t),this.name="LaunchDarklyInvalidSDKKeyError"}},Bw=class{constructor(t,e){this.x=t,this.t=e,this.q={}}summarizeEvent(t){var e;if(Di(t)){let n=t.context.canonicalUnfilteredJson();if(!n){t.context.valid&&((e=this.t)==null||e.error("Unable to serialize context, likely the context contains a cycle."));return}let r=this.q[n];r||(this.q[n]=new Gp(!0,this.x),r=this.q[n]),r.summarizeEvent(t)}}getSummaries(){let t=this.q;return this.q={},Object.values(t).map(e=>e.getSummary())}};function Ui(t){let e=Math.trunc(t);return e===1?!0:e===0?!1:Math.floor(Math.random()*e)===0}function jw(t){return t.getSummaries!==void 0}var Qw=class{constructor(t,e,n,r,i,o=!0,s=!1){this.e=t,this.st=r,this.S=i,this.at=[],this.ue=0,this.Et=0,this.Dt=0,this.bt=!1,this.le=0,this.kt=!1,this.xt=null,this.oi=t.eventsCapacity,this.t=e.basicConfiguration.logger,this.he=new Dw(e,n),this.x=new Sw(t.allAttributesPrivate,t.privateAttributes.map(a=>new Nn(a))),s?this.J=new Bw(this.x,this.t):this.J=new Gp,o&&this.start()}start(){var t,e;if(((t=this.st)==null?void 0:t.flushInterval)!==void 0&&(this.xt=setInterval(()=>{var n;(n=this.st)==null||n.flush()},this.st.flushInterval*1e3)),this.ci=setInterval(async()=>{var n;try{await this.flush()}catch(r){(n=this.t)==null||n.debug(`Flush failed: ${r}`)}},this.e.flushInterval*1e3),this.S){let n=this.S.createInitEvent();this.de(n),this.fe=setInterval(()=>{let r=this.S.createStatsEventAndReset(this.Et,this.Dt,this.le);this.Et=0,this.Dt=0,this.de(r)},this.e.diagnosticRecordingInterval*1e3)}(e=this.t)==null||e.debug("Started EventProcessor.")}de(t){this.he.sendEventData(On.DiagnosticEvent,t)}close(){clearInterval(this.ci),this.xt&&clearInterval(this.xt),this.fe&&clearInterval(this.fe)}async flush(){var t;if(this.kt)throw new zw("Events cannot be posted because a permanent error has been encountered. This is most likely an invalid SDK key. The specific error information is logged independently.");let e=this.at;if(this.at=[],jw(this.J))this.J.getSummaries().forEach(n=>{Object.keys(n.features).length&&e.push(n)});else{let n=this.J.getSummary();Object.keys(n.features).length&&e.push(n)}e.length&&(this.le=e.length,(t=this.t)==null||t.debug("Flushing %d events",e.length),await this.et(e))}sendEvent(t){var e;if(this.kt)return;if(Kw(t)){if(Ui(t.samplingRatio)){let a=me(ot({},t),{context:t.context?this.x.filter(t.context):void 0});a.samplingRatio===1&&delete a.samplingRatio,this.ot(a)}return}this.J.summarizeEvent(t);let n=Di(t),r=n&&t.trackEvents||!n,i=this.ui(t),o=Yw(t),s=(e=this.st)==null?void 0:e.processContext(t.context);s||o||(this.Dt+=1),s&&!o&&this.ot(this.St({kind:"index",creationDate:t.creationDate,context:t.context,samplingRatio:1},!1)),r&&Ui(t.samplingRatio)&&this.ot(this.St(t,!1)),i&&Ui(t.samplingRatio)&&this.ot(this.St(t,!0))}St(t,e){switch(t.kind){case"feature":{let n={kind:e?"debug":"feature",creationDate:t.creationDate,context:this.x.filter(t.context,!e),key:t.key,value:t.value,default:t.default};return t.samplingRatio!==1&&(n.samplingRatio=t.samplingRatio),t.prereqOf&&(n.prereqOf=t.prereqOf),t.variation!==void 0&&(n.variation=t.variation),t.version!==void 0&&(n.version=t.version),t.reason&&(n.reason=t.reason),n}case"index":case"identify":{let n={kind:t.kind,creationDate:t.creationDate,context:this.x.filter(t.context)};return t.samplingRatio!==1&&(n.samplingRatio=t.samplingRatio),n}case"custom":{let n={kind:"custom",creationDate:t.creationDate,key:t.key,context:this.x.filter(t.context)};return t.samplingRatio!==1&&(n.samplingRatio=t.samplingRatio),t.data!==void 0&&(n.data=t.data),t.metricValue!==void 0&&(n.metricValue=t.metricValue),t.url!==void 0&&(n.url=t.url),n}case"click":return{kind:"click",creationDate:t.creationDate,contextKeys:t.context.kindsAndKeys,key:t.key,url:t.url,selector:t.selector};case"pageview":return{kind:"pageview",creationDate:t.creationDate,contextKeys:t.context.kindsAndKeys,key:t.key,url:t.url};default:return t}}ot(t){var e;this.at.length<this.oi?(this.at.push(t),this.bt=!1):(this.bt||(this.bt=!0,(e=this.t)==null||e.warn("Exceeded event queue capacity. Increase capacity to avoid dropping events.")),this.Et+=1)}ui(t){return Di(t)&&t.debugEventsUntilDate&&t.debugEventsUntilDate>this.ue&&t.debugEventsUntilDate>Date.now()}async et(t){let e=await this.he.sendEventData(On.AnalyticsEvents,t);if(e.status===qe.FailedAndMustShutDown&&(this.kt=!0),e.serverTime&&(this.ue=e.serverTime),e.error)throw e.error}},Lp=class{constructor(t,e,n,r,i=1,o){this.context=t,this.key=e,this.data=n,this.metricValue=r,this.samplingRatio=i,this.url=o,this.kind="custom",this.creationDate=Date.now(),this.context=t}},Pa=class{constructor(t,e,n,r,i,o,s,a,c,l,u,h,p=1){this.withReasons=t,this.context=e,this.key=n,this.samplingRatio=p,this.kind="feature",this.creationDate=Date.now(),this.value=r,this.default=i,o!==void 0&&(this.version=o),s!==void 0&&(this.variation=s),a!==void 0&&(this.trackEvents=a),c!==void 0&&(this.prereqOf=c),l!==void 0&&(this.reason=l),u!==void 0&&(this.debugEventsUntilDate=u),h!==void 0&&(this.excludeFromSummaries=h)}},Xp=class{constructor(t,e=1){this.context=t,this.samplingRatio=e,this.kind="identify",this.creationDate=Date.now()}},$w=class{close(){}async flush(){}sendEvent(){}},qw=class{constructor(t){this.Lt=t}evalEvent(t){var e;return new Pa(this.Lt,t.context,t.flagKey,t.value,t.defaultVal,t.version,(e=t.variation)!=null?e:void 0,t.trackEvents||t.addExperimentData,t.prereqOfFlagKey,this.Lt||t.addExperimentData?t.reason:void 0,t.debugEventsUntilDate,t.excludeFromSummaries,t.samplingRatio)}unknownFlagEvent(t,e,n){return new Pa(this.Lt,n,t,e,e,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}identifyEvent(t){return new Xp(t,1)}customEvent(t,e,n,r,i=1){return new Lp(e,t,n!=null?n:void 0,r!=null?r:void 0,i)}},$h="FDv1Fallback";function tS(t){return{li:t,pe:"",useSelector(e){return this.pe=e,this},processFullTransfer(e){let n=[{event:"server-intent",data:{payloads:[{id:$h,target:1,intentCode:"xfer-full",reason:"payload-missing"}]}}];Object.entries((e==null?void 0:e.flags)||[]).forEach(([r,i])=>{n.push({event:"put-object",data:{kind:"flag",key:r,version:i.version||1,object:i}})}),Object.entries((e==null?void 0:e.segments)||[]).forEach(([r,i])=>{n.push({event:"put-object",data:{kind:"segment",key:r,version:i.version||1,object:i}})}),n.push({event:"payload-transferred",data:{state:this.pe,version:1,id:$h}}),this.li.processEvents(n)}}}var pe={type:"none"};function Wp(t,e){let n="inactive",r,i="partial",o=[];function s(g,w){var R;return(R=t[g])==null?void 0:R.call(t,w)}function a(){n="inactive",r=void 0,i="partial",o=[]}function c(){n="changes",i="partial",o=[]}function l(){o=[]}function u(g){return!g.id||!g.target?pe:{type:"payload",payload:{id:g.id,version:g.target,type:"none",updates:[]}}}function h(g){var w;if(!((w=g.payloads)!=null&&w.length))return{type:"error",kind:"MISSING_PAYLOAD",message:"No payload present in server-intent"};let R=g.payloads[0];switch(R==null?void 0:R.intentCode){case"xfer-full":return n="full",o=[],i="full",r=R.id,pe;case"xfer-changes":return n="changes",o=[],i="partial",r=R.id,pe;case"none":return n="changes",o=[],i="partial",r=R.id,u(R);default:return e==null||e.warn(`Unable to process intent code '${R==null?void 0:R.intentCode}'.`),pe}}function p(g){if(n==="inactive"||!r||!g.kind||!g.key||!g.version||!g.object)return pe;let w=s(g.kind,g.object);return w?(o.push({kind:g.kind,key:g.key,version:g.version,object:w}),pe):(e==null||e.warn(`Unable to process object for kind: '${g.kind}'`),pe)}function f(g){return n==="inactive"||!r||!g.kind||!g.key||!g.version||o.push({kind:g.kind,key:g.key,version:g.version,deleted:!0}),pe}function m(g){if(n==="inactive")return{type:"error",kind:"PROTOCOL_ERROR",message:"A payload transferred has been received without an intent having been established."};if(!r||g.state===null||g.state===void 0||!g.version)return a(),pe;let w={type:"payload",payload:{id:r,version:g.version,state:g.state,type:i,updates:o}};return c(),w}function d(g){return e==null||e.info(`Goodbye was received from the LaunchDarkly connection with reason: ${g.reason}.`),a(),{type:"goodbye",reason:g.reason}}function v(g){return e==null||e.info(`An issue was encountered receiving updates for payload ${r} with reason: ${g.reason}.`),l(),{type:"serverError",id:g.payload_id,reason:g.reason}}return{get state(){return n},processEvent(g){switch(g.event){case"server-intent":return h(g.data);case"put-object":return p(g.data);case"delete-object":return f(g.data);case"payload-transferred":return m(g.data);case"goodbye":return d(g.data);case"error":return v(g.data);case"heart-beat":return pe;default:return{type:"error",kind:"UNKNOWN_EVENT",message:`Received an unknown event of type '${g.event}'`}}},reset(){a()}}}function eS(t){return t==="MISSING_PAYLOAD"||t==="PROTOCOL_ERROR"}var Up=class{constructor(t,e,n){this.m=e,this.t=n,this.n=[],this.hi=Wp(t,n)}addPayloadListener(t){this.n.push(t)}removePayloadListener(t){let e=this.n.indexOf(t,0);e>-1&&this.n.splice(e,1)}processEvents(t){t.forEach(e=>{var n,r;let i=this.hi.processEvent(e);switch(i.type){case"payload":this.n.forEach(o=>o(i.payload));break;case"error":eS(i.kind)?(n=this.m)==null||n.call(this,At.InvalidData,i.message):(r=this.t)==null||r.warn(i.message);break}})}},nS=class{constructor(t,e,n,r){this.m=n,this.t=r,this.H(t,"server-intent"),this.H(t,"put-object"),this.H(t,"delete-object"),this.H(t,"payload-transferred"),this.H(t,"goodbye"),this.H(t,"error"),this.Ct=new Up(e,n,r)}addPayloadListener(t){this.Ct.addPayloadListener(t)}removePayloadListener(t){this.Ct.removePayloadListener(t)}H(t,e){t.addEventListener(e,async n=>{var r,i,o,s,a;if(n!=null&&n.data){(r=this.t)==null||r.debug(`Received ${e} event. Data is ${n.data}`);try{this.Ct.processEvents([{event:e,data:JSON.parse(n.data)}])}catch(c){(i=this.t)==null||i.error(`Stream received data that was unable to be processed in "${e}" message`),(o=this.t)==null||o.debug(`Data follows: ${n.data}`),(s=this.m)==null||s.call(this,At.InvalidData,"Malformed data in EventStream.")}}else(a=this.m)==null||a.call(this,At.Unknown,"Event from EventStream missing data.")})}};function rS(t){if(t){let e=Object.keys(t).find(n=>n.toLowerCase()==="x-ld-envid");if(e)return{environmentId:t[e]}}}var qh="unknown plugin";function Yi(t,e){try{return e.getMetadata().name||qh}catch(n){return t.error("Exception thrown getting metadata for plugin. Unable to get plugin name."),qh}}function iS(t,e,n){let r=[];return n.forEach(i=>{var o;try{let s=(o=i.getHooks)==null?void 0:o.call(i,e);s===void 0?t.error(`Plugin ${Yi(t,i)} returned undefined from getHooks.`):s&&s.length>0&&r.push(...s)}catch(s){t.error(`Exception thrown getting hooks for plugin ${Yi(t,i)}. Unable to get hooks.`)}}),r}function oS(t,e,n,r){r.forEach(i=>{try{i.register(n,e)}catch(o){t.error(`Exception thrown registering plugin ${Yi(t,i)}.`)}})}var de=Object.freeze({__proto__:null,ClientMessages:Op,DiagnosticsManager:Aw,ErrorKinds:Jw,EventFactoryBase:qw,EventProcessor:Qw,FDv1PayloadAdaptor:tS,InputCustomEvent:Lp,InputEvalEvent:Pa,InputIdentifyEvent:Xp,NullEventProcessor:$w,PayloadProcessor:Up,PayloadStreamReader:nS,canonicalize:Mi,createProtocolHandler:Wp,initMetadataFromHeaders:rS,isLegacyUser:Ip,isMultiKind:Sp,isSingleKind:wp,safeGetHooks:iS,safeGetName:Yi,safeRegisterPlugins:oS,shouldSample:Ui}),sS={Initializing:"INITIALIZING",Valid:"VALID",Interrupted:"INTERRUPTED",SetOffline:"SET_OFFLINE",Closed:"CLOSED"};function aS(t){return t>=200&&t<=299}var tp=class extends Error{constructor(t,e){super(t),this.status=e,this.name="LaunchDarklyRequestError"}};function ep(t,e,n,r,i,o,s,a,c,l){let u,h="GET",p=ot({},o);c&&(h="REPORT",p["content-type"]="application/json",u=t);let f=c?n.pathReport(i,t):n.pathGet(i,t),m=[...s!=null?s:[]];a&&m.push({key:"withReasons",value:"true"}),l&&m.push({key:"h",value:l});let d=Xw(e,f,m);return{async requestPayload(){let v;try{let g=await r.fetch(d,{method:h,headers:p,body:u});if(aS(g.status))return await g.text();v=g.status}catch(g){throw new tp(g==null?void 0:g.message)}throw new tp(`Unexpected status code: ${v}`,v)}}}var np=new Error("Task has already been executed or shed. This is likely an implementation error. The task will not be executed again.");function lS(t,e,n=!1){let r,i=new Promise(a=>{r=(c,l)=>{var u;try{(u=t.after)==null||u.call(t,c,l)}catch(h){e==null||e.error(`Error in after callback: ${h}`)}a(c)}}),o=t.before?t.before():Promise.resolve(void 0),s=!1;return{execute:()=>{s&&(e==null||e.error(np)),s=!0,o.then(a=>{t.execute(a).then(c=>r({status:"complete",result:c},a)).catch(c=>r({status:"error",error:c},a))}).catch(a=>{e==null||e.error(a),r({status:"error",error:a},void 0)})},shed:()=>{s&&(e==null||e.error(np)),s=!0,o.then(a=>{r({status:"shed"},a)})},promise:i,sheddable:n}}function cS(t){let e,n=[];function r(){if(!e&&n.length>0){let i=n.shift();e=i.promise.finally(()=>{e=void 0,r()}),i.execute()}}return{execute(i,o=!1){var s,a;let c=lS(i,t,o);return e?((s=n[n.length-1])!=null&&s.sheddable&&((a=n.pop())==null||a.shed()),n.push(c)):(e=c.promise.finally(()=>{e=void 0,r()}),c.execute()),c.promise},pendingCount(){return n.length}}}function uS(t){return"validate"in t}function hS(t,e,n,r,i){let o=ot({},n);return Yh(t)?o:G.Object.is(t)?(Object.entries(t).forEach(([s,a])=>{let c=e[s],l=i?`${i}.${s}`:s;if(!c){r==null||r.warn(Te.unknownOption(l));return}if(Yh(a))return;if(uS(c)){let h=c.validate(a,l,r,n[s]);h!==void 0&&(o[s]=h.value);return}if(c.is(a)){o[s]=a;return}let u=c.getType();u==="boolean"?(r==null||r.warn(Te.wrongOptionTypeBoolean(l,typeof a)),o[s]=!!a):u==="boolean | undefined | null"?(r==null||r.warn(Te.wrongOptionTypeBoolean(l,typeof a)),typeof a!="boolean"&&typeof a!="undefined"&&a!==null&&(o[s]=!!a)):c instanceof bp&&G.Number.is(a)?(r==null||r.warn(Te.optionBelowMinimum(l,a,c.min)),o[s]=c.min):r==null||r.warn(Te.wrongOptionType(l,u,typeof a))}),o):(r==null||r.warn(Te.wrongOptionType(i!=null?i:"config","object",typeof t)),o)}var pS={logger:G.Object,maxCachedContexts:G.numberWithMin(0),baseUri:G.String,streamUri:G.String,eventsUri:G.String,capacity:G.numberWithMin(1),diagnosticRecordingInterval:G.numberWithMin(2),flushInterval:G.numberWithMin(2),streamInitialReconnectDelay:G.numberWithMin(0),allAttributesPrivate:G.Boolean,debug:G.Boolean,diagnosticOptOut:G.Boolean,withReasons:G.Boolean,sendEvents:G.Boolean,pollInterval:G.numberWithMin(30),useReport:G.Boolean,privateAttributes:G.StringArray,applicationInfo:G.Object,wrapperName:G.String,wrapperVersion:G.String,payloadFilterKey:G.stringMatchingRegex(/^[a-zA-Z0-9](\w|\.|-)*$/),hooks:G.createTypeArray("Hook[]",{}),inspectors:G.createTypeArray("LDInspection",{}),cleanOldPersistentData:G.Boolean},dS=300,Pp="https://clientsdk.launchdarkly.com",Mp="https://clientstream.launchdarkly.com";function fS(t){return t instanceof Ep?t:Rp(t)}var mS=class{constructor(t={},e={getImplementationHooks:()=>[],credentialType:"mobileKey"}){var n,r,i;this.logger=Rp(),this.baseUri=Pp,this.eventsUri=Ji.DEFAULT_EVENTS,this.streamUri=Mp,this.maxCachedContexts=5,this.capacity=100,this.diagnosticRecordingInterval=900,this.flushInterval=30,this.streamInitialReconnectDelay=1,this.allAttributesPrivate=!1,this.debug=!1,this.diagnosticOptOut=!1,this.sendEvents=!0,this.sendLDHeaders=!0,this.useReport=!1,this.withReasons=!1,this.privateAttributes=[],this.pollInterval=dS,this.hooks=[],this.inspectors=[],this.logger=fS(t.logger);let o=hS(t,pS,{},this.logger);Object.entries(o).forEach(([s,a])=>{s!=="logger"&&(this[s]=a)}),this.serviceEndpoints=new Ji(this.streamUri,this.baseUri,this.eventsUri,e.analyticsEventPath,e.diagnosticEventPath,e.includeAuthorizationHeader,t.payloadFilterKey),this.useReport=(n=t.useReport)!=null?n:!1,this.tags=new Ow({application:this.applicationInfo,logger:this.logger}),this.userAgentHeaderName=(r=e.userAgentHeaderName)!=null?r:"user-agent",this.trackEventModifier=(i=e.trackEventModifier)!=null?i:(s=>s),this.credentialType=e.credentialType,this.getImplementationHooks=e.getImplementationHooks}};async function Fp(t,e){if(t.digest)return t.digest(e);if(t.asyncDigest)return t.asyncDigest(e);throw new Error("Platform must implement digest or asyncDigest")}var Ap=async(t,{crypto:e,storage:n})=>{let r=await(n==null?void 0:n.get(t));return r||(r=e.randomUUID(),await(n==null?void 0:n.set(t,r))),r};function Jp(t){return async e=>Fp(t.createHash("sha256").update(e),"base64")}var fe=async t=>t;async function gr(t){return(await Promise.all(t.map(e=>e.transform(e.value)))).join("_")}async function yS(t,e){return gr([{value:"LaunchDarkly",transform:fe},{value:e,transform:Jp(t)}])}async function gS(t){return gr([{value:"LaunchDarkly",transform:fe},{value:"AnonymousKeys",transform:fe},{value:t,transform:fe}])}async function bS(t){return gr([{value:"LaunchDarkly",transform:fe},{value:"ContextKeys",transform:fe},{value:t,transform:fe}])}async function vS(t){return gr([{value:t,transform:fe},{value:"ContextIndex",transform:fe}])}async function rp(t,e,n){return gr([{value:e,transform:fe},{value:n.canonicalKey,transform:Jp(t)}])}var{isLegacyUser:wS,isSingleKind:Va,isMultiKind:ip}=de,Dp="1.0",SS=t=>{let e=t,{kind:n}=e,r=mp(e,["kind"]);return{kind:"multi",[n]:r}},IS=async({crypto:t,info:e},{applicationInfo:n})=>{var r;let{ld_application:i}=e.platformData(),o=(r=Ja(i))!=null?r:{},s=(n==null?void 0:n.id)||(o==null?void 0:o.id);if(s){let a=(n==null?void 0:n.version)||(o==null?void 0:o.version),c=(n==null?void 0:n.name)||(o==null?void 0:o.name),l=(n==null?void 0:n.versionName)||(o==null?void 0:o.versionName);return o=ot(ot(ot(me(ot({},o),{id:s}),a?{version:a}:{}),c?{name:c}:{}),l?{versionName:l}:{}),o.key=await Fp(t.createHash("sha256").update(s),"base64"),o.envAttributesVersion=o.envAttributesVersion||Dp,o}},TS=async t=>{var e,n,r,i;let{ld_device:o,os:s}=t.info.platformData(),a=(e=Ja(o))!=null?e:{},c=(s==null?void 0:s.name)||((n=a.os)==null?void 0:n.name),l=(s==null?void 0:s.version)||((r=a.os)==null?void 0:r.version),u=(i=a.os)==null?void 0:i.family;if((c||l||u)&&(a.os=ot(ot(ot({},c?{name:c}:{}),l?{version:l}:{}),u?{family:u}:{})),Object.keys(a).filter(h=>h!=="key"&&h!=="envAttributesVersion").length){let h=await bS("ld_device");return a.key=await Ap(h,t),a.envAttributesVersion=a.envAttributesVersion||Dp,a}},ES=async(t,e,n)=>{if(wS(t))return t;let r,i;if(Va(t)&&t.kind!=="ld_application"||ip(t)&&!t.ld_application?r=await IS(e,n):n.logger.warn("Not adding ld_application environment attributes because it already exists."),Va(t)&&t.kind!=="ld_device"||ip(t)&&!t.ld_device?i=await TS(e):n.logger.warn("Not adding ld_device environment attributes because it already exists."),r||i){let o=Va(t)?SS(t):t;return ot(ot(ot({},o),r?{ld_application:r}:{}),i?{ld_device:i}:{})}return t};function RS(){let t,e;return{set(n,r){t=n,e=r},getContext(){return e},getUnwrappedContext(){return t},newIdentificationPromise(){let n,r;return{identifyPromise:new Promise((i,o)=>{n=i,r=o}),identifyResolve:n,identifyReject:r}},hasContext(){return e!==void 0},hasValidContext(){return this.hasContext()&&e.valid}}}var{isLegacyUser:CS,isMultiKind:ZS,isSingleKind:kS}=de,Da=async(t,e,n)=>{let{anonymous:r,key:i}=e;if(r&&!i){let o=await gS(t);e.key=await Ap(o,n)}},VS=async(t,e)=>{await Da(t.kind,t,e)},xS=async(t,e)=>{let n=t,{kind:r}=n,i=mp(n,["kind"]);return Promise.all(Object.entries(i).map(([o,s])=>Da(o,s,e)))},NS=async(t,e)=>{await Da("user",t,e)},OS=async(t,e)=>{let n=Vp(t);return kS(n)&&await VS(n,e),ZS(n)&&await xS(n,e),CS(n)&&await NS(n,e),n},GS=t=>({customBaseURI:t.serviceEndpoints.polling!==Pp,customStreamURI:t.serviceEndpoints.streaming!==Mp,customEventsURI:t.serviceEndpoints.events!==Ji.DEFAULT_EVENTS,eventsCapacity:t.capacity,eventsFlushIntervalMillis:ka(t.flushInterval),reconnectTimeMillis:ka(t.streamInitialReconnectDelay),diagnosticRecordingIntervalMillis:ka(t.diagnosticRecordingInterval),allAttributesPrivate:t.allAttributesPrivate,usingSecureMode:!1,bootstrapMode:!1}),LS=(t,e,n)=>{if(e.sendEvents&&!e.diagnosticOptOut)return new de.DiagnosticsManager(t,n,GS(e))};function op(t,e){return{value:e!=null?e:null,variationIndex:null,reason:{kind:"ERROR",errorKind:t}}}function sp(t,e,n){return ot({value:t,variationIndex:e!=null?e:null},n!==void 0&&{reason:n})}var XS=(t,e,n,r,i)=>{if(e.sendEvents)return new de.EventProcessor(me(ot({},e),{eventsCapacity:e.capacity}),new Gw(t,e,n),r,void 0,i,!1,!0)},ap=class extends de.EventFactoryBase{evalEventClient(t,e,n,r,i,o){let{trackEvents:s,debugEventsUntilDate:a,trackReason:c,flagVersion:l,version:u,variation:h}=r;return super.evalEvent({addExperimentData:c,context:i,debugEventsUntilDate:a,defaultVal:n,flagKey:t,reason:o,trackEvents:!!s,value:e,variation:h,version:l!=null?l:u})}},xa=class Yp{constructor(){this.container={index:new Array}}static fromJson(e){let n=new Yp;try{n.container=JSON.parse(e)}catch(r){}return n}toJson(){return JSON.stringify(this.container)}notice(e,n){let r=this.container.index.find(i=>i.id===e);r===void 0?this.container.index.push({id:e,timestamp:n}):r.timestamp=n}prune(e){let n=Math.max(e,0);return this.container.index.length>n?(this.container.index.sort((r,i)=>r.timestamp-i.timestamp),this.container.index.splice(0,this.container.index.length-n)):[]}},WS=class{constructor(t,e,n,r,i,o,s=()=>Date.now()){this.p=t,this.Pt=e,this.di=n,this.A=r,this.w=i,this.t=o,this.fi=s,this.me=vS(this.Pt)}async init(t,e){this.w.init(t,e),await this.ge(t)}async upsert(t,e,n){return this.w.upsert(t,e,n)?(await this.ge(t),!0):!1}async loadCached(t){var e,n,r,i;let o=await rp(this.p.crypto,this.Pt,t),s=await((e=this.p.storage)==null?void 0:e.get(o));if(s==null){if(s=await((n=this.p.storage)==null?void 0:n.get(t.canonicalKey)),s==null)return!1;await((r=this.p.storage)==null?void 0:r.set(o,s)),await((i=this.p.storage)==null?void 0:i.clear(t.canonicalKey))}try{let a=JSON.parse(s),c=Object.entries(a).reduce((l,[u,h])=>(l[u]={version:h.version,flag:h},l),{});return this.w.initCached(t,c),this.t.debug("Loaded cached flag evaluations from persistent storage"),!0}catch(a){return this.t.warn(`Could not load cached flag evaluations from persistent storage: ${a.message}`),!1}}async pi(){var t;if(this._!==void 0)return this._;let e=await((t=this.p.storage)==null?void 0:t.get(await this.me));if(!e)return this._=new xa,this._;try{this._=xa.fromJson(e),this.t.debug("Loaded context index from persistent storage")}catch(n){this.t.warn(`Could not load index from persistent storage: ${n.message}`),this._=new xa}return this._}async ge(t){var e,n;let r=await this.pi(),i=await rp(this.p.crypto,this.Pt,t);r.notice(i,this.fi());let o=r.prune(this.di);await Promise.all(o.map(async l=>{var u;return(u=this.p.storage)==null?void 0:u.clear(l.id)})),await((e=this.p.storage)==null?void 0:e.set(await this.me,r.toJson()));let s=this.A.getAll(),a=Object.entries(s).reduce((l,[u,h])=>(h.flag!==null&&h.flag!==void 0&&(l[u]=h.flag),l),{}),c=JSON.stringify(a);await((n=this.p.storage)==null?void 0:n.set(i,c))}};function US(){let t={};return{init(e){t=Object.entries(e).reduce((n,[r,i])=>(n[r]=i,n),{})},insertOrUpdate(e,n){t[e]=n},get(e){if(Object.prototype.hasOwnProperty.call(t,e))return t[e]},getAll(){return t}}}function PS(t,e){let n=[];return Object.entries(t).forEach(([r,i])=>{let o=e[r];(!o||!Wi(i,o))&&n.push(r)}),Object.keys(e).forEach(r=>{t[r]||n.push(r)}),n}function MS(t,e){let n=t,r=e,i,o=new Array;return{handleFlagChanges(s,a){i?o.forEach(c=>{try{c(i,s,a)}catch(l){}}):r.warn("Received a change event without an active context. Changes will not be propagated.")},init(s,a){i=s;let c=n.getAll();n.init(a);let l=PS(c,a);l.length>0&&this.handleFlagChanges(l,"init")},initCached(s,a){(i==null?void 0:i.canonicalKey)!==s.canonicalKey&&this.init(s,a)},upsert(s,a,c){if((i==null?void 0:i.canonicalKey)!==s.canonicalKey)return r.warn("Received an update for an inactive context."),!1;let l=n.get(a);return l!==void 0&&l.version>=c.version?!1:(n.insertOrUpdate(a,c),this.handleFlagChanges([a],"patch"),!0)},on(s){o.push(s)},off(s){let a=o.indexOf(s);a>-1&&o.splice(a,1)}}}var FS=class{constructor(t,e,n,r,i=()=>Date.now()){this.A=US(),this.w=MS(this.A,r),this.It=this.mi(t,e,n,r,i)}async mi(t,e,n,r,i=()=>Date.now()){let o=await yS(t.crypto,e);return new WS(t,o,n,this.A,this.w,r,i)}get(t){return this.r&&Object.prototype.hasOwnProperty.call(this.r,t)?this.Ot(this.r[t]):this.A.get(t)}getAll(){return this.r?ot(ot({},this.A.getAll()),Object.entries(this.r).reduce((t,[e,n])=>(t[e]=this.Ot(n),t),{})):this.A.getAll()}presetFlags(t){this.A.init(t)}setBootstrap(t,e){this.w.init(t,e)}async init(t,e){return(await this.It).init(t,e)}async upsert(t,e,n){return(await this.It).upsert(t,e,n)}async loadCached(t){return(await this.It).loadCached(t)}on(t){this.w.on(t)}off(t){this.w.off(t)}Ot(t){return{flag:{value:t,version:0},version:0}}setOverride(t,e){this.r||(this.r={}),this.r[t]=e,this.w.handleFlagChanges([t],"override")}removeOverride(t){!this.r||!Object.prototype.hasOwnProperty.call(this.r,t)||(delete this.r[t],Object.keys(this.r).length===0&&(this.r=void 0),this.w.handleFlagChanges([t],"override"))}clearAllOverrides(){if(this.r){let t=ot({},this.r);this.r=void 0,this.w.handleFlagChanges(Object.keys(t),"override")}}getAllOverrides(){if(!this.r)return{};let t={};return Object.entries(this.r).forEach(([e,n])=>{t[e]=this.Ot(n)}),t}getDebugOverride(){return{setOverride:this.setOverride.bind(this),removeOverride:this.removeOverride.bind(this),clearAllOverrides:this.clearAllOverrides.bind(this),getAllOverrides:this.getAllOverrides.bind(this)}}},lp="unknown hook",Kp="beforeEvaluation",_p="afterEvaluation",AS="afterTrack";function br(t,e,n,r,i){try{return r()}catch(o){return t==null||t.error(`An error was encountered in "${e}" of the "${n}" hook: ${o}`),i}}function vr(t,e){try{return e.getMetadata().name||lp}catch(n){return t.error("Exception thrown getting metadata for hook. Unable to get hook name."),lp}}function JS(t,e,n){return e.map(r=>br(t,Kp,vr(t,r),()=>{var i,o;return(o=(i=r==null?void 0:r.beforeEvaluation)==null?void 0:i.call(r,n,{}))!=null?o:{}},{}))}function DS(t,e,n,r,i){for(let o=e.length-1;o>=0;o-=1){let s=e[o],a=r[o];br(t,_p,vr(t,s),()=>{var c,l;return(l=(c=s==null?void 0:s.afterEvaluation)==null?void 0:c.call(s,n,a,i))!=null?l:{}},{})}}function YS(t,e,n){return e.map(r=>br(t,Kp,vr(t,r),()=>{var i,o;return(o=(i=r==null?void 0:r.beforeIdentify)==null?void 0:i.call(r,n,{}))!=null?o:{}},{}))}function KS(t,e,n,r,i){for(let o=e.length-1;o>=0;o-=1){let s=e[o],a=r[o];br(t,_p,vr(t,s),()=>{var c,l;return(l=(c=s==null?void 0:s.afterIdentify)==null?void 0:c.call(s,n,a,i))!=null?l:{}},{})}}function _S(t,e,n){for(let r=e.length-1;r>=0;r-=1){let i=e[r];br(t,AS,vr(t,i),()=>{var o;return(o=i==null?void 0:i.afterTrack)==null?void 0:o.call(i,n)},void 0)}}var HS=class{constructor(t,e){this.t=t,this.$=[],this.$.push(...e)}withEvaluation(t,e,n,r){if(this.$.length===0)return r();let i=[...this.$],o={flagKey:t,context:e,defaultValue:n},s=JS(this.t,i,o),a=r();return DS(this.t,i,o,s,a),a}identify(t,e){let n=[...this.$],r={context:t,timeout:e},i=YS(this.t,n,r);return o=>{KS(this.t,n,r,i,o)}}addHook(t){this.$.push(t)}afterTrack(t){if(this.$.length===0)return;let e=[...this.$];_S(this.t,e,t)}};function zS(t){return{getMetadata(){return{name:"LaunchDarkly-Inspector-Adapter"}},afterEvaluation:(e,n,r)=>(t.onFlagUsed(e.flagKey,r,e.context),n),afterIdentify(e,n,r){return t.onIdentityChanged(e.context),n}}}function BS(t,e){return`an inspector: "${e}" of an invalid type (${t}) was configured`}function jS(t,e){return`an inspector: "${e}" of type: "${t}" generated an exception`}function QS(t,e){let n=!1,r={method:(...i)=>{try{t.method(...i)}catch(o){n||(n=!0,e.warn(jS(r.type,r.name)))}},type:t.type,name:t.name,synchronous:t.synchronous};return r}var Hp="flag-used",zp="flag-details-changed",Bp="flag-detail-changed",jp="client-identity-changed",$S=[Hp,zp,Bp,jp];function qS(t,e){let n=$S.includes(t.type)&&t.method&&typeof t.method=="function";return n||e.warn(BS(t.type,t.name)),n}var tI=class{constructor(t,e){this.B=[];let n=t.filter(r=>qS(r,e));this.B=n.map(r=>QS(r,e))}hasInspectors(){return this.B.length!==0}onFlagUsed(t,e,n){this.B.forEach(r=>{r.type===Hp&&r.method(t,e,n)})}onFlagsChanged(t){this.B.forEach(e=>{e.type===zp&&e.method(t)})}onFlagChanged(t,e){this.B.forEach(n=>{n.type===Bp&&n.method(t,e)})}onIdentityChanged(t){this.B.forEach(e=>{e.type===jp&&e.method(t)})}},eI=class{constructor(t){this.t=t,this.n=new Map}on(t,e){var n,r;if(typeof t!="string"){(n=this.t)==null||n.warn("Only string event names are supported.");return}this.n.has(t)?(r=this.n.get(t))==null||r.push(e):this.n.set(t,[e])}off(t,e){let n=this.n.get(t);if(n){if(e){let r=n.filter(i=>i!==e);r.length===0?this.n.delete(t):this.n.set(t,r);return}this.n.delete(t)}}gi(t,e,...n){var r;try{t(...n)}catch(i){(r=this.t)==null||r.error(`Encountered error invoking handler for "${e}", detail: "${i}"`)}}emit(t,...e){let n=this.n.get(t);n==null||n.forEach(r=>this.gi(r,t,...e))}eventNames(){return[...this.n.keys()]}listenerCount(t){var e,n;return(n=(e=this.n.get(t))==null?void 0:e.length)!=null?n:0}};function nI(t,e,n){let r=e.info.sdkData(),i;n.applicationInfo&&(n.applicationInfo.id&&(i=i!=null?i:{},i.id=n.applicationInfo.id),n.applicationInfo.version&&(i=i!=null?i:{},i.version=n.applicationInfo.version),n.applicationInfo.name&&(i=i!=null?i:{},i.name=n.applicationInfo.name),n.applicationInfo.versionName&&(i=i!=null?i:{},i.versionName=n.applicationInfo.versionName));let o={name:r.userAgentBase,version:r.version};r.wrapperName&&(o.wrapperName=r.wrapperName),r.wrapperVersion&&(o.wrapperVersion=r.wrapperVersion);let s={sdk:o,[n.credentialType]:t};return i&&(s.application=i),s}var{ClientMessages:cp,ErrorKinds:up}=de,rI=5,iI=class{constructor(t,e,n,r,i,o){if(this.sdkKey=t,this.autoEnvAttributes=e,this.platform=n,this.a=RS(),this.At=15,this.T=new ap(!1),this.ct=new ap(!0),this.Tt=!1,this.yi=cS(),!t)throw new Error("You must configure the client with a client-side SDK key");if(!n.encoding)throw new Error("Platform must implement Encoding because btoa is required.");this.e=new mS(r,o),this.logger=this.e.logger,this.ye=Fw(this.sdkKey,this.platform.info,this.e.tags,this.e.serviceEndpoints.includeAuthorizationHeader,this.e.userAgentHeaderName),this.R=new FS(this.platform,t,this.e.maxCachedContexts,this.e.logger),this.S=LS(t,this.e,n),this.E=XS(t,this.e,n,this.ye,this.S),this.emitter=new eI,this.emitter.on("error",(a,c)=>{this.logger.error(`error: ${c}, context: ${JSON.stringify(a)}`)}),this.R.on((a,c,l)=>{this.vi(c,l);let u=xn.toLDContext(a);this.emitter.emit("change",u,c),c.forEach(h=>{this.emitter.emit(`change:${h}`,u)})}),this.dataManager=i(this.R,this.e,this.ye,this.emitter,this.S);let s=[...this.e.hooks];if(this.environmentMetadata=nI(this.sdkKey,this.platform,this.e),this.e.getImplementationHooks(this.environmentMetadata).forEach(a=>{s.push(a)}),this.M=new HS(this.logger,s),this.Y=new tI(this.e.inspectors,this.logger),this.Y.hasInspectors()&&this.M.addHook(zS(this.Y)),r.cleanOldPersistentData&&o!=null&&o.getLegacyStorageKeys&&this.platform.storage)try{this.logger.debug("Cleaning old persistent data."),Promise.all(o.getLegacyStorageKeys().map(a=>{var c;return(c=this.platform.storage)==null?void 0:c.clear(a)})).catch(a=>{this.logger.error(`Error cleaning old persistent data: ${a}`)}).finally(()=>{this.logger.debug("Cleaned old persistent data.")})}catch(a){this.logger.error(`Error cleaning old persistent data: ${a}`)}}allFlags(){return Object.entries(this.R.getAll()).reduce((t,[e,n])=>(n.flag!==null&&n.flag!==void 0&&!n.flag.deleted&&(t[e]=n.flag.value),t),{})}async close(){var t;await this.flush(),(t=this.E)==null||t.close(),this.dataManager.close(),this.logger.debug("Closed event processor and data source.")}async flush(){var t;try{await((t=this.E)==null?void 0:t.flush()),this.logger.debug("Successfully flushed event processor.")}catch(e){return this.logger.error(`Error flushing event processor: ${e}.`),{error:e,result:!1}}return{result:!0}}getContext(){return this.a.hasContext()?Vp(this.a.getUnwrappedContext()):void 0}getInternalContext(){return this.a.getContext()}presetFlags(t){this.R.presetFlags(t)}async identify(t,e){let n=await this.identifyResult(t,e);if(n.status==="error")throw n.error;if(n.status==="timeout"){let r=new kp(`identify timed out after ${n.timeout} seconds.`);throw this.logger.error(r.message),r}}async identifyResult(t,e){var n,r;let i=(n=e==null?void 0:e.timeout)!=null?n:rI,o=(e==null?void 0:e.timeout)===void 0&&(e==null?void 0:e.noTimeout)===!0;i>this.At&&this.logger.warn(`The identify function was called with a timeout greater than ${this.At} seconds. We recommend a timeout of less than ${this.At} seconds.`);let s=this.yi.execute({before:async()=>{let c=await OS(t,this.platform);this.autoEnvAttributes===Ai.Enabled&&(c=await ES(c,this.platform,this.e));let l=xn.fromLDContext(c);if(l.valid){let u=this.M.identify(c,e==null?void 0:e.timeout);return{context:c,checkedContext:l,afterIdentify:u}}return{context:c,checkedContext:l}},execute:async c=>{var l;let{context:u,checkedContext:h}=c;if(!h.valid){let d=new Error("Context was unspecified or had no key");return this.emitter.emit("error",u,d),Promise.reject(d)}this.a.set(u,h),(l=this.E)==null||l.sendEvent(this.T.identifyEvent(h));let{identifyPromise:p,identifyResolve:f,identifyReject:m}=this.a.newIdentificationPromise();return this.logger.debug(`Identifying ${JSON.stringify(h)}`),await this.dataManager.identify(f,m,h,e),p},after:async(c,l)=>{var u,h,p;c.status==="complete"?(u=l==null?void 0:l.afterIdentify)==null||u.call(l,{status:"completed"}):c.status==="shed"?(h=l==null?void 0:l.afterIdentify)==null||h.call(l,{status:"shed"}):c.status==="error"&&((p=l==null?void 0:l.afterIdentify)==null||p.call(l,{status:"error"}))}},(r=e==null?void 0:e.sheddable)!=null?r:!1).then(c=>{if(c.status==="error"){let u={status:"error",error:c.error};return this.maybeSetInitializationResult({status:"failed",error:c.error}),u}if(c.status==="shed")return{status:"shed"};let l={status:"completed"};return this.maybeSetInitializationResult({status:"complete"}),l});if(o)return s;let a=new Promise(c=>{setTimeout(()=>{c({status:"timeout",timeout:i})},i*1e3)});return Promise.race([s,a])}maybeSetInitializationResult(t){this.initializeResult===void 0&&(this.initializeResult=t,this.emitter.emit("ready"),t.status==="complete"&&this.emitter.emit("initialized"),this.initResolve&&(this.initResolve(t),this.initResolve=void 0))}waitForInitialization(t){var e;let n=(e=t==null?void 0:t.timeout)!=null?e:5;return this.initializeResult?Promise.resolve(this.initializeResult):this.initializedPromise?this.promiseWithTimeout(this.initializedPromise,n):(this.initializedPromise||(this.initializedPromise=new Promise(r=>{this.initResolve=r})),this.promiseWithTimeout(this.initializedPromise,n))}promiseWithTimeout(t,e){let n=Pw(e,"waitForInitialization");return Promise.race([t.then(r=>(n.cancel(),r)),n.promise.then(()=>({status:"complete"})).catch(()=>({status:"timeout"}))]).catch(r=>{var i;return(i=this.logger)==null||i.error(r.message),{status:"failed",error:r}})}on(t,e){this.emitter.on(t,e)}off(t,e){this.emitter.off(t,e)}track(t,e,n){var r,i;if(!this.a.hasValidContext()){this.logger.warn(cp.MissingContextKeyNoEvent);return}n!==void 0&&!G.Number.is(n)&&((r=this.logger)==null||r.warn(cp.invalidMetricValue(typeof n))),(i=this.E)==null||i.sendEvent(this.e.trackEventModifier(this.T.customEvent(t,this.a.getContext(),e,n))),this.M.afterTrack({key:t,context:this.a.getUnwrappedContext(),data:e,metricValue:n})}ut(t,e,n,r){var i,o,s,a,c;let l=this.a.hasContext();l||(i=this.logger)==null||i.warn("Flag evaluation called before client is fully initialized, data from this evaulation could be stale.");let u=this.a.getContext(),h=this.R.get(t);if(h===void 0||h.flag.deleted){let g=e!=null?e:null;return(o=this.logger)==null||o.warn(`Unknown feature flag "${t}"; returning default value ${g}.`),l&&((s=this.E)==null||s.sendEvent(this.T.unknownFlagEvent(t,g,u))),op(up.FlagNotFound,e)}let{reason:p,value:f,variation:m,prerequisites:d}=h.flag;if(r){let[g,w]=r(f);if(!g){l&&((a=this.E)==null||a.sendEvent(n.evalEventClient(t,e,e,h.flag,u,p)));let R=new Ww(`Wrong type "${w}" for feature flag "${t}"; returning default value`);return this.emitter.emit("error",this.a.getUnwrappedContext(),R),op(up.WrongType,e)}}let v=sp(f,m,p);return f==null&&(this.logger.debug("Result value is null. Providing default value."),v.value=e),d==null||d.forEach(g=>{this.ut(g,void 0,this.T)}),l&&((c=this.E)==null||c.sendEvent(n.evalEventClient(t,f,e,h.flag,u,p))),v}variation(t,e){let{value:n}=this.M.withEvaluation(t,this.a.getUnwrappedContext(),e,()=>this.ut(t,e,this.T));return n}variationDetail(t,e){return this.M.withEvaluation(t,this.a.getUnwrappedContext(),e,()=>this.ut(t,e,this.ct))}z(t,e,n,r){return this.M.withEvaluation(t,this.a.getUnwrappedContext(),e,()=>this.ut(t,e,n,r))}boolVariation(t,e){return this.z(t,e,this.T,n=>[G.Boolean.is(n),G.Boolean.getType()]).value}jsonVariation(t,e){return this.variation(t,e)}numberVariation(t,e){return this.z(t,e,this.T,n=>[G.Number.is(n),G.Number.getType()]).value}stringVariation(t,e){return this.z(t,e,this.T,n=>[G.String.is(n),G.String.getType()]).value}boolVariationDetail(t,e){return this.z(t,e,this.ct,n=>[G.Boolean.is(n),G.Boolean.getType()])}numberVariationDetail(t,e){return this.z(t,e,this.ct,n=>[G.Number.is(n),G.Number.getType()])}stringVariationDetail(t,e){return this.z(t,e,this.ct,n=>[G.String.is(n),G.String.getType()])}jsonVariationDetail(t,e){return this.variationDetail(t,e)}addHook(t){this.M.addHook(t)}setEventSendingEnabled(t,e){var n,r,i,o;this.Tt!==t&&(this.Tt=t,t?(this.logger.debug("Starting event processor"),(n=this.E)==null||n.start()):e?((r=this.logger)==null||r.debug("Flushing event processor before disabling."),this.flush().then(()=>{var s,a;this.Tt||((s=this.logger)==null||s.debug("Stopping event processor."),(a=this.E)==null||a.close())})):((i=this.logger)==null||i.debug("Stopping event processor."),(o=this.E)==null||o.close()))}sendEvent(t){var e;(e=this.E)==null||e.sendEvent(t)}getDebugOverrides(){var t,e;return(e=(t=this.R).getDebugOverride)==null?void 0:e.call(t)}vi(t,e){if(!this.Y.hasInspectors())return;let n={};t.forEach(r=>{let i=this.R.get(r);if(i!=null&&i.flag&&!i.flag.deleted){let{reason:o,value:s,variation:a}=i.flag;n[r]=sp(s,a,o)}else n[r]={value:void 0,variationIndex:null}}),e==="init"?this.Y.onFlagsChanged(n):e==="patch"&&Object.entries(n).forEach(([r,i])=>{this.Y.onFlagChanged(r,i)})}};function oI(t,e,n){n.forEach(r=>{var i;try{(i=r.registerDebug)==null||i.call(r,e)}catch(o){t.error(`Exception thrown registering plugin ${de.safeGetName(t,r)}.`)}})}function Qp(t,e){let n=Object.keys(e),r="$flagsState",i="$valid",o=e[r];!o&&n.length&&t.warn("LaunchDarkly client was initialized with bootstrap data that did not include flag metadata. Events may not be sent correctly."),e[i]===!1&&t.warn("LaunchDarkly bootstrap data is not available because the back end could not read the flags.");let s={};return n.forEach(a=>{if(a!==r&&a!==i){let c;o&&o[a]?c=ot({value:e[a]},o[a]):c={value:e[a],version:0},s[a]={version:c.version,flag:c}}}),s}function sI(t){return{polling:()=>({pathGet(e,n){return`/sdk/evalx/${t}/contexts/${Qh(n,e)}`},pathReport(e,n){return`/sdk/evalx/${t}/context`},pathPost(e,n){throw new Error("Post for FDv1 unsupported.")},pathPing(e,n){throw new Error("Ping for polling unsupported.")}}),streaming:()=>({pathGet(e,n){return`/eval/${t}/${Qh(n,e)}`},pathReport(e,n){return`/eval/${t}`},pathPost(e,n){throw new Error("Post for FDv1 unsupported.")},pathPing(e,n){return`/ping/${t}`}})}}function aI(t,e,n){return{async handlePut(r,i){n.debug(`Got PUT: ${Object.keys(i)}`);let o=Object.entries(i).reduce((s,[a,c])=>(s[a]={version:c.version,flag:c},s),{});await t.init(r,o),e.requestStateUpdate("VALID")},async handlePatch(r,i){n.debug(`Got PATCH ${JSON.stringify(i,null,2)}`),t.upsert(r,i.key,{version:i.version,flag:i})},async handleDelete(r,i){n.debug(`Got DELETE ${JSON.stringify(i,null,2)}`),t.upsert(r,i.key,{version:i.version,flag:me(ot({},i),{deleted:!0,flagVersion:0,value:void 0,variation:0,trackEvents:!1})})},handleStreamingError(r){e.reportError(r.kind,r.message,r.code,r.recoverable)},handlePollingError(r){e.reportError(r.kind,r.message,r.status,r.recoverable)}}}function lI(t,e=()=>Date.now()){let n="CLOSED",r=e(),i;function o(){return{state:n,stateSince:r,lastError:i}}function s(a,c=!1){let l=a==="INTERRUPTED"&&n==="INITIALIZING"?"INITIALIZING":a,u=n!==l;u&&(n=l,r=e()),(u||c)&&t.emit("dataSourceStatus",o())}return{get status(){return o()},requestStateUpdate(a){s(a)},reportError(a,c,l,u=!1){i={kind:a,message:c,statusCode:l,time:e()},s(u?"INTERRUPTED":"CLOSED",!0)}}}function hp(t){t==null||t.debug("Poll completed after the processor was closed. Skipping processing.")}var cI=class{constructor(t,e,n,r,i){this.wi=t,this.Ei=e,this.Di=n,this.m=r,this.t=i,this.l=!1}async ve(){var t,e,n,r,i,o,s;if(this.l)return;let a=h=>{var p,f,m;(p=this.t)==null||p.error("Polling received invalid data"),(f=this.t)==null||f.debug(`Invalid JSON follows: ${h}`),(m=this.m)==null||m.call(this,new Fi(At.InvalidData,"Malformed JSON data in polling response"))};(t=this.t)==null||t.debug("Polling LaunchDarkly for feature flag updates");let c=Date.now();try{let h=await this.wi.requestPayload();try{if(this.l){hp(this.t);return}let p=JSON.parse(h);try{(e=this.Di)==null||e.call(this,p)}catch(f){(n=this.t)==null||n.error(`Exception from data handler: ${f}`)}}catch(p){a(h)}}catch(h){if(this.l){hp(this.t);return}let p=h;if(p.status!==void 0&&!Ki(p.status)){(r=this.t)==null||r.error(Gn(h,"polling request")),(i=this.m)==null||i.call(this,new Fi(At.ErrorResponse,p.message,p.status));return}(o=this.t)==null||o.error(Gn(h,"polling request","will retry"))}let l=Date.now()-c,u=Math.max(this.Ei*1e3-l,0);(s=this.t)==null||s.debug("Elapsed: %d ms, sleeping for %d ms",l,u),this.Nt=setTimeout(()=>{this.ve()},u)}start(){this.ve()}stop(){this.Nt&&(clearTimeout(this.Nt),this.Nt=void 0),this.l=!0}close(){this.stop()}},uI=(t,e,n,r)=>{n==null||n.error(`Stream received invalid data in "${t}" message`),n==null||n.debug(`Invalid JSON follows: ${e}`),r==null||r(new Xa(At.InvalidData,"Malformed JSON data in event stream"))};function hI(t,e){e==null||e.debug(`Received ${t} event after processor was closed. Skipping processing.`)}function pp(t){t==null||t.debug("Ping completed after processor was closed. Skipping processing.")}var pI=class{constructor(t,e,n,r,i,o,s,a,c){var l;this.bi=t,this.$t=e,this.n=n,this.V=r,this.ki=o,this.S=s,this.m=a,this.t=c,this.l=!1;let u;e.useReport&&!r.getEventSourceCapabilities().customMethod?u=e.paths.pathPing(i,t):u=e.useReport?e.paths.pathReport(i,t):e.paths.pathGet(i,t);let h=[...(l=e.queryParameters)!=null?l:[]];this.$t.withReasons&&h.push({key:"withReasons",value:"true"}),this.V=r,this.we=ot({},e.baseHeaders),this.t=c,this.xi=Lw(e.serviceEndpoints,u,h)}Ee(){this.lt=Date.now()}Rt(t){this.lt&&this.S&&this.S.recordStreamInit(this.lt,!t,Date.now()-this.lt),this.lt=void 0}Si(t){var e,n,r;return xp(t)?((r=this.t)==null||r.warn(Gn(t,"streaming request","will retry")),this.Rt(!1),this.Ee(),!0):(this.Rt(!1),(e=this.m)==null||e.call(this,new Xa(At.ErrorResponse,t.message,t.status,!1)),(n=this.t)==null||n.error(Gn(t,"streaming request")),!1)}start(){this.Ee();let t;this.$t.useReport?(this.we["content-type"]="application/json",t={method:"REPORT",body:this.bi}):t={};let e=this.V.createEventSource(this.xi,me(ot({headers:this.we},t),{errorFilter:n=>this.Si(n),initialRetryDelayMillis:this.$t.initialRetryDelayMillis,readTimeoutMillis:300*1e3,retryResetIntervalMillis:60*1e3}));this.De=e,e.onclose=()=>{var n;(n=this.t)==null||n.info("Closed LaunchDarkly stream connection")},e.onerror=()=>{},e.onopen=()=>{var n;(n=this.t)==null||n.info("Opened LaunchDarkly stream connection")},e.onretrying=n=>{var r;(r=this.t)==null||r.info(`Will retry stream connection in ${n.delayMillis} milliseconds`)},this.n.forEach(({deserializeData:n,processJson:r},i)=>{e.addEventListener(i,o=>{var s,a;if(this.l){hI(i,this.t);return}if((s=this.t)==null||s.debug(`Received ${i} event`),o!=null&&o.data){this.Rt(!0);let{data:c}=o,l=n(c);if(!l){uI(i,c,this.t,this.m);return}r(l)}else(a=this.m)==null||a.call(this,new Xa(At.InvalidData,"Unexpected payload from event stream"))})}),e.addEventListener("ping",async()=>{var n,r,i,o,s,a,c;(n=this.t)==null||n.debug("Got PING, going to poll LaunchDarkly for feature flag updates");try{let l=await this.ki.requestPayload();try{if(this.l){pp(this.t);return}let u=JSON.parse(l);try{(r=this.n.get("put"))==null||r.processJson(u)}catch(h){(i=this.t)==null||i.error(`Exception from data handler: ${h}`)}}catch(u){(o=this.t)==null||o.error("Polling after ping received invalid data"),(s=this.t)==null||s.debug(`Invalid JSON follows: ${l}`),(a=this.m)==null||a.call(this,new Fi(At.InvalidData,"Malformed JSON data in ping polling response"))}}catch(l){if(this.l){pp(this.t);return}let u=l;(c=this.m)==null||c.call(this,new Fi(At.ErrorResponse,u.message,u.status))}})}stop(){var t;(t=this.De)==null||t.close(),this.De=void 0,this.l=!0}close(){this.stop()}},dI=class{constructor(t,e,n,r,i,o,s,a,c){this.platform=t,this.flagManager=e,this.credential=n,this.config=r,this.getPollingPaths=i,this.getStreamingPaths=o,this.baseHeaders=s,this.emitter=a,this.diagnosticsManager=c,this.closed=!1,this.logger=r.logger,this.dataSourceStatusManager=lI(a),this.G=aI(e,this.dataSourceStatusManager,this.config.logger)}setConnectionParams(t){this.Li=t}createPollingProcessor(t,e,n,r,i){let o=new cI(n,this.config.pollInterval,async s=>{await this.G.handlePut(e,s),r==null||r()},s=>{this.emitter.emit("error",t,s),this.G.handlePollingError(s),i==null||i(s)},this.logger);this.updateProcessor=this.be(o,this.dataSourceStatusManager)}createStreamingProcessor(t,e,n,r,i){var o;let s=new pI(JSON.stringify(t),{credential:this.credential,serviceEndpoints:this.config.serviceEndpoints,paths:this.getStreamingPaths(),baseHeaders:this.baseHeaders,initialRetryDelayMillis:this.config.streamInitialReconnectDelay*1e3,withReasons:this.config.withReasons,useReport:this.config.useReport,queryParameters:(o=this.Li)==null?void 0:o.queryParameters},this.createStreamListeners(e,r),this.platform.requests,this.platform.encoding,n,this.diagnosticsManager,a=>{this.emitter.emit("error",t,a),this.G.handleStreamingError(a),i==null||i(a)},this.logger);this.updateProcessor=this.be(s,this.dataSourceStatusManager)}createStreamListeners(t,e){let n=new Map;return n.set("put",{deserializeData:JSON.parse,processJson:async r=>{await this.G.handlePut(t,r),e==null||e()}}),n.set("patch",{deserializeData:JSON.parse,processJson:async r=>{this.G.handlePatch(t,r)}}),n.set("delete",{deserializeData:JSON.parse,processJson:async r=>{this.G.handleDelete(t,r)}}),n}be(t,e){return{start:()=>{e.requestStateUpdate("INITIALIZING"),t.start()},stop:()=>{t.stop(),e.requestStateUpdate("CLOSED")},close:()=>{t.close(),e.requestStateUpdate("CLOSED")}}}close(){var t;(t=this.updateProcessor)==null||t.close(),this.closed=!0}};function _i(){return typeof document!==void 0}function Ya(){return typeof window!==void 0}function $p(t,e,n){return _i()?(document.addEventListener(t,e,n),()=>{document.removeEventListener(t,e,n)}):()=>{}}function qp(t,e,n){return _i()?(window.addEventListener(t,e,n),()=>{window.removeEventListener(t,e,n)}):()=>{}}function yr(){return Ya()?window.location.href:""}function fI(){return Ya()?window.location.search:""}function mI(){return Ya()?window.location.hash:""}function yI(){if(typeof crypto!==void 0)return crypto;throw Error("Access to a web crypto API is required")}function gI(){return _i()?document.visibilityState:"visibile"}function bI(t){if(_i())return document.querySelectorAll(t)}var vI="[BrowserDataManager]",wI=class extends dI{constructor(t,e,n,r,i,o,s,a,c,l){super(t,e,n,r,o,s,a,c,l),this.Ui=i,this.Z=void 0,this.Mt=!1,this.Z=i.streaming}L(t,...e){this.logger.debug(`${vI} ${t}`,...e)}async identify(t,e,n,r){if(this.closed){this.L("Identify called after data manager was closed.");return}this.context=n;let i=r;i!=null&&i.hash?this.setConnectionParams({queryParameters:[{key:"h",value:i.hash}]}):this.setConnectionParams(),this.Ft=i==null?void 0:i.hash,i!=null&&i.bootstrap?this.Ci(n,i,t):(await this.flagManager.loadCached(n)&&this.L("Identify - Flags loaded from cache. Continuing to initialize via a poll."),await this.Pi(n,t,e)),this.ke(),this.Ut()}async Ii(t){let e=JSON.stringify(xn.toLDContext(t)),n=ep(e,this.config.serviceEndpoints,this.getPollingPaths(),this.platform.requests,this.platform.encoding,this.baseHeaders,[],this.config.withReasons,this.config.useReport,this.Ft),r=3,i;for(let o=0;o<=r;o+=1)try{return await n.requestPayload()}catch(s){if(!xp(s))throw s;i=s,o<r&&(this.L(Gn(s,"initial poll request","will retry")),await Np(1e3))}throw i}async Pi(t,e,n){var r,i;try{this.dataSourceStatusManager.requestStateUpdate(sS.Initializing);let o=await this.Ii(t);try{let s=this.createStreamListeners(t,e).get("put");s.processJson(s.deserializeData(o))}catch(s){this.dataSourceStatusManager.reportError(At.InvalidData,(r=s.message)!=null?r:"Could not parse poll response")}}catch(o){this.dataSourceStatusManager.reportError(At.NetworkError,(i=o.message)!=null?i:"unexpected network error",o.status),n(o)}}Ci(t,e,n){let{bootstrapParsed:r}=e;r||(r=Qp(this.logger,e.bootstrap)),this.flagManager.setBootstrap(t,r),this.L("Identify - Initialization completed from bootstrap"),n()}setForcedStreaming(t){this.Z=t,this.Ut()}setAutomaticStreamingState(t){this.Mt=t,this.Ut()}Ut(){let t=this.Z||this.Mt&&this.Z===void 0;this.L(`Updating streaming state. forced(${this.Z}) automatic(${this.Mt})`),t?this.Oi():this.ke()}ke(){var t;this.updateProcessor&&this.L("Stopping update processor."),(t=this.updateProcessor)==null||t.close(),this.updateProcessor=void 0}Oi(){if(this.updateProcessor){this.L("Update processor already active. Not changing state.");return}if(!this.context){this.L("Context not set, not starting update processor.");return}this.L("Starting update processor."),this.Ai(this.context)}Ai(t,e,n){var r;let i=xn.toLDContext(t);(r=this.updateProcessor)==null||r.close();let o=JSON.stringify(xn.toLDContext(t)),s=ep(o,this.config.serviceEndpoints,this.getPollingPaths(),this.platform.requests,this.platform.encoding,this.baseHeaders,[],this.config.withReasons,this.config.useReport,this.Ft);this.createStreamingProcessor(i,t,s,e,n),this.updateProcessor.start()}};function SI(t){let e=$p("visibilitychange",()=>{gI()==="hidden"&&t()}),n=qp("pagehide",t);return()=>{e(),n()}}function Na(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function II(t,e,n,r){let i=((t.kind==="substring"||t.kind==="regex")&&r.includes("/")?e:e.replace(r,"")).replace(n,"");switch(t.kind){case"exact":return new RegExp(`^${Na(t.url)}/?$`).test(e);case"canonical":return new RegExp(`^${Na(t.url)}/?$`).test(i);case"substring":return new RegExp(`.*${Na(t.substring)}.*$`).test(i);case"regex":return new RegExp(t.pattern).test(i);default:return!1}}function TI(t,e){let n=[];return e.forEach(r=>{let i=t.target,{selector:o}=r,s=bI(o);for(;i&&s!=null&&s.length;){for(let a=0;a<s.length;a+=1)if(i===s[a]){n.push(r);break}i=i.parentNode}}),n}var EI=class{constructor(t,e){let n=t.filter(o=>{var s;return(s=o.urls)==null?void 0:s.some(a=>II(a,yr(),fI(),mI()))}),r=n.filter(o=>o.kind==="pageview"),i=n.filter(o=>o.kind==="click");if(r.forEach(o=>e(o)),i.length){let o=s=>{TI(s,i).forEach(a=>{e(a)})};this.xe=$p("click",o)}}close(){var t;(t=this.xe)==null||t.call(this)}},RI=300,CI=class{constructor(t){this.Vt=yr();let e=()=>{let r=yr();r!==this.Vt&&(this.Vt=r,t())};this.jt=setInterval(e,RI);let n=qp("popstate",e);this.Se=()=>{n()}}close(){var t;this.jt&&clearInterval(this.jt),(t=this.Se)==null||t.call(this)}},ZI=class{constructor(t,e,n,r,i,o=s=>new CI(s)){this.V=e,this.$i=r,this.Ni=i,this.ht=[],this.Ce=!1,this.dt=`${n}/sdk/goals/${t}`,this.Le=o(()=>{this.Ur()})}async initialize(){await this.Ti(),this.Ur()}startTracking(){this.Ce=!0,this.Ur()}Ur(){var t;this.Ce&&((t=this.Ht)==null||t.close(),this.ht&&this.ht.length&&(this.Ht=new EI(this.ht,e=>{this.Ni(yr(),e)})))}async Ti(){try{let t=await this.V.fetch(this.dt);this.ht=await t.json()}catch(t){this.$i(new Zp(`Encountered error fetching goals: ${t}`))}}close(){var t,e;(t=this.Le)==null||t.close(),(e=this.Ht)==null||e.close()}};function kI(t){return t.kind==="click"}var VI=2,td={fetchGoals:!0,eventUrlTransformer:t=>t,streaming:void 0,plugins:[]},xI={fetchGoals:G.Boolean,eventUrlTransformer:G.Function,streaming:G.Boolean,plugins:G.createTypeArray("LDPlugin",{})};function NI(t){var e;let n=ot({},t);return(e=n.flushInterval)!=null||(n.flushInterval=VI),n}function OI(t){let e=NI(t);return Object.keys(td).forEach(n=>{delete e[n]}),e}function GI(t,e){let n=ot({},td);return Object.entries(xI).forEach(r=>{let[i,o]=r,s=t[i];s!==void 0&&(o.is(s)?n[i]=s:e.warn(Te.wrongOptionType(i,o.getType(),typeof s)))}),n}var LI=class{constructor(t,e){switch(this.Ri=t,this.Pe=[],e){case"sha1":this.Bt="SHA-1";break;case"sha256":this.Bt="SHA-256";break;default:throw new Error(`Algorithm is not supported ${e}`)}}async asyncDigest(t){let e=this.Pe.join(""),n=new TextEncoder().encode(e),r=await this.Ri.subtle.digest(this.Bt,n);switch(t){case"base64":return btoa(String.fromCharCode(...new Uint8Array(r)));case"hex":return[...new Uint8Array(r)].map(i=>i.toString(16).padStart(2,"0")).join("");default:throw new Error(`Encoding is not supported ${t}`)}}update(t){return this.Pe.push(t),this}},XI={start:0,end:3},WI={start:4,end:5},Oa={start:6,end:7},Ga={start:8,end:8},UI={start:9,end:9},PI={start:10,end:15};function MI(){if(crypto&&crypto.getRandomValues){let e=new Uint8Array(16);return crypto.getRandomValues(e),[...e.values()]}let t=[];for(let e=0;e<16;e+=1)t.push(Math.floor(Math.random()*256));return t}function kn(t,e){let n="";for(let r=e.start;r<=e.end;r+=1)n+=t[r].toString(16).padStart(2,"0");return n}function FI(t){return t[Ga.start]=(t[Ga.start]|128)&191,t[Oa.start]=t[Oa.start]&15|64,`${kn(t,XI)}-${kn(t,WI)}-${kn(t,Oa)}-${kn(t,Ga)}${kn(t,UI)}-${kn(t,PI)}`}function AI(){let t=MI();return FI(t)}function JI(){return typeof crypto!==void 0&&typeof crypto.randomUUID=="function"?crypto.randomUUID():AI()}var DI=class{createHash(t){return new LI(yI(),t)}randomUUID(){return JI()}};function YI(t){let e=Array.from(t,n=>String.fromCodePoint(n)).join("");return btoa(e)}var KI=class{btoa(t){return YI(new TextEncoder().encode(t))}},_I=class{constructor(t){this.e=t}platformData(){return{name:"JS"}}sdkData(){let t={name:"@launchdarkly/js-client-sdk",version:"4.3.1",userAgentBase:"JSClient"};return this.e.wrapperName&&(t.wrapperName=this.e.wrapperName),this.e.wrapperVersion&&(t.wrapperVersion=this.e.wrapperVersion),t}},HI=class{constructor(t,e){this.dt=t,this.n={},this.P=new Tw(e.initialRetryDelayMillis,e.retryResetIntervalMillis),this.Ie=e.errorFilter,this.Oe()}Oe(){this.K=new EventSource(this.dt),this.K.onopen=()=>{var t;this.P.success(),(t=this.onopen)==null||t.call(this)},this.K.onerror=t=>{var e;this.Mi(t),(e=this.onerror)==null||e.call(this,t)},Object.entries(this.n).forEach(([t,e])=>{e.forEach(n=>{var r;(r=this.K)==null||r.addEventListener(t,n)})})}addEventListener(t,e){var n,r,i;(r=(n=this.n)[t])!=null||(n[t]=[]),this.n[t].push(e),(i=this.K)==null||i.addEventListener(t,e)}close(){var t,e;clearTimeout(this.zt),this.zt=void 0,(t=this.K)==null||t.close(),(e=this.onclose)==null||e.call(this)}Fi(t){var e;(e=this.onretrying)==null||e.call(this,{delayMillis:t}),this.zt=setTimeout(()=>{this.Oe()},t)}Mi(t){this.close(),!(t.status&&typeof t.status=="number"&&!this.Ie(t))&&this.Fi(this.P.fail())}},zI=class{fetch(t,e){return fetch(t,e)}createEventSource(t,e){return new HI(t,e)}getEventSourceCapabilities(){return{customMethod:!1,readTimeout:!1,headers:!1}}};function ed(){return typeof localStorage!="undefined"}function BI(){if(!ed())return[];let t=[];for(let e=0;e<localStorage.length;e+=1){let n=localStorage.key(e);n&&t.push(n)}return t}var jI=class{constructor(t){this.t=t}async clear(t){var e;try{localStorage.removeItem(t)}catch(n){(e=this.t)==null||e.error(`Error clearing key from localStorage: ${t}, reason: ${n}`)}}async get(t){var e;try{let n=localStorage.getItem(t);return n!=null?n:null}catch(n){return(e=this.t)==null||e.error(`Error getting key from localStorage: ${t}, reason: ${n}`),null}}async set(t,e){var n;try{localStorage.setItem(t,e)}catch(r){(n=this.t)==null||n.error(`Error setting key in localStorage: ${t}, reason: ${r}`)}}},QI=class{constructor(t,e){this.encoding=new KI,this.crypto=new DI,this.requests=new zI,ed()&&(this.storage=new jI(t)),this.info=new _I(e)}},$I=class extends iI{constructor(t,e,n={},r){var i;let{logger:o,debug:s}=n,a=o!=null?o:new Ma({destination:{debug:console.debug,info:console.info,warn:console.warn,error:console.error},level:s?"debug":"info"}),c=(i=n.baseUri)!=null?i:"https://clientsdk.launchdarkly.com",l=r!=null?r:new QI(a,n),u=GI(n,a),h=OI(me(ot({},n),{logger:a})),{eventUrlTransformer:p}=u,f=sI(t);super(t,e,l,h,(m,d,v,g,w)=>new wI(l,m,t,d,u,f.polling,f.streaming,v,g,w),{getLegacyStorageKeys:()=>BI().filter(m=>m.startsWith(`ld:${t}:`)),analyticsEventPath:`/events/bulk/${t}`,diagnosticEventPath:`/events/diagnostic/${t}`,includeAuthorizationHeader:!1,highTimeoutThreshold:5,userAgentHeaderName:"x-launchdarkly-user-agent",trackEventModifier:m=>new de.InputCustomEvent(m.context,m.key,m.data,m.metricValue,m.samplingRatio,p(yr())),getImplementationHooks:m=>de.safeGetHooks(a,m,u.plugins),credentialType:"clientSideId"}),this.setEventSendingEnabled(!0,!1),this.Kt=u.plugins,u.fetchGoals&&(this.Gt=new ZI(t,l.requests,c,m=>{a.error(m.message)},(m,d)=>{let v=this.getInternalContext();if(!v)return;let g=p(m);kI(d)?this.sendEvent({kind:"click",url:g,samplingRatio:1,key:d.key,creationDate:Date.now(),context:v,selector:d.selector}):this.sendEvent({kind:"pageview",url:g,samplingRatio:1,key:d.key,creationDate:Date.now(),context:v})}),this.Gt.initialize(),u.automaticBackgroundHandling&&SI(()=>this.flush()))}registerPlugins(t){de.safeRegisterPlugins(this.logger,this.environmentMetadata,t,this.Kt||[]);let e=this.getDebugOverrides();e&&oI(this.logger,e,this.Kt||[])}setInitialContext(t){this.Wt=t}async identify(t,e){return super.identify(t,e)}async identifyResult(t,e){var n;if(!this.X)return this.logger.error("Client must be started before it can identify a context, did you forget to call start()?"),{status:"error",error:new Error("Identify called before start")};let r=ot({},e);(e==null?void 0:e.sheddable)===void 0&&(r.sheddable=!0);let i=await super.identifyResult(t,r);return(n=this.Gt)==null||n.startTracking(),i}start(t){var e,n;if(this.initializeResult)return Promise.resolve(this.initializeResult);if(this.X)return this.X;if(!this.Wt)return this.logger.error("Initial context not set"),Promise.resolve({status:"failed",error:new Error("Initial context not set")});let r=me(ot({},(e=t==null?void 0:t.identifyOptions)!=null?e:{}),{sheddable:!1});if(t!=null&&t.bootstrap&&!r.bootstrap&&(r.bootstrap=t.bootstrap),r!=null&&r.bootstrap)try{r.bootstrapParsed||(r.bootstrapParsed=Qp(this.logger,r.bootstrap)),this.presetFlags(r.bootstrapParsed)}catch(i){this.logger.error("Failed to bootstrap data",i)}return this.initializedPromise||(this.initializedPromise=new Promise(i=>{this.initResolve=i})),this.X=this.promiseWithTimeout(this.initializedPromise,(n=t==null?void 0:t.timeout)!=null?n:5),this.identifyResult(this.Wt,r),this.X}setStreaming(t){this.dataManager.setForcedStreaming(t)}Ae(){let t=this.dataManager,e=this.emitter.eventNames().some(n=>n.startsWith("change:")||n==="change");t.setAutomaticStreamingState(e)}on(t,e){super.on(t,e),this.Ae()}off(t,e){super.off(t,e),this.Ae()}};function qI(t,e,n,r={},i){let o=new $I(t,n,r,i);o.setInitialContext(e);let s={variation:(a,c)=>o.variation(a,c),variationDetail:(a,c)=>o.variationDetail(a,c),boolVariation:(a,c)=>o.boolVariation(a,c),boolVariationDetail:(a,c)=>o.boolVariationDetail(a,c),numberVariation:(a,c)=>o.numberVariation(a,c),numberVariationDetail:(a,c)=>o.numberVariationDetail(a,c),stringVariation:(a,c)=>o.stringVariation(a,c),stringVariationDetail:(a,c)=>o.stringVariationDetail(a,c),jsonVariation:(a,c)=>o.jsonVariation(a,c),jsonVariationDetail:(a,c)=>o.jsonVariationDetail(a,c),track:(a,c,l)=>o.track(a,c,l),on:(a,c)=>o.on(a,c),off:(a,c)=>o.off(a,c),flush:()=>o.flush(),setStreaming:a=>o.setStreaming(a),identify:(a,c)=>o.identifyResult(a,c),getContext:()=>o.getContext(),close:()=>o.close(),allFlags:()=>o.allFlags(),addHook:a=>o.addHook(a),waitForInitialization:a=>o.waitForInitialization(a),logger:o.logger,start:a=>o.start(a)};return o.registerPlugins(s),s}function QF(t){return new Ma(t)}function nd(t,e,n){return qI(t,e,Ai.Disabled,n)}var tT=Object.defineProperty,eT=(t,e,n)=>e in t?tT(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ee=(t,e,n)=>eT(t,typeof e!="symbol"?e+"":e,n),nT=(t,e,n)=>new Promise((r,i)=>{var o=c=>{try{a(n.next(c))}catch(l){i(l)}},s=c=>{try{a(n.throw(c))}catch(l){i(l)}},a=c=>c.done?r(c.value):Promise.resolve(c.value).then(o,s);a((n=n.apply(t,e)).next())}),Ve=(t,e,...n)=>{let r=`[@launchdarkly plugins]: (${t}): `;console[e].apply(console,[r,...n]),rT(r,...n)},rT=(t,...e)=>nT(void 0,null,function*(){try{let{LDObserve:n}=yield Promise.resolve().then(()=>lR);n.recordLog(`${t}${e}`,"warn")}catch(n){}}),iT=class{constructor(t,e){Ee(this,"debug"),Ee(this,"name"),this.debug=t,this.name=e}log(...t){if(this.debug){let e=`[${Date.now()}]`;this.name&&(e+=` - ${this.name}`),console.log.apply(console,[e,...t])}}warn(...t){let e=`[${Date.now()}]`;this.name&&(e+=` - ${this.name}`),console.warn.apply(console,[e,...t])}},vo=class{constructor(){Ee(this,"_sdk"),Ee(this,"_isLoaded",!1),Ee(this,"_callBuffer",[]),Ee(this,"_capacity",1e5),Ee(this,"_droppedEvents",0),Ee(this,"_exceededCapacity",!1),Ee(this,"_logger",new iT)}h(e,n){if(this.xn)try{return this.Bn[e](...n)}catch(r){Ve(`Error executing buffered call to ${e}:`,"error",r)}else{this.Pr({method:e,args:n});return}}Pr(e){this.wn.length<this.Is?(this.wn.push(e),this.jn=!1):(this.jn||(this.jn=!0,Ve("Exceeded event queue capacity. Increase capacity to avoid dropping events.","warn")),this.Ts+=1)}load(e){this.Bn=e,this.xn=!0;for(let{method:n,args:r}of this.wn)try{this.Bn[n](...r)}catch(i){Ve(`Error executing buffered call to ${n}:`,"error",i)}this.wn=[]}},oT=Object.defineProperty,sT=Object.defineProperties,aT=Object.getOwnPropertyDescriptors,wo=Object.getOwnPropertySymbols,Ff=Object.prototype.hasOwnProperty,Af=Object.prototype.propertyIsEnumerable,Zl=(t,e,n)=>e in t?oT(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,j=(t,e)=>{for(var n in e||(e={}))Ff.call(e,n)&&Zl(t,n,e[n]);if(wo)for(var n of wo(e))Af.call(e,n)&&Zl(t,n,e[n]);return t},An=(t,e)=>sT(t,aT(e)),xr=(t,e)=>{var n={};for(var r in t)Ff.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&wo)for(var r of wo(t))e.indexOf(r)<0&&Af.call(t,r)&&(n[r]=t[r]);return n},Wr=(t,e,n)=>Zl(t,typeof e!="symbol"?e+"":e,n),Dn=(t,e,n)=>new Promise((r,i)=>{var o=c=>{try{a(n.next(c))}catch(l){i(l)}},s=c=>{try{a(n.throw(c))}catch(l){i(l)}},a=c=>c.done?r(c.value):Promise.resolve(c.value).then(o,s);a((n=n.apply(t,e)).next())});function lT(t,e){for(var n=0;n<e.length;n++){let r=e[n];if(typeof r!="string"&&!Array.isArray(r)){for(let i in r)if(i!=="default"&&!(i in t)){let o=Object.getOwnPropertyDescriptor(r,i);o&&Object.defineProperty(t,i,o.get?o:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}function lo(t,e){throw new Error(e)}function cT(t){return typeof t=="object"&&t!==null}function uT(t,e){throw new Error("Unexpected invariant triggered.")}var hT=/\r\n|[\n\r]/g;function kl(t,e){let n=0,r=1;for(let i of t.body.matchAll(hT)){if(typeof i.index=="number"||uT(),i.index>=e)break;n=i.index+i[0].length,r+=1}return{line:r,column:e+1-n}}function pT(t){return Jf(t.source,kl(t.source,t.start))}function Jf(t,e){let n=t.locationOffset.column-1,r="".padStart(n)+t.body,i=e.line-1,o=t.locationOffset.line-1,s=e.line+o,a=e.line===1?n:0,c=e.column+a,l=`${t.name}:${s}:${c}
349
- `,u=r.split(/\r\n|[\n\r]/g),h=u[i];if(h.length>120){let p=Math.floor(c/80),f=c%80,m=[];for(let d=0;d<h.length;d+=80)m.push(h.slice(d,d+80));return l+rd([[`${s} |`,m[0]],...m.slice(1,p+1).map(d=>["|",d]),["|","^".padStart(f)],["|",m[p+1]]])}return l+rd([[`${s-1} |`,u[i-1]],[`${s} |`,h],["|","^".padStart(c)],[`${s+1} |`,u[i+1]]])}function rd(t){let e=t.filter(([r,i])=>i!==void 0),n=Math.max(...e.map(([r])=>r.length));return e.map(([r,i])=>r.padStart(n)+(i?" "+i:"")).join(`
350
- `)}function dT(t){let e=t[0];return e==null||"kind"in e||"length"in e?{nodes:e,source:t[1],positions:t[2],path:t[3],originalError:t[4],extensions:t[5]}:e}var fT=class Df extends Error{constructor(e,...n){var r,i,o;let{nodes:s,source:a,positions:c,path:l,originalError:u,extensions:h}=dT(n);super(e),this.name="GraphQLError",this.path=l!=null?l:void 0,this.originalError=u!=null?u:void 0,this.nodes=id(Array.isArray(s)?s:s?[s]:void 0);let p=id((r=this.nodes)===null||r===void 0?void 0:r.map(m=>m.loc).filter(m=>m!=null));this.source=a!=null?a:p==null||(i=p[0])===null||i===void 0?void 0:i.source,this.positions=c!=null?c:p==null?void 0:p.map(m=>m.start),this.locations=c&&a?c.map(m=>kl(a,m)):p==null?void 0:p.map(m=>kl(m.source,m.start));let f=cT(u==null?void 0:u.extensions)?u==null?void 0:u.extensions:void 0;this.extensions=(o=h!=null?h:f)!==null&&o!==void 0?o:Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),u!=null&&u.stack?Object.defineProperty(this,"stack",{value:u.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,Df):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let e=this.message;if(this.nodes)for(let n of this.nodes)n.loc&&(e+=`
348
+ SessionSecureID: ${this.sessionData.sessionSecureID}`);let s=aA();n?yield n({session_secure_id:this.sessionData.sessionSecureID,payload_id:(this.sessionData.payloadID++).toString(),events:{events:r},messages:bX({messages:[]}),resources:JSON.stringify({resources:[]}),web_socket_events:JSON.stringify({webSocketEvents:[]}),errors:[],is_beacon:!1,has_session_unloaded:this.hasSessionUnloaded,highlight_logs:s||void 0}):this.Gr.postMessage({message:{type:Ge.AsyncEvents,id:this.sessionData.payloadID++,events:r,messages:[],errors:[],resourcesString:JSON.stringify({resources:[]}),webSocketEventsString:JSON.stringify({webSocketEvents:[]}),hasSessionUnloaded:this.hasSessionUnloaded,highlightLogs:s}}),In(this.sessionData),this.events=this.events.slice(r.length),lA(s)})}takeFullSnapshot(){if(!this.or){this.logger.log("skipping full snapshot as rrweb is not running");return}this.logger.log("taking full snapshot",{bytesSinceSnapshot:this.ri,lastSnapshotTime:this.yo}),Xe.takeFullSnapshot(),this.ri=0,this.yo=new Date().getTime()}register(e,n){this.mr.push(new gu(e,n))}getHooks(e){return this.mr.flatMap(n=>{var r,i;return(i=(r=n.getHooks)==null?void 0:r.call(n,e))!=null?i:[]})}getRecordingState(){var e;return(e=this==null?void 0:this.state)!=null?e:"NotRecording"}getSession(){let e=this.sessionData.sessionSecureID,n=xs(e);if(!n)return null;let r=`${this.getFrontendUrl()}/sessions/${e}`;if(!r||!(n!=null&&n.sessionStartTime))return null;let i=new Date().getTime(),o=new URL(r),s=new URL(r),a=(i-this.Lr)/1e3;return s.searchParams.set("ts",a.toString()),{url:o.toString(),urlWithTimestamp:s.toString(),sessionSecureID:e}}getFrontendUrl(){var e,n;let r=this.Bn.match(KX);if(r&&(e=r==null?void 0:r.groups)!=null&&e.domain){let i=(n=r.groups.domain)!=null?n:"";return`https://${DX[i]}${YX}`}return JX}},ki=class extends yW{constructor(e,n){var r=(...f)=>(super(...f),Y(this,"record"),this),i,o,s,a,c,l,u,h,p;try{if(r(n),typeof window>"u"||typeof document>"u"){console.warn("@launchdarkly/session-replay is not initializing because it is not supported in this environment.");return}if(typeof Worker>"u"){console.warn("@launchdarkly/session-replay is not initializing because Worker is not supported.");return}if(!e){console.warn("@launchdarkly/session-replay is not initializing because projectID was passed undefined.");return}let f=_t(z({},n),{organizationID:e,firstloadVersion:fA,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 uh(f),n!=null&&n.manualStart||this.record.start(),Tn.load(this.record),!((s=(o=n==null?void 0:n.integrations)==null?void 0:o.mixpanel)!=null&&s.disabled)&&(c=(a=n==null?void 0:n.integrations)==null?void 0:a.mixpanel)!=null&&c.projectToken&&pA(n.integrations.mixpanel),!((u=(l=n==null?void 0:n.integrations)==null?void 0:l.amplitude)!=null&&u.disabled)&&(p=(h=n==null?void 0:n.integrations)==null?void 0:h.amplitude)!=null&&p.apiKey&&hA(n.integrations.amplitude)}catch(f){Bt("Error initializing @launchdarkly/session-replay SDK","error",f)}}getMetadata(){return{name:"@launchdarkly/session-replay"}}register(e,n){var r;(r=this.record)==null||r.register(e,n)}getHooks(e){return[{getMetadata:()=>({name:"@launchdarkly/session-replay/hooks"}),afterIdentify:(n,r,i)=>{var o,s,a,c,l,u,h;for(let p of(a=(s=(o=this.record)==null?void 0:o.getHooks)==null?void 0:s.call(o,e))!=null?a:[])(c=p.afterIdentify)==null||c.call(p,n,r,i);if(i.status==="completed"){let p=uW(n.context),f=hW(n.context);(h=this.record)==null||h.identify(typeof f=="string"?f:(u=(l=f.user)==null?void 0:l.toString())!=null?u:p,_t(z({key:p},typeof f=="object"?f:{}),{timeout:n.timeout}),"LaunchDarkly")}return r},afterEvaluation:(n,r,i)=>{var o,s,a,c;for(let l of(a=(s=(o=this.record)==null?void 0:o.getHooks)==null?void 0:s.call(o,e))!=null?a:[])(c=l.afterEvaluation)==null||c.call(l,n,r,i);return r},afterTrack:n=>{var r,i,o,s,a;for(let c of(o=(i=(r=this.record)==null?void 0:r.getHooks)==null?void 0:i.call(r,e))!=null?o:[])(s=c.afterTrack)==null||s.call(c,n);(a=this.record)==null||a.track(n.key,{data:n.data,value:n.metricValue})}}]}}});var pw=Object.defineProperty,dw=Object.defineProperties,fw=Object.getOwnPropertyDescriptors,Fi=Object.getOwnPropertySymbols,wp=Object.prototype.hasOwnProperty,Sp=Object.prototype.propertyIsEnumerable,Bh=(t,e,n)=>e in t?pw(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ot=(t,e)=>{for(var n in e||(e={}))wp.call(e,n)&&Bh(t,n,e[n]);if(Fi)for(var n of Fi(e))Sp.call(e,n)&&Bh(t,n,e[n]);return t},ye=(t,e)=>dw(t,fw(e)),Ip=(t,e)=>{var n={};for(var r in t)wp.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Fi)for(var r of Fi(t))e.indexOf(r)<0&&Sp.call(t,r)&&(n[r]=t[r]);return n};function mw(t){return`/${t.replace(/~/g,"~0").replace(/\//g,"~1")}`}function Tp(t){return t.indexOf("~")?t.replace(/~1/g,"/").replace(/~0/g,"~"):t}function yw(t){return(t.startsWith("/")?t.substring(1):t).split("/").map(e=>Tp(e))}function gw(t){return!t.startsWith("/")}function bw(t){return!t.match(/\/\/|(^\/.*~[^0|^1])|~$/)}var Nn=class{constructor(t,e=!1){if(e){let n=t;this.g=[n],this.isValid=n!=="",this.redactionName=n.startsWith("/")?mw(n):n}else{if(this.redactionName=t,t===""||t==="/"||!bw(t)){this.isValid=!1,this.g=[];return}gw(t)?this.g=[t]:t.indexOf("/",1)<0?this.g=[Tp(t.slice(1))]:this.g=yw(t),this.g[0]==="_meta"?this.isValid=!1:this.isValid=!0}}get(t){let{g:e,isValid:n}=this;if(!n)return;let r=t;for(let i=0;i<e.length;i+=1){let o=e[i];if(r!=null&&Object.prototype.hasOwnProperty.call(r,o)&&typeof r=="object"&&!Array.isArray(r))r=r[o];else return}return r}getComponent(t){return this.g[t]}get depth(){return this.g.length}get isKind(){return this.g.length===1&&this.g[0]==="kind"}compare(t){return this.depth===t.depth&&this.g.every((e,n)=>e===t.getComponent(n))}get components(){return[...this.g]}};Nn.InvalidReference=new Nn("");var vw=class{is(t){if(Array.isArray(t))return!1;let e=typeof t;return e==="function"||e==="object"}getType(){return"factory method or object"}},Xn=class{constructor(t,e){this.mt=t,this.typeOf=typeof e}is(t){return Array.isArray(t)?!1:typeof t===this.typeOf}getType(){return this.mt}},Ep=class{constructor(t,e){this.mt=t,this.typeOf=typeof e}is(t){return Array.isArray(t)?t.length>0?t.every(e=>typeof e===this.typeOf):!0:!1}getType(){return this.mt}},Rp=class extends Xn{constructor(t){super(`number with minimum value of ${t}`,0),this.min=t}is(t){return typeof t===this.typeOf&&t>=this.min}},Cp=class extends Xn{constructor(t){super(`string matching ${t}`,""),this.expression=t}is(t){return typeof t=="string"&&!!t.match(this.expression)}},ww=class{is(t){return typeof t=="function"}getType(){return"function"}},Sw=class{is(t){return typeof t=="boolean"||typeof t=="undefined"||t===null}getType(){return"boolean | undefined | null"}},Iw=/^\d\d\d\d-\d\d-\d\dT\d\d:\d\d:\d\d(\.\d\d*)?(Z|[-+]\d\d(:\d\d)?)/,Tw=class{is(t){return typeof t=="number"||typeof t=="string"&&Iw.test(t)}getType(){return"date"}},Ew=class extends Cp{constructor(){super(/^(\w|\.|-)+$/)}is(t){return super.is(t)&&t!=="kind"}},Rw=class{constructor(t){this.Yt=t}is(t){return typeof t=="string"&&this.Yt.includes(t)}getType(){return this.Yt.join(" | ")}};function Ee(t){return t==null}var V=class{static createTypeArray(t,e){return new Ep(t,e)}static numberWithMin(t){return new Rp(t)}static stringMatchingRegex(t){return new Cp(t)}static oneOf(...t){return new Rw(t)}};V.String=new Xn("string","");V.Number=new Xn("number",0);V.ObjectOrFactory=new vw;V.Object=new Xn("object",{});V.StringArray=new Ep("string[]","");V.Boolean=new Xn("boolean",!0);V.Function=new ww;V.Date=new Tw;V.Kind=new Ew;V.NullableBoolean=new Sw;function Zp(t){return"kind"in t?V.String.is(t.kind)&&t.kind!=="multi":!1}function kp(t){return"kind"in t?V.String.is(t.kind)&&t.kind==="multi":!1}function Vp(t){return!("kind"in t)||t.kind===null||t.kind===void 0}function Ai(t,e=[]){if(t===null||typeof t!="object")return JSON.stringify(t);if(e.includes(t))throw new Error("Cycle detected");return Array.isArray(t)?`[${t.map(n=>Ai(n,[...e,t])).map(n=>n===void 0?"null":n).join(",")}]`:`{${Object.keys(t).sort().map(n=>{let r=Ai(t[n],[...e,t]);if(r!==void 0)return`${JSON.stringify(n)}:${r}`}).filter(n=>n!==void 0).join(",")}}`}var Ua="user";function jh(t){return t.includes("%")||t.includes(":")?t.replace(/%/g,"%25").replace(/:/g,"%3A"):t}function Cw(t){return t&&V.Object.is(t)}function Qh(t){return V.Kind.is(t)}function $h(t){return V.String.is(t)&&t!==""}function ka(t,e=!1){return t?t.map(n=>new Nn(n,e)):[]}function Zw(t){return t!=null}function kw(t){let e=ye(ot({},t.custom||[]),{kind:"user",key:String(t.key)});if(Zw(t.anonymous)){let n=!!t.anonymous;delete e.anonymous,e.anonymous=n}return t.name!==null&&t.name!==void 0&&(e.name=t.name),t.ip!==null&&t.ip!==void 0&&(e.ip=t.ip),t.firstName!==null&&t.firstName!==void 0&&(e.firstName=t.firstName),t.lastName!==null&&t.lastName!==void 0&&(e.lastName=t.lastName),t.email!==null&&t.email!==void 0&&(e.email=t.email),t.avatar!==null&&t.avatar!==void 0&&(e.avatar=t.avatar),t.country!==null&&t.country!==void 0&&(e.country=t.country),t.privateAttributeNames!==null&&t.privateAttributeNames!==void 0&&(e._meta={privateAttributes:t.privateAttributeNames}),e}var On=class St{constructor(e,n,r){this.P=!1,this.Q=!1,this.Zt=!1,this.$={},this.kind=n,this.valid=e,this.message=r}static D(e,n){return new St(!1,e,n)}static Re(e,n){if(!(!n||!e.isValid))return e.depth===1&&e.getComponent(0)==="anonymous"?!!(n!=null&&n.anonymous):e.get(n)}Xt(e){if(this.P)return this.$[e];if(this.kind===e)return this.v}static Ne(e){let n=Object.keys(e).filter(c=>c!=="kind"),r=n.every(Qh);if(!n.length)return St.D("multi","A multi-kind context must contain at least one kind");if(!r)return St.D("multi","Context contains invalid kinds");let i={},o=!0,s=n.reduce((c,l)=>{var u;let h=e[l];return Cw(h)?(c[l]=h,i[l]=ka((u=h._meta)==null?void 0:u.privateAttributes)):o=!1,c},{});if(!o)return St.D("multi","Context contained contexts that were not objects");if(!Object.values(s).every(c=>$h(c.key)))return St.D("multi","Context contained invalid keys");if(n.length===1){let c=n[0],l=new St(!0,c);return l.v=ye(ot({},s[c]),{kind:c}),l.tt=i,l.Q=c==="user",l}let a=new St(!0,e.kind);return a.$=s,a.tt=i,a.P=!0,a}static Me(e){var n;let{key:r,kind:i}=e,o=Qh(i),s=$h(r);if(!o)return St.D(i!=null?i:"unknown","The kind was not valid for the context");if(!s)return St.D(i,"The key for the context was not valid");let a=ka((n=e._meta)==null?void 0:n.privateAttributes),c=new St(!0,i);return c.Q=i==="user",c.v=e,c.tt={[i]:a},c}static Fe(e){if(!(e.key!==void 0&&e.key!==null))return St.D("user","The key for the context was not valid");let n=new St(!0,"user");return n.Q=!0,n.Zt=!0,n.v=kw(e),n.tt={user:ka(e.privateAttributeNames,!0)},n}static fromLDContext(e){return e?Zp(e)?St.Me(e):kp(e)?St.Ne(e):Vp(e)?St.Fe(e):St.D("unknown","Context was not of a valid kind"):St.D("unknown","No context specified. Returning default value")}static toLDContext(e){if(!e.valid)return;let n=e.getContexts();if(!e.P)return n[0][1];let r={kind:"multi"};return n.forEach(i=>{let o=i[0],s=i[1];r[o]=s}),r}valueForKind(e,n=Ua){return e.isKind?this.kinds:St.Re(e,this.Xt(n))}key(e=Ua){var n;return(n=this.Xt(e))==null?void 0:n.key}get isMultiKind(){return this.P}get canonicalKey(){return this.Q?this.v.key:this.P?Object.keys(this.$).sort().map(e=>`${e}:${jh(this.$[e].key)}`).join(":"):`${this.kind}:${jh(this.v.key)}`}get kinds(){return this.P?Object.keys(this.$):[this.kind]}get kindsAndKeys(){return this.P?Object.entries(this.$).reduce((e,[n,r])=>(e[n]=r.key,e),{}):{[this.kind]:this.v.key}}privateAttributes(e){var n;return((n=this.tt)==null?void 0:n[e])||[]}getContexts(){return this.P?Object.entries(this.$):[[this.kind,this.v]]}get legacy(){return this.Zt}canonicalUnfilteredJson(){if(this.valid){if(this.gt)return this.gt;try{this.gt=Ai(St.toLDContext(this))}catch(e){}return this.gt}}};On.UserKind=Ua;var Vw=["key","kind","_meta","anonymous"].map(t=>new Nn(t,!0)),xw=["name","ip","firstName","lastName","email","avatar","country"];function Ow(t,e){return t.depth===e.length&&e.every((n,r)=>n===t.getComponent(r))}function Nw(t,e){let n=[],r={},i=[];for(n.push(...Object.keys(t).map(o=>({key:o,ptr:[o],source:t,parent:r,visited:[t]})));n.length;){let o=n.pop(),s=e.find(a=>Ow(a,o.ptr));if(s)i.push(s.redactionName);else{let a=o.source[o.key];a===null?o.parent[o.key]=a:Array.isArray(a)?o.parent[o.key]=[...a]:typeof a=="object"?o.visited.includes(a)||(o.parent[o.key]={},n.push(...Object.keys(a).map(c=>({key:c,ptr:[...o.ptr,c],source:a,parent:o.parent[o.key],visited:[...o.visited,a]})))):o.parent[o.key]=a}}return{cloned:r,excluded:i.sort()}}var Gw=class{constructor(t,e){this.Ue=t,this.je=e}filter(t,e=!1){let n=t.getContexts();if(n.length===1)return this.Qt(t,n[0][1],n[0][0],e);let r={kind:"multi"};return n.forEach(([i,o])=>{r[i]=this.Qt(t,o,i,e)}),r}Is(t,e,n,r){return(r?Object.keys(e).map(i=>new Nn(i,!0)):[...this.je,...t.privateAttributes(n)]).filter(i=>!Vw.some(o=>o.compare(i)))}Qt(t,e,n,r){let i=this.Ue||r&&e.anonymous===!0,{cloned:o,excluded:s}=Nw(e,this.Is(t,e,n,i));return t.legacy&&xw.forEach(a=>{a in o&&(o[a]=String(o[a]))}),s.length&&(o._meta||(o._meta={}),o._meta.redactedAttributes=s),o._meta&&(delete o._meta.privateAttributes,Object.keys(o._meta).length===0&&delete o._meta),o}},qh=30*1e3,Lw=.5,Xw=class{constructor(t,e,n=Math.random){this.Ve=e,this.He=n,this.yt=0,this.te=Math.max(1,t),this.ze=Math.ceil(Math.log2(qh/this.te))}C(){let t=Math.min(this.yt,this.ze),e=this.te*2**t;return Math.min(e,qh)}Be(t){return t-Math.trunc(this.He()*Lw*t)}success(t=Date.now()){this.vt=t}fail(t=Date.now()){this.vt!==void 0&&t-this.vt>this.Ve&&(this.yt=0),this.vt=void 0;let e=this.Be(this.C());return this.yt+=1,e}},tp;(function(t){t[t.Valid=0]="Valid",t[t.Initializing=1]="Initializing",t[t.Interrupted=2]="Interrupted",t[t.Closed=3]="Closed"})(tp||(tp={}));var Ji=class extends Error{constructor(t,e,n,r=!0){super(e),this.kind=t,this.status=n,this.name="LaunchDarklyPollingError",this.recoverable=r}},Pa=class extends Error{constructor(t,e,n,r=!0){super(e),this.kind=t,this.code=n,this.name="LaunchDarklyStreamingError",this.recoverable=r}},yA=120*1e3,gA=300*1e3,Jt;(function(t){t.Unknown="UNKNOWN",t.NetworkError="NETWORK_ERROR",t.ErrorResponse="ERROR_RESPONSE",t.InvalidData="INVALID_DATA"})(Jt||(Jt={}));var Di;(function(t){t[t.Disabled=0]="Disabled",t[t.Enabled=1]="Enabled"})(Di||(Di={}));var Gn;(function(t){t[t.AnalyticsEvents=0]="AnalyticsEvents",t[t.DiagnosticEvent=1]="DiagnosticEvent"})(Gn||(Gn={}));var tn;(function(t){t[t.Succeeded=0]="Succeeded",t[t.Failed=1]="Failed",t[t.FailedAndMustShutDown=2]="FailedAndMustShutDown"})(tn||(tn={}));function xn(t){if(typeof t=="string")return t;if(t===void 0)return"undefined";if(t===null)return"null";if(Object.prototype.hasOwnProperty.call(t,"toString"))try{return t.toString()}catch(e){}if(typeof t=="bigint")return`${t}n`;try{return JSON.stringify(t)}catch(e){return e instanceof TypeError&&e.message.indexOf("circular")>=0?"[Circular]":"[Not Stringifiable]"}}function Ww(t){return typeof t=="symbol"?"NaN":typeof t=="bigint"?`${t}n`:String(Number(t))}function Uw(t){return typeof t=="symbol"?"NaN":typeof t=="bigint"?`${t}n`:String(parseInt(t,10))}function Pw(t){return typeof t=="symbol"?"NaN":String(parseFloat(t))}var Va={s:t=>xn(t),d:t=>Ww(t),i:t=>Uw(t),f:t=>Pw(t),j:t=>xn(t),o:t=>xn(t),O:t=>xn(t),c:()=>""};function Ma(...t){var e;let n=t.shift();if(V.String.is(n)){let r="",i=0;for(;i<n.length;){let o=n.charAt(i);if(o==="%"){if(i+1<n.length){let s=n.charAt(i+1);if(s in Va&&t.length){let a=t.shift();r+=(e=Va[s])==null?void 0:e.call(Va,a)}else s==="%"?r+="%":r+=`%${s}`;i+=2}}else r+=o,i+=1}return t.length&&(r.length&&(r+=" "),r+=t.map(xn).join(" ")),r}return t.map(xn).join(" ")}var Vt;(function(t){t[t.debug=0]="debug",t[t.info=1]="info",t[t.warn=2]="warn",t[t.error=3]="error",t[t.none=4]="none"})(Vt||(Vt={}));var Mw=["debug","info","warn","error","none"],Da=class xp{static get(){return new xp({})}constructor(e){var n,r,i;if(this.Xe=(r=Vt[(n=e.level)!=null?n:"info"])!=null?r:Vt.info,this.Qe=(i=e.name)!=null?i:"LaunchDarkly",this.se=e.formatter,typeof e.destination=="object")this.ae={[Vt.debug]:e.destination.debug,[Vt.info]:e.destination.info,[Vt.warn]:e.destination.warn,[Vt.error]:e.destination.error};else if(typeof e.destination=="function"){let{destination:o}=e;this.ae={[Vt.debug]:o,[Vt.info]:o,[Vt.warn]:o,[Vt.error]:o}}}tn(...e){var n;try{return this.se?(n=this.se)==null?void 0:n.call(this,...e):Ma(...e)}catch(r){return Ma(...e)}}en(e,n){try{e(n)}catch(r){console.error(n)}}k(e,n){var r;if(e>=this.Xe){let i=`${Mw[e]}: [${this.Qe}]`;try{let o=(r=this.ae)==null?void 0:r[e];o?this.en(o,`${i} ${this.tn(...n)}`):console.error(...n)}catch(o){console.error(...n)}}}error(...e){this.k(Vt.error,e)}warn(...e){this.k(Vt.warn,e)}info(...e){this.k(Vt.info,e)}debug(...e){this.k(Vt.debug,e)}},Fw={error:V.Function,warn:V.Function,info:V.Function,debug:V.Function},Op=class{constructor(t,e){Object.entries(Fw).forEach(([n,r])=>{if(!r.is(t[n]))throw new Error(`Provided logger instance must support logger.${n}(...) method`)}),this.t=t,this.nn=e}k(t,e){try{this.t[t](...e)}catch(n){this.nn[t](...e)}}error(...t){this.k("error",t)}warn(...t){this.k("warn",t)}info(...t){this.k("info",t)}debug(...t){this.k("debug",t)}},Np=t=>{let e=new Da({level:"info",destination:console.error,formatter:Ma});return t?new Op(t,e):e},xt=class{static deprecated(t,e){return`"${t}" is deprecated, please use "${e}"`}static optionBelowMinimum(t,e,n){return`Config option "${t}" had invalid value of ${e}, using minimum of ${n} instead`}static unknownOption(t){return`Ignoring unknown config option "${t}"`}static wrongOptionType(t,e,n){return`Config option "${t}" should be of type ${e}, got ${n}, using default value`}static wrongOptionTypeBoolean(t,e){return`Config option "${t}" should be a boolean, got ${e}, converting to boolean`}static invalidTagValue(t){return`Config option "${t}" must only contain letters, numbers, ., _ or -.`}static tagValueTooLong(t){return`Value of "${t}" was longer than 64 characters and was discarded.`}static partialEndpoint(t){return`You have set custom uris without specifying the ${t} URI; connections may not work properly`}},Aw=/^(\w|\.|-)+$/,Jw=V.stringMatchingRegex(Aw),Dw={is:(t,e)=>Jw.is(t)?t.length>64?{valid:!1,message:xt.tagValueTooLong(e)}:{valid:!0}:{valid:!1,message:xt.invalidTagValue(e)}},Yw=class{constructor(t){let e={},n=t==null?void 0:t.application,r=t==null?void 0:t.logger;n&&Object.entries(n).forEach(([o,s])=>{if(s!=null){let{valid:a,message:c}=Dw.is(s,`application.${o}`);a?o==="versionName"?e["application-version-name"]=[s]:e[`application-${o}`]=[s]:r==null||r.warn(c)}});let i=Object.keys(e);i.length&&(this.value=i.sort().flatMap(o=>e[o].sort().map(s=>`${o}/${s}`)).join(" "))}},Kw=class{constructor(t,e,n){this.platform=n,this.basicConfiguration={tags:e.tags,logger:e.logger,offline:e.offline,serviceEndpoints:e.serviceEndpoints,sdkKey:t}}};function xa(t){return t.replace(/\/+$/,"")}function Ya(t){return t.replace(/^\/+/,"").replace(/\?$/,"")}var Yi=class Gp{constructor(e,n,r=Gp.DEFAULT_EVENTS,i="/bulk",o="/diagnostic",s=!0,a){this.streaming=xa(e),this.polling=xa(n),this.events=xa(r),this.analyticsEventPath=i,this.diagnosticEventPath=o,this.includeAuthorizationHeader=s,this.payloadFilterKey=a}};Yi.DEFAULT_EVENTS="https://events.launchdarkly.com";function Ka(t,e=[]){if(e.length===0)return t;let n=e.map(({key:r,value:i})=>`${r}=${i}`);return`${t}?${n.join("&")}`}function _w(t,e,n){let r=Ya(e),i=[...n];return t.payloadFilterKey&&i.push({key:"filter",value:t.payloadFilterKey}),Ka(`${t.streaming}/${r}`,i)}function Hw(t,e,n=[]){let r=Ya(e),i=[...n];return t.payloadFilterKey&&i.push({key:"filter",value:t.payloadFilterKey}),Ka(`${t.polling}/${r}`,i)}function ep(t,e,n=[]){let r=Ya(e);return Ka(`${t.events}/${r}`,n)}var Lp=class extends Error{constructor(t){super(t),this.name="LaunchDarklyUnexpectedResponseError"}},zw=class extends Error{constructor(t){super(t),this.name="LaunchDarklyClientError"}},Xp=class extends Error{constructor(t){super(t),this.name="LaunchDarklyTimeoutError"}};function Hi(t){return t>=400&&t<500?t===400||t===408||t===429:!0}function Bw(t){return t===413?!0:Hi(t)}function jw(t,e){let n,r;return{promise:new Promise((i,o)=>{r=i,n=setTimeout(()=>{let s=`${e} timed out after ${t} seconds.`;o(new Xp(s))},t*1e3)}),cancel:()=>{r(),clearTimeout(n)}}}function Wp(t){return t==null?t:JSON.parse(JSON.stringify(t))}function Oa(t){return Math.trunc(t*1e3)}var Qw=t=>JSON.stringify(t)==="{}",_a=(t,e)=>t&&Object.entries(t).reduce((n,[r,i])=>(i&&!Qw(i)&&!(e!=null&&e.includes(r))&&(n[r]=typeof i=="object"?_a(i,e):i),n),{});function Pi(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;var n,r,i;if(Array.isArray(t)){if(n=t.length,n!=e.length)return!1;for(r=n;r--!==0;)if(!Pi(t[r],e[r]))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(r of t.entries())if(!e.has(r[0]))return!1;for(r of t.entries())if(!Pi(r[1],e.get(r[0])))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(r of t.entries())if(!e.has(r[0]))return!1;return!0}if(ArrayBuffer.isView(t)&&ArrayBuffer.isView(e)){if(n=t.length,n!=e.length)return!1;for(r=n;r--!==0;)if(t[r]!==e[r])return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===e.toString();if(i=Object.keys(t),n=i.length,n!==Object.keys(e).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(e,i[r]))return!1;for(r=n;r--!==0;){var o=i[r];if(!Pi(t[o],e[o]))return!1}return!0}return t!==t&&e!==e}function $w(t,e,n,r=!0,i="user-agent"){let{userAgentBase:o,version:s,wrapperName:a,wrapperVersion:c}=e.sdkData(),l={[i]:`${o!=null?o:"NodeJSClient"}/${s}`};return r&&(l.authorization=t),a&&(l["x-launchdarkly-wrapper"]=c?`${a}/${c}`:a),n!=null&&n.value&&(l["x-launchdarkly-tags"]=n.value),l}function Ln(t,e,n){let r;t.status?r=`error ${t.status}${t.status===401?" (invalid SDK key)":""}`:r=`I/O error (${t.message||"unknown error"})`;let i=n!=null?n:"giving up permanently";return`Received ${r} for ${e} - ${i}`}function Up({status:t}){return t?Hi(t):!0}var np=(t,e)=>e.btoa(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,""),Pp=async(t=1e3)=>new Promise(e=>{setTimeout(e,t)}),qw=class{constructor(t,e,n){this.a=e,this.rn=n,this.bt=[],this.oe=Date.now(),this.ce=this.oe,this.ue={diagnosticId:e.crypto.randomUUID(),sdkKeySuffix:t.length>6?t.substring(t.length-6):t}}createInitEvent(){var t,e,n;let r=this.a.info.sdkData(),i=this.a.info.platformData();return{kind:"diagnostic-init",id:this.ue,creationDate:this.oe,sdk:r,configuration:this.rn,platform:ot({name:i.name,osArch:(t=i.os)==null?void 0:t.arch,osName:(e=i.os)==null?void 0:e.name,osVersion:(n=i.os)==null?void 0:n.version},i.additional||{})}}recordStreamInit(t,e,n){let r={timestamp:t,failed:e,durationMillis:n};this.bt.push(r)}createStatsEventAndReset(t,e,n){let r=Date.now(),i={kind:"diagnostic",id:this.ue,creationDate:r,dataSinceDate:this.ce,droppedEvents:t,deduplicatedUsers:e,eventsInLastBatch:n,streamInits:this.bt};return this.bt=[],this.ce=r,i}},Fa;(function(t){t.MalformedFlag="MALFORMED_FLAG",t.UserNotSpecified="USER_NOT_SPECIFIED",t.FlagNotFound="FLAG_NOT_FOUND",t.ClientNotReady="CLIENT_NOT_READY",t.WrongType="WRONG_TYPE"})(Fa||(Fa={}));var tS=Fa,Mp=class{static invalidMetricValue(t){return`The track function was called with a non-numeric "metricValue" (${t}), only numeric metric values are supported.`}};Mp.MissingContextKeyNoEvent="Context was unspecified or had no key; event will not be sent";var eS=class{constructor(t,e){let{basicConfiguration:n,platform:r}=t,{serviceEndpoints:{analyticsEventPath:i,diagnosticEventPath:o}}=n,{crypto:s,requests:a}=r;this.sn=ot({},e),this.le=ep(n.serviceEndpoints,i,[]),this.an=ep(n.serviceEndpoints,o,[]),this._=a,this.cn=s}async et(t,e,n,r){let i={status:tn.Succeeded},o=ye(ot({},this.sn),{"content-type":"application/json"});n&&(o["x-launchdarkly-payload-id"]=n,o["x-launchDarkly-event-schema"]="4");let s;try{let{status:a,headers:c}=await this._.fetch(e,{headers:o,body:JSON.stringify(t),compressBodyIfPossible:!0,method:"POST",keepalive:!0}),l=Date.parse(c.get("date")||"");if(l&&(i.serverTime=l),a<=204)return i;if(s=new Lp(Ln({status:a,message:"some events were dropped"},"event posting")),!Hi(a))return Bw(a)?i.status=tn.Failed:i.status=tn.FailedAndMustShutDown,i.error=s,i}catch(a){s=a}return s&&!r?(i.status=tn.Failed,i.error=s,i):(await Pp(),this.et(t,this.le,n,!1))}async sendEventData(t,e){let n=t===Gn.AnalyticsEvents?this.cn.randomUUID():void 0,r=t===Gn.AnalyticsEvents?this.le:this.an;return this.et(e,r,n,!0)}};function Ki(t){return t.kind==="feature"}function nS(t){return t.kind==="identify"}function rS(t){return t.kind==="migration_op"}var iS=class{constructor(t,e,n,r,i,o){this.count=t,this.key=e,this.value=n,this.version=i,this.variation=o,this.default=r}increment(){this.count+=1}};function oS(t){return`${t.key}:${t.variation!==null&&t.variation!==void 0?t.variation:""}:${t.version!==null&&t.version!==void 0?t.version:""}`}var Fp=class{constructor(t=!1,e){this.un=t,this.S=e,this.q=0,this.nt=0,this.it={},this.rt={}}summarizeEvent(t){if(Ki(t)&&!t.excludeFromSummaries){this.v||(this.v=t.context);let e=oS(t),n=this.it[e],r=this.rt[t.key];r||(r=new Set,this.rt[t.key]=r),t.context.kinds.forEach(i=>r.add(i)),n?n.increment():this.it[e]=new iS(1,t.key,t.value,t.default,t.version,t.variation),(this.q===0||t.creationDate<this.q)&&(this.q=t.creationDate),t.creationDate>this.nt&&(this.nt=t.creationDate)}}getSummary(){var t;let e=Object.values(this.it).reduce((r,i)=>{let o=r[i.key];o||(o={default:i.default,counters:[],contextKinds:[...this.rt[i.key]]},r[i.key]=o);let s={value:i.value,count:i.count};return i.variation!==void 0&&i.variation!==null&&(s.variation=i.variation),i.version!==void 0&&i.version!==null?s.version=i.version:s.unknown=!0,o.counters.push(s),r},{}),n={startDate:this.q,endDate:this.nt,features:e,kind:"summary",context:this.v!==void 0&&this.un?(t=this.S)==null?void 0:t.filter(this.v):void 0};return this.ln(),n}ln(){this.q=0,this.nt=0,this.it={},this.rt={}}},sS=class extends Error{constructor(t){super(t),this.name="LaunchDarklyInvalidSDKKeyError"}},aS=class{constructor(t,e){this.S=t,this.t=e,this.W={}}summarizeEvent(t){var e;if(Ki(t)){let n=t.context.canonicalUnfilteredJson();if(!n){t.context.valid&&((e=this.t)==null||e.error("Unable to serialize context, likely the context contains a cycle."));return}let r=this.W[n];r||(this.W[n]=new Fp(!0,this.S),r=this.W[n]),r.summarizeEvent(t)}}getSummaries(){let t=this.W;return this.W={},Object.values(t).map(e=>e.getSummary())}};function Mi(t){let e=Math.trunc(t);return e===1?!0:e===0?!1:Math.floor(Math.random()*e)===0}function lS(t){return t.getSummaries!==void 0}var cS=class{constructor(t,e,n,r,i,o=!0,s=!1){this.e=t,this.st=r,this.x=i,this.at=[],this.de=0,this.Dt=0,this.kt=0,this.St=!1,this.he=0,this.xt=!1,this.Lt=null,this.dn=t.eventsCapacity,this.t=e.basicConfiguration.logger,this.fe=new eS(e,n),this.S=new Gw(t.allAttributesPrivate,t.privateAttributes.map(a=>new Nn(a))),s?this.J=new aS(this.S,this.t):this.J=new Fp,o&&this.start()}start(){var t,e;if(((t=this.st)==null?void 0:t.flushInterval)!==void 0&&(this.Lt=setInterval(()=>{var n;(n=this.st)==null||n.flush()},this.st.flushInterval*1e3)),this.hn=setInterval(async()=>{var n;try{await this.flush()}catch(r){(n=this.t)==null||n.debug(`Flush failed: ${r}`)}},this.e.flushInterval*1e3),this.x){let n=this.x.createInitEvent();this.pe(n),this.me=setInterval(()=>{let r=this.x.createStatsEventAndReset(this.Dt,this.kt,this.he);this.Dt=0,this.kt=0,this.pe(r)},this.e.diagnosticRecordingInterval*1e3)}(e=this.t)==null||e.debug("Started EventProcessor.")}pe(t){this.fe.sendEventData(Gn.DiagnosticEvent,t)}close(){clearInterval(this.hn),this.Lt&&clearInterval(this.Lt),this.me&&clearInterval(this.me)}async flush(){var t;if(this.xt)throw new sS("Events cannot be posted because a permanent error has been encountered. This is most likely an invalid SDK key. The specific error information is logged independently.");let e=this.at;if(this.at=[],lS(this.J))this.J.getSummaries().forEach(n=>{Object.keys(n.features).length&&e.push(n)});else{let n=this.J.getSummary();Object.keys(n.features).length&&e.push(n)}e.length&&(this.he=e.length,(t=this.t)==null||t.debug("Flushing %d events",e.length),await this.et(e))}sendEvent(t){var e;if(this.xt)return;if(rS(t)){if(Mi(t.samplingRatio)){let a=ye(ot({},t),{context:t.context?this.S.filter(t.context):void 0});a.samplingRatio===1&&delete a.samplingRatio,this.ot(a)}return}this.J.summarizeEvent(t);let n=Ki(t),r=n&&t.trackEvents||!n,i=this.fn(t),o=nS(t),s=(e=this.st)==null?void 0:e.processContext(t.context);s||o||(this.kt+=1),s&&!o&&this.ot(this.Ot({kind:"index",creationDate:t.creationDate,context:t.context,samplingRatio:1},!1)),r&&Mi(t.samplingRatio)&&this.ot(this.Ot(t,!1)),i&&Mi(t.samplingRatio)&&this.ot(this.Ot(t,!0))}Ot(t,e){switch(t.kind){case"feature":{let n={kind:e?"debug":"feature",creationDate:t.creationDate,context:this.S.filter(t.context,!e),key:t.key,value:t.value,default:t.default};return t.samplingRatio!==1&&(n.samplingRatio=t.samplingRatio),t.prereqOf&&(n.prereqOf=t.prereqOf),t.variation!==void 0&&(n.variation=t.variation),t.version!==void 0&&(n.version=t.version),t.reason&&(n.reason=t.reason),n}case"index":case"identify":{let n={kind:t.kind,creationDate:t.creationDate,context:this.S.filter(t.context)};return t.samplingRatio!==1&&(n.samplingRatio=t.samplingRatio),n}case"custom":{let n={kind:"custom",creationDate:t.creationDate,key:t.key,context:this.S.filter(t.context)};return t.samplingRatio!==1&&(n.samplingRatio=t.samplingRatio),t.data!==void 0&&(n.data=t.data),t.metricValue!==void 0&&(n.metricValue=t.metricValue),t.url!==void 0&&(n.url=t.url),n}case"click":return{kind:"click",creationDate:t.creationDate,contextKeys:t.context.kindsAndKeys,key:t.key,url:t.url,selector:t.selector};case"pageview":return{kind:"pageview",creationDate:t.creationDate,contextKeys:t.context.kindsAndKeys,key:t.key,url:t.url};default:return t}}ot(t){var e;this.at.length<this.dn?(this.at.push(t),this.St=!1):(this.St||(this.St=!0,(e=this.t)==null||e.warn("Exceeded event queue capacity. Increase capacity to avoid dropping events.")),this.Dt+=1)}fn(t){return Ki(t)&&t.debugEventsUntilDate&&t.debugEventsUntilDate>this.de&&t.debugEventsUntilDate>Date.now()}async et(t){let e=await this.fe.sendEventData(Gn.AnalyticsEvents,t);if(e.status===tn.FailedAndMustShutDown&&(this.xt=!0),e.serverTime&&(this.de=e.serverTime),e.error)throw e.error}},Ap=class{constructor(t,e,n,r,i=1,o){this.context=t,this.key=e,this.data=n,this.metricValue=r,this.samplingRatio=i,this.url=o,this.kind="custom",this.creationDate=Date.now(),this.context=t}},Aa=class{constructor(t,e,n,r,i,o,s,a,c,l,u,h,p=1){this.withReasons=t,this.context=e,this.key=n,this.samplingRatio=p,this.kind="feature",this.creationDate=Date.now(),this.value=r,this.default=i,o!==void 0&&(this.version=o),s!==void 0&&(this.variation=s),a!==void 0&&(this.trackEvents=a),c!==void 0&&(this.prereqOf=c),l!==void 0&&(this.reason=l),u!==void 0&&(this.debugEventsUntilDate=u),h!==void 0&&(this.excludeFromSummaries=h)}},Jp=class{constructor(t,e=1){this.context=t,this.samplingRatio=e,this.kind="identify",this.creationDate=Date.now()}},uS=class{close(){}async flush(){}sendEvent(){}},hS=class{constructor(t){this.Pt=t}evalEvent(t){var e;return new Aa(this.Pt,t.context,t.flagKey,t.value,t.defaultVal,t.version,(e=t.variation)!=null?e:void 0,t.trackEvents||t.addExperimentData,t.prereqOfFlagKey,this.Pt||t.addExperimentData?t.reason:void 0,t.debugEventsUntilDate,t.excludeFromSummaries,t.samplingRatio)}unknownFlagEvent(t,e,n){return new Aa(this.Pt,n,t,e,e,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}identifyEvent(t){return new Jp(t,1)}customEvent(t,e,n,r,i=1){return new Ap(e,t,n!=null?n:void 0,r!=null?r:void 0,i)}},rp="FDv1Fallback";function pS(t){return{pn:t,ge:"",useSelector(e){return this.ge=e,this},processFullTransfer(e){let n=[{event:"server-intent",data:{payloads:[{id:rp,target:1,intentCode:"xfer-full",reason:"payload-missing"}]}}];Object.entries((e==null?void 0:e.flags)||[]).forEach(([r,i])=>{n.push({event:"put-object",data:{kind:"flag",key:r,version:i.version||1,object:i}})}),Object.entries((e==null?void 0:e.segments)||[]).forEach(([r,i])=>{n.push({event:"put-object",data:{kind:"segment",key:r,version:i.version||1,object:i}})}),n.push({event:"payload-transferred",data:{state:this.ge,version:1,id:rp}}),this.pn.processEvents(n)}}}var Ht={type:"none"};function Dp(t,e){let n="inactive",r,i="partial",o=[];function s(g,w){var R;return(R=t[g])==null?void 0:R.call(t,w)}function a(){n="inactive",r=void 0,i="partial",o=[]}function c(){n="changes",i="partial",o=[]}function l(){o=[]}function u(g){return!g.id||Ee(g.target)?(e==null||e.warn(`Ignoring 'none' intent with missing fields: id=${g.id}, target=${g.target}`),Ht):{type:"payload",payload:{id:g.id,version:g.target,type:"none",updates:[]}}}function h(g){var w;if(!((w=g.payloads)!=null&&w.length))return{type:"error",kind:"MISSING_PAYLOAD",message:"No payload present in server-intent"};let R=g.payloads[0];switch(R==null?void 0:R.intentCode){case"xfer-full":return n="full",o=[],i="full",r=R.id,Ht;case"xfer-changes":return n="changes",o=[],i="partial",r=R.id,Ht;case"none":return n="changes",o=[],i="partial",r=R.id,u(R);default:return e==null||e.warn(`Unable to process intent code '${R==null?void 0:R.intentCode}'.`),Ht}}function p(g){if(n==="inactive"||!r)return e==null||e.warn("Received put-object before server-intent was established. Ignoring."),Ht;if(!g.kind||!g.key||Ee(g.version)||!g.object)return e==null||e.warn(`Ignoring put-object with missing fields: kind=${g.kind}, key=${g.key}, version=${g.version}`),Ht;let w=s(g.kind,g.object);return w?(o.push({kind:g.kind,key:g.key,version:g.version,object:w}),Ht):(e==null||e.warn(`Unable to process object for kind: '${g.kind}'`),Ht)}function f(g){return n==="inactive"||!r?(e==null||e.warn("Received delete-object before server-intent was established. Ignoring."),Ht):!g.kind||!g.key||Ee(g.version)?(e==null||e.warn(`Ignoring delete-object with missing fields: kind=${g.kind}, key=${g.key}, version=${g.version}`),Ht):(o.push({kind:g.kind,key:g.key,version:g.version,deleted:!0}),Ht)}function m(g){if(n==="inactive")return{type:"error",kind:"PROTOCOL_ERROR",message:"A payload transferred has been received without an intent having been established."};if(!r||Ee(g.state)||Ee(g.version))return e==null||e.warn(`Ignoring payload-transferred with missing fields: state=${g.state}, version=${g.version}`),a(),Ht;let w={type:"payload",payload:{id:r,version:g.version,state:g.state,type:i,updates:o}};return c(),w}function d(g){return e==null||e.info(`Goodbye was received from the LaunchDarkly connection with reason: ${g.reason}.`),a(),{type:"goodbye",reason:g.reason}}function v(g){return e==null||e.info(`An issue was encountered receiving updates for payload ${r} with reason: ${g.reason}.`),l(),{type:"serverError",id:g.payload_id,reason:g.reason}}return{get state(){return n},processEvent(g){switch(g.event){case"server-intent":return h(g.data);case"put-object":return p(g.data);case"delete-object":return f(g.data);case"payload-transferred":return m(g.data);case"goodbye":return d(g.data);case"error":return v(g.data);case"heart-beat":return Ht;default:return{type:"error",kind:"UNKNOWN_EVENT",message:`Received an unknown event of type '${g.event}'`}}},reset(){a()}}}function dS(t){return t==="MISSING_PAYLOAD"||t==="PROTOCOL_ERROR"}var Yp=class{constructor(t,e,n){this.m=e,this.t=n,this.n=[],this.mn=Dp(t,n)}addPayloadListener(t){this.n.push(t)}removePayloadListener(t){let e=this.n.indexOf(t,0);e>-1&&this.n.splice(e,1)}processEvents(t){t.forEach(e=>{var n,r;let i=this.mn.processEvent(e);switch(i.type){case"payload":this.n.forEach(o=>o(i.payload));break;case"error":dS(i.kind)?(n=this.m)==null||n.call(this,Jt.InvalidData,i.message):(r=this.t)==null||r.warn(i.message);break}})}},fS=class{constructor(t,e,n,r){this.m=n,this.t=r,this.V(t,"server-intent"),this.V(t,"put-object"),this.V(t,"delete-object"),this.V(t,"payload-transferred"),this.V(t,"goodbye"),this.V(t,"error"),this.Ct=new Yp(e,n,r)}addPayloadListener(t){this.Ct.addPayloadListener(t)}removePayloadListener(t){this.Ct.removePayloadListener(t)}V(t,e){t.addEventListener(e,async n=>{var r,i,o,s,a;if(n!=null&&n.data){(r=this.t)==null||r.debug(`Received ${e} event. Data is ${n.data}`);try{this.Ct.processEvents([{event:e,data:JSON.parse(n.data)}])}catch(c){(i=this.t)==null||i.error(`Stream received data that was unable to be processed in "${e}" message`),(o=this.t)==null||o.debug(`Data follows: ${n.data}`),(s=this.m)==null||s.call(this,Jt.InvalidData,"Malformed data in EventStream.")}}else(a=this.m)==null||a.call(this,Jt.Unknown,"Event from EventStream missing data.")})}};function mS(t){if(t){let e=Object.keys(t).find(n=>n.toLowerCase()==="x-ld-envid");if(e)return{environmentId:t[e]}}}var ip="unknown plugin";function _i(t,e){try{return e.getMetadata().name||ip}catch(n){return t.error("Exception thrown getting metadata for plugin. Unable to get plugin name."),ip}}function yS(t,e,n){let r=[];return n.forEach(i=>{var o;try{let s=(o=i.getHooks)==null?void 0:o.call(i,e);s===void 0?t.error(`Plugin ${_i(t,i)} returned undefined from getHooks.`):s&&s.length>0&&r.push(...s)}catch(s){t.error(`Exception thrown getting hooks for plugin ${_i(t,i)}. Unable to get hooks.`)}}),r}function gS(t,e,n,r){r.forEach(i=>{try{i.register(n,e)}catch(o){t.error(`Exception thrown registering plugin ${_i(t,i)}.`)}})}var fe=Object.freeze({__proto__:null,ClientMessages:Mp,DiagnosticsManager:qw,ErrorKinds:tS,EventFactoryBase:hS,EventProcessor:cS,FDv1PayloadAdaptor:pS,InputCustomEvent:Ap,InputEvalEvent:Aa,InputIdentifyEvent:Jp,NullEventProcessor:uS,PayloadProcessor:Yp,PayloadStreamReader:fS,canonicalize:Ai,createProtocolHandler:Dp,initMetadataFromHeaders:mS,isLegacyUser:Vp,isMultiKind:kp,isSingleKind:Zp,safeGetHooks:yS,safeGetName:_i,safeRegisterPlugins:gS,shouldSample:Mi}),op={Initializing:"INITIALIZING",Valid:"VALID",Interrupted:"INTERRUPTED",SetOffline:"SET_OFFLINE",Closed:"CLOSED"};function bS(t){return t>=200&&t<=299}var sp=class extends Error{constructor(t,e){super(t),this.status=e,this.name="LaunchDarklyRequestError"}};function ap(t,e,n,r,i,o,s,a,c,l){let u,h="GET",p=ot({},o);c&&(h="REPORT",p["content-type"]="application/json",u=t);let f=c?n.pathReport(i,t):n.pathGet(i,t),m=[...s!=null?s:[]];a&&m.push({key:"withReasons",value:"true"}),l&&m.push({key:"h",value:l});let d=Hw(e,f,m);return{async requestPayload(){let v;try{let g=await r.fetch(d,{method:h,headers:p,body:u});if(bS(g.status))return await g.text();v=g.status}catch(g){throw new sp(g==null?void 0:g.message)}throw new sp(`Unexpected status code: ${v}`,v)}}}var lp=new Error("Task has already been executed or shed. This is likely an implementation error. The task will not be executed again.");function vS(t,e,n=!1){let r,i=new Promise(a=>{r=(c,l)=>{var u;try{(u=t.after)==null||u.call(t,c,l)}catch(h){e==null||e.error(`Error in after callback: ${h}`)}a(c)}}),o=t.before?t.before():Promise.resolve(void 0),s=!1;return{execute:()=>{s&&(e==null||e.error(lp)),s=!0,o.then(a=>{t.execute(a).then(c=>r({status:"complete",result:c},a)).catch(c=>r({status:"error",error:c},a))}).catch(a=>{e==null||e.error(a),r({status:"error",error:a},void 0)})},shed:()=>{s&&(e==null||e.error(lp)),s=!0,o.then(a=>{r({status:"shed"},a)})},promise:i,sheddable:n}}function wS(t){let e,n=[];function r(){if(!e&&n.length>0){let i=n.shift();e=i.promise.finally(()=>{e=void 0,r()}),i.execute()}}return{execute(i,o=!1){var s,a;let c=vS(i,t,o);return e?((s=n[n.length-1])!=null&&s.sheddable&&((a=n.pop())==null||a.shed()),n.push(c)):(e=c.promise.finally(()=>{e=void 0,r()}),c.execute()),c.promise},pendingCount(){return n.length}}}function Kp(t){return"validate"in t}function zi(t,e,n,r,i){let o=ot({},n);return Ee(t)?o:V.Object.is(t)?(Object.entries(t).forEach(([s,a])=>{let c=e[s],l=i?`${i}.${s}`:s;if(!c){r==null||r.warn(xt.unknownOption(l));return}if(Ee(a))return;if(Kp(c)){let h=c.validate(a,l,r,n[s]);h!==void 0&&(o[s]=h.value);return}if(c.is(a)){o[s]=a;return}let u=c.getType();u==="boolean"?(r==null||r.warn(xt.wrongOptionTypeBoolean(l,typeof a)),o[s]=!!a):u==="boolean | undefined | null"?(r==null||r.warn(xt.wrongOptionTypeBoolean(l,typeof a)),typeof a!="boolean"&&typeof a!="undefined"&&a!==null&&(o[s]=!!a)):c instanceof Rp&&V.Number.is(a)?(r==null||r.warn(xt.optionBelowMinimum(l,a,c.min)),o[s]=c.min):r==null||r.warn(xt.wrongOptionType(l,u,typeof a))}),o):(r==null||r.warn(xt.wrongOptionType(i!=null?i:"config","object",typeof t)),o)}function br(t,e){return{is:n=>V.Object.is(n),getType:()=>"object",validate(n,r,i,o){if(!V.Object.is(n)){i==null||i.warn(xt.wrongOptionType(r,"object",typeof n));return}let s=e!=null?e:V.Object.is(o)?o:{},a=zi(n,t,s,i,r);return Object.keys(a).length>0?{value:a}:void 0}}}function _p(t,e){return{is:n=>Array.isArray(n),getType:()=>"array",validate(n,r,i){if(!Array.isArray(n)){i==null||i.warn(xt.wrongOptionType(r,"array",typeof n));return}let o=[];return n.forEach((s,a)=>{let c=`${r}[${a}]`;if(Ee(s)||!V.Object.is(s)){i==null||i.warn(xt.wrongOptionType(c,"object",typeof s));return}let l=s,u=l[t],h=typeof u=="string"?e[u]:void 0;if(!h){let p=Object.keys(e).join(" | "),f=typeof u=="string"?u:typeof u;i==null||i.warn(xt.wrongOptionType(`${c}.${t}`,p,f));return}o.push(zi(l,h,{},i,c))}),{value:o}}}}function SS(...t){return{is:e=>t.some(n=>n.is(e)),getType:()=>t.map(e=>e.getType()).join(" | "),validate(e,n,r,i){let o=t.find(s=>s.is(e));if(o)return Kp(o)?o.validate(e,n,r,i):{value:e};r==null||r.warn(xt.wrongOptionType(n,this.getType(),typeof e))}}}function IS(t,e){return{is:n=>V.Object.is(n),getType:()=>"object",validate(n,r,i,o){if(Ee(n))return;if(!V.Object.is(n)){i==null||i.warn(xt.wrongOptionType(r,"object",typeof n));return}let s=n,a={},c={};Object.keys(s).forEach(u=>{t.is(u)?(a[u]=s[u],c[u]=e):i==null||i.warn(xt.wrongOptionType(r,t.getType(),u))});let l=V.Object.is(o)?o:{};return{value:zi(a,c,l,i,r)}}}}var Ha=V.oneOf("cache","polling","streaming"),Ja=V.oneOf("streaming","polling","offline","one-shot","background"),Hp={pollingBaseUri:V.String,streamingBaseUri:V.String},TS={type:Ha},zp={type:Ha,pollInterval:V.numberWithMin(30),endpoints:br(Hp)},Bp={type:Ha,initialReconnectDelay:V.numberWithMin(1),endpoints:br(Hp)},ES=_p("type",{cache:TS,polling:zp,streaming:Bp}),RS=_p("type",{polling:zp,streaming:Bp}),CS={initializers:ES,synchronizers:RS},ZS=IS(Ja,br(CS)),kS={lifecycle:V.Boolean,network:V.Boolean},VS={initialConnectionMode:Ja,backgroundConnectionMode:Ja,automaticModeSwitching:SS(V.Boolean,br(kS)),connectionModes:ZS},xS={initialConnectionMode:"one-shot",backgroundConnectionMode:void 0,automaticModeSwitching:!1};function OS(t){return{logger:V.Object,maxCachedContexts:V.numberWithMin(0),baseUri:V.String,streamUri:V.String,eventsUri:V.String,capacity:V.numberWithMin(1),diagnosticRecordingInterval:V.numberWithMin(2),flushInterval:V.numberWithMin(2),streamInitialReconnectDelay:V.numberWithMin(0),allAttributesPrivate:V.Boolean,debug:V.Boolean,diagnosticOptOut:V.Boolean,withReasons:V.Boolean,sendEvents:V.Boolean,pollInterval:V.numberWithMin(30),useReport:V.Boolean,privateAttributes:V.StringArray,disableCache:V.Boolean,applicationInfo:V.Object,wrapperName:V.String,wrapperVersion:V.String,payloadFilterKey:V.stringMatchingRegex(/^[a-zA-Z0-9](\w|\.|-)*$/),hooks:V.createTypeArray("Hook[]",{}),inspectors:V.createTypeArray("LDInspection",{}),cleanOldPersistentData:V.Boolean,dataSystem:t!=null&&t.dataSystemDefaults?br(VS,t.dataSystemDefaults):V.Object}}var NS=300,jp="https://clientsdk.launchdarkly.com",Qp="https://clientstream.launchdarkly.com";function GS(t){return t instanceof Op?t:Np(t)}var LS=class{constructor(t={},e={getImplementationHooks:()=>[],credentialType:"mobileKey"}){var n,r,i;this.logger=Np(),this.baseUri=jp,this.eventsUri=Yi.DEFAULT_EVENTS,this.streamUri=Qp,this.maxCachedContexts=5,this.disableCache=!1,this.capacity=100,this.diagnosticRecordingInterval=900,this.flushInterval=30,this.streamInitialReconnectDelay=1,this.allAttributesPrivate=!1,this.debug=!1,this.diagnosticOptOut=!1,this.sendEvents=!0,this.sendLDHeaders=!0,this.useReport=!1,this.withReasons=!1,this.privateAttributes=[],this.pollInterval=NS,this.hooks=[],this.inspectors=[],this.logger=GS(t.logger);let o=OS({dataSystemDefaults:e.dataSystemDefaults}),s=zi(t,o,{},this.logger);Object.entries(s).forEach(([a,c])=>{a!=="logger"&&(this[a]=c)}),this.serviceEndpoints=new Yi(this.streamUri,this.baseUri,this.eventsUri,e.analyticsEventPath,e.diagnosticEventPath,e.includeAuthorizationHeader,t.payloadFilterKey),this.useReport=(n=t.useReport)!=null?n:!1,this.tags=new Yw({application:this.applicationInfo,logger:this.logger}),this.userAgentHeaderName=(r=e.userAgentHeaderName)!=null?r:"user-agent",this.trackEventModifier=(i=e.trackEventModifier)!=null?i:(a=>a),this.credentialType=e.credentialType,this.getImplementationHooks=e.getImplementationHooks}};async function za(t,e){if(t.digest)return t.digest(e);if(t.asyncDigest)return t.asyncDigest(e);throw new Error("Platform must implement digest or asyncDigest")}var $p=async(t,{crypto:e,storage:n})=>{let r=await(n==null?void 0:n.get(t));return r||(r=e.randomUUID(),await(n==null?void 0:n.set(t,r))),r};function qp(t){return async e=>za(t.createHash("sha256").update(e),"base64")}var me=async t=>t;async function vr(t){return(await Promise.all(t.map(e=>e.transform(e.value)))).join("_")}async function XS(t,e){return vr([{value:"LaunchDarkly",transform:me},{value:e,transform:qp(t)}])}async function WS(t){return vr([{value:"LaunchDarkly",transform:me},{value:"AnonymousKeys",transform:me},{value:t,transform:me}])}async function US(t){return vr([{value:"LaunchDarkly",transform:me},{value:"ContextKeys",transform:me},{value:t,transform:me}])}async function PS(t){return vr([{value:t,transform:me},{value:"ContextIndex",transform:me}])}async function td(t,e,n){return vr([{value:e,transform:me},{value:n.canonicalKey,transform:qp(t)}])}var{isLegacyUser:MS,isSingleKind:Na,isMultiKind:cp}=fe,ed="1.0",FS=t=>{let e=t,{kind:n}=e,r=Ip(e,["kind"]);return{kind:"multi",[n]:r}},AS=async({crypto:t,info:e},{applicationInfo:n})=>{var r;let{ld_application:i}=e.platformData(),o=(r=_a(i))!=null?r:{},s=(n==null?void 0:n.id)||(o==null?void 0:o.id);if(s){let a=(n==null?void 0:n.version)||(o==null?void 0:o.version),c=(n==null?void 0:n.name)||(o==null?void 0:o.name),l=(n==null?void 0:n.versionName)||(o==null?void 0:o.versionName);return o=ot(ot(ot(ye(ot({},o),{id:s}),a?{version:a}:{}),c?{name:c}:{}),l?{versionName:l}:{}),o.key=await za(t.createHash("sha256").update(s),"base64"),o.envAttributesVersion=o.envAttributesVersion||ed,o}},JS=async t=>{var e,n,r,i;let{ld_device:o,os:s}=t.info.platformData(),a=(e=_a(o))!=null?e:{},c=(s==null?void 0:s.name)||((n=a.os)==null?void 0:n.name),l=(s==null?void 0:s.version)||((r=a.os)==null?void 0:r.version),u=(i=a.os)==null?void 0:i.family;if((c||l||u)&&(a.os=ot(ot(ot({},c?{name:c}:{}),l?{version:l}:{}),u?{family:u}:{})),Object.keys(a).filter(h=>h!=="key"&&h!=="envAttributesVersion").length){let h=await US("ld_device");return a.key=await $p(h,t),a.envAttributesVersion=a.envAttributesVersion||ed,a}},DS=async(t,e,n)=>{if(MS(t))return t;let r,i;if(Na(t)&&t.kind!=="ld_application"||cp(t)&&!t.ld_application?r=await AS(e,n):n.logger.warn("Not adding ld_application environment attributes because it already exists."),Na(t)&&t.kind!=="ld_device"||cp(t)&&!t.ld_device?i=await JS(e):n.logger.warn("Not adding ld_device environment attributes because it already exists."),r||i){let o=Na(t)?FS(t):t;return ot(ot(ot({},o),r?{ld_application:r}:{}),i?{ld_device:i}:{})}return t};function YS(){let t,e;return{set(n,r){t=n,e=r},getContext(){return e},getUnwrappedContext(){return t},newIdentificationPromise(){let n,r;return{identifyPromise:new Promise((i,o)=>{n=i,r=o}),identifyResolve:n,identifyReject:r}},hasContext(){return e!==void 0},hasValidContext(){return this.hasContext()&&e.valid}}}var{isLegacyUser:KS,isMultiKind:_S,isSingleKind:HS}=fe,Ba=async(t,e,n)=>{let{anonymous:r,key:i}=e;if(r&&!i){let o=await WS(t);e.key=await $p(o,n)}},zS=async(t,e)=>{await Ba(t.kind,t,e)},BS=async(t,e)=>{let n=t,{kind:r}=n,i=Ip(n,["kind"]);return Promise.all(Object.entries(i).map(([o,s])=>Ba(o,s,e)))},jS=async(t,e)=>{await Ba("user",t,e)},QS=async(t,e)=>{let n=Wp(t);return HS(n)&&await zS(n,e),_S(n)&&await BS(n,e),KS(n)&&await jS(n,e),n},$S=t=>({customBaseURI:t.serviceEndpoints.polling!==jp,customStreamURI:t.serviceEndpoints.streaming!==Qp,customEventsURI:t.serviceEndpoints.events!==Yi.DEFAULT_EVENTS,eventsCapacity:t.capacity,eventsFlushIntervalMillis:Oa(t.flushInterval),reconnectTimeMillis:Oa(t.streamInitialReconnectDelay),diagnosticRecordingIntervalMillis:Oa(t.diagnosticRecordingInterval),allAttributesPrivate:t.allAttributesPrivate,usingSecureMode:!1,bootstrapMode:!1}),qS=(t,e,n)=>{if(e.sendEvents&&!e.diagnosticOptOut)return new fe.DiagnosticsManager(t,n,$S(e))};function up(t,e){return{value:e!=null?e:null,variationIndex:null,reason:{kind:"ERROR",errorKind:t}}}function hp(t,e,n){return ot({value:t,variationIndex:e!=null?e:null},n!==void 0&&{reason:n})}var tI=(t,e,n,r,i)=>{if(e.sendEvents)return new fe.EventProcessor(ye(ot({},e),{eventsCapacity:e.capacity}),new Kw(t,e,n),r,void 0,i,!1,!0)},pp=class extends fe.EventFactoryBase{evalEventClient(t,e,n,r,i,o){let{trackEvents:s,debugEventsUntilDate:a,trackReason:c,flagVersion:l,version:u,variation:h}=r;return super.evalEvent({addExperimentData:c,context:i,debugEventsUntilDate:a,defaultVal:n,flagKey:t,reason:o,trackEvents:!!s,value:e,variation:h,version:l!=null?l:u})}},dp="_freshness";async function eI(t,e){let n=e.canonicalUnfilteredJson();if(n)return za(t.createHash("sha256").update(n),"base64")}function nI(t){return t!==null&&typeof t=="object"&&typeof t.version=="number"}async function rI(t,e,n,r,i){let o=await td(e,n,r),s=await t.get(o),a=!1;if(s==null){if(s=await t.get(r.canonicalKey),s==null)return;a=!0}try{let c=JSON.parse(s);if(c===null||typeof c!="object"){i==null||i.warn("Cached flag data is not a valid object");return}let l=Object.entries(c),u=l.find(([,h])=>!nI(h));if(u){i==null||i.warn(`Discarding cached flags due to invalid entry: ${u[0]}`);return}return{flags:l.reduce((h,[p,f])=>(h[p]=f,h),{}),storageKey:o,fromLegacyKey:a}}catch(c){i==null||i.warn(`Could not parse cached flag evaluations from persistent storage: ${c.message}`);return}}var Ga=class nd{constructor(){this.container={index:new Array}}static fromJson(e){let n=new nd;try{n.container=JSON.parse(e)}catch(r){}return n}toJson(){return JSON.stringify(this.container)}notice(e,n){let r=this.container.index.find(i=>i.id===e);r===void 0?this.container.index.push({id:e,timestamp:n}):r.timestamp=n}prune(e){let n=Math.max(e,0);return this.container.index.length>n?(this.container.index.sort((r,i)=>r.timestamp-i.timestamp),this.container.index.splice(0,this.container.index.length-n)):[]}},iI=class{constructor(t,e,n,r,i,o,s,a=()=>Date.now()){this.a=t,this.It=e,this.ct=n,this.ye=r,this.A=i,this.y=o,this.t=s,this.gn=a,this.ve=PS(this.It)}async init(t,e){this.y.init(t,e),await this.At(t)}async upsert(t,e,n){return this.y.upsert(t,e,n)?(await this.At(t),!0):!1}async applyChanges(t,e,n){this.y.applyChanges(t,e,n),await this.At(t)}async loadCached(t){if(this.ye||this.ct<=0||!this.a.storage)return!1;let e=await rI(this.a.storage,this.a.crypto,this.It,t,this.t);if(!e)return!1;e.fromLegacyKey&&(await this.a.storage.set(e.storageKey,JSON.stringify(e.flags)),await this.a.storage.clear(t.canonicalKey));let n=Object.entries(e.flags).reduce((r,[i,o])=>(r[i]={version:o.version,flag:o},r),{});return this.y.initCached(t,n),this.t.debug("Loaded cached flag evaluations from persistent storage"),!0}async yn(t,e,n){var r;let i=await eI(this.a.crypto,e);if(i===void 0){this.t.error("Could not serialize context for freshness tracking");return}let o={timestamp:n,contextHash:i};await((r=this.a.storage)==null?void 0:r.set(`${t}${dp}`,JSON.stringify(o)))}async vn(){var t;if(this.H!==void 0)return this.H;let e=await((t=this.a.storage)==null?void 0:t.get(await this.ve));if(!e)return this.H=new Ga,this.H;try{this.H=Ga.fromJson(e),this.t.debug("Loaded context index from persistent storage")}catch(n){this.t.warn(`Could not load index from persistent storage: ${n.message}`),this.H=new Ga}return this.H}async At(t){var e,n;if(this.ye)return;let r=this.gn(),i=await this.vn(),o=await td(this.a.crypto,this.It,t);this.ct>0&&i.notice(o,r);let s=i.prune(this.ct),a=this.ct<=0||s.some(h=>h.id===o);if(await Promise.all(s.flatMap(h=>{var p,f;return[(p=this.a.storage)==null?void 0:p.clear(h.id),(f=this.a.storage)==null?void 0:f.clear(`${h.id}${dp}`)]})),await((e=this.a.storage)==null?void 0:e.set(await this.ve,i.toJson())),a)return;let c=this.A.getAll(),l=Object.entries(c).reduce((h,[p,f])=>(f.flag!==null&&f.flag!==void 0&&(h[p]=f.flag),h),{}),u=JSON.stringify(l);await((n=this.a.storage)==null?void 0:n.set(o,u));try{await this.yn(o,t,r)}catch(h){this.t.warn(`Failed to store freshness data: ${h.message}`)}}};function oI(){let t={};return{init(e){t=Object.entries(e).reduce((n,[r,i])=>(n[r]=i,n),{})},insertOrUpdate(e,n){t[e]=n},get(e){if(Object.prototype.hasOwnProperty.call(t,e))return t[e]},getAll(){return t},applyChanges(e,n){n==="full"?this.init(e):n==="partial"&&Object.entries(e).forEach(([r,i])=>{t[r]=i})}}}function fp(t,e){let n=[];return Object.entries(t).forEach(([r,i])=>{let o=e[r];(!o||!Pi(i,o))&&n.push(r)}),Object.keys(e).forEach(r=>{t[r]||n.push(r)}),n}function sI(t,e){let n=t,r=e,i,o=new Array;return{handleFlagChanges(s,a){i?o.forEach(c=>{try{c(i,s,a)}catch(l){}}):r.warn("Received a change event without an active context. Changes will not be propagated.")},init(s,a){i=s;let c=n.getAll();n.init(a);let l=fp(c,a);l.length>0&&this.handleFlagChanges(l,"init")},initCached(s,a){(i==null?void 0:i.canonicalKey)!==s.canonicalKey&&this.init(s,a)},applyChanges(s,a,c){i=s;let l=n.getAll();if(n.applyChanges(a,c),c==="full"){let u=fp(l,a);u.length>0&&this.handleFlagChanges(u,"init")}else if(c==="partial"){let u=Object.keys(a);u.length>0&&this.handleFlagChanges(u,"patch")}},upsert(s,a,c){if((i==null?void 0:i.canonicalKey)!==s.canonicalKey)return r.warn("Received an update for an inactive context."),!1;let l=n.get(a);return l!==void 0&&l.version>=c.version?!1:(n.insertOrUpdate(a,c),this.handleFlagChanges([a],"patch"),!0)},on(s){o.push(s)},off(s){let a=o.indexOf(s);a>-1&&o.splice(a,1)}}}var aI=class{constructor(t,e,n,r,i,o=()=>Date.now()){this.A=oI(),this.y=sI(this.A,i),this.ut=this.wn(t,e,n,r,i,o)}async wn(t,e,n,r,i,o=()=>Date.now()){let s=await XS(t.crypto,e);return new iI(t,s,n,r,this.A,this.y,i,o)}get(t){return this.r&&Object.prototype.hasOwnProperty.call(this.r,t)?this.Tt(this.r[t]):this.A.get(t)}getAll(){return this.r?ot(ot({},this.A.getAll()),Object.entries(this.r).reduce((t,[e,n])=>(t[e]=this.Tt(n),t),{})):this.A.getAll()}presetFlags(t){this.A.init(t)}setBootstrap(t,e){this.y.init(t,e)}async init(t,e){return(await this.ut).init(t,e)}async upsert(t,e,n){return(await this.ut).upsert(t,e,n)}async loadCached(t){return(await this.ut).loadCached(t)}async applyChanges(t,e,n){return(await this.ut).applyChanges(t,e,n)}on(t){this.y.on(t)}off(t){this.y.off(t)}Tt(t){return{flag:{value:t,version:0},version:0}}setOverride(t,e){this.r||(this.r={}),this.r[t]=e,this.y.handleFlagChanges([t],"override")}removeOverride(t){!this.r||!Object.prototype.hasOwnProperty.call(this.r,t)||(delete this.r[t],Object.keys(this.r).length===0&&(this.r=void 0),this.y.handleFlagChanges([t],"override"))}clearAllOverrides(){if(this.r){let t=ot({},this.r);this.r=void 0,this.y.handleFlagChanges(Object.keys(t),"override")}}getAllOverrides(){if(!this.r)return{};let t={};return Object.entries(this.r).forEach(([e,n])=>{t[e]=this.Tt(n)}),t}getDebugOverride(){return{setOverride:this.setOverride.bind(this),removeOverride:this.removeOverride.bind(this),clearAllOverrides:this.clearAllOverrides.bind(this),getAllOverrides:this.getAllOverrides.bind(this)}}},mp="unknown hook",rd="beforeEvaluation",id="afterEvaluation",lI="afterTrack";function wr(t,e,n,r,i){try{return r()}catch(o){return t==null||t.error(`An error was encountered in "${e}" of the "${n}" hook: ${o}`),i}}function Sr(t,e){try{return e.getMetadata().name||mp}catch(n){return t.error("Exception thrown getting metadata for hook. Unable to get hook name."),mp}}function cI(t,e,n){return e.map(r=>wr(t,rd,Sr(t,r),()=>{var i,o;return(o=(i=r==null?void 0:r.beforeEvaluation)==null?void 0:i.call(r,n,{}))!=null?o:{}},{}))}function uI(t,e,n,r,i){for(let o=e.length-1;o>=0;o-=1){let s=e[o],a=r[o];wr(t,id,Sr(t,s),()=>{var c,l;return(l=(c=s==null?void 0:s.afterEvaluation)==null?void 0:c.call(s,n,a,i))!=null?l:{}},{})}}function hI(t,e,n){return e.map(r=>wr(t,rd,Sr(t,r),()=>{var i,o;return(o=(i=r==null?void 0:r.beforeIdentify)==null?void 0:i.call(r,n,{}))!=null?o:{}},{}))}function pI(t,e,n,r,i){for(let o=e.length-1;o>=0;o-=1){let s=e[o],a=r[o];wr(t,id,Sr(t,s),()=>{var c,l;return(l=(c=s==null?void 0:s.afterIdentify)==null?void 0:c.call(s,n,a,i))!=null?l:{}},{})}}function dI(t,e,n){for(let r=e.length-1;r>=0;r-=1){let i=e[r];wr(t,lI,Sr(t,i),()=>{var o;return(o=i==null?void 0:i.afterTrack)==null?void 0:o.call(i,n)},void 0)}}var fI=class{constructor(t,e){this.t=t,this.R=[],this.R.push(...e)}withEvaluation(t,e,n,r){if(this.R.length===0)return r();let i=[...this.R],o={flagKey:t,context:e,defaultValue:n},s=cI(this.t,i,o),a=r();return uI(this.t,i,o,s,a),a}identify(t,e){let n=[...this.R],r={context:t,timeout:e},i=hI(this.t,n,r);return o=>{pI(this.t,n,r,i,o)}}addHook(t){this.R.push(t)}afterTrack(t){if(this.R.length===0)return;let e=[...this.R];dI(this.t,e,t)}};function mI(t){return{getMetadata(){return{name:"LaunchDarkly-Inspector-Adapter"}},afterEvaluation:(e,n,r)=>(t.onFlagUsed(e.flagKey,r,e.context),n),afterIdentify(e,n,r){return t.onIdentityChanged(e.context),n}}}function yI(t,e){return`an inspector: "${e}" of an invalid type (${t}) was configured`}function gI(t,e){return`an inspector: "${e}" of type: "${t}" generated an exception`}function bI(t,e){let n=!1,r={method:(...i)=>{try{t.method(...i)}catch(o){n||(n=!0,e.warn(gI(r.type,r.name)))}},type:t.type,name:t.name,synchronous:t.synchronous};return r}var od="flag-used",sd="flag-details-changed",ad="flag-detail-changed",ld="client-identity-changed",vI=[od,sd,ad,ld];function wI(t,e){let n=vI.includes(t.type)&&t.method&&typeof t.method=="function";return n||e.warn(yI(t.type,t.name)),n}var SI=class{constructor(t,e){this.z=[];let n=t.filter(r=>wI(r,e));this.z=n.map(r=>bI(r,e))}hasInspectors(){return this.z.length!==0}onFlagUsed(t,e,n){this.z.forEach(r=>{r.type===od&&r.method(t,e,n)})}onFlagsChanged(t){this.z.forEach(e=>{e.type===sd&&e.method(t)})}onFlagChanged(t,e){this.z.forEach(n=>{n.type===ad&&n.method(t,e)})}onIdentityChanged(t){this.z.forEach(e=>{e.type===ld&&e.method(t)})}},II=class{constructor(t){this.t=t,this.n=new Map}on(t,e){var n,r;if(typeof t!="string"){(n=this.t)==null||n.warn("Only string event names are supported.");return}this.n.has(t)?(r=this.n.get(t))==null||r.push(e):this.n.set(t,[e])}off(t,e){let n=this.n.get(t);if(n){if(e){let r=n.filter(i=>i!==e);r.length===0?this.n.delete(t):this.n.set(t,r);return}this.n.delete(t)}}En(t,e,...n){var r;try{t(...n)}catch(i){(r=this.t)==null||r.error(`Encountered error invoking handler for "${e}", detail: "${i}"`)}}emit(t,...e){let n=this.n.get(t);n==null||n.forEach(r=>this.En(r,t,...e))}eventNames(){return[...this.n.keys()]}listenerCount(t){var e,n;return(n=(e=this.n.get(t))==null?void 0:e.length)!=null?n:0}};function TI(t,e,n){let r=e.info.sdkData(),i;n.applicationInfo&&(n.applicationInfo.id&&(i=i!=null?i:{},i.id=n.applicationInfo.id),n.applicationInfo.version&&(i=i!=null?i:{},i.version=n.applicationInfo.version),n.applicationInfo.name&&(i=i!=null?i:{},i.name=n.applicationInfo.name),n.applicationInfo.versionName&&(i=i!=null?i:{},i.versionName=n.applicationInfo.versionName));let o={name:r.userAgentBase,version:r.version};r.wrapperName&&(o.wrapperName=r.wrapperName),r.wrapperVersion&&(o.wrapperVersion=r.wrapperVersion);let s={sdk:o,[n.credentialType]:t};return i&&(s.application=i),s}var{ClientMessages:yp,ErrorKinds:gp}=fe,EI=5,RI=class{constructor(t,e,n,r,i,o){var s;if(this.sdkKey=t,this.autoEnvAttributes=e,this.platform=n,this.u=YS(),this.$t=15,this.T=new pp(!1),this.lt=new pp(!0),this.Rt=!1,this.bn=wS(),!t)throw new Error("You must configure the client with a client-side SDK key");if(!n.encoding)throw new Error("Platform must implement Encoding because btoa is required.");this.e=new LS(r,o),this.logger=this.e.logger,this.we=$w(this.sdkKey,this.platform.info,this.e.tags,this.e.serviceEndpoints.includeAuthorizationHeader,this.e.userAgentHeaderName),this.N=new aI(this.platform,t,this.e.maxCachedContexts,(s=this.e.disableCache)!=null?s:!1,this.e.logger),this.x=qS(t,this.e,n),this.E=tI(t,this.e,n,this.we,this.x),this.emitter=new II,this.emitter.on("error",(c,l)=>{this.logger.error(`error: ${l}, context: ${JSON.stringify(c)}`)}),this.N.on((c,l,u)=>{this.Dn(l,u);let h=On.toLDContext(c);this.emitter.emit("change",h,l),l.forEach(p=>{this.emitter.emit(`change:${p}`,h)})}),this.dataManager=i(this.N,this.e,this.we,this.emitter,this.x);let a=[...this.e.hooks];if(this.environmentMetadata=TI(this.sdkKey,this.platform,this.e),this.e.getImplementationHooks(this.environmentMetadata).forEach(c=>{a.push(c)}),this.M=new fI(this.logger,a),this.Y=new SI(this.e.inspectors,this.logger),this.Y.hasInspectors()&&this.M.addHook(mI(this.Y)),r.cleanOldPersistentData&&o!=null&&o.getLegacyStorageKeys&&this.platform.storage)try{this.logger.debug("Cleaning old persistent data."),Promise.all(o.getLegacyStorageKeys().map(c=>{var l;return(l=this.platform.storage)==null?void 0:l.clear(c)})).catch(c=>{this.logger.error(`Error cleaning old persistent data: ${c}`)}).finally(()=>{this.logger.debug("Cleaned old persistent data.")})}catch(c){this.logger.error(`Error cleaning old persistent data: ${c}`)}}allFlags(){return Object.entries(this.N.getAll()).reduce((t,[e,n])=>(n.flag!==null&&n.flag!==void 0&&!n.flag.deleted&&(t[e]=n.flag.value),t),{})}async close(){var t;await this.flush(),(t=this.E)==null||t.close(),this.dataManager.close(),this.logger.debug("Closed event processor and data source.")}async flush(){var t;try{await((t=this.E)==null?void 0:t.flush()),this.logger.debug("Successfully flushed event processor.")}catch(e){return this.logger.error(`Error flushing event processor: ${e}.`),{error:e,result:!1}}return{result:!0}}getContext(){return this.u.hasContext()?Wp(this.u.getUnwrappedContext()):void 0}getInternalContext(){return this.u.getContext()}presetFlags(t){this.N.presetFlags(t)}async identify(t,e){let n=await this.identifyResult(t,e);if(n.status==="error")throw n.error;if(n.status==="timeout"){let r=new Xp(`identify timed out after ${n.timeout} seconds.`);throw this.logger.error(r.message),r}}async identifyResult(t,e){var n,r;let i=(n=e==null?void 0:e.timeout)!=null?n:EI,o=(e==null?void 0:e.timeout)===void 0&&(e==null?void 0:e.noTimeout)===!0;i>this.$t&&this.logger.warn(`The identify function was called with a timeout greater than ${this.$t} seconds. We recommend a timeout of less than ${this.$t} seconds.`);let s=this.bn.execute({before:async()=>{let c=await QS(t,this.platform);this.autoEnvAttributes===Di.Enabled&&(c=await DS(c,this.platform,this.e));let l=On.fromLDContext(c);if(l.valid){let u=this.M.identify(c,e==null?void 0:e.timeout);return{context:c,checkedContext:l,afterIdentify:u}}return{context:c,checkedContext:l}},execute:async c=>{var l;let{context:u,checkedContext:h}=c;if(!h.valid){let d=new Error("Context was unspecified or had no key");return this.emitter.emit("error",u,d),Promise.reject(d)}this.u.set(u,h),(l=this.E)==null||l.sendEvent(this.T.identifyEvent(h));let{identifyPromise:p,identifyResolve:f,identifyReject:m}=this.u.newIdentificationPromise();return this.logger.debug(`Identifying ${JSON.stringify(h)}`),await this.dataManager.identify(f,m,h,e),p},after:async(c,l)=>{var u,h,p;c.status==="complete"?(u=l==null?void 0:l.afterIdentify)==null||u.call(l,{status:"completed"}):c.status==="shed"?(h=l==null?void 0:l.afterIdentify)==null||h.call(l,{status:"shed"}):c.status==="error"&&((p=l==null?void 0:l.afterIdentify)==null||p.call(l,{status:"error"}))}},(r=e==null?void 0:e.sheddable)!=null?r:!1).then(c=>{if(c.status==="error"){let u={status:"error",error:c.error};return this.maybeSetInitializationResult({status:"failed",error:c.error}),u}if(c.status==="shed")return{status:"shed"};let l={status:"completed"};return this.maybeSetInitializationResult({status:"complete"}),l});if(o)return s;let a=new Promise(c=>{setTimeout(()=>{c({status:"timeout",timeout:i})},i*1e3)});return Promise.race([s,a])}maybeSetInitializationResult(t){this.initializeResult===void 0&&(this.initializeResult=t,this.emitter.emit("ready"),t.status==="complete"&&this.emitter.emit("initialized"),this.initResolve&&(this.initResolve(t),this.initResolve=void 0))}waitForInitialization(t){var e;let n=(e=t==null?void 0:t.timeout)!=null?e:5;return this.initializeResult?Promise.resolve(this.initializeResult):this.initializedPromise?this.promiseWithTimeout(this.initializedPromise,n):(this.initializedPromise||(this.initializedPromise=new Promise(r=>{this.initResolve=r})),this.promiseWithTimeout(this.initializedPromise,n))}promiseWithTimeout(t,e){let n=jw(e,"waitForInitialization");return Promise.race([t.then(r=>(n.cancel(),r)),n.promise.then(()=>({status:"complete"})).catch(()=>({status:"timeout"}))]).catch(r=>{var i;return(i=this.logger)==null||i.error(r.message),{status:"failed",error:r}})}on(t,e){this.emitter.on(t,e)}off(t,e){this.emitter.off(t,e)}track(t,e,n){var r,i;if(!this.u.hasValidContext()){this.logger.warn(yp.MissingContextKeyNoEvent);return}n!==void 0&&!V.Number.is(n)&&((r=this.logger)==null||r.warn(yp.invalidMetricValue(typeof n))),(i=this.E)==null||i.sendEvent(this.e.trackEventModifier(this.T.customEvent(t,this.u.getContext(),e,n))),this.M.afterTrack({key:t,context:this.u.getUnwrappedContext(),data:e,metricValue:n})}dt(t,e,n,r){var i,o,s,a,c;let l=this.u.hasContext();l||(i=this.logger)==null||i.warn("Flag evaluation called before client is fully initialized, data from this evaulation could be stale.");let u=this.u.getContext(),h=this.N.get(t);if(h===void 0||h.flag.deleted){let g=e!=null?e:null;return(o=this.logger)==null||o.warn(`Unknown feature flag "${t}"; returning default value ${g}.`),l&&((s=this.E)==null||s.sendEvent(this.T.unknownFlagEvent(t,g,u))),up(gp.FlagNotFound,e)}let{reason:p,value:f,variation:m,prerequisites:d}=h.flag;if(r){let[g,w]=r(f);if(!g){l&&((a=this.E)==null||a.sendEvent(n.evalEventClient(t,e,e,h.flag,u,p)));let R=new zw(`Wrong type "${w}" for feature flag "${t}"; returning default value`);return this.emitter.emit("error",this.u.getUnwrappedContext(),R),up(gp.WrongType,e)}}let v=hp(f,m,p);return f==null&&(this.logger.debug("Result value is null. Providing default value."),v.value=e),d==null||d.forEach(g=>{this.dt(g,void 0,this.T)}),l&&((c=this.E)==null||c.sendEvent(n.evalEventClient(t,f,e,h.flag,u,p))),v}variation(t,e){let{value:n}=this.M.withEvaluation(t,this.u.getUnwrappedContext(),e,()=>this.dt(t,e,this.T));return n}variationDetail(t,e){return this.M.withEvaluation(t,this.u.getUnwrappedContext(),e,()=>this.dt(t,e,this.lt))}B(t,e,n,r){return this.M.withEvaluation(t,this.u.getUnwrappedContext(),e,()=>this.dt(t,e,n,r))}boolVariation(t,e){return this.B(t,e,this.T,n=>[V.Boolean.is(n),V.Boolean.getType()]).value}jsonVariation(t,e){return this.variation(t,e)}numberVariation(t,e){return this.B(t,e,this.T,n=>[V.Number.is(n),V.Number.getType()]).value}stringVariation(t,e){return this.B(t,e,this.T,n=>[V.String.is(n),V.String.getType()]).value}boolVariationDetail(t,e){return this.B(t,e,this.lt,n=>[V.Boolean.is(n),V.Boolean.getType()])}numberVariationDetail(t,e){return this.B(t,e,this.lt,n=>[V.Number.is(n),V.Number.getType()])}stringVariationDetail(t,e){return this.B(t,e,this.lt,n=>[V.String.is(n),V.String.getType()])}jsonVariationDetail(t,e){return this.variationDetail(t,e)}addHook(t){this.M.addHook(t)}setEventSendingEnabled(t,e){var n,r,i,o;this.Rt!==t&&(this.Rt=t,t?(this.logger.debug("Starting event processor"),(n=this.E)==null||n.start()):e?((r=this.logger)==null||r.debug("Flushing event processor before disabling."),this.flush().then(()=>{var s,a;this.Rt||((s=this.logger)==null||s.debug("Stopping event processor."),(a=this.E)==null||a.close())})):((i=this.logger)==null||i.debug("Stopping event processor."),(o=this.E)==null||o.close()))}sendEvent(t){var e;(e=this.E)==null||e.sendEvent(t)}getDebugOverrides(){var t,e;return(e=(t=this.N).getDebugOverride)==null?void 0:e.call(t)}Dn(t,e){if(!this.Y.hasInspectors())return;let n={};t.forEach(r=>{let i=this.N.get(r);if(i!=null&&i.flag&&!i.flag.deleted){let{reason:o,value:s,variation:a}=i.flag;n[r]=hp(s,a,o)}else n[r]={value:void 0,variationIndex:null}}),e==="init"?this.Y.onFlagsChanged(n):e==="patch"&&Object.entries(n).forEach(([r,i])=>{this.Y.onFlagChanged(r,i)})}};function CI(t,e,n){n.forEach(r=>{var i;try{(i=r.registerDebug)==null||i.call(r,e)}catch(o){t.error(`Exception thrown registering plugin ${fe.safeGetName(t,r)}.`)}})}function cd(t,e){let n=Object.keys(e),r="$flagsState",i="$valid",o=e[r];!o&&n.length&&t.warn("LaunchDarkly client was initialized with bootstrap data that did not include flag metadata. Events may not be sent correctly."),e[i]===!1&&t.warn("LaunchDarkly bootstrap data is not available because the back end could not read the flags.");let s={};return n.forEach(a=>{if(a!==r&&a!==i){let c;o&&o[a]?c=ot({value:e[a]},o[a]):c={value:e[a],version:0},s[a]={version:c.version,flag:c}}}),s}function ZI(t){return{polling:()=>({pathGet(e,n){return`/sdk/evalx/${t}/contexts/${np(n,e)}`},pathReport(e,n){return`/sdk/evalx/${t}/context`},pathPost(e,n){throw new Error("Post for FDv1 unsupported.")},pathPing(e,n){throw new Error("Ping for polling unsupported.")}}),streaming:()=>({pathGet(e,n){return`/eval/${t}/${np(n,e)}`},pathReport(e,n){return`/eval/${t}`},pathPost(e,n){throw new Error("Post for FDv1 unsupported.")},pathPing(e,n){return`/ping/${t}`}})}}function kI(t,e,n){return{async handlePut(r,i){n.debug(`Got PUT: ${Object.keys(i)}`);let o=Object.entries(i).reduce((s,[a,c])=>(s[a]={version:c.version,flag:c},s),{});await t.init(r,o),e.requestStateUpdate("VALID")},async handlePatch(r,i){n.debug(`Got PATCH ${JSON.stringify(i,null,2)}`),t.upsert(r,i.key,{version:i.version,flag:i})},async handleDelete(r,i){n.debug(`Got DELETE ${JSON.stringify(i,null,2)}`),t.upsert(r,i.key,{version:i.version,flag:ye(ot({},i),{deleted:!0,flagVersion:0,value:void 0,variation:0,trackEvents:!1})})},handleStreamingError(r){e.reportError(r.kind,r.message,r.code,r.recoverable)},handlePollingError(r){e.reportError(r.kind,r.message,r.status,r.recoverable)}}}function VI(t,e=()=>Date.now()){let n="CLOSED",r=e(),i;function o(){return{state:n,stateSince:r,lastError:i}}function s(a,c=!1){let l=a==="INTERRUPTED"&&n==="INITIALIZING"?"INITIALIZING":a,u=n!==l;u&&(n=l,r=e()),(u||c)&&t.emit("dataSourceStatus",o())}return{get status(){return o()},requestStateUpdate(a){s(a)},reportError(a,c,l,u=!1){i={kind:a,message:c,statusCode:l,time:e()},s(u?"INTERRUPTED":"CLOSED",!0)}}}function bp(t){t==null||t.debug("Poll completed after the processor was closed. Skipping processing.")}var xI=class{constructor(t,e,n,r,i){this.kn=t,this.Sn=e,this.xn=n,this.m=r,this.t=i,this.h=!1}async Ee(){var t,e,n,r,i,o,s;if(this.h)return;let a=h=>{var p,f,m;(p=this.t)==null||p.error("Polling received invalid data"),(f=this.t)==null||f.debug(`Invalid JSON follows: ${h}`),(m=this.m)==null||m.call(this,new Ji(Jt.InvalidData,"Malformed JSON data in polling response"))};(t=this.t)==null||t.debug("Polling LaunchDarkly for feature flag updates");let c=Date.now();try{let h=await this.kn.requestPayload();try{if(this.h){bp(this.t);return}let p=JSON.parse(h);try{(e=this.xn)==null||e.call(this,p)}catch(f){(n=this.t)==null||n.error(`Exception from data handler: ${f}`)}}catch(p){a(h)}}catch(h){if(this.h){bp(this.t);return}let p=h;if(p.status!==void 0&&!Hi(p.status)){(r=this.t)==null||r.error(Ln(h,"polling request")),(i=this.m)==null||i.call(this,new Ji(Jt.ErrorResponse,p.message,p.status));return}(o=this.t)==null||o.error(Ln(h,"polling request","will retry"))}let l=Date.now()-c,u=Math.max(this.Sn*1e3-l,0);(s=this.t)==null||s.debug("Elapsed: %d ms, sleeping for %d ms",l,u),this.Nt=setTimeout(()=>{this.Ee()},u)}start(){this.Ee()}stop(){this.Nt&&(clearTimeout(this.Nt),this.Nt=void 0),this.h=!0}close(){this.stop()}},OI=(t,e,n,r)=>{n==null||n.error(`Stream received invalid data in "${t}" message`),n==null||n.debug(`Invalid JSON follows: ${e}`),r==null||r(new Pa(Jt.InvalidData,"Malformed JSON data in event stream"))};function NI(t,e){e==null||e.debug(`Received ${t} event after processor was closed. Skipping processing.`)}function vp(t){t==null||t.debug("Ping completed after processor was closed. Skipping processing.")}var GI=class{constructor(t,e,n,r,i,o,s,a,c){var l;this.Ln=t,this.Mt=e,this.n=n,this._=r,this.On=o,this.x=s,this.m=a,this.t=c,this.h=!1;let u;e.useReport&&!r.getEventSourceCapabilities().customMethod?u=e.paths.pathPing(i,t):u=e.useReport?e.paths.pathReport(i,t):e.paths.pathGet(i,t);let h=[...(l=e.queryParameters)!=null?l:[]];this.Mt.withReasons&&h.push({key:"withReasons",value:"true"}),this._=r,this.be=ot({},e.baseHeaders),this.t=c,this.Pn=_w(e.serviceEndpoints,u,h)}De(){this.ht=Date.now()}Ft(t){this.ht&&this.x&&this.x.recordStreamInit(this.ht,!t,Date.now()-this.ht),this.ht=void 0}Cn(t){var e,n,r;return Up(t)?((r=this.t)==null||r.warn(Ln(t,"streaming request","will retry")),this.Ft(!1),this.De(),!0):(this.Ft(!1),(e=this.m)==null||e.call(this,new Pa(Jt.ErrorResponse,t.message,t.status,!1)),(n=this.t)==null||n.error(Ln(t,"streaming request")),!1)}start(){this.De();let t;this.Mt.useReport?(this.be["content-type"]="application/json",t={method:"REPORT",body:this.Ln}):t={};let e=this._.createEventSource(this.Pn,ye(ot({headers:this.be},t),{errorFilter:n=>this.Cn(n),initialRetryDelayMillis:this.Mt.initialRetryDelayMillis,readTimeoutMillis:300*1e3,retryResetIntervalMillis:60*1e3}));this.ke=e,e.onclose=()=>{var n;(n=this.t)==null||n.info("Closed LaunchDarkly stream connection")},e.onerror=()=>{},e.onopen=()=>{var n;(n=this.t)==null||n.info("Opened LaunchDarkly stream connection")},e.onretrying=n=>{var r;(r=this.t)==null||r.info(`Will retry stream connection in ${n.delayMillis} milliseconds`)},this.n.forEach(({deserializeData:n,processJson:r},i)=>{e.addEventListener(i,o=>{var s,a;if(this.h){NI(i,this.t);return}if((s=this.t)==null||s.debug(`Received ${i} event`),o!=null&&o.data){this.Ft(!0);let{data:c}=o,l=n(c);if(!l){OI(i,c,this.t,this.m);return}r(l)}else(a=this.m)==null||a.call(this,new Pa(Jt.InvalidData,"Unexpected payload from event stream"))})}),e.addEventListener("ping",async()=>{var n,r,i,o,s,a,c;(n=this.t)==null||n.debug("Got PING, going to poll LaunchDarkly for feature flag updates");try{let l=await this.On.requestPayload();try{if(this.h){vp(this.t);return}let u=JSON.parse(l);try{(r=this.n.get("put"))==null||r.processJson(u)}catch(h){(i=this.t)==null||i.error(`Exception from data handler: ${h}`)}}catch(u){(o=this.t)==null||o.error("Polling after ping received invalid data"),(s=this.t)==null||s.debug(`Invalid JSON follows: ${l}`),(a=this.m)==null||a.call(this,new Ji(Jt.InvalidData,"Malformed JSON data in ping polling response"))}}catch(l){if(this.h){vp(this.t);return}let u=l;(c=this.m)==null||c.call(this,new Ji(Jt.ErrorResponse,u.message,u.status))}})}stop(){var t;(t=this.ke)==null||t.close(),this.ke=void 0,this.h=!0}close(){this.stop()}},LI=class{constructor(t,e,n,r,i,o,s,a,c){this.platform=t,this.flagManager=e,this.credential=n,this.config=r,this.getPollingPaths=i,this.getStreamingPaths=o,this.baseHeaders=s,this.emitter=a,this.diagnosticsManager=c,this.closed=!1,this.logger=r.logger,this.dataSourceStatusManager=VI(a),this.G=kI(e,this.dataSourceStatusManager,this.config.logger)}setConnectionParams(t){this.In=t}createPollingProcessor(t,e,n,r,i){let o=new xI(n,this.config.pollInterval,async s=>{await this.G.handlePut(e,s),r==null||r()},s=>{this.emitter.emit("error",t,s),this.G.handlePollingError(s),i==null||i(s)},this.logger);this.updateProcessor=this.Se(o,this.dataSourceStatusManager)}createStreamingProcessor(t,e,n,r,i){var o;let s=new GI(JSON.stringify(t),{credential:this.credential,serviceEndpoints:this.config.serviceEndpoints,paths:this.getStreamingPaths(),baseHeaders:this.baseHeaders,initialRetryDelayMillis:this.config.streamInitialReconnectDelay*1e3,withReasons:this.config.withReasons,useReport:this.config.useReport,queryParameters:(o=this.In)==null?void 0:o.queryParameters},this.createStreamListeners(e,r),this.platform.requests,this.platform.encoding,n,this.diagnosticsManager,a=>{this.emitter.emit("error",t,a),this.G.handleStreamingError(a),i==null||i(a)},this.logger);this.updateProcessor=this.Se(s,this.dataSourceStatusManager)}createStreamListeners(t,e){let n=new Map;return n.set("put",{deserializeData:JSON.parse,processJson:async r=>{await this.G.handlePut(t,r),e==null||e()}}),n.set("patch",{deserializeData:JSON.parse,processJson:async r=>{this.G.handlePatch(t,r)}}),n.set("delete",{deserializeData:JSON.parse,processJson:async r=>{this.G.handleDelete(t,r)}}),n}Se(t,e){return{start:()=>{e.requestStateUpdate("INITIALIZING"),t.start()},stop:()=>{t.stop(),e.requestStateUpdate("CLOSED")},close:()=>{t.close(),e.requestStateUpdate("CLOSED")}}}close(){var t;(t=this.updateProcessor)==null||t.close(),this.closed=!0}};function Bi(){return typeof document!==void 0}function ja(){return typeof window!==void 0}function ud(t,e,n){return Bi()?(document.addEventListener(t,e,n),()=>{document.removeEventListener(t,e,n)}):()=>{}}function hd(t,e,n){return Bi()?(window.addEventListener(t,e,n),()=>{window.removeEventListener(t,e,n)}):()=>{}}function gr(){return ja()?window.location.href:""}function XI(){return ja()?window.location.search:""}function WI(){return ja()?window.location.hash:""}function UI(){if(typeof crypto!==void 0)return crypto;throw Error("Access to a web crypto API is required")}function PI(){return Bi()?document.visibilityState:"visibile"}function MI(t){if(Bi())return document.querySelectorAll(t)}var FI="[BrowserDataManager]",AI=class extends LI{constructor(t,e,n,r,i,o,s,a,c,l){super(t,e,n,r,o,s,a,c,l),this.Hn=i,this.Z=void 0,this.Ut=!1,this.Z=i.streaming}L(t,...e){this.logger.debug(`${FI} ${t}`,...e)}async identify(t,e,n,r){if(this.closed){this.L("Identify called after data manager was closed.");return}this.context=n;let i=r;i!=null&&i.hash?this.setConnectionParams({queryParameters:[{key:"h",value:i.hash}]}):this.setConnectionParams(),this.jt=i==null?void 0:i.hash,i!=null&&i.bootstrap?this.An(n,i,t):(await this.flagManager.loadCached(n)&&this.L("Identify - Flags loaded from cache. Continuing to initialize via a poll."),await this.Tn(n,t,e)),this.xe(),this.Ti()}async $n(t){let e=JSON.stringify(On.toLDContext(t)),n=ap(e,this.config.serviceEndpoints,this.getPollingPaths(),this.platform.requests,this.platform.encoding,this.baseHeaders,[],this.config.withReasons,this.config.useReport,this.jt),r=3,i;for(let o=0;o<=r;o+=1)try{return await n.requestPayload()}catch(s){if(!Up(s))throw s;i=s,o<r&&(this.L(Ln(s,"initial poll request","will retry")),await Pp(1e3))}throw i}async Tn(t,e,n){var r,i;try{this.dataSourceStatusManager.requestStateUpdate(op.Initializing);let o=await this.$n(t);try{let s=this.createStreamListeners(t,e).get("put");s.processJson(s.deserializeData(o))}catch(s){this.dataSourceStatusManager.reportError(Jt.InvalidData,(r=s.message)!=null?r:"Could not parse poll response")}}catch(o){this.dataSourceStatusManager.reportError(Jt.NetworkError,(i=o.message)!=null?i:"unexpected network error",o.status),n(o)}}An(t,e,n){let{bootstrapParsed:r}=e;r||(r=cd(this.logger,e.bootstrap)),this.flagManager.setBootstrap(t,r),this.dataSourceStatusManager.requestStateUpdate(op.Valid),this.L("Identify - Initialization completed from bootstrap"),n()}setForcedStreaming(t){this.Z=t,this.Ti()}setAutomaticStreamingState(t){this.Ut=t,this.Ti()}Ti(){let t=this.Z||this.Ut&&this.Z===void 0;this.L(`Updating streaming state. forced(${this.Z}) automatic(${this.Ut})`),t?this.Rn():this.xe()}xe(){var t;this.updateProcessor&&this.L("Stopping update processor."),(t=this.updateProcessor)==null||t.close(),this.updateProcessor=void 0}Rn(){if(this.updateProcessor){this.L("Update processor already active. Not changing state.");return}if(!this.context){this.L("Context not set, not starting update processor.");return}this.L("Starting update processor."),this.Nn(this.context)}Nn(t,e,n){var r;let i=On.toLDContext(t);(r=this.updateProcessor)==null||r.close();let o=JSON.stringify(On.toLDContext(t)),s=ap(o,this.config.serviceEndpoints,this.getPollingPaths(),this.platform.requests,this.platform.encoding,this.baseHeaders,[],this.config.withReasons,this.config.useReport,this.jt);this.createStreamingProcessor(i,t,s,e,n),this.updateProcessor.start()}};function JI(t){let e=ud("visibilitychange",()=>{PI()==="hidden"&&t()}),n=hd("pagehide",t);return()=>{e(),n()}}function La(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function DI(t,e,n,r){let i=((t.kind==="substring"||t.kind==="regex")&&r.includes("/")?e:e.replace(r,"")).replace(n,"");switch(t.kind){case"exact":return new RegExp(`^${La(t.url)}/?$`).test(e);case"canonical":return new RegExp(`^${La(t.url)}/?$`).test(i);case"substring":return new RegExp(`.*${La(t.substring)}.*$`).test(i);case"regex":return new RegExp(t.pattern).test(i);default:return!1}}function YI(t,e){let n=[];return e.forEach(r=>{let i=t.target,{selector:o}=r,s=MI(o);for(;i&&s!=null&&s.length;){for(let a=0;a<s.length;a+=1)if(i===s[a]){n.push(r);break}i=i.parentNode}}),n}var KI=class{constructor(t,e){let n=t.filter(o=>{var s;return(s=o.urls)==null?void 0:s.some(a=>DI(a,gr(),XI(),WI()))}),r=n.filter(o=>o.kind==="pageview"),i=n.filter(o=>o.kind==="click");if(r.forEach(o=>e(o)),i.length){let o=s=>{YI(s,i).forEach(a=>{e(a)})};this.Le=ud("click",o)}}close(){var t;(t=this.Le)==null||t.call(this)}},_I=300,HI=class{constructor(t){this.Vt=gr();let e=()=>{let r=gr();r!==this.Vt&&(this.Vt=r,t())};this.Ht=setInterval(e,_I);let n=hd("popstate",e);this.Oe=()=>{n()}}close(){var t;this.Ht&&clearInterval(this.Ht),(t=this.Oe)==null||t.call(this)}},zI=class{constructor(t,e,n,r,i,o=s=>new HI(s)){this._=e,this.Un=r,this.Fn=i,this.ft=[],this.Ce=!1,this.pt=`${n}/sdk/goals/${t}`,this.Pe=o(()=>{this.Bt()})}async initialize(){await this.Mn(),this.Bt()}startTracking(){this.Ce=!0,this.Bt()}Bt(){var t;this.Ce&&((t=this.zt)==null||t.close(),this.ft&&this.ft.length&&(this.zt=new KI(this.ft,e=>{this.Fn(gr(),e)})))}async Mn(){try{let t=await this._.fetch(this.pt);this.ft=await t.json()}catch(t){this.Un(new Lp(`Encountered error fetching goals: ${t}`))}}close(){var t,e;(t=this.Pe)==null||t.close(),(e=this.zt)==null||e.close()}};function BI(t){return t.kind==="click"}var jI=2,pd={fetchGoals:!0,eventUrlTransformer:t=>t,streaming:void 0,plugins:[]},QI={fetchGoals:V.Boolean,eventUrlTransformer:V.Function,streaming:V.Boolean,plugins:V.createTypeArray("LDPlugin",{})};function $I(t){var e;let n=ot({},t);return(e=n.flushInterval)!=null||(n.flushInterval=jI),n}function qI(t){let e=$I(t);return Object.keys(pd).forEach(n=>{delete e[n]}),e}function tT(t,e){let n=ot({},pd);return Object.entries(QI).forEach(r=>{let[i,o]=r,s=t[i];s!==void 0&&(o.is(s)?n[i]=s:e.warn(xt.wrongOptionType(i,o.getType(),typeof s)))}),n}var eT=class{constructor(t,e){switch(this.jn=t,this.Ie=[],e){case"sha1":this.Gt="SHA-1";break;case"sha256":this.Gt="SHA-256";break;default:throw new Error(`Algorithm is not supported ${e}`)}}async asyncDigest(t){let e=this.Ie.join(""),n=new TextEncoder().encode(e),r=await this.jn.subtle.digest(this.Gt,n);switch(t){case"base64":return btoa(String.fromCharCode(...new Uint8Array(r)));case"hex":return[...new Uint8Array(r)].map(i=>i.toString(16).padStart(2,"0")).join("");default:throw new Error(`Encoding is not supported ${t}`)}}update(t){return this.Ie.push(t),this}},nT={start:0,end:3},rT={start:4,end:5},Xa={start:6,end:7},Wa={start:8,end:8},iT={start:9,end:9},oT={start:10,end:15};function sT(){if(crypto&&crypto.getRandomValues){let e=new Uint8Array(16);return crypto.getRandomValues(e),[...e.values()]}let t=[];for(let e=0;e<16;e+=1)t.push(Math.floor(Math.random()*256));return t}function Vn(t,e){let n="";for(let r=e.start;r<=e.end;r+=1)n+=t[r].toString(16).padStart(2,"0");return n}function aT(t){return t[Wa.start]=(t[Wa.start]|128)&191,t[Xa.start]=t[Xa.start]&15|64,`${Vn(t,nT)}-${Vn(t,rT)}-${Vn(t,Xa)}-${Vn(t,Wa)}${Vn(t,iT)}-${Vn(t,oT)}`}function lT(){let t=sT();return aT(t)}function cT(){return typeof crypto!==void 0&&typeof crypto.randomUUID=="function"?crypto.randomUUID():lT()}var uT=class{createHash(t){return new eT(UI(),t)}randomUUID(){return cT()}};function hT(t){let e=Array.from(t,n=>String.fromCodePoint(n)).join("");return btoa(e)}var pT=class{btoa(t){return hT(new TextEncoder().encode(t))}},dT=class{constructor(t){this.e=t}platformData(){return{name:"JS"}}sdkData(){let t={name:"@launchdarkly/js-client-sdk",version:"4.4.1",userAgentBase:"JSClient"};return this.e.wrapperName&&(t.wrapperName=this.e.wrapperName),this.e.wrapperVersion&&(t.wrapperVersion=this.e.wrapperVersion),t}},fT=class{constructor(t,e){this.pt=t,this.n={},this.C=new Xw(e.initialRetryDelayMillis,e.retryResetIntervalMillis),this.Ae=e.errorFilter,this.Te()}Te(){this.K=new EventSource(this.pt),this.K.onopen=()=>{var t;this.C.success(),(t=this.onopen)==null||t.call(this)},this.K.onerror=t=>{var e;this.Ts(t),(e=this.onerror)==null||e.call(this,t)},Object.entries(this.n).forEach(([t,e])=>{e.forEach(n=>{var r;(r=this.K)==null||r.addEventListener(t,n)})})}addEventListener(t,e){var n,r,i;(r=(n=this.n)[t])!=null||(n[t]=[]),this.n[t].push(e),(i=this.K)==null||i.addEventListener(t,e)}close(){var t,e;clearTimeout(this.Kt),this.Kt=void 0,(t=this.K)==null||t.close(),(e=this.onclose)==null||e.call(this)}Vn(t){var e;(e=this.onretrying)==null||e.call(this,{delayMillis:t}),this.Kt=setTimeout(()=>{this.Te()},t)}Ts(t){this.close(),!(typeof t.status=="number"&&!this.Ae(t))&&this.Vn(this.C.fail())}},mT=class{fetch(t,e){return fetch(t,e)}createEventSource(t,e){return new fT(t,e)}getEventSourceCapabilities(){return{customMethod:!1,readTimeout:!1,headers:!1}}};function dd(){return typeof localStorage!="undefined"}function yT(){if(!dd())return[];let t=[];for(let e=0;e<localStorage.length;e+=1){let n=localStorage.key(e);n&&t.push(n)}return t}var gT=class{constructor(t){this.t=t}async clear(t){var e;try{localStorage.removeItem(t)}catch(n){(e=this.t)==null||e.error(`Error clearing key from localStorage: ${t}, reason: ${n}`)}}async get(t){var e;try{let n=localStorage.getItem(t);return n!=null?n:null}catch(n){return(e=this.t)==null||e.error(`Error getting key from localStorage: ${t}, reason: ${n}`),null}}async set(t,e){var n;try{localStorage.setItem(t,e)}catch(r){(n=this.t)==null||n.error(`Error setting key in localStorage: ${t}, reason: ${r}`)}}},bT=class{constructor(t,e){this.encoding=new pT,this.crypto=new uT,this.requests=new mT,dd()&&(this.storage=new gT(t)),this.info=new dT(e)}},vT=class extends RI{constructor(t,e,n={},r){var i;let{logger:o,debug:s}=n,a=o!=null?o:new Da({destination:{debug:console.debug,info:console.info,warn:console.warn,error:console.error},level:s?"debug":"info"}),c=(i=n.baseUri)!=null?i:"https://clientsdk.launchdarkly.com",l=r!=null?r:new bT(a,n),u=tT(n,a),h=qI(ye(ot({},n),{logger:a})),{eventUrlTransformer:p}=u,f=ZI(t);super(t,e,l,h,(m,d,v,g,w)=>new AI(l,m,t,d,u,f.polling,f.streaming,v,g,w),{getLegacyStorageKeys:()=>yT().filter(m=>m.startsWith(`ld:${t}:`)),analyticsEventPath:`/events/bulk/${t}`,diagnosticEventPath:`/events/diagnostic/${t}`,includeAuthorizationHeader:!1,highTimeoutThreshold:5,userAgentHeaderName:"x-launchdarkly-user-agent",dataSystemDefaults:xS,trackEventModifier:m=>new fe.InputCustomEvent(m.context,m.key,m.data,m.metricValue,m.samplingRatio,p(gr())),getImplementationHooks:m=>fe.safeGetHooks(a,m,u.plugins),credentialType:"clientSideId"}),this.setEventSendingEnabled(!0,!1),this.Wt=u.plugins,u.fetchGoals&&(this.qt=new zI(t,l.requests,c,m=>{a.error(m.message)},(m,d)=>{let v=this.getInternalContext();if(!v)return;let g=p(m);BI(d)?this.sendEvent({kind:"click",url:g,samplingRatio:1,key:d.key,creationDate:Date.now(),context:v,selector:d.selector}):this.sendEvent({kind:"pageview",url:g,samplingRatio:1,key:d.key,creationDate:Date.now(),context:v})}),this.qt.initialize(),u.automaticBackgroundHandling&&JI(()=>this.flush()))}registerPlugins(t){fe.safeRegisterPlugins(this.logger,this.environmentMetadata,t,this.Wt||[]);let e=this.getDebugOverrides();e&&CI(this.logger,e,this.Wt||[])}setInitialContext(t){this.Jt=t}async identify(t,e){return super.identify(t,e)}async identifyResult(t,e){var n;if(!this.X)return this.logger.error("Client must be started before it can identify a context, did you forget to call start()?"),{status:"error",error:new Error("Identify called before start")};let r=ot({},e);(e==null?void 0:e.sheddable)===void 0&&(r.sheddable=!0);let i=await super.identifyResult(t,r);return(n=this.qt)==null||n.startTracking(),i}start(t){var e,n;if(this.initializeResult)return Promise.resolve(this.initializeResult);if(this.X)return this.X;if(!this.Jt)return this.logger.error("Initial context not set"),Promise.resolve({status:"failed",error:new Error("Initial context not set")});let r=ye(ot({},(e=t==null?void 0:t.identifyOptions)!=null?e:{}),{sheddable:!1});if(t!=null&&t.bootstrap&&!r.bootstrap&&(r.bootstrap=t.bootstrap),r!=null&&r.bootstrap)try{r.bootstrapParsed||(r.bootstrapParsed=cd(this.logger,r.bootstrap)),this.presetFlags(r.bootstrapParsed)}catch(i){this.logger.error("Failed to bootstrap data",i)}return this.initializedPromise||(this.initializedPromise=new Promise(i=>{this.initResolve=i})),this.X=this.promiseWithTimeout(this.initializedPromise,(n=t==null?void 0:t.timeout)!=null?n:5),this.identifyResult(this.Jt,r),this.X}setStreaming(t){this.dataManager.setForcedStreaming(t)}$e(){let t=this.dataManager,e=this.emitter.eventNames().some(n=>n.startsWith("change:")||n==="change");t.setAutomaticStreamingState(e)}on(t,e){super.on(t,e),this.$e()}off(t,e){super.off(t,e),this.$e()}};function wT(t,e,n,r={},i){let o=new vT(t,n,r,i);o.setInitialContext(e);let s={variation:(a,c)=>o.variation(a,c),variationDetail:(a,c)=>o.variationDetail(a,c),boolVariation:(a,c)=>o.boolVariation(a,c),boolVariationDetail:(a,c)=>o.boolVariationDetail(a,c),numberVariation:(a,c)=>o.numberVariation(a,c),numberVariationDetail:(a,c)=>o.numberVariationDetail(a,c),stringVariation:(a,c)=>o.stringVariation(a,c),stringVariationDetail:(a,c)=>o.stringVariationDetail(a,c),jsonVariation:(a,c)=>o.jsonVariation(a,c),jsonVariationDetail:(a,c)=>o.jsonVariationDetail(a,c),track:(a,c,l)=>o.track(a,c,l),on:(a,c)=>o.on(a,c),off:(a,c)=>o.off(a,c),flush:()=>o.flush(),setStreaming:a=>o.setStreaming(a),identify:(a,c)=>o.identifyResult(a,c),getContext:()=>o.getContext(),close:()=>o.close(),allFlags:()=>o.allFlags(),addHook:a=>o.addHook(a),waitForInitialization:a=>o.waitForInitialization(a),logger:o.logger,start:a=>o.start(a)};return o.registerPlugins(s),s}function bA(t){return new Da(t)}function fd(t,e,n){return wT(t,e,Di.Disabled,n)}var ST=Object.defineProperty,IT=(t,e,n)=>e in t?ST(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Re=(t,e,n)=>IT(t,typeof e!="symbol"?e+"":e,n),TT=(t,e,n)=>new Promise((r,i)=>{var o=c=>{try{a(n.next(c))}catch(l){i(l)}},s=c=>{try{a(n.throw(c))}catch(l){i(l)}},a=c=>c.done?r(c.value):Promise.resolve(c.value).then(o,s);a((n=n.apply(t,e)).next())}),xe=(t,e,...n)=>{let r=`[@launchdarkly plugins]: (${t}): `;console[e].apply(console,[r,...n]),ET(r,...n)},ET=(t,...e)=>TT(void 0,null,function*(){try{let{LDObserve:n}=yield Promise.resolve().then(()=>VR);n.recordLog(`${t}${e}`,"warn")}catch(n){}}),RT=class{constructor(t,e){Re(this,"debug"),Re(this,"name"),this.debug=t,this.name=e}log(...t){if(this.debug){let e=`[${Date.now()}]`;this.name&&(e+=` - ${this.name}`),console.log.apply(console,[e,...t])}}warn(...t){let e=`[${Date.now()}]`;this.name&&(e+=` - ${this.name}`),console.warn.apply(console,[e,...t])}},Io=class{constructor(){Re(this,"_sdk"),Re(this,"_isLoaded",!1),Re(this,"_callBuffer",[]),Re(this,"_capacity",1e5),Re(this,"_droppedEvents",0),Re(this,"_exceededCapacity",!1),Re(this,"_logger",new RT)}p(e,n){if(this.yr)try{return this.Xr[e](...n)}catch(r){xe(`Error executing buffered call to ${e}:`,"error",r)}else{this.Ei({method:e,args:n});return}}Ei(e){this.sr.length<this.Es?(this.sr.push(e),this.Wr=!1):(this.Wr||(this.Wr=!0,xe("Exceeded event queue capacity. Increase capacity to avoid dropping events.","warn")),this.Rs+=1)}load(e){this.Xr=e,this.yr=!0;for(let{method:n,args:r}of this.sr)try{this.Xr[n](...r)}catch(i){xe(`Error executing buffered call to ${n}:`,"error",i)}this.sr=[]}},CT=Object.defineProperty,ZT=Object.defineProperties,kT=Object.getOwnPropertyDescriptors,To=Object.getOwnPropertySymbols,$f=Object.prototype.hasOwnProperty,qf=Object.prototype.propertyIsEnumerable,Gl=(t,e,n)=>e in t?CT(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,j=(t,e)=>{for(var n in e||(e={}))$f.call(e,n)&&Gl(t,n,e[n]);if(To)for(var n of To(e))qf.call(e,n)&&Gl(t,n,e[n]);return t},Jn=(t,e)=>ZT(t,kT(e)),Nr=(t,e)=>{var n={};for(var r in t)$f.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&To)for(var r of To(t))e.indexOf(r)<0&&qf.call(t,r)&&(n[r]=t[r]);return n},Pr=(t,e,n)=>Gl(t,typeof e!="symbol"?e+"":e,n),Yn=(t,e,n)=>new Promise((r,i)=>{var o=c=>{try{a(n.next(c))}catch(l){i(l)}},s=c=>{try{a(n.throw(c))}catch(l){i(l)}},a=c=>c.done?r(c.value):Promise.resolve(c.value).then(o,s);a((n=n.apply(t,e)).next())});function VT(t,e){for(var n=0;n<e.length;n++){let r=e[n];if(typeof r!="string"&&!Array.isArray(r)){for(let i in r)if(i!=="default"&&!(i in t)){let o=Object.getOwnPropertyDescriptor(r,i);o&&Object.defineProperty(t,i,o.get?o:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}function ho(t,e){throw new Error(e)}function xT(t){return typeof t=="object"&&t!==null}function OT(t,e){throw new Error("Unexpected invariant triggered.")}var NT=/\r\n|[\n\r]/g;function Ll(t,e){let n=0,r=1;for(let i of t.body.matchAll(NT)){if(typeof i.index=="number"||OT(),i.index>=e)break;n=i.index+i[0].length,r+=1}return{line:r,column:e+1-n}}function GT(t){return tm(t.source,Ll(t.source,t.start))}function tm(t,e){let n=t.locationOffset.column-1,r="".padStart(n)+t.body,i=e.line-1,o=t.locationOffset.line-1,s=e.line+o,a=e.line===1?n:0,c=e.column+a,l=`${t.name}:${s}:${c}
349
+ `,u=r.split(/\r\n|[\n\r]/g),h=u[i];if(h.length>120){let p=Math.floor(c/80),f=c%80,m=[];for(let d=0;d<h.length;d+=80)m.push(h.slice(d,d+80));return l+md([[`${s} |`,m[0]],...m.slice(1,p+1).map(d=>["|",d]),["|","^".padStart(f)],["|",m[p+1]]])}return l+md([[`${s-1} |`,u[i-1]],[`${s} |`,h],["|","^".padStart(c)],[`${s+1} |`,u[i+1]]])}function md(t){let e=t.filter(([r,i])=>i!==void 0),n=Math.max(...e.map(([r])=>r.length));return e.map(([r,i])=>r.padStart(n)+(i?" "+i:"")).join(`
350
+ `)}function LT(t){let e=t[0];return e==null||"kind"in e||"length"in e?{nodes:e,source:t[1],positions:t[2],path:t[3],originalError:t[4],extensions:t[5]}:e}var XT=class em extends Error{constructor(e,...n){var r,i,o;let{nodes:s,source:a,positions:c,path:l,originalError:u,extensions:h}=LT(n);super(e),this.name="GraphQLError",this.path=l!=null?l:void 0,this.originalError=u!=null?u:void 0,this.nodes=yd(Array.isArray(s)?s:s?[s]:void 0);let p=yd((r=this.nodes)===null||r===void 0?void 0:r.map(m=>m.loc).filter(m=>m!=null));this.source=a!=null?a:p==null||(i=p[0])===null||i===void 0?void 0:i.source,this.positions=c!=null?c:p==null?void 0:p.map(m=>m.start),this.locations=c&&a?c.map(m=>Ll(a,m)):p==null?void 0:p.map(m=>Ll(m.source,m.start));let f=xT(u==null?void 0:u.extensions)?u==null?void 0:u.extensions:void 0;this.extensions=(o=h!=null?h:f)!==null&&o!==void 0?o:Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),u!=null&&u.stack?Object.defineProperty(this,"stack",{value:u.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,em):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let e=this.message;if(this.nodes)for(let n of this.nodes)n.loc&&(e+=`
351
351
 
352
- `+pT(n.loc));else if(this.source&&this.locations)for(let n of this.locations)e+=`
352
+ `+GT(n.loc));else if(this.source&&this.locations)for(let n of this.locations)e+=`
353
353
 
354
- `+Jf(this.source,n);return e}toJSON(){let e={message:this.message};return this.locations!=null&&(e.locations=this.locations),this.path!=null&&(e.path=this.path),this.extensions!=null&&Object.keys(this.extensions).length>0&&(e.extensions=this.extensions),e}};function id(t){return t===void 0||t.length===0?void 0:t}function Ct(t,e,n){return new fT(`Syntax Error: ${n}`,{source:t,positions:[e]})}var mT=class{constructor(t,e,n){this.start=t.start,this.end=e.end,this.startToken=t,this.endToken=e,this.source=n}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}},Yf=class{constructor(t,e,n,r,i,o){this.kind=t,this.start=e,this.end=n,this.line=r,this.column=i,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}}},Kf={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"]},yT=new Set(Object.keys(Kf));function od(t){let e=t==null?void 0:t.kind;return typeof e=="string"&&yT.has(e)}var Mn;(function(t){t.QUERY="query",t.MUTATION="mutation",t.SUBSCRIPTION="subscription"})(Mn||(Mn={}));var Vl;(function(t){t.QUERY="QUERY",t.MUTATION="MUTATION",t.SUBSCRIPTION="SUBSCRIPTION",t.FIELD="FIELD",t.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",t.FRAGMENT_SPREAD="FRAGMENT_SPREAD",t.INLINE_FRAGMENT="INLINE_FRAGMENT",t.VARIABLE_DEFINITION="VARIABLE_DEFINITION",t.SCHEMA="SCHEMA",t.SCALAR="SCALAR",t.OBJECT="OBJECT",t.FIELD_DEFINITION="FIELD_DEFINITION",t.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",t.INTERFACE="INTERFACE",t.UNION="UNION",t.ENUM="ENUM",t.ENUM_VALUE="ENUM_VALUE",t.INPUT_OBJECT="INPUT_OBJECT",t.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION"})(Vl||(Vl={}));var F;(function(t){t.NAME="Name",t.DOCUMENT="Document",t.OPERATION_DEFINITION="OperationDefinition",t.VARIABLE_DEFINITION="VariableDefinition",t.SELECTION_SET="SelectionSet",t.FIELD="Field",t.ARGUMENT="Argument",t.FRAGMENT_SPREAD="FragmentSpread",t.INLINE_FRAGMENT="InlineFragment",t.FRAGMENT_DEFINITION="FragmentDefinition",t.VARIABLE="Variable",t.INT="IntValue",t.FLOAT="FloatValue",t.STRING="StringValue",t.BOOLEAN="BooleanValue",t.NULL="NullValue",t.ENUM="EnumValue",t.LIST="ListValue",t.OBJECT="ObjectValue",t.OBJECT_FIELD="ObjectField",t.DIRECTIVE="Directive",t.NAMED_TYPE="NamedType",t.LIST_TYPE="ListType",t.NON_NULL_TYPE="NonNullType",t.SCHEMA_DEFINITION="SchemaDefinition",t.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",t.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",t.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",t.FIELD_DEFINITION="FieldDefinition",t.INPUT_VALUE_DEFINITION="InputValueDefinition",t.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",t.UNION_TYPE_DEFINITION="UnionTypeDefinition",t.ENUM_TYPE_DEFINITION="EnumTypeDefinition",t.ENUM_VALUE_DEFINITION="EnumValueDefinition",t.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",t.DIRECTIVE_DEFINITION="DirectiveDefinition",t.SCHEMA_EXTENSION="SchemaExtension",t.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",t.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",t.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",t.UNION_TYPE_EXTENSION="UnionTypeExtension",t.ENUM_TYPE_EXTENSION="EnumTypeExtension",t.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension"})(F||(F={}));function xl(t){return t===9||t===32}function Ur(t){return t>=48&&t<=57}function _f(t){return t>=97&&t<=122||t>=65&&t<=90}function Hf(t){return _f(t)||t===95}function gT(t){return _f(t)||Ur(t)||t===95}function bT(t){var e;let n=Number.MAX_SAFE_INTEGER,r=null,i=-1;for(let s=0;s<t.length;++s){var o;let a=t[s],c=vT(a);c!==a.length&&(r=(o=r)!==null&&o!==void 0?o:s,i=s,s!==0&&c<n&&(n=c))}return t.map((s,a)=>a===0?s:s.slice(n)).slice((e=r)!==null&&e!==void 0?e:0,i+1)}function vT(t){let e=0;for(;e<t.length&&xl(t.charCodeAt(e));)++e;return e}function wT(t,e){let n=t.replace(/"""/g,'\\"""'),r=n.split(/\r\n|[\n\r]/g),i=r.length===1,o=r.length>1&&r.slice(1).every(f=>f.length===0||xl(f.charCodeAt(0))),s=n.endsWith('\\"""'),a=t.endsWith('"')&&!s,c=t.endsWith("\\"),l=a||c,u=!i||t.length>70||l||o||s,h="",p=i&&xl(t.charCodeAt(0));return(u&&!p||o)&&(h+=`
354
+ `+tm(this.source,n);return e}toJSON(){let e={message:this.message};return this.locations!=null&&(e.locations=this.locations),this.path!=null&&(e.path=this.path),this.extensions!=null&&Object.keys(this.extensions).length>0&&(e.extensions=this.extensions),e}};function yd(t){return t===void 0||t.length===0?void 0:t}function Ct(t,e,n){return new XT(`Syntax Error: ${n}`,{source:t,positions:[e]})}var WT=class{constructor(t,e,n){this.start=t.start,this.end=e.end,this.startToken=t,this.endToken=e,this.source=n}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}},nm=class{constructor(t,e,n,r,i,o){this.kind=t,this.start=e,this.end=n,this.line=r,this.column=i,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}}},rm={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"]},UT=new Set(Object.keys(rm));function gd(t){let e=t==null?void 0:t.kind;return typeof e=="string"&&UT.has(e)}var Fn;(function(t){t.QUERY="query",t.MUTATION="mutation",t.SUBSCRIPTION="subscription"})(Fn||(Fn={}));var Xl;(function(t){t.QUERY="QUERY",t.MUTATION="MUTATION",t.SUBSCRIPTION="SUBSCRIPTION",t.FIELD="FIELD",t.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",t.FRAGMENT_SPREAD="FRAGMENT_SPREAD",t.INLINE_FRAGMENT="INLINE_FRAGMENT",t.VARIABLE_DEFINITION="VARIABLE_DEFINITION",t.SCHEMA="SCHEMA",t.SCALAR="SCALAR",t.OBJECT="OBJECT",t.FIELD_DEFINITION="FIELD_DEFINITION",t.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",t.INTERFACE="INTERFACE",t.UNION="UNION",t.ENUM="ENUM",t.ENUM_VALUE="ENUM_VALUE",t.INPUT_OBJECT="INPUT_OBJECT",t.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION"})(Xl||(Xl={}));var F;(function(t){t.NAME="Name",t.DOCUMENT="Document",t.OPERATION_DEFINITION="OperationDefinition",t.VARIABLE_DEFINITION="VariableDefinition",t.SELECTION_SET="SelectionSet",t.FIELD="Field",t.ARGUMENT="Argument",t.FRAGMENT_SPREAD="FragmentSpread",t.INLINE_FRAGMENT="InlineFragment",t.FRAGMENT_DEFINITION="FragmentDefinition",t.VARIABLE="Variable",t.INT="IntValue",t.FLOAT="FloatValue",t.STRING="StringValue",t.BOOLEAN="BooleanValue",t.NULL="NullValue",t.ENUM="EnumValue",t.LIST="ListValue",t.OBJECT="ObjectValue",t.OBJECT_FIELD="ObjectField",t.DIRECTIVE="Directive",t.NAMED_TYPE="NamedType",t.LIST_TYPE="ListType",t.NON_NULL_TYPE="NonNullType",t.SCHEMA_DEFINITION="SchemaDefinition",t.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",t.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",t.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",t.FIELD_DEFINITION="FieldDefinition",t.INPUT_VALUE_DEFINITION="InputValueDefinition",t.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",t.UNION_TYPE_DEFINITION="UnionTypeDefinition",t.ENUM_TYPE_DEFINITION="EnumTypeDefinition",t.ENUM_VALUE_DEFINITION="EnumValueDefinition",t.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",t.DIRECTIVE_DEFINITION="DirectiveDefinition",t.SCHEMA_EXTENSION="SchemaExtension",t.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",t.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",t.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",t.UNION_TYPE_EXTENSION="UnionTypeExtension",t.ENUM_TYPE_EXTENSION="EnumTypeExtension",t.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension"})(F||(F={}));function Wl(t){return t===9||t===32}function Mr(t){return t>=48&&t<=57}function im(t){return t>=97&&t<=122||t>=65&&t<=90}function om(t){return im(t)||t===95}function PT(t){return im(t)||Mr(t)||t===95}function MT(t){var e;let n=Number.MAX_SAFE_INTEGER,r=null,i=-1;for(let s=0;s<t.length;++s){var o;let a=t[s],c=FT(a);c!==a.length&&(r=(o=r)!==null&&o!==void 0?o:s,i=s,s!==0&&c<n&&(n=c))}return t.map((s,a)=>a===0?s:s.slice(n)).slice((e=r)!==null&&e!==void 0?e:0,i+1)}function FT(t){let e=0;for(;e<t.length&&Wl(t.charCodeAt(e));)++e;return e}function AT(t,e){let n=t.replace(/"""/g,'\\"""'),r=n.split(/\r\n|[\n\r]/g),i=r.length===1,o=r.length>1&&r.slice(1).every(f=>f.length===0||Wl(f.charCodeAt(0))),s=n.endsWith('\\"""'),a=t.endsWith('"')&&!s,c=t.endsWith("\\"),l=a||c,u=!i||t.length>70||l||o||s,h="",p=i&&Wl(t.charCodeAt(0));return(u&&!p||o)&&(h+=`
355
355
  `),h+=n,(u||l)&&(h+=`
356
- `),'"""'+h+'"""'}var S;(function(t){t.SOF="<SOF>",t.EOF="<EOF>",t.BANG="!",t.DOLLAR="$",t.AMP="&",t.PAREN_L="(",t.PAREN_R=")",t.SPREAD="...",t.COLON=":",t.EQUALS="=",t.AT="@",t.BRACKET_L="[",t.BRACKET_R="]",t.BRACE_L="{",t.PIPE="|",t.BRACE_R="}",t.NAME="Name",t.INT="Int",t.FLOAT="Float",t.STRING="String",t.BLOCK_STRING="BlockString",t.COMMENT="Comment"})(S||(S={}));var ST=class{constructor(t){let e=new Yf(S.SOF,0,0,0,0);this.source=t,this.lastToken=e,this.token=e,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!==S.EOF)do if(t.next)t=t.next;else{let e=TT(this,t.end);t.next=e,e.prev=t,t=e}while(t.kind===S.COMMENT);return t}};function IT(t){return t===S.BANG||t===S.DOLLAR||t===S.AMP||t===S.PAREN_L||t===S.PAREN_R||t===S.SPREAD||t===S.COLON||t===S.EQUALS||t===S.AT||t===S.BRACKET_L||t===S.BRACKET_R||t===S.BRACE_L||t===S.PIPE||t===S.BRACE_R}function Hn(t){return t>=0&&t<=55295||t>=57344&&t<=1114111}function Mo(t,e){return zf(t.charCodeAt(e))&&Bf(t.charCodeAt(e+1))}function zf(t){return t>=55296&&t<=56319}function Bf(t){return t>=56320&&t<=57343}function hn(t,e){let n=t.source.body.codePointAt(e);if(n===void 0)return S.EOF;if(n>=32&&n<=126){let r=String.fromCodePoint(n);return r==='"'?`'"'`:`"${r}"`}return"U+"+n.toString(16).toUpperCase().padStart(4,"0")}function It(t,e,n,r,i){let o=t.line,s=1+n-t.lineStart;return new Yf(e,n,r,o,s,i)}function TT(t,e){let n=t.source.body,r=n.length,i=e;for(;i<r;){let o=n.charCodeAt(i);switch(o){case 65279:case 9:case 32:case 44:++i;continue;case 10:++i,++t.line,t.lineStart=i;continue;case 13:n.charCodeAt(i+1)===10?i+=2:++i,++t.line,t.lineStart=i;continue;case 35:return ET(t,i);case 33:return It(t,S.BANG,i,i+1);case 36:return It(t,S.DOLLAR,i,i+1);case 38:return It(t,S.AMP,i,i+1);case 40:return It(t,S.PAREN_L,i,i+1);case 41:return It(t,S.PAREN_R,i,i+1);case 46:if(n.charCodeAt(i+1)===46&&n.charCodeAt(i+2)===46)return It(t,S.SPREAD,i,i+3);break;case 58:return It(t,S.COLON,i,i+1);case 61:return It(t,S.EQUALS,i,i+1);case 64:return It(t,S.AT,i,i+1);case 91:return It(t,S.BRACKET_L,i,i+1);case 93:return It(t,S.BRACKET_R,i,i+1);case 123:return It(t,S.BRACE_L,i,i+1);case 124:return It(t,S.PIPE,i,i+1);case 125:return It(t,S.BRACE_R,i,i+1);case 34:return n.charCodeAt(i+1)===34&&n.charCodeAt(i+2)===34?xT(t,i):CT(t,i)}if(Ur(o)||o===45)return RT(t,i,o);if(Hf(o))return NT(t,i);throw Ct(t.source,i,o===39?`Unexpected single quote character ('), did you mean to use a double quote (")?`:Hn(o)||Mo(n,i)?`Unexpected character: ${hn(t,i)}.`:`Invalid character: ${hn(t,i)}.`)}return It(t,S.EOF,r,r)}function ET(t,e){let n=t.source.body,r=n.length,i=e+1;for(;i<r;){let o=n.charCodeAt(i);if(o===10||o===13)break;if(Hn(o))++i;else if(Mo(n,i))i+=2;else break}return It(t,S.COMMENT,e,i,n.slice(e+1,i))}function RT(t,e,n){let r=t.source.body,i=e,o=n,s=!1;if(o===45&&(o=r.charCodeAt(++i)),o===48){if(o=r.charCodeAt(++i),Ur(o))throw Ct(t.source,i,`Invalid number, unexpected digit after 0: ${hn(t,i)}.`)}else i=Ka(t,i,o),o=r.charCodeAt(i);if(o===46&&(s=!0,o=r.charCodeAt(++i),i=Ka(t,i,o),o=r.charCodeAt(i)),(o===69||o===101)&&(s=!0,o=r.charCodeAt(++i),(o===43||o===45)&&(o=r.charCodeAt(++i)),i=Ka(t,i,o),o=r.charCodeAt(i)),o===46||Hf(o))throw Ct(t.source,i,`Invalid number, expected digit but got: ${hn(t,i)}.`);return It(t,s?S.FLOAT:S.INT,e,i,r.slice(e,i))}function Ka(t,e,n){if(!Ur(n))throw Ct(t.source,e,`Invalid number, expected digit but got: ${hn(t,e)}.`);let r=t.source.body,i=e+1;for(;Ur(r.charCodeAt(i));)++i;return i}function CT(t,e){let n=t.source.body,r=n.length,i=e+1,o=i,s="";for(;i<r;){let a=n.charCodeAt(i);if(a===34)return s+=n.slice(o,i),It(t,S.STRING,e,i+1,s);if(a===92){s+=n.slice(o,i);let c=n.charCodeAt(i+1)===117?n.charCodeAt(i+2)===123?ZT(t,i):kT(t,i):VT(t,i);s+=c.value,i+=c.size,o=i;continue}if(a===10||a===13)break;if(Hn(a))++i;else if(Mo(n,i))i+=2;else throw Ct(t.source,i,`Invalid character within String: ${hn(t,i)}.`)}throw Ct(t.source,i,"Unterminated string.")}function ZT(t,e){let n=t.source.body,r=0,i=3;for(;i<12;){let o=n.charCodeAt(e+i++);if(o===125){if(i<5||!Hn(r))break;return{value:String.fromCodePoint(r),size:i}}if(r=r<<4|kr(o),r<0)break}throw Ct(t.source,e,`Invalid Unicode escape sequence: "${n.slice(e,e+i)}".`)}function kT(t,e){let n=t.source.body,r=sd(n,e+2);if(Hn(r))return{value:String.fromCodePoint(r),size:6};if(zf(r)&&n.charCodeAt(e+6)===92&&n.charCodeAt(e+7)===117){let i=sd(n,e+8);if(Bf(i))return{value:String.fromCodePoint(r,i),size:12}}throw Ct(t.source,e,`Invalid Unicode escape sequence: "${n.slice(e,e+6)}".`)}function sd(t,e){return kr(t.charCodeAt(e))<<12|kr(t.charCodeAt(e+1))<<8|kr(t.charCodeAt(e+2))<<4|kr(t.charCodeAt(e+3))}function kr(t){return t>=48&&t<=57?t-48:t>=65&&t<=70?t-55:t>=97&&t<=102?t-87:-1}function VT(t,e){let n=t.source.body;switch(n.charCodeAt(e+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:`
357
- `,size:2};case 114:return{value:"\r",size:2};case 116:return{value:" ",size:2}}throw Ct(t.source,e,`Invalid character escape sequence: "${n.slice(e,e+2)}".`)}function xT(t,e){let n=t.source.body,r=n.length,i=t.lineStart,o=e+3,s=o,a="",c=[];for(;o<r;){let l=n.charCodeAt(o);if(l===34&&n.charCodeAt(o+1)===34&&n.charCodeAt(o+2)===34){a+=n.slice(s,o),c.push(a);let u=It(t,S.BLOCK_STRING,e,o+3,bT(c).join(`
358
- `));return t.line+=c.length-1,t.lineStart=i,u}if(l===92&&n.charCodeAt(o+1)===34&&n.charCodeAt(o+2)===34&&n.charCodeAt(o+3)===34){a+=n.slice(s,o),s=o+1,o+=4;continue}if(l===10||l===13){a+=n.slice(s,o),c.push(a),l===13&&n.charCodeAt(o+1)===10?o+=2:++o,a="",s=o,i=o;continue}if(Hn(l))++o;else if(Mo(n,o))o+=2;else throw Ct(t.source,o,`Invalid character within String: ${hn(t,o)}.`)}throw Ct(t.source,o,"Unterminated string.")}function NT(t,e){let n=t.source.body,r=n.length,i=e+1;for(;i<r;){let o=n.charCodeAt(i);if(gT(o))++i;else break}return It(t,S.NAME,e,i,n.slice(e,i))}var OT=10,jf=2;function ac(t){return Fo(t,[])}function Fo(t,e){switch(typeof t){case"string":return JSON.stringify(t);case"function":return t.name?`[function ${t.name}]`:"[function]";case"object":return GT(t,e);default:return String(t)}}function GT(t,e){if(t===null)return"null";if(e.includes(t))return"[Circular]";let n=[...e,t];if(LT(t)){let r=t.toJSON();if(r!==t)return typeof r=="string"?r:Fo(r,n)}else if(Array.isArray(t))return WT(t,n);return XT(t,n)}function LT(t){return typeof t.toJSON=="function"}function XT(t,e){let n=Object.entries(t);return n.length===0?"{}":e.length>jf?"["+UT(t)+"]":"{ "+n.map(([r,i])=>r+": "+Fo(i,e)).join(", ")+" }"}function WT(t,e){if(t.length===0)return"[]";if(e.length>jf)return"[Array]";let n=Math.min(OT,t.length),r=t.length-n,i=[];for(let o=0;o<n;++o)i.push(Fo(t[o],e));return r===1?i.push("... 1 more item"):r>1&&i.push(`... ${r} more items`),"["+i.join(", ")+"]"}function UT(t){let e=Object.prototype.toString.call(t).replace(/^\[object /,"").replace(/]$/,"");if(e==="Object"&&typeof t.constructor=="function"){let n=t.constructor.name;if(typeof n=="string"&&n!=="")return n}return e}var PT=globalThis.process&&globalThis.process.env.NODE_ENV==="production"?function(t,e){return t instanceof e}:function(t,e){if(t instanceof e)return!0;if(typeof t=="object"&&t!==null){var n;let r=e.prototype[Symbol.toStringTag],i=Symbol.toStringTag in t?t[Symbol.toStringTag]:(n=t.constructor)===null||n===void 0?void 0:n.name;if(r===i){let o=ac(t);throw new Error(`Cannot use ${r} "${o}" from another module or realm.
356
+ `),'"""'+h+'"""'}var S;(function(t){t.SOF="<SOF>",t.EOF="<EOF>",t.BANG="!",t.DOLLAR="$",t.AMP="&",t.PAREN_L="(",t.PAREN_R=")",t.SPREAD="...",t.COLON=":",t.EQUALS="=",t.AT="@",t.BRACKET_L="[",t.BRACKET_R="]",t.BRACE_L="{",t.PIPE="|",t.BRACE_R="}",t.NAME="Name",t.INT="Int",t.FLOAT="Float",t.STRING="String",t.BLOCK_STRING="BlockString",t.COMMENT="Comment"})(S||(S={}));var JT=class{constructor(t){let e=new nm(S.SOF,0,0,0,0);this.source=t,this.lastToken=e,this.token=e,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!==S.EOF)do if(t.next)t=t.next;else{let e=YT(this,t.end);t.next=e,e.prev=t,t=e}while(t.kind===S.COMMENT);return t}};function DT(t){return t===S.BANG||t===S.DOLLAR||t===S.AMP||t===S.PAREN_L||t===S.PAREN_R||t===S.SPREAD||t===S.COLON||t===S.EQUALS||t===S.AT||t===S.BRACKET_L||t===S.BRACKET_R||t===S.BRACE_L||t===S.PIPE||t===S.BRACE_R}function zn(t){return t>=0&&t<=55295||t>=57344&&t<=1114111}function Jo(t,e){return sm(t.charCodeAt(e))&&am(t.charCodeAt(e+1))}function sm(t){return t>=55296&&t<=56319}function am(t){return t>=56320&&t<=57343}function pn(t,e){let n=t.source.body.codePointAt(e);if(n===void 0)return S.EOF;if(n>=32&&n<=126){let r=String.fromCodePoint(n);return r==='"'?`'"'`:`"${r}"`}return"U+"+n.toString(16).toUpperCase().padStart(4,"0")}function It(t,e,n,r,i){let o=t.line,s=1+n-t.lineStart;return new nm(e,n,r,o,s,i)}function YT(t,e){let n=t.source.body,r=n.length,i=e;for(;i<r;){let o=n.charCodeAt(i);switch(o){case 65279:case 9:case 32:case 44:++i;continue;case 10:++i,++t.line,t.lineStart=i;continue;case 13:n.charCodeAt(i+1)===10?i+=2:++i,++t.line,t.lineStart=i;continue;case 35:return KT(t,i);case 33:return It(t,S.BANG,i,i+1);case 36:return It(t,S.DOLLAR,i,i+1);case 38:return It(t,S.AMP,i,i+1);case 40:return It(t,S.PAREN_L,i,i+1);case 41:return It(t,S.PAREN_R,i,i+1);case 46:if(n.charCodeAt(i+1)===46&&n.charCodeAt(i+2)===46)return It(t,S.SPREAD,i,i+3);break;case 58:return It(t,S.COLON,i,i+1);case 61:return It(t,S.EQUALS,i,i+1);case 64:return It(t,S.AT,i,i+1);case 91:return It(t,S.BRACKET_L,i,i+1);case 93:return It(t,S.BRACKET_R,i,i+1);case 123:return It(t,S.BRACE_L,i,i+1);case 124:return It(t,S.PIPE,i,i+1);case 125:return It(t,S.BRACE_R,i,i+1);case 34:return n.charCodeAt(i+1)===34&&n.charCodeAt(i+2)===34?QT(t,i):HT(t,i)}if(Mr(o)||o===45)return _T(t,i,o);if(om(o))return $T(t,i);throw Ct(t.source,i,o===39?`Unexpected single quote character ('), did you mean to use a double quote (")?`:zn(o)||Jo(n,i)?`Unexpected character: ${pn(t,i)}.`:`Invalid character: ${pn(t,i)}.`)}return It(t,S.EOF,r,r)}function KT(t,e){let n=t.source.body,r=n.length,i=e+1;for(;i<r;){let o=n.charCodeAt(i);if(o===10||o===13)break;if(zn(o))++i;else if(Jo(n,i))i+=2;else break}return It(t,S.COMMENT,e,i,n.slice(e+1,i))}function _T(t,e,n){let r=t.source.body,i=e,o=n,s=!1;if(o===45&&(o=r.charCodeAt(++i)),o===48){if(o=r.charCodeAt(++i),Mr(o))throw Ct(t.source,i,`Invalid number, unexpected digit after 0: ${pn(t,i)}.`)}else i=Qa(t,i,o),o=r.charCodeAt(i);if(o===46&&(s=!0,o=r.charCodeAt(++i),i=Qa(t,i,o),o=r.charCodeAt(i)),(o===69||o===101)&&(s=!0,o=r.charCodeAt(++i),(o===43||o===45)&&(o=r.charCodeAt(++i)),i=Qa(t,i,o),o=r.charCodeAt(i)),o===46||om(o))throw Ct(t.source,i,`Invalid number, expected digit but got: ${pn(t,i)}.`);return It(t,s?S.FLOAT:S.INT,e,i,r.slice(e,i))}function Qa(t,e,n){if(!Mr(n))throw Ct(t.source,e,`Invalid number, expected digit but got: ${pn(t,e)}.`);let r=t.source.body,i=e+1;for(;Mr(r.charCodeAt(i));)++i;return i}function HT(t,e){let n=t.source.body,r=n.length,i=e+1,o=i,s="";for(;i<r;){let a=n.charCodeAt(i);if(a===34)return s+=n.slice(o,i),It(t,S.STRING,e,i+1,s);if(a===92){s+=n.slice(o,i);let c=n.charCodeAt(i+1)===117?n.charCodeAt(i+2)===123?zT(t,i):BT(t,i):jT(t,i);s+=c.value,i+=c.size,o=i;continue}if(a===10||a===13)break;if(zn(a))++i;else if(Jo(n,i))i+=2;else throw Ct(t.source,i,`Invalid character within String: ${pn(t,i)}.`)}throw Ct(t.source,i,"Unterminated string.")}function zT(t,e){let n=t.source.body,r=0,i=3;for(;i<12;){let o=n.charCodeAt(e+i++);if(o===125){if(i<5||!zn(r))break;return{value:String.fromCodePoint(r),size:i}}if(r=r<<4|xr(o),r<0)break}throw Ct(t.source,e,`Invalid Unicode escape sequence: "${n.slice(e,e+i)}".`)}function BT(t,e){let n=t.source.body,r=bd(n,e+2);if(zn(r))return{value:String.fromCodePoint(r),size:6};if(sm(r)&&n.charCodeAt(e+6)===92&&n.charCodeAt(e+7)===117){let i=bd(n,e+8);if(am(i))return{value:String.fromCodePoint(r,i),size:12}}throw Ct(t.source,e,`Invalid Unicode escape sequence: "${n.slice(e,e+6)}".`)}function bd(t,e){return xr(t.charCodeAt(e))<<12|xr(t.charCodeAt(e+1))<<8|xr(t.charCodeAt(e+2))<<4|xr(t.charCodeAt(e+3))}function xr(t){return t>=48&&t<=57?t-48:t>=65&&t<=70?t-55:t>=97&&t<=102?t-87:-1}function jT(t,e){let n=t.source.body;switch(n.charCodeAt(e+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:`
357
+ `,size:2};case 114:return{value:"\r",size:2};case 116:return{value:" ",size:2}}throw Ct(t.source,e,`Invalid character escape sequence: "${n.slice(e,e+2)}".`)}function QT(t,e){let n=t.source.body,r=n.length,i=t.lineStart,o=e+3,s=o,a="",c=[];for(;o<r;){let l=n.charCodeAt(o);if(l===34&&n.charCodeAt(o+1)===34&&n.charCodeAt(o+2)===34){a+=n.slice(s,o),c.push(a);let u=It(t,S.BLOCK_STRING,e,o+3,MT(c).join(`
358
+ `));return t.line+=c.length-1,t.lineStart=i,u}if(l===92&&n.charCodeAt(o+1)===34&&n.charCodeAt(o+2)===34&&n.charCodeAt(o+3)===34){a+=n.slice(s,o),s=o+1,o+=4;continue}if(l===10||l===13){a+=n.slice(s,o),c.push(a),l===13&&n.charCodeAt(o+1)===10?o+=2:++o,a="",s=o,i=o;continue}if(zn(l))++o;else if(Jo(n,o))o+=2;else throw Ct(t.source,o,`Invalid character within String: ${pn(t,o)}.`)}throw Ct(t.source,o,"Unterminated string.")}function $T(t,e){let n=t.source.body,r=n.length,i=e+1;for(;i<r;){let o=n.charCodeAt(i);if(PT(o))++i;else break}return It(t,S.NAME,e,i,n.slice(e,i))}var qT=10,lm=2;function dc(t){return Do(t,[])}function Do(t,e){switch(typeof t){case"string":return JSON.stringify(t);case"function":return t.name?`[function ${t.name}]`:"[function]";case"object":return tE(t,e);default:return String(t)}}function tE(t,e){if(t===null)return"null";if(e.includes(t))return"[Circular]";let n=[...e,t];if(eE(t)){let r=t.toJSON();if(r!==t)return typeof r=="string"?r:Do(r,n)}else if(Array.isArray(t))return rE(t,n);return nE(t,n)}function eE(t){return typeof t.toJSON=="function"}function nE(t,e){let n=Object.entries(t);return n.length===0?"{}":e.length>lm?"["+iE(t)+"]":"{ "+n.map(([r,i])=>r+": "+Do(i,e)).join(", ")+" }"}function rE(t,e){if(t.length===0)return"[]";if(e.length>lm)return"[Array]";let n=Math.min(qT,t.length),r=t.length-n,i=[];for(let o=0;o<n;++o)i.push(Do(t[o],e));return r===1?i.push("... 1 more item"):r>1&&i.push(`... ${r} more items`),"["+i.join(", ")+"]"}function iE(t){let e=Object.prototype.toString.call(t).replace(/^\[object /,"").replace(/]$/,"");if(e==="Object"&&typeof t.constructor=="function"){let n=t.constructor.name;if(typeof n=="string"&&n!=="")return n}return e}var oE=globalThis.process&&globalThis.process.env.NODE_ENV==="production"?function(t,e){return t instanceof e}:function(t,e){if(t instanceof e)return!0;if(typeof t=="object"&&t!==null){var n;let r=e.prototype[Symbol.toStringTag],i=Symbol.toStringTag in t?t[Symbol.toStringTag]:(n=t.constructor)===null||n===void 0?void 0:n.name;if(r===i){let o=dc(t);throw new Error(`Cannot use ${r} "${o}" from another module or realm.
359
359
 
360
360
  Ensure that there is only one instance of "graphql" in the node_modules
361
361
  directory. If different versions of "graphql" are the dependencies of other
@@ -366,41 +366,41 @@ https://yarnpkg.com/en/docs/selective-version-resolutions
366
366
  Duplicate "graphql" modules cannot be used at the same time since different
367
367
  versions may have different capabilities and behavior. The data from one
368
368
  version used in the function from another could produce confusing and
369
- spurious results.`)}}return!1},So=class{constructor(e,n="GraphQL request",r={line:1,column:1}){typeof e=="string"||lo(!1,`Body must be a string. Received: ${ac(e)}.`),this.body=e,this.name=n,this.locationOffset=r,this.locationOffset.line>0||lo(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||lo(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}};function MT(t){return PT(t,So)}function lc(t,e){return new FT(t,e).parseDocument()}var FT=class{constructor(t,e={}){let n=MT(t)?t:new So(t);this.u=new ST(n),this.Sn=e,this.Qn=0}parseName(){let t=this.expectToken(S.NAME);return this.node(t,{kind:F.NAME,value:t.value})}parseDocument(){return this.node(this.u.token,{kind:F.DOCUMENT,definitions:this.many(S.SOF,this.parseDefinition,S.EOF)})}parseDefinition(){if(this.peek(S.BRACE_L))return this.parseOperationDefinition();let t=this.peekDescription(),e=t?this.u.lookahead():this.u.token;if(e.kind===S.NAME){switch(e.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 Ct(this.u.source,this.u.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(e.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(e)}parseOperationDefinition(){let t=this.u.token;if(this.peek(S.BRACE_L))return this.node(t,{kind:F.OPERATION_DEFINITION,operation:Mn.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});let e=this.parseOperationType(),n;return this.peek(S.NAME)&&(n=this.parseName()),this.node(t,{kind:F.OPERATION_DEFINITION,operation:e,name:n,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){let t=this.expectToken(S.NAME);switch(t.value){case"query":return Mn.QUERY;case"mutation":return Mn.MUTATION;case"subscription":return Mn.SUBSCRIPTION}throw this.unexpected(t)}parseVariableDefinitions(){return this.optionalMany(S.PAREN_L,this.parseVariableDefinition,S.PAREN_R)}parseVariableDefinition(){return this.node(this.u.token,{kind:F.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(S.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(S.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){let t=this.u.token;return this.expectToken(S.DOLLAR),this.node(t,{kind:F.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this.u.token,{kind:F.SELECTION_SET,selections:this.many(S.BRACE_L,this.parseSelection,S.BRACE_R)})}parseSelection(){return this.peek(S.SPREAD)?this.parseFragment():this.parseField()}parseField(){let t=this.u.token,e=this.parseName(),n,r;return this.expectOptionalToken(S.COLON)?(n=e,r=this.parseName()):r=e,this.node(t,{kind:F.FIELD,alias:n,name:r,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(S.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(t){let e=t?this.parseConstArgument:this.parseArgument;return this.optionalMany(S.PAREN_L,e,S.PAREN_R)}parseArgument(t=!1){let e=this.u.token,n=this.parseName();return this.expectToken(S.COLON),this.node(e,{kind:F.ARGUMENT,name:n,value:this.parseValueLiteral(t)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){let t=this.u.token;this.expectToken(S.SPREAD);let e=this.expectOptionalKeyword("on");return!e&&this.peek(S.NAME)?this.node(t,{kind:F.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(t,{kind:F.INLINE_FRAGMENT,typeCondition:e?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){let t=this.u.token;return this.expectKeyword("fragment"),this.Sn.allowLegacyFragmentVariables===!0?this.node(t,{kind:F.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:F.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if(this.u.token.value==="on")throw this.unexpected();return this.parseName()}parseValueLiteral(t){let e=this.u.token;switch(e.kind){case S.BRACKET_L:return this.parseList(t);case S.BRACE_L:return this.parseObject(t);case S.INT:return this.advanceLexer(),this.node(e,{kind:F.INT,value:e.value});case S.FLOAT:return this.advanceLexer(),this.node(e,{kind:F.FLOAT,value:e.value});case S.STRING:case S.BLOCK_STRING:return this.parseStringLiteral();case S.NAME:switch(this.advanceLexer(),e.value){case"true":return this.node(e,{kind:F.BOOLEAN,value:!0});case"false":return this.node(e,{kind:F.BOOLEAN,value:!1});case"null":return this.node(e,{kind:F.NULL});default:return this.node(e,{kind:F.ENUM,value:e.value})}case S.DOLLAR:if(t)if(this.expectToken(S.DOLLAR),this.u.token.kind===S.NAME){let n=this.u.token.value;throw Ct(this.u.source,e.start,`Unexpected variable "$${n}" in constant value.`)}else throw this.unexpected(e);return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){let t=this.u.token;return this.advanceLexer(),this.node(t,{kind:F.STRING,value:t.value,block:t.kind===S.BLOCK_STRING})}parseList(t){let e=()=>this.parseValueLiteral(t);return this.node(this.u.token,{kind:F.LIST,values:this.any(S.BRACKET_L,e,S.BRACKET_R)})}parseObject(t){let e=()=>this.parseObjectField(t);return this.node(this.u.token,{kind:F.OBJECT,fields:this.any(S.BRACE_L,e,S.BRACE_R)})}parseObjectField(t){let e=this.u.token,n=this.parseName();return this.expectToken(S.COLON),this.node(e,{kind:F.OBJECT_FIELD,name:n,value:this.parseValueLiteral(t)})}parseDirectives(t){let e=[];for(;this.peek(S.AT);)e.push(this.parseDirective(t));return e}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(t){let e=this.u.token;return this.expectToken(S.AT),this.node(e,{kind:F.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(t)})}parseTypeReference(){let t=this.u.token,e;if(this.expectOptionalToken(S.BRACKET_L)){let n=this.parseTypeReference();this.expectToken(S.BRACKET_R),e=this.node(t,{kind:F.LIST_TYPE,type:n})}else e=this.parseNamedType();return this.expectOptionalToken(S.BANG)?this.node(t,{kind:F.NON_NULL_TYPE,type:e}):e}parseNamedType(){return this.node(this.u.token,{kind:F.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(S.STRING)||this.peek(S.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){let t=this.u.token,e=this.parseDescription();this.expectKeyword("schema");let n=this.parseConstDirectives(),r=this.many(S.BRACE_L,this.parseOperationTypeDefinition,S.BRACE_R);return this.node(t,{kind:F.SCHEMA_DEFINITION,description:e,directives:n,operationTypes:r})}parseOperationTypeDefinition(){let t=this.u.token,e=this.parseOperationType();this.expectToken(S.COLON);let n=this.parseNamedType();return this.node(t,{kind:F.OPERATION_TYPE_DEFINITION,operation:e,type:n})}parseScalarTypeDefinition(){let t=this.u.token,e=this.parseDescription();this.expectKeyword("scalar");let n=this.parseName(),r=this.parseConstDirectives();return this.node(t,{kind:F.SCALAR_TYPE_DEFINITION,description:e,name:n,directives:r})}parseObjectTypeDefinition(){let t=this.u.token,e=this.parseDescription();this.expectKeyword("type");let n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(t,{kind:F.OBJECT_TYPE_DEFINITION,description:e,name:n,interfaces:r,directives:i,fields:o})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(S.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(S.BRACE_L,this.parseFieldDefinition,S.BRACE_R)}parseFieldDefinition(){let t=this.u.token,e=this.parseDescription(),n=this.parseName(),r=this.parseArgumentDefs();this.expectToken(S.COLON);let i=this.parseTypeReference(),o=this.parseConstDirectives();return this.node(t,{kind:F.FIELD_DEFINITION,description:e,name:n,arguments:r,type:i,directives:o})}parseArgumentDefs(){return this.optionalMany(S.PAREN_L,this.parseInputValueDef,S.PAREN_R)}parseInputValueDef(){let t=this.u.token,e=this.parseDescription(),n=this.parseName();this.expectToken(S.COLON);let r=this.parseTypeReference(),i;this.expectOptionalToken(S.EQUALS)&&(i=this.parseConstValueLiteral());let o=this.parseConstDirectives();return this.node(t,{kind:F.INPUT_VALUE_DEFINITION,description:e,name:n,type:r,defaultValue:i,directives:o})}parseInterfaceTypeDefinition(){let t=this.u.token,e=this.parseDescription();this.expectKeyword("interface");let n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(t,{kind:F.INTERFACE_TYPE_DEFINITION,description:e,name:n,interfaces:r,directives:i,fields:o})}parseUnionTypeDefinition(){let t=this.u.token,e=this.parseDescription();this.expectKeyword("union");let n=this.parseName(),r=this.parseConstDirectives(),i=this.parseUnionMemberTypes();return this.node(t,{kind:F.UNION_TYPE_DEFINITION,description:e,name:n,directives:r,types:i})}parseUnionMemberTypes(){return this.expectOptionalToken(S.EQUALS)?this.delimitedMany(S.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){let t=this.u.token,e=this.parseDescription();this.expectKeyword("enum");let n=this.parseName(),r=this.parseConstDirectives(),i=this.parseEnumValuesDefinition();return this.node(t,{kind:F.ENUM_TYPE_DEFINITION,description:e,name:n,directives:r,values:i})}parseEnumValuesDefinition(){return this.optionalMany(S.BRACE_L,this.parseEnumValueDefinition,S.BRACE_R)}parseEnumValueDefinition(){let t=this.u.token,e=this.parseDescription(),n=this.parseEnumValueName(),r=this.parseConstDirectives();return this.node(t,{kind:F.ENUM_VALUE_DEFINITION,description:e,name:n,directives:r})}parseEnumValueName(){if(this.u.token.value==="true"||this.u.token.value==="false"||this.u.token.value==="null")throw Ct(this.u.source,this.u.token.start,`${Hi(this.u.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){let t=this.u.token,e=this.parseDescription();this.expectKeyword("input");let n=this.parseName(),r=this.parseConstDirectives(),i=this.parseInputFieldsDefinition();return this.node(t,{kind:F.INPUT_OBJECT_TYPE_DEFINITION,description:e,name:n,directives:r,fields:i})}parseInputFieldsDefinition(){return this.optionalMany(S.BRACE_L,this.parseInputValueDef,S.BRACE_R)}parseTypeSystemExtension(){let t=this.u.lookahead();if(t.kind===S.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(){let t=this.u.token;this.expectKeyword("extend"),this.expectKeyword("schema");let e=this.parseConstDirectives(),n=this.optionalMany(S.BRACE_L,this.parseOperationTypeDefinition,S.BRACE_R);if(e.length===0&&n.length===0)throw this.unexpected();return this.node(t,{kind:F.SCHEMA_EXTENSION,directives:e,operationTypes:n})}parseScalarTypeExtension(){let t=this.u.token;this.expectKeyword("extend"),this.expectKeyword("scalar");let e=this.parseName(),n=this.parseConstDirectives();if(n.length===0)throw this.unexpected();return this.node(t,{kind:F.SCALAR_TYPE_EXTENSION,name:e,directives:n})}parseObjectTypeExtension(){let t=this.u.token;this.expectKeyword("extend"),this.expectKeyword("type");let e=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),i=this.parseFieldsDefinition();if(n.length===0&&r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:F.OBJECT_TYPE_EXTENSION,name:e,interfaces:n,directives:r,fields:i})}parseInterfaceTypeExtension(){let t=this.u.token;this.expectKeyword("extend"),this.expectKeyword("interface");let e=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),i=this.parseFieldsDefinition();if(n.length===0&&r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:F.INTERFACE_TYPE_EXTENSION,name:e,interfaces:n,directives:r,fields:i})}parseUnionTypeExtension(){let t=this.u.token;this.expectKeyword("extend"),this.expectKeyword("union");let e=this.parseName(),n=this.parseConstDirectives(),r=this.parseUnionMemberTypes();if(n.length===0&&r.length===0)throw this.unexpected();return this.node(t,{kind:F.UNION_TYPE_EXTENSION,name:e,directives:n,types:r})}parseEnumTypeExtension(){let t=this.u.token;this.expectKeyword("extend"),this.expectKeyword("enum");let e=this.parseName(),n=this.parseConstDirectives(),r=this.parseEnumValuesDefinition();if(n.length===0&&r.length===0)throw this.unexpected();return this.node(t,{kind:F.ENUM_TYPE_EXTENSION,name:e,directives:n,values:r})}parseInputObjectTypeExtension(){let t=this.u.token;this.expectKeyword("extend"),this.expectKeyword("input");let e=this.parseName(),n=this.parseConstDirectives(),r=this.parseInputFieldsDefinition();if(n.length===0&&r.length===0)throw this.unexpected();return this.node(t,{kind:F.INPUT_OBJECT_TYPE_EXTENSION,name:e,directives:n,fields:r})}parseDirectiveDefinition(){let t=this.u.token,e=this.parseDescription();this.expectKeyword("directive"),this.expectToken(S.AT);let n=this.parseName(),r=this.parseArgumentDefs(),i=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");let o=this.parseDirectiveLocations();return this.node(t,{kind:F.DIRECTIVE_DEFINITION,description:e,name:n,arguments:r,repeatable:i,locations:o})}parseDirectiveLocations(){return this.delimitedMany(S.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){let t=this.u.token,e=this.parseName();if(Object.prototype.hasOwnProperty.call(Vl,e.value))return e;throw this.unexpected(t)}node(t,e){return this.Sn.noLocation!==!0&&(e.loc=new mT(t,this.u.lastToken,this.u.source)),e}peek(t){return this.u.token.kind===t}expectToken(t){let e=this.u.token;if(e.kind===t)return this.advanceLexer(),e;throw Ct(this.u.source,e.start,`Expected ${Qf(t)}, found ${Hi(e)}.`)}expectOptionalToken(t){return this.u.token.kind===t?(this.advanceLexer(),!0):!1}expectKeyword(t){let e=this.u.token;if(e.kind===S.NAME&&e.value===t)this.advanceLexer();else throw Ct(this.u.source,e.start,`Expected "${t}", found ${Hi(e)}.`)}expectOptionalKeyword(t){let e=this.u.token;return e.kind===S.NAME&&e.value===t?(this.advanceLexer(),!0):!1}unexpected(t){let e=t!=null?t:this.u.token;return Ct(this.u.source,e.start,`Unexpected ${Hi(e)}.`)}any(t,e,n){this.expectToken(t);let r=[];for(;!this.expectOptionalToken(n);)r.push(e.call(this));return r}optionalMany(t,e,n){if(this.expectOptionalToken(t)){let r=[];do r.push(e.call(this));while(!this.expectOptionalToken(n));return r}return[]}many(t,e,n){this.expectToken(t);let r=[];do r.push(e.call(this));while(!this.expectOptionalToken(n));return r}delimitedMany(t,e){this.expectOptionalToken(t);let n=[];do n.push(e.call(this));while(this.expectOptionalToken(t));return n}advanceLexer(){let{maxTokens:t}=this.Sn,e=this.u.advance();if(t!==void 0&&e.kind!==S.EOF&&(++this.Qn,this.Qn>t))throw Ct(this.u.source,e.start,`Document contains more that ${t} tokens. Parsing aborted.`)}};function Hi(t){let e=t.value;return Qf(t.kind)+(e!=null?` "${e}"`:"")}function Qf(t){return IT(t)?`"${t}"`:t}function AT(t){return`"${t.replace(JT,DT)}"`}var JT=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function DT(t){return YT[t.charCodeAt(0)]}var YT=["\\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"],KT=Object.freeze({});function _T(t,e,n=Kf){let r=new Map;for(let g of Object.values(F))r.set(g,HT(e,g));let i,o=Array.isArray(t),s=[t],a=-1,c=[],l=t,u,h,p=[],f=[];do{a++;let g=a===s.length,w=g&&c.length!==0;if(g){if(u=f.length===0?void 0:p[p.length-1],l=h,h=f.pop(),w)if(o){l=l.slice();let E=0;for(let[T,V]of c){let N=T-E;V===null?(l.splice(N,1),E++):l[N]=V}}else{l=Object.defineProperties({},Object.getOwnPropertyDescriptors(l));for(let[E,T]of c)l[E]=T}a=i.index,s=i.keys,c=i.edits,o=i.inArray,i=i.prev}else if(h){if(u=o?a:s[a],l=h[u],l==null)continue;p.push(u)}let R;if(!Array.isArray(l)){var m,d;od(l)||lo(!1,`Invalid AST Node: ${ac(l)}.`);let E=g?(m=r.get(l.kind))===null||m===void 0?void 0:m.leave:(d=r.get(l.kind))===null||d===void 0?void 0:d.enter;if(R=E==null?void 0:E.call(e,l,u,h,p,f),R===KT)break;if(R===!1){if(!g){p.pop();continue}}else if(R!==void 0&&(c.push([u,R]),!g))if(od(R))l=R;else{p.pop();continue}}if(R===void 0&&w&&c.push([u,l]),g)p.pop();else{var v;i={inArray:o,index:a,keys:s,edits:c,prev:i},o=Array.isArray(l),s=o?l:(v=n[l.kind])!==null&&v!==void 0?v:[],a=-1,c=[],h&&f.push(h),h=l}}while(i!==void 0);return c.length!==0?c[c.length-1][1]:t}function HT(t,e){let n=t[e];return typeof n=="object"?n:typeof n=="function"?{enter:n,leave:void 0}:{enter:t.enter,leave:t.leave}}function zT(t){return _T(t,jT)}var BT=80,jT={Name:{leave:t=>t.value},Variable:{leave:t=>"$"+t.name},Document:{leave:t=>L(t.definitions,`
369
+ spurious results.`)}}return!1},Eo=class{constructor(e,n="GraphQL request",r={line:1,column:1}){typeof e=="string"||ho(!1,`Body must be a string. Received: ${dc(e)}.`),this.body=e,this.name=n,this.locationOffset=r,this.locationOffset.line>0||ho(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||ho(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}};function sE(t){return oE(t,Eo)}function fc(t,e){return new aE(t,e).parseDocument()}var aE=class{constructor(t,e={}){let n=sE(t)?t:new Eo(t);this.l=new JT(n),this.ar=e,this.Ur=0}parseName(){let t=this.expectToken(S.NAME);return this.node(t,{kind:F.NAME,value:t.value})}parseDocument(){return this.node(this.l.token,{kind:F.DOCUMENT,definitions:this.many(S.SOF,this.parseDefinition,S.EOF)})}parseDefinition(){if(this.peek(S.BRACE_L))return this.parseOperationDefinition();let t=this.peekDescription(),e=t?this.l.lookahead():this.l.token;if(e.kind===S.NAME){switch(e.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 Ct(this.l.source,this.l.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(e.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(e)}parseOperationDefinition(){let t=this.l.token;if(this.peek(S.BRACE_L))return this.node(t,{kind:F.OPERATION_DEFINITION,operation:Fn.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});let e=this.parseOperationType(),n;return this.peek(S.NAME)&&(n=this.parseName()),this.node(t,{kind:F.OPERATION_DEFINITION,operation:e,name:n,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){let t=this.expectToken(S.NAME);switch(t.value){case"query":return Fn.QUERY;case"mutation":return Fn.MUTATION;case"subscription":return Fn.SUBSCRIPTION}throw this.unexpected(t)}parseVariableDefinitions(){return this.optionalMany(S.PAREN_L,this.parseVariableDefinition,S.PAREN_R)}parseVariableDefinition(){return this.node(this.l.token,{kind:F.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(S.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(S.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){let t=this.l.token;return this.expectToken(S.DOLLAR),this.node(t,{kind:F.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this.l.token,{kind:F.SELECTION_SET,selections:this.many(S.BRACE_L,this.parseSelection,S.BRACE_R)})}parseSelection(){return this.peek(S.SPREAD)?this.parseFragment():this.parseField()}parseField(){let t=this.l.token,e=this.parseName(),n,r;return this.expectOptionalToken(S.COLON)?(n=e,r=this.parseName()):r=e,this.node(t,{kind:F.FIELD,alias:n,name:r,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(S.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(t){let e=t?this.parseConstArgument:this.parseArgument;return this.optionalMany(S.PAREN_L,e,S.PAREN_R)}parseArgument(t=!1){let e=this.l.token,n=this.parseName();return this.expectToken(S.COLON),this.node(e,{kind:F.ARGUMENT,name:n,value:this.parseValueLiteral(t)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){let t=this.l.token;this.expectToken(S.SPREAD);let e=this.expectOptionalKeyword("on");return!e&&this.peek(S.NAME)?this.node(t,{kind:F.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(t,{kind:F.INLINE_FRAGMENT,typeCondition:e?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){let t=this.l.token;return this.expectKeyword("fragment"),this.ar.allowLegacyFragmentVariables===!0?this.node(t,{kind:F.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:F.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if(this.l.token.value==="on")throw this.unexpected();return this.parseName()}parseValueLiteral(t){let e=this.l.token;switch(e.kind){case S.BRACKET_L:return this.parseList(t);case S.BRACE_L:return this.parseObject(t);case S.INT:return this.advanceLexer(),this.node(e,{kind:F.INT,value:e.value});case S.FLOAT:return this.advanceLexer(),this.node(e,{kind:F.FLOAT,value:e.value});case S.STRING:case S.BLOCK_STRING:return this.parseStringLiteral();case S.NAME:switch(this.advanceLexer(),e.value){case"true":return this.node(e,{kind:F.BOOLEAN,value:!0});case"false":return this.node(e,{kind:F.BOOLEAN,value:!1});case"null":return this.node(e,{kind:F.NULL});default:return this.node(e,{kind:F.ENUM,value:e.value})}case S.DOLLAR:if(t)if(this.expectToken(S.DOLLAR),this.l.token.kind===S.NAME){let n=this.l.token.value;throw Ct(this.l.source,e.start,`Unexpected variable "$${n}" in constant value.`)}else throw this.unexpected(e);return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){let t=this.l.token;return this.advanceLexer(),this.node(t,{kind:F.STRING,value:t.value,block:t.kind===S.BLOCK_STRING})}parseList(t){let e=()=>this.parseValueLiteral(t);return this.node(this.l.token,{kind:F.LIST,values:this.any(S.BRACKET_L,e,S.BRACKET_R)})}parseObject(t){let e=()=>this.parseObjectField(t);return this.node(this.l.token,{kind:F.OBJECT,fields:this.any(S.BRACE_L,e,S.BRACE_R)})}parseObjectField(t){let e=this.l.token,n=this.parseName();return this.expectToken(S.COLON),this.node(e,{kind:F.OBJECT_FIELD,name:n,value:this.parseValueLiteral(t)})}parseDirectives(t){let e=[];for(;this.peek(S.AT);)e.push(this.parseDirective(t));return e}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(t){let e=this.l.token;return this.expectToken(S.AT),this.node(e,{kind:F.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(t)})}parseTypeReference(){let t=this.l.token,e;if(this.expectOptionalToken(S.BRACKET_L)){let n=this.parseTypeReference();this.expectToken(S.BRACKET_R),e=this.node(t,{kind:F.LIST_TYPE,type:n})}else e=this.parseNamedType();return this.expectOptionalToken(S.BANG)?this.node(t,{kind:F.NON_NULL_TYPE,type:e}):e}parseNamedType(){return this.node(this.l.token,{kind:F.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(S.STRING)||this.peek(S.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){let t=this.l.token,e=this.parseDescription();this.expectKeyword("schema");let n=this.parseConstDirectives(),r=this.many(S.BRACE_L,this.parseOperationTypeDefinition,S.BRACE_R);return this.node(t,{kind:F.SCHEMA_DEFINITION,description:e,directives:n,operationTypes:r})}parseOperationTypeDefinition(){let t=this.l.token,e=this.parseOperationType();this.expectToken(S.COLON);let n=this.parseNamedType();return this.node(t,{kind:F.OPERATION_TYPE_DEFINITION,operation:e,type:n})}parseScalarTypeDefinition(){let t=this.l.token,e=this.parseDescription();this.expectKeyword("scalar");let n=this.parseName(),r=this.parseConstDirectives();return this.node(t,{kind:F.SCALAR_TYPE_DEFINITION,description:e,name:n,directives:r})}parseObjectTypeDefinition(){let t=this.l.token,e=this.parseDescription();this.expectKeyword("type");let n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(t,{kind:F.OBJECT_TYPE_DEFINITION,description:e,name:n,interfaces:r,directives:i,fields:o})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(S.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(S.BRACE_L,this.parseFieldDefinition,S.BRACE_R)}parseFieldDefinition(){let t=this.l.token,e=this.parseDescription(),n=this.parseName(),r=this.parseArgumentDefs();this.expectToken(S.COLON);let i=this.parseTypeReference(),o=this.parseConstDirectives();return this.node(t,{kind:F.FIELD_DEFINITION,description:e,name:n,arguments:r,type:i,directives:o})}parseArgumentDefs(){return this.optionalMany(S.PAREN_L,this.parseInputValueDef,S.PAREN_R)}parseInputValueDef(){let t=this.l.token,e=this.parseDescription(),n=this.parseName();this.expectToken(S.COLON);let r=this.parseTypeReference(),i;this.expectOptionalToken(S.EQUALS)&&(i=this.parseConstValueLiteral());let o=this.parseConstDirectives();return this.node(t,{kind:F.INPUT_VALUE_DEFINITION,description:e,name:n,type:r,defaultValue:i,directives:o})}parseInterfaceTypeDefinition(){let t=this.l.token,e=this.parseDescription();this.expectKeyword("interface");let n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(t,{kind:F.INTERFACE_TYPE_DEFINITION,description:e,name:n,interfaces:r,directives:i,fields:o})}parseUnionTypeDefinition(){let t=this.l.token,e=this.parseDescription();this.expectKeyword("union");let n=this.parseName(),r=this.parseConstDirectives(),i=this.parseUnionMemberTypes();return this.node(t,{kind:F.UNION_TYPE_DEFINITION,description:e,name:n,directives:r,types:i})}parseUnionMemberTypes(){return this.expectOptionalToken(S.EQUALS)?this.delimitedMany(S.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){let t=this.l.token,e=this.parseDescription();this.expectKeyword("enum");let n=this.parseName(),r=this.parseConstDirectives(),i=this.parseEnumValuesDefinition();return this.node(t,{kind:F.ENUM_TYPE_DEFINITION,description:e,name:n,directives:r,values:i})}parseEnumValuesDefinition(){return this.optionalMany(S.BRACE_L,this.parseEnumValueDefinition,S.BRACE_R)}parseEnumValueDefinition(){let t=this.l.token,e=this.parseDescription(),n=this.parseEnumValueName(),r=this.parseConstDirectives();return this.node(t,{kind:F.ENUM_VALUE_DEFINITION,description:e,name:n,directives:r})}parseEnumValueName(){if(this.l.token.value==="true"||this.l.token.value==="false"||this.l.token.value==="null")throw Ct(this.l.source,this.l.token.start,`${ji(this.l.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){let t=this.l.token,e=this.parseDescription();this.expectKeyword("input");let n=this.parseName(),r=this.parseConstDirectives(),i=this.parseInputFieldsDefinition();return this.node(t,{kind:F.INPUT_OBJECT_TYPE_DEFINITION,description:e,name:n,directives:r,fields:i})}parseInputFieldsDefinition(){return this.optionalMany(S.BRACE_L,this.parseInputValueDef,S.BRACE_R)}parseTypeSystemExtension(){let t=this.l.lookahead();if(t.kind===S.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(){let t=this.l.token;this.expectKeyword("extend"),this.expectKeyword("schema");let e=this.parseConstDirectives(),n=this.optionalMany(S.BRACE_L,this.parseOperationTypeDefinition,S.BRACE_R);if(e.length===0&&n.length===0)throw this.unexpected();return this.node(t,{kind:F.SCHEMA_EXTENSION,directives:e,operationTypes:n})}parseScalarTypeExtension(){let t=this.l.token;this.expectKeyword("extend"),this.expectKeyword("scalar");let e=this.parseName(),n=this.parseConstDirectives();if(n.length===0)throw this.unexpected();return this.node(t,{kind:F.SCALAR_TYPE_EXTENSION,name:e,directives:n})}parseObjectTypeExtension(){let t=this.l.token;this.expectKeyword("extend"),this.expectKeyword("type");let e=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),i=this.parseFieldsDefinition();if(n.length===0&&r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:F.OBJECT_TYPE_EXTENSION,name:e,interfaces:n,directives:r,fields:i})}parseInterfaceTypeExtension(){let t=this.l.token;this.expectKeyword("extend"),this.expectKeyword("interface");let e=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),i=this.parseFieldsDefinition();if(n.length===0&&r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:F.INTERFACE_TYPE_EXTENSION,name:e,interfaces:n,directives:r,fields:i})}parseUnionTypeExtension(){let t=this.l.token;this.expectKeyword("extend"),this.expectKeyword("union");let e=this.parseName(),n=this.parseConstDirectives(),r=this.parseUnionMemberTypes();if(n.length===0&&r.length===0)throw this.unexpected();return this.node(t,{kind:F.UNION_TYPE_EXTENSION,name:e,directives:n,types:r})}parseEnumTypeExtension(){let t=this.l.token;this.expectKeyword("extend"),this.expectKeyword("enum");let e=this.parseName(),n=this.parseConstDirectives(),r=this.parseEnumValuesDefinition();if(n.length===0&&r.length===0)throw this.unexpected();return this.node(t,{kind:F.ENUM_TYPE_EXTENSION,name:e,directives:n,values:r})}parseInputObjectTypeExtension(){let t=this.l.token;this.expectKeyword("extend"),this.expectKeyword("input");let e=this.parseName(),n=this.parseConstDirectives(),r=this.parseInputFieldsDefinition();if(n.length===0&&r.length===0)throw this.unexpected();return this.node(t,{kind:F.INPUT_OBJECT_TYPE_EXTENSION,name:e,directives:n,fields:r})}parseDirectiveDefinition(){let t=this.l.token,e=this.parseDescription();this.expectKeyword("directive"),this.expectToken(S.AT);let n=this.parseName(),r=this.parseArgumentDefs(),i=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");let o=this.parseDirectiveLocations();return this.node(t,{kind:F.DIRECTIVE_DEFINITION,description:e,name:n,arguments:r,repeatable:i,locations:o})}parseDirectiveLocations(){return this.delimitedMany(S.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){let t=this.l.token,e=this.parseName();if(Object.prototype.hasOwnProperty.call(Xl,e.value))return e;throw this.unexpected(t)}node(t,e){return this.ar.noLocation!==!0&&(e.loc=new WT(t,this.l.lastToken,this.l.source)),e}peek(t){return this.l.token.kind===t}expectToken(t){let e=this.l.token;if(e.kind===t)return this.advanceLexer(),e;throw Ct(this.l.source,e.start,`Expected ${cm(t)}, found ${ji(e)}.`)}expectOptionalToken(t){return this.l.token.kind===t?(this.advanceLexer(),!0):!1}expectKeyword(t){let e=this.l.token;if(e.kind===S.NAME&&e.value===t)this.advanceLexer();else throw Ct(this.l.source,e.start,`Expected "${t}", found ${ji(e)}.`)}expectOptionalKeyword(t){let e=this.l.token;return e.kind===S.NAME&&e.value===t?(this.advanceLexer(),!0):!1}unexpected(t){let e=t!=null?t:this.l.token;return Ct(this.l.source,e.start,`Unexpected ${ji(e)}.`)}any(t,e,n){this.expectToken(t);let r=[];for(;!this.expectOptionalToken(n);)r.push(e.call(this));return r}optionalMany(t,e,n){if(this.expectOptionalToken(t)){let r=[];do r.push(e.call(this));while(!this.expectOptionalToken(n));return r}return[]}many(t,e,n){this.expectToken(t);let r=[];do r.push(e.call(this));while(!this.expectOptionalToken(n));return r}delimitedMany(t,e){this.expectOptionalToken(t);let n=[];do n.push(e.call(this));while(this.expectOptionalToken(t));return n}advanceLexer(){let{maxTokens:t}=this.ar,e=this.l.advance();if(t!==void 0&&e.kind!==S.EOF&&(++this.Ur,this.Ur>t))throw Ct(this.l.source,e.start,`Document contains more that ${t} tokens. Parsing aborted.`)}};function ji(t){let e=t.value;return cm(t.kind)+(e!=null?` "${e}"`:"")}function cm(t){return DT(t)?`"${t}"`:t}function lE(t){return`"${t.replace(cE,uE)}"`}var cE=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function uE(t){return hE[t.charCodeAt(0)]}var hE=["\\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"],pE=Object.freeze({});function dE(t,e,n=rm){let r=new Map;for(let g of Object.values(F))r.set(g,fE(e,g));let i,o=Array.isArray(t),s=[t],a=-1,c=[],l=t,u,h,p=[],f=[];do{a++;let g=a===s.length,w=g&&c.length!==0;if(g){if(u=f.length===0?void 0:p[p.length-1],l=h,h=f.pop(),w)if(o){l=l.slice();let E=0;for(let[T,x]of c){let N=T-E;x===null?(l.splice(N,1),E++):l[N]=x}}else{l=Object.defineProperties({},Object.getOwnPropertyDescriptors(l));for(let[E,T]of c)l[E]=T}a=i.index,s=i.keys,c=i.edits,o=i.inArray,i=i.prev}else if(h){if(u=o?a:s[a],l=h[u],l==null)continue;p.push(u)}let R;if(!Array.isArray(l)){var m,d;gd(l)||ho(!1,`Invalid AST Node: ${dc(l)}.`);let E=g?(m=r.get(l.kind))===null||m===void 0?void 0:m.leave:(d=r.get(l.kind))===null||d===void 0?void 0:d.enter;if(R=E==null?void 0:E.call(e,l,u,h,p,f),R===pE)break;if(R===!1){if(!g){p.pop();continue}}else if(R!==void 0&&(c.push([u,R]),!g))if(gd(R))l=R;else{p.pop();continue}}if(R===void 0&&w&&c.push([u,l]),g)p.pop();else{var v;i={inArray:o,index:a,keys:s,edits:c,prev:i},o=Array.isArray(l),s=o?l:(v=n[l.kind])!==null&&v!==void 0?v:[],a=-1,c=[],h&&f.push(h),h=l}}while(i!==void 0);return c.length!==0?c[c.length-1][1]:t}function fE(t,e){let n=t[e];return typeof n=="object"?n:typeof n=="function"?{enter:n,leave:void 0}:{enter:t.enter,leave:t.leave}}function mE(t){return dE(t,gE)}var yE=80,gE={Name:{leave:t=>t.value},Variable:{leave:t=>"$"+t.name},Document:{leave:t=>L(t.definitions,`
370
370
 
371
- `)},OperationDefinition:{leave(t){let e=B("(",L(t.variableDefinitions,", "),")"),n=L([t.operation,L([t.name,e]),L(t.directives," ")]," ");return(n==="query"?"":n+" ")+t.selectionSet}},VariableDefinition:{leave:({variable:t,type:e,defaultValue:n,directives:r})=>t+": "+e+B(" = ",n)+B(" ",L(r," "))},SelectionSet:{leave:({selections:t})=>oe(t)},Field:{leave({alias:t,name:e,arguments:n,directives:r,selectionSet:i}){let o=B("",t,": ")+e,s=o+B("(",L(n,", "),")");return s.length>BT&&(s=o+B(`(
372
- `,co(L(n,`
371
+ `)},OperationDefinition:{leave(t){let e=B("(",L(t.variableDefinitions,", "),")"),n=L([t.operation,L([t.name,e]),L(t.directives," ")]," ");return(n==="query"?"":n+" ")+t.selectionSet}},VariableDefinition:{leave:({variable:t,type:e,defaultValue:n,directives:r})=>t+": "+e+B(" = ",n)+B(" ",L(r," "))},SelectionSet:{leave:({selections:t})=>ae(t)},Field:{leave({alias:t,name:e,arguments:n,directives:r,selectionSet:i}){let o=B("",t,": ")+e,s=o+B("(",L(n,", "),")");return s.length>yE&&(s=o+B(`(
372
+ `,po(L(n,`
373
373
  `)),`
374
- )`)),L([s,L(r," "),i]," ")}},Argument:{leave:({name:t,value:e})=>t+": "+e},FragmentSpread:{leave:({name:t,directives:e})=>"..."+t+B(" ",L(e," "))},InlineFragment:{leave:({typeCondition:t,directives:e,selectionSet:n})=>L(["...",B("on ",t),L(e," "),n]," ")},FragmentDefinition:{leave:({name:t,typeCondition:e,variableDefinitions:n,directives:r,selectionSet:i})=>`fragment ${t}${B("(",L(n,", "),")")} on ${e} ${B("",L(r," ")," ")}`+i},IntValue:{leave:({value:t})=>t},FloatValue:{leave:({value:t})=>t},StringValue:{leave:({value:t,block:e})=>e?wT(t):AT(t)},BooleanValue:{leave:({value:t})=>t?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:t})=>t},ListValue:{leave:({values:t})=>"["+L(t,", ")+"]"},ObjectValue:{leave:({fields:t})=>"{"+L(t,", ")+"}"},ObjectField:{leave:({name:t,value:e})=>t+": "+e},Directive:{leave:({name:t,arguments:e})=>"@"+t+B("(",L(e,", "),")")},NamedType:{leave:({name:t})=>t},ListType:{leave:({type:t})=>"["+t+"]"},NonNullType:{leave:({type:t})=>t+"!"},SchemaDefinition:{leave:({description:t,directives:e,operationTypes:n})=>B("",t,`
375
- `)+L(["schema",L(e," "),oe(n)]," ")},OperationTypeDefinition:{leave:({operation:t,type:e})=>t+": "+e},ScalarTypeDefinition:{leave:({description:t,name:e,directives:n})=>B("",t,`
374
+ )`)),L([s,L(r," "),i]," ")}},Argument:{leave:({name:t,value:e})=>t+": "+e},FragmentSpread:{leave:({name:t,directives:e})=>"..."+t+B(" ",L(e," "))},InlineFragment:{leave:({typeCondition:t,directives:e,selectionSet:n})=>L(["...",B("on ",t),L(e," "),n]," ")},FragmentDefinition:{leave:({name:t,typeCondition:e,variableDefinitions:n,directives:r,selectionSet:i})=>`fragment ${t}${B("(",L(n,", "),")")} on ${e} ${B("",L(r," ")," ")}`+i},IntValue:{leave:({value:t})=>t},FloatValue:{leave:({value:t})=>t},StringValue:{leave:({value:t,block:e})=>e?AT(t):lE(t)},BooleanValue:{leave:({value:t})=>t?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:t})=>t},ListValue:{leave:({values:t})=>"["+L(t,", ")+"]"},ObjectValue:{leave:({fields:t})=>"{"+L(t,", ")+"}"},ObjectField:{leave:({name:t,value:e})=>t+": "+e},Directive:{leave:({name:t,arguments:e})=>"@"+t+B("(",L(e,", "),")")},NamedType:{leave:({name:t})=>t},ListType:{leave:({type:t})=>"["+t+"]"},NonNullType:{leave:({type:t})=>t+"!"},SchemaDefinition:{leave:({description:t,directives:e,operationTypes:n})=>B("",t,`
375
+ `)+L(["schema",L(e," "),ae(n)]," ")},OperationTypeDefinition:{leave:({operation:t,type:e})=>t+": "+e},ScalarTypeDefinition:{leave:({description:t,name:e,directives:n})=>B("",t,`
376
376
  `)+L(["scalar",e,L(n," ")]," ")},ObjectTypeDefinition:{leave:({description:t,name:e,interfaces:n,directives:r,fields:i})=>B("",t,`
377
- `)+L(["type",e,B("implements ",L(n," & ")),L(r," "),oe(i)]," ")},FieldDefinition:{leave:({description:t,name:e,arguments:n,type:r,directives:i})=>B("",t,`
378
- `)+e+(ad(n)?B(`(
379
- `,co(L(n,`
377
+ `)+L(["type",e,B("implements ",L(n," & ")),L(r," "),ae(i)]," ")},FieldDefinition:{leave:({description:t,name:e,arguments:n,type:r,directives:i})=>B("",t,`
378
+ `)+e+(vd(n)?B(`(
379
+ `,po(L(n,`
380
380
  `)),`
381
381
  )`):B("(",L(n,", "),")"))+": "+r+B(" ",L(i," "))},InputValueDefinition:{leave:({description:t,name:e,type:n,defaultValue:r,directives:i})=>B("",t,`
382
382
  `)+L([e+": "+n,B("= ",r),L(i," ")]," ")},InterfaceTypeDefinition:{leave:({description:t,name:e,interfaces:n,directives:r,fields:i})=>B("",t,`
383
- `)+L(["interface",e,B("implements ",L(n," & ")),L(r," "),oe(i)]," ")},UnionTypeDefinition:{leave:({description:t,name:e,directives:n,types:r})=>B("",t,`
383
+ `)+L(["interface",e,B("implements ",L(n," & ")),L(r," "),ae(i)]," ")},UnionTypeDefinition:{leave:({description:t,name:e,directives:n,types:r})=>B("",t,`
384
384
  `)+L(["union",e,L(n," "),B("= ",L(r," | "))]," ")},EnumTypeDefinition:{leave:({description:t,name:e,directives:n,values:r})=>B("",t,`
385
- `)+L(["enum",e,L(n," "),oe(r)]," ")},EnumValueDefinition:{leave:({description:t,name:e,directives:n})=>B("",t,`
385
+ `)+L(["enum",e,L(n," "),ae(r)]," ")},EnumValueDefinition:{leave:({description:t,name:e,directives:n})=>B("",t,`
386
386
  `)+L([e,L(n," ")]," ")},InputObjectTypeDefinition:{leave:({description:t,name:e,directives:n,fields:r})=>B("",t,`
387
- `)+L(["input",e,L(n," "),oe(r)]," ")},DirectiveDefinition:{leave:({description:t,name:e,arguments:n,repeatable:r,locations:i})=>B("",t,`
388
- `)+"directive @"+e+(ad(n)?B(`(
389
- `,co(L(n,`
387
+ `)+L(["input",e,L(n," "),ae(r)]," ")},DirectiveDefinition:{leave:({description:t,name:e,arguments:n,repeatable:r,locations:i})=>B("",t,`
388
+ `)+"directive @"+e+(vd(n)?B(`(
389
+ `,po(L(n,`
390
390
  `)),`
391
- )`):B("(",L(n,", "),")"))+(r?" repeatable":"")+" on "+L(i," | ")},SchemaExtension:{leave:({directives:t,operationTypes:e})=>L(["extend schema",L(t," "),oe(e)]," ")},ScalarTypeExtension:{leave:({name:t,directives:e})=>L(["extend scalar",t,L(e," ")]," ")},ObjectTypeExtension:{leave:({name:t,interfaces:e,directives:n,fields:r})=>L(["extend type",t,B("implements ",L(e," & ")),L(n," "),oe(r)]," ")},InterfaceTypeExtension:{leave:({name:t,interfaces:e,directives:n,fields:r})=>L(["extend interface",t,B("implements ",L(e," & ")),L(n," "),oe(r)]," ")},UnionTypeExtension:{leave:({name:t,directives:e,types:n})=>L(["extend union",t,L(e," "),B("= ",L(n," | "))]," ")},EnumTypeExtension:{leave:({name:t,directives:e,values:n})=>L(["extend enum",t,L(e," "),oe(n)]," ")},InputObjectTypeExtension:{leave:({name:t,directives:e,fields:n})=>L(["extend input",t,L(e," "),oe(n)]," ")}};function L(t,e=""){var n;return(n=t==null?void 0:t.filter(r=>r).join(e))!==null&&n!==void 0?n:""}function oe(t){return B(`{
392
- `,co(L(t,`
391
+ )`):B("(",L(n,", "),")"))+(r?" repeatable":"")+" on "+L(i," | ")},SchemaExtension:{leave:({directives:t,operationTypes:e})=>L(["extend schema",L(t," "),ae(e)]," ")},ScalarTypeExtension:{leave:({name:t,directives:e})=>L(["extend scalar",t,L(e," ")]," ")},ObjectTypeExtension:{leave:({name:t,interfaces:e,directives:n,fields:r})=>L(["extend type",t,B("implements ",L(e," & ")),L(n," "),ae(r)]," ")},InterfaceTypeExtension:{leave:({name:t,interfaces:e,directives:n,fields:r})=>L(["extend interface",t,B("implements ",L(e," & ")),L(n," "),ae(r)]," ")},UnionTypeExtension:{leave:({name:t,directives:e,types:n})=>L(["extend union",t,L(e," "),B("= ",L(n," | "))]," ")},EnumTypeExtension:{leave:({name:t,directives:e,values:n})=>L(["extend enum",t,L(e," "),ae(n)]," ")},InputObjectTypeExtension:{leave:({name:t,directives:e,fields:n})=>L(["extend input",t,L(e," "),ae(n)]," ")}};function L(t,e=""){var n;return(n=t==null?void 0:t.filter(r=>r).join(e))!==null&&n!==void 0?n:""}function ae(t){return B(`{
392
+ `,po(L(t,`
393
393
  `)),`
394
- }`)}function B(t,e,n=""){return e!=null&&e!==""?t+e+n:""}function co(t){return B(" ",t.replace(/\n/g,`
395
- `))}function ad(t){var e;return(e=t==null?void 0:t.some(n=>n.includes(`
396
- `)))!==null&&e!==void 0?e:!1}var cc=JSON,QT=t=>t.toUpperCase(),$T=t=>{let e={};return t.forEach((n,r)=>{e[r]=n}),e},qT=(t,e,n)=>t.document?t:{document:t,variables:e,requestHeaders:n,signal:void 0},tE=(t,e,n)=>t.query?t:{query:t,variables:e,requestHeaders:n,signal:void 0},eE=(t,e)=>t.documents?t:{documents:t,requestHeaders:e,signal:void 0},ld=t=>{var e,n;let r,i=t.definitions.filter(o=>o.kind==="OperationDefinition");return i.length===1&&(r=(n=(e=i[0])==null?void 0:e.name)==null?void 0:n.value),r},_a=t=>{if(typeof t=="string"){let n;try{let r=lc(t);n=ld(r)}catch(r){}return{query:t,operationName:n}}let e=ld(t);return{query:zT(t),operationName:e}},$f=class uo extends Error{constructor(e,n){let r=`${uo.extractMessage(e)}: ${JSON.stringify({response:e,request:n})}`;super(r),Object.setPrototypeOf(this,uo.prototype),this.response=e,this.request=n,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,uo)}static extractMessage(e){var n,r,i;return(i=(r=(n=e.errors)==null?void 0:n[0])==null?void 0:r.message)!=null?i:`GraphQL Error (Code: ${e.status})`}},uc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function hc(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Nl={exports:{}};(function(t,e){var n=typeof self<"u"?self:uc,r=(function(){function o(){this.fetch=!1,this.DOMException=n.DOMException}return o.prototype=n,new o})();(function(o){(function(s){var a={searchParams:"URLSearchParams"in o,iterable:"Symbol"in o&&"iterator"in Symbol,blob:"FileReader"in o&&"Blob"in o&&(function(){try{return new Blob,!0}catch(y){return!1}})(),formData:"FormData"in o,arrayBuffer:"ArrayBuffer"in o};function c(y){return y&&DataView.prototype.isPrototypeOf(y)}if(a.arrayBuffer)var l=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],u=ArrayBuffer.isView||function(y){return y&&l.indexOf(Object.prototype.toString.call(y))>-1};function h(y){if(typeof y!="string"&&(y=String(y)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(y))throw new TypeError("Invalid character in header field name");return y.toLowerCase()}function p(y){return typeof y!="string"&&(y=String(y)),y}function f(y){var b={next:function(){var Z=y.shift();return{done:Z===void 0,value:Z}}};return a.iterable&&(b[Symbol.iterator]=function(){return b}),b}function m(y){this.map={},y instanceof m?y.forEach(function(b,Z){this.append(Z,b)},this):Array.isArray(y)?y.forEach(function(b){this.append(b[0],b[1])},this):y&&Object.getOwnPropertyNames(y).forEach(function(b){this.append(b,y[b])},this)}m.prototype.append=function(y,b){y=h(y),b=p(b);var Z=this.map[y];this.map[y]=Z?Z+", "+b:b},m.prototype.delete=function(y){delete this.map[h(y)]},m.prototype.get=function(y){return y=h(y),this.has(y)?this.map[y]:null},m.prototype.has=function(y){return this.map.hasOwnProperty(h(y))},m.prototype.set=function(y,b){this.map[h(y)]=p(b)},m.prototype.forEach=function(y,b){for(var Z in this.map)this.map.hasOwnProperty(Z)&&y.call(b,this.map[Z],Z,this)},m.prototype.keys=function(){var y=[];return this.forEach(function(b,Z){y.push(Z)}),f(y)},m.prototype.values=function(){var y=[];return this.forEach(function(b){y.push(b)}),f(y)},m.prototype.entries=function(){var y=[];return this.forEach(function(b,Z){y.push([Z,b])}),f(y)},a.iterable&&(m.prototype[Symbol.iterator]=m.prototype.entries);function d(y){if(y.bodyUsed)return Promise.reject(new TypeError("Already read"));y.bodyUsed=!0}function v(y){return new Promise(function(b,Z){y.onload=function(){b(y.result)},y.onerror=function(){Z(y.error)}})}function g(y){var b=new FileReader,Z=v(b);return b.readAsArrayBuffer(y),Z}function w(y){var b=new FileReader,Z=v(b);return b.readAsText(y),Z}function R(y){for(var b=new Uint8Array(y),Z=new Array(b.length),D=0;D<b.length;D++)Z[D]=String.fromCharCode(b[D]);return Z.join("")}function E(y){if(y.slice)return y.slice(0);var b=new Uint8Array(y.byteLength);return b.set(new Uint8Array(y)),b.buffer}function T(){return this.bodyUsed=!1,this.$n=function(y){this._t=y,y?typeof y=="string"?this._e=y:a.blob&&Blob.prototype.isPrototypeOf(y)?this.Qt=y:a.formData&&FormData.prototype.isPrototypeOf(y)?this.qn=y:a.searchParams&&URLSearchParams.prototype.isPrototypeOf(y)?this._e=y.toString():a.arrayBuffer&&a.blob&&c(y)?(this.D=E(y.buffer),this._t=new Blob([this.D])):a.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(y)||u(y))?this.D=E(y):this._e=y=Object.prototype.toString.call(y):this._e="",this.headers.get("content-type")||(typeof y=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this.Qt&&this.Qt.type?this.headers.set("content-type",this.Qt.type):a.searchParams&&URLSearchParams.prototype.isPrototypeOf(y)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},a.blob&&(this.blob=function(){var y=d(this);if(y)return y;if(this.Qt)return Promise.resolve(this.Qt);if(this.D)return Promise.resolve(new Blob([this.D]));if(this.qn)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._e]))},this.arrayBuffer=function(){return this.D?d(this)||Promise.resolve(this.D):this.blob().then(g)}),this.text=function(){var y=d(this);if(y)return y;if(this.Qt)return w(this.Qt);if(this.D)return Promise.resolve(R(this.D));if(this.qn)throw new Error("could not read FormData body as text");return Promise.resolve(this._e)},a.formData&&(this.formData=function(){return this.text().then(C)}),this.json=function(){return this.text().then(JSON.parse)},this}var V=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function N(y){var b=y.toUpperCase();return V.indexOf(b)>-1?b:y}function U(y,b){b=b||{};var Z=b.body;if(y instanceof U){if(y.bodyUsed)throw new TypeError("Already read");this.url=y.url,this.credentials=y.credentials,b.headers||(this.headers=new m(y.headers)),this.method=y.method,this.mode=y.mode,this.signal=y.signal,!Z&&y._t!=null&&(Z=y._t,y.bodyUsed=!0)}else this.url=String(y);if(this.credentials=b.credentials||this.credentials||"same-origin",(b.headers||!this.headers)&&(this.headers=new m(b.headers)),this.method=N(b.method||this.method||"GET"),this.mode=b.mode||this.mode||null,this.signal=b.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&Z)throw new TypeError("Body not allowed for GET or HEAD requests");this.$n(Z)}U.prototype.clone=function(){return new U(this,{body:this._t})};function C(y){var b=new FormData;return y.trim().split("&").forEach(function(Z){if(Z){var D=Z.split("="),M=D.shift().replace(/\+/g," "),O=D.join("=").replace(/\+/g," ");b.append(decodeURIComponent(M),decodeURIComponent(O))}}),b}function x(y){var b=new m,Z=y.replace(/\r?\n[\t ]+/g," ");return Z.split(/\r?\n/).forEach(function(D){var M=D.split(":"),O=M.shift().trim();if(O){var it=M.join(":").trim();b.append(O,it)}}),b}T.call(U.prototype);function P(y,b){b||(b={}),this.type="default",this.status=b.status===void 0?200:b.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in b?b.statusText:"OK",this.headers=new m(b.headers),this.url=b.url||"",this.$n(y)}T.call(P.prototype),P.prototype.clone=function(){return new P(this._t,{status:this.status,statusText:this.statusText,headers:new m(this.headers),url:this.url})},P.error=function(){var y=new P(null,{status:0,statusText:""});return y.type="error",y};var st=[301,302,303,307,308];P.redirect=function(y,b){if(st.indexOf(b)===-1)throw new RangeError("Invalid status code");return new P(null,{status:b,headers:{location:y}})},s.DOMException=o.DOMException;try{new s.DOMException}catch(y){s.DOMException=function(b,Z){this.message=b,this.name=Z;var D=Error(b);this.stack=D.stack},s.DOMException.prototype=Object.create(Error.prototype),s.DOMException.prototype.constructor=s.DOMException}function lt(y,b){return new Promise(function(Z,D){var M=new U(y,b);if(M.signal&&M.signal.aborted)return D(new s.DOMException("Aborted","AbortError"));var O=new XMLHttpRequest;function it(){O.abort()}O.onload=function(){var ct={status:O.status,statusText:O.statusText,headers:x(O.getAllResponseHeaders()||"")};ct.url="responseURL"in O?O.responseURL:ct.headers.get("X-Request-URL");var Ot="response"in O?O.response:O.responseText;Z(new P(Ot,ct))},O.onerror=function(){D(new TypeError("Network request failed"))},O.ontimeout=function(){D(new TypeError("Network request failed"))},O.onabort=function(){D(new s.DOMException("Aborted","AbortError"))},O.open(M.method,M.url,!0),M.credentials==="include"?O.withCredentials=!0:M.credentials==="omit"&&(O.withCredentials=!1),"responseType"in O&&a.blob&&(O.responseType="blob"),M.headers.forEach(function(ct,Ot){O.setRequestHeader(Ot,ct)}),M.signal&&(M.signal.addEventListener("abort",it),O.onreadystatechange=function(){O.readyState===4&&M.signal.removeEventListener("abort",it)}),O.send(typeof M._t>"u"?null:M._t)})}return lt.polyfill=!0,o.fetch||(o.fetch=lt,o.Headers=m,o.Request=U,o.Response=P),s.Headers=m,s.Request=U,s.Response=P,s.fetch=lt,Object.defineProperty(s,"__esModule",{value:!0}),s})({})})(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var i=r;e=i.fetch,e.default=i.fetch,e.fetch=i.fetch,e.Headers=i.Headers,e.Request=i.Request,e.Response=i.Response,t.exports=e})(Nl,Nl.exports);var Io=Nl.exports,ho=hc(Io),nE=lT({__proto__:null,default:ho},[Io]),Xn=t=>{let e={};return t&&(typeof Headers<"u"&&t instanceof Headers||nE&&Io.Headers&&t instanceof Io.Headers?e=$T(t):Array.isArray(t)?t.forEach(([n,r])=>{n&&r!==void 0&&(e[n]=r)}):e=t),e},cd=t=>t.replace(/([\s,]|#[^\n\r]+)+/g," ").trim(),rE=t=>{if(!Array.isArray(t.query)){let r=t,i=[`query=${encodeURIComponent(cd(r.query))}`];return t.variables&&i.push(`variables=${encodeURIComponent(r.jsonSerializer.stringify(r.variables))}`),r.operationName&&i.push(`operationName=${encodeURIComponent(r.operationName)}`),i.join("&")}if(typeof t.variables<"u"&&!Array.isArray(t.variables))throw new Error("Cannot create query with given variable type, array expected");let e=t,n=t.query.reduce((r,i,o)=>(r.push({query:cd(i),variables:e.variables?e.jsonSerializer.stringify(e.variables[o]):void 0}),r),[]);return`query=${encodeURIComponent(e.jsonSerializer.stringify(n))}`},iE=t=>e=>Dn(void 0,null,function*(){var n;let{url:r,query:i,variables:o,operationName:s,fetch:a,fetchOptions:c,middleware:l}=e,u=j({},e.headers),h="",p;t==="POST"?(p=sE(i,o,s,c.jsonSerializer),typeof p=="string"&&(u["Content-Type"]="application/json")):h=rE({query:i,variables:o,operationName:s,jsonSerializer:(n=c.jsonSerializer)!=null?n:cc});let f=j({method:t,headers:u,body:p},c),m=r,d=f;if(l){let v=yield Promise.resolve(l(An(j({},f),{url:r,operationName:s,variables:o}))),{url:g}=v,w=xr(v,["url"]);m=g,d=w}return h&&(m=`${m}?${h}`),yield a(m,d)}),oE=class{constructor(t,e={}){this.url=t,this.requestConfig=e,this.rawRequest=(...n)=>Dn(this,null,function*(){let[r,i,o]=n,s=tE(r,i,o),a=this.requestConfig,{headers:c,fetch:l=ho,method:u="POST",requestMiddleware:h,responseMiddleware:p}=a,f=xr(a,["headers","fetch","method","requestMiddleware","responseMiddleware"]),{url:m}=this;s.signal!==void 0&&(f.signal=s.signal);let{operationName:d}=_a(s.query);return Ha({url:m,query:s.query,variables:s.variables,headers:j(j({},Xn(za(c))),Xn(s.requestHeaders)),operationName:d,fetch:l,method:u,fetchOptions:f,middleware:h}).then(v=>(p&&p(v),v)).catch(v=>{throw p&&p(v),v})})}request(t,...e){return Dn(this,null,function*(){let[n,r]=e,i=qT(t,n,r),o=this.requestConfig,{headers:s,fetch:a=ho,method:c="POST",requestMiddleware:l,responseMiddleware:u}=o,h=xr(o,["headers","fetch","method","requestMiddleware","responseMiddleware"]),{url:p}=this;i.signal!==void 0&&(h.signal=i.signal);let{query:f,operationName:m}=_a(i.document);return Ha({url:p,query:f,variables:i.variables,headers:j(j({},Xn(za(s))),Xn(i.requestHeaders)),operationName:m,fetch:a,method:c,fetchOptions:h,middleware:l}).then(d=>(u&&u(d),d.data)).catch(d=>{throw u&&u(d),d})})}batchRequests(t,e){var n;let r=eE(t,e),i=this.requestConfig,{headers:o}=i,s=xr(i,["headers"]);r.signal!==void 0&&(s.signal=r.signal);let a=r.documents.map(({document:l})=>_a(l).query),c=r.documents.map(({variables:l})=>l);return Ha({url:this.url,query:a,variables:c,headers:j(j({},Xn(za(o))),Xn(r.requestHeaders)),operationName:void 0,fetch:(n=this.requestConfig.fetch)!=null?n:ho,method:this.requestConfig.method||"POST",fetchOptions:s,middleware:this.requestConfig.requestMiddleware}).then(l=>(this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(l),l.data)).catch(l=>{throw this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(l),l})}setHeaders(t){return this.requestConfig.headers=t,this}setHeader(t,e){let{headers:n}=this.requestConfig;return n?n[t]=e:this.requestConfig.headers={[t]:e},this}setEndpoint(t){return this.url=t,this}},Ha=t=>Dn(void 0,null,function*(){var e,n;let{query:r,variables:i,fetchOptions:o}=t,s=iE(QT((e=t.method)!=null?e:"post")),a=Array.isArray(t.query),c=yield s(t),l=yield aE(c,(n=o.jsonSerializer)!=null?n:cc),u=Array.isArray(l)?!l.some(({data:p})=>!p):!!l.data,h=Array.isArray(l)||!l.errors||Array.isArray(l.errors)&&!l.errors.length||o.errorPolicy==="all"||o.errorPolicy==="ignore";if(c.ok&&h&&u){let p=l,f=xr(p,["errors"]),m=o.errorPolicy==="ignore"?f:l;return An(j({},a?{data:m}:m),{headers:c.headers,status:c.status})}else{let p=typeof l=="string"?{error:l}:l;throw new $f(An(j({},p),{status:c.status,headers:c.headers}),{query:r,variables:i})}}),sE=(t,e,n,r)=>{let i=r!=null?r:cc;if(!Array.isArray(t))return i.stringify({query:t,variables:e,operationName:n});if(typeof e<"u"&&!Array.isArray(e))throw new Error("Cannot create request body with given variable type, array expected");let o=t.reduce((s,a,c)=>(s.push({query:a,variables:e?e[c]:void 0}),s),[]);return i.stringify(o)},aE=(t,e)=>Dn(void 0,null,function*(){let n;return t.headers.forEach((r,i)=>{i.toLowerCase()==="content-type"&&(n=r)}),n&&(n.toLowerCase().startsWith("application/json")||n.toLowerCase().startsWith("application/graphql+json")||n.toLowerCase().startsWith("application/graphql-response+json"))?e.parse(yield t.text()):t.text()}),za=t=>typeof t=="function"?t():t,Ol={exports:{}};(function(t,e){e=t.exports=n,e.getSerialize=r;function n(i,o,s,a){return JSON.stringify(i,r(o,a),s)}function r(i,o){var s=[],a=[];return o==null&&(o=function(c,l){return s[0]===l?"[Circular ~]":"[Circular ~."+a.slice(0,s.indexOf(l)).join(".")+"]"}),function(c,l){if(s.length>0){var u=s.indexOf(this);~u?s.splice(u+1):s.push(this),~u?a.splice(u,1/0,c):a.push(c),~s.indexOf(l)&&(l=o.call(this,c,l))}else s.push(l);return i==null?l:i.call(this,c,l)}}})(Ol,Ol.exports);var lE=Ol.exports,rn=hc(lE),To=function(){return To=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},To.apply(this,arguments)},po=new Map,Gl=new Map,qf=!0,Eo=!1;function tm(t){return t.replace(/[\s,]+/g," ").trim()}function cE(t){return tm(t.source.body.substring(t.start,t.end))}function uE(t){var e=new Set,n=[];return t.definitions.forEach(function(r){if(r.kind==="FragmentDefinition"){var i=r.name.value,o=cE(r.loc),s=Gl.get(i);s&&!s.has(o)?qf&&console.warn("Warning: fragment with name "+i+` already exists.
394
+ }`)}function B(t,e,n=""){return e!=null&&e!==""?t+e+n:""}function po(t){return B(" ",t.replace(/\n/g,`
395
+ `))}function vd(t){var e;return(e=t==null?void 0:t.some(n=>n.includes(`
396
+ `)))!==null&&e!==void 0?e:!1}var mc=JSON,bE=t=>t.toUpperCase(),vE=t=>{let e={};return t.forEach((n,r)=>{e[r]=n}),e},wE=(t,e,n)=>t.document?t:{document:t,variables:e,requestHeaders:n,signal:void 0},SE=(t,e,n)=>t.query?t:{query:t,variables:e,requestHeaders:n,signal:void 0},IE=(t,e)=>t.documents?t:{documents:t,requestHeaders:e,signal:void 0},wd=t=>{var e,n;let r,i=t.definitions.filter(o=>o.kind==="OperationDefinition");return i.length===1&&(r=(n=(e=i[0])==null?void 0:e.name)==null?void 0:n.value),r},$a=t=>{if(typeof t=="string"){let n;try{let r=fc(t);n=wd(r)}catch(r){}return{query:t,operationName:n}}let e=wd(t);return{query:mE(t),operationName:e}},um=class fo extends Error{constructor(e,n){let r=`${fo.extractMessage(e)}: ${JSON.stringify({response:e,request:n})}`;super(r),Object.setPrototypeOf(this,fo.prototype),this.response=e,this.request=n,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,fo)}static extractMessage(e){var n,r,i;return(i=(r=(n=e.errors)==null?void 0:n[0])==null?void 0:r.message)!=null?i:`GraphQL Error (Code: ${e.status})`}},yc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function gc(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Ul={exports:{}};(function(t,e){var n=typeof self<"u"?self:yc,r=(function(){function o(){this.fetch=!1,this.DOMException=n.DOMException}return o.prototype=n,new o})();(function(o){(function(s){var a={searchParams:"URLSearchParams"in o,iterable:"Symbol"in o&&"iterator"in Symbol,blob:"FileReader"in o&&"Blob"in o&&(function(){try{return new Blob,!0}catch(y){return!1}})(),formData:"FormData"in o,arrayBuffer:"ArrayBuffer"in o};function c(y){return y&&DataView.prototype.isPrototypeOf(y)}if(a.arrayBuffer)var l=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],u=ArrayBuffer.isView||function(y){return y&&l.indexOf(Object.prototype.toString.call(y))>-1};function h(y){if(typeof y!="string"&&(y=String(y)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(y))throw new TypeError("Invalid character in header field name");return y.toLowerCase()}function p(y){return typeof y!="string"&&(y=String(y)),y}function f(y){var b={next:function(){var Z=y.shift();return{done:Z===void 0,value:Z}}};return a.iterable&&(b[Symbol.iterator]=function(){return b}),b}function m(y){this.map={},y instanceof m?y.forEach(function(b,Z){this.append(Z,b)},this):Array.isArray(y)?y.forEach(function(b){this.append(b[0],b[1])},this):y&&Object.getOwnPropertyNames(y).forEach(function(b){this.append(b,y[b])},this)}m.prototype.append=function(y,b){y=h(y),b=p(b);var Z=this.map[y];this.map[y]=Z?Z+", "+b:b},m.prototype.delete=function(y){delete this.map[h(y)]},m.prototype.get=function(y){return y=h(y),this.has(y)?this.map[y]:null},m.prototype.has=function(y){return this.map.hasOwnProperty(h(y))},m.prototype.set=function(y,b){this.map[h(y)]=p(b)},m.prototype.forEach=function(y,b){for(var Z in this.map)this.map.hasOwnProperty(Z)&&y.call(b,this.map[Z],Z,this)},m.prototype.keys=function(){var y=[];return this.forEach(function(b,Z){y.push(Z)}),f(y)},m.prototype.values=function(){var y=[];return this.forEach(function(b){y.push(b)}),f(y)},m.prototype.entries=function(){var y=[];return this.forEach(function(b,Z){y.push([Z,b])}),f(y)},a.iterable&&(m.prototype[Symbol.iterator]=m.prototype.entries);function d(y){if(y.bodyUsed)return Promise.reject(new TypeError("Already read"));y.bodyUsed=!0}function v(y){return new Promise(function(b,Z){y.onload=function(){b(y.result)},y.onerror=function(){Z(y.error)}})}function g(y){var b=new FileReader,Z=v(b);return b.readAsArrayBuffer(y),Z}function w(y){var b=new FileReader,Z=v(b);return b.readAsText(y),Z}function R(y){for(var b=new Uint8Array(y),Z=new Array(b.length),D=0;D<b.length;D++)Z[D]=String.fromCharCode(b[D]);return Z.join("")}function E(y){if(y.slice)return y.slice(0);var b=new Uint8Array(y.byteLength);return b.set(new Uint8Array(y)),b.buffer}function T(){return this.bodyUsed=!1,this.Pr=function(y){this._t=y,y?typeof y=="string"?this.Ye=y:a.blob&&Blob.prototype.isPrototypeOf(y)?this.ee=y:a.formData&&FormData.prototype.isPrototypeOf(y)?this.Mr=y:a.searchParams&&URLSearchParams.prototype.isPrototypeOf(y)?this.Ye=y.toString():a.arrayBuffer&&a.blob&&c(y)?(this.F=E(y.buffer),this._t=new Blob([this.F])):a.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(y)||u(y))?this.F=E(y):this.Ye=y=Object.prototype.toString.call(y):this.Ye="",this.headers.get("content-type")||(typeof y=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this.ee&&this.ee.type?this.headers.set("content-type",this.ee.type):a.searchParams&&URLSearchParams.prototype.isPrototypeOf(y)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},a.blob&&(this.blob=function(){var y=d(this);if(y)return y;if(this.ee)return Promise.resolve(this.ee);if(this.F)return Promise.resolve(new Blob([this.F]));if(this.Mr)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this.Ye]))},this.arrayBuffer=function(){return this.F?d(this)||Promise.resolve(this.F):this.blob().then(g)}),this.text=function(){var y=d(this);if(y)return y;if(this.ee)return w(this.ee);if(this.F)return Promise.resolve(R(this.F));if(this.Mr)throw new Error("could not read FormData body as text");return Promise.resolve(this.Ye)},a.formData&&(this.formData=function(){return this.text().then(C)}),this.json=function(){return this.text().then(JSON.parse)},this}var x=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function N(y){var b=y.toUpperCase();return x.indexOf(b)>-1?b:y}function U(y,b){b=b||{};var Z=b.body;if(y instanceof U){if(y.bodyUsed)throw new TypeError("Already read");this.url=y.url,this.credentials=y.credentials,b.headers||(this.headers=new m(y.headers)),this.method=y.method,this.mode=y.mode,this.signal=y.signal,!Z&&y._t!=null&&(Z=y._t,y.bodyUsed=!0)}else this.url=String(y);if(this.credentials=b.credentials||this.credentials||"same-origin",(b.headers||!this.headers)&&(this.headers=new m(b.headers)),this.method=N(b.method||this.method||"GET"),this.mode=b.mode||this.mode||null,this.signal=b.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&Z)throw new TypeError("Body not allowed for GET or HEAD requests");this.Pr(Z)}U.prototype.clone=function(){return new U(this,{body:this._t})};function C(y){var b=new FormData;return y.trim().split("&").forEach(function(Z){if(Z){var D=Z.split("="),M=D.shift().replace(/\+/g," "),G=D.join("=").replace(/\+/g," ");b.append(decodeURIComponent(M),decodeURIComponent(G))}}),b}function O(y){var b=new m,Z=y.replace(/\r?\n[\t ]+/g," ");return Z.split(/\r?\n/).forEach(function(D){var M=D.split(":"),G=M.shift().trim();if(G){var it=M.join(":").trim();b.append(G,it)}}),b}T.call(U.prototype);function P(y,b){b||(b={}),this.type="default",this.status=b.status===void 0?200:b.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in b?b.statusText:"OK",this.headers=new m(b.headers),this.url=b.url||"",this.Pr(y)}T.call(P.prototype),P.prototype.clone=function(){return new P(this._t,{status:this.status,statusText:this.statusText,headers:new m(this.headers),url:this.url})},P.error=function(){var y=new P(null,{status:0,statusText:""});return y.type="error",y};var st=[301,302,303,307,308];P.redirect=function(y,b){if(st.indexOf(b)===-1)throw new RangeError("Invalid status code");return new P(null,{status:b,headers:{location:y}})},s.DOMException=o.DOMException;try{new s.DOMException}catch(y){s.DOMException=function(b,Z){this.message=b,this.name=Z;var D=Error(b);this.stack=D.stack},s.DOMException.prototype=Object.create(Error.prototype),s.DOMException.prototype.constructor=s.DOMException}function lt(y,b){return new Promise(function(Z,D){var M=new U(y,b);if(M.signal&&M.signal.aborted)return D(new s.DOMException("Aborted","AbortError"));var G=new XMLHttpRequest;function it(){G.abort()}G.onload=function(){var ct={status:G.status,statusText:G.statusText,headers:O(G.getAllResponseHeaders()||"")};ct.url="responseURL"in G?G.responseURL:ct.headers.get("X-Request-URL");var Gt="response"in G?G.response:G.responseText;Z(new P(Gt,ct))},G.onerror=function(){D(new TypeError("Network request failed"))},G.ontimeout=function(){D(new TypeError("Network request failed"))},G.onabort=function(){D(new s.DOMException("Aborted","AbortError"))},G.open(M.method,M.url,!0),M.credentials==="include"?G.withCredentials=!0:M.credentials==="omit"&&(G.withCredentials=!1),"responseType"in G&&a.blob&&(G.responseType="blob"),M.headers.forEach(function(ct,Gt){G.setRequestHeader(Gt,ct)}),M.signal&&(M.signal.addEventListener("abort",it),G.onreadystatechange=function(){G.readyState===4&&M.signal.removeEventListener("abort",it)}),G.send(typeof M._t>"u"?null:M._t)})}return lt.polyfill=!0,o.fetch||(o.fetch=lt,o.Headers=m,o.Request=U,o.Response=P),s.Headers=m,s.Request=U,s.Response=P,s.fetch=lt,Object.defineProperty(s,"__esModule",{value:!0}),s})({})})(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var i=r;e=i.fetch,e.default=i.fetch,e.fetch=i.fetch,e.Headers=i.Headers,e.Request=i.Request,e.Response=i.Response,t.exports=e})(Ul,Ul.exports);var Ro=Ul.exports,mo=gc(Ro),TE=VT({__proto__:null,default:mo},[Ro]),Wn=t=>{let e={};return t&&(typeof Headers<"u"&&t instanceof Headers||TE&&Ro.Headers&&t instanceof Ro.Headers?e=vE(t):Array.isArray(t)?t.forEach(([n,r])=>{n&&r!==void 0&&(e[n]=r)}):e=t),e},Sd=t=>t.replace(/([\s,]|#[^\n\r]+)+/g," ").trim(),EE=t=>{if(!Array.isArray(t.query)){let r=t,i=[`query=${encodeURIComponent(Sd(r.query))}`];return t.variables&&i.push(`variables=${encodeURIComponent(r.jsonSerializer.stringify(r.variables))}`),r.operationName&&i.push(`operationName=${encodeURIComponent(r.operationName)}`),i.join("&")}if(typeof t.variables<"u"&&!Array.isArray(t.variables))throw new Error("Cannot create query with given variable type, array expected");let e=t,n=t.query.reduce((r,i,o)=>(r.push({query:Sd(i),variables:e.variables?e.jsonSerializer.stringify(e.variables[o]):void 0}),r),[]);return`query=${encodeURIComponent(e.jsonSerializer.stringify(n))}`},RE=t=>e=>Yn(void 0,null,function*(){var n;let{url:r,query:i,variables:o,operationName:s,fetch:a,fetchOptions:c,middleware:l}=e,u=j({},e.headers),h="",p;t==="POST"?(p=ZE(i,o,s,c.jsonSerializer),typeof p=="string"&&(u["Content-Type"]="application/json")):h=EE({query:i,variables:o,operationName:s,jsonSerializer:(n=c.jsonSerializer)!=null?n:mc});let f=j({method:t,headers:u,body:p},c),m=r,d=f;if(l){let v=yield Promise.resolve(l(Jn(j({},f),{url:r,operationName:s,variables:o}))),{url:g}=v,w=Nr(v,["url"]);m=g,d=w}return h&&(m=`${m}?${h}`),yield a(m,d)}),CE=class{constructor(t,e={}){this.url=t,this.requestConfig=e,this.rawRequest=(...n)=>Yn(this,null,function*(){let[r,i,o]=n,s=SE(r,i,o),a=this.requestConfig,{headers:c,fetch:l=mo,method:u="POST",requestMiddleware:h,responseMiddleware:p}=a,f=Nr(a,["headers","fetch","method","requestMiddleware","responseMiddleware"]),{url:m}=this;s.signal!==void 0&&(f.signal=s.signal);let{operationName:d}=$a(s.query);return qa({url:m,query:s.query,variables:s.variables,headers:j(j({},Wn(tl(c))),Wn(s.requestHeaders)),operationName:d,fetch:l,method:u,fetchOptions:f,middleware:h}).then(v=>(p&&p(v),v)).catch(v=>{throw p&&p(v),v})})}request(t,...e){return Yn(this,null,function*(){let[n,r]=e,i=wE(t,n,r),o=this.requestConfig,{headers:s,fetch:a=mo,method:c="POST",requestMiddleware:l,responseMiddleware:u}=o,h=Nr(o,["headers","fetch","method","requestMiddleware","responseMiddleware"]),{url:p}=this;i.signal!==void 0&&(h.signal=i.signal);let{query:f,operationName:m}=$a(i.document);return qa({url:p,query:f,variables:i.variables,headers:j(j({},Wn(tl(s))),Wn(i.requestHeaders)),operationName:m,fetch:a,method:c,fetchOptions:h,middleware:l}).then(d=>(u&&u(d),d.data)).catch(d=>{throw u&&u(d),d})})}batchRequests(t,e){var n;let r=IE(t,e),i=this.requestConfig,{headers:o}=i,s=Nr(i,["headers"]);r.signal!==void 0&&(s.signal=r.signal);let a=r.documents.map(({document:l})=>$a(l).query),c=r.documents.map(({variables:l})=>l);return qa({url:this.url,query:a,variables:c,headers:j(j({},Wn(tl(o))),Wn(r.requestHeaders)),operationName:void 0,fetch:(n=this.requestConfig.fetch)!=null?n:mo,method:this.requestConfig.method||"POST",fetchOptions:s,middleware:this.requestConfig.requestMiddleware}).then(l=>(this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(l),l.data)).catch(l=>{throw this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(l),l})}setHeaders(t){return this.requestConfig.headers=t,this}setHeader(t,e){let{headers:n}=this.requestConfig;return n?n[t]=e:this.requestConfig.headers={[t]:e},this}setEndpoint(t){return this.url=t,this}},qa=t=>Yn(void 0,null,function*(){var e,n;let{query:r,variables:i,fetchOptions:o}=t,s=RE(bE((e=t.method)!=null?e:"post")),a=Array.isArray(t.query),c=yield s(t),l=yield kE(c,(n=o.jsonSerializer)!=null?n:mc),u=Array.isArray(l)?!l.some(({data:p})=>!p):!!l.data,h=Array.isArray(l)||!l.errors||Array.isArray(l.errors)&&!l.errors.length||o.errorPolicy==="all"||o.errorPolicy==="ignore";if(c.ok&&h&&u){let p=l,f=Nr(p,["errors"]),m=o.errorPolicy==="ignore"?f:l;return Jn(j({},a?{data:m}:m),{headers:c.headers,status:c.status})}else{let p=typeof l=="string"?{error:l}:l;throw new um(Jn(j({},p),{status:c.status,headers:c.headers}),{query:r,variables:i})}}),ZE=(t,e,n,r)=>{let i=r!=null?r:mc;if(!Array.isArray(t))return i.stringify({query:t,variables:e,operationName:n});if(typeof e<"u"&&!Array.isArray(e))throw new Error("Cannot create request body with given variable type, array expected");let o=t.reduce((s,a,c)=>(s.push({query:a,variables:e?e[c]:void 0}),s),[]);return i.stringify(o)},kE=(t,e)=>Yn(void 0,null,function*(){let n;return t.headers.forEach((r,i)=>{i.toLowerCase()==="content-type"&&(n=r)}),n&&(n.toLowerCase().startsWith("application/json")||n.toLowerCase().startsWith("application/graphql+json")||n.toLowerCase().startsWith("application/graphql-response+json"))?e.parse(yield t.text()):t.text()}),tl=t=>typeof t=="function"?t():t,Pl={exports:{}};(function(t,e){e=t.exports=n,e.getSerialize=r;function n(i,o,s,a){return JSON.stringify(i,r(o,a),s)}function r(i,o){var s=[],a=[];return o==null&&(o=function(c,l){return s[0]===l?"[Circular ~]":"[Circular ~."+a.slice(0,s.indexOf(l)).join(".")+"]"}),function(c,l){if(s.length>0){var u=s.indexOf(this);~u?s.splice(u+1):s.push(this),~u?a.splice(u,1/0,c):a.push(c),~s.indexOf(l)&&(l=o.call(this,c,l))}else s.push(l);return i==null?l:i.call(this,c,l)}}})(Pl,Pl.exports);var VE=Pl.exports,on=gc(VE),Co=function(){return Co=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Co.apply(this,arguments)},yo=new Map,Ml=new Map,hm=!0,Zo=!1;function pm(t){return t.replace(/[\s,]+/g," ").trim()}function xE(t){return pm(t.source.body.substring(t.start,t.end))}function OE(t){var e=new Set,n=[];return t.definitions.forEach(function(r){if(r.kind==="FragmentDefinition"){var i=r.name.value,o=xE(r.loc),s=Ml.get(i);s&&!s.has(o)?hm&&console.warn("Warning: fragment with name "+i+` already exists.
397
397
  graphql-tag enforces all fragment names across your application to be unique; read more about
398
- this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):s||Gl.set(i,s=new Set),s.add(o),e.has(o)||(e.add(o),n.push(r))}else n.push(r)}),To(To({},t),{definitions:n})}function hE(t){var e=new Set(t.definitions);e.forEach(function(r){r.loc&&delete r.loc,Object.keys(r).forEach(function(i){var o=r[i];o&&typeof o=="object"&&e.add(o)})});var n=t.loc;return n&&(delete n.startToken,delete n.endToken),t}function pE(t){var e=tm(t);if(!po.has(e)){var n=lc(t,{experimentalFragmentVariables:Eo,allowLegacyFragmentVariables:Eo});if(!n||n.kind!=="Document")throw new Error("Not a valid GraphQL document.");po.set(e,hE(uE(n)))}return po.get(e)}function Wt(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];typeof t=="string"&&(t=[t]);var r=t[0];return e.forEach(function(i,o){i&&i.kind==="Document"?r+=i.loc.source.body:r+=i,r+=t[o+1]}),pE(r)}function dE(){po.clear(),Gl.clear()}function fE(){qf=!1}function mE(){Eo=!0}function yE(){Eo=!1}var wr={gql:Wt,resetCaches:dE,disableFragmentWarnings:fE,enableExperimentalFragmentVariables:mE,disableExperimentalFragmentVariables:yE};(function(t){t.gql=wr.gql,t.resetCaches=wr.resetCaches,t.disableFragmentWarnings=wr.disableFragmentWarnings,t.enableExperimentalFragmentVariables=wr.enableExperimentalFragmentVariables,t.disableExperimentalFragmentVariables=wr.disableExperimentalFragmentVariables})(Wt||(Wt={}));Wt.default=Wt;var em=Wt`
398
+ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):s||Ml.set(i,s=new Set),s.add(o),e.has(o)||(e.add(o),n.push(r))}else n.push(r)}),Co(Co({},t),{definitions:n})}function NE(t){var e=new Set(t.definitions);e.forEach(function(r){r.loc&&delete r.loc,Object.keys(r).forEach(function(i){var o=r[i];o&&typeof o=="object"&&e.add(o)})});var n=t.loc;return n&&(delete n.startToken,delete n.endToken),t}function GE(t){var e=pm(t);if(!yo.has(e)){var n=fc(t,{experimentalFragmentVariables:Zo,allowLegacyFragmentVariables:Zo});if(!n||n.kind!=="Document")throw new Error("Not a valid GraphQL document.");yo.set(e,NE(OE(n)))}return yo.get(e)}function Ut(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];typeof t=="string"&&(t=[t]);var r=t[0];return e.forEach(function(i,o){i&&i.kind==="Document"?r+=i.loc.source.body:r+=i,r+=t[o+1]}),GE(r)}function LE(){yo.clear(),Ml.clear()}function XE(){hm=!1}function WE(){Zo=!0}function UE(){Zo=!1}var Ir={gql:Ut,resetCaches:LE,disableFragmentWarnings:XE,enableExperimentalFragmentVariables:WE,disableExperimentalFragmentVariables:UE};(function(t){t.gql=Ir.gql,t.resetCaches=Ir.resetCaches,t.disableFragmentWarnings=Ir.disableFragmentWarnings,t.enableExperimentalFragmentVariables=Ir.enableExperimentalFragmentVariables,t.disableExperimentalFragmentVariables=Ir.disableExperimentalFragmentVariables})(Ut||(Ut={}));Ut.default=Ut;var dm=Ut`
399
399
  fragment MatchParts on MatchConfig {
400
400
  regexValue
401
401
  matchValue
402
402
  }
403
- `,gE=Wt`
403
+ `,PE=Ut`
404
404
  mutation PushPayload(
405
405
  $session_secure_id: String!
406
406
  $payload_id: ID!
@@ -426,7 +426,7 @@ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):s
426
426
  highlight_logs: $highlight_logs
427
427
  )
428
428
  }
429
- `,bE=Wt`
429
+ `,ME=Ut`
430
430
  mutation PushPayloadCompressed(
431
431
  $session_secure_id: String!
432
432
  $payload_id: ID!
@@ -438,7 +438,7 @@ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):s
438
438
  data: $data
439
439
  )
440
440
  }
441
- `,vE=Wt`
441
+ `,FE=Ut`
442
442
  mutation identifySession(
443
443
  $session_secure_id: String!
444
444
  $user_identifier: String!
@@ -450,7 +450,7 @@ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):s
450
450
  user_object: $user_object
451
451
  )
452
452
  }
453
- `,wE=Wt`
453
+ `,AE=Ut`
454
454
  mutation addSessionProperties(
455
455
  $session_secure_id: String!
456
456
  $properties_object: Any
@@ -460,11 +460,11 @@ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):s
460
460
  properties_object: $properties_object
461
461
  )
462
462
  }
463
- `,SE=Wt`
463
+ `,JE=Ut`
464
464
  mutation pushMetrics($metrics: [MetricInput]!) {
465
465
  pushMetrics(metrics: $metrics)
466
466
  }
467
- `,IE=Wt`
467
+ `,DE=Ut`
468
468
  mutation addSessionFeedback(
469
469
  $session_secure_id: String!
470
470
  $user_name: String
@@ -480,7 +480,7 @@ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):s
480
480
  timestamp: $timestamp
481
481
  )
482
482
  }
483
- `,TE=Wt`
483
+ `,YE=Ut`
484
484
  mutation initializeSession(
485
485
  $session_secure_id: String!
486
486
  $organization_verbose_id: String!
@@ -565,12 +565,12 @@ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):s
565
565
  }
566
566
  }
567
567
  }
568
- ${em}
569
- `,EE=Wt`
568
+ ${dm}
569
+ `,KE=Ut`
570
570
  query Ignore($id: ID!) {
571
571
  ignore(id: $id)
572
572
  }
573
- `,RE=Wt`
573
+ `,_E=Ut`
574
574
  query GetSamplingConfig($organization_verbose_id: String!) {
575
575
  sampling(organization_verbose_id: $organization_verbose_id) {
576
576
  spans {
@@ -619,8 +619,8 @@ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):s
619
619
  }
620
620
  }
621
621
  }
622
- ${em}
623
- `,CE=(t,e,n,r)=>t();function ZE(t,e=CE){return{PushPayload(n,r){return e(i=>t.request(gE,n,j(j({},r),i)),"PushPayload","mutation",n)},PushPayloadCompressed(n,r){return e(i=>t.request(bE,n,j(j({},r),i)),"PushPayloadCompressed","mutation",n)},identifySession(n,r){return e(i=>t.request(vE,n,j(j({},r),i)),"identifySession","mutation",n)},addSessionProperties(n,r){return e(i=>t.request(wE,n,j(j({},r),i)),"addSessionProperties","mutation",n)},pushMetrics(n,r){return e(i=>t.request(SE,n,j(j({},r),i)),"pushMetrics","mutation",n)},addSessionFeedback(n,r){return e(i=>t.request(IE,n,j(j({},r),i)),"addSessionFeedback","mutation",n)},initializeSession(n,r){return e(i=>t.request(TE,n,j(j({},r),i)),"initializeSession","mutation",n)},Ignore(n,r){return e(i=>t.request(EE,n,j(j({},r),i)),"Ignore","query",n)},GetSamplingConfig(n,r){return e(i=>t.request(RE,n,j(j({},r),i)),"GetSamplingConfig","query",n)}}}var tn=(t=>(t.DeviceMemory="DeviceMemory",t.ViewportHeight="ViewportHeight",t.ViewportWidth="ViewportWidth",t.ScreenHeight="ScreenHeight",t.ScreenWidth="ScreenWidth",t.ViewportArea="ViewportArea",t))(tn||{}),Bt=(t=>(t.Device="Device",t.WebVital="WebVital",t.Performance="Performance",t.Frontend="Frontend",t.Backend="Backend",t))(Bt||{});function kE(t,e,n){try{if(!(e in t))return()=>{};let r=t[e],i=n(r);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),t[e]=i,()=>{t[e]=r}}catch(r){return()=>{}}}function VE(t){if(!t||!t.outerHTML)return"";let e="";for(;t.parentElement;){let n=t.localName;if(!n)break;n=n.toLowerCase();let r=t.parentElement,i=[];if(r.children&&r.children.length>0)for(let o=0;o<r.children.length;o++){let s=r.children[o];s.localName&&s.localName.toLowerCase&&s.localName.toLowerCase()===n&&i.push(s)}i.length>1&&(n+=":eq("+i.indexOf(t)+")"),e=n+(e?">"+e:""),t=r}return e}function Ll(t){return Object.prototype.toString.call(t)==="[object Object]"}function nm(t,e){if(e===0)return!0;let n=Object.keys(t);for(let r of n)if(Ll(t[r])&&nm(t[r],e-1))return!0;return!1}function Xl(t,e){let n={numOfKeysLimit:50,depthOfLimit:4};Object.assign(n,e);let r=[],i=[];return JSON.stringify(t,function(a,c){if(r.length>0){let l=r.indexOf(this);~l?r.splice(l+1):r.push(this),~l?i.splice(l,1/0,a):i.push(a),~r.indexOf(c)&&(r[0]===c?c="[Circular ~]":c="[Circular ~."+i.slice(0,r.indexOf(c)).join(".")+"]")}else r.push(c);if(c==null)return c;if(o(c))return s(c);if(c instanceof Event){let l={};for(let u in c){let h=c[u];Array.isArray(h)?l[u]=VE(h.length?h[0]:null):l[u]=h}return l}else{if(c instanceof Node)return c instanceof HTMLElement?c?c.outerHTML:"":c.nodeName;if(c instanceof Error)return c.name+": "+c.message}return c});function o(a){return Ll(a)&&Object.keys(a).length>n.numOfKeysLimit||typeof a=="function"?!0:a instanceof Event&&a.isTrusted===!1?Object.keys(a).length===1:!!(Ll(a)&&nm(a,n.depthOfLimit))}function s(a){let c=a.toString();return n.stringLengthLimit&&c.length>n.stringLengthLimit&&(c=`${c.slice(0,n.stringLengthLimit)}...`),c}}var rm=900*1e3;function zi(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)t[r]=n[r]}return t}var xE={read:function(t){return t[0]==='"'&&(t=t.slice(1,-1)),t.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(t){return encodeURIComponent(t).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function Wl(t,e){function n(i,o,s){if(typeof document<"u"){s=zi({},e,s),typeof s.expires=="number"&&(s.expires=new Date(Date.now()+s.expires*864e5)),s.expires&&(s.expires=s.expires.toUTCString()),i=encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var a="";for(var c in s)s[c]&&(a+="; "+c,s[c]!==!0&&(a+="="+s[c].split(";")[0]));return document.cookie=i+"="+t.write(o,i)+a}}function r(i){if(!(typeof document>"u"||arguments.length&&!i)){for(var o=document.cookie?document.cookie.split("; "):[],s={},a=0;a<o.length;a++){var c=o[a].split("="),l=c.slice(1).join("=");try{var u=decodeURIComponent(c[0]);if(s[u]=t.read(l,u),i===u)break}catch(h){}}return i?s[i]:s}}return Object.create({set:n,get:r,remove:function(i,o){n(i,"",zi({},o,{expires:-1}))},withAttributes:function(i){return Wl(this.converter,zi({},this.attributes,i))},withConverter:function(i){return Wl(zi({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(e)},converter:{value:Object.freeze(t)}})}var Ba=Wl(xE,{path:"/"}),im="localStorage",Ul=!0,NE=class{constructor(){Wr(this,"storage",{})}getItem(t){var e;return(e=this.storage[t])!=null?e:""}setItem(t,e){this.storage[t]=e}removeItem(t){delete this.storage[t]}},OE=class{getItem(t){var e;return(e=Ba.get(t))!=null?e:""}setItem(t,e){if(!Ul)return;let n=new Date;n.setTime(n.getTime()+rm),Ba.set(t,e,{expires:n})}removeItem(t){Ul&&Ba.remove(t)}},Ao=new NE,Ro=new OE,pc=()=>{try{switch(im){case"localStorage":return window.localStorage;case"sessionStorage":return window.sessionStorage}}catch(t){return Ao}},GE=t=>{im=t},ud=t=>{Ul=t},om=t=>{try{return pc().getItem(t)}catch(e){return Ve("storage","debug",`failed to get item ${t}; using global storage`,e),Ao.getItem(t)}},sm=(t,e)=>{Ro.setItem(t,e);try{return pc().setItem(t,e)}catch(n){return Ve("storage","debug",`failed to set item ${t}; using global storage`,n),Ao.setItem(t,e)}},LE=t=>{Ro.removeItem(t);try{return pc().removeItem(t)}catch(e){return Ve("storage","debug",`failed to remove item ${t}; using global storage`,e),Ao.removeItem(t)}},Yr=(t=>(t.SEGMENT_LAST_SENT_HASH_KEY="HIGHLIGHT_SEGMENT_LAST_SENT_HASH_KEY",t.SESSION_ID="sessionID",t.SESSION_DATA="sessionData",t.USER_IDENTIFIER="highlightIdentifier",t.USER_OBJECT="highlightUserObject",t))(Yr||{}),Jo=t=>`${Yr.SESSION_DATA}_${t}`,Fe=()=>{var t;return typeof globalThis<"u"&&(t=globalThis.persistentSessionSecureID)!=null&&t.length?globalThis.persistentSessionSecureID:am()},XE=t=>{typeof globalThis<"u"&&t!=null&&t.length&&(globalThis.persistentSessionSecureID=t)},am=()=>{var t;return(t=om(Yr.SESSION_ID))!=null?t:""},lm=t=>{sm(Yr.SESSION_ID,t)},WE=t=>{let e=Jo(t);return JSON.parse(om(e)||"{}")},UE=t=>{t||(t=am());let e=WE(t);if(e&&e.lastPushTime&&Date.now()-e.lastPushTime<rm)return e;LE(Jo(t))},cm=function(t){if(!(t!=null&&t.sessionSecureID))return;let e=t.sessionSecureID;XE(e),sm(Jo(e),JSON.stringify(t))},PE=function(){let t=Ro.getItem(Yr.SESSION_ID);lm(t);let e=Jo(t),n=Ro.getItem(e);try{cm(JSON.parse(n))}catch(r){}},um=(t=>(t.BillingQuotaExceeded="BillingQuotaExceeded",t))(um||{}),dc=10,fc=1e3,mc=500,ME=[um.BillingQuotaExceeded.toString()],FE=t=>{var e;return((e=t.response.errors)==null?void 0:e.find(n=>ME.includes(n.message)))===void 0},AE=()=>{let t=(e,n,r,i,o=0)=>Dn(void 0,null,function*(){try{return yield e()}catch(s){if(s instanceof $f&&!FE(s))throw s;if(o<dc)return yield new Promise(a=>setTimeout(a,fc+mc*Math.pow(2,o))),yield t(e,n,r,i,o+1);throw console.error(`highlight.io: data request failed after ${o} retries`),s}});return t},Lt="feature_flag",hm="launchdarkly",JE="evaluation",DE=`${Lt}.set.id`,YE=`${Lt}.key`,KE=`${Lt}.contextKeys`,_E=`${Lt}.context.id`,HE=`${Lt}.result.value`,zE=`${Lt}.provider.name`,hd={kind:`${Lt}.result.reason.kind`,errorKind:`${Lt}.result.reason.errorKind`,ruleIndex:`${Lt}.result.reason.ruleIndex`,ruleId:`${Lt}.result.reason.ruleId`,prerequisiteKey:`${Lt}.result.reason.prerequisiteKey`,inExperiment:`${Lt}.result.reason.inExperiment`,bigSegmentsStatus:`${Lt}.result.reason.bigSegmentsStatus`},BE=`${Lt}.result.variationIndex`,jE=`${hm}.application.id`,QE=`${hm}.application.version`,$E="$ld:telemetry:session:init",qE="$ld:telemetry:error",pd="$ld:telemetry:track",tR="$ld:telemetry:metric",pm="document_load",eR="result.status";function dm(t){return t.includes("%")||t.includes(":")?t.replace(/%/g,"%25").replace(/:/g,"%3A"):t}function fm(t){return t.kind==="multi"}function dd(t){return fm(t)?Object.keys(t).sort().filter(e=>e!=="kind").map(e=>`${e}:${dm(t[e].key)}`).join(":"):t.key}function fd(t){return fm(t)?Object.keys(t).sort().filter(e=>e!=="kind").map(e=>({[e]:dm(t[e].key)})).reduce((e,n)=>j(j({},e),n),{}):t.key}var nR=class{constructor(t,e){Wr(this,"client"),Wr(this,"metadata"),this.client=t,this.metadata=e}getHooks(t){return[]}init(t){this.client.track($E,{sessionID:t})}recordGauge(t,e){var n;e.category!==Bt.WebVital&&e.name!==pm||e.name!=="Jank"&&this.client.track(`${tR}:${e.name.toLowerCase()}`,An(j({},(n=e.tags)==null?void 0:n.map(r=>({[r.name]:r.value})).reduce((r,i)=>j(j({},r),i),{})),{category:e.category,group:e.group,sessionID:t}),e.value)}identify(t,e,n={},r){}error(t,e){this.client.track(qE,An(j({},e),{sessionID:t}))}track(t,e){let n=e.event;this.client.track(n?`${pd}:${n}`:pd,An(j({},e),{sessionID:t}))}},rR=class extends vo{constructor(t,e){super(),Wr(this,"client"),this.client=new nR(t,e)}getHooks(t){return[{getMetadata:()=>({name:"highlight.run/ld"}),afterIdentify:(e,n,r)=>(this.load(this.client),n)}]}init(t){return this.h("init",[t])}recordGauge(t,e){return this.h("recordGauge",[t,e])}identify(t,e,n={},r){return this.h("identify",[t,e,n,r])}error(t,e){return this.h("error",[t,e])}track(t,e){return this.h("track",[t,e])}};function iR(t){if(t.id.length)return`#${t.id}`;if(t.classList.length){let e=[];for(let n of t.classList)e.push(`.${n}`);return`${t.nodeName.toLowerCase()}${e.join(",")}`}return t.nodeName.toLowerCase()}var oR=t=>{let e,n=()=>{clearTimeout(e),e=setTimeout(()=>{var r,i;t({height:window.innerHeight,width:window.innerWidth,availHeight:window.screen.availHeight,availWidth:window.screen.availWidth,colorDepth:window.screen.colorDepth,pixelDepth:window.screen.pixelDepth,orientation:(i=(r=window.screen.orientation)==null?void 0:r.angle)!=null?i:0})},500)};return window.addEventListener("resize",n),n(),()=>window.removeEventListener("resize",n)},sR=()=>{var t;let e="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";var n="";let r=typeof window<"u"&&((t=window.crypto)==null?void 0:t.getRandomValues),i=new Uint32Array(28);r&&window.crypto.getRandomValues(i);for(let o=0;o<28;o++)r?n+=e.charAt(i[o]%e.length):n+=e.charAt(Math.floor(Math.random()*e.length));return n},aR=class{constructor(t){Wr(this,"sessionSecureID");try{t!=null&&t.storageMode&&GE(t==null?void 0:t.storageMode),ud(!!(t!=null&&t.sessionCookie)),t!=null&&t.sessionCookie?PE():ud(!1);let e=Fe(),n=UE(e);n!=null&&n.sessionSecureID?this.sessionSecureID=n.sessionSecureID:(this.sessionSecureID=sR(),lm(this.sessionSecureID),cm({sessionSecureID:this.sessionSecureID,projectID:0,payloadID:1,sessionStartTime:Date.now(),lastPushTime:Date.now()}))}catch(e){Ve("Error initializing @launchdarkly observability plugin","error",e)}}},Co=class extends vo{recordGauge(e){return this.h("recordGauge",[e])}recordCount(e){return this.h("recordCount",[e])}recordIncr(e){return this.h("recordIncr",[e])}recordHistogram(e){return this.h("recordHistogram",[e])}recordUpDownCounter(e){return this.h("recordUpDownCounter",[e])}startSpan(e,n,r,i){return this.h("startSpan",[e,n,r,i])}startManualSpan(e,n,r,i){return this.h("startManualSpan",[e,n,r,i])}register(e,n){return this.h("register",[e,n])}recordLog(e,n,r){return this.h("recordLog",[e,n,r])}recordError(e,n,r,i,o){return this.h("recordError",[e,n,r,i,o])}},ln;typeof globalThis<"u"?globalThis.LDObserve?ln=globalThis.LDObserve:(ln=new Co,globalThis.LDObserve=ln):ln=new Co;var lR=Object.freeze(Object.defineProperty({__proto__:null,get LDObserve(){return ln}},Symbol.toStringTag,{value:"Module"})),cR=Object.defineProperty,uR=Object.defineProperties,hR=Object.getOwnPropertyDescriptors,md=Object.getOwnPropertySymbols,pR=Object.prototype.hasOwnProperty,dR=Object.prototype.propertyIsEnumerable,Pl=(t,e,n)=>e in t?cR(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,mt=(t,e)=>{for(var n in e||(e={}))pR.call(e,n)&&Pl(t,n,e[n]);if(md)for(var n of md(e))dR.call(e,n)&&Pl(t,n,e[n]);return t},Jt=(t,e)=>uR(t,hR(e)),yt=(t,e,n)=>Pl(t,typeof e!="symbol"?e+"":e,n),Do=(t,e,n)=>new Promise((r,i)=>{var o=c=>{try{a(n.next(c))}catch(l){i(l)}},s=c=>{try{a(n.throw(c))}catch(l){i(l)}},a=c=>c.done?r(c.value):Promise.resolve(c.value).then(o,s);a((n=n.apply(t,e)).next())}),mm={exports:{}},yd={exports:{}},gd;function fR(){return gd||(gd=1,(function(t,e){(function(n,r){t.exports=r()})(uc,function(){function n(d){return!isNaN(parseFloat(d))&&isFinite(d)}function r(d){return d.charAt(0).toUpperCase()+d.substring(1)}function i(d){return function(){return this[d]}}var o=["isConstructor","isEval","isNative","isToplevel"],s=["columnNumber","lineNumber"],a=["fileName","functionName","source"],c=["args"],l=["evalOrigin"],u=o.concat(s,a,c,l);function h(d){if(d)for(var v=0;v<u.length;v++)d[u[v]]!==void 0&&this["set"+r(u[v])](d[u[v]])}h.prototype={getArgs:function(){return this.args},setArgs:function(d){if(Object.prototype.toString.call(d)!=="[object Array]")throw new TypeError("Args must be an Array");this.args=d},getEvalOrigin:function(){return this.evalOrigin},setEvalOrigin:function(d){if(d instanceof h)this.evalOrigin=d;else if(d instanceof Object)this.evalOrigin=new h(d);else throw new TypeError("Eval Origin must be an Object or StackFrame")},toString:function(){var d=this.getFileName()||"",v=this.getLineNumber()||"",g=this.getColumnNumber()||"",w=this.getFunctionName()||"";return this.getIsEval()?d?"[eval] ("+d+":"+v+":"+g+")":"[eval]:"+v+":"+g:w?w+" ("+d+":"+v+":"+g+")":d+":"+v+":"+g}},h.fromString=function(d){var v=d.indexOf("("),g=d.lastIndexOf(")"),w=d.substring(0,v),R=d.substring(v+1,g).split(","),E=d.substring(g+1);if(E.indexOf("@")===0)var T=/@(.+?)(?::(\d+))?(?::(\d+))?$/.exec(E,""),V=T[1],N=T[2],U=T[3];return new h({functionName:w,args:R||void 0,fileName:V,lineNumber:N||void 0,columnNumber:U||void 0})};for(var p=0;p<o.length;p++)h.prototype["get"+r(o[p])]=i(o[p]),h.prototype["set"+r(o[p])]=(function(d){return function(v){this[d]=!!v}})(o[p]);for(var f=0;f<s.length;f++)h.prototype["get"+r(s[f])]=i(s[f]),h.prototype["set"+r(s[f])]=(function(d){return function(v){if(!n(v))throw new TypeError(d+" must be a Number");this[d]=Number(v)}})(s[f]);for(var m=0;m<a.length;m++)h.prototype["get"+r(a[m])]=i(a[m]),h.prototype["set"+r(a[m])]=(function(d){return function(v){this[d]=String(v)}})(a[m]);return h})})(yd)),yd.exports}(function(t,e){(function(n,r){t.exports=r(fR())})(uc,function(n){var r=/(^|@)\S+:\d+/,i=/^\s*at .*(\S+:\d+|\(native\))/m,o=/^(eval@)?(\[native code])?$/;return{parse:function(s){if(typeof s.stacktrace<"u"||typeof s["opera#sourceloc"]<"u")return this.parseOpera(s);if(s.stack&&s.stack.match(i))return this.parseV8OrIE(s);if(s.stack)return this.parseFFOrSafari(s);throw new Error("Cannot parse given Error object")},extractLocation:function(s){if(s.indexOf(":")===-1)return[s];var a=/(.+?)(?::(\d+))?(?::(\d+))?$/,c=a.exec(s.replace(/[()]/g,""));return[c[1],c[2]||void 0,c[3]||void 0]},parseV8OrIE:function(s){var a=s.stack.split(`
622
+ ${dm}
623
+ `,HE=(t,e,n,r)=>t();function zE(t,e=HE){return{PushPayload(n,r){return e(i=>t.request(PE,n,j(j({},r),i)),"PushPayload","mutation",n)},PushPayloadCompressed(n,r){return e(i=>t.request(ME,n,j(j({},r),i)),"PushPayloadCompressed","mutation",n)},identifySession(n,r){return e(i=>t.request(FE,n,j(j({},r),i)),"identifySession","mutation",n)},addSessionProperties(n,r){return e(i=>t.request(AE,n,j(j({},r),i)),"addSessionProperties","mutation",n)},pushMetrics(n,r){return e(i=>t.request(JE,n,j(j({},r),i)),"pushMetrics","mutation",n)},addSessionFeedback(n,r){return e(i=>t.request(DE,n,j(j({},r),i)),"addSessionFeedback","mutation",n)},initializeSession(n,r){return e(i=>t.request(YE,n,j(j({},r),i)),"initializeSession","mutation",n)},Ignore(n,r){return e(i=>t.request(KE,n,j(j({},r),i)),"Ignore","query",n)},GetSamplingConfig(n,r){return e(i=>t.request(_E,n,j(j({},r),i)),"GetSamplingConfig","query",n)}}}var en=(t=>(t.DeviceMemory="DeviceMemory",t.ViewportHeight="ViewportHeight",t.ViewportWidth="ViewportWidth",t.ScreenHeight="ScreenHeight",t.ScreenWidth="ScreenWidth",t.ViewportArea="ViewportArea",t))(en||{}),Qt=(t=>(t.Device="Device",t.WebVital="WebVital",t.Performance="Performance",t.Frontend="Frontend",t.Backend="Backend",t))(Qt||{});function BE(t,e,n){try{if(!(e in t))return()=>{};let r=t[e],i=n(r);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),t[e]=i,()=>{t[e]=r}}catch(r){return()=>{}}}function jE(t){if(!t||!t.outerHTML)return"";let e="";for(;t.parentElement;){let n=t.localName;if(!n)break;n=n.toLowerCase();let r=t.parentElement,i=[];if(r.children&&r.children.length>0)for(let o=0;o<r.children.length;o++){let s=r.children[o];s.localName&&s.localName.toLowerCase&&s.localName.toLowerCase()===n&&i.push(s)}i.length>1&&(n+=":eq("+i.indexOf(t)+")"),e=n+(e?">"+e:""),t=r}return e}function Fl(t){return Object.prototype.toString.call(t)==="[object Object]"}function fm(t,e){if(e===0)return!0;let n=Object.keys(t);for(let r of n)if(Fl(t[r])&&fm(t[r],e-1))return!0;return!1}function Al(t,e){let n={numOfKeysLimit:50,depthOfLimit:4};Object.assign(n,e);let r=[],i=[];return JSON.stringify(t,function(a,c){if(r.length>0){let l=r.indexOf(this);~l?r.splice(l+1):r.push(this),~l?i.splice(l,1/0,a):i.push(a),~r.indexOf(c)&&(r[0]===c?c="[Circular ~]":c="[Circular ~."+i.slice(0,r.indexOf(c)).join(".")+"]")}else r.push(c);if(c==null)return c;if(o(c))return s(c);if(c instanceof Event){let l={};for(let u in c){let h=c[u];Array.isArray(h)?l[u]=jE(h.length?h[0]:null):l[u]=h}return l}else{if(c instanceof Node)return c instanceof HTMLElement?c?c.outerHTML:"":c.nodeName;if(c instanceof Error)return c.name+": "+c.message}return c});function o(a){return Fl(a)&&Object.keys(a).length>n.numOfKeysLimit||typeof a=="function"?!0:a instanceof Event&&a.isTrusted===!1?Object.keys(a).length===1:!!(Fl(a)&&fm(a,n.depthOfLimit))}function s(a){let c=a.toString();return n.stringLengthLimit&&c.length>n.stringLengthLimit&&(c=`${c.slice(0,n.stringLengthLimit)}...`),c}}var mm=900*1e3;function Qi(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)t[r]=n[r]}return t}var QE={read:function(t){return t[0]==='"'&&(t=t.slice(1,-1)),t.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(t){return encodeURIComponent(t).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function Jl(t,e){function n(i,o,s){if(typeof document<"u"){s=Qi({},e,s),typeof s.expires=="number"&&(s.expires=new Date(Date.now()+s.expires*864e5)),s.expires&&(s.expires=s.expires.toUTCString()),i=encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var a="";for(var c in s)s[c]&&(a+="; "+c,s[c]!==!0&&(a+="="+s[c].split(";")[0]));return document.cookie=i+"="+t.write(o,i)+a}}function r(i){if(!(typeof document>"u"||arguments.length&&!i)){for(var o=document.cookie?document.cookie.split("; "):[],s={},a=0;a<o.length;a++){var c=o[a].split("="),l=c.slice(1).join("=");try{var u=decodeURIComponent(c[0]);if(s[u]=t.read(l,u),i===u)break}catch(h){}}return i?s[i]:s}}return Object.create({set:n,get:r,remove:function(i,o){n(i,"",Qi({},o,{expires:-1}))},withAttributes:function(i){return Jl(this.converter,Qi({},this.attributes,i))},withConverter:function(i){return Jl(Qi({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(e)},converter:{value:Object.freeze(t)}})}var el=Jl(QE,{path:"/"}),ym="localStorage",Dl=!0,$E=class{constructor(){Pr(this,"storage",{})}getItem(t){var e;return(e=this.storage[t])!=null?e:""}setItem(t,e){this.storage[t]=e}removeItem(t){delete this.storage[t]}},qE=class{getItem(t){var e;return(e=el.get(t))!=null?e:""}setItem(t,e){if(!Dl)return;let n=new Date;n.setTime(n.getTime()+mm),el.set(t,e,{expires:n})}removeItem(t){Dl&&el.remove(t)}},Yo=new $E,ko=new qE,bc=()=>{try{switch(ym){case"localStorage":return window.localStorage;case"sessionStorage":return window.sessionStorage}}catch(t){return Yo}},tR=t=>{ym=t},Id=t=>{Dl=t},gm=t=>{try{return bc().getItem(t)}catch(e){return xe("storage","debug",`failed to get item ${t}; using global storage`,e),Yo.getItem(t)}},bm=(t,e)=>{ko.setItem(t,e);try{return bc().setItem(t,e)}catch(n){return xe("storage","debug",`failed to set item ${t}; using global storage`,n),Yo.setItem(t,e)}},eR=t=>{ko.removeItem(t);try{return bc().removeItem(t)}catch(e){return xe("storage","debug",`failed to remove item ${t}; using global storage`,e),Yo.removeItem(t)}},_r=(t=>(t.SEGMENT_LAST_SENT_HASH_KEY="HIGHLIGHT_SEGMENT_LAST_SENT_HASH_KEY",t.SESSION_ID="sessionID",t.SESSION_DATA="sessionData",t.USER_IDENTIFIER="highlightIdentifier",t.USER_OBJECT="highlightUserObject",t))(_r||{}),Ko=t=>`${_r.SESSION_DATA}_${t}`,Ae=()=>{var t;return typeof globalThis<"u"&&(t=globalThis.persistentSessionSecureID)!=null&&t.length?globalThis.persistentSessionSecureID:vm()},nR=t=>{typeof globalThis<"u"&&t!=null&&t.length&&(globalThis.persistentSessionSecureID=t)},vm=()=>{var t;return(t=gm(_r.SESSION_ID))!=null?t:""},wm=t=>{bm(_r.SESSION_ID,t)},rR=t=>{let e=Ko(t);return JSON.parse(gm(e)||"{}")},iR=t=>{t||(t=vm());let e=rR(t);if(e&&e.lastPushTime&&Date.now()-e.lastPushTime<mm)return e;eR(Ko(t))},Sm=function(t){if(!(t!=null&&t.sessionSecureID))return;let e=t.sessionSecureID;nR(e),bm(Ko(e),JSON.stringify(t))},oR=function(){let t=ko.getItem(_r.SESSION_ID);wm(t);let e=Ko(t),n=ko.getItem(e);try{Sm(JSON.parse(n))}catch(r){}},Im=(t=>(t.BillingQuotaExceeded="BillingQuotaExceeded",t))(Im||{}),vc=10,wc=1e3,Sc=500,sR=[Im.BillingQuotaExceeded.toString()],aR=t=>{var e;return((e=t.response.errors)==null?void 0:e.find(n=>sR.includes(n.message)))===void 0},lR=()=>{let t=(e,n,r,i,o=0)=>Yn(void 0,null,function*(){try{return yield e()}catch(s){if(s instanceof um&&!aR(s))throw s;if(o<vc)return yield new Promise(a=>setTimeout(a,wc+Sc*Math.pow(2,o))),yield t(e,n,r,i,o+1);throw console.error(`highlight.io: data request failed after ${o} retries`),s}});return t},Xt="feature_flag",Tm="launchdarkly",cR="evaluation",uR=`${Xt}.set.id`,hR=`${Xt}.key`,pR=`${Xt}.contextKeys`,dR=`${Xt}.context.id`,fR=`${Xt}.result.value`,mR=`${Xt}.provider.name`,Td={kind:`${Xt}.result.reason.kind`,errorKind:`${Xt}.result.reason.errorKind`,ruleIndex:`${Xt}.result.reason.ruleIndex`,ruleId:`${Xt}.result.reason.ruleId`,prerequisiteKey:`${Xt}.result.reason.prerequisiteKey`,inExperiment:`${Xt}.result.reason.inExperiment`,bigSegmentsStatus:`${Xt}.result.reason.bigSegmentsStatus`},yR=`${Xt}.result.variationIndex`,gR=`${Tm}.application.id`,bR=`${Tm}.application.version`,vR="$ld:telemetry:session:init",wR="$ld:telemetry:error",Ed="$ld:telemetry:track",SR="$ld:telemetry:metric",Em="document_load",IR="result.status";function Rm(t){return t.includes("%")||t.includes(":")?t.replace(/%/g,"%25").replace(/:/g,"%3A"):t}function Cm(t){return t.kind==="multi"}function Rd(t){return Cm(t)?Object.keys(t).sort().filter(e=>e!=="kind").map(e=>`${e}:${Rm(t[e].key)}`).join(":"):t.key}function Cd(t){return Cm(t)?Object.keys(t).sort().filter(e=>e!=="kind").map(e=>({[e]:Rm(t[e].key)})).reduce((e,n)=>j(j({},e),n),{}):t.key}var TR=class{constructor(t,e){Pr(this,"client"),Pr(this,"metadata"),this.client=t,this.metadata=e}getHooks(t){return[]}init(t){this.client.track(vR,{sessionID:t})}recordGauge(t,e){var n;e.category!==Qt.WebVital&&e.name!==Em||e.name!=="Jank"&&this.client.track(`${SR}:${e.name.toLowerCase()}`,Jn(j({},(n=e.tags)==null?void 0:n.map(r=>({[r.name]:r.value})).reduce((r,i)=>j(j({},r),i),{})),{category:e.category,group:e.group,sessionID:t}),e.value)}identify(t,e,n={},r){}error(t,e){this.client.track(wR,Jn(j({},e),{sessionID:t}))}track(t,e){let n=e.event;this.client.track(n?`${Ed}:${n}`:Ed,Jn(j({},e),{sessionID:t}))}},ER=class extends Io{constructor(t,e){super(),Pr(this,"client"),this.client=new TR(t,e)}getHooks(t){return[{getMetadata:()=>({name:"highlight.run/ld"}),afterIdentify:(e,n,r)=>(this.load(this.client),n)}]}init(t){return this.p("init",[t])}recordGauge(t,e){return this.p("recordGauge",[t,e])}identify(t,e,n={},r){return this.p("identify",[t,e,n,r])}error(t,e){return this.p("error",[t,e])}track(t,e){return this.p("track",[t,e])}};function RR(t){if(t.id.length)return`#${t.id}`;if(t.classList.length){let e=[];for(let n of t.classList)e.push(`.${n}`);return`${t.nodeName.toLowerCase()}${e.join(",")}`}return t.nodeName.toLowerCase()}var CR=t=>{let e,n=()=>{clearTimeout(e),e=setTimeout(()=>{var r,i;t({height:window.innerHeight,width:window.innerWidth,availHeight:window.screen.availHeight,availWidth:window.screen.availWidth,colorDepth:window.screen.colorDepth,pixelDepth:window.screen.pixelDepth,orientation:(i=(r=window.screen.orientation)==null?void 0:r.angle)!=null?i:0})},500)};return window.addEventListener("resize",n),n(),()=>window.removeEventListener("resize",n)},ZR=()=>{var t;let e="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";var n="";let r=typeof window<"u"&&((t=window.crypto)==null?void 0:t.getRandomValues),i=new Uint32Array(28);r&&window.crypto.getRandomValues(i);for(let o=0;o<28;o++)r?n+=e.charAt(i[o]%e.length):n+=e.charAt(Math.floor(Math.random()*e.length));return n},kR=class{constructor(t){Pr(this,"sessionSecureID");try{t!=null&&t.storageMode&&tR(t==null?void 0:t.storageMode),Id(!!(t!=null&&t.sessionCookie)),t!=null&&t.sessionCookie?oR():Id(!1);let e=Ae(),n=iR(e);n!=null&&n.sessionSecureID?this.sessionSecureID=n.sessionSecureID:(this.sessionSecureID=ZR(),wm(this.sessionSecureID),Sm({sessionSecureID:this.sessionSecureID,projectID:0,payloadID:1,sessionStartTime:Date.now(),lastPushTime:Date.now()}))}catch(e){xe("Error initializing @launchdarkly observability plugin","error",e)}}},Vo=class extends Io{recordGauge(e){return this.p("recordGauge",[e])}recordCount(e){return this.p("recordCount",[e])}recordIncr(e){return this.p("recordIncr",[e])}recordHistogram(e){return this.p("recordHistogram",[e])}recordUpDownCounter(e){return this.p("recordUpDownCounter",[e])}startSpan(e,n,r,i){return this.p("startSpan",[e,n,r,i])}startManualSpan(e,n,r,i){return this.p("startManualSpan",[e,n,r,i])}register(e,n){return this.p("register",[e,n])}recordLog(e,n,r){return this.p("recordLog",[e,n,r])}recordError(e,n,r,i,o){return this.p("recordError",[e,n,r,i,o])}},cn;typeof globalThis<"u"?globalThis.LDObserve?cn=globalThis.LDObserve:(cn=new Vo,globalThis.LDObserve=cn):cn=new Vo;var VR=Object.freeze(Object.defineProperty({__proto__:null,get LDObserve(){return cn}},Symbol.toStringTag,{value:"Module"})),xR=Object.defineProperty,OR=Object.defineProperties,NR=Object.getOwnPropertyDescriptors,Zd=Object.getOwnPropertySymbols,GR=Object.prototype.hasOwnProperty,LR=Object.prototype.propertyIsEnumerable,Yl=(t,e,n)=>e in t?xR(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,mt=(t,e)=>{for(var n in e||(e={}))GR.call(e,n)&&Yl(t,n,e[n]);if(Zd)for(var n of Zd(e))LR.call(e,n)&&Yl(t,n,e[n]);return t},Dt=(t,e)=>OR(t,NR(e)),yt=(t,e,n)=>Yl(t,typeof e!="symbol"?e+"":e,n),_o=(t,e,n)=>new Promise((r,i)=>{var o=c=>{try{a(n.next(c))}catch(l){i(l)}},s=c=>{try{a(n.throw(c))}catch(l){i(l)}},a=c=>c.done?r(c.value):Promise.resolve(c.value).then(o,s);a((n=n.apply(t,e)).next())}),Zm={exports:{}},kd={exports:{}},Vd;function XR(){return Vd||(Vd=1,(function(t,e){(function(n,r){t.exports=r()})(yc,function(){function n(d){return!isNaN(parseFloat(d))&&isFinite(d)}function r(d){return d.charAt(0).toUpperCase()+d.substring(1)}function i(d){return function(){return this[d]}}var o=["isConstructor","isEval","isNative","isToplevel"],s=["columnNumber","lineNumber"],a=["fileName","functionName","source"],c=["args"],l=["evalOrigin"],u=o.concat(s,a,c,l);function h(d){if(d)for(var v=0;v<u.length;v++)d[u[v]]!==void 0&&this["set"+r(u[v])](d[u[v]])}h.prototype={getArgs:function(){return this.args},setArgs:function(d){if(Object.prototype.toString.call(d)!=="[object Array]")throw new TypeError("Args must be an Array");this.args=d},getEvalOrigin:function(){return this.evalOrigin},setEvalOrigin:function(d){if(d instanceof h)this.evalOrigin=d;else if(d instanceof Object)this.evalOrigin=new h(d);else throw new TypeError("Eval Origin must be an Object or StackFrame")},toString:function(){var d=this.getFileName()||"",v=this.getLineNumber()||"",g=this.getColumnNumber()||"",w=this.getFunctionName()||"";return this.getIsEval()?d?"[eval] ("+d+":"+v+":"+g+")":"[eval]:"+v+":"+g:w?w+" ("+d+":"+v+":"+g+")":d+":"+v+":"+g}},h.fromString=function(d){var v=d.indexOf("("),g=d.lastIndexOf(")"),w=d.substring(0,v),R=d.substring(v+1,g).split(","),E=d.substring(g+1);if(E.indexOf("@")===0)var T=/@(.+?)(?::(\d+))?(?::(\d+))?$/.exec(E,""),x=T[1],N=T[2],U=T[3];return new h({functionName:w,args:R||void 0,fileName:x,lineNumber:N||void 0,columnNumber:U||void 0})};for(var p=0;p<o.length;p++)h.prototype["get"+r(o[p])]=i(o[p]),h.prototype["set"+r(o[p])]=(function(d){return function(v){this[d]=!!v}})(o[p]);for(var f=0;f<s.length;f++)h.prototype["get"+r(s[f])]=i(s[f]),h.prototype["set"+r(s[f])]=(function(d){return function(v){if(!n(v))throw new TypeError(d+" must be a Number");this[d]=Number(v)}})(s[f]);for(var m=0;m<a.length;m++)h.prototype["get"+r(a[m])]=i(a[m]),h.prototype["set"+r(a[m])]=(function(d){return function(v){this[d]=String(v)}})(a[m]);return h})})(kd)),kd.exports}(function(t,e){(function(n,r){t.exports=r(XR())})(yc,function(n){var r=/(^|@)\S+:\d+/,i=/^\s*at .*(\S+:\d+|\(native\))/m,o=/^(eval@)?(\[native code])?$/;return{parse:function(s){if(typeof s.stacktrace<"u"||typeof s["opera#sourceloc"]<"u")return this.parseOpera(s);if(s.stack&&s.stack.match(i))return this.parseV8OrIE(s);if(s.stack)return this.parseFFOrSafari(s);throw new Error("Cannot parse given Error object")},extractLocation:function(s){if(s.indexOf(":")===-1)return[s];var a=/(.+?)(?::(\d+))?(?::(\d+))?$/,c=a.exec(s.replace(/[()]/g,""));return[c[1],c[2]||void 0,c[3]||void 0]},parseV8OrIE:function(s){var a=s.stack.split(`
624
624
  `).filter(function(c){return!!c.match(i)},this);return a.map(function(c){c.indexOf("(eval ")>-1&&(c=c.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(\),.*$)/g,""));var l=c.replace(/^\s+/,"").replace(/\(eval code/g,"("),u=l.match(/ (\((.+):(\d+):(\d+)\)$)/);l=u?l.replace(u[0],""):l;var h=l.split(/\s+/).slice(1),p=this.extractLocation(u?u[1]:h.pop()),f=h.join(" ")||void 0,m=["eval","<anonymous>"].indexOf(p[0])>-1?void 0:p[0];return new n({functionName:f,fileName:m,lineNumber:p[1],columnNumber:p[2],source:c})},this)},parseFFOrSafari:function(s){var a=s.stack.split(`
625
625
  `).filter(function(c){return!c.match(o)},this);return a.map(function(c){if(c.indexOf(" > eval")>-1&&(c=c.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),c.indexOf("@")===-1&&c.indexOf(":")===-1)return new n({functionName:c});var l=/((.*".+"[^@]*)?[^@]*)(?:@)/,u=c.match(l),h=u&&u[1]?u[1]:void 0,p=this.extractLocation(c.replace(l,""));return new n({functionName:h,fileName:p[0],lineNumber:p[1],columnNumber:p[2],source:c})},this)},parseOpera:function(s){return!s.stacktrace||s.message.indexOf(`
626
626
  `)>-1&&s.message.split(`
@@ -628,19 +628,19 @@ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):s
628
628
  `).length?this.parseOpera9(s):s.stack?this.parseOpera11(s):this.parseOpera10(s)},parseOpera9:function(s){for(var a=/Line (\d+).*script (?:in )?(\S+)/i,c=s.message.split(`
629
629
  `),l=[],u=2,h=c.length;u<h;u+=2){var p=a.exec(c[u]);p&&l.push(new n({fileName:p[2],lineNumber:p[1],source:c[u]}))}return l},parseOpera10:function(s){for(var a=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,c=s.stacktrace.split(`
630
630
  `),l=[],u=0,h=c.length;u<h;u+=2){var p=a.exec(c[u]);p&&l.push(new n({functionName:p[3]||void 0,fileName:p[2],lineNumber:p[1],source:c[u]}))}return l},parseOpera11:function(s){var a=s.stack.split(`
631
- `).filter(function(c){return!!c.match(r)&&!c.match(/^Error created at/)},this);return a.map(function(c){var l=c.split("@"),u=this.extractLocation(l.pop()),h=l.shift()||"",p=h.replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^)]*\)/g,"")||void 0,f;h.match(/\(([^)]*)\)/)&&(f=h.replace(/^[^(]+\(([^)]*)\)$/,"$1"));var m=f===void 0||f==="[arguments not available]"?void 0:f.split(",");return new n({functionName:p,args:m,fileName:u[0],lineNumber:u[1],columnNumber:u[2],source:c})},this)}}})})(mm);var mR=mm.exports,bd=hc(mR);function Yo(t){try{return bd.parse(t)}catch(e){try{return bd.parse(new Error)}catch(n){return console.warn("Highlight Warning: failed to parse error",{originalError:e,secondaryError:n}),[]}}}function yR(t,e){let n=e.logger,r;r=window[n];let i=[];if(e.level.includes("error")&&window){let s=a=>{let{message:c,error:l}=a,u=[];l&&(u=Yo(l));let h=[Xl(c,e.stringifyOptions)];t({type:"Error",trace:u,time:Date.now(),value:h})};window.addEventListener("error",s),i.push(()=>{window&&window.removeEventListener("error",s)})}for(let s of e.level)i.push(o(r,s));return()=>{i.forEach(s=>s())};function o(s,a){return s[a]?kE(s,a,c=>(...l)=>{c.apply(this,l);try{t(gR(a,e,...l))}catch(u){c("highlight logger error:",u,...l)}}):()=>{}}}function gR(t,e,...n){let r=Yo(new Error),i=e.serializeConsoleAttributes?n.map(o=>typeof o=="object"?Xl(o,e.stringifyOptions):o):n.filter(o=>typeof o!="object").map(o=>`${o}`);return{type:t,trace:r.slice(1),value:i,attributes:Xl(n.filter(o=>typeof o=="object").reduce((o,s)=>mt(mt({},o),s),{}),e.stringifyOptions),time:Date.now()}}function ja(t,e,n,r){var i,o,s,a;let c=r!=null?r:e,l=Yo(c),u={};e instanceof Error&&(e=e.message,e.cause&&(u={"exception.cause":e.cause}));let h=vR(l);t({error:c,event:rn(e),type:"window.onerror",url:window.location.href,source:n!=null?n:"",lineNumber:(i=h[0])!=null&&i.lineNumber?(o=h[0])==null?void 0:o.lineNumber:0,columnNumber:(s=h[0])!=null&&s.columnNumber?(a=h[0])==null?void 0:a.columnNumber:0,stackTrace:h,timestamp:new Date().toISOString(),payload:u?rn(u):void 0})}var bR=(t,{enablePromisePatch:e})=>{if(typeof window>"u")return()=>{};let n=window.onerror=(s,a,c,l,u)=>{ja(t,s,a,u)},r=window.onunhandledrejection=s=>{if(s.reason){let a=s.promise;a.getStack?ja(t,s.reason,s.type,a.getStack()):ja(t,s.reason,s.type)}},i=window.Promise,o=class extends i{constructor(s){super(s),yt(this,"promiseCreationError"),this.promiseCreationError=new Error}getStack(){return this.promiseCreationError}static shouldPatch(){let s=typeof window.Zone>"u";return e&&s}};return o.shouldPatch()&&(window.Promise=o),()=>{window.Promise=i,window.onunhandledrejection=r,window.onerror=n}},vR=t=>{var e,n;if(t.length===0)return t;let r=t[0];return(e=r.fileName)!=null&&e.includes("highlight.run")||(n=r.fileName)!=null&&n.includes("highlight.io")||r.functionName==="new highlightPromise"?t.slice(1):t},vd=['["\\"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}','["{}"]','"{}"','[""]','""','["\\"\\""]','""'],wd=["websocket error",'\\"ResizeObserver loop'],wR=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{},cn="1.9.0",Sd=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;function SR(t){var e=new Set([t]),n=new Set,r=t.match(Sd);if(!r)return function(){return!1};var i={major:+r[1],minor:+r[2],patch:+r[3],prerelease:r[4]};if(i.prerelease!=null)return function(a){return a===t};function o(a){return n.add(a),!1}function s(a){return e.add(a),!0}return function(a){if(e.has(a))return!0;if(n.has(a))return!1;var c=a.match(Sd);if(!c)return o(a);var l={major:+c[1],minor:+c[2],patch:+c[3],prerelease:c[4]};return l.prerelease!=null||i.major!==l.major?o(a):i.major===0?i.minor===l.minor&&i.patch<=l.patch?s(a):o(a):i.minor<=l.minor?s(a):o(a)}}var IR=SR(cn),TR=cn.split(".")[0],Pr=Symbol.for("opentelemetry.js.api."+TR),Mr=wR;function Kr(t,e,n,r){var i;r===void 0&&(r=!1);var o=Mr[Pr]=(i=Mr[Pr])!==null&&i!==void 0?i:{version:cn};if(!r&&o[t]){var s=new Error("@opentelemetry/api: Attempted duplicate registration of API: "+t);return n.error(s.stack||s.message),!1}if(o.version!==cn){var s=new Error("@opentelemetry/api: Registration of version v"+o.version+" for "+t+" does not match previously registered API v"+cn);return n.error(s.stack||s.message),!1}return o[t]=e,n.debug("@opentelemetry/api: Registered a global for "+t+" v"+cn+"."),!0}function pn(t){var e,n,r=(e=Mr[Pr])===null||e===void 0?void 0:e.version;if(!(!r||!IR(r)))return(n=Mr[Pr])===null||n===void 0?void 0:n[t]}function _r(t,e){e.debug("@opentelemetry/api: Unregistering a global for "+t+" v"+cn+".");var n=Mr[Pr];n&&delete n[t]}var ER=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},RR=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},CR=(function(){function t(e){this.tr=e.namespace||"DiagComponentLogger"}return t.prototype.debug=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return Sr("debug",this.tr,e)},t.prototype.error=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return Sr("error",this.tr,e)},t.prototype.info=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return Sr("info",this.tr,e)},t.prototype.warn=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return Sr("warn",this.tr,e)},t.prototype.verbose=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return Sr("verbose",this.tr,e)},t})();function Sr(t,e,n){var r=pn("diag");if(r)return n.unshift(e),r[t].apply(r,RR([],ER(n),!1))}var wt;(function(t){t[t.NONE=0]="NONE",t[t.ERROR=30]="ERROR",t[t.WARN=50]="WARN",t[t.INFO=60]="INFO",t[t.DEBUG=70]="DEBUG",t[t.VERBOSE=80]="VERBOSE",t[t.ALL=9999]="ALL"})(wt||(wt={}));function ZR(t,e){t<wt.NONE?t=wt.NONE:t>wt.ALL&&(t=wt.ALL),e=e||{};function n(r,i){var o=e[r];return typeof o=="function"&&t>=i?o.bind(e):function(){}}return{error:n("error",wt.ERROR),warn:n("warn",wt.WARN),info:n("info",wt.INFO),debug:n("debug",wt.DEBUG),verbose:n("verbose",wt.VERBOSE)}}var kR=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},VR=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},xR="diag",ve=(function(){function t(){function e(i){return function(){for(var o=[],s=0;s<arguments.length;s++)o[s]=arguments[s];var a=pn("diag");if(a)return a[i].apply(a,VR([],kR(o),!1))}}var n=this,r=function(i,o){var s,a,c;if(o===void 0&&(o={logLevel:wt.INFO}),i===n){var l=new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");return n.error((s=l.stack)!==null&&s!==void 0?s:l.message),!1}typeof o=="number"&&(o={logLevel:o});var u=pn("diag"),h=ZR((a=o.logLevel)!==null&&a!==void 0?a:wt.INFO,i);if(u&&!o.suppressOverrideMessage){var p=(c=new Error().stack)!==null&&c!==void 0?c:"<failed to generate stacktrace>";u.warn("Current logger will be overwritten from "+p),h.warn("Current logger will overwrite one already registered from "+p)}return Kr("diag",h,n,!0)};n.setLogger=r,n.disable=function(){_r(xR,n)},n.createComponentLogger=function(i){return new CR(i)},n.verbose=e("verbose"),n.debug=e("debug"),n.info=e("info"),n.warn=e("warn"),n.error=e("error")}return t.instance=function(){return this.U||(this.U=new t),this.U},t})(),NR=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},OR=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},GR=(function(){function t(e){this.pn=e?new Map(e):new Map}return t.prototype.getEntry=function(e){var n=this.pn.get(e);if(n)return Object.assign({},n)},t.prototype.getAllEntries=function(){return Array.from(this.pn.entries()).map(function(e){var n=NR(e,2),r=n[0],i=n[1];return[r,i]})},t.prototype.setEntry=function(e,n){var r=new t(this.pn);return r.pn.set(e,n),r},t.prototype.removeEntry=function(e){var n=new t(this.pn);return n.pn.delete(e),n},t.prototype.removeEntries=function(){for(var e,n,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var o=new t(this.pn);try{for(var s=OR(r),a=s.next();!a.done;a=s.next()){var c=a.value;o.pn.delete(c)}}catch(l){e={error:l}}finally{try{a&&!a.done&&(n=s.return)&&n.call(s)}finally{if(e)throw e.error}}return o},t.prototype.clear=function(){return new t},t})(),LR=Symbol("BaggageEntryMetadata"),XR=ve.instance();function WR(t){return t===void 0&&(t={}),new GR(new Map(Object.entries(t)))}function UR(t){return typeof t!="string"&&(XR.error("Cannot create baggage metadata from unknown type: "+typeof t),t=""),{__TYPE__:LR,toString:function(){return t}}}function yc(t){return Symbol.for(t)}var PR=(function(){function t(e){var n=this;n.We=e?new Map(e):new Map,n.getValue=function(r){return n.We.get(r)},n.setValue=function(r,i){var o=new t(n.We);return o.We.set(r,i),o},n.deleteValue=function(r){var i=new t(n.We);return i.We.delete(r),i}}return t})(),on=new PR,yn=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),MR=(function(){function t(){}return t.prototype.createGauge=function(e,n){return zR},t.prototype.createHistogram=function(e,n){return BR},t.prototype.createCounter=function(e,n){return HR},t.prototype.createUpDownCounter=function(e,n){return jR},t.prototype.createObservableGauge=function(e,n){return $R},t.prototype.createObservableCounter=function(e,n){return QR},t.prototype.createObservableUpDownCounter=function(e,n){return qR},t.prototype.addBatchObservableCallback=function(e,n){},t.prototype.removeBatchObservableCallback=function(e){},t})(),Ko=(function(){function t(){}return t})(),FR=(function(t){yn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.add=function(n,r){},e})(Ko),AR=(function(t){yn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.add=function(n,r){},e})(Ko),JR=(function(t){yn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.record=function(n,r){},e})(Ko),DR=(function(t){yn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.record=function(n,r){},e})(Ko),gc=(function(){function t(){}return t.prototype.addCallback=function(e){},t.prototype.removeCallback=function(e){},t})(),YR=(function(t){yn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e})(gc),KR=(function(t){yn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e})(gc),_R=(function(t){yn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e})(gc),ym=new MR,HR=new FR,zR=new JR,BR=new DR,jR=new AR,QR=new YR,$R=new KR,qR=new _R;function tC(){return ym}var De;(function(t){t[t.INT=0]="INT",t[t.DOUBLE=1]="DOUBLE"})(De||(De={}));var eC={get:function(t,e){if(t!=null)return t[e]},keys:function(t){return t==null?[]:Object.keys(t)}},nC={set:function(t,e,n){t!=null&&(t[e]=n)}},rC=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},iC=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},oC=(function(){function t(){}return t.prototype.active=function(){return on},t.prototype.with=function(e,n,r){for(var i=[],o=3;o<arguments.length;o++)i[o-3]=arguments[o];return n.call.apply(n,iC([r],rC(i),!1))},t.prototype.bind=function(e,n){return n},t.prototype.enable=function(){return this},t.prototype.disable=function(){return this},t})(),sC=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},aC=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},Qa="context",lC=new oC,_o=(function(){function t(){}return t.getInstance=function(){return this.U||(this.U=new t),this.U},t.prototype.setGlobalContextManager=function(e){return Kr(Qa,e,ve.instance())},t.prototype.active=function(){return this.br().active()},t.prototype.with=function(e,n,r){for(var i,o=[],s=3;s<arguments.length;s++)o[s-3]=arguments[s];return(i=this.br()).with.apply(i,aC([e,n,r],sC(o),!1))},t.prototype.bind=function(e,n){return this.br().bind(e,n)},t.prototype.br=function(){return pn(Qa)||lC},t.prototype.disable=function(){this.br().disable(),_r(Qa,ve.instance())},t})(),xe;(function(t){t[t.NONE=0]="NONE",t[t.SAMPLED=1]="SAMPLED"})(xe||(xe={}));var gm="0000000000000000",bm="00000000000000000000000000000000",vm={traceId:bm,spanId:gm,traceFlags:xe.NONE},Nr=(function(){function t(e){e===void 0&&(e=vm),this.In=e}return t.prototype.spanContext=function(){return this.In},t.prototype.setAttribute=function(e,n){return this},t.prototype.setAttributes=function(e){return this},t.prototype.addEvent=function(e,n){return this},t.prototype.addLink=function(e){return this},t.prototype.addLinks=function(e){return this},t.prototype.setStatus=function(e){return this},t.prototype.updateName=function(e){return this},t.prototype.end=function(e){},t.prototype.isRecording=function(){return!1},t.prototype.recordException=function(e,n){},t})(),bc=yc("OpenTelemetry Context Key SPAN");function vc(t){return t.getValue(bc)||void 0}function cC(){return vc(_o.getInstance().active())}function wc(t,e){return t.setValue(bc,e)}function uC(t){return t.deleteValue(bc)}function hC(t,e){return wc(t,new Nr(e))}function wm(t){var e;return(e=vc(t))===null||e===void 0?void 0:e.spanContext()}var pC=/^([0-9a-f]{32})$/i,dC=/^[0-9a-f]{16}$/i;function Sm(t){return pC.test(t)&&t!==bm}function fC(t){return dC.test(t)&&t!==gm}function Ho(t){return Sm(t.traceId)&&fC(t.spanId)}function mC(t){return new Nr(t)}var $a=_o.getInstance(),Im=(function(){function t(){}return t.prototype.startSpan=function(e,n,r){r===void 0&&(r=$a.active());var i=!!(n!=null&&n.root);if(i)return new Nr;var o=r&&wm(r);return yC(o)&&Ho(o)?new Nr(o):new Nr},t.prototype.startActiveSpan=function(e,n,r,i){var o,s,a;if(!(arguments.length<2)){arguments.length===2?a=n:arguments.length===3?(o=n,a=r):(o=n,s=r,a=i);var c=s!=null?s:$a.active(),l=this.startSpan(e,o,c),u=wc(c,l);return $a.with(u,a,void 0,l)}},t})();function yC(t){return typeof t=="object"&&typeof t.spanId=="string"&&typeof t.traceId=="string"&&typeof t.traceFlags=="number"}var gC=new Im,bC=(function(){function t(e,n,r,i){this.Tn=e,this.name=n,this.version=r,this.options=i}return t.prototype.startSpan=function(e,n,r){return this.yo().startSpan(e,n,r)},t.prototype.startActiveSpan=function(e,n,r,i){var o=this.yo();return Reflect.apply(o.startActiveSpan,o,arguments)},t.prototype.yo=function(){if(this.v)return this.v;var e=this.Tn.getDelegateTracer(this.name,this.version,this.options);return e?(this.v=e,this.v):gC},t})(),vC=(function(){function t(){}return t.prototype.getTracer=function(e,n,r){return new Im},t})(),wC=new vC,Id=(function(){function t(){}return t.prototype.getTracer=function(e,n,r){var i;return(i=this.getDelegateTracer(e,n,r))!==null&&i!==void 0?i:new bC(this,e,n,r)},t.prototype.getDelegate=function(){var e;return(e=this.v)!==null&&e!==void 0?e:wC},t.prototype.setDelegate=function(e){this.v=e},t.prototype.getDelegateTracer=function(e,n,r){var i;return(i=this.v)===null||i===void 0?void 0:i.getTracer(e,n,r)},t})(),Zo;(function(t){t[t.NOT_RECORD=0]="NOT_RECORD",t[t.RECORD=1]="RECORD",t[t.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(Zo||(Zo={}));var Fr;(function(t){t[t.INTERNAL=0]="INTERNAL",t[t.SERVER=1]="SERVER",t[t.CLIENT=2]="CLIENT",t[t.PRODUCER=3]="PRODUCER",t[t.CONSUMER=4]="CONSUMER"})(Fr||(Fr={}));var ko;(function(t){t[t.UNSET=0]="UNSET",t[t.OK=1]="OK",t[t.ERROR=2]="ERROR"})(ko||(ko={}));var tt=_o.getInstance(),X=ve.instance(),SC=(function(){function t(){}return t.prototype.getMeter=function(e,n,r){return ym},t})(),IC=new SC,qa="metrics",TC=(function(){function t(){}return t.getInstance=function(){return this.U||(this.U=new t),this.U},t.prototype.setGlobalMeterProvider=function(e){return Kr(qa,e,ve.instance())},t.prototype.getMeterProvider=function(){return pn(qa)||IC},t.prototype.getMeter=function(e,n,r){return this.getMeterProvider().getMeter(e,n,r)},t.prototype.disable=function(){_r(qa,ve.instance())},t})(),Ze=TC.getInstance(),EC=(function(){function t(){}return t.prototype.inject=function(e,n){},t.prototype.extract=function(e,n){return e},t.prototype.fields=function(){return[]},t})(),Sc=yc("OpenTelemetry Baggage Key");function Tm(t){return t.getValue(Sc)||void 0}function RC(){return Tm(_o.getInstance().active())}function CC(t,e){return t.setValue(Sc,e)}function ZC(t){return t.deleteValue(Sc)}var tl="propagation",kC=new EC,VC=(function(){function t(){this.createBaggage=WR,this.getBaggage=Tm,this.getActiveBaggage=RC,this.setBaggage=CC,this.deleteBaggage=ZC}return t.getInstance=function(){return this.U||(this.U=new t),this.U},t.prototype.setGlobalPropagator=function(e){return Kr(tl,e,ve.instance())},t.prototype.inject=function(e,n,r){return r===void 0&&(r=nC),this.Mr().inject(e,n,r)},t.prototype.extract=function(e,n,r){return r===void 0&&(r=eC),this.Mr().extract(e,n,r)},t.prototype.fields=function(){return this.Mr().fields()},t.prototype.disable=function(){_r(tl,ve.instance())},t.prototype.Mr=function(){return pn(tl)||kC},t})(),jt=VC.getInstance(),el="trace",xC=(function(){function t(){this.vr=new Id,this.wrapSpanContext=mC,this.isSpanContextValid=Ho,this.deleteSpan=uC,this.getSpan=vc,this.getActiveSpan=cC,this.getSpanContext=wm,this.setSpan=wc,this.setSpanContext=hC}return t.getInstance=function(){return this.U||(this.U=new t),this.U},t.prototype.setGlobalTracerProvider=function(e){var n=Kr(el,this.vr,ve.instance());return n&&this.vr.setDelegate(e),n},t.prototype.getTracerProvider=function(){return pn(el)||this.vr},t.prototype.getTracer=function(e,n){return this.getTracerProvider().getTracer(e,n)},t.prototype.disable=function(){_r(el,ve.instance()),this.vr=new Id},t})(),ut=xC.getInstance(),Em=yc("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function Rm(t){return t.setValue(Em,!0)}function Ic(t){return t.getValue(Em)===!0}var NC="=",Ml=";",Fl=",",nl="baggage",OC=180,GC=4096,LC=8192,XC=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o};function WC(t){return t.reduce(function(e,n){var r=""+e+(e!==""?Fl:"")+n;return r.length>LC?e:r},"")}function UC(t){return t.getAllEntries().map(function(e){var n=XC(e,2),r=n[0],i=n[1],o=encodeURIComponent(r)+"="+encodeURIComponent(i.value);return i.metadata!==void 0&&(o+=Ml+i.metadata.toString()),o})}function PC(t){var e=t.split(Ml);if(!(e.length<=0)){var n=e.shift();if(n){var r=n.indexOf(NC);if(!(r<=0)){var i=decodeURIComponent(n.substring(0,r).trim()),o=decodeURIComponent(n.substring(r+1).trim()),s;return e.length>0&&(s=UR(e.join(Ml))),{key:i,value:o,metadata:s}}}}}var Cm=(function(){function t(){}return t.prototype.inject=function(e,n,r){var i=jt.getBaggage(e);if(!(!i||Ic(e))){var o=UC(i).filter(function(a){return a.length<=GC}).slice(0,OC),s=WC(o);s.length>0&&r.set(n,nl,s)}},t.prototype.extract=function(e,n,r){var i=r.get(n,nl),o=Array.isArray(i)?i.join(Fl):i;if(!o)return e;var s={};if(o.length===0)return e;var a=o.split(Fl);return a.forEach(function(c){var l=PC(c);if(l){var u={value:l.value};l.metadata&&(u.metadata=l.metadata),s[l.key]=u}}),Object.entries(s).length===0?e:jt.setBaggage(e,jt.createBaggage(s))},t.prototype.fields=function(){return[nl]},t})(),Zm=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},MC=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o};function fo(t){var e,n,r={};if(typeof t!="object"||t==null)return r;try{for(var i=Zm(Object.entries(t)),o=i.next();!o.done;o=i.next()){var s=MC(o.value,2),a=s[0],c=s[1];if(!FC(a)){X.warn("Invalid attribute key: "+a);continue}if(!km(c)){X.warn("Invalid attribute value set for key: "+a);continue}Array.isArray(c)?r[a]=c.slice():r[a]=c}}catch(l){e={error:l}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return r}function FC(t){return typeof t=="string"&&t.length>0}function km(t){return t==null?!0:Array.isArray(t)?AC(t):Vm(t)}function AC(t){var e,n,r;try{for(var i=Zm(t),o=i.next();!o.done;o=i.next()){var s=o.value;if(s!=null){if(!r){if(Vm(s)){r=typeof s;continue}return!1}if(typeof s!==r)return!1}}}catch(a){e={error:a}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return!0}function Vm(t){switch(typeof t){case"number":case"boolean":case"string":return!0}return!1}function JC(){return function(t){X.error(DC(t))}}function DC(t){return typeof t=="string"?t:JSON.stringify(YC(t))}function YC(t){for(var e={},n=t;n!==null;)Object.getOwnPropertyNames(n).forEach(function(r){if(!e[r]){var i=n[r];i&&(e[r]=String(i))}}),n=Object.getPrototypeOf(n);return e}var KC=JC();function Ye(t){try{KC(t)}catch(e){}}var ye;(function(t){t.AlwaysOff="always_off",t.AlwaysOn="always_on",t.ParentBasedAlwaysOff="parentbased_always_off",t.ParentBasedAlwaysOn="parentbased_always_on",t.ParentBasedTraceIdRatio="parentbased_traceidratio",t.TraceIdRatio="traceidratio"})(ye||(ye={}));var _C=",",HC=["OTEL_SDK_DISABLED"];function zC(t){return HC.indexOf(t)>-1}var BC=["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 jC(t){return BC.indexOf(t)>-1}var QC=["OTEL_NO_PATCH_MODULES","OTEL_PROPAGATORS","OTEL_SEMCONV_STABILITY_OPT_IN"];function $C(t){return QC.indexOf(t)>-1}var mo=1/0,yo=128,qC=128,tZ=128,xm={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:wt.INFO,OTEL_NO_PATCH_MODULES:[],OTEL_PROPAGATORS:["tracecontext","baggage"],OTEL_RESOURCE_ATTRIBUTES:"",OTEL_SERVICE_NAME:"",OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT:mo,OTEL_ATTRIBUTE_COUNT_LIMIT:yo,OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT:mo,OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT:yo,OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT:mo,OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT:yo,OTEL_SPAN_EVENT_COUNT_LIMIT:128,OTEL_SPAN_LINK_COUNT_LIMIT:128,OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT:qC,OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT:tZ,OTEL_TRACES_EXPORTER:"",OTEL_TRACES_SAMPLER:ye.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 eZ(t,e,n){if(typeof n[t]<"u"){var r=String(n[t]);e[t]=r.toLowerCase()==="true"}}function nZ(t,e,n,r,i){if(r===void 0&&(r=-1/0),i===void 0&&(i=1/0),typeof n[t]<"u"){var o=Number(n[t]);isNaN(o)||(o<r?e[t]=r:o>i?e[t]=i:e[t]=o)}}function rZ(t,e,n,r){r===void 0&&(r=_C);var i=n[t];typeof i=="string"&&(e[t]=i.split(r).map(function(o){return o.trim()}))}var iZ={ALL:wt.ALL,VERBOSE:wt.VERBOSE,DEBUG:wt.DEBUG,INFO:wt.INFO,WARN:wt.WARN,ERROR:wt.ERROR,NONE:wt.NONE};function oZ(t,e,n){var r=n[t];if(typeof r=="string"){var i=iZ[r.toUpperCase()];i!=null&&(e[t]=i)}}function Nm(t){var e={};for(var n in xm){var r=n;switch(r){case"OTEL_LOG_LEVEL":oZ(r,e,t);break;default:if(zC(r))eZ(r,e,t);else if(jC(r))nZ(r,e,t);else if($C(r))rZ(r,e,t);else{var i=t[r];typeof i<"u"&&i!==null&&(e[r]=String(i))}}}return e}var Or=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{};function Yn(){var t=Nm(Or);return Object.assign({},xm,t)}function sZ(){return Nm(Or)}function Td(t){return t>=48&&t<=57?t-48:t>=97&&t<=102?t-87:t-55}function Tc(t){for(var e=new Uint8Array(t.length/2),n=0,r=0;r<t.length;r+=2){var i=Td(t.charCodeAt(r)),o=Td(t.charCodeAt(r+1));e[n++]=i<<4|o}return e}var qt=performance,aZ="1.30.1",lZ="process.runtime.name",cZ="telemetry.sdk.name",uZ="telemetry.sdk.language",hZ="telemetry.sdk.version",pZ=lZ,dZ=cZ,fZ=uZ,mZ=hZ,yZ="webjs",gZ=yZ,Wn,rl=(Wn={},Wn[dZ]="opentelemetry",Wn[pZ]="browser",Wn[fZ]=gZ,Wn[mZ]=aZ,Wn),bZ=9,vZ=6,wZ=Math.pow(10,vZ),Vo=Math.pow(10,bZ);function Qt(t){var e=t/1e3,n=Math.trunc(e),r=Math.round(t%1e3*wZ);return[n,r]}function Ec(){var t=qt.timeOrigin;if(typeof t!="number"){var e=qt;t=e.timing&&e.timing.fetchStart}return t}function dn(t){var e=Qt(Ec()),n=Qt(typeof t=="number"?t:qt.now());return Om(e,n)}function Gr(t){if(Rc(t))return t;if(typeof t=="number")return t<Ec()?dn(t):Qt(t);if(t instanceof Date)return Qt(t.getTime());throw TypeError("Invalid input type")}function SZ(t,e){var n=e[0]-t[0],r=e[1]-t[1];return r<0&&(n-=1,r+=Vo),[n,r]}function ke(t){return t[0]*Vo+t[1]}function Bi(t){return t[0]*1e6+t[1]/1e3}function Rc(t){return Array.isArray(t)&&t.length===2&&typeof t[0]=="number"&&typeof t[1]=="number"}function Ed(t){return Rc(t)||typeof t=="number"||t instanceof Date}function Om(t,e){var n=[t[0]+e[0],t[1]+e[1]];return n[1]>=Vo&&(n[1]-=Vo,n[0]+=1),n}var kt;(function(t){t[t.SUCCESS=0]="SUCCESS",t[t.FAILED=1]="FAILED"})(kt||(kt={}));var IZ=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Gm=(function(){function t(e){e===void 0&&(e={});var n;this.Fr=(n=e.propagators)!==null&&n!==void 0?n:[],this.Es=Array.from(new Set(this.Fr.map(function(r){return typeof r.fields=="function"?r.fields():[]}).reduce(function(r,i){return r.concat(i)},[])))}return t.prototype.inject=function(e,n,r){var i,o;try{for(var s=IZ(this.Fr),a=s.next();!a.done;a=s.next()){var c=a.value;try{c.inject(e,n,r)}catch(l){X.warn("Failed to inject with "+c.constructor.name+". Err: "+l.message)}}}catch(l){i={error:l}}finally{try{a&&!a.done&&(o=s.return)&&o.call(s)}finally{if(i)throw i.error}}},t.prototype.extract=function(e,n,r){return this.Fr.reduce(function(i,o){try{return o.extract(i,n,r)}catch(s){X.warn("Failed to extract with "+o.constructor.name+". Err: "+s.message)}return i},e)},t.prototype.fields=function(){return this.Es.slice()},t})(),Al="[_0-9a-z-*/]",TZ="[a-z]"+Al+"{0,255}",EZ="[a-z0-9]"+Al+"{0,240}@[a-z]"+Al+"{0,13}",RZ=new RegExp("^(?:"+TZ+"|"+EZ+")$"),CZ=/^[ -~]{0,255}[!-~]$/,ZZ=/,|=/;function kZ(t){return RZ.test(t)}function VZ(t){return CZ.test(t)&&!ZZ.test(t)}var Rd=32,xZ=512,Cd=",",Zd="=",NZ=(function(){function t(e){this.Je=new Map,e&&this.Rs(e)}return t.prototype.set=function(e,n){var r=this.bo();return r.Je.has(e)&&r.Je.delete(e),r.Je.set(e,n),r},t.prototype.unset=function(e){var n=this.bo();return n.Je.delete(e),n},t.prototype.get=function(e){return this.Je.get(e)},t.prototype.serialize=function(){var e=this;return this.Cs().reduce(function(n,r){return n.push(r+Zd+e.get(r)),n},[]).join(Cd)},t.prototype.Rs=function(e){e.length>xZ||(this.Je=e.split(Cd).reverse().reduce(function(n,r){var i=r.trim(),o=i.indexOf(Zd);if(o!==-1){var s=i.slice(0,o),a=i.slice(o+1,r.length);kZ(s)&&VZ(a)&&n.set(s,a)}return n},new Map),this.Je.size>Rd&&(this.Je=new Map(Array.from(this.Je.entries()).reverse().slice(0,Rd))))},t.prototype.Cs=function(){return Array.from(this.Je.keys()).reverse()},t.prototype.bo=function(){var e=new t;return e.Je=new Map(this.Je),e},t})(),go="traceparent",il="tracestate",OZ="00",GZ="(?!ff)[\\da-f]{2}",LZ="(?![0]{32})[\\da-f]{32}",XZ="(?![0]{16})[\\da-f]{16}",WZ="[\\da-f]{2}",UZ=new RegExp("^\\s?("+GZ+")-("+LZ+")-("+XZ+")-("+WZ+")(-.*)?\\s?$");function PZ(t){var e=UZ.exec(t);return!e||e[1]==="00"&&e[5]?null:{traceId:e[2],spanId:e[3],traceFlags:parseInt(e[4],16)}}var Lm=(function(){function t(){}return t.prototype.inject=function(e,n,r){var i=ut.getSpanContext(e);if(!(!i||Ic(e)||!Ho(i))){var o=OZ+"-"+i.traceId+"-"+i.spanId+"-0"+Number(i.traceFlags||xe.NONE).toString(16);r.set(n,go,o),i.traceState&&r.set(n,il,i.traceState.serialize())}},t.prototype.extract=function(e,n,r){var i=r.get(n,go);if(!i)return e;var o=Array.isArray(i)?i[0]:i;if(typeof o!="string")return e;var s=PZ(o);if(!s)return e;s.isRemote=!0;var a=r.get(n,il);if(a){var c=Array.isArray(a)?a.join(","):a;s.traceState=new NZ(typeof c=="string"?c:void 0)}return ut.setSpanContext(e,s)},t.prototype.fields=function(){return[go,il]},t})(),MZ="[object Object]",FZ="[object Null]",AZ="[object Undefined]",JZ=Function.prototype,Xm=JZ.toString,DZ=Xm.call(Object),YZ=KZ(Object.getPrototypeOf,Object),Wm=Object.prototype,Um=Wm.hasOwnProperty,sn=Symbol?Symbol.toStringTag:void 0,Pm=Wm.toString;function KZ(t,e){return function(n){return t(e(n))}}function kd(t){if(!_Z(t)||HZ(t)!==MZ)return!1;var e=YZ(t);if(e===null)return!0;var n=Um.call(e,"constructor")&&e.constructor;return typeof n=="function"&&n instanceof n&&Xm.call(n)===DZ}function _Z(t){return t!=null&&typeof t=="object"}function HZ(t){return t==null?t===void 0?AZ:FZ:sn&&sn in Object(t)?zZ(t):BZ(t)}function zZ(t){var e=Um.call(t,sn),n=t[sn],r=!1;try{t[sn]=void 0,r=!0}catch(o){}var i=Pm.call(t);return r&&(e?t[sn]=n:delete t[sn]),i}function BZ(t){return Pm.call(t)}var jZ=20;function Mm(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n=t.shift(),r=new WeakMap;t.length>0;)n=Fm(n,t.shift(),0,r);return n}function ol(t){return xo(t)?t.slice():t}function Fm(t,e,n,r){n===void 0&&(n=0);var i;if(!(n>jZ)){if(n++,bo(t)||bo(e)||Am(e))i=ol(e);else if(xo(t)){if(i=t.slice(),xo(e))for(var o=0,s=e.length;o<s;o++)i.push(ol(e[o]));else if(Ir(e))for(var a=Object.keys(e),o=0,s=a.length;o<s;o++){var c=a[o];i[c]=ol(e[c])}}else if(Ir(t))if(Ir(e)){if(!QZ(t,e))return e;i=Object.assign({},t);for(var a=Object.keys(e),o=0,s=a.length;o<s;o++){var c=a[o],l=e[c];if(bo(l))typeof l>"u"?delete i[c]:i[c]=l;else{var u=i[c],h=l;if(Vd(t,c,r)||Vd(e,c,r))delete i[c];else{if(Ir(u)&&Ir(h)){var p=r.get(u)||[],f=r.get(h)||[];p.push({obj:t,key:c}),f.push({obj:e,key:c}),r.set(u,p),r.set(h,f)}i[c]=Fm(i[c],l,n,r)}}}}else i=e;return i}}function Vd(t,e,n){for(var r=n.get(t[e])||[],i=0,o=r.length;i<o;i++){var s=r[i];if(s.key===e&&s.obj===t)return!0}return!1}function xo(t){return Array.isArray(t)}function Am(t){return typeof t=="function"}function Ir(t){return!bo(t)&&!xo(t)&&!Am(t)&&typeof t=="object"}function bo(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t>"u"||t instanceof Date||t instanceof RegExp||t===null}function QZ(t,e){return!(!kd(t)||!kd(e))}var $Z=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};function Jm(t,e){return typeof e=="string"?t===e:!!t.match(e)}function Dm(t,e){var n,r;if(!e)return!1;try{for(var i=$Z(e),o=i.next();!o.done;o=i.next()){var s=o.value;if(Jm(t,s))return!0}}catch(a){n={error:a}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return!1}var qZ=(function(){function t(){var e=this;this.Zs=new Promise(function(n,r){e.Ar=n,e.ks=r})}return Object.defineProperty(t.prototype,"promise",{get:function(){return this.Zs},enumerable:!1,configurable:!0}),t.prototype.resolve=function(e){this.Ar(e)},t.prototype.reject=function(e){this.ks(e)},t})(),tk=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},ek=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},nk=(function(){function t(e,n){this.Vs=e,this.xs=n,this.Jr=!1,this.er=new qZ}return Object.defineProperty(t.prototype,"isCalled",{get:function(){return this.Jr},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"promise",{get:function(){return this.er.promise},enumerable:!1,configurable:!0}),t.prototype.call=function(){for(var e,n=this,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];if(!this.Jr){this.Jr=!0;try{Promise.resolve((e=this.Vs).call.apply(e,ek([this.xs],tk(r),!1))).then(function(o){return n.er.resolve(o)},function(o){return n.er.reject(o)})}catch(o){this.er.reject(o)}}return this.er.promise},t})();function rk(t,e){return new Promise(function(n){tt.with(Rm(tt.active()),function(){t.export(e,function(r){n(r)})})})}var ik={Ns:rk},Ym=(function(){function t(){}return t.prototype.emit=function(e){},t})(),ok=new Ym,sk=(function(){function t(){}return t.prototype.getLogger=function(e,n,r){return new Ym},t})(),Km=new sk,ak=(function(){function t(e,n,r,i){this.Tn=e,this.name=n,this.version=r,this.options=i}return t.prototype.emit=function(e){this.nr().emit(e)},t.prototype.nr=function(){if(this.v)return this.v;var e=this.Tn.getDelegateLogger(this.name,this.version,this.options);return e?(this.v=e,this.v):ok},t})(),xd=(function(){function t(){}return t.prototype.getLogger=function(e,n,r){var i;return(i=this.getDelegateLogger(e,n,r))!==null&&i!==void 0?i:new ak(this,e,n,r)},t.prototype.getDelegate=function(){var e;return(e=this.v)!==null&&e!==void 0?e:Km},t.prototype.setDelegate=function(e){this.v=e},t.prototype.getDelegateLogger=function(e,n,r){var i;return(i=this.v)===null||i===void 0?void 0:i.getLogger(e,n,r)},t})(),lk=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{},ji=Symbol.for("io.opentelemetry.js.api.logs"),Tr=lk;function ck(t,e,n){return function(r){return r===t?e:n}}var Nd=1,uk=(function(){function t(){this.ze=new xd}return t.getInstance=function(){return this.U||(this.U=new t),this.U},t.prototype.setGlobalLoggerProvider=function(e){return Tr[ji]?this.getLoggerProvider():(Tr[ji]=ck(Nd,e,Km),this.ze.setDelegate(e),e)},t.prototype.getLoggerProvider=function(){var e,n;return(n=(e=Tr[ji])===null||e===void 0?void 0:e.call(Tr,Nd))!==null&&n!==void 0?n:this.ze},t.prototype.getLogger=function(e,n,r){return this.getLoggerProvider().getLogger(e,n,r)},t.prototype.disable=function(){delete Tr[ji],this.ze=new xd},t})(),_m=uk.getInstance();function hk(t,e,n,r){for(var i=0,o=t.length;i<o;i++){var s=t[i];e&&s.setTracerProvider(e),n&&s.setMeterProvider(n),r&&s.setLoggerProvider&&s.setLoggerProvider(r),s.getConfig().enabled||s.enable()}}function pk(t){t.forEach(function(e){return e.disable()})}function dk(t){var e,n,r=t.tracerProvider||ut.getTracerProvider(),i=t.meterProvider||Ze.getMeterProvider(),o=t.loggerProvider||_m.getLoggerProvider(),s=(n=(e=t.instrumentations)===null||e===void 0?void 0:e.flat())!==null&&n!==void 0?n:[];return hk(s,r,i,o),function(){pk(s)}}function Jl(t){return typeof t=="function"}var Xt=console.error.bind(console);function Er(t,e,n){var r=!!t[e]&&t.propertyIsEnumerable(e);Object.defineProperty(t,e,{configurable:!0,enumerable:r,writable:!0,value:n})}function Hr(t){t&&t.logger&&(Jl(t.logger)?Xt=t.logger:Xt("new logger isn't a function, not replacing"))}function Hm(t,e,n){if(!t||!t[e]){Xt("no original function "+e+" to wrap");return}if(!n){Xt("no wrapper function"),Xt(new Error().stack);return}if(!Jl(t[e])||!Jl(n)){Xt("original object and wrapper must be functions");return}var r=t[e],i=n(r,e);return Er(i,"__original",r),Er(i,"__unwrap",function(){t[e]===i&&Er(t,e,r)}),Er(i,"__wrapped",!0),Er(t,e,i),i}function fk(t,e,n){if(t)Array.isArray(t)||(t=[t]);else{Xt("must provide one or more modules to patch"),Xt(new Error().stack);return}if(!(e&&Array.isArray(e))){Xt("must provide one or more functions to wrap on modules");return}t.forEach(function(r){e.forEach(function(i){Hm(r,i,n)})})}function zm(t,e){if(!t||!t[e]){Xt("no function to unwrap."),Xt(new Error().stack);return}if(!t[e].__unwrap)Xt("no original to unwrap to -- has "+e+" already been unwrapped?");else return t[e].__unwrap()}function mk(t,e){if(t)Array.isArray(t)||(t=[t]);else{Xt("must provide one or more modules to patch"),Xt(new Error().stack);return}if(!(e&&Array.isArray(e))){Xt("must provide one or more functions to unwrap on modules");return}t.forEach(function(n){e.forEach(function(r){zm(n,r)})})}Hr.wrap=Hm;Hr.massWrap=fk;Hr.unwrap=zm;Hr.massUnwrap=mk;var $t=Hr,Dl=function(){return Dl=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Dl.apply(this,arguments)},yk=(function(){function t(e,n,r){this.instrumentationName=e,this.instrumentationVersion=n,this.ie={},this.te=$t.wrap,this.F=$t.unwrap,this.vo=$t.massWrap,this.wo=$t.massUnwrap,this.setConfig(r),this.I=X.createComponentLogger({namespace:e}),this.dn=ut.getTracer(e,n),this.fn=Ze.getMeter(e,n),this.mn=_m.getLogger(e,n),this.yn()}return Object.defineProperty(t.prototype,"meter",{get:function(){return this.fn},enumerable:!1,configurable:!0}),t.prototype.setMeterProvider=function(e){this.fn=e.getMeter(this.instrumentationName,this.instrumentationVersion),this.yn()},Object.defineProperty(t.prototype,"logger",{get:function(){return this.mn},enumerable:!1,configurable:!0}),t.prototype.setLoggerProvider=function(e){this.mn=e.getLogger(this.instrumentationName,this.instrumentationVersion)},t.prototype.getModuleDefinitions=function(){var e,n=(e=this.init())!==null&&e!==void 0?e:[];return Array.isArray(n)?n:[n]},t.prototype.yn=function(){},t.prototype.getConfig=function(){return this.ie},t.prototype.setConfig=function(e){this.ie=Dl({enabled:!0},e)},t.prototype.setTracerProvider=function(e){this.dn=e.getTracer(this.instrumentationName,this.instrumentationVersion)},Object.defineProperty(t.prototype,"tracer",{get:function(){return this.dn},enumerable:!1,configurable:!0}),t.prototype.So=function(e,n,r,i){if(e)try{e(r,i)}catch(o){this.I.error("Error running span customization hook due to exception in handler",{triggerName:n},o)}},t})(),gk=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),Bm=(function(t){gk(e,t);function e(n,r,i){var o=t.call(this,n,r,i)||this;return o.ie.enabled&&o.enable(),o}return e})(yk);function Od(t,e,n){var r,i;try{i=t()}catch(o){r=o}finally{return e(r,i),i}}function Gt(t){return typeof t=="function"&&typeof t.__original=="function"&&typeof t.__unwrap=="function"&&t.__wrapped===!0}var bk="exception.type",vk="exception.message",wk="exception.stacktrace",sl=bk,al=vk,Sk=wk,Ik="exception",Yl=function(){return Yl=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Yl.apply(this,arguments)},Tk=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Gd=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},Ek=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},Rk=(function(){function t(e,n,r,i,o,s,a,c,l,u){a===void 0&&(a=[]),this.attributes={},this.links=[],this.events=[],this.Io=0,this.Nn=0,this.Os=0,this.status={code:ko.UNSET},this.endTime=[0,0],this.rr=!1,this.wr=[-1,-1],this.name=r,this.In=i,this.parentSpanId=s,this.kind=o,this.links=a;var h=Date.now();this.To=qt.now(),this.Gs=h-(this.To+Ec()),this.Ls=c!=null,this.startTime=this.Dr(c!=null?c:h),this.resource=e.resource,this.instrumentationLibrary=e.instrumentationLibrary,this.On=e.getSpanLimits(),this.Xs=this.On.attributeValueLengthLimit||0,u!=null&&this.setAttributes(u),this.Eo=e.getActiveSpanProcessor(),this.Eo.onStart(this,n)}return t.prototype.spanContext=function(){return this.In},t.prototype.setAttribute=function(e,n){return n==null||this.ir()?this:e.length===0?(X.warn("Invalid attribute key: "+e),this):km(n)?Object.keys(this.attributes).length>=this.On.attributeCountLimit&&!Object.prototype.hasOwnProperty.call(this.attributes,e)?(this.Io++,this):(this.attributes[e]=this.Ws(n),this):(X.warn("Invalid attribute value set for key: "+e),this)},t.prototype.setAttributes=function(e){var n,r;try{for(var i=Tk(Object.entries(e)),o=i.next();!o.done;o=i.next()){var s=Gd(o.value,2),a=s[0],c=s[1];this.setAttribute(a,c)}}catch(l){n={error:l}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return this},t.prototype.addEvent=function(e,n,r){if(this.ir())return this;if(this.On.eventCountLimit===0)return X.warn("No events allowed."),this.Nn++,this;this.events.length>=this.On.eventCountLimit&&(this.Nn===0&&X.debug("Dropping extra events."),this.events.shift(),this.Nn++),Ed(n)&&(Ed(r)||(r=n),n=void 0);var i=fo(n);return this.events.push({name:e,attributes:i,time:this.Dr(r),droppedAttributesCount:0}),this},t.prototype.addLink=function(e){return this.links.push(e),this},t.prototype.addLinks=function(e){var n;return(n=this.links).push.apply(n,Ek([],Gd(e),!1)),this},t.prototype.setStatus=function(e){return this.ir()?this:(this.status=Yl({},e),this.status.message!=null&&typeof e.message!="string"&&(X.warn("Dropping invalid status.message of type '"+typeof e.message+"', expected 'string'"),delete this.status.message),this)},t.prototype.updateName=function(e){return this.ir()?this:(this.name=e,this)},t.prototype.end=function(e){if(this.ir()){X.error(this.name+" "+this.In.traceId+"-"+this.In.spanId+" - You can only call end() on a span once.");return}this.rr=!0,this.endTime=this.Dr(e),this.wr=SZ(this.startTime,this.endTime),this.wr[0]<0&&(X.warn("Inconsistent start and end time, startTime > endTime. Setting span duration to 0ms.",this.startTime,this.endTime),this.endTime=this.startTime.slice(),this.wr=[0,0]),this.Nn>0&&X.warn("Dropped "+this.Nn+" events because eventCountLimit reached"),this.Eo.onEnd(this)},t.prototype.Dr=function(e){if(typeof e=="number"&&e<=qt.now())return dn(e+this.Gs);if(typeof e=="number")return Qt(e);if(e instanceof Date)return Qt(e.getTime());if(Rc(e))return e;if(this.Ls)return Qt(Date.now());var n=qt.now()-this.To;return Om(this.startTime,Qt(n))},t.prototype.isRecording=function(){return this.rr===!1},t.prototype.recordException=function(e,n){var r={};typeof e=="string"?r[al]=e:e&&(e.code?r[sl]=e.code.toString():e.name&&(r[sl]=e.name),e.message&&(r[al]=e.message),e.stack&&(r[Sk]=e.stack)),r[sl]||r[al]?this.addEvent(Ik,r,n):X.warn("Failed to record an exception "+e)},Object.defineProperty(t.prototype,"duration",{get:function(){return this.wr},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ended",{get:function(){return this.rr},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"droppedAttributesCount",{get:function(){return this.Io},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"droppedEventsCount",{get:function(){return this.Nn},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"droppedLinksCount",{get:function(){return this.Os},enumerable:!1,configurable:!0}),t.prototype.ir=function(){return this.rr&&X.warn("Can not execute the operation on ended Span {traceId: "+this.In.traceId+", spanId: "+this.In.spanId+"}"),this.rr},t.prototype.Ro=function(e,n){return e.length<=n?e:e.substring(0,n)},t.prototype.Ws=function(e){var n=this,r=this.Xs;return r<=0?(X.warn("Attribute value limit must be positive, got "+r),e):typeof e=="string"?this.Ro(e,r):Array.isArray(e)?e.map(function(i){return typeof i=="string"?n.Ro(i,r):i}):e},t})(),Kn;(function(t){t[t.NOT_RECORD=0]="NOT_RECORD",t[t.RECORD=1]="RECORD",t[t.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(Kn||(Kn={}));var No=(function(){function t(){}return t.prototype.shouldSample=function(){return{decision:Kn.NOT_RECORD}},t.prototype.toString=function(){return"AlwaysOffSampler"},t})(),Jn=(function(){function t(){}return t.prototype.shouldSample=function(){return{decision:Kn.RECORD_AND_SAMPLED}},t.prototype.toString=function(){return"AlwaysOnSampler"},t})(),ll=(function(){function t(e){var n,r,i,o;this.tn=e.root,this.tn||(Ye(new Error("ParentBasedSampler must have a root sampler configured")),this.tn=new Jn),this.Co=(n=e.remoteParentSampled)!==null&&n!==void 0?n:new Jn,this.Zo=(r=e.remoteParentNotSampled)!==null&&r!==void 0?r:new No,this.ko=(i=e.localParentSampled)!==null&&i!==void 0?i:new Jn,this.Vo=(o=e.localParentNotSampled)!==null&&o!==void 0?o:new No}return t.prototype.shouldSample=function(e,n,r,i,o,s){var a=ut.getSpanContext(e);return!a||!Ho(a)?this.tn.shouldSample(e,n,r,i,o,s):a.isRemote?a.traceFlags&xe.SAMPLED?this.Co.shouldSample(e,n,r,i,o,s):this.Zo.shouldSample(e,n,r,i,o,s):a.traceFlags&xe.SAMPLED?this.ko.shouldSample(e,n,r,i,o,s):this.Vo.shouldSample(e,n,r,i,o,s)},t.prototype.toString=function(){return"ParentBased{root="+this.tn.toString()+", remoteParentSampled="+this.Co.toString()+", remoteParentNotSampled="+this.Zo.toString()+", localParentSampled="+this.ko.toString()+", localParentNotSampled="+this.Vo.toString()+"}"},t})(),Ld=(function(){function t(e){e===void 0&&(e=0),this.Yr=e,this.Yr=this.Us(e),this.Ps=Math.floor(this.Yr*4294967295)}return t.prototype.shouldSample=function(e,n){return{decision:Sm(n)&&this.Ms(n)<this.Ps?Kn.RECORD_AND_SAMPLED:Kn.NOT_RECORD}},t.prototype.toString=function(){return"TraceIdRatioBased{"+this.Yr+"}"},t.prototype.Us=function(e){return typeof e!="number"||isNaN(e)?0:e>=1?1:e<=0?0:e},t.prototype.Ms=function(e){for(var n=0,r=0;r<e.length/8;r++){var i=r*8,o=parseInt(e.slice(i,i+8),16);n=(n^o)>>>0}return n},t})(),Ck=ye.AlwaysOn,Un=1;function jm(){var t=Yn();return{sampler:Qm(t),forceFlushTimeoutMillis:3e4,generalLimits:{attributeValueLengthLimit:t.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:t.OTEL_ATTRIBUTE_COUNT_LIMIT},spanLimits:{attributeValueLengthLimit:t.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:t.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT,linkCountLimit:t.OTEL_SPAN_LINK_COUNT_LIMIT,eventCountLimit:t.OTEL_SPAN_EVENT_COUNT_LIMIT,attributePerEventCountLimit:t.OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT,attributePerLinkCountLimit:t.OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT},mergeResourceWithDefaults:!0}}function Qm(t){switch(t===void 0&&(t=Yn()),t.OTEL_TRACES_SAMPLER){case ye.AlwaysOn:return new Jn;case ye.AlwaysOff:return new No;case ye.ParentBasedAlwaysOn:return new ll({root:new Jn});case ye.ParentBasedAlwaysOff:return new ll({root:new No});case ye.TraceIdRatio:return new Ld(Xd(t));case ye.ParentBasedTraceIdRatio:return new ll({root:new Ld(Xd(t))});default:return X.error('OTEL_TRACES_SAMPLER value "'+t.OTEL_TRACES_SAMPLER+" invalid, defaulting to "+Ck+'".'),new Jn}}function Xd(t){if(t.OTEL_TRACES_SAMPLER_ARG===void 0||t.OTEL_TRACES_SAMPLER_ARG==="")return X.error("OTEL_TRACES_SAMPLER_ARG is blank, defaulting to "+Un+"."),Un;var e=Number(t.OTEL_TRACES_SAMPLER_ARG);return isNaN(e)?(X.error("OTEL_TRACES_SAMPLER_ARG="+t.OTEL_TRACES_SAMPLER_ARG+" was given, but it is invalid, defaulting to "+Un+"."),Un):e<0||e>1?(X.error("OTEL_TRACES_SAMPLER_ARG="+t.OTEL_TRACES_SAMPLER_ARG+" was given, but it is out of range ([0..1]), defaulting to "+Un+"."),Un):e}function Zk(t){var e={sampler:Qm()},n=jm(),r=Object.assign({},n,e,t);return r.generalLimits=Object.assign({},n.generalLimits,t.generalLimits||{}),r.spanLimits=Object.assign({},n.spanLimits,t.spanLimits||{}),r}function kk(t){var e,n,r,i,o,s,a,c,l,u,h,p,f=Object.assign({},t.spanLimits),m=sZ();return f.attributeCountLimit=(s=(o=(i=(n=(e=t.spanLimits)===null||e===void 0?void 0:e.attributeCountLimit)!==null&&n!==void 0?n:(r=t.generalLimits)===null||r===void 0?void 0:r.attributeCountLimit)!==null&&i!==void 0?i:m.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT)!==null&&o!==void 0?o:m.OTEL_ATTRIBUTE_COUNT_LIMIT)!==null&&s!==void 0?s:yo,f.attributeValueLengthLimit=(p=(h=(u=(c=(a=t.spanLimits)===null||a===void 0?void 0:a.attributeValueLengthLimit)!==null&&c!==void 0?c:(l=t.generalLimits)===null||l===void 0?void 0:l.attributeValueLengthLimit)!==null&&u!==void 0?u:m.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&h!==void 0?h:m.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&p!==void 0?p:mo,Object.assign({},t,{spanLimits:f})}var Vk=(function(){function t(e,n){this.Gn=e,this.Sr=!1,this.en=[],this.or=0;var r=Yn();this.Ln=typeof(n==null?void 0:n.maxExportBatchSize)=="number"?n.maxExportBatchSize:r.OTEL_BSP_MAX_EXPORT_BATCH_SIZE,this.Kr=typeof(n==null?void 0:n.maxQueueSize)=="number"?n.maxQueueSize:r.OTEL_BSP_MAX_QUEUE_SIZE,this.Fs=typeof(n==null?void 0:n.scheduledDelayMillis)=="number"?n.scheduledDelayMillis:r.OTEL_BSP_SCHEDULE_DELAY,this.As=typeof(n==null?void 0:n.exportTimeoutMillis)=="number"?n.exportTimeoutMillis:r.OTEL_BSP_EXPORT_TIMEOUT,this.Ir=new nk(this.Be,this),this.Ln>this.Kr&&(X.warn("BatchSpanProcessor: maxExportBatchSize must be smaller or equal to maxQueueSize, setting maxExportBatchSize to match maxQueueSize"),this.Ln=this.Kr)}return t.prototype.forceFlush=function(){return this.Ir.isCalled?this.Ir.promise:this.xo()},t.prototype.onStart=function(e,n){},t.prototype.onEnd=function(e){this.Ir.isCalled||e.spanContext().traceFlags&xe.SAMPLED&&this.Js(e)},t.prototype.shutdown=function(){return this.Ir.call()},t.prototype.Be=function(){var e=this;return Promise.resolve().then(function(){return e.onShutdown()}).then(function(){return e.xo()}).then(function(){return e.Gn.shutdown()})},t.prototype.Js=function(e){if(this.en.length>=this.Kr){this.or===0&&X.debug("maxQueueSize reached, dropping spans"),this.or++;return}this.or>0&&(X.warn("Dropped "+this.or+" spans because maxQueueSize reached"),this.or=0),this.en.push(e),this.No()},t.prototype.xo=function(){var e=this;return new Promise(function(n,r){for(var i=[],o=Math.ceil(e.en.length/e.Ln),s=0,a=o;s<a;s++)i.push(e.Oo());Promise.all(i).then(function(){n()}).catch(r)})},t.prototype.Oo=function(){var e=this;return this.Go(),this.en.length===0?Promise.resolve():new Promise(function(n,r){var i=setTimeout(function(){r(new Error("Timeout"))},e.As);tt.with(Rm(tt.active()),function(){var o;e.en.length<=e.Ln?(o=e.en,e.en=[]):o=e.en.splice(0,e.Ln);for(var s=function(){return e.Gn.export(o,function(h){var p;clearTimeout(i),h.code===kt.SUCCESS?n():r((p=h.error)!==null&&p!==void 0?p:new Error("BatchSpanProcessor: span export failed"))})},a=null,c=0,l=o.length;c<l;c++){var u=o[c];u.resource.asyncAttributesPending&&u.resource.waitForAsyncAttributes&&(a!=null||(a=[]),a.push(u.resource.waitForAsyncAttributes()))}a===null?s():Promise.all(a).then(s,function(h){Ye(h),r(h)})})})},t.prototype.No=function(){var e=this;if(!this.Sr){var n=function(){e.Sr=!0,e.Oo().finally(function(){e.Sr=!1,e.en.length>0&&(e.Go(),e.No())}).catch(function(r){e.Sr=!1,Ye(r)})};if(this.en.length>=this.Ln)return n();this.Tr===void 0&&(this.Tr=setTimeout(function(){return n()},this.Fs))}},t.prototype.Go=function(){this.Tr!==void 0&&(clearTimeout(this.Tr),this.Tr=void 0)},t})(),xk=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),$m=(function(t){xk(e,t);function e(n,r){var i=t.call(this,n,r)||this;return i.onInit(r),i}return e.prototype.onInit=function(n){var r=this;(n==null?void 0:n.disableAutoFlushOnDocumentHide)!==!0&&typeof document<"u"&&(this._r=function(){document.visibilityState==="hidden"&&r.forceFlush().catch(function(i){Ye(i)})},this.Hr=function(){r.forceFlush().catch(function(i){Ye(i)})},document.addEventListener("visibilitychange",this._r),document.addEventListener("pagehide",this.Hr))},e.prototype.onShutdown=function(){typeof document<"u"&&(this._r&&document.removeEventListener("visibilitychange",this._r),this.Hr&&document.removeEventListener("pagehide",this.Hr))},e})(Vk),Nk=8,Ok=16,Gk=(function(){function t(){this.generateTraceId=Wd(Ok),this.generateSpanId=Wd(Nk)}return t})(),Qi=Array(32);function Wd(t){return function(){for(var e=0;e<t*2;e++)Qi[e]=Math.floor(Math.random()*16)+48,Qi[e]>=58&&(Qi[e]+=39);return String.fromCharCode.apply(null,Qi.slice(0,t*2))}}var Lk=(function(){function t(e,n,r){this.Ds=r;var i=Zk(n);this.Ys=i.sampler,this.Ks=i.generalLimits,this.On=i.spanLimits,this.Lo=n.idGenerator||new Gk,this.resource=r.resource,this.instrumentationLibrary=e}return t.prototype.startSpan=function(e,n,r){var i,o,s;n===void 0&&(n={}),r===void 0&&(r=tt.active()),n.root&&(r=ut.deleteSpan(r));var a=ut.getSpan(r);if(Ic(r)){X.debug("Instrumentation suppressed, returning Noop Span");var c=ut.wrapSpanContext(vm);return c}var l=a==null?void 0:a.spanContext(),u=this.Lo.generateSpanId(),h,p,f;!l||!ut.isSpanContextValid(l)?h=this.Lo.generateTraceId():(h=l.traceId,p=l.traceState,f=l.spanId);var m=(i=n.kind)!==null&&i!==void 0?i:Fr.INTERNAL,d=((o=n.links)!==null&&o!==void 0?o:[]).map(function(V){return{context:V.context,attributes:fo(V.attributes)}}),v=fo(n.attributes),g=this.Ys.shouldSample(r,h,e,m,v,d);p=(s=g.traceState)!==null&&s!==void 0?s:p;var w=g.decision===Zo.RECORD_AND_SAMPLED?xe.SAMPLED:xe.NONE,R={traceId:h,spanId:u,traceFlags:w,traceState:p};if(g.decision===Zo.NOT_RECORD){X.debug("Recording is off, propagating context in a non-recording span");var c=ut.wrapSpanContext(R);return c}var E=fo(Object.assign(v,g.attributes)),T=new Rk(this,r,e,R,m,f,d,n.startTime,void 0,E);return T},t.prototype.startActiveSpan=function(e,n,r,i){var o,s,a;if(!(arguments.length<2)){arguments.length===2?a=n:arguments.length===3?(o=n,a=r):(o=n,s=r,a=i);var c=s!=null?s:tt.active(),l=this.startSpan(e,o,c),u=ut.setSpan(c,l);return tt.with(u,a,void 0,l)}},t.prototype.getGeneralLimits=function(){return this.Ks},t.prototype.getSpanLimits=function(){return this.On},t.prototype.getActiveSpanProcessor=function(){return this.Ds.getActiveSpanProcessor()},t})(),Xk="service.name",Wk="telemetry.sdk.name",Uk="telemetry.sdk.language",Pk="telemetry.sdk.version",Mk=Xk,Ud=Wk,Pd=Uk,Md=Pk;function Fk(){return"unknown_service"}var Ae=function(){return Ae=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Ae.apply(this,arguments)},Ak=function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(u){try{l(r.next(u))}catch(h){s(h)}}function c(u){try{l(r.throw(u))}catch(h){s(h)}}function l(u){u.done?o(u.value):i(u.value).then(a,c)}l((r=r.apply(t,[])).next())})},Jk=function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(u){l=[6,u],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},Dk=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},Ar=(function(){function t(e,n){var r=this,i;this.Er=e,this.asyncAttributesPending=n!=null,this.Rr=(i=this.Er)!==null&&i!==void 0?i:{},this.sr=n==null?void 0:n.then(function(o){return r.Er=Object.assign({},r.Er,o),r.asyncAttributesPending=!1,o},function(o){return X.debug("a resource's async attributes promise rejected: %s",o),r.asyncAttributesPending=!1,{}})}return t.empty=function(){return t.EMPTY},t.default=function(){var e;return new t((e={},e[Mk]=Fk(),e[Pd]=rl[Pd],e[Ud]=rl[Ud],e[Md]=rl[Md],e))},Object.defineProperty(t.prototype,"attributes",{get:function(){var e;return this.asyncAttributesPending&&X.error("Accessing resource attributes before async attributes settled"),(e=this.Er)!==null&&e!==void 0?e:{}},enumerable:!1,configurable:!0}),t.prototype.waitForAsyncAttributes=function(){return Ak(this,void 0,void 0,function(){return Jk(this,function(e){switch(e.label){case 0:return this.asyncAttributesPending?[4,this.sr]:[3,2];case 1:e.sent(),e.label=2;case 2:return[2]}})})},t.prototype.merge=function(e){var n=this,r;if(!e)return this;var i=Ae(Ae({},this.Rr),(r=e.Rr)!==null&&r!==void 0?r:e.attributes);if(!this.sr&&!e.sr)return new t(i);var o=Promise.all([this.sr,e.sr]).then(function(s){var a,c=Dk(s,2),l=c[0],u=c[1];return Ae(Ae(Ae(Ae({},n.Rr),l),(a=e.Rr)!==null&&a!==void 0?a:e.attributes),u)});return new t(i,o)},t.EMPTY=new t({}),t})(),$i=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Fd=(function(){function t(e){this.Cr=e}return t.prototype.forceFlush=function(){var e,n,r=[];try{for(var i=$i(this.Cr),o=i.next();!o.done;o=i.next()){var s=o.value;r.push(s.forceFlush())}}catch(a){e={error:a}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return new Promise(function(a){Promise.all(r).then(function(){a()}).catch(function(c){Ye(c||new Error("MultiSpanProcessor: forceFlush failed")),a()})})},t.prototype.onStart=function(e,n){var r,i;try{for(var o=$i(this.Cr),s=o.next();!s.done;s=o.next()){var a=s.value;a.onStart(e,n)}}catch(c){r={error:c}}finally{try{s&&!s.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}},t.prototype.onEnd=function(e){var n,r;try{for(var i=$i(this.Cr),o=i.next();!o.done;o=i.next()){var s=o.value;s.onEnd(e)}}catch(a){n={error:a}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}},t.prototype.shutdown=function(){var e,n,r=[];try{for(var i=$i(this.Cr),o=i.next();!o.done;o=i.next()){var s=o.value;r.push(s.shutdown())}}catch(a){e={error:a}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return new Promise(function(a,c){Promise.all(r).then(function(){a()},c)})},t})(),Yk=(function(){function t(){}return t.prototype.onStart=function(e,n){},t.prototype.onEnd=function(e){},t.prototype.shutdown=function(){return Promise.resolve()},t.prototype.forceFlush=function(){return Promise.resolve()},t})(),Kk=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},_k=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},an;(function(t){t[t.resolved=0]="resolved",t[t.timeout=1]="timeout",t[t.error=2]="error",t[t.unresolved=3]="unresolved"})(an||(an={}));var Hk=(function(){function t(e){e===void 0&&(e={});var n,r;this.Xn=[],this.zr=new Map;var i=Mm({},jm(),kk(e));if(this.resource=(n=i.resource)!==null&&n!==void 0?n:Ar.empty(),i.mergeResourceWithDefaults&&(this.resource=Ar.default().merge(this.resource)),this.ie=Object.assign({},i,{resource:this.resource}),!((r=e.spanProcessors)===null||r===void 0)&&r.length)this.Xn=_k([],Kk(e.spanProcessors),!1),this.activeSpanProcessor=new Fd(this.Xn);else{var o=this._s();if(o!==void 0){var s=new $m(o);this.activeSpanProcessor=s}else this.activeSpanProcessor=new Yk}}return t.prototype.getTracer=function(e,n,r){var i=e+"@"+(n||"")+":"+((r==null?void 0:r.schemaUrl)||"");return this.zr.has(i)||this.zr.set(i,new Lk({name:e,version:n,schemaUrl:r==null?void 0:r.schemaUrl},this.ie,this)),this.zr.get(i)},t.prototype.addSpanProcessor=function(e){this.Xn.length===0&&this.activeSpanProcessor.shutdown().catch(function(n){return X.error("Error while trying to shutdown current span processor",n)}),this.Xn.push(e),this.activeSpanProcessor=new Fd(this.Xn)},t.prototype.getActiveSpanProcessor=function(){return this.activeSpanProcessor},t.prototype.register=function(e){e===void 0&&(e={}),ut.setGlobalTracerProvider(this),e.propagator===void 0&&(e.propagator=this.Hs()),e.contextManager&&tt.setGlobalContextManager(e.contextManager),e.propagator&&jt.setGlobalPropagator(e.propagator)},t.prototype.forceFlush=function(){var e=this.ie.forceFlushTimeoutMillis,n=this.Xn.map(function(r){return new Promise(function(i){var o,s=setTimeout(function(){i(new Error("Span processor did not completed within timeout period of "+e+" ms")),o=an.timeout},e);r.forceFlush().then(function(){clearTimeout(s),o!==an.timeout&&(o=an.resolved,i(o))}).catch(function(a){clearTimeout(s),o=an.error,i(a)})})});return new Promise(function(r,i){Promise.all(n).then(function(o){var s=o.filter(function(a){return a!==an.resolved});s.length>0?i(s):r()}).catch(function(o){return i([o])})})},t.prototype.shutdown=function(){return this.activeSpanProcessor.shutdown()},t.prototype.zs=function(e){var n;return(n=this.constructor.Bs.get(e))===null||n===void 0?void 0:n()},t.prototype.js=function(e){var n;return(n=this.constructor.Qs.get(e))===null||n===void 0?void 0:n()},t.prototype.Hs=function(){var e=this,n=Array.from(new Set(Yn().OTEL_PROPAGATORS)),r=n.map(function(o){var s=e.zs(o);return s||X.warn('Propagator "'+o+'" requested through environment variable is unavailable.'),s}),i=r.reduce(function(o,s){return s&&o.push(s),o},[]);if(i.length!==0)return n.length===1?i[0]:new Gm({propagators:i})},t.prototype._s=function(){var e=Yn().OTEL_TRACES_EXPORTER;if(!(e==="none"||e==="")){var n=this.js(e);return n||X.error('Exporter "'+e+'" requested through environment variable is unavailable.'),n}},t.Bs=new Map([["tracecontext",function(){return new Lm}],["baggage",function(){return new Cm}]]),t.Qs=new Map,t})(),zk=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},Bk=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},qm=(function(){function t(){this.Br=!1,this.We=on}return t.prototype.$s=function(e,n){e===void 0&&(e=on);var r=this,i=function(){for(var o=this,s=[],a=0;a<arguments.length;a++)s[a]=arguments[a];return r.with(e,function(){return n.apply(o,s)})};return Object.defineProperty(i,"length",{enumerable:!1,configurable:!0,writable:!1,value:n.length}),i},t.prototype.active=function(){return this.We},t.prototype.bind=function(e,n){return e===void 0&&(e=this.active()),typeof n=="function"?this.$s(e,n):n},t.prototype.disable=function(){return this.We=on,this.Br=!1,this},t.prototype.enable=function(){return this.Br?this:(this.Br=!0,this.We=on,this)},t.prototype.with=function(e,n,r){for(var i=[],o=3;o<arguments.length;o++)i[o-3]=arguments[o];var s=this.We;this.We=e||on;try{return n.call.apply(n,Bk([r],zk(i),!1))}finally{this.We=s}},t})(),jk=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),Qk=(function(t){jk(e,t);function e(n){n===void 0&&(n={});var r=t.call(this,n)||this;if(n.contextManager)throw"contextManager should be defined in register method not in constructor";if(n.propagator)throw"propagator should be defined in register method not in constructor";return r}return e.prototype.register=function(n){n===void 0&&(n={}),n.contextManager===void 0&&(n.contextManager=new qm),n.contextManager&&n.contextManager.enable(),t.prototype.register.call(this,n)},e})(Hk),J;(function(t){t.CONNECT_END="connectEnd",t.CONNECT_START="connectStart",t.DECODED_BODY_SIZE="decodedBodySize",t.DOM_COMPLETE="domComplete",t.DOM_CONTENT_LOADED_EVENT_END="domContentLoadedEventEnd",t.DOM_CONTENT_LOADED_EVENT_START="domContentLoadedEventStart",t.DOM_INTERACTIVE="domInteractive",t.DOMAIN_LOOKUP_END="domainLookupEnd",t.DOMAIN_LOOKUP_START="domainLookupStart",t.ENCODED_BODY_SIZE="encodedBodySize",t.FETCH_START="fetchStart",t.LOAD_EVENT_END="loadEventEnd",t.LOAD_EVENT_START="loadEventStart",t.NAVIGATION_START="navigationStart",t.REDIRECT_END="redirectEnd",t.REDIRECT_START="redirectStart",t.REQUEST_START="requestStart",t.RESPONSE_END="responseEnd",t.RESPONSE_START="responseStart",t.SECURE_CONNECTION_START="secureConnectionStart",t.UNLOAD_EVENT_END="unloadEventEnd",t.UNLOAD_EVENT_START="unloadEventStart"})(J||(J={}));var $k="http.response_content_length",qk="http.response_content_length_uncompressed",t1=$k,e1=qk,cl;function n1(){return cl||(cl=document.createElement("a")),cl}function Ke(t,e){return e in t}function Rt(t,e,n,r){var i=void 0,o=void 0;Ke(n,e)&&typeof n[e]=="number"&&(i=n[e]);var s=J.FETCH_START;if(Ke(n,s)&&typeof n[s]=="number"&&(o=n[s]),i!==void 0&&o!==void 0&&i>=o)return t.addEvent(e,i),t}function _n(t,e,n){n===void 0&&(n=!1),n||(Rt(t,J.FETCH_START,e),Rt(t,J.DOMAIN_LOOKUP_START,e),Rt(t,J.DOMAIN_LOOKUP_END,e),Rt(t,J.CONNECT_START,e),Ke(e,"name")&&e.name.startsWith("https:")&&Rt(t,J.SECURE_CONNECTION_START,e),Rt(t,J.CONNECT_END,e),Rt(t,J.REQUEST_START,e),Rt(t,J.RESPONSE_START,e),Rt(t,J.RESPONSE_END,e));var r=e[J.ENCODED_BODY_SIZE];r!==void 0&&t.setAttribute(t1,r);var i=e[J.DECODED_BODY_SIZE];i!==void 0&&r!==i&&t.setAttribute(e1,i)}function r1(t){return t.slice().sort(function(e,n){var r=e[J.FETCH_START],i=n[J.FETCH_START];return r>i?1:r<i?-1:0})}function ty(){return typeof location<"u"?location.origin:void 0}function ey(t,e,n,r,i,o){i===void 0&&(i=new WeakSet);var s=Ce(t);t=s.toString();var a=o1(t,e,n,r,i,o);if(a.length===0)return{mainRequest:void 0};if(a.length===1)return{mainRequest:a[0]};var c=r1(a);if(s.origin!==ty()&&c.length>1){var l=c[0],u=i1(c,l[J.RESPONSE_END],n),h=l[J.RESPONSE_END],p=u[J.FETCH_START];return p<h&&(u=l,l=void 0),{corsPreFlightRequest:l,mainRequest:u}}else return{mainRequest:a[0]}}function i1(t,e,n){for(var r=ke(n),i=ke(Gr(e)),o=t[1],s,a=t.length,c=1;c<a;c++){var l=t[c],u=ke(Gr(l[J.FETCH_START])),h=ke(Gr(l[J.RESPONSE_END])),p=r-h;u>=i&&(!s||p<s)&&(s=p,o=l)}return o}function o1(t,e,n,r,i,o){var s=ke(e),a=ke(n),c=r.filter(function(l){var u=ke(Gr(l[J.FETCH_START])),h=ke(Gr(l[J.RESPONSE_END]));return l.initiatorType.toLowerCase()===(o||"xmlhttprequest")&&l.name===t&&u>=s&&h<=a});return c.length>0&&(c=c.filter(function(l){return!i.has(l)})),c}function Ce(t){if(typeof URL=="function")return new URL(t,typeof document<"u"?document.baseURI:typeof location<"u"?location.href:void 0);var e=n1();return e.href=t,e}function ny(t,e){if(t.nodeType===Node.DOCUMENT_NODE)return"/";var n=a1(t,e);if(e&&n.indexOf("@id")>0)return n;var r="";return t.parentNode&&(r+=ny(t.parentNode,!1)),r+=n,r}function s1(t){if(!t.parentNode)return 0;var e=[t.nodeType];t.nodeType===Node.CDATA_SECTION_NODE&&e.push(Node.TEXT_NODE);var n=Array.from(t.parentNode.childNodes);return n=n.filter(function(r){var i=r.localName;return e.indexOf(r.nodeType)>=0&&i===t.localName}),n.length>=1?n.indexOf(t)+1:0}function a1(t,e){var n=t.nodeType,r=s1(t),i="";if(n===Node.ELEMENT_NODE){var o=t.getAttribute("id");if(e&&o)return'//*[@id="'+o+'"]';i=t.localName}else if(n===Node.TEXT_NODE||n===Node.CDATA_SECTION_NODE)i="text()";else if(n===Node.COMMENT_NODE)i="comment()";else return"";return i&&r>1?"/"+i+"["+r+"]":"/"+i}function ry(t,e){var n=e||[];(typeof n=="string"||n instanceof RegExp)&&(n=[n]);var r=Ce(t);return r.origin===ty()?!0:n.some(function(i){return Jm(t,i)})}var Lr;(function(t){t.DOCUMENT_LOAD="documentLoad",t.DOCUMENT_FETCH="documentFetch",t.RESOURCE_FETCH="resourceFetch"})(Lr||(Lr={}));var l1="0.44.0",c1="@opentelemetry/instrumentation-document-load",u1="http.url",h1="http.user_agent",ul=u1,p1=h1,d1="deployment.environment",f1=d1,m1="service.name",y1="telemetry.sdk.name",g1="telemetry.sdk.version",b1="url.full",v1="url.path",w1="url.query",Oo;(function(t){t.FIRST_PAINT="firstPaint",t.FIRST_CONTENTFUL_PAINT="firstContentfulPaint"})(Oo||(Oo={}));var S1=function(){var t,e,n={},r=(e=(t=qt).getEntriesByType)===null||e===void 0?void 0:e.call(t,"navigation")[0];if(r){var i=Object.values(J);i.forEach(function(a){if(Ke(r,a)){var c=r[a];typeof c=="number"&&(n[a]=c)}})}else{var o=qt,s=o.timing;if(s){var i=Object.values(J);i.forEach(function(c){if(Ke(s,c)){var l=s[c];typeof l=="number"&&(n[c]=l)}})}}return n},Ad={"first-paint":Oo.FIRST_PAINT,"first-contentful-paint":Oo.FIRST_CONTENTFUL_PAINT},I1=function(t){var e,n,r=(n=(e=qt).getEntriesByType)===null||n===void 0?void 0:n.call(e,"paint");r&&r.forEach(function(i){var o=i.name,s=i.startTime;Ke(Ad,o)&&t.addEvent(Ad[o],s)})},T1=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),E1=(function(t){T1(e,t);function e(n){n===void 0&&(n={});var r=t.call(this,c1,l1,n)||this;return r.component="document-load",r.version="1",r.moduleName=r.component,r}return e.prototype.init=function(){},e.prototype.Wn=function(){var n=this;window.setTimeout(function(){n.qs()})},e.prototype.ta=function(n){var r=this,i,o,s=(o=(i=qt).getEntriesByType)===null||o===void 0?void 0:o.call(i,"resource");s&&s.forEach(function(a){r.ea(a,n)})},e.prototype.qs=function(){var n=this,r=Array.from(document.getElementsByTagName("meta")).find(function(s){return s.getAttribute("name")===go}),i=S1(),o=r&&r.content||"";tt.with(jt.extract(on,{traceparent:o}),function(){var s,a=n.jr(Lr.DOCUMENT_LOAD,J.FETCH_START,i);a&&(tt.with(ut.setSpan(tt.active(),a),function(){var c=n.jr(Lr.DOCUMENT_FETCH,J.FETCH_START,i);c&&(c.setAttribute(ul,location.href),tt.with(ut.setSpan(tt.active(),c),function(){var l;n.getConfig().ignoreNetworkEvents||_n(c,i),n.Xo(c,(l=n.getConfig().applyCustomAttributesOnSpan)===null||l===void 0?void 0:l.documentFetch),n.En(c,J.RESPONSE_END,i)}))}),a.setAttribute(ul,location.href),a.setAttribute(p1,navigator.userAgent),n.ta(a),n.getConfig().ignoreNetworkEvents||(Rt(a,J.FETCH_START,i),Rt(a,J.UNLOAD_EVENT_START,i),Rt(a,J.UNLOAD_EVENT_END,i),Rt(a,J.DOM_INTERACTIVE,i),Rt(a,J.DOM_CONTENT_LOADED_EVENT_START,i),Rt(a,J.DOM_CONTENT_LOADED_EVENT_END,i),Rt(a,J.DOM_COMPLETE,i),Rt(a,J.LOAD_EVENT_START,i),Rt(a,J.LOAD_EVENT_END,i)),n.getConfig().ignorePerformancePaintEvents||I1(a),n.Xo(a,(s=n.getConfig().applyCustomAttributesOnSpan)===null||s===void 0?void 0:s.documentLoad),n.En(a,J.LOAD_EVENT_END,i))})},e.prototype.En=function(n,r,i){n&&(Ke(i,r)?n.end(i[r]):n.end())},e.prototype.ea=function(n,r){var i,o=this.jr(Lr.RESOURCE_FETCH,J.FETCH_START,n,r);o&&(o.setAttribute(ul,n.name),this.getConfig().ignoreNetworkEvents||_n(o,n),this.na(o,n,(i=this.getConfig().applyCustomAttributesOnSpan)===null||i===void 0?void 0:i.resourceFetch),this.En(o,J.RESPONSE_END,n))},e.prototype.jr=function(n,r,i,o){if(Ke(i,r)&&typeof i[r]=="number"){var s=this.tracer.startSpan(n,{startTime:i[r]},o?ut.setSpan(tt.active(),o):void 0);return s}},e.prototype.ra=function(){window.document.readyState==="complete"?this.Wn():(this.Wn=this.Wn.bind(this),window.addEventListener("load",this.Wn))},e.prototype.Xo=function(n,r){var i=this;r&&Od(function(){return r(n)},function(o){o&&i.I.error("addCustomAttributesOnSpan",o)})},e.prototype.na=function(n,r,i){var o=this;i&&Od(function(){return i(n,r)},function(s){s&&o.I.error("addCustomAttributesOnResourceSpan",s)})},e.prototype.enable=function(){window.removeEventListener("load",this.Wn),this.ra()},e.prototype.disable=function(){window.removeEventListener("load",this.Wn)},e})(Bm),iy=(function(){function t(){}return t.prototype.emit=function(e){},t})(),R1=new iy,C1=(function(){function t(){}return t.prototype.getLogger=function(e,n,r){return new iy},t})(),oy=new C1,Z1=(function(){function t(e,n,r,i){this.Tn=e,this.name=n,this.version=r,this.options=i}return t.prototype.emit=function(e){this.nr().emit(e)},t.prototype.nr=function(){if(this.v)return this.v;var e=this.Tn.getDelegateLogger(this.name,this.version,this.options);return e?(this.v=e,this.v):R1},t})(),Jd=(function(){function t(){}return t.prototype.getLogger=function(e,n,r){var i;return(i=this.getDelegateLogger(e,n,r))!==null&&i!==void 0?i:new Z1(this,e,n,r)},t.prototype.getDelegate=function(){var e;return(e=this.v)!==null&&e!==void 0?e:oy},t.prototype.setDelegate=function(e){this.v=e},t.prototype.getDelegateLogger=function(e,n,r){var i;return(i=this.v)===null||i===void 0?void 0:i.getLogger(e,n,r)},t})(),k1=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{},qi=Symbol.for("io.opentelemetry.js.api.logs"),Rr=k1;function V1(t,e,n){return function(r){return r===t?e:n}}var Dd=1,x1=(function(){function t(){this.ze=new Jd}return t.getInstance=function(){return this.U||(this.U=new t),this.U},t.prototype.setGlobalLoggerProvider=function(e){return Rr[qi]?this.getLoggerProvider():(Rr[qi]=V1(Dd,e,oy),this.ze.setDelegate(e),e)},t.prototype.getLoggerProvider=function(){var e,n;return(n=(e=Rr[qi])===null||e===void 0?void 0:e.call(Rr,Dd))!==null&&n!==void 0?n:this.ze},t.prototype.getLogger=function(e,n,r){return this.getLoggerProvider().getLogger(e,n,r)},t.prototype.disable=function(){delete Rr[qi],this.ze=new Jd},t})(),N1=x1.getInstance(),Kl=function(){return Kl=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Kl.apply(this,arguments)},O1=(function(){function t(e,n,r){this.instrumentationName=e,this.instrumentationVersion=n,this.ie={},this.te=$t.wrap,this.F=$t.unwrap,this.vo=$t.massWrap,this.wo=$t.massUnwrap,this.setConfig(r),this.I=X.createComponentLogger({namespace:e}),this.dn=ut.getTracer(e,n),this.fn=Ze.getMeter(e,n),this.mn=N1.getLogger(e,n),this.yn()}return Object.defineProperty(t.prototype,"meter",{get:function(){return this.fn},enumerable:!1,configurable:!0}),t.prototype.setMeterProvider=function(e){this.fn=e.getMeter(this.instrumentationName,this.instrumentationVersion),this.yn()},Object.defineProperty(t.prototype,"logger",{get:function(){return this.mn},enumerable:!1,configurable:!0}),t.prototype.setLoggerProvider=function(e){this.mn=e.getLogger(this.instrumentationName,this.instrumentationVersion)},t.prototype.getModuleDefinitions=function(){var e,n=(e=this.init())!==null&&e!==void 0?e:[];return Array.isArray(n)?n:[n]},t.prototype.yn=function(){},t.prototype.getConfig=function(){return this.ie},t.prototype.setConfig=function(e){this.ie=Kl({enabled:!0},e)},t.prototype.setTracerProvider=function(e){this.dn=e.getTracer(this.instrumentationName,this.instrumentationVersion)},Object.defineProperty(t.prototype,"tracer",{get:function(){return this.dn},enumerable:!1,configurable:!0}),t.prototype.So=function(e,n,r,i){if(e)try{e(r,i)}catch(o){this.I.error("Error running span customization hook due to exception in handler",{triggerName:n},o)}},t})(),G1=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),L1=(function(t){G1(e,t);function e(n,r,i){var o=t.call(this,n,r,i)||this;return o.ie.enabled&&o.enable(),o}return e})(O1);function X1(t,e,n){var r,i;try{i=t()}catch(o){r=o}finally{return e(r,i),i}}function W1(t){return typeof t=="function"&&typeof t.__original=="function"&&typeof t.__unwrap=="function"&&t.__wrapped===!0}var Go;(function(t){t.COMPONENT="component",t.HTTP_ERROR_NAME="http.error_name",t.HTTP_STATUS_TEXT="http.status_text"})(Go||(Go={}));var U1="http.method",P1="http.url",M1="http.host",F1="http.scheme",A1="http.status_code",J1="http.user_agent",D1="http.request_content_length_uncompressed",Y1=U1,K1=P1,_1=M1,H1=F1,z1=A1,B1=J1,j1=D1,Q1=function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(u){try{l(r.next(u))}catch(h){s(h)}}function c(u){try{l(r.throw(u))}catch(h){s(h)}}function l(u){u.done?o(u.value):i(u.value).then(a,c)}l((r=r.apply(t,[])).next())})},$1=function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(u){l=[6,u],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},q1=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},tV=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},sy=X.createComponentLogger({namespace:"@opentelemetry/opentelemetry-instrumentation-fetch/utils"});function eV(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(t[0]instanceof URL||typeof t[0]=="string"){var n=t[1];if(!(n!=null&&n.body))return Promise.resolve();if(n.body instanceof ReadableStream){var r=nV(n.body),i=r.body,o=r.length;return n.body=i,o}else return Promise.resolve(rV(n.body))}else{var s=t[0];return s!=null&&s.body?s.clone().text().then(function(a){return _l(a)}):Promise.resolve()}}function nV(t){if(!t.pipeThrough)return sy.warn("Platform has ReadableStream but not pipeThrough!"),{body:t,length:Promise.resolve(void 0)};var e=0,n,r=new Promise(function(o){n=o}),i=new TransformStream({start:function(){},transform:function(o,s){return Q1(this,void 0,void 0,function(){var a;return $1(this,function(c){switch(c.label){case 0:return[4,o];case 1:return a=c.sent(),e+=a.byteLength,s.enqueue(o),[2]}})})},flush:function(){n(e)}});return{body:t.pipeThrough(i),length:r}}function rV(t){if(typeof Document<"u"&&t instanceof Document)return new XMLSerializer().serializeToString(document).length;if(t instanceof Blob)return t.size;if(t.byteLength!==void 0)return t.byteLength;if(t instanceof FormData)return oV(t);if(t instanceof URLSearchParams)return _l(t.toString());if(typeof t=="string")return _l(t);sy.warn("unknown body type")}var iV=new TextEncoder;function _l(t){return iV.encode(t).byteLength}function oV(t){var e,n,r=0;try{for(var i=q1(t.entries()),o=i.next();!o.done;o=i.next()){var s=tV(o.value,2),a=s[0],c=s[1];r+=a.length,c instanceof Blob?r+=c.size:r+=c.length}}catch(l){e={error:l}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return r}var Yd="0.57.1",sV=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),aV=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},lV=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},hl,cV=300,Kd=typeof process=="object"&&((hl=process.release)===null||hl===void 0?void 0:hl.name)==="node",uV=(function(t){sV(e,t);function e(n){n===void 0&&(n={});var r=t.call(this,"@opentelemetry/instrumentation-fetch",Yd,n)||this;return r.component="fetch",r.version=Yd,r.moduleName=r.component,r.sn=new WeakSet,r.gn=0,r}return e.prototype.init=function(){},e.prototype.Qr=function(n,r){var i=this.tracer.startSpan("CORS Preflight",{startTime:r[J.FETCH_START]},ut.setSpan(tt.active(),n));_n(i,r,this.getConfig().ignoreNetworkEvents),i.end(r[J.RESPONSE_END])},e.prototype.$r=function(n,r){var i=Ce(r.url);n.setAttribute(z1,r.status),r.statusText!=null&&n.setAttribute(Go.HTTP_STATUS_TEXT,r.statusText),n.setAttribute(_1,i.host),n.setAttribute(H1,i.protocol.replace(":","")),typeof navigator<"u"&&n.setAttribute(B1,navigator.userAgent)},e.prototype.qr=function(n,r){if(!ry(r,this.getConfig().propagateTraceHeaderCorsUrls)){var i={};jt.inject(tt.active(),i),Object.keys(i).length>0&&this.I.debug("headers inject skipped due to CORS policy");return}if(n instanceof Request)jt.inject(tt.active(),n.headers,{set:function(o,s,a){return o.set(s,typeof a=="string"?a:String(a))}});else if(n.headers instanceof Headers)jt.inject(tt.active(),n.headers,{set:function(o,s,a){return o.set(s,typeof a=="string"?a:String(a))}});else if(n.headers instanceof Map)jt.inject(tt.active(),n.headers,{set:function(o,s,a){return o.set(s,typeof a=="string"?a:String(a))}});else{var i={};jt.inject(tt.active(),i),n.headers=Object.assign({},i,n.headers||{})}},e.prototype.Zi=function(){this.gn===0&&this.getConfig().clearTimingResources&&(performance.clearResourceTimings(),this.sn=new WeakSet)},e.prototype.Un=function(n,r){var i;if(r===void 0&&(r={}),Dm(n,this.getConfig().ignoreUrls)){this.I.debug("ignoring span as url matches ignored url");return}var o=(r.method||"GET").toUpperCase(),s="HTTP "+o;return this.tracer.startSpan(s,{kind:Fr.CLIENT,attributes:(i={},i[Go.COMPONENT]=this.moduleName,i[Y1]=o,i[K1]=n,i)})},e.prototype.Vi=function(n,r,i){var o=r.entries;if(!o.length){if(!performance.getEntriesByType)return;o=performance.getEntriesByType("resource")}var s=ey(r.spanUrl,r.startTime,i,o,this.sn,"fetch");if(s.mainRequest){var a=s.mainRequest;this.ar(a);var c=s.corsPreFlightRequest;c&&(this.Qr(n,c),this.ar(c)),_n(n,a,this.getConfig().ignoreNetworkEvents)}},e.prototype.ar=function(n){this.sn.add(n)},e.prototype.En=function(n,r,i){var o=this,s=Qt(Date.now()),a=dn();this.$r(n,i),setTimeout(function(){var c;(c=r.observer)===null||c===void 0||c.disconnect(),o.Vi(n,r,a),o.gn--,o.Zi(),n.end(s)},cV)},e.prototype.ia=function(){var n=this;return function(r){var i=n;return function(){for(var o=[],s=0;s<arguments.length;s++)o[s]=arguments[s];var a=this,c=Ce(o[0]instanceof Request?o[0].url:String(o[0])).href,l=o[0]instanceof Request?o[0]:o[1]||{},u=i.Un(c,l);if(!u)return r.apply(this,o);var h=i.oa(c);i.getConfig().measureRequestSize&&eV.apply(void 0,lV([],aV(o),!1)).then(function(v){v&&u.setAttribute(j1,v)}).catch(function(v){i.I.warn("getFetchBodyLength",v)});function p(v,g){i.Wo(v,l,g),i.En(v,h,{status:g.status||0,statusText:g.message,url:c})}function f(v,g){i.Wo(v,l,g),g.status>=200&&g.status<400?i.En(v,h,g):i.En(v,h,{status:g.status,statusText:g.statusText,url:c})}function m(v,g,w){try{var R=w.clone(),E=w.clone(),T=R.body;if(T){var V=T.getReader(),N=function(){V.read().then(function(U){var C=U.done;C?f(v,E):N()},function(U){p(v,U)})};N()}else f(v,w)}finally{g(w)}}function d(v,g,w){try{p(v,w)}finally{g(w)}}return new Promise(function(v,g){return tt.with(ut.setSpan(tt.active(),u),function(){return i.qr(l,c),i.gn++,r.apply(a,l instanceof Request?[l]:[c,l]).then(m.bind(a,u,v),d.bind(a,u,g))})})}}},e.prototype.Wo=function(n,r,i){var o=this,s=this.getConfig().applyCustomAttributesOnSpan;s&&X1(function(){return s(n,r,i)},function(a){a&&o.I.error("applyCustomAttributesOnSpan",a)})},e.prototype.oa=function(n){var r=dn(),i=[];if(typeof PerformanceObserver!="function")return{entries:i,startTime:r,spanUrl:n};var o=new PerformanceObserver(function(s){var a=s.getEntries();a.forEach(function(c){c.initiatorType==="fetch"&&c.name===n&&i.push(c)})});return o.observe({entryTypes:["resource"]}),{entries:i,observer:o,startTime:r,spanUrl:n}},e.prototype.enable=function(){if(Kd){this.I.warn("this instrumentation is intended for web usage only, it does not instrument Node.js's fetch()");return}W1(fetch)&&(this.F(Or,"fetch"),this.I.debug("removing previous patch for constructor")),this.te(Or,"fetch",this.ia())},e.prototype.disable=function(){Kd||(this.F(Or,"fetch"),this.sn=new WeakSet)},e})(L1),ay=(function(){function t(){}return t.prototype.emit=function(e){},t})(),hV=new ay,pV=(function(){function t(){}return t.prototype.getLogger=function(e,n,r){return new ay},t})(),ly=new pV,dV=(function(){function t(e,n,r,i){this.Tn=e,this.name=n,this.version=r,this.options=i}return t.prototype.emit=function(e){this.nr().emit(e)},t.prototype.nr=function(){if(this.v)return this.v;var e=this.Tn.getDelegateLogger(this.name,this.version,this.options);return e?(this.v=e,this.v):hV},t})(),_d=(function(){function t(){}return t.prototype.getLogger=function(e,n,r){var i;return(i=this.getDelegateLogger(e,n,r))!==null&&i!==void 0?i:new dV(this,e,n,r)},t.prototype.getDelegate=function(){var e;return(e=this.v)!==null&&e!==void 0?e:ly},t.prototype.setDelegate=function(e){this.v=e},t.prototype.getDelegateLogger=function(e,n,r){var i;return(i=this.v)===null||i===void 0?void 0:i.getLogger(e,n,r)},t})(),fV=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{},to=Symbol.for("io.opentelemetry.js.api.logs"),Cr=fV;function mV(t,e,n){return function(r){return r===t?e:n}}var Hd=1,yV=(function(){function t(){this.ze=new _d}return t.getInstance=function(){return this.U||(this.U=new t),this.U},t.prototype.setGlobalLoggerProvider=function(e){return Cr[to]?this.getLoggerProvider():(Cr[to]=mV(Hd,e,ly),this.ze.setDelegate(e),e)},t.prototype.getLoggerProvider=function(){var e,n;return(n=(e=Cr[to])===null||e===void 0?void 0:e.call(Cr,Hd))!==null&&n!==void 0?n:this.ze},t.prototype.getLogger=function(e,n,r){return this.getLoggerProvider().getLogger(e,n,r)},t.prototype.disable=function(){delete Cr[to],this.ze=new _d},t})(),gV=yV.getInstance(),Hl=function(){return Hl=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Hl.apply(this,arguments)},bV=(function(){function t(e,n,r){this.instrumentationName=e,this.instrumentationVersion=n,this.ie={},this.te=$t.wrap,this.F=$t.unwrap,this.vo=$t.massWrap,this.wo=$t.massUnwrap,this.setConfig(r),this.I=X.createComponentLogger({namespace:e}),this.dn=ut.getTracer(e,n),this.fn=Ze.getMeter(e,n),this.mn=gV.getLogger(e,n),this.yn()}return Object.defineProperty(t.prototype,"meter",{get:function(){return this.fn},enumerable:!1,configurable:!0}),t.prototype.setMeterProvider=function(e){this.fn=e.getMeter(this.instrumentationName,this.instrumentationVersion),this.yn()},Object.defineProperty(t.prototype,"logger",{get:function(){return this.mn},enumerable:!1,configurable:!0}),t.prototype.setLoggerProvider=function(e){this.mn=e.getLogger(this.instrumentationName,this.instrumentationVersion)},t.prototype.getModuleDefinitions=function(){var e,n=(e=this.init())!==null&&e!==void 0?e:[];return Array.isArray(n)?n:[n]},t.prototype.yn=function(){},t.prototype.getConfig=function(){return this.ie},t.prototype.setConfig=function(e){this.ie=Hl({enabled:!0},e)},t.prototype.setTracerProvider=function(e){this.dn=e.getTracer(this.instrumentationName,this.instrumentationVersion)},Object.defineProperty(t.prototype,"tracer",{get:function(){return this.dn},enumerable:!1,configurable:!0}),t.prototype.So=function(e,n,r,i){if(e)try{e(r,i)}catch(o){this.I.error("Error running span customization hook due to exception in handler",{triggerName:n},o)}},t})(),vV=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),wV=(function(t){vV(e,t);function e(n,r,i){var o=t.call(this,n,r,i)||this;return o.ie.enabled&&o.enable(),o}return e})(bV);function SV(t,e,n){var r,i;try{i=t()}catch(o){r=o}finally{return e(r,i),i}}function zd(t){return typeof t=="function"&&typeof t.__original=="function"&&typeof t.__unwrap=="function"&&t.__wrapped===!0}var IV="http.method",TV="http.url",EV="http.host",RV="http.scheme",CV="http.status_code",ZV="http.user_agent",kV="http.request_content_length_uncompressed",VV=IV,xV=TV,NV=EV,OV=RV,GV=CV,LV=ZV,XV=kV,Re;(function(t){t.METHOD_OPEN="open",t.METHOD_SEND="send",t.EVENT_ABORT="abort",t.EVENT_ERROR="error",t.EVENT_LOAD="loaded",t.EVENT_TIMEOUT="timeout"})(Re||(Re={}));var WV=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},UV=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},PV=X.createComponentLogger({namespace:"@opentelemetry/opentelemetry-instrumentation-xml-http-request/utils"});function MV(t){if(typeof Document<"u"&&t instanceof Document)return new XMLSerializer().serializeToString(document).length;if(t instanceof Blob)return t.size;if(t.byteLength!==void 0)return t.byteLength;if(t instanceof FormData)return AV(t);if(t instanceof URLSearchParams)return Bd(t.toString());if(typeof t=="string")return Bd(t);PV.warn("unknown body type")}var FV=new TextEncoder;function Bd(t){return FV.encode(t).byteLength}function AV(t){var e,n,r=0;try{for(var i=WV(t.entries()),o=i.next();!o.done;o=i.next()){var s=UV(o.value,2),a=s[0],c=s[1];r+=a.length,c instanceof Blob?r+=c.size:r+=c.length}}catch(l){e={error:l}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return r}var jd="0.57.1",zl;(function(t){t.HTTP_STATUS_TEXT="http.status_text"})(zl||(zl={}));var JV=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),DV=300,YV=(function(t){JV(e,t);function e(n){n===void 0&&(n={});var r=t.call(this,"@opentelemetry/instrumentation-xml-http-request",jd,n)||this;return r.component="xml-http-request",r.version=jd,r.moduleName=r.component,r.gn=0,r.nn=new WeakMap,r.sn=new WeakSet,r}return e.prototype.init=function(){},e.prototype.qr=function(n,r){var i=Ce(r).href;if(!ry(i,this.getConfig().propagateTraceHeaderCorsUrls)){var o={};jt.inject(tt.active(),o),Object.keys(o).length>0&&this.I.debug("headers inject skipped due to CORS policy");return}var s={};jt.inject(tt.active(),s),Object.keys(s).forEach(function(a){n.setRequestHeader(a,String(s[a]))})},e.prototype.Qr=function(n,r){var i=this;tt.with(ut.setSpan(tt.active(),n),function(){var o=i.tracer.startSpan("CORS Preflight",{startTime:r[J.FETCH_START]});_n(o,r,i.getConfig().ignoreNetworkEvents),o.end(r[J.RESPONSE_END])})},e.prototype.$r=function(n,r,i){if(typeof i=="string"){var o=Ce(i);r.status!==void 0&&n.setAttribute(GV,r.status),r.statusText!==void 0&&n.setAttribute(zl.HTTP_STATUS_TEXT,r.statusText),n.setAttribute(NV,o.host),n.setAttribute(OV,o.protocol.replace(":","")),n.setAttribute(LV,navigator.userAgent)}},e.prototype.sa=function(n,r){var i=this,o=this.getConfig().applyCustomAttributesOnSpan;typeof o=="function"&&SV(function(){return o(n,r)},function(s){s&&i.I.error("applyCustomAttributesOnSpan",s)})},e.prototype.aa=function(n,r){var i=this.nn.get(n);!i||typeof PerformanceObserver!="function"||typeof PerformanceResourceTiming!="function"||(i.createdResources={observer:new PerformanceObserver(function(o){var s=o.getEntries(),a=Ce(r);s.forEach(function(c){c.initiatorType==="xmlhttprequest"&&c.name===a.href&&i.createdResources&&i.createdResources.entries.push(c)})}),entries:[]},i.createdResources.observer.observe({entryTypes:["resource"]}))},e.prototype.Zi=function(){this.gn===0&&this.getConfig().clearTimingResources&&(qt.clearResourceTimings(),this.nn=new WeakMap,this.sn=new WeakSet)},e.prototype.Vi=function(n,r,i,o,s){if(!(!i||!o||!s||!n.createdResources)){var a=n.createdResources.entries;(!a||!a.length)&&(a=qt.getEntriesByType("resource"));var c=ey(Ce(i).href,o,s,a,this.sn);if(c.mainRequest){var l=c.mainRequest;this.ar(l);var u=c.corsPreFlightRequest;u&&(this.Qr(r,u),this.ar(u)),_n(r,l,this.getConfig().ignoreNetworkEvents)}}},e.prototype.la=function(n){var r=this.nn.get(n);if(r){var i=r.callbackToRemoveEvents;i&&i(),this.nn.delete(n)}},e.prototype.Un=function(n,r,i){var o;if(Dm(r,this.getConfig().ignoreUrls)){this.I.debug("ignoring span as url matches ignored url");return}var s=i.toUpperCase(),a=this.tracer.startSpan(s,{kind:Fr.CLIENT,attributes:(o={},o[VV]=i,o[xV]=Ce(r).toString(),o)});return a.addEvent(Re.METHOD_OPEN),this.la(n),this.nn.set(n,{span:a,spanUrl:r}),a},e.prototype.ar=function(n){this.sn.add(n)},e.prototype.ca=function(){var n=this;return function(r){var i=n;return function(){for(var o=[],s=0;s<arguments.length;s++)o[s]=arguments[s];var a=o[0],c=o[1];return i.Un(this,c,a),r.apply(this,o)}}},e.prototype.ua=function(){var n=this;function r(u,h,p,f){var m=h.callbackToRemoveEvents;typeof m=="function"&&m();var d=h.span,v=h.spanUrl,g=h.sendStartTime;d&&(n.Vi(h,d,v,g,p),d.addEvent(u,f),n.$r(d,h,v),d.end(f),n.gn--),n.Zi()}function i(u,h){var p=n.nn.get(h);if(p){p.status=h.status,p.statusText=h.statusText,n.nn.delete(h),p.span&&n.sa(p.span,h);var f=dn(),m=Date.now();setTimeout(function(){r(u,p,f,m)},DV)}}function o(){i(Re.EVENT_ERROR,this)}function s(){i(Re.EVENT_ABORT,this)}function a(){i(Re.EVENT_TIMEOUT,this)}function c(){this.status<299?i(Re.EVENT_LOAD,this):i(Re.EVENT_ERROR,this)}function l(u){u.removeEventListener("abort",s),u.removeEventListener("error",o),u.removeEventListener("load",c),u.removeEventListener("timeout",a);var h=n.nn.get(u);h&&(h.callbackToRemoveEvents=void 0)}return function(u){return function(){for(var h=this,p=[],f=0;f<arguments.length;f++)p[f]=arguments[f];var m=n.nn.get(this);if(!m)return u.apply(this,p);var d=m.span,v=m.spanUrl;if(d&&v){if(n.getConfig().measureRequestSize&&p!=null&&p[0]){var g=p[0],w=MV(g);w!==void 0&&d.setAttribute(XV,w)}tt.with(ut.setSpan(tt.active(),d),function(){n.gn++,m.sendStartTime=dn(),d.addEvent(Re.METHOD_SEND),h.addEventListener("abort",s),h.addEventListener("error",o),h.addEventListener("load",c),h.addEventListener("timeout",a),m.callbackToRemoveEvents=function(){l(h),m.createdResources&&m.createdResources.observer.disconnect()},n.qr(h,v),n.aa(h,v)})}return u.apply(this,p)}}},e.prototype.enable=function(){this.I.debug("applying patch to",this.moduleName,this.version),zd(XMLHttpRequest.prototype.open)&&(this.F(XMLHttpRequest.prototype,"open"),this.I.debug("removing previous patch from method open")),zd(XMLHttpRequest.prototype.send)&&(this.F(XMLHttpRequest.prototype,"send"),this.I.debug("removing previous patch from method send")),this.te(XMLHttpRequest.prototype,"open",this.ca()),this.te(XMLHttpRequest.prototype,"send",this.ua())},e.prototype.disable=function(){this.I.debug("removing patch from",this.moduleName,this.version),this.F(XMLHttpRequest.prototype,"open"),this.F(XMLHttpRequest.prototype,"send"),this.gn=0,this.nn=new WeakMap,this.sn=new WeakSet},e})(wV),KV=(t,e,n)=>{var r,i;let o=mt({},e);return n?((r=Object.keys(o))==null||r.forEach(s=>{[...n].includes(s==null?void 0:s.toLowerCase())||(o[s]="[REDACTED]")}),o):((i=Object.keys(o))==null||i.forEach(s=>{[..._V,...t].includes(s==null?void 0:s.toLowerCase())&&(o[s]="[REDACTED]")}),o)},_V=["authorization","cookie","proxy-authorization","token"],HV=["https://www.googleapis.com/identitytoolkit","https://securetoken.googleapis.com"],zV=new RegExp("sdk\\/evalx\\/[^/]+\\/contexts\\/(?<context>[^/?]*)\\??.*?"),BV=new RegExp("\\/eval\\/[^/]+\\/(?<context>[^/?]*)\\??.*?");function jV(t){return!!(t.includes("/sdk/evalx")&&t.match(zV)||t.includes("/eval/")&&t.match(BV))}var QV=t=>["events.ld.catamorphic.com","events.launchdarkly.com"].some(e=>t.toLocaleLowerCase().includes(e)),$V=t=>jV(t),qV=(t,e)=>e.some(n=>t.toLocaleLowerCase().includes(n)),tx=(t,e,n)=>!qV(t,e)&&!$V(t)&&!QV(t),ex=(t,e,n)=>{var r;if(n.some(s=>t.toLowerCase().includes(s)))return!1;let i=[];e===!0?(i=["localhost",/^\//],(r=window==null?void 0:window.location)!=null&&r.host&&i.push(window.location.host)):e instanceof Array&&(i=e);let o=!1;return i.forEach(s=>{t.match(s)&&(o=!0)}),o},Qd=64*1024,nx={"application/json":64*1024*1024,"text/plain":64*1024*1024},cy=(t,e,n,r)=>{var i,o,s;let a=Qd;if(r){let c="";typeof r.get=="function"?c=(i=r.get("content-type"))!=null?i:"":c=(o=r["content-type"])!=null?o:"";try{c=c.split(";")[0]}catch(l){}a=(s=nx[c])!=null?s:Qd}if(t){if(e)try{let c=JSON.parse(t);Array.isArray(c)?c.forEach(l=>{Object.keys(l).forEach(u=>{e.includes(u.toLocaleLowerCase())&&(l[u]="[REDACTED]")})}):Object.keys(c).forEach(l=>{e.includes(l.toLocaleLowerCase())&&(c[l]="[REDACTED]")}),t=JSON.stringify(c)}catch(c){}if(n)try{let c=JSON.parse(t);Object.keys(c).forEach(l=>{n.includes(l.toLocaleLowerCase())||(c[l]="[REDACTED]")}),t=JSON.stringify(c)}catch(c){}}try{t=t.slice(0,a)}catch(c){}return t},rx=(t,e,n)=>Do(void 0,null,function*(){let r;try{let i=t.clone().body;if(i){let o=i.getReader(),s=new TextDecoder,a,c="";for(;!(a=yield o.read()).done;){let l=a.value;c+=s.decode(l)}r=c,r=cy(r,n,e,t.headers)}else r=""}catch(i){r=`Unable to clone response: ${i}`}return r}),uy=(function(){function t(e){this.v=e}return t.prototype.export=function(e,n){this.v.export(e,n)},t.prototype.forceFlush=function(){return this.v.forceFlush()},t.prototype.shutdown=function(){return this.v.shutdown()},t})(),ix=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),$d=(function(t){ix(e,t);function e(n,r,i){var o=t.call(this,n)||this;return o.name="OTLPExporterError",o.data=i,o.code=r,o}return e})(Error);function ox(t){if(!Number.isNaN(t)&&Number.isFinite(t)&&t>0)return t;throw new Error("Configuration: timeoutMillis is invalid, expected number greater than 0 (actual: '"+t+"')")}function sx(t){if(t!=null)return function(){return t}}function ax(t,e,n){var r,i,o,s,a,c;return{timeoutMillis:ox((i=(r=t.timeoutMillis)!==null&&r!==void 0?r:e.timeoutMillis)!==null&&i!==void 0?i:n.timeoutMillis),concurrencyLimit:(s=(o=t.concurrencyLimit)!==null&&o!==void 0?o:e.concurrencyLimit)!==null&&s!==void 0?s:n.concurrencyLimit,compression:(c=(a=t.compression)!==null&&a!==void 0?a:e.compression)!==null&&c!==void 0?c:n.compression}}function lx(){return{timeoutMillis:1e4,concurrencyLimit:30,compression:"none"}}var cx=function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(u){try{l(r.next(u))}catch(h){s(h)}}function c(u){try{l(r.throw(u))}catch(h){s(h)}}function l(u){u.done?o(u.value):i(u.value).then(a,c)}l((r=r.apply(t,[])).next())})},ux=function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(u){l=[6,u],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},hx=(function(){function t(e){this.lr=[],this.ha=e}return t.prototype.pushPromise=function(e){var n=this;if(this.hasReachedLimit())throw new Error("Concurrency Limit reached");this.lr.push(e);var r=function(){var i=n.lr.indexOf(e);n.lr.splice(i,1)};e.then(r,r)},t.prototype.hasReachedLimit=function(){return this.lr.length>=this.ha},t.prototype.awaitAll=function(){return cx(this,void 0,void 0,function(){return ux(this,function(e){switch(e.label){case 0:return[4,Promise.all(this.lr)];case 1:return e.sent(),[2]}})})},t})();function px(t){return new hx(t.concurrencyLimit)}function dx(t){return Object.prototype.hasOwnProperty.call(t,"partialSuccess")}function fx(){return{handleResponse:function(t){t==null||!dx(t)||t.partialSuccess==null||Object.keys(t.partialSuccess).length===0||X.warn("Received Partial Success response:",JSON.stringify(t.partialSuccess))}}}var mx=function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(u){try{l(r.next(u))}catch(h){s(h)}}function c(u){try{l(r.throw(u))}catch(h){s(h)}}function l(u){u.done?o(u.value):i(u.value).then(a,c)}l((r=r.apply(t,[])).next())})},yx=function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(u){l=[6,u],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},gx=(function(){function t(e,n,r,i,o){this.Pn=e,this.Uo=n,this.pa=r,this.Gi=i,this.da=o,this.Xi=X.createComponentLogger({namespace:"OTLPExportDelegate"})}return t.prototype.export=function(e,n){var r=this;if(this.Xi.debug("items to be sent",e),this.Gi.hasReachedLimit()){n({code:kt.FAILED,error:new Error("Concurrent export limit reached")});return}var i=this.Uo.serializeRequest(e);if(i==null){n({code:kt.FAILED,error:new Error("Nothing to send")});return}this.Gi.pushPromise(this.Pn.send(i,this.da).then(function(o){if(o.status==="success"){if(o.data!=null)try{r.pa.handleResponse(r.Uo.deserializeResponse(o.data))}catch(s){r.Xi.warn("Export succeeded but could not deserialize response - is the response specification compliant?",s,o.data)}n({code:kt.SUCCESS});return}else if(o.status==="failure"&&o.error){n({code:kt.FAILED,error:o.error});return}else o.status==="retryable"?n({code:kt.FAILED,error:new $d("Export failed with retryable status")}):n({code:kt.FAILED,error:new $d("Export failed with unknown error")})},function(o){return n({code:kt.FAILED,error:o})}))},t.prototype.forceFlush=function(){return this.Gi.awaitAll()},t.prototype.shutdown=function(){return mx(this,void 0,void 0,function(){return yx(this,function(e){switch(e.label){case 0:return this.Xi.debug("shutdown started"),[4,this.forceFlush()];case 1:return e.sent(),this.Pn.shutdown(),[2]}})})},t})();function bx(t,e){return new gx(t.transport,t.serializer,fx(),t.promiseHandler,e.timeout)}function hy(t,e,n){return bx({transport:n,serializer:e,promiseHandler:px(t)},{timeout:t.timeoutMillis})}function py(t){var e=BigInt(1e9);return BigInt(t[0])*e+BigInt(t[1])}function vx(t){var e=Number(BigInt.asUintN(32,t)),n=Number(BigInt.asUintN(32,t>>BigInt(32)));return{low:e,high:n}}function dy(t){var e=py(t);return vx(e)}function wx(t){var e=py(t);return e.toString()}var Sx=typeof BigInt<"u"?wx:ke;function qd(t){return t}function fy(t){if(t!==void 0)return Tc(t)}var Ix={encodeHrTime:dy,encodeSpanContext:Tc,encodeOptionalSpanContext:fy};function my(t){var e,n;if(t===void 0)return Ix;var r=(e=t.useLongBits)!==null&&e!==void 0?e:!0,i=(n=t.useHex)!==null&&n!==void 0?n:!1;return{encodeHrTime:r?dy:Sx,encodeSpanContext:i?qd:Tc,encodeOptionalSpanContext:i?qd:fy}}var Tx=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o};function yy(t){return{attributes:gn(t.attributes),droppedAttributesCount:0}}function gy(t){return{name:t.name,version:t.version}}function gn(t){return Object.keys(t).map(function(e){return by(e,t[e])})}function by(t,e){return{key:t,value:vy(e)}}function vy(t){var e=typeof t;return e==="string"?{stringValue:t}:e==="number"?Number.isInteger(t)?{intValue:t}:{doubleValue:t}:e==="boolean"?{boolValue:t}:t instanceof Uint8Array?{bytesValue:t}:Array.isArray(t)?{arrayValue:{values:t.map(vy)}}:e==="object"&&t!=null?{kvlistValue:{values:Object.entries(t).map(function(n){var r=Tx(n,2),i=r[0],o=r[1];return by(i,o)})}}:{}}var se;(function(t){t[t.DELTA=0]="DELTA",t[t.CUMULATIVE=1]="CUMULATIVE"})(se||(se={}));var be;(function(t){t[t.HISTOGRAM=0]="HISTOGRAM",t[t.EXPONENTIAL_HISTOGRAM=1]="EXPONENTIAL_HISTOGRAM",t[t.GAUGE=2]="GAUGE",t[t.SUM=3]="SUM"})(be||(be={}));var Ex=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),tf=function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(u){try{l(r.next(u))}catch(h){s(h)}}function c(u){try{l(r.throw(u))}catch(h){s(h)}}function l(u){u.done?o(u.value):i(u.value).then(a,c)}l((r=r.apply(t,[])).next())})},ef=function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(u){l=[6,u],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},Rx=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},Cx=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},Zx=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};function kx(t){return t!=null}function wy(t){var e=Object.keys(t);return e.length===0?"":(e=e.sort(),JSON.stringify(e.map(function(n){return[n,t[n]]})))}function Vx(t){var e,n;return t.name+":"+((e=t.version)!==null&&e!==void 0?e:"")+":"+((n=t.schemaUrl)!==null&&n!==void 0?n:"")}var Sy=(function(t){Ex(e,t);function e(n){var r=t.call(this,n)||this;return Object.setPrototypeOf(r,e.prototype),r}return e})(Error);function Jr(t,e){var n,r=new Promise(function(i,o){n=setTimeout(function(){o(new Sy("Operation timed out."))},e)});return Promise.race([t,r]).then(function(i){return clearTimeout(n),i},function(i){throw clearTimeout(n),i})}function xx(t){return tf(this,void 0,void 0,function(){var e=this;return ef(this,function(n){return[2,Promise.all(t.map(function(r){return tf(e,void 0,void 0,function(){var i,o;return ef(this,function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),[4,r];case 1:return i=s.sent(),[2,{status:"fulfilled",value:i}];case 2:return o=s.sent(),[2,{status:"rejected",reason:o}];case 3:return[2]}})})}))]})})}function Nx(t){return t.status==="rejected"}function nf(t,e){var n=[];return t.forEach(function(r){n.push.apply(n,Cx([],Rx(e(r)),!1))}),n}function Ox(t,e){var n,r;if(t.size!==e.size)return!1;try{for(var i=Zx(t),o=i.next();!o.done;o=i.next()){var s=o.value;if(!e.has(s))return!1}}catch(a){n={error:a}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return!0}function Gx(t,e){for(var n=0,r=t.length-1,i=t.length;r>=n;){var o=n+Math.trunc((r-n)/2);t[o]<e?n=o+1:(i=o,r=o-1)}return i}function Lx(t,e){return t.toLowerCase()===e.toLowerCase()}var fn;(function(t){t[t.DROP=0]="DROP",t[t.SUM=1]="SUM",t[t.LAST_VALUE=2]="LAST_VALUE",t[t.HISTOGRAM=3]="HISTOGRAM",t[t.EXPONENTIAL_HISTOGRAM=4]="EXPONENTIAL_HISTOGRAM"})(fn||(fn={}));var Xx=(function(){function t(){this.kind=fn.DROP}return t.prototype.createAccumulation=function(){},t.prototype.merge=function(e,n){},t.prototype.diff=function(e,n){},t.prototype.toMetricData=function(e,n,r,i){},t})(),K;(function(t){t.COUNTER="COUNTER",t.GAUGE="GAUGE",t.HISTOGRAM="HISTOGRAM",t.UP_DOWN_COUNTER="UP_DOWN_COUNTER",t.OBSERVABLE_COUNTER="OBSERVABLE_COUNTER",t.OBSERVABLE_GAUGE="OBSERVABLE_GAUGE",t.OBSERVABLE_UP_DOWN_COUNTER="OBSERVABLE_UP_DOWN_COUNTER"})(K||(K={}));function Pe(t,e,n){var r,i,o,s;return Mx(t)||X.warn('Invalid metric name: "'+t+'". The metric name should be a ASCII string with a length no greater than 255 characters.'),{name:t,type:e,description:(r=n==null?void 0:n.description)!==null&&r!==void 0?r:"",unit:(i=n==null?void 0:n.unit)!==null&&i!==void 0?i:"",valueType:(o=n==null?void 0:n.valueType)!==null&&o!==void 0?o:De.DOUBLE,advice:(s=n==null?void 0:n.advice)!==null&&s!==void 0?s:{}}}function Wx(t,e){var n,r;return{name:(n=t.name)!==null&&n!==void 0?n:e.name,description:(r=t.description)!==null&&r!==void 0?r:e.description,type:e.type,unit:e.unit,valueType:e.valueType,advice:e.advice}}function Ux(t,e){return Lx(t.name,e.name)&&t.unit===e.unit&&t.type===e.type&&t.valueType===e.valueType}var Px=/^[a-z][a-z0-9_.\-/]{0,254}$/i;function Mx(t){return t.match(Px)!=null}var Fx=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o};function Ax(t){var e=t.map(function(){return 0});return e.push(0),{buckets:{boundaries:t,counts:e},sum:0,count:0,hasMinMax:!1,min:1/0,max:-1/0}}var pl=(function(){function t(e,n,r,i){r===void 0&&(r=!0),i===void 0&&(i=Ax(n)),this.startTime=e,this.cr=n,this.vt=r,this.ee=i}return t.prototype.record=function(e){if(!Number.isNaN(e)){this.ee.count+=1,this.ee.sum+=e,this.vt&&(this.ee.min=Math.min(e,this.ee.min),this.ee.max=Math.max(e,this.ee.max),this.ee.hasMinMax=!0);var n=Gx(this.cr,e);this.ee.buckets.counts[n]+=1}},t.prototype.setStartTime=function(e){this.startTime=e},t.prototype.toPointValue=function(){return this.ee},t})(),Iy=(function(){function t(e,n){this.cr=e,this.vt=n,this.kind=fn.HISTOGRAM}return t.prototype.createAccumulation=function(e){return new pl(e,this.cr,this.vt)},t.prototype.merge=function(e,n){for(var r=e.toPointValue(),i=n.toPointValue(),o=r.buckets.counts,s=i.buckets.counts,a=new Array(o.length),c=0;c<o.length;c++)a[c]=o[c]+s[c];var l=1/0,u=-1/0;return this.vt&&(r.hasMinMax&&i.hasMinMax?(l=Math.min(r.min,i.min),u=Math.max(r.max,i.max)):r.hasMinMax?(l=r.min,u=r.max):i.hasMinMax&&(l=i.min,u=i.max)),new pl(e.startTime,r.buckets.boundaries,this.vt,{buckets:{boundaries:r.buckets.boundaries,counts:a},count:r.count+i.count,sum:r.sum+i.sum,hasMinMax:this.vt&&(r.hasMinMax||i.hasMinMax),min:l,max:u})},t.prototype.diff=function(e,n){for(var r=e.toPointValue(),i=n.toPointValue(),o=r.buckets.counts,s=i.buckets.counts,a=new Array(o.length),c=0;c<o.length;c++)a[c]=s[c]-o[c];return new pl(n.startTime,r.buckets.boundaries,this.vt,{buckets:{boundaries:r.buckets.boundaries,counts:a},count:i.count-r.count,sum:i.sum-r.sum,hasMinMax:!1,min:1/0,max:-1/0})},t.prototype.toMetricData=function(e,n,r,i){return{descriptor:e,aggregationTemporality:n,dataPointType:be.HISTOGRAM,dataPoints:r.map(function(o){var s=Fx(o,2),a=s[0],c=s[1],l=c.toPointValue(),u=e.type===K.GAUGE||e.type===K.UP_DOWN_COUNTER||e.type===K.OBSERVABLE_GAUGE||e.type===K.OBSERVABLE_UP_DOWN_COUNTER;return{attributes:a,startTime:c.startTime,endTime:i,value:{min:l.hasMinMax?l.min:void 0,max:l.hasMinMax?l.max:void 0,sum:u?void 0:l.sum,buckets:l.buckets,count:l.count}}})}},t})(),dl=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},fl=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},rf=(function(){function t(e,n,r,i){e===void 0&&(e=new Jx),n===void 0&&(n=0),r===void 0&&(r=0),i===void 0&&(i=0),this.backing=e,this.indexBase=n,this.indexStart=r,this.indexEnd=i}return Object.defineProperty(t.prototype,"offset",{get:function(){return this.indexStart},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"length",{get:function(){return this.backing.length===0||this.indexEnd===this.indexStart&&this.at(0)===0?0:this.indexEnd-this.indexStart+1},enumerable:!1,configurable:!0}),t.prototype.counts=function(){var e=this;return Array.from({length:this.length},function(n,r){return e.at(r)})},t.prototype.at=function(e){var n=this.indexBase-this.indexStart;return e<n&&(e+=this.backing.length),e-=n,this.backing.countAt(e)},t.prototype.incrementBucket=function(e,n){this.backing.increment(e,n)},t.prototype.decrementBucket=function(e,n){this.backing.decrement(e,n)},t.prototype.trim=function(){for(var e=0;e<this.length;e++)if(this.at(e)!==0){this.indexStart+=e;break}else if(e===this.length-1){this.indexStart=this.indexEnd=this.indexBase=0;return}for(var e=this.length-1;e>=0;e--)if(this.at(e)!==0){this.indexEnd-=this.length-e-1;break}this.Po()},t.prototype.downscale=function(e){this.Po();for(var n=1+this.indexEnd-this.indexStart,r=1<<e,i=0,o=0,s=this.indexStart;s<=this.indexEnd;){var a=s%r;a<0&&(a+=r);for(var c=a;c<r&&i<n;c++)this.fa(o,i),i++,s++;o++}this.indexStart>>=e,this.indexEnd>>=e,this.indexBase=this.indexStart},t.prototype.clone=function(){return new t(this.backing.clone(),this.indexBase,this.indexStart,this.indexEnd)},t.prototype.Po=function(){var e=this.indexBase-this.indexStart;e!==0&&(e>0?(this.backing.reverse(0,this.backing.length),this.backing.reverse(0,e),this.backing.reverse(e,this.backing.length)):(this.backing.reverse(0,this.backing.length),this.backing.reverse(0,this.backing.length+e)),this.indexBase=this.indexStart)},t.prototype.fa=function(e,n){e!==n&&this.incrementBucket(e,this.backing.emptyBucket(n))},t})(),Jx=(function(){function t(e){e===void 0&&(e=[0]),this.yt=e}return Object.defineProperty(t.prototype,"length",{get:function(){return this.yt.length},enumerable:!1,configurable:!0}),t.prototype.countAt=function(e){return this.yt[e]},t.prototype.growTo=function(e,n,r){var i=new Array(e).fill(0);i.splice.apply(i,fl([r,this.yt.length-n],dl(this.yt.slice(n)),!1)),i.splice.apply(i,fl([0,n],dl(this.yt.slice(0,n)),!1)),this.yt=i},t.prototype.reverse=function(e,n){for(var r=Math.floor((e+n)/2)-e,i=0;i<r;i++){var o=this.yt[e+i];this.yt[e+i]=this.yt[n-i-1],this.yt[n-i-1]=o}},t.prototype.emptyBucket=function(e){var n=this.yt[e];return this.yt[e]=0,n},t.prototype.increment=function(e,n){this.yt[e]+=n},t.prototype.decrement=function(e,n){this.yt[e]>=n?this.yt[e]-=n:this.yt[e]=0},t.prototype.clone=function(){return new t(fl([],dl(this.yt),!1))},t})(),Dx=52,Yx=2146435072,Kx=1048575,Ty=1023,Ey=-1022,Ry=Ty,Bl=Math.pow(2,-1022);function Cy(t){var e=new DataView(new ArrayBuffer(8));e.setFloat64(0,t);var n=e.getUint32(0),r=(n&Yx)>>20;return r-Ty}function Zy(t){var e=new DataView(new ArrayBuffer(8));e.setFloat64(0,t);var n=e.getUint32(0),r=e.getUint32(4),i=(n&Kx)*Math.pow(2,32);return i+r}function jl(t,e){return t===0||t===Number.POSITIVE_INFINITY||t===Number.NEGATIVE_INFINITY||Number.isNaN(t)?t:t*Math.pow(2,e)}function _x(t){return t--,t|=t>>1,t|=t>>2,t|=t>>4,t|=t>>8,t|=t>>16,t++,t}var Hx=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),Dr=(function(t){Hx(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e})(Error),zx=(function(){function t(e){this.Rn=-e}return t.prototype.mapToIndex=function(e){if(e<Bl)return this.ur();var n=Cy(e),r=this.ma(Zy(e)-1,Dx);return n+r>>this.Rn},t.prototype.lowerBoundary=function(e){var n=this.ur();if(e<n)throw new Dr("underflow: "+e+" is < minimum lower boundary: "+n);var r=this.Zr();if(e>r)throw new Dr("overflow: "+e+" is > maximum lower boundary: "+r);return jl(1,e<<this.Rn)},Object.defineProperty(t.prototype,"scale",{get:function(){return this.Rn===0?0:-this.Rn},enumerable:!1,configurable:!0}),t.prototype.ur=function(){var e=Ey>>this.Rn;return this.Rn<2&&e--,e},t.prototype.Zr=function(){return Ry>>this.Rn},t.prototype.ma=function(e,n){return Math.floor(e*Math.pow(2,-n))},t})(),Bx=(function(){function t(e){this.Mn=e,this.Wi=jl(Math.LOG2E,e),this.ya=jl(Math.LN2,-e)}return t.prototype.mapToIndex=function(e){if(e<=Bl)return this.ur()-1;if(Zy(e)===0){var n=Cy(e);return(n<<this.Mn)-1}var r=Math.floor(Math.log(e)*this.Wi),i=this.Zr();return r>=i?i:r},t.prototype.lowerBoundary=function(e){var n=this.Zr();if(e>=n){if(e===n)return 2*Math.exp((e-(1<<this.Mn))/this.Wi);throw new Dr("overflow: "+e+" is > maximum lower boundary: "+n)}var r=this.ur();if(e<=r){if(e===r)return Bl;if(e===r-1)return Math.exp((e+(1<<this.Mn))/this.Wi)/2;throw new Dr("overflow: "+e+" is < minimum lower boundary: "+r)}return Math.exp(e*this.ya)},Object.defineProperty(t.prototype,"scale",{get:function(){return this.Mn},enumerable:!1,configurable:!0}),t.prototype.ur=function(){return Ey<<this.Mn},t.prototype.Zr=function(){return(Ry+1<<this.Mn)-1},t})(),of=-10,sf=20,jx=Array.from({length:31},function(t,e){return e>10?new Bx(e-10):new zx(e-10)});function af(t){if(t>sf||t<of)throw new Dr("expected scale >= "+of+" && <= "+sf+", got: "+t);return jx[t+10]}var Qx=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},eo=(function(){function t(e,n){this.low=e,this.high=n}return t.combine=function(e,n){return new t(Math.min(e.low,n.low),Math.max(e.high,n.high))},t})(),$x=20,qx=160,ml=2,tN=(function(){function t(e,n,r,i,o,s,a,c,l,u,h){e===void 0&&(e=e),n===void 0&&(n=qx),r===void 0&&(r=!0),i===void 0&&(i=0),o===void 0&&(o=0),s===void 0&&(s=0),a===void 0&&(a=Number.POSITIVE_INFINITY),c===void 0&&(c=Number.NEGATIVE_INFINITY),l===void 0&&(l=new rf),u===void 0&&(u=new rf),h===void 0&&(h=af($x)),this.startTime=e,this.Ge=n,this.vt=r,this.hr=i,this.Cn=o,this.Fn=s,this.Zn=a,this.kn=c,this.Ji=l,this.Yi=u,this.An=h,this.Ge<ml&&(X.warn("Exponential Histogram Max Size set to "+this.Ge+", changing to the minimum size of: "+ml),this.Ge=ml)}return t.prototype.record=function(e){this.updateByIncrement(e,1)},t.prototype.setStartTime=function(e){this.startTime=e},t.prototype.toPointValue=function(){return{hasMinMax:this.vt,min:this.min,max:this.max,sum:this.sum,positive:{offset:this.positive.offset,bucketCounts:this.positive.counts()},negative:{offset:this.negative.offset,bucketCounts:this.negative.counts()},count:this.count,scale:this.scale,zeroCount:this.zeroCount}},Object.defineProperty(t.prototype,"sum",{get:function(){return this.hr},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"min",{get:function(){return this.Zn},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"max",{get:function(){return this.kn},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"count",{get:function(){return this.Cn},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"zeroCount",{get:function(){return this.Fn},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"scale",{get:function(){return this.Cn===this.Fn?0:this.An.scale},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"positive",{get:function(){return this.Ji},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"negative",{get:function(){return this.Yi},enumerable:!1,configurable:!0}),t.prototype.updateByIncrement=function(e,n){if(!Number.isNaN(e)){if(e>this.kn&&(this.kn=e),e<this.Zn&&(this.Zn=e),this.Cn+=n,e===0){this.Fn+=n;return}this.hr+=e*n,e>0?this.Mo(this.Ji,e,n):this.Mo(this.Yi,-e,n)}},t.prototype.merge=function(e){this.Cn===0?(this.Zn=e.min,this.kn=e.max):e.count!==0&&(e.min<this.min&&(this.Zn=e.min),e.max>this.max&&(this.kn=e.max)),this.startTime=e.startTime,this.hr+=e.sum,this.Cn+=e.count,this.Fn+=e.zeroCount;var n=this.Fo(e);this.Ki(this.scale-n),this.Ao(this.positive,e,e.positive,n),this.Ao(this.negative,e,e.negative,n)},t.prototype.diff=function(e){this.Zn=1/0,this.kn=-1/0,this.hr-=e.sum,this.Cn-=e.count,this.Fn-=e.zeroCount;var n=this.Fo(e);this.Ki(this.scale-n),this.Jo(this.positive,e,e.positive,n),this.Jo(this.negative,e,e.negative,n)},t.prototype.clone=function(){return new t(this.startTime,this.Ge,this.vt,this.hr,this.Cn,this.Fn,this.Zn,this.kn,this.positive.clone(),this.negative.clone(),this.An)},t.prototype.Mo=function(e,n,r){var i=this.An.mapToIndex(n),o=!1,s=0,a=0;if(e.length===0?(e.indexStart=i,e.indexEnd=e.indexStart,e.indexBase=e.indexStart):i<e.indexStart&&e.indexEnd-i>=this.Ge?(o=!0,a=i,s=e.indexEnd):i>e.indexEnd&&i-e.indexStart>=this.Ge&&(o=!0,a=e.indexStart,s=i),o){var c=this._i(s,a);this.Ki(c),i=this.An.mapToIndex(n)}this.Do(e,i,r)},t.prototype.Do=function(e,n,r){if(r!==0){if(e.length===0&&(e.indexStart=e.indexEnd=e.indexBase=n),n<e.indexStart){var i=e.indexEnd-n;i>=e.backing.length&&this.Yo(e,i+1),e.indexStart=n}else if(n>e.indexEnd){var i=n-e.indexStart;i>=e.backing.length&&this.Yo(e,i+1),e.indexEnd=n}var o=n-e.indexBase;o<0&&(o+=e.backing.length),e.incrementBucket(o,r)}},t.prototype.Yo=function(e,n){var r=e.backing.length,i=e.indexBase-e.indexStart,o=r-i,s=_x(n);s>this.Ge&&(s=this.Ge);var a=s-i;e.backing.growTo(s,o,a)},t.prototype._i=function(e,n){for(var r=0;e-n>=this.Ge;)e>>=1,n>>=1,r++;return r},t.prototype.Ki=function(e){if(e!==0){if(e<0)throw new Error("impossible change of scale: "+this.scale);var n=this.An.scale-e;this.Ji.downscale(e),this.Yi.downscale(e),this.An=af(n)}},t.prototype.Fo=function(e){var n=Math.min(this.scale,e.scale),r=eo.combine(this.kr(this.positive,this.scale,n),this.kr(e.positive,e.scale,n)),i=eo.combine(this.kr(this.negative,this.scale,n),this.kr(e.negative,e.scale,n));return Math.min(n-this._i(r.high,r.low),n-this._i(i.high,i.low))},t.prototype.kr=function(e,n,r){if(e.length===0)return new eo(0,-1);var i=n-r;return new eo(e.indexStart>>i,e.indexEnd>>i)},t.prototype.Ao=function(e,n,r,i){for(var o=r.offset,s=n.scale-i,a=0;a<r.length;a++)this.Do(e,o+a>>s,r.at(a))},t.prototype.Jo=function(e,n,r,i){for(var o=r.offset,s=n.scale-i,a=0;a<r.length;a++){var c=o+a>>s,l=c-e.indexBase;l<0&&(l+=e.backing.length),e.decrementBucket(l,r.at(a))}e.trim()},t})(),eN=(function(){function t(e,n){this.Ge=e,this.vt=n,this.kind=fn.EXPONENTIAL_HISTOGRAM}return t.prototype.createAccumulation=function(e){return new tN(e,this.Ge,this.vt)},t.prototype.merge=function(e,n){var r=n.clone();return r.merge(e),r},t.prototype.diff=function(e,n){var r=n.clone();return r.diff(e),r},t.prototype.toMetricData=function(e,n,r,i){return{descriptor:e,aggregationTemporality:n,dataPointType:be.EXPONENTIAL_HISTOGRAM,dataPoints:r.map(function(o){var s=Qx(o,2),a=s[0],c=s[1],l=c.toPointValue(),u=e.type===K.GAUGE||e.type===K.UP_DOWN_COUNTER||e.type===K.OBSERVABLE_GAUGE||e.type===K.OBSERVABLE_UP_DOWN_COUNTER;return{attributes:a,startTime:c.startTime,endTime:i,value:{min:l.hasMinMax?l.min:void 0,max:l.hasMinMax?l.max:void 0,sum:u?void 0:l.sum,positive:{offset:l.positive.offset,bucketCounts:l.positive.bucketCounts},negative:{offset:l.negative.offset,bucketCounts:l.negative.bucketCounts},count:l.count,scale:l.scale,zeroCount:l.zeroCount}}})}},t})(),nN=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},yl=(function(){function t(e,n,r){n===void 0&&(n=0),r===void 0&&(r=[0,0]),this.startTime=e,this.ee=n,this.sampleTime=r}return t.prototype.record=function(e){this.ee=e,this.sampleTime=Qt(Date.now())},t.prototype.setStartTime=function(e){this.startTime=e},t.prototype.toPointValue=function(){return this.ee},t})(),rN=(function(){function t(){this.kind=fn.LAST_VALUE}return t.prototype.createAccumulation=function(e){return new yl(e)},t.prototype.merge=function(e,n){var r=Bi(n.sampleTime)>=Bi(e.sampleTime)?n:e;return new yl(e.startTime,r.toPointValue(),r.sampleTime)},t.prototype.diff=function(e,n){var r=Bi(n.sampleTime)>=Bi(e.sampleTime)?n:e;return new yl(n.startTime,r.toPointValue(),r.sampleTime)},t.prototype.toMetricData=function(e,n,r,i){return{descriptor:e,aggregationTemporality:n,dataPointType:be.GAUGE,dataPoints:r.map(function(o){var s=nN(o,2),a=s[0],c=s[1];return{attributes:a,startTime:c.startTime,endTime:i,value:c.toPointValue()}})}},t})(),iN=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},Zr=(function(){function t(e,n,r,i){r===void 0&&(r=0),i===void 0&&(i=!1),this.startTime=e,this.monotonic=n,this.ee=r,this.reset=i}return t.prototype.record=function(e){this.monotonic&&e<0||(this.ee+=e)},t.prototype.setStartTime=function(e){this.startTime=e},t.prototype.toPointValue=function(){return this.ee},t})(),lf=(function(){function t(e){this.monotonic=e,this.kind=fn.SUM}return t.prototype.createAccumulation=function(e){return new Zr(e,this.monotonic)},t.prototype.merge=function(e,n){var r=e.toPointValue(),i=n.toPointValue();return n.reset?new Zr(n.startTime,this.monotonic,i,n.reset):new Zr(e.startTime,this.monotonic,r+i)},t.prototype.diff=function(e,n){var r=e.toPointValue(),i=n.toPointValue();return this.monotonic&&r>i?new Zr(n.startTime,this.monotonic,i,!0):new Zr(n.startTime,this.monotonic,i-r)},t.prototype.toMetricData=function(e,n,r,i){return{descriptor:e,aggregationTemporality:n,dataPointType:be.SUM,dataPoints:r.map(function(o){var s=iN(o,2),a=s[0],c=s[1];return{attributes:a,startTime:c.startTime,endTime:i,value:c.toPointValue()}}),isMonotonic:this.monotonic}},t})(),bn=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),Ne=(function(){function t(){}return t.Drop=function(){return ky},t.Sum=function(){return Vy},t.LastValue=function(){return xy},t.Histogram=function(){return Ny},t.ExponentialHistogram=function(){return pN},t.Default=function(){return dN},t})(),oN=(function(t){bn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.createAggregator=function(n){return e.DEFAULT_INSTANCE},e.DEFAULT_INSTANCE=new Xx,e})(Ne),sN=(function(t){bn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.createAggregator=function(n){switch(n.type){case K.COUNTER:case K.OBSERVABLE_COUNTER:case K.HISTOGRAM:return e.MONOTONIC_INSTANCE;default:return e.NON_MONOTONIC_INSTANCE}},e.MONOTONIC_INSTANCE=new lf(!0),e.NON_MONOTONIC_INSTANCE=new lf(!1),e})(Ne),aN=(function(t){bn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.createAggregator=function(n){return e.DEFAULT_INSTANCE},e.DEFAULT_INSTANCE=new rN,e})(Ne),lN=(function(t){bn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.createAggregator=function(n){return e.DEFAULT_INSTANCE},e.DEFAULT_INSTANCE=new Iy([0,5,10,25,50,75,100,250,500,750,1e3,2500,5e3,7500,1e4],!0),e})(Ne),cN=(function(t){bn(e,t);function e(n,r){r===void 0&&(r=!0);var i=t.call(this)||this;if(i.vt=r,n==null)throw new Error("ExplicitBucketHistogramAggregation should be created with explicit boundaries, if a single bucket histogram is required, please pass an empty array");n=n.concat(),n=n.sort(function(a,c){return a-c});var o=n.lastIndexOf(-1/0),s=n.indexOf(1/0);return s===-1&&(s=void 0),i.cr=n.slice(o+1,s),i}return e.prototype.createAggregator=function(n){return new Iy(this.cr,this.vt)},e})(Ne),uN=(function(t){bn(e,t);function e(n,r){n===void 0&&(n=160),r===void 0&&(r=!0);var i=t.call(this)||this;return i.Ge=n,i.vt=r,i}return e.prototype.createAggregator=function(n){return new eN(this.Ge,this.vt)},e})(Ne),hN=(function(t){bn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.Ar=function(n){switch(n.type){case K.COUNTER:case K.UP_DOWN_COUNTER:case K.OBSERVABLE_COUNTER:case K.OBSERVABLE_UP_DOWN_COUNTER:return Vy;case K.GAUGE:case K.OBSERVABLE_GAUGE:return xy;case K.HISTOGRAM:return n.advice.explicitBucketBoundaries?new cN(n.advice.explicitBucketBoundaries):Ny}return X.warn("Unable to recognize instrument type: "+n.type),ky},e.prototype.createAggregator=function(n){return this.Ar(n).createAggregator(n)},e})(Ne),ky=new oN,Vy=new sN,xy=new aN,Ny=new lN,pN=new uN,dN=new hN,fN=function(t){return Ne.Default()},mN=function(t){return se.CUMULATIVE},gl=function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(u){try{l(r.next(u))}catch(h){s(h)}}function c(u){try{l(r.throw(u))}catch(h){s(h)}}function l(u){u.done?o(u.value):i(u.value).then(a,c)}l((r=r.apply(t,[])).next())})},bl=function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(u){l=[6,u],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},cf=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},yN=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},gN=(function(){function t(e){var n,r,i;this.Be=!1,this.Hi=(n=e==null?void 0:e.aggregationSelector)!==null&&n!==void 0?n:fN,this.zi=(r=e==null?void 0:e.aggregationTemporalitySelector)!==null&&r!==void 0?r:mN,this.ga=(i=e==null?void 0:e.metricProducers)!==null&&i!==void 0?i:[],this.Ko=e==null?void 0:e.cardinalitySelector}return t.prototype.setMetricProducer=function(e){if(this.Bi)throw new Error("MetricReader can not be bound to a MeterProvider again.");this.Bi=e,this.onInitialized()},t.prototype.selectAggregation=function(e){return this.Hi(e)},t.prototype.selectAggregationTemporality=function(e){return this.zi(e)},t.prototype.selectCardinalityLimit=function(e){return this.Ko?this.Ko(e):2e3},t.prototype.onInitialized=function(){},t.prototype.collect=function(e){return gl(this,void 0,void 0,function(){var n,r,i,o,s,a;return bl(this,function(c){switch(c.label){case 0:if(this.Bi===void 0)throw new Error("MetricReader is not bound to a MetricProducer");if(this.Be)throw new Error("MetricReader is shutdown");return[4,Promise.all(yN([this.Bi.collect({timeoutMillis:e==null?void 0:e.timeoutMillis})],cf(this.ga.map(function(l){return l.collect({timeoutMillis:e==null?void 0:e.timeoutMillis})})),!1))];case 1:return n=cf.apply(void 0,[c.sent()]),r=n[0],i=n.slice(1),o=r.errors.concat(nf(i,function(l){return l.errors})),s=r.resourceMetrics.resource,a=r.resourceMetrics.scopeMetrics.concat(nf(i,function(l){return l.resourceMetrics.scopeMetrics})),[2,{resourceMetrics:{resource:s,scopeMetrics:a},errors:o}]}})})},t.prototype.shutdown=function(e){return gl(this,void 0,void 0,function(){return bl(this,function(n){switch(n.label){case 0:return this.Be?(X.error("Cannot call shutdown twice."),[2]):(e==null?void 0:e.timeoutMillis)!=null?[3,2]:[4,this.onShutdown()];case 1:return n.sent(),[3,4];case 2:return[4,Jr(this.onShutdown(),e.timeoutMillis)];case 3:n.sent(),n.label=4;case 4:return this.Be=!0,[2]}})})},t.prototype.forceFlush=function(e){return gl(this,void 0,void 0,function(){return bl(this,function(n){switch(n.label){case 0:return this.Be?(X.warn("Cannot forceFlush on already shutdown MetricReader."),[2]):(e==null?void 0:e.timeoutMillis)!=null?[3,2]:[4,this.onForceFlush()];case 1:return n.sent(),[2];case 2:return[4,Jr(this.onForceFlush(),e.timeoutMillis)];case 3:return n.sent(),[2]}})})},t})(),bN=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),no=function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(u){try{l(r.next(u))}catch(h){s(h)}}function c(u){try{l(r.throw(u))}catch(h){s(h)}}function l(u){u.done?o(u.value):i(u.value).then(a,c)}l((r=r.apply(t,[])).next())})},ro=function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(u){l=[6,u],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},vN=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},wN=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},SN=(function(t){bN(e,t);function e(n){var r,i,o,s,a=t.call(this,{aggregationSelector:(r=n.exporter.selectAggregation)===null||r===void 0?void 0:r.bind(n.exporter),aggregationTemporalitySelector:(i=n.exporter.selectAggregationTemporality)===null||i===void 0?void 0:i.bind(n.exporter),metricProducers:n.metricProducers})||this;if(n.exportIntervalMillis!==void 0&&n.exportIntervalMillis<=0)throw Error("exportIntervalMillis must be greater than 0");if(n.exportTimeoutMillis!==void 0&&n.exportTimeoutMillis<=0)throw Error("exportTimeoutMillis must be greater than 0");if(n.exportTimeoutMillis!==void 0&&n.exportIntervalMillis!==void 0&&n.exportIntervalMillis<n.exportTimeoutMillis)throw Error("exportIntervalMillis must be greater than or equal to exportTimeoutMillis");return a.ba=(o=n.exportIntervalMillis)!==null&&o!==void 0?o:6e4,a.ji=(s=n.exportTimeoutMillis)!==null&&s!==void 0?s:3e4,a.Gn=n.exporter,a}return e.prototype._o=function(){return no(this,void 0,void 0,function(){var n;return ro(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,Jr(this.va(),this.ji)];case 1:return r.sent(),[3,3];case 2:return n=r.sent(),n instanceof Sy?(X.error("Export took longer than %s milliseconds and timed out.",this.ji),[2]):(Ye(n),[3,3]);case 3:return[2]}})})},e.prototype.va=function(){var n,r;return no(this,void 0,void 0,function(){var i,o,s,a,c,l;return ro(this,function(u){switch(u.label){case 0:return[4,this.collect({timeoutMillis:this.ji})];case 1:if(i=u.sent(),o=i.resourceMetrics,s=i.errors,s.length>0&&(l=X).error.apply(l,wN(["PeriodicExportingMetricReader: metrics collection errors"],vN(s),!1)),!o.resource.asyncAttributesPending)return[3,5];u.label=2;case 2:return u.trys.push([2,4,,5]),[4,(r=(n=o.resource).waitForAsyncAttributes)===null||r===void 0?void 0:r.call(n)];case 3:return u.sent(),[3,5];case 4:return a=u.sent(),X.debug("Error while resolving async portion of resource: ",a),Ye(a),[3,5];case 5:return o.scopeMetrics.length===0?[2]:[4,ik.Ns(this.Gn,o)];case 6:if(c=u.sent(),c.code!==kt.SUCCESS)throw new Error("PeriodicExportingMetricReader: metrics export failed (error "+c.error+")");return[2]}})})},e.prototype.onInitialized=function(){var n=this;this.Ho=setInterval(function(){n._o()},this.ba)},e.prototype.onForceFlush=function(){return no(this,void 0,void 0,function(){return ro(this,function(n){switch(n.label){case 0:return[4,this._o()];case 1:return n.sent(),[4,this.Gn.forceFlush()];case 2:return n.sent(),[2]}})})},e.prototype.onShutdown=function(){return no(this,void 0,void 0,function(){return ro(this,function(n){switch(n.label){case 0:return this.Ho&&clearInterval(this.Ho),[4,this.onForceFlush()];case 1:return n.sent(),[4,this.Gn.shutdown()];case 2:return n.sent(),[2]}})})},e})(gN),IN=(function(){function t(){this.zo=[]}return t.prototype.addView=function(e){this.zo.push(e)},t.prototype.findViews=function(e,n){var r=this,i=this.zo.filter(function(o){return r.wa(o.instrumentSelector,e)&&r.Sa(o.meterSelector,n)});return i},t.prototype.wa=function(e,n){return(e.getType()===void 0||n.type===e.getType())&&e.getNameFilter().match(n.name)&&e.getUnitFilter().match(n.unit)},t.prototype.Sa=function(e,n){return e.getNameFilter().match(n.name)&&(n.version===void 0||e.getVersionFilter().match(n.version))&&(n.schemaUrl===void 0||e.getSchemaUrlFilter().match(n.schemaUrl))},t})(),vn=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),zo=(function(){function t(e,n){this.Ia=e,this.qe=n}return t.prototype.Vr=function(e,n,r){if(n===void 0&&(n={}),r===void 0&&(r=tt.active()),typeof e!="number"){X.warn("non-number value provided to metric "+this.qe.name+": "+e);return}this.qe.valueType===De.INT&&!Number.isInteger(e)&&(X.warn("INT value type cannot accept a floating-point value for "+this.qe.name+", ignoring the fractional digits."),e=Math.trunc(e),!Number.isInteger(e))||this.Ia.record(e,n,r,Qt(Date.now()))},t})(),TN=(function(t){vn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.add=function(n,r,i){this.Vr(n,r,i)},e})(zo),EN=(function(t){vn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.add=function(n,r,i){if(n<0){X.warn("negative value provided to counter "+this.qe.name+": "+n);return}this.Vr(n,r,i)},e})(zo),RN=(function(t){vn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.record=function(n,r,i){this.Vr(n,r,i)},e})(zo),CN=(function(t){vn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.record=function(n,r,i){if(n<0){X.warn("negative value provided to histogram "+this.qe.name+": "+n);return}this.Vr(n,r,i)},e})(zo),Bo=(function(){function t(e,n,r){this.Bo=r,this.qe=e,this.jo=n}return t.prototype.addCallback=function(e){this.Bo.addCallback(e,this)},t.prototype.removeCallback=function(e){this.Bo.removeCallback(e,this)},t})(),ZN=(function(t){vn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e})(Bo),kN=(function(t){vn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e})(Bo),VN=(function(t){vn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e})(Bo);function Ql(t){return t instanceof Bo}var xN=(function(){function t(e){this.Ke=e}return t.prototype.createGauge=function(e,n){var r=Pe(e,K.GAUGE,n),i=this.Ke.registerMetricStorage(r);return new RN(i,r)},t.prototype.createHistogram=function(e,n){var r=Pe(e,K.HISTOGRAM,n),i=this.Ke.registerMetricStorage(r);return new CN(i,r)},t.prototype.createCounter=function(e,n){var r=Pe(e,K.COUNTER,n),i=this.Ke.registerMetricStorage(r);return new EN(i,r)},t.prototype.createUpDownCounter=function(e,n){var r=Pe(e,K.UP_DOWN_COUNTER,n),i=this.Ke.registerMetricStorage(r);return new TN(i,r)},t.prototype.createObservableGauge=function(e,n){var r=Pe(e,K.OBSERVABLE_GAUGE,n),i=this.Ke.registerAsyncMetricStorage(r);return new kN(r,i,this.Ke.observableRegistry)},t.prototype.createObservableCounter=function(e,n){var r=Pe(e,K.OBSERVABLE_COUNTER,n),i=this.Ke.registerAsyncMetricStorage(r);return new ZN(r,i,this.Ke.observableRegistry)},t.prototype.createObservableUpDownCounter=function(e,n){var r=Pe(e,K.OBSERVABLE_UP_DOWN_COUNTER,n),i=this.Ke.registerAsyncMetricStorage(r);return new VN(r,i,this.Ke.observableRegistry)},t.prototype.addBatchObservableCallback=function(e,n){this.Ke.observableRegistry.addBatchCallback(e,n)},t.prototype.removeBatchObservableCallback=function(e,n){this.Ke.observableRegistry.removeBatchCallback(e,n)},t})(),Oy=(function(){function t(e){this.an=e}return t.prototype.getInstrumentDescriptor=function(){return this.an},t.prototype.updateDescription=function(e){this.an=Pe(this.an.name,this.an.type,{description:e,valueType:this.an.valueType,unit:this.an.unit,advice:this.an.advice})},t})(),NN=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),uf=function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(u){l=[6,u],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},ON=(function(){function t(e){this.xr=e,this.bn=new Map,this.Jn=new Map}return t.prototype.get=function(e,n){return n!=null||(n=this.xr(e)),this.bn.get(n)},t.prototype.getOrDefault=function(e,n){var r=this.xr(e);if(this.bn.has(r))return this.bn.get(r);var i=n();return this.Jn.has(r)||this.Jn.set(r,e),this.bn.set(r,i),i},t.prototype.set=function(e,n,r){r!=null||(r=this.xr(e)),this.Jn.has(r)||this.Jn.set(r,e),this.bn.set(r,n)},t.prototype.has=function(e,n){return n!=null||(n=this.xr(e)),this.bn.has(n)},t.prototype.keys=function(){var e,n;return uf(this,function(r){switch(r.label){case 0:e=this.Jn.entries(),n=e.next(),r.label=1;case 1:return n.done===!0?[3,3]:[4,[n.value[1],n.value[0]]];case 2:return r.sent(),n=e.next(),[3,1];case 3:return[2]}})},t.prototype.entries=function(){var e,n;return uf(this,function(r){switch(r.label){case 0:e=this.bn.entries(),n=e.next(),r.label=1;case 1:return n.done===!0?[3,3]:[4,[this.Jn.get(n.value[0]),n.value[1],n.value[0]]];case 2:return r.sent(),n=e.next(),[3,1];case 3:return[2]}})},Object.defineProperty(t.prototype,"size",{get:function(){return this.bn.size},enumerable:!1,configurable:!0}),t})(),un=(function(t){NN(e,t);function e(){return t.call(this,wy)||this}return e})(ON),GN=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},Gy=(function(){function t(e,n){this.rn=e,this.ln=new un,this.Dn=new un,this.Qi={"otel.metric.overflow":!0},this.Qo=(n!=null?n:2e3)-1,this.Ta=wy(this.Qi)}return t.prototype.record=function(e,n,r,i){var o=this,s=this.ln.get(n);if(!s){if(this.ln.size>=this.Qo){var a=this.ln.getOrDefault(this.Qi,function(){return o.rn.createAccumulation(i)});a==null||a.record(e);return}s=this.rn.createAccumulation(i),this.ln.set(n,s)}s==null||s.record(e)},t.prototype.batchCumulate=function(e,n){var r=this;Array.from(e.entries()).forEach(function(i){var o=GN(i,3),s=o[0],a=o[1],c=o[2],l=r.rn.createAccumulation(n);l==null||l.record(a);var u=l;if(r.Dn.has(s,c)){var h=r.Dn.get(s,c);u=r.rn.diff(h,l)}else if(r.Dn.size>=r.Qo&&(s=r.Qi,c=r.Ta,r.Dn.has(s,c))){var h=r.Dn.get(s,c);u=r.rn.diff(h,l)}if(r.ln.has(s,c)){var p=r.ln.get(s,c);u=r.rn.merge(p,u)}r.Dn.set(s,l,c),r.ln.set(s,u,c)})},t.prototype.collect=function(){var e=this.ln;return this.ln=new un,e},t})(),vl=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},hf=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},Ly=(function(){function t(e,n){var r=this;this.rn=e,this.Yn=new Map,this.qi=new Map,n.forEach(function(i){r.Yn.set(i,[])})}return t.prototype.buildMetrics=function(e,n,r,i){this.Ea(r);var o=this.Ra(e),s=o,a;if(this.qi.has(e)){var c=this.qi.get(e),l=c.collectionTime;a=c.aggregationTemporality,a===se.CUMULATIVE?s=t.merge(c.accumulations,o,this.rn):s=t.calibrateStartTime(c.accumulations,o,l)}else a=e.selectAggregationTemporality(n.type);this.qi.set(e,{accumulations:s,collectionTime:i,aggregationTemporality:a});var u=LN(s);if(u.length!==0)return this.rn.toMetricData(n,a,u,i)},t.prototype.Ea=function(e){var n,r,i=this.Yn.keys();try{for(var o=vl(i),s=o.next();!s.done;s=o.next()){var a=s.value,c=this.Yn.get(a);c===void 0&&(c=[],this.Yn.set(a,c)),c.push(e)}}catch(l){n={error:l}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}},t.prototype.Ra=function(e){var n,r,i=new un,o=this.Yn.get(e);if(this.Yn.set(e,[]),o===void 0)return i;try{for(var s=vl(o),a=s.next();!a.done;a=s.next()){var c=a.value;i=t.merge(i,c,this.rn)}}catch(l){n={error:l}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return i},t.merge=function(e,n,r){for(var i=e,o=n.entries(),s=o.next();s.done!==!0;){var a=hf(s.value,3),c=a[0],l=a[1],u=a[2];if(e.has(c,u)){var h=e.get(c,u),p=r.merge(h,l);i.set(c,p,u)}else i.set(c,l,u);s=o.next()}return i},t.calibrateStartTime=function(e,n,r){var i,o;try{for(var s=vl(e.keys()),a=s.next();!a.done;a=s.next()){var c=hf(a.value,2),l=c[0],u=c[1],h=n.get(l,u);h==null||h.setStartTime(r)}}catch(p){i={error:p}}finally{try{a&&!a.done&&(o=s.return)&&o.call(s)}finally{if(i)throw i.error}}return n},t})();function LN(t){return Array.from(t.entries())}var XN=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),WN=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},UN=(function(t){XN(e,t);function e(n,r,i,o,s){var a=t.call(this,n)||this;return a.eo=i,a.no=s,a.pr=new Gy(r,a.no),a.ro=new Ly(r,o),a}return e.prototype.record=function(n,r){var i=this,o=new un;Array.from(n.entries()).forEach(function(s){var a=WN(s,2),c=a[0],l=a[1];o.set(i.eo.process(c),l)}),this.pr.batchCumulate(o,r)},e.prototype.collect=function(n,r){var i=this.pr.collect();return this.ro.buildMetrics(n,this.an,i,r)},e})(Oy);function pf(t,e){var n="";return t.unit!==e.unit&&(n+=" - Unit '"+t.unit+"' does not match '"+e.unit+`'
631
+ `).filter(function(c){return!!c.match(r)&&!c.match(/^Error created at/)},this);return a.map(function(c){var l=c.split("@"),u=this.extractLocation(l.pop()),h=l.shift()||"",p=h.replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^)]*\)/g,"")||void 0,f;h.match(/\(([^)]*)\)/)&&(f=h.replace(/^[^(]+\(([^)]*)\)$/,"$1"));var m=f===void 0||f==="[arguments not available]"?void 0:f.split(",");return new n({functionName:p,args:m,fileName:u[0],lineNumber:u[1],columnNumber:u[2],source:c})},this)}}})})(Zm);var WR=Zm.exports,xd=gc(WR);function Ho(t){try{return xd.parse(t)}catch(e){try{return xd.parse(new Error)}catch(n){return console.warn("Highlight Warning: failed to parse error",{originalError:e,secondaryError:n}),[]}}}function UR(t,e){let n=e.logger,r;r=window[n];let i=[];if(e.level.includes("error")&&window){let s=a=>{let{message:c,error:l}=a,u=[];l&&(u=Ho(l));let h=[Al(c,e.stringifyOptions)];t({type:"Error",trace:u,time:Date.now(),value:h})};window.addEventListener("error",s),i.push(()=>{window&&window.removeEventListener("error",s)})}for(let s of e.level)i.push(o(r,s));return()=>{i.forEach(s=>s())};function o(s,a){return s[a]?BE(s,a,c=>(...l)=>{c.apply(this,l);try{t(PR(a,e,...l))}catch(u){c("highlight logger error:",u,...l)}}):()=>{}}}function PR(t,e,...n){let r=Ho(new Error),i=e.serializeConsoleAttributes?n.map(o=>typeof o=="object"?Al(o,e.stringifyOptions):o):n.filter(o=>typeof o!="object").map(o=>`${o}`);return{type:t,trace:r.slice(1),value:i,attributes:Al(n.filter(o=>typeof o=="object").reduce((o,s)=>mt(mt({},o),s),{}),e.stringifyOptions),time:Date.now()}}function nl(t,e,n,r){var i,o,s,a;let c=r!=null?r:e,l=Ho(c),u={};e instanceof Error&&(e=e.message,e.cause&&(u={"exception.cause":e.cause}));let h=FR(l);t({error:c,event:on(e),type:"window.onerror",url:window.location.href,source:n!=null?n:"",lineNumber:(i=h[0])!=null&&i.lineNumber?(o=h[0])==null?void 0:o.lineNumber:0,columnNumber:(s=h[0])!=null&&s.columnNumber?(a=h[0])==null?void 0:a.columnNumber:0,stackTrace:h,timestamp:new Date().toISOString(),payload:u?on(u):void 0})}var MR=(t,{enablePromisePatch:e})=>{if(typeof window>"u")return()=>{};let n=window.onerror=(s,a,c,l,u)=>{nl(t,s,a,u)},r=window.onunhandledrejection=s=>{if(s.reason){let a=s.promise;a.getStack?nl(t,s.reason,s.type,a.getStack()):nl(t,s.reason,s.type)}},i=window.Promise,o=class extends i{constructor(s){super(s),yt(this,"promiseCreationError"),this.promiseCreationError=new Error}getStack(){return this.promiseCreationError}static shouldPatch(){let s=typeof window.Zone>"u";return e&&s}};return o.shouldPatch()&&(window.Promise=o),()=>{window.Promise=i,window.onunhandledrejection=r,window.onerror=n}},FR=t=>{var e,n;if(t.length===0)return t;let r=t[0];return(e=r.fileName)!=null&&e.includes("highlight.run")||(n=r.fileName)!=null&&n.includes("highlight.io")||r.functionName==="new highlightPromise"?t.slice(1):t},Od=['["\\"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}','["{}"]','"{}"','[""]','""','["\\"\\""]','""'],Nd=["websocket error",'\\"ResizeObserver loop'],AR=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{},un="1.9.0",Gd=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;function JR(t){var e=new Set([t]),n=new Set,r=t.match(Gd);if(!r)return function(){return!1};var i={major:+r[1],minor:+r[2],patch:+r[3],prerelease:r[4]};if(i.prerelease!=null)return function(a){return a===t};function o(a){return n.add(a),!1}function s(a){return e.add(a),!0}return function(a){if(e.has(a))return!0;if(n.has(a))return!1;var c=a.match(Gd);if(!c)return o(a);var l={major:+c[1],minor:+c[2],patch:+c[3],prerelease:c[4]};return l.prerelease!=null||i.major!==l.major?o(a):i.major===0?i.minor===l.minor&&i.patch<=l.patch?s(a):o(a):i.minor<=l.minor?s(a):o(a)}}var DR=JR(un),YR=un.split(".")[0],Fr=Symbol.for("opentelemetry.js.api."+YR),Ar=AR;function Hr(t,e,n,r){var i;r===void 0&&(r=!1);var o=Ar[Fr]=(i=Ar[Fr])!==null&&i!==void 0?i:{version:un};if(!r&&o[t]){var s=new Error("@opentelemetry/api: Attempted duplicate registration of API: "+t);return n.error(s.stack||s.message),!1}if(o.version!==un){var s=new Error("@opentelemetry/api: Registration of version v"+o.version+" for "+t+" does not match previously registered API v"+un);return n.error(s.stack||s.message),!1}return o[t]=e,n.debug("@opentelemetry/api: Registered a global for "+t+" v"+un+"."),!0}function dn(t){var e,n,r=(e=Ar[Fr])===null||e===void 0?void 0:e.version;if(!(!r||!DR(r)))return(n=Ar[Fr])===null||n===void 0?void 0:n[t]}function zr(t,e){e.debug("@opentelemetry/api: Unregistering a global for "+t+" v"+un+".");var n=Ar[Fr];n&&delete n[t]}var KR=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},_R=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},HR=(function(){function t(e){this.Fr=e.namespace||"DiagComponentLogger"}return t.prototype.debug=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return Tr("debug",this.Fr,e)},t.prototype.error=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return Tr("error",this.Fr,e)},t.prototype.info=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return Tr("info",this.Fr,e)},t.prototype.warn=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return Tr("warn",this.Fr,e)},t.prototype.verbose=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return Tr("verbose",this.Fr,e)},t})();function Tr(t,e,n){var r=dn("diag");if(r)return n.unshift(e),r[t].apply(r,_R([],KR(n),!1))}var wt;(function(t){t[t.NONE=0]="NONE",t[t.ERROR=30]="ERROR",t[t.WARN=50]="WARN",t[t.INFO=60]="INFO",t[t.DEBUG=70]="DEBUG",t[t.VERBOSE=80]="VERBOSE",t[t.ALL=9999]="ALL"})(wt||(wt={}));function zR(t,e){t<wt.NONE?t=wt.NONE:t>wt.ALL&&(t=wt.ALL),e=e||{};function n(r,i){var o=e[r];return typeof o=="function"&&t>=i?o.bind(e):function(){}}return{error:n("error",wt.ERROR),warn:n("warn",wt.WARN),info:n("info",wt.INFO),debug:n("debug",wt.DEBUG),verbose:n("verbose",wt.VERBOSE)}}var BR=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},jR=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},QR="diag",we=(function(){function t(){function e(i){return function(){for(var o=[],s=0;s<arguments.length;s++)o[s]=arguments[s];var a=dn("diag");if(a)return a[i].apply(a,jR([],BR(o),!1))}}var n=this,r=function(i,o){var s,a,c;if(o===void 0&&(o={logLevel:wt.INFO}),i===n){var l=new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");return n.error((s=l.stack)!==null&&s!==void 0?s:l.message),!1}typeof o=="number"&&(o={logLevel:o});var u=dn("diag"),h=zR((a=o.logLevel)!==null&&a!==void 0?a:wt.INFO,i);if(u&&!o.suppressOverrideMessage){var p=(c=new Error().stack)!==null&&c!==void 0?c:"<failed to generate stacktrace>";u.warn("Current logger will be overwritten from "+p),h.warn("Current logger will overwrite one already registered from "+p)}return Hr("diag",h,n,!0)};n.setLogger=r,n.disable=function(){zr(QR,n)},n.createComponentLogger=function(i){return new HR(i)},n.verbose=e("verbose"),n.debug=e("debug"),n.info=e("info"),n.warn=e("warn"),n.error=e("error")}return t.instance=function(){return this.I||(this.I=new t),this.I},t})(),$R=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},qR=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},tC=(function(){function t(e){this.Qn=e?new Map(e):new Map}return t.prototype.getEntry=function(e){var n=this.Qn.get(e);if(n)return Object.assign({},n)},t.prototype.getAllEntries=function(){return Array.from(this.Qn.entries()).map(function(e){var n=$R(e,2),r=n[0],i=n[1];return[r,i]})},t.prototype.setEntry=function(e,n){var r=new t(this.Qn);return r.Qn.set(e,n),r},t.prototype.removeEntry=function(e){var n=new t(this.Qn);return n.Qn.delete(e),n},t.prototype.removeEntries=function(){for(var e,n,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var o=new t(this.Qn);try{for(var s=qR(r),a=s.next();!a.done;a=s.next()){var c=a.value;o.Qn.delete(c)}}catch(l){e={error:l}}finally{try{a&&!a.done&&(n=s.return)&&n.call(s)}finally{if(e)throw e.error}}return o},t.prototype.clear=function(){return new t},t})(),eC=Symbol("BaggageEntryMetadata"),nC=we.instance();function rC(t){return t===void 0&&(t={}),new tC(new Map(Object.entries(t)))}function iC(t){return typeof t!="string"&&(nC.error("Cannot create baggage metadata from unknown type: "+typeof t),t=""),{__TYPE__:eC,toString:function(){return t}}}function Ic(t){return Symbol.for(t)}var oC=(function(){function t(e){var n=this;n.Ge=e?new Map(e):new Map,n.getValue=function(r){return n.Ge.get(r)},n.setValue=function(r,i){var o=new t(n.Ge);return o.Ge.set(r,i),o},n.deleteValue=function(r){var i=new t(n.Ge);return i.Ge.delete(r),i}}return t})(),sn=new oC,gn=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),sC=(function(){function t(){}return t.prototype.createGauge=function(e,n){return mC},t.prototype.createHistogram=function(e,n){return yC},t.prototype.createCounter=function(e,n){return fC},t.prototype.createUpDownCounter=function(e,n){return gC},t.prototype.createObservableGauge=function(e,n){return vC},t.prototype.createObservableCounter=function(e,n){return bC},t.prototype.createObservableUpDownCounter=function(e,n){return wC},t.prototype.addBatchObservableCallback=function(e,n){},t.prototype.removeBatchObservableCallback=function(e){},t})(),zo=(function(){function t(){}return t})(),aC=(function(t){gn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.add=function(n,r){},e})(zo),lC=(function(t){gn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.add=function(n,r){},e})(zo),cC=(function(t){gn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.record=function(n,r){},e})(zo),uC=(function(t){gn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.record=function(n,r){},e})(zo),Tc=(function(){function t(){}return t.prototype.addCallback=function(e){},t.prototype.removeCallback=function(e){},t})(),hC=(function(t){gn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e})(Tc),pC=(function(t){gn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e})(Tc),dC=(function(t){gn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e})(Tc),km=new sC,fC=new aC,mC=new cC,yC=new uC,gC=new lC,bC=new hC,vC=new pC,wC=new dC;function SC(){return km}var Ye;(function(t){t[t.INT=0]="INT",t[t.DOUBLE=1]="DOUBLE"})(Ye||(Ye={}));var IC={get:function(t,e){if(t!=null)return t[e]},keys:function(t){return t==null?[]:Object.keys(t)}},TC={set:function(t,e,n){t!=null&&(t[e]=n)}},EC=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},RC=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},CC=(function(){function t(){}return t.prototype.active=function(){return sn},t.prototype.with=function(e,n,r){for(var i=[],o=3;o<arguments.length;o++)i[o-3]=arguments[o];return n.call.apply(n,RC([r],EC(i),!1))},t.prototype.bind=function(e,n){return n},t.prototype.enable=function(){return this},t.prototype.disable=function(){return this},t})(),ZC=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},kC=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},rl="context",VC=new CC,Bo=(function(){function t(){}return t.getInstance=function(){return this.I||(this.I=new t),this.I},t.prototype.setGlobalContextManager=function(e){return Hr(rl,e,we.instance())},t.prototype.active=function(){return this.ii().active()},t.prototype.with=function(e,n,r){for(var i,o=[],s=3;s<arguments.length;s++)o[s-3]=arguments[s];return(i=this.ii()).with.apply(i,kC([e,n,r],ZC(o),!1))},t.prototype.bind=function(e,n){return this.ii().bind(e,n)},t.prototype.ii=function(){return dn(rl)||VC},t.prototype.disable=function(){this.ii().disable(),zr(rl,we.instance())},t})(),Oe;(function(t){t[t.NONE=0]="NONE",t[t.SAMPLED=1]="SAMPLED"})(Oe||(Oe={}));var Vm="0000000000000000",xm="00000000000000000000000000000000",Om={traceId:xm,spanId:Vm,traceFlags:Oe.NONE},Gr=(function(){function t(e){e===void 0&&(e=Om),this.lr=e}return t.prototype.spanContext=function(){return this.lr},t.prototype.setAttribute=function(e,n){return this},t.prototype.setAttributes=function(e){return this},t.prototype.addEvent=function(e,n){return this},t.prototype.addLink=function(e){return this},t.prototype.addLinks=function(e){return this},t.prototype.setStatus=function(e){return this},t.prototype.updateName=function(e){return this},t.prototype.end=function(e){},t.prototype.isRecording=function(){return!1},t.prototype.recordException=function(e,n){},t})(),Ec=Ic("OpenTelemetry Context Key SPAN");function Rc(t){return t.getValue(Ec)||void 0}function xC(){return Rc(Bo.getInstance().active())}function Cc(t,e){return t.setValue(Ec,e)}function OC(t){return t.deleteValue(Ec)}function NC(t,e){return Cc(t,new Gr(e))}function Nm(t){var e;return(e=Rc(t))===null||e===void 0?void 0:e.spanContext()}var GC=/^([0-9a-f]{32})$/i,LC=/^[0-9a-f]{16}$/i;function Gm(t){return GC.test(t)&&t!==xm}function XC(t){return LC.test(t)&&t!==Vm}function jo(t){return Gm(t.traceId)&&XC(t.spanId)}function WC(t){return new Gr(t)}var il=Bo.getInstance(),Lm=(function(){function t(){}return t.prototype.startSpan=function(e,n,r){r===void 0&&(r=il.active());var i=!!(n!=null&&n.root);if(i)return new Gr;var o=r&&Nm(r);return UC(o)&&jo(o)?new Gr(o):new Gr},t.prototype.startActiveSpan=function(e,n,r,i){var o,s,a;if(!(arguments.length<2)){arguments.length===2?a=n:arguments.length===3?(o=n,a=r):(o=n,s=r,a=i);var c=s!=null?s:il.active(),l=this.startSpan(e,o,c),u=Cc(c,l);return il.with(u,a,void 0,l)}},t})();function UC(t){return typeof t=="object"&&typeof t.spanId=="string"&&typeof t.traceId=="string"&&typeof t.traceFlags=="number"}var PC=new Lm,MC=(function(){function t(e,n,r,i){this.cr=e,this.name=n,this.version=r,this.options=i}return t.prototype.startSpan=function(e,n,r){return this.bo().startSpan(e,n,r)},t.prototype.startActiveSpan=function(e,n,r,i){var o=this.bo();return Reflect.apply(o.startActiveSpan,o,arguments)},t.prototype.bo=function(){if(this.b)return this.b;var e=this.cr.getDelegateTracer(this.name,this.version,this.options);return e?(this.b=e,this.b):PC},t})(),FC=(function(){function t(){}return t.prototype.getTracer=function(e,n,r){return new Lm},t})(),AC=new FC,Ld=(function(){function t(){}return t.prototype.getTracer=function(e,n,r){var i;return(i=this.getDelegateTracer(e,n,r))!==null&&i!==void 0?i:new MC(this,e,n,r)},t.prototype.getDelegate=function(){var e;return(e=this.b)!==null&&e!==void 0?e:AC},t.prototype.setDelegate=function(e){this.b=e},t.prototype.getDelegateTracer=function(e,n,r){var i;return(i=this.b)===null||i===void 0?void 0:i.getTracer(e,n,r)},t})(),xo;(function(t){t[t.NOT_RECORD=0]="NOT_RECORD",t[t.RECORD=1]="RECORD",t[t.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(xo||(xo={}));var Jr;(function(t){t[t.INTERNAL=0]="INTERNAL",t[t.SERVER=1]="SERVER",t[t.CLIENT=2]="CLIENT",t[t.PRODUCER=3]="PRODUCER",t[t.CONSUMER=4]="CONSUMER"})(Jr||(Jr={}));var Oo;(function(t){t[t.UNSET=0]="UNSET",t[t.OK=1]="OK",t[t.ERROR=2]="ERROR"})(Oo||(Oo={}));var tt=Bo.getInstance(),X=we.instance(),JC=(function(){function t(){}return t.prototype.getMeter=function(e,n,r){return km},t})(),DC=new JC,ol="metrics",YC=(function(){function t(){}return t.getInstance=function(){return this.I||(this.I=new t),this.I},t.prototype.setGlobalMeterProvider=function(e){return Hr(ol,e,we.instance())},t.prototype.getMeterProvider=function(){return dn(ol)||DC},t.prototype.getMeter=function(e,n,r){return this.getMeterProvider().getMeter(e,n,r)},t.prototype.disable=function(){zr(ol,we.instance())},t})(),ke=YC.getInstance(),KC=(function(){function t(){}return t.prototype.inject=function(e,n){},t.prototype.extract=function(e,n){return e},t.prototype.fields=function(){return[]},t})(),Zc=Ic("OpenTelemetry Baggage Key");function Xm(t){return t.getValue(Zc)||void 0}function _C(){return Xm(Bo.getInstance().active())}function HC(t,e){return t.setValue(Zc,e)}function zC(t){return t.deleteValue(Zc)}var sl="propagation",BC=new KC,jC=(function(){function t(){this.createBaggage=rC,this.getBaggage=Xm,this.getActiveBaggage=_C,this.setBaggage=HC,this.deleteBaggage=zC}return t.getInstance=function(){return this.I||(this.I=new t),this.I},t.prototype.setGlobalPropagator=function(e){return Hr(sl,e,we.instance())},t.prototype.inject=function(e,n,r){return r===void 0&&(r=TC),this.Ri().inject(e,n,r)},t.prototype.extract=function(e,n,r){return r===void 0&&(r=IC),this.Ri().extract(e,n,r)},t.prototype.fields=function(){return this.Ri().fields()},t.prototype.disable=function(){zr(sl,we.instance())},t.prototype.Ri=function(){return dn(sl)||BC},t})(),$t=jC.getInstance(),al="trace",QC=(function(){function t(){this.oi=new Ld,this.wrapSpanContext=WC,this.isSpanContextValid=jo,this.deleteSpan=OC,this.getSpan=Rc,this.getActiveSpan=xC,this.getSpanContext=Nm,this.setSpan=Cc,this.setSpanContext=NC}return t.getInstance=function(){return this.I||(this.I=new t),this.I},t.prototype.setGlobalTracerProvider=function(e){var n=Hr(al,this.oi,we.instance());return n&&this.oi.setDelegate(e),n},t.prototype.getTracerProvider=function(){return dn(al)||this.oi},t.prototype.getTracer=function(e,n){return this.getTracerProvider().getTracer(e,n)},t.prototype.disable=function(){zr(al,we.instance()),this.oi=new Ld},t})(),ut=QC.getInstance(),Wm=Ic("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function Um(t){return t.setValue(Wm,!0)}function kc(t){return t.getValue(Wm)===!0}var $C="=",Kl=";",_l=",",ll="baggage",qC=180,tZ=4096,eZ=8192,nZ=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o};function rZ(t){return t.reduce(function(e,n){var r=""+e+(e!==""?_l:"")+n;return r.length>eZ?e:r},"")}function iZ(t){return t.getAllEntries().map(function(e){var n=nZ(e,2),r=n[0],i=n[1],o=encodeURIComponent(r)+"="+encodeURIComponent(i.value);return i.metadata!==void 0&&(o+=Kl+i.metadata.toString()),o})}function oZ(t){var e=t.split(Kl);if(!(e.length<=0)){var n=e.shift();if(n){var r=n.indexOf($C);if(!(r<=0)){var i=decodeURIComponent(n.substring(0,r).trim()),o=decodeURIComponent(n.substring(r+1).trim()),s;return e.length>0&&(s=iC(e.join(Kl))),{key:i,value:o,metadata:s}}}}}var Pm=(function(){function t(){}return t.prototype.inject=function(e,n,r){var i=$t.getBaggage(e);if(!(!i||kc(e))){var o=iZ(i).filter(function(a){return a.length<=tZ}).slice(0,qC),s=rZ(o);s.length>0&&r.set(n,ll,s)}},t.prototype.extract=function(e,n,r){var i=r.get(n,ll),o=Array.isArray(i)?i.join(_l):i;if(!o)return e;var s={};if(o.length===0)return e;var a=o.split(_l);return a.forEach(function(c){var l=oZ(c);if(l){var u={value:l.value};l.metadata&&(u.metadata=l.metadata),s[l.key]=u}}),Object.entries(s).length===0?e:$t.setBaggage(e,$t.createBaggage(s))},t.prototype.fields=function(){return[ll]},t})(),Mm=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},sZ=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o};function go(t){var e,n,r={};if(typeof t!="object"||t==null)return r;try{for(var i=Mm(Object.entries(t)),o=i.next();!o.done;o=i.next()){var s=sZ(o.value,2),a=s[0],c=s[1];if(!aZ(a)){X.warn("Invalid attribute key: "+a);continue}if(!Fm(c)){X.warn("Invalid attribute value set for key: "+a);continue}Array.isArray(c)?r[a]=c.slice():r[a]=c}}catch(l){e={error:l}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return r}function aZ(t){return typeof t=="string"&&t.length>0}function Fm(t){return t==null?!0:Array.isArray(t)?lZ(t):Am(t)}function lZ(t){var e,n,r;try{for(var i=Mm(t),o=i.next();!o.done;o=i.next()){var s=o.value;if(s!=null){if(!r){if(Am(s)){r=typeof s;continue}return!1}if(typeof s!==r)return!1}}}catch(a){e={error:a}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return!0}function Am(t){switch(typeof t){case"number":case"boolean":case"string":return!0}return!1}function cZ(){return function(t){X.error(uZ(t))}}function uZ(t){return typeof t=="string"?t:JSON.stringify(hZ(t))}function hZ(t){for(var e={},n=t;n!==null;)Object.getOwnPropertyNames(n).forEach(function(r){if(!e[r]){var i=n[r];i&&(e[r]=String(i))}}),n=Object.getPrototypeOf(n);return e}var pZ=cZ();function Ke(t){try{pZ(t)}catch(e){}}var ge;(function(t){t.AlwaysOff="always_off",t.AlwaysOn="always_on",t.ParentBasedAlwaysOff="parentbased_always_off",t.ParentBasedAlwaysOn="parentbased_always_on",t.ParentBasedTraceIdRatio="parentbased_traceidratio",t.TraceIdRatio="traceidratio"})(ge||(ge={}));var dZ=",",fZ=["OTEL_SDK_DISABLED"];function mZ(t){return fZ.indexOf(t)>-1}var yZ=["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 gZ(t){return yZ.indexOf(t)>-1}var bZ=["OTEL_NO_PATCH_MODULES","OTEL_PROPAGATORS","OTEL_SEMCONV_STABILITY_OPT_IN"];function vZ(t){return bZ.indexOf(t)>-1}var bo=1/0,vo=128,wZ=128,SZ=128,Jm={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:wt.INFO,OTEL_NO_PATCH_MODULES:[],OTEL_PROPAGATORS:["tracecontext","baggage"],OTEL_RESOURCE_ATTRIBUTES:"",OTEL_SERVICE_NAME:"",OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT:bo,OTEL_ATTRIBUTE_COUNT_LIMIT:vo,OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT:bo,OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT:vo,OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT:bo,OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT:vo,OTEL_SPAN_EVENT_COUNT_LIMIT:128,OTEL_SPAN_LINK_COUNT_LIMIT:128,OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT:wZ,OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT:SZ,OTEL_TRACES_EXPORTER:"",OTEL_TRACES_SAMPLER:ge.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 IZ(t,e,n){if(typeof n[t]<"u"){var r=String(n[t]);e[t]=r.toLowerCase()==="true"}}function TZ(t,e,n,r,i){if(r===void 0&&(r=-1/0),i===void 0&&(i=1/0),typeof n[t]<"u"){var o=Number(n[t]);isNaN(o)||(o<r?e[t]=r:o>i?e[t]=i:e[t]=o)}}function EZ(t,e,n,r){r===void 0&&(r=dZ);var i=n[t];typeof i=="string"&&(e[t]=i.split(r).map(function(o){return o.trim()}))}var RZ={ALL:wt.ALL,VERBOSE:wt.VERBOSE,DEBUG:wt.DEBUG,INFO:wt.INFO,WARN:wt.WARN,ERROR:wt.ERROR,NONE:wt.NONE};function CZ(t,e,n){var r=n[t];if(typeof r=="string"){var i=RZ[r.toUpperCase()];i!=null&&(e[t]=i)}}function Dm(t){var e={};for(var n in Jm){var r=n;switch(r){case"OTEL_LOG_LEVEL":CZ(r,e,t);break;default:if(mZ(r))IZ(r,e,t);else if(gZ(r))TZ(r,e,t);else if(vZ(r))EZ(r,e,t);else{var i=t[r];typeof i<"u"&&i!==null&&(e[r]=String(i))}}}return e}var Lr=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{};function Kn(){var t=Dm(Lr);return Object.assign({},Jm,t)}function ZZ(){return Dm(Lr)}function Xd(t){return t>=48&&t<=57?t-48:t>=97&&t<=102?t-87:t-55}function Vc(t){for(var e=new Uint8Array(t.length/2),n=0,r=0;r<t.length;r+=2){var i=Xd(t.charCodeAt(r)),o=Xd(t.charCodeAt(r+1));e[n++]=i<<4|o}return e}var ee=performance,kZ="1.30.1",VZ="process.runtime.name",xZ="telemetry.sdk.name",OZ="telemetry.sdk.language",NZ="telemetry.sdk.version",GZ=VZ,LZ=xZ,XZ=OZ,WZ=NZ,UZ="webjs",PZ=UZ,Un,cl=(Un={},Un[LZ]="opentelemetry",Un[GZ]="browser",Un[XZ]=PZ,Un[WZ]=kZ,Un),MZ=9,FZ=6,AZ=Math.pow(10,FZ),No=Math.pow(10,MZ);function qt(t){var e=t/1e3,n=Math.trunc(e),r=Math.round(t%1e3*AZ);return[n,r]}function xc(){var t=ee.timeOrigin;if(typeof t!="number"){var e=ee;t=e.timing&&e.timing.fetchStart}return t}function fn(t){var e=qt(xc()),n=qt(typeof t=="number"?t:ee.now());return Ym(e,n)}function Xr(t){if(Oc(t))return t;if(typeof t=="number")return t<xc()?fn(t):qt(t);if(t instanceof Date)return qt(t.getTime());throw TypeError("Invalid input type")}function JZ(t,e){var n=e[0]-t[0],r=e[1]-t[1];return r<0&&(n-=1,r+=No),[n,r]}function Ve(t){return t[0]*No+t[1]}function $i(t){return t[0]*1e6+t[1]/1e3}function Oc(t){return Array.isArray(t)&&t.length===2&&typeof t[0]=="number"&&typeof t[1]=="number"}function Wd(t){return Oc(t)||typeof t=="number"||t instanceof Date}function Ym(t,e){var n=[t[0]+e[0],t[1]+e[1]];return n[1]>=No&&(n[1]-=No,n[0]+=1),n}var kt;(function(t){t[t.SUCCESS=0]="SUCCESS",t[t.FAILED=1]="FAILED"})(kt||(kt={}));var DZ=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Km=(function(){function t(e){e===void 0&&(e={});var n;this.Ci=(n=e.propagators)!==null&&n!==void 0?n:[],this.Cs=Array.from(new Set(this.Ci.map(function(r){return typeof r.fields=="function"?r.fields():[]}).reduce(function(r,i){return r.concat(i)},[])))}return t.prototype.inject=function(e,n,r){var i,o;try{for(var s=DZ(this.Ci),a=s.next();!a.done;a=s.next()){var c=a.value;try{c.inject(e,n,r)}catch(l){X.warn("Failed to inject with "+c.constructor.name+". Err: "+l.message)}}}catch(l){i={error:l}}finally{try{a&&!a.done&&(o=s.return)&&o.call(s)}finally{if(i)throw i.error}}},t.prototype.extract=function(e,n,r){return this.Ci.reduce(function(i,o){try{return o.extract(i,n,r)}catch(s){X.warn("Failed to extract with "+o.constructor.name+". Err: "+s.message)}return i},e)},t.prototype.fields=function(){return this.Cs.slice()},t})(),Hl="[_0-9a-z-*/]",YZ="[a-z]"+Hl+"{0,255}",KZ="[a-z0-9]"+Hl+"{0,240}@[a-z]"+Hl+"{0,13}",_Z=new RegExp("^(?:"+YZ+"|"+KZ+")$"),HZ=/^[ -~]{0,255}[!-~]$/,zZ=/,|=/;function BZ(t){return _Z.test(t)}function jZ(t){return HZ.test(t)&&!zZ.test(t)}var Ud=32,QZ=512,Pd=",",Md="=",$Z=(function(){function t(e){this.We=new Map,e&&this.Zs(e)}return t.prototype.set=function(e,n){var r=this.vo();return r.We.has(e)&&r.We.delete(e),r.We.set(e,n),r},t.prototype.unset=function(e){var n=this.vo();return n.We.delete(e),n},t.prototype.get=function(e){return this.We.get(e)},t.prototype.serialize=function(){var e=this;return this.ks().reduce(function(n,r){return n.push(r+Md+e.get(r)),n},[]).join(Pd)},t.prototype.Zs=function(e){e.length>QZ||(this.We=e.split(Pd).reverse().reduce(function(n,r){var i=r.trim(),o=i.indexOf(Md);if(o!==-1){var s=i.slice(0,o),a=i.slice(o+1,r.length);BZ(s)&&jZ(a)&&n.set(s,a)}return n},new Map),this.We.size>Ud&&(this.We=new Map(Array.from(this.We.entries()).reverse().slice(0,Ud))))},t.prototype.ks=function(){return Array.from(this.We.keys()).reverse()},t.prototype.vo=function(){var e=new t;return e.We=new Map(this.We),e},t})(),wo="traceparent",ul="tracestate",qZ="00",tk="(?!ff)[\\da-f]{2}",ek="(?![0]{32})[\\da-f]{32}",nk="(?![0]{16})[\\da-f]{16}",rk="[\\da-f]{2}",ik=new RegExp("^\\s?("+tk+")-("+ek+")-("+nk+")-("+rk+")(-.*)?\\s?$");function ok(t){var e=ik.exec(t);return!e||e[1]==="00"&&e[5]?null:{traceId:e[2],spanId:e[3],traceFlags:parseInt(e[4],16)}}var _m=(function(){function t(){}return t.prototype.inject=function(e,n,r){var i=ut.getSpanContext(e);if(!(!i||kc(e)||!jo(i))){var o=qZ+"-"+i.traceId+"-"+i.spanId+"-0"+Number(i.traceFlags||Oe.NONE).toString(16);r.set(n,wo,o),i.traceState&&r.set(n,ul,i.traceState.serialize())}},t.prototype.extract=function(e,n,r){var i=r.get(n,wo);if(!i)return e;var o=Array.isArray(i)?i[0]:i;if(typeof o!="string")return e;var s=ok(o);if(!s)return e;s.isRemote=!0;var a=r.get(n,ul);if(a){var c=Array.isArray(a)?a.join(","):a;s.traceState=new $Z(typeof c=="string"?c:void 0)}return ut.setSpanContext(e,s)},t.prototype.fields=function(){return[wo,ul]},t})(),sk="[object Object]",ak="[object Null]",lk="[object Undefined]",ck=Function.prototype,Hm=ck.toString,uk=Hm.call(Object),hk=pk(Object.getPrototypeOf,Object),zm=Object.prototype,Bm=zm.hasOwnProperty,an=Symbol?Symbol.toStringTag:void 0,jm=zm.toString;function pk(t,e){return function(n){return t(e(n))}}function Fd(t){if(!dk(t)||fk(t)!==sk)return!1;var e=hk(t);if(e===null)return!0;var n=Bm.call(e,"constructor")&&e.constructor;return typeof n=="function"&&n instanceof n&&Hm.call(n)===uk}function dk(t){return t!=null&&typeof t=="object"}function fk(t){return t==null?t===void 0?lk:ak:an&&an in Object(t)?mk(t):yk(t)}function mk(t){var e=Bm.call(t,an),n=t[an],r=!1;try{t[an]=void 0,r=!0}catch(o){}var i=jm.call(t);return r&&(e?t[an]=n:delete t[an]),i}function yk(t){return jm.call(t)}var gk=20;function Qm(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n=t.shift(),r=new WeakMap;t.length>0;)n=$m(n,t.shift(),0,r);return n}function hl(t){return Go(t)?t.slice():t}function $m(t,e,n,r){n===void 0&&(n=0);var i;if(!(n>gk)){if(n++,So(t)||So(e)||qm(e))i=hl(e);else if(Go(t)){if(i=t.slice(),Go(e))for(var o=0,s=e.length;o<s;o++)i.push(hl(e[o]));else if(Er(e))for(var a=Object.keys(e),o=0,s=a.length;o<s;o++){var c=a[o];i[c]=hl(e[c])}}else if(Er(t))if(Er(e)){if(!bk(t,e))return e;i=Object.assign({},t);for(var a=Object.keys(e),o=0,s=a.length;o<s;o++){var c=a[o],l=e[c];if(So(l))typeof l>"u"?delete i[c]:i[c]=l;else{var u=i[c],h=l;if(Ad(t,c,r)||Ad(e,c,r))delete i[c];else{if(Er(u)&&Er(h)){var p=r.get(u)||[],f=r.get(h)||[];p.push({obj:t,key:c}),f.push({obj:e,key:c}),r.set(u,p),r.set(h,f)}i[c]=$m(i[c],l,n,r)}}}}else i=e;return i}}function Ad(t,e,n){for(var r=n.get(t[e])||[],i=0,o=r.length;i<o;i++){var s=r[i];if(s.key===e&&s.obj===t)return!0}return!1}function Go(t){return Array.isArray(t)}function qm(t){return typeof t=="function"}function Er(t){return!So(t)&&!Go(t)&&!qm(t)&&typeof t=="object"}function So(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t>"u"||t instanceof Date||t instanceof RegExp||t===null}function bk(t,e){return!(!Fd(t)||!Fd(e))}var vk=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};function ty(t,e){return typeof e=="string"?t===e:!!t.match(e)}function ey(t,e){var n,r;if(!e)return!1;try{for(var i=vk(e),o=i.next();!o.done;o=i.next()){var s=o.value;if(ty(t,s))return!0}}catch(a){n={error:a}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return!1}var wk=(function(){function t(){var e=this;this.Vs=new Promise(function(n,r){e.Zi=n,e.xs=r})}return Object.defineProperty(t.prototype,"promise",{get:function(){return this.Vs},enumerable:!1,configurable:!0}),t.prototype.resolve=function(e){this.Zi(e)},t.prototype.reject=function(e){this.xs(e)},t})(),Sk=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},Ik=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},Tk=(function(){function t(e,n){this.Os=e,this.Ns=n,this.ki=!1,this.Ar=new wk}return Object.defineProperty(t.prototype,"isCalled",{get:function(){return this.ki},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"promise",{get:function(){return this.Ar.promise},enumerable:!1,configurable:!0}),t.prototype.call=function(){for(var e,n=this,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];if(!this.ki){this.ki=!0;try{Promise.resolve((e=this.Os).call.apply(e,Ik([this.Ns],Sk(r),!1))).then(function(o){return n.Ar.resolve(o)},function(o){return n.Ar.reject(o)})}catch(o){this.Ar.reject(o)}}return this.Ar.promise},t})();function Ek(t,e){return new Promise(function(n){tt.with(Um(tt.active()),function(){t.export(e,function(r){n(r)})})})}var Rk={Gs:Ek},ny=(function(){function t(){}return t.prototype.emit=function(e){},t})(),Ck=new ny,Zk=(function(){function t(){}return t.prototype.getLogger=function(e,n,r){return new ny},t})(),ry=new Zk,kk=(function(){function t(e,n,r,i){this.cr=e,this.name=n,this.version=r,this.options=i}return t.prototype.emit=function(e){this.Jr().emit(e)},t.prototype.Jr=function(){if(this.b)return this.b;var e=this.cr.getDelegateLogger(this.name,this.version,this.options);return e?(this.b=e,this.b):Ck},t})(),Jd=(function(){function t(){}return t.prototype.getLogger=function(e,n,r){var i;return(i=this.getDelegateLogger(e,n,r))!==null&&i!==void 0?i:new kk(this,e,n,r)},t.prototype.getDelegate=function(){var e;return(e=this.b)!==null&&e!==void 0?e:ry},t.prototype.setDelegate=function(e){this.b=e},t.prototype.getDelegateLogger=function(e,n,r){var i;return(i=this.b)===null||i===void 0?void 0:i.getLogger(e,n,r)},t})(),Vk=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{},qi=Symbol.for("io.opentelemetry.js.api.logs"),Rr=Vk;function xk(t,e,n){return function(r){return r===t?e:n}}var Dd=1,Ok=(function(){function t(){this.Ke=new Jd}return t.getInstance=function(){return this.I||(this.I=new t),this.I},t.prototype.setGlobalLoggerProvider=function(e){return Rr[qi]?this.getLoggerProvider():(Rr[qi]=xk(Dd,e,ry),this.Ke.setDelegate(e),e)},t.prototype.getLoggerProvider=function(){var e,n;return(n=(e=Rr[qi])===null||e===void 0?void 0:e.call(Rr,Dd))!==null&&n!==void 0?n:this.Ke},t.prototype.getLogger=function(e,n,r){return this.getLoggerProvider().getLogger(e,n,r)},t.prototype.disable=function(){delete Rr[qi],this.Ke=new Jd},t})(),iy=Ok.getInstance();function Nk(t,e,n,r){for(var i=0,o=t.length;i<o;i++){var s=t[i];e&&s.setTracerProvider(e),n&&s.setMeterProvider(n),r&&s.setLoggerProvider&&s.setLoggerProvider(r),s.getConfig().enabled||s.enable()}}function Gk(t){t.forEach(function(e){return e.disable()})}function Lk(t){var e,n,r=t.tracerProvider||ut.getTracerProvider(),i=t.meterProvider||ke.getMeterProvider(),o=t.loggerProvider||iy.getLoggerProvider(),s=(n=(e=t.instrumentations)===null||e===void 0?void 0:e.flat())!==null&&n!==void 0?n:[];return Nk(s,r,i,o),function(){Gk(s)}}function zl(t){return typeof t=="function"}var Wt=console.error.bind(console);function Cr(t,e,n){var r=!!t[e]&&t.propertyIsEnumerable(e);Object.defineProperty(t,e,{configurable:!0,enumerable:r,writable:!0,value:n})}function Br(t){t&&t.logger&&(zl(t.logger)?Wt=t.logger:Wt("new logger isn't a function, not replacing"))}function oy(t,e,n){if(!t||!t[e]){Wt("no original function "+e+" to wrap");return}if(!n){Wt("no wrapper function"),Wt(new Error().stack);return}if(!zl(t[e])||!zl(n)){Wt("original object and wrapper must be functions");return}var r=t[e],i=n(r,e);return Cr(i,"__original",r),Cr(i,"__unwrap",function(){t[e]===i&&Cr(t,e,r)}),Cr(i,"__wrapped",!0),Cr(t,e,i),i}function Xk(t,e,n){if(t)Array.isArray(t)||(t=[t]);else{Wt("must provide one or more modules to patch"),Wt(new Error().stack);return}if(!(e&&Array.isArray(e))){Wt("must provide one or more functions to wrap on modules");return}t.forEach(function(r){e.forEach(function(i){oy(r,i,n)})})}function sy(t,e){if(!t||!t[e]){Wt("no function to unwrap."),Wt(new Error().stack);return}if(!t[e].__unwrap)Wt("no original to unwrap to -- has "+e+" already been unwrapped?");else return t[e].__unwrap()}function Wk(t,e){if(t)Array.isArray(t)||(t=[t]);else{Wt("must provide one or more modules to patch"),Wt(new Error().stack);return}if(!(e&&Array.isArray(e))){Wt("must provide one or more functions to unwrap on modules");return}t.forEach(function(n){e.forEach(function(r){sy(n,r)})})}Br.wrap=oy;Br.massWrap=Xk;Br.unwrap=sy;Br.massUnwrap=Wk;var te=Br,Bl=function(){return Bl=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Bl.apply(this,arguments)},Uk=(function(){function t(e,n,r){this.instrumentationName=e,this.instrumentationVersion=n,this.ie={},this.ne=te.wrap,this.U=te.unwrap,this.wo=te.massWrap,this.So=te.massUnwrap,this.setConfig(r),this.w=X.createComponentLogger({namespace:e}),this.qn=ut.getTracer(e,n),this.tr=ke.getMeter(e,n),this.er=iy.getLogger(e,n),this.nr()}return Object.defineProperty(t.prototype,"meter",{get:function(){return this.tr},enumerable:!1,configurable:!0}),t.prototype.setMeterProvider=function(e){this.tr=e.getMeter(this.instrumentationName,this.instrumentationVersion),this.nr()},Object.defineProperty(t.prototype,"logger",{get:function(){return this.er},enumerable:!1,configurable:!0}),t.prototype.setLoggerProvider=function(e){this.er=e.getLogger(this.instrumentationName,this.instrumentationVersion)},t.prototype.getModuleDefinitions=function(){var e,n=(e=this.init())!==null&&e!==void 0?e:[];return Array.isArray(n)?n:[n]},t.prototype.nr=function(){},t.prototype.getConfig=function(){return this.ie},t.prototype.setConfig=function(e){this.ie=Bl({enabled:!0},e)},t.prototype.setTracerProvider=function(e){this.qn=e.getTracer(this.instrumentationName,this.instrumentationVersion)},Object.defineProperty(t.prototype,"tracer",{get:function(){return this.qn},enumerable:!1,configurable:!0}),t.prototype.Io=function(e,n,r,i){if(e)try{e(r,i)}catch(o){this.w.error("Error running span customization hook due to exception in handler",{triggerName:n},o)}},t})(),Pk=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),ay=(function(t){Pk(e,t);function e(n,r,i){var o=t.call(this,n,r,i)||this;return o.ie.enabled&&o.enable(),o}return e})(Uk);function Yd(t,e,n){var r,i;try{i=t()}catch(o){r=o}finally{return e(r,i),i}}function Lt(t){return typeof t=="function"&&typeof t.__original=="function"&&typeof t.__unwrap=="function"&&t.__wrapped===!0}var Mk="exception.type",Fk="exception.message",Ak="exception.stacktrace",pl=Mk,dl=Fk,Jk=Ak,Dk="exception",jl=function(){return jl=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},jl.apply(this,arguments)},Yk=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Kd=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},Kk=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},_k=(function(){function t(e,n,r,i,o,s,a,c,l,u){a===void 0&&(a=[]),this.attributes={},this.links=[],this.events=[],this.To=0,this.gr=0,this.Ls=0,this.status={code:Oo.UNSET},this.endTime=[0,0],this.Dr=!1,this.si=[-1,-1],this.name=r,this.lr=i,this.parentSpanId=s,this.kind=o,this.links=a;var h=Date.now();this.Eo=ee.now(),this.Xs=h-(this.Eo+xc()),this.Ws=c!=null,this.startTime=this.Vi(c!=null?c:h),this.resource=e.resource,this.instrumentationLibrary=e.instrumentationLibrary,this.br=e.getSpanLimits(),this.Us=this.br.attributeValueLengthLimit||0,u!=null&&this.setAttributes(u),this.Ro=e.getActiveSpanProcessor(),this.Ro.onStart(this,n)}return t.prototype.spanContext=function(){return this.lr},t.prototype.setAttribute=function(e,n){return n==null||this.Yr()?this:e.length===0?(X.warn("Invalid attribute key: "+e),this):Fm(n)?Object.keys(this.attributes).length>=this.br.attributeCountLimit&&!Object.prototype.hasOwnProperty.call(this.attributes,e)?(this.To++,this):(this.attributes[e]=this.Ps(n),this):(X.warn("Invalid attribute value set for key: "+e),this)},t.prototype.setAttributes=function(e){var n,r;try{for(var i=Yk(Object.entries(e)),o=i.next();!o.done;o=i.next()){var s=Kd(o.value,2),a=s[0],c=s[1];this.setAttribute(a,c)}}catch(l){n={error:l}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return this},t.prototype.addEvent=function(e,n,r){if(this.Yr())return this;if(this.br.eventCountLimit===0)return X.warn("No events allowed."),this.gr++,this;this.events.length>=this.br.eventCountLimit&&(this.gr===0&&X.debug("Dropping extra events."),this.events.shift(),this.gr++),Wd(n)&&(Wd(r)||(r=n),n=void 0);var i=go(n);return this.events.push({name:e,attributes:i,time:this.Vi(r),droppedAttributesCount:0}),this},t.prototype.addLink=function(e){return this.links.push(e),this},t.prototype.addLinks=function(e){var n;return(n=this.links).push.apply(n,Kk([],Kd(e),!1)),this},t.prototype.setStatus=function(e){return this.Yr()?this:(this.status=jl({},e),this.status.message!=null&&typeof e.message!="string"&&(X.warn("Dropping invalid status.message of type '"+typeof e.message+"', expected 'string'"),delete this.status.message),this)},t.prototype.updateName=function(e){return this.Yr()?this:(this.name=e,this)},t.prototype.end=function(e){if(this.Yr()){X.error(this.name+" "+this.lr.traceId+"-"+this.lr.spanId+" - You can only call end() on a span once.");return}this.Dr=!0,this.endTime=this.Vi(e),this.si=JZ(this.startTime,this.endTime),this.si[0]<0&&(X.warn("Inconsistent start and end time, startTime > endTime. Setting span duration to 0ms.",this.startTime,this.endTime),this.endTime=this.startTime.slice(),this.si=[0,0]),this.gr>0&&X.warn("Dropped "+this.gr+" events because eventCountLimit reached"),this.Ro.onEnd(this)},t.prototype.Vi=function(e){if(typeof e=="number"&&e<=ee.now())return fn(e+this.Xs);if(typeof e=="number")return qt(e);if(e instanceof Date)return qt(e.getTime());if(Oc(e))return e;if(this.Ws)return qt(Date.now());var n=ee.now()-this.Eo;return Ym(this.startTime,qt(n))},t.prototype.isRecording=function(){return this.Dr===!1},t.prototype.recordException=function(e,n){var r={};typeof e=="string"?r[dl]=e:e&&(e.code?r[pl]=e.code.toString():e.name&&(r[pl]=e.name),e.message&&(r[dl]=e.message),e.stack&&(r[Jk]=e.stack)),r[pl]||r[dl]?this.addEvent(Dk,r,n):X.warn("Failed to record an exception "+e)},Object.defineProperty(t.prototype,"duration",{get:function(){return this.si},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ended",{get:function(){return this.Dr},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"droppedAttributesCount",{get:function(){return this.To},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"droppedEventsCount",{get:function(){return this.gr},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"droppedLinksCount",{get:function(){return this.Ls},enumerable:!1,configurable:!0}),t.prototype.Yr=function(){return this.Dr&&X.warn("Can not execute the operation on ended Span {traceId: "+this.lr.traceId+", spanId: "+this.lr.spanId+"}"),this.Dr},t.prototype.Co=function(e,n){return e.length<=n?e:e.substring(0,n)},t.prototype.Ps=function(e){var n=this,r=this.Us;return r<=0?(X.warn("Attribute value limit must be positive, got "+r),e):typeof e=="string"?this.Co(e,r):Array.isArray(e)?e.map(function(i){return typeof i=="string"?n.Co(i,r):i}):e},t})(),_n;(function(t){t[t.NOT_RECORD=0]="NOT_RECORD",t[t.RECORD=1]="RECORD",t[t.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(_n||(_n={}));var Lo=(function(){function t(){}return t.prototype.shouldSample=function(){return{decision:_n.NOT_RECORD}},t.prototype.toString=function(){return"AlwaysOffSampler"},t})(),Dn=(function(){function t(){}return t.prototype.shouldSample=function(){return{decision:_n.RECORD_AND_SAMPLED}},t.prototype.toString=function(){return"AlwaysOnSampler"},t})(),fl=(function(){function t(e){var n,r,i,o;this.Zn=e.root,this.Zn||(Ke(new Error("ParentBasedSampler must have a root sampler configured")),this.Zn=new Dn),this.Zo=(n=e.remoteParentSampled)!==null&&n!==void 0?n:new Dn,this.ko=(r=e.remoteParentNotSampled)!==null&&r!==void 0?r:new Lo,this.Vo=(i=e.localParentSampled)!==null&&i!==void 0?i:new Dn,this.xo=(o=e.localParentNotSampled)!==null&&o!==void 0?o:new Lo}return t.prototype.shouldSample=function(e,n,r,i,o,s){var a=ut.getSpanContext(e);return!a||!jo(a)?this.Zn.shouldSample(e,n,r,i,o,s):a.isRemote?a.traceFlags&Oe.SAMPLED?this.Zo.shouldSample(e,n,r,i,o,s):this.ko.shouldSample(e,n,r,i,o,s):a.traceFlags&Oe.SAMPLED?this.Vo.shouldSample(e,n,r,i,o,s):this.xo.shouldSample(e,n,r,i,o,s)},t.prototype.toString=function(){return"ParentBased{root="+this.Zn.toString()+", remoteParentSampled="+this.Zo.toString()+", remoteParentNotSampled="+this.ko.toString()+", localParentSampled="+this.Vo.toString()+", localParentNotSampled="+this.xo.toString()+"}"},t})(),_d=(function(){function t(e){e===void 0&&(e=0),this.xi=e,this.xi=this.Ms(e),this.Fs=Math.floor(this.xi*4294967295)}return t.prototype.shouldSample=function(e,n){return{decision:Gm(n)&&this.As(n)<this.Fs?_n.RECORD_AND_SAMPLED:_n.NOT_RECORD}},t.prototype.toString=function(){return"TraceIdRatioBased{"+this.xi+"}"},t.prototype.Ms=function(e){return typeof e!="number"||isNaN(e)?0:e>=1?1:e<=0?0:e},t.prototype.As=function(e){for(var n=0,r=0;r<e.length/8;r++){var i=r*8,o=parseInt(e.slice(i,i+8),16);n=(n^o)>>>0}return n},t})(),Hk=ge.AlwaysOn,Pn=1;function ly(){var t=Kn();return{sampler:cy(t),forceFlushTimeoutMillis:3e4,generalLimits:{attributeValueLengthLimit:t.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:t.OTEL_ATTRIBUTE_COUNT_LIMIT},spanLimits:{attributeValueLengthLimit:t.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:t.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT,linkCountLimit:t.OTEL_SPAN_LINK_COUNT_LIMIT,eventCountLimit:t.OTEL_SPAN_EVENT_COUNT_LIMIT,attributePerEventCountLimit:t.OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT,attributePerLinkCountLimit:t.OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT},mergeResourceWithDefaults:!0}}function cy(t){switch(t===void 0&&(t=Kn()),t.OTEL_TRACES_SAMPLER){case ge.AlwaysOn:return new Dn;case ge.AlwaysOff:return new Lo;case ge.ParentBasedAlwaysOn:return new fl({root:new Dn});case ge.ParentBasedAlwaysOff:return new fl({root:new Lo});case ge.TraceIdRatio:return new _d(Hd(t));case ge.ParentBasedTraceIdRatio:return new fl({root:new _d(Hd(t))});default:return X.error('OTEL_TRACES_SAMPLER value "'+t.OTEL_TRACES_SAMPLER+" invalid, defaulting to "+Hk+'".'),new Dn}}function Hd(t){if(t.OTEL_TRACES_SAMPLER_ARG===void 0||t.OTEL_TRACES_SAMPLER_ARG==="")return X.error("OTEL_TRACES_SAMPLER_ARG is blank, defaulting to "+Pn+"."),Pn;var e=Number(t.OTEL_TRACES_SAMPLER_ARG);return isNaN(e)?(X.error("OTEL_TRACES_SAMPLER_ARG="+t.OTEL_TRACES_SAMPLER_ARG+" was given, but it is invalid, defaulting to "+Pn+"."),Pn):e<0||e>1?(X.error("OTEL_TRACES_SAMPLER_ARG="+t.OTEL_TRACES_SAMPLER_ARG+" was given, but it is out of range ([0..1]), defaulting to "+Pn+"."),Pn):e}function zk(t){var e={sampler:cy()},n=ly(),r=Object.assign({},n,e,t);return r.generalLimits=Object.assign({},n.generalLimits,t.generalLimits||{}),r.spanLimits=Object.assign({},n.spanLimits,t.spanLimits||{}),r}function Bk(t){var e,n,r,i,o,s,a,c,l,u,h,p,f=Object.assign({},t.spanLimits),m=ZZ();return f.attributeCountLimit=(s=(o=(i=(n=(e=t.spanLimits)===null||e===void 0?void 0:e.attributeCountLimit)!==null&&n!==void 0?n:(r=t.generalLimits)===null||r===void 0?void 0:r.attributeCountLimit)!==null&&i!==void 0?i:m.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT)!==null&&o!==void 0?o:m.OTEL_ATTRIBUTE_COUNT_LIMIT)!==null&&s!==void 0?s:vo,f.attributeValueLengthLimit=(p=(h=(u=(c=(a=t.spanLimits)===null||a===void 0?void 0:a.attributeValueLengthLimit)!==null&&c!==void 0?c:(l=t.generalLimits)===null||l===void 0?void 0:l.attributeValueLengthLimit)!==null&&u!==void 0?u:m.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&h!==void 0?h:m.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&p!==void 0?p:bo,Object.assign({},t,{spanLimits:f})}var jk=(function(){function t(e,n){this.vr=e,this.ai=!1,this.Gn=[],this.Kr=0;var r=Kn();this.wr=typeof(n==null?void 0:n.maxExportBatchSize)=="number"?n.maxExportBatchSize:r.OTEL_BSP_MAX_EXPORT_BATCH_SIZE,this.Oi=typeof(n==null?void 0:n.maxQueueSize)=="number"?n.maxQueueSize:r.OTEL_BSP_MAX_QUEUE_SIZE,this.Js=typeof(n==null?void 0:n.scheduledDelayMillis)=="number"?n.scheduledDelayMillis:r.OTEL_BSP_SCHEDULE_DELAY,this.Ds=typeof(n==null?void 0:n.exportTimeoutMillis)=="number"?n.exportTimeoutMillis:r.OTEL_BSP_EXPORT_TIMEOUT,this.li=new Tk(this._e,this),this.wr>this.Oi&&(X.warn("BatchSpanProcessor: maxExportBatchSize must be smaller or equal to maxQueueSize, setting maxExportBatchSize to match maxQueueSize"),this.wr=this.Oi)}return t.prototype.forceFlush=function(){return this.li.isCalled?this.li.promise:this.Oo()},t.prototype.onStart=function(e,n){},t.prototype.onEnd=function(e){this.li.isCalled||e.spanContext().traceFlags&Oe.SAMPLED&&this.Ys(e)},t.prototype.shutdown=function(){return this.li.call()},t.prototype._e=function(){var e=this;return Promise.resolve().then(function(){return e.onShutdown()}).then(function(){return e.Oo()}).then(function(){return e.vr.shutdown()})},t.prototype.Ys=function(e){if(this.Gn.length>=this.Oi){this.Kr===0&&X.debug("maxQueueSize reached, dropping spans"),this.Kr++;return}this.Kr>0&&(X.warn("Dropped "+this.Kr+" spans because maxQueueSize reached"),this.Kr=0),this.Gn.push(e),this.No()},t.prototype.Oo=function(){var e=this;return new Promise(function(n,r){for(var i=[],o=Math.ceil(e.Gn.length/e.wr),s=0,a=o;s<a;s++)i.push(e.Go());Promise.all(i).then(function(){n()}).catch(r)})},t.prototype.Go=function(){var e=this;return this.Lo(),this.Gn.length===0?Promise.resolve():new Promise(function(n,r){var i=setTimeout(function(){r(new Error("Timeout"))},e.Ds);tt.with(Um(tt.active()),function(){var o;e.Gn.length<=e.wr?(o=e.Gn,e.Gn=[]):o=e.Gn.splice(0,e.wr);for(var s=function(){return e.vr.export(o,function(h){var p;clearTimeout(i),h.code===kt.SUCCESS?n():r((p=h.error)!==null&&p!==void 0?p:new Error("BatchSpanProcessor: span export failed"))})},a=null,c=0,l=o.length;c<l;c++){var u=o[c];u.resource.asyncAttributesPending&&u.resource.waitForAsyncAttributes&&(a!=null||(a=[]),a.push(u.resource.waitForAsyncAttributes()))}a===null?s():Promise.all(a).then(s,function(h){Ke(h),r(h)})})})},t.prototype.No=function(){var e=this;if(!this.ai){var n=function(){e.ai=!0,e.Go().finally(function(){e.ai=!1,e.Gn.length>0&&(e.Lo(),e.No())}).catch(function(r){e.ai=!1,Ke(r)})};if(this.Gn.length>=this.wr)return n();this.ci===void 0&&(this.ci=setTimeout(function(){return n()},this.Js))}},t.prototype.Lo=function(){this.ci!==void 0&&(clearTimeout(this.ci),this.ci=void 0)},t})(),Qk=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),uy=(function(t){Qk(e,t);function e(n,r){var i=t.call(this,n,r)||this;return i.onInit(r),i}return e.prototype.onInit=function(n){var r=this;(n==null?void 0:n.disableAutoFlushOnDocumentHide)!==!0&&typeof document<"u"&&(this.Ni=function(){document.visibilityState==="hidden"&&r.forceFlush().catch(function(i){Ke(i)})},this.Gi=function(){r.forceFlush().catch(function(i){Ke(i)})},document.addEventListener("visibilitychange",this.Ni),document.addEventListener("pagehide",this.Gi))},e.prototype.onShutdown=function(){typeof document<"u"&&(this.Ni&&document.removeEventListener("visibilitychange",this.Ni),this.Gi&&document.removeEventListener("pagehide",this.Gi))},e})(jk),$k=8,qk=16,t1=(function(){function t(){this.generateTraceId=zd(qk),this.generateSpanId=zd($k)}return t})(),to=Array(32);function zd(t){return function(){for(var e=0;e<t*2;e++)to[e]=Math.floor(Math.random()*16)+48,to[e]>=58&&(to[e]+=39);return String.fromCharCode.apply(null,to.slice(0,t*2))}}var e1=(function(){function t(e,n,r){this.Ks=r;var i=zk(n);this._s=i.sampler,this.Hs=i.generalLimits,this.br=i.spanLimits,this.Xo=n.idGenerator||new t1,this.resource=r.resource,this.instrumentationLibrary=e}return t.prototype.startSpan=function(e,n,r){var i,o,s;n===void 0&&(n={}),r===void 0&&(r=tt.active()),n.root&&(r=ut.deleteSpan(r));var a=ut.getSpan(r);if(kc(r)){X.debug("Instrumentation suppressed, returning Noop Span");var c=ut.wrapSpanContext(Om);return c}var l=a==null?void 0:a.spanContext(),u=this.Xo.generateSpanId(),h,p,f;!l||!ut.isSpanContextValid(l)?h=this.Xo.generateTraceId():(h=l.traceId,p=l.traceState,f=l.spanId);var m=(i=n.kind)!==null&&i!==void 0?i:Jr.INTERNAL,d=((o=n.links)!==null&&o!==void 0?o:[]).map(function(x){return{context:x.context,attributes:go(x.attributes)}}),v=go(n.attributes),g=this._s.shouldSample(r,h,e,m,v,d);p=(s=g.traceState)!==null&&s!==void 0?s:p;var w=g.decision===xo.RECORD_AND_SAMPLED?Oe.SAMPLED:Oe.NONE,R={traceId:h,spanId:u,traceFlags:w,traceState:p};if(g.decision===xo.NOT_RECORD){X.debug("Recording is off, propagating context in a non-recording span");var c=ut.wrapSpanContext(R);return c}var E=go(Object.assign(v,g.attributes)),T=new _k(this,r,e,R,m,f,d,n.startTime,void 0,E);return T},t.prototype.startActiveSpan=function(e,n,r,i){var o,s,a;if(!(arguments.length<2)){arguments.length===2?a=n:arguments.length===3?(o=n,a=r):(o=n,s=r,a=i);var c=s!=null?s:tt.active(),l=this.startSpan(e,o,c),u=ut.setSpan(c,l);return tt.with(u,a,void 0,l)}},t.prototype.getGeneralLimits=function(){return this.Hs},t.prototype.getSpanLimits=function(){return this.br},t.prototype.getActiveSpanProcessor=function(){return this.Ks.getActiveSpanProcessor()},t})(),n1="service.name",r1="telemetry.sdk.name",i1="telemetry.sdk.language",o1="telemetry.sdk.version",s1=n1,Bd=r1,jd=i1,Qd=o1;function a1(){return"unknown_service"}var Je=function(){return Je=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Je.apply(this,arguments)},l1=function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(u){try{l(r.next(u))}catch(h){s(h)}}function c(u){try{l(r.throw(u))}catch(h){s(h)}}function l(u){u.done?o(u.value):i(u.value).then(a,c)}l((r=r.apply(t,[])).next())})},c1=function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(u){l=[6,u],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},u1=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},Dr=(function(){function t(e,n){var r=this,i;this.ui=e,this.asyncAttributesPending=n!=null,this.hi=(i=this.ui)!==null&&i!==void 0?i:{},this._r=n==null?void 0:n.then(function(o){return r.ui=Object.assign({},r.ui,o),r.asyncAttributesPending=!1,o},function(o){return X.debug("a resource's async attributes promise rejected: %s",o),r.asyncAttributesPending=!1,{}})}return t.empty=function(){return t.EMPTY},t.default=function(){var e;return new t((e={},e[s1]=a1(),e[jd]=cl[jd],e[Bd]=cl[Bd],e[Qd]=cl[Qd],e))},Object.defineProperty(t.prototype,"attributes",{get:function(){var e;return this.asyncAttributesPending&&X.error("Accessing resource attributes before async attributes settled"),(e=this.ui)!==null&&e!==void 0?e:{}},enumerable:!1,configurable:!0}),t.prototype.waitForAsyncAttributes=function(){return l1(this,void 0,void 0,function(){return c1(this,function(e){switch(e.label){case 0:return this.asyncAttributesPending?[4,this._r]:[3,2];case 1:e.sent(),e.label=2;case 2:return[2]}})})},t.prototype.merge=function(e){var n=this,r;if(!e)return this;var i=Je(Je({},this.hi),(r=e.hi)!==null&&r!==void 0?r:e.attributes);if(!this._r&&!e._r)return new t(i);var o=Promise.all([this._r,e._r]).then(function(s){var a,c=u1(s,2),l=c[0],u=c[1];return Je(Je(Je(Je({},n.hi),l),(a=e.hi)!==null&&a!==void 0?a:e.attributes),u)});return new t(i,o)},t.EMPTY=new t({}),t})(),eo=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},$d=(function(){function t(e){this.pi=e}return t.prototype.forceFlush=function(){var e,n,r=[];try{for(var i=eo(this.pi),o=i.next();!o.done;o=i.next()){var s=o.value;r.push(s.forceFlush())}}catch(a){e={error:a}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return new Promise(function(a){Promise.all(r).then(function(){a()}).catch(function(c){Ke(c||new Error("MultiSpanProcessor: forceFlush failed")),a()})})},t.prototype.onStart=function(e,n){var r,i;try{for(var o=eo(this.pi),s=o.next();!s.done;s=o.next()){var a=s.value;a.onStart(e,n)}}catch(c){r={error:c}}finally{try{s&&!s.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}},t.prototype.onEnd=function(e){var n,r;try{for(var i=eo(this.pi),o=i.next();!o.done;o=i.next()){var s=o.value;s.onEnd(e)}}catch(a){n={error:a}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}},t.prototype.shutdown=function(){var e,n,r=[];try{for(var i=eo(this.pi),o=i.next();!o.done;o=i.next()){var s=o.value;r.push(s.shutdown())}}catch(a){e={error:a}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return new Promise(function(a,c){Promise.all(r).then(function(){a()},c)})},t})(),h1=(function(){function t(){}return t.prototype.onStart=function(e,n){},t.prototype.onEnd=function(e){},t.prototype.shutdown=function(){return Promise.resolve()},t.prototype.forceFlush=function(){return Promise.resolve()},t})(),p1=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},d1=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},ln;(function(t){t[t.resolved=0]="resolved",t[t.timeout=1]="timeout",t[t.error=2]="error",t[t.unresolved=3]="unresolved"})(ln||(ln={}));var f1=(function(){function t(e){e===void 0&&(e={});var n,r;this.Sr=[],this.Li=new Map;var i=Qm({},ly(),Bk(e));if(this.resource=(n=i.resource)!==null&&n!==void 0?n:Dr.empty(),i.mergeResourceWithDefaults&&(this.resource=Dr.default().merge(this.resource)),this.ie=Object.assign({},i,{resource:this.resource}),!((r=e.spanProcessors)===null||r===void 0)&&r.length)this.Sr=d1([],p1(e.spanProcessors),!1),this.activeSpanProcessor=new $d(this.Sr);else{var o=this.zs();if(o!==void 0){var s=new uy(o);this.activeSpanProcessor=s}else this.activeSpanProcessor=new h1}}return t.prototype.getTracer=function(e,n,r){var i=e+"@"+(n||"")+":"+((r==null?void 0:r.schemaUrl)||"");return this.Li.has(i)||this.Li.set(i,new e1({name:e,version:n,schemaUrl:r==null?void 0:r.schemaUrl},this.ie,this)),this.Li.get(i)},t.prototype.addSpanProcessor=function(e){this.Sr.length===0&&this.activeSpanProcessor.shutdown().catch(function(n){return X.error("Error while trying to shutdown current span processor",n)}),this.Sr.push(e),this.activeSpanProcessor=new $d(this.Sr)},t.prototype.getActiveSpanProcessor=function(){return this.activeSpanProcessor},t.prototype.register=function(e){e===void 0&&(e={}),ut.setGlobalTracerProvider(this),e.propagator===void 0&&(e.propagator=this.Bs()),e.contextManager&&tt.setGlobalContextManager(e.contextManager),e.propagator&&$t.setGlobalPropagator(e.propagator)},t.prototype.forceFlush=function(){var e=this.ie.forceFlushTimeoutMillis,n=this.Sr.map(function(r){return new Promise(function(i){var o,s=setTimeout(function(){i(new Error("Span processor did not completed within timeout period of "+e+" ms")),o=ln.timeout},e);r.forceFlush().then(function(){clearTimeout(s),o!==ln.timeout&&(o=ln.resolved,i(o))}).catch(function(a){clearTimeout(s),o=ln.error,i(a)})})});return new Promise(function(r,i){Promise.all(n).then(function(o){var s=o.filter(function(a){return a!==ln.resolved});s.length>0?i(s):r()}).catch(function(o){return i([o])})})},t.prototype.shutdown=function(){return this.activeSpanProcessor.shutdown()},t.prototype.js=function(e){var n;return(n=this.constructor.Qs.get(e))===null||n===void 0?void 0:n()},t.prototype.$s=function(e){var n;return(n=this.constructor.qs.get(e))===null||n===void 0?void 0:n()},t.prototype.Bs=function(){var e=this,n=Array.from(new Set(Kn().OTEL_PROPAGATORS)),r=n.map(function(o){var s=e.js(o);return s||X.warn('Propagator "'+o+'" requested through environment variable is unavailable.'),s}),i=r.reduce(function(o,s){return s&&o.push(s),o},[]);if(i.length!==0)return n.length===1?i[0]:new Km({propagators:i})},t.prototype.zs=function(){var e=Kn().OTEL_TRACES_EXPORTER;if(!(e==="none"||e==="")){var n=this.$s(e);return n||X.error('Exporter "'+e+'" requested through environment variable is unavailable.'),n}},t.Qs=new Map([["tracecontext",function(){return new _m}],["baggage",function(){return new Pm}]]),t.qs=new Map,t})(),m1=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},y1=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},hy=(function(){function t(){this.Xi=!1,this.Ge=sn}return t.prototype.ta=function(e,n){e===void 0&&(e=sn);var r=this,i=function(){for(var o=this,s=[],a=0;a<arguments.length;a++)s[a]=arguments[a];return r.with(e,function(){return n.apply(o,s)})};return Object.defineProperty(i,"length",{enumerable:!1,configurable:!0,writable:!1,value:n.length}),i},t.prototype.active=function(){return this.Ge},t.prototype.bind=function(e,n){return e===void 0&&(e=this.active()),typeof n=="function"?this.ta(e,n):n},t.prototype.disable=function(){return this.Ge=sn,this.Xi=!1,this},t.prototype.enable=function(){return this.Xi?this:(this.Xi=!0,this.Ge=sn,this)},t.prototype.with=function(e,n,r){for(var i=[],o=3;o<arguments.length;o++)i[o-3]=arguments[o];var s=this.Ge;this.Ge=e||sn;try{return n.call.apply(n,y1([r],m1(i),!1))}finally{this.Ge=s}},t})(),g1=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),b1=(function(t){g1(e,t);function e(n){n===void 0&&(n={});var r=t.call(this,n)||this;if(n.contextManager)throw"contextManager should be defined in register method not in constructor";if(n.propagator)throw"propagator should be defined in register method not in constructor";return r}return e.prototype.register=function(n){n===void 0&&(n={}),n.contextManager===void 0&&(n.contextManager=new hy),n.contextManager&&n.contextManager.enable(),t.prototype.register.call(this,n)},e})(f1),J;(function(t){t.CONNECT_END="connectEnd",t.CONNECT_START="connectStart",t.DECODED_BODY_SIZE="decodedBodySize",t.DOM_COMPLETE="domComplete",t.DOM_CONTENT_LOADED_EVENT_END="domContentLoadedEventEnd",t.DOM_CONTENT_LOADED_EVENT_START="domContentLoadedEventStart",t.DOM_INTERACTIVE="domInteractive",t.DOMAIN_LOOKUP_END="domainLookupEnd",t.DOMAIN_LOOKUP_START="domainLookupStart",t.ENCODED_BODY_SIZE="encodedBodySize",t.FETCH_START="fetchStart",t.LOAD_EVENT_END="loadEventEnd",t.LOAD_EVENT_START="loadEventStart",t.NAVIGATION_START="navigationStart",t.REDIRECT_END="redirectEnd",t.REDIRECT_START="redirectStart",t.REQUEST_START="requestStart",t.RESPONSE_END="responseEnd",t.RESPONSE_START="responseStart",t.SECURE_CONNECTION_START="secureConnectionStart",t.UNLOAD_EVENT_END="unloadEventEnd",t.UNLOAD_EVENT_START="unloadEventStart"})(J||(J={}));var v1="http.response_content_length",w1="http.response_content_length_uncompressed",S1=v1,I1=w1,ml;function T1(){return ml||(ml=document.createElement("a")),ml}function _e(t,e){return e in t}function Rt(t,e,n,r){var i=void 0,o=void 0;_e(n,e)&&typeof n[e]=="number"&&(i=n[e]);var s=J.FETCH_START;if(_e(n,s)&&typeof n[s]=="number"&&(o=n[s]),i!==void 0&&o!==void 0&&i>=o)return t.addEvent(e,i),t}function Hn(t,e,n){n===void 0&&(n=!1),n||(Rt(t,J.FETCH_START,e),Rt(t,J.DOMAIN_LOOKUP_START,e),Rt(t,J.DOMAIN_LOOKUP_END,e),Rt(t,J.CONNECT_START,e),_e(e,"name")&&e.name.startsWith("https:")&&Rt(t,J.SECURE_CONNECTION_START,e),Rt(t,J.CONNECT_END,e),Rt(t,J.REQUEST_START,e),Rt(t,J.RESPONSE_START,e),Rt(t,J.RESPONSE_END,e));var r=e[J.ENCODED_BODY_SIZE];r!==void 0&&t.setAttribute(S1,r);var i=e[J.DECODED_BODY_SIZE];i!==void 0&&r!==i&&t.setAttribute(I1,i)}function E1(t){return t.slice().sort(function(e,n){var r=e[J.FETCH_START],i=n[J.FETCH_START];return r>i?1:r<i?-1:0})}function py(){return typeof location<"u"?location.origin:void 0}function dy(t,e,n,r,i,o){i===void 0&&(i=new WeakSet);var s=Ze(t);t=s.toString();var a=C1(t,e,n,r,i,o);if(a.length===0)return{mainRequest:void 0};if(a.length===1)return{mainRequest:a[0]};var c=E1(a);if(s.origin!==py()&&c.length>1){var l=c[0],u=R1(c,l[J.RESPONSE_END],n),h=l[J.RESPONSE_END],p=u[J.FETCH_START];return p<h&&(u=l,l=void 0),{corsPreFlightRequest:l,mainRequest:u}}else return{mainRequest:a[0]}}function R1(t,e,n){for(var r=Ve(n),i=Ve(Xr(e)),o=t[1],s,a=t.length,c=1;c<a;c++){var l=t[c],u=Ve(Xr(l[J.FETCH_START])),h=Ve(Xr(l[J.RESPONSE_END])),p=r-h;u>=i&&(!s||p<s)&&(s=p,o=l)}return o}function C1(t,e,n,r,i,o){var s=Ve(e),a=Ve(n),c=r.filter(function(l){var u=Ve(Xr(l[J.FETCH_START])),h=Ve(Xr(l[J.RESPONSE_END]));return l.initiatorType.toLowerCase()===(o||"xmlhttprequest")&&l.name===t&&u>=s&&h<=a});return c.length>0&&(c=c.filter(function(l){return!i.has(l)})),c}function Ze(t){if(typeof URL=="function")return new URL(t,typeof document<"u"?document.baseURI:typeof location<"u"?location.href:void 0);var e=T1();return e.href=t,e}function fy(t,e){if(t.nodeType===Node.DOCUMENT_NODE)return"/";var n=k1(t,e);if(e&&n.indexOf("@id")>0)return n;var r="";return t.parentNode&&(r+=fy(t.parentNode,!1)),r+=n,r}function Z1(t){if(!t.parentNode)return 0;var e=[t.nodeType];t.nodeType===Node.CDATA_SECTION_NODE&&e.push(Node.TEXT_NODE);var n=Array.from(t.parentNode.childNodes);return n=n.filter(function(r){var i=r.localName;return e.indexOf(r.nodeType)>=0&&i===t.localName}),n.length>=1?n.indexOf(t)+1:0}function k1(t,e){var n=t.nodeType,r=Z1(t),i="";if(n===Node.ELEMENT_NODE){var o=t.getAttribute("id");if(e&&o)return'//*[@id="'+o+'"]';i=t.localName}else if(n===Node.TEXT_NODE||n===Node.CDATA_SECTION_NODE)i="text()";else if(n===Node.COMMENT_NODE)i="comment()";else return"";return i&&r>1?"/"+i+"["+r+"]":"/"+i}function my(t,e){var n=e||[];(typeof n=="string"||n instanceof RegExp)&&(n=[n]);var r=Ze(t);return r.origin===py()?!0:n.some(function(i){return ty(t,i)})}var Wr;(function(t){t.DOCUMENT_LOAD="documentLoad",t.DOCUMENT_FETCH="documentFetch",t.RESOURCE_FETCH="resourceFetch"})(Wr||(Wr={}));var V1="0.44.0",x1="@opentelemetry/instrumentation-document-load",O1="http.url",N1="http.user_agent",yl=O1,G1=N1,L1="deployment.environment",X1=L1,W1="service.name",U1="telemetry.sdk.name",P1="telemetry.sdk.version",M1="url.full",F1="url.path",A1="url.query",Xo;(function(t){t.FIRST_PAINT="firstPaint",t.FIRST_CONTENTFUL_PAINT="firstContentfulPaint"})(Xo||(Xo={}));var J1=function(){var t,e,n={},r=(e=(t=ee).getEntriesByType)===null||e===void 0?void 0:e.call(t,"navigation")[0];if(r){var i=Object.values(J);i.forEach(function(a){if(_e(r,a)){var c=r[a];typeof c=="number"&&(n[a]=c)}})}else{var o=ee,s=o.timing;if(s){var i=Object.values(J);i.forEach(function(c){if(_e(s,c)){var l=s[c];typeof l=="number"&&(n[c]=l)}})}}return n},qd={"first-paint":Xo.FIRST_PAINT,"first-contentful-paint":Xo.FIRST_CONTENTFUL_PAINT},D1=function(t){var e,n,r=(n=(e=ee).getEntriesByType)===null||n===void 0?void 0:n.call(e,"paint");r&&r.forEach(function(i){var o=i.name,s=i.startTime;_e(qd,o)&&t.addEvent(qd[o],s)})},Y1=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),K1=(function(t){Y1(e,t);function e(n){n===void 0&&(n={});var r=t.call(this,x1,V1,n)||this;return r.component="document-load",r.version="1",r.moduleName=r.component,r}return e.prototype.init=function(){},e.prototype.Ir=function(){var n=this;window.setTimeout(function(){n.ea()})},e.prototype.na=function(n){var r=this,i,o,s=(o=(i=ee).getEntriesByType)===null||o===void 0?void 0:o.call(i,"resource");s&&s.forEach(function(a){r.ra(a,n)})},e.prototype.ea=function(){var n=this,r=Array.from(document.getElementsByTagName("meta")).find(function(s){return s.getAttribute("name")===wo}),i=J1(),o=r&&r.content||"";tt.with($t.extract(sn,{traceparent:o}),function(){var s,a=n.Wi(Wr.DOCUMENT_LOAD,J.FETCH_START,i);a&&(tt.with(ut.setSpan(tt.active(),a),function(){var c=n.Wi(Wr.DOCUMENT_FETCH,J.FETCH_START,i);c&&(c.setAttribute(yl,location.href),tt.with(ut.setSpan(tt.active(),c),function(){var l;n.getConfig().ignoreNetworkEvents||Hn(c,i),n.Wo(c,(l=n.getConfig().applyCustomAttributesOnSpan)===null||l===void 0?void 0:l.documentFetch),n.ur(c,J.RESPONSE_END,i)}))}),a.setAttribute(yl,location.href),a.setAttribute(G1,navigator.userAgent),n.na(a),n.getConfig().ignoreNetworkEvents||(Rt(a,J.FETCH_START,i),Rt(a,J.UNLOAD_EVENT_START,i),Rt(a,J.UNLOAD_EVENT_END,i),Rt(a,J.DOM_INTERACTIVE,i),Rt(a,J.DOM_CONTENT_LOADED_EVENT_START,i),Rt(a,J.DOM_CONTENT_LOADED_EVENT_END,i),Rt(a,J.DOM_COMPLETE,i),Rt(a,J.LOAD_EVENT_START,i),Rt(a,J.LOAD_EVENT_END,i)),n.getConfig().ignorePerformancePaintEvents||D1(a),n.Wo(a,(s=n.getConfig().applyCustomAttributesOnSpan)===null||s===void 0?void 0:s.documentLoad),n.ur(a,J.LOAD_EVENT_END,i))})},e.prototype.ur=function(n,r,i){n&&(_e(i,r)?n.end(i[r]):n.end())},e.prototype.ra=function(n,r){var i,o=this.Wi(Wr.RESOURCE_FETCH,J.FETCH_START,n,r);o&&(o.setAttribute(yl,n.name),this.getConfig().ignoreNetworkEvents||Hn(o,n),this.ia(o,n,(i=this.getConfig().applyCustomAttributesOnSpan)===null||i===void 0?void 0:i.resourceFetch),this.ur(o,J.RESPONSE_END,n))},e.prototype.Wi=function(n,r,i,o){if(_e(i,r)&&typeof i[r]=="number"){var s=this.tracer.startSpan(n,{startTime:i[r]},o?ut.setSpan(tt.active(),o):void 0);return s}},e.prototype.oa=function(){window.document.readyState==="complete"?this.Ir():(this.Ir=this.Ir.bind(this),window.addEventListener("load",this.Ir))},e.prototype.Wo=function(n,r){var i=this;r&&Yd(function(){return r(n)},function(o){o&&i.w.error("addCustomAttributesOnSpan",o)})},e.prototype.ia=function(n,r,i){var o=this;i&&Yd(function(){return i(n,r)},function(s){s&&o.w.error("addCustomAttributesOnResourceSpan",s)})},e.prototype.enable=function(){window.removeEventListener("load",this.Ir),this.oa()},e.prototype.disable=function(){window.removeEventListener("load",this.Ir)},e})(ay),yy=(function(){function t(){}return t.prototype.emit=function(e){},t})(),_1=new yy,H1=(function(){function t(){}return t.prototype.getLogger=function(e,n,r){return new yy},t})(),gy=new H1,z1=(function(){function t(e,n,r,i){this.cr=e,this.name=n,this.version=r,this.options=i}return t.prototype.emit=function(e){this.Jr().emit(e)},t.prototype.Jr=function(){if(this.b)return this.b;var e=this.cr.getDelegateLogger(this.name,this.version,this.options);return e?(this.b=e,this.b):_1},t})(),tf=(function(){function t(){}return t.prototype.getLogger=function(e,n,r){var i;return(i=this.getDelegateLogger(e,n,r))!==null&&i!==void 0?i:new z1(this,e,n,r)},t.prototype.getDelegate=function(){var e;return(e=this.b)!==null&&e!==void 0?e:gy},t.prototype.setDelegate=function(e){this.b=e},t.prototype.getDelegateLogger=function(e,n,r){var i;return(i=this.b)===null||i===void 0?void 0:i.getLogger(e,n,r)},t})(),B1=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{},no=Symbol.for("io.opentelemetry.js.api.logs"),Zr=B1;function j1(t,e,n){return function(r){return r===t?e:n}}var ef=1,Q1=(function(){function t(){this.Ke=new tf}return t.getInstance=function(){return this.I||(this.I=new t),this.I},t.prototype.setGlobalLoggerProvider=function(e){return Zr[no]?this.getLoggerProvider():(Zr[no]=j1(ef,e,gy),this.Ke.setDelegate(e),e)},t.prototype.getLoggerProvider=function(){var e,n;return(n=(e=Zr[no])===null||e===void 0?void 0:e.call(Zr,ef))!==null&&n!==void 0?n:this.Ke},t.prototype.getLogger=function(e,n,r){return this.getLoggerProvider().getLogger(e,n,r)},t.prototype.disable=function(){delete Zr[no],this.Ke=new tf},t})(),$1=Q1.getInstance(),Ql=function(){return Ql=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Ql.apply(this,arguments)},q1=(function(){function t(e,n,r){this.instrumentationName=e,this.instrumentationVersion=n,this.ie={},this.ne=te.wrap,this.U=te.unwrap,this.wo=te.massWrap,this.So=te.massUnwrap,this.setConfig(r),this.w=X.createComponentLogger({namespace:e}),this.qn=ut.getTracer(e,n),this.tr=ke.getMeter(e,n),this.er=$1.getLogger(e,n),this.nr()}return Object.defineProperty(t.prototype,"meter",{get:function(){return this.tr},enumerable:!1,configurable:!0}),t.prototype.setMeterProvider=function(e){this.tr=e.getMeter(this.instrumentationName,this.instrumentationVersion),this.nr()},Object.defineProperty(t.prototype,"logger",{get:function(){return this.er},enumerable:!1,configurable:!0}),t.prototype.setLoggerProvider=function(e){this.er=e.getLogger(this.instrumentationName,this.instrumentationVersion)},t.prototype.getModuleDefinitions=function(){var e,n=(e=this.init())!==null&&e!==void 0?e:[];return Array.isArray(n)?n:[n]},t.prototype.nr=function(){},t.prototype.getConfig=function(){return this.ie},t.prototype.setConfig=function(e){this.ie=Ql({enabled:!0},e)},t.prototype.setTracerProvider=function(e){this.qn=e.getTracer(this.instrumentationName,this.instrumentationVersion)},Object.defineProperty(t.prototype,"tracer",{get:function(){return this.qn},enumerable:!1,configurable:!0}),t.prototype.Io=function(e,n,r,i){if(e)try{e(r,i)}catch(o){this.w.error("Error running span customization hook due to exception in handler",{triggerName:n},o)}},t})(),tV=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),eV=(function(t){tV(e,t);function e(n,r,i){var o=t.call(this,n,r,i)||this;return o.ie.enabled&&o.enable(),o}return e})(q1);function nV(t,e,n){var r,i;try{i=t()}catch(o){r=o}finally{return e(r,i),i}}function rV(t){return typeof t=="function"&&typeof t.__original=="function"&&typeof t.__unwrap=="function"&&t.__wrapped===!0}var Wo;(function(t){t.COMPONENT="component",t.HTTP_ERROR_NAME="http.error_name",t.HTTP_STATUS_TEXT="http.status_text"})(Wo||(Wo={}));var iV="http.method",oV="http.url",sV="http.host",aV="http.scheme",lV="http.status_code",cV="http.user_agent",uV="http.request_content_length_uncompressed",hV=iV,pV=oV,dV=sV,fV=aV,mV=lV,yV=cV,gV=uV,bV=function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(u){try{l(r.next(u))}catch(h){s(h)}}function c(u){try{l(r.throw(u))}catch(h){s(h)}}function l(u){u.done?o(u.value):i(u.value).then(a,c)}l((r=r.apply(t,[])).next())})},vV=function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(u){l=[6,u],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},wV=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},SV=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},by=X.createComponentLogger({namespace:"@opentelemetry/opentelemetry-instrumentation-fetch/utils"});function IV(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(t[0]instanceof URL||typeof t[0]=="string"){var n=t[1];if(!(n!=null&&n.body))return Promise.resolve();if(n.body instanceof ReadableStream){var r=TV(n.body),i=r.body,o=r.length;return n.body=i,o}else return Promise.resolve(EV(n.body))}else{var s=t[0];return s!=null&&s.body?s.clone().text().then(function(a){return $l(a)}):Promise.resolve()}}function TV(t){if(!t.pipeThrough)return by.warn("Platform has ReadableStream but not pipeThrough!"),{body:t,length:Promise.resolve(void 0)};var e=0,n,r=new Promise(function(o){n=o}),i=new TransformStream({start:function(){},transform:function(o,s){return bV(this,void 0,void 0,function(){var a;return vV(this,function(c){switch(c.label){case 0:return[4,o];case 1:return a=c.sent(),e+=a.byteLength,s.enqueue(o),[2]}})})},flush:function(){n(e)}});return{body:t.pipeThrough(i),length:r}}function EV(t){if(typeof Document<"u"&&t instanceof Document)return new XMLSerializer().serializeToString(document).length;if(t instanceof Blob)return t.size;if(t.byteLength!==void 0)return t.byteLength;if(t instanceof FormData)return CV(t);if(t instanceof URLSearchParams)return $l(t.toString());if(typeof t=="string")return $l(t);by.warn("unknown body type")}var RV=new TextEncoder;function $l(t){return RV.encode(t).byteLength}function CV(t){var e,n,r=0;try{for(var i=wV(t.entries()),o=i.next();!o.done;o=i.next()){var s=SV(o.value,2),a=s[0],c=s[1];r+=a.length,c instanceof Blob?r+=c.size:r+=c.length}}catch(l){e={error:l}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return r}var nf="0.57.1",ZV=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),kV=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},VV=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},gl,xV=300,rf=typeof process=="object"&&((gl=process.release)===null||gl===void 0?void 0:gl.name)==="node",OV=(function(t){ZV(e,t);function e(n){n===void 0&&(n={});var r=t.call(this,"@opentelemetry/instrumentation-fetch",nf,n)||this;return r.component="fetch",r.version=nf,r.moduleName=r.component,r.Jn=new WeakSet,r.rr=0,r}return e.prototype.init=function(){},e.prototype.Ui=function(n,r){var i=this.tracer.startSpan("CORS Preflight",{startTime:r[J.FETCH_START]},ut.setSpan(tt.active(),n));Hn(i,r,this.getConfig().ignoreNetworkEvents),i.end(r[J.RESPONSE_END])},e.prototype.Pi=function(n,r){var i=Ze(r.url);n.setAttribute(mV,r.status),r.statusText!=null&&n.setAttribute(Wo.HTTP_STATUS_TEXT,r.statusText),n.setAttribute(dV,i.host),n.setAttribute(fV,i.protocol.replace(":","")),typeof navigator<"u"&&n.setAttribute(yV,navigator.userAgent)},e.prototype.Mi=function(n,r){if(!my(r,this.getConfig().propagateTraceHeaderCorsUrls)){var i={};$t.inject(tt.active(),i),Object.keys(i).length>0&&this.w.debug("headers inject skipped due to CORS policy");return}if(n instanceof Request)$t.inject(tt.active(),n.headers,{set:function(o,s,a){return o.set(s,typeof a=="string"?a:String(a))}});else if(n.headers instanceof Headers)$t.inject(tt.active(),n.headers,{set:function(o,s,a){return o.set(s,typeof a=="string"?a:String(a))}});else if(n.headers instanceof Map)$t.inject(tt.active(),n.headers,{set:function(o,s,a){return o.set(s,typeof a=="string"?a:String(a))}});else{var i={};$t.inject(tt.active(),i),n.headers=Object.assign({},i,n.headers||{})}},e.prototype.Fi=function(){this.rr===0&&this.getConfig().clearTimingResources&&(performance.clearResourceTimings(),this.Jn=new WeakSet)},e.prototype.Tr=function(n,r){var i;if(r===void 0&&(r={}),ey(n,this.getConfig().ignoreUrls)){this.w.debug("ignoring span as url matches ignored url");return}var o=(r.method||"GET").toUpperCase(),s="HTTP "+o;return this.tracer.startSpan(s,{kind:Jr.CLIENT,attributes:(i={},i[Wo.COMPONENT]=this.moduleName,i[hV]=o,i[pV]=n,i)})},e.prototype.Ai=function(n,r,i){var o=r.entries;if(!o.length){if(!performance.getEntriesByType)return;o=performance.getEntriesByType("resource")}var s=dy(r.spanUrl,r.startTime,i,o,this.Jn,"fetch");if(s.mainRequest){var a=s.mainRequest;this.Hr(a);var c=s.corsPreFlightRequest;c&&(this.Ui(n,c),this.Hr(c)),Hn(n,a,this.getConfig().ignoreNetworkEvents)}},e.prototype.Hr=function(n){this.Jn.add(n)},e.prototype.ur=function(n,r,i){var o=this,s=qt(Date.now()),a=fn();this.Pi(n,i),setTimeout(function(){var c;(c=r.observer)===null||c===void 0||c.disconnect(),o.Ai(n,r,a),o.rr--,o.Fi(),n.end(s)},xV)},e.prototype.sa=function(){var n=this;return function(r){var i=n;return function(){for(var o=[],s=0;s<arguments.length;s++)o[s]=arguments[s];var a=this,c=Ze(o[0]instanceof Request?o[0].url:String(o[0])).href,l=o[0]instanceof Request?o[0]:o[1]||{},u=i.Tr(c,l);if(!u)return r.apply(this,o);var h=i.aa(c);i.getConfig().measureRequestSize&&IV.apply(void 0,VV([],kV(o),!1)).then(function(v){v&&u.setAttribute(gV,v)}).catch(function(v){i.w.warn("getFetchBodyLength",v)});function p(v,g){i.Uo(v,l,g),i.ur(v,h,{status:g.status||0,statusText:g.message,url:c})}function f(v,g){i.Uo(v,l,g),g.status>=200&&g.status<400?i.ur(v,h,g):i.ur(v,h,{status:g.status,statusText:g.statusText,url:c})}function m(v,g,w){try{var R=w.clone(),E=w.clone(),T=R.body;if(T){var x=T.getReader(),N=function(){x.read().then(function(U){var C=U.done;C?f(v,E):N()},function(U){p(v,U)})};N()}else f(v,w)}finally{g(w)}}function d(v,g,w){try{p(v,w)}finally{g(w)}}return new Promise(function(v,g){return tt.with(ut.setSpan(tt.active(),u),function(){return i.Mi(l,c),i.rr++,r.apply(a,l instanceof Request?[l]:[c,l]).then(m.bind(a,u,v),d.bind(a,u,g))})})}}},e.prototype.Uo=function(n,r,i){var o=this,s=this.getConfig().applyCustomAttributesOnSpan;s&&nV(function(){return s(n,r,i)},function(a){a&&o.w.error("applyCustomAttributesOnSpan",a)})},e.prototype.aa=function(n){var r=fn(),i=[];if(typeof PerformanceObserver!="function")return{entries:i,startTime:r,spanUrl:n};var o=new PerformanceObserver(function(s){var a=s.getEntries();a.forEach(function(c){c.initiatorType==="fetch"&&c.name===n&&i.push(c)})});return o.observe({entryTypes:["resource"]}),{entries:i,observer:o,startTime:r,spanUrl:n}},e.prototype.enable=function(){if(rf){this.w.warn("this instrumentation is intended for web usage only, it does not instrument Node.js's fetch()");return}rV(fetch)&&(this.U(Lr,"fetch"),this.w.debug("removing previous patch for constructor")),this.ne(Lr,"fetch",this.sa())},e.prototype.disable=function(){rf||(this.U(Lr,"fetch"),this.Jn=new WeakSet)},e})(eV),vy=(function(){function t(){}return t.prototype.emit=function(e){},t})(),NV=new vy,GV=(function(){function t(){}return t.prototype.getLogger=function(e,n,r){return new vy},t})(),wy=new GV,LV=(function(){function t(e,n,r,i){this.cr=e,this.name=n,this.version=r,this.options=i}return t.prototype.emit=function(e){this.Jr().emit(e)},t.prototype.Jr=function(){if(this.b)return this.b;var e=this.cr.getDelegateLogger(this.name,this.version,this.options);return e?(this.b=e,this.b):NV},t})(),of=(function(){function t(){}return t.prototype.getLogger=function(e,n,r){var i;return(i=this.getDelegateLogger(e,n,r))!==null&&i!==void 0?i:new LV(this,e,n,r)},t.prototype.getDelegate=function(){var e;return(e=this.b)!==null&&e!==void 0?e:wy},t.prototype.setDelegate=function(e){this.b=e},t.prototype.getDelegateLogger=function(e,n,r){var i;return(i=this.b)===null||i===void 0?void 0:i.getLogger(e,n,r)},t})(),XV=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{},ro=Symbol.for("io.opentelemetry.js.api.logs"),kr=XV;function WV(t,e,n){return function(r){return r===t?e:n}}var sf=1,UV=(function(){function t(){this.Ke=new of}return t.getInstance=function(){return this.I||(this.I=new t),this.I},t.prototype.setGlobalLoggerProvider=function(e){return kr[ro]?this.getLoggerProvider():(kr[ro]=WV(sf,e,wy),this.Ke.setDelegate(e),e)},t.prototype.getLoggerProvider=function(){var e,n;return(n=(e=kr[ro])===null||e===void 0?void 0:e.call(kr,sf))!==null&&n!==void 0?n:this.Ke},t.prototype.getLogger=function(e,n,r){return this.getLoggerProvider().getLogger(e,n,r)},t.prototype.disable=function(){delete kr[ro],this.Ke=new of},t})(),PV=UV.getInstance(),ql=function(){return ql=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},ql.apply(this,arguments)},MV=(function(){function t(e,n,r){this.instrumentationName=e,this.instrumentationVersion=n,this.ie={},this.ne=te.wrap,this.U=te.unwrap,this.wo=te.massWrap,this.So=te.massUnwrap,this.setConfig(r),this.w=X.createComponentLogger({namespace:e}),this.qn=ut.getTracer(e,n),this.tr=ke.getMeter(e,n),this.er=PV.getLogger(e,n),this.nr()}return Object.defineProperty(t.prototype,"meter",{get:function(){return this.tr},enumerable:!1,configurable:!0}),t.prototype.setMeterProvider=function(e){this.tr=e.getMeter(this.instrumentationName,this.instrumentationVersion),this.nr()},Object.defineProperty(t.prototype,"logger",{get:function(){return this.er},enumerable:!1,configurable:!0}),t.prototype.setLoggerProvider=function(e){this.er=e.getLogger(this.instrumentationName,this.instrumentationVersion)},t.prototype.getModuleDefinitions=function(){var e,n=(e=this.init())!==null&&e!==void 0?e:[];return Array.isArray(n)?n:[n]},t.prototype.nr=function(){},t.prototype.getConfig=function(){return this.ie},t.prototype.setConfig=function(e){this.ie=ql({enabled:!0},e)},t.prototype.setTracerProvider=function(e){this.qn=e.getTracer(this.instrumentationName,this.instrumentationVersion)},Object.defineProperty(t.prototype,"tracer",{get:function(){return this.qn},enumerable:!1,configurable:!0}),t.prototype.Io=function(e,n,r,i){if(e)try{e(r,i)}catch(o){this.w.error("Error running span customization hook due to exception in handler",{triggerName:n},o)}},t})(),FV=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),AV=(function(t){FV(e,t);function e(n,r,i){var o=t.call(this,n,r,i)||this;return o.ie.enabled&&o.enable(),o}return e})(MV);function JV(t,e,n){var r,i;try{i=t()}catch(o){r=o}finally{return e(r,i),i}}function af(t){return typeof t=="function"&&typeof t.__original=="function"&&typeof t.__unwrap=="function"&&t.__wrapped===!0}var DV="http.method",YV="http.url",KV="http.host",_V="http.scheme",HV="http.status_code",zV="http.user_agent",BV="http.request_content_length_uncompressed",jV=DV,QV=YV,$V=KV,qV=_V,tx=HV,ex=zV,nx=BV,Ce;(function(t){t.METHOD_OPEN="open",t.METHOD_SEND="send",t.EVENT_ABORT="abort",t.EVENT_ERROR="error",t.EVENT_LOAD="loaded",t.EVENT_TIMEOUT="timeout"})(Ce||(Ce={}));var rx=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},ix=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},ox=X.createComponentLogger({namespace:"@opentelemetry/opentelemetry-instrumentation-xml-http-request/utils"});function sx(t){if(typeof Document<"u"&&t instanceof Document)return new XMLSerializer().serializeToString(document).length;if(t instanceof Blob)return t.size;if(t.byteLength!==void 0)return t.byteLength;if(t instanceof FormData)return lx(t);if(t instanceof URLSearchParams)return lf(t.toString());if(typeof t=="string")return lf(t);ox.warn("unknown body type")}var ax=new TextEncoder;function lf(t){return ax.encode(t).byteLength}function lx(t){var e,n,r=0;try{for(var i=rx(t.entries()),o=i.next();!o.done;o=i.next()){var s=ix(o.value,2),a=s[0],c=s[1];r+=a.length,c instanceof Blob?r+=c.size:r+=c.length}}catch(l){e={error:l}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return r}var cf="0.57.1",tc;(function(t){t.HTTP_STATUS_TEXT="http.status_text"})(tc||(tc={}));var cx=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),ux=300,hx=(function(t){cx(e,t);function e(n){n===void 0&&(n={});var r=t.call(this,"@opentelemetry/instrumentation-xml-http-request",cf,n)||this;return r.component="xml-http-request",r.version=cf,r.moduleName=r.component,r.rr=0,r.Xn=new WeakMap,r.Jn=new WeakSet,r}return e.prototype.init=function(){},e.prototype.Mi=function(n,r){var i=Ze(r).href;if(!my(i,this.getConfig().propagateTraceHeaderCorsUrls)){var o={};$t.inject(tt.active(),o),Object.keys(o).length>0&&this.w.debug("headers inject skipped due to CORS policy");return}var s={};$t.inject(tt.active(),s),Object.keys(s).forEach(function(a){n.setRequestHeader(a,String(s[a]))})},e.prototype.Ui=function(n,r){var i=this;tt.with(ut.setSpan(tt.active(),n),function(){var o=i.tracer.startSpan("CORS Preflight",{startTime:r[J.FETCH_START]});Hn(o,r,i.getConfig().ignoreNetworkEvents),o.end(r[J.RESPONSE_END])})},e.prototype.Pi=function(n,r,i){if(typeof i=="string"){var o=Ze(i);r.status!==void 0&&n.setAttribute(tx,r.status),r.statusText!==void 0&&n.setAttribute(tc.HTTP_STATUS_TEXT,r.statusText),n.setAttribute($V,o.host),n.setAttribute(qV,o.protocol.replace(":","")),n.setAttribute(ex,navigator.userAgent)}},e.prototype.la=function(n,r){var i=this,o=this.getConfig().applyCustomAttributesOnSpan;typeof o=="function"&&JV(function(){return o(n,r)},function(s){s&&i.w.error("applyCustomAttributesOnSpan",s)})},e.prototype.ca=function(n,r){var i=this.Xn.get(n);!i||typeof PerformanceObserver!="function"||typeof PerformanceResourceTiming!="function"||(i.createdResources={observer:new PerformanceObserver(function(o){var s=o.getEntries(),a=Ze(r);s.forEach(function(c){c.initiatorType==="xmlhttprequest"&&c.name===a.href&&i.createdResources&&i.createdResources.entries.push(c)})}),entries:[]},i.createdResources.observer.observe({entryTypes:["resource"]}))},e.prototype.Fi=function(){this.rr===0&&this.getConfig().clearTimingResources&&(ee.clearResourceTimings(),this.Xn=new WeakMap,this.Jn=new WeakSet)},e.prototype.Ai=function(n,r,i,o,s){if(!(!i||!o||!s||!n.createdResources)){var a=n.createdResources.entries;(!a||!a.length)&&(a=ee.getEntriesByType("resource"));var c=dy(Ze(i).href,o,s,a,this.Jn);if(c.mainRequest){var l=c.mainRequest;this.Hr(l);var u=c.corsPreFlightRequest;u&&(this.Ui(r,u),this.Hr(u)),Hn(r,l,this.getConfig().ignoreNetworkEvents)}}},e.prototype.ua=function(n){var r=this.Xn.get(n);if(r){var i=r.callbackToRemoveEvents;i&&i(),this.Xn.delete(n)}},e.prototype.Tr=function(n,r,i){var o;if(ey(r,this.getConfig().ignoreUrls)){this.w.debug("ignoring span as url matches ignored url");return}var s=i.toUpperCase(),a=this.tracer.startSpan(s,{kind:Jr.CLIENT,attributes:(o={},o[jV]=i,o[QV]=Ze(r).toString(),o)});return a.addEvent(Ce.METHOD_OPEN),this.ua(n),this.Xn.set(n,{span:a,spanUrl:r}),a},e.prototype.Hr=function(n){this.Jn.add(n)},e.prototype.ha=function(){var n=this;return function(r){var i=n;return function(){for(var o=[],s=0;s<arguments.length;s++)o[s]=arguments[s];var a=o[0],c=o[1];return i.Tr(this,c,a),r.apply(this,o)}}},e.prototype.pa=function(){var n=this;function r(u,h,p,f){var m=h.callbackToRemoveEvents;typeof m=="function"&&m();var d=h.span,v=h.spanUrl,g=h.sendStartTime;d&&(n.Ai(h,d,v,g,p),d.addEvent(u,f),n.Pi(d,h,v),d.end(f),n.rr--),n.Fi()}function i(u,h){var p=n.Xn.get(h);if(p){p.status=h.status,p.statusText=h.statusText,n.Xn.delete(h),p.span&&n.la(p.span,h);var f=fn(),m=Date.now();setTimeout(function(){r(u,p,f,m)},ux)}}function o(){i(Ce.EVENT_ERROR,this)}function s(){i(Ce.EVENT_ABORT,this)}function a(){i(Ce.EVENT_TIMEOUT,this)}function c(){this.status<299?i(Ce.EVENT_LOAD,this):i(Ce.EVENT_ERROR,this)}function l(u){u.removeEventListener("abort",s),u.removeEventListener("error",o),u.removeEventListener("load",c),u.removeEventListener("timeout",a);var h=n.Xn.get(u);h&&(h.callbackToRemoveEvents=void 0)}return function(u){return function(){for(var h=this,p=[],f=0;f<arguments.length;f++)p[f]=arguments[f];var m=n.Xn.get(this);if(!m)return u.apply(this,p);var d=m.span,v=m.spanUrl;if(d&&v){if(n.getConfig().measureRequestSize&&p!=null&&p[0]){var g=p[0],w=sx(g);w!==void 0&&d.setAttribute(nx,w)}tt.with(ut.setSpan(tt.active(),d),function(){n.rr++,m.sendStartTime=fn(),d.addEvent(Ce.METHOD_SEND),h.addEventListener("abort",s),h.addEventListener("error",o),h.addEventListener("load",c),h.addEventListener("timeout",a),m.callbackToRemoveEvents=function(){l(h),m.createdResources&&m.createdResources.observer.disconnect()},n.Mi(h,v),n.ca(h,v)})}return u.apply(this,p)}}},e.prototype.enable=function(){this.w.debug("applying patch to",this.moduleName,this.version),af(XMLHttpRequest.prototype.open)&&(this.U(XMLHttpRequest.prototype,"open"),this.w.debug("removing previous patch from method open")),af(XMLHttpRequest.prototype.send)&&(this.U(XMLHttpRequest.prototype,"send"),this.w.debug("removing previous patch from method send")),this.ne(XMLHttpRequest.prototype,"open",this.ha()),this.ne(XMLHttpRequest.prototype,"send",this.pa())},e.prototype.disable=function(){this.w.debug("removing patch from",this.moduleName,this.version),this.U(XMLHttpRequest.prototype,"open"),this.U(XMLHttpRequest.prototype,"send"),this.rr=0,this.Xn=new WeakMap,this.Jn=new WeakSet},e})(AV),px=(t,e,n)=>{var r,i;let o=mt({},e);return n?((r=Object.keys(o))==null||r.forEach(s=>{[...n].includes(s==null?void 0:s.toLowerCase())||(o[s]="[REDACTED]")}),o):((i=Object.keys(o))==null||i.forEach(s=>{[...dx,...t].includes(s==null?void 0:s.toLowerCase())&&(o[s]="[REDACTED]")}),o)},dx=["authorization","cookie","proxy-authorization","token"],fx=["https://www.googleapis.com/identitytoolkit","https://securetoken.googleapis.com"],mx=new RegExp("sdk\\/evalx\\/[^/]+\\/contexts\\/(?<context>[^/?]*)\\??.*?"),yx=new RegExp("\\/eval\\/[^/]+\\/(?<context>[^/?]*)\\??.*?");function gx(t){return!!(t.includes("/sdk/evalx")&&t.match(mx)||t.includes("/eval/")&&t.match(yx))}var bx=t=>["events.ld.catamorphic.com","events.launchdarkly.com"].some(e=>t.toLocaleLowerCase().includes(e)),vx=t=>gx(t),wx=(t,e)=>e.some(n=>t.toLocaleLowerCase().includes(n)),Sx=(t,e,n)=>!wx(t,e)&&!vx(t)&&!bx(t),Ix=(t,e,n)=>{var r;if(n.some(s=>t.toLowerCase().includes(s)))return!1;let i=[];e===!0?(i=["localhost",/^\//],(r=window==null?void 0:window.location)!=null&&r.host&&i.push(window.location.host)):e instanceof Array&&(i=e);let o=!1;return i.forEach(s=>{t.match(s)&&(o=!0)}),o},uf=64*1024,Tx={"application/json":64*1024*1024,"text/plain":64*1024*1024},Sy=(t,e,n,r)=>{var i,o,s;let a=uf;if(r){let c="";typeof r.get=="function"?c=(i=r.get("content-type"))!=null?i:"":c=(o=r["content-type"])!=null?o:"";try{c=c.split(";")[0]}catch(l){}a=(s=Tx[c])!=null?s:uf}if(t){if(e)try{let c=JSON.parse(t);Array.isArray(c)?c.forEach(l=>{Object.keys(l).forEach(u=>{e.includes(u.toLocaleLowerCase())&&(l[u]="[REDACTED]")})}):Object.keys(c).forEach(l=>{e.includes(l.toLocaleLowerCase())&&(c[l]="[REDACTED]")}),t=JSON.stringify(c)}catch(c){}if(n)try{let c=JSON.parse(t);Object.keys(c).forEach(l=>{n.includes(l.toLocaleLowerCase())||(c[l]="[REDACTED]")}),t=JSON.stringify(c)}catch(c){}}try{t=t.slice(0,a)}catch(c){}return t},Ex=(t,e,n)=>_o(void 0,null,function*(){let r;try{let i=t.clone().body;if(i){let o=i.getReader(),s=new TextDecoder,a,c="";for(;!(a=yield o.read()).done;){let l=a.value;c+=s.decode(l)}r=c,r=Sy(r,n,e,t.headers)}else r=""}catch(i){r=`Unable to clone response: ${i}`}return r}),Iy=(function(){function t(e){this.b=e}return t.prototype.export=function(e,n){this.b.export(e,n)},t.prototype.forceFlush=function(){return this.b.forceFlush()},t.prototype.shutdown=function(){return this.b.shutdown()},t})(),Rx=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),hf=(function(t){Rx(e,t);function e(n,r,i){var o=t.call(this,n)||this;return o.name="OTLPExporterError",o.data=i,o.code=r,o}return e})(Error);function Cx(t){if(!Number.isNaN(t)&&Number.isFinite(t)&&t>0)return t;throw new Error("Configuration: timeoutMillis is invalid, expected number greater than 0 (actual: '"+t+"')")}function Zx(t){if(t!=null)return function(){return t}}function kx(t,e,n){var r,i,o,s,a,c;return{timeoutMillis:Cx((i=(r=t.timeoutMillis)!==null&&r!==void 0?r:e.timeoutMillis)!==null&&i!==void 0?i:n.timeoutMillis),concurrencyLimit:(s=(o=t.concurrencyLimit)!==null&&o!==void 0?o:e.concurrencyLimit)!==null&&s!==void 0?s:n.concurrencyLimit,compression:(c=(a=t.compression)!==null&&a!==void 0?a:e.compression)!==null&&c!==void 0?c:n.compression}}function Vx(){return{timeoutMillis:1e4,concurrencyLimit:30,compression:"none"}}var xx=function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(u){try{l(r.next(u))}catch(h){s(h)}}function c(u){try{l(r.throw(u))}catch(h){s(h)}}function l(u){u.done?o(u.value):i(u.value).then(a,c)}l((r=r.apply(t,[])).next())})},Ox=function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(u){l=[6,u],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},Nx=(function(){function t(e){this.zr=[],this.da=e}return t.prototype.pushPromise=function(e){var n=this;if(this.hasReachedLimit())throw new Error("Concurrency Limit reached");this.zr.push(e);var r=function(){var i=n.zr.indexOf(e);n.zr.splice(i,1)};e.then(r,r)},t.prototype.hasReachedLimit=function(){return this.zr.length>=this.da},t.prototype.awaitAll=function(){return xx(this,void 0,void 0,function(){return Ox(this,function(e){switch(e.label){case 0:return[4,Promise.all(this.zr)];case 1:return e.sent(),[2]}})})},t})();function Gx(t){return new Nx(t.concurrencyLimit)}function Lx(t){return Object.prototype.hasOwnProperty.call(t,"partialSuccess")}function Xx(){return{handleResponse:function(t){t==null||!Lx(t)||t.partialSuccess==null||Object.keys(t.partialSuccess).length===0||X.warn("Received Partial Success response:",JSON.stringify(t.partialSuccess))}}}var Wx=function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(u){try{l(r.next(u))}catch(h){s(h)}}function c(u){try{l(r.throw(u))}catch(h){s(h)}}function l(u){u.done?o(u.value):i(u.value).then(a,c)}l((r=r.apply(t,[])).next())})},Ux=function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(u){l=[6,u],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},Px=(function(){function t(e,n,r,i,o){this.Er=e,this.Po=n,this.fa=r,this.Ji=i,this.ma=o,this.Di=X.createComponentLogger({namespace:"OTLPExportDelegate"})}return t.prototype.export=function(e,n){var r=this;if(this.Di.debug("items to be sent",e),this.Ji.hasReachedLimit()){n({code:kt.FAILED,error:new Error("Concurrent export limit reached")});return}var i=this.Po.serializeRequest(e);if(i==null){n({code:kt.FAILED,error:new Error("Nothing to send")});return}this.Ji.pushPromise(this.Er.send(i,this.ma).then(function(o){if(o.status==="success"){if(o.data!=null)try{r.fa.handleResponse(r.Po.deserializeResponse(o.data))}catch(s){r.Di.warn("Export succeeded but could not deserialize response - is the response specification compliant?",s,o.data)}n({code:kt.SUCCESS});return}else if(o.status==="failure"&&o.error){n({code:kt.FAILED,error:o.error});return}else o.status==="retryable"?n({code:kt.FAILED,error:new hf("Export failed with retryable status")}):n({code:kt.FAILED,error:new hf("Export failed with unknown error")})},function(o){return n({code:kt.FAILED,error:o})}))},t.prototype.forceFlush=function(){return this.Ji.awaitAll()},t.prototype.shutdown=function(){return Wx(this,void 0,void 0,function(){return Ux(this,function(e){switch(e.label){case 0:return this.Di.debug("shutdown started"),[4,this.forceFlush()];case 1:return e.sent(),this.Er.shutdown(),[2]}})})},t})();function Mx(t,e){return new Px(t.transport,t.serializer,Xx(),t.promiseHandler,e.timeout)}function Ty(t,e,n){return Mx({transport:n,serializer:e,promiseHandler:Gx(t)},{timeout:t.timeoutMillis})}function Ey(t){var e=BigInt(1e9);return BigInt(t[0])*e+BigInt(t[1])}function Fx(t){var e=Number(BigInt.asUintN(32,t)),n=Number(BigInt.asUintN(32,t>>BigInt(32)));return{low:e,high:n}}function Ry(t){var e=Ey(t);return Fx(e)}function Ax(t){var e=Ey(t);return e.toString()}var Jx=typeof BigInt<"u"?Ax:Ve;function pf(t){return t}function Cy(t){if(t!==void 0)return Vc(t)}var Dx={encodeHrTime:Ry,encodeSpanContext:Vc,encodeOptionalSpanContext:Cy};function Zy(t){var e,n;if(t===void 0)return Dx;var r=(e=t.useLongBits)!==null&&e!==void 0?e:!0,i=(n=t.useHex)!==null&&n!==void 0?n:!1;return{encodeHrTime:r?Ry:Jx,encodeSpanContext:i?pf:Vc,encodeOptionalSpanContext:i?pf:Cy}}var Yx=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o};function ky(t){return{attributes:bn(t.attributes),droppedAttributesCount:0}}function Vy(t){return{name:t.name,version:t.version}}function bn(t){return Object.keys(t).map(function(e){return xy(e,t[e])})}function xy(t,e){return{key:t,value:Oy(e)}}function Oy(t){var e=typeof t;return e==="string"?{stringValue:t}:e==="number"?Number.isInteger(t)?{intValue:t}:{doubleValue:t}:e==="boolean"?{boolValue:t}:t instanceof Uint8Array?{bytesValue:t}:Array.isArray(t)?{arrayValue:{values:t.map(Oy)}}:e==="object"&&t!=null?{kvlistValue:{values:Object.entries(t).map(function(n){var r=Yx(n,2),i=r[0],o=r[1];return xy(i,o)})}}:{}}var le;(function(t){t[t.DELTA=0]="DELTA",t[t.CUMULATIVE=1]="CUMULATIVE"})(le||(le={}));var ve;(function(t){t[t.HISTOGRAM=0]="HISTOGRAM",t[t.EXPONENTIAL_HISTOGRAM=1]="EXPONENTIAL_HISTOGRAM",t[t.GAUGE=2]="GAUGE",t[t.SUM=3]="SUM"})(ve||(ve={}));var Kx=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),df=function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(u){try{l(r.next(u))}catch(h){s(h)}}function c(u){try{l(r.throw(u))}catch(h){s(h)}}function l(u){u.done?o(u.value):i(u.value).then(a,c)}l((r=r.apply(t,[])).next())})},ff=function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(u){l=[6,u],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},_x=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},Hx=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},zx=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};function Bx(t){return t!=null}function Ny(t){var e=Object.keys(t);return e.length===0?"":(e=e.sort(),JSON.stringify(e.map(function(n){return[n,t[n]]})))}function jx(t){var e,n;return t.name+":"+((e=t.version)!==null&&e!==void 0?e:"")+":"+((n=t.schemaUrl)!==null&&n!==void 0?n:"")}var Gy=(function(t){Kx(e,t);function e(n){var r=t.call(this,n)||this;return Object.setPrototypeOf(r,e.prototype),r}return e})(Error);function Yr(t,e){var n,r=new Promise(function(i,o){n=setTimeout(function(){o(new Gy("Operation timed out."))},e)});return Promise.race([t,r]).then(function(i){return clearTimeout(n),i},function(i){throw clearTimeout(n),i})}function Qx(t){return df(this,void 0,void 0,function(){var e=this;return ff(this,function(n){return[2,Promise.all(t.map(function(r){return df(e,void 0,void 0,function(){var i,o;return ff(this,function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),[4,r];case 1:return i=s.sent(),[2,{status:"fulfilled",value:i}];case 2:return o=s.sent(),[2,{status:"rejected",reason:o}];case 3:return[2]}})})}))]})})}function $x(t){return t.status==="rejected"}function mf(t,e){var n=[];return t.forEach(function(r){n.push.apply(n,Hx([],_x(e(r)),!1))}),n}function qx(t,e){var n,r;if(t.size!==e.size)return!1;try{for(var i=zx(t),o=i.next();!o.done;o=i.next()){var s=o.value;if(!e.has(s))return!1}}catch(a){n={error:a}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return!0}function tO(t,e){for(var n=0,r=t.length-1,i=t.length;r>=n;){var o=n+Math.trunc((r-n)/2);t[o]<e?n=o+1:(i=o,r=o-1)}return i}function eO(t,e){return t.toLowerCase()===e.toLowerCase()}var mn;(function(t){t[t.DROP=0]="DROP",t[t.SUM=1]="SUM",t[t.LAST_VALUE=2]="LAST_VALUE",t[t.HISTOGRAM=3]="HISTOGRAM",t[t.EXPONENTIAL_HISTOGRAM=4]="EXPONENTIAL_HISTOGRAM"})(mn||(mn={}));var nO=(function(){function t(){this.kind=mn.DROP}return t.prototype.createAccumulation=function(){},t.prototype.merge=function(e,n){},t.prototype.diff=function(e,n){},t.prototype.toMetricData=function(e,n,r,i){},t})(),K;(function(t){t.COUNTER="COUNTER",t.GAUGE="GAUGE",t.HISTOGRAM="HISTOGRAM",t.UP_DOWN_COUNTER="UP_DOWN_COUNTER",t.OBSERVABLE_COUNTER="OBSERVABLE_COUNTER",t.OBSERVABLE_GAUGE="OBSERVABLE_GAUGE",t.OBSERVABLE_UP_DOWN_COUNTER="OBSERVABLE_UP_DOWN_COUNTER"})(K||(K={}));function Me(t,e,n){var r,i,o,s;return sO(t)||X.warn('Invalid metric name: "'+t+'". The metric name should be a ASCII string with a length no greater than 255 characters.'),{name:t,type:e,description:(r=n==null?void 0:n.description)!==null&&r!==void 0?r:"",unit:(i=n==null?void 0:n.unit)!==null&&i!==void 0?i:"",valueType:(o=n==null?void 0:n.valueType)!==null&&o!==void 0?o:Ye.DOUBLE,advice:(s=n==null?void 0:n.advice)!==null&&s!==void 0?s:{}}}function rO(t,e){var n,r;return{name:(n=t.name)!==null&&n!==void 0?n:e.name,description:(r=t.description)!==null&&r!==void 0?r:e.description,type:e.type,unit:e.unit,valueType:e.valueType,advice:e.advice}}function iO(t,e){return eO(t.name,e.name)&&t.unit===e.unit&&t.type===e.type&&t.valueType===e.valueType}var oO=/^[a-z][a-z0-9_.\-/]{0,254}$/i;function sO(t){return t.match(oO)!=null}var aO=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o};function lO(t){var e=t.map(function(){return 0});return e.push(0),{buckets:{boundaries:t,counts:e},sum:0,count:0,hasMinMax:!1,min:1/0,max:-1/0}}var bl=(function(){function t(e,n,r,i){r===void 0&&(r=!0),i===void 0&&(i=lO(n)),this.startTime=e,this.Br=n,this.Et=r,this.re=i}return t.prototype.record=function(e){if(!Number.isNaN(e)){this.re.count+=1,this.re.sum+=e,this.Et&&(this.re.min=Math.min(e,this.re.min),this.re.max=Math.max(e,this.re.max),this.re.hasMinMax=!0);var n=tO(this.Br,e);this.re.buckets.counts[n]+=1}},t.prototype.setStartTime=function(e){this.startTime=e},t.prototype.toPointValue=function(){return this.re},t})(),Ly=(function(){function t(e,n){this.Br=e,this.Et=n,this.kind=mn.HISTOGRAM}return t.prototype.createAccumulation=function(e){return new bl(e,this.Br,this.Et)},t.prototype.merge=function(e,n){for(var r=e.toPointValue(),i=n.toPointValue(),o=r.buckets.counts,s=i.buckets.counts,a=new Array(o.length),c=0;c<o.length;c++)a[c]=o[c]+s[c];var l=1/0,u=-1/0;return this.Et&&(r.hasMinMax&&i.hasMinMax?(l=Math.min(r.min,i.min),u=Math.max(r.max,i.max)):r.hasMinMax?(l=r.min,u=r.max):i.hasMinMax&&(l=i.min,u=i.max)),new bl(e.startTime,r.buckets.boundaries,this.Et,{buckets:{boundaries:r.buckets.boundaries,counts:a},count:r.count+i.count,sum:r.sum+i.sum,hasMinMax:this.Et&&(r.hasMinMax||i.hasMinMax),min:l,max:u})},t.prototype.diff=function(e,n){for(var r=e.toPointValue(),i=n.toPointValue(),o=r.buckets.counts,s=i.buckets.counts,a=new Array(o.length),c=0;c<o.length;c++)a[c]=s[c]-o[c];return new bl(n.startTime,r.buckets.boundaries,this.Et,{buckets:{boundaries:r.buckets.boundaries,counts:a},count:i.count-r.count,sum:i.sum-r.sum,hasMinMax:!1,min:1/0,max:-1/0})},t.prototype.toMetricData=function(e,n,r,i){return{descriptor:e,aggregationTemporality:n,dataPointType:ve.HISTOGRAM,dataPoints:r.map(function(o){var s=aO(o,2),a=s[0],c=s[1],l=c.toPointValue(),u=e.type===K.GAUGE||e.type===K.UP_DOWN_COUNTER||e.type===K.OBSERVABLE_GAUGE||e.type===K.OBSERVABLE_UP_DOWN_COUNTER;return{attributes:a,startTime:c.startTime,endTime:i,value:{min:l.hasMinMax?l.min:void 0,max:l.hasMinMax?l.max:void 0,sum:u?void 0:l.sum,buckets:l.buckets,count:l.count}}})}},t})(),vl=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},wl=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},yf=(function(){function t(e,n,r,i){e===void 0&&(e=new cO),n===void 0&&(n=0),r===void 0&&(r=0),i===void 0&&(i=0),this.backing=e,this.indexBase=n,this.indexStart=r,this.indexEnd=i}return Object.defineProperty(t.prototype,"offset",{get:function(){return this.indexStart},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"length",{get:function(){return this.backing.length===0||this.indexEnd===this.indexStart&&this.at(0)===0?0:this.indexEnd-this.indexStart+1},enumerable:!1,configurable:!0}),t.prototype.counts=function(){var e=this;return Array.from({length:this.length},function(n,r){return e.at(r)})},t.prototype.at=function(e){var n=this.indexBase-this.indexStart;return e<n&&(e+=this.backing.length),e-=n,this.backing.countAt(e)},t.prototype.incrementBucket=function(e,n){this.backing.increment(e,n)},t.prototype.decrementBucket=function(e,n){this.backing.decrement(e,n)},t.prototype.trim=function(){for(var e=0;e<this.length;e++)if(this.at(e)!==0){this.indexStart+=e;break}else if(e===this.length-1){this.indexStart=this.indexEnd=this.indexBase=0;return}for(var e=this.length-1;e>=0;e--)if(this.at(e)!==0){this.indexEnd-=this.length-e-1;break}this.Mo()},t.prototype.downscale=function(e){this.Mo();for(var n=1+this.indexEnd-this.indexStart,r=1<<e,i=0,o=0,s=this.indexStart;s<=this.indexEnd;){var a=s%r;a<0&&(a+=r);for(var c=a;c<r&&i<n;c++)this.ya(o,i),i++,s++;o++}this.indexStart>>=e,this.indexEnd>>=e,this.indexBase=this.indexStart},t.prototype.clone=function(){return new t(this.backing.clone(),this.indexBase,this.indexStart,this.indexEnd)},t.prototype.Mo=function(){var e=this.indexBase-this.indexStart;e!==0&&(e>0?(this.backing.reverse(0,this.backing.length),this.backing.reverse(0,e),this.backing.reverse(e,this.backing.length)):(this.backing.reverse(0,this.backing.length),this.backing.reverse(0,this.backing.length+e)),this.indexBase=this.indexStart)},t.prototype.ya=function(e,n){e!==n&&this.incrementBucket(e,this.backing.emptyBucket(n))},t})(),cO=(function(){function t(e){e===void 0&&(e=[0]),this.wt=e}return Object.defineProperty(t.prototype,"length",{get:function(){return this.wt.length},enumerable:!1,configurable:!0}),t.prototype.countAt=function(e){return this.wt[e]},t.prototype.growTo=function(e,n,r){var i=new Array(e).fill(0);i.splice.apply(i,wl([r,this.wt.length-n],vl(this.wt.slice(n)),!1)),i.splice.apply(i,wl([0,n],vl(this.wt.slice(0,n)),!1)),this.wt=i},t.prototype.reverse=function(e,n){for(var r=Math.floor((e+n)/2)-e,i=0;i<r;i++){var o=this.wt[e+i];this.wt[e+i]=this.wt[n-i-1],this.wt[n-i-1]=o}},t.prototype.emptyBucket=function(e){var n=this.wt[e];return this.wt[e]=0,n},t.prototype.increment=function(e,n){this.wt[e]+=n},t.prototype.decrement=function(e,n){this.wt[e]>=n?this.wt[e]-=n:this.wt[e]=0},t.prototype.clone=function(){return new t(wl([],vl(this.wt),!1))},t})(),uO=52,hO=2146435072,pO=1048575,Xy=1023,Wy=-1022,Uy=Xy,ec=Math.pow(2,-1022);function Py(t){var e=new DataView(new ArrayBuffer(8));e.setFloat64(0,t);var n=e.getUint32(0),r=(n&hO)>>20;return r-Xy}function My(t){var e=new DataView(new ArrayBuffer(8));e.setFloat64(0,t);var n=e.getUint32(0),r=e.getUint32(4),i=(n&pO)*Math.pow(2,32);return i+r}function nc(t,e){return t===0||t===Number.POSITIVE_INFINITY||t===Number.NEGATIVE_INFINITY||Number.isNaN(t)?t:t*Math.pow(2,e)}function dO(t){return t--,t|=t>>1,t|=t>>2,t|=t>>4,t|=t>>8,t|=t>>16,t++,t}var fO=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),Kr=(function(t){fO(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e})(Error),mO=(function(){function t(e){this.hr=-e}return t.prototype.mapToIndex=function(e){if(e<ec)return this.jr();var n=Py(e),r=this.ga(My(e)-1,uO);return n+r>>this.hr},t.prototype.lowerBoundary=function(e){var n=this.jr();if(e<n)throw new Kr("underflow: "+e+" is < minimum lower boundary: "+n);var r=this.di();if(e>r)throw new Kr("overflow: "+e+" is > maximum lower boundary: "+r);return nc(1,e<<this.hr)},Object.defineProperty(t.prototype,"scale",{get:function(){return this.hr===0?0:-this.hr},enumerable:!1,configurable:!0}),t.prototype.jr=function(){var e=Wy>>this.hr;return this.hr<2&&e--,e},t.prototype.di=function(){return Uy>>this.hr},t.prototype.ga=function(e,n){return Math.floor(e*Math.pow(2,-n))},t})(),yO=(function(){function t(e){this.Rr=e,this.Yi=nc(Math.LOG2E,e),this.ba=nc(Math.LN2,-e)}return t.prototype.mapToIndex=function(e){if(e<=ec)return this.jr()-1;if(My(e)===0){var n=Py(e);return(n<<this.Rr)-1}var r=Math.floor(Math.log(e)*this.Yi),i=this.di();return r>=i?i:r},t.prototype.lowerBoundary=function(e){var n=this.di();if(e>=n){if(e===n)return 2*Math.exp((e-(1<<this.Rr))/this.Yi);throw new Kr("overflow: "+e+" is > maximum lower boundary: "+n)}var r=this.jr();if(e<=r){if(e===r)return ec;if(e===r-1)return Math.exp((e+(1<<this.Rr))/this.Yi)/2;throw new Kr("overflow: "+e+" is < minimum lower boundary: "+r)}return Math.exp(e*this.ba)},Object.defineProperty(t.prototype,"scale",{get:function(){return this.Rr},enumerable:!1,configurable:!0}),t.prototype.jr=function(){return Wy<<this.Rr},t.prototype.di=function(){return(Uy+1<<this.Rr)-1},t})(),gf=-10,bf=20,gO=Array.from({length:31},function(t,e){return e>10?new yO(e-10):new mO(e-10)});function vf(t){if(t>bf||t<gf)throw new Kr("expected scale >= "+gf+" && <= "+bf+", got: "+t);return gO[t+10]}var bO=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},io=(function(){function t(e,n){this.low=e,this.high=n}return t.combine=function(e,n){return new t(Math.min(e.low,n.low),Math.max(e.high,n.high))},t})(),vO=20,wO=160,Sl=2,SO=(function(){function t(e,n,r,i,o,s,a,c,l,u,h){e===void 0&&(e=e),n===void 0&&(n=wO),r===void 0&&(r=!0),i===void 0&&(i=0),o===void 0&&(o=0),s===void 0&&(s=0),a===void 0&&(a=Number.POSITIVE_INFINITY),c===void 0&&(c=Number.NEGATIVE_INFINITY),l===void 0&&(l=new yf),u===void 0&&(u=new yf),h===void 0&&(h=vf(vO)),this.startTime=e,this.Ze=n,this.Et=r,this.Qr=i,this.pr=o,this.Cr=s,this.dr=a,this.fr=c,this.Ki=l,this._i=u,this.Zr=h,this.Ze<Sl&&(X.warn("Exponential Histogram Max Size set to "+this.Ze+", changing to the minimum size of: "+Sl),this.Ze=Sl)}return t.prototype.record=function(e){this.updateByIncrement(e,1)},t.prototype.setStartTime=function(e){this.startTime=e},t.prototype.toPointValue=function(){return{hasMinMax:this.Et,min:this.min,max:this.max,sum:this.sum,positive:{offset:this.positive.offset,bucketCounts:this.positive.counts()},negative:{offset:this.negative.offset,bucketCounts:this.negative.counts()},count:this.count,scale:this.scale,zeroCount:this.zeroCount}},Object.defineProperty(t.prototype,"sum",{get:function(){return this.Qr},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"min",{get:function(){return this.dr},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"max",{get:function(){return this.fr},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"count",{get:function(){return this.pr},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"zeroCount",{get:function(){return this.Cr},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"scale",{get:function(){return this.pr===this.Cr?0:this.Zr.scale},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"positive",{get:function(){return this.Ki},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"negative",{get:function(){return this._i},enumerable:!1,configurable:!0}),t.prototype.updateByIncrement=function(e,n){if(!Number.isNaN(e)){if(e>this.fr&&(this.fr=e),e<this.dr&&(this.dr=e),this.pr+=n,e===0){this.Cr+=n;return}this.Qr+=e*n,e>0?this.Fo(this.Ki,e,n):this.Fo(this._i,-e,n)}},t.prototype.merge=function(e){this.pr===0?(this.dr=e.min,this.fr=e.max):e.count!==0&&(e.min<this.min&&(this.dr=e.min),e.max>this.max&&(this.fr=e.max)),this.startTime=e.startTime,this.Qr+=e.sum,this.pr+=e.count,this.Cr+=e.zeroCount;var n=this.Ao(e);this.Hi(this.scale-n),this.Jo(this.positive,e,e.positive,n),this.Jo(this.negative,e,e.negative,n)},t.prototype.diff=function(e){this.dr=1/0,this.fr=-1/0,this.Qr-=e.sum,this.pr-=e.count,this.Cr-=e.zeroCount;var n=this.Ao(e);this.Hi(this.scale-n),this.Do(this.positive,e,e.positive,n),this.Do(this.negative,e,e.negative,n)},t.prototype.clone=function(){return new t(this.startTime,this.Ze,this.Et,this.Qr,this.pr,this.Cr,this.dr,this.fr,this.positive.clone(),this.negative.clone(),this.Zr)},t.prototype.Fo=function(e,n,r){var i=this.Zr.mapToIndex(n),o=!1,s=0,a=0;if(e.length===0?(e.indexStart=i,e.indexEnd=e.indexStart,e.indexBase=e.indexStart):i<e.indexStart&&e.indexEnd-i>=this.Ze?(o=!0,a=i,s=e.indexEnd):i>e.indexEnd&&i-e.indexStart>=this.Ze&&(o=!0,a=e.indexStart,s=i),o){var c=this.zi(s,a);this.Hi(c),i=this.Zr.mapToIndex(n)}this.Yo(e,i,r)},t.prototype.Yo=function(e,n,r){if(r!==0){if(e.length===0&&(e.indexStart=e.indexEnd=e.indexBase=n),n<e.indexStart){var i=e.indexEnd-n;i>=e.backing.length&&this.Ko(e,i+1),e.indexStart=n}else if(n>e.indexEnd){var i=n-e.indexStart;i>=e.backing.length&&this.Ko(e,i+1),e.indexEnd=n}var o=n-e.indexBase;o<0&&(o+=e.backing.length),e.incrementBucket(o,r)}},t.prototype.Ko=function(e,n){var r=e.backing.length,i=e.indexBase-e.indexStart,o=r-i,s=dO(n);s>this.Ze&&(s=this.Ze);var a=s-i;e.backing.growTo(s,o,a)},t.prototype.zi=function(e,n){for(var r=0;e-n>=this.Ze;)e>>=1,n>>=1,r++;return r},t.prototype.Hi=function(e){if(e!==0){if(e<0)throw new Error("impossible change of scale: "+this.scale);var n=this.Zr.scale-e;this.Ki.downscale(e),this._i.downscale(e),this.Zr=vf(n)}},t.prototype.Ao=function(e){var n=Math.min(this.scale,e.scale),r=io.combine(this.fi(this.positive,this.scale,n),this.fi(e.positive,e.scale,n)),i=io.combine(this.fi(this.negative,this.scale,n),this.fi(e.negative,e.scale,n));return Math.min(n-this.zi(r.high,r.low),n-this.zi(i.high,i.low))},t.prototype.fi=function(e,n,r){if(e.length===0)return new io(0,-1);var i=n-r;return new io(e.indexStart>>i,e.indexEnd>>i)},t.prototype.Jo=function(e,n,r,i){for(var o=r.offset,s=n.scale-i,a=0;a<r.length;a++)this.Yo(e,o+a>>s,r.at(a))},t.prototype.Do=function(e,n,r,i){for(var o=r.offset,s=n.scale-i,a=0;a<r.length;a++){var c=o+a>>s,l=c-e.indexBase;l<0&&(l+=e.backing.length),e.decrementBucket(l,r.at(a))}e.trim()},t})(),IO=(function(){function t(e,n){this.Ze=e,this.Et=n,this.kind=mn.EXPONENTIAL_HISTOGRAM}return t.prototype.createAccumulation=function(e){return new SO(e,this.Ze,this.Et)},t.prototype.merge=function(e,n){var r=n.clone();return r.merge(e),r},t.prototype.diff=function(e,n){var r=n.clone();return r.diff(e),r},t.prototype.toMetricData=function(e,n,r,i){return{descriptor:e,aggregationTemporality:n,dataPointType:ve.EXPONENTIAL_HISTOGRAM,dataPoints:r.map(function(o){var s=bO(o,2),a=s[0],c=s[1],l=c.toPointValue(),u=e.type===K.GAUGE||e.type===K.UP_DOWN_COUNTER||e.type===K.OBSERVABLE_GAUGE||e.type===K.OBSERVABLE_UP_DOWN_COUNTER;return{attributes:a,startTime:c.startTime,endTime:i,value:{min:l.hasMinMax?l.min:void 0,max:l.hasMinMax?l.max:void 0,sum:u?void 0:l.sum,positive:{offset:l.positive.offset,bucketCounts:l.positive.bucketCounts},negative:{offset:l.negative.offset,bucketCounts:l.negative.bucketCounts},count:l.count,scale:l.scale,zeroCount:l.zeroCount}}})}},t})(),TO=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},Il=(function(){function t(e,n,r){n===void 0&&(n=0),r===void 0&&(r=[0,0]),this.startTime=e,this.re=n,this.sampleTime=r}return t.prototype.record=function(e){this.re=e,this.sampleTime=qt(Date.now())},t.prototype.setStartTime=function(e){this.startTime=e},t.prototype.toPointValue=function(){return this.re},t})(),EO=(function(){function t(){this.kind=mn.LAST_VALUE}return t.prototype.createAccumulation=function(e){return new Il(e)},t.prototype.merge=function(e,n){var r=$i(n.sampleTime)>=$i(e.sampleTime)?n:e;return new Il(e.startTime,r.toPointValue(),r.sampleTime)},t.prototype.diff=function(e,n){var r=$i(n.sampleTime)>=$i(e.sampleTime)?n:e;return new Il(n.startTime,r.toPointValue(),r.sampleTime)},t.prototype.toMetricData=function(e,n,r,i){return{descriptor:e,aggregationTemporality:n,dataPointType:ve.GAUGE,dataPoints:r.map(function(o){var s=TO(o,2),a=s[0],c=s[1];return{attributes:a,startTime:c.startTime,endTime:i,value:c.toPointValue()}})}},t})(),RO=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},Vr=(function(){function t(e,n,r,i){r===void 0&&(r=0),i===void 0&&(i=!1),this.startTime=e,this.monotonic=n,this.re=r,this.reset=i}return t.prototype.record=function(e){this.monotonic&&e<0||(this.re+=e)},t.prototype.setStartTime=function(e){this.startTime=e},t.prototype.toPointValue=function(){return this.re},t})(),wf=(function(){function t(e){this.monotonic=e,this.kind=mn.SUM}return t.prototype.createAccumulation=function(e){return new Vr(e,this.monotonic)},t.prototype.merge=function(e,n){var r=e.toPointValue(),i=n.toPointValue();return n.reset?new Vr(n.startTime,this.monotonic,i,n.reset):new Vr(e.startTime,this.monotonic,r+i)},t.prototype.diff=function(e,n){var r=e.toPointValue(),i=n.toPointValue();return this.monotonic&&r>i?new Vr(n.startTime,this.monotonic,i,!0):new Vr(n.startTime,this.monotonic,i-r)},t.prototype.toMetricData=function(e,n,r,i){return{descriptor:e,aggregationTemporality:n,dataPointType:ve.SUM,dataPoints:r.map(function(o){var s=RO(o,2),a=s[0],c=s[1];return{attributes:a,startTime:c.startTime,endTime:i,value:c.toPointValue()}}),isMonotonic:this.monotonic}},t})(),vn=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),Ne=(function(){function t(){}return t.Drop=function(){return Fy},t.Sum=function(){return Ay},t.LastValue=function(){return Jy},t.Histogram=function(){return Dy},t.ExponentialHistogram=function(){return GO},t.Default=function(){return LO},t})(),CO=(function(t){vn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.createAggregator=function(n){return e.DEFAULT_INSTANCE},e.DEFAULT_INSTANCE=new nO,e})(Ne),ZO=(function(t){vn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.createAggregator=function(n){switch(n.type){case K.COUNTER:case K.OBSERVABLE_COUNTER:case K.HISTOGRAM:return e.MONOTONIC_INSTANCE;default:return e.NON_MONOTONIC_INSTANCE}},e.MONOTONIC_INSTANCE=new wf(!0),e.NON_MONOTONIC_INSTANCE=new wf(!1),e})(Ne),kO=(function(t){vn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.createAggregator=function(n){return e.DEFAULT_INSTANCE},e.DEFAULT_INSTANCE=new EO,e})(Ne),VO=(function(t){vn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.createAggregator=function(n){return e.DEFAULT_INSTANCE},e.DEFAULT_INSTANCE=new Ly([0,5,10,25,50,75,100,250,500,750,1e3,2500,5e3,7500,1e4],!0),e})(Ne),xO=(function(t){vn(e,t);function e(n,r){r===void 0&&(r=!0);var i=t.call(this)||this;if(i.Et=r,n==null)throw new Error("ExplicitBucketHistogramAggregation should be created with explicit boundaries, if a single bucket histogram is required, please pass an empty array");n=n.concat(),n=n.sort(function(a,c){return a-c});var o=n.lastIndexOf(-1/0),s=n.indexOf(1/0);return s===-1&&(s=void 0),i.Br=n.slice(o+1,s),i}return e.prototype.createAggregator=function(n){return new Ly(this.Br,this.Et)},e})(Ne),OO=(function(t){vn(e,t);function e(n,r){n===void 0&&(n=160),r===void 0&&(r=!0);var i=t.call(this)||this;return i.Ze=n,i.Et=r,i}return e.prototype.createAggregator=function(n){return new IO(this.Ze,this.Et)},e})(Ne),NO=(function(t){vn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.Zi=function(n){switch(n.type){case K.COUNTER:case K.UP_DOWN_COUNTER:case K.OBSERVABLE_COUNTER:case K.OBSERVABLE_UP_DOWN_COUNTER:return Ay;case K.GAUGE:case K.OBSERVABLE_GAUGE:return Jy;case K.HISTOGRAM:return n.advice.explicitBucketBoundaries?new xO(n.advice.explicitBucketBoundaries):Dy}return X.warn("Unable to recognize instrument type: "+n.type),Fy},e.prototype.createAggregator=function(n){return this.Zi(n).createAggregator(n)},e})(Ne),Fy=new CO,Ay=new ZO,Jy=new kO,Dy=new VO,GO=new OO,LO=new NO,XO=function(t){return Ne.Default()},WO=function(t){return le.CUMULATIVE},Tl=function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(u){try{l(r.next(u))}catch(h){s(h)}}function c(u){try{l(r.throw(u))}catch(h){s(h)}}function l(u){u.done?o(u.value):i(u.value).then(a,c)}l((r=r.apply(t,[])).next())})},El=function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(u){l=[6,u],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},Sf=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},UO=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},PO=(function(){function t(e){var n,r,i;this._e=!1,this.Bi=(n=e==null?void 0:e.aggregationSelector)!==null&&n!==void 0?n:XO,this.ji=(r=e==null?void 0:e.aggregationTemporalitySelector)!==null&&r!==void 0?r:WO,this.va=(i=e==null?void 0:e.metricProducers)!==null&&i!==void 0?i:[],this._o=e==null?void 0:e.cardinalitySelector}return t.prototype.setMetricProducer=function(e){if(this.Qi)throw new Error("MetricReader can not be bound to a MeterProvider again.");this.Qi=e,this.onInitialized()},t.prototype.selectAggregation=function(e){return this.Bi(e)},t.prototype.selectAggregationTemporality=function(e){return this.ji(e)},t.prototype.selectCardinalityLimit=function(e){return this._o?this._o(e):2e3},t.prototype.onInitialized=function(){},t.prototype.collect=function(e){return Tl(this,void 0,void 0,function(){var n,r,i,o,s,a;return El(this,function(c){switch(c.label){case 0:if(this.Qi===void 0)throw new Error("MetricReader is not bound to a MetricProducer");if(this._e)throw new Error("MetricReader is shutdown");return[4,Promise.all(UO([this.Qi.collect({timeoutMillis:e==null?void 0:e.timeoutMillis})],Sf(this.va.map(function(l){return l.collect({timeoutMillis:e==null?void 0:e.timeoutMillis})})),!1))];case 1:return n=Sf.apply(void 0,[c.sent()]),r=n[0],i=n.slice(1),o=r.errors.concat(mf(i,function(l){return l.errors})),s=r.resourceMetrics.resource,a=r.resourceMetrics.scopeMetrics.concat(mf(i,function(l){return l.resourceMetrics.scopeMetrics})),[2,{resourceMetrics:{resource:s,scopeMetrics:a},errors:o}]}})})},t.prototype.shutdown=function(e){return Tl(this,void 0,void 0,function(){return El(this,function(n){switch(n.label){case 0:return this._e?(X.error("Cannot call shutdown twice."),[2]):(e==null?void 0:e.timeoutMillis)!=null?[3,2]:[4,this.onShutdown()];case 1:return n.sent(),[3,4];case 2:return[4,Yr(this.onShutdown(),e.timeoutMillis)];case 3:n.sent(),n.label=4;case 4:return this._e=!0,[2]}})})},t.prototype.forceFlush=function(e){return Tl(this,void 0,void 0,function(){return El(this,function(n){switch(n.label){case 0:return this._e?(X.warn("Cannot forceFlush on already shutdown MetricReader."),[2]):(e==null?void 0:e.timeoutMillis)!=null?[3,2]:[4,this.onForceFlush()];case 1:return n.sent(),[2];case 2:return[4,Yr(this.onForceFlush(),e.timeoutMillis)];case 3:return n.sent(),[2]}})})},t})(),MO=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),oo=function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(u){try{l(r.next(u))}catch(h){s(h)}}function c(u){try{l(r.throw(u))}catch(h){s(h)}}function l(u){u.done?o(u.value):i(u.value).then(a,c)}l((r=r.apply(t,[])).next())})},so=function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(u){l=[6,u],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},FO=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},AO=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},JO=(function(t){MO(e,t);function e(n){var r,i,o,s,a=t.call(this,{aggregationSelector:(r=n.exporter.selectAggregation)===null||r===void 0?void 0:r.bind(n.exporter),aggregationTemporalitySelector:(i=n.exporter.selectAggregationTemporality)===null||i===void 0?void 0:i.bind(n.exporter),metricProducers:n.metricProducers})||this;if(n.exportIntervalMillis!==void 0&&n.exportIntervalMillis<=0)throw Error("exportIntervalMillis must be greater than 0");if(n.exportTimeoutMillis!==void 0&&n.exportTimeoutMillis<=0)throw Error("exportTimeoutMillis must be greater than 0");if(n.exportTimeoutMillis!==void 0&&n.exportIntervalMillis!==void 0&&n.exportIntervalMillis<n.exportTimeoutMillis)throw Error("exportIntervalMillis must be greater than or equal to exportTimeoutMillis");return a.wa=(o=n.exportIntervalMillis)!==null&&o!==void 0?o:6e4,a.$i=(s=n.exportTimeoutMillis)!==null&&s!==void 0?s:3e4,a.vr=n.exporter,a}return e.prototype.Ho=function(){return oo(this,void 0,void 0,function(){var n;return so(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,Yr(this.Sa(),this.$i)];case 1:return r.sent(),[3,3];case 2:return n=r.sent(),n instanceof Gy?(X.error("Export took longer than %s milliseconds and timed out.",this.$i),[2]):(Ke(n),[3,3]);case 3:return[2]}})})},e.prototype.Sa=function(){var n,r;return oo(this,void 0,void 0,function(){var i,o,s,a,c,l;return so(this,function(u){switch(u.label){case 0:return[4,this.collect({timeoutMillis:this.$i})];case 1:if(i=u.sent(),o=i.resourceMetrics,s=i.errors,s.length>0&&(l=X).error.apply(l,AO(["PeriodicExportingMetricReader: metrics collection errors"],FO(s),!1)),!o.resource.asyncAttributesPending)return[3,5];u.label=2;case 2:return u.trys.push([2,4,,5]),[4,(r=(n=o.resource).waitForAsyncAttributes)===null||r===void 0?void 0:r.call(n)];case 3:return u.sent(),[3,5];case 4:return a=u.sent(),X.debug("Error while resolving async portion of resource: ",a),Ke(a),[3,5];case 5:return o.scopeMetrics.length===0?[2]:[4,Rk.Gs(this.vr,o)];case 6:if(c=u.sent(),c.code!==kt.SUCCESS)throw new Error("PeriodicExportingMetricReader: metrics export failed (error "+c.error+")");return[2]}})})},e.prototype.onInitialized=function(){var n=this;this.zo=setInterval(function(){n.Ho()},this.wa)},e.prototype.onForceFlush=function(){return oo(this,void 0,void 0,function(){return so(this,function(n){switch(n.label){case 0:return[4,this.Ho()];case 1:return n.sent(),[4,this.vr.forceFlush()];case 2:return n.sent(),[2]}})})},e.prototype.onShutdown=function(){return oo(this,void 0,void 0,function(){return so(this,function(n){switch(n.label){case 0:return this.zo&&clearInterval(this.zo),[4,this.onForceFlush()];case 1:return n.sent(),[4,this.vr.shutdown()];case 2:return n.sent(),[2]}})})},e})(PO),DO=(function(){function t(){this.Bo=[]}return t.prototype.addView=function(e){this.Bo.push(e)},t.prototype.findViews=function(e,n){var r=this,i=this.Bo.filter(function(o){return r.Ia(o.instrumentSelector,e)&&r.Ta(o.meterSelector,n)});return i},t.prototype.Ia=function(e,n){return(e.getType()===void 0||n.type===e.getType())&&e.getNameFilter().match(n.name)&&e.getUnitFilter().match(n.unit)},t.prototype.Ta=function(e,n){return e.getNameFilter().match(n.name)&&(n.version===void 0||e.getVersionFilter().match(n.version))&&(n.schemaUrl===void 0||e.getSchemaUrlFilter().match(n.schemaUrl))},t})(),wn=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),Qo=(function(){function t(e,n){this.Ea=e,this.qe=n}return t.prototype.mi=function(e,n,r){if(n===void 0&&(n={}),r===void 0&&(r=tt.active()),typeof e!="number"){X.warn("non-number value provided to metric "+this.qe.name+": "+e);return}this.qe.valueType===Ye.INT&&!Number.isInteger(e)&&(X.warn("INT value type cannot accept a floating-point value for "+this.qe.name+", ignoring the fractional digits."),e=Math.trunc(e),!Number.isInteger(e))||this.Ea.record(e,n,r,qt(Date.now()))},t})(),YO=(function(t){wn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.add=function(n,r,i){this.mi(n,r,i)},e})(Qo),KO=(function(t){wn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.add=function(n,r,i){if(n<0){X.warn("negative value provided to counter "+this.qe.name+": "+n);return}this.mi(n,r,i)},e})(Qo),_O=(function(t){wn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.record=function(n,r,i){this.mi(n,r,i)},e})(Qo),HO=(function(t){wn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.record=function(n,r,i){if(n<0){X.warn("negative value provided to histogram "+this.qe.name+": "+n);return}this.mi(n,r,i)},e})(Qo),$o=(function(){function t(e,n,r){this.jo=r,this.qe=e,this.Qo=n}return t.prototype.addCallback=function(e){this.jo.addCallback(e,this)},t.prototype.removeCallback=function(e){this.jo.removeCallback(e,this)},t})(),zO=(function(t){wn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e})($o),BO=(function(t){wn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e})($o),jO=(function(t){wn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e})($o);function rc(t){return t instanceof $o}var QO=(function(){function t(e){this.Je=e}return t.prototype.createGauge=function(e,n){var r=Me(e,K.GAUGE,n),i=this.Je.registerMetricStorage(r);return new _O(i,r)},t.prototype.createHistogram=function(e,n){var r=Me(e,K.HISTOGRAM,n),i=this.Je.registerMetricStorage(r);return new HO(i,r)},t.prototype.createCounter=function(e,n){var r=Me(e,K.COUNTER,n),i=this.Je.registerMetricStorage(r);return new KO(i,r)},t.prototype.createUpDownCounter=function(e,n){var r=Me(e,K.UP_DOWN_COUNTER,n),i=this.Je.registerMetricStorage(r);return new YO(i,r)},t.prototype.createObservableGauge=function(e,n){var r=Me(e,K.OBSERVABLE_GAUGE,n),i=this.Je.registerAsyncMetricStorage(r);return new BO(r,i,this.Je.observableRegistry)},t.prototype.createObservableCounter=function(e,n){var r=Me(e,K.OBSERVABLE_COUNTER,n),i=this.Je.registerAsyncMetricStorage(r);return new zO(r,i,this.Je.observableRegistry)},t.prototype.createObservableUpDownCounter=function(e,n){var r=Me(e,K.OBSERVABLE_UP_DOWN_COUNTER,n),i=this.Je.registerAsyncMetricStorage(r);return new jO(r,i,this.Je.observableRegistry)},t.prototype.addBatchObservableCallback=function(e,n){this.Je.observableRegistry.addBatchCallback(e,n)},t.prototype.removeBatchObservableCallback=function(e,n){this.Je.observableRegistry.removeBatchCallback(e,n)},t})(),Yy=(function(){function t(e){this.Yn=e}return t.prototype.getInstrumentDescriptor=function(){return this.Yn},t.prototype.updateDescription=function(e){this.Yn=Me(this.Yn.name,this.Yn.type,{description:e,valueType:this.Yn.valueType,unit:this.Yn.unit,advice:this.Yn.advice})},t})(),$O=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),If=function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(u){l=[6,u],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},qO=(function(){function t(e){this.yi=e,this.ir=new Map,this.kr=new Map}return t.prototype.get=function(e,n){return n!=null||(n=this.yi(e)),this.ir.get(n)},t.prototype.getOrDefault=function(e,n){var r=this.yi(e);if(this.ir.has(r))return this.ir.get(r);var i=n();return this.kr.has(r)||this.kr.set(r,e),this.ir.set(r,i),i},t.prototype.set=function(e,n,r){r!=null||(r=this.yi(e)),this.kr.has(r)||this.kr.set(r,e),this.ir.set(r,n)},t.prototype.has=function(e,n){return n!=null||(n=this.yi(e)),this.ir.has(n)},t.prototype.keys=function(){var e,n;return If(this,function(r){switch(r.label){case 0:e=this.kr.entries(),n=e.next(),r.label=1;case 1:return n.done===!0?[3,3]:[4,[n.value[1],n.value[0]]];case 2:return r.sent(),n=e.next(),[3,1];case 3:return[2]}})},t.prototype.entries=function(){var e,n;return If(this,function(r){switch(r.label){case 0:e=this.ir.entries(),n=e.next(),r.label=1;case 1:return n.done===!0?[3,3]:[4,[this.kr.get(n.value[0]),n.value[1],n.value[0]]];case 2:return r.sent(),n=e.next(),[3,1];case 3:return[2]}})},Object.defineProperty(t.prototype,"size",{get:function(){return this.ir.size},enumerable:!1,configurable:!0}),t})(),hn=(function(t){$O(e,t);function e(){return t.call(this,Ny)||this}return e})(qO),tN=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},Ky=(function(){function t(e,n){this.Wn=e,this.Kn=new hn,this.Vr=new hn,this.qi={"otel.metric.overflow":!0},this.$o=(n!=null?n:2e3)-1,this.Ra=Ny(this.qi)}return t.prototype.record=function(e,n,r,i){var o=this,s=this.Kn.get(n);if(!s){if(this.Kn.size>=this.$o){var a=this.Kn.getOrDefault(this.qi,function(){return o.Wn.createAccumulation(i)});a==null||a.record(e);return}s=this.Wn.createAccumulation(i),this.Kn.set(n,s)}s==null||s.record(e)},t.prototype.batchCumulate=function(e,n){var r=this;Array.from(e.entries()).forEach(function(i){var o=tN(i,3),s=o[0],a=o[1],c=o[2],l=r.Wn.createAccumulation(n);l==null||l.record(a);var u=l;if(r.Vr.has(s,c)){var h=r.Vr.get(s,c);u=r.Wn.diff(h,l)}else if(r.Vr.size>=r.$o&&(s=r.qi,c=r.Ra,r.Vr.has(s,c))){var h=r.Vr.get(s,c);u=r.Wn.diff(h,l)}if(r.Kn.has(s,c)){var p=r.Kn.get(s,c);u=r.Wn.merge(p,u)}r.Vr.set(s,l,c),r.Kn.set(s,u,c)})},t.prototype.collect=function(){var e=this.Kn;return this.Kn=new hn,e},t})(),Rl=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Tf=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},_y=(function(){function t(e,n){var r=this;this.Wn=e,this.xr=new Map,this.eo=new Map,n.forEach(function(i){r.xr.set(i,[])})}return t.prototype.buildMetrics=function(e,n,r,i){this.Ca(r);var o=this.Za(e),s=o,a;if(this.eo.has(e)){var c=this.eo.get(e),l=c.collectionTime;a=c.aggregationTemporality,a===le.CUMULATIVE?s=t.merge(c.accumulations,o,this.Wn):s=t.calibrateStartTime(c.accumulations,o,l)}else a=e.selectAggregationTemporality(n.type);this.eo.set(e,{accumulations:s,collectionTime:i,aggregationTemporality:a});var u=eN(s);if(u.length!==0)return this.Wn.toMetricData(n,a,u,i)},t.prototype.Ca=function(e){var n,r,i=this.xr.keys();try{for(var o=Rl(i),s=o.next();!s.done;s=o.next()){var a=s.value,c=this.xr.get(a);c===void 0&&(c=[],this.xr.set(a,c)),c.push(e)}}catch(l){n={error:l}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}},t.prototype.Za=function(e){var n,r,i=new hn,o=this.xr.get(e);if(this.xr.set(e,[]),o===void 0)return i;try{for(var s=Rl(o),a=s.next();!a.done;a=s.next()){var c=a.value;i=t.merge(i,c,this.Wn)}}catch(l){n={error:l}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return i},t.merge=function(e,n,r){for(var i=e,o=n.entries(),s=o.next();s.done!==!0;){var a=Tf(s.value,3),c=a[0],l=a[1],u=a[2];if(e.has(c,u)){var h=e.get(c,u),p=r.merge(h,l);i.set(c,p,u)}else i.set(c,l,u);s=o.next()}return i},t.calibrateStartTime=function(e,n,r){var i,o;try{for(var s=Rl(e.keys()),a=s.next();!a.done;a=s.next()){var c=Tf(a.value,2),l=c[0],u=c[1],h=n.get(l,u);h==null||h.setStartTime(r)}}catch(p){i={error:p}}finally{try{a&&!a.done&&(o=s.return)&&o.call(s)}finally{if(i)throw i.error}}return n},t})();function eN(t){return Array.from(t.entries())}var nN=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),rN=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},iN=(function(t){nN(e,t);function e(n,r,i,o,s){var a=t.call(this,n)||this;return a.no=i,a.ro=s,a.$r=new Ky(r,a.ro),a.io=new _y(r,o),a}return e.prototype.record=function(n,r){var i=this,o=new hn;Array.from(n.entries()).forEach(function(s){var a=rN(s,2),c=a[0],l=a[1];o.set(i.no.process(c),l)}),this.$r.batchCumulate(o,r)},e.prototype.collect=function(n,r){var i=this.$r.collect();return this.io.buildMetrics(n,this.Yn,i,r)},e})(Yy);function Ef(t,e){var n="";return t.unit!==e.unit&&(n+=" - Unit '"+t.unit+"' does not match '"+e.unit+`'
632
632
  `),t.type!==e.type&&(n+=" - Type '"+t.type+"' does not match '"+e.type+`'
633
633
  `),t.valueType!==e.valueType&&(n+=" - Value Type '"+t.valueType+"' does not match '"+e.valueType+`'
634
634
  `),t.description!==e.description&&(n+=" - Description '"+t.description+"' does not match '"+e.description+`'
635
- `),n}function PN(t,e){return" - use valueType '"+t.valueType+"' on instrument creation or use an instrument name other than '"+e.name+"'"}function MN(t,e){return" - use unit '"+t.unit+"' on instrument creation or use an instrument name other than '"+e.name+"'"}function FN(t,e){var n={name:e.name,type:e.type,unit:e.unit},r=JSON.stringify(n);return" - create a new view with a name other than '"+t.name+"' and InstrumentSelector '"+r+"'"}function AN(t,e){var n={name:e.name,type:e.type,unit:e.unit},r=JSON.stringify(n);return" - create a new view with a name other than '"+t.name+"' and InstrumentSelector '"+r+`'
635
+ `),n}function oN(t,e){return" - use valueType '"+t.valueType+"' on instrument creation or use an instrument name other than '"+e.name+"'"}function sN(t,e){return" - use unit '"+t.unit+"' on instrument creation or use an instrument name other than '"+e.name+"'"}function aN(t,e){var n={name:e.name,type:e.type,unit:e.unit},r=JSON.stringify(n);return" - create a new view with a name other than '"+t.name+"' and InstrumentSelector '"+r+"'"}function lN(t,e){var n={name:e.name,type:e.type,unit:e.unit},r=JSON.stringify(n);return" - create a new view with a name other than '"+t.name+"' and InstrumentSelector '"+r+`'
636
636
  - OR - create a new view with the name `+t.name+" and description '"+t.description+"' and InstrumentSelector "+r+`
637
- - OR - create a new view with the name `+e.name+" and description '"+t.description+"' and InstrumentSelector "+r}function df(t,e){return t.valueType!==e.valueType?PN(t,e):t.unit!==e.unit?MN(t,e):t.type!==e.type?FN(t,e):t.description!==e.description?AN(t,e):""}var wl=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},JN=(function(){function t(){this.io=new Map,this.Nr=new Map}return t.create=function(){return new t},t.prototype.getStorages=function(e){var n,r,i,o,s=[];try{for(var a=wl(this.io.values()),c=a.next();!c.done;c=a.next()){var l=c.value;s=s.concat(l)}}catch(f){n={error:f}}finally{try{c&&!c.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}var u=this.Nr.get(e);if(u!=null)try{for(var h=wl(u.values()),p=h.next();!p.done;p=h.next()){var l=p.value;s=s.concat(l)}}catch(f){i={error:f}}finally{try{p&&!p.done&&(o=h.return)&&o.call(h)}finally{if(i)throw i.error}}return s},t.prototype.register=function(e){this.$o(e,this.io)},t.prototype.registerForCollector=function(e,n){var r=this.Nr.get(e);r==null&&(r=new Map,this.Nr.set(e,r)),this.$o(n,r)},t.prototype.findOrUpdateCompatibleStorage=function(e){var n=this.io.get(e.name);return n===void 0?null:this.qo(e,n)},t.prototype.findOrUpdateCompatibleCollectorStorage=function(e,n){var r=this.Nr.get(e);if(r===void 0)return null;var i=r.get(n.name);return i===void 0?null:this.qo(n,i)},t.prototype.$o=function(e,n){var r=e.getInstrumentDescriptor(),i=n.get(r.name);if(i===void 0){n.set(r.name,[e]);return}i.push(e)},t.prototype.qo=function(e,n){var r,i,o=null;try{for(var s=wl(n),a=s.next();!a.done;a=s.next()){var c=a.value,l=c.getInstrumentDescriptor();Ux(l,e)?(l.description!==e.description&&(e.description.length>l.description.length&&c.updateDescription(e.description),X.warn("A view or instrument with the name ",e.name,` has already been registered, but has a different description and is incompatible with another registered view.
637
+ - OR - create a new view with the name `+e.name+" and description '"+t.description+"' and InstrumentSelector "+r}function Rf(t,e){return t.valueType!==e.valueType?oN(t,e):t.unit!==e.unit?sN(t,e):t.type!==e.type?aN(t,e):t.description!==e.description?lN(t,e):""}var Cl=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},cN=(function(){function t(){this.oo=new Map,this.gi=new Map}return t.create=function(){return new t},t.prototype.getStorages=function(e){var n,r,i,o,s=[];try{for(var a=Cl(this.oo.values()),c=a.next();!c.done;c=a.next()){var l=c.value;s=s.concat(l)}}catch(f){n={error:f}}finally{try{c&&!c.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}var u=this.gi.get(e);if(u!=null)try{for(var h=Cl(u.values()),p=h.next();!p.done;p=h.next()){var l=p.value;s=s.concat(l)}}catch(f){i={error:f}}finally{try{p&&!p.done&&(o=h.return)&&o.call(h)}finally{if(i)throw i.error}}return s},t.prototype.register=function(e){this.qo(e,this.oo)},t.prototype.registerForCollector=function(e,n){var r=this.gi.get(e);r==null&&(r=new Map,this.gi.set(e,r)),this.qo(n,r)},t.prototype.findOrUpdateCompatibleStorage=function(e){var n=this.oo.get(e.name);return n===void 0?null:this.ts(e,n)},t.prototype.findOrUpdateCompatibleCollectorStorage=function(e,n){var r=this.gi.get(e);if(r===void 0)return null;var i=r.get(n.name);return i===void 0?null:this.ts(n,i)},t.prototype.qo=function(e,n){var r=e.getInstrumentDescriptor(),i=n.get(r.name);if(i===void 0){n.set(r.name,[e]);return}i.push(e)},t.prototype.ts=function(e,n){var r,i,o=null;try{for(var s=Cl(n),a=s.next();!a.done;a=s.next()){var c=a.value,l=c.getInstrumentDescriptor();iO(l,e)?(l.description!==e.description&&(e.description.length>l.description.length&&c.updateDescription(e.description),X.warn("A view or instrument with the name ",e.name,` has already been registered, but has a different description and is incompatible with another registered view.
638
638
  `,`Details:
639
- `,pf(l,e),`The longer description will be used.
640
- To resolve the conflict:`,df(l,e))),o=c):X.warn("A view or instrument with the name ",e.name,` has already been registered and is incompatible with another registered view.
639
+ `,Ef(l,e),`The longer description will be used.
640
+ To resolve the conflict:`,Rf(l,e))),o=c):X.warn("A view or instrument with the name ",e.name,` has already been registered and is incompatible with another registered view.
641
641
  `,`Details:
642
- `,pf(l,e),`To resolve the conflict:
643
- `,df(l,e))}}catch(u){r={error:u}}finally{try{a&&!a.done&&(i=s.return)&&i.call(s)}finally{if(r)throw r.error}}return o},t})(),DN=(function(){function t(e){this.Ca=e}return t.prototype.record=function(e,n,r,i){this.Ca.forEach(function(o){o.record(e,n,r,i)})},t})(),YN=(function(){function t(e,n){this.ts=e,this.Za=n,this.Kn=new un}return t.prototype.observe=function(e,n){if(n===void 0&&(n={}),typeof e!="number"){X.warn("non-number value provided to metric "+this.ts+": "+e);return}this.Za===De.INT&&!Number.isInteger(e)&&(X.warn("INT value type cannot accept a floating-point value for "+this.ts+", ignoring the fractional digits."),e=Math.trunc(e),!Number.isInteger(e))||this.Kn.set(n,e)},t})(),KN=(function(){function t(){this.Kn=new Map}return t.prototype.observe=function(e,n,r){if(r===void 0&&(r={}),!!Ql(e)){var i=this.Kn.get(e);if(i==null&&(i=new un,this.Kn.set(e,i)),typeof n!="number"){X.warn("non-number value provided to metric "+e.qe.name+": "+n);return}e.qe.valueType===De.INT&&!Number.isInteger(n)&&(X.warn("INT value type cannot accept a floating-point value for "+e.qe.name+", ignoring the fractional digits."),n=Math.trunc(n),!Number.isInteger(n))||i.set(r,n)}},t})(),Sl=function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(u){try{l(r.next(u))}catch(h){s(h)}}function c(u){try{l(r.throw(u))}catch(h){s(h)}}function l(u){u.done?o(u.value):i(u.value).then(a,c)}l((r=r.apply(t,[])).next())})},Il=function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(u){l=[6,u],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},ff=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},mf=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},_N=(function(){function t(){this.Or=[],this.Gr=[]}return t.prototype.addCallback=function(e,n){var r=this.es(e,n);r>=0||this.Or.push({callback:e,instrument:n})},t.prototype.removeCallback=function(e,n){var r=this.es(e,n);r<0||this.Or.splice(r,1)},t.prototype.addBatchCallback=function(e,n){var r=new Set(n.filter(Ql));if(r.size===0){X.error("BatchObservableCallback is not associated with valid instruments",n);return}var i=this.ns(e,r);i>=0||this.Gr.push({callback:e,instruments:r})},t.prototype.removeBatchCallback=function(e,n){var r=new Set(n.filter(Ql)),i=this.ns(e,r);i<0||this.Gr.splice(i,1)},t.prototype.observe=function(e,n){return Sl(this,void 0,void 0,function(){var r,i,o,s;return Il(this,function(a){switch(a.label){case 0:return r=this.ka(e,n),i=this.Va(e,n),[4,xx(mf(mf([],ff(r),!1),ff(i),!1))];case 1:return o=a.sent(),s=o.filter(Nx).map(function(c){return c.reason}),[2,s]}})})},t.prototype.ka=function(e,n){var r=this;return this.Or.map(function(i){var o=i.callback,s=i.instrument;return Sl(r,void 0,void 0,function(){var a,c;return Il(this,function(l){switch(l.label){case 0:return a=new YN(s.qe.name,s.qe.valueType),c=Promise.resolve(o(a)),n!=null&&(c=Jr(c,n)),[4,c];case 1:return l.sent(),s.jo.forEach(function(u){u.record(a.Kn,e)}),[2]}})})})},t.prototype.Va=function(e,n){var r=this;return this.Gr.map(function(i){var o=i.callback,s=i.instruments;return Sl(r,void 0,void 0,function(){var a,c;return Il(this,function(l){switch(l.label){case 0:return a=new KN,c=Promise.resolve(o(a)),n!=null&&(c=Jr(c,n)),[4,c];case 1:return l.sent(),s.forEach(function(u){var h=a.Kn.get(u);h!=null&&u.jo.forEach(function(p){p.record(h,e)})}),[2]}})})})},t.prototype.es=function(e,n){return this.Or.findIndex(function(r){return r.callback===e&&r.instrument===n})},t.prototype.ns=function(e,n){return this.Gr.findIndex(function(r){return r.callback===e&&Ox(r.instruments,n)})},t})(),HN=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),zN=(function(t){HN(e,t);function e(n,r,i,o,s){var a=t.call(this,n)||this;return a.eo=i,a.no=s,a.pr=new Gy(r,a.no),a.ro=new Ly(r,o),a}return e.prototype.record=function(n,r,i,o){r=this.eo.process(r,i),this.pr.record(n,r,i,o)},e.prototype.collect=function(n,r){var i=this.pr.collect();return this.ro.buildMetrics(n,this.an,i,r)},e})(Oy),Xy=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),Cc=(function(){function t(){}return t.Noop=function(){return jN},t})(),BN=(function(t){Xy(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.process=function(n,r){return n},e})(Cc);(function(t){Xy(e,t);function e(n){var r=t.call(this)||this;return r.xa=n,r}return e.prototype.process=function(n,r){var i=this,o={};return Object.keys(n).filter(function(s){return i.xa.includes(s)}).forEach(function(s){return o[s]=n[s]}),o},e})(Cc);var jN=new BN,QN=function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(u){try{l(r.next(u))}catch(h){s(h)}}function c(u){try{l(r.throw(u))}catch(h){s(h)}}function l(u){u.done?o(u.value):i(u.value).then(a,c)}l((r=r.apply(t,[])).next())})},$N=function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(u){l=[6,u],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},qN=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},tO=(function(){function t(e,n){this.oo=e,this.rs=n,this.metricStorageRegistry=new JN,this.observableRegistry=new _N,this.meter=new xN(this)}return t.prototype.registerMetricStorage=function(e){var n=this.ss(e,zN);return n.length===1?n[0]:new DN(n)},t.prototype.registerAsyncMetricStorage=function(e){var n=this.ss(e,UN);return n},t.prototype.collect=function(e,n,r){return QN(this,void 0,void 0,function(){var i,o,s;return $N(this,function(a){switch(a.label){case 0:return[4,this.observableRegistry.observe(n,r==null?void 0:r.timeoutMillis)];case 1:return i=a.sent(),o=this.metricStorageRegistry.getStorages(e),o.length===0?[2,null]:(s=o.map(function(c){return c.collect(e,n)}).filter(kx),s.length===0?[2,{errors:i}]:[2,{scopeMetrics:{scope:this.rs,metrics:s},errors:i}])}})})},t.prototype.ss=function(e,n){var r=this,i=this.oo.viewRegistry.findViews(e,this.rs),o=i.map(function(c){var l=Wx(c,e),u=r.metricStorageRegistry.findOrUpdateCompatibleStorage(l);if(u!=null)return u;var h=c.aggregation.createAggregator(l),p=new n(l,h,c.attributesProcessor,r.oo.metricCollectors,c.aggregationCardinalityLimit);return r.metricStorageRegistry.register(p),p});if(o.length===0){var s=this.oo.selectAggregations(e.type),a=s.map(function(c){var l=qN(c,2),u=l[0],h=l[1],p=r.metricStorageRegistry.findOrUpdateCompatibleCollectorStorage(u,e);if(p!=null)return p;var f=h.createAggregator(e),m=u.selectCardinalityLimit(e.type),d=new n(e,f,Cc.Noop(),[u],m);return r.metricStorageRegistry.registerForCollector(u,d),d});o=o.concat(a)}return o},t})(),eO=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},nO=(function(){function t(e){this.resource=e,this.viewRegistry=new IN,this.metricCollectors=[],this.meterSharedStates=new Map}return t.prototype.getMeterSharedState=function(e){var n=Vx(e),r=this.meterSharedStates.get(n);return r==null&&(r=new tO(this,e),this.meterSharedStates.set(n,r)),r},t.prototype.selectAggregations=function(e){var n,r,i=[];try{for(var o=eO(this.metricCollectors),s=o.next();!s.done;s=o.next()){var a=s.value;i.push([a,a.selectAggregation(e)])}}catch(c){n={error:c}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i},t})(),io=function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(u){try{l(r.next(u))}catch(h){s(h)}}function c(u){try{l(r.throw(u))}catch(h){s(h)}}function l(u){u.done?o(u.value):i(u.value).then(a,c)}l((r=r.apply(t,[])).next())})},oo=function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(u){l=[6,u],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},rO=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},iO=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},oO=(function(){function t(e,n){this.cn=e,this.dr=n}return t.prototype.collect=function(e){return io(this,void 0,void 0,function(){var n,r,i,o,s=this;return oo(this,function(a){switch(a.label){case 0:return n=Qt(Date.now()),r=[],i=[],o=Array.from(this.cn.meterSharedStates.values()).map(function(c){return io(s,void 0,void 0,function(){var l;return oo(this,function(u){switch(u.label){case 0:return[4,c.collect(this,n,e)];case 1:return l=u.sent(),(l==null?void 0:l.scopeMetrics)!=null&&r.push(l.scopeMetrics),(l==null?void 0:l.errors)!=null&&i.push.apply(i,iO([],rO(l.errors),!1)),[2]}})})}),[4,Promise.all(o)];case 1:return a.sent(),[2,{resourceMetrics:{resource:this.cn.resource,scopeMetrics:r},errors:i}]}})})},t.prototype.forceFlush=function(e){return io(this,void 0,void 0,function(){return oo(this,function(n){switch(n.label){case 0:return[4,this.dr.forceFlush(e)];case 1:return n.sent(),[2]}})})},t.prototype.shutdown=function(e){return io(this,void 0,void 0,function(){return oo(this,function(n){switch(n.label){case 0:return[4,this.dr.shutdown(e)];case 1:return n.sent(),[2]}})})},t.prototype.selectAggregationTemporality=function(e){return this.dr.selectAggregationTemporality(e)},t.prototype.selectAggregation=function(e){return this.dr.selectAggregation(e)},t.prototype.selectCardinalityLimit=function(e){var n,r,i;return(i=(r=(n=this.dr).selectCardinalityLimit)===null||r===void 0?void 0:r.call(n,e))!==null&&i!==void 0?i:2e3},t})(),yf=function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(u){try{l(r.next(u))}catch(h){s(h)}}function c(u){try{l(r.throw(u))}catch(h){s(h)}}function l(u){u.done?o(u.value):i(u.value).then(a,c)}l((r=r.apply(t,[])).next())})},gf=function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(u){l=[6,u],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},bf=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};function sO(t,e){var n=e!=null?e:Ar.empty();return t?Ar.default().merge(n):n}var aO=(function(){function t(e){var n,r,i,o,s;if(this.Be=!1,this.cn=new nO(sO((s=e==null?void 0:e.mergeResourceWithDefaults)!==null&&s!==void 0?s:!0,e==null?void 0:e.resource)),(e==null?void 0:e.views)!=null&&e.views.length>0)try{for(var a=bf(e.views),c=a.next();!c.done;c=a.next()){var l=c.value;this.cn.viewRegistry.addView(l)}}catch(f){n={error:f}}finally{try{c&&!c.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}if((e==null?void 0:e.readers)!=null&&e.readers.length>0)try{for(var u=bf(e.readers),h=u.next();!h.done;h=u.next()){var p=h.value;this.addMetricReader(p)}}catch(f){i={error:f}}finally{try{h&&!h.done&&(o=u.return)&&o.call(u)}finally{if(i)throw i.error}}}return t.prototype.getMeter=function(e,n,r){return n===void 0&&(n=""),r===void 0&&(r={}),this.Be?(X.warn("A shutdown MeterProvider cannot provide a Meter"),tC()):this.cn.getMeterSharedState({name:e,version:n,schemaUrl:r.schemaUrl}).meter},t.prototype.addMetricReader=function(e){var n=new oO(this.cn,e);e.setMetricProducer(n),this.cn.metricCollectors.push(n)},t.prototype.shutdown=function(e){return yf(this,void 0,void 0,function(){return gf(this,function(n){switch(n.label){case 0:return this.Be?(X.warn("shutdown may only be called once per MeterProvider"),[2]):(this.Be=!0,[4,Promise.all(this.cn.metricCollectors.map(function(r){return r.shutdown(e)}))]);case 1:return n.sent(),[2]}})})},t.prototype.forceFlush=function(e){return yf(this,void 0,void 0,function(){return gf(this,function(n){switch(n.label){case 0:return this.Be?(X.warn("invalid attempt to force flush after MeterProvider shutdown"),[2]):[4,Promise.all(this.cn.metricCollectors.map(function(r){return r.forceFlush(e)}))];case 1:return n.sent(),[2]}})})},t})();function lO(t,e){var n=my(e);return{resource:yy(t.resource),schemaUrl:void 0,scopeMetrics:cO(t.scopeMetrics,n)}}function cO(t,e){return Array.from(t.map(function(n){return{scope:gy(n.scope),metrics:n.metrics.map(function(r){return uO(r,e)}),schemaUrl:n.scope.schemaUrl}}))}function uO(t,e){var n={name:t.descriptor.name,description:t.descriptor.description,unit:t.descriptor.unit},r=fO(t.aggregationTemporality);switch(t.dataPointType){case be.SUM:n.sum={aggregationTemporality:r,isMonotonic:t.isMonotonic,dataPoints:vf(t,e)};break;case be.GAUGE:n.gauge={dataPoints:vf(t,e)};break;case be.HISTOGRAM:n.histogram={aggregationTemporality:r,dataPoints:pO(t,e)};break;case be.EXPONENTIAL_HISTOGRAM:n.exponentialHistogram={aggregationTemporality:r,dataPoints:dO(t,e)};break}return n}function hO(t,e,n){var r={attributes:gn(t.attributes),startTimeUnixNano:n.encodeHrTime(t.startTime),timeUnixNano:n.encodeHrTime(t.endTime)};switch(e){case De.INT:r.asInt=t.value;break;case De.DOUBLE:r.asDouble=t.value;break}return r}function vf(t,e){return t.dataPoints.map(function(n){return hO(n,t.descriptor.valueType,e)})}function pO(t,e){return t.dataPoints.map(function(n){var r=n.value;return{attributes:gn(n.attributes),bucketCounts:r.buckets.counts,explicitBounds:r.buckets.boundaries,count:r.count,sum:r.sum,min:r.min,max:r.max,startTimeUnixNano:e.encodeHrTime(n.startTime),timeUnixNano:e.encodeHrTime(n.endTime)}})}function dO(t,e){return t.dataPoints.map(function(n){var r=n.value;return{attributes:gn(n.attributes),count:r.count,min:r.min,max:r.max,sum:r.sum,positive:{offset:r.positive.offset,bucketCounts:r.positive.bucketCounts},negative:{offset:r.negative.offset,bucketCounts:r.negative.bucketCounts},scale:r.scale,zeroCount:r.zeroCount,startTimeUnixNano:e.encodeHrTime(n.startTime),timeUnixNano:e.encodeHrTime(n.endTime)}})}function fO(t){switch(t){case se.DELTA:return 1;case se.CUMULATIVE:return 2}}function mO(t,e){return{resourceMetrics:t.map(function(n){return lO(n,e)})}}var yO=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},gO=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o};function bO(t,e){var n,r=t.spanContext(),i=t.status;return{traceId:e.encodeSpanContext(r.traceId),spanId:e.encodeSpanContext(r.spanId),parentSpanId:e.encodeOptionalSpanContext(t.parentSpanId),traceState:(n=r.traceState)===null||n===void 0?void 0:n.serialize(),name:t.name,kind:t.kind==null?0:t.kind+1,startTimeUnixNano:e.encodeHrTime(t.startTime),endTimeUnixNano:e.encodeHrTime(t.endTime),attributes:gn(t.attributes),droppedAttributesCount:t.droppedAttributesCount,events:t.events.map(function(o){return wO(o,e)}),droppedEventsCount:t.droppedEventsCount,status:{code:i.code,message:i.message},links:t.links.map(function(o){return vO(o,e)}),droppedLinksCount:t.droppedLinksCount}}function vO(t,e){var n;return{attributes:t.attributes?gn(t.attributes):[],spanId:e.encodeSpanContext(t.context.spanId),traceId:e.encodeSpanContext(t.context.traceId),traceState:(n=t.context.traceState)===null||n===void 0?void 0:n.serialize(),droppedAttributesCount:t.droppedAttributesCount||0}}function wO(t,e){return{attributes:t.attributes?gn(t.attributes):[],name:t.name,timeUnixNano:e.encodeHrTime(t.time),droppedAttributesCount:t.droppedAttributesCount||0}}function SO(t,e){var n=my(e);return{resourceSpans:TO(t,n)}}function IO(t){var e,n,r=new Map;try{for(var i=yO(t),o=i.next();!o.done;o=i.next()){var s=o.value,a=r.get(s.resource);a||(a=new Map,r.set(s.resource,a));var c=s.instrumentationLibrary.name+"@"+(s.instrumentationLibrary.version||"")+":"+(s.instrumentationLibrary.schemaUrl||""),l=a.get(c);l||(l=[],a.set(c,l)),l.push(s)}}catch(u){e={error:u}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return r}function TO(t,e){for(var n=IO(t),r=[],i=n.entries(),o=i.next();!o.done;){for(var s=gO(o.value,2),a=s[0],c=s[1],l=[],u=c.values(),h=u.next();!h.done;){var p=h.value;if(p.length>0){var f=p.map(function(d){return bO(d,e)});l.push({scope:gy(p[0].instrumentationLibrary),spans:f,schemaUrl:p[0].instrumentationLibrary.schemaUrl})}h=u.next()}var m={resource:yy(a),scopeSpans:l,schemaUrl:void 0};r.push(m),o=i.next()}return r}var EO={serializeRequest:function(t){var e=mO([t],{useLongBits:!1}),n=new TextEncoder;return n.encode(JSON.stringify(e))},deserializeResponse:function(t){var e=new TextDecoder;return JSON.parse(e.decode(t))}},RO={serializeRequest:function(t){var e=SO(t,{useHex:!0,useLongBits:!1}),n=new TextEncoder;return n.encode(JSON.stringify(e))},deserializeResponse:function(t){var e=new TextDecoder;return JSON.parse(e.decode(t))}},CO=function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(u){try{l(r.next(u))}catch(h){s(h)}}function c(u){try{l(r.throw(u))}catch(h){s(h)}}function l(u){u.done?o(u.value):i(u.value).then(a,c)}l((r=r.apply(t,[])).next())})},ZO=function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(u){l=[6,u],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},kO=5,VO=1e3,xO=5e3,NO=1.5,wf=.2;function OO(){return Math.random()*(2*wf)-wf}var GO=(function(){function t(e){this.Pn=e}return t.prototype.retry=function(e,n,r){var i=this;return new Promise(function(o,s){setTimeout(function(){i.Pn.send(e,n).then(o,s)},r)})},t.prototype.send=function(e,n){var r;return CO(this,void 0,void 0,function(){var i,o,s,a,c,l,u;return ZO(this,function(h){switch(h.label){case 0:return i=Date.now()+n,[4,this.Pn.send(e,n)];case 1:o=h.sent(),s=kO,a=VO,h.label=2;case 2:return o.status==="retryable"&&s>0?(s--,c=Math.max(Math.min(a,xO)+OO(),0),a=a*NO,l=(r=o.retryInMillis)!==null&&r!==void 0?r:c,u=i-Date.now(),l>u?[2,o]:[4,this.retry(e,u,l)]):[3,4];case 3:return o=h.sent(),[3,2];case 4:return[2,o]}})})},t.prototype.shutdown=function(){return this.Pn.shutdown()},t})();function Wy(t){return new GO(t.transport)}function LO(t){var e=[429,502,503,504];return e.includes(t)}function XO(t){if(t!=null){var e=Number.parseInt(t,10);if(Number.isInteger(e))return e>0?e*1e3:-1;var n=new Date(t).getTime()-Date.now();return n>=0?n:0}}var WO=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},UO=(function(){function t(e){this.ls=e}return t.prototype.send=function(e,n){var r=this;return new Promise(function(i){var o=new XMLHttpRequest;o.timeout=n,o.open("POST",r.ls.url);var s=r.ls.headers();Object.entries(s).forEach(function(a){var c=WO(a,2),l=c[0],u=c[1];o.setRequestHeader(l,u)}),o.ontimeout=function(a){i({status:"failure",error:new Error("XHR request timed out")})},o.onreadystatechange=function(){o.status>=200&&o.status<=299?(X.debug("XHR success"),i({status:"success"})):o.status&&LO(o.status)?i({status:"retryable",retryInMillis:XO(o.getResponseHeader("Retry-After"))}):o.status!==0&&i({status:"failure",error:new Error("XHR request failed with non-retryable status")})},o.onabort=function(){i({status:"failure",error:new Error("XHR request aborted")})},o.onerror=function(){i({status:"failure",error:new Error("XHR request errored")})},o.send(e)})},t.prototype.shutdown=function(){},t})();function PO(t){return new UO(t)}var MO=(function(){function t(e){this.cs=e}return t.prototype.send=function(e){var n=this;return new Promise(function(r){navigator.sendBeacon(n.cs.url,new Blob([e],{type:n.cs.blobType}))?(X.debug("SendBeacon success"),r({status:"success"})):r({status:"failure",error:new Error("SendBeacon failed")})})},t.prototype.shutdown=function(){},t})();function FO(t){return new MO(t)}function AO(t,e){return hy(t,e,Wy({transport:PO(t)}))}function JO(t,e){return hy(t,e,Wy({transport:FO({url:t.url,blobType:t.headers()["Content-Type"]})}))}var DO=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o};function YO(t){return function(){var e,n={};return Object.entries((e=t==null?void 0:t())!==null&&e!==void 0?e:{}).forEach(function(r){var i=DO(r,2),o=i[0],s=i[1];typeof s<"u"?n[o]=String(s):X.warn('Header "'+o+'" has invalid value ('+s+") and will be ignored")}),n}}var mn=function(){return mn=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},mn.apply(this,arguments)};function KO(t,e,n){var r=mn({},n()),i={};return function(){return e!=null&&Object.assign(i,e()),t!=null&&Object.assign(i,t()),Object.assign(i,r)}}function _O(t){if(t!=null)try{return new URL(t),t}catch(e){throw new Error("Configuration: Could not parse user-provided export URL: '"+t+"'")}}function HO(t,e,n){var r,i,o,s;return mn(mn({},ax(t,e,n)),{headers:KO(YO(t.headers),e.headers,n.headers),url:(i=(r=_O(t.url))!==null&&r!==void 0?r:e.url)!==null&&i!==void 0?i:n.url,agentOptions:(s=(o=t.agentOptions)!==null&&o!==void 0?o:e.agentOptions)!==null&&s!==void 0?s:n.agentOptions})}function zO(t,e){return mn(mn({},lx()),{headers:function(){return t},url:"http://localhost:4318/"+e,agentOptions:{keepAlive:!0}})}function BO(t,e,n){return HO({url:t.url,timeoutMillis:t.timeoutMillis,headers:sx(t.headers),concurrencyLimit:t.concurrencyLimit},{},zO(n,e))}function Uy(t,e,n,r){var i=!!t.headers||typeof navigator.sendBeacon!="function",o=BO(t,n,r);return i?AO(o,e):JO(o,e)}var jO=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),QO=(function(t){jO(e,t);function e(n){return n===void 0&&(n={}),t.call(this,Uy(n,RO,"v1/traces",{"Content-Type":"application/json"}))||this}return e})(uy),Lo;(function(t){t[t.DELTA=0]="DELTA",t[t.CUMULATIVE=1]="CUMULATIVE",t[t.LOWMEMORY=2]="LOWMEMORY"})(Lo||(Lo={}));var $O=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),$l=function(){return se.CUMULATIVE},Py=function(t){switch(t){case K.COUNTER:case K.OBSERVABLE_COUNTER:case K.GAUGE:case K.HISTOGRAM:case K.OBSERVABLE_GAUGE:return se.DELTA;case K.UP_DOWN_COUNTER:case K.OBSERVABLE_UP_DOWN_COUNTER:return se.CUMULATIVE}},My=function(t){switch(t){case K.COUNTER:case K.HISTOGRAM:return se.DELTA;case K.GAUGE:case K.UP_DOWN_COUNTER:case K.OBSERVABLE_UP_DOWN_COUNTER:case K.OBSERVABLE_COUNTER:case K.OBSERVABLE_GAUGE:return se.CUMULATIVE}};function qO(){var t=Yn(),e=t.OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE.trim().toLowerCase();return e==="cumulative"?$l:e==="delta"?Py:e==="lowmemory"?My:(X.warn("OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE is set to '"+t.OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE+"', but only 'cumulative' and 'delta' are allowed. Using default ('cumulative') instead."),$l)}function tG(t){return t!=null?t===Lo.DELTA?Py:t===Lo.LOWMEMORY?My:$l:qO()}function eG(t){return t!=null&&t.aggregationPreference?t.aggregationPreference:function(e){return Ne.Default()}}var nG=(function(t){$O(e,t);function e(n,r){var i=t.call(this,n)||this;return i.Hi=eG(r),i.zi=tG(r==null?void 0:r.temporalityPreference),i}return e.prototype.selectAggregation=function(n){return this.Hi(n)},e.prototype.selectAggregationTemporality=function(n){return this.zi(n)},e})(uy),rG=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),iG=(function(t){rG(e,t);function e(n){return t.call(this,Uy(n!=null?n:{},EO,"v1/metrics",{"Content-Type":"application/json"}),n)||this}return e})(nG);function oG(t,e){let n=t.spanContext();return{name:t.name,kind:t.kind,spanContext:()=>n,parentSpanId:t.parentSpanId,startTime:t.startTime,endTime:t.endTime,status:t.status,attributes:Mm(t.attributes,e),links:t.links,events:t.events,duration:t.duration,ended:t.ended,resource:t.resource,instrumentationLibrary:t.instrumentationLibrary,droppedAttributesCount:t.droppedAttributesCount,droppedEventsCount:t.droppedEventsCount,droppedLinksCount:t.droppedLinksCount}}function sG(t,e){if(!e.isSamplingEnabled())return t;let n=[],r={},i={};for(let o of t){o.parentSpanId&&(i[o.parentSpanId]=i[o.parentSpanId]||[],i[o.parentSpanId].push(o.spanContext().spanId));let s=e.shouldSample(o);s.sample?s.attributes?r[o.spanContext().spanId]=oG(o,s.attributes):r[o.spanContext().spanId]=o:n.push(o.spanContext().spanId)}for(;n.length>0;){let o=n.shift(),s=i[o];if(s)for(let a of s)delete r[a],n.push(a)}return Object.values(r)}var ql=class extends QO{constructor(e,n){super(Jt(mt({},e),{headers:{}})),this.sampler=n}export(e,n){let r=sG(e,this.sampler);if(r.length===0)return;let i=0,o=s=>{var a;if(s.code===kt.SUCCESS)return n({code:kt.SUCCESS});if(i++,i>dc)return console.error(`[@launchdarkly/observability] failed to export OTeL traces: ${(a=s.error)==null?void 0:a.message}`,s.error),n({code:kt.FAILED,error:s.error});new Promise(c=>setTimeout(c,fc+mc*Math.pow(2,i))).then(()=>{var c;console.warn(`[@launchdarkly/observability] retry ${i}, failed to export OTeL traces: ${(c=s.error)==null?void 0:c.message}`,s.error),super.export(r,o)})};super.export(r,o)}},tc=class extends iG{constructor(e){super(Jt(mt({},e),{headers:{}}))}export(e,n){let r=0,i=o=>{var s;if(o.code===kt.SUCCESS)return n({code:kt.SUCCESS});if(r++,r>dc)return console.error(`[@launchdarkly/observability] failed to export OTeL metrics: ${(s=o.error)==null?void 0:s.message}`,o.error),n({code:kt.FAILED,error:o.error});new Promise(a=>setTimeout(a,fc+mc*Math.pow(2,r))).then(()=>{var a;console.warn(`[@launchdarkly/observability] retry ${r}, failed to export OTeL metrics: ${(a=o.error)==null?void 0:a.message}`,o.error),super.export(e,i)})};super.export(e,i)}},aG="OT_ZONE_CONTEXT",lG="Navigation:",cG=["click","input","submit"];function uG(){return!1}var ec=class en extends Bm{constructor(e={}){var n;super(en.moduleName,en.version,e),yt(this,"_spansData",new WeakMap),yt(this,"_zonePatched"),yt(this,"_wrappedListeners",new WeakMap),yt(this,"_eventsSpanMap",new WeakMap),yt(this,"_eventNames"),yt(this,"_shouldPreventSpanCreation"),this.Na=new Set((n=e==null?void 0:e.eventNames)!=null?n:cG),this.Oa=typeof(e==null?void 0:e.shouldPreventSpanCreation)=="function"?e.shouldPreventSpanCreation:uG}init(){}Ga(e,n){let r=this._n.get(n);r&&(e.source==="setTimeout"?r.hrTimeLastTimeout=dn():e.source!=="Promise.then"&&e.source!=="setTimeout"&&(r.hrTimeLastTimeout=void 0))}La(e){return this.Na.has(e)}Un(e,n){var r;let i=e==null?void 0:e.target,o=e==null?void 0:e.type;if(!(i instanceof HTMLElement)||!i.getAttribute||i.hasAttribute("disabled")||!this.La(o))return;let s=ny(i,!0);try{let a=this.tracer.startSpan(o,{attributes:{"event.type":o,"event.tag":i.tagName,"event.xpath":s,"event.id":i.id,"event.text":(r=i.textContent)!=null?r:"","event.url":window.location.href,"viewport.width":window.innerWidth,"viewport.height":window.innerHeight}},n?ut.setSpan(tt.active(),n):void 0);return e instanceof MouseEvent&&(a.setAttribute("event.x",e.clientX),a.setAttribute("event.y",e.clientY),a.setAttribute("event.relativeX",e.clientX/window.innerWidth),a.setAttribute("event.relativeY",e.clientY/window.innerHeight),o==="scroll"&&(a.setAttribute("event.scrollX",window.scrollX),a.setAttribute("event.scrollY",window.scrollY))),this.Oa(o,i,a)===!0?void 0:(this._n.set(a,{taskCount:0}),a)}catch(a){this.I.error("failed to start create new user interaction span",a)}}so(e){let n=this._n.get(e);n&&(n.taskCount--,n.taskCount===0&&this.Xa(e,n.hrTimeLastTimeout))}Lr(e){let n=e.get(aG);return n&&ut.getSpan(n)}us(e){let n=this._n.get(e);n&&n.taskCount++}addPatchedListener(e,n,r,i){let o=this.ao.get(r);o||(o=new Map,this.ao.set(r,o));let s=o.get(n);return s||(s=new Map,o.set(n,s)),s.has(e)?!1:(s.set(e,i),!0)}removePatchedListener(e,n,r){let i=this.ao.get(r);if(!i)return;let o=i.get(n);if(!o)return;let s=o.get(e);return s&&(o.delete(e),o.size===0&&(i.delete(n),i.size===0&&this.ao.delete(r))),s}Xr(e,n,r){return typeof e=="function"?e.apply(n,r):e.handleEvent(r[0])}Wa(){let e=this,n=new Map;return r=>function(i,o,s){if(!o)return r.call(this,i,o,s);let a=s&&typeof s=="object"&&s.once,c=function(...l){var u;let h,p=l[0];if(!(p!=null&&p.type))return e.Xr(o,this,l);if(Date.now()-((u=n.get(p.type))!=null?u:0)<1e3/60)return e.Xr(o,this,l);n.set(p.type,Date.now()),p&&(h=e.Ua.get(p)),a&&e.removePatchedListener(this,i,o);let f=e.Un(p,h);return f?(p&&e.Ua.set(p,f),tt.with(ut.setSpan(tt.active(),f),()=>{let m=e.Xr(o,this,l);return f.end(),m})):e.Xr(o,this,l)};if(e.addPatchedListener(this,i,o,c))return r.call(this,i,c,s)}}Pa(){let e=this;return n=>function(r,i,o){let s=e.removePatchedListener(this,r,i);return s?n.call(this,r,s,o):n.call(this,r,i,o)}}hs(){return window.EventTarget?[EventTarget.prototype]:[Node.prototype,Window.prototype]}Ma(){this.ps(),this.te(history,"replaceState",this.fr()),this.te(history,"pushState",this.fr()),this.te(history,"back",this.fr()),this.te(history,"forward",this.fr()),this.te(history,"go",this.fr())}fr(){let e=this;return n=>function(...r){let i=`${location.pathname}${location.hash}${location.search}`,o=n.apply(this,r),s=`${location.pathname}${location.hash}${location.search}`;return i!==s&&e.Fa(s),o}}ps(){Gt(history.replaceState)&&this.F(history,"replaceState"),Gt(history.pushState)&&this.F(history,"pushState"),Gt(history.back)&&this.F(history,"back"),Gt(history.forward)&&this.F(history,"forward"),Gt(history.go)&&this.F(history,"go")}Fa(e){let n=ut.getSpan(tt.active());n&&typeof n.updateName=="function"&&n.updateName(`${lG} ${e}`)}Aa(){let e=this;return n=>function(r){let i=Zone.current,o=e.Lr(i);return o&&e.lo(r,i)&&e.so(o),n.call(this,r)}}Ja(){let e=this;return n=>function(r){let i=Zone.current,o=e.Lr(i);return o&&e.lo(r,i)&&(e.us(o),e.Ga(r,o)),n.call(this,r)}}Da(){let e=this;return n=>function(r,i,o){let s=Array.isArray(o)&&o[0]instanceof Event?o[0]:void 0,a=s==null?void 0:s.target,c,l=this;if(a){if(c=e.Un(s),c)return e.us(c),l.run(()=>{try{return tt.with(ut.setSpan(tt.active(),c),()=>{let u=Zone.current;return r.ds=u,n.call(u,r,i,o)})}finally{e.so(c)}})}else c=e.Lr(l);try{return n.call(l,r,i,o)}finally{c&&e.lo(r,l)&&e.so(c)}}}lo(e,n){if(e.ds&&(n=e.ds),!n||!e.data||e.data.isPeriodic)return!1;let r=this.Lr(n);return!r||!this._n.get(r)?!1:e.type==="macroTask"||e.type==="microTask"}Xa(e,n){e&&this._n.get(e)&&(e.end(n),this._n.delete(e))}enable(){let e=this.fs();this.I.debug("applying patch to",en.moduleName,en.version,"zone:",!!e),e?(Gt(e.prototype.runTask)&&(this.F(e.prototype,"runTask"),this.I.debug("removing previous patch from method runTask")),Gt(e.prototype.scheduleTask)&&(this.F(e.prototype,"scheduleTask"),this.I.debug("removing previous patch from method scheduleTask")),Gt(e.prototype.cancelTask)&&(this.F(e.prototype,"cancelTask"),this.I.debug("removing previous patch from method cancelTask")),this.ms=!0,this.te(e.prototype,"runTask",this.Da()),this.te(e.prototype,"scheduleTask",this.Ja()),this.te(e.prototype,"cancelTask",this.Aa())):(this.ms=!1,this.hs().forEach(n=>{Gt(n.addEventListener)&&(this.F(n,"addEventListener"),this.I.debug("removing previous patch from method addEventListener")),Gt(n.removeEventListener)&&(this.F(n,"removeEventListener"),this.I.debug("removing previous patch from method removeEventListener")),this.te(n,"addEventListener",this.Wa()),this.te(n,"removeEventListener",this.Pa())})),this.Ma()}disable(){let e=this.fs();this.I.debug("removing patch from",en.moduleName,en.version,"zone:",!!e),e&&this.ms?(Gt(e.prototype.runTask)&&this.F(e.prototype,"runTask"),Gt(e.prototype.scheduleTask)&&this.F(e.prototype,"scheduleTask"),Gt(e.prototype.cancelTask)&&this.F(e.prototype,"cancelTask")):this.hs().forEach(n=>{Gt(n.addEventListener)&&this.F(n,"addEventListener"),Gt(n.removeEventListener)&&this.F(n,"removeEventListener")}),this.ps()}fs(){return window.Zone}};yt(ec,"version","0.1.0"),yt(ec,"moduleName","user-interaction");var hG=ec,nn={},Me,Xo="highlight.record",pG="highlight.session_id",dG="launchdarkly.js.log",fG=(t,e)=>{var n,r,i,o,s,a,c,l,u;if(nn.tracerProvider!==void 0){console.warn("OTEL already initialized. Skipping...");return}Me=t;let h=t.backendUrl||void 0||"https://pub.highlight.io",p=[...(r=(n=t.networkRecordingOptions)==null?void 0:n.urlBlocklist)!=null?r:[],...HV],f=(i=t.environment)!=null?i:"production",m={url:t.otlpEndpoint+"/v1/traces",concurrencyLimit:100,timeoutMillis:5e3,compression:"gzip",keepAlive:!0,httpAgentOptions:{timeout:5e3,keepAlive:!0}},d=new ql(m,e),v=new nc(d,{maxExportBatchSize:100,maxQueueSize:1e3,exportTimeoutMillis:m.timeoutMillis,scheduledDelayMillis:m.timeoutMillis}),g=new Ar({[m1]:(o=t.serviceName)!=null?o:"highlight-browser",[f1]:f,"highlight.project_id":t.projectId});nn.tracerProvider=new Qk({resource:g,spanProcessors:[v]}),ut.setGlobalTracerProvider(nn.tracerProvider);let w=new tc(Jt(mt({},m),{url:t.otlpEndpoint+"/v1/metrics"})),R=new SN({exporter:w,exportIntervalMillis:m.timeoutMillis,exportTimeoutMillis:m.timeoutMillis});nn.meterProvider=new aO({resource:g,readers:[R]}),Ze.setGlobalMeterProvider(nn.meterProvider);let E=[];((s=t.instrumentations)==null?void 0:s["@opentelemetry/instrumentation-document-load"])!==!1&&E.push(new E1({applyCustomAttributesOnSpan:{documentLoad:Ef,documentFetch:Ef,resourceFetch:yG}})),((a=t.instrumentations)==null?void 0:a["@opentelemetry/instrumentation-user-interaction"])!==!1&&E.push(new hG({eventNames:t.eventNames})),(c=t.networkRecordingOptions)!=null&&c.enabled&&(((l=t.instrumentations)==null?void 0:l["@opentelemetry/instrumentation-fetch"])!==!1&&E.push(new uV({propagateTraceHeaderCorsUrls:Rf(t.tracingOrigins),applyCustomAttributesOnSpan:(V,N,U)=>Do(void 0,null,function*(){var C,x,P;if(!V.attributes)return;let st=V;if(st.attributes[Xo]===!1)return;let lt=st.attributes["http.url"],y=(C=N.method)!=null?C:"GET";if(V.updateName(If(lt,y,N.body)),!(U instanceof Response)){V.setAttributes({"http.response.error":U.message,"http.response.status":U.status});return}Tf(V,N.body,N.headers,t.networkRecordingOptions);let b=yield rx(U,(x=t.networkRecordingOptions)==null?void 0:x.bodyKeysToRecord,(P=t.networkRecordingOptions)==null?void 0:P.networkBodyKeysToRedact);V.setAttribute("http.response.body",b)})})),((u=t.instrumentations)==null?void 0:u["@opentelemetry/instrumentation-xml-http-request"])!==!1&&E.push(new YV({propagateTraceHeaderCorsUrls:Rf(t.tracingOrigins),applyCustomAttributesOnSpan:(V,N)=>{var U,C;let x=N;if(!V.attributes||V.attributes[Xo]===!1)return;let P=If(x.ol,x.sl,N.responseText);V.updateName(P),Tf(V,x.Ya,x.Ka,t.networkRecordingOptions);let st=cy(x.Ya,(U=t.networkRecordingOptions)==null?void 0:U.networkBodyKeysToRedact,(C=t.networkRecordingOptions)==null?void 0:C.bodyKeysToRecord,x.Ka);V.setAttribute("http.request.body",st)}}))),dk({instrumentations:E});let T=new qm;T.enable(),nn.tracerProvider.register({contextManager:T,propagator:new Gm({propagators:[new Cm,new rc({backendUrl:h,otlpEndpoint:t.otlpEndpoint,tracingOrigins:t.tracingOrigins,urlBlocklist:p})]})})},nc=class extends $m{onStart(e,n){e.setAttribute(pG,Fe()),super.onStart(e,n)}onEnd(e){e.attributes[Xo]!==!1&&super.onEnd(e)}},rc=class extends Lm{constructor(e){super(),yt(this,"highlightEndpoints"),yt(this,"tracingOrigins"),yt(this,"urlBlocklist"),this.highlightEndpoints=[e.backendUrl,`${e.otlpEndpoint}/v1/traces`,`${e.otlpEndpoint}/v1/logs`,`${e.otlpEndpoint}/v1/metrics`],this.tracingOrigins=e.tracingOrigins,this.urlBlocklist=e.urlBlocklist}inject(e,n,r){var i;let o=ut.getSpan(e);if(!o||!o.attributes)return;let s=o.attributes["http.url"];typeof s=="string"&&(mG(s,this.highlightEndpoints,this.tracingOrigins,this.urlBlocklist)||o.setAttribute(Xo,!1),!ex(s,(i=this.tracingOrigins)!=null?i:[],this.urlBlocklist))||super.inject(e,n,r)}},Fy="highlight-browser",so=Fy,Sf=()=>{var t;return(t=nn.tracerProvider)==null?void 0:t.getTracer(Fy)},If=(t,e,n)=>{var r,i,o;let s,a=new URL(t),c=a.pathname,l=`${e.toUpperCase()} - ${c}`;try{if(s=typeof n=="string"?JSON.parse(n):n,s&&s.query){let u=lc(s.query),h=((r=u.definitions[0])==null?void 0:r.kind)==="OperationDefinition"?(o=(i=u.definitions[0])==null?void 0:i.name)==null?void 0:o.value:void 0;h&&(l=`${h} (GraphQL: ${a.host+a.pathname})`)}}catch(u){}return l},Tf=(t,e,n,r)=>{var i;let o=typeof e=="string"?e:String(e);if(!t.attributes)return;let s=t.attributes["http.url"],a=new URL(s),c;try{c=e?JSON.parse(o):void 0,c.operationName&&t.setAttribute("graphql.operation.name",c.operationName)}catch(u){}let l=KV((i=r==null?void 0:r.networkHeadersToRedact)!=null?i:[],n,r==null?void 0:r.headerKeysToRecord);t.setAttributes({"highlight.type":"http.request","http.request.headers":JSON.stringify(l),"http.request.body":o,[b1]:s,[v1]:a.pathname,[w1]:a.search}),a.searchParams.size>0&&t.setAttributes({"url.query_params":JSON.stringify(Object.fromEntries(a.searchParams))})},mG=(t,e,n,r)=>r!=null&&r.some(i=>t.toLowerCase().includes(i))?!1:tx(t,e),Ef=t=>{var e,n,r;if(!t.events)return;let i=t.events,o={unload:zt("unloadEventStart","unloadEventEnd",i),dom_interactive:zt("fetchStart","domInteractive",i),dom_content_loaded:zt("domContentLoadedEventStart","domContentLoadedEventEnd",i),dom_complete:zt("fetchStart","domComplete",i),load_event:zt("loadEventStart","loadEventEnd",i),document_load:zt("fetchStart","loadEventEnd",i),first_paint:zt("fetchStart","firstPaint",i),first_contentful_paint:zt("fetchStart","firstContentfulPaint",i),domain_lookup:zt("domainLookupStart","domainLookupEnd",i),connect:zt("connectStart","connectEnd",i),request:zt("requestStart","requestEnd",i),response:zt("responseStart","responseEnd",i)},s=(n=(e=Me==null?void 0:Me.getIntegrations)==null?void 0:e.call(Me))!=null?n:[];if(o.document_load!==void 0)for(let a of s)a.recordGauge((r=Me==null?void 0:Me.sessionSecureId)!=null?r:"",{name:pm,value:o.document_load/1e6});Object.entries(o).forEach(([a,c])=>{c!==void 0&&(t.setAttribute(`timings.${a}.ns`,c),t.setAttribute(`timings.${a}.readable`,Ay(c)))})};function zt(t,e,n){let r=n.find(s=>s.name===t),i=n.find(s=>s.name===e);if(!r||!i)return;let o=r.time[0]*1e9+r.time[1];return i.time[0]*1e9+i.time[1]-o}var yG=(t,e)=>{let n={domain_lookup:(e.domainLookupEnd-e.domainLookupStart)*1e9,connect:(e.connectEnd-e.connectStart)*1e9,request:(e.responseEnd-e.requestStart)*1e9,response:(e.responseEnd-e.responseStart)*1e9};Object.entries(n).forEach(([r,i])=>{t.setAttribute(`timings.${r}.ns`,i),t.setAttribute(`timings.${r}.readable`,Ay(i))})},Ay=t=>{if(t>=36e11){let e=t/36e11;return`${Number(e.toFixed(1))}h`}else if(t>=6e10){let e=t/6e10;return`${Number(e.toFixed(1))}m`}else if(t>=1e9){let e=t/1e9;return`${Number(e.toFixed(1))}s`}else if(t>=1e6){let e=t/1e6;return`${Number(e.toFixed(1))}ms`}else if(t>=1e3){let e=t/1e3;return`${Number(e.toFixed(1))}\xB5s`}else return`${Number(t.toFixed(1))}ns`},Rf=t=>t===!0?[/localhost/,/^\//,new RegExp(window.location.host)]:Array.isArray(t)?t.map(e=>typeof e=="string"?new RegExp(e):e):/^$/,gG=30,bG=()=>new Promise(t=>requestAnimationFrame(e=>requestAnimationFrame(n=>t(n-e)))),vG=()=>Do(void 0,null,function*(){let t=[];for(let e=0;e<gG;e++)t.push(yield bG());return t.reduce((e,n)=>e+n,0)/t.length}),wG=(t,e)=>{let n={},r=16.666666666666668;vG().then(c=>r=c);let i=c=>{var l;n!=null&&n.event||(n={event:c,location:window.location.href,timerStart:(l=window.performance)==null?void 0:l.now()},window.requestAnimationFrame(o))},o=()=>{if(!(n!=null&&n.timerStart))return;let c=window.performance.now()-n.timerStart-r;s(c),n={}},s=c=>{let l=(new Date().getTime()-e)/1e3;t({relativeTimestamp:l,jankAmount:c,querySelector:a(),newLocation:window.location.href!=n.location?window.location.href:void 0})},a=()=>{var c;return(c=n==null?void 0:n.event)!=null&&c.target?iR(n.event.target):""};return window.addEventListener("click",i,!0),window.addEventListener("keydown",i,!0),()=>{window.removeEventListener("keydown",i,!0),window.removeEventListener("click",i,!0)}},SG=typeof window<"u",Cf=SG&&"performance"in window&&"memory"in performance?performance:{memory:{}},IG=(t,e)=>{let n=0,r=0,i=()=>{let l=(new Date().getTime()-e)/1e3,u=Cf.memory.jsHeapSizeLimit||0,h=Cf.memory.usedJSHeapSize||0;t({jsHeapSizeLimit:u,usedJSHeapSize:h,relativeTimestamp:l,fps:n})};i();let o;o=setInterval(()=>{i()},1e3);let s=0,a=Date.now(),c=function(){var l=Date.now();s++,l>1e3+a&&(n=Math.round(s*1e3/(l-a)),s=0,a=l),r=requestAnimationFrame(c)};return c(),()=>{clearInterval(o),cancelAnimationFrame(r)}},Je,Xr,Jy,Wo,ic,Dy=-1,wn=function(t){addEventListener("pageshow",function(e){e.persisted&&(Dy=e.timeStamp,t(e))},!0)},Zc=function(){return window.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]},jo=function(){var t=Zc();return t&&t.activationStart||0},te=function(t,e){var n=Zc(),r="navigate";return Dy>=0?r="back-forward-cache":n&&(document.prerendering||jo()>0?r="prerender":document.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:t,value:e===void 0?-1:e,rating:"good",delta:0,entries:[],id:"v3-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:r}},zn=function(t,e,n){try{if(PerformanceObserver.supportedEntryTypes.includes(t)){var r=new PerformanceObserver(function(i){Promise.resolve().then(function(){e(i.getEntries())})});return r.observe(Object.assign({type:t,buffered:!0},n||{})),r}}catch(i){}},ee=function(t,e,n,r){var i,o;return function(s){e.value>=0&&(s||r)&&((o=e.value-(i||0))||i===void 0)&&(i=e.value,e.delta=o,e.rating=(function(a,c){return a>c[1]?"poor":a>c[0]?"needs-improvement":"good"})(e.value,n),t(e))}},kc=function(t){requestAnimationFrame(function(){return requestAnimationFrame(function(){return t()})})},Qo=function(t){var e=function(n){n.type!=="pagehide"&&document.visibilityState!=="hidden"||t(n)};addEventListener("visibilitychange",e,!0),addEventListener("pagehide",e,!0)},Vc=function(t){var e=!1;return function(n){e||(t(n),e=!0)}},Fn=-1,Zf=function(){return document.visibilityState!=="hidden"||document.prerendering?1/0:0},Uo=function(t){document.visibilityState==="hidden"&&Fn>-1&&(Fn=t.type==="visibilitychange"?t.timeStamp:0,TG())},kf=function(){addEventListener("visibilitychange",Uo,!0),addEventListener("prerenderingchange",Uo,!0)},TG=function(){removeEventListener("visibilitychange",Uo,!0),removeEventListener("prerenderingchange",Uo,!0)},xc=function(){return Fn<0&&(Fn=Zf(),kf(),wn(function(){setTimeout(function(){Fn=Zf(),kf()},0)})),{get firstHiddenTime(){return Fn}}},zr=function(t){document.prerendering?addEventListener("prerenderingchange",function(){return t()},!0):t()},Vf=[1800,3e3],Yy=function(t,e){e=e||{},zr(function(){var n,r=xc(),i=te("FCP"),o=zn("paint",function(s){s.forEach(function(a){a.name==="first-contentful-paint"&&(o.disconnect(),a.startTime<r.firstHiddenTime&&(i.value=Math.max(a.startTime-jo(),0),i.entries.push(a),n(!0)))})});o&&(n=ee(t,i,Vf,e.reportAllChanges),wn(function(s){i=te("FCP"),n=ee(t,i,Vf,e.reportAllChanges),kc(function(){i.value=performance.now()-s.timeStamp,n(!0)})}))})},xf=[.1,.25],EG=function(t,e){e=e||{},Yy(Vc(function(){var n,r=te("CLS",0),i=0,o=[],s=function(c){c.forEach(function(l){if(!l.hadRecentInput){var u=o[0],h=o[o.length-1];i&&l.startTime-h.startTime<1e3&&l.startTime-u.startTime<5e3?(i+=l.value,o.push(l)):(i=l.value,o=[l])}}),i>r.value&&(r.value=i,r.entries=o,n())},a=zn("layout-shift",s);a&&(n=ee(t,r,xf,e.reportAllChanges),Qo(function(){s(a.takeRecords()),n(!0)}),wn(function(){i=0,r=te("CLS",0),n=ee(t,r,xf,e.reportAllChanges),kc(function(){return n()})}),setTimeout(n,0))}))},Vr={passive:!0,capture:!0},RG=new Date,Nf=function(t,e){Je||(Je=e,Xr=t,Jy=new Date,_y(removeEventListener),Ky())},Ky=function(){if(Xr>=0&&Xr<Jy-RG){var t={entryType:"first-input",name:Je.type,target:Je.target,cancelable:Je.cancelable,startTime:Je.timeStamp,processingStart:Je.timeStamp+Xr};Wo.forEach(function(e){e(t)}),Wo=[]}},CG=function(t){if(t.cancelable){var e=(t.timeStamp>1e12?new Date:performance.now())-t.timeStamp;t.type=="pointerdown"?(function(n,r){var i=function(){Nf(n,r),s()},o=function(){s()},s=function(){removeEventListener("pointerup",i,Vr),removeEventListener("pointercancel",o,Vr)};addEventListener("pointerup",i,Vr),addEventListener("pointercancel",o,Vr)})(e,t):Nf(e,t)}},_y=function(t){["mousedown","keydown","touchstart","pointerdown"].forEach(function(e){return t(e,CG,Vr)})},Of=[100,300],ZG=function(t,e){e=e||{},zr(function(){var n,r=xc(),i=te("FID"),o=function(c){c.startTime<r.firstHiddenTime&&(i.value=c.processingStart-c.startTime,i.entries.push(c),n(!0))},s=function(c){c.forEach(o)},a=zn("first-input",s);n=ee(t,i,Of,e.reportAllChanges),a&&Qo(Vc(function(){s(a.takeRecords()),a.disconnect()})),a&&wn(function(){var c;i=te("FID"),n=ee(t,i,Of,e.reportAllChanges),Wo=[],Xr=-1,Je=null,_y(addEventListener),c=o,Wo.push(c),Ky()})})},Hy=0,Tl=1/0,ao=0,kG=function(t){t.forEach(function(e){e.interactionId&&(Tl=Math.min(Tl,e.interactionId),ao=Math.max(ao,e.interactionId),Hy=ao?(ao-Tl)/7+1:0)})},zy=function(){return ic?Hy:performance.interactionCount||0},VG=function(){"interactionCount"in performance||ic||(ic=zn("event",kG,{type:"event",buffered:!0,durationThreshold:0}))},Gf=[200,500],By=0,Lf=function(){return zy()-By},ge=[],El={},Xf=function(t){var e=ge[ge.length-1],n=El[t.interactionId];if(n||ge.length<10||t.duration>e.latency){if(n)n.entries.push(t),n.latency=Math.max(n.latency,t.duration);else{var r={id:t.interactionId,latency:t.duration,entries:[t]};El[r.id]=r,ge.push(r)}ge.sort(function(i,o){return o.latency-i.latency}),ge.splice(10).forEach(function(i){delete El[i.id]})}},xG=function(t,e){e=e||{},zr(function(){var n;VG();var r,i=te("INP"),o=function(a){a.forEach(function(u){u.interactionId&&Xf(u),u.entryType==="first-input"&&!ge.some(function(h){return h.entries.some(function(p){return u.duration===p.duration&&u.startTime===p.startTime})})&&Xf(u)});var c,l=(c=Math.min(ge.length-1,Math.floor(Lf()/50)),ge[c]);l&&l.latency!==i.value&&(i.value=l.latency,i.entries=l.entries,r())},s=zn("event",o,{durationThreshold:(n=e.durationThreshold)!==null&&n!==void 0?n:40});r=ee(t,i,Gf,e.reportAllChanges),s&&("interactionId"in PerformanceEventTiming.prototype&&s.observe({type:"first-input",buffered:!0}),Qo(function(){o(s.takeRecords()),i.value<0&&Lf()>0&&(i.value=0,i.entries=[]),r(!0)}),wn(function(){ge=[],By=zy(),i=te("INP"),r=ee(t,i,Gf,e.reportAllChanges)}))})},Wf=[2500,4e3],Rl={},NG=function(t,e){e=e||{},zr(function(){var n,r=xc(),i=te("LCP"),o=function(c){var l=c[c.length-1];l&&l.startTime<r.firstHiddenTime&&(i.value=Math.max(l.startTime-jo(),0),i.entries=[l],n())},s=zn("largest-contentful-paint",o);if(s){n=ee(t,i,Wf,e.reportAllChanges);var a=Vc(function(){Rl[i.id]||(o(s.takeRecords()),s.disconnect(),Rl[i.id]=!0,n(!0))});["keydown","click"].forEach(function(c){addEventListener(c,function(){return setTimeout(a,0)},!0)}),Qo(a),wn(function(c){i=te("LCP"),n=ee(t,i,Wf,e.reportAllChanges),kc(function(){i.value=performance.now()-c.timeStamp,Rl[i.id]=!0,n(!0)})})}})},Uf=[800,1800],OG=function t(e){document.prerendering?zr(function(){return t(e)}):document.readyState!=="complete"?addEventListener("load",function(){return t(e)},!0):setTimeout(e,0)},GG=function(t,e){e=e||{};var n=te("TTFB"),r=ee(t,n,Uf,e.reportAllChanges);OG(function(){var i=Zc();if(i){var o=i.responseStart;if(o<=0||o>performance.now())return;n.value=Math.max(o-jo(),0),n.entries=[i],r(!0),wn(function(){n=te("TTFB",0),(r=ee(t,n,Uf,e.reportAllChanges))(!0)})}})},LG=t=>(EG(t),Yy(t),ZG(t),NG(t),GG(t),xG(t),()=>{}),Pn=typeof navigator<"u"&&"connection"in navigator?navigator.connection:{},XG=(t,e)=>{let n=()=>{let i=(new Date().getTime()-e)/1e3;t({relativeTimestamp:i,downlink:Pn.downlink,downlinkMax:Pn.downlinkMax,effectiveType:Pn.effectiveType,rtt:Pn.rtt,saveData:Pn.saveData,type:Pn.type})};n();let r;return r=setInterval(()=>{n()},1e3),()=>{clearInterval(r)}},WG=()=>{if(!("performance"in window&&"memory"in performance))return{getDeviceDetails:void 0,getCurrentDeviceDetails:void 0};let t=window.performance;return{getDeviceDetails:()=>({deviceMemory:UG(navigator.deviceMemory||0)}),getCurrentDeviceDetails:()=>{let e=Cl(t.memory.jsHeapSizeLimit),n=Cl(t.memory.totalJSHeapSize),r=Cl(t.memory.usedJSHeapSize);return{jsHeapSizeLimit:e,totalJSHeapSize:n,usedJSHeapSize:r}}}},Cl=t=>t/Math.pow(1e3,2),UG=t=>1024*t,PG="launchdarkly.js.log",MG="log.severity",FG="log.message",Pf="launchdarkly.sampling.ratio";function AG(t){return"regexValue"in t}function JG(t){return"matchValue"in t}function DG(t){let e=Math.trunc(t);return e===1?!0:e===0?!1:Math.floor(Math.random()*e)===0}var oc=class{constructor(e=DG){yt(this,"regexCache",new Map),yt(this,"config"),this.sampler=e}setConfig(e){this.config=e}isSamplingEnabled(){var e,n,r,i;return!!((n=(e=this.config)==null?void 0:e.logs)!=null&&n.length||(i=(r=this.config)==null?void 0:r.spans)!=null&&i.length)}shouldSample(e){var n,r;return e.name===PG?this.sampleLog((n=this.config)==null?void 0:n.logs,e):this.sampleSpan((r=this.config)==null?void 0:r.spans,e)}matchesValue(e,n){if(!e)return!1;if(JG(e))return e.matchValue===n;if(AG(e)){let r=e.regexValue;if(r===null)return!1;this.regexCache.has(r)||this.regexCache.set(r,new RegExp(r));let i=this.regexCache.get(r);if(typeof n=="string")return i.test(n)}return!1}matchesAttributes(e,n){if(e)for(let r of e){let i=!1;for(let o of Object.keys(n))if(this.matchesValue(r.key,o)){let s=n[o];if(this.matchesValue(r.attribute,s)){i=!0;break}}if(!i)return!1}return!0}matchEvent(e,n){return!(e.name&&!this.matchesValue(e.name,n.name)||e.attributes&&(!n.attributes||!this.matchesAttributes(e.attributes,n.attributes)))}matchesEvents(e,n){if(e)for(let r of e){let i=!1;for(let o of n)if(this.matchEvent(r,o)){i=!0;break}if(!i)return!1}return!0}matchesSpanConfig(e,n){return!(e.name&&!this.matchesValue(e.name,n.name)||!this.matchesAttributes(e.attributes,n.attributes)||!this.matchesEvents(e.events,n.events))}matchesLogConfig(e,n){if(e.severityText){let r=n[MG];if(typeof r=="string"&&!this.matchesValue(e.severityText,r))return!1}if(e.message){let r=n[FG];if(typeof r=="string"&&!this.matchesValue(e.message,r))return!1}return!!this.matchesAttributes(e.attributes,n)}sampleSpan(e,n){if(e){for(let r of e)if(this.matchesSpanConfig(r,n))return{sample:this.sampler(r.samplingRatio),attributes:{[Pf]:r.samplingRatio}}}return{sample:!0}}sampleLog(e,n){if(e){for(let r of e)if(this.matchesLogConfig(r,n.attributes))return{sample:this.sampler(r.samplingRatio),attributes:{[Pf]:r.samplingRatio}}}return{sample:!0}}},Mf=()=>{let t={end:()=>{},spanContext:()=>({traceId:"",spanId:"",traceFlags:0}),setAttribute:(e,n)=>t,setAttributes:e=>t,addEvent:(e,n,r)=>t,addLinks:e=>t,setStatus:e=>t,recordException:()=>{},addLink:()=>t,updateName:()=>t,isRecording:()=>!1};return t},sc=class{constructor(e){yt(this,"organizationID"),yt(this,"_integrations",[]),yt(this,"_gauges",new Map),yt(this,"_counters",new Map),yt(this,"_histograms",new Map),yt(this,"_up_down_counters",new Map),yt(this,"sampler",new oc),yt(this,"graphqlSDK"),typeof e.projectId=="string"?this.organizationID=e.projectId:this.organizationID=e.projectId.toString(),fG(Jt(mt({},e),{getIntegrations:()=>this.Vn}),this.sampler);let n=new oE(`${e.backendUrl}`,{headers:{}});this.graphqlSDK=ZE(n,AE()),this.configureSampling(),this.setupListeners(e)}configureSampling(){return Do(this,null,function*(){try{let e=yield this.graphqlSDK.GetSamplingConfig({organization_verbose_id:`${this.organizationID}`});this.sampler.setConfig(e.sampling)}catch(e){Ve("sampling","warn",`LaunchDarkly Observability: Failed to configure sampling: ${e}`)}})}recordLog(e,n,r){this.startSpan(dG,i=>{let o=typeof e=="string"?e:rn(e);i==null||i.addEvent("log",mt({"log.severity":n,"log.message":o},r)),n==="error"&&(i==null||i.recordException(new Error(o)),i==null||i.setStatus({code:ko.ERROR,message:o}))})}recordError(e,n,r,i,o){var s,a,c,l;e.cause&&(r=Jt(mt({},r),{"exception.cause":JSON.stringify(e.cause)}));let u=n?n+":"+e.message:e.message;o==="React.ErrorBoundary"&&(u="ErrorBoundary: "+u);let h=Yo(e),p={error:e,event:u,type:o!=null?o:"custom",url:window.location.href,source:i!=null?i:"",lineNumber:(s=h[0])!=null&&s.lineNumber?(a=h[0])==null?void 0:a.lineNumber:0,columnNumber:(c=h[0])!=null&&c.columnNumber?(l=h[0])==null?void 0:l.columnNumber:0,stackTrace:h,timestamp:new Date().toISOString()};this.startSpan("highlight.exception",f=>{f==null||f.recordException(e),f==null||f.setAttributes(mt({event:p.event,type:p.type,url:p.url,source:p.source,lineNumber:p.lineNumber,columnNumber:p.columnNumber},r))});for(let f of this.Vn)f.error(Fe(),p)}recordCount(e){let n=Ze.getMeter(so),r=this._a.get(e.name);r||(r=n.createCounter(e.name),this._a.set(e.name,r)),r.add(e.value,Jt(mt({},e.attributes),{"highlight.session_id":Fe()}))}recordGauge(e){var n,r,i;let o=Ze.getMeter(so),s=this.Ha.get(e.name);s||(s=o.createGauge(e.name),this.Ha.set(e.name,s)),s.record(e.value,Jt(mt({},e.attributes),{"highlight.session_id":Fe()}));let a={name:e.name,value:e.value,category:(n=e.attributes)==null?void 0:n.category,group:(i=(r=e.attributes)==null?void 0:r.group)==null?void 0:i.toString(),tags:e.attributes?Object.entries(e.attributes).map(([c,l])=>{var u;return{name:c!=null?c:"",value:(u=l==null?void 0:l.toString())!=null?u:""}}):[]};for(let c of this.Vn)c.recordGauge(Fe(),a)}recordIncr(e){this.recordCount(Jt(mt({},e),{value:1}))}recordHistogram(e){let n=Ze.getMeter(so),r=this.za.get(e.name);r||(r=n.createHistogram(e.name),this.za.set(e.name,r)),r.record(e.value,Jt(mt({},e.attributes),{"highlight.session_id":Fe()}))}recordUpDownCounter(e){let n=Ze.getMeter(so),r=this.Ba.get(e.name);r||(r=n.createUpDownCounter(e.name),this.Ba.set(e.name,r)),r.add(e.value,Jt(mt({},e.attributes),{"highlight.session_id":Fe()}))}startSpan(e,n,r,i){let o=Sf();if(!o){let a=Mf();return i===void 0&&r===void 0?n(a):i===void 0?r(a):i(a)}let s=(a,c)=>{let l=c(a);return l instanceof Promise?l.finally(()=>a.end()):(a.end(),l)};return i===void 0&&r===void 0?o.startActiveSpan(e,a=>s(a,n)):i===void 0?o.startActiveSpan(e,n,a=>s(a,r)):o.startActiveSpan(e,n,r,a=>s(a,i))}startManualSpan(e,n,r,i){let o=Sf();if(!o){let s=Mf();return i===void 0&&r===void 0?n(s):i===void 0?r(s):i(s)}return i===void 0&&r===void 0?o.startActiveSpan(e,n):i===void 0?o.startActiveSpan(e,n,r):o.startActiveSpan(e,n,r,i)}register(e,n){this.Vn.push(new rR(e,n))}getHooks(e){return this.Vn.flatMap(n=>{var r,i;return(i=(r=n.getHooks)==null?void 0:r.call(n,e))!=null?i:[]})}submitViewportMetrics({height:e,width:n,availHeight:r,availWidth:i}){this.recordGauge({name:tn.ViewportHeight,value:e,attributes:{category:Bt.Device,group:window.location.href}}),this.recordGauge({name:tn.ViewportWidth,value:n,attributes:{category:Bt.Device,group:window.location.href}}),this.recordGauge({name:tn.ScreenHeight,value:r,attributes:{category:Bt.Device,group:window.location.href}}),this.recordGauge({name:tn.ScreenWidth,value:i,attributes:{category:Bt.Device,group:window.location.href}}),this.recordGauge({name:tn.ViewportArea,value:e*n,attributes:{category:Bt.Device,group:window.location.href}})}setupListeners(e){var n;e.disableConsoleRecording||yR(i=>{var o,s,a,c,l;let u=Jt(mt({},i.attributes?{attributes:i.attributes}:{}),{type:i.type});if(e.reportConsoleErrors&&(i.type==="Error"||i.type==="error")&&i.value&&i.trace){let h=rn(i.value);if(vd.includes(h)||wd.some(f=>h.includes(f)))return;let p=new Error(h);p.stack=rn(i.trace.map(f=>f.toString())),u.url=window.location.href,u.source=(o=i.trace[0])==null?void 0:o.fileName,u.lineNumber=(a=(s=i.trace[0])==null?void 0:s.lineNumber)==null?void 0:a.toString(),u.columnNumber=(l=(c=i.trace[0])==null?void 0:c.columnNumber)==null?void 0:l.toString(),this.recordError(p,void 0,u,u.source,"console.error")}this.recordLog(rn(i.value),"error",{})},{level:(n=e.consoleMethodsToRecord)!=null?n:[],logger:"console",stringifyOptions:{depthOfLimit:10,numOfKeysLimit:100,stringLengthLimit:1e3}}),e.enablePerformanceRecording!==!1&&(IG(i=>{Object.entries(i).filter(([o])=>o!=="relativeTimestamp").forEach(([o,s])=>s&&this.recordGauge({name:o,value:s,attributes:{category:Bt.Performance,group:window.location.href}}))},0),wG(i=>{this.recordGauge({name:"Jank",value:i.jankAmount,attributes:{category:Bt.WebVital,group:i.querySelector}})},0)),bR(i=>{var o;if(vd.includes(i.event)||wd.some(c=>i.event.includes(c)))return;let s=new Error(i.event);s.stack=rn(i.stackTrace.map(c=>c.toString()));let a={};try{i.payload&&(a=JSON.parse(i.payload))}catch(c){}this.recordError((o=i.error)!=null?o:s,i.event,Jt(mt({},a),{lineNumber:i.lineNumber.toString(),columnNumber:i.columnNumber.toString(),source:i.source,url:i.url}),i.source,i.type)},{enablePromisePatch:!!e.enablePromisePatch}),LG(i=>{let{name:o,value:s}=i;this.recordGauge({name:o,value:s,attributes:{group:window.location.href,category:Bt.WebVital}})}),oR(i=>{this.submitViewportMetrics(i)}),XG(i=>{let o={category:Bt.Performance,group:window.location.href};i.saveData!==void 0&&(o.saveData=i.saveData.toString()),i.effectiveType!==void 0&&(o.effectiveType=i.effectiveType.toString()),i.type!==void 0&&(o.type=i.type.toString()),Object.entries(i).filter(([s])=>s!=="relativeTimestamp").forEach(([s,a])=>a&&typeof a=="number"&&this.recordGauge({name:s,value:a,attributes:o}))},new Date().getTime());let{getDeviceDetails:r}=WG();r&&this.recordGauge({name:tn.DeviceMemory,value:r().deviceMemory,attributes:{category:Bt.Device,group:window.location.href}})}},Po=class extends aR{constructor(e,n){var r=(...h)=>(super(...h),yt(this,"observe"),this),i,o,s,a,c,l,u;try{if(r(n),typeof window>"u"||typeof document>"u"){console.warn("@launchdarkly/observability is not initializing because it is not supported in this environment.");return}if(!e){console.warn("@launchdarkly/observability is not initializing because projectID was passed undefined.");return}let h={backendUrl:(i=n==null?void 0:n.backendUrl)!=null?i:"https://pub.observability.app.launchdarkly.com",otlpEndpoint:(s=(o=n==null?void 0:n.otel)==null?void 0:o.otlpEndpoint)!=null?s:"https://otel.observability.app.launchdarkly.com",projectId:e,sessionSecureId:this.sessionSecureID,environment:(a=n==null?void 0:n.environment)!=null?a:"production",networkRecordingOptions:typeof(n==null?void 0:n.networkRecording)=="object"?n.networkRecording:void 0,tracingOrigins:n==null?void 0:n.tracingOrigins,serviceName:(c=n==null?void 0:n.serviceName)!=null?c:"browser",instrumentations:(l=n==null?void 0:n.otel)==null?void 0:l.instrumentations,eventNames:(u=n==null?void 0:n.otel)==null?void 0:u.eventNames};this.observe=new sc(h),ln.load(this.observe)}catch(h){Ve("Error initializing @launchdarkly/observability SDK","error",h)}}getMetadata(){return{name:"@launchdarkly/observability"}}register(e,n){var r;(r=this.observe)==null||r.register(e,n)}getHooks(e){var n,r;let i=mt(mt({[y1]:e.sdk.name,[g1]:e.sdk.version,[DE]:e.clientSideId,[zE]:"LaunchDarkly"},(n=e.application)!=null&&n.id?{[jE]:e.application.id}:{}),(r=e.application)!=null&&r.version?{[QE]:e.application.version}:{});return[{getMetadata:()=>({name:"@launchdarkly/observability/hooks"}),afterIdentify:(o,s,a)=>{var c,l,u,h,p;for(let f of(u=(l=(c=this.observe)==null?void 0:c.getHooks)==null?void 0:l.call(c,e))!=null?u:[])(h=f.afterIdentify)==null||h.call(f,o,s,a);return(p=this.observe)==null||p.recordLog("LD.identify","info",Jt(mt({},i),{key:dd(o.context),context:JSON.stringify(fd(o.context)),timeout:o.timeout,[eR]:a.status})),s},afterEvaluation:(o,s,a)=>{var c,l,u,h,p;for(let d of(u=(l=(c=this.observe)==null?void 0:c.getHooks)==null?void 0:l.call(c,e))!=null?u:[])(h=d.afterEvaluation)==null||h.call(d,o,s,a);let f=mt({[YE]:o.flagKey,[HE]:JSON.stringify(a.value)},a.variationIndex?{[BE]:a.variationIndex}:{});if(a.reason)for(let d in hd){let v=d,g=a.reason[v];g&&(f[hd[v]]=g)}o.context&&(f[KE]=JSON.stringify(fd(o.context)),f[_E]=dd(o.context));let m=mt(mt({},i),f);return(p=this.observe)==null||p.startSpan(JE,d=>{d&&d.addEvent(Lt,m)}),s},afterTrack:o=>{var s,a,c,l,u;for(let h of(c=(a=(s=this.observe)==null?void 0:s.getHooks)==null?void 0:a.call(s,e))!=null?c:[])(l=h.afterTrack)==null||l.call(h,o);(u=this.observe)==null||u.recordLog("LD.track","info",mt(Jt(mt({},i),{key:o.key,value:o.metricValue}),typeof o.data=="object"?o.data:{}))}}]}};Nc();function SJ(t,e,n){var i,o;let r=Ah(Fh({},n),{plugins:[...(n==null?void 0:n.plugins)||[],new Po((i=n==null?void 0:n.tmpProjectId)!=null?i:"1",n==null?void 0:n.observability),new Ci((o=n==null?void 0:n.tmpProjectId)!=null?o:"1",n==null?void 0:n.sessionReplay)]});return nd(t,e,r)}export{ln as LDObserve,In as LDRecord,QF as basicLogger,SJ as createClient};
642
+ `,Ef(l,e),`To resolve the conflict:
643
+ `,Rf(l,e))}}catch(u){r={error:u}}finally{try{a&&!a.done&&(i=s.return)&&i.call(s)}finally{if(r)throw r.error}}return o},t})(),uN=(function(){function t(e){this.ka=e}return t.prototype.record=function(e,n,r,i){this.ka.forEach(function(o){o.record(e,n,r,i)})},t})(),hN=(function(){function t(e,n){this.es=e,this.Va=n,this.Or=new hn}return t.prototype.observe=function(e,n){if(n===void 0&&(n={}),typeof e!="number"){X.warn("non-number value provided to metric "+this.es+": "+e);return}this.Va===Ye.INT&&!Number.isInteger(e)&&(X.warn("INT value type cannot accept a floating-point value for "+this.es+", ignoring the fractional digits."),e=Math.trunc(e),!Number.isInteger(e))||this.Or.set(n,e)},t})(),pN=(function(){function t(){this.Or=new Map}return t.prototype.observe=function(e,n,r){if(r===void 0&&(r={}),!!rc(e)){var i=this.Or.get(e);if(i==null&&(i=new hn,this.Or.set(e,i)),typeof n!="number"){X.warn("non-number value provided to metric "+e.qe.name+": "+n);return}e.qe.valueType===Ye.INT&&!Number.isInteger(n)&&(X.warn("INT value type cannot accept a floating-point value for "+e.qe.name+", ignoring the fractional digits."),n=Math.trunc(n),!Number.isInteger(n))||i.set(r,n)}},t})(),Zl=function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(u){try{l(r.next(u))}catch(h){s(h)}}function c(u){try{l(r.throw(u))}catch(h){s(h)}}function l(u){u.done?o(u.value):i(u.value).then(a,c)}l((r=r.apply(t,[])).next())})},kl=function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(u){l=[6,u],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},Cf=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},Zf=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},dN=(function(){function t(){this.bi=[],this.vi=[]}return t.prototype.addCallback=function(e,n){var r=this.ns(e,n);r>=0||this.bi.push({callback:e,instrument:n})},t.prototype.removeCallback=function(e,n){var r=this.ns(e,n);r<0||this.bi.splice(r,1)},t.prototype.addBatchCallback=function(e,n){var r=new Set(n.filter(rc));if(r.size===0){X.error("BatchObservableCallback is not associated with valid instruments",n);return}var i=this.rs(e,r);i>=0||this.vi.push({callback:e,instruments:r})},t.prototype.removeBatchCallback=function(e,n){var r=new Set(n.filter(rc)),i=this.rs(e,r);i<0||this.vi.splice(i,1)},t.prototype.observe=function(e,n){return Zl(this,void 0,void 0,function(){var r,i,o,s;return kl(this,function(a){switch(a.label){case 0:return r=this.xa(e,n),i=this.Oa(e,n),[4,Qx(Zf(Zf([],Cf(r),!1),Cf(i),!1))];case 1:return o=a.sent(),s=o.filter($x).map(function(c){return c.reason}),[2,s]}})})},t.prototype.xa=function(e,n){var r=this;return this.bi.map(function(i){var o=i.callback,s=i.instrument;return Zl(r,void 0,void 0,function(){var a,c;return kl(this,function(l){switch(l.label){case 0:return a=new hN(s.qe.name,s.qe.valueType),c=Promise.resolve(o(a)),n!=null&&(c=Yr(c,n)),[4,c];case 1:return l.sent(),s.Qo.forEach(function(u){u.record(a.Or,e)}),[2]}})})})},t.prototype.Oa=function(e,n){var r=this;return this.vi.map(function(i){var o=i.callback,s=i.instruments;return Zl(r,void 0,void 0,function(){var a,c;return kl(this,function(l){switch(l.label){case 0:return a=new pN,c=Promise.resolve(o(a)),n!=null&&(c=Yr(c,n)),[4,c];case 1:return l.sent(),s.forEach(function(u){var h=a.Or.get(u);h!=null&&u.Qo.forEach(function(p){p.record(h,e)})}),[2]}})})})},t.prototype.ns=function(e,n){return this.bi.findIndex(function(r){return r.callback===e&&r.instrument===n})},t.prototype.rs=function(e,n){return this.vi.findIndex(function(r){return r.callback===e&&qx(r.instruments,n)})},t})(),fN=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),mN=(function(t){fN(e,t);function e(n,r,i,o,s){var a=t.call(this,n)||this;return a.no=i,a.ro=s,a.$r=new Ky(r,a.ro),a.io=new _y(r,o),a}return e.prototype.record=function(n,r,i,o){r=this.no.process(r,i),this.$r.record(n,r,i,o)},e.prototype.collect=function(n,r){var i=this.$r.collect();return this.io.buildMetrics(n,this.Yn,i,r)},e})(Yy),Hy=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),Nc=(function(){function t(){}return t.Noop=function(){return gN},t})(),yN=(function(t){Hy(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.process=function(n,r){return n},e})(Nc);(function(t){Hy(e,t);function e(n){var r=t.call(this)||this;return r.Na=n,r}return e.prototype.process=function(n,r){var i=this,o={};return Object.keys(n).filter(function(s){return i.Na.includes(s)}).forEach(function(s){return o[s]=n[s]}),o},e})(Nc);var gN=new yN,bN=function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(u){try{l(r.next(u))}catch(h){s(h)}}function c(u){try{l(r.throw(u))}catch(h){s(h)}}function l(u){u.done?o(u.value):i(u.value).then(a,c)}l((r=r.apply(t,[])).next())})},vN=function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(u){l=[6,u],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},wN=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},SN=(function(){function t(e,n){this.so=e,this.ss=n,this.metricStorageRegistry=new cN,this.observableRegistry=new dN,this.meter=new QO(this)}return t.prototype.registerMetricStorage=function(e){var n=this.ls(e,mN);return n.length===1?n[0]:new uN(n)},t.prototype.registerAsyncMetricStorage=function(e){var n=this.ls(e,iN);return n},t.prototype.collect=function(e,n,r){return bN(this,void 0,void 0,function(){var i,o,s;return vN(this,function(a){switch(a.label){case 0:return[4,this.observableRegistry.observe(n,r==null?void 0:r.timeoutMillis)];case 1:return i=a.sent(),o=this.metricStorageRegistry.getStorages(e),o.length===0?[2,null]:(s=o.map(function(c){return c.collect(e,n)}).filter(Bx),s.length===0?[2,{errors:i}]:[2,{scopeMetrics:{scope:this.ss,metrics:s},errors:i}])}})})},t.prototype.ls=function(e,n){var r=this,i=this.so.viewRegistry.findViews(e,this.ss),o=i.map(function(c){var l=rO(c,e),u=r.metricStorageRegistry.findOrUpdateCompatibleStorage(l);if(u!=null)return u;var h=c.aggregation.createAggregator(l),p=new n(l,h,c.attributesProcessor,r.so.metricCollectors,c.aggregationCardinalityLimit);return r.metricStorageRegistry.register(p),p});if(o.length===0){var s=this.so.selectAggregations(e.type),a=s.map(function(c){var l=wN(c,2),u=l[0],h=l[1],p=r.metricStorageRegistry.findOrUpdateCompatibleCollectorStorage(u,e);if(p!=null)return p;var f=h.createAggregator(e),m=u.selectCardinalityLimit(e.type),d=new n(e,f,Nc.Noop(),[u],m);return r.metricStorageRegistry.registerForCollector(u,d),d});o=o.concat(a)}return o},t})(),IN=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},TN=(function(){function t(e){this.resource=e,this.viewRegistry=new DO,this.metricCollectors=[],this.meterSharedStates=new Map}return t.prototype.getMeterSharedState=function(e){var n=jx(e),r=this.meterSharedStates.get(n);return r==null&&(r=new SN(this,e),this.meterSharedStates.set(n,r)),r},t.prototype.selectAggregations=function(e){var n,r,i=[];try{for(var o=IN(this.metricCollectors),s=o.next();!s.done;s=o.next()){var a=s.value;i.push([a,a.selectAggregation(e)])}}catch(c){n={error:c}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i},t})(),ao=function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(u){try{l(r.next(u))}catch(h){s(h)}}function c(u){try{l(r.throw(u))}catch(h){s(h)}}function l(u){u.done?o(u.value):i(u.value).then(a,c)}l((r=r.apply(t,[])).next())})},lo=function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(u){l=[6,u],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},EN=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},RN=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},CN=(function(){function t(e,n){this._n=e,this.qr=n}return t.prototype.collect=function(e){return ao(this,void 0,void 0,function(){var n,r,i,o,s=this;return lo(this,function(a){switch(a.label){case 0:return n=qt(Date.now()),r=[],i=[],o=Array.from(this._n.meterSharedStates.values()).map(function(c){return ao(s,void 0,void 0,function(){var l;return lo(this,function(u){switch(u.label){case 0:return[4,c.collect(this,n,e)];case 1:return l=u.sent(),(l==null?void 0:l.scopeMetrics)!=null&&r.push(l.scopeMetrics),(l==null?void 0:l.errors)!=null&&i.push.apply(i,RN([],EN(l.errors),!1)),[2]}})})}),[4,Promise.all(o)];case 1:return a.sent(),[2,{resourceMetrics:{resource:this._n.resource,scopeMetrics:r},errors:i}]}})})},t.prototype.forceFlush=function(e){return ao(this,void 0,void 0,function(){return lo(this,function(n){switch(n.label){case 0:return[4,this.qr.forceFlush(e)];case 1:return n.sent(),[2]}})})},t.prototype.shutdown=function(e){return ao(this,void 0,void 0,function(){return lo(this,function(n){switch(n.label){case 0:return[4,this.qr.shutdown(e)];case 1:return n.sent(),[2]}})})},t.prototype.selectAggregationTemporality=function(e){return this.qr.selectAggregationTemporality(e)},t.prototype.selectAggregation=function(e){return this.qr.selectAggregation(e)},t.prototype.selectCardinalityLimit=function(e){var n,r,i;return(i=(r=(n=this.qr).selectCardinalityLimit)===null||r===void 0?void 0:r.call(n,e))!==null&&i!==void 0?i:2e3},t})(),kf=function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(u){try{l(r.next(u))}catch(h){s(h)}}function c(u){try{l(r.throw(u))}catch(h){s(h)}}function l(u){u.done?o(u.value):i(u.value).then(a,c)}l((r=r.apply(t,[])).next())})},Vf=function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(u){l=[6,u],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},xf=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};function ZN(t,e){var n=e!=null?e:Dr.empty();return t?Dr.default().merge(n):n}var kN=(function(){function t(e){var n,r,i,o,s;if(this._e=!1,this._n=new TN(ZN((s=e==null?void 0:e.mergeResourceWithDefaults)!==null&&s!==void 0?s:!0,e==null?void 0:e.resource)),(e==null?void 0:e.views)!=null&&e.views.length>0)try{for(var a=xf(e.views),c=a.next();!c.done;c=a.next()){var l=c.value;this._n.viewRegistry.addView(l)}}catch(f){n={error:f}}finally{try{c&&!c.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}if((e==null?void 0:e.readers)!=null&&e.readers.length>0)try{for(var u=xf(e.readers),h=u.next();!h.done;h=u.next()){var p=h.value;this.addMetricReader(p)}}catch(f){i={error:f}}finally{try{h&&!h.done&&(o=u.return)&&o.call(u)}finally{if(i)throw i.error}}}return t.prototype.getMeter=function(e,n,r){return n===void 0&&(n=""),r===void 0&&(r={}),this._e?(X.warn("A shutdown MeterProvider cannot provide a Meter"),SC()):this._n.getMeterSharedState({name:e,version:n,schemaUrl:r.schemaUrl}).meter},t.prototype.addMetricReader=function(e){var n=new CN(this._n,e);e.setMetricProducer(n),this._n.metricCollectors.push(n)},t.prototype.shutdown=function(e){return kf(this,void 0,void 0,function(){return Vf(this,function(n){switch(n.label){case 0:return this._e?(X.warn("shutdown may only be called once per MeterProvider"),[2]):(this._e=!0,[4,Promise.all(this._n.metricCollectors.map(function(r){return r.shutdown(e)}))]);case 1:return n.sent(),[2]}})})},t.prototype.forceFlush=function(e){return kf(this,void 0,void 0,function(){return Vf(this,function(n){switch(n.label){case 0:return this._e?(X.warn("invalid attempt to force flush after MeterProvider shutdown"),[2]):[4,Promise.all(this._n.metricCollectors.map(function(r){return r.forceFlush(e)}))];case 1:return n.sent(),[2]}})})},t})();function VN(t,e){var n=Zy(e);return{resource:ky(t.resource),schemaUrl:void 0,scopeMetrics:xN(t.scopeMetrics,n)}}function xN(t,e){return Array.from(t.map(function(n){return{scope:Vy(n.scope),metrics:n.metrics.map(function(r){return ON(r,e)}),schemaUrl:n.scope.schemaUrl}}))}function ON(t,e){var n={name:t.descriptor.name,description:t.descriptor.description,unit:t.descriptor.unit},r=XN(t.aggregationTemporality);switch(t.dataPointType){case ve.SUM:n.sum={aggregationTemporality:r,isMonotonic:t.isMonotonic,dataPoints:Of(t,e)};break;case ve.GAUGE:n.gauge={dataPoints:Of(t,e)};break;case ve.HISTOGRAM:n.histogram={aggregationTemporality:r,dataPoints:GN(t,e)};break;case ve.EXPONENTIAL_HISTOGRAM:n.exponentialHistogram={aggregationTemporality:r,dataPoints:LN(t,e)};break}return n}function NN(t,e,n){var r={attributes:bn(t.attributes),startTimeUnixNano:n.encodeHrTime(t.startTime),timeUnixNano:n.encodeHrTime(t.endTime)};switch(e){case Ye.INT:r.asInt=t.value;break;case Ye.DOUBLE:r.asDouble=t.value;break}return r}function Of(t,e){return t.dataPoints.map(function(n){return NN(n,t.descriptor.valueType,e)})}function GN(t,e){return t.dataPoints.map(function(n){var r=n.value;return{attributes:bn(n.attributes),bucketCounts:r.buckets.counts,explicitBounds:r.buckets.boundaries,count:r.count,sum:r.sum,min:r.min,max:r.max,startTimeUnixNano:e.encodeHrTime(n.startTime),timeUnixNano:e.encodeHrTime(n.endTime)}})}function LN(t,e){return t.dataPoints.map(function(n){var r=n.value;return{attributes:bn(n.attributes),count:r.count,min:r.min,max:r.max,sum:r.sum,positive:{offset:r.positive.offset,bucketCounts:r.positive.bucketCounts},negative:{offset:r.negative.offset,bucketCounts:r.negative.bucketCounts},scale:r.scale,zeroCount:r.zeroCount,startTimeUnixNano:e.encodeHrTime(n.startTime),timeUnixNano:e.encodeHrTime(n.endTime)}})}function XN(t){switch(t){case le.DELTA:return 1;case le.CUMULATIVE:return 2}}function WN(t,e){return{resourceMetrics:t.map(function(n){return VN(n,e)})}}var UN=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},PN=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o};function MN(t,e){var n,r=t.spanContext(),i=t.status;return{traceId:e.encodeSpanContext(r.traceId),spanId:e.encodeSpanContext(r.spanId),parentSpanId:e.encodeOptionalSpanContext(t.parentSpanId),traceState:(n=r.traceState)===null||n===void 0?void 0:n.serialize(),name:t.name,kind:t.kind==null?0:t.kind+1,startTimeUnixNano:e.encodeHrTime(t.startTime),endTimeUnixNano:e.encodeHrTime(t.endTime),attributes:bn(t.attributes),droppedAttributesCount:t.droppedAttributesCount,events:t.events.map(function(o){return AN(o,e)}),droppedEventsCount:t.droppedEventsCount,status:{code:i.code,message:i.message},links:t.links.map(function(o){return FN(o,e)}),droppedLinksCount:t.droppedLinksCount}}function FN(t,e){var n;return{attributes:t.attributes?bn(t.attributes):[],spanId:e.encodeSpanContext(t.context.spanId),traceId:e.encodeSpanContext(t.context.traceId),traceState:(n=t.context.traceState)===null||n===void 0?void 0:n.serialize(),droppedAttributesCount:t.droppedAttributesCount||0}}function AN(t,e){return{attributes:t.attributes?bn(t.attributes):[],name:t.name,timeUnixNano:e.encodeHrTime(t.time),droppedAttributesCount:t.droppedAttributesCount||0}}function JN(t,e){var n=Zy(e);return{resourceSpans:YN(t,n)}}function DN(t){var e,n,r=new Map;try{for(var i=UN(t),o=i.next();!o.done;o=i.next()){var s=o.value,a=r.get(s.resource);a||(a=new Map,r.set(s.resource,a));var c=s.instrumentationLibrary.name+"@"+(s.instrumentationLibrary.version||"")+":"+(s.instrumentationLibrary.schemaUrl||""),l=a.get(c);l||(l=[],a.set(c,l)),l.push(s)}}catch(u){e={error:u}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return r}function YN(t,e){for(var n=DN(t),r=[],i=n.entries(),o=i.next();!o.done;){for(var s=PN(o.value,2),a=s[0],c=s[1],l=[],u=c.values(),h=u.next();!h.done;){var p=h.value;if(p.length>0){var f=p.map(function(d){return MN(d,e)});l.push({scope:Vy(p[0].instrumentationLibrary),spans:f,schemaUrl:p[0].instrumentationLibrary.schemaUrl})}h=u.next()}var m={resource:ky(a),scopeSpans:l,schemaUrl:void 0};r.push(m),o=i.next()}return r}var KN={serializeRequest:function(t){var e=WN([t],{useLongBits:!1}),n=new TextEncoder;return n.encode(JSON.stringify(e))},deserializeResponse:function(t){var e=new TextDecoder;return JSON.parse(e.decode(t))}},_N={serializeRequest:function(t){var e=JN(t,{useHex:!0,useLongBits:!1}),n=new TextEncoder;return n.encode(JSON.stringify(e))},deserializeResponse:function(t){var e=new TextDecoder;return JSON.parse(e.decode(t))}},HN=function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(u){try{l(r.next(u))}catch(h){s(h)}}function c(u){try{l(r.throw(u))}catch(h){s(h)}}function l(u){u.done?o(u.value):i(u.value).then(a,c)}l((r=r.apply(t,[])).next())})},zN=function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(u){l=[6,u],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},BN=5,jN=1e3,QN=5e3,$N=1.5,Nf=.2;function qN(){return Math.random()*(2*Nf)-Nf}var tG=(function(){function t(e){this.Er=e}return t.prototype.retry=function(e,n,r){var i=this;return new Promise(function(o,s){setTimeout(function(){i.Er.send(e,n).then(o,s)},r)})},t.prototype.send=function(e,n){var r;return HN(this,void 0,void 0,function(){var i,o,s,a,c,l,u;return zN(this,function(h){switch(h.label){case 0:return i=Date.now()+n,[4,this.Er.send(e,n)];case 1:o=h.sent(),s=BN,a=jN,h.label=2;case 2:return o.status==="retryable"&&s>0?(s--,c=Math.max(Math.min(a,QN)+qN(),0),a=a*$N,l=(r=o.retryInMillis)!==null&&r!==void 0?r:c,u=i-Date.now(),l>u?[2,o]:[4,this.retry(e,u,l)]):[3,4];case 3:return o=h.sent(),[3,2];case 4:return[2,o]}})})},t.prototype.shutdown=function(){return this.Er.shutdown()},t})();function zy(t){return new tG(t.transport)}function eG(t){var e=[429,502,503,504];return e.includes(t)}function nG(t){if(t!=null){var e=Number.parseInt(t,10);if(Number.isInteger(e))return e>0?e*1e3:-1;var n=new Date(t).getTime()-Date.now();return n>=0?n:0}}var rG=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},iG=(function(){function t(e){this.cs=e}return t.prototype.send=function(e,n){var r=this;return new Promise(function(i){var o=new XMLHttpRequest;o.timeout=n,o.open("POST",r.cs.url);var s=r.cs.headers();Object.entries(s).forEach(function(a){var c=rG(a,2),l=c[0],u=c[1];o.setRequestHeader(l,u)}),o.ontimeout=function(a){i({status:"failure",error:new Error("XHR request timed out")})},o.onreadystatechange=function(){o.status>=200&&o.status<=299?(X.debug("XHR success"),i({status:"success"})):o.status&&eG(o.status)?i({status:"retryable",retryInMillis:nG(o.getResponseHeader("Retry-After"))}):o.status!==0&&i({status:"failure",error:new Error("XHR request failed with non-retryable status")})},o.onabort=function(){i({status:"failure",error:new Error("XHR request aborted")})},o.onerror=function(){i({status:"failure",error:new Error("XHR request errored")})},o.send(e)})},t.prototype.shutdown=function(){},t})();function oG(t){return new iG(t)}var sG=(function(){function t(e){this.us=e}return t.prototype.send=function(e){var n=this;return new Promise(function(r){navigator.sendBeacon(n.us.url,new Blob([e],{type:n.us.blobType}))?(X.debug("SendBeacon success"),r({status:"success"})):r({status:"failure",error:new Error("SendBeacon failed")})})},t.prototype.shutdown=function(){},t})();function aG(t){return new sG(t)}function lG(t,e){return Ty(t,e,zy({transport:oG(t)}))}function cG(t,e){return Ty(t,e,zy({transport:aG({url:t.url,blobType:t.headers()["Content-Type"]})}))}var uG=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o};function hG(t){return function(){var e,n={};return Object.entries((e=t==null?void 0:t())!==null&&e!==void 0?e:{}).forEach(function(r){var i=uG(r,2),o=i[0],s=i[1];typeof s<"u"?n[o]=String(s):X.warn('Header "'+o+'" has invalid value ('+s+") and will be ignored")}),n}}var yn=function(){return yn=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},yn.apply(this,arguments)};function pG(t,e,n){var r=yn({},n()),i={};return function(){return e!=null&&Object.assign(i,e()),t!=null&&Object.assign(i,t()),Object.assign(i,r)}}function dG(t){if(t!=null)try{return new URL(t),t}catch(e){throw new Error("Configuration: Could not parse user-provided export URL: '"+t+"'")}}function fG(t,e,n){var r,i,o,s;return yn(yn({},kx(t,e,n)),{headers:pG(hG(t.headers),e.headers,n.headers),url:(i=(r=dG(t.url))!==null&&r!==void 0?r:e.url)!==null&&i!==void 0?i:n.url,agentOptions:(s=(o=t.agentOptions)!==null&&o!==void 0?o:e.agentOptions)!==null&&s!==void 0?s:n.agentOptions})}function mG(t,e){return yn(yn({},Vx()),{headers:function(){return t},url:"http://localhost:4318/"+e,agentOptions:{keepAlive:!0}})}function yG(t,e,n){return fG({url:t.url,timeoutMillis:t.timeoutMillis,headers:Zx(t.headers),concurrencyLimit:t.concurrencyLimit},{},mG(n,e))}function By(t,e,n,r){var i=!!t.headers||typeof navigator.sendBeacon!="function",o=yG(t,n,r);return i?lG(o,e):cG(o,e)}var gG=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),bG=(function(t){gG(e,t);function e(n){return n===void 0&&(n={}),t.call(this,By(n,_N,"v1/traces",{"Content-Type":"application/json"}))||this}return e})(Iy),Uo;(function(t){t[t.DELTA=0]="DELTA",t[t.CUMULATIVE=1]="CUMULATIVE",t[t.LOWMEMORY=2]="LOWMEMORY"})(Uo||(Uo={}));var vG=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),ic=function(){return le.CUMULATIVE},jy=function(t){switch(t){case K.COUNTER:case K.OBSERVABLE_COUNTER:case K.GAUGE:case K.HISTOGRAM:case K.OBSERVABLE_GAUGE:return le.DELTA;case K.UP_DOWN_COUNTER:case K.OBSERVABLE_UP_DOWN_COUNTER:return le.CUMULATIVE}},Qy=function(t){switch(t){case K.COUNTER:case K.HISTOGRAM:return le.DELTA;case K.GAUGE:case K.UP_DOWN_COUNTER:case K.OBSERVABLE_UP_DOWN_COUNTER:case K.OBSERVABLE_COUNTER:case K.OBSERVABLE_GAUGE:return le.CUMULATIVE}};function wG(){var t=Kn(),e=t.OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE.trim().toLowerCase();return e==="cumulative"?ic:e==="delta"?jy:e==="lowmemory"?Qy:(X.warn("OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE is set to '"+t.OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE+"', but only 'cumulative' and 'delta' are allowed. Using default ('cumulative') instead."),ic)}function SG(t){return t!=null?t===Uo.DELTA?jy:t===Uo.LOWMEMORY?Qy:ic:wG()}function IG(t){return t!=null&&t.aggregationPreference?t.aggregationPreference:function(e){return Ne.Default()}}var TG=(function(t){vG(e,t);function e(n,r){var i=t.call(this,n)||this;return i.Bi=IG(r),i.ji=SG(r==null?void 0:r.temporalityPreference),i}return e.prototype.selectAggregation=function(n){return this.Bi(n)},e.prototype.selectAggregationTemporality=function(n){return this.ji(n)},e})(Iy),EG=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),RG=(function(t){EG(e,t);function e(n){return t.call(this,By(n!=null?n:{},KN,"v1/metrics",{"Content-Type":"application/json"}),n)||this}return e})(TG);function CG(t,e){let n=t.spanContext();return{name:t.name,kind:t.kind,spanContext:()=>n,parentSpanId:t.parentSpanId,startTime:t.startTime,endTime:t.endTime,status:t.status,attributes:Qm(t.attributes,e),links:t.links,events:t.events,duration:t.duration,ended:t.ended,resource:t.resource,instrumentationLibrary:t.instrumentationLibrary,droppedAttributesCount:t.droppedAttributesCount,droppedEventsCount:t.droppedEventsCount,droppedLinksCount:t.droppedLinksCount}}function ZG(t,e){if(!e.isSamplingEnabled())return t;let n=[],r={},i={};for(let o of t){o.parentSpanId&&(i[o.parentSpanId]=i[o.parentSpanId]||[],i[o.parentSpanId].push(o.spanContext().spanId));let s=e.shouldSample(o);s.sample?s.attributes?r[o.spanContext().spanId]=CG(o,s.attributes):r[o.spanContext().spanId]=o:n.push(o.spanContext().spanId)}for(;n.length>0;){let o=n.shift(),s=i[o];if(s)for(let a of s)delete r[a],n.push(a)}return Object.values(r)}var oc=class extends bG{constructor(e,n){super(Dt(mt({},e),{headers:{}})),this.sampler=n}export(e,n){let r=ZG(e,this.sampler);if(r.length===0)return;let i=0,o=s=>{var a;if(s.code===kt.SUCCESS)return n({code:kt.SUCCESS});if(i++,i>vc)return console.error(`[@launchdarkly/observability] failed to export OTeL traces: ${(a=s.error)==null?void 0:a.message}`,s.error),n({code:kt.FAILED,error:s.error});new Promise(c=>setTimeout(c,wc+Sc*Math.pow(2,i))).then(()=>{var c;console.warn(`[@launchdarkly/observability] retry ${i}, failed to export OTeL traces: ${(c=s.error)==null?void 0:c.message}`,s.error),super.export(r,o)})};super.export(r,o)}},sc=class extends RG{constructor(e){super(Dt(mt({},e),{headers:{}}))}export(e,n){let r=0,i=o=>{var s;if(o.code===kt.SUCCESS)return n({code:kt.SUCCESS});if(r++,r>vc)return console.error(`[@launchdarkly/observability] failed to export OTeL metrics: ${(s=o.error)==null?void 0:s.message}`,o.error),n({code:kt.FAILED,error:o.error});new Promise(a=>setTimeout(a,wc+Sc*Math.pow(2,r))).then(()=>{var a;console.warn(`[@launchdarkly/observability] retry ${r}, failed to export OTeL metrics: ${(a=o.error)==null?void 0:a.message}`,o.error),super.export(e,i)})};super.export(e,i)}},kG="OT_ZONE_CONTEXT",VG="Navigation:",xG=["click","input","submit"];function OG(){return!1}var ac=class nn extends ay{constructor(e={}){var n;super(nn.moduleName,nn.version,e),yt(this,"_spansData",new WeakMap),yt(this,"_zonePatched"),yt(this,"_wrappedListeners",new WeakMap),yt(this,"_eventsSpanMap",new WeakMap),yt(this,"_eventNames"),yt(this,"_shouldPreventSpanCreation"),this.Ga=new Set((n=e==null?void 0:e.eventNames)!=null?n:xG),this.La=typeof(e==null?void 0:e.shouldPreventSpanCreation)=="function"?e.shouldPreventSpanCreation:OG}init(){}Xa(e,n){let r=this.Nr.get(n);r&&(e.source==="setTimeout"?r.hrTimeLastTimeout=fn():e.source!=="Promise.then"&&e.source!=="setTimeout"&&(r.hrTimeLastTimeout=void 0))}Wa(e){return this.Ga.has(e)}Tr(e,n){var r;let i=e==null?void 0:e.target,o=e==null?void 0:e.type;if(!(i instanceof HTMLElement)||!i.getAttribute||i.hasAttribute("disabled")||!this.Wa(o))return;let s=fy(i,!0);try{let a=this.tracer.startSpan(o,{attributes:{"event.type":o,"event.tag":i.tagName,"event.xpath":s,"event.id":i.id,"event.text":(r=i.textContent)!=null?r:"","event.url":window.location.href,"viewport.width":window.innerWidth,"viewport.height":window.innerHeight}},n?ut.setSpan(tt.active(),n):void 0);return e instanceof MouseEvent&&(a.setAttribute("event.x",e.clientX),a.setAttribute("event.y",e.clientY),a.setAttribute("event.relativeX",e.clientX/window.innerWidth),a.setAttribute("event.relativeY",e.clientY/window.innerHeight),o==="scroll"&&(a.setAttribute("event.scrollX",window.scrollX),a.setAttribute("event.scrollY",window.scrollY))),this.La(o,i,a)===!0?void 0:(this.Nr.set(a,{taskCount:0}),a)}catch(a){this.w.error("failed to start create new user interaction span",a)}}ao(e){let n=this.Nr.get(e);n&&(n.taskCount--,n.taskCount===0&&this.Ua(e,n.hrTimeLastTimeout))}wi(e){let n=e.get(kG);return n&&ut.getSpan(n)}hs(e){let n=this.Nr.get(e);n&&n.taskCount++}addPatchedListener(e,n,r,i){let o=this.lo.get(r);o||(o=new Map,this.lo.set(r,o));let s=o.get(n);return s||(s=new Map,o.set(n,s)),s.has(e)?!1:(s.set(e,i),!0)}removePatchedListener(e,n,r){let i=this.lo.get(r);if(!i)return;let o=i.get(n);if(!o)return;let s=o.get(e);return s&&(o.delete(e),o.size===0&&(i.delete(n),i.size===0&&this.lo.delete(r))),s}Si(e,n,r){return typeof e=="function"?e.apply(n,r):e.handleEvent(r[0])}Pa(){let e=this,n=new Map;return r=>function(i,o,s){if(!o)return r.call(this,i,o,s);let a=s&&typeof s=="object"&&s.once,c=function(...l){var u;let h,p=l[0];if(!(p!=null&&p.type))return e.Si(o,this,l);if(Date.now()-((u=n.get(p.type))!=null?u:0)<1e3/60)return e.Si(o,this,l);n.set(p.type,Date.now()),p&&(h=e.Ma.get(p)),a&&e.removePatchedListener(this,i,o);let f=e.Tr(p,h);return f?(p&&e.Ma.set(p,f),tt.with(ut.setSpan(tt.active(),f),()=>{let m=e.Si(o,this,l);return f.end(),m})):e.Si(o,this,l)};if(e.addPatchedListener(this,i,o,c))return r.call(this,i,c,s)}}Fa(){let e=this;return n=>function(r,i,o){let s=e.removePatchedListener(this,r,i);return s?n.call(this,r,s,o):n.call(this,r,i,o)}}ps(){return window.EventTarget?[EventTarget.prototype]:[Node.prototype,Window.prototype]}Aa(){this.ds(),this.ne(history,"replaceState",this.ti()),this.ne(history,"pushState",this.ti()),this.ne(history,"back",this.ti()),this.ne(history,"forward",this.ti()),this.ne(history,"go",this.ti())}ti(){let e=this;return n=>function(...r){let i=`${location.pathname}${location.hash}${location.search}`,o=n.apply(this,r),s=`${location.pathname}${location.hash}${location.search}`;return i!==s&&e.Ja(s),o}}ds(){Lt(history.replaceState)&&this.U(history,"replaceState"),Lt(history.pushState)&&this.U(history,"pushState"),Lt(history.back)&&this.U(history,"back"),Lt(history.forward)&&this.U(history,"forward"),Lt(history.go)&&this.U(history,"go")}Ja(e){let n=ut.getSpan(tt.active());n&&typeof n.updateName=="function"&&n.updateName(`${VG} ${e}`)}Da(){let e=this;return n=>function(r){let i=Zone.current,o=e.wi(i);return o&&e.co(r,i)&&e.ao(o),n.call(this,r)}}Ya(){let e=this;return n=>function(r){let i=Zone.current,o=e.wi(i);return o&&e.co(r,i)&&(e.hs(o),e.Xa(r,o)),n.call(this,r)}}Ka(){let e=this;return n=>function(r,i,o){let s=Array.isArray(o)&&o[0]instanceof Event?o[0]:void 0,a=s==null?void 0:s.target,c,l=this;if(a){if(c=e.Tr(s),c)return e.hs(c),l.run(()=>{try{return tt.with(ut.setSpan(tt.active(),c),()=>{let u=Zone.current;return r.fs=u,n.call(u,r,i,o)})}finally{e.ao(c)}})}else c=e.wi(l);try{return n.call(l,r,i,o)}finally{c&&e.co(r,l)&&e.ao(c)}}}co(e,n){if(e.fs&&(n=e.fs),!n||!e.data||e.data.isPeriodic)return!1;let r=this.wi(n);return!r||!this.Nr.get(r)?!1:e.type==="macroTask"||e.type==="microTask"}Ua(e,n){e&&this.Nr.get(e)&&(e.end(n),this.Nr.delete(e))}enable(){let e=this.ms();this.w.debug("applying patch to",nn.moduleName,nn.version,"zone:",!!e),e?(Lt(e.prototype.runTask)&&(this.U(e.prototype,"runTask"),this.w.debug("removing previous patch from method runTask")),Lt(e.prototype.scheduleTask)&&(this.U(e.prototype,"scheduleTask"),this.w.debug("removing previous patch from method scheduleTask")),Lt(e.prototype.cancelTask)&&(this.U(e.prototype,"cancelTask"),this.w.debug("removing previous patch from method cancelTask")),this.ys=!0,this.ne(e.prototype,"runTask",this.Ka()),this.ne(e.prototype,"scheduleTask",this.Ya()),this.ne(e.prototype,"cancelTask",this.Da())):(this.ys=!1,this.ps().forEach(n=>{Lt(n.addEventListener)&&(this.U(n,"addEventListener"),this.w.debug("removing previous patch from method addEventListener")),Lt(n.removeEventListener)&&(this.U(n,"removeEventListener"),this.w.debug("removing previous patch from method removeEventListener")),this.ne(n,"addEventListener",this.Pa()),this.ne(n,"removeEventListener",this.Fa())})),this.Aa()}disable(){let e=this.ms();this.w.debug("removing patch from",nn.moduleName,nn.version,"zone:",!!e),e&&this.ys?(Lt(e.prototype.runTask)&&this.U(e.prototype,"runTask"),Lt(e.prototype.scheduleTask)&&this.U(e.prototype,"scheduleTask"),Lt(e.prototype.cancelTask)&&this.U(e.prototype,"cancelTask")):this.ps().forEach(n=>{Lt(n.addEventListener)&&this.U(n,"addEventListener"),Lt(n.removeEventListener)&&this.U(n,"removeEventListener")}),this.ds()}ms(){return window.Zone}};yt(ac,"version","0.1.0"),yt(ac,"moduleName","user-interaction");var NG=ac,rn={},Fe,Po="highlight.record",GG="highlight.session_id",LG="launchdarkly.js.log",XG=(t,e)=>{var n,r,i,o,s,a,c,l,u;if(rn.tracerProvider!==void 0){console.warn("OTEL already initialized. Skipping...");return}Fe=t;let h=t.backendUrl||void 0||"https://pub.highlight.io",p=[...(r=(n=t.networkRecordingOptions)==null?void 0:n.urlBlocklist)!=null?r:[],...fx],f=(i=t.environment)!=null?i:"production",m={url:t.otlpEndpoint+"/v1/traces",concurrencyLimit:100,timeoutMillis:5e3,compression:"gzip",keepAlive:!0,httpAgentOptions:{timeout:5e3,keepAlive:!0}},d=new oc(m,e),v=new lc(d,{maxExportBatchSize:100,maxQueueSize:1e3,exportTimeoutMillis:m.timeoutMillis,scheduledDelayMillis:m.timeoutMillis}),g=new Dr({[W1]:(o=t.serviceName)!=null?o:"highlight-browser",[X1]:f,"highlight.project_id":t.projectId});rn.tracerProvider=new b1({resource:g,spanProcessors:[v]}),ut.setGlobalTracerProvider(rn.tracerProvider);let w=new sc(Dt(mt({},m),{url:t.otlpEndpoint+"/v1/metrics"})),R=new JO({exporter:w,exportIntervalMillis:m.timeoutMillis,exportTimeoutMillis:m.timeoutMillis});rn.meterProvider=new kN({resource:g,readers:[R]}),ke.setGlobalMeterProvider(rn.meterProvider);let E=[];((s=t.instrumentations)==null?void 0:s["@opentelemetry/instrumentation-document-load"])!==!1&&E.push(new K1({applyCustomAttributesOnSpan:{documentLoad:Wf,documentFetch:Wf,resourceFetch:UG}})),((a=t.instrumentations)==null?void 0:a["@opentelemetry/instrumentation-user-interaction"])!==!1&&E.push(new NG({eventNames:t.eventNames})),(c=t.networkRecordingOptions)!=null&&c.enabled&&(((l=t.instrumentations)==null?void 0:l["@opentelemetry/instrumentation-fetch"])!==!1&&E.push(new OV({propagateTraceHeaderCorsUrls:Uf(t.tracingOrigins),applyCustomAttributesOnSpan:(x,N,U)=>_o(void 0,null,function*(){var C,O,P;if(!x.attributes)return;let st=x;if(st.attributes[Po]===!1)return;let lt=st.attributes["http.url"],y=(C=N.method)!=null?C:"GET";if(x.updateName(Lf(lt,y,N.body)),!(U instanceof Response)){x.setAttributes({"http.response.error":U.message,"http.response.status":U.status});return}Xf(x,N.body,N.headers,t.networkRecordingOptions);let b=yield Ex(U,(O=t.networkRecordingOptions)==null?void 0:O.bodyKeysToRecord,(P=t.networkRecordingOptions)==null?void 0:P.networkBodyKeysToRedact);x.setAttribute("http.response.body",b)})})),((u=t.instrumentations)==null?void 0:u["@opentelemetry/instrumentation-xml-http-request"])!==!1&&E.push(new hx({propagateTraceHeaderCorsUrls:Uf(t.tracingOrigins),applyCustomAttributesOnSpan:(x,N)=>{var U,C;let O=N;if(!x.attributes||x.attributes[Po]===!1)return;let P=Lf(O.al,O.ll,N.responseText);x.updateName(P),Xf(x,O._a,O.Ha,t.networkRecordingOptions);let st=Sy(O._a,(U=t.networkRecordingOptions)==null?void 0:U.networkBodyKeysToRedact,(C=t.networkRecordingOptions)==null?void 0:C.bodyKeysToRecord,O.Ha);x.setAttribute("http.request.body",st)}}))),Lk({instrumentations:E});let T=new hy;T.enable(),rn.tracerProvider.register({contextManager:T,propagator:new Km({propagators:[new Pm,new cc({backendUrl:h,otlpEndpoint:t.otlpEndpoint,tracingOrigins:t.tracingOrigins,urlBlocklist:p})]})})},lc=class extends uy{onStart(e,n){e.setAttribute(GG,Ae()),super.onStart(e,n)}onEnd(e){e.attributes[Po]!==!1&&super.onEnd(e)}},cc=class extends _m{constructor(e){super(),yt(this,"highlightEndpoints"),yt(this,"tracingOrigins"),yt(this,"urlBlocklist"),this.highlightEndpoints=[e.backendUrl,`${e.otlpEndpoint}/v1/traces`,`${e.otlpEndpoint}/v1/logs`,`${e.otlpEndpoint}/v1/metrics`],this.tracingOrigins=e.tracingOrigins,this.urlBlocklist=e.urlBlocklist}inject(e,n,r){var i;let o=ut.getSpan(e);if(!o||!o.attributes)return;let s=o.attributes["http.url"];typeof s=="string"&&(WG(s,this.highlightEndpoints,this.tracingOrigins,this.urlBlocklist)||o.setAttribute(Po,!1),!Ix(s,(i=this.tracingOrigins)!=null?i:[],this.urlBlocklist))||super.inject(e,n,r)}},$y="highlight-browser",co=$y,Gf=()=>{var t;return(t=rn.tracerProvider)==null?void 0:t.getTracer($y)},Lf=(t,e,n)=>{var r,i,o;let s,a=new URL(t),c=a.pathname,l=`${e.toUpperCase()} - ${c}`;try{if(s=typeof n=="string"?JSON.parse(n):n,s&&s.query){let u=fc(s.query),h=((r=u.definitions[0])==null?void 0:r.kind)==="OperationDefinition"?(o=(i=u.definitions[0])==null?void 0:i.name)==null?void 0:o.value:void 0;h&&(l=`${h} (GraphQL: ${a.host+a.pathname})`)}}catch(u){}return l},Xf=(t,e,n,r)=>{var i;let o=typeof e=="string"?e:String(e);if(!t.attributes)return;let s=t.attributes["http.url"],a=new URL(s),c;try{c=e?JSON.parse(o):void 0,c.operationName&&t.setAttribute("graphql.operation.name",c.operationName)}catch(u){}let l=px((i=r==null?void 0:r.networkHeadersToRedact)!=null?i:[],n,r==null?void 0:r.headerKeysToRecord);t.setAttributes({"highlight.type":"http.request","http.request.headers":JSON.stringify(l),"http.request.body":o,[M1]:s,[F1]:a.pathname,[A1]:a.search}),a.searchParams.size>0&&t.setAttributes({"url.query_params":JSON.stringify(Object.fromEntries(a.searchParams))})},WG=(t,e,n,r)=>r!=null&&r.some(i=>t.toLowerCase().includes(i))?!1:Sx(t,e),Wf=t=>{var e,n,r;if(!t.events)return;let i=t.events,o={unload:jt("unloadEventStart","unloadEventEnd",i),dom_interactive:jt("fetchStart","domInteractive",i),dom_content_loaded:jt("domContentLoadedEventStart","domContentLoadedEventEnd",i),dom_complete:jt("fetchStart","domComplete",i),load_event:jt("loadEventStart","loadEventEnd",i),document_load:jt("fetchStart","loadEventEnd",i),first_paint:jt("fetchStart","firstPaint",i),first_contentful_paint:jt("fetchStart","firstContentfulPaint",i),domain_lookup:jt("domainLookupStart","domainLookupEnd",i),connect:jt("connectStart","connectEnd",i),request:jt("requestStart","requestEnd",i),response:jt("responseStart","responseEnd",i)},s=(n=(e=Fe==null?void 0:Fe.getIntegrations)==null?void 0:e.call(Fe))!=null?n:[];if(o.document_load!==void 0)for(let a of s)a.recordGauge((r=Fe==null?void 0:Fe.sessionSecureId)!=null?r:"",{name:Em,value:o.document_load/1e6});Object.entries(o).forEach(([a,c])=>{c!==void 0&&(t.setAttribute(`timings.${a}.ns`,c),t.setAttribute(`timings.${a}.readable`,qy(c)))})};function jt(t,e,n){let r=n.find(s=>s.name===t),i=n.find(s=>s.name===e);if(!r||!i)return;let o=r.time[0]*1e9+r.time[1];return i.time[0]*1e9+i.time[1]-o}var UG=(t,e)=>{let n={domain_lookup:(e.domainLookupEnd-e.domainLookupStart)*1e9,connect:(e.connectEnd-e.connectStart)*1e9,request:(e.responseEnd-e.requestStart)*1e9,response:(e.responseEnd-e.responseStart)*1e9};Object.entries(n).forEach(([r,i])=>{t.setAttribute(`timings.${r}.ns`,i),t.setAttribute(`timings.${r}.readable`,qy(i))})},qy=t=>{if(t>=36e11){let e=t/36e11;return`${Number(e.toFixed(1))}h`}else if(t>=6e10){let e=t/6e10;return`${Number(e.toFixed(1))}m`}else if(t>=1e9){let e=t/1e9;return`${Number(e.toFixed(1))}s`}else if(t>=1e6){let e=t/1e6;return`${Number(e.toFixed(1))}ms`}else if(t>=1e3){let e=t/1e3;return`${Number(e.toFixed(1))}\xB5s`}else return`${Number(t.toFixed(1))}ns`},Uf=t=>t===!0?[/localhost/,/^\//,new RegExp(window.location.host)]:Array.isArray(t)?t.map(e=>typeof e=="string"?new RegExp(e):e):/^$/,PG=30,MG=()=>new Promise(t=>requestAnimationFrame(e=>requestAnimationFrame(n=>t(n-e)))),FG=()=>_o(void 0,null,function*(){let t=[];for(let e=0;e<PG;e++)t.push(yield MG());return t.reduce((e,n)=>e+n,0)/t.length}),AG=(t,e)=>{let n={},r=16.666666666666668;FG().then(c=>r=c);let i=c=>{var l;n!=null&&n.event||(n={event:c,location:window.location.href,timerStart:(l=window.performance)==null?void 0:l.now()},window.requestAnimationFrame(o))},o=()=>{if(!(n!=null&&n.timerStart))return;let c=window.performance.now()-n.timerStart-r;s(c),n={}},s=c=>{let l=(new Date().getTime()-e)/1e3;t({relativeTimestamp:l,jankAmount:c,querySelector:a(),newLocation:window.location.href!=n.location?window.location.href:void 0})},a=()=>{var c;return(c=n==null?void 0:n.event)!=null&&c.target?RR(n.event.target):""};return window.addEventListener("click",i,!0),window.addEventListener("keydown",i,!0),()=>{window.removeEventListener("keydown",i,!0),window.removeEventListener("click",i,!0)}},JG=typeof window<"u",Pf=JG&&"performance"in window&&"memory"in performance?performance:{memory:{}},DG=(t,e)=>{let n=0,r=0,i=()=>{let l=(new Date().getTime()-e)/1e3,u=Pf.memory.jsHeapSizeLimit||0,h=Pf.memory.usedJSHeapSize||0;t({jsHeapSizeLimit:u,usedJSHeapSize:h,relativeTimestamp:l,fps:n})};i();let o;o=setInterval(()=>{i()},1e3);let s=0,a=Date.now(),c=function(){var l=Date.now();s++,l>1e3+a&&(n=Math.round(s*1e3/(l-a)),s=0,a=l),r=requestAnimationFrame(c)};return c(),()=>{clearInterval(o),cancelAnimationFrame(r)}},De,Ur,tg,Mo,uc,eg=-1,Sn=function(t){addEventListener("pageshow",function(e){e.persisted&&(eg=e.timeStamp,t(e))},!0)},Gc=function(){return window.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]},qo=function(){var t=Gc();return t&&t.activationStart||0},ne=function(t,e){var n=Gc(),r="navigate";return eg>=0?r="back-forward-cache":n&&(document.prerendering||qo()>0?r="prerender":document.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:t,value:e===void 0?-1:e,rating:"good",delta:0,entries:[],id:"v3-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:r}},Bn=function(t,e,n){try{if(PerformanceObserver.supportedEntryTypes.includes(t)){var r=new PerformanceObserver(function(i){Promise.resolve().then(function(){e(i.getEntries())})});return r.observe(Object.assign({type:t,buffered:!0},n||{})),r}}catch(i){}},re=function(t,e,n,r){var i,o;return function(s){e.value>=0&&(s||r)&&((o=e.value-(i||0))||i===void 0)&&(i=e.value,e.delta=o,e.rating=(function(a,c){return a>c[1]?"poor":a>c[0]?"needs-improvement":"good"})(e.value,n),t(e))}},Lc=function(t){requestAnimationFrame(function(){return requestAnimationFrame(function(){return t()})})},ts=function(t){var e=function(n){n.type!=="pagehide"&&document.visibilityState!=="hidden"||t(n)};addEventListener("visibilitychange",e,!0),addEventListener("pagehide",e,!0)},Xc=function(t){var e=!1;return function(n){e||(t(n),e=!0)}},An=-1,Mf=function(){return document.visibilityState!=="hidden"||document.prerendering?1/0:0},Fo=function(t){document.visibilityState==="hidden"&&An>-1&&(An=t.type==="visibilitychange"?t.timeStamp:0,YG())},Ff=function(){addEventListener("visibilitychange",Fo,!0),addEventListener("prerenderingchange",Fo,!0)},YG=function(){removeEventListener("visibilitychange",Fo,!0),removeEventListener("prerenderingchange",Fo,!0)},Wc=function(){return An<0&&(An=Mf(),Ff(),Sn(function(){setTimeout(function(){An=Mf(),Ff()},0)})),{get firstHiddenTime(){return An}}},jr=function(t){document.prerendering?addEventListener("prerenderingchange",function(){return t()},!0):t()},Af=[1800,3e3],ng=function(t,e){e=e||{},jr(function(){var n,r=Wc(),i=ne("FCP"),o=Bn("paint",function(s){s.forEach(function(a){a.name==="first-contentful-paint"&&(o.disconnect(),a.startTime<r.firstHiddenTime&&(i.value=Math.max(a.startTime-qo(),0),i.entries.push(a),n(!0)))})});o&&(n=re(t,i,Af,e.reportAllChanges),Sn(function(s){i=ne("FCP"),n=re(t,i,Af,e.reportAllChanges),Lc(function(){i.value=performance.now()-s.timeStamp,n(!0)})}))})},Jf=[.1,.25],KG=function(t,e){e=e||{},ng(Xc(function(){var n,r=ne("CLS",0),i=0,o=[],s=function(c){c.forEach(function(l){if(!l.hadRecentInput){var u=o[0],h=o[o.length-1];i&&l.startTime-h.startTime<1e3&&l.startTime-u.startTime<5e3?(i+=l.value,o.push(l)):(i=l.value,o=[l])}}),i>r.value&&(r.value=i,r.entries=o,n())},a=Bn("layout-shift",s);a&&(n=re(t,r,Jf,e.reportAllChanges),ts(function(){s(a.takeRecords()),n(!0)}),Sn(function(){i=0,r=ne("CLS",0),n=re(t,r,Jf,e.reportAllChanges),Lc(function(){return n()})}),setTimeout(n,0))}))},Or={passive:!0,capture:!0},_G=new Date,Df=function(t,e){De||(De=e,Ur=t,tg=new Date,ig(removeEventListener),rg())},rg=function(){if(Ur>=0&&Ur<tg-_G){var t={entryType:"first-input",name:De.type,target:De.target,cancelable:De.cancelable,startTime:De.timeStamp,processingStart:De.timeStamp+Ur};Mo.forEach(function(e){e(t)}),Mo=[]}},HG=function(t){if(t.cancelable){var e=(t.timeStamp>1e12?new Date:performance.now())-t.timeStamp;t.type=="pointerdown"?(function(n,r){var i=function(){Df(n,r),s()},o=function(){s()},s=function(){removeEventListener("pointerup",i,Or),removeEventListener("pointercancel",o,Or)};addEventListener("pointerup",i,Or),addEventListener("pointercancel",o,Or)})(e,t):Df(e,t)}},ig=function(t){["mousedown","keydown","touchstart","pointerdown"].forEach(function(e){return t(e,HG,Or)})},Yf=[100,300],zG=function(t,e){e=e||{},jr(function(){var n,r=Wc(),i=ne("FID"),o=function(c){c.startTime<r.firstHiddenTime&&(i.value=c.processingStart-c.startTime,i.entries.push(c),n(!0))},s=function(c){c.forEach(o)},a=Bn("first-input",s);n=re(t,i,Yf,e.reportAllChanges),a&&ts(Xc(function(){s(a.takeRecords()),a.disconnect()})),a&&Sn(function(){var c;i=ne("FID"),n=re(t,i,Yf,e.reportAllChanges),Mo=[],Ur=-1,De=null,ig(addEventListener),c=o,Mo.push(c),rg()})})},og=0,Vl=1/0,uo=0,BG=function(t){t.forEach(function(e){e.interactionId&&(Vl=Math.min(Vl,e.interactionId),uo=Math.max(uo,e.interactionId),og=uo?(uo-Vl)/7+1:0)})},sg=function(){return uc?og:performance.interactionCount||0},jG=function(){"interactionCount"in performance||uc||(uc=Bn("event",BG,{type:"event",buffered:!0,durationThreshold:0}))},Kf=[200,500],ag=0,_f=function(){return sg()-ag},be=[],xl={},Hf=function(t){var e=be[be.length-1],n=xl[t.interactionId];if(n||be.length<10||t.duration>e.latency){if(n)n.entries.push(t),n.latency=Math.max(n.latency,t.duration);else{var r={id:t.interactionId,latency:t.duration,entries:[t]};xl[r.id]=r,be.push(r)}be.sort(function(i,o){return o.latency-i.latency}),be.splice(10).forEach(function(i){delete xl[i.id]})}},QG=function(t,e){e=e||{},jr(function(){var n;jG();var r,i=ne("INP"),o=function(a){a.forEach(function(u){u.interactionId&&Hf(u),u.entryType==="first-input"&&!be.some(function(h){return h.entries.some(function(p){return u.duration===p.duration&&u.startTime===p.startTime})})&&Hf(u)});var c,l=(c=Math.min(be.length-1,Math.floor(_f()/50)),be[c]);l&&l.latency!==i.value&&(i.value=l.latency,i.entries=l.entries,r())},s=Bn("event",o,{durationThreshold:(n=e.durationThreshold)!==null&&n!==void 0?n:40});r=re(t,i,Kf,e.reportAllChanges),s&&("interactionId"in PerformanceEventTiming.prototype&&s.observe({type:"first-input",buffered:!0}),ts(function(){o(s.takeRecords()),i.value<0&&_f()>0&&(i.value=0,i.entries=[]),r(!0)}),Sn(function(){be=[],ag=sg(),i=ne("INP"),r=re(t,i,Kf,e.reportAllChanges)}))})},zf=[2500,4e3],Ol={},$G=function(t,e){e=e||{},jr(function(){var n,r=Wc(),i=ne("LCP"),o=function(c){var l=c[c.length-1];l&&l.startTime<r.firstHiddenTime&&(i.value=Math.max(l.startTime-qo(),0),i.entries=[l],n())},s=Bn("largest-contentful-paint",o);if(s){n=re(t,i,zf,e.reportAllChanges);var a=Xc(function(){Ol[i.id]||(o(s.takeRecords()),s.disconnect(),Ol[i.id]=!0,n(!0))});["keydown","click"].forEach(function(c){addEventListener(c,function(){return setTimeout(a,0)},!0)}),ts(a),Sn(function(c){i=ne("LCP"),n=re(t,i,zf,e.reportAllChanges),Lc(function(){i.value=performance.now()-c.timeStamp,Ol[i.id]=!0,n(!0)})})}})},Bf=[800,1800],qG=function t(e){document.prerendering?jr(function(){return t(e)}):document.readyState!=="complete"?addEventListener("load",function(){return t(e)},!0):setTimeout(e,0)},tL=function(t,e){e=e||{};var n=ne("TTFB"),r=re(t,n,Bf,e.reportAllChanges);qG(function(){var i=Gc();if(i){var o=i.responseStart;if(o<=0||o>performance.now())return;n.value=Math.max(o-qo(),0),n.entries=[i],r(!0),Sn(function(){n=ne("TTFB",0),(r=re(t,n,Bf,e.reportAllChanges))(!0)})}})},eL=t=>(KG(t),ng(t),zG(t),$G(t),tL(t),QG(t),()=>{}),Mn=typeof navigator<"u"&&"connection"in navigator?navigator.connection:{},nL=(t,e)=>{let n=()=>{let i=(new Date().getTime()-e)/1e3;t({relativeTimestamp:i,downlink:Mn.downlink,downlinkMax:Mn.downlinkMax,effectiveType:Mn.effectiveType,rtt:Mn.rtt,saveData:Mn.saveData,type:Mn.type})};n();let r;return r=setInterval(()=>{n()},1e3),()=>{clearInterval(r)}},rL=()=>{if(!("performance"in window&&"memory"in performance))return{getDeviceDetails:void 0,getCurrentDeviceDetails:void 0};let t=window.performance;return{getDeviceDetails:()=>({deviceMemory:iL(navigator.deviceMemory||0)}),getCurrentDeviceDetails:()=>{let e=Nl(t.memory.jsHeapSizeLimit),n=Nl(t.memory.totalJSHeapSize),r=Nl(t.memory.usedJSHeapSize);return{jsHeapSizeLimit:e,totalJSHeapSize:n,usedJSHeapSize:r}}}},Nl=t=>t/Math.pow(1e3,2),iL=t=>1024*t,oL="launchdarkly.js.log",sL="log.severity",aL="log.message",jf="launchdarkly.sampling.ratio";function lL(t){return"regexValue"in t}function cL(t){return"matchValue"in t}function uL(t){let e=Math.trunc(t);return e===1?!0:e===0?!1:Math.floor(Math.random()*e)===0}var hc=class{constructor(e=uL){yt(this,"regexCache",new Map),yt(this,"config"),this.sampler=e}setConfig(e){this.config=e}isSamplingEnabled(){var e,n,r,i;return!!((n=(e=this.config)==null?void 0:e.logs)!=null&&n.length||(i=(r=this.config)==null?void 0:r.spans)!=null&&i.length)}shouldSample(e){var n,r;return e.name===oL?this.sampleLog((n=this.config)==null?void 0:n.logs,e):this.sampleSpan((r=this.config)==null?void 0:r.spans,e)}matchesValue(e,n){if(!e)return!1;if(cL(e))return e.matchValue===n;if(lL(e)){let r=e.regexValue;if(r===null)return!1;this.regexCache.has(r)||this.regexCache.set(r,new RegExp(r));let i=this.regexCache.get(r);if(typeof n=="string")return i.test(n)}return!1}matchesAttributes(e,n){if(e)for(let r of e){let i=!1;for(let o of Object.keys(n))if(this.matchesValue(r.key,o)){let s=n[o];if(this.matchesValue(r.attribute,s)){i=!0;break}}if(!i)return!1}return!0}matchEvent(e,n){return!(e.name&&!this.matchesValue(e.name,n.name)||e.attributes&&(!n.attributes||!this.matchesAttributes(e.attributes,n.attributes)))}matchesEvents(e,n){if(e)for(let r of e){let i=!1;for(let o of n)if(this.matchEvent(r,o)){i=!0;break}if(!i)return!1}return!0}matchesSpanConfig(e,n){return!(e.name&&!this.matchesValue(e.name,n.name)||!this.matchesAttributes(e.attributes,n.attributes)||!this.matchesEvents(e.events,n.events))}matchesLogConfig(e,n){if(e.severityText){let r=n[sL];if(typeof r=="string"&&!this.matchesValue(e.severityText,r))return!1}if(e.message){let r=n[aL];if(typeof r=="string"&&!this.matchesValue(e.message,r))return!1}return!!this.matchesAttributes(e.attributes,n)}sampleSpan(e,n){if(e){for(let r of e)if(this.matchesSpanConfig(r,n))return{sample:this.sampler(r.samplingRatio),attributes:{[jf]:r.samplingRatio}}}return{sample:!0}}sampleLog(e,n){if(e){for(let r of e)if(this.matchesLogConfig(r,n.attributes))return{sample:this.sampler(r.samplingRatio),attributes:{[jf]:r.samplingRatio}}}return{sample:!0}}},Qf=()=>{let t={end:()=>{},spanContext:()=>({traceId:"",spanId:"",traceFlags:0}),setAttribute:(e,n)=>t,setAttributes:e=>t,addEvent:(e,n,r)=>t,addLinks:e=>t,setStatus:e=>t,recordException:()=>{},addLink:()=>t,updateName:()=>t,isRecording:()=>!1};return t},pc=class{constructor(e){yt(this,"organizationID"),yt(this,"_integrations",[]),yt(this,"_gauges",new Map),yt(this,"_counters",new Map),yt(this,"_histograms",new Map),yt(this,"_up_down_counters",new Map),yt(this,"sampler",new hc),yt(this,"graphqlSDK"),typeof e.projectId=="string"?this.organizationID=e.projectId:this.organizationID=e.projectId.toString(),XG(Dt(mt({},e),{getIntegrations:()=>this.mr}),this.sampler);let n=new CE(`${e.backendUrl}`,{headers:{}});this.graphqlSDK=zE(n,lR()),this.configureSampling(),this.setupListeners(e)}configureSampling(){return _o(this,null,function*(){try{let e=yield this.graphqlSDK.GetSamplingConfig({organization_verbose_id:`${this.organizationID}`});this.sampler.setConfig(e.sampling)}catch(e){xe("sampling","warn",`LaunchDarkly Observability: Failed to configure sampling: ${e}`)}})}recordLog(e,n,r){this.startSpan(LG,i=>{let o=typeof e=="string"?e:on(e);i==null||i.addEvent("log",mt({"log.severity":n,"log.message":o},r)),n==="error"&&(i==null||i.recordException(new Error(o)),i==null||i.setStatus({code:Oo.ERROR,message:o}))})}recordError(e,n,r,i,o){var s,a,c,l;e.cause&&(r=Dt(mt({},r),{"exception.cause":JSON.stringify(e.cause)}));let u=n?n+":"+e.message:e.message;o==="React.ErrorBoundary"&&(u="ErrorBoundary: "+u);let h=Ho(e),p={error:e,event:u,type:o!=null?o:"custom",url:window.location.href,source:i!=null?i:"",lineNumber:(s=h[0])!=null&&s.lineNumber?(a=h[0])==null?void 0:a.lineNumber:0,columnNumber:(c=h[0])!=null&&c.columnNumber?(l=h[0])==null?void 0:l.columnNumber:0,stackTrace:h,timestamp:new Date().toISOString()};this.startSpan("highlight.exception",f=>{f==null||f.recordException(e),f==null||f.setAttributes(mt({event:p.event,type:p.type,url:p.url,source:p.source,lineNumber:p.lineNumber,columnNumber:p.columnNumber},r))});for(let f of this.mr)f.error(Ae(),p)}recordCount(e){let n=ke.getMeter(co),r=this.za.get(e.name);r||(r=n.createCounter(e.name),this.za.set(e.name,r)),r.add(e.value,Dt(mt({},e.attributes),{"highlight.session_id":Ae()}))}recordGauge(e){var n,r,i;let o=ke.getMeter(co),s=this.Ba.get(e.name);s||(s=o.createGauge(e.name),this.Ba.set(e.name,s)),s.record(e.value,Dt(mt({},e.attributes),{"highlight.session_id":Ae()}));let a={name:e.name,value:e.value,category:(n=e.attributes)==null?void 0:n.category,group:(i=(r=e.attributes)==null?void 0:r.group)==null?void 0:i.toString(),tags:e.attributes?Object.entries(e.attributes).map(([c,l])=>{var u;return{name:c!=null?c:"",value:(u=l==null?void 0:l.toString())!=null?u:""}}):[]};for(let c of this.mr)c.recordGauge(Ae(),a)}recordIncr(e){this.recordCount(Dt(mt({},e),{value:1}))}recordHistogram(e){let n=ke.getMeter(co),r=this.ja.get(e.name);r||(r=n.createHistogram(e.name),this.ja.set(e.name,r)),r.record(e.value,Dt(mt({},e.attributes),{"highlight.session_id":Ae()}))}recordUpDownCounter(e){let n=ke.getMeter(co),r=this.Qa.get(e.name);r||(r=n.createUpDownCounter(e.name),this.Qa.set(e.name,r)),r.add(e.value,Dt(mt({},e.attributes),{"highlight.session_id":Ae()}))}startSpan(e,n,r,i){let o=Gf();if(!o){let a=Qf();return i===void 0&&r===void 0?n(a):i===void 0?r(a):i(a)}let s=(a,c)=>{let l=c(a);return l instanceof Promise?l.finally(()=>a.end()):(a.end(),l)};return i===void 0&&r===void 0?o.startActiveSpan(e,a=>s(a,n)):i===void 0?o.startActiveSpan(e,n,a=>s(a,r)):o.startActiveSpan(e,n,r,a=>s(a,i))}startManualSpan(e,n,r,i){let o=Gf();if(!o){let s=Qf();return i===void 0&&r===void 0?n(s):i===void 0?r(s):i(s)}return i===void 0&&r===void 0?o.startActiveSpan(e,n):i===void 0?o.startActiveSpan(e,n,r):o.startActiveSpan(e,n,r,i)}register(e,n){this.mr.push(new ER(e,n))}getHooks(e){return this.mr.flatMap(n=>{var r,i;return(i=(r=n.getHooks)==null?void 0:r.call(n,e))!=null?i:[]})}submitViewportMetrics({height:e,width:n,availHeight:r,availWidth:i}){this.recordGauge({name:en.ViewportHeight,value:e,attributes:{category:Qt.Device,group:window.location.href}}),this.recordGauge({name:en.ViewportWidth,value:n,attributes:{category:Qt.Device,group:window.location.href}}),this.recordGauge({name:en.ScreenHeight,value:r,attributes:{category:Qt.Device,group:window.location.href}}),this.recordGauge({name:en.ScreenWidth,value:i,attributes:{category:Qt.Device,group:window.location.href}}),this.recordGauge({name:en.ViewportArea,value:e*n,attributes:{category:Qt.Device,group:window.location.href}})}setupListeners(e){var n;e.disableConsoleRecording||UR(i=>{var o,s,a,c,l;let u=Dt(mt({},i.attributes?{attributes:i.attributes}:{}),{type:i.type});if(e.reportConsoleErrors&&(i.type==="Error"||i.type==="error")&&i.value&&i.trace){let h=on(i.value);if(Od.includes(h)||Nd.some(f=>h.includes(f)))return;let p=new Error(h);p.stack=on(i.trace.map(f=>f.toString())),u.url=window.location.href,u.source=(o=i.trace[0])==null?void 0:o.fileName,u.lineNumber=(a=(s=i.trace[0])==null?void 0:s.lineNumber)==null?void 0:a.toString(),u.columnNumber=(l=(c=i.trace[0])==null?void 0:c.columnNumber)==null?void 0:l.toString(),this.recordError(p,void 0,u,u.source,"console.error")}this.recordLog(on(i.value),"error",{})},{level:(n=e.consoleMethodsToRecord)!=null?n:[],logger:"console",stringifyOptions:{depthOfLimit:10,numOfKeysLimit:100,stringLengthLimit:1e3}}),e.enablePerformanceRecording!==!1&&(DG(i=>{Object.entries(i).filter(([o])=>o!=="relativeTimestamp").forEach(([o,s])=>s&&this.recordGauge({name:o,value:s,attributes:{category:Qt.Performance,group:window.location.href}}))},0),AG(i=>{this.recordGauge({name:"Jank",value:i.jankAmount,attributes:{category:Qt.WebVital,group:i.querySelector}})},0)),MR(i=>{var o;if(Od.includes(i.event)||Nd.some(c=>i.event.includes(c)))return;let s=new Error(i.event);s.stack=on(i.stackTrace.map(c=>c.toString()));let a={};try{i.payload&&(a=JSON.parse(i.payload))}catch(c){}this.recordError((o=i.error)!=null?o:s,i.event,Dt(mt({},a),{lineNumber:i.lineNumber.toString(),columnNumber:i.columnNumber.toString(),source:i.source,url:i.url}),i.source,i.type)},{enablePromisePatch:!!e.enablePromisePatch}),eL(i=>{let{name:o,value:s}=i;this.recordGauge({name:o,value:s,attributes:{group:window.location.href,category:Qt.WebVital}})}),CR(i=>{this.submitViewportMetrics(i)}),nL(i=>{let o={category:Qt.Performance,group:window.location.href};i.saveData!==void 0&&(o.saveData=i.saveData.toString()),i.effectiveType!==void 0&&(o.effectiveType=i.effectiveType.toString()),i.type!==void 0&&(o.type=i.type.toString()),Object.entries(i).filter(([s])=>s!=="relativeTimestamp").forEach(([s,a])=>a&&typeof a=="number"&&this.recordGauge({name:s,value:a,attributes:o}))},new Date().getTime());let{getDeviceDetails:r}=rL();r&&this.recordGauge({name:en.DeviceMemory,value:r().deviceMemory,attributes:{category:Qt.Device,group:window.location.href}})}},Ao=class extends kR{constructor(e,n){var r=(...h)=>(super(...h),yt(this,"observe"),this),i,o,s,a,c,l,u;try{if(r(n),typeof window>"u"||typeof document>"u"){console.warn("@launchdarkly/observability is not initializing because it is not supported in this environment.");return}if(!e){console.warn("@launchdarkly/observability is not initializing because projectID was passed undefined.");return}let h={backendUrl:(i=n==null?void 0:n.backendUrl)!=null?i:"https://pub.observability.app.launchdarkly.com",otlpEndpoint:(s=(o=n==null?void 0:n.otel)==null?void 0:o.otlpEndpoint)!=null?s:"https://otel.observability.app.launchdarkly.com",projectId:e,sessionSecureId:this.sessionSecureID,environment:(a=n==null?void 0:n.environment)!=null?a:"production",networkRecordingOptions:typeof(n==null?void 0:n.networkRecording)=="object"?n.networkRecording:void 0,tracingOrigins:n==null?void 0:n.tracingOrigins,serviceName:(c=n==null?void 0:n.serviceName)!=null?c:"browser",instrumentations:(l=n==null?void 0:n.otel)==null?void 0:l.instrumentations,eventNames:(u=n==null?void 0:n.otel)==null?void 0:u.eventNames};this.observe=new pc(h),cn.load(this.observe)}catch(h){xe("Error initializing @launchdarkly/observability SDK","error",h)}}getMetadata(){return{name:"@launchdarkly/observability"}}register(e,n){var r;(r=this.observe)==null||r.register(e,n)}getHooks(e){var n,r;let i=mt(mt({[U1]:e.sdk.name,[P1]:e.sdk.version,[uR]:e.clientSideId,[mR]:"LaunchDarkly"},(n=e.application)!=null&&n.id?{[gR]:e.application.id}:{}),(r=e.application)!=null&&r.version?{[bR]:e.application.version}:{});return[{getMetadata:()=>({name:"@launchdarkly/observability/hooks"}),afterIdentify:(o,s,a)=>{var c,l,u,h,p;for(let f of(u=(l=(c=this.observe)==null?void 0:c.getHooks)==null?void 0:l.call(c,e))!=null?u:[])(h=f.afterIdentify)==null||h.call(f,o,s,a);return(p=this.observe)==null||p.recordLog("LD.identify","info",Dt(mt({},i),{key:Rd(o.context),context:JSON.stringify(Cd(o.context)),timeout:o.timeout,[IR]:a.status})),s},afterEvaluation:(o,s,a)=>{var c,l,u,h,p;for(let d of(u=(l=(c=this.observe)==null?void 0:c.getHooks)==null?void 0:l.call(c,e))!=null?u:[])(h=d.afterEvaluation)==null||h.call(d,o,s,a);let f=mt({[hR]:o.flagKey,[fR]:JSON.stringify(a.value)},a.variationIndex?{[yR]:a.variationIndex}:{});if(a.reason)for(let d in Td){let v=d,g=a.reason[v];g&&(f[Td[v]]=g)}o.context&&(f[pR]=JSON.stringify(Cd(o.context)),f[dR]=Rd(o.context));let m=mt(mt({},i),f);return(p=this.observe)==null||p.startSpan(cR,d=>{d&&d.addEvent(Xt,m)}),s},afterTrack:o=>{var s,a,c,l,u;for(let h of(c=(a=(s=this.observe)==null?void 0:s.getHooks)==null?void 0:a.call(s,e))!=null?c:[])(l=h.afterTrack)==null||l.call(h,o);(u=this.observe)==null||u.recordLog("LD.track","info",mt(Dt(mt({},i),{key:o.key,value:o.metricValue}),typeof o.data=="object"?o.data:{}))}}]}};Uc();function JJ(t,e,n){var i,o;let r=Hh(_h({},n),{plugins:[...(n==null?void 0:n.plugins)||[],new Ao((i=n==null?void 0:n.tmpProjectId)!=null?i:"1",n==null?void 0:n.observability),new ki((o=n==null?void 0:n.tmpProjectId)!=null?o:"1",n==null?void 0:n.sessionReplay)]});return fd(t,e,r)}export{cn as LDObserve,Tn as LDRecord,bA as basicLogger,JJ as createClient};
644
644
  /*! Bundled license information:
645
645
 
646
646
  @launchdarkly/session-replay/dist/index-B27CYB0H.js: