@launchdarkly/browser 0.1.13 → 0.1.14

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 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+=`
1
+ var gp=Object.defineProperty,Yw=Object.defineProperties;var Kw=Object.getOwnPropertyDescriptors;var mp=Object.getOwnPropertySymbols;var _w=Object.prototype.hasOwnProperty,Hw=Object.prototype.propertyIsEnumerable;var yp=(t,e,n)=>e in t?gp(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,bp=(t,e)=>{for(var n in e||(e={}))_w.call(e,n)&&yp(t,n,e[n]);if(mp)for(var n of mp(e))Hw.call(e,n)&&yp(t,n,e[n]);return t},vp=(t,e)=>Yw(t,Kw(e));var wp=(t,e)=>()=>(t&&(e=t(t=0)),e);var zw=(t,e)=>{for(var n in e)gp(t,n,{get:e[n],enumerable:!0})};var zg={};zw(zg,{LDObserve:()=>wi});var Ts,wi,Bg=wp(()=>{"use strict";du();Ts=class extends gr{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?wi=globalThis.LDObserve:(wi=new Ts,globalThis.LDObserve=wi):wi=new Ts});function ZX(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 Hs(t,e){throw new Error(e)}function xX(t){return typeof t=="object"&&t!==null}function VX(t,e){throw new Error("Unexpected invariant triggered.")}function Xu(t,e){let n=0,r=1;for(let i of t.body.matchAll(OX)){if(typeof i.index=="number"||VX(),i.index>=e)break;n=i.index+i[0].length,r+=1}return{line:r,column:e+1-n}}function NX(t){return vv(t.source,Xu(t.source,t.start))}function vv(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+jg([[`${s} |`,m[0]],...m.slice(1,p+1).map(d=>["|",d]),["|","^".padStart(f)],["|",m[p+1]]])}return l+jg([[`${s-1} |`,u[i-1]],[`${s} |`,h],["|","^".padStart(c)],[`${s+1} |`,u[i+1]]])}function jg(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 GX(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 Qg(t){return t===void 0||t.length===0?void 0:t}function Nt(t,e,n){return new Wu(`Syntax Error: ${n}`,{source:t,positions:[e]})}function $g(t){let e=t==null?void 0:t.kind;return typeof e=="string"&&XX.has(e)}function Pu(t){return t===9||t===32}function Ui(t){return t>=48&&t<=57}function Iv(t){return t>=97&&t<=122||t>=65&&t<=90}function Tv(t){return Iv(t)||t===95}function WX(t){return Iv(t)||Ui(t)||t===95}function MX(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=PX(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 PX(t){let e=0;for(;e<t.length&&Pu(t.charCodeAt(e));)++e;return e}function UX(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||Pu(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&&Pu(t.charCodeAt(0));return(u&&!p||o)&&(h+=`
4
4
  `),h+=n,(u||l)&&(h+=`
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,`
5
+ `),'"""'+h+'"""'}function AX(t){return t===C.BANG||t===C.DOLLAR||t===C.AMP||t===C.PAREN_L||t===C.PAREN_R||t===C.SPREAD||t===C.COLON||t===C.EQUALS||t===C.AT||t===C.BRACKET_L||t===C.BRACKET_R||t===C.BRACE_L||t===C.PIPE||t===C.BRACE_R}function Wr(t){return t>=0&&t<=55295||t>=57344&&t<=1114111}function Va(t,e){return Ev(t.charCodeAt(e))&&Rv(t.charCodeAt(e+1))}function Ev(t){return t>=55296&&t<=56319}function Rv(t){return t>=56320&&t<=57343}function Jn(t,e){let n=t.source.body.codePointAt(e);if(n===void 0)return C.EOF;if(n>=32&&n<=126){let r=String.fromCodePoint(n);return r==='"'?`'"'`:`"${r}"`}return"U+"+n.toString(16).toUpperCase().padStart(4,"0")}function Ct(t,e,n,r,i){let o=t.line,s=1+n-t.lineStart;return new wv(e,n,r,o,s,i)}function DX(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 JX(t,i);case 33:return Ct(t,C.BANG,i,i+1);case 36:return Ct(t,C.DOLLAR,i,i+1);case 38:return Ct(t,C.AMP,i,i+1);case 40:return Ct(t,C.PAREN_L,i,i+1);case 41:return Ct(t,C.PAREN_R,i,i+1);case 46:if(n.charCodeAt(i+1)===46&&n.charCodeAt(i+2)===46)return Ct(t,C.SPREAD,i,i+3);break;case 58:return Ct(t,C.COLON,i,i+1);case 61:return Ct(t,C.EQUALS,i,i+1);case 64:return Ct(t,C.AT,i,i+1);case 91:return Ct(t,C.BRACKET_L,i,i+1);case 93:return Ct(t,C.BRACKET_R,i,i+1);case 123:return Ct(t,C.BRACE_L,i,i+1);case 124:return Ct(t,C.PIPE,i,i+1);case 125:return Ct(t,C.BRACE_R,i,i+1);case 34:return n.charCodeAt(i+1)===34&&n.charCodeAt(i+2)===34?BX(t,i):KX(t,i)}if(Ui(o)||o===45)return YX(t,i,o);if(Tv(o))return jX(t,i);throw Nt(t.source,i,o===39?`Unexpected single quote character ('), did you mean to use a double quote (")?`:Wr(o)||Va(n,i)?`Unexpected character: ${Jn(t,i)}.`:`Invalid character: ${Jn(t,i)}.`)}return Ct(t,C.EOF,r,r)}function JX(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(Wr(o))++i;else if(Va(n,i))i+=2;else break}return Ct(t,C.COMMENT,e,i,n.slice(e+1,i))}function YX(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),Ui(o))throw Nt(t.source,i,`Invalid number, unexpected digit after 0: ${Jn(t,i)}.`)}else i=fu(t,i,o),o=r.charCodeAt(i);if(o===46&&(s=!0,o=r.charCodeAt(++i),i=fu(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=fu(t,i,o),o=r.charCodeAt(i)),o===46||Tv(o))throw Nt(t.source,i,`Invalid number, expected digit but got: ${Jn(t,i)}.`);return Ct(t,s?C.FLOAT:C.INT,e,i,r.slice(e,i))}function fu(t,e,n){if(!Ui(n))throw Nt(t.source,e,`Invalid number, expected digit but got: ${Jn(t,e)}.`);let r=t.source.body,i=e+1;for(;Ui(r.charCodeAt(i));)++i;return i}function KX(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),Ct(t,C.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?_X(t,i):HX(t,i):zX(t,i);s+=c.value,i+=c.size,o=i;continue}if(a===10||a===13)break;if(Wr(a))++i;else if(Va(n,i))i+=2;else throw Nt(t.source,i,`Invalid character within String: ${Jn(t,i)}.`)}throw Nt(t.source,i,"Unterminated string.")}function _X(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||!Wr(r))break;return{value:String.fromCodePoint(r),size:i}}if(r=r<<4|Oi(o),r<0)break}throw Nt(t.source,e,`Invalid Unicode escape sequence: "${n.slice(e,e+i)}".`)}function HX(t,e){let n=t.source.body,r=qg(n,e+2);if(Wr(r))return{value:String.fromCodePoint(r),size:6};if(Ev(r)&&n.charCodeAt(e+6)===92&&n.charCodeAt(e+7)===117){let i=qg(n,e+8);if(Rv(i))return{value:String.fromCodePoint(r,i),size:12}}throw Nt(t.source,e,`Invalid Unicode escape sequence: "${n.slice(e,e+6)}".`)}function qg(t,e){return Oi(t.charCodeAt(e))<<12|Oi(t.charCodeAt(e+1))<<8|Oi(t.charCodeAt(e+2))<<4|Oi(t.charCodeAt(e+3))}function Oi(t){return t>=48&&t<=57?t-48:t>=65&&t<=70?t-55:t>=97&&t<=102?t-87:-1}function zX(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 Nt(t.source,e,`Invalid character escape sequence: "${n.slice(e,e+2)}".`)}function BX(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=Ct(t,C.BLOCK_STRING,e,o+3,MX(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(Wr(l))++o;else if(Va(n,o))o+=2;else throw Nt(t.source,o,`Invalid character within String: ${Jn(t,o)}.`)}throw Nt(t.source,o,"Unterminated string.")}function jX(t,e){let n=t.source.body,r=n.length,i=e+1;for(;i<r;){let o=n.charCodeAt(i);if(WX(o))++i;else break}return Ct(t,C.NAME,e,i,n.slice(e,i))}function Ah(t){return Oa(t,[])}function Oa(t,e){switch(typeof t){case"string":return JSON.stringify(t);case"function":return t.name?`[function ${t.name}]`:"[function]";case"object":return $X(t,e);default:return String(t)}}function $X(t,e){if(t===null)return"null";if(e.includes(t))return"[Circular]";let n=[...e,t];if(qX(t)){let r=t.toJSON();if(r!==t)return typeof r=="string"?r:Oa(r,n)}else if(Array.isArray(t))return eW(t,n);return tW(t,n)}function qX(t){return typeof t.toJSON=="function"}function tW(t,e){let n=Object.entries(t);return n.length===0?"{}":e.length>Cv?"["+nW(t)+"]":"{ "+n.map(([r,i])=>r+": "+Oa(i,e)).join(", ")+" }"}function eW(t,e){if(t.length===0)return"[]";if(e.length>Cv)return"[Array]";let n=Math.min(QX,t.length),r=t.length-n,i=[];for(let o=0;o<n;++o)i.push(Oa(t[o],e));return r===1?i.push("... 1 more item"):r>1&&i.push(`... ${r} more items`),"["+i.join(", ")+"]"}function nW(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 iW(t){return rW(t,kv)}function Zv(t,e){return new oW(t,e).parseDocument()}function Es(t){let e=t.value;return xv(t.kind)+(e!=null?` "${e}"`:"")}function xv(t){return AX(t)?`"${t}"`:t}function sW(t){return`"${t.replace(aW,lW)}"`}function lW(t){return cW[t.charCodeAt(0)]}function hW(t,e,n=Sv){let r=new Map;for(let b of Object.values(A))r.set(b,pW(e,b));let i,o=Array.isArray(t),s=[t],a=-1,c=[],l=t,u,h,p=[],f=[];do{a++;let b=a===s.length,w=b&&c.length!==0;if(b){if(u=f.length===0?void 0:p[p.length-1],l=h,h=f.pop(),w)if(o){l=l.slice();let I=0;for(let[S,T]of c){let x=S-I;T===null?(l.splice(x,1),I++):l[x]=T}}else{l=Object.defineProperties({},Object.getOwnPropertyDescriptors(l));for(let[I,S]of c)l[I]=S}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 E;if(!Array.isArray(l)){var m,d;$g(l)||Hs(!1,`Invalid AST Node: ${Ah(l)}.`);let I=b?(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(E=I==null?void 0:I.call(e,l,u,h,p,f),E===uW)break;if(E===!1){if(!b){p.pop();continue}}else if(E!==void 0&&(c.push([u,E]),!b))if($g(E))l=E;else{p.pop();continue}}if(E===void 0&&w&&c.push([u,l]),b)p.pop();else{var g;i={inArray:o,index:a,keys:s,edits:c,prev:i},o=Array.isArray(l),s=o?l:(g=n[l.kind])!==null&&g!==void 0?g:[],a=-1,c=[],h&&f.push(h),h=l}}while(i!==void 0);return c.length!==0?c[c.length-1][1]:t}function pW(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 Vv(t){return hW(t,fW)}function P(t,e=""){var n;return(n=t==null?void 0:t.filter(r=>r).join(e))!==null&&n!==void 0?n:""}function Ie(t){return rt(`{
8
+ `,zs(P(t,`
9
9
  `)),`
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.
10
+ }`)}function rt(t,e,n=""){return e!=null&&e!==""?t+e+n:""}function zs(t){return rt(" ",t.replace(/\n/g,`
11
+ `))}function tb(t){var e;return(e=t==null?void 0:t.some(n=>n.includes(`
12
+ `)))!==null&&e!==void 0?e:!1}function Nv(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Lv(t){return t.replace(/[\s,]+/g," ").trim()}function xW(t){return Lv(t.source.body.substring(t.start,t.end))}function VW(t){var e=new Set,n=[];return t.definitions.forEach(function(r){if(r.kind==="FragmentDefinition"){var i=r.name.value,o=xW(r.loc),s=Au.get(i);s&&!s.has(o)?Gv&&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||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+=`
14
+ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):s||Au.set(i,s=new Set),s.add(o),e.has(o)||(e.add(o),n.push(r))}else n.push(r)}),aa(aa({},t),{definitions:n})}function OW(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 NW(t){var e=Lv(t);if(!Qs.has(e)){var n=Zv(t,{experimentalFragmentVariables:la,allowLegacyFragmentVariables:la});if(!n||n.kind!=="Document")throw new Error("Not a valid GraphQL document.");Qs.set(e,OW(VW(n)))}return Qs.get(e)}function Ht(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]}),NW(r)}function GW(){Qs.clear(),Au.clear()}function LW(){Gv=!1}function XW(){la=!0}function WW(){la=!1}function _W(t,e=KW){return{PushPayload(n,r){return e(i=>t.request(Wv,n,it(it({},r),i)),"PushPayload","mutation",n)},PushPayloadCompressed(n,r){return e(i=>t.request(MW,n,it(it({},r),i)),"PushPayloadCompressed","mutation",n)},identifySession(n,r){return e(i=>t.request(PW,n,it(it({},r),i)),"identifySession","mutation",n)},addSessionProperties(n,r){return e(i=>t.request(UW,n,it(it({},r),i)),"addSessionProperties","mutation",n)},pushMetrics(n,r){return e(i=>t.request(FW,n,it(it({},r),i)),"pushMetrics","mutation",n)},addSessionFeedback(n,r){return e(i=>t.request(AW,n,it(it({},r),i)),"addSessionFeedback","mutation",n)},initializeSession(n,r){return e(i=>t.request(DW,n,it(it({},r),i)),"initializeSession","mutation",n)},Ignore(n,r){return e(i=>t.request(JW,n,it(it({},r),i)),"Ignore","query",n)},GetSamplingConfig(n,r){return e(i=>t.request(YW,n,it(it({},r),i)),"GetSamplingConfig","query",n)}}}function HW(){var t=document.createElement("canvas");return t.getContext&&t.getContext("2d")?t.toDataURL("image/webp").indexOf("data:image/webp")==0:!1}function zW(){return HW()?{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 Du(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 Du(this.converter,Rs({},this.attributes,i))},withConverter:function(i){return Du(Rs({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(e)},converter:{value:Object.freeze(t)}})}function Av(t){return t.includes("%")||t.includes(":")?t.replace(/%/g,"%25").replace(/:/g,"%3A"):t}function Dv(t){return t.kind==="multi"}function w2(t){return Dv(t)?Object.keys(t).sort().filter(e=>e!=="kind").map(e=>`${e}:${Av(t[e].key)}`).join(":"):t.key}function S2(t){return Dv(t)?Object.keys(t).sort().filter(e=>e!=="kind").map(e=>({[e]:Av(t[e].key)})).reduce((e,n)=>it(it({},e),n),{}):t.key}function Jv(t,e){return E2(t)}function T2(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 Kh(t){if(Cs[t])return Cs[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&&!P2())return Cs[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?Cs[t]=l:n}catch(a){return n}}function dn(t,e,n){var r;let i=`${t}.${String(n)}`;if(vu[i])return vu[i].call(e);let o=Kh(t),s=(r=Object.getOwnPropertyDescriptor(o,n))==null?void 0:r.get;return s?(vu[i]=s,s.call(e)):e[n]}function _v(t,e,n){let r=`${t}.${String(n)}`;if(wu[r])return wu[r].bind(e);let i=Kh(t)[n];return typeof i!="function"?e[n]:(wu[r]=i,i.bind(e))}function U2(t){return dn("Node",t,"childNodes")}function F2(t){return dn("Node",t,"parentNode")}function A2(t){return dn("Node",t,"parentElement")}function D2(t){return dn("Node",t,"textContent")}function J2(t,e){return _v("Node",t,"contains")(e)}function Y2(t){return _v("Node",t,"getRootNode")()}function K2(t){return!t||!("host"in t)?null:dn("ShadowRoot",t,"host")}function _2(t){return t.styleSheets}function H2(t){return!t||!("shadowRoot"in t)?null:dn("Element",t,"shadowRoot")}function z2(t,e){return dn("Element",t,"querySelector")(e)}function B2(t,e){return dn("Element",t,"querySelectorAll")(e)}function j2(){return Kh("MutationObserver").constructor}function Q2(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 Hv(t){return t.nodeType===t.ELEMENT_NODE}function Li(t){let e=t&&"host"in t&&"mode"in t&&Pt.host(t)||null;return!!(e&&"shadowRoot"in e&&Pt.shadowRoot(e)===t)}function Xi(t){return Object.prototype.toString.call(t)==="[object ShadowRoot]"}function $2(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 q2(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 ju(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=>zv(i,n)).join("");return $2(r)}catch(e){return null}}function zv(t,e){if(eM(t)){let n;try{n=ju(t.styleSheet)||q2(t)}catch(r){n=t.cssText}return t.styleSheet.href?ma(n,t.styleSheet.href):n}else{let n=t.cssText;return nM(t)&&t.selectorText.includes(":")&&(n=tM(n)),e?ma(n,e):n}}function tM(t){let e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return t.replace(e,"$1\\$2")}function eM(t){return"styleSheet"in t}function nM(t){return"selectorText"in t}function rM(){return new pa}function da({element:t,maskInputOptions:e,tagName:n,type:r,value:i,overwriteRecord:o,maskInputFn:s}){let a=i||"";return Qv({maskInputOptions:e,tagName:n,type:r,overwriteRecord:o})&&(s?a=s(a,t):a="*".repeat(a.length)),a}function Zr(t){return t.toLowerCase()}function iM(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=db in o?o[db]: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 fa(t){let e=t.type;return t.hasAttribute("data-rr-is-password")?"password":e?Zr(e):null}function Bv(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 oM(t){let e="";return t.indexOf("//")>-1?e=t.split("/").slice(0,3).join("/"):e=t.split("/")[0],e=e.split("?")[0],e}function ma(t,e){return(t||"").replace(sM,(n,r,i,o,s,a)=>{let c=i||s||a,l=r||o||"";if(!c)return n;if(aM.test(c)||lM.test(c))return`url(${l}${c}${l})`;if(cM.test(c))return`url(${l}${c}${l})`;if(c[0]==="/")return`url(${l}${oM(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 ks(t,e=!1){return e?t.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):t.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function uM(t,e,n=!1){let r=Array.from(e.childNodes),i=[],o=0;if(r.length>1&&t&&typeof t=="string"){let s=ks(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=ks(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 g=ks(d).length;m=s.indexOf(p,g)}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 g=ks(t.substring(0,d),n);if(g.length===m){i.push(t.substring(0,d)),t=t.substring(d),s=s.substring(m);break}else g.length<m?d+=Math.max(1,Math.floor((m-g.length)/a)):d-=Math.max(1,Math.floor((g.length-m)*a))}break}}}}return i.push(t),i}function hM(t,e){return uM(t,e).join("/* rr_split */")}function _h(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 Qu(t){return t==="img"||t==="video"||t==="audio"||t==="source"}function jv(t){return t?vM.some(e=>e.test(t)):!1}function $v(){return wM++}function IM(t){if(t instanceof HTMLFormElement)return"form";let e=Zr(t.tagName);return SM.test(e)?"div":e}function RM(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(EM),!(n>=e.length);){let o=r(TM);if(o.slice(-1)===",")o=ya(t,o.substring(0,o.length-1)),i.push(o);else{let s="";o=ya(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 ya(t,e){return!e||e.trim()===""?e:Hh(t,e)}function CM(t){return!!(t.tagName==="svg"||t.ownerSVGElement)}function Hh(t,e){let n=mb.get(t);if(n||(n=t.createElement("a"),mb.set(t,n)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return n.setAttribute("href",e),n.href}function qv(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")?ya(t,r):n==="srcset"?RM(t,r):n==="style"?ma(r,Hh(t)):e==="object"&&n==="data"?ya(t,r):r)}function t0(t,e,n){return(t==="video"||t==="audio")&&e==="autoplay"}function yb(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 ga(t,e,n){if(!t)return!1;if(t.nodeType!==t.ELEMENT_NODE)return n?ga(Pt.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?ga(Pt.parentNode(t),e,n):!1}function e0(t,e,n,r){let i;if(Hv(t)){if(i=t,!Pt.childNodes(i).length)return!1}else{if(Pt.parentElement(t)===null)return!1;i=Pt.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(ga(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 kM(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 ZM(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 xM(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:g,newlyAddedElement:b=!1,cssCaptured:w=!1,privacySetting:E}=e,I=VM(n,r);switch(t.nodeType){case t.DOCUMENT_NODE:return t.compatMode!=="CSS1Compat"?{type:kt.Document,childNodes:[],compatMode:t.compatMode}:{type:kt.Document,childNodes:[]};case t.DOCUMENT_TYPE_NODE:return{type:kt.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId,rootId:I};case t.ELEMENT_NODE:return NM(t,{doc:n,blockClass:i,blockSelector:o,inlineStylesheet:a,maskInputOptions:c,maskInputFn:h,maskTextClass:l,dataURLOptions:p,inlineImages:f,inlineVideos:m,recordCanvas:d,keepIframeSrcFn:g,newlyAddedElement:b,privacySetting:E,rootId:I});case t.TEXT_NODE:return OM(t,{doc:n,needsMask:s,maskTextFn:u,privacySetting:E,rootId:I,cssCaptured:w});case t.CDATA_SECTION_NODE:return{type:kt.CDATA,textContent:"",rootId:I};case t.COMMENT_NODE:return{type:kt.Comment,textContent:Pt.textContent(t)||"",rootId:I};default:return!1}}function VM(t,e){if(!e.hasNode(t))return;let n=e.getId(t);return n===1?void 0:n}function OM(t,e){var n;let{needsMask:r,maskTextFn:i,privacySetting:o,rootId:s,cssCaptured:a}=e,c=Pt.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=Pt.textContent(t),h&&u&&(u=ma(u,Hh(e.doc)))),!h&&!p&&u&&r&&(u=i?i(u,Pt.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"&&jv(u);return(f||d)&&!m&&l&&!new Set(["HEAD","TITLE","STYLE","SCRIPT","HTML","BODY","NOSCRIPT"]).has(l)&&u&&(u=_h(u)),{type:kt.Text,textContent:u||"",rootId:s}}function NM(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:g}=e,b=yb(t,r,i),w=yb(t,c,null),E=d==="strict",I=IM(t),S={},T=t.attributes.length;for(let k=0;k<T;k++){let O=t.attributes[k];t0(I,O.name)||(S[O.name]=qv(n,I,Zr(O.name),O.value))}if(I==="link"&&o){let k=Array.from(n.styleSheets).find(X=>X.href===t.href),O=null;k&&(O=ju(k)),O&&(delete S.rel,delete S.href,S.uo=O)}if(I==="style"&&t.sheet){let k=ju(t.sheet);k&&(t.childNodes.length>1&&(k=hM(k,t)),S.uo=k)}if(I==="input"||I==="textarea"||I==="select"){let k=t.value,O=t.checked;S.type!=="radio"&&S.type!=="checkbox"&&S.type!=="submit"&&S.type!=="button"&&k?S.value=da({element:t,type:fa(t),tagName:I,value:k,overwriteRecord:t.getAttribute("data-hl-record"),maskInputOptions:s,maskInputFn:a}):O&&(S.checked=O)}if(I==="option"&&(t.selected&&!s.select?S.selected=!0:delete S.selected),I==="dialog"&&t.open&&(S.rr_open_mode=t.matches("dialog:modal")?"modal":"non-modal"),I==="canvas"&&p){if(t.__context==="2d")iM(t);else if(!("__context"in t)){let k=t.toDataURL(l.type,l.quality),O=n.createElement("canvas");O.width=t.width,O.height=t.height;let X=O.toDataURL(l.type,l.quality);k!==X&&(S.rr_dataURL=k)}}if(I==="img"&&u&&!b&&!w&&!E){vr||(vr=n.createElement("canvas"),fb=vr.getContext("2d"));let k=t,O=k.currentSrc||k.getAttribute("src")||"<unknown-src>",X=k.crossOrigin,_=()=>{k.removeEventListener("load",_);try{vr.width=k.naturalWidth,vr.height=k.naturalHeight,fb.drawImage(k,0,0),S.rr_dataURL=vr.toDataURL(l.type,l.quality)}catch(tt){if(k.crossOrigin!=="anonymous"){k.crossOrigin="anonymous",k.complete&&k.naturalWidth!==0?_():k.addEventListener("load",_);return}else console.warn(`Cannot inline img src=${O}! Error: ${tt}`)}k.crossOrigin==="anonymous"&&(X?S.crossOrigin=X:k.removeAttribute("crossorigin"))};k.complete&&k.naturalWidth!==0?_():k.addEventListener("load",_)}if(I==="audio"||I==="video"){let k=S;k.rr_mediaState=t.paused?"paused":"played",k.rr_mediaCurrentTime=t.currentTime,k.rr_mediaPlaybackRate=t.playbackRate,k.rr_mediaMuted=t.muted,k.rr_mediaLoop=t.loop,k.rr_mediaVolume=t.volume}if(m||(t.scrollLeft&&(S.rr_scrollLeft=t.scrollLeft),t.scrollTop&&(S.rr_scrollTop=t.scrollTop)),b||w||E&&Qu(I)){let{width:k,height:O}=t.getBoundingClientRect();S={class:S.class,rr_width:`${k}px`,rr_height:`${O}px`}}E&&Qu(I)&&(b=!0),I==="iframe"&&!f(S.src)&&(t.contentDocument||(S.rr_src=S.src),delete S.src);let x;try{customElements.get(I)&&(x=!0)}catch(k){}let Z=k=>{let{width:O,height:X}=k.getBoundingClientRect();S={width:O,height:X,rr_width:`${O}px`,rr_height:`${X}px`,rr_inlined_video:!0,class:S.class,style:S.style},I="canvas";let _=n.createElement("canvas");_.width=t.width,_.height=t.height,S.rr_dataURL=_.toDataURL(l.type,l.quality)};if(I==="video"){let k=t;u&&(k.src===""||k.src.indexOf("blob:")!==-1)&&Z(k),h&&k.src!==""&&k.src.indexOf("blob:")===-1&&Z(k)}return{type:kt.Element,tagName:I,attributes:S,childNodes:[],isSVG:CM(t)||void 0,needBlock:b,needMask:w,rootId:g,isCustom:x}}function gt(t){return t==null?"":t.toLowerCase()}function GM(t,e){return!!(e.comment&&t.type===kt.Comment||t.type===kt.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"&&Bv(t.attributes.href)==="js")||e.headFavicon&&(t.tagName==="link"&&t.attributes.rel==="shortcut icon"||t.tagName==="meta"&&(gt(t.attributes.name).match(/^msapplication-tile(image|color)$/)||gt(t.attributes.name)==="application-name"||gt(t.attributes.rel)==="icon"||gt(t.attributes.rel)==="apple-touch-icon"||gt(t.attributes.rel)==="shortcut icon"))||t.tagName==="meta"&&(e.headMetaDescKeywords&&gt(t.attributes.name).match(/^description|keywords$/)||e.headMetaSocial&&(gt(t.attributes.property).match(/^(og|twitter|fb):/)||gt(t.attributes.name).match(/^(og|twitter):/)||gt(t.attributes.name)==="pinterest")||e.headMetaRobots&&(gt(t.attributes.name)==="robots"||gt(t.attributes.name)==="googlebot"||gt(t.attributes.name)==="bingbot")||e.headMetaHttpEquiv&&t.attributes["http-equiv"]!==void 0||e.headMetaAuthorship&&(gt(t.attributes.name)==="author"||gt(t.attributes.name)==="generator"||gt(t.attributes.name)==="framework"||gt(t.attributes.name)==="publisher"||gt(t.attributes.name)==="progid"||gt(t.attributes.property).match(/^article:/)||gt(t.attributes.property).match(/^product:/))||e.headMetaVerification&&(gt(t.attributes.name)==="google-site-verification"||gt(t.attributes.name)==="yandex-verification"||gt(t.attributes.name)==="csrf-token"||gt(t.attributes.name)==="p:domain_verify"||gt(t.attributes.name)==="verify-v1"||gt(t.attributes.name)==="verification"||gt(t.attributes.name)==="shopify-checkout-api-token"))))}function Tr(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:g=!1,recordCanvas:b=!1,onSerialize:w,onIframeLoad:E,iframeLoadTimeout:I=5e3,onStylesheetLoad:S,stylesheetLoadTimeout:T=5e3,keepIframeSrcFn:x=()=>!1,newlyAddedElement:Z=!1,cssCaptured:k=!1,privacySetting:O}=e,{needsMask:X}=e,{preserveWhiteSpace:_=!0}=e;X||(X=e0(t,s,a,X===void 0));let tt=xM(t,{doc:n,mirror:r,blockClass:i,blockSelector:o,needsMask:X,inlineStylesheet:l,maskInputOptions:u,maskTextClass:s,maskTextFn:h,maskInputFn:p,dataURLOptions:m,inlineImages:d,inlineVideos:g,recordCanvas:b,keepIframeSrcFn:x,newlyAddedElement:Z,cssCaptured:k,privacySetting:O});if(!tt)return console.warn(t,"not serialized"),null;let y;r.hasNode(t)?y=r.getId(t):GM(tt,f)||!_&&tt.type===kt.Text&&!tt.textContent.replace(/^\s+|\s+$/gm,"").length?y=Fi:y=$v();let v=Object.assign(tt,{id:y});if(r.add(t,v),y===Fi)return null;w&&w(t);let V=!c,D=O,U=O==="strict";if(v.type===kt.Element){if(V=V&&!v.needBlock,U||(U=!!v.needBlock||!!v.needMask),D=U?"strict":D,U&&Qu(v.tagName)){let lt=t.cloneNode();lt.src="",r.add(lt,v)}delete v.needBlock,delete v.needMask;let q=Pt.shadowRoot(t);q&&Xi(q)&&(v.isShadowHost=!0)}if((v.type===kt.Document||v.type===kt.Element)&&V){f.headWhitespace&&v.type===kt.Element&&v.tagName==="head"&&(_=!1);let q={doc:n,mirror:r,blockClass:i,blockSelector:o,needsMask:X,maskTextClass:s,maskTextSelector:a,skipChild:c,inlineStylesheet:l,maskInputOptions:u,maskTextFn:h,maskInputFn:p,slimDOMOptions:f,dataURLOptions:m,inlineImages:d,inlineVideos:g,recordCanvas:b,preserveWhiteSpace:_,onSerialize:w,onIframeLoad:E,iframeLoadTimeout:I,onStylesheetLoad:S,stylesheetLoadTimeout:T,keepIframeSrcFn:x,cssCaptured:!1,privacySetting:D};if(!(v.type===kt.Element&&v.tagName==="textarea"&&v.attributes.value!==void 0)){v.type===kt.Element&&v.attributes.uo!==void 0&&typeof v.attributes.uo=="string"&&(q.cssCaptured=!0);for(let Zt of Array.from(Pt.childNodes(t))){let Ce=Tr(Zt,q);Ce&&v.childNodes.push(Ce)}}let lt=null;if(Hv(t)&&(lt=Pt.shadowRoot(t)))for(let Zt of Array.from(Pt.childNodes(lt))){let Ce=Tr(Zt,q);Ce&&(Xi(lt)&&(Ce.isShadow=!0),v.childNodes.push(Ce))}}let L=Pt.parentNode(t);return L&&Li(L)&&Xi(L)&&(v.isShadow=!0),v.type===kt.Element&&v.tagName==="iframe"&&kM(t,()=>{let q=t.contentDocument;if(q&&E){let lt=Tr(q,{doc:q,mirror:r,blockClass:i,blockSelector:o,needsMask:X,maskTextClass:s,maskTextSelector:a,skipChild:!1,inlineStylesheet:l,maskInputOptions:u,maskTextFn:h,maskInputFn:p,slimDOMOptions:f,dataURLOptions:m,inlineImages:d,inlineVideos:g,recordCanvas:b,preserveWhiteSpace:_,onSerialize:w,onIframeLoad:E,iframeLoadTimeout:I,onStylesheetLoad:S,stylesheetLoadTimeout:T,keepIframeSrcFn:x,privacySetting:O});lt&&E(t,lt)}},I),v.type===kt.Element&&v.tagName==="link"&&typeof v.attributes.rel=="string"&&(v.attributes.rel==="stylesheet"||v.attributes.rel==="preload"&&typeof v.attributes.href=="string"&&Bv(v.attributes.href)==="css")&&ZM(t,()=>{if(S){let q=Tr(t,{doc:n,mirror:r,blockClass:i,blockSelector:o,needsMask:X,maskTextClass:s,maskTextSelector:a,skipChild:!1,inlineStylesheet:l,maskInputOptions:u,maskTextFn:h,maskInputFn:p,slimDOMOptions:f,dataURLOptions:m,inlineImages:d,inlineVideos:g,recordCanvas:b,preserveWhiteSpace:_,onSerialize:w,onIframeLoad:E,iframeLoadTimeout:I,onStylesheetLoad:S,stylesheetLoadTimeout:T,keepIframeSrcFn:x,privacySetting:O});q&&S(t,q)}},T),v}function LM(t,e){let{mirror:n=new pa,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:g,onSerialize:b,onIframeLoad:w,iframeLoadTimeout:E,onStylesheetLoad:I,stylesheetLoadTimeout:S,keepIframeSrcFn:T=()=>!1,privacySetting:x="default"}=e||{};return Tr(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:g,onSerialize:b,onIframeLoad:w,iframeLoadTimeout:E,onStylesheetLoad:I,stylesheetLoadTimeout:S,keepIframeSrcFn:T,newlyAddedElement:!1,privacySetting:x})}function XM(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 UM(t){return t[0].toUpperCase()+t.slice(1)}function th(t,e){new FM(e).stringify(t)}function eh(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=>eh(s,n)):(o==="object"&&i!==null&&(i=eh(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 h0(t){return t.map(e=>(e.nodes&&(e.nodes=h0(e.nodes)),delete e.source,e))}function p0(t){if(t[a0]=!1,t.proxyOf.nodes)for(let e of t.proxyOf.nodes)p0(e)}function eP(t){return Buffer?Buffer.from(t,"base64").toString():window.atob(t)}function Ji(t,e){if(Array.isArray(t))return t.map(o=>Ji(o));let n=t,{inputs:r}=n,i=kr(n,["inputs"]);if(r){e=[];for(let o of r){let s=Qt(j({},o),{__proto__:hP.prototype});s.map&&(s.map=Qt(j({},s.map),{__proto__:pP.prototype})),e.push(s)}}if(i.nodes&&(i.nodes=t.nodes.map(o=>Ji(o,e))),i.source){let o=i.source,{inputId:s}=o,a=kr(o,["inputId"]);i.source=a,s!=null&&(i.source.input=e[s])}if(i.type==="root")return new dP(i);if(i.type==="decl")return new uP(i);if(i.type==="rule")return new fP(i);if(i.type==="comment")return new cP(i);if(i.type==="atrule")return new lP(i);throw new Error("Unknown node type: "+t.type)}function MP(t){for(let e=t.length-1;e>=0;e--){let n=t[e],r=n[3]||n[2];if(r)return r}}function Sa(t,e){let n=new AP(t,e),r=new DP(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 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+=`
18
+ You tried to parse Less with the standard CSS parser; try again with the postcss-less parser`)),i}return r.root}function Ri(t){return typeof t=="object"&&typeof t.then=="function"}function V0(t){let e=!1,n=$P[t.type];return t.type==="decl"?e=t.prop.toLowerCase():t.type==="atrule"&&(e=t.name.toLowerCase()),e&&t.append?[n,n+"-"+e,Vr,n+"Exit",n+"Exit-"+e]:e?[n,n+"-"+e,n+"Exit",n+"Exit-"+e]:t.append?[n,Vr,n+"Exit"]:[n,n+"Exit"]}function Gb(t){let e;return t.type==="document"?e=["Document",Vr,"DocumentExit"]:t.type==="root"?e=["Root",Vr,"RootExit"]:e=V0(t),{eventIndex:0,events:e,iterator:0,node:t,visitorIndex:0,visitors:[]}}function uh(t){return t[We]=!1,t.nodes&&t.nodes.forEach(e=>uh(e)),t}function dt(...t){return t.length===1&&Array.isArray(t[0])&&(t=t[0]),new rp(t)}function RU(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 xU(t){return t[0].toUpperCase()+t.slice(1)}function mh(t,e){new VU(e).stringify(t)}function yh(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=>yh(s,n)):(o==="object"&&i!==null&&(i=yh(i)),n[r]=i)}return n}function ki(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 z0(t){return t.map(e=>(e.nodes&&(e.nodes=z0(e.nodes)),delete e.source,e))}function B0(t){if(t[Y0]=!1,t.proxyOf.nodes)for(let e of t.proxyOf.nodes)B0(e)}function KU(t){return Buffer?Buffer.from(t,"base64").toString():window.atob(t)}function Hi(t,e){if(Array.isArray(t))return t.map(o=>Hi(o));let n=t,{inputs:r}=n,i=kr(n,["inputs"]);if(r){e=[];for(let o of r){let s=Qt(j({},o),{__proto__:eF.prototype});s.map&&(s.map=Qt(j({},s.map),{__proto__:nF.prototype})),e.push(s)}}if(i.nodes&&(i.nodes=t.nodes.map(o=>Hi(o,e))),i.source){let o=i.source,{inputId:s}=o,a=kr(o,["inputId"]);i.source=a,s!=null&&(i.source.input=e[s])}if(i.type==="root")return new rF(i);if(i.type==="decl")return new tF(i);if(i.type==="rule")return new iF(i);if(i.type==="comment")return new qU(i);if(i.type==="atrule")return new $U(i);throw new Error("Unknown node type: "+t.type)}function kF(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 OF(t,e),r=new NF(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 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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tw,ew,DF,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+=`
22
+ You tried to parse Less with the standard CSS parser; try again with the postcss-less parser`)),i}return r.root}function xi(t){return typeof t=="object"&&typeof t.then=="function"}function dw(t){let e=!1,n=DF[t.type];return t.type==="decl"?e=t.prop.toLowerCase():t.type==="atrule"&&(e=t.name.toLowerCase()),e&&t.append?[n,n+"-"+e,Gr,n+"Exit",n+"Exit-"+e]:e?[n,n+"-"+e,n+"Exit",n+"Exit-"+e]:t.append?[n,Gr,n+"Exit"]:[n,n+"Exit"]}function jb(t){let e;return t.type==="document"?e=["Document",Gr,"DocumentExit"]:t.type==="root"?e=["Root",Gr,"RootExit"]:e=dw(t),{eventIndex:0,events:e,iterator:0,node:t,visitorIndex:0,visitors:[]}}function Rh(t){return t[Me]=!1,t.nodes&&t.nodes.forEach(e=>Rh(e)),t}function ft(...t){return t.length===1&&Array.isArray(t[0])&&(t=t[0]),new dp(t)}function fp(t){if(Ys[t])return Ys[t];let e=globalThis[t],n=e.prototype,r=t in Qb?Qb[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 $b?$b[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&&!dA())return Ys[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?Ys[t]=l:n}catch(a){return n}}function fn(t,e,n){var r;let i=`${t}.${String(n)}`;if(xu[i])return xu[i].call(e);let o=fp(t),s=(r=Object.getOwnPropertyDescriptor(o,n))==null?void 0:r.get;return s?(xu[i]=s,s.call(e)):e[n]}function Iw(t,e,n){let r=`${t}.${String(n)}`;if(Vu[r])return Vu[r].bind(e);let i=fp(t)[n];return typeof i!="function"?e[n]:(Vu[r]=i,i.bind(e))}function fA(t){return fn("Node",t,"childNodes")}function mA(t){return fn("Node",t,"parentNode")}function yA(t){return fn("Node",t,"parentElement")}function gA(t){return fn("Node",t,"textContent")}function bA(t,e){return Iw("Node",t,"contains")(e)}function vA(t){return Iw("Node",t,"getRootNode")()}function wA(t){return!t||!("host"in t)?null:fn("ShadowRoot",t,"host")}function SA(t){return t.styleSheets}function IA(t){return!t||!("shadowRoot"in t)?null:fn("Element",t,"shadowRoot")}function TA(t,e){return fn("Element",t,"querySelector")(e)}function EA(t,e){return fn("Element",t,"querySelectorAll")(e)}function Tw(){return fp("MutationObserver").constructor}function _n(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 _t(t,e,n=document){let r={capture:!0};return n.addEventListener(t,e,r),()=>n.removeEventListener(t,e,r)}function Bi(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 Ya(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)}}),()=>Ya(t,e,o||{},!0)}function Ew(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=ot.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=ot.parentElement(o.body))==null?void 0:r.scrollTop)||((i=o==null?void 0:o.body)==null?void 0:i.scrollTop)||0}}function Rw(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Cw(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function kw(t){return t?t.nodeType===t.ELEMENT_NODE?t:ot.parentElement(t):null}function Ut(t,e,n,r){if(!t)return!1;let i=kw(t);if(!i)return!1;try{if(typeof e=="string"){if(i.classList.contains(e)||r&&i.closest("."+e)!==null)return!0}else if(ga(i,e,r))return!0}catch(o){}return!!(n&&(i.matches(n)||r&&i.closest(n)!==null))}function CA(t,e){return e.getId(t)!==-1}function Ou(t,e,n){return t.tagName==="TITLE"&&n.headTitleMutations?!0:e.getId(t)===Fi}function Zw(t,e){if(Li(t))return!1;let n=e.getId(t);if(!e.has(n))return!0;let r=ot.parentNode(t);return r&&r.nodeType===t.DOCUMENT_NODE?!1:r?Zw(r,e):!0}function xh(t){return!!t.changedTouches}function kA(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 xw(t,e){return!!(t.nodeName==="IFRAME"&&e.getMeta(t))}function Vw(t,e){return!!(t.nodeName==="LINK"&&t.nodeType===t.ELEMENT_NODE&&t.getAttribute&&t.getAttribute("rel")==="stylesheet"&&e.getMeta(t))}function Vh(t){return t?t instanceof Zh&&"shadowRoot"in t?!!t.shadowRoot:!!ot.shadowRoot(t):!1}function Ow(t){var e;let n=null;return"getRootNode"in t&&((e=ot.getRootNode(t))==null?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&ot.host(ot.getRootNode(t))&&(n=ot.host(ot.getRootNode(t))),n}function ZA(t){let e=t,n;for(;n=Ow(e);)e=n;return e}function xA(t){let e=t.ownerDocument;if(!e)return!1;let n=ZA(t);return ot.contains(e,n)}function Nw(t){let e=t.ownerDocument;return e?ot.contains(e,t)||xA(t):!1}function tv(t){return"__ln"in t}function Lh(t,e){t.delete(e),ot.childNodes(e).forEach(n=>Lh(t,n))}function VA(t,e){let n=[t];for(;n.length;){let r=n.pop();e.has(r)||(e.add(r),ot.childNodes(r).forEach(i=>n.push(i)))}}function nv(t,e,n){return t.size===0?!1:OA(t,e)}function OA(t,e,n){let r=ot.parentNode(e);return r?t.has(r):!1}function rv(t,e){return t.size===0?!1:Lw(t,e)}function Lw(t,e){let n=ot.parentNode(e);return n?t.has(n)?!0:Lw(t,n):!1}function NA(t){Wi=t}function GA(){Wi=void 0}function no(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 Xw(t,e){let n=new Gh;Dn.push(n),n.init(t);let r=new(Tw())(ct(n.processMutations.bind(n)));return r.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),r}function LA({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=Bi(ct(h=>{let p=Date.now()-a;t(s.map(f=>(f.timeOffset-=p,f)),h),s=[],a=null}),o),l=ct(Bi(ct(h=>{let p=no(h),{clientX:f,clientY:m}=xh(h)?h.changedTouches[0]:h;a||(a=Ca()),s.push({x:f,y:m,id:r.getId(p),timeOffset:Ca()-a}),c(typeof DragEvent<"u"&&h instanceof DragEvent?at.Drag:h instanceof MouseEvent?at.MouseMove:at.TouchMove)}),i,{trailing:!1})),u=[_t("mousemove",l,n),_t("touchmove",l,n),_t("drag",l,n)];return ct(()=>{u.forEach(h=>h())})}function XA({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=no(h);if(Ut(p,r,i,!0)||RA(p))return;let f=null,m=u;if("pointerType"in h){switch(h.pointerType){case"mouse":f=un.Mouse;break;case"touch":f=un.Touch;break;case"pen":f=un.Pen;break}f===un.Touch&&(Bt[u]===Bt.MouseDown?m="TouchStart":Bt[u]===Bt.MouseUp&&(m="TouchEnd"))}else xh(h)&&(f=un.Touch);f!==null?(c=f,(m.startsWith("Touch")&&f===un.Touch||m.startsWith("Mouse")&&f===un.Mouse)&&(f=null)):Bt[u]===Bt.Click&&(f=c,c=null);let d=xh(h)?h.changedTouches[0]:h;if(!d)return;let g=n.getId(p),{clientX:b,clientY:w}=d;ct(t)(j({type:Bt[m],id:g,x:b,y:w},f!==null&&{pointerType:f}))};return Object.keys(Bt).filter(u=>Number.isNaN(Number(u))&&!u.endsWith("_Departed")&&s[u]!==!1).forEach(u=>{let h=Zr(u),p=l(u);if(window.PointerEvent)switch(Bt[u]){case Bt.MouseDown:case Bt.MouseUp:h=h.replace("mouse","pointer");break;case Bt.TouchStart:case Bt.TouchEnd:return}a.push(_t(h,p,e))}),ct(()=>{a.forEach(u=>u())})}function Ww({scrollCb:t,doc:e,mirror:n,blockClass:r,blockSelector:i,sampling:o}){let s=ct(Bi(ct(a=>{let c=no(a);if(!c||Ut(c,r,i,!0))return;let l=n.getId(c);if(c===e&&e.defaultView){let u=Ew(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 _t("scroll",s,e)}function WA({viewportResizeCb:t},{win:e}){let n=-1,r=-1,i=ct(Bi(ct(()=>{let o=Rw(),s=Cw();(n!==o||r!==s)&&(t({width:Number(s),height:Number(o)}),n=o,r=s)}),200));return _t("resize",i,e)}function PA({inputCb:t,doc:e,mirror:n,blockClass:r,blockSelector:i,ignoreClass:o,ignoreSelector:s,maskInputOptions:a,maskInputFn:c,sampling:l,userTriggeredOnInput:u}){function h(b){let w=no(b),E=b.isTrusted,I=w&&w.tagName;if(w&&I==="OPTION"&&(w=ot.parentElement(w)),!w||!I||MA.indexOf(I)<0||Ut(w,r,i,!0)||w.classList.contains(o)||s&&w.matches(s))return;let S=w.value,T=!1,x=fa(w)||"",Z=w.getAttribute("data-hl-record");x==="radio"||x==="checkbox"?T=w.checked:Qv({maskInputOptions:a,type:x,tagName:I,overwriteRecord:Z})&&(S=da({element:w,maskInputOptions:a,tagName:I,type:x,value:S,overwriteRecord:Z,maskInputFn:c})),p(w,u?{text:S,isChecked:T,userTriggered:E}:{text:S,isChecked:T});let k=w.name;x==="radio"&&k&&T&&e.querySelectorAll(`input[type="radio"][name="${k}"]`).forEach(O=>{if(O!==w){let X=O.value;p(O,u?{text:X,isChecked:!T,userTriggered:!1}:{text:X,isChecked:!T})}})}function p(b,w){let E=iv.get(b);if(!E||E.text!==w.text||E.isChecked!==w.isChecked){iv.set(b,w);let I=n.getId(b);ct(t)(Qt(j({},w),{id:I}))}}let f=(l.input==="last"?["change"]:["input","change"]).map(b=>_t(b,ct(h),e)),m=e.defaultView;if(!m)return()=>{f.forEach(b=>b())};let d=m.Object.getOwnPropertyDescriptor(m.HTMLInputElement.prototype,"value"),g=[[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(...g.map(b=>Ya(b[0],b[1],{set(){ct(h)({target:this,isTrusted:!1})}},!1,m))),ct(()=>{f.forEach(b=>b())})}function ka(t){let e=[];function n(r,i){if(Ks("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||Ks("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||Ks("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||Ks("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 hn(t,e,n){let r,i;return t?(t.ownerNode?r=e.getId(t.ownerNode):i=n.getId(t),{styleId:i,id:r}):{}}function UA({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:ct((u,h,p)=>{let[f,m]=p,{id:d,styleId:g}=hn(h,e,n.styleMirror);return(d&&d!==-1||g&&g!==-1)&&t({id:d,styleId:g,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:ct((u,h,p)=>{let[f]=p,{id:m,styleId:d}=hn(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:ct((u,h,p)=>{let[f]=p,{id:m,styleId:d}=hn(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:ct((u,h,p)=>{let[f]=p,{id:m,styleId:d}=hn(h,e,n.styleMirror);return(m&&m!==-1||d&&d!==-1)&&t({id:m,styleId:d,replaceSync:f}),u.apply(h,p)})}));let c={};_s("CSSGroupingRule")?c.CSSGroupingRule=r.CSSGroupingRule:(_s("CSSMediaRule")&&(c.CSSMediaRule=r.CSSMediaRule),_s("CSSConditionRule")&&(c.CSSConditionRule=r.CSSConditionRule),_s("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:ct((p,f,m)=>{let[d,g]=m,{id:b,styleId:w}=hn(f.parentStyleSheet,e,n.styleMirror);return(b&&b!==-1||w&&w!==-1)&&t({id:b,styleId:w,adds:[{rule:d,index:[...ka(f),g||0]}]}),p.apply(f,m)})}),h.prototype.deleteRule=new Proxy(l[u].deleteRule,{apply:ct((p,f,m)=>{let[d]=m,{id:g,styleId:b}=hn(f.parentStyleSheet,e,n.styleMirror);return(g&&g!==-1||b&&b!==-1)&&t({id:g,styleId:b,removes:[{index:[...ka(f),d]}]}),p.apply(f,m)})})}),ct(()=>{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 Mw({mirror:t,stylesheetManager:e},n){var r,i,o;let s=null;n.nodeName==="#document"?s=t.getId(n):s=t.getId(ot.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}}),ct(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:c.configurable,enumerable:c.enumerable,get:c.get,set:c.set})}))}function FA({styleDeclarationCb:t,mirror:e,ignoreCSSAttributes:n,stylesheetManager:r},{win:i}){let o=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(o,{apply:ct((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}=hn((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:ka(c.parentRule)}),a.apply(c,l)})});let s=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(s,{apply:ct((a,c,l)=>{var u;let[h]=l;if(n.has(h))return s.apply(c,[h]);let{id:p,styleId:f}=hn((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:ka(c.parentRule)}),a.apply(c,l)})}),ct(()=>{i.CSSStyleDeclaration.prototype.setProperty=o,i.CSSStyleDeclaration.prototype.removeProperty=s})}function AA({mediaInteractionCb:t,blockClass:e,blockSelector:n,mirror:r,sampling:i,doc:o}){let s=ct(c=>Bi(ct(l=>{let u=no(l);if(!u||Ut(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=[_t("play",s(Sr.Play),o),_t("pause",s(Sr.Pause),o),_t("seeked",s(Sr.Seeked),o),_t("volumechange",s(Sr.VolumeChange),o),_t("ratechange",s(Sr.RateChange),o)];return ct(()=>{a.forEach(c=>c())})}function DA({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=_n(e.fonts,"add",function(a){return function(c){return setTimeout(ct(()=>{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),ct(()=>{r.forEach(a=>a())})}function JA(t){let{doc:e,mirror:n,blockClass:r,blockSelector:i,selectionCb:o}=t,s=!0,a=ct(()=>{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:g}=p;Ut(f,r,i,!0)||Ut(d,r,i,!0)||l.push({start:n.getId(f),startOffset:m,end:n.getId(d),endOffset:g})}o({ranges:l})});return a(),_t("selectionchange",a)}function YA({doc:t,customElementCb:e}){let n=t.defaultView;return!n||!n.customElements?()=>{}:_n(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 KA(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 _A(t,e={}){let n=t.doc.defaultView;if(!n)return()=>{};KA(t,e);let r;t.recordDOM&&(r=Xw(t,t.doc));let i=LA(t),o=XA(t),s=Ww(t),a=WA(t,{win:n}),c=PA(t),l=AA(t),u=()=>{},h=()=>{},p=()=>{},f=()=>{};t.recordDOM&&(u=UA(t,{win:n}),h=Mw(t,t.doc),p=FA(t,{win:n}),t.collectFonts&&(f=DA(t)));let m=JA(t),d=YA(t),g=[];for(let b of t.plugins)g.push(b.observer(b.callback,n,b.options));return ct(()=>{Dn.forEach(b=>b.reset()),r==null||r.disconnect(),i(),o(),s(),a(),c(),l(),u(),h(),p(),f(),m(),d(),g.forEach(b=>b())})}function Ks(t){return typeof window[t]<"u"}function _s(t){return!!(typeof window[t]<"u"&&window[t].prototype&&"insertRule"in window[t].prototype&&"deleteRule"in window[t].prototype)}function BA(t,e){let n=ov.get(t);return n||(n=new Map,ov.set(t,n)),n.has(e)||n.set(e,[]),n.get(e)}function ra(t,e,n){if(t instanceof Array)return t.map(r=>ra(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=zA(t);return{rr_type:r,base64:i}}else{if(t instanceof DataView)return{rr_type:t.constructor.name,args:[ra(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:[ra(t.data,e,n),t.width,t.height]};if(Fw(t,e)||typeof t=="object"){let r=t.constructor.name,i=Pw(t,e,n);return{rr_type:r,index:i}}}}return t}function jA(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=_n(e.CanvasRenderingContext2D.prototype,s,function(c){return function(...l){return Ut(this.canvas,n,r,!0)||setTimeout(()=>{let u=Uw(l,e,this);t(this.canvas,{type:Xr["2D"],property:s,args:u})},0),c.apply(this,l)}});i.push(a)}catch(a){let c=Ya(e.CanvasRenderingContext2D.prototype,s,{set(l){t(this.canvas,{type:Xr["2D"],property:s,args:[l],setter:!0})}});i.push(c)}return()=>{i.forEach(s=>s())}}function QA(t){return t==="experimental-webgl"?"webgl":t}function sv(t,e,n,r){let i=[];try{let o=_n(t.HTMLCanvasElement.prototype,"getContext",function(s){return function(a,...c){if(!Ut(this,e,n,!0)){let l=QA(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 av(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=_n(t,c,function(u){return function(...h){let p=u.apply(this,h);if(Pw(p,o,this),"tagName"in this.canvas&&!Ut(this.canvas,r,i,!0)){let f=Uw(h,o,this),m={type:e,property:c,args:f};n(this.canvas,m)}return p}});s.push(l)}catch(l){let u=Ya(t,c,{set(h){n(this.canvas,{type:e,property:c,args:[h],setter:!0})}});s.push(u)}return s}function $A(t,e,n,r){let i=[];return i.push(...av(e.WebGLRenderingContext.prototype,Xr.WebGL,t,n,r,e)),typeof e.WebGL2RenderingContext<"u"&&i.push(...av(e.WebGL2RenderingContext.prototype,Xr.WebGL2,t,n,r,e)),()=>{i.forEach(o=>o())}}function t9(t){let e;try{if(e=lv&&(self.URL||self.webkitURL).createObjectURL(lv),!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,"+Aw,{name:t==null?void 0:t.name})}finally{e&&(self.URL||self.webkitURL).revokeObjectURL(e)}}function je(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:g="highlight-mask",maskTextSelector:b=null,inlineStylesheet:w=!0,maskAllInputs:E,maskInputOptions:I,slimDOMOptions:S,maskInputFn:T,maskTextFn:x=_h,hooks:Z,packFn:k,sampling:O={},mousemoveWait:X,recordDOM:_=!0,recordCanvas:tt=!1,recordCrossOriginIframes:y=!1,recordAfter:v=t.recordAfter==="DOMContentLoaded"?t.recordAfter:"load",userTriggeredOnInput:V=!1,collectFonts:D=!1,inlineImages:U=!1,inlineVideos:L=!1,plugins:q,keepIframeSrcFn:lt=()=>!1,privacySetting:Zt="default",ignoreCSSAttributes:Ce=new Set([]),errorHandler:ro,logger:io}=t,qe=j(j({},t.dataURLOptions),(n=(e=t.sampling)==null?void 0:e.canvas)==null?void 0:n.dataURLOptions);NA(ro);let Hn=y?window.parent===window:!0,mn=!1;if(!Hn)try{window.parent.document&&(mn=!1)}catch(Q){mn=!0}if(Hn&&!l)throw new Error("emit function is required");if(!Hn&&!mn)return()=>{};X!==void 0&&O.mousemove===void 0&&(O.mousemove=X),Te.reset();let yn=E===!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}:I!==void 0?I:{password:!0},Mr=S===!0||S==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:S==="all",headMetaDescKeywords:S==="all",headTitleMutations:S==="all"}:S||{};kA();let Y,ht=0,$t=Q=>{for(let ne of q||[])ne.eventProcessor&&(Q=ne.eventProcessor(Q));return k&&!mn&&(Q=k(Q)),Q};It=(Q,ne)=>{var vt;let wt=Q;if(wt.timestamp=Ca(),(vt=Dn[0])!=null&&vt.isFrozen()&&wt.type!==ut.FullSnapshot&&!(wt.type===ut.IncrementalSnapshot&&wt.data.source===at.Mutation)&&Dn.forEach(Ze=>Ze.unfreeze()),Hn)l==null||l($t(wt),ne);else if(mn){let Ze={type:"rrweb",event:$t(wt),origin:window.location.origin,isCheckout:ne};window.parent.postMessage(Ze,"*")}if(wt.type===ut.FullSnapshot)Y=wt,ht=0;else if(wt.type===ut.IncrementalSnapshot){if(wt.data.source===at.Mutation&&wt.data.isAttachIframe)return;ht++;let Ze=h&&ht>=h,mt=u&&wt.timestamp-Y.timestamp>u;(Ze||mt)&&ia(!0)}};let Lt=Q=>{It({type:ut.IncrementalSnapshot,data:j({source:at.Mutation},Q)})},qt=Q=>It({type:ut.IncrementalSnapshot,data:j({source:at.Scroll},Q)}),te=Q=>It({type:ut.IncrementalSnapshot,data:j({source:at.CanvasMutation},Q)}),zn=Q=>It({type:ut.IncrementalSnapshot,data:j({source:at.AdoptedStyleSheet},Q)}),ee=new Ph({mutationCb:Lt,adoptedStyleSheetCb:zn}),se=new Xh({mirror:Te,mutationCb:Lt,stylesheetManager:ee,recordCrossOriginIframes:y,wrappedEmit:It});for(let Q of q||[])Q.getMirror&&Q.getMirror({nodeMirror:Te,crossOriginIframeMirror:se.crossOriginIframeMirror,crossOriginIframeStyleMirror:se.crossOriginIframeStyleMirror});let ke=new Uh;Mi=new Mh({recordCanvas:tt,recordLocalVideos:U,recordRemoteVideos:L,mutationCb:te,win:window,blockClass:p,blockSelector:f,mirror:Te,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:qe,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:io});let yt=new Wh({mutationCb:Lt,scrollCb:qt,bypassOptions:{blockClass:p,blockSelector:f,maskTextClass:g,maskTextSelector:b,inlineStylesheet:w,maskInputOptions:yn,dataURLOptions:qe,maskTextFn:x,maskInputFn:T,recordCanvas:tt,inlineImages:U,inlineVideos:L,privacySetting:Zt,sampling:O,slimDOMOptions:Mr,iframeManager:se,stylesheetManager:ee,canvasManager:Mi,keepIframeSrcFn:lt,processedNodeManager:ke},mirror:Te});ia=(Q=!1)=>{if(!_)return;It({type:ut.Meta,data:{href:window.location.href,width:Cw(),height:Rw()}},Q),ee.reset(),yt.init(),Dn.forEach(vt=>vt.lock());let ne=LM(document,{mirror:Te,blockClass:p,blockSelector:f,maskTextClass:g,maskTextSelector:b,inlineStylesheet:w,maskAllInputs:yn,maskTextFn:x,maskInputFn:T,slimDOM:Mr,dataURLOptions:qe,recordCanvas:tt,inlineImages:U,inlineVideos:L,privacySetting:Zt,onSerialize:vt=>{xw(vt,Te)&&se.addIframe(vt),Vw(vt,Te)&&ee.trackLinkElement(vt),Vh(vt)&&yt.addShadowRoot(ot.shadowRoot(vt),document)},onIframeLoad:(vt,wt)=>{se.attachIframe(vt,wt),yt.observeAttachShadow(vt)},onStylesheetLoad:(vt,wt)=>{ee.attachLinkElement(vt,wt)},keepIframeSrcFn:lt});if(!ne)return console.warn("Failed to snapshot the document");It({type:ut.FullSnapshot,data:{node:ne,initialOffset:Ew(window)}},Q),Dn.forEach(vt=>vt.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&ee.adoptStyleSheets(document.adoptedStyleSheets,Te.getId(document))};try{let Q=[],ne=wt=>{var Ze;return ct(_A)({mutationCb:Lt,mousemoveCb:(mt,Ka)=>It({type:ut.IncrementalSnapshot,data:{source:Ka,positions:mt}}),mouseInteractionCb:mt=>It({type:ut.IncrementalSnapshot,data:j({source:at.MouseInteraction},mt)}),scrollCb:qt,viewportResizeCb:mt=>It({type:ut.IncrementalSnapshot,data:j({source:at.ViewportResize},mt)}),inputCb:mt=>It({type:ut.IncrementalSnapshot,data:j({source:at.Input},mt)}),mediaInteractionCb:mt=>It({type:ut.IncrementalSnapshot,data:j({source:at.MediaInteraction},mt)}),styleSheetRuleCb:mt=>It({type:ut.IncrementalSnapshot,data:j({source:at.StyleSheetRule},mt)}),styleDeclarationCb:mt=>It({type:ut.IncrementalSnapshot,data:j({source:at.StyleDeclaration},mt)}),canvasMutationCb:te,fontCb:mt=>It({type:ut.IncrementalSnapshot,data:j({source:at.Font},mt)}),selectionCb:mt=>{It({type:ut.IncrementalSnapshot,data:j({source:at.Selection},mt)})},customElementCb:mt=>{It({type:ut.IncrementalSnapshot,data:j({source:at.CustomElement},mt)})},blockClass:p,ignoreClass:m,ignoreSelector:d,maskTextClass:g,maskTextSelector:b,maskInputOptions:yn,inlineStylesheet:w,sampling:O,recordDOM:_,recordCanvas:tt,inlineImages:U,inlineVideos:L,userTriggeredOnInput:V,collectFonts:D,doc:wt,maskInputFn:T,maskTextFn:x,keepIframeSrcFn:lt,blockSelector:f,slimDOMOptions:Mr,dataURLOptions:qe,mirror:Te,iframeManager:se,stylesheetManager:ee,shadowDomManager:yt,processedNodeManager:ke,canvasManager:Mi,ignoreCSSAttributes:Ce,privacySetting:Zt,plugins:((Ze=q==null?void 0:q.filter(mt=>mt.observer))==null?void 0:Ze.map(mt=>({observer:mt.observer,options:mt.options,callback:Ka=>It({type:ut.Plugin,data:{plugin:mt.name,payload:Ka}})})))||[]},Z)};se.addLoadListener(wt=>{try{Q.push(ne(wt.contentDocument))}catch(Ze){console.warn(Ze)}});let vt=()=>{ia(),Q.push(ne(document)),xa=!0};return document.readyState==="interactive"||document.readyState==="complete"?vt():(Q.push(_t("DOMContentLoaded",()=>{It({type:ut.DomContentLoaded,data:{}}),v==="DOMContentLoaded"&&vt()})),Q.push(_t("load",()=>{It({type:ut.Load,data:{}}),v==="load"&&vt()},window))),()=>{Q.forEach(wt=>wt()),ke.destroy(),xa=!1,GA()}}catch(Q){console.warn(Q)}}function c9(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 p9(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 d9(t,e,n){t.addEventListener?t.addEventListener(e,n,!1):t.attachEvent&&t.attachEvent(`on${e}`,()=>{n(window.event)})}function f9(t,e,n){let r;if(e.scope===n||e.scope==="all"){r=e.mods.length>0;for(let i in Kt)Object.prototype.hasOwnProperty.call(Kt,i)&&(!Kt[i]&&e.mods.indexOf(+i)>-1||Kt[i]&&e.mods.indexOf(+i)===-1)&&(r=!1);(e.mods.length===0&&!Kt[16]&&!Kt[18]&&!Kt[17]&&!Kt[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 m9(t){let e=Pe["*"],n=t.keyCode||t.which||t.charCode;if((n===93||n===224)&&(n=91),Yt.indexOf(n)===-1&&n!==229&&Yt.push(n),["ctrlKey","altKey","shiftKey","metaKey"].forEach(r=>{let i=pv[r];t[r]&&Yt.indexOf(i)===-1?Yt.push(i):!t[r]&&Yt.indexOf(i)>-1?Yt.splice(Yt.indexOf(i),1):r==="metaKey"&&t[r]&&Yt.length===3&&(t.ctrlKey||t.shiftKey||t.altKey||(Yt=Yt.slice(Yt.indexOf(i))))}),!(n in Kt&&(Kt[n]=!0,!e))){for(let r in Kt)Object.prototype.hasOwnProperty.call(Kt,r)&&(Kt[r]=t[pv[r]]);if(t.getModifierState&&!(t.altKey&&!t.ctrlKey)&&t.getModifierState("AltGraph")&&(Yt.indexOf(17)===-1&&Yt.push(17),Yt.indexOf(18)===-1&&Yt.push(18),Kt[17]=!0,Kt[18]=!0),n in Pe){for(let r=0;r<Pe[n].length;r++)if((t.type==="keydown"&&Pe[n][r].keydown||t.type==="keyup"&&Pe[n][r].keyup)&&Pe[n][r].key){let i=Pe[n][r];f9(t,i,"all")}}}}function w9(t){let e;try{if(e=mv&&(self.URL||self.webkitURL).createObjectURL(mv),!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,"+Jw,{name:t==null?void 0:t.name})}finally{e&&(self.URL||self.webkitURL).revokeObjectURL(e)}}var SX,IX,Be,TX,oe,EX,yv,gr,RX,CX,kX,oa,gv,bv,Lu,it,Rr,Ni,Pi,Cr,OX,Wu,LX,wv,Sv,XX,Ir,Mu,A,C,FX,QX,Cv,rW,kv,oW,aW,cW,uW,dW,fW,Dh,mW,yW,gW,bW,vW,eb,mu,Ov,wW,Uu,sa,js,SW,br,nb,IW,TW,EW,yu,RW,CW,gu,Fu,kW,ZW,aa,Qs,Au,Gv,la,Si,Xv,Wv,MW,PW,UW,FW,AW,DW,JW,YW,KW,Mv,rb,BW,jW,Pv,ib,QW,ob,$W,qW,t2,e2,n2,bu,Ju,Jh,Yu,r2,Ku,Na,ca,Yh,i2,sb,ve,pn,_u,o2,ie,Ga,s2,a2,Uv,Gi,l2,$s,Fn,c2,Fv,u2,h2,p2,d2,f2,m2,y2,g2,ab,b2,v2,I2,Hu,E2,lb,R2,zu,C2,k2,ua,An,Z2,x2,V2,ha,Yv,Kv,Bu,j,Qt,kr,K,jt,O2,N2,G2,L2,X2,G,cb,W2,M2,ub,kt,hb,pb,Cs,P2,vu,wu,Pt,pa,db,sM,aM,lM,cM,pM,dM,fM,mM,yM,gM,bM,vM,Qv,wM,SM,Fi,vr,fb,TM,EM,mb,zh,z,n0,WM,MM,PM,Ee,gb,bb,$u,Bh,vb,qu,i0,FM,La,$i,AM,DM,JM,Ii,YM,nh,Xa,KM,rh,Wa,_M,ih,Ma,o0,s0,HM,a0,l0,jh,c0,u0,Qh,Qe,Yn,f0,ba,$h,zM,m0,y0,Ai,qh,BM,jM,QM,$M,qM,Su,tP,wb,Sb,oh,g0,nP,sh,ah,rP,iP,Ib,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,sA,aA,lA,cA,dp,uA,ww,Sw,hA,pA,Zh,Qb,$b,Ys,dA,xu,Vu,ot,wr,qb,Ca,RA,Oh,ut,at,Bt,un,Xr,Sr,Gw,Nh,ev,Gh,Wi,ct,Dn,MA,iv,Za,Xh,Wh,Er,HA,Vi,zA,ov,Pw,Uw,Fw,Aw,qA,lv,Mh,Ph,Uh,It,ia,Mi,xa,Te,cv,uv,e9,n9,r9,i9,o9,s9,hv,Nu,a9,l9,Yt,Pe,Gu,u9,pv,Kt,Dw,h9,dv,fv,ji,y9,g9,b9,Jw,v9,mv,ze,S9,I9,T9,E9,Fh,Qi,du=wp(()=>{"use strict";SX=Object.defineProperty,IX=(t,e,n)=>e in t?SX(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Be=(t,e,n)=>IX(t,typeof e!="symbol"?e+"":e,n),TX=(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())}),oe=(t,e,...n)=>{let r=`[@launchdarkly plugins]: (${t}): `;console[e].apply(console,[r,...n]),EX(r,...n)},EX=(t,...e)=>TX(void 0,null,function*(){try{let{LDObserve:n}=yield Promise.resolve().then(()=>(Bg(),zg));n.recordLog(`${t}${e}`,"warn")}catch(n){}}),yv=class{constructor(t,e){Be(this,"debug"),Be(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])}},gr=class{constructor(){Be(this,"_sdk"),Be(this,"_isLoaded",!1),Be(this,"_callBuffer",[]),Be(this,"_capacity",1e5),Be(this,"_droppedEvents",0),Be(this,"_exceededCapacity",!1),Be(this,"_logger",new yv)}p(e,n){if(this.gr)try{return this.Wr[e](...n)}catch(r){oe(`Error executing buffered call to ${e}:`,"error",r)}else{this.Ei({method:e,args:n});return}}Ei(e){this.ar.length<this.Rs?(this.ar.push(e),this.Mr=!1):(this.Mr||(this.Mr=!0,oe("Exceeded event queue capacity. Increase capacity to avoid dropping events.","warn")),this.Cs+=1)}load(e){this.Wr=e,this.gr=!0;for(let{method:n,args:r}of this.ar)try{this.Wr[n](...r)}catch(i){oe(`Error executing buffered call to ${n}:`,"error",i)}this.ar=[]}},RX=Object.defineProperty,CX=Object.defineProperties,kX=Object.getOwnPropertyDescriptors,oa=Object.getOwnPropertySymbols,gv=Object.prototype.hasOwnProperty,bv=Object.prototype.propertyIsEnumerable,Lu=(t,e,n)=>e in t?RX(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,it=(t,e)=>{for(var n in e||(e={}))gv.call(e,n)&&Lu(t,n,e[n]);if(oa)for(var n of oa(e))bv.call(e,n)&&Lu(t,n,e[n]);return t},Rr=(t,e)=>CX(t,kX(e)),Ni=(t,e)=>{var n={};for(var r in t)gv.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&oa)for(var r of oa(t))e.indexOf(r)<0&&bv.call(t,r)&&(n[r]=t[r]);return n},Pi=(t,e,n)=>Lu(t,typeof e!="symbol"?e+"":e,n),Cr=(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())});OX=/\r\n|[\n\r]/g;Wu=class t extends Error{constructor(e,...n){var r,i,o;let{nodes:s,source:a,positions:c,path:l,originalError:u,extensions:h}=GX(n);super(e),this.name="GraphQLError",this.path=l!=null?l:void 0,this.originalError=u!=null?u:void 0,this.nodes=Qg(Array.isArray(s)?s:s?[s]:void 0);let p=Qg((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=>Xu(a,m)):p==null?void 0:p.map(m=>Xu(m.source,m.start));let f=xX(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
- `+IL(n.loc));else if(this.source&&this.locations)for(let n of this.locations)e+=`
24
+ `+NX(n.loc));else if(this.source&&this.locations)for(let n of this.locations)e+=`
25
25
 
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.
26
+ `+vv(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}};LX=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}}},wv=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}}},Sv={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"]},XX=new Set(Object.keys(Sv));(function(t){t.QUERY="query",t.MUTATION="mutation",t.SUBSCRIPTION="subscription"})(Ir||(Ir={}));(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"})(Mu||(Mu={}));(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"})(C||(C={}));FX=class{constructor(t){let e=new wv(C.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!==C.EOF)do if(t.next)t=t.next;else{let e=DX(this,t.end);t.next=e,e.prev=t,t=e}while(t.kind===C.COMMENT);return t}};QX=10,Cv=2;rW=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=Ah(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},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,`
37
+ spurious results.`)}}return!1},kv=class{constructor(t,e="GraphQL request",n={line:1,column:1}){typeof t=="string"||Hs(!1,`Body must be a string. Received: ${Ah(t)}.`),this.body=t,this.name=e,this.locationOffset=n,this.locationOffset.line>0||Hs(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||Hs(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}};oW=class{constructor(t,e={}){let n=iW(t)?t:new kv(t);this.l=new FX(n),this.lr=e,this.Pr=0}parseName(){let t=this.expectToken(C.NAME);return this.node(t,{kind:A.NAME,value:t.value})}parseDocument(){return this.node(this.l.token,{kind:A.DOCUMENT,definitions:this.many(C.SOF,this.parseDefinition,C.EOF)})}parseDefinition(){if(this.peek(C.BRACE_L))return this.parseOperationDefinition();let t=this.peekDescription(),e=t?this.l.lookahead():this.l.token;if(e.kind===C.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 Nt(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(C.BRACE_L))return this.node(t,{kind:A.OPERATION_DEFINITION,operation:Ir.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});let e=this.parseOperationType(),n;return this.peek(C.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(C.NAME);switch(t.value){case"query":return Ir.QUERY;case"mutation":return Ir.MUTATION;case"subscription":return Ir.SUBSCRIPTION}throw this.unexpected(t)}parseVariableDefinitions(){return this.optionalMany(C.PAREN_L,this.parseVariableDefinition,C.PAREN_R)}parseVariableDefinition(){return this.node(this.l.token,{kind:A.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(C.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(C.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){let t=this.l.token;return this.expectToken(C.DOLLAR),this.node(t,{kind:A.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this.l.token,{kind:A.SELECTION_SET,selections:this.many(C.BRACE_L,this.parseSelection,C.BRACE_R)})}parseSelection(){return this.peek(C.SPREAD)?this.parseFragment():this.parseField()}parseField(){let t=this.l.token,e=this.parseName(),n,r;return this.expectOptionalToken(C.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(C.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(t){let e=t?this.parseConstArgument:this.parseArgument;return this.optionalMany(C.PAREN_L,e,C.PAREN_R)}parseArgument(t=!1){let e=this.l.token,n=this.parseName();return this.expectToken(C.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(C.SPREAD);let e=this.expectOptionalKeyword("on");return!e&&this.peek(C.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.lr.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 C.BRACKET_L:return this.parseList(t);case C.BRACE_L:return this.parseObject(t);case C.INT:return this.advanceLexer(),this.node(e,{kind:A.INT,value:e.value});case C.FLOAT:return this.advanceLexer(),this.node(e,{kind:A.FLOAT,value:e.value});case C.STRING:case C.BLOCK_STRING:return this.parseStringLiteral();case C.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 C.DOLLAR:if(t)if(this.expectToken(C.DOLLAR),this.l.token.kind===C.NAME){let n=this.l.token.value;throw Nt(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===C.BLOCK_STRING})}parseList(t){let e=()=>this.parseValueLiteral(t);return this.node(this.l.token,{kind:A.LIST,values:this.any(C.BRACKET_L,e,C.BRACKET_R)})}parseObject(t){let e=()=>this.parseObjectField(t);return this.node(this.l.token,{kind:A.OBJECT,fields:this.any(C.BRACE_L,e,C.BRACE_R)})}parseObjectField(t){let e=this.l.token,n=this.parseName();return this.expectToken(C.COLON),this.node(e,{kind:A.OBJECT_FIELD,name:n,value:this.parseValueLiteral(t)})}parseDirectives(t){let e=[];for(;this.peek(C.AT);)e.push(this.parseDirective(t));return e}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(t){let e=this.l.token;return this.expectToken(C.AT),this.node(e,{kind:A.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(t)})}parseTypeReference(){let t=this.l.token,e;if(this.expectOptionalToken(C.BRACKET_L)){let n=this.parseTypeReference();this.expectToken(C.BRACKET_R),e=this.node(t,{kind:A.LIST_TYPE,type:n})}else e=this.parseNamedType();return this.expectOptionalToken(C.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(C.STRING)||this.peek(C.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(C.BRACE_L,this.parseOperationTypeDefinition,C.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(C.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(C.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(C.BRACE_L,this.parseFieldDefinition,C.BRACE_R)}parseFieldDefinition(){let t=this.l.token,e=this.parseDescription(),n=this.parseName(),r=this.parseArgumentDefs();this.expectToken(C.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(C.PAREN_L,this.parseInputValueDef,C.PAREN_R)}parseInputValueDef(){let t=this.l.token,e=this.parseDescription(),n=this.parseName();this.expectToken(C.COLON);let r=this.parseTypeReference(),i;this.expectOptionalToken(C.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(C.EQUALS)?this.delimitedMany(C.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(C.BRACE_L,this.parseEnumValueDefinition,C.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 Nt(this.l.source,this.l.token.start,`${Es(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(C.BRACE_L,this.parseInputValueDef,C.BRACE_R)}parseTypeSystemExtension(){let t=this.l.lookahead();if(t.kind===C.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(C.BRACE_L,this.parseOperationTypeDefinition,C.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(C.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(C.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){let t=this.l.token,e=this.parseName();if(Object.prototype.hasOwnProperty.call(Mu,e.value))return e;throw this.unexpected(t)}node(t,e){return this.lr.noLocation!==!0&&(e.loc=new LX(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 Nt(this.l.source,e.start,`Expected ${xv(t)}, found ${Es(e)}.`)}expectOptionalToken(t){return this.l.token.kind===t?(this.advanceLexer(),!0):!1}expectKeyword(t){let e=this.l.token;if(e.kind===C.NAME&&e.value===t)this.advanceLexer();else throw Nt(this.l.source,e.start,`Expected "${t}", found ${Es(e)}.`)}expectOptionalKeyword(t){let e=this.l.token;return e.kind===C.NAME&&e.value===t?(this.advanceLexer(),!0):!1}unexpected(t){let e=t!=null?t:this.l.token;return Nt(this.l.source,e.start,`Unexpected ${Es(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.lr,e=this.l.advance();if(t!==void 0&&e.kind!==C.EOF&&(++this.Pr,this.Pr>t))throw Nt(this.l.source,e.start,`Document contains more that ${t} tokens. Parsing aborted.`)}};aW=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;cW=["\\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"],uW=Object.freeze({});dW=80,fW={Name:{leave:t=>t.value},Variable:{leave:t=>"$"+t.name},Document:{leave:t=>P(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})=>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,`
39
+ `)},OperationDefinition:{leave(t){let e=rt("(",P(t.variableDefinitions,", "),")"),n=P([t.operation,P([t.name,e]),P(t.directives," ")]," ");return(n==="query"?"":n+" ")+t.selectionSet}},VariableDefinition:{leave:({variable:t,type:e,defaultValue:n,directives:r})=>t+": "+e+rt(" = ",n)+rt(" ",P(r," "))},SelectionSet:{leave:({selections:t})=>Ie(t)},Field:{leave({alias:t,name:e,arguments:n,directives:r,selectionSet:i}){let o=rt("",t,": ")+e,s=o+rt("(",P(n,", "),")");return s.length>dW&&(s=o+rt(`(
40
+ `,zs(P(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?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
- `)+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," "),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,`
42
+ )`)),P([s,P(r," "),i]," ")}},Argument:{leave:({name:t,value:e})=>t+": "+e},FragmentSpread:{leave:({name:t,directives:e})=>"..."+t+rt(" ",P(e," "))},InlineFragment:{leave:({typeCondition:t,directives:e,selectionSet:n})=>P(["...",rt("on ",t),P(e," "),n]," ")},FragmentDefinition:{leave:({name:t,typeCondition:e,variableDefinitions:n,directives:r,selectionSet:i})=>`fragment ${t}${rt("(",P(n,", "),")")} on ${e} ${rt("",P(r," ")," ")}`+i},IntValue:{leave:({value:t})=>t},FloatValue:{leave:({value:t})=>t},StringValue:{leave:({value:t,block:e})=>e?UX(t):sW(t)},BooleanValue:{leave:({value:t})=>t?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:t})=>t},ListValue:{leave:({values:t})=>"["+P(t,", ")+"]"},ObjectValue:{leave:({fields:t})=>"{"+P(t,", ")+"}"},ObjectField:{leave:({name:t,value:e})=>t+": "+e},Directive:{leave:({name:t,arguments:e})=>"@"+t+rt("(",P(e,", "),")")},NamedType:{leave:({name:t})=>t},ListType:{leave:({type:t})=>"["+t+"]"},NonNullType:{leave:({type:t})=>t+"!"},SchemaDefinition:{leave:({description:t,directives:e,operationTypes:n})=>rt("",t,`
43
+ `)+P(["schema",P(e," "),Ie(n)]," ")},OperationTypeDefinition:{leave:({operation:t,type:e})=>t+": "+e},ScalarTypeDefinition:{leave:({description:t,name:e,directives:n})=>rt("",t,`
44
+ `)+P(["scalar",e,P(n," ")]," ")},ObjectTypeDefinition:{leave:({description:t,name:e,interfaces:n,directives:r,fields:i})=>rt("",t,`
45
+ `)+P(["type",e,rt("implements ",P(n," & ")),P(r," "),Ie(i)]," ")},FieldDefinition:{leave:({description:t,name:e,arguments:n,type:r,directives:i})=>rt("",t,`
46
+ `)+e+(tb(n)?rt(`(
47
+ `,zs(P(n,`
48
48
  `)),`
49
- )`):Q("(",W(n,", "),")"))+": "+r+Q(" ",W(i," "))},InputValueDefinition:{leave:({description:t,name:e,type:n,defaultValue:r,directives:i})=>Q("",t,`
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," "),ce(i)]," ")},UnionTypeDefinition:{leave:({description:t,name:e,directives:n,types:r})=>Q("",t,`
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," "),ce(r)]," ")},EnumValueDefinition:{leave:({description:t,name:e,directives:n})=>Q("",t,`
54
- `)+W([e,W(n," ")]," ")},InputObjectTypeDefinition:{leave:({description:t,name:e,directives:n,fields:r})=>Q("",t,`
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,`
49
+ )`):rt("(",P(n,", "),")"))+": "+r+rt(" ",P(i," "))},InputValueDefinition:{leave:({description:t,name:e,type:n,defaultValue:r,directives:i})=>rt("",t,`
50
+ `)+P([e+": "+n,rt("= ",r),P(i," ")]," ")},InterfaceTypeDefinition:{leave:({description:t,name:e,interfaces:n,directives:r,fields:i})=>rt("",t,`
51
+ `)+P(["interface",e,rt("implements ",P(n," & ")),P(r," "),Ie(i)]," ")},UnionTypeDefinition:{leave:({description:t,name:e,directives:n,types:r})=>rt("",t,`
52
+ `)+P(["union",e,P(n," "),rt("= ",P(r," | "))]," ")},EnumTypeDefinition:{leave:({description:t,name:e,directives:n,values:r})=>rt("",t,`
53
+ `)+P(["enum",e,P(n," "),Ie(r)]," ")},EnumValueDefinition:{leave:({description:t,name:e,directives:n})=>rt("",t,`
54
+ `)+P([e,P(n," ")]," ")},InputObjectTypeDefinition:{leave:({description:t,name:e,directives:n,fields:r})=>rt("",t,`
55
+ `)+P(["input",e,P(n," "),Ie(r)]," ")},DirectiveDefinition:{leave:({description:t,name:e,arguments:n,repeatable:r,locations:i})=>rt("",t,`
56
+ `)+"directive @"+e+(tb(n)?rt(`(
57
+ `,zs(P(n,`
58
58
  `)),`
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`
59
+ )`):rt("(",P(n,", "),")"))+(r?" repeatable":"")+" on "+P(i," | ")},SchemaExtension:{leave:({directives:t,operationTypes:e})=>P(["extend schema",P(t," "),Ie(e)]," ")},ScalarTypeExtension:{leave:({name:t,directives:e})=>P(["extend scalar",t,P(e," ")]," ")},ObjectTypeExtension:{leave:({name:t,interfaces:e,directives:n,fields:r})=>P(["extend type",t,rt("implements ",P(e," & ")),P(n," "),Ie(r)]," ")},InterfaceTypeExtension:{leave:({name:t,interfaces:e,directives:n,fields:r})=>P(["extend interface",t,rt("implements ",P(e," & ")),P(n," "),Ie(r)]," ")},UnionTypeExtension:{leave:({name:t,directives:e,types:n})=>P(["extend union",t,P(e," "),rt("= ",P(n," | "))]," ")},EnumTypeExtension:{leave:({name:t,directives:e,values:n})=>P(["extend enum",t,P(e," "),Ie(n)]," ")},InputObjectTypeExtension:{leave:({name:t,directives:e,fields:n})=>P(["extend input",t,P(e," "),Ie(n)]," ")}};Dh=JSON,mW=t=>t.toUpperCase(),yW=t=>{let e={};return t.forEach((n,r)=>{e[r]=n}),e},gW=(t,e,n)=>t.document?t:{document:t,variables:e,requestHeaders:n,signal:void 0},bW=(t,e,n)=>t.query?t:{query:t,variables:e,requestHeaders:n,signal:void 0},vW=(t,e)=>t.documents?t:{documents:t,requestHeaders:e,signal:void 0},eb=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},mu=t=>{if(typeof t=="string"){let n;try{let r=Zv(t);n=eb(r)}catch(r){}return{query:t,operationName:n}}let e=eb(t);return{query:Vv(t),operationName:e}},Ov=class Bs extends Error{constructor(e,n){let r=`${Bs.extractMessage(e)}: ${JSON.stringify({response:e,request:n})}`;super(r),Object.setPrototypeOf(this,Bs.prototype),this.response=e,this.request=n,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,Bs)}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})`}},wW=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};Uu={exports:{}};(function(t,e){var n=typeof self<"u"?self:wW,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 v={next:function(){var V=y.shift();return{done:V===void 0,value:V}}};return a.iterable&&(v[Symbol.iterator]=function(){return v}),v}function m(y){this.map={},y instanceof m?y.forEach(function(v,V){this.append(V,v)},this):Array.isArray(y)?y.forEach(function(v){this.append(v[0],v[1])},this):y&&Object.getOwnPropertyNames(y).forEach(function(v){this.append(v,y[v])},this)}m.prototype.append=function(y,v){y=h(y),v=p(v);var V=this.map[y];this.map[y]=V?V+", "+v:v},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,v){this.map[h(y)]=p(v)},m.prototype.forEach=function(y,v){for(var V in this.map)this.map.hasOwnProperty(V)&&y.call(v,this.map[V],V,this)},m.prototype.keys=function(){var y=[];return this.forEach(function(v,V){y.push(V)}),f(y)},m.prototype.values=function(){var y=[];return this.forEach(function(v){y.push(v)}),f(y)},m.prototype.entries=function(){var y=[];return this.forEach(function(v,V){y.push([V,v])}),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 g(y){return new Promise(function(v,V){y.onload=function(){v(y.result)},y.onerror=function(){V(y.error)}})}function b(y){var v=new FileReader,V=g(v);return v.readAsArrayBuffer(y),V}function w(y){var v=new FileReader,V=g(v);return v.readAsText(y),V}function E(y){for(var v=new Uint8Array(y),V=new Array(v.length),D=0;D<v.length;D++)V[D]=String.fromCharCode(v[D]);return V.join("")}function I(y){if(y.slice)return y.slice(0);var v=new Uint8Array(y.byteLength);return v.set(new Uint8Array(y)),v.buffer}function S(){return this.bodyUsed=!1,this.Ur=function(y){this._t=y,y?typeof y=="string"?this.Ye=y:a.blob&&Blob.prototype.isPrototypeOf(y)?this.ne=y:a.formData&&FormData.prototype.isPrototypeOf(y)?this.Fr=y:a.searchParams&&URLSearchParams.prototype.isPrototypeOf(y)?this.Ye=y.toString():a.arrayBuffer&&a.blob&&c(y)?(this.U=I(y.buffer),this._t=new Blob([this.U])):a.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(y)||u(y))?this.U=I(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.ne&&this.ne.type?this.headers.set("content-type",this.ne.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.ne)return Promise.resolve(this.ne);if(this.U)return Promise.resolve(new Blob([this.U]));if(this.Fr)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this.Ye]))},this.arrayBuffer=function(){return this.U?d(this)||Promise.resolve(this.U):this.blob().then(b)}),this.text=function(){var y=d(this);if(y)return y;if(this.ne)return w(this.ne);if(this.U)return Promise.resolve(E(this.U));if(this.Fr)throw new Error("could not read FormData body as text");return Promise.resolve(this.Ye)},a.formData&&(this.formData=function(){return this.text().then(k)}),this.json=function(){return this.text().then(JSON.parse)},this}var T=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function x(y){var v=y.toUpperCase();return T.indexOf(v)>-1?v:y}function Z(y,v){v=v||{};var V=v.body;if(y instanceof Z){if(y.bodyUsed)throw new TypeError("Already read");this.url=y.url,this.credentials=y.credentials,v.headers||(this.headers=new m(y.headers)),this.method=y.method,this.mode=y.mode,this.signal=y.signal,!V&&y._t!=null&&(V=y._t,y.bodyUsed=!0)}else this.url=String(y);if(this.credentials=v.credentials||this.credentials||"same-origin",(v.headers||!this.headers)&&(this.headers=new m(v.headers)),this.method=x(v.method||this.method||"GET"),this.mode=v.mode||this.mode||null,this.signal=v.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&V)throw new TypeError("Body not allowed for GET or HEAD requests");this.Ur(V)}Z.prototype.clone=function(){return new Z(this,{body:this._t})};function k(y){var v=new FormData;return y.trim().split("&").forEach(function(V){if(V){var D=V.split("="),U=D.shift().replace(/\+/g," "),L=D.join("=").replace(/\+/g," ");v.append(decodeURIComponent(U),decodeURIComponent(L))}}),v}function O(y){var v=new m,V=y.replace(/\r?\n[\t ]+/g," ");return V.split(/\r?\n/).forEach(function(D){var U=D.split(":"),L=U.shift().trim();if(L){var q=U.join(":").trim();v.append(L,q)}}),v}S.call(Z.prototype);function X(y,v){v||(v={}),this.type="default",this.status=v.status===void 0?200:v.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in v?v.statusText:"OK",this.headers=new m(v.headers),this.url=v.url||"",this.Ur(y)}S.call(X.prototype),X.prototype.clone=function(){return new X(this._t,{status:this.status,statusText:this.statusText,headers:new m(this.headers),url:this.url})},X.error=function(){var y=new X(null,{status:0,statusText:""});return y.type="error",y};var _=[301,302,303,307,308];X.redirect=function(y,v){if(_.indexOf(v)===-1)throw new RangeError("Invalid status code");return new X(null,{status:v,headers:{location:y}})},s.DOMException=o.DOMException;try{new s.DOMException}catch(y){s.DOMException=function(v,V){this.message=v,this.name=V;var D=Error(v);this.stack=D.stack},s.DOMException.prototype=Object.create(Error.prototype),s.DOMException.prototype.constructor=s.DOMException}function tt(y,v){return new Promise(function(V,D){var U=new Z(y,v);if(U.signal&&U.signal.aborted)return D(new s.DOMException("Aborted","AbortError"));var L=new XMLHttpRequest;function q(){L.abort()}L.onload=function(){var lt={status:L.status,statusText:L.statusText,headers:O(L.getAllResponseHeaders()||"")};lt.url="responseURL"in L?L.responseURL:lt.headers.get("X-Request-URL");var Zt="response"in L?L.response:L.responseText;V(new X(Zt,lt))},L.onerror=function(){D(new TypeError("Network request failed"))},L.ontimeout=function(){D(new TypeError("Network request failed"))},L.onabort=function(){D(new s.DOMException("Aborted","AbortError"))},L.open(U.method,U.url,!0),U.credentials==="include"?L.withCredentials=!0:U.credentials==="omit"&&(L.withCredentials=!1),"responseType"in L&&a.blob&&(L.responseType="blob"),U.headers.forEach(function(lt,Zt){L.setRequestHeader(Zt,lt)}),U.signal&&(U.signal.addEventListener("abort",q),L.onreadystatechange=function(){L.readyState===4&&U.signal.removeEventListener("abort",q)}),L.send(typeof U._t>"u"?null:U._t)})}return tt.polyfill=!0,o.fetch||(o.fetch=tt,o.Headers=m,o.Request=Z,o.Response=X),s.Headers=m,s.Request=Z,s.Response=X,s.fetch=tt,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})(Uu,Uu.exports);sa=Uu.exports,js=Nv(sa),SW=ZX({__proto__:null,default:js},[sa]),br=t=>{let e={};return t&&(typeof Headers<"u"&&t instanceof Headers||SW&&sa.Headers&&t instanceof sa.Headers?e=yW(t):Array.isArray(t)?t.forEach(([n,r])=>{n&&r!==void 0&&(e[n]=r)}):e=t),e},nb=t=>t.replace(/([\s,]|#[^\n\r]+)+/g," ").trim(),IW=t=>{if(!Array.isArray(t.query)){let r=t,i=[`query=${encodeURIComponent(nb(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:nb(i),variables:e.variables?e.jsonSerializer.stringify(e.variables[o]):void 0}),r),[]);return`query=${encodeURIComponent(e.jsonSerializer.stringify(n))}`},TW=t=>e=>Cr(void 0,null,function*(){var n;let{url:r,query:i,variables:o,operationName:s,fetch:a,fetchOptions:c,middleware:l}=e,u=it({},e.headers),h="",p;t==="POST"?(p=RW(i,o,s,c.jsonSerializer),typeof p=="string"&&(u["Content-Type"]="application/json")):h=IW({query:i,variables:o,operationName:s,jsonSerializer:(n=c.jsonSerializer)!=null?n:Dh});let f=it({method:t,headers:u,body:p},c),m=r,d=f;if(l){let g=yield Promise.resolve(l(Rr(it({},f),{url:r,operationName:s,variables:o}))),{url:b}=g,w=Ni(g,["url"]);m=b,d=w}return h&&(m=`${m}?${h}`),yield a(m,d)}),EW=class{constructor(t,e={}){this.url=t,this.requestConfig=e,this.rawRequest=(...n)=>Cr(this,null,function*(){let[r,i,o]=n,s=bW(r,i,o),a=this.requestConfig,{headers:c,fetch:l=js,method:u="POST",requestMiddleware:h,responseMiddleware:p}=a,f=Ni(a,["headers","fetch","method","requestMiddleware","responseMiddleware"]),{url:m}=this;s.signal!==void 0&&(f.signal=s.signal);let{operationName:d}=mu(s.query);return yu({url:m,query:s.query,variables:s.variables,headers:it(it({},br(gu(c))),br(s.requestHeaders)),operationName:d,fetch:l,method:u,fetchOptions:f,middleware:h}).then(g=>(p&&p(g),g)).catch(g=>{throw p&&p(g),g})})}request(t,...e){return Cr(this,null,function*(){let[n,r]=e,i=gW(t,n,r),o=this.requestConfig,{headers:s,fetch:a=js,method:c="POST",requestMiddleware:l,responseMiddleware:u}=o,h=Ni(o,["headers","fetch","method","requestMiddleware","responseMiddleware"]),{url:p}=this;i.signal!==void 0&&(h.signal=i.signal);let{query:f,operationName:m}=mu(i.document);return yu({url:p,query:f,variables:i.variables,headers:it(it({},br(gu(s))),br(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=vW(t,e),i=this.requestConfig,{headers:o}=i,s=Ni(i,["headers"]);r.signal!==void 0&&(s.signal=r.signal);let a=r.documents.map(({document:l})=>mu(l).query),c=r.documents.map(({variables:l})=>l);return yu({url:this.url,query:a,variables:c,headers:it(it({},br(gu(o))),br(r.requestHeaders)),operationName:void 0,fetch:(n=this.requestConfig.fetch)!=null?n:js,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}},yu=t=>Cr(void 0,null,function*(){var e,n;let{query:r,variables:i,fetchOptions:o}=t,s=TW(mW((e=t.method)!=null?e:"post")),a=Array.isArray(t.query),c=yield s(t),l=yield CW(c,(n=o.jsonSerializer)!=null?n:Dh),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=Ni(p,["errors"]),m=o.errorPolicy==="ignore"?f:l;return Rr(it({},a?{data:m}:m),{headers:c.headers,status:c.status})}else{let p=typeof l=="string"?{error:l}:l;throw new Ov(Rr(it({},p),{status:c.status,headers:c.headers}),{query:r,variables:i})}}),RW=(t,e,n,r)=>{let i=r!=null?r:Dh;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)},CW=(t,e)=>Cr(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()}),gu=t=>typeof t=="function"?t():t,Fu={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)}}})(Fu,Fu.exports);kW=Fu.exports,ZW=Nv(kW),aa=function(){return aa=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},aa.apply(this,arguments)},Qs=new Map,Au=new Map,Gv=!0,la=!1;Si={gql:Ht,resetCaches:GW,disableFragmentWarnings:LW,enableExperimentalFragmentVariables:XW,disableExperimentalFragmentVariables:WW};(function(t){t.gql=Si.gql,t.resetCaches=Si.resetCaches,t.disableFragmentWarnings=Si.disableFragmentWarnings,t.enableExperimentalFragmentVariables=Si.enableExperimentalFragmentVariables,t.disableExperimentalFragmentVariables=Si.disableExperimentalFragmentVariables})(Ht||(Ht={}));Ht.default=Ht;Xv=Ht`
60
60
  fragment MatchParts on MatchConfig {
61
61
  regexValue
62
62
  matchValue
63
63
  }
64
- `,jb=At`
64
+ `,Wv=Ht`
65
65
  mutation PushPayload(
66
66
  $session_secure_id: String!
67
67
  $payload_id: ID!
@@ -87,7 +87,7 @@ spurious results.`)}}return!1},Ab=class{constructor(t,e="GraphQL request",n={lin
87
87
  highlight_logs: $highlight_logs
88
88
  )
89
89
  }
90
- `,ZX=At`
90
+ `,MW=Ht`
91
91
  mutation PushPayloadCompressed(
92
92
  $session_secure_id: String!
93
93
  $payload_id: ID!
@@ -99,7 +99,7 @@ spurious results.`)}}return!1},Ab=class{constructor(t,e="GraphQL request",n={lin
99
99
  data: $data
100
100
  )
101
101
  }
102
- `,kX=At`
102
+ `,PW=Ht`
103
103
  mutation identifySession(
104
104
  $session_secure_id: String!
105
105
  $user_identifier: String!
@@ -111,7 +111,7 @@ spurious results.`)}}return!1},Ab=class{constructor(t,e="GraphQL request",n={lin
111
111
  user_object: $user_object
112
112
  )
113
113
  }
114
- `,VX=At`
114
+ `,UW=Ht`
115
115
  mutation addSessionProperties(
116
116
  $session_secure_id: String!
117
117
  $properties_object: Any
@@ -121,11 +121,11 @@ spurious results.`)}}return!1},Ab=class{constructor(t,e="GraphQL request",n={lin
121
121
  properties_object: $properties_object
122
122
  )
123
123
  }
124
- `,xX=At`
124
+ `,FW=Ht`
125
125
  mutation pushMetrics($metrics: [MetricInput]!) {
126
126
  pushMetrics(metrics: $metrics)
127
127
  }
128
- `,OX=At`
128
+ `,AW=Ht`
129
129
  mutation addSessionFeedback(
130
130
  $session_secure_id: String!
131
131
  $user_name: String
@@ -141,7 +141,7 @@ spurious results.`)}}return!1},Ab=class{constructor(t,e="GraphQL request",n={lin
141
141
  timestamp: $timestamp
142
142
  )
143
143
  }
144
- `,NX=At`
144
+ `,DW=Ht`
145
145
  mutation initializeSession(
146
146
  $session_secure_id: String!
147
147
  $organization_verbose_id: String!
@@ -226,12 +226,12 @@ spurious results.`)}}return!1},Ab=class{constructor(t,e="GraphQL request",n={lin
226
226
  }
227
227
  }
228
228
  }
229
- ${Bb}
230
- `,GX=At`
229
+ ${Xv}
230
+ `,JW=Ht`
231
231
  query Ignore($id: ID!) {
232
232
  ignore(id: $id)
233
233
  }
234
- `,LX=At`
234
+ `,YW=Ht`
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},Ab=class{constructor(t,e="GraphQL request",n={lin
280
280
  }
281
281
  }
282
282
  }
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
- `+R+i("^")}let m=r(f.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return i(">")+r(f)+o(u)+`
283
+ ${Xv}
284
+ `,KW=(t,e,n,r)=>t();Mv=(t=>(t.Device="Device",t.WebVital="WebVital",t.Performance="Performance",t.Frontend="Frontend",t.Backend="Backend",t))(Mv||{});rb=1e3,BW=1e3*2,jW=14400*1e3,Pv=900*1e3,ib={normal:{bytes:1e7,time:240*1e3},canvas:{bytes:16e6,time:5e3}},QW=100,ob="app.highlight.io",$W="app.launchdarkly.com",qW={"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"},t2="/projects/default",e2=new RegExp("pub\\.(?<domain>.+)");n2={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)}};bu=Du(n2,{path:"/"}),Ju=(t=>(t.CLIENT_ID="highlightClientID",t))(Ju||{}),Jh="localStorage",Yu=!0,r2=class{constructor(){Pi(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]}},Ku=class{getItem(e){var n;return(n=bu.get(e))!=null?n:""}setItem(e,n){if(!Yu)return;let r=new Date;r.setTime(r.getTime()+Pv),bu.set(e,n,{expires:r})}removeItem(e){Yu&&bu.remove(e)}},Na=new r2,ca=new Ku,Yh=()=>{try{switch(Jh){case"localStorage":return window.localStorage;case"sessionStorage":return window.sessionStorage}}catch(t){return Na}},i2=t=>{Jh=t},sb=t=>{Yu=t},ve=t=>{try{return Yh().getItem(t)}catch(e){return oe("storage","debug",`failed to get item ${t}; using global storage`,e),Na.getItem(t)}},pn=(t,e)=>{ca.setItem(t,e);try{return Yh().setItem(t,e)}catch(n){return oe("storage","debug",`failed to set item ${t}; using global storage`,n),Na.setItem(t,e)}},_u=t=>{ca.removeItem(t);try{return Yh().removeItem(t)}catch(e){return oe("storage","debug",`failed to remove item ${t}; using global storage`,e),Na.removeItem(t)}},o2=t=>{if(Jh==="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])}},ie=(t=>(t.SEGMENT_LAST_SENT_HASH_KEY="HIGHLIGHT_SEGMENT_LAST_SENT_HASH_KEY",t.SESSION_ID="sessionID",t.SESSION_DATA="sessionData",t.USER_IDENTIFIER="highlightIdentifier",t.USER_OBJECT="highlightUserObject",t))(ie||{}),Ga=t=>`${ie.SESSION_DATA}_${t}`,s2=()=>{var t;return typeof globalThis<"u"&&(t=globalThis.persistentSessionSecureID)!=null&&t.length?globalThis.persistentSessionSecureID:Uv()},a2=t=>{typeof globalThis<"u"&&t!=null&&t.length&&(globalThis.persistentSessionSecureID=t)},Uv=()=>{var t;return(t=ve(ie.SESSION_ID))!=null?t:""},Gi=t=>{pn(ie.SESSION_ID,t)},l2=t=>{let e=Ga(t);return JSON.parse(ve(e)||"{}")},$s=t=>{t||(t=Uv());let e=l2(t);if(e&&e.lastPushTime&&Date.now()-e.lastPushTime<Pv)return e;_u(Ga(t))},Fn=function(t){if(!(t!=null&&t.sessionSecureID))return;let e=t.sessionSecureID;a2(e),pn(Ga(e),JSON.stringify(t))},c2=function(){let t=ca.getItem(ie.SESSION_ID);Gi(t);let e=Ga(t),n=ca.getItem(e);try{Fn(JSON.parse(n))}catch(r){}},Fv=(t=>(t.BillingQuotaExceeded="BillingQuotaExceeded",t))(Fv||{}),u2=10,h2=1e3,p2=500,d2=[Fv.BillingQuotaExceeded.toString()],f2=t=>{var e;return((e=t.response.errors)==null?void 0:e.find(n=>d2.includes(n.message)))===void 0},m2=()=>{let t=(e,n,r,i,o=0)=>Cr(void 0,null,function*(){try{return yield e()}catch(s){if(s instanceof Ov&&!f2(s))throw s;if(o<u2)return yield new Promise(a=>setTimeout(a,h2+p2*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},y2="$ld:telemetry:session:init",g2="$ld:telemetry:error",ab="$ld:telemetry:track",b2="$ld:telemetry:metric",v2="document_load";I2=class{constructor(t,e){Pi(this,"client"),Pi(this,"metadata"),this.client=t,this.metadata=e}getHooks(t){return[]}init(t){this.client.track(y2,{sessionID:t})}recordGauge(t,e){var n;e.category!==Mv.WebVital&&e.name!==v2||e.name!=="Jank"&&this.client.track(`${b2}:${e.name.toLowerCase()}`,Rr(it({},(n=e.tags)==null?void 0:n.map(r=>({[r.name]:r.value})).reduce((r,i)=>it(it({},r),i),{})),{category:e.category,group:e.group,sessionID:t}),e.value)}identify(t,e,n={},r){}error(t,e){this.client.track(g2,Rr(it({},e),{sessionID:t}))}track(t,e){let n=e.event;this.client.track(n?`${ab}:${n}`:ab,Rr(it({},e),{sessionID:t}))}},Hu=class extends gr{constructor(e,n){super(),Pi(this,"client"),this.client=new I2(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])}};E2=t=>{let e="",n=t.getAttribute("class"),r=t.getAttribute("id");return r&&(e=e.concat(lb(r,"#"))),n&&(e=e.concat(lb(n,"."))),e===""&&(e=e.concat(t.tagName.toLowerCase())),e},lb=(t,e)=>`${e}${t.trim().split(" ").join(e)}`,R2=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)},zu=()=>{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},C2=class{constructor(t){Pi(this,"sessionSecureID");try{t!=null&&t.storageMode&&i2(t==null?void 0:t.storageMode),sb(!!(t!=null&&t.sessionCookie)),t!=null&&t.sessionCookie?c2():sb(!1);let e=s2(),n=$s(e);n!=null&&n.sessionSecureID?this.sessionSecureID=n.sessionSecureID:(this.sessionSecureID=zu(),Gi(this.sessionSecureID),Fn({sessionSecureID:this.sessionSecureID,projectID:0,payloadID:1,sessionStartTime:Date.now(),lastPushTime:Date.now()}))}catch(e){oe("Error initializing @launchdarkly observability plugin","error",e)}}},k2=(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())}),ua=class extends gr{getSession(){return this.gr?this.p("getSession",[]):null}start(e){return k2(this,null,function*(){return this.p("start",[e])})}stop(e){return this.p("stop",[e])}getRecordingState(){return this.gr?this.p("getRecordingState",[]):"NotRecording"}snapshot(e){return this.gr?this.p("snapshot",[e]):Promise.resolve(void 0)}register(e,n){return this.p("register",[e,n])}};typeof globalThis<"u"?globalThis.LDRecord?An=globalThis.LDRecord:(An=new ua,globalThis.LDRecord=An):An=new ua;Z2=Object.defineProperty,x2=Object.defineProperties,V2=Object.getOwnPropertyDescriptors,ha=Object.getOwnPropertySymbols,Yv=Object.prototype.hasOwnProperty,Kv=Object.prototype.propertyIsEnumerable,Bu=(t,e,n)=>e in t?Z2(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,j=(t,e)=>{for(var n in e||(e={}))Yv.call(e,n)&&Bu(t,n,e[n]);if(ha)for(var n of ha(e))Kv.call(e,n)&&Bu(t,n,e[n]);return t},Qt=(t,e)=>x2(t,V2(e)),kr=(t,e)=>{var n={};for(var r in t)Yv.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&ha)for(var r of ha(t))e.indexOf(r)<0&&Kv.call(t,r)&&(n[r]=t[r]);return n},K=(t,e,n)=>Bu(t,typeof e!="symbol"?e+"":e,n),jt=(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())}),O2={key:"_sid"},N2="rrweb/sequential-id@1",G2=t=>{let e=O2,n=0;return{name:N2,eventProcessor(r){return Object.assign(r,{[e.key]:++n}),r},options:e}},L2=Object.defineProperty,X2=(t,e,n)=>e in t?L2(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,G=(t,e,n)=>X2(t,typeof e!="symbol"?e+"":e,n),W2=Object.defineProperty,M2=(t,e,n)=>e in t?W2(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ub=(t,e,n)=>M2(t,typeof e!="symbol"?e+"":e,n),kt=(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))(kt||{}),hb={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},pb={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Cs={},P2=()=>!!globalThis.Zone;vu={};wu={};Pt={childNodes:U2,parentNode:F2,parentElement:A2,textContent:D2,contains:J2,getRootNode:Y2,host:K2,styleSheets:_2,shadowRoot:H2,querySelector:z2,querySelectorAll:B2,mutationObserver:j2,patch:Q2};pa=class{constructor(){ub(this,"idNodeMap",new Map),ub(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}};db="__rrweb_original__";sM=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,aM=/^(?:[a-z+]+:)?\/\//i,lM=/^www\..*/i,cM=/^(data:)([^,]*),(.*)/i;pM=new RegExp(/[a-zA-Z0-9.!#$%&'*+=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:.[a-zA-Z0-9-]+)*/),dM=new RegExp(/[0-9]{9,16}/),fM=new RegExp(/[0-9]{3}-?[0-9]{2}-?[0-9]{4}/),mM=new RegExp(/[+]?[(]?[0-9]{3}[)]?[-\s.]?[0-9]{3}[-\s.]?[0-9]{4,6}/),yM=new RegExp(/[0-9]{4}-?[0-9]{4}-?[0-9]{4}-?[0-9]{4}/),gM=new RegExp(/[0-9]{1,5}.?[0-9]{0,3}\s[a-zA-Z]{2,30}\s[a-zA-Z]{2,15}/),bM=new RegExp(/(?:[0-9]{1,3}.){3}[0-9]{1,3}/),vM=[pM,dM,fM,mM,yM,gM,bM];Qv=({maskInputOptions:t,tagName:e,type:n,overwriteRecord:r})=>{let i=n&&n.toLowerCase();return r!=="true"&&(!!t[e.toLowerCase()]||!!(i&&t[i]))},wM=1,SM=new RegExp("[^a-z0-9-_:]"),Fi=-2;TM=/^[^ \t\n\r\u000c]+/,EM=/^[, \t\n\r\u000c]+/;mb=new WeakMap;zh={exports:{}},z=String,n0=function(){return{isColorSupported:!1,reset:z,bold:z,dim:z,italic:z,underline:z,inverse:z,hidden:z,strikethrough:z,black:z,red:z,green:z,yellow:z,blue:z,magenta:z,cyan:z,white:z,gray:z,bgBlack:z,bgRed:z,bgGreen:z,bgYellow:z,bgBlue:z,bgMagenta:z,bgCyan:z,bgWhite:z,blackBright:z,redBright:z,greenBright:z,yellowBright:z,blueBright:z,magentaBright:z,cyanBright:z,whiteBright:z,bgBlackBright:z,bgRedBright:z,bgGreenBright:z,bgYellowBright:z,bgBlueBright:z,bgMagentaBright:z,bgCyanBright:z,bgWhiteBright:z}};zh.exports=n0();zh.exports.createColors=n0;WM=zh.exports,MM={},PM=Object.freeze(Object.defineProperty({__proto__:null,default:MM},Symbol.toStringTag,{value:"Module"})),Ee=XM(PM),gb=WM,bb=Ee,$u=class r0 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,r0)}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=gb.isColorSupported);let r=u=>u,i=u=>u,o=u=>u;if(e){let{bold:u,gray:h,red:p}=gb.createColors(!0);i=f=>u(p(f)),r=f=>h(f),bb&&(o=f=>bb(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,g=Math.max(0,this.column-d),b=Math.max(this.column+d,this.endColumn+d),w=u.slice(g,b),E=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
+ `+E+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}},vh=Iu;Iu.default=Iu;Gg={after:`
290
+ `),this.name+": "+this.message+e}},Bh=$u;$u.default=$u;vb={after:`
291
291
  `,beforeClose:`
292
292
  `,beforeComment:`
293
293
  `,beforeDecl:`
294
294
  `,beforeOpen:" ",beforeRule:`
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(`
295
+ `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};qu=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 vb[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"+UM(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=vb[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)}},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=`
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)}},i0=qu;qu.default=qu;FM=i0;La=th;th.default=th;$i={};$i.isClean=Symbol("isClean");$i.my=Symbol("my");AM=Bh,DM=i0,JM=La,{isClean:Ii,my:YM}=$i;nh=class{get proxyOf(){return this}constructor(t={}){this.raws={},this[Ii]=!1,this[YM]=!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=eh(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 AM(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[Ii]=!0}markDirty(){if(this[Ii]){this[Ii]=!1;let t=this;for(;t=t.parent;)t[Ii]=!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 DM().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=JM){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)}},Xa=nh;nh.default=nh;KM=Xa,rh=class extends KM{constructor(t){super(t),this.type="comment"}},Wa=rh;rh.default=rh;_M=Xa,ih=class extends _M{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(t){t&&typeof t.value<"u"&&typeof t.value!="string"&&(t=Qt(j({},t),{value:String(t.value)})),super(t),this.type="decl"}},Ma=ih;ih.default=ih;o0=Wa,s0=Ma,HM=Xa,{isClean:a0,my:l0}=$i;Qe=class d0 extends HM{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=h0(c0(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 s0(e)]}else if(e.selector||e.selectors)e=[new Qh(e)];else if(e.name)e=[new jh(e)];else if(e.text)e=[new o0(e)];else throw new Error("Unknown node type in node creation");return e.map(r=>(r[l0]||d0.rebuild(r),r=r.proxyOf,r.parent&&r.parent.removeChild(r),r[a0]&&p0(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)}))}};Qe.registerParse=t=>{c0=t};Qe.registerRule=t=>{Qh=t};Qe.registerAtRule=t=>{jh=t};Qe.registerRoot=t=>{u0=t};Yn=Qe;Qe.default=Qe;Qe.rebuild=t=>{t.type==="atrule"?Object.setPrototypeOf(t,jh.prototype):t.type==="rule"?Object.setPrototypeOf(t,Qh.prototype):t.type==="decl"?Object.setPrototypeOf(t,s0.prototype):t.type==="comment"?Object.setPrototypeOf(t,o0.prototype):t.type==="root"&&Object.setPrototypeOf(t,u0.prototype),t[l0]=!0,t.nodes&&t.nodes.forEach(e=>{Qe.rebuild(e)})};f0=Yn,ba=class extends f0{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)}},$h=ba;ba.default=ba;f0.registerAtRule(ba);zM=Yn,Ai=class extends zM{constructor(t){super(j({type:"document"},t)),this.nodes||(this.nodes=[])}toResult(t={}){return new m0(new y0,this,t).stringify()}};Ai.registerLazyResult=t=>{m0=t};Ai.registerProcessor=t=>{y0=t};qh=Ai;Ai.default=Ai;BM="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",jM=(t=21)=>{let e="",n=t|0;for(;n--;)e+=BM[Math.random()*64|0];return e},QM={nanoid:jM},{existsSync:$M,readFileSync:qM}=Ee,{dirname:Su,join:tP}=Ee,{SourceMapConsumer:wb,SourceMapGenerator:Sb}=Ee;oh=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=Su(this.mapFile)),r&&(this.text=r)}consumer(){return this.consumerCache||(this.consumerCache=new wb(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 eP(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.qa=="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=Su(t),$M(t))return this.mapFile=t,qM(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 wb)return Sb.fromSourceMap(e).toString();if(e instanceof Sb)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=tP(Su(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)}},g0=oh;oh.default=oh;({nanoid:nP}=QM),{isAbsolute:sh,resolve:ah}=Ee,{SourceMapConsumer:rP,SourceMapGenerator:iP}=Ee,{fileURLToPath:Ib,pathToFileURL:Zs}=Ee,Tb=Bh,oP=g0,Iu=Ee,Tu=Symbol("fromOffsetCache"),sP=!!(rP&&iP),Eb=!!(ah&&sh),va=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)||sh(e.from)?this.file=e.from:this.file=ah(e.from)),Eb&&sP){let n=new oP(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 "+nP(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&&(Zs&&(s.input.url=Zs(this.file).toString()),s.input.file=this.file),s}fromOffset(t){let e,n;if(this[Tu])n=this[Tu];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[Tu]=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:ah(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;sh(o.source)?a=Zs(o.source):a=new URL(o.source,this.map.consumer().sourceRoot||Zs(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(Ib)c.file=Ib(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=j({},this.map),t.map.consumerCache&&(t.map.consumerCache=void 0)),t}},Pa=va;va.default=va;Iu&&Iu.registerInput&&Iu.registerInput(va);b0=Yn,xr=class extends b0{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 v0(new w0,this,t).stringify()}};xr.registerLazyResult=t=>{v0=t};xr.registerProcessor=t=>{w0=t};qi=xr;xr.default=xr;b0.registerRoot(xr);Di={comma(t){return Di.split(t,[","],!0)},space(t){let e=[" ",`
304
+ `," "];return Di.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=Di;Di.default=Di;I0=Yn,aP=S0,wa=class extends I0{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=[])}},tp=wa;wa.default=wa;I0.registerRule(wa);lP=$h,cP=Wa,uP=Ma,hP=Pa,pP=g0,dP=qi,fP=tp;mP=Ji;Ji.default=Ji;({dirname:qs,relative:T0,resolve:E0,sep:R0}=Ee),{SourceMapConsumer:C0,SourceMapGenerator:ta}=Ee,{pathToFileURL:Rb}=Ee,yP=Pa,gP=!!(C0&&ta),bP=!!(qs&&E0&&T0&&R0),vP=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||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:
307
+ `),this.css+=e+"/*# sourceMappingURL="+t+" */"}applyPrevMaps(){for(let t of this.previous()){let e=this.toUrl(this.path(t.file)),n=t.root||qs(t.file),r;this.mapOpts.sourcesContent===!1?(r=new C0(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(),bP&&gP&&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=ta.fromSourceMap(t,{ignoreInvalidMapping:!0})}else this.map=new ta({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 ta({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?qs(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(n=qs(E0(n,this.mapOpts.annotation)));let r=T0(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 yP(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(Rb){let n=Rb(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;R0==="\\"&&(t=t.replace(/\\/g,"/"));let n=encodeURI(t).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(t,n),n}},k0=vP,Eu=39,Cb=34,xs=92,kb=47,Vs=10,Ei=32,Os=12,Ns=9,Gs=13,wP=91,SP=93,IP=40,TP=41,EP=123,RP=125,CP=59,kP=42,ZP=58,xP=64,Ls=/[\t\n\f\r "#'()/;[\\\]{}]/g,Xs=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,VP=/.[\r\n"'(/\\]/,Zb=/[\da-f]/i,OP=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,g=[],b=[];function w(){return d}function E(x){throw t.error("Unclosed "+x,d)}function I(){return b.length===0&&d>=m}function S(x){if(b.length)return b.pop();if(d>=m)return;let Z=x?x.ignoreUnclosed:!1;switch(i=n.charCodeAt(d),i){case Vs:case Ei:case Ns:case Gs:case Os:{a=d;do a+=1,i=n.charCodeAt(a);while(i===Ei||i===Vs||i===Ns||i===Gs||i===Os);l=["space",n.slice(d,a)],d=a-1;break}case wP:case SP:case EP:case RP:case ZP:case CP:case TP:{let k=String.fromCharCode(i);l=[k,k,d];break}case IP:{if(f=g.length?g.pop()[1]:"",p=n.charCodeAt(d+1),f==="url"&&p!==Eu&&p!==Cb&&p!==Ei&&p!==Vs&&p!==Ns&&p!==Os&&p!==Gs){a=d;do{if(u=!1,a=n.indexOf(")",a+1),a===-1)if(r||Z){a=d;break}else E("bracket");for(h=a;n.charCodeAt(h-1)===xs;)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||VP.test(o)?l=["(","(",d]:(l=["brackets",o,d,a],d=a);break}case Eu:case Cb:{c=i===Eu?"'":'"',a=d;do{if(u=!1,a=n.indexOf(c,a+1),a===-1)if(r||Z){a=d+1;break}else E("string");for(h=a;n.charCodeAt(h-1)===xs;)h-=1,u=!u}while(u);l=["string",n.slice(d,a+1),d,a],d=a;break}case xP:{Ls.lastIndex=d+1,Ls.test(n),Ls.lastIndex===0?a=n.length-1:a=Ls.lastIndex-2,l=["at-word",n.slice(d,a+1),d,a],d=a;break}case xs:{for(a=d,s=!0;n.charCodeAt(a+1)===xs;)a+=1,s=!s;if(i=n.charCodeAt(a+1),s&&i!==kb&&i!==Ei&&i!==Vs&&i!==Ns&&i!==Gs&&i!==Os&&(a+=1,Zb.test(n.charAt(a)))){for(;Zb.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===kb&&n.charCodeAt(d+1)===kP?(a=n.indexOf("*/",d+2)+1,a===0&&(r||Z?a=n.length:E("comment")),l=["comment",n.slice(d,a+1),d,a],d=a):(Xs.lastIndex=d+1,Xs.test(n),Xs.lastIndex===0?a=n.length-1:a=Xs.lastIndex-2,l=["word",n.slice(d,a+1),d,a],g.push(l),d=a);break}}return d++,l}function T(x){b.push(x)}return{back:T,endOfFile:I,nextToken:S,position:w}},NP=$h,GP=Wa,LP=Ma,XP=qi,xb=tp,WP=OP,Vb={empty:!0,space:!0};PP=class{constructor(t){this.input=t,this.root=new XP,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 NP;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 GP;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=WP(this.input)}decl(t,e){let n=new LP;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]||MP(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 xb;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",!Vb[u]&&!Vb[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 xb;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})}},UP=PP,FP=Yn,AP=Pa,DP=UP;ep=Sa;Sa.default=Sa;FP.registerParse(Sa);lh=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}},Z0=lh;lh.default=lh;JP=Z0,ch=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 JP(t,e);return this.messages.push(n),n}warnings(){return this.messages.filter(t=>t.type==="warning")}},np=ch;ch.default=ch;Ob={},x0=function(t){Ob[t]||(Ob[t]=!0,typeof console<"u"&&console.warn&&console.warn(t))},YP=Yn,KP=qh,_P=k0,HP=ep,Nb=np,zP=qi,BP=La,{isClean:We,my:jP}=$i,QP=x0,$P={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},qP={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},Vr=0;hh={},Or=class O0{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=uh(n);else if(n instanceof O0||n instanceof Nb)i=uh(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=HP;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[jP]&&YP.rebuild(i)}this.result=new Nb(e,i,r),this.helpers=Qt(j({},hh),{postcss:hh,result:this.result}),this.plugins=this.processor.plugins.map(o=>typeof o=="object"&&o.prepare?j(j({},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(!qP[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 jt(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(Ri(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=[Gb(e)];for(;n.length>0;){let r=this.visitTick(n);if(Ri(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 Ri(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=BP;e.syntax&&(n=e.syntax.stringify),e.stringifier&&(n=e.stringifier),n.stringify&&(n=n.stringify);let r=new _P(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(Ri(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||QP("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(Ri(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(Gb(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===Vr){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=V0(e);for(let r of n)if(r===Vr)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()}};Or.registerPostcss=t=>{hh=t};N0=Or;Or.default=Or;zP.registerLazyResult(Or);KP.registerLazyResult(Or);eU=k0,nU=ep,rU=np,iU=La,oU=x0,ph=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=nU;try{t=e(this.ni,this.Hn)}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.ni=e,this.Hn=n,this.tl=void 0;let r,i=iU;this.result=new rU(this.ho,r,this.Hn),this.result.css=e;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let s=new eU(i,r,this.Hn,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.Hn||oU("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.ni}warnings(){return[]}},sU=ph;ph.default=ph;aU=qh,lU=N0,cU=sU,uU=qi,Yi=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 cU(this,t,e):new lU(this,t,e)}use(t){return this.plugins=this.plugins.concat(this.normalize([t])),this}},hU=Yi;Yi.default=Yi;uU.registerProcessor(Yi);aU.registerProcessor(Yi);G0=$h,L0=Wa,pU=Yn,dU=Bh,X0=Ma,W0=qh,fU=mP,mU=Pa,yU=N0,gU=S0,bU=Xa,vU=ep,rp=hU,wU=np,M0=qi,P0=tp,SU=La,IU=Z0;dt.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 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
- `+R+i("^")}let m=r(f.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return i(">")+r(f)+o(u)+`
310
+ https://www.w3ctech.com/topic/2226`));let s=e(...o);return s.postcssPlugin=t,s.postcssVersion=new rp().version,s}let i;return Object.defineProperty(r,"postcss",{get(){return i||(i=r()),i}}),r.process=function(o,s,a){return dt([r(a)]).process(o,s)},r};dt.stringify=SU;dt.parse=vU;dt.fromJSON=fU;dt.list=gU;dt.comment=t=>new L0(t);dt.atRule=t=>new G0(t);dt.decl=t=>new X0(t);dt.rule=t=>new P0(t);dt.root=t=>new M0(t);dt.document=t=>new W0(t);dt.CssSyntaxError=dU;dt.Declaration=X0;dt.Container=pU;dt.Processor=rp;dt.Document=W0;dt.Comment=L0;dt.Warning=IU;dt.AtRule=G0;dt.Result=wU;dt.Input=mU;dt.Rule=P0;dt.Root=M0;dt.Node=bU;yU.registerPostcss(dt);dt.default=dt;TU=Object.defineProperty,EU=(t,e,n)=>e in t?TU(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,be=(t,e,n)=>EU(t,typeof e!="symbol"?e+"":e,n);ip={exports:{}},B=String,U0=function(){return{isColorSupported:!1,reset:B,bold:B,dim:B,italic:B,underline:B,inverse:B,hidden:B,strikethrough:B,black:B,red:B,green:B,yellow:B,blue:B,magenta:B,cyan:B,white:B,gray:B,bgBlack:B,bgRed:B,bgGreen:B,bgYellow:B,bgBlue:B,bgMagenta:B,bgCyan:B,bgWhite:B,blackBright:B,redBright:B,greenBright:B,yellowBright:B,blueBright:B,magentaBright:B,cyanBright:B,whiteBright:B,bgBlackBright:B,bgRedBright:B,bgGreenBright:B,bgYellowBright:B,bgBlueBright:B,bgMagentaBright:B,bgCyanBright:B,bgWhiteBright:B}};ip.exports=U0();ip.exports.createColors=U0;CU=ip.exports,kU={},ZU=Object.freeze(Object.defineProperty({__proto__:null,default:kU},Symbol.toStringTag,{value:"Module"})),Re=RU(ZU),Lb=CU,Xb=Re,dh=class F0 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,F0)}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=Lb.isColorSupported);let r=u=>u,i=u=>u,o=u=>u;if(e){let{bold:u,gray:h,red:p}=Lb.createColors(!0);i=f=>u(p(f)),r=f=>h(f),Xb&&(o=f=>Xb(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,g=Math.max(0,this.column-d),b=Math.max(this.column+d,this.endColumn+d),w=u.slice(g,b),E=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
+ `+E+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}},Vh=Uu;Uu.default=Uu;jg={after:`
316
+ `),this.name+": "+this.message+e}},op=dh;dh.default=dh;Wb={after:`
317
317
  `,beforeClose:`
318
318
  `,beforeComment:`
319
319
  `,beforeDecl:`
320
320
  `,beforeOpen:" ",beforeRule:`
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(`
321
+ `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};fh=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 Wb[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"+xU(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=Wb[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)}},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=`
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)}},A0=fh;fh.default=fh;VU=A0;Ua=mh;mh.default=mh;to={};to.isClean=Symbol("isClean");to.my=Symbol("my");OU=op,NU=A0,GU=Ua,{isClean:Ci,my:LU}=to;gh=class{get proxyOf(){return this}constructor(t={}){this.raws={},this[Ci]=!1,this[LU]=!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=yh(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 OU(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[Ci]=!0}markDirty(){if(this[Ci]){this[Ci]=!1;let t=this;for(;t=t.parent;)t[Ci]=!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(ki(n,this.source.start),ki(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=ki(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(ki(r,this.source.start),ki(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 NU().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=GU){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)}},Fa=gh;gh.default=gh;XU=Fa,bh=class extends XU{constructor(t){super(t),this.type="comment"}},Aa=bh;bh.default=bh;WU=Fa,vh=class extends WU{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(t){t&&typeof t.value<"u"&&typeof t.value!="string"&&(t=Qt(j({},t),{value:String(t.value)})),super(t),this.type="decl"}},Da=vh;vh.default=vh;D0=Aa,J0=Da,MU=Fa,{isClean:Y0,my:K0}=to;$e=class j0 extends MU{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=z0(_0(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 J0(e)]}else if(e.selector||e.selectors)e=[new ap(e)];else if(e.name)e=[new sp(e)];else if(e.text)e=[new D0(e)];else throw new Error("Unknown node type in node creation");return e.map(r=>(r[K0]||j0.rebuild(r),r=r.proxyOf,r.parent&&r.parent.removeChild(r),r[Y0]&&B0(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)}))}};$e.registerParse=t=>{_0=t};$e.registerRule=t=>{ap=t};$e.registerAtRule=t=>{sp=t};$e.registerRoot=t=>{H0=t};Kn=$e;$e.default=$e;$e.rebuild=t=>{t.type==="atrule"?Object.setPrototypeOf(t,sp.prototype):t.type==="rule"?Object.setPrototypeOf(t,ap.prototype):t.type==="decl"?Object.setPrototypeOf(t,J0.prototype):t.type==="comment"?Object.setPrototypeOf(t,D0.prototype):t.type==="root"&&Object.setPrototypeOf(t,H0.prototype),t[K0]=!0,t.nodes&&t.nodes.forEach(e=>{$e.rebuild(e)})};Q0=Kn,Ia=class extends Q0{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)}},lp=Ia;Ia.default=Ia;Q0.registerAtRule(Ia);PU=Kn,Ki=class extends PU{constructor(t){super(j({type:"document"},t)),this.nodes||(this.nodes=[])}toResult(t={}){return new $0(new q0,this,t).stringify()}};Ki.registerLazyResult=t=>{$0=t};Ki.registerProcessor=t=>{q0=t};cp=Ki;Ki.default=Ki;UU="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",FU=(t=21)=>{let e="",n=t|0;for(;n--;)e+=UU[Math.random()*64|0];return e},AU={nanoid:FU},{existsSync:DU,readFileSync:JU}=Re,{dirname:Ru,join:YU}=Re,{SourceMapConsumer:Mb,SourceMapGenerator:Pb}=Re;wh=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=Ru(this.mapFile)),r&&(this.text=r)}consumer(){return this.consumerCache||(this.consumerCache=new Mb(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 KU(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.qa=="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=Ru(t),DU(t))return this.mapFile=t,JU(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 Mb)return Pb.fromSourceMap(e).toString();if(e instanceof Pb)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=YU(Ru(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)}},tw=wh;wh.default=wh;({nanoid:_U}=AU),{isAbsolute:Sh,resolve:Ih}=Re,{SourceMapConsumer:HU,SourceMapGenerator:zU}=Re,{fileURLToPath:Ub,pathToFileURL:Ws}=Re,Fb=op,BU=tw,Cu=Re,ku=Symbol("fromOffsetCache"),jU=!!(HU&&zU),Ab=!!(Ih&&Sh),Ta=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&&(!Ab||/^\w+:\/\//.test(e.from)||Sh(e.from)?this.file=e.from:this.file=Ih(e.from)),Ab&&jU){let n=new BU(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 "+_U(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 Fb(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 Fb(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&&(Ws&&(s.input.url=Ws(this.file).toString()),s.input.file=this.file),s}fromOffset(t){let e,n;if(this[ku])n=this[ku];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[ku]=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:Ih(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;Sh(o.source)?a=Ws(o.source):a=new URL(o.source,this.map.consumer().sourceRoot||Ws(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(Ub)c.file=Ub(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=j({},this.map),t.map.consumerCache&&(t.map.consumerCache=void 0)),t}},Ja=Ta;Ta.default=Ta;Cu&&Cu.registerInput&&Cu.registerInput(Ta);ew=Kn,Nr=class extends ew{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 nw(new rw,this,t).stringify()}};Nr.registerLazyResult=t=>{nw=t};Nr.registerProcessor=t=>{rw=t};eo=Nr;Nr.default=Nr;ew.registerRoot(Nr);_i={comma(t){return _i.split(t,[","],!0)},space(t){let e=[" ",`
330
+ `," "];return _i.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}},iw=_i;_i.default=_i;ow=Kn,QU=iw,Ea=class extends ow{get selectors(){return QU.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=[])}},up=Ea;Ea.default=Ea;ow.registerRule(Ea);$U=lp,qU=Aa,tF=Da,eF=Ja,nF=tw,rF=eo,iF=up;oF=Hi;Hi.default=Hi;({dirname:ea,relative:sw,resolve:aw,sep:lw}=Re),{SourceMapConsumer:cw,SourceMapGenerator:na}=Re,{pathToFileURL:Db}=Re,sF=Ja,aF=!!(cw&&na),lF=!!(ea&&aw&&sw&&lw),cF=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||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:
333
+ `),this.css+=e+"/*# sourceMappingURL="+t+" */"}applyPrevMaps(){for(let t of this.previous()){let e=this.toUrl(this.path(t.file)),n=t.root||ea(t.file),r;this.mapOpts.sourcesContent===!1?(r=new cw(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(),lF&&aF&&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=na.fromSourceMap(t,{ignoreInvalidMapping:!0})}else this.map=new na({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 na({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?ea(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(n=ea(aw(n,this.mapOpts.annotation)));let r=sw(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 sF(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(Db){let n=Db(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;lw==="\\"&&(t=t.replace(/\\/g,"/"));let n=encodeURI(t).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(t,n),n}},uw=cF,Zu=39,Jb=34,Ms=92,Yb=47,Ps=10,Zi=32,Us=12,Fs=9,As=13,uF=91,hF=93,pF=40,dF=41,fF=123,mF=125,yF=59,gF=42,bF=58,vF=64,Ds=/[\t\n\f\r "#'()/;[\\\]{}]/g,Js=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,wF=/.[\r\n"'(/\\]/,Kb=/[\da-f]/i,SF=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,g=[],b=[];function w(){return d}function E(x){throw t.error("Unclosed "+x,d)}function I(){return b.length===0&&d>=m}function S(x){if(b.length)return b.pop();if(d>=m)return;let Z=x?x.ignoreUnclosed:!1;switch(i=n.charCodeAt(d),i){case Ps:case Zi:case Fs:case As:case Us:{a=d;do a+=1,i=n.charCodeAt(a);while(i===Zi||i===Ps||i===Fs||i===As||i===Us);l=["space",n.slice(d,a)],d=a-1;break}case uF:case hF:case fF:case mF:case bF:case yF:case dF:{let k=String.fromCharCode(i);l=[k,k,d];break}case pF:{if(f=g.length?g.pop()[1]:"",p=n.charCodeAt(d+1),f==="url"&&p!==Zu&&p!==Jb&&p!==Zi&&p!==Ps&&p!==Fs&&p!==Us&&p!==As){a=d;do{if(u=!1,a=n.indexOf(")",a+1),a===-1)if(r||Z){a=d;break}else E("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||wF.test(o)?l=["(","(",d]:(l=["brackets",o,d,a],d=a);break}case Zu:case Jb:{c=i===Zu?"'":'"',a=d;do{if(u=!1,a=n.indexOf(c,a+1),a===-1)if(r||Z){a=d+1;break}else E("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 vF:{Ds.lastIndex=d+1,Ds.test(n),Ds.lastIndex===0?a=n.length-1:a=Ds.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!==Yb&&i!==Zi&&i!==Ps&&i!==Fs&&i!==As&&i!==Us&&(a+=1,Kb.test(n.charAt(a)))){for(;Kb.test(n.charAt(a+1));)a+=1;n.charCodeAt(a+1)===Zi&&(a+=1)}l=["word",n.slice(d,a+1),d,a],d=a;break}default:{i===Yb&&n.charCodeAt(d+1)===gF?(a=n.indexOf("*/",d+2)+1,a===0&&(r||Z?a=n.length:E("comment")),l=["comment",n.slice(d,a+1),d,a],d=a):(Js.lastIndex=d+1,Js.test(n),Js.lastIndex===0?a=n.length-1:a=Js.lastIndex-2,l=["word",n.slice(d,a+1),d,a],g.push(l),d=a);break}}return d++,l}function T(x){b.push(x)}return{back:T,endOfFile:I,nextToken:S,position:w}},IF=lp,TF=Aa,EF=Da,RF=eo,_b=up,CF=SF,Hb={empty:!0,space:!0};ZF=class{constructor(t){this.input=t,this.root=new RF,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 IF;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 TF;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=CF(this.input)}decl(t,e){let n=new EF;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]||kF(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 _b;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",!Hb[u]&&!Hb[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 _b;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})}},xF=ZF,VF=Kn,OF=Ja,NF=xF;hp=Ra;Ra.default=Ra;VF.registerParse(Ra);Th=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}},hw=Th;Th.default=Th;GF=hw,Eh=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 GF(t,e);return this.messages.push(n),n}warnings(){return this.messages.filter(t=>t.type==="warning")}},pp=Eh;Eh.default=Eh;zb={},pw=function(t){zb[t]||(zb[t]=!0,typeof console<"u"&&console.warn&&console.warn(t))},LF=Kn,XF=cp,WF=uw,MF=hp,Bb=pp,PF=eo,UF=Ua,{isClean:Me,my:FF}=to,AF=pw,DF={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},JF={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},YF={Once:!0,postcssPlugin:!0,prepare:!0},Gr=0;Ch={},Lr=class fw{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=Rh(n);else if(n instanceof fw||n instanceof Bb)i=Rh(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=MF;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[FF]&&LF.rebuild(i)}this.result=new Bb(e,i,r),this.helpers=Qt(j({},Ch),{postcss:Ch,result:this.result}),this.plugins=this.processor.plugins.map(o=>typeof o=="object"&&o.prepare?j(j({},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(!JF[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${n.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!YF[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 jt(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(xi(r))try{yield r}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Me];){e[Me]=!0;let n=[jb(e)];for(;n.length>0;){let r=this.visitTick(n);if(xi(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 xi(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=UF;e.syntax&&(n=e.syntax.stringify),e.stringifier&&(n=e.stringifier),n.stringify&&(n=n.stringify);let r=new WF(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(xi(n))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Me];)e[Me]=!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||AF("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(xi(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[Me]){a[Me]=!0,e.push(jb(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===Gr){r.nodes&&r.nodes.length&&(r[Me]=!0,n.iterator=r.getIterator());return}else if(this.listeners[s]){n.visitors=this.listeners[s];return}}e.pop()}walkSync(e){e[Me]=!0;let n=dw(e);for(let r of n)if(r===Gr)e.nodes&&e.each(i=>{i[Me]||this.walkSync(i)});else{let i=this.listeners[r];if(i&&this.visitSync(i,e.toProxy()))return}}warnings(){return this.sync().warnings()}};Lr.registerPostcss=t=>{Ch=t};mw=Lr;Lr.default=Lr;PF.registerLazyResult(Lr);XF.registerLazyResult(Lr);KF=uw,_F=hp,HF=pp,zF=Ua,BF=pw,kh=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=_F;try{t=e(this.ni,this.Hn)}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.ni=e,this.Hn=n,this.tl=void 0;let r,i=zF;this.result=new HF(this.ho,r,this.Hn),this.result.css=e;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let s=new KF(i,r,this.Hn,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.Hn||BF("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.ni}warnings(){return[]}},jF=kh;kh.default=kh;QF=cp,$F=mw,qF=jF,tA=eo,zi=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 qF(this,t,e):new $F(this,t,e)}use(t){return this.plugins=this.plugins.concat(this.normalize([t])),this}},eA=zi;zi.default=zi;tA.registerProcessor(zi);QF.registerProcessor(zi);yw=lp,gw=Aa,nA=Kn,rA=op,bw=Da,vw=cp,iA=oF,oA=Ja,sA=mw,aA=iw,lA=Fa,cA=hp,dp=eA,uA=pp,ww=eo,Sw=up,hA=Ua,pA=hw;ft.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 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
336
+ https://www.w3ctech.com/topic/2226`));let s=e(...o);return s.postcssPlugin=t,s.postcssVersion=new dp().version,s}let i;return Object.defineProperty(r,"postcss",{get(){return i||(i=r()),i}}),r.process=function(o,s,a){return ft([r(a)]).process(o,s)},r};ft.stringify=hA;ft.parse=cA;ft.fromJSON=iA;ft.list=aA;ft.comment=t=>new gw(t);ft.atRule=t=>new yw(t);ft.decl=t=>new bw(t);ft.rule=t=>new Sw(t);ft.root=t=>new ww(t);ft.document=t=>new vw(t);ft.CssSyntaxError=rA;ft.Declaration=bw;ft.Container=nA;ft.Processor=dp;ft.Document=vw;ft.Comment=gw;ft.Warning=pA;ft.AtRule=yw;ft.Result=uA;ft.Input=oA;ft.Rule=Sw;ft.Root=ww;ft.Node=lA;sA.registerPostcss(ft);ft.default=ft;Zh=class t{constructor(...e){be(this,"parentElement",null),be(this,"parentNode",null),be(this,"ownerDocument"),be(this,"firstChild",null),be(this,"lastChild",null),be(this,"previousSibling",null),be(this,"nextSibling",null),be(this,"ELEMENT_NODE",1),be(this,"TEXT_NODE",3),be(this,"nodeType"),be(this,"nodeName"),be(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"}},Qb={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},$b={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Ys={},dA=()=>!!globalThis.Zone;xu={};Vu={};ot={childNodes:fA,parentNode:mA,parentElement:yA,textContent:gA,contains:bA,getRootNode:vA,host:wA,styleSheets:SA,shadowRoot:IA,querySelector:TA,querySelectorAll:EA,mutationObserver:Tw,patch:_n};wr=`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.`,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","WebGLVertexArrayObjectOES"].filter(n=>typeof e[n]=="function").find(n=>t instanceof e[n]);ew="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwg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gICBjb25zdCBtc2cgPSB7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0LAogICAgICAgIGR4LAogICAgICAgIGR5LAogICAgICAgIGR3LAogICAgICAgIGRoCiAgICAgIH07CiAgICAgIGRlYnVnKCJbaGlnaGxpZ2h0LXdvcmtlcl0gY2FudmFzIGJpdG1hcCBwcm9jZXNzZWQiLCBtc2cpOwogICAgICB3b3JrZXIucG9zdE1lc3NhZ2UobXNnKTsKICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgfSBlbHNlIHsKICAgICAgZGVidWcoIltoaWdobGlnaHQtd29ya2VyXSBubyBvZmZzY3JlZW5jYW52YXMgc3VwcG9ydCIsIHsKICAgICAgICBpZDogZS5kYXRhLmlkCiAgICAgIH0pOwogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCwgc3RhdHVzOiAidW5zdXBwb3J0ZWQiIH0pOwogICAgfQogIH07Cn0pKCk7Ci8vIyBzb3VyY2VNYXBwaW5nVVJMPWltYWdlLWJpdG1hcC1kYXRhLXVybC13b3JrZXItRHd0SzhBMHouanMubWFwCg==",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(`
338
+ or you can use record.mirror to access the mirror instance during recording.`,qb={map:{},getId(){return console.error(wr),-1},getNode(){return console.error(wr),null},removeNodeFromMap(){console.error(wr)},has(){return console.error(wr),!1},reset(){console.error(wr)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(qb=new Proxy(qb,{get(t,e,n){return e==="map"&&console.error(wr),Reflect.get(t,e,n)}}));Ca=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(Ca=()=>new Date().getTime());RA=t=>{try{if(t instanceof HTMLElement)return t.tagName==="CANVAS"}catch(e){return!1}return!1};Oh=class{constructor(){G(this,"id",1),G(this,"styleIDMap",new WeakMap),G(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++}};ut=(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))(ut||{}),at=(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))(at||{}),Bt=(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))(Bt||{}),un=(t=>(t[t.Mouse=0]="Mouse",t[t.Pen=1]="Pen",t[t.Touch=2]="Touch",t))(un||{}),Xr=(t=>(t[t["2D"]=0]="2D",t[t.WebGL=1]="WebGL",t[t.WebGL2=2]="WebGL2",t))(Xr||{}),Sr=(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))(Sr||{}),Gw=(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))(Gw||{});Nh=class{constructor(){G(this,"length",0),G(this,"head",null),G(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&&tv(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&&tv(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--)}},ev=(t,e)=>`${t}@${e}`,Gh=class{constructor(){G(this,"frozen",!1),G(this,"locked",!1),G(this,"texts",[]),G(this,"attributes",[]),G(this,"attributeMap",new WeakMap),G(this,"removes",[]),G(this,"mapRemoves",[]),G(this,"movedMap",{}),G(this,"addedSet",new Set),G(this,"movedSet",new Set),G(this,"droppedSet",new Set),G(this,"removesSubTreeCache",new Set),G(this,"mutationCb"),G(this,"blockClass"),G(this,"blockSelector"),G(this,"maskTextClass"),G(this,"maskTextSelector"),G(this,"inlineStylesheet"),G(this,"maskInputOptions"),G(this,"maskTextFn"),G(this,"maskInputFn"),G(this,"keepIframeSrcFn"),G(this,"recordCanvas"),G(this,"inlineImages"),G(this,"inlineVideos"),G(this,"privacySetting"),G(this,"slimDOMOptions"),G(this,"dataURLOptions"),G(this,"doc"),G(this,"mirror"),G(this,"iframeManager"),G(this,"stylesheetManager"),G(this,"shadowDomManager"),G(this,"canvasManager"),G(this,"processedNodeManager"),G(this,"unattachedDoc"),G(this,"processMutations",e=>{e.forEach(this.processMutation),this.emit()}),G(this,"emit",()=>{if(this.frozen||this.locked)return;let e=[],n=new Set,r=new Nh,i=c=>{let l=c,u=Fi;for(;u===Fi;)l=l&&l.nextSibling,u=l&&this.mirror.getId(l);return u},o=c=>{let l=ot.parentNode(c);if(!l||!Nw(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=Li(l)?this.mirror.getId(Ow(c)):this.mirror.getId(l),p=i(c);if(h===-1||p===-1)return r.addNode(c);let f=Tr(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=>{xw(m,this.mirror)&&this.iframeManager.addIframe(m),Vw(m,this.mirror)&&this.stylesheetManager.trackLinkElement(m),Vh(c)&&this.shadowDomManager.addShadowRoot(ot.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)nv(this.removesSubTreeCache,c)&&!this.movedSet.has(ot.parentNode(c))||o(c);for(let c of this.addedSet)!rv(this.droppedSet,c)&&!nv(this.removesSubTreeCache,c)||rv(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(ot.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(ot.parentNode(u.value));if(i(u.value)===-1)continue;if(h!==-1){c=u;break}else{let p=u.value,f=ot.parentNode(p);if(f&&f.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let m=ot.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=ot.parentNode(h);p&&p.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(p);let f=c.value,m=this.privacySetting==="strict",d=this.privacySetting==="default"&&jv(f),g=(u=(l=c.node)==null?void 0:l.parentElement)==null?void 0:u.getAttribute("data-hl-record");return(m||d)&&!g&&f&&(f=_h(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))}),G(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(ot.childNodes(e),i=>ot.textContent(i)||"").join("");n.attributes.value=da({overwriteRecord:null,element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:fa(e),value:r,maskInputFn:this.maskInputFn})}),G(this,"processMutation",e=>{if(!Ou(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{let n=ot.textContent(e.target);!Ut(e.target,this.blockClass,this.blockSelector,!1)&&n!==e.oldValue&&this.texts.push({value:e0(e.target,this.maskTextClass,this.maskTextSelector,!0)&&n?this.maskTextFn?this.maskTextFn(n,kw(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=fa(n);i=da({element:n,maskInputOptions:this.maskInputOptions,tagName:n.tagName,type:s,value:i,overwriteRecord:n.getAttribute("data-hl-record"),maskInputFn:this.maskInputFn})}if(Ut(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"),!t0(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]=qv(this.doc,Zr(n.tagName),Zr(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(Ut(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=Li(e.target)?this.mirror.getId(ot.host(e.target)):this.mirror.getId(e.target);Ut(e.target,this.blockClass,this.blockSelector,!1)||Ou(n,this.mirror,this.slimDOMOptions)||!CA(n,this.mirror)||(this.addedSet.has(n)?(Lh(this.addedSet,n),this.droppedSet.add(n)):this.addedSet.has(e.target)&&r===-1||Zw(e.target,this.mirror)||(this.movedSet.has(n)&&this.movedMap[ev(r,i)]?Lh(this.movedSet,n):(this.removes.push({parentId:i,id:r,isShadow:Li(e.target)&&Xi(e.target)?!0:void 0}),VA(n,this.removesSubTreeCache))),this.mapRemoves.push(n))});break}}}),G(this,"genAdds",(e,n)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(Ou(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[ev(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);Ut(e,this.blockClass,this.blockSelector,!1)||(ot.childNodes(e).forEach(r=>this.genAdds(r)),Vh(e)&&ot.childNodes(ot.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()}};ct=t=>Wi?(...e)=>{try{return t(...e)}catch(n){if(Wi&&Wi(n)===!0)return;throw n}}:t,Dn=[];MA=["INPUT","TEXTAREA","SELECT"],iv=new WeakMap;Za=class{constructor(e){G(this,"iframeIdToRemoteIdMap",new WeakMap),G(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}},Xh=class{constructor(e){G(this,"iframes",new WeakMap),G(this,"crossOriginIframeMap",new WeakMap),G(this,"crossOriginIframeMirror",new Za($v)),G(this,"crossOriginIframeStyleMirror"),G(this,"crossOriginIframeRootIdMap",new WeakMap),G(this,"mirror"),G(this,"mutationCb"),G(this,"wrappedEmit"),G(this,"loadListener"),G(this,"stylesheetManager"),G(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Za(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 ut.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:ut.IncrementalSnapshot,data:{source:at.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:n.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case ut.Meta:case ut.Load:case ut.DomContentLoaded:return!1;case ut.Plugin:return n;case ut.Custom:return this.replaceIds(n.data.payload,e,["id","parentId","previousId","nextId"]),n;case ut.IncrementalSnapshot:switch(n.data.source){case at.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 at.Drag:case at.TouchMove:case at.MouseMove:return n.data.positions.forEach(i=>{this.replaceIds(i,e,["id"])}),n;case at.ViewportResize:return!1;case at.MediaInteraction:case at.MouseInteraction:case at.Scroll:case at.CanvasMutation:case at.Input:return this.replaceIds(n.data,e,["id"]),n;case at.StyleSheetRule:case at.StyleDeclaration:return this.replaceIds(n.data,e,["id"]),this.replaceStyleIds(n.data,e,["styleId"]),n;case at.Font:return n;case at.Selection:return n.data.ranges.forEach(i=>{this.replaceIds(i,e,["start","end"])}),n;case at.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!==Gw.Document&&!e.rootId&&(e.rootId=n),"childNodes"in e&&e.childNodes.forEach(r=>{this.patchRootIdOnNode(r,n)})}},Wh=class{constructor(e){G(this,"shadowDoms",new WeakSet),G(this,"mutationCb"),G(this,"scrollCb"),G(this,"bypassOptions"),G(this,"mirror"),G(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(!Xi(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);let r=Xw(Qt(j({},this.bypassOptions),{doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(Ww(Qt(j({},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(ot.host(e))),this.restoreHandlers.push(Mw({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(_n(e.prototype,"attachShadow",function(i){return function(o){let s=i.call(this,o),a=ot.shadowRoot(this);return a&&Nw(this)&&r.addShadowRoot(a,n),s}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch(n){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}},Er="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",HA=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(Vi=0;Vi<Er.length;Vi++)HA[Er.charCodeAt(Vi)]=Vi;zA=function(t){var e=new Uint8Array(t),n,r=e.length,i="";for(n=0;n<r;n+=3)i+=Er[e[n]>>2],i+=Er[(e[n]&3)<<4|e[n+1]>>4],i+=Er[(e[n+1]&15)<<2|e[n+2]>>6],i+=Er[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},ov=new Map;Pw=(t,e,n)=>{if(!t||!(Fw(t,e)||typeof t=="object"))return;let r=t.constructor.name,i=BA(n,r),o=i.indexOf(t);return o===-1&&(o=i.length,i.push(t)),o};Uw=(t,e,n)=>t.map(r=>ra(r,e,n)),Fw=(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]);Aw="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtb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hBMHouanMubWFwCg==",qA=t=>Uint8Array.from(atob(t),e=>e.charCodeAt(0)),lv=typeof self<"u"&&self.Blob&&new Blob([qA(Aw)],{type:"text/javascript;charset=utf-8"});Mh=class{constructor(e){G(this,"pendingCanvasMutations",new Map),G(this,"rafStamps",{latestId:0,invokeId:null}),G(this,"mirror"),G(this,"logger"),G(this,"worker"),G(this,"snapshotInProgressMap",new Map),G(this,"lastSnapshotTime",new Map),G(this,"options"),G(this,"mutationCb"),G(this,"resetObservers"),G(this,"frozen",!1),G(this,"locked",!1),G(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 t9,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:g,dw:b,dh:w}=h.data,E={id:p,type:Xr["2D"],commands:[{property:"clearRect",args:[d,g,b,w]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:f}],type:m}]},d,g,b,w]}]};this.debug(null,"canvas worker recording mutation",E),this.mutationCb(E)},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 jt(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=sv(i,o,s,!0),h=1e3/r,p=0,f,m=new Map,d=(E,I)=>{let S=[];E.querySelectorAll(I).forEach(Z=>S.push(Z));let T=document.createNodeIterator(E,Node.ELEMENT_NODE),x;for(;x=T.nextNode();)x!=null&&x.shadowRoot&&S.push(...d(x.shadowRoot,I));return S},g=E=>{let I=[];return d(i.document,"canvas").forEach(S=>{if(!Ut(S,o,s,!0)){this.debug(S,"discovered canvas"),I.push(S);let T=this.mirror.getId(S);m.has(T)||m.set(T,E)}}),I},b=E=>{let I=[];return(e||n)&&d(i.document,"video").forEach(S=>{if(!(!n&&S.src!==""&&S.src.indexOf("blob:")===-1)&&!(!e&&(S.src===""||S.src.indexOf("blob:")!==-1))&&!Ut(S,o,s,!0)){I.push(S);let T=this.mirror.getId(S);m.has(T)||m.set(T,E)}}),I},w=E=>jt(this,null,function*(){if(p&&E-p<h){f=requestAnimationFrame(w);return}p=E;let I=T=>{let x=this.mirror.getId(T),Z=m.get(x),k=!a.initialSnapshotDelay||E-Z>a.initialSnapshotDelay;return this.debug(T,{delay:a.initialSnapshotDelay,delta:E-Z,hadLoadingTime:k}),k},S=[];S.push(...g(E).filter(I).map(T=>this.snapshot(T))),S.push(...b(E).filter(I).map(T=>jt(this,null,function*(){this.debug(T,"starting video snapshotting");let x=this.mirror.getId(T);if(this.snapshotInProgressMap.get(x)){this.debug(T,"video snapshotting already in progress for",x);return}this.snapshotInProgressMap.set(x,!0);try{let{width:Z,height:k}=T.getBoundingClientRect(),{actualWidth:O,actualHeight:X}={actualWidth:T.videoWidth,actualHeight:T.videoHeight},_=Math.max(O,X);if(_===0){this.debug(T,"not yet ready",{width:T.width,height:T.height,actualWidth:O,actualHeight:X,boxWidth:Z,boxHeight:k});return}let tt=c||1;l&&(tt=Math.min(tt,l/_));let y=O*tt,v=X*tt,V=yield createImageBitmap(T,{resizeWidth:y,resizeHeight:v}),D=Math.max(Z,k)/_,U=O*D,L=X*D,q=(Z-U)/2,lt=(k-L)/2;this.debug(T,"created image bitmap",{actualWidth:O,actualHeight:X,boxWidth:Z,boxHeight:k,outputWidth:U,outputHeight:L,resizeWidth:y,resizeHeight:v,scale:tt,outputScale:D,offsetX:q,offsetY:lt}),this.worker.postMessage({id:x,bitmap:V,width:y,height:v,dx:q,dy:lt,dw:U,dh:L,dataURLOptions:a.dataURLOptions,logDebug:!!this.logger},[V]),this.debug(T,"send message")}catch(Z){this.debug(T,"failed to snapshot",Z)}finally{this.snapshotInProgressMap.set(x,!1)}}))),yield Promise.all(S).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=sv(e,n,r,!1),o=jA(this.processMutation.bind(this),e,n,r),s=$A(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=>kr(s,["type"])),{type:o}=r[0];this.mutationCb({id:n,type:o,commands:i}),this.pendingCanvasMutations.delete(e)}},Ph=class{constructor(e){G(this,"trackedLinkElements",new WeakSet),G(this,"mutationCb"),G(this,"adoptedStyleSheetCb"),G(this,"styleMirror",new Oh),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:zv(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){}},Uh=class{constructor(){G(this,"nodeMap",new WeakMap),G(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(){}},xa=!1;try{if(Array.from([1],t=>t*2)[0]!==2){let t=document.createElement("iframe");document.body.appendChild(t),Array.from=((cb=t.contentWindow)==null?void 0:cb.Array.from)||Array.from,document.body.removeChild(t)}}catch(t){console.debug("Unable to override Array.from",t)}Te=rM();je.addCustomEvent=(t,e)=>{xa&&It({type:ut.Custom,data:{tag:t,payload:e}})};je.freezePage=()=>{Dn.forEach(t=>t.freeze())};je.takeFullSnapshot=t=>{if(!xa)throw new Error("please take full snapshot after start recording");ia(t)};je.snapshotCanvas=t=>jt(void 0,null,function*(){if(!Mi)throw new Error("canvas manager is not initialized");yield Mi.snapshot(t)});je.mirror=Te;(function(t){t[t.NotStarted=0]="NotStarted",t[t.Running=1]="Running",t[t.Stopped=2]="Stopped"})(cv||(cv={}));({addCustomEvent:uv}=je),e9=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}},n9=t=>{switch(t){case"strict":return[!0,void 0];case"default":return[!0,void 0];case"none":return[!1,{password:!0}]}},r9=t=>{let e=n=>{if(n.target){let r=n.target,i=Jv(r);t(i,n)}};return window.addEventListener("click",e),()=>window.removeEventListener("click",e)},i9=t=>{let e=n=>{if(n.target){let r=Jv(n.target);t(r)}};return window.addEventListener("focusin",e),()=>window.removeEventListener("focusin",e)},o9=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)},s9=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}=hv();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}=hv();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),o2(({keyName:o})=>{n({key:o})}),()=>{window.removeEventListener("storage",n),XMLHttpRequest.prototype.send=e}},hv=()=>{let t=ve("ajs_user_id"),e=ve("ajs_user_traits"),n=ve("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=a9(e),r=ve(ie.SEGMENT_LAST_SENT_HASH_KEY);return r===void 0||n!==r?(pn(ie.SEGMENT_LAST_SENT_HASH_KEY,n),!0):!1},a9=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()},l9=(t,e)=>{let n=c9(t),r=[],i=!1,o=!0;for(let s=0;s<n.length;s++){let a=n[s].split("+");r=[],a.length>1&&(r=p9(Dw,a)),a=a[a.length-1],a=a==="*"?"*":h9(a),a in Pe||(Pe[a]=[]),Pe[a].push({mods:r,shortcut:n[s],key:n[s],method:e,keyup:i,keydown:o,scope:"all",splitKey:"+"})}d9(document,"keydown",s=>{m9(s)})},Yt=[];Pe={},Gu=typeof navigator<"u"?navigator.userAgent.toLowerCase().indexOf("firefox")>0:!1,u9={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,"-":Gu?173:189,"=":Gu?61:187,";":Gu?59:186,"'":222,"[":219,"]":221,"\\":220},pv={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey",shiftKey:16,ctrlKey:17,altKey:18,metaKey:91},Kt={16:!1,18:!1,17:!1,91:!1},Dw={"\u21E7":16,shift:16,"\u2325":18,alt:18,option:18,"\u2303":17,ctrl:17,control:17,"\u2318":91,cmd:91,command:91},h9=t=>u9[t.toLowerCase()]||Dw[t.toLowerCase()]||t.toUpperCase().charCodeAt(0);dv="iframe parent ready",fv="iframe ok",ji="highlightLogs",y9=t=>{let e=ve(ji)||"";e=e+"["+new Date().getTime()+"] "+t+`
339
+ `,pn(ji,e)},g9=()=>ve(ji)||"",b9=t=>{if(!t)return;let e=ve(ji)||"";e&&(e.startsWith(t)?(e=e.slice(t.length),pn(ji,e)):y9("Unable to clear logs "+t.replace(`
340
340
  `," ")+" from "+e.replace(`
341
- `," ")))},rw="dmFyIFZyPU9iamVjdC5kZWZpbmVQcm9wZXJ0eSxqcj1PYmplY3QuZGVmaW5lUHJvcGVydGllczt2YXIgcXI9T2JqZWN0LmdldE93blByb3BlcnR5RGVzY3JpcHRvcnM7dmFyIEJlPU9iamVjdC5nZXRPd25Qcm9wZXJ0eVN5bWJvbHM7dmFyIFF0PU9iamVjdC5wcm90b3R5cGUuaGFzT3duUHJvcGVydHksWHQ9T2JqZWN0LnByb3RvdHlwZS5wcm9wZXJ0eUlzRW51bWVyYWJsZTt2YXIgY3Q9KE0sRCxDKT0+RCBpbiBNP1ZyKE0sRCx7ZW51bWVyYWJsZTohMCxjb25maWd1cmFibGU6ITAsd3JpdGFibGU6ITAsdmFsdWU6Q30pOk1bRF09QyxQPShNLEQpPT57Zm9yKHZhciBDIGluIER8fChEPXt9KSlRdC5jYWxsKEQsQykmJmN0KE0sQyxEW0NdKTtpZihCZSlmb3IodmFyIEMgb2YgQmUoRCkpWHQuY2FsbChELEMpJiZjdChNLEMsRFtDXSk7cmV0dXJuIE19LFVlPShNLEQpPT5qcihNLHFyKEQpKTt2YXIgZ2U9KE0sRCk9Pnt2YXIgQz17fTtmb3IodmFyIEogaW4gTSlRdC5jYWxsKE0sSikmJkQuaW5kZXhPZihKKTwwJiYoQ1tKXT1NW0pdKTtpZihNIT1udWxsJiZCZSlmb3IodmFyIEogb2YgQmUoTSkpRC5pbmRleE9mKEopPDAmJ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syncEvents",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}
341
+ `," ")))},Jw="dmFyIFZyPU9iamVjdC5kZWZpbmVQcm9wZXJ0eSxqcj1PYmplY3QuZGVmaW5lUHJvcGVydGllczt2YXIgcXI9T2JqZWN0LmdldE93blByb3BlcnR5RGVzY3JpcHRvcnM7dmFyIEJlPU9iamVjdC5nZXRPd25Qcm9wZXJ0eVN5bWJvbHM7dmFyIFF0PU9iamVjdC5wcm90b3R5cGUuaGFzT3duUHJvcGVydHksWHQ9T2JqZWN0LnByb3RvdHlwZS5wcm9wZXJ0eUlzRW51bWVyYWJsZTt2YXIgY3Q9KE0sRCxDKT0+RCBpbiBNP1ZyKE0sRCx7ZW51bWVyYWJsZTohMCxjb25maWd1cmFibGU6ITAsd3JpdGFibGU6ITAsdmFsdWU6Q30pOk1bRF09QyxQPShNLEQpPT57Zm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2UudHlwZT09PUsuRmVlZGJhY2smJih5aWVsZCBOKGcuZGF0YS5tZXNzYWdlKSksaT0wfWNhdGNoKEUpe3MmJmNvbnNvbGUuZXJyb3IoRSksaSs9MX19KX19fSkoKTsKLy8jIHNvdXJjZU1hcHBpbmdVUkw9aGlnaGxpZ2h0LWNsaWVudC13b3JrZXItQ3BtbDJKMXQuanMubWFwCg==",v9=t=>Uint8Array.from(atob(t),e=>e.charCodeAt(0)),mv=typeof self<"u"&&self.Blob&&new Blob([v9(Jw)],{type:"text/javascript;charset=utf-8"});ze=(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))(ze||{}),S9=({apiKey:t})=>{(function(e,n){var r=e.amplitude||{ri:[],Ti:{}},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,g){d.prototype[g]=function(){return this.ri.push([g].concat(Array.prototype.slice.call(arguments,0))),this}}for(var a=function(){return this.ri=[],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.ri=[],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 g(w){d[w]=function(){d.ri.push([w].concat(Array.prototype.slice.call(arguments,0)))}}for(var b=0;b<f.length;b++)g(f[b])}m(r),r.getInstance=function(d){return d=(!d||d.length===0?"$default_instance":d).toLowerCase(),Object.prototype.hasOwnProperty.call(r.Ti,d)||(r.Ti[d]={ri:[]},m(r.Ti[d])),r.Ti[d]},e.amplitude=r})(window,document)},I9=({projectToken:t})=>{if(window.mixpanel)return;(function(n,r){if(!r.__SV){var i,o;window.mixpanel=r,r.el=[],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(g){f[g]=function(){call2_args=arguments,call2=[g].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.el.push([s,a,c])},r.__SV=1.2}})(document,window.mixpanel||[]);let e=document.createElement("script");e.src=T9,document.head.appendChild(e),e.addEventListener("load",()=>{var n;(n=window.mixpanel)==null||n.init(t)})},T9="https://cdn.mxpnl.com/libs/mixpanel-2-latest.min.js",E9="9.15.0",Fh=class{constructor(e){K(this,"options"),K(this,"isRunningOnHighlight"),K(this,"organizationID"),K(this,"graphqlSDK"),K(this,"events"),K(this,"sessionData"),K(this,"ready"),K(this,"manualStopped"),K(this,"state"),K(this,"logger"),K(this,"enableSegmentIntegration"),K(this,"privacySetting"),K(this,"enableCanvasRecording"),K(this,"samplingStrategy"),K(this,"inlineImages"),K(this,"inlineVideos"),K(this,"inlineStylesheet"),K(this,"debugOptions"),K(this,"listeners"),K(this,"firstloadVersion"),K(this,"environment"),K(this,"sessionShortcut"),K(this,"appVersion"),K(this,"serviceName"),K(this,"_worker"),K(this,"_optionsInternal"),K(this,"_backendUrl"),K(this,"_recordingStartTime"),K(this,"_isOnLocalHost"),K(this,"_onToggleFeedbackFormVisibility"),K(this,"_isCrossOriginIframe"),K(this,"_eventBytesSinceSnapshot"),K(this,"_lastSnapshotTime"),K(this,"_lastVisibilityChangeTime"),K(this,"pushPayloadTimerId"),K(this,"hasSessionUnloaded"),K(this,"hasPushedData"),K(this,"reloaded"),K(this,"_hasPreviouslyInitialized"),K(this,"_recordStop"),K(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 yv(this.debugOptions.clientInteractions),this.Lr=new w9,this.Lr.onmessage=c=>{var l,u,h;((l=c.data.response)==null?void 0:l.type)===ze.AsyncEvents?(this.ii+=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.ii/1e6).toFixed(1)}MB`)):((u=c.data.response)==null?void 0:u.type)===ze.CustomEvent?this.addCustomEvent(c.data.response.tag,c.data.response.payload):((h=c.data.response)==null?void 0:h.type)===ze.Stop&&(oe("worker.onmessage","warn","Stopping recording due to worker failure",c.data.response),this.stop(!1))};let a=$s();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(ie))_u(c);this.sessionData={sessionSecureID:this.options.sessionSecureID,projectID:0,payloadID:1,sessionStartTime:Date.now()}}this.bs=!1;try{window.parent.document&&(this.fo=!1)}catch(c){this.fo=(s=this.options.recordCrossOriginIframe)!=null?s:!0}this.nl(this.options)}vs(e){return jt(this,arguments,function*({forceNew:n}){this.pushPayloadTimerId&&(clearTimeout(this.pushPayloadTimerId),this.pushPayloadTimerId=void 0);let r,i;if(!n)try{r=ve(ie.USER_IDENTIFIER);let o=ve(ie.USER_OBJECT);o&&(i=JSON.parse(o))}catch(o){}for(let o of Object.values(ie))_u(o);this.sessionData.sessionSecureID=zu(),this.sessionData.sessionStartTime=Date.now(),this.options.sessionSecureID=this.sessionData.sessionSecureID,this.stop(),yield this.start(),r&&i&&this.identify(r,i)})}nl(e){var n,r,i,o,s,a,c,l,u;this.sessionShortcut=!1,this.Xr=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=j({canvasFactor:.5,canvasMaxSnapshotDimension:360,canvasClearWebGLBuffer:!0,dataUrlOptions:zW()},(a=e.samplingStrategy)!=null?a:{canvas:2}),this.Qn=(c=e==null?void 0:e.backendUrl)!=null?c:"https://pub.observability.app.launchdarkly.com",this.Qn[0]==="/"&&(this.Qn=new URL(this.Qn,document.baseURI).href);let h=new EW(`${this.Qn}`,{headers:{}});this.graphqlSDK=_W(h,m2()),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.ul=()=>{};let p=e,f=kr(p,["firstloadVersion"]);this.rl=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.ii=0,this.yo=new Date().getTime(),this.ws=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,pn(ie.USER_IDENTIFIER,e.toString()),pn(ie.USER_OBJECT,JSON.stringify(n)),this.Lr.postMessage({message:{type:ze.Identify,userIdentifier:e,userObject:n,source:r}})}track(e,n){this.addProperties(Qt(j({},n),{event:e}))}addProperties(e={},n){let r=j({},e);Object.entries(r).forEach(([i,o])=>{try{structuredClone(o)}catch(s){delete r[i]}}),this.Lr.postMessage({message:{type:ze.Properties,propertiesObject:r,propertyType:n}})}start(e){return jt(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.vs(e);return}this.logger.log("Initializing...",e,this.sessionData,this.options),this.sessionData=(i=$s(this.sessionData.sessionSecureID))!=null?i:this.sessionData,(o=this.sessionData)!=null&&o.sessionStartTime?this.Xr=(s=this.sessionData)==null?void 0:s.sessionStartTime:(this.Xr=new Date().getTime(),this.sessionData.sessionStartTime=this.Xr);let u=ve(Ju.CLIENT_ID);u||(u=zu(),pn(Ju.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.il();else{let b=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.rl),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(b.initializeSession.secure_id!==this.sessionData.sessionSecureID&&this.logger.log(`Unexpected secure id returned by initializeSession: ${b.initializeSession.secure_id}, expected ${this.sessionData.sessionSecureID}`),this.sessionData.sessionSecureID=b.initializeSession.secure_id,this.sessionData.projectID=parseInt(((l=b==null?void 0:b.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}}Gi(""),Fn(this.sessionData),this.logger.log(`Loaded Highlight
343
+ Remote: ${this.Qn}
344
344
  Project ID: ${this.sessionData.projectID}
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}
345
+ SessionSecureID: ${this.sessionData.sessionSecureID}`),this.options.sessionSecureID=this.sessionData.sessionSecureID,this.Lr.postMessage({message:{type:ze.Initialize,sessionSecureID:this.sessionData.sessionSecureID,backend:this.Qn,debug:!!this.debugOptions.clientInteractions,recordingStartTime:this.Xr}});for(let b of this.yr)b.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.Ss()},rb)),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=(b,w)=>{w&&this.logger.log("received isCheckout emit",{event:b}),this.events.push(b)};f.bind(this);let m=!!this.sr;this.sr&&(this.sr(),this.sr=void 0);let[d,g]=n9(this.privacySetting);this.sr=je({ignoreClass:"highlight-ignore",blockClass:"highlight-block",emit:f,recordCrossOriginIframes:this.options.recordCrossOriginIframe,privacySetting:this.privacySetting,maskAllInputs:d,maskInputOptions:g,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:b=>!this.options.recordCrossOriginIframe,inlineImages:this.inlineImages,inlineVideos:this.inlineVideos,collectFonts:this.inlineImages,inlineStylesheet:this.inlineStylesheet,plugins:[G2()],logger:typeof this.options.debug=="boolean"&&this.options.debug||typeof this.options.debug=="object"&&this.options.debug.domRecording?{debug:this.logger.log,warn:oe.bind("RecordSDK","warn")}:void 0}),m||this.options.recordCrossOriginIframe&&this.ol(),document.referrer&&(window&&document.referrer.includes(window.location.origin)||(this.addCustomEvent("Referrer",document.referrer),this.addProperties({referrer:document.referrer},{type:"session"}))),this.sl(),this.ready=!0,this.state="Recording",this.manualStopped=!1}catch(u){oe("initializeSession _setupWindowListeners","warn",u)}})}Is(e){return jt(this,null,function*(){if(this.manualStopped){this.logger.log("Ignoring visibility event due to manual stop.");return}new Date().getTime()-this.ws<QW||(this.ws=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)))})}il(){return jt(this,null,function*(){this.logger.log("highlight in cross-origin iframe is waiting "),yield new Promise(e=>{let n=r=>{if(r.data.highlight===dv){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:fv},"*"),window.removeEventListener("message",n),e()}};window.addEventListener("message",n)})})}ol(){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:dv,projectID:this.sessionData.projectID,sessionSecureID:this.sessionData.sessionSecureID},"*")})},rb),window.addEventListener("message",e=>{e.data.highlight===fv&&this.logger.log("highlight got response from initialized iframe")})}sl(){var e;try{let r=this;this.enableSegmentIntegration&&this.listeners.push(s9(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(e9(o=>{this.reloaded?(this.addCustomEvent("Reload",o),this.reloaded=!1,r.addProperties({reload:!0},{type:"session"})):this.addCustomEvent("Navigate",o)})),this.listeners.push(R2(o=>{this.addCustomEvent("Viewport",o)})),this.listeners.push(r9((o,s)=>{let a=null,c=null;if(s&&s.target){let l=s.target;a=T2(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(i9(o=>{o&&this.addCustomEvent("Focus",o)})),this.sessionShortcut&&l9(this.sessionShortcut,()=>{window.open(this.getCurrentSessionURLWithTimestamp(),"_blank")}),this.bs||((e=window.electron)!=null&&e.ipcRenderer?(window.electron.ipcRenderer.on("highlight.run",({visible:o})=>{this.Is(!o)}),this.logger.log("Set up Electron highlight.run events.")):(o9(o=>this.Is(o)),this.logger.log("Set up document visibility listener.")),this.bs=!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){oe("initializeSession _setupWindowListeners","warn",r)}let n=()=>{this.addCustomEvent("Page Unload",""),Gi(this.sessionData.sessionSecureID),Fn(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",""),Gi(this.sessionData.sessionSecureID),Fn(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.sr&&(this.sr(),this.sr=void 0),this.listeners.forEach(n=>n()),this.listeners=[]}getCurrentSessionURLWithTimestamp(){let e=new Date().getTime(),{projectID:n,sessionSecureID:r}=this.sessionData,i=(e-this.Xr)/1e3;return`https://${ob}/${n}/sessions/${r}?ts=${i}`}getCurrentSessionURL(){let e=this.sessionData.projectID,n=this.sessionData.sessionSecureID;return e&&n?`https://${ob}/${e}/sessions/${n}`:null}snapshot(e){return jt(this,null,function*(){yield je.snapshotCanvas(e)})}addSessionFeedback({timestamp:e,verbatim:n,user_email:r,user_name:i}){var o;this.Lr.postMessage({message:{type:ze.Feedback,verbatim:n,timestamp:e,userName:i||this.sessionData.userIdentifier,userEmail:r||((o=this.sessionData.userObject)==null?void 0:o.name)}})}Ss(){return jt(this,null,function*(){var e;try{this.state==="Recording"&&this.listeners&&this.sessionData.sessionStartTime&&Date.now()-this.sessionData.sessionStartTime>jW&&(this.logger.log("Resetting session",{start:this.sessionData.sessionStartTime}),yield this.vs({}));let n;((e=this.options)==null?void 0:e.sendMode)==="local"&&(n=r=>jt(this,null,function*(){let i=new Blob([JSON.stringify({query:Vv(Wv),variables:r})],{type:"application/json"});return yield window.fetch(`${this.Qn}`,{method:"POST",body:i}),0})),yield this.al({sendFn:n}),this.hasPushedData=!0,this.sessionData.lastPushTime=Date.now(),Fn(this.sessionData)}catch(n){oe("_save","warn",n)}this.state==="Recording"&&(this.pushPayloadTimerId&&(clearTimeout(this.pushPayloadTimerId),this.pushPayloadTimerId=void 0),this.pushPayloadTimerId=setTimeout(()=>{this.Ss()},BW))})}addCustomEvent(e,n){if(this.state==="NotRecording"){let r,i=()=>{clearInterval(r),this.state==="Recording"&&this.events.length>0?uv(e,n):r=setTimeout(i,500)};r=setTimeout(i,500)}else this.state==="Recording"&&(this.events.length>0||this.hasPushedData)&&uv(e,n)}al(e){return jt(this,arguments,function*({sendFn:n}){let r=[...this.events],{bytes:i,time:o}=this.enableCanvasRecording?ib.canvas:ib.normal;this.ii>=i&&new Date().getTime()-this.yo>=o&&this.takeFullSnapshot(),this.logger.log(`Sending: ${r.length} events,
346
+ To: ${this.Qn}
347
347
  Org: ${this.organizationID}
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+=`
348
+ SessionSecureID: ${this.sessionData.sessionSecureID}`);let s=g9();n?yield n({session_secure_id:this.sessionData.sessionSecureID,payload_id:(this.sessionData.payloadID++).toString(),events:{events:r},messages:ZW({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.Lr.postMessage({message:{type:ze.AsyncEvents,id:this.sessionData.payloadID++,events:r,messages:[],errors:[],resourcesString:JSON.stringify({resources:[]}),webSocketEventsString:JSON.stringify({webSocketEvents:[]}),hasSessionUnloaded:this.hasSessionUnloaded,highlightLogs:s}}),Fn(this.sessionData),this.events=this.events.slice(r.length),b9(s)})}takeFullSnapshot(){if(!this.sr){this.logger.log("skipping full snapshot as rrweb is not running");return}this.logger.log("taking full snapshot",{bytesSinceSnapshot:this.ii,lastSnapshotTime:this.yo}),je.takeFullSnapshot(),this.ii=0,this.yo=new Date().getTime()}register(e,n){this.yr.push(new Hu(e,n))}getHooks(e){return this.yr.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=$s(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.Xr)/1e3;return s.searchParams.set("ts",a.toString()),{url:o.toString(),urlWithTimestamp:s.toString(),sessionSecureID:e}}getFrontendUrl(){var e,n;let r=this.Qn.match(e2);if(r&&(e=r==null?void 0:r.groups)!=null&&e.domain){let i=(n=r.groups.domain)!=null?n:"";return`https://${qW[i]}${t2}`}return $W}},Qi=class extends C2{constructor(e,n){var r=(...f)=>(super(...f),K(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=Qt(j({},n),{organizationID:e,firstloadVersion:E9,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 Fh(f),n!=null&&n.manualStart||this.record.start(),An.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&&I9(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&&S9(n.integrations.amplitude)}catch(f){oe("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=w2(n.context),f=S2(n.context);(h=this.record)==null||h.identify(typeof f=="string"?f:(u=(l=f.user)==null?void 0:l.toString())!=null?u:p,Qt(j({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 Bw=Object.defineProperty,jw=Object.defineProperties,Qw=Object.getOwnPropertyDescriptors,lo=Object.getOwnPropertySymbols,Qp=Object.prototype.hasOwnProperty,$p=Object.prototype.propertyIsEnumerable,Sp=(t,e,n)=>e in t?Bw(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,$=(t,e)=>{for(var n in e||(e={}))Qp.call(e,n)&&Sp(t,n,e[n]);if(lo)for(var n of lo(e))$p.call(e,n)&&Sp(t,n,e[n]);return t},ce=(t,e)=>jw(t,Qw(e)),hl=(t,e)=>{var n={};for(var r in t)Qp.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&lo)for(var r of lo(t))e.indexOf(r)<0&&$p.call(t,r)&&(n[r]=t[r]);return n};function $w(t){return`/${t.replace(/~/g,"~0").replace(/\//g,"~1")}`}function qp(t){return t.indexOf("~")?t.replace(/~1/g,"/").replace(/~0/g,"~"):t}function qw(t){return(t.startsWith("/")?t.substring(1):t).split("/").map(e=>qp(e))}function tS(t){return!t.startsWith("/")}function eS(t){return!t.match(/\/\/|(^\/.*~[^0|^1])|~$/)}var $n=class{constructor(t,e=!1){if(e){let n=t;this.y=[n],this.isValid=n!=="",this.redactionName=n.startsWith("/")?$w(n):n}else{if(this.redactionName=t,t===""||t==="/"||!eS(t)){this.isValid=!1,this.y=[];return}tS(t)?this.y=[t]:t.indexOf("/",1)<0?this.y=[qp(t.slice(1))]:this.y=qw(t),this.y[0]==="_meta"?this.isValid=!1:this.isValid=!0}}get(t){let{y: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.y[t]}get depth(){return this.y.length}get isKind(){return this.y.length===1&&this.y[0]==="kind"}compare(t){return this.depth===t.depth&&this.y.every((e,n)=>e===t.getComponent(n))}get components(){return[...this.y]}};$n.InvalidReference=new $n("");var nS=class{is(t){if(Array.isArray(t))return!1;let e=typeof t;return e==="function"||e==="object"}getType(){return"factory method or object"}},er=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}},td=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}},ed=class extends er{constructor(t){super(`number with minimum value of ${t}`,0),this.min=t}is(t){return typeof t===this.typeOf&&t>=this.min}},nd=class extends er{constructor(t){super(`string matching ${t}`,""),this.expression=t}is(t){return typeof t=="string"&&!!t.match(this.expression)}},rS=class{is(t){return typeof t=="function"}getType(){return"function"}},iS=class{is(t){return typeof t=="boolean"||typeof t=="undefined"||t===null}getType(){return"boolean | undefined | null"}},oS=/^\d\d\d\d-\d\d-\d\dT\d\d:\d\d:\d\d(\.\d\d*)?(Z|[-+]\d\d(:\d\d)?)/,sS=class{is(t){return typeof t=="number"||typeof t=="string"&&oS.test(t)}getType(){return"date"}},aS=class extends nd{constructor(){super(/^(\w|\.|-)+$/)}is(t){return super.is(t)&&t!=="kind"}},lS=class{constructor(t){this.Zt=t}is(t){return typeof t=="string"&&this.Zt.includes(t)}getType(){return this.Zt.join(" | ")}};function Ue(t){return t==null}var N=class{static createTypeArray(t,e){return new td(t,e)}static numberWithMin(t){return new ed(t)}static stringMatchingRegex(t){return new nd(t)}static oneOf(...t){return new lS(t)}};N.String=new er("string","");N.Number=new er("number",0);N.ObjectOrFactory=new nS;N.Object=new er("object",{});N.StringArray=new td("string[]","");N.Boolean=new er("boolean",!0);N.Function=new rS;N.Date=new sS;N.Kind=new aS;N.NullableBoolean=new iS;function rd(t){return"kind"in t?N.String.is(t.kind)&&t.kind!=="multi":!1}function id(t){return"kind"in t?N.String.is(t.kind)&&t.kind==="multi":!1}function od(t){return!("kind"in t)||t.kind===null||t.kind===void 0}function co(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=>co(n,[...e,t])).map(n=>n===void 0?"null":n).join(",")}]`:`{${Object.keys(t).sort().map(n=>{let r=co(t[n],[...e,t]);if(r!==void 0)return`${JSON.stringify(n)}:${r}`}).filter(n=>n!==void 0).join(",")}}`}var nl="user";function Ip(t){return t.includes("%")||t.includes(":")?t.replace(/%/g,"%25").replace(/:/g,"%3A"):t}function cS(t){return t&&N.Object.is(t)}function Tp(t){return N.Kind.is(t)}function Ep(t){return N.String.is(t)&&t!==""}function _a(t,e=!1){return t?t.map(n=>new $n(n,e)):[]}function uS(t){return t!=null}function hS(t){let e=ce($({},t.custom||[]),{kind:"user",key:String(t.key)});if(uS(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 bn=class Et{constructor(e,n,r){this.P=!1,this.tt=!1,this.Xt=!1,this.M={},this.kind=n,this.valid=e,this.message=r}static D(e,n){return new Et(!1,e,n)}static $e(e,n){if(!(!n||!e.isValid))return e.depth===1&&e.getComponent(0)==="anonymous"?!!(n!=null&&n.anonymous):e.get(n)}Qt(e){if(this.P)return this.M[e];if(this.kind===e)return this.v}static Re(e){let n=Object.keys(e).filter(c=>c!=="kind"),r=n.every(Tp);if(!n.length)return Et.D("multi","A multi-kind context must contain at least one kind");if(!r)return Et.D("multi","Context contains invalid kinds");let i={},o=!0,s=n.reduce((c,l)=>{var u;let h=e[l];return cS(h)?(c[l]=h,i[l]=_a((u=h._meta)==null?void 0:u.privateAttributes)):o=!1,c},{});if(!o)return Et.D("multi","Context contained contexts that were not objects");if(!Object.values(s).every(c=>Ep(c.key)))return Et.D("multi","Context contained invalid keys");if(n.length===1){let c=n[0],l=new Et(!0,c);return l.v=ce($({},s[c]),{kind:c}),l.et=i,l.tt=c==="user",l}let a=new Et(!0,e.kind);return a.M=s,a.et=i,a.P=!0,a}static Ne(e){var n;let{key:r,kind:i}=e,o=Tp(i),s=Ep(r);if(!o)return Et.D(i!=null?i:"unknown","The kind was not valid for the context");if(!s)return Et.D(i,"The key for the context was not valid");let a=_a((n=e._meta)==null?void 0:n.privateAttributes),c=new Et(!0,i);return c.tt=i==="user",c.v=e,c.et={[i]:a},c}static Ue(e){if(!(e.key!==void 0&&e.key!==null))return Et.D("user","The key for the context was not valid");let n=new Et(!0,"user");return n.tt=!0,n.Xt=!0,n.v=hS(e),n.et={user:_a(e.privateAttributeNames,!0)},n}static fromLDContext(e){return e?rd(e)?Et.Ne(e):id(e)?Et.Re(e):od(e)?Et.Ue(e):Et.D("unknown","Context was not of a valid kind"):Et.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=nl){return e.isKind?this.kinds:Et.$e(e,this.Qt(n))}key(e=nl){var n;return(n=this.Qt(e))==null?void 0:n.key}get isMultiKind(){return this.P}get canonicalKey(){return this.tt?this.v.key:this.P?Object.keys(this.M).sort().map(e=>`${e}:${Ip(this.M[e].key)}`).join(":"):`${this.kind}:${Ip(this.v.key)}`}get kinds(){return this.P?Object.keys(this.M):[this.kind]}get kindsAndKeys(){return this.P?Object.entries(this.M).reduce((e,[n,r])=>(e[n]=r.key,e),{}):{[this.kind]:this.v.key}}privateAttributes(e){var n;return((n=this.et)==null?void 0:n[e])||[]}getContexts(){return this.P?Object.entries(this.M):[[this.kind,this.v]]}get legacy(){return this.Xt}canonicalUnfilteredJson(){if(this.valid){if(this.yt)return this.yt;try{this.yt=co(Et.toLDContext(this))}catch(e){}return this.yt}}};bn.UserKind=nl;var pS=["key","kind","_meta","anonymous"].map(t=>new $n(t,!0)),dS=["name","ip","firstName","lastName","email","avatar","country"];function fS(t,e){return t.depth===e.length&&e.every((n,r)=>n===t.getComponent(r))}function mS(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=>fS(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 yS=class{constructor(t,e){this.ze=t,this.je=e}filter(t,e=!1){let n=t.getContexts();if(n.length===1)return this.te(t,n[0][1],n[0][0],e);let r={kind:"multi"};return n.forEach(([i,o])=>{r[i]=this.te(t,o,i,e)}),r}Ts(t,e,n,r){return(r?Object.keys(e).map(i=>new $n(i,!0)):[...this.je,...t.privateAttributes(n)]).filter(i=>!pS.some(o=>o.compare(i)))}te(t,e,n,r){let i=this.ze||r&&e.anonymous===!0,{cloned:o,excluded:s}=mS(e,this.Ts(t,e,n,i));return t.legacy&&dS.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}},Rp=30*1e3,gS=.5,bS=class{constructor(t,e,n=Math.random){this.Ve=e,this.Be=n,this.gt=0,this.ee=Math.max(1,t),this.He=Math.ceil(Math.log2(Rp/this.ee))}x(){let t=Math.min(this.gt,this.He),e=this.ee*2**t;return Math.min(e,Rp)}Ge(t){return t-Math.trunc(this.Be()*gS*t)}success(t=Date.now()){this.vt=t}fail(t=Date.now()){this.vt!==void 0&&t-this.vt>this.Ve&&(this.gt=0),this.vt=void 0;let e=this.Ge(this.x());return this.gt+=1,e}},Cp;(function(t){t[t.Valid=0]="Valid",t[t.Initializing=1]="Initializing",t[t.Interrupted=2]="Interrupted",t[t.Closed=3]="Closed"})(Cp||(Cp={}));var uo=class extends Error{constructor(t,e,n,r=!0){super(e),this.kind=t,this.status=n,this.name="LaunchDarklyPollingError",this.recoverable=r}},rl=class extends Error{constructor(t,e,n,r=!0){super(e),this.kind=t,this.code=n,this.name="LaunchDarklyStreamingError",this.recoverable=r}},C9=120*1e3,k9=300*1e3,xt;(function(t){t.Unknown="UNKNOWN",t.NetworkError="NETWORK_ERROR",t.ErrorResponse="ERROR_RESPONSE",t.InvalidData="INVALID_DATA"})(xt||(xt={}));var ho;(function(t){t[t.Disabled=0]="Disabled",t[t.Enabled=1]="Enabled"})(ho||(ho={}));var qn;(function(t){t[t.AnalyticsEvents=0]="AnalyticsEvents",t[t.DiagnosticEvent=1]="DiagnosticEvent"})(qn||(qn={}));var gn;(function(t){t[t.Succeeded=0]="Succeeded",t[t.Failed=1]="Failed",t[t.FailedAndMustShutDown=2]="FailedAndMustShutDown"})(gn||(gn={}));function jn(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 vS(t){return typeof t=="symbol"?"NaN":typeof t=="bigint"?`${t}n`:String(Number(t))}function wS(t){return typeof t=="symbol"?"NaN":typeof t=="bigint"?`${t}n`:String(parseInt(t,10))}function SS(t){return typeof t=="symbol"?"NaN":String(parseFloat(t))}var Ha={s:t=>jn(t),d:t=>vS(t),i:t=>wS(t),f:t=>SS(t),j:t=>jn(t),o:t=>jn(t),O:t=>jn(t),c:()=>""};function il(...t){var e;let n=t.shift();if(N.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 Ha&&t.length){let a=t.shift();r+=(e=Ha[s])==null?void 0:e.call(Ha,a)}else s==="%"?r+="%":r+=`%${s}`;i+=2}}else r+=o,i+=1}return t.length&&(r.length&&(r+=" "),r+=t.map(jn).join(" ")),r}return t.map(jn).join(" ")}var Xt;(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"})(Xt||(Xt={}));var IS=["debug","info","warn","error","none"],pl=class sd{static get(){return new sd({})}constructor(e){var n,r,i;if(this.Qe=(r=Xt[(n=e.level)!=null?n:"info"])!=null?r:Xt.info,this.tn=(i=e.name)!=null?i:"LaunchDarkly",this.ae=e.formatter,typeof e.destination=="object")this.oe={[Xt.debug]:e.destination.debug,[Xt.info]:e.destination.info,[Xt.warn]:e.destination.warn,[Xt.error]:e.destination.error};else if(typeof e.destination=="function"){let{destination:o}=e;this.oe={[Xt.debug]:o,[Xt.info]:o,[Xt.warn]:o,[Xt.error]:o}}}en(...e){var n;try{return this.ae?(n=this.ae)==null?void 0:n.call(this,...e):il(...e)}catch(r){return il(...e)}}nn(e,n){try{e(n)}catch(r){console.error(n)}}S(e,n){var r;if(e>=this.Qe){let i=`${IS[e]}: [${this.tn}]`;try{let o=(r=this.oe)==null?void 0:r[e];o?this.nn(o,`${i} ${this.en(...n)}`):console.error(...n)}catch(o){console.error(...n)}}}error(...e){this.S(Xt.error,e)}warn(...e){this.S(Xt.warn,e)}info(...e){this.S(Xt.info,e)}debug(...e){this.S(Xt.debug,e)}},TS={error:N.Function,warn:N.Function,info:N.Function,debug:N.Function},ad=class{constructor(t,e){Object.entries(TS).forEach(([n,r])=>{if(!r.is(t[n]))throw new Error(`Provided logger instance must support logger.${n}(...) method`)}),this.t=t,this.rn=e}S(t,e){try{this.t[t](...e)}catch(n){this.rn[t](...e)}}error(...t){this.S("error",t)}warn(...t){this.S("warn",t)}info(...t){this.S("info",t)}debug(...t){this.S("debug",t)}},ld=t=>{let e=new pl({level:"info",destination:console.error,formatter:il});return t?new ad(t,e):e},Wt=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`}},ES=/^(\w|\.|-)+$/,RS=N.stringMatchingRegex(ES),CS={is:(t,e)=>RS.is(t)?t.length>64?{valid:!1,message:Wt.tagValueTooLong(e)}:{valid:!0}:{valid:!1,message:Wt.invalidTagValue(e)}},kS=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}=CS.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(" "))}},ZS=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 dl(t){return t.replace(/^\/+/,"").replace(/\?$/,"")}var tr=class cd{constructor(e,n,r=cd.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}};tr.DEFAULT_EVENTS="https://events.launchdarkly.com";function fl(t,e=[]){if(e.length===0)return t;let n=e.map(({key:r,value:i})=>`${r}=${i}`);return`${t}?${n.join("&")}`}function ud(t,e,n){let r=dl(e),i=[...n];return t.payloadFilterKey&&i.push({key:"filter",value:t.payloadFilterKey}),fl(`${t.streaming}/${r}`,i)}function hd(t,e,n=[]){let r=dl(e),i=[...n];return t.payloadFilterKey&&i.push({key:"filter",value:t.payloadFilterKey}),fl(`${t.polling}/${r}`,i)}function kp(t,e,n=[]){let r=dl(e);return fl(`${t.events}/${r}`,n)}var pd=class extends Error{constructor(t){super(t),this.name="LaunchDarklyUnexpectedResponseError"}},xS=class extends Error{constructor(t){super(t),this.name="LaunchDarklyClientError"}},dd=class extends Error{constructor(t){super(t),this.name="LaunchDarklyTimeoutError"}};function nr(t){return t>=400&&t<500?t===400||t===408||t===429:!0}function VS(t){return t===413?!0:nr(t)}function fd(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 dd(s))},t*1e3)}),cancel:()=>{r(),clearTimeout(n)}}}function md(t){return t==null?t:JSON.parse(JSON.stringify(t))}function Ba(t){return Math.trunc(t*1e3)}var OS=t=>JSON.stringify(t)==="{}",ml=(t,e)=>t&&Object.entries(t).reduce((n,[r,i])=>(i&&!OS(i)&&!(e!=null&&e.includes(r))&&(n[r]=typeof i=="object"?ml(i,e):i),n),{});function oo(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(!oo(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(!oo(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(!oo(t[o],e[o]))return!1}return!0}return t!==t&&e!==e}function NS(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 Ve(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 yl({status:t}){return t?nr(t):!0}var po=(t,e)=>e.btoa(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,""),gl=async(t=1e3)=>new Promise(e=>{setTimeout(e,t)}),GS=class{constructor(t,e,n){this.a=e,this.sn=n,this.bt=[],this.ce=Date.now(),this.ue=this.ce,this.le={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.le,creationDate:this.ce,sdk:r,configuration:this.sn,platform:$({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.le,creationDate:r,dataSinceDate:this.ue,droppedEvents:t,deduplicatedUsers:e,eventsInLastBatch:n,streamInits:this.bt};return this.bt=[],this.ue=r,i}},ol;(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"})(ol||(ol={}));var LS=ol,yd=class{static invalidMetricValue(t){return`The track function was called with a non-numeric "metricValue" (${t}), only numeric metric values are supported.`}};yd.MissingContextKeyNoEvent="Context was unspecified or had no key; event will not be sent";var XS=class{constructor(t,e){let{basicConfiguration:n,platform:r}=t,{serviceEndpoints:{analyticsEventPath:i,diagnosticEventPath:o}}=n,{crypto:s,requests:a}=r;this.an=$({},e),this.de=kp(n.serviceEndpoints,i,[]),this.cn=kp(n.serviceEndpoints,o,[]),this.z=a,this.un=s}async nt(t,e,n,r){let i={status:gn.Succeeded},o=ce($({},this.an),{"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.z.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 pd(Ve({status:a,message:"some events were dropped"},"event posting")),!nr(a))return VS(a)?i.status=gn.Failed:i.status=gn.FailedAndMustShutDown,i.error=s,i}catch(a){s=a}return s&&!r?(i.status=gn.Failed,i.error=s,i):(await gl(),this.nt(t,this.de,n,!1))}async sendEventData(t,e){let n=t===qn.AnalyticsEvents?this.un.randomUUID():void 0,r=t===qn.AnalyticsEvents?this.de:this.cn;return this.nt(e,r,n,!0)}};function fo(t){return t.kind==="feature"}function WS(t){return t.kind==="identify"}function MS(t){return t.kind==="migration_op"}var PS=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 US(t){return`${t.key}:${t.variation!==null&&t.variation!==void 0?t.variation:""}:${t.version!==null&&t.version!==void 0?t.version:""}`}var gd=class{constructor(t=!1,e){this.ln=t,this.k=e,this.K=0,this.it=0,this.rt={},this.st={}}summarizeEvent(t){if(fo(t)&&!t.excludeFromSummaries){this.v||(this.v=t.context);let e=US(t),n=this.rt[e],r=this.st[t.key];r||(r=new Set,this.st[t.key]=r),t.context.kinds.forEach(i=>r.add(i)),n?n.increment():this.rt[e]=new PS(1,t.key,t.value,t.default,t.version,t.variation),(this.K===0||t.creationDate<this.K)&&(this.K=t.creationDate),t.creationDate>this.it&&(this.it=t.creationDate)}}getSummary(){var t;let e=Object.values(this.rt).reduce((r,i)=>{let o=r[i.key];o||(o={default:i.default,counters:[],contextKinds:[...this.st[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.K,endDate:this.it,features:e,kind:"summary",context:this.v!==void 0&&this.ln?(t=this.k)==null?void 0:t.filter(this.v):void 0};return this.dn(),n}dn(){this.K=0,this.it=0,this.rt={},this.st={}}},FS=class extends Error{constructor(t){super(t),this.name="LaunchDarklyInvalidSDKKeyError"}},AS=class{constructor(t,e){this.k=t,this.t=e,this.W={}}summarizeEvent(t){var e;if(fo(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 gd(!0,this.k),r=this.W[n]),r.summarizeEvent(t)}}getSummaries(){let t=this.W;return this.W={},Object.values(t).map(e=>e.getSummary())}};function so(t){let e=Math.trunc(t);return e===1?!0:e===0?!1:Math.floor(Math.random()*e)===0}function DS(t){return t.getSummaries!==void 0}var JS=class{constructor(t,e,n,r,i,o=!0,s=!1){this.e=t,this.at=r,this.I=i,this.ot=[],this.he=0,this.Dt=0,this.St=0,this.kt=!1,this.fe=0,this.It=!1,this.Ct=null,this.hn=t.eventsCapacity,this.t=e.basicConfiguration.logger,this.pe=new XS(e,n),this.k=new yS(t.allAttributesPrivate,t.privateAttributes.map(a=>new $n(a))),s?this.J=new AS(this.k,this.t):this.J=new gd,o&&this.start()}start(){var t,e;if(((t=this.at)==null?void 0:t.flushInterval)!==void 0&&(this.Ct=setInterval(()=>{var n;(n=this.at)==null||n.flush()},this.at.flushInterval*1e3)),this.fn=setInterval(async()=>{var n;try{await this.flush()}catch(r){(n=this.t)==null||n.debug(`Flush failed: ${r}`)}},this.e.flushInterval*1e3),this.I){let n=this.I.createInitEvent();this.me(n),this.ye=setInterval(()=>{let r=this.I.createStatsEventAndReset(this.Dt,this.St,this.fe);this.Dt=0,this.St=0,this.me(r)},this.e.diagnosticRecordingInterval*1e3)}(e=this.t)==null||e.debug("Started EventProcessor.")}me(t){this.pe.sendEventData(qn.DiagnosticEvent,t)}close(){clearInterval(this.fn),this.Ct&&clearInterval(this.Ct),this.ye&&clearInterval(this.ye)}async flush(){var t;if(this.It)throw new FS("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.ot;if(this.ot=[],DS(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.fe=e.length,(t=this.t)==null||t.debug("Flushing %d events",e.length),await this.nt(e))}sendEvent(t){var e;if(this.It)return;if(MS(t)){if(so(t.samplingRatio)){let a=ce($({},t),{context:t.context?this.k.filter(t.context):void 0});a.samplingRatio===1&&delete a.samplingRatio,this.ct(a)}return}this.J.summarizeEvent(t);let n=fo(t),r=n&&t.trackEvents||!n,i=this.pn(t),o=WS(t),s=(e=this.at)==null?void 0:e.processContext(t.context);s||o||(this.St+=1),s&&!o&&this.ct(this.Pt({kind:"index",creationDate:t.creationDate,context:t.context,samplingRatio:1},!1)),r&&so(t.samplingRatio)&&this.ct(this.Pt(t,!1)),i&&so(t.samplingRatio)&&this.ct(this.Pt(t,!0))}Pt(t,e){switch(t.kind){case"feature":{let n={kind:e?"debug":"feature",creationDate:t.creationDate,context:this.k.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.k.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.k.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}}ct(t){var e;this.ot.length<this.hn?(this.ot.push(t),this.kt=!1):(this.kt||(this.kt=!0,(e=this.t)==null||e.warn("Exceeded event queue capacity. Increase capacity to avoid dropping events.")),this.Dt+=1)}pn(t){return fo(t)&&t.debugEventsUntilDate&&t.debugEventsUntilDate>this.he&&t.debugEventsUntilDate>Date.now()}async nt(t){let e=await this.pe.sendEventData(qn.AnalyticsEvents,t);if(e.status===gn.FailedAndMustShutDown&&(this.It=!0),e.serverTime&&(this.he=e.serverTime),e.error)throw e.error}},bd=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}},sl=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)}},vd=class{constructor(t,e=1){this.context=t,this.samplingRatio=e,this.kind="identify",this.creationDate=Date.now()}},YS=class{close(){}async flush(){}sendEvent(){}},KS=class{constructor(t){this.xt=t}evalEvent(t){var e;return new sl(this.xt,t.context,t.flagKey,t.value,t.defaultVal,t.version,(e=t.variation)!=null?e:void 0,t.trackEvents||t.addExperimentData,t.prereqOfFlagKey,this.xt||t.addExperimentData?t.reason:void 0,t.debugEventsUntilDate,t.excludeFromSummaries,t.samplingRatio)}unknownFlagEvent(t,e,n){return new sl(this.xt,n,t,e,e,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}identifyEvent(t){return new vd(t,1)}customEvent(t,e,n,r,i=1){return new bd(e,t,n!=null?n:void 0,r!=null?r:void 0,i)}},Zp="FDv1Fallback";function _S(t){return{mn:t,ge:"",useSelector(e){return this.ge=e,this},processFullTransfer(e){let n=[{event:"server-intent",data:{payloads:[{id:Zp,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:Zp}}),this.mn.processEvents(n)}}}var re={type:"none"};function wd(t,e){let n="inactive",r="partial",i=[];function o(g,b){var w;return(w=t[g])==null?void 0:w.call(t,b)}function s(){n="inactive",r="partial",i=[]}function a(){n="changes",r="partial",i=[]}function c(){i=[]}function l(g){return Ue(g.target)?(e==null||e.warn(`Ignoring 'none' intent with missing fields: target=${g.target}`),re):{type:"payload",payload:{version:g.target,type:"none",updates:[]}}}function u(g){var b;if(!((b=g.payloads)!=null&&b.length))return{type:"error",kind:"MISSING_PAYLOAD",message:"No payload present in server-intent"};let w=g.payloads[0];switch(w==null?void 0:w.intentCode){case"xfer-full":return n="full",i=[],r="full",re;case"xfer-changes":return n="changes",i=[],r="partial",re;case"none":return n="changes",i=[],r="partial",l(w);default:return e==null||e.warn(`Unable to process intent code '${w==null?void 0:w.intentCode}'.`),re}}function h(g){if(n==="inactive")return e==null||e.warn("Received put-object before server-intent was established. Ignoring."),re;if(!g.kind||!g.key||Ue(g.version)||!g.object)return e==null||e.warn(`Ignoring put-object with missing fields: kind=${g.kind}, key=${g.key}, version=${g.version}`),re;let b=o(g.kind,g.object);return b?(i.push({kind:g.kind,key:g.key,version:g.version,object:b}),re):(e==null||e.warn(`Unable to process object for kind: '${g.kind}'`),re)}function p(g){return n==="inactive"?(e==null||e.warn("Received delete-object before server-intent was established. Ignoring."),re):!g.kind||!g.key||Ue(g.version)?(e==null||e.warn(`Ignoring delete-object with missing fields: kind=${g.kind}, key=${g.key}, version=${g.version}`),re):(i.push({kind:g.kind,key:g.key,version:g.version,deleted:!0}),re)}function f(g){if(n==="inactive")return{type:"error",kind:"PROTOCOL_ERROR",message:"A payload transferred has been received without an intent having been established."};if(Ue(g.state)||Ue(g.version))return e==null||e.warn(`Ignoring payload-transferred with missing fields: state=${g.state}, version=${g.version}`),s(),re;let b={type:"payload",payload:{version:g.version,state:g.state,type:r,updates:i}};return a(),b}function m(g){return e==null||e.info(`Goodbye was received from the LaunchDarkly connection with reason: ${g.reason}.`),s(),{type:"goodbye",reason:g.reason}}function d(g){return e==null||e.info(`An issue was encountered receiving updates with reason: ${g.reason}.`),c(),{type:"serverError",id:g.payload_id,reason:g.reason}}return{get state(){return n},processEvent(g){switch(g.event){case"server-intent":return u(g.data);case"put-object":return h(g.data);case"delete-object":return p(g.data);case"payload-transferred":return f(g.data);case"goodbye":return m(g.data);case"error":return d(g.data);case"heart-beat":return re;default:return{type:"error",kind:"UNKNOWN_EVENT",message:`Received an unknown event of type '${g.event}'`}}},reset(){s()}}}function HS(t){return t==="MISSING_PAYLOAD"||t==="PROTOCOL_ERROR"}var Sd=class{constructor(t,e,n){this.m=e,this.t=n,this.n=[],this.yn=wd(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.yn.processEvent(e);switch(i.type){case"payload":this.n.forEach(o=>o(i.payload));break;case"error":HS(i.kind)?(n=this.m)==null||n.call(this,xt.InvalidData,i.message):(r=this.t)==null||r.warn(i.message);break}})}},zS=class{constructor(t,e,n,r){this.m=n,this.t=r,this._(t,"server-intent"),this._(t,"put-object"),this._(t,"delete-object"),this._(t,"payload-transferred"),this._(t,"goodbye"),this._(t,"error"),this.Lt=new Sd(e,n,r)}addPayloadListener(t){this.Lt.addPayloadListener(t)}removePayloadListener(t){this.Lt.removePayloadListener(t)}_(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.Lt.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,xt.InvalidData,"Malformed data in EventStream.")}}else(a=this.m)==null||a.call(this,xt.Unknown,"Event from EventStream missing data.")})}};function BS(t){if(t){let e=Object.keys(t).find(n=>n.toLowerCase()==="x-ld-envid");if(e)return{environmentId:t[e]}}}var xp="unknown plugin";function mo(t,e){try{return e.getMetadata().name||xp}catch(n){return t.error("Exception thrown getting metadata for plugin. Unable to get plugin name."),xp}}function jS(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 ${mo(t,i)} returned undefined from getHooks.`):s&&s.length>0&&r.push(...s)}catch(s){t.error(`Exception thrown getting hooks for plugin ${mo(t,i)}. Unable to get hooks.`)}}),r}function QS(t,e,n,r){r.forEach(i=>{try{i.register(n,e)}catch(o){t.error(`Exception thrown registering plugin ${mo(t,i)}.`)}})}var le=Object.freeze({__proto__:null,ClientMessages:yd,DiagnosticsManager:GS,ErrorKinds:LS,EventFactoryBase:KS,EventProcessor:JS,FDv1PayloadAdaptor:_S,InputCustomEvent:bd,InputEvalEvent:sl,InputIdentifyEvent:vd,NullEventProcessor:YS,PayloadProcessor:Sd,PayloadStreamReader:zS,canonicalize:co,createProtocolHandler:wd,initMetadataFromHeaders:BS,isLegacyUser:od,isMultiKind:id,isSingleKind:rd,safeGetHooks:jS,safeGetName:mo,safeRegisterPlugins:QS,shouldSample:so}),Vp={Initializing:"INITIALIZING",Valid:"VALID",Interrupted:"INTERRUPTED",SetOffline:"SET_OFFLINE",Closed:"CLOSED"};function $S(t){return t>=200&&t<=299}var Op=class extends Error{constructor(t,e){super(t),this.status=e,this.name="LaunchDarklyRequestError"}};function al(t,e,n,r,i,o,s,a,c,l){let u,h="GET",p=$({},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=hd(e,f,m);return{async requestPayload(){let g;try{let b=await r.fetch(d,{method:h,headers:p,body:u});if($S(b.status))return await b.text();g=b.status}catch(b){throw new Op(b==null?void 0:b.message)}throw new Op(`Unexpected status code: ${g}`,g)}}}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 qS(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 tI(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=qS(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 Id(t){return"validate"in t}function go(t,e,n,r,i){let o=$({},n);return Ue(t)?o:N.Object.is(t)?(Object.entries(t).forEach(([s,a])=>{let c=e[s],l=i?`${i}.${s}`:s;if(!c){r==null||r.warn(Wt.unknownOption(l));return}if(Ue(a))return;if(Id(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(Wt.wrongOptionTypeBoolean(l,typeof a)),o[s]=!!a):u==="boolean | undefined | null"?(r==null||r.warn(Wt.wrongOptionTypeBoolean(l,typeof a)),typeof a!="boolean"&&typeof a!="undefined"&&a!==null&&(o[s]=!!a)):c instanceof ed&&N.Number.is(a)?(r==null||r.warn(Wt.optionBelowMinimum(l,a,c.min)),o[s]=c.min):r==null||r.warn(Wt.wrongOptionType(l,u,typeof a))}),o):(r==null||r.warn(Wt.wrongOptionType(i!=null?i:"config","object",typeof t)),o)}function tn(t,e){var n;let r=e==null?void 0:e.defaults;return{is:(n=e==null?void 0:e.is)!=null?n:(i=>N.Object.is(i)),getType:()=>"object",validate(i,o,s,a){if(!N.Object.is(i)){s==null||s.warn(Wt.wrongOptionType(o,"object",typeof i));return}let c=r!=null?r:N.Object.is(a)?a:{},l=go(i,t,c,s,o);return Object.keys(l).length>0?{value:l}:void 0}}}function Td(t,e){return{is:n=>Array.isArray(n),getType:()=>"array",validate(n,r,i){if(!Array.isArray(n)){i==null||i.warn(Wt.wrongOptionType(r,"array",typeof n));return}let o=[];return n.forEach((s,a)=>{let c=`${r}[${a}]`;if(Ue(s)||!N.Object.is(s)){i==null||i.warn(Wt.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(Wt.wrongOptionType(`${c}.${t}`,p,f));return}o.push(go(l,h,{},i,c))}),{value:o}}}}function eI(...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 Id(o)?o.validate(e,n,r,i):{value:e};r==null||r.warn(Wt.wrongOptionType(n,this.getType(),typeof e))}}}function nI(t,e,n){let r=n==null?void 0:n.defaults;return{is:i=>N.Object.is(i),getType:()=>"object",validate(i,o,s,a){if(Ue(i))return;if(!N.Object.is(i)){s==null||s.warn(Wt.wrongOptionType(o,"object",typeof i));return}let c=i,l={},u={};Object.keys(c).forEach(p=>{t.is(p)?(l[p]=c[p],u[p]=e):s==null||s.warn(Wt.wrongOptionType(o,t.getType(),p))});let h=r!=null?r:N.Object.is(a)?a:{};return{value:go(l,u,h,s,o)}}}}var Gp=300,Lp=3600,bl=N.oneOf("cache","polling","streaming"),vl=N.oneOf("streaming","polling","offline","one-shot","background"),wl={pollingBaseUri:N.String,streamingBaseUri:N.String},rI={type:bl},Ed={type:bl,pollInterval:N.numberWithMin(30),endpoints:tn(wl)},Rd={type:bl,initialReconnectDelay:N.numberWithMin(1),endpoints:tn(wl)},iI=Td("type",{cache:rI,polling:Ed,streaming:Rd}),oI=Td("type",{polling:Ed,streaming:Rd}),sI={pollInterval:N.numberWithMin(30),endpoints:tn(wl)},aI={initializers:iI,synchronizers:oI,fdv1Fallback:tn(sI)},ao={streaming:{initializers:[{type:"cache"},{type:"polling"}],synchronizers:[{type:"streaming"},{type:"polling"}],fdv1Fallback:{pollInterval:Gp}},polling:{initializers:[{type:"cache"}],synchronizers:[{type:"polling"}],fdv1Fallback:{pollInterval:Gp}},offline:{initializers:[{type:"cache"}],synchronizers:[]},"one-shot":{initializers:[{type:"cache"},{type:"polling"},{type:"streaming"}],synchronizers:[]},background:{initializers:[{type:"cache"}],synchronizers:[{type:"polling",pollInterval:Lp}],fdv1Fallback:{pollInterval:Lp}}},lI=nI(vl,tn(aI));function Xp(t,e){return N.Object.is(t)&&t.type===e}var cI={type:N.oneOf("automatic"),lifecycle:N.Boolean,network:N.Boolean},uI={type:N.oneOf("manual"),initialConnectionMode:vl},hI={backgroundConnectionMode:vl,automaticModeSwitching:eI(N.Boolean,tn(cI,{is:t=>Xp(t,"automatic")}),tn(uI,{is:t=>Xp(t,"manual")})),connectionModes:lI},Wp={foregroundConnectionMode:"one-shot",backgroundConnectionMode:void 0,automaticModeSwitching:!1};function pI(t){return typeof t=="object"&&t!==null&&"type"in t&&t.type==="manual"}function dI(t,e){var n;return pI(t.automaticModeSwitching)?t.automaticModeSwitching.initialConnectionMode:(n=t.foregroundConnectionMode)!=null?n:e.foregroundConnectionMode}function fI(t){return{logger:N.Object,maxCachedContexts:N.numberWithMin(0),baseUri:N.String,streamUri:N.String,eventsUri:N.String,capacity:N.numberWithMin(1),diagnosticRecordingInterval:N.numberWithMin(2),flushInterval:N.numberWithMin(2),streamInitialReconnectDelay:N.numberWithMin(0),allAttributesPrivate:N.Boolean,debug:N.Boolean,diagnosticOptOut:N.Boolean,withReasons:N.Boolean,sendEvents:N.Boolean,pollInterval:N.numberWithMin(30),useReport:N.Boolean,privateAttributes:N.StringArray,disableCache:N.Boolean,applicationInfo:N.Object,wrapperName:N.String,wrapperVersion:N.String,payloadFilterKey:N.stringMatchingRegex(/^[a-zA-Z0-9](\w|\.|-)*$/),hooks:N.createTypeArray("Hook[]",{}),inspectors:N.createTypeArray("LDInspection",{}),cleanOldPersistentData:N.Boolean,dataSystem:t!=null&&t.dataSystemDefaults?tn(hI,{defaults:ce($({},t.dataSystemDefaults),{connectionModes:ao})}):N.Object}}var mI=300,Cd="https://clientsdk.launchdarkly.com",kd="https://clientstream.launchdarkly.com";function yI(t){return t instanceof ad?t:ld(t)}var gI=class{constructor(t={},e={getImplementationHooks:()=>[],credentialType:"mobileKey"}){var n,r,i;this.logger=ld(),this.baseUri=Cd,this.eventsUri=tr.DEFAULT_EVENTS,this.streamUri=kd,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=mI,this.hooks=[],this.inspectors=[],this.logger=yI(t.logger);let o=fI({dataSystemDefaults:e.dataSystemDefaults}),s=go(t,o,{},this.logger);Object.entries(s).forEach(([a,c])=>{a!=="logger"&&(this[a]=c)}),this.serviceEndpoints=new tr(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 kS({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 Sl(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 Zd=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 xd(t){return async e=>Sl(t.createHash("sha256").update(e),"base64")}var xe=async t=>t;async function Ar(t){return(await Promise.all(t.map(e=>e.transform(e.value)))).join("_")}async function Vd(t,e){return Ar([{value:"LaunchDarkly",transform:xe},{value:e,transform:xd(t)}])}async function bI(t){return Ar([{value:"LaunchDarkly",transform:xe},{value:"AnonymousKeys",transform:xe},{value:t,transform:xe}])}async function vI(t){return Ar([{value:"LaunchDarkly",transform:xe},{value:"ContextKeys",transform:xe},{value:t,transform:xe}])}async function wI(t){return Ar([{value:t,transform:xe},{value:"ContextIndex",transform:xe}])}async function Il(t,e,n){return Ar([{value:e,transform:xe},{value:n.canonicalKey,transform:xd(t)}])}var{isLegacyUser:SI,isSingleKind:ja,isMultiKind:Mp}=le,Od="1.0",II=t=>{let e=t,{kind:n}=e,r=hl(e,["kind"]);return{kind:"multi",[n]:r}},TI=async({crypto:t,info:e},{applicationInfo:n})=>{var r;let{ld_application:i}=e.platformData(),o=(r=ml(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=$($($(ce($({},o),{id:s}),a?{version:a}:{}),c?{name:c}:{}),l?{versionName:l}:{}),o.key=await Sl(t.createHash("sha256").update(s),"base64"),o.envAttributesVersion=o.envAttributesVersion||Od,o}},EI=async t=>{var e,n,r,i;let{ld_device:o,os:s}=t.info.platformData(),a=(e=ml(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=$($($({},c?{name:c}:{}),l?{version:l}:{}),u?{family:u}:{})),Object.keys(a).filter(h=>h!=="key"&&h!=="envAttributesVersion").length){let h=await vI("ld_device");return a.key=await Zd(h,t),a.envAttributesVersion=a.envAttributesVersion||Od,a}},RI=async(t,e,n)=>{if(SI(t))return t;let r,i;if(ja(t)&&t.kind!=="ld_application"||Mp(t)&&!t.ld_application?r=await TI(e,n):n.logger.warn("Not adding ld_application environment attributes because it already exists."),ja(t)&&t.kind!=="ld_device"||Mp(t)&&!t.ld_device?i=await EI(e):n.logger.warn("Not adding ld_device environment attributes because it already exists."),r||i){let o=ja(t)?II(t):t;return $($($({},o),r?{ld_application:r}:{}),i?{ld_device:i}:{})}return t};function CI(){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:kI,isMultiKind:ZI,isSingleKind:xI}=le,Tl=async(t,e,n)=>{let{anonymous:r,key:i}=e;if(r&&!i){let o=await bI(t);e.key=await Zd(o,n)}},VI=async(t,e)=>{await Tl(t.kind,t,e)},OI=async(t,e)=>{let n=t,{kind:r}=n,i=hl(n,["kind"]);return Promise.all(Object.entries(i).map(([o,s])=>Tl(o,s,e)))},NI=async(t,e)=>{await Tl("user",t,e)},GI=async(t,e)=>{let n=md(t);return xI(n)&&await VI(n,e),ZI(n)&&await OI(n,e),kI(n)&&await NI(n,e),n},LI=t=>({customBaseURI:t.serviceEndpoints.polling!==Cd,customStreamURI:t.serviceEndpoints.streaming!==kd,customEventsURI:t.serviceEndpoints.events!==tr.DEFAULT_EVENTS,eventsCapacity:t.capacity,eventsFlushIntervalMillis:Ba(t.flushInterval),reconnectTimeMillis:Ba(t.streamInitialReconnectDelay),diagnosticRecordingIntervalMillis:Ba(t.diagnosticRecordingInterval),allAttributesPrivate:t.allAttributesPrivate,usingSecureMode:!1,bootstrapMode:!1}),XI=(t,e,n)=>{if(e.sendEvents&&!e.diagnosticOptOut)return new le.DiagnosticsManager(t,n,LI(e))};function Pp(t,e){return{value:e!=null?e:null,variationIndex:null,reason:{kind:"ERROR",errorKind:t}}}function Up(t,e,n){return $({value:t,variationIndex:e!=null?e:null},n!==void 0&&{reason:n})}var WI=(t,e,n,r,i)=>{if(e.sendEvents)return new le.EventProcessor(ce($({},e),{eventsCapacity:e.capacity}),new ZS(t,e,n),r,void 0,i,!1,!0)},Fp=class extends le.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})}},ll="_freshness";async function Nd(t,e){let n=e.canonicalUnfilteredJson();if(n)return Sl(t.createHash("sha256").update(n),"base64")}async function MI(t,e,n,r,i){let o=await Il(e,n,r),s=await t.get(`${o}${ll}`);if(s!=null)try{let a=JSON.parse(s),c=await Nd(e,r);return c===void 0||a.contextHash!==c?void 0:typeof a.timestamp=="number"&&!Number.isNaN(a.timestamp)?a.timestamp:void 0}catch(a){i==null||i.warn(`Could not read freshness data from persistent storage: ${a.message}`);return}}function PI(t){return t!==null&&typeof t=="object"&&typeof t.version=="number"}async function Gd(t,e,n,r,i){let o=await Il(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])=>!PI(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 Qa=class Ld{constructor(){this.container={index:new Array}}static fromJson(e){let n=new Ld;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)):[]}},UI=class{constructor(t,e,n,r,i,o,s,a=()=>Date.now()){this.a=t,this.Ot=e,this.ut=n,this.ve=r,this.T=i,this.g=o,this.t=s,this.gn=a,this.we=wI(this.Ot)}async init(t,e){this.g.init(t,e),await this.Tt(t)}async upsert(t,e,n){return this.g.upsert(t,e,n)?(await this.Tt(t),!0):!1}async applyChanges(t,e,n){this.g.applyChanges(t,e,n),await this.Tt(t)}async loadCached(t){if(this.ve||this.ut<=0||!this.a.storage)return!1;let e=await Gd(this.a.storage,this.a.crypto,this.Ot,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.g.initCached(t,n),this.t.debug("Loaded cached flag evaluations from persistent storage"),!0}async vn(t,e,n){var r;let i=await Nd(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}${ll}`,JSON.stringify(o)))}async wn(){var t;if(this.V!==void 0)return this.V;let e=await((t=this.a.storage)==null?void 0:t.get(await this.we));if(!e)return this.V=new Qa,this.V;try{this.V=Qa.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.V=new Qa}return this.V}async Tt(t){var e,n;if(this.ve)return;let r=this.gn(),i=await this.wn(),o=await Il(this.a.crypto,this.Ot,t);this.ut>0&&i.notice(o,r);let s=i.prune(this.ut),a=this.ut<=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}${ll}`)]})),await((e=this.a.storage)==null?void 0:e.set(await this.we,i.toJson())),a)return;let c=this.T.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.vn(o,t,r)}catch(h){this.t.warn(`Failed to store freshness data: ${h.message}`)}}};function FI(){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 Ap(t,e){let n=[];return Object.entries(t).forEach(([r,i])=>{let o=e[r];(!o||!oo(i,o))&&n.push(r)}),Object.keys(e).forEach(r=>{t[r]||n.push(r)}),n}function AI(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=Ap(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=Ap(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 DI=class{constructor(t,e,n,r,i,o=()=>Date.now()){this.T=FI(),this.g=AI(this.T,i),this.lt=this.En(t,e,n,r,i,o)}async En(t,e,n,r,i,o=()=>Date.now()){let s=await Vd(t.crypto,e);return new UI(t,s,n,r,this.T,this.g,i,o)}get(t){return this.r&&Object.prototype.hasOwnProperty.call(this.r,t)?this.At(this.r[t]):this.T.get(t)}getAll(){return this.r?$($({},this.T.getAll()),Object.entries(this.r).reduce((t,[e,n])=>(t[e]=this.At(n),t),{})):this.T.getAll()}presetFlags(t){this.T.init(t)}setBootstrap(t,e){this.g.init(t,e)}async init(t,e){return(await this.lt).init(t,e)}async upsert(t,e,n){return(await this.lt).upsert(t,e,n)}async loadCached(t){return(await this.lt).loadCached(t)}async applyChanges(t,e,n){return(await this.lt).applyChanges(t,e,n)}on(t){this.g.on(t)}off(t){this.g.off(t)}At(t){return{flag:{value:t,version:0},version:0}}setOverride(t,e){this.r||(this.r={}),this.r[t]=e,this.g.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.g.handleFlagChanges([t],"override"))}clearAllOverrides(){if(this.r){let t=$({},this.r);this.r=void 0,this.g.handleFlagChanges(Object.keys(t),"override")}}getAllOverrides(){if(!this.r)return{};let t={};return Object.entries(this.r).forEach(([e,n])=>{t[e]=this.At(n)}),t}getDebugOverride(){return{setOverride:this.setOverride.bind(this),removeOverride:this.removeOverride.bind(this),clearAllOverrides:this.clearAllOverrides.bind(this),getAllOverrides:this.getAllOverrides.bind(this)}}},Dp="unknown hook",Xd="beforeEvaluation",Wd="afterEvaluation",JI="afterTrack";function Dr(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 Jr(t,e){try{return e.getMetadata().name||Dp}catch(n){return t.error("Exception thrown getting metadata for hook. Unable to get hook name."),Dp}}function YI(t,e,n){return e.map(r=>Dr(t,Xd,Jr(t,r),()=>{var i,o;return(o=(i=r==null?void 0:r.beforeEvaluation)==null?void 0:i.call(r,n,{}))!=null?o:{}},{}))}function KI(t,e,n,r,i){for(let o=e.length-1;o>=0;o-=1){let s=e[o],a=r[o];Dr(t,Wd,Jr(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 _I(t,e,n){return e.map(r=>Dr(t,Xd,Jr(t,r),()=>{var i,o;return(o=(i=r==null?void 0:r.beforeIdentify)==null?void 0:i.call(r,n,{}))!=null?o:{}},{}))}function HI(t,e,n,r,i){for(let o=e.length-1;o>=0;o-=1){let s=e[o],a=r[o];Dr(t,Wd,Jr(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 zI(t,e,n){for(let r=e.length-1;r>=0;r-=1){let i=e[r];Dr(t,JI,Jr(t,i),()=>{var o;return(o=i==null?void 0:i.afterTrack)==null?void 0:o.call(i,n)},void 0)}}var BI=class{constructor(t,e){this.t=t,this.F=[],this.F.push(...e)}withEvaluation(t,e,n,r){if(this.F.length===0)return r();let i=[...this.F],o={flagKey:t,context:e,defaultValue:n},s=YI(this.t,i,o),a=r();return KI(this.t,i,o,s,a),a}identify(t,e){let n=[...this.F],r={context:t,timeout:e},i=_I(this.t,n,r);return o=>{HI(this.t,n,r,i,o)}}addHook(t){this.F.push(t)}afterTrack(t){if(this.F.length===0)return;let e=[...this.F];zI(this.t,e,t)}};function jI(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 QI(t,e){return`an inspector: "${e}" of an invalid type (${t}) was configured`}function $I(t,e){return`an inspector: "${e}" of type: "${t}" generated an exception`}function qI(t,e){let n=!1,r={method:(...i)=>{try{t.method(...i)}catch(o){n||(n=!0,e.warn($I(r.type,r.name)))}},type:t.type,name:t.name,synchronous:t.synchronous};return r}var Md="flag-used",Pd="flag-details-changed",Ud="flag-detail-changed",Fd="client-identity-changed",tT=[Md,Pd,Ud,Fd];function eT(t,e){let n=tT.includes(t.type)&&t.method&&typeof t.method=="function";return n||e.warn(QI(t.type,t.name)),n}var nT=class{constructor(t,e){this.B=[];let n=t.filter(r=>eT(r,e));this.B=n.map(r=>qI(r,e))}hasInspectors(){return this.B.length!==0}onFlagUsed(t,e,n){this.B.forEach(r=>{r.type===Md&&r.method(t,e,n)})}onFlagsChanged(t){this.B.forEach(e=>{e.type===Pd&&e.method(t)})}onFlagChanged(t,e){this.B.forEach(n=>{n.type===Ud&&n.method(t,e)})}onIdentityChanged(t){this.B.forEach(e=>{e.type===Fd&&e.method(t)})}},rT=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)}}bn(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.bn(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 iT(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:Jp,ErrorKinds:Yp}=le,oT=5,sT=class{constructor(t,e,n,r,i,o){var s;if(this.sdkKey=t,this.autoEnvAttributes=e,this.platform=n,this.u=CI(),this.Mt=15,this.A=new Fp(!1),this.dt=new Fp(!0),this.Ft=!1,this.Dn=tI(),!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 gI(r,o),this.logger=this.e.logger,this.Ee=NS(this.sdkKey,this.platform.info,this.e.tags,this.e.serviceEndpoints.includeAuthorizationHeader,this.e.userAgentHeaderName),this.$=new DI(this.platform,t,this.e.maxCachedContexts,(s=this.e.disableCache)!=null?s:!1,this.e.logger),this.I=XI(t,this.e,n),this.E=WI(t,this.e,n,this.Ee,this.I),this.emitter=new rT,this.emitter.on("error",(c,l)=>{this.logger.error(`error: ${l}, context: ${JSON.stringify(c)}`)}),this.$.on((c,l,u)=>{this.Sn(l,u);let h=bn.toLDContext(c);this.emitter.emit("change",h,l),l.forEach(p=>{this.emitter.emit(`change:${p}`,h)})}),this.dataManager=i(this.$,this.e,this.Ee,this.emitter,this.I);let a=[...this.e.hooks];if(this.environmentMetadata=iT(this.sdkKey,this.platform,this.e),this.e.getImplementationHooks(this.environmentMetadata).forEach(c=>{a.push(c)}),this.R=new BI(this.logger,a),this.Y=new nT(this.e.inspectors,this.logger),this.Y.hasInspectors()&&this.R.addHook(jI(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.$.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()?md(this.u.getUnwrappedContext()):void 0}getInternalContext(){return this.u.getContext()}presetFlags(t){this.$.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 dd(`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:oT,o=(e==null?void 0:e.timeout)===void 0&&(e==null?void 0:e.noTimeout)===!0;i>this.Mt&&this.logger.warn(`The identify function was called with a timeout greater than ${this.Mt} seconds. We recommend a timeout of less than ${this.Mt} seconds.`);let s=this.Dn.execute({before:async()=>{let c=await GI(t,this.platform);this.autoEnvAttributes===ho.Enabled&&(c=await RI(c,this.platform,this.e));let l=bn.fromLDContext(c);if(l.valid){let u=this.R.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.A.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=fd(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(Jp.MissingContextKeyNoEvent);return}n!==void 0&&!N.Number.is(n)&&((r=this.logger)==null||r.warn(Jp.invalidMetricValue(typeof n))),(i=this.E)==null||i.sendEvent(this.e.trackEventModifier(this.A.customEvent(t,this.u.getContext(),e,n))),this.R.afterTrack({key:t,context:this.u.getUnwrappedContext(),data:e,metricValue:n})}ht(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.$.get(t);if(h===void 0||h.flag.deleted){let b=e!=null?e:null;return(o=this.logger)==null||o.warn(`Unknown feature flag "${t}"; returning default value ${b}.`),l&&((s=this.E)==null||s.sendEvent(this.A.unknownFlagEvent(t,b,u))),Pp(Yp.FlagNotFound,e)}let{reason:p,value:f,variation:m,prerequisites:d}=h.flag;if(r){let[b,w]=r(f);if(!b){l&&((a=this.E)==null||a.sendEvent(n.evalEventClient(t,e,e,h.flag,u,p)));let E=new xS(`Wrong type "${w}" for feature flag "${t}"; returning default value`);return this.emitter.emit("error",this.u.getUnwrappedContext(),E),Pp(Yp.WrongType,e)}}let g=Up(f,m,p);return f==null&&(this.logger.debug("Result value is null. Providing default value."),g.value=e),d==null||d.forEach(b=>{this.ht(b,void 0,this.A)}),l&&((c=this.E)==null||c.sendEvent(n.evalEventClient(t,f,e,h.flag,u,p))),g}variation(t,e){let{value:n}=this.R.withEvaluation(t,this.u.getUnwrappedContext(),e,()=>this.ht(t,e,this.A));return n}variationDetail(t,e){return this.R.withEvaluation(t,this.u.getUnwrappedContext(),e,()=>this.ht(t,e,this.dt))}H(t,e,n,r){return this.R.withEvaluation(t,this.u.getUnwrappedContext(),e,()=>this.ht(t,e,n,r))}boolVariation(t,e){return this.H(t,e,this.A,n=>[N.Boolean.is(n),N.Boolean.getType()]).value}jsonVariation(t,e){return this.variation(t,e)}numberVariation(t,e){return this.H(t,e,this.A,n=>[N.Number.is(n),N.Number.getType()]).value}stringVariation(t,e){return this.H(t,e,this.A,n=>[N.String.is(n),N.String.getType()]).value}boolVariationDetail(t,e){return this.H(t,e,this.dt,n=>[N.Boolean.is(n),N.Boolean.getType()])}numberVariationDetail(t,e){return this.H(t,e,this.dt,n=>[N.Number.is(n),N.Number.getType()])}stringVariationDetail(t,e){return this.H(t,e,this.dt,n=>[N.String.is(n),N.String.getType()])}jsonVariationDetail(t,e){return this.variationDetail(t,e)}addHook(t){this.R.addHook(t)}setEventSendingEnabled(t,e){var n,r,i,o;this.Ft!==t&&(this.Ft=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.Ft||((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.$).getDebugOverride)==null?void 0:e.call(t)}Sn(t,e){if(!this.Y.hasInspectors())return;let n={};t.forEach(r=>{let i=this.$.get(r);if(i!=null&&i.flag&&!i.flag.deleted){let{reason:o,value:s,variation:a}=i.flag;n[r]=Up(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 aT(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 ${le.safeGetName(t,r)}.`)}})}function Ad(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=$({value:e[a]},o[a]):c={value:e[a],version:0},s[a]={version:c.version,flag:c}}}),s}function Kp(t){return{polling:()=>({pathGet(e,n){return`/sdk/evalx/${t}/contexts/${po(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}/${po(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 lT(){return{polling:()=>({pathGet(t,e){return`/sdk/poll/eval/${po(e,t)}`},pathReport(t,e){throw new Error("Report for FDv2 unsupported.")},pathPost(t,e){return"/sdk/poll/eval"},pathPing(t,e){throw new Error("Ping for polling unsupported.")}}),streaming:()=>({pathGet(t,e){return`/sdk/stream/eval/${po(e,t)}`},pathReport(t,e){throw new Error("Report for FDv2 unsupported.")},pathPost(t,e){return"/sdk/stream/eval"},pathPing(t,e){throw new Error("Ping for streaming unsupported.")}})}}function cT(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:ce($({},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 Dd(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 _p(t){t==null||t.debug("Poll completed after the processor was closed. Skipping processing.")}var uT=class{constructor(t,e,n,r,i){this.kn=t,this.In=e,this.Cn=n,this.m=r,this.t=i,this.h=!1}async be(){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 uo(xt.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){_p(this.t);return}let p=JSON.parse(h);try{(e=this.Cn)==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){_p(this.t);return}let p=h;if(p.status!==void 0&&!nr(p.status)){(r=this.t)==null||r.error(Ve(h,"polling request")),(i=this.m)==null||i.call(this,new uo(xt.ErrorResponse,p.message,p.status));return}(o=this.t)==null||o.error(Ve(h,"polling request","will retry"))}let l=Date.now()-c,u=Math.max(this.In*1e3-l,0);(s=this.t)==null||s.debug("Elapsed: %d ms, sleeping for %d ms",l,u),this.$t=setTimeout(()=>{this.be()},u)}start(){this.be()}stop(){this.$t&&(clearTimeout(this.$t),this.$t=void 0),this.h=!0}close(){this.stop()}},hT=(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 rl(xt.InvalidData,"Malformed JSON data in event stream"))};function pT(t,e){e==null||e.debug(`Received ${t} event after processor was closed. Skipping processing.`)}function Hp(t){t==null||t.debug("Ping completed after processor was closed. Skipping processing.")}var dT=class{constructor(t,e,n,r,i,o,s,a,c){var l;this.Pn=t,this.Rt=e,this.n=n,this.z=r,this.xn=o,this.I=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.Rt.withReasons&&h.push({key:"withReasons",value:"true"}),this.z=r,this.De=$({},e.baseHeaders),this.t=c,this.Ln=ud(e.serviceEndpoints,u,h)}Se(){this.ft=Date.now()}Nt(t){this.ft&&this.I&&this.I.recordStreamInit(this.ft,!t,Date.now()-this.ft),this.ft=void 0}On(t){var e,n,r;return yl(t)?((r=this.t)==null||r.warn(Ve(t,"streaming request","will retry")),this.Nt(!1),this.Se(),!0):(this.Nt(!1),(e=this.m)==null||e.call(this,new rl(xt.ErrorResponse,t.message,t.status,!1)),(n=this.t)==null||n.error(Ve(t,"streaming request")),!1)}start(){this.Se();let t;this.Rt.useReport?(this.De["content-type"]="application/json",t={method:"REPORT",body:this.Pn}):t={};let e=this.z.createEventSource(this.Ln,ce($({headers:this.De},t),{errorFilter:n=>this.On(n),initialRetryDelayMillis:this.Rt.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){pT(i,this.t);return}if((s=this.t)==null||s.debug(`Received ${i} event`),o!=null&&o.data){this.Nt(!0);let{data:c}=o,l=n(c);if(!l){hT(i,c,this.t,this.m);return}r(l)}else(a=this.m)==null||a.call(this,new rl(xt.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.xn.requestPayload();try{if(this.h){Hp(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 uo(xt.InvalidData,"Malformed JSON data in ping polling response"))}}catch(l){if(this.h){Hp(this.t);return}let u=l;(c=this.m)==null||c.call(this,new uo(xt.ErrorResponse,u.message,u.status))}})}stop(){var t;(t=this.ke)==null||t.close(),this.ke=void 0,this.h=!0}close(){this.stop()}},fT=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=Dd(a),this.G=cT(e,this.dataSourceStatusManager,this.config.logger)}setConnectionParams(t){this.Tn=t}createPollingProcessor(t,e,n,r,i){let o=new uT(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.Ie(o,this.dataSourceStatusManager)}createStreamingProcessor(t,e,n,r,i){var o;let s=new dT(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.Tn)==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.Ie(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}Ie(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 mT(t,e){return Object.entries(t).every(([n,r])=>r===void 0||e[n]===r)}var yT={foreground:"foregroundMode",background:"backgroundMode"};function gT(t,e){let n=t.find(r=>mT(r.conditions,e));if(n){let{mode:r}=n;return typeof r=="object"?e[yT[r.configured]]:r}return e.foregroundMode}var bT=[{conditions:{networkAvailable:!1},mode:"offline"},{conditions:{},mode:{configured:"foreground"}}];function Yr(t,e,n,r){return{type:"changeSet",payload:t,fdv1Fallback:e,environmentId:n,freshness:r}}function Mt(t,e){return{type:"status",state:"interrupted",errorInfo:t,fdv1Fallback:e}}function Oe(){return{type:"status",state:"shutdown",fdv1Fallback:!1}}function Pr(t,e){return{type:"status",state:"terminal_error",errorInfo:t,fdv1Fallback:e}}function Jd(t,e){return{type:"status",state:"goodbye",reason:t,fdv1Fallback:e}}function Qn(t){return{kind:xt.ErrorResponse,message:`Unexpected status code: ${t}`,statusCode:t,time:Date.now()}}function yo(t){return{kind:xt.NetworkError,message:t,time:Date.now()}}function vn(t){return{kind:xt.InvalidData,message:t,time:Date.now()}}function Ur(t){return{kind:xt.Unknown,message:t,time:Date.now()}}function vT(t){let e=t,{version:n}=e;return hl(e,["version"])}async function wT(t){let{storage:e,crypto:n,environmentNamespace:r,context:i,logger:o}=t;if(!e)return o==null||o.debug("No storage available for cache initializer"),Mt(Ur("No storage available"),!1);let s=await Gd(e,n,r,i,o);if(!s)return o==null||o.debug("Cache miss for context"),Mt(Ur("Cache miss"),!1);let a={version:0,type:"full",updates:Object.entries(s.flags).map(([l,u])=>({kind:"flag-eval",key:l,version:u.version,object:vT(u)}))},c=await MI(e,n,r,i,o);return o==null||o.debug("Loaded cached flag evaluations via cache initializer"),Yr(a,!1,void 0,c)}function ST(t){return e=>{let n,r=new Promise(i=>{n=i});return{async run(){return Promise.race([r,wT(t)])},close(){n==null||n(Oe()),n=void 0}}}}function Yd(t,e,n,r,i,o,s,a){let c=$({},o),l,u="GET",h;return a?(u="POST",c["content-type"]="application/json",l=t,h=n.pathPost(i,t)):h=n.pathGet(i,t),{async poll(p){let f=[...s!=null?s:[]];p&&f.push({key:"basis",value:p});let m=hd(e,h,f),d=await r.fetch(m,{method:u,headers:c,body:l}),g=d.status===304?null:await d.text();return{status:d.status,headers:d.headers,body:g}}}}function Kd(t){return t}function IT(t){if(t.deleted)return{version:t.version,flag:{version:t.version,deleted:!0,value:void 0,trackEvents:!1}};let e=t.object;return{version:t.version,flag:ce($({},e),{version:t.version})}}function TT(t){let e={};return t.forEach(n=>{n.kind==="flag-eval"&&(e[n.key]=IT(n))}),e}function ET(t){let e=t.get("x-ld-fd-fallback");return e!==null&&e.toLowerCase()==="true"}function RT(t){var e;return(e=t.get("x-ld-envid"))!=null?e:void 0}function CT(t,e,n,r){let i=le.createProtocolHandler({"flag-eval":Kd},r),o;if(t.forEach(a=>{if(o)return;let c=i.processEvent(a);switch(c.type){case"payload":o=Yr(c.payload,e,n);break;case"goodbye":o=Jd(c.reason,e);break;case"serverError":{let l=Ur(c.reason);r==null||r.error(`Server error during polling: ${c.reason}`),o=Mt(l,e);break}case"error":{if(c.kind==="MISSING_PAYLOAD"||c.kind==="PROTOCOL_ERROR"){let l=vn(c.message);r==null||r.warn(`Protocol error during polling: ${c.message}`),o=Mt(l,e)}else r==null||r.warn(c.message);break}}}),o)return o;let s=Ur("Unexpected end of polling response");return r==null||r.error("Unexpected end of polling response"),Mt(s,e)}async function El(t,e,n){var r;let i=!1,o;try{let s=await t.poll(e);if(i=ET(s.headers),o=RT(s.headers),s.status===304)return Yr({version:0,type:"none",updates:[]},i,o);if(s.status<200||s.status>=300){let c=Qn(s.status);return n==null||n.error(`Polling request failed with HTTP error: ${s.status}`),s.status<=0||nr(s.status)?Mt(c,i):Pr(c,i)}if(!s.body){let c=vn("Empty response body");return n==null||n.error("Polling request received empty response body"),Mt(c,i)}let a;try{a=JSON.parse(s.body)}catch(c){let l=vn("Malformed JSON data in polling response");return n==null||n.error("Polling request received malformed data"),Mt(l,i)}if(!Array.isArray(a.events)){let c=vn("Invalid polling response: missing or invalid events array");return n==null||n.error("Polling response does not contain a valid events array"),Mt(c,i)}return CT(a.events,i,o,n)}catch(s){let a=(r=s==null?void 0:s.message)!=null?r:String(s);n==null||n.error(`Polling request failed with network error: ${a}`);let c=yo(a);return Mt(c,i)}}var $a=Symbol("shutdown");function kT(t,e,n){let r,i=new Promise(o=>{r=o});return{async run(){let o=n(),s;for(let c=0;c<=3;c+=1){let l=await Promise.race([i,El(t,o,e)]);if(l===$a)return Oe();if(l.type==="changeSet"||l.state!=="interrupted")return l;if(s=l,c<3&&(e==null||e.warn(`Recoverable polling error (attempt ${c+1}/4), retrying in 1000ms...`),await Promise.race([i,gl(1e3)])===$a))return Oe()}let a=s;return Pr(a.errorInfo,a.fdv1Fallback)},close(){r==null||r($a),r=void 0}}}function Rl(){let t=[],e=[];return{put(n){let r=e.shift();r?r(n):t.push(n)},take(){return t.length>0?Promise.resolve(t.shift()):new Promise(n=>{e.push(n)})}}}function ZT(t,e,n,r){let i=Rl(),o,s=new Promise(u=>{o=u}),a,c=!1;async function l(){if(c)return;let u=Date.now();try{let h=await El(t,n(),e);if(c)return;let p=!1;if(h.type==="status")switch(h.state){case"terminal_error":c=!0,p=!0;break;case"interrupted":case"goodbye":break;case"shutdown":break;default:break}p?(o==null||o(h),o=void 0):i.put(h)}catch(h){e==null||e.debug(`Polling error: ${h}`)}if(!c){let h=Date.now()-u,p=Math.min(Math.max(r-h,0),r);a=setTimeout(()=>{l()},p)}}return l(),{async next(){return Promise.race([s,i.take()])},close(){c=!0,a!==void 0&&(clearTimeout(a),a=void 0),o==null||o(Oe()),o=void 0}}}function cl(t,e){var n,r;let i=(n=e==null?void 0:e.isFDv1Fallback)!=null?n:!1,o=(r=e==null?void 0:e.initialState)!=null?r:i?"blocked":"available";return{factory:t,isFDv1Fallback:i,state:o}}function xT(t,e,n){let r,i=-1,o=-1,s=!1;function a(){r&&(r.close(),r=void 0)}function c(){return e.findIndex(l=>l.state==="available")}return{get isShutdown(){return s},getNextInitializerAndSetActive(){if(s||(i+=1,i>=t.length))return;a();let l=t[i](n);return r=l,l},getNextAvailableSynchronizerAndSetActive(){if(s||e.length===0)return;let l=0;for(;l<e.length;){o+=1,o>=e.length&&(o=0);let u=e[o];if(u.state==="available"){a();let h=u.factory(n);return r=h,h}l+=1}},blockCurrentSynchronizer(){o>=0&&o<e.length&&(e[o].state="blocked")},resetSourceIndex(){o=-1},fdv1Fallback(){e.forEach(l=>{l.state=l.isFDv1Fallback?"available":"blocked"}),o=-1},isPrimeSynchronizer(){return o===c()},getAvailableSynchronizerCount(){return e.filter(l=>l.state==="available").length},hasFDv1Fallback(){return e.some(l=>l.isFDv1Fallback)},close(){s=!0,a()}}}var VT=["server-intent","put-object","delete-object","payload-transferred","goodbye","error","heart-beat"];function OT(t){let e=Rl(),n=le.createProtocolHandler({"flag-eval":Kd},t.logger),r=$({},t.headers);function i(){var g;let b=[...t.parameters],w=(g=t.selectorGetter)==null?void 0:g.call(t);return w&&b.push({key:"basis",value:encodeURIComponent(w)}),ud(t.serviceEndpoints,t.streamUriPath,b)}let o,s,a=!1,c=!1,l=!1;function u(){s=Date.now()}function h(g){s&&t.diagnosticsManager&&t.diagnosticsManager.recordStreamInit(s,!g,Date.now()-s),s=void 0}function p(g){switch(g.type){case"payload":h(!0),e.put(Yr(g.payload,a));break;case"goodbye":e.put(Jd(g.reason,a));break;case"serverError":e.put(Mt(Ur(g.reason),a));break;case"error":(g.kind==="MISSING_PAYLOAD"||g.kind==="PROTOCOL_ERROR")&&e.put(Mt(vn(g.message),a));break}}function f(g){var b,w,E,I,S,T;return((b=g.headers)==null?void 0:b["x-ld-fd-fallback"])==="true"?(a=!0,h(!1),e.put(Pr(Qn((w=g.status)!=null?w:0),!0)),!1):yl(g)?((S=t.logger)==null||S.warn(Ve(g,"streaming request","will retry")),h(!1),u(),e.put(Mt(Qn((T=g.status)!=null?T:0),a)),!0):((E=t.logger)==null||E.error(Ve(g,"streaming request")),h(!1),e.put(Pr(Qn((I=g.status)!=null?I:0),a)),!1)}function m(g){VT.forEach(b=>{g.addEventListener(b,w=>{var E,I,S,T,x;if(l){(E=t.logger)==null||E.debug(`Received ${b} event after processor was closed. Skipping.`);return}if(!(w!=null&&w.data)){b!=="error"&&((I=t.logger)==null||I.warn(`Event from EventStream missing data for "${b}".`));return}(S=t.logger)==null||S.debug(`Received ${b} event`);let Z;try{Z=JSON.parse(w.data)}catch(O){(T=t.logger)==null||T.error(`Stream received data that was unable to be parsed in "${b}" message`),(x=t.logger)==null||x.debug(`Data follows: ${w.data}`),e.put(Mt(vn("Malformed JSON in EventStream"),a));return}let k=n.processEvent({event:b,data:Z});p(k)})})}function d(g){g.addEventListener("ping",async()=>{var b,w,E,I,S,T,x;if(l){(b=t.logger)==null||b.debug("Ping received after processor was closed. Skipping.");return}if((w=t.logger)==null||w.debug("Got PING, going to poll LaunchDarkly for feature flag updates"),!t.pingHandler){(E=t.logger)==null||E.warn("Ping event received but no ping handler configured.");return}try{let Z=await t.pingHandler.handlePing();if(l){(I=t.logger)==null||I.debug("Ping completed after processor was closed. Skipping processing.");return}e.put(Z)}catch(Z){if(l)return;(T=t.logger)==null||T.error(`Error handling ping: ${(S=Z==null?void 0:Z.message)!=null?S:Z}`),e.put(Mt(yo((x=Z==null?void 0:Z.message)!=null?x:"Error during ping poll"),a))}})}return{start(){if(c||l)return;c=!0,u();let g=t.requests.createEventSource(i(),{headers:r,errorFilter:b=>f(b),initialRetryDelayMillis:t.initialRetryDelayMillis,readTimeoutMillis:300*1e3,retryResetIntervalMillis:60*1e3,urlBuilder:i});o=g,m(g),d(g),g.onclose=()=>{var b;(b=t.logger)==null||b.info("Closed LaunchDarkly stream connection")},g.onerror=b=>{var w;l||b&&typeof b.status=="number"||e.put(Mt(yo((w=b==null?void 0:b.message)!=null?w:"IO Error"),a))},g.onopen=()=>{var b;(b=t.logger)==null||b.info("Opened LaunchDarkly stream connection"),n.reset()},g.onretrying=b=>{var w;(w=t.logger)==null||w.info(`Will retry stream connection in ${b.delayMillis} milliseconds`)}},close(){l||(l=!0,o==null||o.close(),o=void 0,e.put(Oe()))},takeResult(){return e.take()}}}function NT(t){let e=!1,n,r=new Promise(i=>{n=i});return{run(){return e?Promise.resolve(Oe()):(t.start(),Promise.race([t.takeResult().then(i=>(t.close(),i)),r]))},close(){e||(e=!0,t.close(),n==null||n(Oe()),n=void 0)}}}function GT(t){let e=!1,n=!1,r,i=new Promise(o=>{r=o});return{next(){return n?Promise.resolve(Oe()):(e||(e=!0,t.start()),Promise.race([t.takeResult(),i]))},close(){n||(n=!0,t.close(),r==null||r(Oe()),r=void 0)}}}function LT(t,e,n){return{handlePing:()=>El(t,e(),n)}}function _d(t,e){var n,r;return!(e!=null&&e.pollingBaseUri)&&!(e!=null&&e.streamingBaseUri)?t.serviceEndpoints:new tr((n=e.streamingBaseUri)!=null?n:t.serviceEndpoints.streaming,(r=e.pollingBaseUri)!=null?r:t.serviceEndpoints.polling,t.serviceEndpoints.events,t.serviceEndpoints.analyticsEventPath,t.serviceEndpoints.diagnosticEventPath,t.serviceEndpoints.includeAuthorizationHeader,t.serviceEndpoints.payloadFilterKey)}function ul(t,e){if(!(e!=null&&e.pollingBaseUri))return t.requestor;let n=_d(t,e);return Yd(t.plainContextString,n,t.polling.paths,t.requests,t.encoding,t.baseHeaders,t.queryParams)}function zp(t,e,n){var r;let i=_d(e,t.endpoints),o=ul(e,t.endpoints),s=e.streaming.paths.pathGet(e.encoding,e.plainContextString);return OT({requests:e.requests,serviceEndpoints:i,streamUriPath:s,parameters:e.queryParams,selectorGetter:n,headers:e.baseHeaders,initialRetryDelayMillis:((r=t.initialReconnectDelay)!=null?r:e.streaming.initialReconnectDelaySeconds)*1e3,logger:e.logger,pingHandler:LT(o,n,e.logger)})}function XT(){return{createInitializerFactory(t,e){switch(t.type){case"polling":{let n=ul(e,t.endpoints);return r=>kT(n,e.logger,r)}case"streaming":return n=>NT(zp(t,e,n));case"cache":return ST({storage:e.storage,crypto:e.crypto,environmentNamespace:e.environmentNamespace,context:e.context,logger:e.logger});default:return}},createSynchronizerSlot(t,e){var n;switch(t.type){case"polling":{let r=((n=t.pollInterval)!=null?n:e.polling.intervalSeconds)*1e3,i=ul(e,t.endpoints);return cl(o=>ZT(i,e.logger,o,r))}case"streaming":return cl(r=>GT(zp(t,e,r)));default:return}}}}function WT(t){return{version:1,type:"full",updates:Object.entries(t).map(([e,n])=>{var r;return{kind:"flag",key:e,version:(r=n.version)!=null?r:1,object:n}})}}function MT(t,e,n){let r=Rl(),i,o=new Promise(h=>{i=h}),s,a=!1,c=!1;function l(h){if(!a){let p=Date.now()-h,f=Math.min(Math.max(e-p,0),e);s=setTimeout(u,f)}}async function u(){if(a)return;n==null||n.debug("Polling FDv1 endpoint for feature flag updates");let h=Date.now();try{let p=await t.requestPayload();if(a)return;let f;try{let m=JSON.parse(p);f=WT(m)}catch(m){n==null||n.error("FDv1 polling received malformed data"),r.put({type:"status",state:"interrupted",errorInfo:vn("Malformed data in FDv1 polling response"),fdv1Fallback:!1}),l(h);return}r.put(Yr(f,!1))}catch(p){if(a)return;let f=p;if(f.status!==void 0&&!nr(f.status)){n==null||n.error(Ve(p,"FDv1 polling request")),a=!0,i==null||i(Pr(Qn(f.status),!1)),i=void 0;return}n==null||n.warn(Ve(p,"FDv1 polling request","will retry")),r.put({type:"status",state:"interrupted",errorInfo:f.status?Qn(f.status):yo(f.message),fdv1Fallback:!1})}l(h)}return{next(){return c||(c=!0,u()),Promise.race([o,r.take()])},close(){a=!0,s!==void 0&&(clearTimeout(s),s=void 0),i==null||i(Oe()),i=void 0}}}var Hd=120*1e3,zd=300*1e3;function PT(t,e,n){let r=fd(t/1e3,n);return{promise:r.promise.then(()=>new Promise(()=>{}),()=>e),cancel:r.cancel}}function Bd(t,e,n){let r,i,o=!1,s=new Promise(l=>{r=l});function a(){!i&&!o&&(i=PT(t,e,`${e} condition`),i.promise.then(l=>{i=void 0,r==null||r(l)}))}function c(){i==null||i.cancel(),i=void 0}return n||a(),{promise:s,inform(l){o||n==null||n(l,{start:a,cancel:c})},close(){o=!0,c()}}}function Bp(t){return Bd(t,"fallback",(e,{start:n,cancel:r})=>{e.type==="changeSet"?r():e.type==="status"&&e.state==="interrupted"&&n()})}function UT(t){return Bd(t,"recovery")}function jp(t){return{promise:t.length===0?void 0:Promise.race(t.map(e=>e.promise)),inform(e){t.forEach(n=>n.inform(e))},close(){t.forEach(e=>e.close())}}}function FT(t,e,n=Hd,r=zd){return t<=1?jp([]):jp(e?[Bp(n)]:[Bp(n),UT(r)])}function AT(t){let{initializerFactories:e,synchronizerSlots:n,dataCallback:r,statusManager:i,selectorGetter:o,logger:s,fallbackTimeoutMs:a=Hd,recoveryTimeoutMs:c=zd}=t,l=!1,u=!1,h=!1,p,f,m=xT(e,n,o);function d(){l||(l=!0,p==null||p(),p=void 0,f=void 0)}function g(T){r(T.payload),i.requestStateUpdate("VALID")}function b(T){T.errorInfo&&i.reportError(T.errorInfo.kind,T.errorInfo.message,T.errorInfo.statusCode,T.state==="interrupted")}function w(T){return T.fdv1Fallback&&m.hasFDv1Fallback()?(m.fdv1Fallback(),!0):!1}async function E(){for(var T,x;!u;){let Z=m.getNextInitializerAndSetActive();if(Z===void 0)break;let k=await Z.run();if(u)return;if(k.type==="changeSet"){if(g(k),w(k)){h=!0;break}if(k.payload.state){d();return}h=!0}else if(k.type==="status"){switch(k.state){case"interrupted":case"terminal_error":s==null||s.warn(`Initializer failed: ${(x=(T=k.errorInfo)==null?void 0:T.message)!=null?x:"unknown error"}`),b(k);break;case"shutdown":return}w(k)}}h&&d()}async function I(){for(var T,x,Z,k;!u;){let O=m.getNextAvailableSynchronizerAndSetActive();if(O===void 0){l||(f==null||f(new Error("All data sources exhausted without receiving data.")),p=void 0,f=void 0);return}let X=FT(m.getAvailableSynchronizerCount(),m.isPrimeSynchronizer(),a,c);X.promise&&(s==null||s.debug("Fallback condition active for current synchronizer."));let _=!0;try{for(;!u&&_;){let tt=[O.next().then(v=>({source:"sync",value:v}))];X.promise!==void 0&&tt.push(X.promise.then(v=>({source:"condition",value:v})));let y=await Promise.race(tt);if(u)return;if(y.source==="condition"){let v=y.value;v==="fallback"?s==null||s.warn("Fallback condition fired, moving to next synchronizer."):v==="recovery"&&(s==null||s.info("Recovery condition fired, resetting to primary synchronizer."),m.resetSourceIndex()),_=!1}else{let v=y.value;if(X.inform(v),v.type==="changeSet")g(v),l||d();else if(v.type==="status")switch(v.state){case"interrupted":s==null||s.warn(`Synchronizer interrupted: ${(x=(T=v.errorInfo)==null?void 0:T.message)!=null?x:"unknown error"}`),b(v);break;case"terminal_error":s==null||s.error(`Synchronizer terminal error: ${(k=(Z=v.errorInfo)==null?void 0:Z.message)!=null?k:"unknown error"}`),b(v),m.blockCurrentSynchronizer(),_=!1;break;case"shutdown":return;case"goodbye":break;default:break}w(v)&&(_=!1)}}}finally{X.close()}}}async function S(){if(e.length===0&&n.length===0){i.requestStateUpdate("VALID"),d();return}await E(),u||await I()}return{start(){return new Promise((T,x)=>{p=T,f=x,i.requestStateUpdate("INITIALIZING"),S().then(()=>{l||(f==null||f(new Error("Data source closed before initialization completed.")),p=void 0,f=void 0)}).catch(Z=>{l?s==null||s.error(`Orchestration error: ${Z}`):(f==null||f(Z instanceof Error?Z:new Error(String(Z))),p=void 0,f=void 0)})})},close(){u=!0,m.close()}}}var DT=1e3;function JT(t){let{initialState:e,onReconcile:n,debounceMs:r=DT}=t,{networkState:i,lifecycleState:o,requestedMode:s}=e,a,c=!1;function l(){return{networkState:i,lifecycleState:o,requestedMode:s}}function u(){c||(a!==void 0&&clearTimeout(a),a=setTimeout(()=>{a=void 0,c||n(l())},r))}return{setNetworkState(h){i!==h&&(i=h,u())},setLifecycleState(h){o!==h&&(o=h,u())},setRequestedMode(h){s!==h&&(s=h,u())},close(){c=!0,a!==void 0&&(clearTimeout(a),a=void 0)}}}var ae="[FDv2DataManagerBase]";function YT(t){var e;let{platform:n,flagManager:r,config:i,baseHeaders:o,emitter:s,transitionTable:a,foregroundMode:c,backgroundMode:l,modeTable:u,sourceFactoryProvider:h,buildQueryParams:p,fdv1Endpoints:f,fallbackTimeoutMs:m,recoveryTimeoutMs:d}=t,{logger:g}=i,b=Dd(s),w=lT(),E=(e=i.dataSystem)!=null&&e.connectionModes?$($({},u),i.dataSystem.connectionModes):u,I,S=c,T=c,x,Z,k,O,X=!1,_=!1,tt=!1,y,v,V,D=!1,U,L,q="available",lt="foreground";function Zt(Y){return E[Y]}function Ce(){return{lifecycle:lt,networkAvailable:q==="available",foregroundMode:T,backgroundMode:l!=null?l:"offline"}}function ro(){return v!==void 0?v:gT(a,Ce())}function io(){return V===!0?"streaming":V===!1?c==="streaming"?"one-shot":c:D?"streaming":c}function qe(){T=io(),Z==null||Z.setRequestedMode(T)}function Hn(Y,ht,$t){var Lt,qt,te,zn,ee;let se=[];$t&&Y.initializers.filter(yt=>!(_&&yt.type==="cache")).forEach(yt=>{let Q=h.createInitializerFactory(yt,ht);Q?se.push(Q):g.warn(`${ae} Unsupported initializer type '${yt.type}'. It will be skipped.`)});let ke=[];if(Y.synchronizers.forEach(yt=>{let Q=h.createSynchronizerSlot(yt,ht);Q?ke.push(Q):g.warn(`${ae} Unsupported synchronizer type '${yt.type}'. It will be skipped.`)}),f&&ke.length>0){let yt=Y.fdv1Fallback,Q=((Lt=yt==null?void 0:yt.pollInterval)!=null?Lt:i.pollInterval)*1e3,ne=(qt=yt==null?void 0:yt.endpoints)!=null&&qt.pollingBaseUri||(te=yt==null?void 0:yt.endpoints)!=null&&te.streamingBaseUri?new tr((zn=yt.endpoints.streamingBaseUri)!=null?zn:ht.serviceEndpoints.streaming,(ee=yt.endpoints.pollingBaseUri)!=null?ee:ht.serviceEndpoints.polling,ht.serviceEndpoints.events,ht.serviceEndpoints.analyticsEventPath,ht.serviceEndpoints.diagnosticEventPath,ht.serviceEndpoints.includeAuthorizationHeader,ht.serviceEndpoints.payloadFilterKey):ht.serviceEndpoints,vt=()=>al(ht.plainContextString,ne,f.polling(),ht.requests,ht.encoding,ht.baseHeaders,ht.queryParams,i.withReasons,i.useReport),wt=()=>MT(vt(),Q,g);ke.push(cl(wt,{isFDv1Fallback:!0}))}return{initializerFactories:se,synchronizerSlots:ke}}function mn(Y){var ht;g.debug(`${ae} dataCallback: type=${Y.type}, updates=${Y.updates.length}, state=${Y.state}`),I=Y.state;let $t=k;if(!$t){g.warn(`${ae} dataCallback called without an identified context.`);return}let Lt=TT((ht=Y.updates)!=null?ht:[]);r.applyChanges($t,Lt,Y.type).catch(qt=>{g.warn(`${ae} Failed to persist flag cache: ${qt}`)})}function yn(Y,ht){if(!O){g.warn(`${ae} Cannot create data source without factory context.`);return}let $t=Zt(Y),{initializerFactories:Lt,synchronizerSlots:qt}=Hn($t,O,ht);if(S=Y,Lt.length===0&&qt.length===0){g.debug(`${ae} Mode '${Y}' has no sources. No data source created.`),!X&&U&&(X=!0,U(),U=void 0,L=void 0);return}x=AT({initializerFactories:Lt,synchronizerSlots:qt,dataCallback:mn,statusManager:b,selectorGetter:()=>I,logger:g,fallbackTimeoutMs:m,recoveryTimeoutMs:d}),x.start().then(()=>{X=!0,U&&(U(),U=void 0,L=void 0)}).catch(te=>{L&&(L(te instanceof Error?te:new Error(String(te))),U=void 0,L=void 0)})}function Mr(Y){if(tt||!O)return;q=Y.networkState,lt=Y.lifecycleState,T=Y.requestedMode;let ht=ro();if(ht===S){g.debug(`${ae} Reconcile: mode unchanged (${ht}). No action.`);return}g.debug(`${ae} Reconcile: mode switching from '${S}' to '${ht}'.`),x==null||x.close(),x=void 0,yn(ht,!I)}return{get configuredForegroundMode(){return c},async identify(Y,ht,$t,Lt){if(tt){g.debug(`${ae} Identify called after close.`);return}x==null||x.close(),x=void 0,Z==null||Z.close(),Z=void 0,I=void 0,X=!1,_=!1,k=$t,U=Y,L=ht;let qt=JSON.stringify(bn.toLDContext($t)),te=p(Lt);i.withReasons&&te.push({key:"withReasons",value:"true"});let zn=w.streaming(),ee=w.polling(),se=Yd(qt,i.serviceEndpoints,ee,n.requests,n.encoding,o,te),ke=await Vd(n.crypto,t.credential);if(tt){g.debug(`${ae} Identify aborted: closed during async setup.`);return}O={requestor:se,requests:n.requests,encoding:n.encoding,serviceEndpoints:i.serviceEndpoints,baseHeaders:o,queryParams:te,plainContextString:qt,logger:g,polling:{paths:ee,intervalSeconds:i.pollInterval},streaming:{paths:zn,initialReconnectDelaySeconds:i.streamInitialReconnectDelay},storage:n.storage,crypto:n.crypto,environmentNamespace:ke,context:$t},T=io();let yt=ro();g.debug(`${ae} Identify: initial mode resolved to '${yt}'.`),_=(Lt==null?void 0:Lt.bootstrap)!==void 0,_?(X=!0,b.requestStateUpdate("VALID"),U==null||U(),U=void 0,L=void 0,Zt(yt).synchronizers.length>0&&yn(yt,!1)):yn(yt,!0),Z=JT({initialState:{networkState:q,lifecycleState:lt,requestedMode:T},onReconcile:Mr})},close(){tt=!0,x==null||x.close(),x=void 0,Z==null||Z.close(),Z=void 0,U=void 0,L=void 0},setNetworkState(Y){q=Y,Z==null||Z.setNetworkState(Y)},setLifecycleState(Y){Y==="background"&&lt!=="background"&&(y==null||y()),lt=Y,Z==null||Z.setLifecycleState(Y)},setConnectionMode(Y){v=Y,Y!==void 0?Z==null||Z.setRequestedMode(Y):qe()},getCurrentMode(){return S},setFlushCallback(Y){y=Y},setForcedStreaming(Y){V=Y,qe()},setAutomaticStreamingState(Y){D=Y,qe()}}}function bo(){return typeof document!==void 0}function Cl(){return typeof window!==void 0}function jd(t,e,n){return bo()?(document.addEventListener(t,e,n),()=>{document.removeEventListener(t,e,n)}):()=>{}}function Qd(t,e,n){return bo()?(window.addEventListener(t,e,n),()=>{window.removeEventListener(t,e,n)}):()=>{}}function Fr(){return Cl()?window.location.href:""}function KT(){return Cl()?window.location.search:""}function _T(){return Cl()?window.location.hash:""}function HT(){if(typeof crypto!==void 0)return crypto;throw Error("Access to a web crypto API is required")}function zT(){return bo()?document.visibilityState:"visibile"}function BT(t){if(bo())return document.querySelectorAll(t)}var jT="[BrowserDataManager]",QT=class extends fT{constructor(t,e,n,r,i,o,s,a,c,l){super(t,e,n,r,o,s,a,c,l),this.Bn=i,this.Z=void 0,this.Ut=!1,this.Z=i.streaming}C(t,...e){this.logger.debug(`${jT} ${t}`,...e)}async identify(t,e,n,r){if(this.closed){this.C("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.zt=i==null?void 0:i.hash,i!=null&&i.bootstrap?this.An(n,i,t):(await this.flagManager.loadCached(n)&&this.C("Identify - Flags loaded from cache. Continuing to initialize via a poll."),await this.Mn(n,t,e)),this.Ce(),this.jt()}async Fn(t){let e=JSON.stringify(bn.toLDContext(t)),n=al(e,this.config.serviceEndpoints,this.getPollingPaths(),this.platform.requests,this.platform.encoding,this.baseHeaders,[],this.config.withReasons,this.config.useReport,this.zt),r=3,i;for(let o=0;o<=r;o+=1)try{return await n.requestPayload()}catch(s){if(!yl(s))throw s;i=s,o<r&&(this.C(Ve(s,"initial poll request","will retry")),await gl(1e3))}throw i}async Mn(t,e,n){var r,i;try{this.dataSourceStatusManager.requestStateUpdate(Vp.Initializing);let o=await this.Fn(t);try{let s=this.createStreamListeners(t,e).get("put");s.processJson(s.deserializeData(o))}catch(s){this.dataSourceStatusManager.reportError(xt.InvalidData,(r=s.message)!=null?r:"Could not parse poll response")}}catch(o){this.dataSourceStatusManager.reportError(xt.NetworkError,(i=o.message)!=null?i:"unexpected network error",o.status),n(o)}}An(t,e,n){let{bootstrapParsed:r}=e;r||(r=Ad(this.logger,e.bootstrap)),this.flagManager.setBootstrap(t,r),this.dataSourceStatusManager.requestStateUpdate(Vp.Valid),this.C("Identify - Initialization completed from bootstrap"),n()}setForcedStreaming(t){this.Z=t,this.jt()}setAutomaticStreamingState(t){this.Ut=t,this.jt()}jt(){let t=this.Z||this.Ut&&this.Z===void 0;this.C(`Updating streaming state. forced(${this.Z}) automatic(${this.Ut})`),t?this.$n():this.Ce()}Ce(){var t;this.updateProcessor&&this.C("Stopping update processor."),(t=this.updateProcessor)==null||t.close(),this.updateProcessor=void 0}$n(){if(this.updateProcessor){this.C("Update processor already active. Not changing state.");return}if(!this.context){this.C("Context not set, not starting update processor.");return}this.C("Starting update processor."),this.Rn(this.context)}Rn(t,e,n){var r;let i=bn.toLDContext(t);(r=this.updateProcessor)==null||r.close();let o=JSON.stringify(bn.toLDContext(t)),s=al(o,this.config.serviceEndpoints,this.getPollingPaths(),this.platform.requests,this.platform.encoding,this.baseHeaders,[],this.config.withReasons,this.config.useReport,this.zt);this.createStreamingProcessor(i,t,s,e,n),this.updateProcessor.start()}};function $T(t){let e=jd("visibilitychange",()=>{zT()==="hidden"&&t()}),n=Qd("pagehide",t);return()=>{e(),n()}}function qa(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function qT(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(`^${qa(t.url)}/?$`).test(e);case"canonical":return new RegExp(`^${qa(t.url)}/?$`).test(i);case"substring":return new RegExp(`.*${qa(t.substring)}.*$`).test(i);case"regex":return new RegExp(t.pattern).test(i);default:return!1}}function tE(t,e){let n=[];return e.forEach(r=>{let i=t.target,{selector:o}=r,s=BT(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 eE=class{constructor(t,e){let n=t.filter(o=>{var s;return(s=o.urls)==null?void 0:s.some(a=>qT(a,Fr(),KT(),_T()))}),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=>{tE(s,i).forEach(a=>{e(a)})};this.Pe=jd("click",o)}}close(){var t;(t=this.Pe)==null||t.call(this)}},nE=300,rE=class{constructor(t){this.bo=Fr();let e=()=>{let r=Fr();r!==this.bo&&(this.bo=r,t())};this.Vt=setInterval(e,nE);let n=Qd("popstate",e);this.xe=()=>{n()}}close(){var t;this.Vt&&clearInterval(this.Vt),(t=this.xe)==null||t.call(this)}},iE=class{constructor(t,e,n,r,i,o=s=>new rE(s)){this.z=e,this.zn=r,this.Un=i,this.pt=[],this.Oe=!1,this.X=`${n}/sdk/goals/${t}`,this.Le=o(()=>{this.Ht()})}async initialize(){await this.Nn(),this.Ht()}startTracking(){this.Oe=!0,this.Ht()}Ht(){var t;this.Oe&&((t=this.Bt)==null||t.close(),this.pt&&this.pt.length&&(this.Bt=new eE(this.pt,e=>{this.Un(Fr(),e)})))}async Nn(){try{let t=await this.z.fetch(this.X);this.pt=await t.json()}catch(t){this.zn(new pd(`Encountered error fetching goals: ${t}`))}}close(){var t,e;(t=this.Le)==null||t.close(),(e=this.Bt)==null||e.close()}};function oE(t){return t.kind==="click"}var sE=2,$d={fetchGoals:!0,eventUrlTransformer:t=>t,streaming:void 0,plugins:[]},aE={fetchGoals:N.Boolean,eventUrlTransformer:N.Function,streaming:N.Boolean,plugins:N.createTypeArray("LDPlugin",{})};function lE(t){var e;let n=$({},t);return(e=n.flushInterval)!=null||(n.flushInterval=sE),n}function cE(t){let e=lE(t);return Object.keys($d).forEach(n=>{delete e[n]}),e}function uE(t,e){let n=$({},$d);return Object.entries(aE).forEach(r=>{let[i,o]=r,s=t[i];s!==void 0&&(o.is(s)?n[i]=s:e.warn(Wt.wrongOptionType(i,o.getType(),typeof s)))}),n}var hE=class{constructor(t,e){switch(this.jn=t,this.Te=[],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.Te.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.Te.push(t),this}},pE={start:0,end:3},dE={start:4,end:5},tl={start:6,end:7},el={start:8,end:8},fE={start:9,end:9},mE={start:10,end:15};function yE(){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 Bn(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 gE(t){return t[el.start]=(t[el.start]|128)&191,t[tl.start]=t[tl.start]&15|64,`${Bn(t,pE)}-${Bn(t,dE)}-${Bn(t,tl)}-${Bn(t,el)}${Bn(t,fE)}-${Bn(t,mE)}`}function bE(){let t=yE();return gE(t)}function vE(){return typeof crypto!==void 0&&typeof crypto.randomUUID=="function"?crypto.randomUUID():bE()}var wE=class{createHash(t){return new hE(HT(),t)}randomUUID(){return vE()}};function SE(t){let e=Array.from(t,n=>String.fromCodePoint(n)).join("");return btoa(e)}var IE=class{btoa(t){return SE(new TextEncoder().encode(t))}},TE=class{constructor(t){this.e=t}platformData(){return{name:"JS"}}sdkData(){let t={name:"@launchdarkly/js-client-sdk",version:"4.5.0",userAgentBase:"JSClient"};return this.e.wrapperName&&(t.wrapperName=this.e.wrapperName),this.e.wrapperVersion&&(t.wrapperVersion=this.e.wrapperVersion),t}},EE=class{constructor(t,e){this.X=t,this.n={},this.x=new bS(e.initialRetryDelayMillis,e.retryResetIntervalMillis),this.Ae=e.errorFilter,this.qt=e.urlBuilder,this.Me()}Me(){this.qt&&(this.X=this.qt()),this.q=new EventSource(this.X),this.q.onopen=()=>{var t;this.x.success(),(t=this.onopen)==null||t.call(this)},this.q.onerror=t=>{var e;t instanceof MessageEvent||(this.Es(t),(e=this.onerror)==null||e.call(this,t))},Object.entries(this.n).forEach(([t,e])=>{e.forEach(n=>{var r;(r=this.q)==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.q)==null||i.addEventListener(t,e)}close(){var t,e;clearTimeout(this.Kt),this.Kt=void 0,(t=this.q)==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.Me()},t)}Es(t){this.close(),!(typeof t.status=="number"&&!this.Ae(t))&&this.Vn(this.x.fail())}},RE=class{fetch(t,e){return fetch(t,e)}createEventSource(t,e){return new EE(t,e)}getEventSourceCapabilities(){return{customMethod:!1,readTimeout:!1,headers:!1}}};function qd(){return typeof localStorage!="undefined"}function CE(){if(!qd())return[];let t=[];for(let e=0;e<localStorage.length;e+=1){let n=localStorage.key(e);n&&t.push(n)}return t}var kE=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}`)}}},ZE=class{constructor(t,e){this.encoding=new IE,this.crypto=new wE,this.requests=new RE,qd()&&(this.storage=new kE(t)),this.info=new TE(e)}},xE=class extends sT{constructor(t,e,n={},r){var i,o,s,a,c;let{logger:l,debug:u}=n,h=l!=null?l:new pl({destination:{debug:console.debug,info:console.info,warn:console.warn,error:console.error},level:u?"debug":"info"}),p=(i=n.baseUri)!=null?i:"https://clientsdk.launchdarkly.com",f=r!=null?r:new ZE(h,n),m=uE(n,h),d=cE(ce($({},n),{logger:h})),{eventUrlTransformer:g}=m,b=Kp(t),w=(E,I,S,T,x)=>I.dataSystem?YT({platform:f,flagManager:E,credential:t,config:I,baseHeaders:S,emitter:T,transitionTable:bT,foregroundMode:dI(I.dataSystem,Wp),backgroundMode:void 0,modeTable:ao,sourceFactoryProvider:XT(),fdv1Endpoints:Kp(t),buildQueryParams:Z=>{let k=[{key:"auth",value:t}],O=Z;return O!=null&&O.hash&&k.push({key:"h",value:O.hash}),k}}):new QT(f,E,t,I,m,b.polling,b.streaming,S,T,x);super(t,e,f,d,w,{getLegacyStorageKeys:()=>CE().filter(E=>E.startsWith(`ld:${t}:`)),analyticsEventPath:`/events/bulk/${t}`,diagnosticEventPath:`/events/diagnostic/${t}`,includeAuthorizationHeader:!1,highTimeoutThreshold:5,userAgentHeaderName:"x-launchdarkly-user-agent",dataSystemDefaults:Wp,trackEventModifier:E=>new le.InputCustomEvent(E.context,E.key,E.data,E.metricValue,E.samplingRatio,g(Fr())),getImplementationHooks:E=>le.safeGetHooks(h,E,m.plugins),credentialType:"clientSideId"}),this.setEventSendingEnabled(!0,!1),m.streaming!==void 0&&((s=(o=this.dataManager).setForcedStreaming)==null||s.call(o,m.streaming)),(c=(a=this.dataManager).setFlushCallback)==null||c.call(a,()=>this.flush()),this.Jt=m.plugins,m.fetchGoals&&(this.Wt=new iE(t,f.requests,p,E=>{h.error(E.message)},(E,I)=>{let S=this.getInternalContext();if(!S)return;let T=g(E);oE(I)?this.sendEvent({kind:"click",url:T,samplingRatio:1,key:I.key,creationDate:Date.now(),context:S,selector:I.selector}):this.sendEvent({kind:"pageview",url:T,samplingRatio:1,key:I.key,creationDate:Date.now(),context:S})}),this.Wt.initialize(),m.automaticBackgroundHandling&&$T(()=>this.flush()))}registerPlugins(t){le.safeRegisterPlugins(this.logger,this.environmentMetadata,t,this.Jt||[]);let e=this.getDebugOverrides();e&&aT(this.logger,e,this.Jt||[])}setInitialContext(t){this.Yt=t}async identify(t,e){return super.identify(t,e)}async identifyResult(t,e){var n;if(!this.Q)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=$({},e);(e==null?void 0:e.sheddable)===void 0&&(r.sheddable=!0);let i=await super.identifyResult(t,r);return(n=this.Wt)==null||n.startTracking(),i}start(t){var e,n;if(this.initializeResult)return Promise.resolve(this.initializeResult);if(this.Q)return this.Q;if(!this.Yt)return this.logger.error("Initial context not set"),Promise.resolve({status:"failed",error:new Error("Initial context not set")});let r=ce($({},(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=Ad(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.Q=this.promiseWithTimeout(this.initializedPromise,(n=t==null?void 0:t.timeout)!=null?n:5),this.identifyResult(this.Yt,r),this.Q}setConnectionMode(t){if(!this.dataManager.setConnectionMode){this.logger.warn("setConnectionMode requires the FDv2 data system (dataSystem option). The call has no effect without it.");return}if(t!==void 0&&!(t in ao)){this.logger.warn(`setConnectionMode called with invalid mode '${t}'. Valid modes: ${Object.keys(ao).join(", ")}.`);return}this.dataManager.setConnectionMode(t)}setStreaming(t){var e,n;(n=(e=this.dataManager).setForcedStreaming)==null||n.call(e,t)}Fe(){var t,e;let n=this.emitter.eventNames().some(r=>r.startsWith("change:")||r==="change");(e=(t=this.dataManager).setAutomaticStreamingState)==null||e.call(t,n)}on(t,e){super.on(t,e),this.Fe()}off(t,e){super.off(t,e),this.Fe()}};function VE(t,e,n,r={},i){let o=new xE(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(),setConnectionMode:a=>o.setConnectionMode(a),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 Z9(t){return new pl(t)}function tf(t,e,n){return VE(t,e,ho.Disabled,n)}var OE=Object.defineProperty,NE=(t,e,n)=>e in t?OE(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Fe=(t,e,n)=>NE(t,typeof e!="symbol"?e+"":e,n),GE=(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())}),Ke=(t,e,...n)=>{let r=`[@launchdarkly plugins]: (${t}): `;console[e].apply(console,[r,...n]),LE(r,...n)},LE=(t,...e)=>GE(void 0,null,function*(){try{let{LDObserve:n}=yield Promise.resolve().then(()=>UC);n.recordLog(`${t}${e}`,"warn")}catch(n){}}),XE=class{constructor(t,e){Fe(this,"debug"),Fe(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])}},Yo=class{constructor(){Fe(this,"_sdk"),Fe(this,"_isLoaded",!1),Fe(this,"_callBuffer",[]),Fe(this,"_capacity",1e5),Fe(this,"_droppedEvents",0),Fe(this,"_exceededCapacity",!1),Fe(this,"_logger",new XE)}p(e,n){if(this.gr)try{return this.Wr[e](...n)}catch(r){Ke(`Error executing buffered call to ${e}:`,"error",r)}else{this.Ei({method:e,args:n});return}}Ei(e){this.ar.length<this.Rs?(this.ar.push(e),this.Mr=!1):(this.Mr||(this.Mr=!0,Ke("Exceeded event queue capacity. Increase capacity to avoid dropping events.","warn")),this.Cs+=1)}load(e){this.Wr=e,this.gr=!0;for(let{method:n,args:r}of this.ar)try{this.Wr[n](...r)}catch(i){Ke(`Error executing buffered call to ${n}:`,"error",i)}this.ar=[]}},WE=Object.defineProperty,ME=Object.defineProperties,PE=Object.getOwnPropertyDescriptors,Ko=Object.getOwnPropertySymbols,Pm=Object.prototype.hasOwnProperty,Um=Object.prototype.propertyIsEnumerable,cc=(t,e,n)=>e in t?WE(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,nt=(t,e)=>{for(var n in e||(e={}))Pm.call(e,n)&&cc(t,n,e[n]);if(Ko)for(var n of Ko(e))Um.call(e,n)&&cc(t,n,e[n]);return t},cr=(t,e)=>ME(t,PE(e)),ei=(t,e)=>{var n={};for(var r in t)Pm.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Ko)for(var r of Ko(t))e.indexOf(r)<0&&Um.call(t,r)&&(n[r]=t[r]);return n},ai=(t,e,n)=>cc(t,typeof e!="symbol"?e+"":e,n),hr=(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 UE(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 FE(t){return typeof t=="object"&&t!==null}function AE(t,e){throw new Error("Unexpected invariant triggered.")}var DE=/\r\n|[\n\r]/g;function uc(t,e){let n=0,r=1;for(let i of t.body.matchAll(DE)){if(typeof i.index=="number"||AE(),i.index>=e)break;n=i.index+i[0].length,r+=1}return{line:r,column:e+1-n}}function JE(t){return Fm(t.source,uc(t.source,t.start))}function Fm(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+ef([[`${s} |`,m[0]],...m.slice(1,p+1).map(d=>["|",d]),["|","^".padStart(f)],["|",m[p+1]]])}return l+ef([[`${s-1} |`,u[i-1]],[`${s} |`,h],["|","^".padStart(c)],[`${s+1} |`,u[i+1]]])}function ef(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 YE(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 KE=class Am extends Error{constructor(e,...n){var r,i,o;let{nodes:s,source:a,positions:c,path:l,originalError:u,extensions:h}=YE(n);super(e),this.name="GraphQLError",this.path=l!=null?l:void 0,this.originalError=u!=null?u:void 0,this.nodes=nf(Array.isArray(s)?s:s?[s]:void 0);let p=nf((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=>uc(a,m)):p==null?void 0:p.map(m=>uc(m.source,m.start));let f=FE(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,Am):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
- `+GT(n.loc));else if(this.source&&this.locations)for(let n of this.locations)e+=`
352
+ `+JE(n.loc));else if(this.source&&this.locations)for(let n of this.locations)e+=`
353
353
 
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+=`
354
+ `+Fm(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 nf(t){return t===void 0||t.length===0?void 0:t}function Ot(t,e,n){return new KE(`Syntax Error: ${n}`,{source:t,positions:[e]})}var _E=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}}},Dm=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}}},Jm={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"]},HE=new Set(Object.keys(Jm));function rf(t){let e=t==null?void 0:t.kind;return typeof e=="string"&&HE.has(e)}var ar;(function(t){t.QUERY="query",t.MUTATION="mutation",t.SUBSCRIPTION="subscription"})(ar||(ar={}));var hc;(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"})(hc||(hc={}));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 pc(t){return t===9||t===32}function li(t){return t>=48&&t<=57}function Ym(t){return t>=97&&t<=122||t>=65&&t<=90}function Km(t){return Ym(t)||t===95}function zE(t){return Ym(t)||li(t)||t===95}function BE(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=jE(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 jE(t){let e=0;for(;e<t.length&&pc(t.charCodeAt(e));)++e;return e}function QE(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||pc(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&&pc(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 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.
356
+ `),'"""'+h+'"""'}var R;(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"})(R||(R={}));var $E=class{constructor(t){let e=new Dm(R.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!==R.EOF)do if(t.next)t=t.next;else{let e=tR(this,t.end);t.next=e,e.prev=t,t=e}while(t.kind===R.COMMENT);return t}};function qE(t){return t===R.BANG||t===R.DOLLAR||t===R.AMP||t===R.PAREN_L||t===R.PAREN_R||t===R.SPREAD||t===R.COLON||t===R.EQUALS||t===R.AT||t===R.BRACKET_L||t===R.BRACKET_R||t===R.BRACE_L||t===R.PIPE||t===R.BRACE_R}function mr(t){return t>=0&&t<=55295||t>=57344&&t<=1114111}function us(t,e){return _m(t.charCodeAt(e))&&Hm(t.charCodeAt(e+1))}function _m(t){return t>=55296&&t<=56319}function Hm(t){return t>=56320&&t<=57343}function Vn(t,e){let n=t.source.body.codePointAt(e);if(n===void 0)return R.EOF;if(n>=32&&n<=126){let r=String.fromCodePoint(n);return r==='"'?`'"'`:`"${r}"`}return"U+"+n.toString(16).toUpperCase().padStart(4,"0")}function Rt(t,e,n,r,i){let o=t.line,s=1+n-t.lineStart;return new Dm(e,n,r,o,s,i)}function tR(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 eR(t,i);case 33:return Rt(t,R.BANG,i,i+1);case 36:return Rt(t,R.DOLLAR,i,i+1);case 38:return Rt(t,R.AMP,i,i+1);case 40:return Rt(t,R.PAREN_L,i,i+1);case 41:return Rt(t,R.PAREN_R,i,i+1);case 46:if(n.charCodeAt(i+1)===46&&n.charCodeAt(i+2)===46)return Rt(t,R.SPREAD,i,i+3);break;case 58:return Rt(t,R.COLON,i,i+1);case 61:return Rt(t,R.EQUALS,i,i+1);case 64:return Rt(t,R.AT,i,i+1);case 91:return Rt(t,R.BRACKET_L,i,i+1);case 93:return Rt(t,R.BRACKET_R,i,i+1);case 123:return Rt(t,R.BRACE_L,i,i+1);case 124:return Rt(t,R.PIPE,i,i+1);case 125:return Rt(t,R.BRACE_R,i,i+1);case 34:return n.charCodeAt(i+1)===34&&n.charCodeAt(i+2)===34?aR(t,i):rR(t,i)}if(li(o)||o===45)return nR(t,i,o);if(Km(o))return lR(t,i);throw Ot(t.source,i,o===39?`Unexpected single quote character ('), did you mean to use a double quote (")?`:mr(o)||us(n,i)?`Unexpected character: ${Vn(t,i)}.`:`Invalid character: ${Vn(t,i)}.`)}return Rt(t,R.EOF,r,r)}function eR(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(us(n,i))i+=2;else break}return Rt(t,R.COMMENT,e,i,n.slice(e+1,i))}function nR(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),li(o))throw Ot(t.source,i,`Invalid number, unexpected digit after 0: ${Vn(t,i)}.`)}else i=kl(t,i,o),o=r.charCodeAt(i);if(o===46&&(s=!0,o=r.charCodeAt(++i),i=kl(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=kl(t,i,o),o=r.charCodeAt(i)),o===46||Km(o))throw Ot(t.source,i,`Invalid number, expected digit but got: ${Vn(t,i)}.`);return Rt(t,s?R.FLOAT:R.INT,e,i,r.slice(e,i))}function kl(t,e,n){if(!li(n))throw Ot(t.source,e,`Invalid number, expected digit but got: ${Vn(t,e)}.`);let r=t.source.body,i=e+1;for(;li(r.charCodeAt(i));)++i;return i}function rR(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),Rt(t,R.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?iR(t,i):oR(t,i):sR(t,i);s+=c.value,i+=c.size,o=i;continue}if(a===10||a===13)break;if(mr(a))++i;else if(us(n,i))i+=2;else throw Ot(t.source,i,`Invalid character within String: ${Vn(t,i)}.`)}throw Ot(t.source,i,"Unterminated string.")}function iR(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|qr(o),r<0)break}throw Ot(t.source,e,`Invalid Unicode escape sequence: "${n.slice(e,e+i)}".`)}function oR(t,e){let n=t.source.body,r=of(n,e+2);if(mr(r))return{value:String.fromCodePoint(r),size:6};if(_m(r)&&n.charCodeAt(e+6)===92&&n.charCodeAt(e+7)===117){let i=of(n,e+8);if(Hm(i))return{value:String.fromCodePoint(r,i),size:12}}throw Ot(t.source,e,`Invalid Unicode escape sequence: "${n.slice(e,e+6)}".`)}function of(t,e){return qr(t.charCodeAt(e))<<12|qr(t.charCodeAt(e+1))<<8|qr(t.charCodeAt(e+2))<<4|qr(t.charCodeAt(e+3))}function qr(t){return t>=48&&t<=57?t-48:t>=65&&t<=70?t-55:t>=97&&t<=102?t-87:-1}function sR(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 Ot(t.source,e,`Invalid character escape sequence: "${n.slice(e,e+2)}".`)}function aR(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=Rt(t,R.BLOCK_STRING,e,o+3,BE(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(mr(l))++o;else if(us(n,o))o+=2;else throw Ot(t.source,o,`Invalid character within String: ${Vn(t,o)}.`)}throw Ot(t.source,o,"Unterminated string.")}function lR(t,e){let n=t.source.body,r=n.length,i=e+1;for(;i<r;){let o=n.charCodeAt(i);if(zE(o))++i;else break}return Rt(t,R.NAME,e,i,n.slice(e,i))}var cR=10,zm=2;function Jc(t){return hs(t,[])}function hs(t,e){switch(typeof t){case"string":return JSON.stringify(t);case"function":return t.name?`[function ${t.name}]`:"[function]";case"object":return uR(t,e);default:return String(t)}}function uR(t,e){if(t===null)return"null";if(e.includes(t))return"[Circular]";let n=[...e,t];if(hR(t)){let r=t.toJSON();if(r!==t)return typeof r=="string"?r:hs(r,n)}else if(Array.isArray(t))return dR(t,n);return pR(t,n)}function hR(t){return typeof t.toJSON=="function"}function pR(t,e){let n=Object.entries(t);return n.length===0?"{}":e.length>zm?"["+fR(t)+"]":"{ "+n.map(([r,i])=>r+": "+hs(i,e)).join(", ")+" }"}function dR(t,e){if(t.length===0)return"[]";if(e.length>zm)return"[Array]";let n=Math.min(cR,t.length),r=t.length-n,i=[];for(let o=0;o<n;++o)i.push(hs(t[o],e));return r===1?i.push("... 1 more item"):r>1&&i.push(`... ${r} more items`),"["+i.join(", ")+"]"}function fR(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 mR=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=Jc(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},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,`
369
+ spurious results.`)}}return!1},_o=class{constructor(e,n="GraphQL request",r={line:1,column:1}){typeof e=="string"||Lo(!1,`Body must be a string. Received: ${Jc(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 yR(t){return mR(t,_o)}function Yc(t,e){return new gR(t,e).parseDocument()}var gR=class{constructor(t,e={}){let n=yR(t)?t:new _o(t);this.l=new $E(n),this.lr=e,this.Pr=0}parseName(){let t=this.expectToken(R.NAME);return this.node(t,{kind:F.NAME,value:t.value})}parseDocument(){return this.node(this.l.token,{kind:F.DOCUMENT,definitions:this.many(R.SOF,this.parseDefinition,R.EOF)})}parseDefinition(){if(this.peek(R.BRACE_L))return this.parseOperationDefinition();let t=this.peekDescription(),e=t?this.l.lookahead():this.l.token;if(e.kind===R.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 Ot(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(R.BRACE_L))return this.node(t,{kind:F.OPERATION_DEFINITION,operation:ar.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});let e=this.parseOperationType(),n;return this.peek(R.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(R.NAME);switch(t.value){case"query":return ar.QUERY;case"mutation":return ar.MUTATION;case"subscription":return ar.SUBSCRIPTION}throw this.unexpected(t)}parseVariableDefinitions(){return this.optionalMany(R.PAREN_L,this.parseVariableDefinition,R.PAREN_R)}parseVariableDefinition(){return this.node(this.l.token,{kind:F.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(R.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(R.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){let t=this.l.token;return this.expectToken(R.DOLLAR),this.node(t,{kind:F.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this.l.token,{kind:F.SELECTION_SET,selections:this.many(R.BRACE_L,this.parseSelection,R.BRACE_R)})}parseSelection(){return this.peek(R.SPREAD)?this.parseFragment():this.parseField()}parseField(){let t=this.l.token,e=this.parseName(),n,r;return this.expectOptionalToken(R.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(R.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(t){let e=t?this.parseConstArgument:this.parseArgument;return this.optionalMany(R.PAREN_L,e,R.PAREN_R)}parseArgument(t=!1){let e=this.l.token,n=this.parseName();return this.expectToken(R.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(R.SPREAD);let e=this.expectOptionalKeyword("on");return!e&&this.peek(R.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.lr.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 R.BRACKET_L:return this.parseList(t);case R.BRACE_L:return this.parseObject(t);case R.INT:return this.advanceLexer(),this.node(e,{kind:F.INT,value:e.value});case R.FLOAT:return this.advanceLexer(),this.node(e,{kind:F.FLOAT,value:e.value});case R.STRING:case R.BLOCK_STRING:return this.parseStringLiteral();case R.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 R.DOLLAR:if(t)if(this.expectToken(R.DOLLAR),this.l.token.kind===R.NAME){let n=this.l.token.value;throw Ot(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===R.BLOCK_STRING})}parseList(t){let e=()=>this.parseValueLiteral(t);return this.node(this.l.token,{kind:F.LIST,values:this.any(R.BRACKET_L,e,R.BRACKET_R)})}parseObject(t){let e=()=>this.parseObjectField(t);return this.node(this.l.token,{kind:F.OBJECT,fields:this.any(R.BRACE_L,e,R.BRACE_R)})}parseObjectField(t){let e=this.l.token,n=this.parseName();return this.expectToken(R.COLON),this.node(e,{kind:F.OBJECT_FIELD,name:n,value:this.parseValueLiteral(t)})}parseDirectives(t){let e=[];for(;this.peek(R.AT);)e.push(this.parseDirective(t));return e}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(t){let e=this.l.token;return this.expectToken(R.AT),this.node(e,{kind:F.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(t)})}parseTypeReference(){let t=this.l.token,e;if(this.expectOptionalToken(R.BRACKET_L)){let n=this.parseTypeReference();this.expectToken(R.BRACKET_R),e=this.node(t,{kind:F.LIST_TYPE,type:n})}else e=this.parseNamedType();return this.expectOptionalToken(R.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(R.STRING)||this.peek(R.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(R.BRACE_L,this.parseOperationTypeDefinition,R.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(R.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(R.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(R.BRACE_L,this.parseFieldDefinition,R.BRACE_R)}parseFieldDefinition(){let t=this.l.token,e=this.parseDescription(),n=this.parseName(),r=this.parseArgumentDefs();this.expectToken(R.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(R.PAREN_L,this.parseInputValueDef,R.PAREN_R)}parseInputValueDef(){let t=this.l.token,e=this.parseDescription(),n=this.parseName();this.expectToken(R.COLON);let r=this.parseTypeReference(),i;this.expectOptionalToken(R.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(R.EQUALS)?this.delimitedMany(R.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(R.BRACE_L,this.parseEnumValueDefinition,R.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 Ot(this.l.source,this.l.token.start,`${vo(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(R.BRACE_L,this.parseInputValueDef,R.BRACE_R)}parseTypeSystemExtension(){let t=this.l.lookahead();if(t.kind===R.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(R.BRACE_L,this.parseOperationTypeDefinition,R.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(R.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(R.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){let t=this.l.token,e=this.parseName();if(Object.prototype.hasOwnProperty.call(hc,e.value))return e;throw this.unexpected(t)}node(t,e){return this.lr.noLocation!==!0&&(e.loc=new _E(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 Ot(this.l.source,e.start,`Expected ${Bm(t)}, found ${vo(e)}.`)}expectOptionalToken(t){return this.l.token.kind===t?(this.advanceLexer(),!0):!1}expectKeyword(t){let e=this.l.token;if(e.kind===R.NAME&&e.value===t)this.advanceLexer();else throw Ot(this.l.source,e.start,`Expected "${t}", found ${vo(e)}.`)}expectOptionalKeyword(t){let e=this.l.token;return e.kind===R.NAME&&e.value===t?(this.advanceLexer(),!0):!1}unexpected(t){let e=t!=null?t:this.l.token;return Ot(this.l.source,e.start,`Unexpected ${vo(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.lr,e=this.l.advance();if(t!==void 0&&e.kind!==R.EOF&&(++this.Pr,this.Pr>t))throw Ot(this.l.source,e.start,`Document contains more that ${t} tokens. Parsing aborted.`)}};function vo(t){let e=t.value;return Bm(t.kind)+(e!=null?` "${e}"`:"")}function Bm(t){return qE(t)?`"${t}"`:t}function bR(t){return`"${t.replace(vR,wR)}"`}var vR=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function wR(t){return SR[t.charCodeAt(0)]}var SR=["\\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"],IR=Object.freeze({});function TR(t,e,n=Jm){let r=new Map;for(let b of Object.values(F))r.set(b,ER(e,b));let i,o=Array.isArray(t),s=[t],a=-1,c=[],l=t,u,h,p=[],f=[];do{a++;let b=a===s.length,w=b&&c.length!==0;if(b){if(u=f.length===0?void 0:p[p.length-1],l=h,h=f.pop(),w)if(o){l=l.slice();let I=0;for(let[S,T]of c){let x=S-I;T===null?(l.splice(x,1),I++):l[x]=T}}else{l=Object.defineProperties({},Object.getOwnPropertyDescriptors(l));for(let[I,S]of c)l[I]=S}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 E;if(!Array.isArray(l)){var m,d;rf(l)||Lo(!1,`Invalid AST Node: ${Jc(l)}.`);let I=b?(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(E=I==null?void 0:I.call(e,l,u,h,p,f),E===IR)break;if(E===!1){if(!b){p.pop();continue}}else if(E!==void 0&&(c.push([u,E]),!b))if(rf(E))l=E;else{p.pop();continue}}if(E===void 0&&w&&c.push([u,l]),b)p.pop();else{var g;i={inArray:o,index:a,keys:s,edits:c,prev:i},o=Array.isArray(l),s=o?l:(g=n[l.kind])!==null&&g!==void 0?g:[],a=-1,c=[],h&&f.push(h),h=l}}while(i!==void 0);return c.length!==0?c[c.length-1][1]:t}function ER(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 RR(t){return TR(t,kR)}var CR=80,kR={Name:{leave:t=>t.value},Variable:{leave:t=>"$"+t.name},Document:{leave:t=>W(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})=>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,`
371
+ `)},OperationDefinition:{leave(t){let e=et("(",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+et(" = ",n)+et(" ",W(r," "))},SelectionSet:{leave:({selections:t})=>we(t)},Field:{leave({alias:t,name:e,arguments:n,directives:r,selectionSet:i}){let o=et("",t,": ")+e,s=o+et("(",W(n,", "),")");return s.length>CR&&(s=o+et(`(
372
+ `,Xo(W(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?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
- `)+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," "),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,`
374
+ )`)),W([s,W(r," "),i]," ")}},Argument:{leave:({name:t,value:e})=>t+": "+e},FragmentSpread:{leave:({name:t,directives:e})=>"..."+t+et(" ",W(e," "))},InlineFragment:{leave:({typeCondition:t,directives:e,selectionSet:n})=>W(["...",et("on ",t),W(e," "),n]," ")},FragmentDefinition:{leave:({name:t,typeCondition:e,variableDefinitions:n,directives:r,selectionSet:i})=>`fragment ${t}${et("(",W(n,", "),")")} on ${e} ${et("",W(r," ")," ")}`+i},IntValue:{leave:({value:t})=>t},FloatValue:{leave:({value:t})=>t},StringValue:{leave:({value:t,block:e})=>e?QE(t):bR(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+et("(",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})=>et("",t,`
375
+ `)+W(["schema",W(e," "),we(n)]," ")},OperationTypeDefinition:{leave:({operation:t,type:e})=>t+": "+e},ScalarTypeDefinition:{leave:({description:t,name:e,directives:n})=>et("",t,`
376
+ `)+W(["scalar",e,W(n," ")]," ")},ObjectTypeDefinition:{leave:({description:t,name:e,interfaces:n,directives:r,fields:i})=>et("",t,`
377
+ `)+W(["type",e,et("implements ",W(n," & ")),W(r," "),we(i)]," ")},FieldDefinition:{leave:({description:t,name:e,arguments:n,type:r,directives:i})=>et("",t,`
378
+ `)+e+(sf(n)?et(`(
379
+ `,Xo(W(n,`
380
380
  `)),`
381
- )`):B("(",L(n,", "),")"))+": "+r+B(" ",L(i," "))},InputValueDefinition:{leave:({description:t,name:e,type:n,defaultValue:r,directives:i})=>B("",t,`
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," "),ae(i)]," ")},UnionTypeDefinition:{leave:({description:t,name:e,directives:n,types:r})=>B("",t,`
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," "),ae(r)]," ")},EnumValueDefinition:{leave:({description:t,name:e,directives:n})=>B("",t,`
386
- `)+L([e,L(n," ")]," ")},InputObjectTypeDefinition:{leave:({description:t,name:e,directives:n,fields:r})=>B("",t,`
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,`
381
+ )`):et("(",W(n,", "),")"))+": "+r+et(" ",W(i," "))},InputValueDefinition:{leave:({description:t,name:e,type:n,defaultValue:r,directives:i})=>et("",t,`
382
+ `)+W([e+": "+n,et("= ",r),W(i," ")]," ")},InterfaceTypeDefinition:{leave:({description:t,name:e,interfaces:n,directives:r,fields:i})=>et("",t,`
383
+ `)+W(["interface",e,et("implements ",W(n," & ")),W(r," "),we(i)]," ")},UnionTypeDefinition:{leave:({description:t,name:e,directives:n,types:r})=>et("",t,`
384
+ `)+W(["union",e,W(n," "),et("= ",W(r," | "))]," ")},EnumTypeDefinition:{leave:({description:t,name:e,directives:n,values:r})=>et("",t,`
385
+ `)+W(["enum",e,W(n," "),we(r)]," ")},EnumValueDefinition:{leave:({description:t,name:e,directives:n})=>et("",t,`
386
+ `)+W([e,W(n," ")]," ")},InputObjectTypeDefinition:{leave:({description:t,name:e,directives:n,fields:r})=>et("",t,`
387
+ `)+W(["input",e,W(n," "),we(r)]," ")},DirectiveDefinition:{leave:({description:t,name:e,arguments:n,repeatable:r,locations:i})=>et("",t,`
388
+ `)+"directive @"+e+(sf(n)?et(`(
389
+ `,Xo(W(n,`
390
390
  `)),`
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,`
391
+ )`):et("(",W(n,", "),")"))+(r?" repeatable":"")+" on "+W(i," | ")},SchemaExtension:{leave:({directives:t,operationTypes:e})=>W(["extend schema",W(t," "),we(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,et("implements ",W(e," & ")),W(n," "),we(r)]," ")},InterfaceTypeExtension:{leave:({name:t,interfaces:e,directives:n,fields:r})=>W(["extend interface",t,et("implements ",W(e," & ")),W(n," "),we(r)]," ")},UnionTypeExtension:{leave:({name:t,directives:e,types:n})=>W(["extend union",t,W(e," "),et("= ",W(n," | "))]," ")},EnumTypeExtension:{leave:({name:t,directives:e,values:n})=>W(["extend enum",t,W(e," "),we(n)]," ")},InputObjectTypeExtension:{leave:({name:t,directives:e,fields:n})=>W(["extend input",t,W(e," "),we(n)]," ")}};function W(t,e=""){var n;return(n=t==null?void 0:t.filter(r=>r).join(e))!==null&&n!==void 0?n:""}function we(t){return et(`{
392
+ `,Xo(W(t,`
393
393
  `)),`
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.
394
+ }`)}function et(t,e,n=""){return e!=null&&e!==""?t+e+n:""}function Xo(t){return et(" ",t.replace(/\n/g,`
395
+ `))}function sf(t){var e;return(e=t==null?void 0:t.some(n=>n.includes(`
396
+ `)))!==null&&e!==void 0?e:!1}var Kc=JSON,ZR=t=>t.toUpperCase(),xR=t=>{let e={};return t.forEach((n,r)=>{e[r]=n}),e},VR=(t,e,n)=>t.document?t:{document:t,variables:e,requestHeaders:n,signal:void 0},OR=(t,e,n)=>t.query?t:{query:t,variables:e,requestHeaders:n,signal:void 0},NR=(t,e)=>t.documents?t:{documents:t,requestHeaders:e,signal:void 0},af=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},Zl=t=>{if(typeof t=="string"){let n;try{let r=Yc(t);n=af(r)}catch(r){}return{query:t,operationName:n}}let e=af(t);return{query:RR(t),operationName:e}},jm=class Wo extends Error{constructor(e,n){let r=`${Wo.extractMessage(e)}: ${JSON.stringify({response:e,request:n})}`;super(r),Object.setPrototypeOf(this,Wo.prototype),this.response=e,this.request=n,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,Wo)}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})`}},_c=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 dc={exports:{}};(function(t,e){var n=typeof self<"u"?self:_c,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 v={next:function(){var V=y.shift();return{done:V===void 0,value:V}}};return a.iterable&&(v[Symbol.iterator]=function(){return v}),v}function m(y){this.map={},y instanceof m?y.forEach(function(v,V){this.append(V,v)},this):Array.isArray(y)?y.forEach(function(v){this.append(v[0],v[1])},this):y&&Object.getOwnPropertyNames(y).forEach(function(v){this.append(v,y[v])},this)}m.prototype.append=function(y,v){y=h(y),v=p(v);var V=this.map[y];this.map[y]=V?V+", "+v:v},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,v){this.map[h(y)]=p(v)},m.prototype.forEach=function(y,v){for(var V in this.map)this.map.hasOwnProperty(V)&&y.call(v,this.map[V],V,this)},m.prototype.keys=function(){var y=[];return this.forEach(function(v,V){y.push(V)}),f(y)},m.prototype.values=function(){var y=[];return this.forEach(function(v){y.push(v)}),f(y)},m.prototype.entries=function(){var y=[];return this.forEach(function(v,V){y.push([V,v])}),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 g(y){return new Promise(function(v,V){y.onload=function(){v(y.result)},y.onerror=function(){V(y.error)}})}function b(y){var v=new FileReader,V=g(v);return v.readAsArrayBuffer(y),V}function w(y){var v=new FileReader,V=g(v);return v.readAsText(y),V}function E(y){for(var v=new Uint8Array(y),V=new Array(v.length),D=0;D<v.length;D++)V[D]=String.fromCharCode(v[D]);return V.join("")}function I(y){if(y.slice)return y.slice(0);var v=new Uint8Array(y.byteLength);return v.set(new Uint8Array(y)),v.buffer}function S(){return this.bodyUsed=!1,this.Ur=function(y){this._t=y,y?typeof y=="string"?this.Ye=y:a.blob&&Blob.prototype.isPrototypeOf(y)?this.ne=y:a.formData&&FormData.prototype.isPrototypeOf(y)?this.Fr=y:a.searchParams&&URLSearchParams.prototype.isPrototypeOf(y)?this.Ye=y.toString():a.arrayBuffer&&a.blob&&c(y)?(this.U=I(y.buffer),this._t=new Blob([this.U])):a.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(y)||u(y))?this.U=I(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.ne&&this.ne.type?this.headers.set("content-type",this.ne.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.ne)return Promise.resolve(this.ne);if(this.U)return Promise.resolve(new Blob([this.U]));if(this.Fr)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this.Ye]))},this.arrayBuffer=function(){return this.U?d(this)||Promise.resolve(this.U):this.blob().then(b)}),this.text=function(){var y=d(this);if(y)return y;if(this.ne)return w(this.ne);if(this.U)return Promise.resolve(E(this.U));if(this.Fr)throw new Error("could not read FormData body as text");return Promise.resolve(this.Ye)},a.formData&&(this.formData=function(){return this.text().then(k)}),this.json=function(){return this.text().then(JSON.parse)},this}var T=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function x(y){var v=y.toUpperCase();return T.indexOf(v)>-1?v:y}function Z(y,v){v=v||{};var V=v.body;if(y instanceof Z){if(y.bodyUsed)throw new TypeError("Already read");this.url=y.url,this.credentials=y.credentials,v.headers||(this.headers=new m(y.headers)),this.method=y.method,this.mode=y.mode,this.signal=y.signal,!V&&y._t!=null&&(V=y._t,y.bodyUsed=!0)}else this.url=String(y);if(this.credentials=v.credentials||this.credentials||"same-origin",(v.headers||!this.headers)&&(this.headers=new m(v.headers)),this.method=x(v.method||this.method||"GET"),this.mode=v.mode||this.mode||null,this.signal=v.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&V)throw new TypeError("Body not allowed for GET or HEAD requests");this.Ur(V)}Z.prototype.clone=function(){return new Z(this,{body:this._t})};function k(y){var v=new FormData;return y.trim().split("&").forEach(function(V){if(V){var D=V.split("="),U=D.shift().replace(/\+/g," "),L=D.join("=").replace(/\+/g," ");v.append(decodeURIComponent(U),decodeURIComponent(L))}}),v}function O(y){var v=new m,V=y.replace(/\r?\n[\t ]+/g," ");return V.split(/\r?\n/).forEach(function(D){var U=D.split(":"),L=U.shift().trim();if(L){var q=U.join(":").trim();v.append(L,q)}}),v}S.call(Z.prototype);function X(y,v){v||(v={}),this.type="default",this.status=v.status===void 0?200:v.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in v?v.statusText:"OK",this.headers=new m(v.headers),this.url=v.url||"",this.Ur(y)}S.call(X.prototype),X.prototype.clone=function(){return new X(this._t,{status:this.status,statusText:this.statusText,headers:new m(this.headers),url:this.url})},X.error=function(){var y=new X(null,{status:0,statusText:""});return y.type="error",y};var _=[301,302,303,307,308];X.redirect=function(y,v){if(_.indexOf(v)===-1)throw new RangeError("Invalid status code");return new X(null,{status:v,headers:{location:y}})},s.DOMException=o.DOMException;try{new s.DOMException}catch(y){s.DOMException=function(v,V){this.message=v,this.name=V;var D=Error(v);this.stack=D.stack},s.DOMException.prototype=Object.create(Error.prototype),s.DOMException.prototype.constructor=s.DOMException}function tt(y,v){return new Promise(function(V,D){var U=new Z(y,v);if(U.signal&&U.signal.aborted)return D(new s.DOMException("Aborted","AbortError"));var L=new XMLHttpRequest;function q(){L.abort()}L.onload=function(){var lt={status:L.status,statusText:L.statusText,headers:O(L.getAllResponseHeaders()||"")};lt.url="responseURL"in L?L.responseURL:lt.headers.get("X-Request-URL");var Zt="response"in L?L.response:L.responseText;V(new X(Zt,lt))},L.onerror=function(){D(new TypeError("Network request failed"))},L.ontimeout=function(){D(new TypeError("Network request failed"))},L.onabort=function(){D(new s.DOMException("Aborted","AbortError"))},L.open(U.method,U.url,!0),U.credentials==="include"?L.withCredentials=!0:U.credentials==="omit"&&(L.withCredentials=!1),"responseType"in L&&a.blob&&(L.responseType="blob"),U.headers.forEach(function(lt,Zt){L.setRequestHeader(Zt,lt)}),U.signal&&(U.signal.addEventListener("abort",q),L.onreadystatechange=function(){L.readyState===4&&U.signal.removeEventListener("abort",q)}),L.send(typeof U._t>"u"?null:U._t)})}return tt.polyfill=!0,o.fetch||(o.fetch=tt,o.Headers=m,o.Request=Z,o.Response=X),s.Headers=m,s.Request=Z,s.Response=X,s.fetch=tt,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})(dc,dc.exports);var Ho=dc.exports,Mo=Hc(Ho),GR=UE({__proto__:null,default:Mo},[Ho]),rr=t=>{let e={};return t&&(typeof Headers<"u"&&t instanceof Headers||GR&&Ho.Headers&&t instanceof Ho.Headers?e=xR(t):Array.isArray(t)?t.forEach(([n,r])=>{n&&r!==void 0&&(e[n]=r)}):e=t),e},lf=t=>t.replace(/([\s,]|#[^\n\r]+)+/g," ").trim(),LR=t=>{if(!Array.isArray(t.query)){let r=t,i=[`query=${encodeURIComponent(lf(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:lf(i),variables:e.variables?e.jsonSerializer.stringify(e.variables[o]):void 0}),r),[]);return`query=${encodeURIComponent(e.jsonSerializer.stringify(n))}`},XR=t=>e=>hr(void 0,null,function*(){var n;let{url:r,query:i,variables:o,operationName:s,fetch:a,fetchOptions:c,middleware:l}=e,u=nt({},e.headers),h="",p;t==="POST"?(p=MR(i,o,s,c.jsonSerializer),typeof p=="string"&&(u["Content-Type"]="application/json")):h=LR({query:i,variables:o,operationName:s,jsonSerializer:(n=c.jsonSerializer)!=null?n:Kc});let f=nt({method:t,headers:u,body:p},c),m=r,d=f;if(l){let g=yield Promise.resolve(l(cr(nt({},f),{url:r,operationName:s,variables:o}))),{url:b}=g,w=ei(g,["url"]);m=b,d=w}return h&&(m=`${m}?${h}`),yield a(m,d)}),WR=class{constructor(t,e={}){this.url=t,this.requestConfig=e,this.rawRequest=(...n)=>hr(this,null,function*(){let[r,i,o]=n,s=OR(r,i,o),a=this.requestConfig,{headers:c,fetch:l=Mo,method:u="POST",requestMiddleware:h,responseMiddleware:p}=a,f=ei(a,["headers","fetch","method","requestMiddleware","responseMiddleware"]),{url:m}=this;s.signal!==void 0&&(f.signal=s.signal);let{operationName:d}=Zl(s.query);return xl({url:m,query:s.query,variables:s.variables,headers:nt(nt({},rr(Vl(c))),rr(s.requestHeaders)),operationName:d,fetch:l,method:u,fetchOptions:f,middleware:h}).then(g=>(p&&p(g),g)).catch(g=>{throw p&&p(g),g})})}request(t,...e){return hr(this,null,function*(){let[n,r]=e,i=VR(t,n,r),o=this.requestConfig,{headers:s,fetch:a=Mo,method:c="POST",requestMiddleware:l,responseMiddleware:u}=o,h=ei(o,["headers","fetch","method","requestMiddleware","responseMiddleware"]),{url:p}=this;i.signal!==void 0&&(h.signal=i.signal);let{query:f,operationName:m}=Zl(i.document);return xl({url:p,query:f,variables:i.variables,headers:nt(nt({},rr(Vl(s))),rr(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=NR(t,e),i=this.requestConfig,{headers:o}=i,s=ei(i,["headers"]);r.signal!==void 0&&(s.signal=r.signal);let a=r.documents.map(({document:l})=>Zl(l).query),c=r.documents.map(({variables:l})=>l);return xl({url:this.url,query:a,variables:c,headers:nt(nt({},rr(Vl(o))),rr(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}},xl=t=>hr(void 0,null,function*(){var e,n;let{query:r,variables:i,fetchOptions:o}=t,s=XR(ZR((e=t.method)!=null?e:"post")),a=Array.isArray(t.query),c=yield s(t),l=yield PR(c,(n=o.jsonSerializer)!=null?n:Kc),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=ei(p,["errors"]),m=o.errorPolicy==="ignore"?f:l;return cr(nt({},a?{data:m}:m),{headers:c.headers,status:c.status})}else{let p=typeof l=="string"?{error:l}:l;throw new jm(cr(nt({},p),{status:c.status,headers:c.headers}),{query:r,variables:i})}}),MR=(t,e,n,r)=>{let i=r!=null?r:Kc;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)},PR=(t,e)=>hr(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()}),Vl=t=>typeof t=="function"?t():t,fc={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)}}})(fc,fc.exports);var UR=fc.exports,Tn=Hc(UR),zo=function(){return zo=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},zo.apply(this,arguments)},Po=new Map,mc=new Map,Qm=!0,Bo=!1;function $m(t){return t.replace(/[\s,]+/g," ").trim()}function FR(t){return $m(t.source.body.substring(t.start,t.end))}function AR(t){var e=new Set,n=[];return t.definitions.forEach(function(r){if(r.kind==="FragmentDefinition"){var i=r.name.value,o=FR(r.loc),s=mc.get(i);s&&!s.has(o)?Qm&&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||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`
398
+ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):s||mc.set(i,s=new Set),s.add(o),e.has(o)||(e.add(o),n.push(r))}else n.push(r)}),zo(zo({},t),{definitions:n})}function DR(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 JR(t){var e=$m(t);if(!Po.has(e)){var n=Yc(t,{experimentalFragmentVariables:Bo,allowLegacyFragmentVariables:Bo});if(!n||n.kind!=="Document")throw new Error("Not a valid GraphQL document.");Po.set(e,DR(AR(n)))}return Po.get(e)}function Jt(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]}),JR(r)}function YR(){Po.clear(),mc.clear()}function KR(){Qm=!1}function _R(){Bo=!0}function HR(){Bo=!1}var Kr={gql:Jt,resetCaches:YR,disableFragmentWarnings:KR,enableExperimentalFragmentVariables:_R,disableExperimentalFragmentVariables:HR};(function(t){t.gql=Kr.gql,t.resetCaches=Kr.resetCaches,t.disableFragmentWarnings=Kr.disableFragmentWarnings,t.enableExperimentalFragmentVariables=Kr.enableExperimentalFragmentVariables,t.disableExperimentalFragmentVariables=Kr.disableExperimentalFragmentVariables})(Jt||(Jt={}));Jt.default=Jt;var qm=Jt`
399
399
  fragment MatchParts on MatchConfig {
400
400
  regexValue
401
401
  matchValue
402
402
  }
403
- `,PE=Ut`
403
+ `,zR=Jt`
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
- `,ME=Ut`
429
+ `,BR=Jt`
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
- `,FE=Ut`
441
+ `,jR=Jt`
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
- `,AE=Ut`
453
+ `,QR=Jt`
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
- `,JE=Ut`
463
+ `,$R=Jt`
464
464
  mutation pushMetrics($metrics: [MetricInput]!) {
465
465
  pushMetrics(metrics: $metrics)
466
466
  }
467
- `,DE=Ut`
467
+ `,qR=Jt`
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
- `,YE=Ut`
483
+ `,tC=Jt`
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
- ${dm}
569
- `,KE=Ut`
568
+ ${qm}
569
+ `,eC=Jt`
570
570
  query Ignore($id: ID!) {
571
571
  ignore(id: $id)
572
572
  }
573
- `,_E=Ut`
573
+ `,nC=Jt`
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
- ${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(`
622
+ ${qm}
623
+ `,rC=(t,e,n,r)=>t();function iC(t,e=rC){return{PushPayload(n,r){return e(i=>t.request(zR,n,nt(nt({},r),i)),"PushPayload","mutation",n)},PushPayloadCompressed(n,r){return e(i=>t.request(BR,n,nt(nt({},r),i)),"PushPayloadCompressed","mutation",n)},identifySession(n,r){return e(i=>t.request(jR,n,nt(nt({},r),i)),"identifySession","mutation",n)},addSessionProperties(n,r){return e(i=>t.request(QR,n,nt(nt({},r),i)),"addSessionProperties","mutation",n)},pushMetrics(n,r){return e(i=>t.request($R,n,nt(nt({},r),i)),"pushMetrics","mutation",n)},addSessionFeedback(n,r){return e(i=>t.request(qR,n,nt(nt({},r),i)),"addSessionFeedback","mutation",n)},initializeSession(n,r){return e(i=>t.request(tC,n,nt(nt({},r),i)),"initializeSession","mutation",n)},Ignore(n,r){return e(i=>t.request(eC,n,nt(nt({},r),i)),"Ignore","query",n)},GetSamplingConfig(n,r){return e(i=>t.request(nC,n,nt(nt({},r),i)),"GetSamplingConfig","query",n)}}}var wn=(t=>(t.DeviceMemory="DeviceMemory",t.ViewportHeight="ViewportHeight",t.ViewportWidth="ViewportWidth",t.ScreenHeight="ScreenHeight",t.ScreenWidth="ScreenWidth",t.ViewportArea="ViewportArea",t))(wn||{}),he=(t=>(t.Device="Device",t.WebVital="WebVital",t.Performance="Performance",t.Frontend="Frontend",t.Backend="Backend",t))(he||{});function oC(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 sC(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 yc(t){return Object.prototype.toString.call(t)==="[object Object]"}function ty(t,e){if(e===0)return!0;let n=Object.keys(t);for(let r of n)if(yc(t[r])&&ty(t[r],e-1))return!0;return!1}function gc(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]=sC(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 yc(a)&&Object.keys(a).length>n.numOfKeysLimit||typeof a=="function"?!0:a instanceof Event&&a.isTrusted===!1?Object.keys(a).length===1:!!(yc(a)&&ty(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 ey=900*1e3;function wo(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 aC={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 bc(t,e){function n(i,o,s){if(typeof document<"u"){s=wo({},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,"",wo({},o,{expires:-1}))},withAttributes:function(i){return bc(this.converter,wo({},this.attributes,i))},withConverter:function(i){return bc(wo({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(e)},converter:{value:Object.freeze(t)}})}var Ol=bc(aC,{path:"/"}),ny="localStorage",vc=!0,lC=class{constructor(){ai(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]}},cC=class{getItem(t){var e;return(e=Ol.get(t))!=null?e:""}setItem(t,e){if(!vc)return;let n=new Date;n.setTime(n.getTime()+ey),Ol.set(t,e,{expires:n})}removeItem(t){vc&&Ol.remove(t)}},ps=new lC,jo=new cC,zc=()=>{try{switch(ny){case"localStorage":return window.localStorage;case"sessionStorage":return window.sessionStorage}}catch(t){return ps}},uC=t=>{ny=t},cf=t=>{vc=t},ry=t=>{try{return zc().getItem(t)}catch(e){return Ke("storage","debug",`failed to get item ${t}; using global storage`,e),ps.getItem(t)}},iy=(t,e)=>{jo.setItem(t,e);try{return zc().setItem(t,e)}catch(n){return Ke("storage","debug",`failed to set item ${t}; using global storage`,n),ps.setItem(t,e)}},hC=t=>{jo.removeItem(t);try{return zc().removeItem(t)}catch(e){return Ke("storage","debug",`failed to remove item ${t}; using global storage`,e),ps.removeItem(t)}},mi=(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))(mi||{}),ds=t=>`${mi.SESSION_DATA}_${t}`,rn=()=>{var t;return typeof globalThis<"u"&&(t=globalThis.persistentSessionSecureID)!=null&&t.length?globalThis.persistentSessionSecureID:oy()},pC=t=>{typeof globalThis<"u"&&t!=null&&t.length&&(globalThis.persistentSessionSecureID=t)},oy=()=>{var t;return(t=ry(mi.SESSION_ID))!=null?t:""},sy=t=>{iy(mi.SESSION_ID,t)},dC=t=>{let e=ds(t);return JSON.parse(ry(e)||"{}")},fC=t=>{t||(t=oy());let e=dC(t);if(e&&e.lastPushTime&&Date.now()-e.lastPushTime<ey)return e;hC(ds(t))},ay=function(t){if(!(t!=null&&t.sessionSecureID))return;let e=t.sessionSecureID;pC(e),iy(ds(e),JSON.stringify(t))},mC=function(){let t=jo.getItem(mi.SESSION_ID);sy(t);let e=ds(t),n=jo.getItem(e);try{ay(JSON.parse(n))}catch(r){}},ly=(t=>(t.BillingQuotaExceeded="BillingQuotaExceeded",t))(ly||{}),Bc=10,jc=1e3,Qc=500,yC=[ly.BillingQuotaExceeded.toString()],gC=t=>{var e;return((e=t.response.errors)==null?void 0:e.find(n=>yC.includes(n.message)))===void 0},bC=()=>{let t=(e,n,r,i,o=0)=>hr(void 0,null,function*(){try{return yield e()}catch(s){if(s instanceof jm&&!gC(s))throw s;if(o<Bc)return yield new Promise(a=>setTimeout(a,jc+Qc*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},At="feature_flag",cy="launchdarkly",vC="evaluation",wC=`${At}.set.id`,SC=`${At}.key`,IC=`${At}.contextKeys`,TC=`${At}.context.id`,EC=`${At}.result.value`,RC=`${At}.provider.name`,uf={kind:`${At}.result.reason.kind`,errorKind:`${At}.result.reason.errorKind`,ruleIndex:`${At}.result.reason.ruleIndex`,ruleId:`${At}.result.reason.ruleId`,prerequisiteKey:`${At}.result.reason.prerequisiteKey`,inExperiment:`${At}.result.reason.inExperiment`,bigSegmentsStatus:`${At}.result.reason.bigSegmentsStatus`},CC=`${At}.result.variationIndex`,kC=`${cy}.application.id`,ZC=`${cy}.application.version`,xC="$ld:telemetry:session:init",VC="$ld:telemetry:error",hf="$ld:telemetry:track",OC="$ld:telemetry:metric",uy="document_load",NC="result.status";function hy(t){return t.includes("%")||t.includes(":")?t.replace(/%/g,"%25").replace(/:/g,"%3A"):t}function py(t){return t.kind==="multi"}function pf(t){return py(t)?Object.keys(t).sort().filter(e=>e!=="kind").map(e=>`${e}:${hy(t[e].key)}`).join(":"):t.key}function df(t){return py(t)?Object.keys(t).sort().filter(e=>e!=="kind").map(e=>({[e]:hy(t[e].key)})).reduce((e,n)=>nt(nt({},e),n),{}):t.key}var GC=class{constructor(t,e){ai(this,"client"),ai(this,"metadata"),this.client=t,this.metadata=e}getHooks(t){return[]}init(t){this.client.track(xC,{sessionID:t})}recordGauge(t,e){var n;e.category!==he.WebVital&&e.name!==uy||e.name!=="Jank"&&this.client.track(`${OC}:${e.name.toLowerCase()}`,cr(nt({},(n=e.tags)==null?void 0:n.map(r=>({[r.name]:r.value})).reduce((r,i)=>nt(nt({},r),i),{})),{category:e.category,group:e.group,sessionID:t}),e.value)}identify(t,e,n={},r){}error(t,e){this.client.track(VC,cr(nt({},e),{sessionID:t}))}track(t,e){let n=e.event;this.client.track(n?`${hf}:${n}`:hf,cr(nt({},e),{sessionID:t}))}},LC=class extends Yo{constructor(t,e){super(),ai(this,"client"),this.client=new GC(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 XC(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 WC=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)},MC=()=>{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},PC=class{constructor(t){ai(this,"sessionSecureID");try{t!=null&&t.storageMode&&uC(t==null?void 0:t.storageMode),cf(!!(t!=null&&t.sessionCookie)),t!=null&&t.sessionCookie?mC():cf(!1);let e=rn(),n=fC(e);n!=null&&n.sessionSecureID?this.sessionSecureID=n.sessionSecureID:(this.sessionSecureID=MC(),sy(this.sessionSecureID),ay({sessionSecureID:this.sessionSecureID,projectID:0,payloadID:1,sessionStartTime:Date.now(),lastPushTime:Date.now()}))}catch(e){Ke("Error initializing @launchdarkly observability plugin","error",e)}}},Qo=class extends Yo{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])}},kn;typeof globalThis<"u"?globalThis.LDObserve?kn=globalThis.LDObserve:(kn=new Qo,globalThis.LDObserve=kn):kn=new Qo;var UC=Object.freeze(Object.defineProperty({__proto__:null,get LDObserve(){return kn}},Symbol.toStringTag,{value:"Module"})),FC=Object.defineProperty,AC=Object.defineProperties,DC=Object.getOwnPropertyDescriptors,ff=Object.getOwnPropertySymbols,JC=Object.prototype.hasOwnProperty,YC=Object.prototype.propertyIsEnumerable,wc=(t,e,n)=>e in t?FC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,bt=(t,e)=>{for(var n in e||(e={}))JC.call(e,n)&&wc(t,n,e[n]);if(ff)for(var n of ff(e))YC.call(e,n)&&wc(t,n,e[n]);return t},zt=(t,e)=>AC(t,DC(e)),St=(t,e,n)=>wc(t,typeof e!="symbol"?e+"":e,n),fs=(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())}),dy={exports:{}},mf={exports:{}},yf;function KC(){return yf||(yf=1,(function(t,e){(function(n,r){t.exports=r()})(_c,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 g=0;g<u.length;g++)d[u[g]]!==void 0&&this["set"+r(u[g])](d[u[g]])}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()||"",g=this.getLineNumber()||"",b=this.getColumnNumber()||"",w=this.getFunctionName()||"";return this.getIsEval()?d?"[eval] ("+d+":"+g+":"+b+")":"[eval]:"+g+":"+b:w?w+" ("+d+":"+g+":"+b+")":d+":"+g+":"+b}},h.fromString=function(d){var g=d.indexOf("("),b=d.lastIndexOf(")"),w=d.substring(0,g),E=d.substring(g+1,b).split(","),I=d.substring(b+1);if(I.indexOf("@")===0)var S=/@(.+?)(?::(\d+))?(?::(\d+))?$/.exec(I,""),T=S[1],x=S[2],Z=S[3];return new h({functionName:w,args:E||void 0,fileName:T,lineNumber:x||void 0,columnNumber:Z||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(g){this[d]=!!g}})(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(g){if(!n(g))throw new TypeError(d+" must be a Number");this[d]=Number(g)}})(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(g){this[d]=String(g)}})(a[m]);return h})})(mf)),mf.exports}(function(t,e){(function(n,r){t.exports=r(KC())})(_c,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)}}})})(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+`'
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)}}})})(dy);var _C=dy.exports,gf=Hc(_C);function ms(t){try{return gf.parse(t)}catch(e){try{return gf.parse(new Error)}catch(n){return console.warn("Highlight Warning: failed to parse error",{originalError:e,secondaryError:n}),[]}}}function HC(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=ms(l));let h=[gc(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]?oC(s,a,c=>(...l)=>{c.apply(this,l);try{t(zC(a,e,...l))}catch(u){c("highlight logger error:",u,...l)}}):()=>{}}}function zC(t,e,...n){let r=ms(new Error),i=e.serializeConsoleAttributes?n.map(o=>typeof o=="object"?gc(o,e.stringifyOptions):o):n.filter(o=>typeof o!="object").map(o=>`${o}`);return{type:t,trace:r.slice(1),value:i,attributes:gc(n.filter(o=>typeof o=="object").reduce((o,s)=>bt(bt({},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=ms(c),u={};e instanceof Error&&(e=e.message,e.cause&&(u={"exception.cause":e.cause}));let h=jC(l);t({error:c,event:Tn(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?Tn(u):void 0})}var BC=(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),St(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}},jC=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},bf=['["\\"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}','["{}"]','"{}"','[""]','""','["\\"\\""]','""'],vf=["websocket error",'\\"ResizeObserver loop'],QC=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{},Zn="1.9.0",wf=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;function $C(t){var e=new Set([t]),n=new Set,r=t.match(wf);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(wf);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 qC=$C(Zn),tk=Zn.split(".")[0],ci=Symbol.for("opentelemetry.js.api."+tk),ui=QC;function yi(t,e,n,r){var i;r===void 0&&(r=!1);var o=ui[ci]=(i=ui[ci])!==null&&i!==void 0?i:{version:Zn};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!==Zn){var s=new Error("@opentelemetry/api: Registration of version v"+o.version+" for "+t+" does not match previously registered API v"+Zn);return n.error(s.stack||s.message),!1}return o[t]=e,n.debug("@opentelemetry/api: Registered a global for "+t+" v"+Zn+"."),!0}function On(t){var e,n,r=(e=ui[ci])===null||e===void 0?void 0:e.version;if(!(!r||!qC(r)))return(n=ui[ci])===null||n===void 0?void 0:n[t]}function gi(t,e){e.debug("@opentelemetry/api: Unregistering a global for "+t+" v"+Zn+".");var n=ui[ci];n&&delete n[t]}var ek=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},nk=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){this.Ar=e.namespace||"DiagComponentLogger"}return t.prototype.debug=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return _r("debug",this.Ar,e)},t.prototype.error=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return _r("error",this.Ar,e)},t.prototype.info=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return _r("info",this.Ar,e)},t.prototype.warn=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return _r("warn",this.Ar,e)},t.prototype.verbose=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return _r("verbose",this.Ar,e)},t})();function _r(t,e,n){var r=On("diag");if(r)return n.unshift(e),r[t].apply(r,nk([],ek(n),!1))}var Tt;(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"})(Tt||(Tt={}));function ik(t,e){t<Tt.NONE?t=Tt.NONE:t>Tt.ALL&&(t=Tt.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",Tt.ERROR),warn:n("warn",Tt.WARN),info:n("info",Tt.INFO),debug:n("debug",Tt.DEBUG),verbose:n("verbose",Tt.VERBOSE)}}var ok=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},sk=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))},ak="diag",Xe=(function(){function t(){function e(i){return function(){for(var o=[],s=0;s<arguments.length;s++)o[s]=arguments[s];var a=On("diag");if(a)return a[i].apply(a,sk([],ok(o),!1))}}var n=this,r=function(i,o){var s,a,c;if(o===void 0&&(o={logLevel:Tt.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=On("diag"),h=ik((a=o.logLevel)!==null&&a!==void 0?a:Tt.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 yi("diag",h,n,!0)};n.setLogger=r,n.disable=function(){gi(ak,n)},n.createComponentLogger=function(i){return new rk(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.N||(this.N=new t),this.N},t})(),lk=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},ck=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.")},uk=(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=lk(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=ck(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})(),hk=Symbol("BaggageEntryMetadata"),pk=Xe.instance();function dk(t){return t===void 0&&(t={}),new uk(new Map(Object.entries(t)))}function fk(t){return typeof t!="string"&&(pk.error("Cannot create baggage metadata from unknown type: "+typeof t),t=""),{__TYPE__:hk,toString:function(){return t}}}function $c(t){return Symbol.for(t)}var mk=(function(){function t(e){var n=this;n.Xe=e?new Map(e):new Map,n.getValue=function(r){return n.Xe.get(r)},n.setValue=function(r,i){var o=new t(n.Xe);return o.Xe.set(r,i),o},n.deleteValue=function(r){var i=new t(n.Xe);return i.Xe.delete(r),i}}return t})(),En=new mk,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)}})(),yk=(function(){function t(){}return t.prototype.createGauge=function(e,n){return Rk},t.prototype.createHistogram=function(e,n){return Ck},t.prototype.createCounter=function(e,n){return Ek},t.prototype.createUpDownCounter=function(e,n){return kk},t.prototype.createObservableGauge=function(e,n){return xk},t.prototype.createObservableCounter=function(e,n){return Zk},t.prototype.createObservableUpDownCounter=function(e,n){return Vk},t.prototype.addBatchObservableCallback=function(e,n){},t.prototype.removeBatchObservableCallback=function(e){},t})(),ys=(function(){function t(){}return t})(),gk=(function(t){Xn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.add=function(n,r){},e})(ys),bk=(function(t){Xn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.add=function(n,r){},e})(ys),vk=(function(t){Xn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.record=function(n,r){},e})(ys),wk=(function(t){Xn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.record=function(n,r){},e})(ys),qc=(function(){function t(){}return t.prototype.addCallback=function(e){},t.prototype.removeCallback=function(e){},t})(),Sk=(function(t){Xn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e})(qc),Ik=(function(t){Xn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e})(qc),Tk=(function(t){Xn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e})(qc),fy=new yk,Ek=new gk,Rk=new vk,Ck=new wk,kk=new bk,Zk=new Sk,xk=new Ik,Vk=new Tk;function Ok(){return fy}var an;(function(t){t[t.INT=0]="INT",t[t.DOUBLE=1]="DOUBLE"})(an||(an={}));var Nk={get:function(t,e){if(t!=null)return t[e]},keys:function(t){return t==null?[]:Object.keys(t)}},Gk={set:function(t,e,n){t!=null&&(t[e]=n)}},Lk=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},Xk=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))},Wk=(function(){function t(){}return t.prototype.active=function(){return En},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,Xk([r],Lk(i),!1))},t.prototype.bind=function(e,n){return n},t.prototype.enable=function(){return this},t.prototype.disable=function(){return this},t})(),Mk=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},Pk=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="context",Uk=new Wk,gs=(function(){function t(){}return t.getInstance=function(){return this.N||(this.N=new t),this.N},t.prototype.setGlobalContextManager=function(e){return yi(Gl,e,Xe.instance())},t.prototype.active=function(){return this.oi().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.oi()).with.apply(i,Pk([e,n,r],Mk(o),!1))},t.prototype.bind=function(e,n){return this.oi().bind(e,n)},t.prototype.oi=function(){return On(Gl)||Uk},t.prototype.disable=function(){this.oi().disable(),gi(Gl,Xe.instance())},t})(),_e;(function(t){t[t.NONE=0]="NONE",t[t.SAMPLED=1]="SAMPLED"})(_e||(_e={}));var my="0000000000000000",yy="00000000000000000000000000000000",gy={traceId:yy,spanId:my,traceFlags:_e.NONE},ni=(function(){function t(e){e===void 0&&(e=gy),this.cr=e}return t.prototype.spanContext=function(){return this.cr},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})(),tu=$c("OpenTelemetry Context Key SPAN");function eu(t){return t.getValue(tu)||void 0}function Fk(){return eu(gs.getInstance().active())}function nu(t,e){return t.setValue(tu,e)}function Ak(t){return t.deleteValue(tu)}function Dk(t,e){return nu(t,new ni(e))}function by(t){var e;return(e=eu(t))===null||e===void 0?void 0:e.spanContext()}var Jk=/^([0-9a-f]{32})$/i,Yk=/^[0-9a-f]{16}$/i;function vy(t){return Jk.test(t)&&t!==yy}function Kk(t){return Yk.test(t)&&t!==my}function bs(t){return vy(t.traceId)&&Kk(t.spanId)}function _k(t){return new ni(t)}var Ll=gs.getInstance(),wy=(function(){function t(){}return t.prototype.startSpan=function(e,n,r){r===void 0&&(r=Ll.active());var i=!!(n!=null&&n.root);if(i)return new ni;var o=r&&by(r);return Hk(o)&&bs(o)?new ni(o):new ni},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:Ll.active(),l=this.startSpan(e,o,c),u=nu(c,l);return Ll.with(u,a,void 0,l)}},t})();function Hk(t){return typeof t=="object"&&typeof t.spanId=="string"&&typeof t.traceId=="string"&&typeof t.traceFlags=="number"}var zk=new wy,Bk=(function(){function t(e,n,r,i){this.ur=e,this.name=n,this.version=r,this.options=i}return t.prototype.startSpan=function(e,n,r){return this.vo().startSpan(e,n,r)},t.prototype.startActiveSpan=function(e,n,r,i){var o=this.vo();return Reflect.apply(o.startActiveSpan,o,arguments)},t.prototype.vo=function(){if(this.b)return this.b;var e=this.ur.getDelegateTracer(this.name,this.version,this.options);return e?(this.b=e,this.b):zk},t})(),jk=(function(){function t(){}return t.prototype.getTracer=function(e,n,r){return new wy},t})(),Qk=new jk,Sf=(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 Bk(this,e,n,r)},t.prototype.getDelegate=function(){var e;return(e=this.b)!==null&&e!==void 0?e:Qk},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})(),$o;(function(t){t[t.NOT_RECORD=0]="NOT_RECORD",t[t.RECORD=1]="RECORD",t[t.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})($o||($o={}));var hi;(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"})(hi||(hi={}));var qo;(function(t){t[t.UNSET=0]="UNSET",t[t.OK=1]="OK",t[t.ERROR=2]="ERROR"})(qo||(qo={}));var st=gs.getInstance(),M=Xe.instance(),$k=(function(){function t(){}return t.prototype.getMeter=function(e,n,r){return fy},t})(),qk=new $k,Xl="metrics",tZ=(function(){function t(){}return t.getInstance=function(){return this.N||(this.N=new t),this.N},t.prototype.setGlobalMeterProvider=function(e){return yi(Xl,e,Xe.instance())},t.prototype.getMeterProvider=function(){return On(Xl)||qk},t.prototype.getMeter=function(e,n,r){return this.getMeterProvider().getMeter(e,n,r)},t.prototype.disable=function(){gi(Xl,Xe.instance())},t})(),Je=tZ.getInstance(),eZ=(function(){function t(){}return t.prototype.inject=function(e,n){},t.prototype.extract=function(e,n){return e},t.prototype.fields=function(){return[]},t})(),ru=$c("OpenTelemetry Baggage Key");function Sy(t){return t.getValue(ru)||void 0}function nZ(){return Sy(gs.getInstance().active())}function rZ(t,e){return t.setValue(ru,e)}function iZ(t){return t.deleteValue(ru)}var Wl="propagation",oZ=new eZ,sZ=(function(){function t(){this.createBaggage=dk,this.getBaggage=Sy,this.getActiveBaggage=nZ,this.setBaggage=rZ,this.deleteBaggage=iZ}return t.getInstance=function(){return this.N||(this.N=new t),this.N},t.prototype.setGlobalPropagator=function(e){return yi(Wl,e,Xe.instance())},t.prototype.inject=function(e,n,r){return r===void 0&&(r=Gk),this.Ri().inject(e,n,r)},t.prototype.extract=function(e,n,r){return r===void 0&&(r=Nk),this.Ri().extract(e,n,r)},t.prototype.fields=function(){return this.Ri().fields()},t.prototype.disable=function(){gi(Wl,Xe.instance())},t.prototype.Ri=function(){return On(Wl)||oZ},t})(),pe=sZ.getInstance(),Ml="trace",aZ=(function(){function t(){this.si=new Sf,this.wrapSpanContext=_k,this.isSpanContextValid=bs,this.deleteSpan=Ak,this.getSpan=eu,this.getActiveSpan=Fk,this.getSpanContext=by,this.setSpan=nu,this.setSpanContext=Dk}return t.getInstance=function(){return this.N||(this.N=new t),this.N},t.prototype.setGlobalTracerProvider=function(e){var n=yi(Ml,this.si,Xe.instance());return n&&this.si.setDelegate(e),n},t.prototype.getTracerProvider=function(){return On(Ml)||this.si},t.prototype.getTracer=function(e,n){return this.getTracerProvider().getTracer(e,n)},t.prototype.disable=function(){gi(Ml,Xe.instance()),this.si=new Sf},t})(),pt=aZ.getInstance(),Iy=$c("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function Ty(t){return t.setValue(Iy,!0)}function iu(t){return t.getValue(Iy)===!0}var lZ="=",Sc=";",Ic=",",Pl="baggage",cZ=180,uZ=4096,hZ=8192,pZ=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 dZ(t){return t.reduce(function(e,n){var r=""+e+(e!==""?Ic:"")+n;return r.length>hZ?e:r},"")}function fZ(t){return t.getAllEntries().map(function(e){var n=pZ(e,2),r=n[0],i=n[1],o=encodeURIComponent(r)+"="+encodeURIComponent(i.value);return i.metadata!==void 0&&(o+=Sc+i.metadata.toString()),o})}function mZ(t){var e=t.split(Sc);if(!(e.length<=0)){var n=e.shift();if(n){var r=n.indexOf(lZ);if(!(r<=0)){var i=decodeURIComponent(n.substring(0,r).trim()),o=decodeURIComponent(n.substring(r+1).trim()),s;return e.length>0&&(s=fk(e.join(Sc))),{key:i,value:o,metadata:s}}}}}var Ey=(function(){function t(){}return t.prototype.inject=function(e,n,r){var i=pe.getBaggage(e);if(!(!i||iu(e))){var o=fZ(i).filter(function(a){return a.length<=uZ}).slice(0,cZ),s=dZ(o);s.length>0&&r.set(n,Pl,s)}},t.prototype.extract=function(e,n,r){var i=r.get(n,Pl),o=Array.isArray(i)?i.join(Ic):i;if(!o)return e;var s={};if(o.length===0)return e;var a=o.split(Ic);return a.forEach(function(c){var l=mZ(c);if(l){var u={value:l.value};l.metadata&&(u.metadata=l.metadata),s[l.key]=u}}),Object.entries(s).length===0?e:pe.setBaggage(e,pe.createBaggage(s))},t.prototype.fields=function(){return[Pl]},t})(),Ry=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.")},yZ=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 Uo(t){var e,n,r={};if(typeof t!="object"||t==null)return r;try{for(var i=Ry(Object.entries(t)),o=i.next();!o.done;o=i.next()){var s=yZ(o.value,2),a=s[0],c=s[1];if(!gZ(a)){M.warn("Invalid attribute key: "+a);continue}if(!Cy(c)){M.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 gZ(t){return typeof t=="string"&&t.length>0}function Cy(t){return t==null?!0:Array.isArray(t)?bZ(t):ky(t)}function bZ(t){var e,n,r;try{for(var i=Ry(t),o=i.next();!o.done;o=i.next()){var s=o.value;if(s!=null){if(!r){if(ky(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 ky(t){switch(typeof t){case"number":case"boolean":case"string":return!0}return!1}function vZ(){return function(t){M.error(wZ(t))}}function wZ(t){return typeof t=="string"?t:JSON.stringify(SZ(t))}function SZ(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 IZ=vZ();function ln(t){try{IZ(t)}catch(e){}}var Ne;(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"})(Ne||(Ne={}));var TZ=",",EZ=["OTEL_SDK_DISABLED"];function RZ(t){return EZ.indexOf(t)>-1}var CZ=["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 kZ(t){return CZ.indexOf(t)>-1}var ZZ=["OTEL_NO_PATCH_MODULES","OTEL_PROPAGATORS","OTEL_SEMCONV_STABILITY_OPT_IN"];function xZ(t){return ZZ.indexOf(t)>-1}var Fo=1/0,Ao=128,VZ=128,OZ=128,Zy={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:Tt.INFO,OTEL_NO_PATCH_MODULES:[],OTEL_PROPAGATORS:["tracecontext","baggage"],OTEL_RESOURCE_ATTRIBUTES:"",OTEL_SERVICE_NAME:"",OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT:Fo,OTEL_ATTRIBUTE_COUNT_LIMIT:Ao,OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT:Fo,OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT:Ao,OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT:Fo,OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT:Ao,OTEL_SPAN_EVENT_COUNT_LIMIT:128,OTEL_SPAN_LINK_COUNT_LIMIT:128,OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT:VZ,OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT:OZ,OTEL_TRACES_EXPORTER:"",OTEL_TRACES_SAMPLER:Ne.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 NZ(t,e,n){if(typeof n[t]<"u"){var r=String(n[t]);e[t]=r.toLowerCase()==="true"}}function GZ(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 LZ(t,e,n,r){r===void 0&&(r=TZ);var i=n[t];typeof i=="string"&&(e[t]=i.split(r).map(function(o){return o.trim()}))}var XZ={ALL:Tt.ALL,VERBOSE:Tt.VERBOSE,DEBUG:Tt.DEBUG,INFO:Tt.INFO,WARN:Tt.WARN,ERROR:Tt.ERROR,NONE:Tt.NONE};function WZ(t,e,n){var r=n[t];if(typeof r=="string"){var i=XZ[r.toUpperCase()];i!=null&&(e[t]=i)}}function xy(t){var e={};for(var n in Zy){var r=n;switch(r){case"OTEL_LOG_LEVEL":WZ(r,e,t);break;default:if(RZ(r))NZ(r,e,t);else if(kZ(r))GZ(r,e,t);else if(xZ(r))LZ(r,e,t);else{var i=t[r];typeof i<"u"&&i!==null&&(e[r]=String(i))}}}return e}var ri=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{};function pr(){var t=xy(ri);return Object.assign({},Zy,t)}function MZ(){return xy(ri)}function If(t){return t>=48&&t<=57?t-48:t>=97&&t<=102?t-87:t-55}function ou(t){for(var e=new Uint8Array(t.length/2),n=0,r=0;r<t.length;r+=2){var i=If(t.charCodeAt(r)),o=If(t.charCodeAt(r+1));e[n++]=i<<4|o}return e}var me=performance,PZ="1.30.1",UZ="process.runtime.name",FZ="telemetry.sdk.name",AZ="telemetry.sdk.language",DZ="telemetry.sdk.version",JZ=UZ,YZ=FZ,KZ=AZ,_Z=DZ,HZ="webjs",zZ=HZ,ir,Ul=(ir={},ir[YZ]="opentelemetry",ir[JZ]="browser",ir[KZ]=zZ,ir[_Z]=PZ,ir),BZ=9,jZ=6,QZ=Math.pow(10,jZ),ts=Math.pow(10,BZ);function de(t){var e=t/1e3,n=Math.trunc(e),r=Math.round(t%1e3*QZ);return[n,r]}function su(){var t=me.timeOrigin;if(typeof t!="number"){var e=me;t=e.timing&&e.timing.fetchStart}return t}function Nn(t){var e=de(su()),n=de(typeof t=="number"?t:me.now());return Vy(e,n)}function ii(t){if(au(t))return t;if(typeof t=="number")return t<su()?Nn(t):de(t);if(t instanceof Date)return de(t.getTime());throw TypeError("Invalid input type")}function $Z(t,e){var n=e[0]-t[0],r=e[1]-t[1];return r<0&&(n-=1,r+=ts),[n,r]}function Ye(t){return t[0]*ts+t[1]}function So(t){return t[0]*1e6+t[1]/1e3}function au(t){return Array.isArray(t)&&t.length===2&&typeof t[0]=="number"&&typeof t[1]=="number"}function Tf(t){return au(t)||typeof t=="number"||t instanceof Date}function Vy(t,e){var n=[t[0]+e[0],t[1]+e[1]];return n[1]>=ts&&(n[1]-=ts,n[0]+=1),n}var Gt;(function(t){t[t.SUCCESS=0]="SUCCESS",t[t.FAILED=1]="FAILED"})(Gt||(Gt={}));var qZ=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.")},Oy=(function(){function t(e){e===void 0&&(e={});var n;this.Ci=(n=e.propagators)!==null&&n!==void 0?n:[],this.ks=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=qZ(this.Ci),a=s.next();!a.done;a=s.next()){var c=a.value;try{c.inject(e,n,r)}catch(l){M.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){M.warn("Failed to extract with "+o.constructor.name+". Err: "+s.message)}return i},e)},t.prototype.fields=function(){return this.ks.slice()},t})(),Tc="[_0-9a-z-*/]",t1="[a-z]"+Tc+"{0,255}",e1="[a-z0-9]"+Tc+"{0,240}@[a-z]"+Tc+"{0,13}",n1=new RegExp("^(?:"+t1+"|"+e1+")$"),r1=/^[ -~]{0,255}[!-~]$/,i1=/,|=/;function o1(t){return n1.test(t)}function s1(t){return r1.test(t)&&!i1.test(t)}var Ef=32,a1=512,Rf=",",Cf="=",l1=(function(){function t(e){this.We=new Map,e&&this.Zs(e)}return t.prototype.set=function(e,n){var r=this.wo();return r.We.has(e)&&r.We.delete(e),r.We.set(e,n),r},t.prototype.unset=function(e){var n=this.wo();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.xs().reduce(function(n,r){return n.push(r+Cf+e.get(r)),n},[]).join(Rf)},t.prototype.Zs=function(e){e.length>a1||(this.We=e.split(Rf).reverse().reduce(function(n,r){var i=r.trim(),o=i.indexOf(Cf);if(o!==-1){var s=i.slice(0,o),a=i.slice(o+1,r.length);o1(s)&&s1(a)&&n.set(s,a)}return n},new Map),this.We.size>Ef&&(this.We=new Map(Array.from(this.We.entries()).reverse().slice(0,Ef))))},t.prototype.xs=function(){return Array.from(this.We.keys()).reverse()},t.prototype.wo=function(){var e=new t;return e.We=new Map(this.We),e},t})(),Do="traceparent",Fl="tracestate",c1="00",u1="(?!ff)[\\da-f]{2}",h1="(?![0]{32})[\\da-f]{32}",p1="(?![0]{16})[\\da-f]{16}",d1="[\\da-f]{2}",f1=new RegExp("^\\s?("+u1+")-("+h1+")-("+p1+")-("+d1+")(-.*)?\\s?$");function m1(t){var e=f1.exec(t);return!e||e[1]==="00"&&e[5]?null:{traceId:e[2],spanId:e[3],traceFlags:parseInt(e[4],16)}}var Ny=(function(){function t(){}return t.prototype.inject=function(e,n,r){var i=pt.getSpanContext(e);if(!(!i||iu(e)||!bs(i))){var o=c1+"-"+i.traceId+"-"+i.spanId+"-0"+Number(i.traceFlags||_e.NONE).toString(16);r.set(n,Do,o),i.traceState&&r.set(n,Fl,i.traceState.serialize())}},t.prototype.extract=function(e,n,r){var i=r.get(n,Do);if(!i)return e;var o=Array.isArray(i)?i[0]:i;if(typeof o!="string")return e;var s=m1(o);if(!s)return e;s.isRemote=!0;var a=r.get(n,Fl);if(a){var c=Array.isArray(a)?a.join(","):a;s.traceState=new l1(typeof c=="string"?c:void 0)}return pt.setSpanContext(e,s)},t.prototype.fields=function(){return[Do,Fl]},t})(),y1="[object Object]",g1="[object Null]",b1="[object Undefined]",v1=Function.prototype,Gy=v1.toString,w1=Gy.call(Object),S1=I1(Object.getPrototypeOf,Object),Ly=Object.prototype,Xy=Ly.hasOwnProperty,Rn=Symbol?Symbol.toStringTag:void 0,Wy=Ly.toString;function I1(t,e){return function(n){return t(e(n))}}function kf(t){if(!T1(t)||E1(t)!==y1)return!1;var e=S1(t);if(e===null)return!0;var n=Xy.call(e,"constructor")&&e.constructor;return typeof n=="function"&&n instanceof n&&Gy.call(n)===w1}function T1(t){return t!=null&&typeof t=="object"}function E1(t){return t==null?t===void 0?b1:g1:Rn&&Rn in Object(t)?R1(t):C1(t)}function R1(t){var e=Xy.call(t,Rn),n=t[Rn],r=!1;try{t[Rn]=void 0,r=!0}catch(o){}var i=Wy.call(t);return r&&(e?t[Rn]=n:delete t[Rn]),i}function C1(t){return Wy.call(t)}var k1=20;function My(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n=t.shift(),r=new WeakMap;t.length>0;)n=Py(n,t.shift(),0,r);return n}function Al(t){return es(t)?t.slice():t}function Py(t,e,n,r){n===void 0&&(n=0);var i;if(!(n>k1)){if(n++,Jo(t)||Jo(e)||Uy(e))i=Al(e);else if(es(t)){if(i=t.slice(),es(e))for(var o=0,s=e.length;o<s;o++)i.push(Al(e[o]));else if(Hr(e))for(var a=Object.keys(e),o=0,s=a.length;o<s;o++){var c=a[o];i[c]=Al(e[c])}}else if(Hr(t))if(Hr(e)){if(!Z1(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(Jo(l))typeof l>"u"?delete i[c]:i[c]=l;else{var u=i[c],h=l;if(Zf(t,c,r)||Zf(e,c,r))delete i[c];else{if(Hr(u)&&Hr(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]=Py(i[c],l,n,r)}}}}else i=e;return i}}function Zf(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 es(t){return Array.isArray(t)}function Uy(t){return typeof t=="function"}function Hr(t){return!Jo(t)&&!es(t)&&!Uy(t)&&typeof t=="object"}function Jo(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t>"u"||t instanceof Date||t instanceof RegExp||t===null}function Z1(t,e){return!(!kf(t)||!kf(e))}var x1=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 Fy(t,e){return typeof e=="string"?t===e:!!t.match(e)}function Ay(t,e){var n,r;if(!e)return!1;try{for(var i=x1(e),o=i.next();!o.done;o=i.next()){var s=o.value;if(Fy(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 V1=(function(){function t(){var e=this;this.Vs=new Promise(function(n,r){e.ki=n,e.Os=r})}return Object.defineProperty(t.prototype,"promise",{get:function(){return this.Vs},enumerable:!1,configurable:!0}),t.prototype.resolve=function(e){this.ki(e)},t.prototype.reject=function(e){this.Os(e)},t})(),O1=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},N1=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))},G1=(function(){function t(e,n){this.Ns=e,this.Gs=n,this.Zi=!1,this.Dr=new V1}return Object.defineProperty(t.prototype,"isCalled",{get:function(){return this.Zi},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"promise",{get:function(){return this.Dr.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.Zi){this.Zi=!0;try{Promise.resolve((e=this.Ns).call.apply(e,N1([this.Gs],O1(r),!1))).then(function(o){return n.Dr.resolve(o)},function(o){return n.Dr.reject(o)})}catch(o){this.Dr.reject(o)}}return this.Dr.promise},t})();function L1(t,e){return new Promise(function(n){st.with(Ty(st.active()),function(){t.export(e,function(r){n(r)})})})}var X1={Ls:L1},Dy=(function(){function t(){}return t.prototype.emit=function(e){},t})(),W1=new Dy,M1=(function(){function t(){}return t.prototype.getLogger=function(e,n,r){return new Dy},t})(),Jy=new M1,P1=(function(){function t(e,n,r,i){this.ur=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.ur.getDelegateLogger(this.name,this.version,this.options);return e?(this.b=e,this.b):W1},t})(),xf=(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 P1(this,e,n,r)},t.prototype.getDelegate=function(){var e;return(e=this.b)!==null&&e!==void 0?e:Jy},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})(),U1=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{},Io=Symbol.for("io.opentelemetry.js.api.logs"),zr=U1;function F1(t,e,n){return function(r){return r===t?e:n}}var Vf=1,A1=(function(){function t(){this.Ke=new xf}return t.getInstance=function(){return this.N||(this.N=new t),this.N},t.prototype.setGlobalLoggerProvider=function(e){return zr[Io]?this.getLoggerProvider():(zr[Io]=F1(Vf,e,Jy),this.Ke.setDelegate(e),e)},t.prototype.getLoggerProvider=function(){var e,n;return(n=(e=zr[Io])===null||e===void 0?void 0:e.call(zr,Vf))!==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[Io],this.Ke=new xf},t})(),Yy=A1.getInstance();function D1(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 J1(t){t.forEach(function(e){return e.disable()})}function Y1(t){var e,n,r=t.tracerProvider||pt.getTracerProvider(),i=t.meterProvider||Je.getMeterProvider(),o=t.loggerProvider||Yy.getLoggerProvider(),s=(n=(e=t.instrumentations)===null||e===void 0?void 0:e.flat())!==null&&n!==void 0?n:[];return D1(s,r,i,o),function(){J1(s)}}function Ec(t){return typeof t=="function"}var Dt=console.error.bind(console);function Br(t,e,n){var r=!!t[e]&&t.propertyIsEnumerable(e);Object.defineProperty(t,e,{configurable:!0,enumerable:r,writable:!0,value:n})}function bi(t){t&&t.logger&&(Ec(t.logger)?Dt=t.logger:Dt("new logger isn't a function, not replacing"))}function Ky(t,e,n){if(!t||!t[e]){Dt("no original function "+e+" to wrap");return}if(!n){Dt("no wrapper function"),Dt(new Error().stack);return}if(!Ec(t[e])||!Ec(n)){Dt("original object and wrapper must be functions");return}var r=t[e],i=n(r,e);return Br(i,"__original",r),Br(i,"__unwrap",function(){t[e]===i&&Br(t,e,r)}),Br(i,"__wrapped",!0),Br(t,e,i),i}function K1(t,e,n){if(t)Array.isArray(t)||(t=[t]);else{Dt("must provide one or more modules to patch"),Dt(new Error().stack);return}if(!(e&&Array.isArray(e))){Dt("must provide one or more functions to wrap on modules");return}t.forEach(function(r){e.forEach(function(i){Ky(r,i,n)})})}function _y(t,e){if(!t||!t[e]){Dt("no function to unwrap."),Dt(new Error().stack);return}if(!t[e].__unwrap)Dt("no original to unwrap to -- has "+e+" already been unwrapped?");else return t[e].__unwrap()}function _1(t,e){if(t)Array.isArray(t)||(t=[t]);else{Dt("must provide one or more modules to patch"),Dt(new Error().stack);return}if(!(e&&Array.isArray(e))){Dt("must provide one or more functions to unwrap on modules");return}t.forEach(function(n){e.forEach(function(r){_y(n,r)})})}bi.wrap=Ky;bi.massWrap=K1;bi.unwrap=_y;bi.massUnwrap=_1;var fe=bi,Rc=function(){return Rc=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},Rc.apply(this,arguments)},H1=(function(){function t(e,n,r){this.instrumentationName=e,this.instrumentationVersion=n,this.se={},this.re=fe.wrap,this.L=fe.unwrap,this.So=fe.massWrap,this.Io=fe.massUnwrap,this.setConfig(r),this.w=M.createComponentLogger({namespace:e}),this.tr=pt.getTracer(e,n),this.er=Je.getMeter(e,n),this.nr=Yy.getLogger(e,n),this.rr()}return Object.defineProperty(t.prototype,"meter",{get:function(){return this.er},enumerable:!1,configurable:!0}),t.prototype.setMeterProvider=function(e){this.er=e.getMeter(this.instrumentationName,this.instrumentationVersion),this.rr()},Object.defineProperty(t.prototype,"logger",{get:function(){return this.nr},enumerable:!1,configurable:!0}),t.prototype.setLoggerProvider=function(e){this.nr=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.rr=function(){},t.prototype.getConfig=function(){return this.se},t.prototype.setConfig=function(e){this.se=Rc({enabled:!0},e)},t.prototype.setTracerProvider=function(e){this.tr=e.getTracer(this.instrumentationName,this.instrumentationVersion)},Object.defineProperty(t.prototype,"tracer",{get:function(){return this.tr},enumerable:!1,configurable:!0}),t.prototype.To=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})(),z1=(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)}})(),Hy=(function(t){z1(e,t);function e(n,r,i){var o=t.call(this,n,r,i)||this;return o.se.enabled&&o.enable(),o}return e})(H1);function Of(t,e,n){var r,i;try{i=t()}catch(o){r=o}finally{return e(r,i),i}}function Ft(t){return typeof t=="function"&&typeof t.__original=="function"&&typeof t.__unwrap=="function"&&t.__wrapped===!0}var B1="exception.type",j1="exception.message",Q1="exception.stacktrace",Dl=B1,Jl=j1,$1=Q1,q1="exception",Cc=function(){return Cc=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},Cc.apply(this,arguments)},tx=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.")},Nf=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},ex=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))},nx=(function(){function t(e,n,r,i,o,s,a,c,l,u){a===void 0&&(a=[]),this.attributes={},this.links=[],this.events=[],this.Eo=0,this.br=0,this.Xs=0,this.status={code:qo.UNSET},this.endTime=[0,0],this.Yr=!1,this.ai=[-1,-1],this.name=r,this.cr=i,this.parentSpanId=s,this.kind=o,this.links=a;var h=Date.now();this.Ro=me.now(),this.Ws=h-(this.Ro+su()),this.Ms=c!=null,this.startTime=this.xi(c!=null?c:h),this.resource=e.resource,this.instrumentationLibrary=e.instrumentationLibrary,this.vr=e.getSpanLimits(),this.Ps=this.vr.attributeValueLengthLimit||0,u!=null&&this.setAttributes(u),this.Co=e.getActiveSpanProcessor(),this.Co.onStart(this,n)}return t.prototype.spanContext=function(){return this.cr},t.prototype.setAttribute=function(e,n){return n==null||this.Kr()?this:e.length===0?(M.warn("Invalid attribute key: "+e),this):Cy(n)?Object.keys(this.attributes).length>=this.vr.attributeCountLimit&&!Object.prototype.hasOwnProperty.call(this.attributes,e)?(this.Eo++,this):(this.attributes[e]=this.Us(n),this):(M.warn("Invalid attribute value set for key: "+e),this)},t.prototype.setAttributes=function(e){var n,r;try{for(var i=tx(Object.entries(e)),o=i.next();!o.done;o=i.next()){var s=Nf(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.Kr())return this;if(this.vr.eventCountLimit===0)return M.warn("No events allowed."),this.br++,this;this.events.length>=this.vr.eventCountLimit&&(this.br===0&&M.debug("Dropping extra events."),this.events.shift(),this.br++),Tf(n)&&(Tf(r)||(r=n),n=void 0);var i=Uo(n);return this.events.push({name:e,attributes:i,time:this.xi(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,ex([],Nf(e),!1)),this},t.prototype.setStatus=function(e){return this.Kr()?this:(this.status=Cc({},e),this.status.message!=null&&typeof e.message!="string"&&(M.warn("Dropping invalid status.message of type '"+typeof e.message+"', expected 'string'"),delete this.status.message),this)},t.prototype.updateName=function(e){return this.Kr()?this:(this.name=e,this)},t.prototype.end=function(e){if(this.Kr()){M.error(this.name+" "+this.cr.traceId+"-"+this.cr.spanId+" - You can only call end() on a span once.");return}this.Yr=!0,this.endTime=this.xi(e),this.ai=$Z(this.startTime,this.endTime),this.ai[0]<0&&(M.warn("Inconsistent start and end time, startTime > endTime. Setting span duration to 0ms.",this.startTime,this.endTime),this.endTime=this.startTime.slice(),this.ai=[0,0]),this.br>0&&M.warn("Dropped "+this.br+" events because eventCountLimit reached"),this.Co.onEnd(this)},t.prototype.xi=function(e){if(typeof e=="number"&&e<=me.now())return Nn(e+this.Ws);if(typeof e=="number")return de(e);if(e instanceof Date)return de(e.getTime());if(au(e))return e;if(this.Ms)return de(Date.now());var n=me.now()-this.Ro;return Vy(this.startTime,de(n))},t.prototype.isRecording=function(){return this.Yr===!1},t.prototype.recordException=function(e,n){var r={};typeof e=="string"?r[Jl]=e:e&&(e.code?r[Dl]=e.code.toString():e.name&&(r[Dl]=e.name),e.message&&(r[Jl]=e.message),e.stack&&(r[$1]=e.stack)),r[Dl]||r[Jl]?this.addEvent(q1,r,n):M.warn("Failed to record an exception "+e)},Object.defineProperty(t.prototype,"duration",{get:function(){return this.ai},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ended",{get:function(){return this.Yr},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"droppedAttributesCount",{get:function(){return this.Eo},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"droppedEventsCount",{get:function(){return this.br},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"droppedLinksCount",{get:function(){return this.Xs},enumerable:!1,configurable:!0}),t.prototype.Kr=function(){return this.Yr&&M.warn("Can not execute the operation on ended Span {traceId: "+this.cr.traceId+", spanId: "+this.cr.spanId+"}"),this.Yr},t.prototype.ko=function(e,n){return e.length<=n?e:e.substring(0,n)},t.prototype.Us=function(e){var n=this,r=this.Ps;return r<=0?(M.warn("Attribute value limit must be positive, got "+r),e):typeof e=="string"?this.ko(e,r):Array.isArray(e)?e.map(function(i){return typeof i=="string"?n.ko(i,r):i}):e},t})(),dr;(function(t){t[t.NOT_RECORD=0]="NOT_RECORD",t[t.RECORD=1]="RECORD",t[t.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(dr||(dr={}));var ns=(function(){function t(){}return t.prototype.shouldSample=function(){return{decision:dr.NOT_RECORD}},t.prototype.toString=function(){return"AlwaysOffSampler"},t})(),ur=(function(){function t(){}return t.prototype.shouldSample=function(){return{decision:dr.RECORD_AND_SAMPLED}},t.prototype.toString=function(){return"AlwaysOnSampler"},t})(),Yl=(function(){function t(e){var n,r,i,o;this.Zn=e.root,this.Zn||(ln(new Error("ParentBasedSampler must have a root sampler configured")),this.Zn=new ur),this.Zo=(n=e.remoteParentSampled)!==null&&n!==void 0?n:new ur,this.xo=(r=e.remoteParentNotSampled)!==null&&r!==void 0?r:new ns,this.Vo=(i=e.localParentSampled)!==null&&i!==void 0?i:new ur,this.Oo=(o=e.localParentNotSampled)!==null&&o!==void 0?o:new ns}return t.prototype.shouldSample=function(e,n,r,i,o,s){var a=pt.getSpanContext(e);return!a||!bs(a)?this.Zn.shouldSample(e,n,r,i,o,s):a.isRemote?a.traceFlags&_e.SAMPLED?this.Zo.shouldSample(e,n,r,i,o,s):this.xo.shouldSample(e,n,r,i,o,s):a.traceFlags&_e.SAMPLED?this.Vo.shouldSample(e,n,r,i,o,s):this.Oo.shouldSample(e,n,r,i,o,s)},t.prototype.toString=function(){return"ParentBased{root="+this.Zn.toString()+", remoteParentSampled="+this.Zo.toString()+", remoteParentNotSampled="+this.xo.toString()+", localParentSampled="+this.Vo.toString()+", localParentNotSampled="+this.Oo.toString()+"}"},t})(),Gf=(function(){function t(e){e===void 0&&(e=0),this.Vi=e,this.Vi=this.Fs(e),this.As=Math.floor(this.Vi*4294967295)}return t.prototype.shouldSample=function(e,n){return{decision:vy(n)&&this.Ds(n)<this.As?dr.RECORD_AND_SAMPLED:dr.NOT_RECORD}},t.prototype.toString=function(){return"TraceIdRatioBased{"+this.Vi+"}"},t.prototype.Fs=function(e){return typeof e!="number"||isNaN(e)?0:e>=1?1:e<=0?0:e},t.prototype.Ds=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})(),rx=Ne.AlwaysOn,or=1;function zy(){var t=pr();return{sampler:By(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 By(t){switch(t===void 0&&(t=pr()),t.OTEL_TRACES_SAMPLER){case Ne.AlwaysOn:return new ur;case Ne.AlwaysOff:return new ns;case Ne.ParentBasedAlwaysOn:return new Yl({root:new ur});case Ne.ParentBasedAlwaysOff:return new Yl({root:new ns});case Ne.TraceIdRatio:return new Gf(Lf(t));case Ne.ParentBasedTraceIdRatio:return new Yl({root:new Gf(Lf(t))});default:return M.error('OTEL_TRACES_SAMPLER value "'+t.OTEL_TRACES_SAMPLER+" invalid, defaulting to "+rx+'".'),new ur}}function Lf(t){if(t.OTEL_TRACES_SAMPLER_ARG===void 0||t.OTEL_TRACES_SAMPLER_ARG==="")return M.error("OTEL_TRACES_SAMPLER_ARG is blank, defaulting to "+or+"."),or;var e=Number(t.OTEL_TRACES_SAMPLER_ARG);return isNaN(e)?(M.error("OTEL_TRACES_SAMPLER_ARG="+t.OTEL_TRACES_SAMPLER_ARG+" was given, but it is invalid, defaulting to "+or+"."),or):e<0||e>1?(M.error("OTEL_TRACES_SAMPLER_ARG="+t.OTEL_TRACES_SAMPLER_ARG+" was given, but it is out of range ([0..1]), defaulting to "+or+"."),or):e}function ix(t){var e={sampler:By()},n=zy(),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 ox(t){var e,n,r,i,o,s,a,c,l,u,h,p,f=Object.assign({},t.spanLimits),m=MZ();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:Ao,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:Fo,Object.assign({},t,{spanLimits:f})}var sx=(function(){function t(e,n){this.wr=e,this.li=!1,this.Gn=[],this._r=0;var r=pr();this.Sr=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.Ys=typeof(n==null?void 0:n.exportTimeoutMillis)=="number"?n.exportTimeoutMillis:r.OTEL_BSP_EXPORT_TIMEOUT,this.ci=new G1(this._e,this),this.Sr>this.Oi&&(M.warn("BatchSpanProcessor: maxExportBatchSize must be smaller or equal to maxQueueSize, setting maxExportBatchSize to match maxQueueSize"),this.Sr=this.Oi)}return t.prototype.forceFlush=function(){return this.ci.isCalled?this.ci.promise:this.No()},t.prototype.onStart=function(e,n){},t.prototype.onEnd=function(e){this.ci.isCalled||e.spanContext().traceFlags&_e.SAMPLED&&this.Ks(e)},t.prototype.shutdown=function(){return this.ci.call()},t.prototype._e=function(){var e=this;return Promise.resolve().then(function(){return e.onShutdown()}).then(function(){return e.No()}).then(function(){return e.wr.shutdown()})},t.prototype.Ks=function(e){if(this.Gn.length>=this.Oi){this._r===0&&M.debug("maxQueueSize reached, dropping spans"),this._r++;return}this._r>0&&(M.warn("Dropped "+this._r+" spans because maxQueueSize reached"),this._r=0),this.Gn.push(e),this.Go()},t.prototype.No=function(){var e=this;return new Promise(function(n,r){for(var i=[],o=Math.ceil(e.Gn.length/e.Sr),s=0,a=o;s<a;s++)i.push(e.Lo());Promise.all(i).then(function(){n()}).catch(r)})},t.prototype.Lo=function(){var e=this;return this.Xo(),this.Gn.length===0?Promise.resolve():new Promise(function(n,r){var i=setTimeout(function(){r(new Error("Timeout"))},e.Ys);st.with(Ty(st.active()),function(){var o;e.Gn.length<=e.Sr?(o=e.Gn,e.Gn=[]):o=e.Gn.splice(0,e.Sr);for(var s=function(){return e.wr.export(o,function(h){var p;clearTimeout(i),h.code===Gt.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){ln(h),r(h)})})})},t.prototype.Go=function(){var e=this;if(!this.li){var n=function(){e.li=!0,e.Lo().finally(function(){e.li=!1,e.Gn.length>0&&(e.Xo(),e.Go())}).catch(function(r){e.li=!1,ln(r)})};if(this.Gn.length>=this.Sr)return n();this.ui===void 0&&(this.ui=setTimeout(function(){return n()},this.Js))}},t.prototype.Xo=function(){this.ui!==void 0&&(clearTimeout(this.ui),this.ui=void 0)},t})(),ax=(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)}})(),jy=(function(t){ax(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){ln(i)})},this.Gi=function(){r.forceFlush().catch(function(i){ln(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})(sx),lx=8,cx=16,ux=(function(){function t(){this.generateTraceId=Xf(cx),this.generateSpanId=Xf(lx)}return t})(),To=Array(32);function Xf(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 hx=(function(){function t(e,n,r){this._s=r;var i=ix(n);this.Hs=i.sampler,this.zs=i.generalLimits,this.vr=i.spanLimits,this.Wo=n.idGenerator||new ux,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=st.active()),n.root&&(r=pt.deleteSpan(r));var a=pt.getSpan(r);if(iu(r)){M.debug("Instrumentation suppressed, returning Noop Span");var c=pt.wrapSpanContext(gy);return c}var l=a==null?void 0:a.spanContext(),u=this.Wo.generateSpanId(),h,p,f;!l||!pt.isSpanContextValid(l)?h=this.Wo.generateTraceId():(h=l.traceId,p=l.traceState,f=l.spanId);var m=(i=n.kind)!==null&&i!==void 0?i:hi.INTERNAL,d=((o=n.links)!==null&&o!==void 0?o:[]).map(function(T){return{context:T.context,attributes:Uo(T.attributes)}}),g=Uo(n.attributes),b=this.Hs.shouldSample(r,h,e,m,g,d);p=(s=b.traceState)!==null&&s!==void 0?s:p;var w=b.decision===$o.RECORD_AND_SAMPLED?_e.SAMPLED:_e.NONE,E={traceId:h,spanId:u,traceFlags:w,traceState:p};if(b.decision===$o.NOT_RECORD){M.debug("Recording is off, propagating context in a non-recording span");var c=pt.wrapSpanContext(E);return c}var I=Uo(Object.assign(g,b.attributes)),S=new nx(this,r,e,E,m,f,d,n.startTime,void 0,I);return S},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:st.active(),l=this.startSpan(e,o,c),u=pt.setSpan(c,l);return st.with(u,a,void 0,l)}},t.prototype.getGeneralLimits=function(){return this.zs},t.prototype.getSpanLimits=function(){return this.vr},t.prototype.getActiveSpanProcessor=function(){return this._s.getActiveSpanProcessor()},t})(),px="service.name",dx="telemetry.sdk.name",fx="telemetry.sdk.language",mx="telemetry.sdk.version",yx=px,Wf=dx,Mf=fx,Pf=mx;function gx(){return"unknown_service"}var on=function(){return on=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},on.apply(this,arguments)},bx=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())})},vx=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}}},wx=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},pi=(function(){function t(e,n){var r=this,i;this.hi=e,this.asyncAttributesPending=n!=null,this.pi=(i=this.hi)!==null&&i!==void 0?i:{},this.Hr=n==null?void 0:n.then(function(o){return r.hi=Object.assign({},r.hi,o),r.asyncAttributesPending=!1,o},function(o){return M.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[yx]=gx(),e[Mf]=Ul[Mf],e[Wf]=Ul[Wf],e[Pf]=Ul[Pf],e))},Object.defineProperty(t.prototype,"attributes",{get:function(){var e;return this.asyncAttributesPending&&M.error("Accessing resource attributes before async attributes settled"),(e=this.hi)!==null&&e!==void 0?e:{}},enumerable:!1,configurable:!0}),t.prototype.waitForAsyncAttributes=function(){return bx(this,void 0,void 0,function(){return vx(this,function(e){switch(e.label){case 0:return this.asyncAttributesPending?[4,this.Hr]:[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=on(on({},this.pi),(r=e.pi)!==null&&r!==void 0?r:e.attributes);if(!this.Hr&&!e.Hr)return new t(i);var o=Promise.all([this.Hr,e.Hr]).then(function(s){var a,c=wx(s,2),l=c[0],u=c[1];return on(on(on(on({},n.pi),l),(a=e.pi)!==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.")},Uf=(function(){function t(e){this.di=e}return t.prototype.forceFlush=function(){var e,n,r=[];try{for(var i=Eo(this.di),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){ln(c||new Error("MultiSpanProcessor: forceFlush failed")),a()})})},t.prototype.onStart=function(e,n){var r,i;try{for(var o=Eo(this.di),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.di),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.di),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})(),Sx=(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})(),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(;!(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},Tx=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(t){t[t.resolved=0]="resolved",t[t.timeout=1]="timeout",t[t.error=2]="error",t[t.unresolved=3]="unresolved"})(Cn||(Cn={}));var Ex=(function(){function t(e){e===void 0&&(e={});var n,r;this.Ir=[],this.Li=new Map;var i=My({},zy(),ox(e));if(this.resource=(n=i.resource)!==null&&n!==void 0?n:pi.empty(),i.mergeResourceWithDefaults&&(this.resource=pi.default().merge(this.resource)),this.se=Object.assign({},i,{resource:this.resource}),!((r=e.spanProcessors)===null||r===void 0)&&r.length)this.Ir=Tx([],Ix(e.spanProcessors),!1),this.activeSpanProcessor=new Uf(this.Ir);else{var o=this.Bs();if(o!==void 0){var s=new jy(o);this.activeSpanProcessor=s}else this.activeSpanProcessor=new Sx}}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 hx({name:e,version:n,schemaUrl:r==null?void 0:r.schemaUrl},this.se,this)),this.Li.get(i)},t.prototype.addSpanProcessor=function(e){this.Ir.length===0&&this.activeSpanProcessor.shutdown().catch(function(n){return M.error("Error while trying to shutdown current span processor",n)}),this.Ir.push(e),this.activeSpanProcessor=new Uf(this.Ir)},t.prototype.getActiveSpanProcessor=function(){return this.activeSpanProcessor},t.prototype.register=function(e){e===void 0&&(e={}),pt.setGlobalTracerProvider(this),e.propagator===void 0&&(e.propagator=this.js()),e.contextManager&&st.setGlobalContextManager(e.contextManager),e.propagator&&pe.setGlobalPropagator(e.propagator)},t.prototype.forceFlush=function(){var e=this.se.forceFlushTimeoutMillis,n=this.Ir.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=Cn.timeout},e);r.forceFlush().then(function(){clearTimeout(s),o!==Cn.timeout&&(o=Cn.resolved,i(o))}).catch(function(a){clearTimeout(s),o=Cn.error,i(a)})})});return new Promise(function(r,i){Promise.all(n).then(function(o){var s=o.filter(function(a){return a!==Cn.resolved});s.length>0?i(s):r()}).catch(function(o){return i([o])})})},t.prototype.shutdown=function(){return this.activeSpanProcessor.shutdown()},t.prototype.Qs=function(e){var n;return(n=this.constructor.$s.get(e))===null||n===void 0?void 0:n()},t.prototype.qs=function(e){var n;return(n=this.constructor.ta.get(e))===null||n===void 0?void 0:n()},t.prototype.js=function(){var e=this,n=Array.from(new Set(pr().OTEL_PROPAGATORS)),r=n.map(function(o){var s=e.Qs(o);return s||M.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 Oy({propagators:i})},t.prototype.Bs=function(){var e=pr().OTEL_TRACES_EXPORTER;if(!(e==="none"||e==="")){var n=this.qs(e);return n||M.error('Exporter "'+e+'" requested through environment variable is unavailable.'),n}},t.$s=new Map([["tracecontext",function(){return new Ny}],["baggage",function(){return new Ey}]]),t.ta=new Map,t})(),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))},Qy=(function(){function t(){this.Xi=!1,this.Xe=En}return t.prototype.ea=function(e,n){e===void 0&&(e=En);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.Xe},t.prototype.bind=function(e,n){return e===void 0&&(e=this.active()),typeof n=="function"?this.ea(e,n):n},t.prototype.disable=function(){return this.Xe=En,this.Xi=!1,this},t.prototype.enable=function(){return this.Xi?this:(this.Xi=!0,this.Xe=En,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.Xe;this.Xe=e||En;try{return n.call.apply(n,Cx([r],Rx(i),!1))}finally{this.Xe=s}},t})(),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)}})(),Zx=(function(t){kx(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 Qy),n.contextManager&&n.contextManager.enable(),t.prototype.register.call(this,n)},e})(Ex),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 xx="http.response_content_length",Vx="http.response_content_length_uncompressed",Ox=xx,Nx=Vx,Kl;function Gx(){return Kl||(Kl=document.createElement("a")),Kl}function cn(t,e){return e in t}function Vt(t,e,n,r){var i=void 0,o=void 0;cn(n,e)&&typeof n[e]=="number"&&(i=n[e]);var s=J.FETCH_START;if(cn(n,s)&&typeof n[s]=="number"&&(o=n[s]),i!==void 0&&o!==void 0&&i>=o)return t.addEvent(e,i),t}function fr(t,e,n){n===void 0&&(n=!1),n||(Vt(t,J.FETCH_START,e),Vt(t,J.DOMAIN_LOOKUP_START,e),Vt(t,J.DOMAIN_LOOKUP_END,e),Vt(t,J.CONNECT_START,e),cn(e,"name")&&e.name.startsWith("https:")&&Vt(t,J.SECURE_CONNECTION_START,e),Vt(t,J.CONNECT_END,e),Vt(t,J.REQUEST_START,e),Vt(t,J.RESPONSE_START,e),Vt(t,J.RESPONSE_END,e));var r=e[J.ENCODED_BODY_SIZE];r!==void 0&&t.setAttribute(Ox,r);var i=e[J.DECODED_BODY_SIZE];i!==void 0&&r!==i&&t.setAttribute(Nx,i)}function Lx(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 $y(){return typeof location<"u"?location.origin:void 0}function qy(t,e,n,r,i,o){i===void 0&&(i=new WeakSet);var s=De(t);t=s.toString();var a=Wx(t,e,n,r,i,o);if(a.length===0)return{mainRequest:void 0};if(a.length===1)return{mainRequest:a[0]};var c=Lx(a);if(s.origin!==$y()&&c.length>1){var l=c[0],u=Xx(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 Xx(t,e,n){for(var r=Ye(n),i=Ye(ii(e)),o=t[1],s,a=t.length,c=1;c<a;c++){var l=t[c],u=Ye(ii(l[J.FETCH_START])),h=Ye(ii(l[J.RESPONSE_END])),p=r-h;u>=i&&(!s||p<s)&&(s=p,o=l)}return o}function Wx(t,e,n,r,i,o){var s=Ye(e),a=Ye(n),c=r.filter(function(l){var u=Ye(ii(l[J.FETCH_START])),h=Ye(ii(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 De(t){if(typeof URL=="function")return new URL(t,typeof document<"u"?document.baseURI:typeof location<"u"?location.href:void 0);var e=Gx();return e.href=t,e}function tg(t,e){if(t.nodeType===Node.DOCUMENT_NODE)return"/";var n=Px(t,e);if(e&&n.indexOf("@id")>0)return n;var r="";return t.parentNode&&(r+=tg(t.parentNode,!1)),r+=n,r}function Mx(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 Px(t,e){var n=t.nodeType,r=Mx(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 eg(t,e){var n=e||[];(typeof n=="string"||n instanceof RegExp)&&(n=[n]);var r=De(t);return r.origin===$y()?!0:n.some(function(i){return Fy(t,i)})}var oi;(function(t){t.DOCUMENT_LOAD="documentLoad",t.DOCUMENT_FETCH="documentFetch",t.RESOURCE_FETCH="resourceFetch"})(oi||(oi={}));var Ux="0.44.0",Fx="@opentelemetry/instrumentation-document-load",Ax="http.url",Dx="http.user_agent",_l=Ax,Jx=Dx,Yx="deployment.environment",Kx=Yx,_x="service.name",Hx="telemetry.sdk.name",zx="telemetry.sdk.version",Bx="url.full",jx="url.path",Qx="url.query",rs;(function(t){t.FIRST_PAINT="firstPaint",t.FIRST_CONTENTFUL_PAINT="firstContentfulPaint"})(rs||(rs={}));var $x=function(){var t,e,n={},r=(e=(t=me).getEntriesByType)===null||e===void 0?void 0:e.call(t,"navigation")[0];if(r){var i=Object.values(J);i.forEach(function(a){if(cn(r,a)){var c=r[a];typeof c=="number"&&(n[a]=c)}})}else{var o=me,s=o.timing;if(s){var i=Object.values(J);i.forEach(function(c){if(cn(s,c)){var l=s[c];typeof l=="number"&&(n[c]=l)}})}}return n},Ff={"first-paint":rs.FIRST_PAINT,"first-contentful-paint":rs.FIRST_CONTENTFUL_PAINT},qx=function(t){var e,n,r=(n=(e=me).getEntriesByType)===null||n===void 0?void 0:n.call(e,"paint");r&&r.forEach(function(i){var o=i.name,s=i.startTime;cn(Ff,o)&&t.addEvent(Ff[o],s)})},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){n===void 0&&(n={});var r=t.call(this,Fx,Ux,n)||this;return r.component="document-load",r.version="1",r.moduleName=r.component,r}return e.prototype.init=function(){},e.prototype.Tr=function(){var n=this;window.setTimeout(function(){n.na()})},e.prototype.ra=function(n){var r=this,i,o,s=(o=(i=me).getEntriesByType)===null||o===void 0?void 0:o.call(i,"resource");s&&s.forEach(function(a){r.ia(a,n)})},e.prototype.na=function(){var n=this,r=Array.from(document.getElementsByTagName("meta")).find(function(s){return s.getAttribute("name")===Do}),i=$x(),o=r&&r.content||"";st.with(pe.extract(En,{traceparent:o}),function(){var s,a=n.Wi(oi.DOCUMENT_LOAD,J.FETCH_START,i);a&&(st.with(pt.setSpan(st.active(),a),function(){var c=n.Wi(oi.DOCUMENT_FETCH,J.FETCH_START,i);c&&(c.setAttribute(_l,location.href),st.with(pt.setSpan(st.active(),c),function(){var l;n.getConfig().ignoreNetworkEvents||fr(c,i),n.Mo(c,(l=n.getConfig().applyCustomAttributesOnSpan)===null||l===void 0?void 0:l.documentFetch),n.hr(c,J.RESPONSE_END,i)}))}),a.setAttribute(_l,location.href),a.setAttribute(Jx,navigator.userAgent),n.ra(a),n.getConfig().ignoreNetworkEvents||(Vt(a,J.FETCH_START,i),Vt(a,J.UNLOAD_EVENT_START,i),Vt(a,J.UNLOAD_EVENT_END,i),Vt(a,J.DOM_INTERACTIVE,i),Vt(a,J.DOM_CONTENT_LOADED_EVENT_START,i),Vt(a,J.DOM_CONTENT_LOADED_EVENT_END,i),Vt(a,J.DOM_COMPLETE,i),Vt(a,J.LOAD_EVENT_START,i),Vt(a,J.LOAD_EVENT_END,i)),n.getConfig().ignorePerformancePaintEvents||qx(a),n.Mo(a,(s=n.getConfig().applyCustomAttributesOnSpan)===null||s===void 0?void 0:s.documentLoad),n.hr(a,J.LOAD_EVENT_END,i))})},e.prototype.hr=function(n,r,i){n&&(cn(i,r)?n.end(i[r]):n.end())},e.prototype.ia=function(n,r){var i,o=this.Wi(oi.RESOURCE_FETCH,J.FETCH_START,n,r);o&&(o.setAttribute(_l,n.name),this.getConfig().ignoreNetworkEvents||fr(o,n),this.oa(o,n,(i=this.getConfig().applyCustomAttributesOnSpan)===null||i===void 0?void 0:i.resourceFetch),this.hr(o,J.RESPONSE_END,n))},e.prototype.Wi=function(n,r,i,o){if(cn(i,r)&&typeof i[r]=="number"){var s=this.tracer.startSpan(n,{startTime:i[r]},o?pt.setSpan(st.active(),o):void 0);return s}},e.prototype.sa=function(){window.document.readyState==="complete"?this.Tr():(this.Tr=this.Tr.bind(this),window.addEventListener("load",this.Tr))},e.prototype.Mo=function(n,r){var i=this;r&&Of(function(){return r(n)},function(o){o&&i.w.error("addCustomAttributesOnSpan",o)})},e.prototype.oa=function(n,r,i){var o=this;i&&Of(function(){return i(n,r)},function(s){s&&o.w.error("addCustomAttributesOnResourceSpan",s)})},e.prototype.enable=function(){window.removeEventListener("load",this.Tr),this.sa()},e.prototype.disable=function(){window.removeEventListener("load",this.Tr)},e})(Hy),ng=(function(){function t(){}return t.prototype.emit=function(e){},t})(),nV=new ng,rV=(function(){function t(){}return t.prototype.getLogger=function(e,n,r){return new ng},t})(),rg=new rV,iV=(function(){function t(e,n,r,i){this.ur=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.ur.getDelegateLogger(this.name,this.version,this.options);return e?(this.b=e,this.b):nV},t})(),Af=(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 iV(this,e,n,r)},t.prototype.getDelegate=function(){var e;return(e=this.b)!==null&&e!==void 0?e:rg},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})(),oV=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{},Ro=Symbol.for("io.opentelemetry.js.api.logs"),jr=oV;function sV(t,e,n){return function(r){return r===t?e:n}}var Df=1,aV=(function(){function t(){this.Ke=new Af}return t.getInstance=function(){return this.N||(this.N=new t),this.N},t.prototype.setGlobalLoggerProvider=function(e){return jr[Ro]?this.getLoggerProvider():(jr[Ro]=sV(Df,e,rg),this.Ke.setDelegate(e),e)},t.prototype.getLoggerProvider=function(){var e,n;return(n=(e=jr[Ro])===null||e===void 0?void 0:e.call(jr,Df))!==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 jr[Ro],this.Ke=new Af},t})(),lV=aV.getInstance(),kc=function(){return kc=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},kc.apply(this,arguments)},cV=(function(){function t(e,n,r){this.instrumentationName=e,this.instrumentationVersion=n,this.se={},this.re=fe.wrap,this.L=fe.unwrap,this.So=fe.massWrap,this.Io=fe.massUnwrap,this.setConfig(r),this.w=M.createComponentLogger({namespace:e}),this.tr=pt.getTracer(e,n),this.er=Je.getMeter(e,n),this.nr=lV.getLogger(e,n),this.rr()}return Object.defineProperty(t.prototype,"meter",{get:function(){return this.er},enumerable:!1,configurable:!0}),t.prototype.setMeterProvider=function(e){this.er=e.getMeter(this.instrumentationName,this.instrumentationVersion),this.rr()},Object.defineProperty(t.prototype,"logger",{get:function(){return this.nr},enumerable:!1,configurable:!0}),t.prototype.setLoggerProvider=function(e){this.nr=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.rr=function(){},t.prototype.getConfig=function(){return this.se},t.prototype.setConfig=function(e){this.se=kc({enabled:!0},e)},t.prototype.setTracerProvider=function(e){this.tr=e.getTracer(this.instrumentationName,this.instrumentationVersion)},Object.defineProperty(t.prototype,"tracer",{get:function(){return this.tr},enumerable:!1,configurable:!0}),t.prototype.To=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})(),uV=(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)}})(),hV=(function(t){uV(e,t);function e(n,r,i){var o=t.call(this,n,r,i)||this;return o.se.enabled&&o.enable(),o}return e})(cV);function pV(t,e,n){var r,i;try{i=t()}catch(o){r=o}finally{return e(r,i),i}}function dV(t){return typeof t=="function"&&typeof t.__original=="function"&&typeof t.__unwrap=="function"&&t.__wrapped===!0}var is;(function(t){t.COMPONENT="component",t.HTTP_ERROR_NAME="http.error_name",t.HTTP_STATUS_TEXT="http.status_text"})(is||(is={}));var fV="http.method",mV="http.url",yV="http.host",gV="http.scheme",bV="http.status_code",vV="http.user_agent",wV="http.request_content_length_uncompressed",SV=fV,IV=mV,TV=yV,EV=gV,RV=bV,CV=vV,kV=wV,ZV=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())})},xV=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}}},VV=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.")},OV=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=M.createComponentLogger({namespace:"@opentelemetry/opentelemetry-instrumentation-fetch/utils"});function NV(){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=GV(n.body),i=r.body,o=r.length;return n.body=i,o}else return Promise.resolve(LV(n.body))}else{var s=t[0];return s!=null&&s.body?s.clone().text().then(function(a){return Zc(a)}):Promise.resolve()}}function GV(t){if(!t.pipeThrough)return ig.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 ZV(this,void 0,void 0,function(){var a;return xV(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 LV(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 WV(t);if(t instanceof URLSearchParams)return Zc(t.toString());if(typeof t=="string")return Zc(t);ig.warn("unknown body type")}var XV=new TextEncoder;function Zc(t){return XV.encode(t).byteLength}function WV(t){var e,n,r=0;try{for(var i=VV(t.entries()),o=i.next();!o.done;o=i.next()){var s=OV(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 Jf="0.57.1",MV=(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)}})(),PV=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},UV=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,FV=300,Yf=typeof process=="object"&&((Hl=process.release)===null||Hl===void 0?void 0:Hl.name)==="node",AV=(function(t){MV(e,t);function e(n){n===void 0&&(n={});var r=t.call(this,"@opentelemetry/instrumentation-fetch",Jf,n)||this;return r.component="fetch",r.version=Jf,r.moduleName=r.component,r.Jn=new WeakSet,r.ir=0,r}return e.prototype.init=function(){},e.prototype.Mi=function(n,r){var i=this.tracer.startSpan("CORS Preflight",{startTime:r[J.FETCH_START]},pt.setSpan(st.active(),n));fr(i,r,this.getConfig().ignoreNetworkEvents),i.end(r[J.RESPONSE_END])},e.prototype.Pi=function(n,r){var i=De(r.url);n.setAttribute(RV,r.status),r.statusText!=null&&n.setAttribute(is.HTTP_STATUS_TEXT,r.statusText),n.setAttribute(TV,i.host),n.setAttribute(EV,i.protocol.replace(":","")),typeof navigator<"u"&&n.setAttribute(CV,navigator.userAgent)},e.prototype.Ui=function(n,r){if(!eg(r,this.getConfig().propagateTraceHeaderCorsUrls)){var i={};pe.inject(st.active(),i),Object.keys(i).length>0&&this.w.debug("headers inject skipped due to CORS policy");return}if(n instanceof Request)pe.inject(st.active(),n.headers,{set:function(o,s,a){return o.set(s,typeof a=="string"?a:String(a))}});else if(n.headers instanceof Headers)pe.inject(st.active(),n.headers,{set:function(o,s,a){return o.set(s,typeof a=="string"?a:String(a))}});else if(n.headers instanceof Map)pe.inject(st.active(),n.headers,{set:function(o,s,a){return o.set(s,typeof a=="string"?a:String(a))}});else{var i={};pe.inject(st.active(),i),n.headers=Object.assign({},i,n.headers||{})}},e.prototype.Fi=function(){this.ir===0&&this.getConfig().clearTimingResources&&(performance.clearResourceTimings(),this.Jn=new WeakSet)},e.prototype.Er=function(n,r){var i;if(r===void 0&&(r={}),Ay(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:hi.CLIENT,attributes:(i={},i[is.COMPONENT]=this.moduleName,i[SV]=o,i[IV]=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=qy(r.spanUrl,r.startTime,i,o,this.Jn,"fetch");if(s.mainRequest){var a=s.mainRequest;this.zr(a);var c=s.corsPreFlightRequest;c&&(this.Mi(n,c),this.zr(c)),fr(n,a,this.getConfig().ignoreNetworkEvents)}},e.prototype.zr=function(n){this.Jn.add(n)},e.prototype.hr=function(n,r,i){var o=this,s=de(Date.now()),a=Nn();this.Pi(n,i),setTimeout(function(){var c;(c=r.observer)===null||c===void 0||c.disconnect(),o.Ai(n,r,a),o.ir--,o.Fi(),n.end(s)},FV)},e.prototype.aa=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=De(o[0]instanceof Request?o[0].url:String(o[0])).href,l=o[0]instanceof Request?o[0]:o[1]||{},u=i.Er(c,l);if(!u)return r.apply(this,o);var h=i.la(c);i.getConfig().measureRequestSize&&NV.apply(void 0,UV([],PV(o),!1)).then(function(g){g&&u.setAttribute(kV,g)}).catch(function(g){i.w.warn("getFetchBodyLength",g)});function p(g,b){i.Po(g,l,b),i.hr(g,h,{status:b.status||0,statusText:b.message,url:c})}function f(g,b){i.Po(g,l,b),b.status>=200&&b.status<400?i.hr(g,h,b):i.hr(g,h,{status:b.status,statusText:b.statusText,url:c})}function m(g,b,w){try{var E=w.clone(),I=w.clone(),S=E.body;if(S){var T=S.getReader(),x=function(){T.read().then(function(Z){var k=Z.done;k?f(g,I):x()},function(Z){p(g,Z)})};x()}else f(g,w)}finally{b(w)}}function d(g,b,w){try{p(g,w)}finally{b(w)}}return new Promise(function(g,b){return st.with(pt.setSpan(st.active(),u),function(){return i.Ui(l,c),i.ir++,r.apply(a,l instanceof Request?[l]:[c,l]).then(m.bind(a,u,g),d.bind(a,u,b))})})}}},e.prototype.Po=function(n,r,i){var o=this,s=this.getConfig().applyCustomAttributesOnSpan;s&&pV(function(){return s(n,r,i)},function(a){a&&o.w.error("applyCustomAttributesOnSpan",a)})},e.prototype.la=function(n){var r=Nn(),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(Yf){this.w.warn("this instrumentation is intended for web usage only, it does not instrument Node.js's fetch()");return}dV(fetch)&&(this.L(ri,"fetch"),this.w.debug("removing previous patch for constructor")),this.re(ri,"fetch",this.aa())},e.prototype.disable=function(){Yf||(this.L(ri,"fetch"),this.Jn=new WeakSet)},e})(hV),og=(function(){function t(){}return t.prototype.emit=function(e){},t})(),DV=new og,JV=(function(){function t(){}return t.prototype.getLogger=function(e,n,r){return new og},t})(),sg=new JV,YV=(function(){function t(e,n,r,i){this.ur=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.ur.getDelegateLogger(this.name,this.version,this.options);return e?(this.b=e,this.b):DV},t})(),Kf=(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 YV(this,e,n,r)},t.prototype.getDelegate=function(){var e;return(e=this.b)!==null&&e!==void 0?e:sg},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})(),KV=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{},Co=Symbol.for("io.opentelemetry.js.api.logs"),Qr=KV;function _V(t,e,n){return function(r){return r===t?e:n}}var _f=1,HV=(function(){function t(){this.Ke=new Kf}return t.getInstance=function(){return this.N||(this.N=new t),this.N},t.prototype.setGlobalLoggerProvider=function(e){return Qr[Co]?this.getLoggerProvider():(Qr[Co]=_V(_f,e,sg),this.Ke.setDelegate(e),e)},t.prototype.getLoggerProvider=function(){var e,n;return(n=(e=Qr[Co])===null||e===void 0?void 0:e.call(Qr,_f))!==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 Qr[Co],this.Ke=new Kf},t})(),zV=HV.getInstance(),xc=function(){return xc=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},xc.apply(this,arguments)},BV=(function(){function t(e,n,r){this.instrumentationName=e,this.instrumentationVersion=n,this.se={},this.re=fe.wrap,this.L=fe.unwrap,this.So=fe.massWrap,this.Io=fe.massUnwrap,this.setConfig(r),this.w=M.createComponentLogger({namespace:e}),this.tr=pt.getTracer(e,n),this.er=Je.getMeter(e,n),this.nr=zV.getLogger(e,n),this.rr()}return Object.defineProperty(t.prototype,"meter",{get:function(){return this.er},enumerable:!1,configurable:!0}),t.prototype.setMeterProvider=function(e){this.er=e.getMeter(this.instrumentationName,this.instrumentationVersion),this.rr()},Object.defineProperty(t.prototype,"logger",{get:function(){return this.nr},enumerable:!1,configurable:!0}),t.prototype.setLoggerProvider=function(e){this.nr=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.rr=function(){},t.prototype.getConfig=function(){return this.se},t.prototype.setConfig=function(e){this.se=xc({enabled:!0},e)},t.prototype.setTracerProvider=function(e){this.tr=e.getTracer(this.instrumentationName,this.instrumentationVersion)},Object.defineProperty(t.prototype,"tracer",{get:function(){return this.tr},enumerable:!1,configurable:!0}),t.prototype.To=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})(),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)}})(),QV=(function(t){jV(e,t);function e(n,r,i){var o=t.call(this,n,r,i)||this;return o.se.enabled&&o.enable(),o}return e})(BV);function $V(t,e,n){var r,i;try{i=t()}catch(o){r=o}finally{return e(r,i),i}}function Hf(t){return typeof t=="function"&&typeof t.__original=="function"&&typeof t.__unwrap=="function"&&t.__wrapped===!0}var qV="http.method",tO="http.url",eO="http.host",nO="http.scheme",rO="http.status_code",iO="http.user_agent",oO="http.request_content_length_uncompressed",sO=qV,aO=tO,lO=eO,cO=nO,uO=rO,hO=iO,pO=oO,Ae;(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"})(Ae||(Ae={}));var dO=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.")},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(;(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},mO=M.createComponentLogger({namespace:"@opentelemetry/opentelemetry-instrumentation-xml-http-request/utils"});function yO(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 bO(t);if(t instanceof URLSearchParams)return zf(t.toString());if(typeof t=="string")return zf(t);mO.warn("unknown body type")}var gO=new TextEncoder;function zf(t){return gO.encode(t).byteLength}function bO(t){var e,n,r=0;try{for(var i=dO(t.entries()),o=i.next();!o.done;o=i.next()){var s=fO(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 Bf="0.57.1",Vc;(function(t){t.HTTP_STATUS_TEXT="http.status_text"})(Vc||(Vc={}));var vO=(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)}})(),wO=300,SO=(function(t){vO(e,t);function e(n){n===void 0&&(n={});var r=t.call(this,"@opentelemetry/instrumentation-xml-http-request",Bf,n)||this;return r.component="xml-http-request",r.version=Bf,r.moduleName=r.component,r.ir=0,r.Xn=new WeakMap,r.Jn=new WeakSet,r}return e.prototype.init=function(){},e.prototype.Ui=function(n,r){var i=De(r).href;if(!eg(i,this.getConfig().propagateTraceHeaderCorsUrls)){var o={};pe.inject(st.active(),o),Object.keys(o).length>0&&this.w.debug("headers inject skipped due to CORS policy");return}var s={};pe.inject(st.active(),s),Object.keys(s).forEach(function(a){n.setRequestHeader(a,String(s[a]))})},e.prototype.Mi=function(n,r){var i=this;st.with(pt.setSpan(st.active(),n),function(){var o=i.tracer.startSpan("CORS Preflight",{startTime:r[J.FETCH_START]});fr(o,r,i.getConfig().ignoreNetworkEvents),o.end(r[J.RESPONSE_END])})},e.prototype.Pi=function(n,r,i){if(typeof i=="string"){var o=De(i);r.status!==void 0&&n.setAttribute(uO,r.status),r.statusText!==void 0&&n.setAttribute(Vc.HTTP_STATUS_TEXT,r.statusText),n.setAttribute(lO,o.host),n.setAttribute(cO,o.protocol.replace(":","")),n.setAttribute(hO,navigator.userAgent)}},e.prototype.ca=function(n,r){var i=this,o=this.getConfig().applyCustomAttributesOnSpan;typeof o=="function"&&$V(function(){return o(n,r)},function(s){s&&i.w.error("applyCustomAttributesOnSpan",s)})},e.prototype.ua=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=De(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.ir===0&&this.getConfig().clearTimingResources&&(me.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=me.getEntriesByType("resource"));var c=qy(De(i).href,o,s,a,this.Jn);if(c.mainRequest){var l=c.mainRequest;this.zr(l);var u=c.corsPreFlightRequest;u&&(this.Mi(r,u),this.zr(u)),fr(r,l,this.getConfig().ignoreNetworkEvents)}}},e.prototype.ha=function(n){var r=this.Xn.get(n);if(r){var i=r.callbackToRemoveEvents;i&&i(),this.Xn.delete(n)}},e.prototype.Er=function(n,r,i){var o;if(Ay(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:hi.CLIENT,attributes:(o={},o[sO]=i,o[aO]=De(r).toString(),o)});return a.addEvent(Ae.METHOD_OPEN),this.ha(n),this.Xn.set(n,{span:a,spanUrl:r}),a},e.prototype.zr=function(n){this.Jn.add(n)},e.prototype.pa=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.Er(this,c,a),r.apply(this,o)}}},e.prototype.da=function(){var n=this;function r(u,h,p,f){var m=h.callbackToRemoveEvents;typeof m=="function"&&m();var d=h.span,g=h.spanUrl,b=h.sendStartTime;d&&(n.Ai(h,d,g,b,p),d.addEvent(u,f),n.Pi(d,h,g),d.end(f),n.ir--),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.ca(p.span,h);var f=Nn(),m=Date.now();setTimeout(function(){r(u,p,f,m)},wO)}}function o(){i(Ae.EVENT_ERROR,this)}function s(){i(Ae.EVENT_ABORT,this)}function a(){i(Ae.EVENT_TIMEOUT,this)}function c(){this.status<299?i(Ae.EVENT_LOAD,this):i(Ae.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,g=m.spanUrl;if(d&&g){if(n.getConfig().measureRequestSize&&p!=null&&p[0]){var b=p[0],w=yO(b);w!==void 0&&d.setAttribute(pO,w)}st.with(pt.setSpan(st.active(),d),function(){n.ir++,m.sendStartTime=Nn(),d.addEvent(Ae.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.Ui(h,g),n.ua(h,g)})}return u.apply(this,p)}}},e.prototype.enable=function(){this.w.debug("applying patch to",this.moduleName,this.version),Hf(XMLHttpRequest.prototype.open)&&(this.L(XMLHttpRequest.prototype,"open"),this.w.debug("removing previous patch from method open")),Hf(XMLHttpRequest.prototype.send)&&(this.L(XMLHttpRequest.prototype,"send"),this.w.debug("removing previous patch from method send")),this.re(XMLHttpRequest.prototype,"open",this.pa()),this.re(XMLHttpRequest.prototype,"send",this.da())},e.prototype.disable=function(){this.w.debug("removing patch from",this.moduleName,this.version),this.L(XMLHttpRequest.prototype,"open"),this.L(XMLHttpRequest.prototype,"send"),this.ir=0,this.Xn=new WeakMap,this.Jn=new WeakSet},e})(QV),IO=(t,e,n)=>{var r,i;let o=bt({},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=>{[...TO,...t].includes(s==null?void 0:s.toLowerCase())&&(o[s]="[REDACTED]")}),o)},TO=["authorization","cookie","proxy-authorization","token"],EO=["https://www.googleapis.com/identitytoolkit","https://securetoken.googleapis.com"],RO=new RegExp("sdk\\/evalx\\/[^/]+\\/contexts\\/(?<context>[^/?]*)\\??.*?"),CO=new RegExp("\\/eval\\/[^/]+\\/(?<context>[^/?]*)\\??.*?");function kO(t){return!!(t.includes("/sdk/evalx")&&t.match(RO)||t.includes("/eval/")&&t.match(CO))}var ZO=t=>["events.ld.catamorphic.com","events.launchdarkly.com"].some(e=>t.toLocaleLowerCase().includes(e)),xO=t=>kO(t),VO=(t,e)=>e.some(n=>t.toLocaleLowerCase().includes(n)),OO=(t,e,n)=>!VO(t,e)&&!xO(t)&&!ZO(t),NO=(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},jf=64*1024,GO={"application/json":64*1024*1024,"text/plain":64*1024*1024},ag=(t,e,n,r)=>{var i,o,s;let a=jf;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=GO[c])!=null?s:jf}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},LO=(t,e,n)=>fs(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=ag(r,n,e,t.headers)}else r=""}catch(i){r=`Unable to clone response: ${i}`}return r}),lg=(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})(),XO=(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)}})(),Qf=(function(t){XO(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 WO(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 MO(t){if(t!=null)return function(){return t}}function PO(t,e,n){var r,i,o,s,a,c;return{timeoutMillis:WO((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 UO(){return{timeoutMillis:1e4,concurrencyLimit:30,compression:"none"}}var FO=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())})},AO=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}}},DO=(function(){function t(e){this.Br=[],this.fa=e}return t.prototype.pushPromise=function(e){var n=this;if(this.hasReachedLimit())throw new Error("Concurrency Limit reached");this.Br.push(e);var r=function(){var i=n.Br.indexOf(e);n.Br.splice(i,1)};e.then(r,r)},t.prototype.hasReachedLimit=function(){return this.Br.length>=this.fa},t.prototype.awaitAll=function(){return FO(this,void 0,void 0,function(){return AO(this,function(e){switch(e.label){case 0:return[4,Promise.all(this.Br)];case 1:return e.sent(),[2]}})})},t})();function JO(t){return new DO(t.concurrencyLimit)}function YO(t){return Object.prototype.hasOwnProperty.call(t,"partialSuccess")}function KO(){return{handleResponse:function(t){t==null||!YO(t)||t.partialSuccess==null||Object.keys(t.partialSuccess).length===0||M.warn("Received Partial Success response:",JSON.stringify(t.partialSuccess))}}}var _O=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())})},HO=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}}},zO=(function(){function t(e,n,r,i,o){this.Rr=e,this.Uo=n,this.ma=r,this.Di=i,this.ya=o,this.Ji=M.createComponentLogger({namespace:"OTLPExportDelegate"})}return t.prototype.export=function(e,n){var r=this;if(this.Ji.debug("items to be sent",e),this.Di.hasReachedLimit()){n({code:Gt.FAILED,error:new Error("Concurrent export limit reached")});return}var i=this.Uo.serializeRequest(e);if(i==null){n({code:Gt.FAILED,error:new Error("Nothing to send")});return}this.Di.pushPromise(this.Rr.send(i,this.ya).then(function(o){if(o.status==="success"){if(o.data!=null)try{r.ma.handleResponse(r.Uo.deserializeResponse(o.data))}catch(s){r.Ji.warn("Export succeeded but could not deserialize response - is the response specification compliant?",s,o.data)}n({code:Gt.SUCCESS});return}else if(o.status==="failure"&&o.error){n({code:Gt.FAILED,error:o.error});return}else o.status==="retryable"?n({code:Gt.FAILED,error:new Qf("Export failed with retryable status")}):n({code:Gt.FAILED,error:new Qf("Export failed with unknown error")})},function(o){return n({code:Gt.FAILED,error:o})}))},t.prototype.forceFlush=function(){return this.Di.awaitAll()},t.prototype.shutdown=function(){return _O(this,void 0,void 0,function(){return HO(this,function(e){switch(e.label){case 0:return this.Ji.debug("shutdown started"),[4,this.forceFlush()];case 1:return e.sent(),this.Rr.shutdown(),[2]}})})},t})();function BO(t,e){return new zO(t.transport,t.serializer,KO(),t.promiseHandler,e.timeout)}function cg(t,e,n){return BO({transport:n,serializer:e,promiseHandler:JO(t)},{timeout:t.timeoutMillis})}function ug(t){var e=BigInt(1e9);return BigInt(t[0])*e+BigInt(t[1])}function jO(t){var e=Number(BigInt.asUintN(32,t)),n=Number(BigInt.asUintN(32,t>>BigInt(32)));return{low:e,high:n}}function hg(t){var e=ug(t);return jO(e)}function QO(t){var e=ug(t);return e.toString()}var $O=typeof BigInt<"u"?QO:Ye;function $f(t){return t}function pg(t){if(t!==void 0)return ou(t)}var qO={encodeHrTime:hg,encodeSpanContext:ou,encodeOptionalSpanContext:pg};function dg(t){var e,n;if(t===void 0)return qO;var r=(e=t.useLongBits)!==null&&e!==void 0?e:!0,i=(n=t.useHex)!==null&&n!==void 0?n:!1;return{encodeHrTime:r?hg:$O,encodeSpanContext:i?$f:ou,encodeOptionalSpanContext:i?$f:pg}}var 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};function fg(t){return{attributes:Wn(t.attributes),droppedAttributesCount:0}}function mg(t){return{name:t.name,version:t.version}}function Wn(t){return Object.keys(t).map(function(e){return yg(e,t[e])})}function yg(t,e){return{key:t,value:gg(e)}}function gg(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(gg)}}:e==="object"&&t!=null?{kvlistValue:{values:Object.entries(t).map(function(n){var r=tN(n,2),i=r[0],o=r[1];return yg(i,o)})}}:{}}var Se;(function(t){t[t.DELTA=0]="DELTA",t[t.CUMULATIVE=1]="CUMULATIVE"})(Se||(Se={}));var Le;(function(t){t[t.HISTOGRAM=0]="HISTOGRAM",t[t.EXPONENTIAL_HISTOGRAM=1]="EXPONENTIAL_HISTOGRAM",t[t.GAUGE=2]="GAUGE",t[t.SUM=3]="SUM"})(Le||(Le={}));var eN=(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)}})(),qf=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())})},tm=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}}},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(;!(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))},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.")};function oN(t){return t!=null}function bg(t){var e=Object.keys(t);return e.length===0?"":(e=e.sort(),JSON.stringify(e.map(function(n){return[n,t[n]]})))}function sN(t){var e,n;return t.name+":"+((e=t.version)!==null&&e!==void 0?e:"")+":"+((n=t.schemaUrl)!==null&&n!==void 0?n:"")}var vg=(function(t){eN(e,t);function e(n){var r=t.call(this,n)||this;return Object.setPrototypeOf(r,e.prototype),r}return e})(Error);function di(t,e){var n,r=new Promise(function(i,o){n=setTimeout(function(){o(new vg("Operation timed out."))},e)});return Promise.race([t,r]).then(function(i){return clearTimeout(n),i},function(i){throw clearTimeout(n),i})}function aN(t){return qf(this,void 0,void 0,function(){var e=this;return tm(this,function(n){return[2,Promise.all(t.map(function(r){return qf(e,void 0,void 0,function(){var i,o;return tm(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 lN(t){return t.status==="rejected"}function em(t,e){var n=[];return t.forEach(function(r){n.push.apply(n,rN([],nN(e(r)),!1))}),n}function cN(t,e){var n,r;if(t.size!==e.size)return!1;try{for(var i=iN(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 uN(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 hN(t,e){return t.toLowerCase()===e.toLowerCase()}var Gn;(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"})(Gn||(Gn={}));var pN=(function(){function t(){this.kind=Gn.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})(),H;(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"})(H||(H={}));function en(t,e,n){var r,i,o,s;return yN(t)||M.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:an.DOUBLE,advice:(s=n==null?void 0:n.advice)!==null&&s!==void 0?s:{}}}function dN(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 fN(t,e){return hN(t.name,e.name)&&t.unit===e.unit&&t.type===e.type&&t.valueType===e.valueType}var mN=/^[a-z][a-z0-9_.\-/]{0,254}$/i;function yN(t){return t.match(mN)!=null}var 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};function bN(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 zl=(function(){function t(e,n,r,i){r===void 0&&(r=!0),i===void 0&&(i=bN(n)),this.startTime=e,this.jr=n,this.Et=r,this.ie=i}return t.prototype.record=function(e){if(!Number.isNaN(e)){this.ie.count+=1,this.ie.sum+=e,this.Et&&(this.ie.min=Math.min(e,this.ie.min),this.ie.max=Math.max(e,this.ie.max),this.ie.hasMinMax=!0);var n=uN(this.jr,e);this.ie.buckets.counts[n]+=1}},t.prototype.setStartTime=function(e){this.startTime=e},t.prototype.toPointValue=function(){return this.ie},t})(),wg=(function(){function t(e,n){this.jr=e,this.Et=n,this.kind=Gn.HISTOGRAM}return t.prototype.createAccumulation=function(e){return new zl(e,this.jr,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 zl(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 zl(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:Le.HISTOGRAM,dataPoints:r.map(function(o){var s=gN(o,2),a=s[0],c=s[1],l=c.toPointValue(),u=e.type===H.GAUGE||e.type===H.UP_DOWN_COUNTER||e.type===H.OBSERVABLE_GAUGE||e.type===H.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})(),Bl=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},jl=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))},nm=(function(){function t(e,n,r,i){e===void 0&&(e=new vN),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.Fo()},t.prototype.downscale=function(e){this.Fo();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.ga(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.Fo=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.ga=function(e,n){e!==n&&this.incrementBucket(e,this.backing.emptyBucket(n))},t})(),vN=(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,jl([r,this.wt.length-n],Bl(this.wt.slice(n)),!1)),i.splice.apply(i,jl([0,n],Bl(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(jl([],Bl(this.wt),!1))},t})(),wN=52,SN=2146435072,IN=1048575,Sg=1023,Ig=-1022,Tg=Sg,Oc=Math.pow(2,-1022);function Eg(t){var e=new DataView(new ArrayBuffer(8));e.setFloat64(0,t);var n=e.getUint32(0),r=(n&SN)>>20;return r-Sg}function Rg(t){var e=new DataView(new ArrayBuffer(8));e.setFloat64(0,t);var n=e.getUint32(0),r=e.getUint32(4),i=(n&IN)*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 TN(t){return t--,t|=t>>1,t|=t>>2,t|=t>>4,t|=t>>8,t|=t>>16,t++,t}var EN=(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)}})(),fi=(function(t){EN(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e})(Error),RN=(function(){function t(e){this.pr=-e}return t.prototype.mapToIndex=function(e){if(e<Oc)return this.Qr();var n=Eg(e),r=this.ba(Rg(e)-1,wN);return n+r>>this.pr},t.prototype.lowerBoundary=function(e){var n=this.Qr();if(e<n)throw new fi("underflow: "+e+" is < minimum lower boundary: "+n);var r=this.fi();if(e>r)throw new fi("overflow: "+e+" is > maximum lower boundary: "+r);return Nc(1,e<<this.pr)},Object.defineProperty(t.prototype,"scale",{get:function(){return this.pr===0?0:-this.pr},enumerable:!1,configurable:!0}),t.prototype.Qr=function(){var e=Ig>>this.pr;return this.pr<2&&e--,e},t.prototype.fi=function(){return Tg>>this.pr},t.prototype.ba=function(e,n){return Math.floor(e*Math.pow(2,-n))},t})(),CN=(function(){function t(e){this.Cr=e,this.Yi=Nc(Math.LOG2E,e),this.va=Nc(Math.LN2,-e)}return t.prototype.mapToIndex=function(e){if(e<=Oc)return this.Qr()-1;if(Rg(e)===0){var n=Eg(e);return(n<<this.Cr)-1}var r=Math.floor(Math.log(e)*this.Yi),i=this.fi();return r>=i?i:r},t.prototype.lowerBoundary=function(e){var n=this.fi();if(e>=n){if(e===n)return 2*Math.exp((e-(1<<this.Cr))/this.Yi);throw new fi("overflow: "+e+" is > maximum lower boundary: "+n)}var r=this.Qr();if(e<=r){if(e===r)return Oc;if(e===r-1)return Math.exp((e+(1<<this.Cr))/this.Yi)/2;throw new fi("overflow: "+e+" is < minimum lower boundary: "+r)}return Math.exp(e*this.va)},Object.defineProperty(t.prototype,"scale",{get:function(){return this.Cr},enumerable:!1,configurable:!0}),t.prototype.Qr=function(){return Ig<<this.Cr},t.prototype.fi=function(){return(Tg+1<<this.Cr)-1},t})(),rm=-10,im=20,kN=Array.from({length:31},function(t,e){return e>10?new CN(e-10):new RN(e-10)});function om(t){if(t>im||t<rm)throw new fi("expected scale >= "+rm+" && <= "+im+", got: "+t);return kN[t+10]}var ZN=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},ko=(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})(),xN=20,VN=160,Ql=2,ON=(function(){function t(e,n,r,i,o,s,a,c,l,u,h){e===void 0&&(e=e),n===void 0&&(n=VN),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 nm),u===void 0&&(u=new nm),h===void 0&&(h=om(xN)),this.startTime=e,this.Ze=n,this.Et=r,this.$r=i,this.dr=o,this.kr=s,this.fr=a,this.mr=c,this.Ki=l,this._i=u,this.Zr=h,this.Ze<Ql&&(M.warn("Exponential Histogram Max Size set to "+this.Ze+", changing to the minimum size of: "+Ql),this.Ze=Ql)}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.$r},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"min",{get:function(){return this.fr},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"max",{get:function(){return this.mr},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"count",{get:function(){return this.dr},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"zeroCount",{get:function(){return this.kr},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"scale",{get:function(){return this.dr===this.kr?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.mr&&(this.mr=e),e<this.fr&&(this.fr=e),this.dr+=n,e===0){this.kr+=n;return}this.$r+=e*n,e>0?this.Ao(this.Ki,e,n):this.Ao(this._i,-e,n)}},t.prototype.merge=function(e){this.dr===0?(this.fr=e.min,this.mr=e.max):e.count!==0&&(e.min<this.min&&(this.fr=e.min),e.max>this.max&&(this.mr=e.max)),this.startTime=e.startTime,this.$r+=e.sum,this.dr+=e.count,this.kr+=e.zeroCount;var n=this.Do(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.fr=1/0,this.mr=-1/0,this.$r-=e.sum,this.dr-=e.count,this.kr-=e.zeroCount;var n=this.Do(e);this.Hi(this.scale-n),this.Yo(this.positive,e,e.positive,n),this.Yo(this.negative,e,e.negative,n)},t.prototype.clone=function(){return new t(this.startTime,this.Ze,this.Et,this.$r,this.dr,this.kr,this.fr,this.mr,this.positive.clone(),this.negative.clone(),this.Zr)},t.prototype.Ao=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.Ko(e,i,r)},t.prototype.Ko=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._o(e,i+1),e.indexStart=n}else if(n>e.indexEnd){var i=n-e.indexStart;i>=e.backing.length&&this._o(e,i+1),e.indexEnd=n}var o=n-e.indexBase;o<0&&(o+=e.backing.length),e.incrementBucket(o,r)}},t.prototype._o=function(e,n){var r=e.backing.length,i=e.indexBase-e.indexStart,o=r-i,s=TN(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=om(n)}},t.prototype.Do=function(e){var n=Math.min(this.scale,e.scale),r=ko.combine(this.mi(this.positive,this.scale,n),this.mi(e.positive,e.scale,n)),i=ko.combine(this.mi(this.negative,this.scale,n),this.mi(e.negative,e.scale,n));return Math.min(n-this.zi(r.high,r.low),n-this.zi(i.high,i.low))},t.prototype.mi=function(e,n,r){if(e.length===0)return new ko(0,-1);var i=n-r;return new ko(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.Ko(e,o+a>>s,r.at(a))},t.prototype.Yo=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})(),NN=(function(){function t(e,n){this.Ze=e,this.Et=n,this.kind=Gn.EXPONENTIAL_HISTOGRAM}return t.prototype.createAccumulation=function(e){return new ON(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:Le.EXPONENTIAL_HISTOGRAM,dataPoints:r.map(function(o){var s=ZN(o,2),a=s[0],c=s[1],l=c.toPointValue(),u=e.type===H.GAUGE||e.type===H.UP_DOWN_COUNTER||e.type===H.OBSERVABLE_GAUGE||e.type===H.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})(),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},$l=(function(){function t(e,n,r){n===void 0&&(n=0),r===void 0&&(r=[0,0]),this.startTime=e,this.ie=n,this.sampleTime=r}return t.prototype.record=function(e){this.ie=e,this.sampleTime=de(Date.now())},t.prototype.setStartTime=function(e){this.startTime=e},t.prototype.toPointValue=function(){return this.ie},t})(),LN=(function(){function t(){this.kind=Gn.LAST_VALUE}return t.prototype.createAccumulation=function(e){return new $l(e)},t.prototype.merge=function(e,n){var r=So(n.sampleTime)>=So(e.sampleTime)?n:e;return new $l(e.startTime,r.toPointValue(),r.sampleTime)},t.prototype.diff=function(e,n){var r=So(n.sampleTime)>=So(e.sampleTime)?n:e;return new $l(n.startTime,r.toPointValue(),r.sampleTime)},t.prototype.toMetricData=function(e,n,r,i){return{descriptor:e,aggregationTemporality:n,dataPointType:Le.GAUGE,dataPoints:r.map(function(o){var s=GN(o,2),a=s[0],c=s[1];return{attributes:a,startTime:c.startTime,endTime:i,value:c.toPointValue()}})}},t})(),XN=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},$r=(function(){function t(e,n,r,i){r===void 0&&(r=0),i===void 0&&(i=!1),this.startTime=e,this.monotonic=n,this.ie=r,this.reset=i}return t.prototype.record=function(e){this.monotonic&&e<0||(this.ie+=e)},t.prototype.setStartTime=function(e){this.startTime=e},t.prototype.toPointValue=function(){return this.ie},t})(),sm=(function(){function t(e){this.monotonic=e,this.kind=Gn.SUM}return t.prototype.createAccumulation=function(e){return new $r(e,this.monotonic)},t.prototype.merge=function(e,n){var r=e.toPointValue(),i=n.toPointValue();return n.reset?new $r(n.startTime,this.monotonic,i,n.reset):new $r(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 $r(n.startTime,this.monotonic,i,!0):new $r(n.startTime,this.monotonic,i-r)},t.prototype.toMetricData=function(e,n,r,i){return{descriptor:e,aggregationTemporality:n,dataPointType:Le.SUM,dataPoints:r.map(function(o){var s=XN(o,2),a=s[0],c=s[1];return{attributes:a,startTime:c.startTime,endTime:i,value:c.toPointValue()}}),isMonotonic:this.monotonic}},t})(),Mn=(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)}})(),He=(function(){function t(){}return t.Drop=function(){return Cg},t.Sum=function(){return kg},t.LastValue=function(){return Zg},t.Histogram=function(){return xg},t.ExponentialHistogram=function(){return JN},t.Default=function(){return YN},t})(),WN=(function(t){Mn(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 pN,e})(He),MN=(function(t){Mn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.createAggregator=function(n){switch(n.type){case H.COUNTER:case H.OBSERVABLE_COUNTER:case H.HISTOGRAM:return e.MONOTONIC_INSTANCE;default:return e.NON_MONOTONIC_INSTANCE}},e.MONOTONIC_INSTANCE=new sm(!0),e.NON_MONOTONIC_INSTANCE=new sm(!1),e})(He),PN=(function(t){Mn(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 LN,e})(He),UN=(function(t){Mn(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 wg([0,5,10,25,50,75,100,250,500,750,1e3,2500,5e3,7500,1e4],!0),e})(He),FN=(function(t){Mn(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.jr=n.slice(o+1,s),i}return e.prototype.createAggregator=function(n){return new wg(this.jr,this.Et)},e})(He),AN=(function(t){Mn(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 NN(this.Ze,this.Et)},e})(He),DN=(function(t){Mn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.ki=function(n){switch(n.type){case H.COUNTER:case H.UP_DOWN_COUNTER:case H.OBSERVABLE_COUNTER:case H.OBSERVABLE_UP_DOWN_COUNTER:return kg;case H.GAUGE:case H.OBSERVABLE_GAUGE:return Zg;case H.HISTOGRAM:return n.advice.explicitBucketBoundaries?new FN(n.advice.explicitBucketBoundaries):xg}return M.warn("Unable to recognize instrument type: "+n.type),Cg},e.prototype.createAggregator=function(n){return this.ki(n).createAggregator(n)},e})(He),Cg=new WN,kg=new MN,Zg=new PN,xg=new UN,JN=new AN,YN=new DN,KN=function(t){return He.Default()},_N=function(t){return Se.CUMULATIVE},ql=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())})},tc=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}}},am=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},HN=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))},zN=(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:KN,this.ji=(r=e==null?void 0:e.aggregationTemporalitySelector)!==null&&r!==void 0?r:_N,this.wa=(i=e==null?void 0:e.metricProducers)!==null&&i!==void 0?i:[],this.Ho=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.Ho?this.Ho(e):2e3},t.prototype.onInitialized=function(){},t.prototype.collect=function(e){return ql(this,void 0,void 0,function(){var n,r,i,o,s,a;return tc(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(HN([this.Qi.collect({timeoutMillis:e==null?void 0:e.timeoutMillis})],am(this.wa.map(function(l){return l.collect({timeoutMillis:e==null?void 0:e.timeoutMillis})})),!1))];case 1:return n=am.apply(void 0,[c.sent()]),r=n[0],i=n.slice(1),o=r.errors.concat(em(i,function(l){return l.errors})),s=r.resourceMetrics.resource,a=r.resourceMetrics.scopeMetrics.concat(em(i,function(l){return l.resourceMetrics.scopeMetrics})),[2,{resourceMetrics:{resource:s,scopeMetrics:a},errors:o}]}})})},t.prototype.shutdown=function(e){return ql(this,void 0,void 0,function(){return tc(this,function(n){switch(n.label){case 0:return this._e?(M.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,di(this.onShutdown(),e.timeoutMillis)];case 3:n.sent(),n.label=4;case 4:return this._e=!0,[2]}})})},t.prototype.forceFlush=function(e){return ql(this,void 0,void 0,function(){return tc(this,function(n){switch(n.label){case 0:return this._e?(M.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,di(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)}})(),Zo=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())})},xo=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}}},jN=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},QN=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(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.Sa=(o=n.exportIntervalMillis)!==null&&o!==void 0?o:6e4,a.$i=(s=n.exportTimeoutMillis)!==null&&s!==void 0?s:3e4,a.wr=n.exporter,a}return e.prototype.zo=function(){return Zo(this,void 0,void 0,function(){var n;return xo(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,di(this.Ia(),this.$i)];case 1:return r.sent(),[3,3];case 2:return n=r.sent(),n instanceof vg?(M.error("Export took longer than %s milliseconds and timed out.",this.$i),[2]):(ln(n),[3,3]);case 3:return[2]}})})},e.prototype.Ia=function(){var n,r;return Zo(this,void 0,void 0,function(){var i,o,s,a,c,l;return xo(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=M).error.apply(l,QN(["PeriodicExportingMetricReader: metrics collection errors"],jN(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(),M.debug("Error while resolving async portion of resource: ",a),ln(a),[3,5];case 5:return o.scopeMetrics.length===0?[2]:[4,X1.Ls(this.wr,o)];case 6:if(c=u.sent(),c.code!==Gt.SUCCESS)throw new Error("PeriodicExportingMetricReader: metrics export failed (error "+c.error+")");return[2]}})})},e.prototype.onInitialized=function(){var n=this;this.Bo=setInterval(function(){n.zo()},this.Sa)},e.prototype.onForceFlush=function(){return Zo(this,void 0,void 0,function(){return xo(this,function(n){switch(n.label){case 0:return[4,this.zo()];case 1:return n.sent(),[4,this.wr.forceFlush()];case 2:return n.sent(),[2]}})})},e.prototype.onShutdown=function(){return Zo(this,void 0,void 0,function(){return xo(this,function(n){switch(n.label){case 0:return this.Bo&&clearInterval(this.Bo),[4,this.onForceFlush()];case 1:return n.sent(),[4,this.wr.shutdown()];case 2:return n.sent(),[2]}})})},e})(zN),qN=(function(){function t(){this.jo=[]}return t.prototype.addView=function(e){this.jo.push(e)},t.prototype.findViews=function(e,n){var r=this,i=this.jo.filter(function(o){return r.Ta(o.instrumentSelector,e)&&r.Ea(o.meterSelector,n)});return i},t.prototype.Ta=function(e,n){return(e.getType()===void 0||n.type===e.getType())&&e.getNameFilter().match(n.name)&&e.getUnitFilter().match(n.unit)},t.prototype.Ea=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})(),Pn=(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)}})(),vs=(function(){function t(e,n){this.Ra=e,this.qe=n}return t.prototype.yi=function(e,n,r){if(n===void 0&&(n={}),r===void 0&&(r=st.active()),typeof e!="number"){M.warn("non-number value provided to metric "+this.qe.name+": "+e);return}this.qe.valueType===an.INT&&!Number.isInteger(e)&&(M.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.Ra.record(e,n,r,de(Date.now()))},t})(),tG=(function(t){Pn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.add=function(n,r,i){this.yi(n,r,i)},e})(vs),eG=(function(t){Pn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.add=function(n,r,i){if(n<0){M.warn("negative value provided to counter "+this.qe.name+": "+n);return}this.yi(n,r,i)},e})(vs),nG=(function(t){Pn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.record=function(n,r,i){this.yi(n,r,i)},e})(vs),rG=(function(t){Pn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.record=function(n,r,i){if(n<0){M.warn("negative value provided to histogram "+this.qe.name+": "+n);return}this.yi(n,r,i)},e})(vs),ws=(function(){function t(e,n,r){this.Qo=r,this.qe=e,this.$o=n}return t.prototype.addCallback=function(e){this.Qo.addCallback(e,this)},t.prototype.removeCallback=function(e){this.Qo.removeCallback(e,this)},t})(),iG=(function(t){Pn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e})(ws),oG=(function(t){Pn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e})(ws),sG=(function(t){Pn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e})(ws);function Gc(t){return t instanceof ws}var aG=(function(){function t(e){this.Je=e}return t.prototype.createGauge=function(e,n){var r=en(e,H.GAUGE,n),i=this.Je.registerMetricStorage(r);return new nG(i,r)},t.prototype.createHistogram=function(e,n){var r=en(e,H.HISTOGRAM,n),i=this.Je.registerMetricStorage(r);return new rG(i,r)},t.prototype.createCounter=function(e,n){var r=en(e,H.COUNTER,n),i=this.Je.registerMetricStorage(r);return new eG(i,r)},t.prototype.createUpDownCounter=function(e,n){var r=en(e,H.UP_DOWN_COUNTER,n),i=this.Je.registerMetricStorage(r);return new tG(i,r)},t.prototype.createObservableGauge=function(e,n){var r=en(e,H.OBSERVABLE_GAUGE,n),i=this.Je.registerAsyncMetricStorage(r);return new oG(r,i,this.Je.observableRegistry)},t.prototype.createObservableCounter=function(e,n){var r=en(e,H.OBSERVABLE_COUNTER,n),i=this.Je.registerAsyncMetricStorage(r);return new iG(r,i,this.Je.observableRegistry)},t.prototype.createObservableUpDownCounter=function(e,n){var r=en(e,H.OBSERVABLE_UP_DOWN_COUNTER,n),i=this.Je.registerAsyncMetricStorage(r);return new sG(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})(),Vg=(function(){function t(e){this.Yn=e}return t.prototype.getInstrumentDescriptor=function(){return this.Yn},t.prototype.updateDescription=function(e){this.Yn=en(this.Yn.name,this.Yn.type,{description:e,valueType:this.Yn.valueType,unit:this.Yn.unit,advice:this.Yn.advice})},t})(),lG=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),lm=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}}},cG=(function(){function t(e){this.gi=e,this.or=new Map,this.xr=new Map}return t.prototype.get=function(e,n){return n!=null||(n=this.gi(e)),this.or.get(n)},t.prototype.getOrDefault=function(e,n){var r=this.gi(e);if(this.or.has(r))return this.or.get(r);var i=n();return this.xr.has(r)||this.xr.set(r,e),this.or.set(r,i),i},t.prototype.set=function(e,n,r){r!=null||(r=this.gi(e)),this.xr.has(r)||this.xr.set(r,e),this.or.set(r,n)},t.prototype.has=function(e,n){return n!=null||(n=this.gi(e)),this.or.has(n)},t.prototype.keys=function(){var e,n;return lm(this,function(r){switch(r.label){case 0:e=this.xr.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 lm(this,function(r){switch(r.label){case 0:e=this.or.entries(),n=e.next(),r.label=1;case 1:return n.done===!0?[3,3]:[4,[this.xr.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.or.size},enumerable:!1,configurable:!0}),t})(),xn=(function(t){lG(e,t);function e(){return t.call(this,bg)||this}return e})(cG),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},Og=(function(){function t(e,n){this.Wn=e,this.Kn=new xn,this.Vr=new xn,this.qi={"otel.metric.overflow":!0},this.qo=(n!=null?n:2e3)-1,this.Ca=bg(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.qo){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=uG(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.qo&&(s=r.qi,c=r.Ca,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 xn,e},t})(),ec=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.")},cm=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},Ng=(function(){function t(e,n){var r=this;this.Wn=e,this.Or=new Map,this.eo=new Map,n.forEach(function(i){r.Or.set(i,[])})}return t.prototype.buildMetrics=function(e,n,r,i){this.ka(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===Se.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=hG(s);if(u.length!==0)return this.Wn.toMetricData(n,a,u,i)},t.prototype.ka=function(e){var n,r,i=this.Or.keys();try{for(var o=ec(i),s=o.next();!s.done;s=o.next()){var a=s.value,c=this.Or.get(a);c===void 0&&(c=[],this.Or.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 xn,o=this.Or.get(e);if(this.Or.set(e,[]),o===void 0)return i;try{for(var s=ec(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=cm(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=ec(e.keys()),a=s.next();!a.done;a=s.next()){var c=cm(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 hG(t){return Array.from(t.entries())}var pG=(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)}})(),dG=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},fG=(function(t){pG(e,t);function e(n,r,i,o,s){var a=t.call(this,n)||this;return a.no=i,a.ro=s,a.qr=new Og(r,a.ro),a.io=new Ng(r,o),a}return e.prototype.record=function(n,r){var i=this,o=new xn;Array.from(n.entries()).forEach(function(s){var a=dG(s,2),c=a[0],l=a[1];o.set(i.no.process(c),l)}),this.qr.batchCumulate(o,r)},e.prototype.collect=function(n,r){var i=this.qr.collect();return this.io.buildMetrics(n,this.Yn,i,r)},e})(Vg);function um(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 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+`'
635
+ `),n}function mG(t,e){return" - use valueType '"+t.valueType+"' on instrument creation or use an instrument name other than '"+e.name+"'"}function yG(t,e){return" - use unit '"+t.unit+"' on instrument creation or use an instrument name other than '"+e.name+"'"}function gG(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 bG(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 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.
637
+ - OR - create a new view with the name `+e.name+" and description '"+t.description+"' and InstrumentSelector "+r}function hm(t,e){return t.valueType!==e.valueType?mG(t,e):t.unit!==e.unit?yG(t,e):t.type!==e.type?gG(t,e):t.description!==e.description?bG(t,e):""}var nc=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.")},vG=(function(){function t(){this.oo=new Map,this.bi=new Map}return t.create=function(){return new t},t.prototype.getStorages=function(e){var n,r,i,o,s=[];try{for(var a=nc(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.bi.get(e);if(u!=null)try{for(var h=nc(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.ts(e,this.oo)},t.prototype.registerForCollector=function(e,n){var r=this.bi.get(e);r==null&&(r=new Map,this.bi.set(e,r)),this.ts(n,r)},t.prototype.findOrUpdateCompatibleStorage=function(e){var n=this.oo.get(e.name);return n===void 0?null:this.es(e,n)},t.prototype.findOrUpdateCompatibleCollectorStorage=function(e,n){var r=this.bi.get(e);if(r===void 0)return null;var i=r.get(n.name);return i===void 0?null:this.es(n,i)},t.prototype.ts=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.es=function(e,n){var r,i,o=null;try{for(var s=nc(n),a=s.next();!a.done;a=s.next()){var c=a.value,l=c.getInstrumentDescriptor();fN(l,e)?(l.description!==e.description&&(e.description.length>l.description.length&&c.updateDescription(e.description),M.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
- `,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.
639
+ `,um(l,e),`The longer description will be used.
640
+ To resolve the conflict:`,hm(l,e))),o=c):M.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
- `,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};
642
+ `,um(l,e),`To resolve the conflict:
643
+ `,hm(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})(),wG=(function(){function t(e){this.xa=e}return t.prototype.record=function(e,n,r,i){this.xa.forEach(function(o){o.record(e,n,r,i)})},t})(),SG=(function(){function t(e,n){this.ns=e,this.Va=n,this.Nr=new xn}return t.prototype.observe=function(e,n){if(n===void 0&&(n={}),typeof e!="number"){M.warn("non-number value provided to metric "+this.ns+": "+e);return}this.Va===an.INT&&!Number.isInteger(e)&&(M.warn("INT value type cannot accept a floating-point value for "+this.ns+", ignoring the fractional digits."),e=Math.trunc(e),!Number.isInteger(e))||this.Nr.set(n,e)},t})(),IG=(function(){function t(){this.Nr=new Map}return t.prototype.observe=function(e,n,r){if(r===void 0&&(r={}),!!Gc(e)){var i=this.Nr.get(e);if(i==null&&(i=new xn,this.Nr.set(e,i)),typeof n!="number"){M.warn("non-number value provided to metric "+e.qe.name+": "+n);return}e.qe.valueType===an.INT&&!Number.isInteger(n)&&(M.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})(),rc=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())})},ic=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}}},pm=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},dm=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))},TG=(function(){function t(){this.vi=[],this.wi=[]}return t.prototype.addCallback=function(e,n){var r=this.rs(e,n);r>=0||this.vi.push({callback:e,instrument:n})},t.prototype.removeCallback=function(e,n){var r=this.rs(e,n);r<0||this.vi.splice(r,1)},t.prototype.addBatchCallback=function(e,n){var r=new Set(n.filter(Gc));if(r.size===0){M.error("BatchObservableCallback is not associated with valid instruments",n);return}var i=this.ss(e,r);i>=0||this.wi.push({callback:e,instruments:r})},t.prototype.removeBatchCallback=function(e,n){var r=new Set(n.filter(Gc)),i=this.ss(e,r);i<0||this.wi.splice(i,1)},t.prototype.observe=function(e,n){return rc(this,void 0,void 0,function(){var r,i,o,s;return ic(this,function(a){switch(a.label){case 0:return r=this.Oa(e,n),i=this.Na(e,n),[4,aN(dm(dm([],pm(r),!1),pm(i),!1))];case 1:return o=a.sent(),s=o.filter(lN).map(function(c){return c.reason}),[2,s]}})})},t.prototype.Oa=function(e,n){var r=this;return this.vi.map(function(i){var o=i.callback,s=i.instrument;return rc(r,void 0,void 0,function(){var a,c;return ic(this,function(l){switch(l.label){case 0:return a=new SG(s.qe.name,s.qe.valueType),c=Promise.resolve(o(a)),n!=null&&(c=di(c,n)),[4,c];case 1:return l.sent(),s.$o.forEach(function(u){u.record(a.Nr,e)}),[2]}})})})},t.prototype.Na=function(e,n){var r=this;return this.wi.map(function(i){var o=i.callback,s=i.instruments;return rc(r,void 0,void 0,function(){var a,c;return ic(this,function(l){switch(l.label){case 0:return a=new IG,c=Promise.resolve(o(a)),n!=null&&(c=di(c,n)),[4,c];case 1:return l.sent(),s.forEach(function(u){var h=a.Nr.get(u);h!=null&&u.$o.forEach(function(p){p.record(h,e)})}),[2]}})})})},t.prototype.rs=function(e,n){return this.vi.findIndex(function(r){return r.callback===e&&r.instrument===n})},t.prototype.ss=function(e,n){return this.wi.findIndex(function(r){return r.callback===e&&cN(r.instruments,n)})},t})(),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,r,i,o,s){var a=t.call(this,n)||this;return a.no=i,a.ro=s,a.qr=new Og(r,a.ro),a.io=new Ng(r,o),a}return e.prototype.record=function(n,r,i,o){r=this.no.process(r,i),this.qr.record(n,r,i,o)},e.prototype.collect=function(n,r){var i=this.qr.collect();return this.io.buildMetrics(n,this.Yn,i,r)},e})(Vg),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)}})(),lu=(function(){function t(){}return t.Noop=function(){return kG},t})(),CG=(function(t){Gg(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.process=function(n,r){return n},e})(lu);(function(t){Gg(e,t);function e(n){var r=t.call(this)||this;return r.Ga=n,r}return e.prototype.process=function(n,r){var i=this,o={};return Object.keys(n).filter(function(s){return i.Ga.includes(s)}).forEach(function(s){return o[s]=n[s]}),o},e})(lu);var kG=new CG,ZG=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())})},xG=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}}},VG=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},OG=(function(){function t(e,n){this.so=e,this.ls=n,this.metricStorageRegistry=new vG,this.observableRegistry=new TG,this.meter=new aG(this)}return t.prototype.registerMetricStorage=function(e){var n=this.cs(e,RG);return n.length===1?n[0]:new wG(n)},t.prototype.registerAsyncMetricStorage=function(e){var n=this.cs(e,fG);return n},t.prototype.collect=function(e,n,r){return ZG(this,void 0,void 0,function(){var i,o,s;return xG(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(oN),s.length===0?[2,{errors:i}]:[2,{scopeMetrics:{scope:this.ls,metrics:s},errors:i}])}})})},t.prototype.cs=function(e,n){var r=this,i=this.so.viewRegistry.findViews(e,this.ls),o=i.map(function(c){var l=dN(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=VG(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,lu.Noop(),[u],m);return r.metricStorageRegistry.registerForCollector(u,d),d});o=o.concat(a)}return o},t})(),NG=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},GG=(function(){function t(e){this.resource=e,this.viewRegistry=new qN,this.metricCollectors=[],this.meterSharedStates=new Map}return t.prototype.getMeterSharedState=function(e){var n=sN(e),r=this.meterSharedStates.get(n);return r==null&&(r=new OG(this,e),this.meterSharedStates.set(n,r)),r},t.prototype.selectAggregations=function(e){var n,r,i=[];try{for(var o=NG(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})(),Vo=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}}},LG=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},XG=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))},WG=(function(){function t(e,n){this._n=e,this.ti=n}return t.prototype.collect=function(e){return Vo(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=de(Date.now()),r=[],i=[],o=Array.from(this._n.meterSharedStates.values()).map(function(c){return Vo(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,XG([],LG(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 Vo(this,void 0,void 0,function(){return Oo(this,function(n){switch(n.label){case 0:return[4,this.ti.forceFlush(e)];case 1:return n.sent(),[2]}})})},t.prototype.shutdown=function(e){return Vo(this,void 0,void 0,function(){return Oo(this,function(n){switch(n.label){case 0:return[4,this.ti.shutdown(e)];case 1:return n.sent(),[2]}})})},t.prototype.selectAggregationTemporality=function(e){return this.ti.selectAggregationTemporality(e)},t.prototype.selectAggregation=function(e){return this.ti.selectAggregation(e)},t.prototype.selectCardinalityLimit=function(e){var n,r,i;return(i=(r=(n=this.ti).selectCardinalityLimit)===null||r===void 0?void 0:r.call(n,e))!==null&&i!==void 0?i:2e3},t})(),fm=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())})},mm=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}}},ym=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 MG(t,e){var n=e!=null?e:pi.empty();return t?pi.default().merge(n):n}var PG=(function(){function t(e){var n,r,i,o,s;if(this._e=!1,this._n=new GG(MG((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=ym(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=ym(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?(M.warn("A shutdown MeterProvider cannot provide a Meter"),Ok()):this._n.getMeterSharedState({name:e,version:n,schemaUrl:r.schemaUrl}).meter},t.prototype.addMetricReader=function(e){var n=new WG(this._n,e);e.setMetricProducer(n),this._n.metricCollectors.push(n)},t.prototype.shutdown=function(e){return fm(this,void 0,void 0,function(){return mm(this,function(n){switch(n.label){case 0:return this._e?(M.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 fm(this,void 0,void 0,function(){return mm(this,function(n){switch(n.label){case 0:return this._e?(M.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 UG(t,e){var n=dg(e);return{resource:fg(t.resource),schemaUrl:void 0,scopeMetrics:FG(t.scopeMetrics,n)}}function FG(t,e){return Array.from(t.map(function(n){return{scope:mg(n.scope),metrics:n.metrics.map(function(r){return AG(r,e)}),schemaUrl:n.scope.schemaUrl}}))}function AG(t,e){var n={name:t.descriptor.name,description:t.descriptor.description,unit:t.descriptor.unit},r=KG(t.aggregationTemporality);switch(t.dataPointType){case Le.SUM:n.sum={aggregationTemporality:r,isMonotonic:t.isMonotonic,dataPoints:gm(t,e)};break;case Le.GAUGE:n.gauge={dataPoints:gm(t,e)};break;case Le.HISTOGRAM:n.histogram={aggregationTemporality:r,dataPoints:JG(t,e)};break;case Le.EXPONENTIAL_HISTOGRAM:n.exponentialHistogram={aggregationTemporality:r,dataPoints:YG(t,e)};break}return n}function DG(t,e,n){var r={attributes:Wn(t.attributes),startTimeUnixNano:n.encodeHrTime(t.startTime),timeUnixNano:n.encodeHrTime(t.endTime)};switch(e){case an.INT:r.asInt=t.value;break;case an.DOUBLE:r.asDouble=t.value;break}return r}function gm(t,e){return t.dataPoints.map(function(n){return DG(n,t.descriptor.valueType,e)})}function JG(t,e){return t.dataPoints.map(function(n){var r=n.value;return{attributes:Wn(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 YG(t,e){return t.dataPoints.map(function(n){var r=n.value;return{attributes:Wn(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 KG(t){switch(t){case Se.DELTA:return 1;case Se.CUMULATIVE:return 2}}function _G(t,e){return{resourceMetrics:t.map(function(n){return UG(n,e)})}}var HG=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.")},zG=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 BG(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:Wn(t.attributes),droppedAttributesCount:t.droppedAttributesCount,events:t.events.map(function(o){return QG(o,e)}),droppedEventsCount:t.droppedEventsCount,status:{code:i.code,message:i.message},links:t.links.map(function(o){return jG(o,e)}),droppedLinksCount:t.droppedLinksCount}}function jG(t,e){var n;return{attributes:t.attributes?Wn(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 QG(t,e){return{attributes:t.attributes?Wn(t.attributes):[],name:t.name,timeUnixNano:e.encodeHrTime(t.time),droppedAttributesCount:t.droppedAttributesCount||0}}function $G(t,e){var n=dg(e);return{resourceSpans:tL(t,n)}}function qG(t){var e,n,r=new Map;try{for(var i=HG(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 tL(t,e){for(var n=qG(t),r=[],i=n.entries(),o=i.next();!o.done;){for(var s=zG(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 BG(d,e)});l.push({scope:mg(p[0].instrumentationLibrary),spans:f,schemaUrl:p[0].instrumentationLibrary.schemaUrl})}h=u.next()}var m={resource:fg(a),scopeSpans:l,schemaUrl:void 0};r.push(m),o=i.next()}return r}var eL={serializeRequest:function(t){var e=_G([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))}},nL={serializeRequest:function(t){var e=$G(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))}},rL=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}}},oL=5,sL=1e3,aL=5e3,lL=1.5,bm=.2;function cL(){return Math.random()*(2*bm)-bm}var uL=(function(){function t(e){this.Rr=e}return t.prototype.retry=function(e,n,r){var i=this;return new Promise(function(o,s){setTimeout(function(){i.Rr.send(e,n).then(o,s)},r)})},t.prototype.send=function(e,n){var r;return rL(this,void 0,void 0,function(){var i,o,s,a,c,l,u;return iL(this,function(h){switch(h.label){case 0:return i=Date.now()+n,[4,this.Rr.send(e,n)];case 1:o=h.sent(),s=oL,a=sL,h.label=2;case 2:return o.status==="retryable"&&s>0?(s--,c=Math.max(Math.min(a,aL)+cL(),0),a=a*lL,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.Rr.shutdown()},t})();function Lg(t){return new uL(t.transport)}function hL(t){var e=[429,502,503,504];return e.includes(t)}function pL(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 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(;(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},fL=(function(){function t(e){this.us=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.us.url);var s=r.us.headers();Object.entries(s).forEach(function(a){var c=dL(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?(M.debug("XHR success"),i({status:"success"})):o.status&&hL(o.status)?i({status:"retryable",retryInMillis:pL(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 mL(t){return new fL(t)}var yL=(function(){function t(e){this.hs=e}return t.prototype.send=function(e){var n=this;return new Promise(function(r){navigator.sendBeacon(n.hs.url,new Blob([e],{type:n.hs.blobType}))?(M.debug("SendBeacon success"),r({status:"success"})):r({status:"failure",error:new Error("SendBeacon failed")})})},t.prototype.shutdown=function(){},t})();function gL(t){return new yL(t)}function bL(t,e){return cg(t,e,Lg({transport:mL(t)}))}function vL(t,e){return cg(t,e,Lg({transport:gL({url:t.url,blobType:t.headers()["Content-Type"]})}))}var wL=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 SL(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=wL(r,2),o=i[0],s=i[1];typeof s<"u"?n[o]=String(s):M.warn('Header "'+o+'" has invalid value ('+s+") and will be ignored")}),n}}var Ln=function(){return Ln=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},Ln.apply(this,arguments)};function IL(t,e,n){var r=Ln({},n()),i={};return function(){return e!=null&&Object.assign(i,e()),t!=null&&Object.assign(i,t()),Object.assign(i,r)}}function TL(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 EL(t,e,n){var r,i,o,s;return Ln(Ln({},PO(t,e,n)),{headers:IL(SL(t.headers),e.headers,n.headers),url:(i=(r=TL(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 RL(t,e){return Ln(Ln({},UO()),{headers:function(){return t},url:"http://localhost:4318/"+e,agentOptions:{keepAlive:!0}})}function CL(t,e,n){return EL({url:t.url,timeoutMillis:t.timeoutMillis,headers:MO(t.headers),concurrencyLimit:t.concurrencyLimit},{},RL(n,e))}function Xg(t,e,n,r){var i=!!t.headers||typeof navigator.sendBeacon!="function",o=CL(t,n,r);return i?bL(o,e):vL(o,e)}var kL=(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)}})(),ZL=(function(t){kL(e,t);function e(n){return n===void 0&&(n={}),t.call(this,Xg(n,nL,"v1/traces",{"Content-Type":"application/json"}))||this}return e})(lg),os;(function(t){t[t.DELTA=0]="DELTA",t[t.CUMULATIVE=1]="CUMULATIVE",t[t.LOWMEMORY=2]="LOWMEMORY"})(os||(os={}));var xL=(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)}})(),Lc=function(){return Se.CUMULATIVE},Wg=function(t){switch(t){case H.COUNTER:case H.OBSERVABLE_COUNTER:case H.GAUGE:case H.HISTOGRAM:case H.OBSERVABLE_GAUGE:return Se.DELTA;case H.UP_DOWN_COUNTER:case H.OBSERVABLE_UP_DOWN_COUNTER:return Se.CUMULATIVE}},Mg=function(t){switch(t){case H.COUNTER:case H.HISTOGRAM:return Se.DELTA;case H.GAUGE:case H.UP_DOWN_COUNTER:case H.OBSERVABLE_UP_DOWN_COUNTER:case H.OBSERVABLE_COUNTER:case H.OBSERVABLE_GAUGE:return Se.CUMULATIVE}};function VL(){var t=pr(),e=t.OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE.trim().toLowerCase();return e==="cumulative"?Lc:e==="delta"?Wg:e==="lowmemory"?Mg:(M.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."),Lc)}function OL(t){return t!=null?t===os.DELTA?Wg:t===os.LOWMEMORY?Mg:Lc:VL()}function NL(t){return t!=null&&t.aggregationPreference?t.aggregationPreference:function(e){return He.Default()}}var GL=(function(t){xL(e,t);function e(n,r){var i=t.call(this,n)||this;return i.Bi=NL(r),i.ji=OL(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})(lg),LL=(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)}})(),XL=(function(t){LL(e,t);function e(n){return t.call(this,Xg(n!=null?n:{},eL,"v1/metrics",{"Content-Type":"application/json"}),n)||this}return e})(GL);function WL(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:My(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 ML(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]=WL(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 Xc=class extends ZL{constructor(e,n){super(zt(bt({},e),{headers:{}})),this.sampler=n}export(e,n){let r=ML(e,this.sampler);if(r.length===0)return;let i=0,o=s=>{var a;if(s.code===Gt.SUCCESS)return n({code:Gt.SUCCESS});if(i++,i>Bc)return console.error(`[@launchdarkly/observability] failed to export OTeL traces: ${(a=s.error)==null?void 0:a.message}`,s.error),n({code:Gt.FAILED,error:s.error});new Promise(c=>setTimeout(c,jc+Qc*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)}},Wc=class extends XL{constructor(e){super(zt(bt({},e),{headers:{}}))}export(e,n){let r=0,i=o=>{var s;if(o.code===Gt.SUCCESS)return n({code:Gt.SUCCESS});if(r++,r>Bc)return console.error(`[@launchdarkly/observability] failed to export OTeL metrics: ${(s=o.error)==null?void 0:s.message}`,o.error),n({code:Gt.FAILED,error:o.error});new Promise(a=>setTimeout(a,jc+Qc*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)}},PL="OT_ZONE_CONTEXT",UL="Navigation:",FL=["click","input","submit"];function AL(){return!1}var Mc=class Sn extends Hy{constructor(e={}){var n;super(Sn.moduleName,Sn.version,e),St(this,"_spansData",new WeakMap),St(this,"_zonePatched"),St(this,"_wrappedListeners",new WeakMap),St(this,"_eventsSpanMap",new WeakMap),St(this,"_eventNames"),St(this,"_shouldPreventSpanCreation"),this.La=new Set((n=e==null?void 0:e.eventNames)!=null?n:FL),this.Xa=typeof(e==null?void 0:e.shouldPreventSpanCreation)=="function"?e.shouldPreventSpanCreation:AL}init(){}Wa(e,n){let r=this.Gr.get(n);r&&(e.source==="setTimeout"?r.hrTimeLastTimeout=Nn():e.source!=="Promise.then"&&e.source!=="setTimeout"&&(r.hrTimeLastTimeout=void 0))}Ma(e){return this.La.has(e)}Er(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.Ma(o))return;let s=tg(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?pt.setSpan(st.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.Xa(o,i,a)===!0?void 0:(this.Gr.set(a,{taskCount:0}),a)}catch(a){this.w.error("failed to start create new user interaction span",a)}}ao(e){let n=this.Gr.get(e);n&&(n.taskCount--,n.taskCount===0&&this.Pa(e,n.hrTimeLastTimeout))}Si(e){let n=e.get(PL);return n&&pt.getSpan(n)}ps(e){let n=this.Gr.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}Ii(e,n,r){return typeof e=="function"?e.apply(n,r):e.handleEvent(r[0])}Ua(){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.Ii(o,this,l);if(Date.now()-((u=n.get(p.type))!=null?u:0)<1e3/60)return e.Ii(o,this,l);n.set(p.type,Date.now()),p&&(h=e.Fa.get(p)),a&&e.removePatchedListener(this,i,o);let f=e.Er(p,h);return f?(p&&e.Fa.set(p,f),st.with(pt.setSpan(st.active(),f),()=>{let m=e.Ii(o,this,l);return f.end(),m})):e.Ii(o,this,l)};if(e.addPatchedListener(this,i,o,c))return r.call(this,i,c,s)}}Aa(){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)}}ds(){return window.EventTarget?[EventTarget.prototype]:[Node.prototype,Window.prototype]}Da(){this.fs(),this.re(history,"replaceState",this.ei()),this.re(history,"pushState",this.ei()),this.re(history,"back",this.ei()),this.re(history,"forward",this.ei()),this.re(history,"go",this.ei())}ei(){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}}fs(){Ft(history.replaceState)&&this.L(history,"replaceState"),Ft(history.pushState)&&this.L(history,"pushState"),Ft(history.back)&&this.L(history,"back"),Ft(history.forward)&&this.L(history,"forward"),Ft(history.go)&&this.L(history,"go")}Ja(e){let n=pt.getSpan(st.active());n&&typeof n.updateName=="function"&&n.updateName(`${UL} ${e}`)}Ya(){let e=this;return n=>function(r){let i=Zone.current,o=e.Si(i);return o&&e.co(r,i)&&e.ao(o),n.call(this,r)}}Ka(){let e=this;return n=>function(r){let i=Zone.current,o=e.Si(i);return o&&e.co(r,i)&&(e.ps(o),e.Wa(r,o)),n.call(this,r)}}_a(){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.Er(s),c)return e.ps(c),l.run(()=>{try{return st.with(pt.setSpan(st.active(),c),()=>{let u=Zone.current;return r.ms=u,n.call(u,r,i,o)})}finally{e.ao(c)}})}else c=e.Si(l);try{return n.call(l,r,i,o)}finally{c&&e.co(r,l)&&e.ao(c)}}}co(e,n){if(e.ms&&(n=e.ms),!n||!e.data||e.data.isPeriodic)return!1;let r=this.Si(n);return!r||!this.Gr.get(r)?!1:e.type==="macroTask"||e.type==="microTask"}Pa(e,n){e&&this.Gr.get(e)&&(e.end(n),this.Gr.delete(e))}enable(){let e=this.ys();this.w.debug("applying patch to",Sn.moduleName,Sn.version,"zone:",!!e),e?(Ft(e.prototype.runTask)&&(this.L(e.prototype,"runTask"),this.w.debug("removing previous patch from method runTask")),Ft(e.prototype.scheduleTask)&&(this.L(e.prototype,"scheduleTask"),this.w.debug("removing previous patch from method scheduleTask")),Ft(e.prototype.cancelTask)&&(this.L(e.prototype,"cancelTask"),this.w.debug("removing previous patch from method cancelTask")),this.gs=!0,this.re(e.prototype,"runTask",this._a()),this.re(e.prototype,"scheduleTask",this.Ka()),this.re(e.prototype,"cancelTask",this.Ya())):(this.gs=!1,this.ds().forEach(n=>{Ft(n.addEventListener)&&(this.L(n,"addEventListener"),this.w.debug("removing previous patch from method addEventListener")),Ft(n.removeEventListener)&&(this.L(n,"removeEventListener"),this.w.debug("removing previous patch from method removeEventListener")),this.re(n,"addEventListener",this.Ua()),this.re(n,"removeEventListener",this.Aa())})),this.Da()}disable(){let e=this.ys();this.w.debug("removing patch from",Sn.moduleName,Sn.version,"zone:",!!e),e&&this.gs?(Ft(e.prototype.runTask)&&this.L(e.prototype,"runTask"),Ft(e.prototype.scheduleTask)&&this.L(e.prototype,"scheduleTask"),Ft(e.prototype.cancelTask)&&this.L(e.prototype,"cancelTask")):this.ds().forEach(n=>{Ft(n.addEventListener)&&this.L(n,"addEventListener"),Ft(n.removeEventListener)&&this.L(n,"removeEventListener")}),this.fs()}ys(){return window.Zone}};St(Mc,"version","0.1.0"),St(Mc,"moduleName","user-interaction");var DL=Mc,In={},nn,ss="highlight.record",JL="highlight.session_id",YL="launchdarkly.js.log",KL=(t,e)=>{var n,r,i,o,s,a,c,l,u;if(In.tracerProvider!==void 0){console.warn("OTEL already initialized. Skipping...");return}nn=t;let h=t.backendUrl||void 0||"https://pub.highlight.io",p=[...(r=(n=t.networkRecordingOptions)==null?void 0:n.urlBlocklist)!=null?r:[],...EO],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 Xc(m,e),g=new Pc(d,{maxExportBatchSize:100,maxQueueSize:1e3,exportTimeoutMillis:m.timeoutMillis,scheduledDelayMillis:m.timeoutMillis}),b=new pi({[_x]:(o=t.serviceName)!=null?o:"highlight-browser",[Kx]:f,"highlight.project_id":t.projectId});In.tracerProvider=new Zx({resource:b,spanProcessors:[g]}),pt.setGlobalTracerProvider(In.tracerProvider);let w=new Wc(zt(bt({},m),{url:t.otlpEndpoint+"/v1/metrics"})),E=new $N({exporter:w,exportIntervalMillis:m.timeoutMillis,exportTimeoutMillis:m.timeoutMillis});In.meterProvider=new PG({resource:b,readers:[E]}),Je.setGlobalMeterProvider(In.meterProvider);let I=[];((s=t.instrumentations)==null?void 0:s["@opentelemetry/instrumentation-document-load"])!==!1&&I.push(new eV({applyCustomAttributesOnSpan:{documentLoad:Im,documentFetch:Im,resourceFetch:HL}})),((a=t.instrumentations)==null?void 0:a["@opentelemetry/instrumentation-user-interaction"])!==!1&&I.push(new DL({eventNames:t.eventNames})),(c=t.networkRecordingOptions)!=null&&c.enabled&&(((l=t.instrumentations)==null?void 0:l["@opentelemetry/instrumentation-fetch"])!==!1&&I.push(new AV({propagateTraceHeaderCorsUrls:Tm(t.tracingOrigins),applyCustomAttributesOnSpan:(T,x,Z)=>fs(void 0,null,function*(){var k,O,X;if(!T.attributes)return;let _=T;if(_.attributes[ss]===!1)return;let tt=_.attributes["http.url"],y=(k=x.method)!=null?k:"GET";if(T.updateName(wm(tt,y,x.body)),!(Z instanceof Response)){T.setAttributes({"http.response.error":Z.message,"http.response.status":Z.status});return}Sm(T,x.body,x.headers,t.networkRecordingOptions);let v=yield LO(Z,(O=t.networkRecordingOptions)==null?void 0:O.bodyKeysToRecord,(X=t.networkRecordingOptions)==null?void 0:X.networkBodyKeysToRedact);T.setAttribute("http.response.body",v)})})),((u=t.instrumentations)==null?void 0:u["@opentelemetry/instrumentation-xml-http-request"])!==!1&&I.push(new SO({propagateTraceHeaderCorsUrls:Tm(t.tracingOrigins),applyCustomAttributesOnSpan:(T,x)=>{var Z,k;let O=x;if(!T.attributes||T.attributes[ss]===!1)return;let X=wm(O.ll,O.cl,x.responseText);T.updateName(X),Sm(T,O.Ha,O.za,t.networkRecordingOptions);let _=ag(O.Ha,(Z=t.networkRecordingOptions)==null?void 0:Z.networkBodyKeysToRedact,(k=t.networkRecordingOptions)==null?void 0:k.bodyKeysToRecord,O.za);T.setAttribute("http.request.body",_)}}))),Y1({instrumentations:I});let S=new Qy;S.enable(),In.tracerProvider.register({contextManager:S,propagator:new Oy({propagators:[new Ey,new Uc({backendUrl:h,otlpEndpoint:t.otlpEndpoint,tracingOrigins:t.tracingOrigins,urlBlocklist:p})]})})},Pc=class extends jy{onStart(e,n){e.setAttribute(JL,rn()),super.onStart(e,n)}onEnd(e){e.attributes[ss]!==!1&&super.onEnd(e)}},Uc=class extends Ny{constructor(e){super(),St(this,"highlightEndpoints"),St(this,"tracingOrigins"),St(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=pt.getSpan(e);if(!o||!o.attributes)return;let s=o.attributes["http.url"];typeof s=="string"&&(_L(s,this.highlightEndpoints,this.tracingOrigins,this.urlBlocklist)||o.setAttribute(ss,!1),!NO(s,(i=this.tracingOrigins)!=null?i:[],this.urlBlocklist))||super.inject(e,n,r)}},Pg="highlight-browser",No=Pg,vm=()=>{var t;return(t=In.tracerProvider)==null?void 0:t.getTracer(Pg)},wm=(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=Yc(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},Sm=(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=IO((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,[Bx]:s,[jx]:a.pathname,[Qx]:a.search}),a.searchParams.size>0&&t.setAttributes({"url.query_params":JSON.stringify(Object.fromEntries(a.searchParams))})},_L=(t,e,n,r)=>r!=null&&r.some(i=>t.toLowerCase().includes(i))?!1:OO(t,e),Im=t=>{var e,n,r;if(!t.events)return;let i=t.events,o={unload:ue("unloadEventStart","unloadEventEnd",i),dom_interactive:ue("fetchStart","domInteractive",i),dom_content_loaded:ue("domContentLoadedEventStart","domContentLoadedEventEnd",i),dom_complete:ue("fetchStart","domComplete",i),load_event:ue("loadEventStart","loadEventEnd",i),document_load:ue("fetchStart","loadEventEnd",i),first_paint:ue("fetchStart","firstPaint",i),first_contentful_paint:ue("fetchStart","firstContentfulPaint",i),domain_lookup:ue("domainLookupStart","domainLookupEnd",i),connect:ue("connectStart","connectEnd",i),request:ue("requestStart","requestEnd",i),response:ue("responseStart","responseEnd",i)},s=(n=(e=nn==null?void 0:nn.getIntegrations)==null?void 0:e.call(nn))!=null?n:[];if(o.document_load!==void 0)for(let a of s)a.recordGauge((r=nn==null?void 0:nn.sessionSecureId)!=null?r:"",{name:uy,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`,Ug(c)))})};function ue(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 HL=(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`,Ug(i))})},Ug=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`},Tm=t=>t===!0?[/localhost/,/^\//,new RegExp(window.location.host)]:Array.isArray(t)?t.map(e=>typeof e=="string"?new RegExp(e):e):/^$/,zL=30,BL=()=>new Promise(t=>requestAnimationFrame(e=>requestAnimationFrame(n=>t(n-e)))),jL=()=>fs(void 0,null,function*(){let t=[];for(let e=0;e<zL;e++)t.push(yield BL());return t.reduce((e,n)=>e+n,0)/t.length}),QL=(t,e)=>{let n={},r=16.666666666666668;jL().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?XC(n.event.target):""};return window.addEventListener("click",i,!0),window.addEventListener("keydown",i,!0),()=>{window.removeEventListener("keydown",i,!0),window.removeEventListener("click",i,!0)}},$L=typeof window<"u",Em=$L&&"performance"in window&&"memory"in performance?performance:{memory:{}},qL=(t,e)=>{let n=0,r=0,i=()=>{let l=(new Date().getTime()-e)/1e3,u=Em.memory.jsHeapSizeLimit||0,h=Em.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)}},sn,si,Fg,as,Fc,Ag=-1,Un=function(t){addEventListener("pageshow",function(e){e.persisted&&(Ag=e.timeStamp,t(e))},!0)},cu=function(){return window.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]},Ss=function(){var t=cu();return t&&t.activationStart||0},ye=function(t,e){var n=cu(),r="navigate";return Ag>=0?r="back-forward-cache":n&&(document.prerendering||Ss()>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}},yr=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){}},ge=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))}},uu=function(t){requestAnimationFrame(function(){return requestAnimationFrame(function(){return t()})})},Is=function(t){var e=function(n){n.type!=="pagehide"&&document.visibilityState!=="hidden"||t(n)};addEventListener("visibilitychange",e,!0),addEventListener("pagehide",e,!0)},hu=function(t){var e=!1;return function(n){e||(t(n),e=!0)}},lr=-1,Rm=function(){return document.visibilityState!=="hidden"||document.prerendering?1/0:0},ls=function(t){document.visibilityState==="hidden"&&lr>-1&&(lr=t.type==="visibilitychange"?t.timeStamp:0,tX())},Cm=function(){addEventListener("visibilitychange",ls,!0),addEventListener("prerenderingchange",ls,!0)},tX=function(){removeEventListener("visibilitychange",ls,!0),removeEventListener("prerenderingchange",ls,!0)},pu=function(){return lr<0&&(lr=Rm(),Cm(),Un(function(){setTimeout(function(){lr=Rm(),Cm()},0)})),{get firstHiddenTime(){return lr}}},vi=function(t){document.prerendering?addEventListener("prerenderingchange",function(){return t()},!0):t()},km=[1800,3e3],Dg=function(t,e){e=e||{},vi(function(){var n,r=pu(),i=ye("FCP"),o=yr("paint",function(s){s.forEach(function(a){a.name==="first-contentful-paint"&&(o.disconnect(),a.startTime<r.firstHiddenTime&&(i.value=Math.max(a.startTime-Ss(),0),i.entries.push(a),n(!0)))})});o&&(n=ge(t,i,km,e.reportAllChanges),Un(function(s){i=ye("FCP"),n=ge(t,i,km,e.reportAllChanges),uu(function(){i.value=performance.now()-s.timeStamp,n(!0)})}))})},Zm=[.1,.25],eX=function(t,e){e=e||{},Dg(hu(function(){var n,r=ye("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=yr("layout-shift",s);a&&(n=ge(t,r,Zm,e.reportAllChanges),Is(function(){s(a.takeRecords()),n(!0)}),Un(function(){i=0,r=ye("CLS",0),n=ge(t,r,Zm,e.reportAllChanges),uu(function(){return n()})}),setTimeout(n,0))}))},ti={passive:!0,capture:!0},nX=new Date,xm=function(t,e){sn||(sn=e,si=t,Fg=new Date,Yg(removeEventListener),Jg())},Jg=function(){if(si>=0&&si<Fg-nX){var t={entryType:"first-input",name:sn.type,target:sn.target,cancelable:sn.cancelable,startTime:sn.timeStamp,processingStart:sn.timeStamp+si};as.forEach(function(e){e(t)}),as=[]}},rX=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(){xm(n,r),s()},o=function(){s()},s=function(){removeEventListener("pointerup",i,ti),removeEventListener("pointercancel",o,ti)};addEventListener("pointerup",i,ti),addEventListener("pointercancel",o,ti)})(e,t):xm(e,t)}},Yg=function(t){["mousedown","keydown","touchstart","pointerdown"].forEach(function(e){return t(e,rX,ti)})},Vm=[100,300],iX=function(t,e){e=e||{},vi(function(){var n,r=pu(),i=ye("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=yr("first-input",s);n=ge(t,i,Vm,e.reportAllChanges),a&&Is(hu(function(){s(a.takeRecords()),a.disconnect()})),a&&Un(function(){var c;i=ye("FID"),n=ge(t,i,Vm,e.reportAllChanges),as=[],si=-1,sn=null,Yg(addEventListener),c=o,as.push(c),Jg()})})},Kg=0,oc=1/0,Go=0,oX=function(t){t.forEach(function(e){e.interactionId&&(oc=Math.min(oc,e.interactionId),Go=Math.max(Go,e.interactionId),Kg=Go?(Go-oc)/7+1:0)})},_g=function(){return Fc?Kg:performance.interactionCount||0},sX=function(){"interactionCount"in performance||Fc||(Fc=yr("event",oX,{type:"event",buffered:!0,durationThreshold:0}))},Om=[200,500],Hg=0,Nm=function(){return _g()-Hg},Ge=[],sc={},Gm=function(t){var e=Ge[Ge.length-1],n=sc[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]};sc[r.id]=r,Ge.push(r)}Ge.sort(function(i,o){return o.latency-i.latency}),Ge.splice(10).forEach(function(i){delete sc[i.id]})}},aX=function(t,e){e=e||{},vi(function(){var n;sX();var r,i=ye("INP"),o=function(a){a.forEach(function(u){u.interactionId&&Gm(u),u.entryType==="first-input"&&!Ge.some(function(h){return h.entries.some(function(p){return u.duration===p.duration&&u.startTime===p.startTime})})&&Gm(u)});var c,l=(c=Math.min(Ge.length-1,Math.floor(Nm()/50)),Ge[c]);l&&l.latency!==i.value&&(i.value=l.latency,i.entries=l.entries,r())},s=yr("event",o,{durationThreshold:(n=e.durationThreshold)!==null&&n!==void 0?n:40});r=ge(t,i,Om,e.reportAllChanges),s&&("interactionId"in PerformanceEventTiming.prototype&&s.observe({type:"first-input",buffered:!0}),Is(function(){o(s.takeRecords()),i.value<0&&Nm()>0&&(i.value=0,i.entries=[]),r(!0)}),Un(function(){Ge=[],Hg=_g(),i=ye("INP"),r=ge(t,i,Om,e.reportAllChanges)}))})},Lm=[2500,4e3],ac={},lX=function(t,e){e=e||{},vi(function(){var n,r=pu(),i=ye("LCP"),o=function(c){var l=c[c.length-1];l&&l.startTime<r.firstHiddenTime&&(i.value=Math.max(l.startTime-Ss(),0),i.entries=[l],n())},s=yr("largest-contentful-paint",o);if(s){n=ge(t,i,Lm,e.reportAllChanges);var a=hu(function(){ac[i.id]||(o(s.takeRecords()),s.disconnect(),ac[i.id]=!0,n(!0))});["keydown","click"].forEach(function(c){addEventListener(c,function(){return setTimeout(a,0)},!0)}),Is(a),Un(function(c){i=ye("LCP"),n=ge(t,i,Lm,e.reportAllChanges),uu(function(){i.value=performance.now()-c.timeStamp,ac[i.id]=!0,n(!0)})})}})},Xm=[800,1800],cX=function t(e){document.prerendering?vi(function(){return t(e)}):document.readyState!=="complete"?addEventListener("load",function(){return t(e)},!0):setTimeout(e,0)},uX=function(t,e){e=e||{};var n=ye("TTFB"),r=ge(t,n,Xm,e.reportAllChanges);cX(function(){var i=cu();if(i){var o=i.responseStart;if(o<=0||o>performance.now())return;n.value=Math.max(o-Ss(),0),n.entries=[i],r(!0),Un(function(){n=ye("TTFB",0),(r=ge(t,n,Xm,e.reportAllChanges))(!0)})}})},hX=t=>(eX(t),Dg(t),iX(t),lX(t),uX(t),aX(t),()=>{}),sr=typeof navigator<"u"&&"connection"in navigator?navigator.connection:{},pX=(t,e)=>{let n=()=>{let i=(new Date().getTime()-e)/1e3;t({relativeTimestamp:i,downlink:sr.downlink,downlinkMax:sr.downlinkMax,effectiveType:sr.effectiveType,rtt:sr.rtt,saveData:sr.saveData,type:sr.type})};n();let r;return r=setInterval(()=>{n()},1e3),()=>{clearInterval(r)}},dX=()=>{if(!("performance"in window&&"memory"in performance))return{getDeviceDetails:void 0,getCurrentDeviceDetails:void 0};let t=window.performance;return{getDeviceDetails:()=>({deviceMemory:fX(navigator.deviceMemory||0)}),getCurrentDeviceDetails:()=>{let e=lc(t.memory.jsHeapSizeLimit),n=lc(t.memory.totalJSHeapSize),r=lc(t.memory.usedJSHeapSize);return{jsHeapSizeLimit:e,totalJSHeapSize:n,usedJSHeapSize:r}}}},lc=t=>t/Math.pow(1e3,2),fX=t=>1024*t,mX="launchdarkly.js.log",yX="log.severity",gX="log.message",Wm="launchdarkly.sampling.ratio";function bX(t){return"regexValue"in t}function vX(t){return"matchValue"in t}function wX(t){let e=Math.trunc(t);return e===1?!0:e===0?!1:Math.floor(Math.random()*e)===0}var Ac=class{constructor(e=wX){St(this,"regexCache",new Map),St(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===mX?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(vX(e))return e.matchValue===n;if(bX(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[yX];if(typeof r=="string"&&!this.matchesValue(e.severityText,r))return!1}if(e.message){let r=n[gX];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:{[Wm]: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:{[Wm]:r.samplingRatio}}}return{sample:!0}}},Mm=()=>{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},Dc=class{constructor(e){St(this,"organizationID"),St(this,"_integrations",[]),St(this,"_gauges",new Map),St(this,"_counters",new Map),St(this,"_histograms",new Map),St(this,"_up_down_counters",new Map),St(this,"sampler",new Ac),St(this,"graphqlSDK"),typeof e.projectId=="string"?this.organizationID=e.projectId:this.organizationID=e.projectId.toString(),KL(zt(bt({},e),{getIntegrations:()=>this.yr}),this.sampler);let n=new WR(`${e.backendUrl}`,{headers:{}});this.graphqlSDK=iC(n,bC()),this.configureSampling(),this.setupListeners(e)}configureSampling(){return fs(this,null,function*(){try{let e=yield this.graphqlSDK.GetSamplingConfig({organization_verbose_id:`${this.organizationID}`});this.sampler.setConfig(e.sampling)}catch(e){Ke("sampling","warn",`LaunchDarkly Observability: Failed to configure sampling: ${e}`)}})}recordLog(e,n,r){this.startSpan(YL,i=>{let o=typeof e=="string"?e:Tn(e);i==null||i.addEvent("log",bt({"log.severity":n,"log.message":o},r)),n==="error"&&(i==null||i.recordException(new Error(o)),i==null||i.setStatus({code:qo.ERROR,message:o}))})}recordError(e,n,r,i,o){var s,a,c,l;e.cause&&(r=zt(bt({},r),{"exception.cause":JSON.stringify(e.cause)}));let u=n?n+":"+e.message:e.message;o==="React.ErrorBoundary"&&(u="ErrorBoundary: "+u);let h=ms(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(bt({event:p.event,type:p.type,url:p.url,source:p.source,lineNumber:p.lineNumber,columnNumber:p.columnNumber},r))});for(let f of this.yr)f.error(rn(),p)}recordCount(e){let n=Je.getMeter(No),r=this.Ba.get(e.name);r||(r=n.createCounter(e.name),this.Ba.set(e.name,r)),r.add(e.value,zt(bt({},e.attributes),{"highlight.session_id":rn()}))}recordGauge(e){var n,r,i;let o=Je.getMeter(No),s=this.ja.get(e.name);s||(s=o.createGauge(e.name),this.ja.set(e.name,s)),s.record(e.value,zt(bt({},e.attributes),{"highlight.session_id":rn()}));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.yr)c.recordGauge(rn(),a)}recordIncr(e){this.recordCount(zt(bt({},e),{value:1}))}recordHistogram(e){let n=Je.getMeter(No),r=this.Qa.get(e.name);r||(r=n.createHistogram(e.name),this.Qa.set(e.name,r)),r.record(e.value,zt(bt({},e.attributes),{"highlight.session_id":rn()}))}recordUpDownCounter(e){let n=Je.getMeter(No),r=this.$a.get(e.name);r||(r=n.createUpDownCounter(e.name),this.$a.set(e.name,r)),r.add(e.value,zt(bt({},e.attributes),{"highlight.session_id":rn()}))}startSpan(e,n,r,i){let o=vm();if(!o){let a=Mm();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=vm();if(!o){let s=Mm();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.yr.push(new LC(e,n))}getHooks(e){return this.yr.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:wn.ViewportHeight,value:e,attributes:{category:he.Device,group:window.location.href}}),this.recordGauge({name:wn.ViewportWidth,value:n,attributes:{category:he.Device,group:window.location.href}}),this.recordGauge({name:wn.ScreenHeight,value:r,attributes:{category:he.Device,group:window.location.href}}),this.recordGauge({name:wn.ScreenWidth,value:i,attributes:{category:he.Device,group:window.location.href}}),this.recordGauge({name:wn.ViewportArea,value:e*n,attributes:{category:he.Device,group:window.location.href}})}setupListeners(e){var n;e.disableConsoleRecording||HC(i=>{var o,s,a,c,l;let u=zt(bt({},i.attributes?{attributes:i.attributes}:{}),{type:i.type});if(e.reportConsoleErrors&&(i.type==="Error"||i.type==="error")&&i.value&&i.trace){let h=Tn(i.value);if(bf.includes(h)||vf.some(f=>h.includes(f)))return;let p=new Error(h);p.stack=Tn(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(Tn(i.value),"error",{})},{level:(n=e.consoleMethodsToRecord)!=null?n:[],logger:"console",stringifyOptions:{depthOfLimit:10,numOfKeysLimit:100,stringLengthLimit:1e3}}),e.enablePerformanceRecording!==!1&&(qL(i=>{Object.entries(i).filter(([o])=>o!=="relativeTimestamp").forEach(([o,s])=>s&&this.recordGauge({name:o,value:s,attributes:{category:he.Performance,group:window.location.href}}))},0),QL(i=>{this.recordGauge({name:"Jank",value:i.jankAmount,attributes:{category:he.WebVital,group:i.querySelector}})},0)),BC(i=>{var o;if(bf.includes(i.event)||vf.some(c=>i.event.includes(c)))return;let s=new Error(i.event);s.stack=Tn(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,zt(bt({},a),{lineNumber:i.lineNumber.toString(),columnNumber:i.columnNumber.toString(),source:i.source,url:i.url}),i.source,i.type)},{enablePromisePatch:!!e.enablePromisePatch}),hX(i=>{let{name:o,value:s}=i;this.recordGauge({name:o,value:s,attributes:{group:window.location.href,category:he.WebVital}})}),WC(i=>{this.submitViewportMetrics(i)}),pX(i=>{let o={category:he.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}=dX();r&&this.recordGauge({name:wn.DeviceMemory,value:r().deviceMemory,attributes:{category:he.Device,group:window.location.href}})}},cs=class extends PC{constructor(e,n){var r=(...h)=>(super(...h),St(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 Dc(h),kn.load(this.observe)}catch(h){Ke("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=bt(bt({[Hx]:e.sdk.name,[zx]:e.sdk.version,[wC]:e.clientSideId,[RC]:"LaunchDarkly"},(n=e.application)!=null&&n.id?{[kC]:e.application.id}:{}),(r=e.application)!=null&&r.version?{[ZC]: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",zt(bt({},i),{key:pf(o.context),context:JSON.stringify(df(o.context)),timeout:o.timeout,[NC]: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=bt({[SC]:o.flagKey,[EC]:JSON.stringify(a.value)},a.variationIndex?{[CC]:a.variationIndex}:{});if(a.reason)for(let d in uf){let g=d,b=a.reason[g];b&&(f[uf[g]]=b)}o.context&&(f[IC]=JSON.stringify(df(o.context)),f[TC]=pf(o.context));let m=bt(bt({},i),f);return(p=this.observe)==null||p.startSpan(vC,d=>{d&&d.addEvent(At,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",bt(zt(bt({},i),{key:o.key,value:o.metricValue}),typeof o.data=="object"?o.data:{}))}}]}};du();function $J(t,e,n){var i,o;let r=vp(bp({},n),{plugins:[...(n==null?void 0:n.plugins)||[],new cs((i=n==null?void 0:n.tmpProjectId)!=null?i:"1",n==null?void 0:n.observability),new Qi((o=n==null?void 0:n.tmpProjectId)!=null?o:"1",n==null?void 0:n.sessionReplay)]});return tf(t,e,r)}export{kn as LDObserve,An as LDRecord,Z9 as basicLogger,$J as createClient};
644
644
  /*! Bundled license information:
645
645
 
646
646
  @launchdarkly/session-replay/dist/index-B27CYB0H.js: