@redocly/replay 0.17.0 → 0.17.1
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/{replay-index-CKy0K8pW.js → replay-index-B5S6qAS8.js} +1 -1
- package/dist/{replay-index-CvSzEat4.js → replay-index-CK1akZKQ.js} +5 -5
- package/dist/{replay-index-B_4Ytd2E.js → replay-index-DgVAEDqk.js} +1 -1
- package/dist/{replay-index-XB_Wp1QN.js → replay-index-JNXmVopJ.js} +1 -1
- package/dist/{replay-index-C7L6ryA4.js → replay-index-hrcnswLO.js} +1 -1
- package/dist/{replay-index-BZDR00c4.js → replay-index-yIZURr30.js} +6 -6
- package/dist/{replay-tauri-path-74y0xfNn.js → replay-tauri-path-8meq0GGy.js} +2 -2
- package/dist/{replay-tauri-path-BUD-D9Dk.js → replay-tauri-path-CEMesvhn.js} +1 -1
- package/dist/replay.cjs +1 -1
- package/dist/replay.js +1 -1
- package/package.json +2 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var z3 = Object.defineProperty;
|
|
2
2
|
var S3 = (u, a, e) => a in u ? z3(u, a, { enumerable: !0, configurable: !0, writable: !0, value: e }) : u[a] = e;
|
|
3
3
|
var Iu = (u, a, e) => S3(u, typeof a != "symbol" ? a + "" : a, e);
|
|
4
|
-
import { b as O4, t as M3, p as Yu, J as P0, i as ui, a as Ir, r as j3, c as wo, m as P3, s as w3, d as q4, e as K3, f as T3, g as ei, h as L3, l as N3, j as R3, k as H3 } from "./replay-index-
|
|
4
|
+
import { b as O4, t as M3, p as Yu, J as P0, i as ui, a as Ir, r as j3, c as wo, m as P3, s as w3, d as q4, e as K3, f as T3, g as ei, h as L3, l as N3, j as R3, k as H3 } from "./replay-index-CK1akZKQ.js";
|
|
5
5
|
async function G3(u) {
|
|
6
6
|
const { descriptionPath: a, externalRefResolver: e, base: r } = u, i = await O4({
|
|
7
7
|
base: r,
|
|
@@ -36473,7 +36473,7 @@ function ff() {
|
|
|
36473
36473
|
}
|
|
36474
36474
|
const ns = class ns {
|
|
36475
36475
|
static async getUtils() {
|
|
36476
|
-
return ns.utils || (ns.utils = ff() ? await import("./replay-tauri-path-
|
|
36476
|
+
return ns.utils || (ns.utils = ff() ? await import("./replay-tauri-path-8meq0GGy.js") : await Promise.resolve().then(() => PQe)), ns.utils;
|
|
36477
36477
|
}
|
|
36478
36478
|
static async join(...e) {
|
|
36479
36479
|
return (await ns.getUtils()).join(...e);
|
|
@@ -42485,7 +42485,7 @@ const Sw = Mi({});
|
|
|
42485
42485
|
function CI() {
|
|
42486
42486
|
return Gr(Sw) || {};
|
|
42487
42487
|
}
|
|
42488
|
-
const OCe = "0.
|
|
42488
|
+
const OCe = "0.0.0-20251009123334", xCe = {
|
|
42489
42489
|
version: OCe
|
|
42490
42490
|
};
|
|
42491
42491
|
class wCe {
|
|
@@ -59734,7 +59734,7 @@ function W2e({
|
|
|
59734
59734
|
var a;
|
|
59735
59735
|
if (ff())
|
|
59736
59736
|
try {
|
|
59737
|
-
const { open: l } = await import("./replay-index-
|
|
59737
|
+
const { open: l } = await import("./replay-index-DgVAEDqk.js"), c = await l({
|
|
59738
59738
|
multiple: !0
|
|
59739
59739
|
});
|
|
59740
59740
|
if (!c)
|
|
@@ -60071,7 +60071,7 @@ const fDe = ({ data: t }) => {
|
|
|
60071
60071
|
var f;
|
|
60072
60072
|
if (d == null || d.preventDefault(), ff())
|
|
60073
60073
|
try {
|
|
60074
|
-
const { open: h } = await import("./replay-index-
|
|
60074
|
+
const { open: h } = await import("./replay-index-DgVAEDqk.js"), m = await h();
|
|
60075
60075
|
if (!m)
|
|
60076
60076
|
return;
|
|
60077
60077
|
const p = await xm(m);
|
|
@@ -89740,7 +89740,7 @@ async function BZe({
|
|
|
89740
89740
|
sourceDescriptions: o,
|
|
89741
89741
|
severitySettings: s
|
|
89742
89742
|
}) {
|
|
89743
|
-
const a = `${r}/${t}`, l = new VZe(), c = n.map((f) => JSON.stringify({ [f.name]: f.value })), u = qZe(i, o), { run: d } = await import("./replay-index-
|
|
89743
|
+
const a = `${r}/${t}`, l = new VZe(), c = n.map((f) => JSON.stringify({ [f.name]: f.value })), u = qZe(i, o), { run: d } = await import("./replay-index-B5S6qAS8.js");
|
|
89744
89744
|
return await d({
|
|
89745
89745
|
files: [a],
|
|
89746
89746
|
workflow: e ? [e] : [],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./replay-index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./replay-index-yIZURr30.js");async function n(e={}){return typeof e=="object"&&Object.freeze(e),await t.invoke("plugin:dialog|open",{options:e})}exports.open=n;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var v3=Object.defineProperty;var b3=(u,a,e)=>a in u?v3(u,a,{enumerable:!0,configurable:!0,writable:!0,value:e}):u[a]=e;var Ou=(u,a,e)=>b3(u,typeof a!="symbol"?a+"":a,e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const bu=require("./replay-index-
|
|
1
|
+
"use strict";var v3=Object.defineProperty;var b3=(u,a,e)=>a in u?v3(u,a,{enumerable:!0,configurable:!0,writable:!0,value:e}):u[a]=e;var Ou=(u,a,e)=>b3(u,typeof a!="symbol"?a+"":a,e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const bu=require("./replay-index-yIZURr30.js");async function B3(u){const{descriptionPath:a,externalRefResolver:e,base:r}=u,i=await bu.bundle({base:r,ref:a,config:u.config,dereference:!0,externalRefResolver:e});if(!i)throw new Error(`Could not find source description file '${a}'.`);return i.bundle.parsed}function _4(u){var e;if(typeof u!="object")return;const a=Object.keys(u)[0];return a?(e=u[a])==null?void 0:e.value:void 0}const{env:ae={},argv:$4=[],platform:A3=""}=typeof process>"u"?{}:process,f3="NO_COLOR"in ae||$4.includes("--no-color"),y3="FORCE_COLOR"in ae||$4.includes("--color"),z3=A3==="win32",S3=ae.TERM==="dumb",j3=bu.tty&&void 0,M3="CI"in ae&&("GITHUB_ACTIONS"in ae||"GITLAB_CI"in ae||"CIRCLECI"in ae),P3=!f3&&(y3||z3&&!S3||j3||M3),V4=(u,a,e,r,i=a.substring(0,u)+r,o=a.substring(u+e.length),n=o.indexOf(e))=>i+(n<0?o:V4(n,o,e,r)),w3=(u,a,e,r,i)=>u<0?e+a+r:e+V4(u,a,r,i)+r,K3=(u,a,e=u,r=u.length+1)=>i=>i||!(i===""||i===void 0)?w3((""+i).indexOf(a,r),i,u,a,e):"",Su=(u,a,e)=>K3(`\x1B[${u}m`,`\x1B[${a}m`,e),So={reset:Su(0,0),bold:Su(1,22,"\x1B[22m\x1B[1m"),dim:Su(2,22,"\x1B[22m\x1B[2m"),italic:Su(3,23),underline:Su(4,24),inverse:Su(7,27),hidden:Su(8,28),strikethrough:Su(9,29),black:Su(30,39),red:Su(31,39),green:Su(32,39),yellow:Su(33,39),blue:Su(34,39),magenta:Su(35,39),cyan:Su(36,39),white:Su(37,39),gray:Su(90,39),bgBlack:Su(40,49),bgRed:Su(41,49),bgGreen:Su(42,49),bgYellow:Su(43,49),bgBlue:Su(44,49),bgMagenta:Su(45,49),bgCyan:Su(46,49),bgWhite:Su(47,49),blackBright:Su(90,39),redBright:Su(91,39),greenBright:Su(92,39),yellowBright:Su(93,39),blueBright:Su(94,39),magentaBright:Su(95,39),cyanBright:Su(96,39),whiteBright:Su(97,39),bgBlackBright:Su(100,49),bgRedBright:Su(101,49),bgGreenBright:Su(102,49),bgYellowBright:Su(103,49),bgBlueBright:Su(104,49),bgMagentaBright:Su(105,49),bgCyanBright:Su(106,49),bgWhiteBright:Su(107,49)},T3=({useColor:u=P3}={})=>u?So:Object.keys(So).reduce((a,e)=>({...a,[e]:String}),{}),{reset:vru,bold:w0,dim:L3,italic:bru,underline:N3,inverse:J4,hidden:Bru,strikethrough:Aru,black:fru,red:Ku,green:ke,yellow:K0,blue:Gu,magenta:yru,cyan:zru,white:jo,gray:$u,bgBlack:Sru,bgRed:Rr,bgGreen:jru,bgYellow:Mru,bgBlue:Pru,bgMagenta:wru,bgCyan:Kru,bgWhite:Tru,blackBright:Lru,redBright:Nru,greenBright:Rru,yellowBright:Hru,blueBright:Gru,magentaBright:_ru,cyanBright:$ru,whiteBright:Vru,bgBlackBright:Jru,bgRedBright:Iru,bgGreenBright:Oru,bgYellowBright:qru,bgBlueBright:Wru,bgMagentaBright:Zru,bgCyanBright:Uru,bgWhiteBright:Yru}=T3(),R3=u=>/\{.*?\}/.test(u);function B0({value:u,ctx:a,logger:e}){if(!u)return u;if(typeof u=="object"){for(const r in u)u[r]=B0({value:u[r],ctx:a,logger:e});return u}return typeof u=="number"||typeof u=="boolean"?u:u.toString().startsWith("$faker.")?Ue({pointer:u.slice(1),ctx:a,logger:e}):R3(u)?_3(u,a,e):V3(u,a,e)}function H3(u,a,e){const r=u.indexOf("{");if(r!==-1){const o=u.substring(r+1).slice(0,-1),n=Ue({pointer:o.slice(1),ctx:a,logger:e});return n&&u.replace(/{(.*)}/,n)}else return u}function G3(u,a){const e=Object.keys(a),r=Object.values(a);return new Function(...e,`return ${u}`)(...r)}function _3(u,a,e){const r=/\{\$(\{[^{}]*\}|[^{}])*\}/g;let i=u;return i=i.replace(r,(o,n)=>$3(o,a,e)),i}function $3(u,a,e){if(!u.includes("$"))return u;if(u.includes("$faker."))return H3(u,a,e);const r=qe(a)(J3(u));return r!==void 0?r:""}const V3=(u,a,e)=>{if(!u)return u;const r=u.toString();if(!r.includes("$"))return u;if(r.startsWith("$file(")&&r.endsWith(")"))return r.slice(7,-2);if(r.startsWith("$sourceDescriptions.")&&r.includes(".workflows.")){const i=r.split("."),o=i[1],n=i[3];if(!o||!n)return;const s=qe(a)("$sourceDescriptions");return s[o]?s[o].workflows.find(t=>t.workflowId===n):void 0}return r&&r.trim().startsWith("faker.")?Ue({pointer:r,ctx:a,logger:e}):r?qe(a)(Mo(r)):r.replace(/\$\{([^}]+)}/g,(i,o)=>qe(a)(Mo(o)))};function J3(u){return u.replace(/\{(.*)\}/,"$1")}function Mo(u){return u.replace(/\['(.*?)'\]/g,".$1")}const qe=(u,a="")=>e=>{if(a||(a=e),!e)return u;const[r,...i]=e.split(".");if(!u)throw Error(`Cannot get ${Ku(r)} from ${Ku(a)}`);if((u==null?void 0:u[r])===void 0){const o=` Undefined ${Ku(r)} at ${Ku(a)}.`,n=Object.keys(u).length?`Did you mean to use another key? Available keys:
|
|
2
2
|
${Object.keys(u).join(", ")}.
|
|
3
3
|
`:"",s=`${o} ${n}`;throw Error(s)}return qe(u[r],a)(i.join("."))};function Ue({pointer:u,ctx:a,logger:e}){const r=u.split("."),i={ctx:{faker:a.$faker}};try{const o=r.map(n=>n.trim()).map((n,s)=>n.endsWith(")")?`${s==0?"":"."}${n}`:`["${n}"]`).join("");return G3(`ctx${o}`,i)}catch(o){e.error(Ku(o.toString()));return}}function I4(u,a,e){if(typeof u=="string"&&u)return B0({value:u,ctx:a,logger:e});if(!(typeof u=="string"||typeof u=="number"||typeof u=="boolean"||typeof u>"u"||u instanceof Blob||u===null))for(const r in u)typeof u[r]=="string"?u[r]&&(u[r]=B0({value:u[r],ctx:a,logger:e})):I4(u[r],a,e)}function Po(u,a,e){return I4(u,a,e)||u}function wo(u,a){if(!u)return;const e={};for(const r in a)e[`{${r}}`]=String(a[r]);return u.split(/(\{[a-zA-Z0-9_.-]+\}+)/g).map(r=>e[r]?e[r]:r).join("")}function I3(u){return typeof u=="object"&&u!==null&&"name"in u&&"value"in u&&!("in"in u)}function Jn(u){return typeof u=="object"&&u!==null&&"in"in u&&["header","query","path","cookie"].includes(u.in)}const O3=/^image\/(png|jpeg|gif|bmp|webp|svg\+xml)|application\/pdf$/;function O4(u){return u.startsWith("$file(")&&u.endsWith(")")?u.substring(7,u.length-2):u}const Ko=async(u,a,e,r,i)=>{const o=bu.pathBrowserifyExports.dirname(r),n=bu.pathBrowserifyExports.resolve(o,O4(e));u.append(a,await i.options.requestFileLoader.getFileBody(n))},q4=(u,a,e,r,i,o)=>{Object.entries(e).forEach(([n,s])=>{const t=o?`${o}[${n}]`:n;typeof s=="string"&&s.startsWith("$file(")&&s.endsWith(")")?u.push(Ko(a,t,s,r,i)):Array.isArray(s)?s.forEach(E=>{typeof E=="string"&&E.startsWith("$file(")&&E.endsWith(")")?u.push(Ko(a,t,E,r,i)):a.append(t,E.toString())}):typeof s=="object"&&s!==null?q4(u,a,s,r,i,t):(typeof s=="string"||typeof s=="number"||typeof s=="boolean")&&a.append(t,s.toString())})},q3=async(u,a,e,r)=>{if(u&&typeof u=="object"&&!Array.isArray(u)){const i=[];q4(i,a,u,e,r),await Promise.all(i)}},W3=async(u,a)=>{if(typeof u=="string"&&u.startsWith("$file(")&&u.endsWith(")")){const e=bu.pathBrowserifyExports.resolve(bu.pathBrowserifyExports.dirname(a.options.filePath),O4(u));return a.options.requestFileLoader.getFileBody(e)}else return u};async function Z3(u,a){if(!u)return{payload:void 0,contentType:void 0,encoding:void 0,replacements:void 0};const{payload:e,contentType:r}=u;if(r==="multipart/form-data"){const i=new FormData,o=bu.pathBrowserifyExports.resolve(a.options.filePath);return await q3(e,i,o,a),{...u,payload:i}}else{if(r==="application/octet-stream"||typeof r=="string"&&O3.test(r))return{...u,payload:await W3(e,a),contentType:"application/octet-stream"};if(r==="application/x-www-form-urlencoded"&&typeof e=="string")return{...u,payload:Object.fromEntries(new URLSearchParams(e).entries()),contentType:"application/x-www-form-urlencoded"}}return u}function U3(u,a){function e(){this.constructor=u}e.prototype=a.prototype,u.prototype=new e}function Ye(u,a,e,r){this.message=u,this.expected=a,this.found=e,this.location=r,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,Ye)}U3(Ye,Error);Ye.buildMessage=function(u,a,e){var r={literal:function(l){return'"'+o(l.text)+'"'},class:function(l){var D=l.parts.map(function(x){return Array.isArray(x)?n(x[0])+"-"+n(x[1]):n(x)});return"["+(l.inverted?"^":"")+D+"]"},any:function(){return"any character"},end:function(){return"end of input"},other:function(l){return l.description},not:function(l){return"not "+s(l.expected)}};function i(l){return l.charCodeAt(0).toString(16).toUpperCase()}function o(l){return l.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(D){return"\\x0"+i(D)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(D){return"\\x"+i(D)})}function n(l){return l.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(D){return"\\x0"+i(D)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(D){return"\\x"+i(D)})}function s(l){return r[l.type](l)}function t(l){var D=l.map(s),x,c;if(D.sort(),D.length>0){for(x=1,c=1;x<D.length;x++)D[x-1]!==D[x]&&(D[c]=D[x],c++);D.length=c}switch(D.length){case 1:return D[0];case 2:return D[0]+" or "+D[1];default:return D.slice(0,-1).join(", ")+", or "+D[D.length-1]}}function E(l){return l?'"'+o(l)+'"':"end of input"}return"Expected "+t(u)+" but "+E(a)+" found."};function Y3(u,a){a=a!==void 0?a:{};var e={},r={Start:ka},i=ka,o="&&",n="||",s="!",t="==",E="!=",l="<=",D="<",x=">=",c=">",C="{",k="}",b="$url",d="$method",F="$statusCode",g="$request.",B="$response.",p="$inputs.",h="$steps.",v="$workflows.",j="$sourceDescriptions.",K="$components.",H="$components.parameters.",V="$outputs.",$=".",R="outputs.",U="header.",Y="query.",tu="path.",ou="body",Du="#",mu="/",X="~",J="0",Q="1",q="[",f="]",w='"',I="'",iu="true",su="false",L="null",M="undefined",S=/^[!-.0-9A-Z_a-z]/,_=/^[a-zA-Z]/,O=/^[a-zA-Z0-9_\-]/,uu=/^[!#$%&'*+\-.\^_`|~a-zA-Z0-9\-]/,lu=/^[1-9]/,Fu=/^[0-9]/,yu=/^[^"]/,Au=/^[^']/,zu=/^[ \t\r\n]/,gu=fu("&&",!1),eu=fu("||",!1),ru=fu("!",!1),du=fu("==",!1),hu=fu("!=",!1),_u=fu("<=",!1),Qu=fu("<",!1),L0=fu(">=",!1),N0=fu(">",!1),A0=fu("{",!1),R0=fu("}",!1),ti=fu("$url",!1),si=fu("$method",!1),ne=fu("$statusCode",!1),oe=fu("$request.",!1),li=fu("$response.",!1),Ei=fu("$inputs.",!1),Di=fu("$steps.",!1),ua=fu("$workflows.",!1),xi=fu("$sourceDescriptions.",!1),ea=fu("$components.",!1),ci=fu("$components.parameters.",!1),aa=fu("$outputs.",!1),f0=fu(".",!1),ra=fu("outputs.",!1),be=fu("header.",!1),di=fu("query.",!1),mi=fu("path.",!1),Fi=fu("body",!1),ki=fu("#",!1),ia=fu("/",!1),na=Xu([["!","."],["0","9"],["A","Z"],"_",["a","z"]],!1,!1),hi=fu("~",!1),oa=fu("0",!1),pi=fu("1",!1),gi=Xu([["a","z"],["A","Z"]],!1,!1),ta=Xu([["a","z"],["A","Z"],["0","9"],"_","-"],!1,!1),sa=Xu(["!","#","$","%","&","'","*","+","-",".","^","_","`","|","~",["a","z"],["A","Z"],["0","9"],"-"],!1,!1),Ci=fu("[",!1),vi=fu("]",!1),bi=Xu([["1","9"]],!1,!1),te=Xu([["0","9"]],!1,!1),la=fu('"',!1),Ea=Xu(['"'],!0,!1),Da=fu("'",!1),xa=Xu(["'"],!0,!1),Bi=fu("true",!1),Ai=fu("false",!1),fi=fu("null",!1),ca=fu("undefined",!1),da=Xu([" "," ","\r",`
|
|
4
4
|
`],!1,!1),T=0,se=[{line:1,column:1}],H0=[],le;if("startRule"in a){if(!(a.startRule in r))throw new Error(`Can't start parsing from rule "`+a.startRule+'".');i=r[a.startRule]}function fu(z,P){return{type:"literal",text:z,ignoreCase:P}}function Xu(z,P,W){return{type:"class",parts:z,inverted:P,ignoreCase:W}}function yi(){return{type:"end"}}function ma(z){var P=se[z],W;if(P)return P;for(W=z-1;!se[W];)W--;for(P=se[W],P={line:P.line,column:P.column};W<z;)u.charCodeAt(W)===10?(P.line++,P.column=1):P.column++,W++;return se[z]=P,P}var zi=typeof a.filename=="string"&&a.filename.length>0;function Fa(z,P){var W={};zi&&(W.filename=a.filename);var G=ma(z);W.start={offset:z,line:G.line,column:G.column};var nu=ma(P);return W.end={offset:P,line:nu.line,column:nu.column},W}function Si(){H0.push({pos:T,variants:[]})}function wu(z){var P=H0[H0.length-1];T<P.pos||(T>P.pos&&(P.pos=T,P.variants=[]),P.variants.push(z))}function ji(z,P,W){return new Ye(Ye.buildMessage(z,P,W),z,P,W)}function Mi(){var z=H0[0],P=z.pos;return ji(z.variants,P<u.length?u.charAt(P):null,P<u.length?Fa(P,P+1):Fa(P,P))}function ka(){var z;return z=ha(),z}function ha(){var z,P,W,G,nu,pu,ku,Cu;if(z=T,P=Be(),P!==e){for(W=[],G=T,nu=cu(),pu=pa(),pu!==e?(ku=cu(),Cu=Be(),Cu!==e?(nu=[nu,pu,ku,Cu],G=nu):(T=G,G=e)):(T=G,G=e);G!==e;)W.push(G),G=T,nu=cu(),pu=pa(),pu!==e?(ku=cu(),Cu=Be(),Cu!==e?(nu=[nu,pu,ku,Cu],G=nu):(T=G,G=e)):(T=G,G=e);P=[P,W],z=P}else T=z,z=e;return z}function pa(){var z,P=function(W){wu(W)};return P(gu),u.substr(T,2)===o?(z=o,T+=2):z=e,z===e&&(P(eu),u.substr(T,2)===n?(z=n,T+=2):z=e,z===e&&(P(ru),u.charCodeAt(T)===33?(z=s,T++):z=e)),z}function ga(){var z,P=function(W){wu(W)};return P(du),u.substr(T,2)===t?(z=t,T+=2):z=e,z===e&&(P(hu),u.substr(T,2)===E?(z=E,T+=2):z=e,z===e&&(P(_u),u.substr(T,2)===l?(z=l,T+=2):z=e,z===e&&(P(Qu),u.charCodeAt(T)===60?(z=D,T++):z=e,z===e&&(P(L0),u.substr(T,2)===x?(z=x,T+=2):z=e,z===e&&(P(N0),u.charCodeAt(T)===62?(z=c,T++):z=e))))),z}function Be(){var z,P,W,G,nu,pu,ku,Cu;if(z=T,P=Ae(),P===e&&(P=G0(),P===e&&(P=ze())),P!==e){for(W=cu(),G=[],nu=T,pu=ga(),pu!==e?(ku=cu(),Cu=Ae(),Cu===e&&(Cu=G0(),Cu===e&&(Cu=ze())),Cu!==e?(pu=[pu,ku,Cu],nu=pu):(T=nu,nu=e)):(T=nu,nu=e);nu!==e;)G.push(nu),nu=T,pu=ga(),pu!==e?(ku=cu(),Cu=Ae(),Cu===e&&(Cu=G0(),Cu===e&&(Cu=ze())),Cu!==e?(pu=[pu,ku,Cu],nu=pu):(T=nu,nu=e)):(T=nu,nu=e);P=[P,W,G],z=P}else T=z,z=e;return z}function Ae(){var z,P,W,G,nu,pu,ku=function(Cu){wu(Cu)};return z=T,ku(A0),u.charCodeAt(T)===123?(P=C,T++):P=e,P!==e?(W=cu(),G=G0(),G!==e?(nu=cu(),ku(R0),u.charCodeAt(T)===125?(pu=k,T++):pu=e,pu!==e?(P=[P,W,G,nu,pu],z=P):(T=z,z=e)):(T=z,z=e)):(T=z,z=e),z===e&&(z=T,ku(A0),u.charCodeAt(T)===123?(P=C,T++):P=e,P!==e?(W=cu(),G=ha(),G!==e?(nu=cu(),ku(R0),u.charCodeAt(T)===125?(pu=k,T++):pu=e,pu!==e?(P=[P,W,G,nu,pu],z=P):(T=z,z=e)):(T=z,z=e)):(T=z,z=e)),z}function G0(){var z,P,W,G=function(nu){wu(nu)};return G(ti),u.substr(T,4)===b?(z=b,T+=4):z=e,z===e&&(G(si),u.substr(T,7)===d?(z=d,T+=7):z=e,z===e&&(G(ne),u.substr(T,11)===F?(z=F,T+=11):z=e,z===e&&(z=T,G(oe),u.substr(T,9)===g?(P=g,T+=9):P=e,P!==e?(W=va(),W!==e?(P=[P,W],z=P):(T=z,z=e)):(T=z,z=e),z===e&&(z=T,G(li),u.substr(T,10)===B?(P=B,T+=10):P=e,P!==e?(W=va(),W!==e?(P=[P,W],z=P):(T=z,z=e)):(T=z,z=e),z===e&&(z=T,G(Ei),u.substr(T,8)===p?(P=p,T+=8):P=e,P!==e?(W=x0(),W!==e?(P=[P,W],z=P):(T=z,z=e)):(T=z,z=e),z===e&&(z=Pi(),z===e&&(z=T,G(Di),u.substr(T,7)===h?(P=h,T+=7):P=e,P!==e?(W=Ca(),W!==e?(P=[P,W],z=P):(T=z,z=e)):(T=z,z=e),z===e&&(z=T,G(ua),u.substr(T,11)===v?(P=v,T+=11):P=e,P!==e?(W=wi(),W!==e?(P=[P,W],z=P):(T=z,z=e)):(T=z,z=e),z===e&&(z=T,G(xi),u.substr(T,20)===j?(P=j,T+=20):P=e,P!==e?(W=x0(),W!==e?(P=[P,W],z=P):(T=z,z=e)):(T=z,z=e),z===e&&(z=T,G(ea),u.substr(T,12)===K?(P=K,T+=12):P=e,P!==e?(W=x0(),W!==e?(P=[P,W],z=P):(T=z,z=e)):(T=z,z=e),z===e&&(z=T,G(ci),u.substr(T,23)===H?(P=H,T+=23):P=e,P!==e?(W=x0(),W!==e?(P=[P,W],z=P):(T=z,z=e)):(T=z,z=e)))))))))))),z}function Pi(){var z,P,W,G,nu,pu=function(ku){wu(ku)};return z=T,pu(aa),u.substr(T,9)===V?(P=V,T+=9):P=e,P!==e?(W=T,G=x0(),G!==e?(nu=Ee(),nu===e&&(nu=null),G=[G,nu],W=G):(T=W,W=e),W===e&&(W=fe()),W!==e?(P=[P,W],z=P):(T=z,z=e)):(T=z,z=e),z}function Ca(){var z,P,W,G,nu,pu,ku=function(Cu){wu(Cu)};return z=T,P=y0(),P!==e?(ku(f0),u.charCodeAt(T)===46?(W=$,T++):W=e,W!==e?(G=T,ku(ra),u.substr(T,8)===R?(nu=R,T+=8):nu=e,nu!==e?(pu=fe(),pu!==e?(nu=[nu,pu],G=nu):(T=G,G=e)):(T=G,G=e),G===e&&(G=x0()),G!==e?(P=[P,W,G],z=P):(T=z,z=e)):(T=z,z=e)):(T=z,z=e),z}function wi(){var z,P,W,G,nu,pu,ku=function(Cu){wu(Cu)};return z=T,P=y0(),P!==e?(ku(f0),u.charCodeAt(T)===46?(W=$,T++):W=e,W!==e?(G=T,ku(ra),u.substr(T,8)===R?(nu=R,T+=8):nu=e,nu!==e?(pu=fe(),pu!==e?(nu=[nu,pu],G=nu):(T=G,G=e)):(T=G,G=e),G===e&&(G=x0()),G!==e?(P=[P,W,G],z=P):(T=z,z=e)):(T=z,z=e)):(T=z,z=e),z}function fe(){var z,P,W;return z=T,P=y0(),P!==e?(W=Ee(),W!==e?(P=[P,W],z=P):(T=z,z=e)):(T=z,z=e),z}function x0(){var z,P,W,G,nu,pu,ku,Cu=function(Oi){wu(Oi)};if(z=T,P=y0(),P!==e){for(W=[],G=T,Cu(f0),u.charCodeAt(T)===46?(nu=$,T++):nu=e,nu!==e?(pu=cu(),ku=y0(),ku!==e?(nu=[nu,pu,ku],G=nu):(T=G,G=e)):(T=G,G=e);G!==e;)W.push(G),G=T,Cu(f0),u.charCodeAt(T)===46?(nu=$,T++):nu=e,nu!==e?(pu=cu(),ku=y0(),ku!==e?(nu=[nu,pu,ku],G=nu):(T=G,G=e)):(T=G,G=e);P=[P,W],z=P}else T=z,z=e;return z}function y0(){var z;return z=ye(),z===e&&(z=fa()),z}function va(){var z;return z=Ki(),z===e&&(z=Ti(),z===e&&(z=Li(),z===e&&(z=Ni()))),z}function Ki(){var z,P,W,G=function(nu){wu(nu)};return z=T,G(be),u.substr(T,7)===U?(P=U,T+=7):P=e,P!==e?(W=Ri(),W!==e?(P=[P,W],z=P):(T=z,z=e)):(T=z,z=e),z}function Ti(){var z,P,W,G=function(nu){wu(nu)};return z=T,G(di),u.substr(T,6)===Y?(P=Y,T+=6):P=e,P!==e?(W=ye(),W!==e?(P=[P,W],z=P):(T=z,z=e)):(T=z,z=e),z}function Li(){var z,P,W,G=function(nu){wu(nu)};return z=T,G(mi),u.substr(T,5)===tu?(P=tu,T+=5):P=e,P!==e?(W=ye(),W!==e?(P=[P,W],z=P):(T=z,z=e)):(T=z,z=e),z}function Ni(){var z,P,W,G=function(nu){wu(nu)};return z=T,G(Fi),u.substr(T,4)===ou?(P=ou,T+=4):P=e,P!==e?(W=Ee(),W===e&&(W=null),P=[P,W],z=P):(T=z,z=e),z}function Ee(){var z,P,W,G,nu=function(pu){wu(pu)};if(z=T,nu(ki),u.charCodeAt(T)===35?(P=Du,T++):P=e,P!==e){for(W=[],G=ba();G!==e;)W.push(G),G=ba();P=[P,W],z=P}else T=z,z=e;return z}function ba(){var z,P,W,G,nu=function(pu){wu(pu)};if(z=T,nu(ia),u.charCodeAt(T)===47?(P=mu,T++):P=e,P!==e){for(W=[],G=Ba(),G===e&&(G=Aa());G!==e;)W.push(G),G=Ba(),G===e&&(G=Aa());P=[P,W],z=P}else T=z,z=e;return z}function Ba(){var z,P=function(W){wu(W)};return P(na),S.test(u.charAt(T))?(z=u.charAt(T),T++):z=e,z}function Aa(){var z,P,W,G=function(nu){wu(nu)};return z=T,G(hi),u.charCodeAt(T)===126?(P=X,T++):P=e,P!==e?(G(oa),u.charCodeAt(T)===48?(W=J,T++):W=e,W===e&&(G(pi),u.charCodeAt(T)===49?(W=Q,T++):W=e),W!==e?(P=[P,W],z=P):(T=z,z=e)):(T=z,z=e),z}function ye(){var z,P,W,G,nu=function(pu){wu(pu)};if(z=T,nu(gi),_.test(u.charAt(T))?(P=u.charAt(T),T++):P=e,P!==e){for(W=[],nu(ta),O.test(u.charAt(T))?(G=u.charAt(T),T++):G=e;G!==e;)W.push(G),nu(ta),O.test(u.charAt(T))?(G=u.charAt(T),T++):G=e;P=[P,W],z=P}else T=z,z=e;return z}function Ri(){var z,P,W=function(G){wu(G)};if(z=[],W(sa),uu.test(u.charAt(T))?(P=u.charAt(T),T++):P=e,P!==e)for(;P!==e;)z.push(P),W(sa),uu.test(u.charAt(T))?(P=u.charAt(T),T++):P=e;else z=e;return z}function ze(){var z;return z=Hi(),z===e&&(z=fa(),z===e&&(z=ya(),z===e&&(z=Ji(),z===e&&(z=Ii(),z===e&&(z=y()))))),z}function Hi(){var z,P,W,G,nu=function(pu){wu(pu)};return z=T,nu(Ci),u.charCodeAt(T)===91?(P=q,T++):P=e,P!==e?(W=cu(),nu(vi),u.charCodeAt(T)===93?(G=f,T++):G=e,G!==e?(P=[P,W,G],z=P):(T=z,z=e)):(T=z,z=e),z}function fa(){var z,P,W,G,nu,pu=function(ku){wu(ku)};return z=T,P=Gi(),P!==e?(W=T,pu(f0),u.charCodeAt(T)===46?(G=$,T++):G=e,G!==e?(nu=_i(),nu!==e?(G=[G,nu],W=G):(T=W,W=e)):(T=W,W=e),W===e&&(W=null),P=[P,W],z=P):(T=z,z=e),z}function Gi(){var z,P,W,G,nu=function(pu){wu(pu)};if(nu(oa),u.charCodeAt(T)===48?(z=J,T++):z=e,z===e)if(z=T,nu(bi),lu.test(u.charAt(T))?(P=u.charAt(T),T++):P=e,P!==e){for(W=[],nu(te),Fu.test(u.charAt(T))?(G=u.charAt(T),T++):G=e;G!==e;)W.push(G),nu(te),Fu.test(u.charAt(T))?(G=u.charAt(T),T++):G=e;P=[P,W],z=P}else T=z,z=e;return z}function _i(){var z,P,W=function(G){wu(G)};if(z=[],W(te),Fu.test(u.charAt(T))?(P=u.charAt(T),T++):P=e,P!==e)for(;P!==e;)z.push(P),W(te),Fu.test(u.charAt(T))?(P=u.charAt(T),T++):P=e;else z=e;return z}function ya(){var z;return z=$i(),z===e&&(z=Vi()),z}function $i(){var z,P,W,G,nu=function(pu){wu(pu)};if(z=T,nu(la),u.charCodeAt(T)===34?(P=w,T++):P=e,P!==e){for(W=[],nu(Ea),yu.test(u.charAt(T))?(G=u.charAt(T),T++):G=e;G!==e;)W.push(G),nu(Ea),yu.test(u.charAt(T))?(G=u.charAt(T),T++):G=e;nu(la),u.charCodeAt(T)===34?(G=w,T++):G=e,G!==e?(P=[P,W,G],z=P):(T=z,z=e)}else T=z,z=e;return z}function Vi(){var z,P,W,G,nu=function(pu){wu(pu)};if(z=T,nu(Da),u.charCodeAt(T)===39?(P=I,T++):P=e,P!==e){for(W=[],nu(xa),Au.test(u.charAt(T))?(G=u.charAt(T),T++):G=e;G!==e;)W.push(G),nu(xa),Au.test(u.charAt(T))?(G=u.charAt(T),T++):G=e;nu(Da),u.charCodeAt(T)===39?(G=I,T++):G=e,G!==e?(P=[P,W,G],z=P):(T=z,z=e)}else T=z,z=e;return z}function Ji(){var z,P=function(W){wu(W)};return P(Bi),u.substr(T,4)===iu?(z=iu,T+=4):z=e,z===e&&(P(Ai),u.substr(T,5)===su?(z=su,T+=5):z=e),z}function Ii(){var z,P=function(W){wu(W)};return P(fi),u.substr(T,4)===L?(z=L,T+=4):z=e,z}function y(){var z,P=function(W){wu(W)};return P(ca),u.substr(T,9)===M?(z=M,T+=9):z=e,z}function cu(){var z,P,W=function(G){wu(G)};for(z=[],W(da),zu.test(u.charAt(T))?(P=u.charAt(T),T++):P=e;P!==e;)z.push(P),W(da),zu.test(u.charAt(T))?(P=u.charAt(T),T++):P=e;return z}if(Si(),le=i(),le!==e&&T===u.length)return le;throw le!==e&&T<u.length&&wu(yi()),Mi()}function Q3(u){try{return Z4(u)}catch{throw new Error(`Runtime expression is not valid: ${u}`)}}function X3(u,a){const e=[{pattern:/\$response\.body#\/([\w/]+)/g,ctxFunction:(i,o)=>{var n;return je((n=a.$response)==null?void 0:n.body,o,i)}},{pattern:/\$request\.body#\/([\w/]+)/g,ctxFunction:(i,o)=>{var n;return je((n=a.$request)==null?void 0:n.body,o,i)}},{pattern:/\$outputs\.([\w-]+)#\/([\w/]+)/g,ctxFunction:(i,o,n)=>{var s;return je((s=a.$outputs)==null?void 0:s[o],n,i)}},{pattern:/\$workflows\.([\w-]+)\.outputs\.([\w-]+)#\/([\w/]+)/g,ctxFunction:(i,o,n,s)=>{var t,E,l;return je((l=(E=(t=a.$workflows)==null?void 0:t[o])==null?void 0:E.outputs)==null?void 0:l[n],s,i)}},{pattern:/\$steps\.([\w-]+)\.outputs\.([\w-]+)#\/([\w/]+)/g,ctxFunction:(i,o,n,s)=>{var t,E,l;return je((l=(E=(t=a.$steps)==null?void 0:t[o])==null?void 0:E.outputs)==null?void 0:l[n],s,i)}}];let r=u;for(const{pattern:i,ctxFunction:o}of e)r=r.replaceAll(i,o);return r}function je(u,a,e){if(u)try{const r=bu.JsonPointer.get(u,`/${a}`);return typeof r=="string"||Array.isArray(r)||typeof r=="object"?JSON.stringify(r):r!==void 0?r:e}catch{return e}return e}function D0({payload:u,context:a,contentType:e,logger:r}){if(e!=null&&e.includes("application/octet-stream"))return Po(u,a,r);if(e!=null&&e.includes("multipart/form-data")){if(u instanceof FormData){const i=new FormData;for(const[o,n]of u.entries())if(n instanceof File)i.append(o,n);else{const s=D0({payload:n,context:a,logger:r});i.append(o,s)}return i}return Po(u,a,r)}return typeof u=="string"?tE(u)?re(u,a,r):oE(u,a,r):bu.isPlainObject(u)?Object.entries(u).reduce((i,[o,n])=>(i[o]=D0({payload:n,context:a,logger:r}),i),{}):Array.isArray(u)?u.map(i=>D0({payload:i,context:a,logger:r})):u}function re(u,a,e){return typeof u=="string"?uE(u,a,e):bu.isPlainObject(u)?Object.entries(u).reduce((r,[i,o])=>(r[i]=o&&re(o,a,e),r),{}):Array.isArray(u)?u.map(r=>re(r,a,e)):u}function uE(u,a,e){if(/^\$faker\.[a-zA-Z0-9._-]+(\([^\\)]*\))?$/.test(u))return Ue({pointer:u.slice(1),ctx:a,logger:e});if(u.includes("$faker.")){const o=/\$faker\.[a-zA-Z0-9._-]+(\([^\\)]*\))?/g;u=u.replace(o,n=>Ue({pointer:n.slice(1),ctx:a,logger:e})).replace(/{(.*?)}/g,"$1")}if(!u.includes("$")&&!/[=<>]/.test(u))return u;Q3(u);const r=aE(u,a),i=rE(a);try{return new Function(...Object.keys(i),`return ${r};`)(...Object.values(i))}catch{throw new Error(`Error in resolving runtime expression '${u}'.
|
|
@@ -241,7 +241,7 @@ $3`);return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}}function hme(t){return t.
|
|
|
241
241
|
`+t.slice(i,o),i=o+1),s=a;return l+=`
|
|
242
242
|
`,t.length-i>e&&s>i?l+=t.slice(i,s)+`
|
|
243
243
|
`+t.slice(s+1):l+=t.slice(i),l.slice(1)}function Jye(t){for(var e="",r=0,n,i=0;i<t.length;r>=65536?i+=2:i++)r=uh(t,i),n=Sn[r],!n&&gp(r)?(e+=t[i],r>=65536&&(e+=t[i+1])):e+=n||qye(r);return e}function Kye(t,e,r){var n="",i=t.tag,o,s,a;for(o=0,s=r.length;o<s;o+=1)a=r[o],t.replacer&&(a=t.replacer.call(r,String(o),a)),(ea(t,e,a,!1,!1)||typeof a>"u"&&ea(t,e,null,!1,!1))&&(n!==""&&(n+=","+(t.condenseFlow?"":" ")),n+=t.dump);t.tag=i,t.dump="["+n+"]"}function qM(t,e,r,n){var i="",o=t.tag,s,a,l;for(s=0,a=r.length;s<a;s+=1)l=r[s],t.replacer&&(l=t.replacer.call(r,String(s),l)),(ea(t,e+1,l,!0,!0,!1,!0)||typeof l>"u"&&ea(t,e+1,null,!0,!0,!1,!0))&&((!n||i!=="")&&(i+=k$(t,e)),t.dump&&pp===t.dump.charCodeAt(0)?i+="-":i+="- ",i+=t.dump);t.tag=o,t.dump=i||"[]"}function eve(t,e,r){var n="",i=t.tag,o=Object.keys(r),s,a,l,c,u;for(s=0,a=o.length;s<a;s+=1)u="",n!==""&&(u+=", "),t.condenseFlow&&(u+='"'),l=o[s],c=r[l],t.replacer&&(c=t.replacer.call(r,l,c)),ea(t,e,l,!1,!1)&&(t.dump.length>1024&&(u+="? "),u+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),ea(t,e,c,!1,!1)&&(u+=t.dump,n+=u));t.tag=i,t.dump="{"+n+"}"}function tve(t,e,r,n){var i="",o=t.tag,s=Object.keys(r),a,l,c,u,d,f;if(t.sortKeys===!0)s.sort();else if(typeof t.sortKeys=="function")s.sort(t.sortKeys);else if(t.sortKeys)throw new Rn("sortKeys must be a boolean or a function");for(a=0,l=s.length;a<l;a+=1)f="",(!n||i!=="")&&(f+=k$(t,e)),c=s[a],u=r[c],t.replacer&&(u=t.replacer.call(r,c,u)),ea(t,e+1,c,!0,!0,!0)&&(d=t.tag!==null&&t.tag!=="?"||t.dump&&t.dump.length>1024,d&&(t.dump&&pp===t.dump.charCodeAt(0)?f+="?":f+="? "),f+=t.dump,d&&(f+=k$(t,e)),ea(t,e+1,u,!0,d)&&(t.dump&&pp===t.dump.charCodeAt(0)?f+=":":f+=": ",f+=t.dump,i+=f));t.tag=o,t.dump=i||"{}"}function FM(t,e,r){var n,i,o,s,a,l;for(i=r?t.explicitTypes:t.implicitTypes,o=0,s=i.length;o<s;o+=1)if(a=i[o],(a.instanceOf||a.predicate)&&(!a.instanceOf||typeof e=="object"&&e instanceof a.instanceOf)&&(!a.predicate||a.predicate(e))){if(r?a.multi&&a.representName?t.tag=a.representName(e):t.tag=a.tag:t.tag="?",a.represent){if(l=t.styleMap[a.tag]||a.defaultStyle,L9.call(a.represent)==="[object Function]")n=a.represent(e,l);else if(Q9.call(a.represent,l))n=a.represent[l](e,l);else throw new Rn("!<"+a.tag+'> tag resolver accepts not "'+l+'" style');t.dump=n}return!0}return!1}function ea(t,e,r,n,i,o,s){t.tag=null,t.dump=r,FM(t,r,!1)||FM(t,r,!0);var a=L9.call(t.dump),l=n,c;n&&(n=t.flowLevel<0||t.flowLevel>e);var u=a==="[object Object]"||a==="[object Array]",d,f;if(u&&(d=t.duplicates.indexOf(r),f=d!==-1),(t.tag!==null&&t.tag!=="?"||f||t.indent!==2&&e>0)&&(i=!1),f&&t.usedDuplicates[d])t.dump="*ref_"+d;else{if(u&&f&&!t.usedDuplicates[d]&&(t.usedDuplicates[d]=!0),a==="[object Object]")n&&Object.keys(t.dump).length!==0?(tve(t,e,t.dump,i),f&&(t.dump="&ref_"+d+t.dump)):(eve(t,e,t.dump),f&&(t.dump="&ref_"+d+" "+t.dump));else if(a==="[object Array]")n&&t.dump.length!==0?(t.noArrayIndent&&!s&&e>0?qM(t,e-1,t.dump,i):qM(t,e,t.dump,i),f&&(t.dump="&ref_"+d+t.dump)):(Kye(t,e,t.dump),f&&(t.dump="&ref_"+d+" "+t.dump));else if(a==="[object String]")t.tag!=="?"&&Yye(t,t.dump,e,o,l);else{if(a==="[object Undefined]")return!1;if(t.skipInvalid)return!1;throw new Rn("unacceptable kind of an object to dump "+a)}t.tag!==null&&t.tag!=="?"&&(c=encodeURI(t.tag[0]==="!"?t.tag.slice(1):t.tag).replace(/!/g,"%21"),t.tag[0]==="!"?c="!"+c:c.slice(0,18)==="tag:yaml.org,2002:"?c="!!"+c.slice(18):c="!<"+c+">",t.dump=c+" "+t.dump)}return!0}function rve(t,e){var r=[],n=[],i,o;for(E$(t,r,n),i=0,o=n.length;i<o;i+=1)e.duplicates.push(r[n[i]]);e.usedDuplicates=new Array(o)}function E$(t,e,r){var n,i,o;if(t!==null&&typeof t=="object")if(i=e.indexOf(t),i!==-1)r.indexOf(i)===-1&&r.push(i);else if(e.push(t),Array.isArray(t))for(i=0,o=t.length;i<o;i+=1)E$(t[i],e,r);else for(n=Object.keys(t),i=0,o=n.length;i<o;i+=1)E$(t[n[i]],e,r)}function nve(t,e){e=e||{};var r=new Wye(e);r.noRefs||rve(t,r);var n=t;return r.replacer&&(n=r.replacer.call({"":n},"",n)),ea(r,0,n,!0,!0)?r.dump+`
|
|
244
|
-
`:""}var ive=nve,ove={dump:ive};function gI(t,e){return function(){throw new Error("Function yaml."+t+" is removed in js-yaml 4. Use yaml."+e+" instead, which is now safe by default.")}}var sve=on,ave=u9,lve=p9,G9=b9,cve=O9,uve=fI,Y9=N9.load,dve=N9.loadAll,H9=ove.dump,fve=Rn,du={binary:P9,float:v9,map:h9,null:m9,pairs:$9,set:E9,timestamp:S9,bool:g9,int:y9,merge:C9,omap:k9,seq:f9,str:d9},hve=gI("safeLoad","load"),pve=gI("safeLoadAll","loadAll"),mve=gI("safeDump","dump"),rl={Type:sve,Schema:ave,FAILSAFE_SCHEMA:lve,JSON_SCHEMA:G9,CORE_SCHEMA:cve,DEFAULT_SCHEMA:uve,load:Y9,loadAll:dve,dump:H9,YAMLException:fve,types:du,safeLoad:hve,safeLoadAll:pve,safeDump:mve};class WM{constructor(e){this.baseDir=e}async ls(e=""){const r=this.makeKey(e);return Object.keys(localStorage).filter(n=>n.startsWith(r)).map(n=>n.replace(r,""))}async get(e){const r=this.makeKey(e);return localStorage.getItem(r)??null}async set(e,r){const n=this.makeKey(e);localStorage.setItem(n,r)}async remove(e){const r=this.makeKey(e);localStorage.removeItem(r)}makeKey(e){return`replay:fs:${this.baseDir}/${e}`}}async function ai(t,e={},r){return window.__TAURI_INTERNALS__.invoke(t,e,r)}var qO;(function(t){t[t.Audio=1]="Audio",t[t.Cache=2]="Cache",t[t.Config=3]="Config",t[t.Data=4]="Data",t[t.LocalData=5]="LocalData",t[t.Document=6]="Document",t[t.Download=7]="Download",t[t.Picture=8]="Picture",t[t.Public=9]="Public",t[t.Video=10]="Video",t[t.Resource=11]="Resource",t[t.Temp=12]="Temp",t[t.AppConfig=13]="AppConfig",t[t.AppData=14]="AppData",t[t.AppLocalData=15]="AppLocalData",t[t.AppCache=16]="AppCache",t[t.AppLog=17]="AppLog",t[t.Desktop=18]="Desktop",t[t.Executable=19]="Executable",t[t.Font=20]="Font",t[t.Home=21]="Home",t[t.Runtime=22]="Runtime",t[t.Template=23]="Template"})(qO||(qO={}));async function gve(){return ai("plugin:path|resolve_directory",{directory:qO.AppData})}async function yve(){return ai("plugin:path|resolve_directory",{directory:qO.Desktop})}function J9(){return window.__TAURI_INTERNALS__.plugins.path.sep}async function vve(...t){return ai("plugin:path|resolve",{paths:t})}async function _h(...t){return ai("plugin:path|join",{paths:t})}async function K9(t,e){return ai("plugin:path|basename",{path:t,ext:e})}async function bve(t){return ai("plugin:path|is_absolute",{path:t})}var UM;(function(t){t[t.Start=0]="Start",t[t.Current=1]="Current",t[t.End=2]="End"})(UM||(UM={}));async function XM(t,e){if(t instanceof URL&&t.protocol!=="file:")throw new TypeError("Must be a file URL.");await ai("plugin:fs|mkdir",{path:t instanceof URL?t.toString():t,options:e})}async function eZ(t,e){if(t instanceof URL&&t.protocol!=="file:")throw new TypeError("Must be a file URL.");return await ai("plugin:fs|read_dir",{path:t instanceof URL?t.toString():t,options:e})}async function Ove(t,e){if(t instanceof URL&&t.protocol!=="file:")throw new TypeError("Must be a file URL.");const r=await ai("plugin:fs|read_file",{path:t instanceof URL?t.toString():t,options:e});return r instanceof ArrayBuffer?new Uint8Array(r):Uint8Array.from(r)}async function yI(t,e){if(t instanceof URL&&t.protocol!=="file:")throw new TypeError("Must be a file URL.");return await ai("plugin:fs|read_text_file",{path:t instanceof URL?t.toString():t,options:e})}async function xve(t,e){if(t instanceof URL&&t.protocol!=="file:")throw new TypeError("Must be a file URL.");await ai("plugin:fs|remove",{path:t instanceof URL?t.toString():t,options:e})}async function wve(t,e,r){if(t instanceof URL&&t.protocol!=="file:")throw new TypeError("Must be a file URL.");await ai("plugin:fs|write_text_file",{path:t instanceof URL?t.toString():t,data:e,options:r})}async function tZ(t,e){if(t instanceof URL&&t.protocol!=="file:")throw new TypeError("Must be a file URL.");return await ai("plugin:fs|exists",{path:t instanceof URL?t.toString():t,options:e})}function zd(){return!!(window!=null&&window.__TAURI__)}const Bo=class Bo{static async getUtils(){return Bo.utils||(Bo.utils=zd()?await Promise.resolve().then(()=>require("./replay-tauri-path-
|
|
244
|
+
`:""}var ive=nve,ove={dump:ive};function gI(t,e){return function(){throw new Error("Function yaml."+t+" is removed in js-yaml 4. Use yaml."+e+" instead, which is now safe by default.")}}var sve=on,ave=u9,lve=p9,G9=b9,cve=O9,uve=fI,Y9=N9.load,dve=N9.loadAll,H9=ove.dump,fve=Rn,du={binary:P9,float:v9,map:h9,null:m9,pairs:$9,set:E9,timestamp:S9,bool:g9,int:y9,merge:C9,omap:k9,seq:f9,str:d9},hve=gI("safeLoad","load"),pve=gI("safeLoadAll","loadAll"),mve=gI("safeDump","dump"),rl={Type:sve,Schema:ave,FAILSAFE_SCHEMA:lve,JSON_SCHEMA:G9,CORE_SCHEMA:cve,DEFAULT_SCHEMA:uve,load:Y9,loadAll:dve,dump:H9,YAMLException:fve,types:du,safeLoad:hve,safeLoadAll:pve,safeDump:mve};class WM{constructor(e){this.baseDir=e}async ls(e=""){const r=this.makeKey(e);return Object.keys(localStorage).filter(n=>n.startsWith(r)).map(n=>n.replace(r,""))}async get(e){const r=this.makeKey(e);return localStorage.getItem(r)??null}async set(e,r){const n=this.makeKey(e);localStorage.setItem(n,r)}async remove(e){const r=this.makeKey(e);localStorage.removeItem(r)}makeKey(e){return`replay:fs:${this.baseDir}/${e}`}}async function ai(t,e={},r){return window.__TAURI_INTERNALS__.invoke(t,e,r)}var qO;(function(t){t[t.Audio=1]="Audio",t[t.Cache=2]="Cache",t[t.Config=3]="Config",t[t.Data=4]="Data",t[t.LocalData=5]="LocalData",t[t.Document=6]="Document",t[t.Download=7]="Download",t[t.Picture=8]="Picture",t[t.Public=9]="Public",t[t.Video=10]="Video",t[t.Resource=11]="Resource",t[t.Temp=12]="Temp",t[t.AppConfig=13]="AppConfig",t[t.AppData=14]="AppData",t[t.AppLocalData=15]="AppLocalData",t[t.AppCache=16]="AppCache",t[t.AppLog=17]="AppLog",t[t.Desktop=18]="Desktop",t[t.Executable=19]="Executable",t[t.Font=20]="Font",t[t.Home=21]="Home",t[t.Runtime=22]="Runtime",t[t.Template=23]="Template"})(qO||(qO={}));async function gve(){return ai("plugin:path|resolve_directory",{directory:qO.AppData})}async function yve(){return ai("plugin:path|resolve_directory",{directory:qO.Desktop})}function J9(){return window.__TAURI_INTERNALS__.plugins.path.sep}async function vve(...t){return ai("plugin:path|resolve",{paths:t})}async function _h(...t){return ai("plugin:path|join",{paths:t})}async function K9(t,e){return ai("plugin:path|basename",{path:t,ext:e})}async function bve(t){return ai("plugin:path|is_absolute",{path:t})}var UM;(function(t){t[t.Start=0]="Start",t[t.Current=1]="Current",t[t.End=2]="End"})(UM||(UM={}));async function XM(t,e){if(t instanceof URL&&t.protocol!=="file:")throw new TypeError("Must be a file URL.");await ai("plugin:fs|mkdir",{path:t instanceof URL?t.toString():t,options:e})}async function eZ(t,e){if(t instanceof URL&&t.protocol!=="file:")throw new TypeError("Must be a file URL.");return await ai("plugin:fs|read_dir",{path:t instanceof URL?t.toString():t,options:e})}async function Ove(t,e){if(t instanceof URL&&t.protocol!=="file:")throw new TypeError("Must be a file URL.");const r=await ai("plugin:fs|read_file",{path:t instanceof URL?t.toString():t,options:e});return r instanceof ArrayBuffer?new Uint8Array(r):Uint8Array.from(r)}async function yI(t,e){if(t instanceof URL&&t.protocol!=="file:")throw new TypeError("Must be a file URL.");return await ai("plugin:fs|read_text_file",{path:t instanceof URL?t.toString():t,options:e})}async function xve(t,e){if(t instanceof URL&&t.protocol!=="file:")throw new TypeError("Must be a file URL.");await ai("plugin:fs|remove",{path:t instanceof URL?t.toString():t,options:e})}async function wve(t,e,r){if(t instanceof URL&&t.protocol!=="file:")throw new TypeError("Must be a file URL.");await ai("plugin:fs|write_text_file",{path:t instanceof URL?t.toString():t,data:e,options:r})}async function tZ(t,e){if(t instanceof URL&&t.protocol!=="file:")throw new TypeError("Must be a file URL.");return await ai("plugin:fs|exists",{path:t instanceof URL?t.toString():t,options:e})}function zd(){return!!(window!=null&&window.__TAURI__)}const Bo=class Bo{static async getUtils(){return Bo.utils||(Bo.utils=zd()?await Promise.resolve().then(()=>require("./replay-tauri-path-CEMesvhn.js")):await Promise.resolve().then(()=>NNe)),Bo.utils}static async join(...e){return(await Bo.getUtils()).join(...e)}static async resolve(e){return(await Bo.getUtils()).resolve(e)}static async isAbsolute(e){return(await Bo.getUtils()).isAbsolute(e)}static async relative(e,r){return(await Bo.getUtils()).relative(e,r)}};xe(Bo,"utils",null);let wi=Bo;class ZM{constructor(e){this.baseDir=e,this.initializeDirectory(e)}async initializeDirectory(e){await XM(e,{recursive:!0})}async ls(e){const r=await this.getFullPath(e);return this.getDirEntryFilesRecursively(r)}async getDirEntryFilesRecursively(e){try{const r=[],n=await eZ(e);for(const i of n)if(i.isDirectory){const o=await _h(e,i.name),s=await this.getDirEntryFilesRecursively(o);r.push(...s)}else{const o=await _h(e,i.name),s=await wi.relative(this.baseDir,o);r.push(s)}return r}catch(r){return r.includes("forbidden path")||console.error(r),[]}}async get(e){const r=await this.getFullPath(e);try{return await yI(r)}catch(n){return!n.includes("No such file or directory")&&!n.includes("forbidden path")&&console.error(n),null}}async set(e,r){const n=await this.getFullPath(e),i=J9(),o=n.split(i).slice(0,-1).join(i);await XM(o,{recursive:!0}),await wve(n,r)}async remove(e){const r=await this.getFullPath(e);try{await xve(r)}catch(n){!n.includes("No such file or directory")&&!n.includes("forbidden path")&&console.error(n)}}async getFullPath(e){return await _h(this.baseDir,e??"")}}class Sve{constructor(){xe(this,"baseDir","")}async ls(e=""){return[]}async get(e){return null}async set(e,r){}async remove(e){}}class Cve{constructor(e,r){xe(this,"default",[]);this.storage=e,this.localStorageSecretsProvider=r}async read(){const e=await this.storage.get("replay-environments.yaml"),r=await this.localStorageSecretsProvider.get();let n=null,i=null;if(!e)return this.default;try{n=rl.load(e),i=r?JSON.parse(r):null}catch(a){return console.error("Failed to parse environments file",a),this.default}return n?Object.keys(n).filter(a=>a!=="version").map(a=>({name:a,inputs:Object.entries(n[a].inputs).map(([l,c])=>{var d;if(typeof c=="string")return{name:l,value:c,isSecret:!1};const u=((d=i==null?void 0:i[a])==null?void 0:d[l])??"";return{name:l,value:u,isSecret:!0}}),servers:Object.entries(n[a].servers).map(([l,c])=>({apiId:l,value:c.value,variables:Object.entries(c.variables||{}).map(([u,d])=>({name:u,value:d}))})),state:xt.Normal})):this.default}async write(e){const r=await this.localStorageSecretsProvider.get(),n=r?JSON.parse(r):{},i=e.reduce((o,s)=>(s.name&&(o[s.name]={inputs:s.inputs.reduce((a,l)=>(l.isSecret&&n?(n[s.name]||(n[s.name]={}),n[s.name][l.name]=l.value,a[l.name]={provider:"local"}):a[l.name]=l.value,a),{}),servers:s.servers.reduce((a,l)=>(a[l.apiId]={value:l.value,variables:Object.fromEntries(l.variables.map(c=>[c.name,c.value]))},a),{})}),o),{});this.localStorageSecretsProvider.set(JSON.stringify(n)),i&&this.storage.set("replay-environments.yaml",rl.dump(i))}}var f1,GM;function Pve(){if(GM)return f1;GM=1;var t=Object.prototype.hasOwnProperty,e=Object.prototype.toString;return f1=function(n,i,o){if(e.call(i)!=="[object Function]")throw new TypeError("iterator must be a function");var s=n.length;if(s===+s)for(var a=0;a<s;a++)i.call(o,n[a],a,n);else for(var l in n)t.call(n,l)&&i.call(o,n[l],l,n)},f1}var h1,YM;function kve(){if(YM)return h1;YM=1;var t=Pve();h1=e;function e(r,n,i){if(arguments.length===3)return e.set(r,n,i);if(arguments.length===2)return e.get(r,n);var o=e.bind(e,r);for(var s in e)e.hasOwnProperty(s)&&(o[s]=e[s].bind(o,r));return o}return e.get=function(n,i){for(var o=Array.isArray(i)?i:e.parse(i),s=0;s<o.length;++s){var a=o[s];if(!(typeof n=="object"&&a in n))throw new Error("Invalid reference token: "+a);n=n[a]}return n},e.set=function(n,i,o){var s=Array.isArray(i)?i:e.parse(i),a=s[0];if(s.length===0)throw Error("Can not set the root object");for(var l=0;l<s.length-1;++l){var c=s[l];typeof c!="string"&&typeof c!="number"&&(c=String(c)),!(c==="__proto__"||c==="constructor"||c==="prototype")&&(c==="-"&&Array.isArray(n)&&(c=n.length),a=s[l+1],c in n||(a.match(/^(\d+|-)$/)?n[c]=[]:n[c]={}),n=n[c])}return a==="-"&&Array.isArray(n)&&(a=n.length),n[a]=o,this},e.remove=function(r,n){var i=Array.isArray(n)?n:e.parse(n),o=i[i.length-1];if(o===void 0)throw new Error('Invalid JSON pointer for remove: "'+n+'"');var s=e.get(r,i.slice(0,-1));if(Array.isArray(s)){var a=+o;if(o===""&&isNaN(a))throw new Error('Invalid array index: "'+o+'"');Array.prototype.splice.call(s,a,1)}else delete s[o]},e.dict=function(n,i){var o={};return e.walk(n,function(s,a){o[a]=s},i),o},e.walk=function(n,i,o){var s=[];o=o||function(a){var l=Object.prototype.toString.call(a);return l==="[object Object]"||l==="[object Array]"},(function a(l){t(l,function(c,u){s.push(String(u)),o(c)?a(c):i(c,e.compile(s)),s.pop()})})(n)},e.has=function(n,i){try{e.get(n,i)}catch{return!1}return!0},e.escape=function(n){return n.toString().replace(/~/g,"~0").replace(/\//g,"~1")},e.unescape=function(n){return n.replace(/~1/g,"/").replace(/~0/g,"~")},e.parse=function(n){if(n==="")return[];if(n.charAt(0)!=="/")throw new Error("Invalid JSON pointer: "+n);return n.substring(1).split(/\//).map(e.unescape)},e.compile=function(n){return n.length===0?"":"/"+n.map(e.escape).join("/")},h1}var $ve=kve();const vI=si($ve);async function Gp(t){try{const e=await Ove(t),r=await K9(t);return{absolutePath:t,file:new File([e],r)}}catch(e){return console.error("Failed to init replay file",e),null}}async function rZ(t){return(await Promise.allSettled(t.map(r=>Gp(r)))).map(r=>r.status==="fulfilled"?r.value:null).filter(r=>r!==null)}function nZ(t,e,r){for(const n of r){const i=HM(t,n),o=HM(e,n);if(typeof i=="object"&&typeof o=="object"){if(!nZ(i,o,r))return!1}else if(i!==o)return!1}return!0}function HM(t,e){const r=e.split("/");let n=t;for(const i of r)if(n&&typeof n=="object"&&i in n)n=n[i];else return;return n}var p1={exports:{}};/*!
|
|
245
245
|
Copyright (c) 2018 Jed Watson.
|
|
246
246
|
Licensed under the MIT License (MIT), see
|
|
247
247
|
http://jedwatson.github.io/classnames
|
|
@@ -346,7 +346,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
346
346
|
align-self: flex-end;
|
|
347
347
|
padding-top: var(--spacing-xxs);
|
|
348
348
|
gap: var(--spacing-xs);
|
|
349
|
-
`;function Hp({input:t,onSave:e,onCancel:r,...n}){const[i,o]=N.useState(!!t.isSecret),s=({name:a,value:l})=>{e({...t,name:a,value:l,isSecret:i})};return g.jsx(qZ,{variable:t,onSave:s,onCancel:r,...n,children:g.jsx(xp,{children:g.jsx(kOe,{value:i,onChange:a=>o(a),title:"Make it secret"})})})}function hb(t){var e=new Error(t);return e.source="ulid",e}var $I="0123456789ABCDEFGHJKMNPQRSTVWXYZ",Rh=$I.length,kN=Math.pow(2,48)-1,ROe=10,jOe=16;function DOe(t){var e=Math.floor(t()*Rh);return e===Rh&&(e=Rh-1),$I.charAt(e)}function MOe(t,e){if(isNaN(t))throw new Error(t+" must be a number");if(t>kN)throw hb("cannot encode time greater than "+kN);if(t<0)throw hb("time must be positive");if(Number.isInteger(t)===!1)throw hb("time must be an integer");for(var r=void 0,n="";e>0;e--)r=t%Rh,n=$I.charAt(r)+n,t=(t-r)/Rh;return n}function NOe(t,e){for(var r="";t>0;t--)r=DOe(e)+r;return r}function LOe(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,e=arguments[1];e||(e=typeof window<"u"?window:null);var r=e&&(e.crypto||e.msCrypto);if(r)return function(){var i=new Uint8Array(1);return r.getRandomValues(i),i[0]/255};try{var n=require("crypto");return function(){return n.randomBytes(1).readUInt8()/255}}catch{}if(t){try{console.error("secure crypto unusable, falling back to insecure Math.random()!")}catch{}return function(){return Math.random()}}throw hb("secure crypto unusable, insecure Math.random not allowed")}function QOe(t){return t||(t=LOe()),function(r){return isNaN(r)&&(r=Date.now()),MOe(r,ROe)+NOe(jOe,t)}}var YO=QOe(),VOe=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{},ql="1.9.0",$N=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;function zOe(t){var e=new Set([t]),r=new Set,n=t.match($N);if(!n)return function(){return!1};var i={major:+n[1],minor:+n[2],patch:+n[3],prerelease:n[4]};if(i.prerelease!=null)return function(l){return l===t};function o(a){return r.add(a),!1}function s(a){return e.add(a),!0}return function(l){if(e.has(l))return!0;if(r.has(l))return!1;var c=l.match($N);if(!c)return o(l);var u={major:+c[1],minor:+c[2],patch:+c[3],prerelease:c[4]};return u.prerelease!=null||i.major!==u.major?o(l):i.major===0?i.minor===u.minor&&i.patch<=u.patch?s(l):o(l):i.minor<=u.minor?s(l):o(l)}}var BOe=zOe(ql),qOe=ql.split(".")[0],wp=Symbol.for("opentelemetry.js.api."+qOe),Sp=VOe;function Jp(t,e,r,n){var i;n===void 0&&(n=!1);var o=Sp[wp]=(i=Sp[wp])!==null&&i!==void 0?i:{version:ql};if(!n&&o[t]){var s=new Error("@opentelemetry/api: Attempted duplicate registration of API: "+t);return r.error(s.stack||s.message),!1}if(o.version!==ql){var s=new Error("@opentelemetry/api: Registration of version v"+o.version+" for "+t+" does not match previously registered API v"+ql);return r.error(s.stack||s.message),!1}return o[t]=e,r.debug("@opentelemetry/api: Registered a global for "+t+" v"+ql+"."),!0}function uc(t){var e,r,n=(e=Sp[wp])===null||e===void 0?void 0:e.version;if(!(!n||!BOe(n)))return(r=Sp[wp])===null||r===void 0?void 0:r[t]}function Kp(t,e){e.debug("@opentelemetry/api: Unregistering a global for "+t+" v"+ql+".");var r=Sp[wp];r&&delete r[t]}var FOe=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(s)throw s.error}}return o},WOe=function(t,e,r){if(r||arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return t.concat(o||Array.prototype.slice.call(e))},UOe=(function(){function t(e){this._namespace=e.namespace||"DiagComponentLogger"}return t.prototype.debug=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return wf("debug",this._namespace,e)},t.prototype.error=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return wf("error",this._namespace,e)},t.prototype.info=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return wf("info",this._namespace,e)},t.prototype.warn=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return wf("warn",this._namespace,e)},t.prototype.verbose=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return wf("verbose",this._namespace,e)},t})();function wf(t,e,r){var n=uc("diag");if(n)return r.unshift(e),n[t].apply(n,WOe([],FOe(r),!1))}var pi;(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"})(pi||(pi={}));function XOe(t,e){t<pi.NONE?t=pi.NONE:t>pi.ALL&&(t=pi.ALL),e=e||{};function r(n,i){var o=e[n];return typeof o=="function"&&t>=i?o.bind(e):function(){}}return{error:r("error",pi.ERROR),warn:r("warn",pi.WARN),info:r("info",pi.INFO),debug:r("debug",pi.DEBUG),verbose:r("verbose",pi.VERBOSE)}}var ZOe=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(s)throw s.error}}return o},GOe=function(t,e,r){if(r||arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return t.concat(o||Array.prototype.slice.call(e))},YOe="diag",ds=(function(){function t(){function e(i){return function(){for(var o=[],s=0;s<arguments.length;s++)o[s]=arguments[s];var a=uc("diag");if(a)return a[i].apply(a,GOe([],ZOe(o),!1))}}var r=this,n=function(i,o){var s,a,l;if(o===void 0&&(o={logLevel:pi.INFO}),i===r){var c=new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");return r.error((s=c.stack)!==null&&s!==void 0?s:c.message),!1}typeof o=="number"&&(o={logLevel:o});var u=uc("diag"),d=XOe((a=o.logLevel)!==null&&a!==void 0?a:pi.INFO,i);if(u&&!o.suppressOverrideMessage){var f=(l=new Error().stack)!==null&&l!==void 0?l:"<failed to generate stacktrace>";u.warn("Current logger will be overwritten from "+f),d.warn("Current logger will overwrite one already registered from "+f)}return Jp("diag",d,r,!0)};r.setLogger=n,r.disable=function(){Kp(YOe,r)},r.createComponentLogger=function(i){return new UOe(i)},r.verbose=e("verbose"),r.debug=e("debug"),r.info=e("info"),r.warn=e("warn"),r.error=e("error")}return t.instance=function(){return this._instance||(this._instance=new t),this._instance},t})(),HOe=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(s)throw s.error}}return o},JOe=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},KOe=(function(){function t(e){this._entries=e?new Map(e):new Map}return t.prototype.getEntry=function(e){var r=this._entries.get(e);if(r)return Object.assign({},r)},t.prototype.getAllEntries=function(){return Array.from(this._entries.entries()).map(function(e){var r=HOe(e,2),n=r[0],i=r[1];return[n,i]})},t.prototype.setEntry=function(e,r){var n=new t(this._entries);return n._entries.set(e,r),n},t.prototype.removeEntry=function(e){var r=new t(this._entries);return r._entries.delete(e),r},t.prototype.removeEntries=function(){for(var e,r,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];var o=new t(this._entries);try{for(var s=JOe(n),a=s.next();!a.done;a=s.next()){var l=a.value;o._entries.delete(l)}}catch(c){e={error:c}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(e)throw e.error}}return o},t.prototype.clear=function(){return new t},t})(),e0e=Symbol("BaggageEntryMetadata"),t0e=ds.instance();function r0e(t){return t===void 0&&(t={}),new KOe(new Map(Object.entries(t)))}function n0e(t){return typeof t!="string"&&(t0e.error("Cannot create baggage metadata from unknown type: "+typeof t),t=""),{__TYPE__:e0e,toString:function(){return t}}}function EI(t){return Symbol.for(t)}var i0e=(function(){function t(e){var r=this;r._currentContext=e?new Map(e):new Map,r.getValue=function(n){return r._currentContext.get(n)},r.setValue=function(n,i){var o=new t(r._currentContext);return o._currentContext.set(n,i),o},r.deleteValue=function(n){var i=new t(r._currentContext);return i._currentContext.delete(n),i}}return t})(),fu=new i0e,Pc=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),o0e=(function(){function t(){}return t.prototype.createGauge=function(e,r){return m0e},t.prototype.createHistogram=function(e,r){return g0e},t.prototype.createCounter=function(e,r){return p0e},t.prototype.createUpDownCounter=function(e,r){return y0e},t.prototype.createObservableGauge=function(e,r){return b0e},t.prototype.createObservableCounter=function(e,r){return v0e},t.prototype.createObservableUpDownCounter=function(e,r){return O0e},t.prototype.addBatchObservableCallback=function(e,r){},t.prototype.removeBatchObservableCallback=function(e){},t})(),zx=(function(){function t(){}return t})(),s0e=(function(t){Pc(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.add=function(r,n){},e})(zx),a0e=(function(t){Pc(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.add=function(r,n){},e})(zx),l0e=(function(t){Pc(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.record=function(r,n){},e})(zx),c0e=(function(t){Pc(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.record=function(r,n){},e})(zx),AI=(function(){function t(){}return t.prototype.addCallback=function(e){},t.prototype.removeCallback=function(e){},t})(),u0e=(function(t){Pc(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e})(AI),d0e=(function(t){Pc(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e})(AI),f0e=(function(t){Pc(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e})(AI),h0e=new o0e,p0e=new s0e,m0e=new l0e,g0e=new c0e,y0e=new a0e,v0e=new u0e,b0e=new d0e,O0e=new f0e,x0e={get:function(t,e){if(t!=null)return t[e]},keys:function(t){return t==null?[]:Object.keys(t)}},w0e={set:function(t,e,r){t!=null&&(t[e]=r)}},S0e=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(s)throw s.error}}return o},C0e=function(t,e,r){if(r||arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return t.concat(o||Array.prototype.slice.call(e))},P0e=(function(){function t(){}return t.prototype.active=function(){return fu},t.prototype.with=function(e,r,n){for(var i=[],o=3;o<arguments.length;o++)i[o-3]=arguments[o];return r.call.apply(r,C0e([n],S0e(i),!1))},t.prototype.bind=function(e,r){return r},t.prototype.enable=function(){return this},t.prototype.disable=function(){return this},t})(),k0e=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(s)throw s.error}}return o},$0e=function(t,e,r){if(r||arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return t.concat(o||Array.prototype.slice.call(e))},y1="context",E0e=new P0e,Bx=(function(){function t(){}return t.getInstance=function(){return this._instance||(this._instance=new t),this._instance},t.prototype.setGlobalContextManager=function(e){return Jp(y1,e,ds.instance())},t.prototype.active=function(){return this._getContextManager().active()},t.prototype.with=function(e,r,n){for(var i,o=[],s=3;s<arguments.length;s++)o[s-3]=arguments[s];return(i=this._getContextManager()).with.apply(i,$0e([e,r,n],k0e(o),!1))},t.prototype.bind=function(e,r){return this._getContextManager().bind(e,r)},t.prototype._getContextManager=function(){return uc(y1)||E0e},t.prototype.disable=function(){this._getContextManager().disable(),Kp(y1,ds.instance())},t})(),ta;(function(t){t[t.NONE=0]="NONE",t[t.SAMPLED=1]="SAMPLED"})(ta||(ta={}));var FZ="0000000000000000",WZ="00000000000000000000000000000000",UZ={traceId:WZ,spanId:FZ,traceFlags:ta.NONE},jh=(function(){function t(e){e===void 0&&(e=UZ),this._spanContext=e}return t.prototype.spanContext=function(){return this._spanContext},t.prototype.setAttribute=function(e,r){return this},t.prototype.setAttributes=function(e){return this},t.prototype.addEvent=function(e,r){return this},t.prototype.addLink=function(e){return this},t.prototype.addLinks=function(e){return this},t.prototype.setStatus=function(e){return this},t.prototype.updateName=function(e){return this},t.prototype.end=function(e){},t.prototype.isRecording=function(){return!1},t.prototype.recordException=function(e,r){},t})(),II=EI("OpenTelemetry Context Key SPAN");function TI(t){return t.getValue(II)||void 0}function A0e(){return TI(Bx.getInstance().active())}function _I(t,e){return t.setValue(II,e)}function I0e(t){return t.deleteValue(II)}function T0e(t,e){return _I(t,new jh(e))}function XZ(t){var e;return(e=TI(t))===null||e===void 0?void 0:e.spanContext()}var _0e=/^([0-9a-f]{32})$/i,R0e=/^[0-9a-f]{16}$/i;function ZZ(t){return _0e.test(t)&&t!==WZ}function j0e(t){return R0e.test(t)&&t!==FZ}function qx(t){return ZZ(t.traceId)&&j0e(t.spanId)}function D0e(t){return new jh(t)}var v1=Bx.getInstance(),GZ=(function(){function t(){}return t.prototype.startSpan=function(e,r,n){n===void 0&&(n=v1.active());var i=!!(r!=null&&r.root);if(i)return new jh;var o=n&&XZ(n);return M0e(o)&&qx(o)?new jh(o):new jh},t.prototype.startActiveSpan=function(e,r,n,i){var o,s,a;if(!(arguments.length<2)){arguments.length===2?a=r:arguments.length===3?(o=r,a=n):(o=r,s=n,a=i);var l=s??v1.active(),c=this.startSpan(e,o,l),u=_I(l,c);return v1.with(u,a,void 0,c)}},t})();function M0e(t){return typeof t=="object"&&typeof t.spanId=="string"&&typeof t.traceId=="string"&&typeof t.traceFlags=="number"}var N0e=new GZ,L0e=(function(){function t(e,r,n,i){this._provider=e,this.name=r,this.version=n,this.options=i}return t.prototype.startSpan=function(e,r,n){return this._getTracer().startSpan(e,r,n)},t.prototype.startActiveSpan=function(e,r,n,i){var o=this._getTracer();return Reflect.apply(o.startActiveSpan,o,arguments)},t.prototype._getTracer=function(){if(this._delegate)return this._delegate;var e=this._provider.getDelegateTracer(this.name,this.version,this.options);return e?(this._delegate=e,this._delegate):N0e},t})(),Q0e=(function(){function t(){}return t.prototype.getTracer=function(e,r,n){return new GZ},t})(),V0e=new Q0e,EN=(function(){function t(){}return t.prototype.getTracer=function(e,r,n){var i;return(i=this.getDelegateTracer(e,r,n))!==null&&i!==void 0?i:new L0e(this,e,r,n)},t.prototype.getDelegate=function(){var e;return(e=this._delegate)!==null&&e!==void 0?e:V0e},t.prototype.setDelegate=function(e){this._delegate=e},t.prototype.getDelegateTracer=function(e,r,n){var i;return(i=this._delegate)===null||i===void 0?void 0:i.getTracer(e,r,n)},t})(),HO;(function(t){t[t.NOT_RECORD=0]="NOT_RECORD",t[t.RECORD=1]="RECORD",t[t.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(HO||(HO={}));var F$;(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"})(F$||(F$={}));var Cp;(function(t){t[t.UNSET=0]="UNSET",t[t.OK=1]="OK",t[t.ERROR=2]="ERROR"})(Cp||(Cp={}));var co=Bx.getInstance(),jt=ds.instance(),z0e=(function(){function t(){}return t.prototype.getMeter=function(e,r,n){return h0e},t})(),B0e=new z0e,b1="metrics",q0e=(function(){function t(){}return t.getInstance=function(){return this._instance||(this._instance=new t),this._instance},t.prototype.setGlobalMeterProvider=function(e){return Jp(b1,e,ds.instance())},t.prototype.getMeterProvider=function(){return uc(b1)||B0e},t.prototype.getMeter=function(e,r,n){return this.getMeterProvider().getMeter(e,r,n)},t.prototype.disable=function(){Kp(b1,ds.instance())},t})(),F0e=q0e.getInstance(),W0e=(function(){function t(){}return t.prototype.inject=function(e,r){},t.prototype.extract=function(e,r){return e},t.prototype.fields=function(){return[]},t})(),RI=EI("OpenTelemetry Baggage Key");function YZ(t){return t.getValue(RI)||void 0}function U0e(){return YZ(Bx.getInstance().active())}function X0e(t,e){return t.setValue(RI,e)}function Z0e(t){return t.deleteValue(RI)}var O1="propagation",G0e=new W0e,Y0e=(function(){function t(){this.createBaggage=r0e,this.getBaggage=YZ,this.getActiveBaggage=U0e,this.setBaggage=X0e,this.deleteBaggage=Z0e}return t.getInstance=function(){return this._instance||(this._instance=new t),this._instance},t.prototype.setGlobalPropagator=function(e){return Jp(O1,e,ds.instance())},t.prototype.inject=function(e,r,n){return n===void 0&&(n=w0e),this._getGlobalPropagator().inject(e,r,n)},t.prototype.extract=function(e,r,n){return n===void 0&&(n=x0e),this._getGlobalPropagator().extract(e,r,n)},t.prototype.fields=function(){return this._getGlobalPropagator().fields()},t.prototype.disable=function(){Kp(O1,ds.instance())},t.prototype._getGlobalPropagator=function(){return uc(O1)||G0e},t})(),Dh=Y0e.getInstance(),x1="trace",H0e=(function(){function t(){this._proxyTracerProvider=new EN,this.wrapSpanContext=D0e,this.isSpanContextValid=qx,this.deleteSpan=I0e,this.getSpan=TI,this.getActiveSpan=A0e,this.getSpanContext=XZ,this.setSpan=_I,this.setSpanContext=T0e}return t.getInstance=function(){return this._instance||(this._instance=new t),this._instance},t.prototype.setGlobalTracerProvider=function(e){var r=Jp(x1,this._proxyTracerProvider,ds.instance());return r&&this._proxyTracerProvider.setDelegate(e),r},t.prototype.getTracerProvider=function(){return uc(x1)||this._proxyTracerProvider},t.prototype.getTracer=function(e,r){return this.getTracerProvider().getTracer(e,r)},t.prototype.disable=function(){Kp(x1,ds.instance()),this._proxyTracerProvider=new EN},t})(),bi=H0e.getInstance();const HZ=EI("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function J0e(t){return t.setValue(HZ,!0)}function jI(t){return t.getValue(HZ)===!0}const K0e="=",W$=";",U$=",",w1="baggage",exe=180,txe=4096,rxe=8192;function nxe(t){return t.reduce((e,r)=>{const n=`${e}${e!==""?U$:""}${r}`;return n.length>rxe?e:n},"")}function ixe(t){return t.getAllEntries().map(([e,r])=>{let n=`${encodeURIComponent(e)}=${encodeURIComponent(r.value)}`;return r.metadata!==void 0&&(n+=W$+r.metadata.toString()),n})}function oxe(t){const e=t.split(W$);if(e.length<=0)return;const r=e.shift();if(!r)return;const n=r.indexOf(K0e);if(n<=0)return;const i=decodeURIComponent(r.substring(0,n).trim()),o=decodeURIComponent(r.substring(n+1).trim());let s;return e.length>0&&(s=n0e(e.join(W$))),{key:i,value:o,metadata:s}}class sxe{inject(e,r,n){const i=Dh.getBaggage(e);if(!i||jI(e))return;const o=ixe(i).filter(a=>a.length<=txe).slice(0,exe),s=nxe(o);s.length>0&&n.set(r,w1,s)}extract(e,r,n){const i=n.get(r,w1),o=Array.isArray(i)?i.join(U$):i;if(!o)return e;const s={};return o.length===0||(o.split(U$).forEach(l=>{const c=oxe(l);if(c){const u={value:c.value};c.metadata&&(u.metadata=c.metadata),s[c.key]=u}}),Object.entries(s).length===0)?e:Dh.setBaggage(e,Dh.createBaggage(s))}fields(){return[w1]}}function pb(t){const e={};if(typeof t!="object"||t==null)return e;for(const[r,n]of Object.entries(t)){if(!axe(r)){jt.warn(`Invalid attribute key: ${r}`);continue}if(!JZ(n)){jt.warn(`Invalid attribute value set for key: ${r}`);continue}Array.isArray(n)?e[r]=n.slice():e[r]=n}return e}function axe(t){return typeof t=="string"&&t.length>0}function JZ(t){return t==null?!0:Array.isArray(t)?lxe(t):KZ(t)}function lxe(t){let e;for(const r of t)if(r!=null){if(!e){if(KZ(r)){e=typeof r;continue}return!1}if(typeof r!==e)return!1}return!0}function KZ(t){switch(typeof t){case"number":case"boolean":case"string":return!0}return!1}function cxe(){return t=>{jt.error(uxe(t))}}function uxe(t){return typeof t=="string"?t:JSON.stringify(dxe(t))}function dxe(t){const e={};let r=t;for(;r!==null;)Object.getOwnPropertyNames(r).forEach(n=>{if(e[n])return;const i=r[n];i&&(e[n]=String(i))}),r=Object.getPrototypeOf(r);return e}let fxe=cxe();function Od(t){try{fxe(t)}catch{}}const Vu=performance,hxe="2.0.1",S1="exception.message",pxe="exception.stacktrace",C1="exception.type",eG="service.name",mxe="service.version",X$="telemetry.sdk.language",gxe="webjs",Z$="telemetry.sdk.name",G$="telemetry.sdk.version",yxe="process.runtime.name",P1={[Z$]:"opentelemetry",[yxe]:"browser",[X$]:gxe,[G$]:hxe};const vxe=9,bxe=6,Oxe=Math.pow(10,bxe),JO=Math.pow(10,vxe);function ku(t){const e=t/1e3,r=Math.trunc(e),n=Math.round(t%1e3*Oxe);return[r,n]}function tG(){let t=Vu.timeOrigin;if(typeof t!="number"){const e=Vu;t=e.timing&&e.timing.fetchStart}return t}function xxe(t){const e=ku(tG()),r=ku(typeof t=="number"?t:Vu.now());return nG(e,r)}function wxe(t,e){let r=e[0]-t[0],n=e[1]-t[1];return n<0&&(r-=1,n+=JO),[r,n]}function Sxe(t){return t[0]*JO+t[1]}function rG(t){return Array.isArray(t)&&t.length===2&&typeof t[0]=="number"&&typeof t[1]=="number"}function AN(t){return rG(t)||typeof t=="number"||t instanceof Date}function nG(t,e){const r=[t[0]+e[0],t[1]+e[1]];return r[1]>=JO&&(r[1]-=JO,r[0]+=1),r}var qo;(function(t){t[t.SUCCESS=0]="SUCCESS",t[t.FAILED=1]="FAILED"})(qo||(qo={}));class Cxe{constructor(e={}){xe(this,"_propagators");xe(this,"_fields");this._propagators=e.propagators??[],this._fields=Array.from(new Set(this._propagators.map(r=>typeof r.fields=="function"?r.fields():[]).reduce((r,n)=>r.concat(n),[])))}inject(e,r,n){for(const i of this._propagators)try{i.inject(e,r,n)}catch(o){jt.warn(`Failed to inject with ${i.constructor.name}. Err: ${o.message}`)}}extract(e,r,n){return this._propagators.reduce((i,o)=>{try{return o.extract(i,r,n)}catch(s){jt.warn(`Failed to extract with ${o.constructor.name}. Err: ${s.message}`)}return i},e)}fields(){return this._fields.slice()}}const Y$="[_0-9a-z-*/]",Pxe=`[a-z]${Y$}{0,255}`,kxe=`[a-z0-9]${Y$}{0,240}@[a-z]${Y$}{0,13}`,$xe=new RegExp(`^(?:${Pxe}|${kxe})$`),Exe=/^[ -~]{0,255}[!-~]$/,Axe=/,|=/;function Ixe(t){return $xe.test(t)}function Txe(t){return Exe.test(t)&&!Axe.test(t)}const IN=32,_xe=512,TN=",",_N="=";class DI{constructor(e){xe(this,"_internalState",new Map);e&&this._parse(e)}set(e,r){const n=this._clone();return n._internalState.has(e)&&n._internalState.delete(e),n._internalState.set(e,r),n}unset(e){const r=this._clone();return r._internalState.delete(e),r}get(e){return this._internalState.get(e)}serialize(){return this._keys().reduce((e,r)=>(e.push(r+_N+this.get(r)),e),[]).join(TN)}_parse(e){e.length>_xe||(this._internalState=e.split(TN).reverse().reduce((r,n)=>{const i=n.trim(),o=i.indexOf(_N);if(o!==-1){const s=i.slice(0,o),a=i.slice(o+1,n.length);Ixe(s)&&Txe(a)&&r.set(s,a)}return r},new Map),this._internalState.size>IN&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,IN))))}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){const e=new DI;return e._internalState=new Map(this._internalState),e}}const k1="traceparent",$1="tracestate",Rxe="00",jxe="(?!ff)[\\da-f]{2}",Dxe="(?![0]{32})[\\da-f]{32}",Mxe="(?![0]{16})[\\da-f]{16}",Nxe="[\\da-f]{2}",Lxe=new RegExp(`^\\s?(${jxe})-(${Dxe})-(${Mxe})-(${Nxe})(-.*)?\\s?$`);function Qxe(t){const e=Lxe.exec(t);return!e||e[1]==="00"&&e[5]?null:{traceId:e[2],spanId:e[3],traceFlags:parseInt(e[4],16)}}class Vxe{inject(e,r,n){const i=bi.getSpanContext(e);if(!i||jI(e)||!qx(i))return;const o=`${Rxe}-${i.traceId}-${i.spanId}-0${Number(i.traceFlags||ta.NONE).toString(16)}`;n.set(r,k1,o),i.traceState&&n.set(r,$1,i.traceState.serialize())}extract(e,r,n){const i=n.get(r,k1);if(!i)return e;const o=Array.isArray(i)?i[0]:i;if(typeof o!="string")return e;const s=Qxe(o);if(!s)return e;s.isRemote=!0;const a=n.get(r,$1);if(a){const l=Array.isArray(a)?a.join(","):a;s.traceState=new DI(typeof l=="string"?l:void 0)}return bi.setSpanContext(e,s)}fields(){return[k1,$1]}}const zxe="[object Object]",Bxe="[object Null]",qxe="[object Undefined]",Fxe=Function.prototype,iG=Fxe.toString,Wxe=iG.call(Object),Uxe=Object.getPrototypeOf,oG=Object.prototype,sG=oG.hasOwnProperty,Dl=Symbol?Symbol.toStringTag:void 0,aG=oG.toString;function RN(t){if(!Xxe(t)||Zxe(t)!==zxe)return!1;const e=Uxe(t);if(e===null)return!0;const r=sG.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&iG.call(r)===Wxe}function Xxe(t){return t!=null&&typeof t=="object"}function Zxe(t){return t==null?t===void 0?qxe:Bxe:Dl&&Dl in Object(t)?Gxe(t):Yxe(t)}function Gxe(t){const e=sG.call(t,Dl),r=t[Dl];let n=!1;try{t[Dl]=void 0,n=!0}catch{}const i=aG.call(t);return n&&(e?t[Dl]=r:delete t[Dl]),i}function Yxe(t){return aG.call(t)}const Hxe=20;function Jxe(...t){let e=t.shift();const r=new WeakMap;for(;t.length>0;)e=lG(e,t.shift(),0,r);return e}function E1(t){return KO(t)?t.slice():t}function lG(t,e,r=0,n){let i;if(!(r>Hxe)){if(r++,mb(t)||mb(e)||cG(e))i=E1(e);else if(KO(t)){if(i=t.slice(),KO(e))for(let o=0,s=e.length;o<s;o++)i.push(E1(e[o]));else if(Sf(e)){const o=Object.keys(e);for(let s=0,a=o.length;s<a;s++){const l=o[s];i[l]=E1(e[l])}}}else if(Sf(t))if(Sf(e)){if(!Kxe(t,e))return e;i=Object.assign({},t);const o=Object.keys(e);for(let s=0,a=o.length;s<a;s++){const l=o[s],c=e[l];if(mb(c))typeof c>"u"?delete i[l]:i[l]=c;else{const u=i[l],d=c;if(jN(t,l,n)||jN(e,l,n))delete i[l];else{if(Sf(u)&&Sf(d)){const f=n.get(u)||[],h=n.get(d)||[];f.push({obj:t,key:l}),h.push({obj:e,key:l}),n.set(u,f),n.set(d,h)}i[l]=lG(i[l],c,r,n)}}}}else i=e;return i}}function jN(t,e,r){const n=r.get(t[e])||[];for(let i=0,o=n.length;i<o;i++){const s=n[i];if(s.key===e&&s.obj===t)return!0}return!1}function KO(t){return Array.isArray(t)}function cG(t){return typeof t=="function"}function Sf(t){return!mb(t)&&!KO(t)&&!cG(t)&&typeof t=="object"}function mb(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t>"u"||t instanceof Date||t instanceof RegExp||t===null}function Kxe(t,e){return!(!RN(t)||!RN(e))}class ewe{constructor(){xe(this,"_promise");xe(this,"_resolve");xe(this,"_reject");this._promise=new Promise((e,r)=>{this._resolve=e,this._reject=r})}get promise(){return this._promise}resolve(e){this._resolve(e)}reject(e){this._reject(e)}}class twe{constructor(e,r){xe(this,"_callback");xe(this,"_that");xe(this,"_isCalled",!1);xe(this,"_deferred",new ewe);this._callback=e,this._that=r}get isCalled(){return this._isCalled}get promise(){return this._deferred.promise}call(...e){if(!this._isCalled){this._isCalled=!0;try{Promise.resolve(this._callback.call(this._that,...e)).then(r=>this._deferred.resolve(r),r=>this._deferred.reject(r))}catch(r){this._deferred.reject(r)}}return this._deferred.promise}}function rwe(){return"unknown_service"}const dh=t=>t!==null&&typeof t=="object"&&typeof t.then=="function";class e0{constructor(e){xe(this,"_rawAttributes");xe(this,"_asyncAttributesPending",!1);xe(this,"_memoizedAttributes");const r=e.attributes??{};this._rawAttributes=Object.entries(r).map(([n,i])=>(dh(i)&&(this._asyncAttributesPending=!0),[n,i])),this._rawAttributes=DN(this._rawAttributes)}static FromAttributeList(e){const r=new e0({});return r._rawAttributes=DN(e),r._asyncAttributesPending=e.filter(([n,i])=>dh(i)).length>0,r}get asyncAttributesPending(){return this._asyncAttributesPending}async waitForAsyncAttributes(){if(this.asyncAttributesPending){for(let e=0;e<this._rawAttributes.length;e++){const[r,n]=this._rawAttributes[e];this._rawAttributes[e]=[r,dh(n)?await n:n]}this._asyncAttributesPending=!1}}get attributes(){if(this.asyncAttributesPending&&jt.error("Accessing resource attributes before async attributes settled"),this._memoizedAttributes)return this._memoizedAttributes;const e={};for(const[r,n]of this._rawAttributes){if(dh(n)){jt.debug(`Unsettled resource attribute ${r} skipped`);continue}n!=null&&(e[r]??(e[r]=n))}return this._asyncAttributesPending||(this._memoizedAttributes=e),e}getRawAttributes(){return this._rawAttributes}merge(e){return e==null?this:e0.FromAttributeList([...e.getRawAttributes(),...this.getRawAttributes()])}}function uG(t){return e0.FromAttributeList(Object.entries(t))}function nwe(){return uG({[eG]:rwe(),[X$]:P1[X$],[Z$]:P1[Z$],[G$]:P1[G$]})}function DN(t){return t.map(([e,r])=>dh(r)?[e,r.catch(n=>{jt.debug("promise rejection for resource attribute: %s - %s",e,n)})]:[e,r])}const iwe="exception";class owe{constructor(e){xe(this,"_spanContext");xe(this,"kind");xe(this,"parentSpanContext");xe(this,"attributes",{});xe(this,"links",[]);xe(this,"events",[]);xe(this,"startTime");xe(this,"resource");xe(this,"instrumentationScope");xe(this,"_droppedAttributesCount",0);xe(this,"_droppedEventsCount",0);xe(this,"_droppedLinksCount",0);xe(this,"name");xe(this,"status",{code:Cp.UNSET});xe(this,"endTime",[0,0]);xe(this,"_ended",!1);xe(this,"_duration",[-1,-1]);xe(this,"_spanProcessor");xe(this,"_spanLimits");xe(this,"_attributeValueLengthLimit");xe(this,"_performanceStartTime");xe(this,"_performanceOffset");xe(this,"_startTimeProvided");const r=Date.now();this._spanContext=e.spanContext,this._performanceStartTime=Vu.now(),this._performanceOffset=r-(this._performanceStartTime+tG()),this._startTimeProvided=e.startTime!=null,this._spanLimits=e.spanLimits,this._attributeValueLengthLimit=this._spanLimits.attributeValueLengthLimit||0,this._spanProcessor=e.spanProcessor,this.name=e.name,this.parentSpanContext=e.parentSpanContext,this.kind=e.kind,this.links=e.links||[],this.startTime=this._getTime(e.startTime??r),this.resource=e.resource,this.instrumentationScope=e.scope,e.attributes!=null&&this.setAttributes(e.attributes),this._spanProcessor.onStart(this,e.context)}spanContext(){return this._spanContext}setAttribute(e,r){if(r==null||this._isSpanEnded())return this;if(e.length===0)return jt.warn(`Invalid attribute key: ${e}`),this;if(!JZ(r))return jt.warn(`Invalid attribute value set for key: ${e}`),this;const{attributeCountLimit:n}=this._spanLimits;return n!==void 0&&Object.keys(this.attributes).length>=n&&!Object.prototype.hasOwnProperty.call(this.attributes,e)?(this._droppedAttributesCount++,this):(this.attributes[e]=this._truncateToSize(r),this)}setAttributes(e){for(const[r,n]of Object.entries(e))this.setAttribute(r,n);return this}addEvent(e,r,n){if(this._isSpanEnded())return this;const{eventCountLimit:i}=this._spanLimits;if(i===0)return jt.warn("No events allowed."),this._droppedEventsCount++,this;i!==void 0&&this.events.length>=i&&(this._droppedEventsCount===0&&jt.debug("Dropping extra events."),this.events.shift(),this._droppedEventsCount++),AN(r)&&(AN(n)||(n=r),r=void 0);const o=pb(r);return this.events.push({name:e,attributes:o,time:this._getTime(n),droppedAttributesCount:0}),this}addLink(e){return this.links.push(e),this}addLinks(e){return this.links.push(...e),this}setStatus(e){return this._isSpanEnded()?this:(this.status={...e},this.status.message!=null&&typeof e.message!="string"&&(jt.warn(`Dropping invalid status.message of type '${typeof e.message}', expected 'string'`),delete this.status.message),this)}updateName(e){return this._isSpanEnded()?this:(this.name=e,this)}end(e){if(this._isSpanEnded()){jt.error(`${this.name} ${this._spanContext.traceId}-${this._spanContext.spanId} - You can only call end() on a span once.`);return}this._ended=!0,this.endTime=this._getTime(e),this._duration=wxe(this.startTime,this.endTime),this._duration[0]<0&&(jt.warn("Inconsistent start and end time, startTime > endTime. Setting span duration to 0ms.",this.startTime,this.endTime),this.endTime=this.startTime.slice(),this._duration=[0,0]),this._droppedEventsCount>0&&jt.warn(`Dropped ${this._droppedEventsCount} events because eventCountLimit reached`),this._spanProcessor.onEnd(this)}_getTime(e){if(typeof e=="number"&&e<=Vu.now())return xxe(e+this._performanceOffset);if(typeof e=="number")return ku(e);if(e instanceof Date)return ku(e.getTime());if(rG(e))return e;if(this._startTimeProvided)return ku(Date.now());const r=Vu.now()-this._performanceStartTime;return nG(this.startTime,ku(r))}isRecording(){return this._ended===!1}recordException(e,r){const n={};typeof e=="string"?n[S1]=e:e&&(e.code?n[C1]=e.code.toString():e.name&&(n[C1]=e.name),e.message&&(n[S1]=e.message),e.stack&&(n[pxe]=e.stack)),n[C1]||n[S1]?this.addEvent(iwe,n,r):jt.warn(`Failed to record an exception ${e}`)}get duration(){return this._duration}get ended(){return this._ended}get droppedAttributesCount(){return this._droppedAttributesCount}get droppedEventsCount(){return this._droppedEventsCount}get droppedLinksCount(){return this._droppedLinksCount}_isSpanEnded(){if(this._ended){const e=new Error(`Operation attempted on ended Span {traceId: ${this._spanContext.traceId}, spanId: ${this._spanContext.spanId}}`);jt.warn(`Cannot execute the operation on ended Span {traceId: ${this._spanContext.traceId}, spanId: ${this._spanContext.spanId}}`,e)}return this._ended}_truncateToLimitUtil(e,r){return e.length<=r?e:e.substring(0,r)}_truncateToSize(e){const r=this._attributeValueLengthLimit;return r<=0?(jt.warn(`Attribute value limit must be positive, got ${r}`),e):typeof e=="string"?this._truncateToLimitUtil(e,r):Array.isArray(e)?e.map(n=>typeof n=="string"?this._truncateToLimitUtil(n,r):n):e}}var xd;(function(t){t[t.NOT_RECORD=0]="NOT_RECORD",t[t.RECORD=1]="RECORD",t[t.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(xd||(xd={}));class t0{shouldSample(){return{decision:xd.NOT_RECORD}}toString(){return"AlwaysOffSampler"}}class zu{shouldSample(){return{decision:xd.RECORD_AND_SAMPLED}}toString(){return"AlwaysOnSampler"}}class $g{constructor(e){xe(this,"_root");xe(this,"_remoteParentSampled");xe(this,"_remoteParentNotSampled");xe(this,"_localParentSampled");xe(this,"_localParentNotSampled");this._root=e.root,this._root||(Od(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new zu),this._remoteParentSampled=e.remoteParentSampled??new zu,this._remoteParentNotSampled=e.remoteParentNotSampled??new t0,this._localParentSampled=e.localParentSampled??new zu,this._localParentNotSampled=e.localParentNotSampled??new t0}shouldSample(e,r,n,i,o,s){const a=bi.getSpanContext(e);return!a||!qx(a)?this._root.shouldSample(e,r,n,i,o,s):a.isRemote?a.traceFlags&ta.SAMPLED?this._remoteParentSampled.shouldSample(e,r,n,i,o,s):this._remoteParentNotSampled.shouldSample(e,r,n,i,o,s):a.traceFlags&ta.SAMPLED?this._localParentSampled.shouldSample(e,r,n,i,o,s):this._localParentNotSampled.shouldSample(e,r,n,i,o,s)}toString(){return`ParentBased{root=${this._root.toString()}, remoteParentSampled=${this._remoteParentSampled.toString()}, remoteParentNotSampled=${this._remoteParentNotSampled.toString()}, localParentSampled=${this._localParentSampled.toString()}, localParentNotSampled=${this._localParentNotSampled.toString()}}`}}class MN{constructor(e=0){xe(this,"_ratio");xe(this,"_upperBound");this._ratio=e,this._ratio=this._normalize(e),this._upperBound=Math.floor(this._ratio*4294967295)}shouldSample(e,r){return{decision:ZZ(r)&&this._accumulate(r)<this._upperBound?xd.RECORD_AND_SAMPLED:xd.NOT_RECORD}}toString(){return`TraceIdRatioBased{${this._ratio}}`}_normalize(e){return typeof e!="number"||isNaN(e)?0:e>=1?1:e<=0?0:e}_accumulate(e){let r=0;for(let n=0;n<e.length/8;n++){const i=n*8,o=parseInt(e.slice(i,i+8),16);r=(r^o)>>>0}return r}}const NN=1;function dG(){return{sampler:fG(),forceFlushTimeoutMillis:3e4,generalLimits:{attributeValueLengthLimit:1/0,attributeCountLimit:128},spanLimits:{attributeValueLengthLimit:1/0,attributeCountLimit:128,linkCountLimit:128,eventCountLimit:128,attributePerEventCountLimit:128,attributePerLinkCountLimit:128}}}function fG(){const t="parentbased_always_on";switch(t){case"always_on":return new zu;case"always_off":return new t0;case"parentbased_always_on":return new $g({root:new zu});case"parentbased_always_off":return new $g({root:new t0});case"traceidratio":return new MN(LN());case"parentbased_traceidratio":return new $g({root:new MN(LN())});default:return jt.error(`OTEL_TRACES_SAMPLER value "${t}" invalid, defaulting to "parentbased_always_on".`),new $g({root:new zu})}}function LN(){return jt.error(`OTEL_TRACES_SAMPLER_ARG is blank, defaulting to ${NN}.`),NN}const swe=128,awe=1/0;function lwe(t){const e={sampler:fG()},r=dG(),n=Object.assign({},r,e,t);return n.generalLimits=Object.assign({},r.generalLimits,t.generalLimits||{}),n.spanLimits=Object.assign({},r.spanLimits,t.spanLimits||{}),n}function cwe(t){var r,n,i,o;const e=Object.assign({},t.spanLimits);return e.attributeCountLimit=((r=t.spanLimits)==null?void 0:r.attributeCountLimit)??((n=t.generalLimits)==null?void 0:n.attributeCountLimit)??void 0??void 0??swe,e.attributeValueLengthLimit=((i=t.spanLimits)==null?void 0:i.attributeValueLengthLimit)??((o=t.generalLimits)==null?void 0:o.attributeValueLengthLimit)??void 0??void 0??awe,Object.assign({},t,{spanLimits:e})}class uwe{constructor(e,r){xe(this,"_exporter");xe(this,"_maxExportBatchSize");xe(this,"_maxQueueSize");xe(this,"_scheduledDelayMillis");xe(this,"_exportTimeoutMillis");xe(this,"_isExporting",!1);xe(this,"_finishedSpans",[]);xe(this,"_timer");xe(this,"_shutdownOnce");xe(this,"_droppedSpansCount",0);this._exporter=e,this._maxExportBatchSize=typeof(r==null?void 0:r.maxExportBatchSize)=="number"?r.maxExportBatchSize:512,this._maxQueueSize=typeof(r==null?void 0:r.maxQueueSize)=="number"?r.maxQueueSize:2048,this._scheduledDelayMillis=typeof(r==null?void 0:r.scheduledDelayMillis)=="number"?r.scheduledDelayMillis:5e3,this._exportTimeoutMillis=typeof(r==null?void 0:r.exportTimeoutMillis)=="number"?r.exportTimeoutMillis:3e4,this._shutdownOnce=new twe(this._shutdown,this),this._maxExportBatchSize>this._maxQueueSize&&(jt.warn("BatchSpanProcessor: maxExportBatchSize must be smaller or equal to maxQueueSize, setting maxExportBatchSize to match maxQueueSize"),this._maxExportBatchSize=this._maxQueueSize)}forceFlush(){return this._shutdownOnce.isCalled?this._shutdownOnce.promise:this._flushAll()}onStart(e,r){}onEnd(e){this._shutdownOnce.isCalled||(e.spanContext().traceFlags&ta.SAMPLED)!==0&&this._addToBuffer(e)}shutdown(){return this._shutdownOnce.call()}_shutdown(){return Promise.resolve().then(()=>this.onShutdown()).then(()=>this._flushAll()).then(()=>this._exporter.shutdown())}_addToBuffer(e){if(this._finishedSpans.length>=this._maxQueueSize){this._droppedSpansCount===0&&jt.debug("maxQueueSize reached, dropping spans"),this._droppedSpansCount++;return}this._droppedSpansCount>0&&(jt.warn(`Dropped ${this._droppedSpansCount} spans because maxQueueSize reached`),this._droppedSpansCount=0),this._finishedSpans.push(e),this._maybeStartTimer()}_flushAll(){return new Promise((e,r)=>{const n=[],i=Math.ceil(this._finishedSpans.length/this._maxExportBatchSize);for(let o=0,s=i;o<s;o++)n.push(this._flushOneBatch());Promise.all(n).then(()=>{e()}).catch(r)})}_flushOneBatch(){return this._clearTimer(),this._finishedSpans.length===0?Promise.resolve():new Promise((e,r)=>{const n=setTimeout(()=>{r(new Error("Timeout"))},this._exportTimeoutMillis);co.with(J0e(co.active()),()=>{let i;this._finishedSpans.length<=this._maxExportBatchSize?(i=this._finishedSpans,this._finishedSpans=[]):i=this._finishedSpans.splice(0,this._maxExportBatchSize);const o=()=>this._exporter.export(i,a=>{clearTimeout(n),a.code===qo.SUCCESS?e():r(a.error??new Error("BatchSpanProcessor: span export failed"))});let s=null;for(let a=0,l=i.length;a<l;a++){const c=i[a];c.resource.asyncAttributesPending&&c.resource.waitForAsyncAttributes&&(s??(s=[]),s.push(c.resource.waitForAsyncAttributes()))}s===null?o():Promise.all(s).then(o,a=>{Od(a),r(a)})})})}_maybeStartTimer(){if(this._isExporting)return;const e=()=>{this._isExporting=!0,this._flushOneBatch().finally(()=>{this._isExporting=!1,this._finishedSpans.length>0&&(this._clearTimer(),this._maybeStartTimer())}).catch(r=>{this._isExporting=!1,Od(r)})};if(this._finishedSpans.length>=this._maxExportBatchSize)return e();this._timer===void 0&&(this._timer=setTimeout(()=>e(),this._scheduledDelayMillis),this._timer,void 0)}_clearTimer(){this._timer!==void 0&&(clearTimeout(this._timer),this._timer=void 0)}}class dwe extends uwe{constructor(r,n){super(r,n);xe(this,"_visibilityChangeListener");xe(this,"_pageHideListener");this.onInit(n)}onInit(r){(r==null?void 0:r.disableAutoFlushOnDocumentHide)!==!0&&typeof document<"u"&&(this._visibilityChangeListener=()=>{document.visibilityState==="hidden"&&this.forceFlush().catch(n=>{Od(n)})},this._pageHideListener=()=>{this.forceFlush().catch(n=>{Od(n)})},document.addEventListener("visibilitychange",this._visibilityChangeListener),document.addEventListener("pagehide",this._pageHideListener))}onShutdown(){typeof document<"u"&&(this._visibilityChangeListener&&document.removeEventListener("visibilitychange",this._visibilityChangeListener),this._pageHideListener&&document.removeEventListener("pagehide",this._pageHideListener))}}const fwe=8,hwe=16;class pwe{constructor(){xe(this,"generateTraceId",QN(hwe));xe(this,"generateSpanId",QN(fwe))}}const Eg=Array(32);function QN(t){return function(){for(let r=0;r<t*2;r++)Eg[r]=Math.floor(Math.random()*16)+48,Eg[r]>=58&&(Eg[r]+=39);return String.fromCharCode.apply(null,Eg.slice(0,t*2))}}class mwe{constructor(e,r,n,i){xe(this,"_sampler");xe(this,"_generalLimits");xe(this,"_spanLimits");xe(this,"_idGenerator");xe(this,"instrumentationScope");xe(this,"_resource");xe(this,"_spanProcessor");const o=lwe(r);this._sampler=o.sampler,this._generalLimits=o.generalLimits,this._spanLimits=o.spanLimits,this._idGenerator=r.idGenerator||new pwe,this._resource=n,this._spanProcessor=i,this.instrumentationScope=e}startSpan(e,r={},n=co.active()){r.root&&(n=bi.deleteSpan(n));const i=bi.getSpan(n);if(jI(n))return jt.debug("Instrumentation suppressed, returning Noop Span"),bi.wrapSpanContext(UZ);const o=i==null?void 0:i.spanContext(),s=this._idGenerator.generateSpanId();let a,l,c;!o||!bi.isSpanContextValid(o)?l=this._idGenerator.generateTraceId():(l=o.traceId,c=o.traceState,a=o);const u=r.kind??F$.INTERNAL,d=(r.links??[]).map(b=>({context:b.context,attributes:pb(b.attributes)})),f=pb(r.attributes),h=this._sampler.shouldSample(n,l,e,u,f,d);c=h.traceState??c;const m=h.decision===HO.RECORD_AND_SAMPLED?ta.SAMPLED:ta.NONE,p={traceId:l,spanId:s,traceFlags:m,traceState:c};if(h.decision===HO.NOT_RECORD)return jt.debug("Recording is off, propagating context in a non-recording span"),bi.wrapSpanContext(p);const y=pb(Object.assign(f,h.attributes));return new owe({resource:this._resource,scope:this.instrumentationScope,context:n,spanContext:p,name:e,kind:u,links:d,parentSpanContext:a,attributes:y,startTime:r.startTime,spanProcessor:this._spanProcessor,spanLimits:this._spanLimits})}startActiveSpan(e,r,n,i){let o,s,a;if(arguments.length<2)return;arguments.length===2?a=r:arguments.length===3?(o=r,a=n):(o=r,s=n,a=i);const l=s??co.active(),c=this.startSpan(e,o,l),u=bi.setSpan(l,c);return co.with(u,a,void 0,c)}getGeneralLimits(){return this._generalLimits}getSpanLimits(){return this._spanLimits}}class gwe{constructor(e){xe(this,"_spanProcessors");this._spanProcessors=e}forceFlush(){const e=[];for(const r of this._spanProcessors)e.push(r.forceFlush());return new Promise(r=>{Promise.all(e).then(()=>{r()}).catch(n=>{Od(n||new Error("MultiSpanProcessor: forceFlush failed")),r()})})}onStart(e,r){for(const n of this._spanProcessors)n.onStart(e,r)}onEnd(e){for(const r of this._spanProcessors)r.onEnd(e)}shutdown(){const e=[];for(const r of this._spanProcessors)e.push(r.shutdown());return new Promise((r,n)=>{Promise.all(e).then(()=>{r()},n)})}}var Ml;(function(t){t[t.resolved=0]="resolved",t[t.timeout=1]="timeout",t[t.error=2]="error",t[t.unresolved=3]="unresolved"})(Ml||(Ml={}));class ywe{constructor(e={}){xe(this,"_config");xe(this,"_tracers",new Map);xe(this,"_resource");xe(this,"_activeSpanProcessor");var i;const r=Jxe({},dG(),cwe(e));this._resource=r.resource??nwe(),this._config=Object.assign({},r,{resource:this._resource});const n=[];(i=e.spanProcessors)!=null&&i.length&&n.push(...e.spanProcessors),this._activeSpanProcessor=new gwe(n)}getTracer(e,r,n){const i=`${e}@${r||""}:${(n==null?void 0:n.schemaUrl)||""}`;return this._tracers.has(i)||this._tracers.set(i,new mwe({name:e,version:r,schemaUrl:n==null?void 0:n.schemaUrl},this._config,this._resource,this._activeSpanProcessor)),this._tracers.get(i)}forceFlush(){const e=this._config.forceFlushTimeoutMillis,r=this._activeSpanProcessor._spanProcessors.map(n=>new Promise(i=>{let o;const s=setTimeout(()=>{i(new Error(`Span processor did not completed within timeout period of ${e} ms`)),o=Ml.timeout},e);n.forceFlush().then(()=>{clearTimeout(s),o!==Ml.timeout&&(o=Ml.resolved,i(o))}).catch(a=>{clearTimeout(s),o=Ml.error,i(a)})}));return new Promise((n,i)=>{Promise.all(r).then(o=>{const s=o.filter(a=>a!==Ml.resolved);s.length>0?i(s):n()}).catch(o=>i([o]))})}shutdown(){return this._activeSpanProcessor.shutdown()}}class vwe{constructor(){xe(this,"_enabled",!1);xe(this,"_currentContext",fu)}_bindFunction(e=fu,r){const n=this,i=function(...o){return n.with(e,()=>r.apply(this,o))};return Object.defineProperty(i,"length",{enumerable:!1,configurable:!0,writable:!1,value:r.length}),i}active(){return this._currentContext}bind(e,r){return e===void 0&&(e=this.active()),typeof r=="function"?this._bindFunction(e,r):r}disable(){return this._currentContext=fu,this._enabled=!1,this}enable(){return this._enabled?this:(this._enabled=!0,this._currentContext=fu,this)}with(e,r,n,...i){const o=this._currentContext;this._currentContext=e||fu;try{return r.call(n,...i)}finally{this._currentContext=o}}}function bwe(t){if(t!==null){if(t===void 0){const e=new vwe;e.enable(),co.setGlobalContextManager(e);return}t.enable(),co.setGlobalContextManager(t)}}function Owe(t){if(t!==null){if(t===void 0){Dh.setGlobalPropagator(new Cxe({propagators:[new Vxe,new sxe]}));return}Dh.setGlobalPropagator(t)}}class xwe extends ywe{constructor(e={}){super(e)}register(e={}){bi.setGlobalTracerProvider(this),Owe(e.propagator),bwe(e.contextManager)}}class wwe{constructor(e){xe(this,"_delegate");this._delegate=e}export(e,r){this._delegate.export(e,r)}forceFlush(){return this._delegate.forceFlush()}shutdown(){return this._delegate.shutdown()}}class VN extends Error{constructor(r,n,i){super(r);xe(this,"code");xe(this,"name","OTLPExporterError");xe(this,"data");this.data=i,this.code=n}}function Swe(t){if(Number.isFinite(t)&&t>0)return t;throw new Error(`Configuration: timeoutMillis is invalid, expected number greater than 0 (actual: '${t}')`)}function Cwe(t){if(t!=null)return()=>t}function Pwe(t,e,r){return{timeoutMillis:Swe(t.timeoutMillis??e.timeoutMillis??r.timeoutMillis),concurrencyLimit:t.concurrencyLimit??e.concurrencyLimit??r.concurrencyLimit,compression:t.compression??e.compression??r.compression}}function kwe(){return{timeoutMillis:1e4,concurrencyLimit:30,compression:"none"}}class $we{constructor(e){xe(this,"_concurrencyLimit");xe(this,"_sendingPromises",[]);this._concurrencyLimit=e}pushPromise(e){if(this.hasReachedLimit())throw new Error("Concurrency Limit reached");this._sendingPromises.push(e);const r=()=>{const n=this._sendingPromises.indexOf(e);this._sendingPromises.splice(n,1)};e.then(r,r)}hasReachedLimit(){return this._sendingPromises.length>=this._concurrencyLimit}async awaitAll(){await Promise.all(this._sendingPromises)}}function Ewe(t){return new $we(t.concurrencyLimit)}function Awe(t){return Object.prototype.hasOwnProperty.call(t,"partialSuccess")}function Iwe(){return{handleResponse(t){t==null||!Awe(t)||t.partialSuccess==null||Object.keys(t.partialSuccess).length===0||jt.warn("Received Partial Success response:",JSON.stringify(t.partialSuccess))}}}class Twe{constructor(e,r,n,i,o){xe(this,"_transport");xe(this,"_serializer");xe(this,"_responseHandler");xe(this,"_promiseQueue");xe(this,"_timeout");xe(this,"_diagLogger");this._transport=e,this._serializer=r,this._responseHandler=n,this._promiseQueue=i,this._timeout=o,this._diagLogger=jt.createComponentLogger({namespace:"OTLPExportDelegate"})}export(e,r){if(this._diagLogger.debug("items to be sent",e),this._promiseQueue.hasReachedLimit()){r({code:qo.FAILED,error:new Error("Concurrent export limit reached")});return}const n=this._serializer.serializeRequest(e);if(n==null){r({code:qo.FAILED,error:new Error("Nothing to send")});return}this._promiseQueue.pushPromise(this._transport.send(n,this._timeout).then(i=>{if(i.status==="success"){if(i.data!=null)try{this._responseHandler.handleResponse(this._serializer.deserializeResponse(i.data))}catch(o){this._diagLogger.warn("Export succeeded but could not deserialize response - is the response specification compliant?",o,i.data)}r({code:qo.SUCCESS});return}else if(i.status==="failure"&&i.error){r({code:qo.FAILED,error:i.error});return}else i.status==="retryable"?r({code:qo.FAILED,error:new VN("Export failed with retryable status")}):r({code:qo.FAILED,error:new VN("Export failed with unknown error")})},i=>r({code:qo.FAILED,error:i})))}forceFlush(){return this._promiseQueue.awaitAll()}async shutdown(){this._diagLogger.debug("shutdown started"),await this.forceFlush(),this._transport.shutdown()}}function _we(t,e){return new Twe(t.transport,t.serializer,Iwe(),t.promiseHandler,e.timeout)}function hG(t,e,r){return _we({transport:r,serializer:e,promiseHandler:Ewe(t)},{timeout:t.timeoutMillis})}function zN(t){return t>=48&&t<=57?t-48:t>=97&&t<=102?t-87:t-55}function pG(t){const e=new Uint8Array(t.length/2);let r=0;for(let n=0;n<t.length;n+=2){const i=zN(t.charCodeAt(n)),o=zN(t.charCodeAt(n+1));e[r++]=i<<4|o}return e}function mG(t){const e=BigInt(1e9);return BigInt(t[0])*e+BigInt(t[1])}function Rwe(t){const e=Number(BigInt.asUintN(32,t)),r=Number(BigInt.asUintN(32,t>>BigInt(32)));return{low:e,high:r}}function jwe(t){const e=mG(t);return Rwe(e)}function Dwe(t){return mG(t).toString()}const Mwe=typeof BigInt<"u"?Dwe:Sxe;function BN(t){return t}function Nwe(t){if(t!==void 0)return pG(t)}const Lwe={encodeHrTime:jwe,encodeSpanContext:pG,encodeOptionalSpanContext:Nwe};function Qwe(t){return t===void 0?Lwe:{encodeHrTime:Mwe,encodeSpanContext:BN,encodeOptionalSpanContext:BN}}function Vwe(t){return{attributes:Fx(t.attributes),droppedAttributesCount:0}}function zwe(t){return{name:t.name,version:t.version}}function Fx(t){return Object.keys(t).map(e=>gG(e,t[e]))}function gG(t,e){return{key:t,value:yG(e)}}function yG(t){const 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(yG)}}:e==="object"&&t!=null?{kvlistValue:{values:Object.entries(t).map(([r,n])=>gG(r,n))}}:{}}function Bwe(t,e){var o,s,a;const r=t.spanContext(),n=t.status,i=(o=t.parentSpanContext)!=null&&o.spanId?e.encodeSpanContext((s=t.parentSpanContext)==null?void 0:s.spanId):void 0;return{traceId:e.encodeSpanContext(r.traceId),spanId:e.encodeSpanContext(r.spanId),parentSpanId:i,traceState:(a=r.traceState)==null?void 0:a.serialize(),name:t.name,kind:t.kind==null?0:t.kind+1,startTimeUnixNano:e.encodeHrTime(t.startTime),endTimeUnixNano:e.encodeHrTime(t.endTime),attributes:Fx(t.attributes),droppedAttributesCount:t.droppedAttributesCount,events:t.events.map(l=>Fwe(l,e)),droppedEventsCount:t.droppedEventsCount,status:{code:n.code,message:n.message},links:t.links.map(l=>qwe(l,e)),droppedLinksCount:t.droppedLinksCount}}function qwe(t,e){var r;return{attributes:t.attributes?Fx(t.attributes):[],spanId:e.encodeSpanContext(t.context.spanId),traceId:e.encodeSpanContext(t.context.traceId),traceState:(r=t.context.traceState)==null?void 0:r.serialize(),droppedAttributesCount:t.droppedAttributesCount||0}}function Fwe(t,e){return{attributes:t.attributes?Fx(t.attributes):[],name:t.name,timeUnixNano:e.encodeHrTime(t.time),droppedAttributesCount:t.droppedAttributesCount||0}}function Wwe(t,e){const r=Qwe(e);return{resourceSpans:Xwe(t,r)}}function Uwe(t){const e=new Map;for(const r of t){let n=e.get(r.resource);n||(n=new Map,e.set(r.resource,n));const i=`${r.instrumentationScope.name}@${r.instrumentationScope.version||""}:${r.instrumentationScope.schemaUrl||""}`;let o=n.get(i);o||(o=[],n.set(i,o)),o.push(r)}return e}function Xwe(t,e){const r=Uwe(t),n=[],i=r.entries();let o=i.next();for(;!o.done;){const[s,a]=o.value,l=[],c=a.values();let u=c.next();for(;!u.done;){const f=u.value;if(f.length>0){const h=f.map(m=>Bwe(m,e));l.push({scope:zwe(f[0].instrumentationScope),spans:h,schemaUrl:f[0].instrumentationScope.schemaUrl})}u=c.next()}const d={resource:Vwe(s),scopeSpans:l,schemaUrl:void 0};n.push(d),o=i.next()}return n}const Zwe={serializeRequest:t=>{const e=Wwe(t,{});return new TextEncoder().encode(JSON.stringify(e))},deserializeResponse:t=>{if(t.length===0)return{};const e=new TextDecoder;return JSON.parse(e.decode(t))}},Gwe=5,Ywe=1e3,Hwe=5e3,Jwe=1.5,qN=.2;function Kwe(){return Math.random()*(2*qN)-qN}class eSe{constructor(e){xe(this,"_transport");this._transport=e}retry(e,r,n){return new Promise((i,o)=>{setTimeout(()=>{this._transport.send(e,r).then(i,o)},n)})}async send(e,r){const n=Date.now()+r;let i=await this._transport.send(e,r),o=Gwe,s=Ywe;for(;i.status==="retryable"&&o>0;){o--;const a=Math.max(Math.min(s,Hwe)+Kwe(),0);s=s*Jwe;const l=i.retryInMillis??a,c=n-Date.now();if(l>c)return i;i=await this.retry(e,c,l)}return i}shutdown(){return this._transport.shutdown()}}function vG(t){return new eSe(t.transport)}function tSe(t){return[429,502,503,504].includes(t)}function rSe(t){if(t==null)return;const e=Number.parseInt(t,10);if(Number.isInteger(e))return e>0?e*1e3:-1;const r=new Date(t).getTime()-Date.now();return r>=0?r:0}class nSe{constructor(e){xe(this,"_parameters");this._parameters=e}send(e,r){return new Promise(n=>{const i=new XMLHttpRequest;i.timeout=r,i.open("POST",this._parameters.url);const o=this._parameters.headers();Object.entries(o).forEach(([s,a])=>{i.setRequestHeader(s,a)}),i.ontimeout=s=>{n({status:"failure",error:new Error("XHR request timed out")})},i.onreadystatechange=()=>{i.status>=200&&i.status<=299?(jt.debug("XHR success"),n({status:"success"})):i.status&&tSe(i.status)?n({status:"retryable",retryInMillis:rSe(i.getResponseHeader("Retry-After"))}):i.status!==0&&n({status:"failure",error:new Error("XHR request failed with non-retryable status")})},i.onabort=()=>{n({status:"failure",error:new Error("XHR request aborted")})},i.onerror=()=>{n({status:"failure",error:new Error("XHR request errored")})},i.send(e)})}shutdown(){}}function iSe(t){return new nSe(t)}class oSe{constructor(e){xe(this,"_params");this._params=e}send(e){return new Promise(r=>{navigator.sendBeacon(this._params.url,new Blob([e],{type:this._params.blobType}))?(jt.debug("SendBeacon success"),r({status:"success"})):r({status:"failure",error:new Error("SendBeacon failed")})})}shutdown(){}}function sSe(t){return new oSe(t)}function aSe(t,e){return hG(t,e,vG({transport:iSe(t)}))}function lSe(t,e){return hG(t,e,vG({transport:sSe({url:t.url,blobType:t.headers()["Content-Type"]})}))}function cSe(t){return()=>{const e={};return Object.entries((t==null?void 0:t())??{}).forEach(([r,n])=>{typeof n<"u"?e[r]=String(n):jt.warn(`Header "${r}" has invalid value (${n}) and will be ignored`)}),e}}function uSe(t,e,r){const n={...r()},i={};return()=>(e!=null&&Object.assign(i,e()),t!=null&&Object.assign(i,t()),Object.assign(i,n))}function dSe(t){if(t!=null)try{return new URL(t),t}catch{throw new Error(`Configuration: Could not parse user-provided export URL: '${t}'`)}}function fSe(t,e,r){return{...Pwe(t,e,r),headers:uSe(cSe(t.headers),e.headers,r.headers),url:dSe(t.url)??e.url??r.url,agentOptions:t.agentOptions??e.agentOptions??r.agentOptions}}function hSe(t,e){return{...kwe(),headers:()=>t,url:"http://localhost:4318/"+e,agentOptions:{keepAlive:!0}}}function pSe(t,e,r){return fSe({url:t.url,timeoutMillis:t.timeoutMillis,headers:Cwe(t.headers),concurrencyLimit:t.concurrencyLimit},{},hSe(r,e))}function mSe(t,e,r,n){const i=!!t.headers||typeof navigator.sendBeacon!="function",o=pSe(t,r,n);return i?aSe(o,e):lSe(o,e)}class gSe extends wwe{constructor(e={}){super(mSe(e,Zwe,"v1/traces",{"Content-Type":"application/json"}))}}class bG{emit(e){}}const ySe=new bG;class vSe{getLogger(e,r,n){return new bG}}const OG=new vSe;class bSe{constructor(e,r,n,i){this._provider=e,this.name=r,this.version=n,this.options=i}emit(e){this._getLogger().emit(e)}_getLogger(){if(this._delegate)return this._delegate;const e=this._provider.getDelegateLogger(this.name,this.version,this.options);return e?(this._delegate=e,this._delegate):ySe}}class FN{getLogger(e,r,n){var i;return(i=this.getDelegateLogger(e,r,n))!==null&&i!==void 0?i:new bSe(this,e,r,n)}getDelegate(){var e;return(e=this._delegate)!==null&&e!==void 0?e:OG}setDelegate(e){this._delegate=e}getDelegateLogger(e,r,n){var i;return(i=this._delegate)===null||i===void 0?void 0:i.getLogger(e,r,n)}}const OSe=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{},Ag=Symbol.for("io.opentelemetry.js.api.logs"),Cf=OSe;function xSe(t,e,r){return n=>n===t?e:r}const WN=1;class MI{constructor(){this._proxyLoggerProvider=new FN}static getInstance(){return this._instance||(this._instance=new MI),this._instance}setGlobalLoggerProvider(e){return Cf[Ag]?this.getLoggerProvider():(Cf[Ag]=xSe(WN,e,OG),this._proxyLoggerProvider.setDelegate(e),e)}getLoggerProvider(){var e,r;return(r=(e=Cf[Ag])===null||e===void 0?void 0:e.call(Cf,WN))!==null&&r!==void 0?r:this._proxyLoggerProvider}getLogger(e,r,n){return this.getLoggerProvider().getLogger(e,r,n)}disable(){delete Cf[Ag],this._proxyLoggerProvider=new FN}}const wSe=MI.getInstance();function SSe(t,e,r,n){for(let i=0,o=t.length;i<o;i++){const s=t[i];e&&s.setTracerProvider(e),r&&s.setMeterProvider(r),n&&s.setLoggerProvider&&s.setLoggerProvider(n),s.getConfig().enabled||s.enable()}}function CSe(t){t.forEach(e=>e.disable())}function PSe(t){var o;const e=t.tracerProvider||bi.getTracerProvider(),r=t.meterProvider||F0e.getMeterProvider(),n=t.loggerProvider||wSe.getLoggerProvider(),i=((o=t.instrumentations)==null?void 0:o.flat())??[];return SSe(i,e,r,n),()=>{CSe(i)}}class UN{constructor(e){xe(this,"span");this.span=e}error(e){this.span&&(this.span.setStatus(Cp.ERROR,e.message),this.span.recordException(e),this.span.end())}setAttribute(e,r){this.span&&this.span.setAttribute(e,r)}end(){this.span&&(this.span.setStatus(Cp.OK),this.span.end())}}class kSe{constructor(){xe(this,"config",null);xe(this,"tracer",null);xe(this,"tracerProvider",null);xe(this,"initialized",!1);xe(this,"getKeySnakeValue",e=>e.replace(/([A-Z])/g,"_$1").toLowerCase())}initTracer(e){throw new Error("initTracer must be implemented by the environment-specific client")}init(e){this.config=e,this.initTracer(e)}send(e){var r;try{if(!this.tracer||!this.config)return;const n=e.time?new Date(e.time):new Date;this.tracer.startSpan(`event.${e.type}`,{attributes:this.processAttributes(e,n),startTime:n}).end(n)}catch(n){(r=this.config)!=null&&r.isProd||console.error("Event reporting failed:",n)}}processAttributes(e,r){var o,s,a,l,c;const i={"cloudevents.event_id":YO(),"cloudevents.event_type":e.type,"cloudevents.event_source":e.source,"cloudevents.event_spec_version":e.specversion,"cloudevents.event_data_content_type":e.datacontenttype||"application/json; charset=utf-8","cloudevents.event_time":r.toISOString(),"cloudevents.event_subject":e.subject??"","cloudevents.page.uri":location.href,"cloudevents.event_version":(o=this.config)==null?void 0:o.version,"cloudevents.event_origin":(s=this.config)==null?void 0:s.serviceName,"cloudevents.event_source_details.id":((a=e.sourceDetails)==null?void 0:a.id)??"anonymous","cloudevents.event_source_details.object":((l=e.sourceDetails)==null?void 0:l.object)??"anonymous","cloudevents.event_source_details.uri":(c=e.sourceDetails)==null?void 0:c.uri};if(e.data&&typeof e.data=="object"&&Object.entries(e.data).forEach(([u,d])=>{const f=u.replace(/([A-Z])/g,"_$1").toLowerCase();d!==void 0&&(i[`cloudevents.event_data.${f}`]=d)}),"subjects"in e&&Array.isArray(e.subjects)){const u=e.subjects.reduce((d,f)=>{if(!f||typeof f!="object")return d;const h=f.object;if(!h||typeof h!="string")return d;const m=d.notUpdated.find(({object:p})=>p===h);return m?(d.updated=[m,f],d.notUpdated=d.notUpdated.filter(({object:p})=>p!==h)):d.updated.some(({object:p})=>p===h)||d.notUpdated.push(f),d},{updated:[],notUpdated:[]});u.updated.forEach((d,f)=>{const h=f===0?"after.":"before.",m=`${d.object}.`;Object.entries(d).forEach(([p,y])=>{y!==void 0&&(i[`cloudevents.subjects.${h}${m}${p}`]=y)})}),u.notUpdated.forEach(d=>{const f=`${d.object}.`;Object.entries(d).forEach(([h,m])=>{m!==void 0&&(i[`cloudevents.subjects.${f}${h}`]=m)})})}return Object.entries(e).forEach(([u,d])=>{["id","source","type","specversion","time","datacontenttype","data","subject","sourceDetails","analyticsMetadata","context"].includes(u)||d!==void 0&&(d instanceof Object?Object.entries(d).forEach(([f,h])=>{h!==void 0&&(i[`cloudevents.${u}.${f}`]=h)}):i[`cloudevents.${u}`]=d)}),i}startSpan(e,r){var n;try{if(!this.tracer)return;let i;const o=e.time?new Date(e.time):new Date,s=this.tracer.startSpan(`event.${e.type}`,{attributes:this.processAttributes(e,o),root:!r},r);return r||(i=bi.setSpan(co.active(),s)),{end:()=>s.end(),setAttribute:(a,l)=>{s.setAttribute(`cloudevents.event_data.${this.getKeySnakeValue(a)}`,l)},setStatus:(a,l)=>s.setStatus({code:a,message:l}),parentCtx:i}}catch(i){(n=this.config)!=null&&n.isProd||console.error("Event reporting failed:",i)}}startStepSpan(e){var r;try{if(!this.tracer)return;const n=e.time?new Date(e.time):new Date,i=this.tracer.startSpan(`event.${e.type}`,{attributes:this.processAttributes(e,n),root:!1},co.active());return{end:()=>i.end(),setAttribute:(o,s)=>{i.setAttribute(`cloudevents.event_data.${this.getKeySnakeValue(o)}`,s)},setStatus:(o,s)=>i.setStatus({code:o,message:s}),recordException:o=>i.recordException(o)}}catch(n){(r=this.config)!=null&&r.isProd||console.error("Event reporting failed:",n)}}startRootSpan(e){var r;try{if(!this.tracer)return;const n=e.time?new Date(e.time):new Date,i=this.tracer.startSpan(`event.${e.type}`,{attributes:this.processAttributes(e,n)},co.active()),o=bi.setSpan(co.active(),i);return{end:()=>i.end(),setAttribute:(s,a)=>{i.setAttribute(`cloudevents.event_data.${this.getKeySnakeValue(s)}`,a)},setStatus:(s,a)=>i.setStatus({code:s,message:a}),recordException:s=>i.recordException(s),context:o}}catch(n){(r=this.config)!=null&&r.isProd||console.error("Event reporting failed:",n)}}startTrace(e){const r=this.startStepSpan(e);if(r)return new UN(r)}startRootTrace(e){const r=this.startRootSpan(e);if(r)return{traceApi:new UN(r),context:r.context}}async forceFlush(){var e;return(e=this.tracerProvider)==null?void 0:e.forceFlush()}}class $Se extends kSe{constructor(){super();xe(this,"tracerProvider",null);xe(this,"tracer",null);xe(this,"initialized",!1)}initTracer(r){if(!r.collectorUrl&&!r.collectorTraceUrl)return;const n=`ses_${YO()}`,i=uG({[eG]:r.serviceName,[mxe]:r.serviceVersion,session_id:n}),o=r.collectorTraceUrl||`${r.collectorUrl}/v1/traces`;this.tracerProvider=new xwe({resource:i,spanProcessors:[new dwe(new gSe({url:o,headers:{}}))]}),this.tracer=this.tracerProvider.getTracer(r.tracerName),this.tracerProvider.register(),PSe({instrumentations:r.instrumentations??[]}),this.initialized=!0}}class ESe{constructor(){xe(this,"config",null);xe(this,"initialized",!1);xe(this,"useCloudEventData");xe(this,"otelClient");xe(this,"traceApi");xe(this,"updateCloudEventData",e=>{var r;(r=this.config)!=null&&r.disabled||(this.useCloudEventData=e)});this.useCloudEventData=()=>({organization:{id:"",slug:""},project:{id:"",slug:""},productType:"",sourceDetails:{user:"Anonymous",object:"user",uri:""},request:{source:""}}),this.otelClient=new $Se,this.traceApi={startStep:(e,r)=>{const n=this.constructCloudEvent(e,r);return this.otelClient.startTrace(n)},startRoot:(e,r)=>{const n=this.constructCloudEvent(e,r);return this.otelClient.startRootTrace(n)}}}send(e,r){var n,i;try{if(!((n=this.config)!=null&&n.otel.isProd))return;const o=this.constructCloudEvent(e,r);this.sendToOtelService(o)}catch(o){(i=this.config)!=null&&i.otel.isProd||console.error("Event reporting failed:",o)}}init(e){e.disabled||this.initialized||(this.config=e,this.initialized=!0,this.otelClient.init({serviceVersion:e.otel.serviceVersion,version:e.otel.version,isProd:e.otel.isProd,collectorUrl:e.otel.collectorUrl,collectorTraceUrl:e.otel.collectorTraceUrl,serviceName:e.otel.serviceName,tracerName:e.otel.tracerName,instrumentations:[...e.otel.instrumentations||[]]}))}startSpan(e,r,n){var o;if((o=this.config)!=null&&o.disabled)return;const i=this.constructCloudEvent(e,r);return this.otelClient.startSpan(i,n)}startStepSpan(e,r){const n=this.constructCloudEvent(e,r);return this.otelClient.startStepSpan(n)}constructCloudEvent(e,r){const n=this.useCloudEventData();return{id:`evt_${YO()}`,type:e,source:n.request.source||"",specversion:"1.0",datacontenttype:"application/json",time:new Date().toISOString(),data:r,origin:"ui",sourceDetails:{id:n.sourceDetails.user||`usr_${YO()}`,object:n.sourceDetails.object||"user",uri:n.sourceDetails.uri||""},organization:n.organization,project:n.project,productType:n.productType}}sendToOtelService(e){var r;(r=this.config)!=null&&r.otel.isProd||console.log("CloudEvent to be sent to OTEL service:",e),this.otelClient.send(e)}forceFlush(){var e;return(e=this.config)!=null&&e.disabled?Promise.resolve():this.otelClient.forceFlush()}sendTabChangeMessage(e){this.send("tab.change",e)}sendButtonClickMessage(e){this.send("button.click",e)}sendChangeMessage(e){this.send("change",e)}sendContentCopyMessage(e){this.send("content.copy",e)}sendUrlClickMessage(e){this.send("url.click",e)}sendRequestSendMessage(e){this.send("request.send",e)}sendTokenGenerateMessage(e){this.send("token.generate",e)}sendAppLifecycleMessage(e){this.send("app.lifecycle",e)}sendEnvironmentManagementMessage(e){this.send("environment.management",e)}sendServerManagementMessage(e){this.send("server.management",e)}sendInputManagementMessage(e){this.send("input.management",e)}sendNodeManagementMessage(e){this.send("node.management",e)}sendHistoryManagementMessage(e){this.send("history.management",e)}sendCredentialManagementMessage(e){this.send("credential.management",e)}sendPanelToggleMessage(e){this.send("panel.toggle",e)}sendWorkflowRunClickMessage(e){this.send("workflow.run.click",e)}sendWorkflowRunResultMessage(e){this.send("workflow.run.result",e)}}function ASe(){return{theme:"light",disableCollectionsTab:!1,oAuth2RedirectURI:null,corsProxyUrl:void 0,mockServer:void 0,certificates:[],isApiBased:!1,generatedEnvironments:[],generatedInputs:[]}}const ISe=ASe(),TSe=N.createContext(ISe);function ys(){const t=N.useContext(TSe);return F5(t)}function _Se(t,e){const{apps:{apiId:r}}=Et(),{corsProxyUrl:n,disableCollectionsTab:i,mockServer:o,oAuth2RedirectURI:s,certificates:a,storageKey:l,isApiBased:c}=ys();n.set((t==null?void 0:t.corsProxyUrl)??Wre),o.set(t==null?void 0:t.mockServer),r.set(t==null?void 0:t.apiId),s.set(t==null?void 0:t.oAuth2RedirectURI),i.set(!!(t!=null&&t.disableCollectionsTab)),l.set(t==null?void 0:t.storageKey),c.set(!!e),N.useEffect(()=>{a.set((t==null?void 0:t.certificates)||[])},[t==null?void 0:t.certificates])}const Wx=N.createContext({});function NI(){return N.useContext(Wx)||{}}const RSe="0.17.0",jSe={version:RSe};class DSe{constructor(){xe(this,"client");xe(this,"_isInitialized",!1);this.client=new ESe}get isInitialized(){return this._isInitialized}init(e){if(this.isInitialized)return;const n={serviceName:"replay",serviceVersion:jSe.version,version:"1.0.0",tracerName:(e==null?void 0:e.tracerName)||"desktop",collectorUrl:(e==null?void 0:e.collectorUrl)||"",isProd:!0};this.client.init({otel:{...n,...e}}),this._isInitialized=!0}sendEvent(e,r){if(!this.isInitialized){console.warn("Telemetry client not initialized. Call init() first.");return}try{this.client.send(e,r)}catch(n){console.error("Failed to send telemetry event:",n)}}}const A1=new DSe;function vt(){const{telemetry:t}=NI();return A1.isInitialized||A1.init({tracerName:t==null?void 0:t.tracerName,collectorUrl:t==null?void 0:t.collectorUrl}),{sendEvent:(e,r)=>{A1.sendEvent(e,r)}}}const Ln=800;var MSe=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function NSe(t){var e=t.defaultInputValue,r=e===void 0?"":e,n=t.defaultMenuIsOpen,i=n===void 0?!1:n,o=t.defaultValue,s=o===void 0?null:o,a=t.inputValue,l=t.menuIsOpen,c=t.onChange,u=t.onInputChange,d=t.onMenuClose,f=t.onMenuOpen,h=t.value,m=ki(t,MSe),p=N.useState(a!==void 0?a:r),y=Ot(p,2),v=y[0],b=y[1],O=N.useState(l!==void 0?l:i),w=Ot(O,2),x=w[0],S=w[1],P=N.useState(h!==void 0?h:s),I=Ot(P,2),E=I[0],M=I[1],V=N.useCallback(function(ie,he){typeof c=="function"&&c(ie,he),M(ie)},[c]),U=N.useCallback(function(ie,he){var L;typeof u=="function"&&(L=u(ie,he)),b(L!==void 0?L:ie)},[u]),X=N.useCallback(function(){typeof f=="function"&&f(),S(!0)},[f]),J=N.useCallback(function(){typeof d=="function"&&d(),S(!1)},[d]),te=a!==void 0?a:v,oe=l!==void 0?l:x,ae=h!==void 0?h:E;return $e($e({},m),{},{inputValue:te,menuIsOpen:oe,onChange:V,onInputChange:U,onMenuClose:J,onMenuOpen:X,value:ae})}function LSe(t){if(t.sheet)return t.sheet;for(var e=0;e<document.styleSheets.length;e++)if(document.styleSheets[e].ownerNode===t)return document.styleSheets[e]}function QSe(t){var e=document.createElement("style");return e.setAttribute("data-emotion",t.key),t.nonce!==void 0&&e.setAttribute("nonce",t.nonce),e.appendChild(document.createTextNode("")),e.setAttribute("data-s",""),e}var VSe=(function(){function t(r){var n=this;this._insertTag=function(i){var o;n.tags.length===0?n.insertionPoint?o=n.insertionPoint.nextSibling:n.prepend?o=n.container.firstChild:o=n.before:o=n.tags[n.tags.length-1].nextSibling,n.container.insertBefore(i,o),n.tags.push(i)},this.isSpeedy=r.speedy===void 0?process.env.NODE_ENV==="production":r.speedy,this.tags=[],this.ctr=0,this.nonce=r.nonce,this.key=r.key,this.container=r.container,this.prepend=r.prepend,this.insertionPoint=r.insertionPoint,this.before=null}var e=t.prototype;return e.hydrate=function(n){n.forEach(this._insertTag)},e.insert=function(n){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(QSe(this));var i=this.tags[this.tags.length-1];if(process.env.NODE_ENV!=="production"){var o=n.charCodeAt(0)===64&&n.charCodeAt(1)===105;o&&this._alreadyInsertedOrderInsensitiveRule&&console.error(`You're attempting to insert the following rule:
|
|
349
|
+
`;function Hp({input:t,onSave:e,onCancel:r,...n}){const[i,o]=N.useState(!!t.isSecret),s=({name:a,value:l})=>{e({...t,name:a,value:l,isSecret:i})};return g.jsx(qZ,{variable:t,onSave:s,onCancel:r,...n,children:g.jsx(xp,{children:g.jsx(kOe,{value:i,onChange:a=>o(a),title:"Make it secret"})})})}function hb(t){var e=new Error(t);return e.source="ulid",e}var $I="0123456789ABCDEFGHJKMNPQRSTVWXYZ",Rh=$I.length,kN=Math.pow(2,48)-1,ROe=10,jOe=16;function DOe(t){var e=Math.floor(t()*Rh);return e===Rh&&(e=Rh-1),$I.charAt(e)}function MOe(t,e){if(isNaN(t))throw new Error(t+" must be a number");if(t>kN)throw hb("cannot encode time greater than "+kN);if(t<0)throw hb("time must be positive");if(Number.isInteger(t)===!1)throw hb("time must be an integer");for(var r=void 0,n="";e>0;e--)r=t%Rh,n=$I.charAt(r)+n,t=(t-r)/Rh;return n}function NOe(t,e){for(var r="";t>0;t--)r=DOe(e)+r;return r}function LOe(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,e=arguments[1];e||(e=typeof window<"u"?window:null);var r=e&&(e.crypto||e.msCrypto);if(r)return function(){var i=new Uint8Array(1);return r.getRandomValues(i),i[0]/255};try{var n=require("crypto");return function(){return n.randomBytes(1).readUInt8()/255}}catch{}if(t){try{console.error("secure crypto unusable, falling back to insecure Math.random()!")}catch{}return function(){return Math.random()}}throw hb("secure crypto unusable, insecure Math.random not allowed")}function QOe(t){return t||(t=LOe()),function(r){return isNaN(r)&&(r=Date.now()),MOe(r,ROe)+NOe(jOe,t)}}var YO=QOe(),VOe=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{},ql="1.9.0",$N=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;function zOe(t){var e=new Set([t]),r=new Set,n=t.match($N);if(!n)return function(){return!1};var i={major:+n[1],minor:+n[2],patch:+n[3],prerelease:n[4]};if(i.prerelease!=null)return function(l){return l===t};function o(a){return r.add(a),!1}function s(a){return e.add(a),!0}return function(l){if(e.has(l))return!0;if(r.has(l))return!1;var c=l.match($N);if(!c)return o(l);var u={major:+c[1],minor:+c[2],patch:+c[3],prerelease:c[4]};return u.prerelease!=null||i.major!==u.major?o(l):i.major===0?i.minor===u.minor&&i.patch<=u.patch?s(l):o(l):i.minor<=u.minor?s(l):o(l)}}var BOe=zOe(ql),qOe=ql.split(".")[0],wp=Symbol.for("opentelemetry.js.api."+qOe),Sp=VOe;function Jp(t,e,r,n){var i;n===void 0&&(n=!1);var o=Sp[wp]=(i=Sp[wp])!==null&&i!==void 0?i:{version:ql};if(!n&&o[t]){var s=new Error("@opentelemetry/api: Attempted duplicate registration of API: "+t);return r.error(s.stack||s.message),!1}if(o.version!==ql){var s=new Error("@opentelemetry/api: Registration of version v"+o.version+" for "+t+" does not match previously registered API v"+ql);return r.error(s.stack||s.message),!1}return o[t]=e,r.debug("@opentelemetry/api: Registered a global for "+t+" v"+ql+"."),!0}function uc(t){var e,r,n=(e=Sp[wp])===null||e===void 0?void 0:e.version;if(!(!n||!BOe(n)))return(r=Sp[wp])===null||r===void 0?void 0:r[t]}function Kp(t,e){e.debug("@opentelemetry/api: Unregistering a global for "+t+" v"+ql+".");var r=Sp[wp];r&&delete r[t]}var FOe=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(s)throw s.error}}return o},WOe=function(t,e,r){if(r||arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return t.concat(o||Array.prototype.slice.call(e))},UOe=(function(){function t(e){this._namespace=e.namespace||"DiagComponentLogger"}return t.prototype.debug=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return wf("debug",this._namespace,e)},t.prototype.error=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return wf("error",this._namespace,e)},t.prototype.info=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return wf("info",this._namespace,e)},t.prototype.warn=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return wf("warn",this._namespace,e)},t.prototype.verbose=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return wf("verbose",this._namespace,e)},t})();function wf(t,e,r){var n=uc("diag");if(n)return r.unshift(e),n[t].apply(n,WOe([],FOe(r),!1))}var pi;(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"})(pi||(pi={}));function XOe(t,e){t<pi.NONE?t=pi.NONE:t>pi.ALL&&(t=pi.ALL),e=e||{};function r(n,i){var o=e[n];return typeof o=="function"&&t>=i?o.bind(e):function(){}}return{error:r("error",pi.ERROR),warn:r("warn",pi.WARN),info:r("info",pi.INFO),debug:r("debug",pi.DEBUG),verbose:r("verbose",pi.VERBOSE)}}var ZOe=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(s)throw s.error}}return o},GOe=function(t,e,r){if(r||arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return t.concat(o||Array.prototype.slice.call(e))},YOe="diag",ds=(function(){function t(){function e(i){return function(){for(var o=[],s=0;s<arguments.length;s++)o[s]=arguments[s];var a=uc("diag");if(a)return a[i].apply(a,GOe([],ZOe(o),!1))}}var r=this,n=function(i,o){var s,a,l;if(o===void 0&&(o={logLevel:pi.INFO}),i===r){var c=new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");return r.error((s=c.stack)!==null&&s!==void 0?s:c.message),!1}typeof o=="number"&&(o={logLevel:o});var u=uc("diag"),d=XOe((a=o.logLevel)!==null&&a!==void 0?a:pi.INFO,i);if(u&&!o.suppressOverrideMessage){var f=(l=new Error().stack)!==null&&l!==void 0?l:"<failed to generate stacktrace>";u.warn("Current logger will be overwritten from "+f),d.warn("Current logger will overwrite one already registered from "+f)}return Jp("diag",d,r,!0)};r.setLogger=n,r.disable=function(){Kp(YOe,r)},r.createComponentLogger=function(i){return new UOe(i)},r.verbose=e("verbose"),r.debug=e("debug"),r.info=e("info"),r.warn=e("warn"),r.error=e("error")}return t.instance=function(){return this._instance||(this._instance=new t),this._instance},t})(),HOe=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(s)throw s.error}}return o},JOe=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},KOe=(function(){function t(e){this._entries=e?new Map(e):new Map}return t.prototype.getEntry=function(e){var r=this._entries.get(e);if(r)return Object.assign({},r)},t.prototype.getAllEntries=function(){return Array.from(this._entries.entries()).map(function(e){var r=HOe(e,2),n=r[0],i=r[1];return[n,i]})},t.prototype.setEntry=function(e,r){var n=new t(this._entries);return n._entries.set(e,r),n},t.prototype.removeEntry=function(e){var r=new t(this._entries);return r._entries.delete(e),r},t.prototype.removeEntries=function(){for(var e,r,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];var o=new t(this._entries);try{for(var s=JOe(n),a=s.next();!a.done;a=s.next()){var l=a.value;o._entries.delete(l)}}catch(c){e={error:c}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(e)throw e.error}}return o},t.prototype.clear=function(){return new t},t})(),e0e=Symbol("BaggageEntryMetadata"),t0e=ds.instance();function r0e(t){return t===void 0&&(t={}),new KOe(new Map(Object.entries(t)))}function n0e(t){return typeof t!="string"&&(t0e.error("Cannot create baggage metadata from unknown type: "+typeof t),t=""),{__TYPE__:e0e,toString:function(){return t}}}function EI(t){return Symbol.for(t)}var i0e=(function(){function t(e){var r=this;r._currentContext=e?new Map(e):new Map,r.getValue=function(n){return r._currentContext.get(n)},r.setValue=function(n,i){var o=new t(r._currentContext);return o._currentContext.set(n,i),o},r.deleteValue=function(n){var i=new t(r._currentContext);return i._currentContext.delete(n),i}}return t})(),fu=new i0e,Pc=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),o0e=(function(){function t(){}return t.prototype.createGauge=function(e,r){return m0e},t.prototype.createHistogram=function(e,r){return g0e},t.prototype.createCounter=function(e,r){return p0e},t.prototype.createUpDownCounter=function(e,r){return y0e},t.prototype.createObservableGauge=function(e,r){return b0e},t.prototype.createObservableCounter=function(e,r){return v0e},t.prototype.createObservableUpDownCounter=function(e,r){return O0e},t.prototype.addBatchObservableCallback=function(e,r){},t.prototype.removeBatchObservableCallback=function(e){},t})(),zx=(function(){function t(){}return t})(),s0e=(function(t){Pc(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.add=function(r,n){},e})(zx),a0e=(function(t){Pc(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.add=function(r,n){},e})(zx),l0e=(function(t){Pc(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.record=function(r,n){},e})(zx),c0e=(function(t){Pc(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.record=function(r,n){},e})(zx),AI=(function(){function t(){}return t.prototype.addCallback=function(e){},t.prototype.removeCallback=function(e){},t})(),u0e=(function(t){Pc(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e})(AI),d0e=(function(t){Pc(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e})(AI),f0e=(function(t){Pc(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e})(AI),h0e=new o0e,p0e=new s0e,m0e=new l0e,g0e=new c0e,y0e=new a0e,v0e=new u0e,b0e=new d0e,O0e=new f0e,x0e={get:function(t,e){if(t!=null)return t[e]},keys:function(t){return t==null?[]:Object.keys(t)}},w0e={set:function(t,e,r){t!=null&&(t[e]=r)}},S0e=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(s)throw s.error}}return o},C0e=function(t,e,r){if(r||arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return t.concat(o||Array.prototype.slice.call(e))},P0e=(function(){function t(){}return t.prototype.active=function(){return fu},t.prototype.with=function(e,r,n){for(var i=[],o=3;o<arguments.length;o++)i[o-3]=arguments[o];return r.call.apply(r,C0e([n],S0e(i),!1))},t.prototype.bind=function(e,r){return r},t.prototype.enable=function(){return this},t.prototype.disable=function(){return this},t})(),k0e=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(s)throw s.error}}return o},$0e=function(t,e,r){if(r||arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return t.concat(o||Array.prototype.slice.call(e))},y1="context",E0e=new P0e,Bx=(function(){function t(){}return t.getInstance=function(){return this._instance||(this._instance=new t),this._instance},t.prototype.setGlobalContextManager=function(e){return Jp(y1,e,ds.instance())},t.prototype.active=function(){return this._getContextManager().active()},t.prototype.with=function(e,r,n){for(var i,o=[],s=3;s<arguments.length;s++)o[s-3]=arguments[s];return(i=this._getContextManager()).with.apply(i,$0e([e,r,n],k0e(o),!1))},t.prototype.bind=function(e,r){return this._getContextManager().bind(e,r)},t.prototype._getContextManager=function(){return uc(y1)||E0e},t.prototype.disable=function(){this._getContextManager().disable(),Kp(y1,ds.instance())},t})(),ta;(function(t){t[t.NONE=0]="NONE",t[t.SAMPLED=1]="SAMPLED"})(ta||(ta={}));var FZ="0000000000000000",WZ="00000000000000000000000000000000",UZ={traceId:WZ,spanId:FZ,traceFlags:ta.NONE},jh=(function(){function t(e){e===void 0&&(e=UZ),this._spanContext=e}return t.prototype.spanContext=function(){return this._spanContext},t.prototype.setAttribute=function(e,r){return this},t.prototype.setAttributes=function(e){return this},t.prototype.addEvent=function(e,r){return this},t.prototype.addLink=function(e){return this},t.prototype.addLinks=function(e){return this},t.prototype.setStatus=function(e){return this},t.prototype.updateName=function(e){return this},t.prototype.end=function(e){},t.prototype.isRecording=function(){return!1},t.prototype.recordException=function(e,r){},t})(),II=EI("OpenTelemetry Context Key SPAN");function TI(t){return t.getValue(II)||void 0}function A0e(){return TI(Bx.getInstance().active())}function _I(t,e){return t.setValue(II,e)}function I0e(t){return t.deleteValue(II)}function T0e(t,e){return _I(t,new jh(e))}function XZ(t){var e;return(e=TI(t))===null||e===void 0?void 0:e.spanContext()}var _0e=/^([0-9a-f]{32})$/i,R0e=/^[0-9a-f]{16}$/i;function ZZ(t){return _0e.test(t)&&t!==WZ}function j0e(t){return R0e.test(t)&&t!==FZ}function qx(t){return ZZ(t.traceId)&&j0e(t.spanId)}function D0e(t){return new jh(t)}var v1=Bx.getInstance(),GZ=(function(){function t(){}return t.prototype.startSpan=function(e,r,n){n===void 0&&(n=v1.active());var i=!!(r!=null&&r.root);if(i)return new jh;var o=n&&XZ(n);return M0e(o)&&qx(o)?new jh(o):new jh},t.prototype.startActiveSpan=function(e,r,n,i){var o,s,a;if(!(arguments.length<2)){arguments.length===2?a=r:arguments.length===3?(o=r,a=n):(o=r,s=n,a=i);var l=s??v1.active(),c=this.startSpan(e,o,l),u=_I(l,c);return v1.with(u,a,void 0,c)}},t})();function M0e(t){return typeof t=="object"&&typeof t.spanId=="string"&&typeof t.traceId=="string"&&typeof t.traceFlags=="number"}var N0e=new GZ,L0e=(function(){function t(e,r,n,i){this._provider=e,this.name=r,this.version=n,this.options=i}return t.prototype.startSpan=function(e,r,n){return this._getTracer().startSpan(e,r,n)},t.prototype.startActiveSpan=function(e,r,n,i){var o=this._getTracer();return Reflect.apply(o.startActiveSpan,o,arguments)},t.prototype._getTracer=function(){if(this._delegate)return this._delegate;var e=this._provider.getDelegateTracer(this.name,this.version,this.options);return e?(this._delegate=e,this._delegate):N0e},t})(),Q0e=(function(){function t(){}return t.prototype.getTracer=function(e,r,n){return new GZ},t})(),V0e=new Q0e,EN=(function(){function t(){}return t.prototype.getTracer=function(e,r,n){var i;return(i=this.getDelegateTracer(e,r,n))!==null&&i!==void 0?i:new L0e(this,e,r,n)},t.prototype.getDelegate=function(){var e;return(e=this._delegate)!==null&&e!==void 0?e:V0e},t.prototype.setDelegate=function(e){this._delegate=e},t.prototype.getDelegateTracer=function(e,r,n){var i;return(i=this._delegate)===null||i===void 0?void 0:i.getTracer(e,r,n)},t})(),HO;(function(t){t[t.NOT_RECORD=0]="NOT_RECORD",t[t.RECORD=1]="RECORD",t[t.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(HO||(HO={}));var F$;(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"})(F$||(F$={}));var Cp;(function(t){t[t.UNSET=0]="UNSET",t[t.OK=1]="OK",t[t.ERROR=2]="ERROR"})(Cp||(Cp={}));var co=Bx.getInstance(),jt=ds.instance(),z0e=(function(){function t(){}return t.prototype.getMeter=function(e,r,n){return h0e},t})(),B0e=new z0e,b1="metrics",q0e=(function(){function t(){}return t.getInstance=function(){return this._instance||(this._instance=new t),this._instance},t.prototype.setGlobalMeterProvider=function(e){return Jp(b1,e,ds.instance())},t.prototype.getMeterProvider=function(){return uc(b1)||B0e},t.prototype.getMeter=function(e,r,n){return this.getMeterProvider().getMeter(e,r,n)},t.prototype.disable=function(){Kp(b1,ds.instance())},t})(),F0e=q0e.getInstance(),W0e=(function(){function t(){}return t.prototype.inject=function(e,r){},t.prototype.extract=function(e,r){return e},t.prototype.fields=function(){return[]},t})(),RI=EI("OpenTelemetry Baggage Key");function YZ(t){return t.getValue(RI)||void 0}function U0e(){return YZ(Bx.getInstance().active())}function X0e(t,e){return t.setValue(RI,e)}function Z0e(t){return t.deleteValue(RI)}var O1="propagation",G0e=new W0e,Y0e=(function(){function t(){this.createBaggage=r0e,this.getBaggage=YZ,this.getActiveBaggage=U0e,this.setBaggage=X0e,this.deleteBaggage=Z0e}return t.getInstance=function(){return this._instance||(this._instance=new t),this._instance},t.prototype.setGlobalPropagator=function(e){return Jp(O1,e,ds.instance())},t.prototype.inject=function(e,r,n){return n===void 0&&(n=w0e),this._getGlobalPropagator().inject(e,r,n)},t.prototype.extract=function(e,r,n){return n===void 0&&(n=x0e),this._getGlobalPropagator().extract(e,r,n)},t.prototype.fields=function(){return this._getGlobalPropagator().fields()},t.prototype.disable=function(){Kp(O1,ds.instance())},t.prototype._getGlobalPropagator=function(){return uc(O1)||G0e},t})(),Dh=Y0e.getInstance(),x1="trace",H0e=(function(){function t(){this._proxyTracerProvider=new EN,this.wrapSpanContext=D0e,this.isSpanContextValid=qx,this.deleteSpan=I0e,this.getSpan=TI,this.getActiveSpan=A0e,this.getSpanContext=XZ,this.setSpan=_I,this.setSpanContext=T0e}return t.getInstance=function(){return this._instance||(this._instance=new t),this._instance},t.prototype.setGlobalTracerProvider=function(e){var r=Jp(x1,this._proxyTracerProvider,ds.instance());return r&&this._proxyTracerProvider.setDelegate(e),r},t.prototype.getTracerProvider=function(){return uc(x1)||this._proxyTracerProvider},t.prototype.getTracer=function(e,r){return this.getTracerProvider().getTracer(e,r)},t.prototype.disable=function(){Kp(x1,ds.instance()),this._proxyTracerProvider=new EN},t})(),bi=H0e.getInstance();const HZ=EI("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function J0e(t){return t.setValue(HZ,!0)}function jI(t){return t.getValue(HZ)===!0}const K0e="=",W$=";",U$=",",w1="baggage",exe=180,txe=4096,rxe=8192;function nxe(t){return t.reduce((e,r)=>{const n=`${e}${e!==""?U$:""}${r}`;return n.length>rxe?e:n},"")}function ixe(t){return t.getAllEntries().map(([e,r])=>{let n=`${encodeURIComponent(e)}=${encodeURIComponent(r.value)}`;return r.metadata!==void 0&&(n+=W$+r.metadata.toString()),n})}function oxe(t){const e=t.split(W$);if(e.length<=0)return;const r=e.shift();if(!r)return;const n=r.indexOf(K0e);if(n<=0)return;const i=decodeURIComponent(r.substring(0,n).trim()),o=decodeURIComponent(r.substring(n+1).trim());let s;return e.length>0&&(s=n0e(e.join(W$))),{key:i,value:o,metadata:s}}class sxe{inject(e,r,n){const i=Dh.getBaggage(e);if(!i||jI(e))return;const o=ixe(i).filter(a=>a.length<=txe).slice(0,exe),s=nxe(o);s.length>0&&n.set(r,w1,s)}extract(e,r,n){const i=n.get(r,w1),o=Array.isArray(i)?i.join(U$):i;if(!o)return e;const s={};return o.length===0||(o.split(U$).forEach(l=>{const c=oxe(l);if(c){const u={value:c.value};c.metadata&&(u.metadata=c.metadata),s[c.key]=u}}),Object.entries(s).length===0)?e:Dh.setBaggage(e,Dh.createBaggage(s))}fields(){return[w1]}}function pb(t){const e={};if(typeof t!="object"||t==null)return e;for(const[r,n]of Object.entries(t)){if(!axe(r)){jt.warn(`Invalid attribute key: ${r}`);continue}if(!JZ(n)){jt.warn(`Invalid attribute value set for key: ${r}`);continue}Array.isArray(n)?e[r]=n.slice():e[r]=n}return e}function axe(t){return typeof t=="string"&&t.length>0}function JZ(t){return t==null?!0:Array.isArray(t)?lxe(t):KZ(t)}function lxe(t){let e;for(const r of t)if(r!=null){if(!e){if(KZ(r)){e=typeof r;continue}return!1}if(typeof r!==e)return!1}return!0}function KZ(t){switch(typeof t){case"number":case"boolean":case"string":return!0}return!1}function cxe(){return t=>{jt.error(uxe(t))}}function uxe(t){return typeof t=="string"?t:JSON.stringify(dxe(t))}function dxe(t){const e={};let r=t;for(;r!==null;)Object.getOwnPropertyNames(r).forEach(n=>{if(e[n])return;const i=r[n];i&&(e[n]=String(i))}),r=Object.getPrototypeOf(r);return e}let fxe=cxe();function Od(t){try{fxe(t)}catch{}}const Vu=performance,hxe="2.0.1",S1="exception.message",pxe="exception.stacktrace",C1="exception.type",eG="service.name",mxe="service.version",X$="telemetry.sdk.language",gxe="webjs",Z$="telemetry.sdk.name",G$="telemetry.sdk.version",yxe="process.runtime.name",P1={[Z$]:"opentelemetry",[yxe]:"browser",[X$]:gxe,[G$]:hxe};const vxe=9,bxe=6,Oxe=Math.pow(10,bxe),JO=Math.pow(10,vxe);function ku(t){const e=t/1e3,r=Math.trunc(e),n=Math.round(t%1e3*Oxe);return[r,n]}function tG(){let t=Vu.timeOrigin;if(typeof t!="number"){const e=Vu;t=e.timing&&e.timing.fetchStart}return t}function xxe(t){const e=ku(tG()),r=ku(typeof t=="number"?t:Vu.now());return nG(e,r)}function wxe(t,e){let r=e[0]-t[0],n=e[1]-t[1];return n<0&&(r-=1,n+=JO),[r,n]}function Sxe(t){return t[0]*JO+t[1]}function rG(t){return Array.isArray(t)&&t.length===2&&typeof t[0]=="number"&&typeof t[1]=="number"}function AN(t){return rG(t)||typeof t=="number"||t instanceof Date}function nG(t,e){const r=[t[0]+e[0],t[1]+e[1]];return r[1]>=JO&&(r[1]-=JO,r[0]+=1),r}var qo;(function(t){t[t.SUCCESS=0]="SUCCESS",t[t.FAILED=1]="FAILED"})(qo||(qo={}));class Cxe{constructor(e={}){xe(this,"_propagators");xe(this,"_fields");this._propagators=e.propagators??[],this._fields=Array.from(new Set(this._propagators.map(r=>typeof r.fields=="function"?r.fields():[]).reduce((r,n)=>r.concat(n),[])))}inject(e,r,n){for(const i of this._propagators)try{i.inject(e,r,n)}catch(o){jt.warn(`Failed to inject with ${i.constructor.name}. Err: ${o.message}`)}}extract(e,r,n){return this._propagators.reduce((i,o)=>{try{return o.extract(i,r,n)}catch(s){jt.warn(`Failed to extract with ${o.constructor.name}. Err: ${s.message}`)}return i},e)}fields(){return this._fields.slice()}}const Y$="[_0-9a-z-*/]",Pxe=`[a-z]${Y$}{0,255}`,kxe=`[a-z0-9]${Y$}{0,240}@[a-z]${Y$}{0,13}`,$xe=new RegExp(`^(?:${Pxe}|${kxe})$`),Exe=/^[ -~]{0,255}[!-~]$/,Axe=/,|=/;function Ixe(t){return $xe.test(t)}function Txe(t){return Exe.test(t)&&!Axe.test(t)}const IN=32,_xe=512,TN=",",_N="=";class DI{constructor(e){xe(this,"_internalState",new Map);e&&this._parse(e)}set(e,r){const n=this._clone();return n._internalState.has(e)&&n._internalState.delete(e),n._internalState.set(e,r),n}unset(e){const r=this._clone();return r._internalState.delete(e),r}get(e){return this._internalState.get(e)}serialize(){return this._keys().reduce((e,r)=>(e.push(r+_N+this.get(r)),e),[]).join(TN)}_parse(e){e.length>_xe||(this._internalState=e.split(TN).reverse().reduce((r,n)=>{const i=n.trim(),o=i.indexOf(_N);if(o!==-1){const s=i.slice(0,o),a=i.slice(o+1,n.length);Ixe(s)&&Txe(a)&&r.set(s,a)}return r},new Map),this._internalState.size>IN&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,IN))))}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){const e=new DI;return e._internalState=new Map(this._internalState),e}}const k1="traceparent",$1="tracestate",Rxe="00",jxe="(?!ff)[\\da-f]{2}",Dxe="(?![0]{32})[\\da-f]{32}",Mxe="(?![0]{16})[\\da-f]{16}",Nxe="[\\da-f]{2}",Lxe=new RegExp(`^\\s?(${jxe})-(${Dxe})-(${Mxe})-(${Nxe})(-.*)?\\s?$`);function Qxe(t){const e=Lxe.exec(t);return!e||e[1]==="00"&&e[5]?null:{traceId:e[2],spanId:e[3],traceFlags:parseInt(e[4],16)}}class Vxe{inject(e,r,n){const i=bi.getSpanContext(e);if(!i||jI(e)||!qx(i))return;const o=`${Rxe}-${i.traceId}-${i.spanId}-0${Number(i.traceFlags||ta.NONE).toString(16)}`;n.set(r,k1,o),i.traceState&&n.set(r,$1,i.traceState.serialize())}extract(e,r,n){const i=n.get(r,k1);if(!i)return e;const o=Array.isArray(i)?i[0]:i;if(typeof o!="string")return e;const s=Qxe(o);if(!s)return e;s.isRemote=!0;const a=n.get(r,$1);if(a){const l=Array.isArray(a)?a.join(","):a;s.traceState=new DI(typeof l=="string"?l:void 0)}return bi.setSpanContext(e,s)}fields(){return[k1,$1]}}const zxe="[object Object]",Bxe="[object Null]",qxe="[object Undefined]",Fxe=Function.prototype,iG=Fxe.toString,Wxe=iG.call(Object),Uxe=Object.getPrototypeOf,oG=Object.prototype,sG=oG.hasOwnProperty,Dl=Symbol?Symbol.toStringTag:void 0,aG=oG.toString;function RN(t){if(!Xxe(t)||Zxe(t)!==zxe)return!1;const e=Uxe(t);if(e===null)return!0;const r=sG.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&iG.call(r)===Wxe}function Xxe(t){return t!=null&&typeof t=="object"}function Zxe(t){return t==null?t===void 0?qxe:Bxe:Dl&&Dl in Object(t)?Gxe(t):Yxe(t)}function Gxe(t){const e=sG.call(t,Dl),r=t[Dl];let n=!1;try{t[Dl]=void 0,n=!0}catch{}const i=aG.call(t);return n&&(e?t[Dl]=r:delete t[Dl]),i}function Yxe(t){return aG.call(t)}const Hxe=20;function Jxe(...t){let e=t.shift();const r=new WeakMap;for(;t.length>0;)e=lG(e,t.shift(),0,r);return e}function E1(t){return KO(t)?t.slice():t}function lG(t,e,r=0,n){let i;if(!(r>Hxe)){if(r++,mb(t)||mb(e)||cG(e))i=E1(e);else if(KO(t)){if(i=t.slice(),KO(e))for(let o=0,s=e.length;o<s;o++)i.push(E1(e[o]));else if(Sf(e)){const o=Object.keys(e);for(let s=0,a=o.length;s<a;s++){const l=o[s];i[l]=E1(e[l])}}}else if(Sf(t))if(Sf(e)){if(!Kxe(t,e))return e;i=Object.assign({},t);const o=Object.keys(e);for(let s=0,a=o.length;s<a;s++){const l=o[s],c=e[l];if(mb(c))typeof c>"u"?delete i[l]:i[l]=c;else{const u=i[l],d=c;if(jN(t,l,n)||jN(e,l,n))delete i[l];else{if(Sf(u)&&Sf(d)){const f=n.get(u)||[],h=n.get(d)||[];f.push({obj:t,key:l}),h.push({obj:e,key:l}),n.set(u,f),n.set(d,h)}i[l]=lG(i[l],c,r,n)}}}}else i=e;return i}}function jN(t,e,r){const n=r.get(t[e])||[];for(let i=0,o=n.length;i<o;i++){const s=n[i];if(s.key===e&&s.obj===t)return!0}return!1}function KO(t){return Array.isArray(t)}function cG(t){return typeof t=="function"}function Sf(t){return!mb(t)&&!KO(t)&&!cG(t)&&typeof t=="object"}function mb(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t>"u"||t instanceof Date||t instanceof RegExp||t===null}function Kxe(t,e){return!(!RN(t)||!RN(e))}class ewe{constructor(){xe(this,"_promise");xe(this,"_resolve");xe(this,"_reject");this._promise=new Promise((e,r)=>{this._resolve=e,this._reject=r})}get promise(){return this._promise}resolve(e){this._resolve(e)}reject(e){this._reject(e)}}class twe{constructor(e,r){xe(this,"_callback");xe(this,"_that");xe(this,"_isCalled",!1);xe(this,"_deferred",new ewe);this._callback=e,this._that=r}get isCalled(){return this._isCalled}get promise(){return this._deferred.promise}call(...e){if(!this._isCalled){this._isCalled=!0;try{Promise.resolve(this._callback.call(this._that,...e)).then(r=>this._deferred.resolve(r),r=>this._deferred.reject(r))}catch(r){this._deferred.reject(r)}}return this._deferred.promise}}function rwe(){return"unknown_service"}const dh=t=>t!==null&&typeof t=="object"&&typeof t.then=="function";class e0{constructor(e){xe(this,"_rawAttributes");xe(this,"_asyncAttributesPending",!1);xe(this,"_memoizedAttributes");const r=e.attributes??{};this._rawAttributes=Object.entries(r).map(([n,i])=>(dh(i)&&(this._asyncAttributesPending=!0),[n,i])),this._rawAttributes=DN(this._rawAttributes)}static FromAttributeList(e){const r=new e0({});return r._rawAttributes=DN(e),r._asyncAttributesPending=e.filter(([n,i])=>dh(i)).length>0,r}get asyncAttributesPending(){return this._asyncAttributesPending}async waitForAsyncAttributes(){if(this.asyncAttributesPending){for(let e=0;e<this._rawAttributes.length;e++){const[r,n]=this._rawAttributes[e];this._rawAttributes[e]=[r,dh(n)?await n:n]}this._asyncAttributesPending=!1}}get attributes(){if(this.asyncAttributesPending&&jt.error("Accessing resource attributes before async attributes settled"),this._memoizedAttributes)return this._memoizedAttributes;const e={};for(const[r,n]of this._rawAttributes){if(dh(n)){jt.debug(`Unsettled resource attribute ${r} skipped`);continue}n!=null&&(e[r]??(e[r]=n))}return this._asyncAttributesPending||(this._memoizedAttributes=e),e}getRawAttributes(){return this._rawAttributes}merge(e){return e==null?this:e0.FromAttributeList([...e.getRawAttributes(),...this.getRawAttributes()])}}function uG(t){return e0.FromAttributeList(Object.entries(t))}function nwe(){return uG({[eG]:rwe(),[X$]:P1[X$],[Z$]:P1[Z$],[G$]:P1[G$]})}function DN(t){return t.map(([e,r])=>dh(r)?[e,r.catch(n=>{jt.debug("promise rejection for resource attribute: %s - %s",e,n)})]:[e,r])}const iwe="exception";class owe{constructor(e){xe(this,"_spanContext");xe(this,"kind");xe(this,"parentSpanContext");xe(this,"attributes",{});xe(this,"links",[]);xe(this,"events",[]);xe(this,"startTime");xe(this,"resource");xe(this,"instrumentationScope");xe(this,"_droppedAttributesCount",0);xe(this,"_droppedEventsCount",0);xe(this,"_droppedLinksCount",0);xe(this,"name");xe(this,"status",{code:Cp.UNSET});xe(this,"endTime",[0,0]);xe(this,"_ended",!1);xe(this,"_duration",[-1,-1]);xe(this,"_spanProcessor");xe(this,"_spanLimits");xe(this,"_attributeValueLengthLimit");xe(this,"_performanceStartTime");xe(this,"_performanceOffset");xe(this,"_startTimeProvided");const r=Date.now();this._spanContext=e.spanContext,this._performanceStartTime=Vu.now(),this._performanceOffset=r-(this._performanceStartTime+tG()),this._startTimeProvided=e.startTime!=null,this._spanLimits=e.spanLimits,this._attributeValueLengthLimit=this._spanLimits.attributeValueLengthLimit||0,this._spanProcessor=e.spanProcessor,this.name=e.name,this.parentSpanContext=e.parentSpanContext,this.kind=e.kind,this.links=e.links||[],this.startTime=this._getTime(e.startTime??r),this.resource=e.resource,this.instrumentationScope=e.scope,e.attributes!=null&&this.setAttributes(e.attributes),this._spanProcessor.onStart(this,e.context)}spanContext(){return this._spanContext}setAttribute(e,r){if(r==null||this._isSpanEnded())return this;if(e.length===0)return jt.warn(`Invalid attribute key: ${e}`),this;if(!JZ(r))return jt.warn(`Invalid attribute value set for key: ${e}`),this;const{attributeCountLimit:n}=this._spanLimits;return n!==void 0&&Object.keys(this.attributes).length>=n&&!Object.prototype.hasOwnProperty.call(this.attributes,e)?(this._droppedAttributesCount++,this):(this.attributes[e]=this._truncateToSize(r),this)}setAttributes(e){for(const[r,n]of Object.entries(e))this.setAttribute(r,n);return this}addEvent(e,r,n){if(this._isSpanEnded())return this;const{eventCountLimit:i}=this._spanLimits;if(i===0)return jt.warn("No events allowed."),this._droppedEventsCount++,this;i!==void 0&&this.events.length>=i&&(this._droppedEventsCount===0&&jt.debug("Dropping extra events."),this.events.shift(),this._droppedEventsCount++),AN(r)&&(AN(n)||(n=r),r=void 0);const o=pb(r);return this.events.push({name:e,attributes:o,time:this._getTime(n),droppedAttributesCount:0}),this}addLink(e){return this.links.push(e),this}addLinks(e){return this.links.push(...e),this}setStatus(e){return this._isSpanEnded()?this:(this.status={...e},this.status.message!=null&&typeof e.message!="string"&&(jt.warn(`Dropping invalid status.message of type '${typeof e.message}', expected 'string'`),delete this.status.message),this)}updateName(e){return this._isSpanEnded()?this:(this.name=e,this)}end(e){if(this._isSpanEnded()){jt.error(`${this.name} ${this._spanContext.traceId}-${this._spanContext.spanId} - You can only call end() on a span once.`);return}this._ended=!0,this.endTime=this._getTime(e),this._duration=wxe(this.startTime,this.endTime),this._duration[0]<0&&(jt.warn("Inconsistent start and end time, startTime > endTime. Setting span duration to 0ms.",this.startTime,this.endTime),this.endTime=this.startTime.slice(),this._duration=[0,0]),this._droppedEventsCount>0&&jt.warn(`Dropped ${this._droppedEventsCount} events because eventCountLimit reached`),this._spanProcessor.onEnd(this)}_getTime(e){if(typeof e=="number"&&e<=Vu.now())return xxe(e+this._performanceOffset);if(typeof e=="number")return ku(e);if(e instanceof Date)return ku(e.getTime());if(rG(e))return e;if(this._startTimeProvided)return ku(Date.now());const r=Vu.now()-this._performanceStartTime;return nG(this.startTime,ku(r))}isRecording(){return this._ended===!1}recordException(e,r){const n={};typeof e=="string"?n[S1]=e:e&&(e.code?n[C1]=e.code.toString():e.name&&(n[C1]=e.name),e.message&&(n[S1]=e.message),e.stack&&(n[pxe]=e.stack)),n[C1]||n[S1]?this.addEvent(iwe,n,r):jt.warn(`Failed to record an exception ${e}`)}get duration(){return this._duration}get ended(){return this._ended}get droppedAttributesCount(){return this._droppedAttributesCount}get droppedEventsCount(){return this._droppedEventsCount}get droppedLinksCount(){return this._droppedLinksCount}_isSpanEnded(){if(this._ended){const e=new Error(`Operation attempted on ended Span {traceId: ${this._spanContext.traceId}, spanId: ${this._spanContext.spanId}}`);jt.warn(`Cannot execute the operation on ended Span {traceId: ${this._spanContext.traceId}, spanId: ${this._spanContext.spanId}}`,e)}return this._ended}_truncateToLimitUtil(e,r){return e.length<=r?e:e.substring(0,r)}_truncateToSize(e){const r=this._attributeValueLengthLimit;return r<=0?(jt.warn(`Attribute value limit must be positive, got ${r}`),e):typeof e=="string"?this._truncateToLimitUtil(e,r):Array.isArray(e)?e.map(n=>typeof n=="string"?this._truncateToLimitUtil(n,r):n):e}}var xd;(function(t){t[t.NOT_RECORD=0]="NOT_RECORD",t[t.RECORD=1]="RECORD",t[t.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(xd||(xd={}));class t0{shouldSample(){return{decision:xd.NOT_RECORD}}toString(){return"AlwaysOffSampler"}}class zu{shouldSample(){return{decision:xd.RECORD_AND_SAMPLED}}toString(){return"AlwaysOnSampler"}}class $g{constructor(e){xe(this,"_root");xe(this,"_remoteParentSampled");xe(this,"_remoteParentNotSampled");xe(this,"_localParentSampled");xe(this,"_localParentNotSampled");this._root=e.root,this._root||(Od(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new zu),this._remoteParentSampled=e.remoteParentSampled??new zu,this._remoteParentNotSampled=e.remoteParentNotSampled??new t0,this._localParentSampled=e.localParentSampled??new zu,this._localParentNotSampled=e.localParentNotSampled??new t0}shouldSample(e,r,n,i,o,s){const a=bi.getSpanContext(e);return!a||!qx(a)?this._root.shouldSample(e,r,n,i,o,s):a.isRemote?a.traceFlags&ta.SAMPLED?this._remoteParentSampled.shouldSample(e,r,n,i,o,s):this._remoteParentNotSampled.shouldSample(e,r,n,i,o,s):a.traceFlags&ta.SAMPLED?this._localParentSampled.shouldSample(e,r,n,i,o,s):this._localParentNotSampled.shouldSample(e,r,n,i,o,s)}toString(){return`ParentBased{root=${this._root.toString()}, remoteParentSampled=${this._remoteParentSampled.toString()}, remoteParentNotSampled=${this._remoteParentNotSampled.toString()}, localParentSampled=${this._localParentSampled.toString()}, localParentNotSampled=${this._localParentNotSampled.toString()}}`}}class MN{constructor(e=0){xe(this,"_ratio");xe(this,"_upperBound");this._ratio=e,this._ratio=this._normalize(e),this._upperBound=Math.floor(this._ratio*4294967295)}shouldSample(e,r){return{decision:ZZ(r)&&this._accumulate(r)<this._upperBound?xd.RECORD_AND_SAMPLED:xd.NOT_RECORD}}toString(){return`TraceIdRatioBased{${this._ratio}}`}_normalize(e){return typeof e!="number"||isNaN(e)?0:e>=1?1:e<=0?0:e}_accumulate(e){let r=0;for(let n=0;n<e.length/8;n++){const i=n*8,o=parseInt(e.slice(i,i+8),16);r=(r^o)>>>0}return r}}const NN=1;function dG(){return{sampler:fG(),forceFlushTimeoutMillis:3e4,generalLimits:{attributeValueLengthLimit:1/0,attributeCountLimit:128},spanLimits:{attributeValueLengthLimit:1/0,attributeCountLimit:128,linkCountLimit:128,eventCountLimit:128,attributePerEventCountLimit:128,attributePerLinkCountLimit:128}}}function fG(){const t="parentbased_always_on";switch(t){case"always_on":return new zu;case"always_off":return new t0;case"parentbased_always_on":return new $g({root:new zu});case"parentbased_always_off":return new $g({root:new t0});case"traceidratio":return new MN(LN());case"parentbased_traceidratio":return new $g({root:new MN(LN())});default:return jt.error(`OTEL_TRACES_SAMPLER value "${t}" invalid, defaulting to "parentbased_always_on".`),new $g({root:new zu})}}function LN(){return jt.error(`OTEL_TRACES_SAMPLER_ARG is blank, defaulting to ${NN}.`),NN}const swe=128,awe=1/0;function lwe(t){const e={sampler:fG()},r=dG(),n=Object.assign({},r,e,t);return n.generalLimits=Object.assign({},r.generalLimits,t.generalLimits||{}),n.spanLimits=Object.assign({},r.spanLimits,t.spanLimits||{}),n}function cwe(t){var r,n,i,o;const e=Object.assign({},t.spanLimits);return e.attributeCountLimit=((r=t.spanLimits)==null?void 0:r.attributeCountLimit)??((n=t.generalLimits)==null?void 0:n.attributeCountLimit)??void 0??void 0??swe,e.attributeValueLengthLimit=((i=t.spanLimits)==null?void 0:i.attributeValueLengthLimit)??((o=t.generalLimits)==null?void 0:o.attributeValueLengthLimit)??void 0??void 0??awe,Object.assign({},t,{spanLimits:e})}class uwe{constructor(e,r){xe(this,"_exporter");xe(this,"_maxExportBatchSize");xe(this,"_maxQueueSize");xe(this,"_scheduledDelayMillis");xe(this,"_exportTimeoutMillis");xe(this,"_isExporting",!1);xe(this,"_finishedSpans",[]);xe(this,"_timer");xe(this,"_shutdownOnce");xe(this,"_droppedSpansCount",0);this._exporter=e,this._maxExportBatchSize=typeof(r==null?void 0:r.maxExportBatchSize)=="number"?r.maxExportBatchSize:512,this._maxQueueSize=typeof(r==null?void 0:r.maxQueueSize)=="number"?r.maxQueueSize:2048,this._scheduledDelayMillis=typeof(r==null?void 0:r.scheduledDelayMillis)=="number"?r.scheduledDelayMillis:5e3,this._exportTimeoutMillis=typeof(r==null?void 0:r.exportTimeoutMillis)=="number"?r.exportTimeoutMillis:3e4,this._shutdownOnce=new twe(this._shutdown,this),this._maxExportBatchSize>this._maxQueueSize&&(jt.warn("BatchSpanProcessor: maxExportBatchSize must be smaller or equal to maxQueueSize, setting maxExportBatchSize to match maxQueueSize"),this._maxExportBatchSize=this._maxQueueSize)}forceFlush(){return this._shutdownOnce.isCalled?this._shutdownOnce.promise:this._flushAll()}onStart(e,r){}onEnd(e){this._shutdownOnce.isCalled||(e.spanContext().traceFlags&ta.SAMPLED)!==0&&this._addToBuffer(e)}shutdown(){return this._shutdownOnce.call()}_shutdown(){return Promise.resolve().then(()=>this.onShutdown()).then(()=>this._flushAll()).then(()=>this._exporter.shutdown())}_addToBuffer(e){if(this._finishedSpans.length>=this._maxQueueSize){this._droppedSpansCount===0&&jt.debug("maxQueueSize reached, dropping spans"),this._droppedSpansCount++;return}this._droppedSpansCount>0&&(jt.warn(`Dropped ${this._droppedSpansCount} spans because maxQueueSize reached`),this._droppedSpansCount=0),this._finishedSpans.push(e),this._maybeStartTimer()}_flushAll(){return new Promise((e,r)=>{const n=[],i=Math.ceil(this._finishedSpans.length/this._maxExportBatchSize);for(let o=0,s=i;o<s;o++)n.push(this._flushOneBatch());Promise.all(n).then(()=>{e()}).catch(r)})}_flushOneBatch(){return this._clearTimer(),this._finishedSpans.length===0?Promise.resolve():new Promise((e,r)=>{const n=setTimeout(()=>{r(new Error("Timeout"))},this._exportTimeoutMillis);co.with(J0e(co.active()),()=>{let i;this._finishedSpans.length<=this._maxExportBatchSize?(i=this._finishedSpans,this._finishedSpans=[]):i=this._finishedSpans.splice(0,this._maxExportBatchSize);const o=()=>this._exporter.export(i,a=>{clearTimeout(n),a.code===qo.SUCCESS?e():r(a.error??new Error("BatchSpanProcessor: span export failed"))});let s=null;for(let a=0,l=i.length;a<l;a++){const c=i[a];c.resource.asyncAttributesPending&&c.resource.waitForAsyncAttributes&&(s??(s=[]),s.push(c.resource.waitForAsyncAttributes()))}s===null?o():Promise.all(s).then(o,a=>{Od(a),r(a)})})})}_maybeStartTimer(){if(this._isExporting)return;const e=()=>{this._isExporting=!0,this._flushOneBatch().finally(()=>{this._isExporting=!1,this._finishedSpans.length>0&&(this._clearTimer(),this._maybeStartTimer())}).catch(r=>{this._isExporting=!1,Od(r)})};if(this._finishedSpans.length>=this._maxExportBatchSize)return e();this._timer===void 0&&(this._timer=setTimeout(()=>e(),this._scheduledDelayMillis),this._timer,void 0)}_clearTimer(){this._timer!==void 0&&(clearTimeout(this._timer),this._timer=void 0)}}class dwe extends uwe{constructor(r,n){super(r,n);xe(this,"_visibilityChangeListener");xe(this,"_pageHideListener");this.onInit(n)}onInit(r){(r==null?void 0:r.disableAutoFlushOnDocumentHide)!==!0&&typeof document<"u"&&(this._visibilityChangeListener=()=>{document.visibilityState==="hidden"&&this.forceFlush().catch(n=>{Od(n)})},this._pageHideListener=()=>{this.forceFlush().catch(n=>{Od(n)})},document.addEventListener("visibilitychange",this._visibilityChangeListener),document.addEventListener("pagehide",this._pageHideListener))}onShutdown(){typeof document<"u"&&(this._visibilityChangeListener&&document.removeEventListener("visibilitychange",this._visibilityChangeListener),this._pageHideListener&&document.removeEventListener("pagehide",this._pageHideListener))}}const fwe=8,hwe=16;class pwe{constructor(){xe(this,"generateTraceId",QN(hwe));xe(this,"generateSpanId",QN(fwe))}}const Eg=Array(32);function QN(t){return function(){for(let r=0;r<t*2;r++)Eg[r]=Math.floor(Math.random()*16)+48,Eg[r]>=58&&(Eg[r]+=39);return String.fromCharCode.apply(null,Eg.slice(0,t*2))}}class mwe{constructor(e,r,n,i){xe(this,"_sampler");xe(this,"_generalLimits");xe(this,"_spanLimits");xe(this,"_idGenerator");xe(this,"instrumentationScope");xe(this,"_resource");xe(this,"_spanProcessor");const o=lwe(r);this._sampler=o.sampler,this._generalLimits=o.generalLimits,this._spanLimits=o.spanLimits,this._idGenerator=r.idGenerator||new pwe,this._resource=n,this._spanProcessor=i,this.instrumentationScope=e}startSpan(e,r={},n=co.active()){r.root&&(n=bi.deleteSpan(n));const i=bi.getSpan(n);if(jI(n))return jt.debug("Instrumentation suppressed, returning Noop Span"),bi.wrapSpanContext(UZ);const o=i==null?void 0:i.spanContext(),s=this._idGenerator.generateSpanId();let a,l,c;!o||!bi.isSpanContextValid(o)?l=this._idGenerator.generateTraceId():(l=o.traceId,c=o.traceState,a=o);const u=r.kind??F$.INTERNAL,d=(r.links??[]).map(b=>({context:b.context,attributes:pb(b.attributes)})),f=pb(r.attributes),h=this._sampler.shouldSample(n,l,e,u,f,d);c=h.traceState??c;const m=h.decision===HO.RECORD_AND_SAMPLED?ta.SAMPLED:ta.NONE,p={traceId:l,spanId:s,traceFlags:m,traceState:c};if(h.decision===HO.NOT_RECORD)return jt.debug("Recording is off, propagating context in a non-recording span"),bi.wrapSpanContext(p);const y=pb(Object.assign(f,h.attributes));return new owe({resource:this._resource,scope:this.instrumentationScope,context:n,spanContext:p,name:e,kind:u,links:d,parentSpanContext:a,attributes:y,startTime:r.startTime,spanProcessor:this._spanProcessor,spanLimits:this._spanLimits})}startActiveSpan(e,r,n,i){let o,s,a;if(arguments.length<2)return;arguments.length===2?a=r:arguments.length===3?(o=r,a=n):(o=r,s=n,a=i);const l=s??co.active(),c=this.startSpan(e,o,l),u=bi.setSpan(l,c);return co.with(u,a,void 0,c)}getGeneralLimits(){return this._generalLimits}getSpanLimits(){return this._spanLimits}}class gwe{constructor(e){xe(this,"_spanProcessors");this._spanProcessors=e}forceFlush(){const e=[];for(const r of this._spanProcessors)e.push(r.forceFlush());return new Promise(r=>{Promise.all(e).then(()=>{r()}).catch(n=>{Od(n||new Error("MultiSpanProcessor: forceFlush failed")),r()})})}onStart(e,r){for(const n of this._spanProcessors)n.onStart(e,r)}onEnd(e){for(const r of this._spanProcessors)r.onEnd(e)}shutdown(){const e=[];for(const r of this._spanProcessors)e.push(r.shutdown());return new Promise((r,n)=>{Promise.all(e).then(()=>{r()},n)})}}var Ml;(function(t){t[t.resolved=0]="resolved",t[t.timeout=1]="timeout",t[t.error=2]="error",t[t.unresolved=3]="unresolved"})(Ml||(Ml={}));class ywe{constructor(e={}){xe(this,"_config");xe(this,"_tracers",new Map);xe(this,"_resource");xe(this,"_activeSpanProcessor");var i;const r=Jxe({},dG(),cwe(e));this._resource=r.resource??nwe(),this._config=Object.assign({},r,{resource:this._resource});const n=[];(i=e.spanProcessors)!=null&&i.length&&n.push(...e.spanProcessors),this._activeSpanProcessor=new gwe(n)}getTracer(e,r,n){const i=`${e}@${r||""}:${(n==null?void 0:n.schemaUrl)||""}`;return this._tracers.has(i)||this._tracers.set(i,new mwe({name:e,version:r,schemaUrl:n==null?void 0:n.schemaUrl},this._config,this._resource,this._activeSpanProcessor)),this._tracers.get(i)}forceFlush(){const e=this._config.forceFlushTimeoutMillis,r=this._activeSpanProcessor._spanProcessors.map(n=>new Promise(i=>{let o;const s=setTimeout(()=>{i(new Error(`Span processor did not completed within timeout period of ${e} ms`)),o=Ml.timeout},e);n.forceFlush().then(()=>{clearTimeout(s),o!==Ml.timeout&&(o=Ml.resolved,i(o))}).catch(a=>{clearTimeout(s),o=Ml.error,i(a)})}));return new Promise((n,i)=>{Promise.all(r).then(o=>{const s=o.filter(a=>a!==Ml.resolved);s.length>0?i(s):n()}).catch(o=>i([o]))})}shutdown(){return this._activeSpanProcessor.shutdown()}}class vwe{constructor(){xe(this,"_enabled",!1);xe(this,"_currentContext",fu)}_bindFunction(e=fu,r){const n=this,i=function(...o){return n.with(e,()=>r.apply(this,o))};return Object.defineProperty(i,"length",{enumerable:!1,configurable:!0,writable:!1,value:r.length}),i}active(){return this._currentContext}bind(e,r){return e===void 0&&(e=this.active()),typeof r=="function"?this._bindFunction(e,r):r}disable(){return this._currentContext=fu,this._enabled=!1,this}enable(){return this._enabled?this:(this._enabled=!0,this._currentContext=fu,this)}with(e,r,n,...i){const o=this._currentContext;this._currentContext=e||fu;try{return r.call(n,...i)}finally{this._currentContext=o}}}function bwe(t){if(t!==null){if(t===void 0){const e=new vwe;e.enable(),co.setGlobalContextManager(e);return}t.enable(),co.setGlobalContextManager(t)}}function Owe(t){if(t!==null){if(t===void 0){Dh.setGlobalPropagator(new Cxe({propagators:[new Vxe,new sxe]}));return}Dh.setGlobalPropagator(t)}}class xwe extends ywe{constructor(e={}){super(e)}register(e={}){bi.setGlobalTracerProvider(this),Owe(e.propagator),bwe(e.contextManager)}}class wwe{constructor(e){xe(this,"_delegate");this._delegate=e}export(e,r){this._delegate.export(e,r)}forceFlush(){return this._delegate.forceFlush()}shutdown(){return this._delegate.shutdown()}}class VN extends Error{constructor(r,n,i){super(r);xe(this,"code");xe(this,"name","OTLPExporterError");xe(this,"data");this.data=i,this.code=n}}function Swe(t){if(Number.isFinite(t)&&t>0)return t;throw new Error(`Configuration: timeoutMillis is invalid, expected number greater than 0 (actual: '${t}')`)}function Cwe(t){if(t!=null)return()=>t}function Pwe(t,e,r){return{timeoutMillis:Swe(t.timeoutMillis??e.timeoutMillis??r.timeoutMillis),concurrencyLimit:t.concurrencyLimit??e.concurrencyLimit??r.concurrencyLimit,compression:t.compression??e.compression??r.compression}}function kwe(){return{timeoutMillis:1e4,concurrencyLimit:30,compression:"none"}}class $we{constructor(e){xe(this,"_concurrencyLimit");xe(this,"_sendingPromises",[]);this._concurrencyLimit=e}pushPromise(e){if(this.hasReachedLimit())throw new Error("Concurrency Limit reached");this._sendingPromises.push(e);const r=()=>{const n=this._sendingPromises.indexOf(e);this._sendingPromises.splice(n,1)};e.then(r,r)}hasReachedLimit(){return this._sendingPromises.length>=this._concurrencyLimit}async awaitAll(){await Promise.all(this._sendingPromises)}}function Ewe(t){return new $we(t.concurrencyLimit)}function Awe(t){return Object.prototype.hasOwnProperty.call(t,"partialSuccess")}function Iwe(){return{handleResponse(t){t==null||!Awe(t)||t.partialSuccess==null||Object.keys(t.partialSuccess).length===0||jt.warn("Received Partial Success response:",JSON.stringify(t.partialSuccess))}}}class Twe{constructor(e,r,n,i,o){xe(this,"_transport");xe(this,"_serializer");xe(this,"_responseHandler");xe(this,"_promiseQueue");xe(this,"_timeout");xe(this,"_diagLogger");this._transport=e,this._serializer=r,this._responseHandler=n,this._promiseQueue=i,this._timeout=o,this._diagLogger=jt.createComponentLogger({namespace:"OTLPExportDelegate"})}export(e,r){if(this._diagLogger.debug("items to be sent",e),this._promiseQueue.hasReachedLimit()){r({code:qo.FAILED,error:new Error("Concurrent export limit reached")});return}const n=this._serializer.serializeRequest(e);if(n==null){r({code:qo.FAILED,error:new Error("Nothing to send")});return}this._promiseQueue.pushPromise(this._transport.send(n,this._timeout).then(i=>{if(i.status==="success"){if(i.data!=null)try{this._responseHandler.handleResponse(this._serializer.deserializeResponse(i.data))}catch(o){this._diagLogger.warn("Export succeeded but could not deserialize response - is the response specification compliant?",o,i.data)}r({code:qo.SUCCESS});return}else if(i.status==="failure"&&i.error){r({code:qo.FAILED,error:i.error});return}else i.status==="retryable"?r({code:qo.FAILED,error:new VN("Export failed with retryable status")}):r({code:qo.FAILED,error:new VN("Export failed with unknown error")})},i=>r({code:qo.FAILED,error:i})))}forceFlush(){return this._promiseQueue.awaitAll()}async shutdown(){this._diagLogger.debug("shutdown started"),await this.forceFlush(),this._transport.shutdown()}}function _we(t,e){return new Twe(t.transport,t.serializer,Iwe(),t.promiseHandler,e.timeout)}function hG(t,e,r){return _we({transport:r,serializer:e,promiseHandler:Ewe(t)},{timeout:t.timeoutMillis})}function zN(t){return t>=48&&t<=57?t-48:t>=97&&t<=102?t-87:t-55}function pG(t){const e=new Uint8Array(t.length/2);let r=0;for(let n=0;n<t.length;n+=2){const i=zN(t.charCodeAt(n)),o=zN(t.charCodeAt(n+1));e[r++]=i<<4|o}return e}function mG(t){const e=BigInt(1e9);return BigInt(t[0])*e+BigInt(t[1])}function Rwe(t){const e=Number(BigInt.asUintN(32,t)),r=Number(BigInt.asUintN(32,t>>BigInt(32)));return{low:e,high:r}}function jwe(t){const e=mG(t);return Rwe(e)}function Dwe(t){return mG(t).toString()}const Mwe=typeof BigInt<"u"?Dwe:Sxe;function BN(t){return t}function Nwe(t){if(t!==void 0)return pG(t)}const Lwe={encodeHrTime:jwe,encodeSpanContext:pG,encodeOptionalSpanContext:Nwe};function Qwe(t){return t===void 0?Lwe:{encodeHrTime:Mwe,encodeSpanContext:BN,encodeOptionalSpanContext:BN}}function Vwe(t){return{attributes:Fx(t.attributes),droppedAttributesCount:0}}function zwe(t){return{name:t.name,version:t.version}}function Fx(t){return Object.keys(t).map(e=>gG(e,t[e]))}function gG(t,e){return{key:t,value:yG(e)}}function yG(t){const 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(yG)}}:e==="object"&&t!=null?{kvlistValue:{values:Object.entries(t).map(([r,n])=>gG(r,n))}}:{}}function Bwe(t,e){var o,s,a;const r=t.spanContext(),n=t.status,i=(o=t.parentSpanContext)!=null&&o.spanId?e.encodeSpanContext((s=t.parentSpanContext)==null?void 0:s.spanId):void 0;return{traceId:e.encodeSpanContext(r.traceId),spanId:e.encodeSpanContext(r.spanId),parentSpanId:i,traceState:(a=r.traceState)==null?void 0:a.serialize(),name:t.name,kind:t.kind==null?0:t.kind+1,startTimeUnixNano:e.encodeHrTime(t.startTime),endTimeUnixNano:e.encodeHrTime(t.endTime),attributes:Fx(t.attributes),droppedAttributesCount:t.droppedAttributesCount,events:t.events.map(l=>Fwe(l,e)),droppedEventsCount:t.droppedEventsCount,status:{code:n.code,message:n.message},links:t.links.map(l=>qwe(l,e)),droppedLinksCount:t.droppedLinksCount}}function qwe(t,e){var r;return{attributes:t.attributes?Fx(t.attributes):[],spanId:e.encodeSpanContext(t.context.spanId),traceId:e.encodeSpanContext(t.context.traceId),traceState:(r=t.context.traceState)==null?void 0:r.serialize(),droppedAttributesCount:t.droppedAttributesCount||0}}function Fwe(t,e){return{attributes:t.attributes?Fx(t.attributes):[],name:t.name,timeUnixNano:e.encodeHrTime(t.time),droppedAttributesCount:t.droppedAttributesCount||0}}function Wwe(t,e){const r=Qwe(e);return{resourceSpans:Xwe(t,r)}}function Uwe(t){const e=new Map;for(const r of t){let n=e.get(r.resource);n||(n=new Map,e.set(r.resource,n));const i=`${r.instrumentationScope.name}@${r.instrumentationScope.version||""}:${r.instrumentationScope.schemaUrl||""}`;let o=n.get(i);o||(o=[],n.set(i,o)),o.push(r)}return e}function Xwe(t,e){const r=Uwe(t),n=[],i=r.entries();let o=i.next();for(;!o.done;){const[s,a]=o.value,l=[],c=a.values();let u=c.next();for(;!u.done;){const f=u.value;if(f.length>0){const h=f.map(m=>Bwe(m,e));l.push({scope:zwe(f[0].instrumentationScope),spans:h,schemaUrl:f[0].instrumentationScope.schemaUrl})}u=c.next()}const d={resource:Vwe(s),scopeSpans:l,schemaUrl:void 0};n.push(d),o=i.next()}return n}const Zwe={serializeRequest:t=>{const e=Wwe(t,{});return new TextEncoder().encode(JSON.stringify(e))},deserializeResponse:t=>{if(t.length===0)return{};const e=new TextDecoder;return JSON.parse(e.decode(t))}},Gwe=5,Ywe=1e3,Hwe=5e3,Jwe=1.5,qN=.2;function Kwe(){return Math.random()*(2*qN)-qN}class eSe{constructor(e){xe(this,"_transport");this._transport=e}retry(e,r,n){return new Promise((i,o)=>{setTimeout(()=>{this._transport.send(e,r).then(i,o)},n)})}async send(e,r){const n=Date.now()+r;let i=await this._transport.send(e,r),o=Gwe,s=Ywe;for(;i.status==="retryable"&&o>0;){o--;const a=Math.max(Math.min(s,Hwe)+Kwe(),0);s=s*Jwe;const l=i.retryInMillis??a,c=n-Date.now();if(l>c)return i;i=await this.retry(e,c,l)}return i}shutdown(){return this._transport.shutdown()}}function vG(t){return new eSe(t.transport)}function tSe(t){return[429,502,503,504].includes(t)}function rSe(t){if(t==null)return;const e=Number.parseInt(t,10);if(Number.isInteger(e))return e>0?e*1e3:-1;const r=new Date(t).getTime()-Date.now();return r>=0?r:0}class nSe{constructor(e){xe(this,"_parameters");this._parameters=e}send(e,r){return new Promise(n=>{const i=new XMLHttpRequest;i.timeout=r,i.open("POST",this._parameters.url);const o=this._parameters.headers();Object.entries(o).forEach(([s,a])=>{i.setRequestHeader(s,a)}),i.ontimeout=s=>{n({status:"failure",error:new Error("XHR request timed out")})},i.onreadystatechange=()=>{i.status>=200&&i.status<=299?(jt.debug("XHR success"),n({status:"success"})):i.status&&tSe(i.status)?n({status:"retryable",retryInMillis:rSe(i.getResponseHeader("Retry-After"))}):i.status!==0&&n({status:"failure",error:new Error("XHR request failed with non-retryable status")})},i.onabort=()=>{n({status:"failure",error:new Error("XHR request aborted")})},i.onerror=()=>{n({status:"failure",error:new Error("XHR request errored")})},i.send(e)})}shutdown(){}}function iSe(t){return new nSe(t)}class oSe{constructor(e){xe(this,"_params");this._params=e}send(e){return new Promise(r=>{navigator.sendBeacon(this._params.url,new Blob([e],{type:this._params.blobType}))?(jt.debug("SendBeacon success"),r({status:"success"})):r({status:"failure",error:new Error("SendBeacon failed")})})}shutdown(){}}function sSe(t){return new oSe(t)}function aSe(t,e){return hG(t,e,vG({transport:iSe(t)}))}function lSe(t,e){return hG(t,e,vG({transport:sSe({url:t.url,blobType:t.headers()["Content-Type"]})}))}function cSe(t){return()=>{const e={};return Object.entries((t==null?void 0:t())??{}).forEach(([r,n])=>{typeof n<"u"?e[r]=String(n):jt.warn(`Header "${r}" has invalid value (${n}) and will be ignored`)}),e}}function uSe(t,e,r){const n={...r()},i={};return()=>(e!=null&&Object.assign(i,e()),t!=null&&Object.assign(i,t()),Object.assign(i,n))}function dSe(t){if(t!=null)try{return new URL(t),t}catch{throw new Error(`Configuration: Could not parse user-provided export URL: '${t}'`)}}function fSe(t,e,r){return{...Pwe(t,e,r),headers:uSe(cSe(t.headers),e.headers,r.headers),url:dSe(t.url)??e.url??r.url,agentOptions:t.agentOptions??e.agentOptions??r.agentOptions}}function hSe(t,e){return{...kwe(),headers:()=>t,url:"http://localhost:4318/"+e,agentOptions:{keepAlive:!0}}}function pSe(t,e,r){return fSe({url:t.url,timeoutMillis:t.timeoutMillis,headers:Cwe(t.headers),concurrencyLimit:t.concurrencyLimit},{},hSe(r,e))}function mSe(t,e,r,n){const i=!!t.headers||typeof navigator.sendBeacon!="function",o=pSe(t,r,n);return i?aSe(o,e):lSe(o,e)}class gSe extends wwe{constructor(e={}){super(mSe(e,Zwe,"v1/traces",{"Content-Type":"application/json"}))}}class bG{emit(e){}}const ySe=new bG;class vSe{getLogger(e,r,n){return new bG}}const OG=new vSe;class bSe{constructor(e,r,n,i){this._provider=e,this.name=r,this.version=n,this.options=i}emit(e){this._getLogger().emit(e)}_getLogger(){if(this._delegate)return this._delegate;const e=this._provider.getDelegateLogger(this.name,this.version,this.options);return e?(this._delegate=e,this._delegate):ySe}}class FN{getLogger(e,r,n){var i;return(i=this.getDelegateLogger(e,r,n))!==null&&i!==void 0?i:new bSe(this,e,r,n)}getDelegate(){var e;return(e=this._delegate)!==null&&e!==void 0?e:OG}setDelegate(e){this._delegate=e}getDelegateLogger(e,r,n){var i;return(i=this._delegate)===null||i===void 0?void 0:i.getLogger(e,r,n)}}const OSe=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{},Ag=Symbol.for("io.opentelemetry.js.api.logs"),Cf=OSe;function xSe(t,e,r){return n=>n===t?e:r}const WN=1;class MI{constructor(){this._proxyLoggerProvider=new FN}static getInstance(){return this._instance||(this._instance=new MI),this._instance}setGlobalLoggerProvider(e){return Cf[Ag]?this.getLoggerProvider():(Cf[Ag]=xSe(WN,e,OG),this._proxyLoggerProvider.setDelegate(e),e)}getLoggerProvider(){var e,r;return(r=(e=Cf[Ag])===null||e===void 0?void 0:e.call(Cf,WN))!==null&&r!==void 0?r:this._proxyLoggerProvider}getLogger(e,r,n){return this.getLoggerProvider().getLogger(e,r,n)}disable(){delete Cf[Ag],this._proxyLoggerProvider=new FN}}const wSe=MI.getInstance();function SSe(t,e,r,n){for(let i=0,o=t.length;i<o;i++){const s=t[i];e&&s.setTracerProvider(e),r&&s.setMeterProvider(r),n&&s.setLoggerProvider&&s.setLoggerProvider(n),s.getConfig().enabled||s.enable()}}function CSe(t){t.forEach(e=>e.disable())}function PSe(t){var o;const e=t.tracerProvider||bi.getTracerProvider(),r=t.meterProvider||F0e.getMeterProvider(),n=t.loggerProvider||wSe.getLoggerProvider(),i=((o=t.instrumentations)==null?void 0:o.flat())??[];return SSe(i,e,r,n),()=>{CSe(i)}}class UN{constructor(e){xe(this,"span");this.span=e}error(e){this.span&&(this.span.setStatus(Cp.ERROR,e.message),this.span.recordException(e),this.span.end())}setAttribute(e,r){this.span&&this.span.setAttribute(e,r)}end(){this.span&&(this.span.setStatus(Cp.OK),this.span.end())}}class kSe{constructor(){xe(this,"config",null);xe(this,"tracer",null);xe(this,"tracerProvider",null);xe(this,"initialized",!1);xe(this,"getKeySnakeValue",e=>e.replace(/([A-Z])/g,"_$1").toLowerCase())}initTracer(e){throw new Error("initTracer must be implemented by the environment-specific client")}init(e){this.config=e,this.initTracer(e)}send(e){var r;try{if(!this.tracer||!this.config)return;const n=e.time?new Date(e.time):new Date;this.tracer.startSpan(`event.${e.type}`,{attributes:this.processAttributes(e,n),startTime:n}).end(n)}catch(n){(r=this.config)!=null&&r.isProd||console.error("Event reporting failed:",n)}}processAttributes(e,r){var o,s,a,l,c;const i={"cloudevents.event_id":YO(),"cloudevents.event_type":e.type,"cloudevents.event_source":e.source,"cloudevents.event_spec_version":e.specversion,"cloudevents.event_data_content_type":e.datacontenttype||"application/json; charset=utf-8","cloudevents.event_time":r.toISOString(),"cloudevents.event_subject":e.subject??"","cloudevents.page.uri":location.href,"cloudevents.event_version":(o=this.config)==null?void 0:o.version,"cloudevents.event_origin":(s=this.config)==null?void 0:s.serviceName,"cloudevents.event_source_details.id":((a=e.sourceDetails)==null?void 0:a.id)??"anonymous","cloudevents.event_source_details.object":((l=e.sourceDetails)==null?void 0:l.object)??"anonymous","cloudevents.event_source_details.uri":(c=e.sourceDetails)==null?void 0:c.uri};if(e.data&&typeof e.data=="object"&&Object.entries(e.data).forEach(([u,d])=>{const f=u.replace(/([A-Z])/g,"_$1").toLowerCase();d!==void 0&&(i[`cloudevents.event_data.${f}`]=d)}),"subjects"in e&&Array.isArray(e.subjects)){const u=e.subjects.reduce((d,f)=>{if(!f||typeof f!="object")return d;const h=f.object;if(!h||typeof h!="string")return d;const m=d.notUpdated.find(({object:p})=>p===h);return m?(d.updated=[m,f],d.notUpdated=d.notUpdated.filter(({object:p})=>p!==h)):d.updated.some(({object:p})=>p===h)||d.notUpdated.push(f),d},{updated:[],notUpdated:[]});u.updated.forEach((d,f)=>{const h=f===0?"after.":"before.",m=`${d.object}.`;Object.entries(d).forEach(([p,y])=>{y!==void 0&&(i[`cloudevents.subjects.${h}${m}${p}`]=y)})}),u.notUpdated.forEach(d=>{const f=`${d.object}.`;Object.entries(d).forEach(([h,m])=>{m!==void 0&&(i[`cloudevents.subjects.${f}${h}`]=m)})})}return Object.entries(e).forEach(([u,d])=>{["id","source","type","specversion","time","datacontenttype","data","subject","sourceDetails","analyticsMetadata","context"].includes(u)||d!==void 0&&(d instanceof Object?Object.entries(d).forEach(([f,h])=>{h!==void 0&&(i[`cloudevents.${u}.${f}`]=h)}):i[`cloudevents.${u}`]=d)}),i}startSpan(e,r){var n;try{if(!this.tracer)return;let i;const o=e.time?new Date(e.time):new Date,s=this.tracer.startSpan(`event.${e.type}`,{attributes:this.processAttributes(e,o),root:!r},r);return r||(i=bi.setSpan(co.active(),s)),{end:()=>s.end(),setAttribute:(a,l)=>{s.setAttribute(`cloudevents.event_data.${this.getKeySnakeValue(a)}`,l)},setStatus:(a,l)=>s.setStatus({code:a,message:l}),parentCtx:i}}catch(i){(n=this.config)!=null&&n.isProd||console.error("Event reporting failed:",i)}}startStepSpan(e){var r;try{if(!this.tracer)return;const n=e.time?new Date(e.time):new Date,i=this.tracer.startSpan(`event.${e.type}`,{attributes:this.processAttributes(e,n),root:!1},co.active());return{end:()=>i.end(),setAttribute:(o,s)=>{i.setAttribute(`cloudevents.event_data.${this.getKeySnakeValue(o)}`,s)},setStatus:(o,s)=>i.setStatus({code:o,message:s}),recordException:o=>i.recordException(o)}}catch(n){(r=this.config)!=null&&r.isProd||console.error("Event reporting failed:",n)}}startRootSpan(e){var r;try{if(!this.tracer)return;const n=e.time?new Date(e.time):new Date,i=this.tracer.startSpan(`event.${e.type}`,{attributes:this.processAttributes(e,n)},co.active()),o=bi.setSpan(co.active(),i);return{end:()=>i.end(),setAttribute:(s,a)=>{i.setAttribute(`cloudevents.event_data.${this.getKeySnakeValue(s)}`,a)},setStatus:(s,a)=>i.setStatus({code:s,message:a}),recordException:s=>i.recordException(s),context:o}}catch(n){(r=this.config)!=null&&r.isProd||console.error("Event reporting failed:",n)}}startTrace(e){const r=this.startStepSpan(e);if(r)return new UN(r)}startRootTrace(e){const r=this.startRootSpan(e);if(r)return{traceApi:new UN(r),context:r.context}}async forceFlush(){var e;return(e=this.tracerProvider)==null?void 0:e.forceFlush()}}class $Se extends kSe{constructor(){super();xe(this,"tracerProvider",null);xe(this,"tracer",null);xe(this,"initialized",!1)}initTracer(r){if(!r.collectorUrl&&!r.collectorTraceUrl)return;const n=`ses_${YO()}`,i=uG({[eG]:r.serviceName,[mxe]:r.serviceVersion,session_id:n}),o=r.collectorTraceUrl||`${r.collectorUrl}/v1/traces`;this.tracerProvider=new xwe({resource:i,spanProcessors:[new dwe(new gSe({url:o,headers:{}}))]}),this.tracer=this.tracerProvider.getTracer(r.tracerName),this.tracerProvider.register(),PSe({instrumentations:r.instrumentations??[]}),this.initialized=!0}}class ESe{constructor(){xe(this,"config",null);xe(this,"initialized",!1);xe(this,"useCloudEventData");xe(this,"otelClient");xe(this,"traceApi");xe(this,"updateCloudEventData",e=>{var r;(r=this.config)!=null&&r.disabled||(this.useCloudEventData=e)});this.useCloudEventData=()=>({organization:{id:"",slug:""},project:{id:"",slug:""},productType:"",sourceDetails:{user:"Anonymous",object:"user",uri:""},request:{source:""}}),this.otelClient=new $Se,this.traceApi={startStep:(e,r)=>{const n=this.constructCloudEvent(e,r);return this.otelClient.startTrace(n)},startRoot:(e,r)=>{const n=this.constructCloudEvent(e,r);return this.otelClient.startRootTrace(n)}}}send(e,r){var n,i;try{if(!((n=this.config)!=null&&n.otel.isProd))return;const o=this.constructCloudEvent(e,r);this.sendToOtelService(o)}catch(o){(i=this.config)!=null&&i.otel.isProd||console.error("Event reporting failed:",o)}}init(e){e.disabled||this.initialized||(this.config=e,this.initialized=!0,this.otelClient.init({serviceVersion:e.otel.serviceVersion,version:e.otel.version,isProd:e.otel.isProd,collectorUrl:e.otel.collectorUrl,collectorTraceUrl:e.otel.collectorTraceUrl,serviceName:e.otel.serviceName,tracerName:e.otel.tracerName,instrumentations:[...e.otel.instrumentations||[]]}))}startSpan(e,r,n){var o;if((o=this.config)!=null&&o.disabled)return;const i=this.constructCloudEvent(e,r);return this.otelClient.startSpan(i,n)}startStepSpan(e,r){const n=this.constructCloudEvent(e,r);return this.otelClient.startStepSpan(n)}constructCloudEvent(e,r){const n=this.useCloudEventData();return{id:`evt_${YO()}`,type:e,source:n.request.source||"",specversion:"1.0",datacontenttype:"application/json",time:new Date().toISOString(),data:r,origin:"ui",sourceDetails:{id:n.sourceDetails.user||`usr_${YO()}`,object:n.sourceDetails.object||"user",uri:n.sourceDetails.uri||""},organization:n.organization,project:n.project,productType:n.productType}}sendToOtelService(e){var r;(r=this.config)!=null&&r.otel.isProd||console.log("CloudEvent to be sent to OTEL service:",e),this.otelClient.send(e)}forceFlush(){var e;return(e=this.config)!=null&&e.disabled?Promise.resolve():this.otelClient.forceFlush()}sendTabChangeMessage(e){this.send("tab.change",e)}sendButtonClickMessage(e){this.send("button.click",e)}sendChangeMessage(e){this.send("change",e)}sendContentCopyMessage(e){this.send("content.copy",e)}sendUrlClickMessage(e){this.send("url.click",e)}sendRequestSendMessage(e){this.send("request.send",e)}sendTokenGenerateMessage(e){this.send("token.generate",e)}sendAppLifecycleMessage(e){this.send("app.lifecycle",e)}sendEnvironmentManagementMessage(e){this.send("environment.management",e)}sendServerManagementMessage(e){this.send("server.management",e)}sendInputManagementMessage(e){this.send("input.management",e)}sendNodeManagementMessage(e){this.send("node.management",e)}sendHistoryManagementMessage(e){this.send("history.management",e)}sendCredentialManagementMessage(e){this.send("credential.management",e)}sendPanelToggleMessage(e){this.send("panel.toggle",e)}sendWorkflowRunClickMessage(e){this.send("workflow.run.click",e)}sendWorkflowRunResultMessage(e){this.send("workflow.run.result",e)}}function ASe(){return{theme:"light",disableCollectionsTab:!1,oAuth2RedirectURI:null,corsProxyUrl:void 0,mockServer:void 0,certificates:[],isApiBased:!1,generatedEnvironments:[],generatedInputs:[]}}const ISe=ASe(),TSe=N.createContext(ISe);function ys(){const t=N.useContext(TSe);return F5(t)}function _Se(t,e){const{apps:{apiId:r}}=Et(),{corsProxyUrl:n,disableCollectionsTab:i,mockServer:o,oAuth2RedirectURI:s,certificates:a,storageKey:l,isApiBased:c}=ys();n.set((t==null?void 0:t.corsProxyUrl)??Wre),o.set(t==null?void 0:t.mockServer),r.set(t==null?void 0:t.apiId),s.set(t==null?void 0:t.oAuth2RedirectURI),i.set(!!(t!=null&&t.disableCollectionsTab)),l.set(t==null?void 0:t.storageKey),c.set(!!e),N.useEffect(()=>{a.set((t==null?void 0:t.certificates)||[])},[t==null?void 0:t.certificates])}const Wx=N.createContext({});function NI(){return N.useContext(Wx)||{}}const RSe="0.0.0-20251009123334",jSe={version:RSe};class DSe{constructor(){xe(this,"client");xe(this,"_isInitialized",!1);this.client=new ESe}get isInitialized(){return this._isInitialized}init(e){if(this.isInitialized)return;const n={serviceName:"replay",serviceVersion:jSe.version,version:"1.0.0",tracerName:(e==null?void 0:e.tracerName)||"desktop",collectorUrl:(e==null?void 0:e.collectorUrl)||"",isProd:!0};this.client.init({otel:{...n,...e}}),this._isInitialized=!0}sendEvent(e,r){if(!this.isInitialized){console.warn("Telemetry client not initialized. Call init() first.");return}try{this.client.send(e,r)}catch(n){console.error("Failed to send telemetry event:",n)}}}const A1=new DSe;function vt(){const{telemetry:t}=NI();return A1.isInitialized||A1.init({tracerName:t==null?void 0:t.tracerName,collectorUrl:t==null?void 0:t.collectorUrl}),{sendEvent:(e,r)=>{A1.sendEvent(e,r)}}}const Ln=800;var MSe=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function NSe(t){var e=t.defaultInputValue,r=e===void 0?"":e,n=t.defaultMenuIsOpen,i=n===void 0?!1:n,o=t.defaultValue,s=o===void 0?null:o,a=t.inputValue,l=t.menuIsOpen,c=t.onChange,u=t.onInputChange,d=t.onMenuClose,f=t.onMenuOpen,h=t.value,m=ki(t,MSe),p=N.useState(a!==void 0?a:r),y=Ot(p,2),v=y[0],b=y[1],O=N.useState(l!==void 0?l:i),w=Ot(O,2),x=w[0],S=w[1],P=N.useState(h!==void 0?h:s),I=Ot(P,2),E=I[0],M=I[1],V=N.useCallback(function(ie,he){typeof c=="function"&&c(ie,he),M(ie)},[c]),U=N.useCallback(function(ie,he){var L;typeof u=="function"&&(L=u(ie,he)),b(L!==void 0?L:ie)},[u]),X=N.useCallback(function(){typeof f=="function"&&f(),S(!0)},[f]),J=N.useCallback(function(){typeof d=="function"&&d(),S(!1)},[d]),te=a!==void 0?a:v,oe=l!==void 0?l:x,ae=h!==void 0?h:E;return $e($e({},m),{},{inputValue:te,menuIsOpen:oe,onChange:V,onInputChange:U,onMenuClose:J,onMenuOpen:X,value:ae})}function LSe(t){if(t.sheet)return t.sheet;for(var e=0;e<document.styleSheets.length;e++)if(document.styleSheets[e].ownerNode===t)return document.styleSheets[e]}function QSe(t){var e=document.createElement("style");return e.setAttribute("data-emotion",t.key),t.nonce!==void 0&&e.setAttribute("nonce",t.nonce),e.appendChild(document.createTextNode("")),e.setAttribute("data-s",""),e}var VSe=(function(){function t(r){var n=this;this._insertTag=function(i){var o;n.tags.length===0?n.insertionPoint?o=n.insertionPoint.nextSibling:n.prepend?o=n.container.firstChild:o=n.before:o=n.tags[n.tags.length-1].nextSibling,n.container.insertBefore(i,o),n.tags.push(i)},this.isSpeedy=r.speedy===void 0?process.env.NODE_ENV==="production":r.speedy,this.tags=[],this.ctr=0,this.nonce=r.nonce,this.key=r.key,this.container=r.container,this.prepend=r.prepend,this.insertionPoint=r.insertionPoint,this.before=null}var e=t.prototype;return e.hydrate=function(n){n.forEach(this._insertTag)},e.insert=function(n){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(QSe(this));var i=this.tags[this.tags.length-1];if(process.env.NODE_ENV!=="production"){var o=n.charCodeAt(0)===64&&n.charCodeAt(1)===105;o&&this._alreadyInsertedOrderInsensitiveRule&&console.error(`You're attempting to insert the following rule:
|
|
350
350
|
`+n+"\n\n`@import` rules must be before all other types of rules in a stylesheet but other rules have already been inserted. Please ensure that `@import` rules are before all other rules."),this._alreadyInsertedOrderInsensitiveRule=this._alreadyInsertedOrderInsensitiveRule||!o}if(this.isSpeedy){var s=LSe(i);try{s.insertRule(n,s.cssRules.length)}catch(a){process.env.NODE_ENV!=="production"&&!/:(-moz-placeholder|-moz-focus-inner|-moz-focusring|-ms-input-placeholder|-moz-read-write|-moz-read-only|-ms-clear|-ms-expand|-ms-reveal){/.test(n)&&console.error('There was a problem inserting the following rule: "'+n+'"',a)}}else i.appendChild(document.createTextNode(n));this.ctr++},e.flush=function(){this.tags.forEach(function(n){return n.parentNode&&n.parentNode.removeChild(n)}),this.tags=[],this.ctr=0,process.env.NODE_ENV!=="production"&&(this._alreadyInsertedOrderInsensitiveRule=!1)},t})(),dn="-ms-",r0="-moz-",Rt="-webkit-",LI="comm",QI="rule",VI="decl",zSe="@import",xG="@keyframes",BSe=Math.abs,Ux=String.fromCharCode,qSe=Object.assign;function FSe(t,e){return rn(t,0)^45?(((e<<2^rn(t,0))<<2^rn(t,1))<<2^rn(t,2))<<2^rn(t,3):0}function wG(t){return t.trim()}function WSe(t,e){return(t=e.exec(t))?t[0]:t}function zt(t,e,r){return t.replace(e,r)}function H$(t,e){return t.indexOf(e)}function rn(t,e){return t.charCodeAt(e)|0}function Pp(t,e,r){return t.slice(e,r)}function Uo(t){return t.length}function zI(t){return t.length}function Ig(t,e){return e.push(t),t}function USe(t,e){return t.map(e).join("")}var Xx=1,wd=1,SG=0,oi=0,Ir=0,Bd="";function Zx(t,e,r,n,i,o,s){return{value:t,root:e,parent:r,type:n,props:i,children:o,line:Xx,column:wd,length:s,return:""}}function Pf(t,e){return qSe(Zx("",null,null,"",null,null,0),t,{length:-t.length},e)}function XSe(){return Ir}function ZSe(){return Ir=oi>0?rn(Bd,--oi):0,wd--,Ir===10&&(wd=1,Xx--),Ir}function Pi(){return Ir=oi<SG?rn(Bd,oi++):0,wd++,Ir===10&&(wd=1,Xx++),Ir}function as(){return rn(Bd,oi)}function gb(){return oi}function em(t,e){return Pp(Bd,t,e)}function kp(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function CG(t){return Xx=wd=1,SG=Uo(Bd=t),oi=0,[]}function PG(t){return Bd="",t}function yb(t){return wG(em(oi-1,J$(t===91?t+2:t===40?t+1:t)))}function GSe(t){for(;(Ir=as())&&Ir<33;)Pi();return kp(t)>2||kp(Ir)>3?"":" "}function YSe(t,e){for(;--e&&Pi()&&!(Ir<48||Ir>102||Ir>57&&Ir<65||Ir>70&&Ir<97););return em(t,gb()+(e<6&&as()==32&&Pi()==32))}function J$(t){for(;Pi();)switch(Ir){case t:return oi;case 34:case 39:t!==34&&t!==39&&J$(Ir);break;case 40:t===41&&J$(t);break;case 92:Pi();break}return oi}function HSe(t,e){for(;Pi()&&t+Ir!==57;)if(t+Ir===84&&as()===47)break;return"/*"+em(e,oi-1)+"*"+Ux(t===47?t:Pi())}function JSe(t){for(;!kp(as());)Pi();return em(t,oi)}function KSe(t){return PG(vb("",null,null,null,[""],t=CG(t),0,[0],t))}function vb(t,e,r,n,i,o,s,a,l){for(var c=0,u=0,d=s,f=0,h=0,m=0,p=1,y=1,v=1,b=0,O="",w=i,x=o,S=n,P=O;y;)switch(m=b,b=Pi()){case 40:if(m!=108&&rn(P,d-1)==58){H$(P+=zt(yb(b),"&","&\f"),"&\f")!=-1&&(v=-1);break}case 34:case 39:case 91:P+=yb(b);break;case 9:case 10:case 13:case 32:P+=GSe(m);break;case 92:P+=YSe(gb()-1,7);continue;case 47:switch(as()){case 42:case 47:Ig(e1e(HSe(Pi(),gb()),e,r),l);break;default:P+="/"}break;case 123*p:a[c++]=Uo(P)*v;case 125*p:case 59:case 0:switch(b){case 0:case 125:y=0;case 59+u:h>0&&Uo(P)-d&&Ig(h>32?ZN(P+";",n,r,d-1):ZN(zt(P," ","")+";",n,r,d-2),l);break;case 59:P+=";";default:if(Ig(S=XN(P,e,r,c,u,i,a,O,w=[],x=[],d),o),b===123)if(u===0)vb(P,e,S,S,w,o,d,a,x);else switch(f===99&&rn(P,3)===110?100:f){case 100:case 109:case 115:vb(t,S,S,n&&Ig(XN(t,S,S,0,0,i,a,O,i,w=[],d),x),i,x,d,a,n?w:x);break;default:vb(P,S,S,S,[""],x,0,a,x)}}c=u=h=0,p=v=1,O=P="",d=s;break;case 58:d=1+Uo(P),h=m;default:if(p<1){if(b==123)--p;else if(b==125&&p++==0&&ZSe()==125)continue}switch(P+=Ux(b),b*p){case 38:v=u>0?1:(P+="\f",-1);break;case 44:a[c++]=(Uo(P)-1)*v,v=1;break;case 64:as()===45&&(P+=yb(Pi())),f=as(),u=d=Uo(O=P+=JSe(gb())),b++;break;case 45:m===45&&Uo(P)==2&&(p=0)}}return o}function XN(t,e,r,n,i,o,s,a,l,c,u){for(var d=i-1,f=i===0?o:[""],h=zI(f),m=0,p=0,y=0;m<n;++m)for(var v=0,b=Pp(t,d+1,d=BSe(p=s[m])),O=t;v<h;++v)(O=wG(p>0?f[v]+" "+b:zt(b,/&\f/g,f[v])))&&(l[y++]=O);return Zx(t,e,r,i===0?QI:a,l,c,u)}function e1e(t,e,r){return Zx(t,e,r,LI,Ux(XSe()),Pp(t,2,-2),0)}function ZN(t,e,r,n){return Zx(t,e,r,VI,Pp(t,0,n),Pp(t,n+1,-1),n)}function Bu(t,e){for(var r="",n=zI(t),i=0;i<n;i++)r+=e(t[i],i,t,e)||"";return r}function t1e(t,e,r,n){switch(t.type){case zSe:case VI:return t.return=t.return||t.value;case LI:return"";case xG:return t.return=t.value+"{"+Bu(t.children,n)+"}";case QI:t.value=t.props.join(",")}return Uo(r=Bu(t.children,n))?t.return=t.value+"{"+r+"}":""}function r1e(t){var e=zI(t);return function(r,n,i,o){for(var s="",a=0;a<e;a++)s+=t[a](r,n,i,o)||"";return s}}function n1e(t){return function(e){e.root||(e=e.return)&&t(e)}}function i1e(t){var e=Object.create(null);return function(r){return e[r]===void 0&&(e[r]=t(r)),e[r]}}var o1e=function(e,r,n){for(var i=0,o=0;i=o,o=as(),i===38&&o===12&&(r[n]=1),!kp(o);)Pi();return em(e,oi)},s1e=function(e,r){var n=-1,i=44;do switch(kp(i)){case 0:i===38&&as()===12&&(r[n]=1),e[n]+=o1e(oi-1,r,n);break;case 2:e[n]+=yb(i);break;case 4:if(i===44){e[++n]=as()===58?"&\f":"",r[n]=e[n].length;break}default:e[n]+=Ux(i)}while(i=Pi());return e},a1e=function(e,r){return PG(s1e(CG(e),r))},GN=new WeakMap,l1e=function(e){if(!(e.type!=="rule"||!e.parent||e.length<1)){for(var r=e.value,n=e.parent,i=e.column===n.column&&e.line===n.line;n.type!=="rule";)if(n=n.parent,!n)return;if(!(e.props.length===1&&r.charCodeAt(0)!==58&&!GN.get(n))&&!i){GN.set(e,!0);for(var o=[],s=a1e(r,o),a=n.props,l=0,c=0;l<s.length;l++)for(var u=0;u<a.length;u++,c++)e.props[c]=o[l]?s[l].replace(/&\f/g,a[u]):a[u]+" "+s[l]}}},c1e=function(e){if(e.type==="decl"){var r=e.value;r.charCodeAt(0)===108&&r.charCodeAt(2)===98&&(e.return="",e.value="")}},u1e="emotion-disable-server-rendering-unsafe-selector-warning-please-do-not-use-this-the-warning-exists-for-a-reason",d1e=function(e){return e.type==="comm"&&e.children.indexOf(u1e)>-1},f1e=function(e){return function(r,n,i){if(!(r.type!=="rule"||e.compat)){var o=r.value.match(/(:first|:nth|:nth-last)-child/g);if(o){for(var s=r.parent===i[0],a=s?i[0].children:i,l=a.length-1;l>=0;l--){var c=a[l];if(c.line<r.line)break;if(c.column<r.column){if(d1e(c))return;break}}o.forEach(function(u){console.error('The pseudo class "'+u+'" is potentially unsafe when doing server-side rendering. Try changing it to "'+u.split("-child")[0]+'-of-type".')})}}}},kG=function(e){return e.type.charCodeAt(1)===105&&e.type.charCodeAt(0)===64},h1e=function(e,r){for(var n=e-1;n>=0;n--)if(!kG(r[n]))return!0;return!1},YN=function(e){e.type="",e.value="",e.return="",e.children="",e.props=""},p1e=function(e,r,n){kG(e)&&(e.parent?(console.error("`@import` rules can't be nested inside other rules. Please move it to the top level and put it before regular rules. Keep in mind that they can only be used within global styles."),YN(e)):h1e(r,n)&&(console.error("`@import` rules can't be after other rules. Please put your `@import` rules before your other rules."),YN(e)))};function $G(t,e){switch(FSe(t,e)){case 5103:return Rt+"print-"+t+t;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return Rt+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return Rt+t+r0+t+dn+t+t;case 6828:case 4268:return Rt+t+dn+t+t;case 6165:return Rt+t+dn+"flex-"+t+t;case 5187:return Rt+t+zt(t,/(\w+).+(:[^]+)/,Rt+"box-$1$2"+dn+"flex-$1$2")+t;case 5443:return Rt+t+dn+"flex-item-"+zt(t,/flex-|-self/,"")+t;case 4675:return Rt+t+dn+"flex-line-pack"+zt(t,/align-content|flex-|-self/,"")+t;case 5548:return Rt+t+dn+zt(t,"shrink","negative")+t;case 5292:return Rt+t+dn+zt(t,"basis","preferred-size")+t;case 6060:return Rt+"box-"+zt(t,"-grow","")+Rt+t+dn+zt(t,"grow","positive")+t;case 4554:return Rt+zt(t,/([^-])(transform)/g,"$1"+Rt+"$2")+t;case 6187:return zt(zt(zt(t,/(zoom-|grab)/,Rt+"$1"),/(image-set)/,Rt+"$1"),t,"")+t;case 5495:case 3959:return zt(t,/(image-set\([^]*)/,Rt+"$1$`$1");case 4968:return zt(zt(t,/(.+:)(flex-)?(.*)/,Rt+"box-pack:$3"+dn+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Rt+t+t;case 4095:case 3583:case 4068:case 2532:return zt(t,/(.+)-inline(.+)/,Rt+"$1$2")+t;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Uo(t)-1-e>6)switch(rn(t,e+1)){case 109:if(rn(t,e+4)!==45)break;case 102:return zt(t,/(.+:)(.+)-([^]+)/,"$1"+Rt+"$2-$3$1"+r0+(rn(t,e+3)==108?"$3":"$2-$3"))+t;case 115:return~H$(t,"stretch")?$G(zt(t,"stretch","fill-available"),e)+t:t}break;case 4949:if(rn(t,e+1)!==115)break;case 6444:switch(rn(t,Uo(t)-3-(~H$(t,"!important")&&10))){case 107:return zt(t,":",":"+Rt)+t;case 101:return zt(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Rt+(rn(t,14)===45?"inline-":"")+"box$3$1"+Rt+"$2$3$1"+dn+"$2box$3")+t}break;case 5936:switch(rn(t,e+11)){case 114:return Rt+t+dn+zt(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return Rt+t+dn+zt(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return Rt+t+dn+zt(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return Rt+t+dn+t+t}return t}var m1e=function(e,r,n,i){if(e.length>-1&&!e.return)switch(e.type){case VI:e.return=$G(e.value,e.length);break;case xG:return Bu([Pf(e,{value:zt(e.value,"@","@"+Rt)})],i);case QI:if(e.length)return USe(e.props,function(o){switch(WSe(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Bu([Pf(e,{props:[zt(o,/:(read-\w+)/,":"+r0+"$1")]})],i);case"::placeholder":return Bu([Pf(e,{props:[zt(o,/:(plac\w+)/,":"+Rt+"input-$1")]}),Pf(e,{props:[zt(o,/:(plac\w+)/,":"+r0+"$1")]}),Pf(e,{props:[zt(o,/:(plac\w+)/,dn+"input-$1")]})],i)}return""})}},g1e=[m1e],y1e=function(e){var r=e.key;if(process.env.NODE_ENV!=="production"&&!r)throw new Error(`You have to configure \`key\` for your cache. Please make sure it's unique (and not equal to 'css') as it's used for linking styles to your cache.
|
|
351
351
|
If multiple caches share the same key they might "fight" for each other's style elements.`);if(r==="css"){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(p){var y=p.getAttribute("data-emotion");y.indexOf(" ")!==-1&&(document.head.appendChild(p),p.setAttribute("data-s",""))})}var i=e.stylisPlugins||g1e;if(process.env.NODE_ENV!=="production"&&/[^a-z-]/.test(r))throw new Error('Emotion key must only contain lower case alphabetical characters and - but "'+r+'" was passed');var o={},s,a=[];s=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+r+' "]'),function(p){for(var y=p.getAttribute("data-emotion").split(" "),v=1;v<y.length;v++)o[y[v]]=!0;a.push(p)});var l,c=[l1e,c1e];process.env.NODE_ENV!=="production"&&c.push(f1e({get compat(){return m.compat}}),p1e);{var u,d=[t1e,process.env.NODE_ENV!=="production"?function(p){p.root||(p.return?u.insert(p.return):p.value&&p.type!==LI&&u.insert(p.value+"{}"))}:n1e(function(p){u.insert(p)})],f=r1e(c.concat(i,d)),h=function(y){return Bu(KSe(y),f)};l=function(y,v,b,O){u=b,process.env.NODE_ENV!=="production"&&v.map!==void 0&&(u={insert:function(x){b.insert(x+v.map)}}),h(y?y+"{"+v.styles+"}":v.styles),O&&(m.inserted[v.name]=!0)}}var m={key:r,sheet:new VSe({key:r,container:s,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:o,registered:{},insert:l};return m.sheet.hydrate(a),m},v1e=!0;function EG(t,e,r){var n="";return r.split(" ").forEach(function(i){t[i]!==void 0?e.push(t[i]+";"):n+=i+" "}),n}var BI=function(e,r,n){var i=e.key+"-"+r.name;(n===!1||v1e===!1)&&e.registered[i]===void 0&&(e.registered[i]=r.styles)},qI=function(e,r,n){BI(e,r,n);var i=e.key+"-"+r.name;if(e.inserted[r.name]===void 0){var o=r;do e.insert(r===o?"."+i:"",o,e.sheet,!0),o=o.next;while(o!==void 0)}};function b1e(t){for(var e=0,r,n=0,i=t.length;i>=4;++n,i-=4)r=t.charCodeAt(n)&255|(t.charCodeAt(++n)&255)<<8|(t.charCodeAt(++n)&255)<<16|(t.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,e=(r&65535)*1540483477+((r>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(i){case 3:e^=(t.charCodeAt(n+2)&255)<<16;case 2:e^=(t.charCodeAt(n+1)&255)<<8;case 1:e^=t.charCodeAt(n)&255,e=(e&65535)*1540483477+((e>>>16)*59797<<16)}return e^=e>>>13,e=(e&65535)*1540483477+((e>>>16)*59797<<16),((e^e>>>15)>>>0).toString(36)}var O1e={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},HN=`You have illegal escape sequence in your template literal, most likely inside content's property value.
|
|
352
352
|
Because you write your CSS inside a JavaScript string you actually have to do double escaping, so for example "content: '\\00d7';" should become "content: '\\\\00d7';".
|
|
@@ -1463,7 +1463,7 @@ Please report this to https://github.com/markedjs/marked.`,t){const i="<p>An err
|
|
|
1463
1463
|
&:hover {
|
|
1464
1464
|
background-color: var(--bg-color-hover);
|
|
1465
1465
|
}
|
|
1466
|
-
`;function nje({step:t}){function e(r){t.description.set(r.target.value)}return g.jsx(g.Fragment,{children:g.jsxs(y7,{children:[g.jsxs(Qa,{children:[g.jsx(gE,{name:g.jsxs(g.Fragment,{children:["Step ID",g.jsx(es,{tooltipProps:{content:"This step's unique identifier",placement:"right"}})]}),editorTitle:"Change step ID",attribute:t.stepId}),g.jsx(GRe,{step:t})]}),g.jsxs(Qa,{children:[g.jsxs(Cd,{children:["Description",g.jsx(es,{tooltipProps:{content:"A brief explanation of the purpose and function of this step in workflow.",placement:"right"}})]}),g.jsx(v7,{"data-testid":"step-description-input",rows:3,value:t.description.get()||"",onChange:e})]}),g.jsx(Qa,{children:g.jsx(b7,{outputs:t.outputs,tooltipText:"Data generated in this step that can be used in the next steps."})}),g.jsx(Qa,{children:g.jsx(LRe,{successCriteria:t.successCriteria})})]})})}function ije({onParameterChange:t,files:e}){const r=N.useRef(null),n=a=>{var l;(l=a.target.files)!=null&&l.length&&t(Array.from(a.target.files).map(c=>({absolutePath:null,file:c})))},i=async()=>{var a;if(zd())try{const{open:l}=await Promise.resolve().then(()=>require("./replay-index-
|
|
1466
|
+
`;function nje({step:t}){function e(r){t.description.set(r.target.value)}return g.jsx(g.Fragment,{children:g.jsxs(y7,{children:[g.jsxs(Qa,{children:[g.jsx(gE,{name:g.jsxs(g.Fragment,{children:["Step ID",g.jsx(es,{tooltipProps:{content:"This step's unique identifier",placement:"right"}})]}),editorTitle:"Change step ID",attribute:t.stepId}),g.jsx(GRe,{step:t})]}),g.jsxs(Qa,{children:[g.jsxs(Cd,{children:["Description",g.jsx(es,{tooltipProps:{content:"A brief explanation of the purpose and function of this step in workflow.",placement:"right"}})]}),g.jsx(v7,{"data-testid":"step-description-input",rows:3,value:t.description.get()||"",onChange:e})]}),g.jsx(Qa,{children:g.jsx(b7,{outputs:t.outputs,tooltipText:"Data generated in this step that can be used in the next steps."})}),g.jsx(Qa,{children:g.jsx(LRe,{successCriteria:t.successCriteria})})]})})}function ije({onParameterChange:t,files:e}){const r=N.useRef(null),n=a=>{var l;(l=a.target.files)!=null&&l.length&&t(Array.from(a.target.files).map(c=>({absolutePath:null,file:c})))},i=async()=>{var a;if(zd())try{const{open:l}=await Promise.resolve().then(()=>require("./replay-index-JNXmVopJ.js")),c=await l({multiple:!0});if(!c)return;const d=(Array.isArray(c)?c:[c]).map(Gp),h=(await Promise.all(d)).filter(m=>m!==null);t(h)}catch(l){console.error("Failed to open file dialog or read file:",l)}else(a=r.current)==null||a.click()},o=N.useCallback(()=>{t(null)},[t]),s=N.useMemo(()=>{if(!e)return null;if(e.length===1)return g.jsx(NQ,{icon:g.jsx(q.CloseIcon,{}),variant:"secondary",onClick:o,iconPosition:"right",size:"small",children:g.jsx(LQ,{children:e[0].file.name})});if(e.length>1)return g.jsx(NQ,{icon:g.jsx(q.CloseIcon,{}),variant:"secondary",onClick:o,iconPosition:"right",size:"small",children:g.jsxs(LQ,{children:[e.length," files"]})})},[e,o]);return g.jsx(oje,{children:g.jsxs(sje,{children:[g.jsx(aje,{children:s||g.jsx(cje,{children:"Add files here"})}),g.jsxs(lje,{children:[g.jsx($ke,{onClick:i,variant:"text","data-testid":"add-button",icon:g.jsx(q.AddIcon,{color:"--text-color-secondary"})}),g.jsx("input",{"data-testid":"file-input",hidden:!0,ref:r,type:"file",multiple:!0,accept:"files/*",onChange:n})]})]})})}const oje=R.div`
|
|
1467
1467
|
position: relative;
|
|
1468
1468
|
display: flex;
|
|
1469
1469
|
flex-grow: 1;
|
|
@@ -1588,7 +1588,7 @@ Please report this to https://github.com/markedjs/marked.`,t){const i="<p>An err
|
|
|
1588
1588
|
`,Sje=R.div`
|
|
1589
1589
|
display: flex;
|
|
1590
1590
|
justify-content: center;
|
|
1591
|
-
`;function Cje({data:t,type:e,editable:r}){const n=rr(),i=t[e];function o(a,l){l&&i.merge([Zl()])}function s(a){i[a].set(it)}return g.jsx(dje,{keyName:"Param",formElements:i,onParameterChange:o,environment:n,enableInputTypeSelection:e!==On["application/x-www-form-urlencoded"],editable:r,actions:a=>g.jsx(sn,{onClick:()=>s(a),variant:"text",icon:g.jsx(q.TrashCanIcon,{})})})}const Pje=({data:t})=>{var c,u;const e=t.get(),[r,n]=N.useState(!1),i=N.useRef(null),o=d=>{var h;const f=(h=d.target.files)==null?void 0:h[0];if(f){n(!0);const m=new FileReader;m.onload=()=>{n(!1),t.set({absolutePath:null,file:f})},m.readAsDataURL(f)}},s=async d=>{var f;if(d==null||d.preventDefault(),zd())try{const{open:h}=await Promise.resolve().then(()=>require("./replay-index-
|
|
1591
|
+
`;function Cje({data:t,type:e,editable:r}){const n=rr(),i=t[e];function o(a,l){l&&i.merge([Zl()])}function s(a){i[a].set(it)}return g.jsx(dje,{keyName:"Param",formElements:i,onParameterChange:o,environment:n,enableInputTypeSelection:e!==On["application/x-www-form-urlencoded"],editable:r,actions:a=>g.jsx(sn,{onClick:()=>s(a),variant:"text",icon:g.jsx(q.TrashCanIcon,{})})})}const Pje=({data:t})=>{var c,u;const e=t.get(),[r,n]=N.useState(!1),i=N.useRef(null),o=d=>{var h;const f=(h=d.target.files)==null?void 0:h[0];if(f){n(!0);const m=new FileReader;m.onload=()=>{n(!1),t.set({absolutePath:null,file:f})},m.readAsDataURL(f)}},s=async d=>{var f;if(d==null||d.preventDefault(),zd())try{const{open:h}=await Promise.resolve().then(()=>require("./replay-index-JNXmVopJ.js")),m=await h();if(!m)return;const p=await Gp(m);t.set(p)}catch(h){console.error("Failed to open file dialog or read file:",h)}else(f=i.current)==null||f.click()},a=d=>{d.key==="Enter"&&(d.preventDefault(),s())},l=()=>{t.set(null)};return r?g.jsxs(kje,{children:[g.jsx(q.SpinnerIcon,{}),"Loading..."]}):e&&((c=e.file)!=null&&c.name)?g.jsxs($je,{children:[g.jsxs(Eje,{children:[g.jsx(q.DocumentBlankIcon,{size:"16px"}),g.jsx(Aje,{children:(u=e.file)==null?void 0:u.name})]}),g.jsx(sn,{onClick:l,icon:g.jsx(q.TrashCanIcon,{})})]}):g.jsx(w7,{children:!e&&g.jsxs(Ije,{tabIndex:0,role:"button",onKeyDown:a,onClick:s,children:[g.jsx("input",{type:"file",onChange:o,ref:i}),g.jsx(q.CloudUploadIcon,{}),"Upload file"]})})},w7=R.div`
|
|
1592
1592
|
display: flex;
|
|
1593
1593
|
align-items: center;
|
|
1594
1594
|
justify-content: flex-start;
|
|
@@ -2477,7 +2477,7 @@ ${o.message}`})}}}}),sK=({filePath:t})=>({Info:{leave(e,{report:r,location:n,con
|
|
|
2477
2477
|
${o.message}`,location:n.child("description")})}}}}),aK=t=>({Info:{leave(e){if(typeof t!="object"||Array.isArray(t)||t===null)throw new Error('"info-override" decorator should be called with an object');const{severity:r,...n}=t;Object.assign(e,n)}}}),_4e="x-internal",lK=({internalFlagProperty:t=_4e})=>{function e(n,i,o){var c,u,d,f,h;const{parent:s,key:a}=i;let l=!1;if(Array.isArray(n))for(let m=0;m<n.length;m++){if(_r(n[m])&&(c=i.resolve(n[m]).node)!=null&&c[t]){if(ft((u=s.discriminator)==null?void 0:u.mapping))for(const y in s.discriminator.mapping)(o==null?void 0:o[y])===n[m].$ref&&delete s.discriminator.mapping[y];n.splice(m,1),l=!0,m--}(d=n[m])!=null&&d[t]&&(n.splice(m,1),l=!0,m--)}else if(ft(n))for(const m of Object.keys(n)){if(_r(n[m])){const p=i.resolve(n[m]);ft(p.node)&&((f=p.node)!=null&&f[t])&&(delete n[m],l=!0)}ft(n[m])&&((h=n[m])!=null&&h[t])&&(delete n[m],l=!0)}l&&(Rp(n)||g8(n))&&delete s[a]}let r={};return{DiscriminatorMapping:{enter:n=>{r=JSON.parse(JSON.stringify(n))}},any:{enter:(n,i)=>{e(n,i,r)}}}};function cK(t,e,r){const{parent:n,key:i}=e;let o=!1;if(Array.isArray(t))for(let s=0;s<t.length;s++){if(_r(t[s])){const a=e.resolve(t[s]);r(a.node)&&(t.splice(s,1),o=!0,s--)}r(t[s])&&(t.splice(s,1),o=!0,s--)}else if(ft(t))for(const s of Object.keys(t)){if(t=t,_r(t[s])){const a=e.resolve(t[s]);r(a.node)&&(delete t[s],o=!0)}r(t[s])&&(delete t[s],o=!0)}o&&(Rp(t)||g8(t))&&delete n[i]}function uK(t,e,r){return t===void 0||e===void 0?!1:!Array.isArray(e)&&!Array.isArray(t)?t===e:(e=Pq(e),t=Pq(t),r==="any"?e.some(n=>t.includes(n)):r==="all"?e.every(n=>t.includes(n)):!1)}function Pq(t){return Array.isArray(t)?t:[t]}const R4e="any",dK=({property:t,value:e,matchStrategy:r})=>{const n=r||R4e,i=o=>(o==null?void 0:o[t])&&!uK(o==null?void 0:o[t],e,n);return{any:{enter:(o,s)=>{cK(o,s,i)}}}},j4e="any",fK=({property:t,value:e,matchStrategy:r})=>{const n=r||j4e,i=o=>uK(o==null?void 0:o[t],e,n);return{any:{enter:(o,s)=>{cK(o,s,i)}}}},D4e=({operationIds:t})=>({Operation:{enter(e,r){const n=e.operationId;if(!n)return;const i=t[n];if(i){if(i.responses&&e.responses)for(const o of Object.keys(i.responses)){const s=kq(e.responses[o],r.resolve);s&&(s.content=s.content?s.content:{},Object.keys(i.responses[o]).forEach(a=>{var c;const l=i.responses[o][a];s.content[a]={...s.content[a],examples:mV(jp(l,(c=r.config)==null?void 0:c.configPath))}}),e.responses[o]=s)}if(i.request&&e.requestBody){const o=kq(e.requestBody,r.resolve);if(!o)return;o.content=o.content?o.content:{},Object.keys(i.request).forEach(s=>{var l;const a=i.request[s];o.content[s]={...o.content[s],examples:mV(jp(a,(l=r.config)==null?void 0:l.configPath))}}),e.requestBody=o}}}}});function kq(t,e){if(!_r(t))return t;const r=e(t);return r.error?void 0:JSON.parse(JSON.stringify(r.node))}const hK=()=>{const t=new Map;function e(n,i,o){var s;t.set(n.absolutePointer,{usedIn:((s=t.get(n.absolutePointer))==null?void 0:s.usedIn)??[],componentType:i,name:o})}function r(n,i){const o=i.length;for(const[s,{usedIn:a,name:l,componentType:c}]of t)if(!a.some(d=>!i.some(f=>d.absolutePointer.startsWith(f)&&(d.absolutePointer.length===f.length||d.absolutePointer[f.length]==="/")))&&c&&n.components){i.push(s);const d=n.components[c];delete d[l],t.delete(s),Rp(d)&&delete n.components[c]}return i.length>o?r(n,i):i.length}return{ref:{leave(n,{location:i,type:o,resolve:s,key:a}){if(["Schema","Header","Parameter","Response","Example","RequestBody"].includes(o.name)){const l=s(n);if(!l.location)return;const[c,u]=l.location.absolutePointer.split("#",2);if(!u)return;const d=u.split("/").slice(0,4).join("/"),f=`${c}#${d}`,h=t.get(f);h?h.usedIn.push(i):t.set(f,{usedIn:[i],name:a.toString()})}}},Root:{leave(n,i){const o=i.getVisitorData();o.removedCount=r(n,[]),Rp(n.components)&&delete n.components}},NamedSchemas:{Schema(n,{location:i,key:o}){n.allOf||e(i,"schemas",o.toString())}},NamedParameters:{Parameter(n,{location:i,key:o}){e(i,"parameters",o.toString())}},NamedResponses:{Response(n,{location:i,key:o}){e(i,"responses",o.toString())}},NamedExamples:{Example(n,{location:i,key:o}){e(i,"examples",o.toString())}},NamedRequestBodies:{RequestBody(n,{location:i,key:o}){e(i,"requestBodies",o.toString())}},NamedHeaders:{Header(n,{location:i,key:o}){e(i,"headers",o.toString())}}}},M4e={"operation-description-override":iK,"tag-description-override":oK,"info-description-override":sK,"info-override":aK,"remove-x-internal":lK,"remove-unused-components":hK,"filter-in":dK,"filter-out":fK,"media-type-examples-override":D4e},pK=()=>{const t=new Map;function e(n,i,o){var s;t.set(n.absolutePointer,{usedIn:((s=t.get(n.absolutePointer))==null?void 0:s.usedIn)??[],componentType:i,name:o})}function r(n,i){const o=i.length;for(const[s,{usedIn:a,name:l,componentType:c}]of t)!a.some(d=>!i.some(f=>d.absolutePointer.startsWith(f)&&(d.absolutePointer.length===f.length||d.absolutePointer[f.length]==="/")))&&c&&(i.push(s),delete n[c][l],t.delete(s),Rp(n[c])&&delete n[c]);return i.length>o?r(n,i):i.length}return{ref:{leave(n,{location:i,type:o,resolve:s,key:a}){if(["Schema","Parameter","Response","SecurityScheme"].includes(o.name)){const l=s(n);if(!l.location)return;const[c,u]=l.location.absolutePointer.split("#",2);if(!u)return;const d=u.split("/").slice(0,3).join("/"),f=`${c}#${d}`,h=t.get(f);h?h.usedIn.push(i):t.set(f,{usedIn:[i],name:a.toString()})}}},Root:{leave(n,i){const o=i.getVisitorData();o.removedCount=r(n,[])}},NamedSchemas:{Schema(n,{location:i,key:o}){n.allOf||e(i,"definitions",o.toString())}},NamedParameters:{Parameter(n,{location:i,key:o}){e(i,"parameters",o.toString())}},NamedResponses:{Response(n,{location:i,key:o}){e(i,"responses",o.toString())}},NamedSecuritySchemes:{SecurityScheme(n,{location:i,key:o}){e(i,"securityDefinitions",o.toString())}}}},N4e={"operation-description-override":iK,"tag-description-override":oK,"info-description-override":sK,"info-override":aK,"remove-x-internal":lK,"remove-unused-components":pK,"filter-in":dK,"filter-out":fK},L4e={},Q4e={},V4e={},z4e={},B4e={recommended:FWe,"recommended-strict":WWe,minimal:XWe,all:UWe,spec:ZWe},$q={id:"",rules:{oas3:GUe,oas2:t4e,async2:o4e,async3:c4e,arazzo1:E4e,overlay1:I4e},preprocessors:{oas3:YUe,oas2:r4e,async2:s4e,async3:u4e,arazzo1:A4e,overlay1:T4e},decorators:{oas3:M4e,oas2:N4e,async2:L4e,async3:Q4e,arazzo1:V4e,overlay1:z4e},configs:B4e},q4e={Root:"DefinitionRoot",ServerVariablesMap:"ServerVariableMap",Paths:["PathMap","PathsMap"],CallbacksMap:"CallbackMap",MediaTypesMap:"MediaTypeMap",ExamplesMap:"ExampleMap",EncodingMap:"EncodingsMap",HeadersMap:"HeaderMap",LinksMap:"LinkMap",OAuth2Flows:"SecuritySchemeFlows",Responses:"ResponsesMap"};function Ed(t,e){const r={};r.any={enter:[],leave:[]};for(const s of Object.keys(e))r[s]={enter:[],leave:[]};r.ref={enter:[],leave:[]};for(const{ruleId:s,severity:a,message:l,visitor:c}of t)o({ruleId:s,severity:a,message:l},c,null);for(const s of Object.keys(r))r[s].enter.sort((a,l)=>l.depth-a.depth),r[s].leave.sort((a,l)=>a.depth-l.depth);return r;function n(s,a,l,c,u=[]){if(u.includes(a))return;u=[...u,a];const d=new Set;for(const h of Object.values(a.properties)){if(h===l){f(s,u);continue}typeof h=="object"&&h!==null&&h.name&&d.add(h)}a.additionalProperties&&typeof a.additionalProperties!="function"&&(a.additionalProperties===l?f(s,u):a.additionalProperties.name!==void 0&&d.add(a.additionalProperties)),a.items&&typeof a.items!="function"&&(a.items===l?f(s,u):a.items.name!==void 0&&d.add(a.items)),a.extensionsPrefix&&d.add(Kl);for(const h of Array.from(d.values()))n(s,h,l,c,u);function f(h,m){for(const p of m.slice(1))r[p.name]=r[p.name]||{enter:[],leave:[]},r[p.name].enter.push({...h,visit:()=>{},depth:0,context:{isSkippedLevel:!0,seen:new Set,parent:c}})}}function i(s,a){if(Array.isArray(a)){const l=a.find(c=>s[c])||void 0;return l&&s[l]}return s[a]}function o(s,a,l,c=0){const u=Object.keys(e);if(c===0)u.push("any"),u.push("ref");else{if(a.any)throw new Error("any() is allowed only on top level");if(a.ref)throw new Error("ref() is allowed only on top level")}for(const d of u){const f=a[d]||i(a,q4e[d]),h=r[d];if(!f)continue;let m,p,y;const v=ft(f);if(d==="ref"&&v&&f.skip)throw new Error("ref() visitor does not support skip");typeof f=="function"?m=f:v&&(m=f.enter,p=f.leave,y=f.skip);const b=(m?1:0)+(p?1:0)+(y?1:0),O=v&&Object.keys(f).length>b,w={activatedOn:null,type:e[d],parent:l,isSkippedLevel:!1};if(O&&o(s,f,w,c+1),l&&n(s,l.type,e[d],l),m||v){if(m&&typeof m!="function")throw new Error("DEV: should be function");h.enter.push({...s,visit:m||(()=>{}),skip:y,depth:c,context:w})}if(p){if(typeof p!="function")throw new Error("DEV: should be function");h.leave.push({...s,visit:p,depth:c,context:w})}}}}function F4e(t){var r;const e={};for(;t.parent;)e[t.parent.type.name]=(r=t.parent.activatedOn)==null?void 0:r.value.node,t=t.parent;return e}function W4e(t){var r,n;const e={};for(;t.parent;)(r=t.parent.activatedOn)!=null&&r.value.location&&(e[t.parent.type.name]=(n=t.parent.activatedOn)==null?void 0:n.value.location),t=t.parent;return e}function Ad(t){const{document:e,rootType:r,normalizedVisitors:n,resolvedRefMap:i,ctx:o}=t,s={},a=new Set;l(e.parsed,r,new Uu(e.source,"#/"),void 0,"");function l(c,u,d,f,h){var I,E,M,V,U,X,J,te,oe,ae;const m=(ie,he=y.source.absoluteRef)=>{if(!_r(ie))return{location:d,node:ie};const L=zh(he,ie.$ref),D=i.get(L);if(!D)return{location:void 0,node:void 0};const{resolved:Q,node:_,document:k,nodePointer:T,error:j}=D;return{location:Q?new Uu(k.source,T):j instanceof Yd?new Uu(j.source,""):void 0,node:_,error:j}},p=d;let y=d;const{node:v,location:b,error:O}=m(c),w=new Set;if(_r(c)){const ie=n.ref.enter;for(const{visit:he,ruleId:L,severity:D,message:Q,context:_}of ie){w.add(_);const k=S.bind(void 0,L,D,Q);he(c,{report:k,resolve:m,rawNode:c,rawLocation:p,location:d,type:u,parent:f,key:h,parentLocations:{},specVersion:o.specVersion,config:o.config,getVisitorData:P.bind(void 0,L)},{node:v,location:b,error:O}),b!=null&&b.source.absoluteRef&&o.refTypes&&o.refTypes.set(b==null?void 0:b.source.absoluteRef,u)}}if(v!==void 0&&b&&u.name!=="scalar"){y=b;const ie=(E=(I=s[u.name])==null?void 0:I.has)==null?void 0:E.call(I,v);let he=!1;const D=n.any.enter.concat(((M=n[u.name])==null?void 0:M.enter)||[]),Q=[];for(const{context:T,visit:j,skip:Z,ruleId:Y,severity:ue,message:G}of D){if(a.has(`${y.absolutePointer}${y.pointer}`))break;if(T.isSkippedLevel)T.parent.activatedOn&&!T.parent.activatedOn.value.nextLevelTypeActivated&&!T.seen.has(c)&&(T.seen.add(c),he=!0,Q.push(T));else if(T.parent&&T.parent.activatedOn&&((V=T.activatedOn)==null?void 0:V.value.withParentNode)!==T.parent.activatedOn.value.node&&((U=T.parent.activatedOn.value.nextLevelTypeActivated)==null?void 0:U.value)!==u||!T.parent&&!ie){Q.push(T);const B={node:v,location:b,nextLevelTypeActivated:null,withParentNode:(J=(X=T.parent)==null?void 0:X.activatedOn)==null?void 0:J.value.node,skipped:(((oe=(te=T.parent)==null?void 0:te.activatedOn)==null?void 0:oe.value.skipped)||(Z==null?void 0:Z(v,h,{location:d,rawLocation:p,resolve:m,rawNode:c})))??!1};T.activatedOn=hV(T.activatedOn,B);let z=T.parent;for(;z;)z.activatedOn.value.nextLevelTypeActivated=hV(z.activatedOn.value.nextLevelTypeActivated,u),z=z.parent;B.skipped||(he=!0,w.add(T),x(j,v,c,T,Y,ue,G))}}if(he||!ie){if(s[u.name]=s[u.name]||new Set,s[u.name].add(v),Array.isArray(v)){const T=u.items;if(T!==void 0){const j=typeof T=="function";for(let Z=0;Z<v.length;Z++){let Y=j?T(v[Z],b.child([Z]).absolutePointer):T,ue=v[Z];Y!=null&&Y.directResolveAs&&(Y=Y.directResolveAs,ue={$ref:ue}),ec(Y)&&l(ue,Y,b.child([Z]),v,Z)}}}else if(typeof v=="object"&&v!==null){const T=Object.keys(u.properties);u.additionalProperties?T.push(...Object.keys(v).filter(j=>!T.includes(j))):u.extensionsPrefix&&T.push(...Object.keys(v).filter(j=>j.startsWith(u.extensionsPrefix))),_r(c)&&T.push(...Object.keys(c).filter(j=>j!=="$ref"&&!T.includes(j)));for(const j of T){let Z=v[j],Y=b;Z===void 0&&(Z=c[j],Y=d);let ue=am(u.properties,j);ue===void 0&&(ue=u.additionalProperties),typeof ue=="function"&&(ue=ue(Z,j)),ue===void 0&&u.extensionsPrefix&&j.startsWith(u.extensionsPrefix)&&(ue=Kl),!ec(ue)&&(ue!=null&&ue.directResolveAs)&&(ue=ue.directResolveAs,Z={$ref:Z}),ue&&ue.name===void 0&&ue.resolvable!==!1&&(ue={name:"scalar",properties:{}}),!(!ec(ue)||ue.name==="scalar"&&!_r(Z))&&l(Z,ue,Y.child([j]),v,j)}}}const _=n.any.leave,k=(((ae=n[u.name])==null?void 0:ae.leave)||[]).concat(_);for(const T of Q.reverse())if(T.isSkippedLevel)T.seen.delete(v);else if(T.activatedOn=pV(T.activatedOn),T.parent){let j=T.parent;for(;j;)j.activatedOn.value.nextLevelTypeActivated=pV(j.activatedOn.value.nextLevelTypeActivated),j=j.parent}for(const{context:T,visit:j,ruleId:Z,severity:Y,message:ue}of k)!T.isSkippedLevel&&w.has(T)&&x(j,v,c,T,Z,Y,ue)}if(y=d,_r(c)){const ie=n.ref.leave;for(const{visit:he,ruleId:L,severity:D,context:Q,message:_}of ie)if(w.has(Q)){const k=S.bind(void 0,L,D,_);he(c,{report:k,resolve:m,rawNode:c,rawLocation:p,location:d,type:u,parent:f,key:h,parentLocations:{},specVersion:o.specVersion,config:o.config,getVisitorData:P.bind(void 0,L)},{node:v,location:b,error:O})}}function x(ie,he,L,D,Q,_,k){const T=S.bind(void 0,Q,_,k);ie(he,{report:T,resolve:m,rawNode:L,location:y,rawLocation:p,type:u,parent:f,key:h,parentLocations:W4e(D),specVersion:o.specVersion,config:o.config,ignoreNextVisitorsOnNode:()=>{a.add(`${y.absolutePointer}${y.pointer}`)},getVisitorData:P.bind(void 0,Q)},F4e(D),D)}function S(ie,he,L,D){const _=(D.location?Array.isArray(D.location)?D.location:[D.location]:[{...y,reportOnKey:!1}]).map(T=>({...y,reportOnKey:!1,...T})),k=D.forceSeverity||he;k!=="off"&&o.problems.push({ruleId:D.ruleId||ie,severity:k,...D,message:L?L.replace("{{message}}",D.message):D.message,suggest:D.suggest||[],location:_})}function P(ie){return o.visitorsData[ie]=o.visitorsData[ie]||{},o.visitorsData[ie]}}}function U0(t,e,r,n){return t.flatMap(i=>Object.keys(i).map(o=>{const s=i[o],a=r==="rules"?e.getRuleSettings(o,n):r==="preprocessors"?e.getPreprocessorSettings(o,n):e.getDecoratorSettings(o,n);if(a.severity==="off")return;const l=a.severity,c=a.message,u=s(a);return Array.isArray(u)?u.map(d=>({severity:l,ruleId:o,message:c,visitor:d})):{severity:l,message:c,ruleId:o,visitor:u}})).flatMap(i=>i).filter(A0)}function mK({node:t,ctx:e,plugins:r}){if(!t.extends)return t;const n=(t.extends||[]).map(i=>{if(!Wr(i)&&!mc.extname(i))return sXe(i,r);const o=e.resolve({$ref:i});return o.location&&o.node!==void 0?o.node:null}).filter(Ni);return bJ([...n.map(i=>mK({node:i,ctx:e,plugins:r})),{...t,extends:void 0}])}const U4e="redocly.yaml",X4e={extends:["recommended"]},Tb=".redocly.lint-ignore.yaml",Z4e=`# This file instructs Redocly's linter to ignore the rules contained for specific parts of your API.
|
|
2478
2478
|
# See https://redocly.com/docs/cli/ for more information.
|
|
2479
2479
|
`,gK="configBundler",yK="pluginsCollector",G4e=["@theme/plugin.js","@theme/plugin.cjs","@theme/plugin.mjs"];function Av(t,e){if(ft(t)&&Array.isArray(t.plugins)){const{plugins:r,rootConfigDir:n}=e.getVisitorData();r.push(...t.plugins.map(i=>vK(i,e.location.source.absoluteRef.replace(/^file:\/\//,""),n)))}}const Y4e=Ed([{severity:"error",ruleId:yK,visitor:{ref:{},ConfigGovernance:{leave(t,e){Av(t,e)}},ConfigApisProperties:{leave(t,e){Av(t,e)}},"rootRedoclyConfigSchema.scorecard.levels_items":{leave(t,e){Av(t,e)}},ConfigRoot:{leave(t,e){Av(t,e)}}}}],lm);function Iv(t,e){if(ft(t)&&t.extends){const{plugins:r}=e.getVisitorData(),n=mK({node:t,ctx:e,plugins:r});Object.assign(t,n),delete t.extends}}const H4e=Ed([{severity:"error",ruleId:gK,visitor:{ref:{leave(t,e,r){PE(t,r,e)}},ConfigGovernance:{leave(t,e){Iv(t,e)}},ConfigApisProperties:{leave(t,e){Iv(t,e)}},"rootRedoclyConfigSchema.scorecard.levels_items":{leave(t,e){Iv(t,e)}},ConfigRoot:{leave(t,e){Iv(t,e)}}}}],lm);function J4e(t,e,r){const n={plugins:[],rootConfigDir:r},i={problems:[],specVersion:"oas3_0",refTypes:new Map,visitorsData:{[yK]:n}};return Ad({document:t,rootType:lm.ConfigRoot,normalizedVisitors:Y4e,resolvedRefMap:e,ctx:i}),n.plugins}function K4e(t,e,r){const n={plugins:r},i={problems:[],specVersion:"oas3_0",refTypes:new Map,visitorsData:{[gK]:n}};return Ad({document:t,rootType:lm.ConfigRoot,normalizedVisitors:H4e,resolvedRefMap:e,ctx:i}),t.parsed??{}}async function eXe(t){var s;const{ref:e,doc:r,externalRefResolver:n=new ww(t.config.resolve),base:i=null}=t;if(!(e||r))throw new Error(`Document or reference is required.
|
|
2480
|
-
`);const o=r===void 0?await n.resolveDocument(i,e,!0):r;if(o instanceof Error)throw o;return(s=t.collectSpecData)==null||s.call(t,o.parsed),tXe({document:o,...t,externalRefResolver:n})}async function tXe(t){const{document:e,config:r,customTypes:n,externalRefResolver:i,dereference:o=!1,removeUnusedComponents:s=!1,keepUrlRefs:a=!1}=t,l=t_(e.parsed),c=aJ(l),u=r.getRulesForSpecVersion(c),d=GT(r.extendTypes(n??r_(l),l),r),f=U0(u,r,"preprocessors",l),h=U0(u,r,"decorators",l),m={problems:[],specVersion:l,config:r,refTypes:new Map,visitorsData:{}};s&&!h.some(v=>v.ruleId==="remove-unused-components")&&h.push({severity:"error",ruleId:"remove-unused-components",visitor:c==="oas2"?pK():hK()});let p=await Mp({rootDocument:e,rootType:d.Root,externalRefResolver:i});f.length>0&&(Ad({document:e,rootType:d.Root,normalizedVisitors:Ed(f,d),resolvedRefMap:p,ctx:m}),p=await Mp({rootDocument:e,rootType:d.Root,externalRefResolver:i}));const y=Ed([{severity:"error",ruleId:"bundler",visitor:rXe(c,o,e,p,a)},...h],d);return Ad({document:e,rootType:d.Root,normalizedVisitors:y,resolvedRefMap:p,ctx:m}),{bundle:e,problems:m.problems.map(v=>r.addProblemToIgnore(v)),fileDependencies:i.getFiles(),rootType:d.Root,refTypes:m.refTypes,visitorsData:m.visitorsData}}function Eq(t,e){switch(e){case"oas3":switch(t){case"Schema":return"schemas";case"Parameter":return"parameters";case"Response":return"responses";case"Example":return"examples";case"RequestBody":return"requestBodies";case"Header":return"headers";case"SecuritySchema":return"securitySchemes";case"Link":return"links";case"Callback":return"callbacks";default:return null}case"oas2":switch(t){case"Schema":return"definitions";case"Parameter":return"parameters";case"Response":return"responses";default:return null}case"async2":switch(t){case"Schema":return"schemas";case"Parameter":return"parameters";default:return null}case"async3":switch(t){case"Schema":return"schemas";case"Parameter":return"parameters";default:return null}case"arazzo1":switch(t){case"Root.workflows_items.parameters_items":case"Root.workflows_items.steps_items.parameters_items":return"parameters";default:return null}case"overlay1":return null}}function rXe(t,e,r,n,i){let o,s;const a={ref:{leave(f,h,m){if(!m.location||m.node===void 0){Bh(m,h.report,h.location);return}if(m.location.source===r.source&&m.location.source===h.location.source&&h.type.name!=="scalar"&&!e||i&&Wr(f.$ref))return;const p=Eq(h.type.name,t);p?e?(c(p,m,h),PE(f,m,h)):(f.$ref=c(p,m,h),l(f,m,h)):PE(f,m,h)}},Example:{leave(f,h){if(h8(f)&&f.value===void 0){const m=h.resolve({$ref:f.externalValue});if(!m.location||m.node===void 0){Bh(m,h.report,h.location);return}if(i&&Wr(f.externalValue))return;f.value=h.resolve({$ref:f.externalValue}).node,delete f.externalValue}}},Root:{enter(f,h){s=h.location,t==="oas3"?o=f.components=f.components||{}:t==="oas2"?o=f:t==="async2"?o=f.components=f.components||{}:t==="async3"?o=f.components=f.components||{}:t==="arazzo1"&&(o=f.components=f.components||{})}}};t==="oas3"&&(a.DiscriminatorMapping={leave(f,h){for(const m of Object.keys(f)){const p=f[m],y=h.resolve({$ref:p});if(!y.location||y.node===void 0){Bh(y,h.report,h.location.child(m));return}const v=Eq("Schema",t);f[m]=c(v,y,h)}}});function l(f,h,m){const p=zh(m.location.source.absoluteRef,f.$ref);n.set(p,{document:r,isRemote:!1,node:h.node,nodePointer:f.$ref,resolved:!0})}function c(f,h,m){o[f]=o[f]||{};const p=d(h,f,m);return o[f][p]=h.node,t==="oas3"||t==="async2"||t==="async3"?`#/components/${f}/${p}`:`#/${f}/${p}`}function u(f,h,m){var p;return _r(f)&&((p=m.resolve(f,s.absolutePointer).location)==null?void 0:p.absolutePointer)===h.location.absolutePointer?!0:kE(f,h.node)}function d(f,h,m){const[p,y]=[f.location.source.absoluteRef,f.location.pointer],v=o[h];let b="";const O=y.slice(2).split("/").filter(Ni);for(;O.length>0;)if(b=O.pop()+(b?`-${b}`:""),!v||!v[b]||u(v[b],f,m))return b;if(b=GLe(p)+(b?`_${b}`:""),!v[b]||u(v[b],f,m))return b;const w=b;let x=2;for(;v[b]&&!u(v[b],f,m);)b=`${w}-${x}`,x++;return v[b]||m.report({message:`Two schemas are referenced with the same name but different content. Renamed ${w} to ${b}.`,location:m.location,forceSeverity:"warn"}),b}return a}const hC=new Map;async function nXe({rawConfigDocument:t,configPath:e,externalRefResolver:r,customExtends:n}){var f;const i=t===void 0?X4e:t.parsed;if(n!==void 0&&ft(i)&&(i.extends=n),ft(i)&&((f=i==null?void 0:i.extends)!=null&&f.some(tQe)))throw new Error("Configuration format not detected in extends: values must be strings.");const o=t??{source:new $d(e??"",JSON.stringify(i)),parsed:i},s=await Mp({rootDocument:o,rootType:lm.ConfigRoot,externalRefResolver:r??new ww(OJ(i==null?void 0:i.resolve))});let a=[],l,c="";Yn?l=[...((i==null?void 0:i.plugins)||[]).filter(m=>!Oi(m)),$q]:(c=It.dirname(e??""),a=J4e(o,s,c),l=[...await oXe(a.map(m=>Aq(m)?m.absolutePath:m),c),$q]);const u=K4e(o,LWe(s),l);u.apis&&(u.apis=Object.fromEntries(Object.entries(u.apis).map(([h,m])=>{const p=bJ([u,m]);return[h,{...m,...p}]})));const d=a.length?a.map(h=>Aq(h)&&h.isModule?h.rawPath:h.absolutePath&&It.relative(c,h.absolutePath)).filter(A0):void 0;return{resolvedConfig:{...u,plugins:d},resolvedRefMap:s,plugins:l}}function iXe(t){for(const e of G4e)(void 0)(It.resolve(t,e))}function Aq(t){return"isModule"in t}const vK=(t,e,r)=>{if(!Oi(t))return t;const n=It.resolve(It.dirname(e),t);return(void 0)(n)?{absolutePath:n,rawPath:t,isModule:!1}:{absolutePath:H7.createRequire((typeof document>"u"?require("url").pathToFileURL(__filename).href:Os&&Os.tagName.toUpperCase()==="SCRIPT"&&Os.src||new URL("replay-index-
|
|
2480
|
+
`);const o=r===void 0?await n.resolveDocument(i,e,!0):r;if(o instanceof Error)throw o;return(s=t.collectSpecData)==null||s.call(t,o.parsed),tXe({document:o,...t,externalRefResolver:n})}async function tXe(t){const{document:e,config:r,customTypes:n,externalRefResolver:i,dereference:o=!1,removeUnusedComponents:s=!1,keepUrlRefs:a=!1}=t,l=t_(e.parsed),c=aJ(l),u=r.getRulesForSpecVersion(c),d=GT(r.extendTypes(n??r_(l),l),r),f=U0(u,r,"preprocessors",l),h=U0(u,r,"decorators",l),m={problems:[],specVersion:l,config:r,refTypes:new Map,visitorsData:{}};s&&!h.some(v=>v.ruleId==="remove-unused-components")&&h.push({severity:"error",ruleId:"remove-unused-components",visitor:c==="oas2"?pK():hK()});let p=await Mp({rootDocument:e,rootType:d.Root,externalRefResolver:i});f.length>0&&(Ad({document:e,rootType:d.Root,normalizedVisitors:Ed(f,d),resolvedRefMap:p,ctx:m}),p=await Mp({rootDocument:e,rootType:d.Root,externalRefResolver:i}));const y=Ed([{severity:"error",ruleId:"bundler",visitor:rXe(c,o,e,p,a)},...h],d);return Ad({document:e,rootType:d.Root,normalizedVisitors:y,resolvedRefMap:p,ctx:m}),{bundle:e,problems:m.problems.map(v=>r.addProblemToIgnore(v)),fileDependencies:i.getFiles(),rootType:d.Root,refTypes:m.refTypes,visitorsData:m.visitorsData}}function Eq(t,e){switch(e){case"oas3":switch(t){case"Schema":return"schemas";case"Parameter":return"parameters";case"Response":return"responses";case"Example":return"examples";case"RequestBody":return"requestBodies";case"Header":return"headers";case"SecuritySchema":return"securitySchemes";case"Link":return"links";case"Callback":return"callbacks";default:return null}case"oas2":switch(t){case"Schema":return"definitions";case"Parameter":return"parameters";case"Response":return"responses";default:return null}case"async2":switch(t){case"Schema":return"schemas";case"Parameter":return"parameters";default:return null}case"async3":switch(t){case"Schema":return"schemas";case"Parameter":return"parameters";default:return null}case"arazzo1":switch(t){case"Root.workflows_items.parameters_items":case"Root.workflows_items.steps_items.parameters_items":return"parameters";default:return null}case"overlay1":return null}}function rXe(t,e,r,n,i){let o,s;const a={ref:{leave(f,h,m){if(!m.location||m.node===void 0){Bh(m,h.report,h.location);return}if(m.location.source===r.source&&m.location.source===h.location.source&&h.type.name!=="scalar"&&!e||i&&Wr(f.$ref))return;const p=Eq(h.type.name,t);p?e?(c(p,m,h),PE(f,m,h)):(f.$ref=c(p,m,h),l(f,m,h)):PE(f,m,h)}},Example:{leave(f,h){if(h8(f)&&f.value===void 0){const m=h.resolve({$ref:f.externalValue});if(!m.location||m.node===void 0){Bh(m,h.report,h.location);return}if(i&&Wr(f.externalValue))return;f.value=h.resolve({$ref:f.externalValue}).node,delete f.externalValue}}},Root:{enter(f,h){s=h.location,t==="oas3"?o=f.components=f.components||{}:t==="oas2"?o=f:t==="async2"?o=f.components=f.components||{}:t==="async3"?o=f.components=f.components||{}:t==="arazzo1"&&(o=f.components=f.components||{})}}};t==="oas3"&&(a.DiscriminatorMapping={leave(f,h){for(const m of Object.keys(f)){const p=f[m],y=h.resolve({$ref:p});if(!y.location||y.node===void 0){Bh(y,h.report,h.location.child(m));return}const v=Eq("Schema",t);f[m]=c(v,y,h)}}});function l(f,h,m){const p=zh(m.location.source.absoluteRef,f.$ref);n.set(p,{document:r,isRemote:!1,node:h.node,nodePointer:f.$ref,resolved:!0})}function c(f,h,m){o[f]=o[f]||{};const p=d(h,f,m);return o[f][p]=h.node,t==="oas3"||t==="async2"||t==="async3"?`#/components/${f}/${p}`:`#/${f}/${p}`}function u(f,h,m){var p;return _r(f)&&((p=m.resolve(f,s.absolutePointer).location)==null?void 0:p.absolutePointer)===h.location.absolutePointer?!0:kE(f,h.node)}function d(f,h,m){const[p,y]=[f.location.source.absoluteRef,f.location.pointer],v=o[h];let b="";const O=y.slice(2).split("/").filter(Ni);for(;O.length>0;)if(b=O.pop()+(b?`-${b}`:""),!v||!v[b]||u(v[b],f,m))return b;if(b=GLe(p)+(b?`_${b}`:""),!v[b]||u(v[b],f,m))return b;const w=b;let x=2;for(;v[b]&&!u(v[b],f,m);)b=`${w}-${x}`,x++;return v[b]||m.report({message:`Two schemas are referenced with the same name but different content. Renamed ${w} to ${b}.`,location:m.location,forceSeverity:"warn"}),b}return a}const hC=new Map;async function nXe({rawConfigDocument:t,configPath:e,externalRefResolver:r,customExtends:n}){var f;const i=t===void 0?X4e:t.parsed;if(n!==void 0&&ft(i)&&(i.extends=n),ft(i)&&((f=i==null?void 0:i.extends)!=null&&f.some(tQe)))throw new Error("Configuration format not detected in extends: values must be strings.");const o=t??{source:new $d(e??"",JSON.stringify(i)),parsed:i},s=await Mp({rootDocument:o,rootType:lm.ConfigRoot,externalRefResolver:r??new ww(OJ(i==null?void 0:i.resolve))});let a=[],l,c="";Yn?l=[...((i==null?void 0:i.plugins)||[]).filter(m=>!Oi(m)),$q]:(c=It.dirname(e??""),a=J4e(o,s,c),l=[...await oXe(a.map(m=>Aq(m)?m.absolutePath:m),c),$q]);const u=K4e(o,LWe(s),l);u.apis&&(u.apis=Object.fromEntries(Object.entries(u.apis).map(([h,m])=>{const p=bJ([u,m]);return[h,{...m,...p}]})));const d=a.length?a.map(h=>Aq(h)&&h.isModule?h.rawPath:h.absolutePath&&It.relative(c,h.absolutePath)).filter(A0):void 0;return{resolvedConfig:{...u,plugins:d},resolvedRefMap:s,plugins:l}}function iXe(t){for(const e of G4e)(void 0)(It.resolve(t,e))}function Aq(t){return"isModule"in t}const vK=(t,e,r)=>{if(!Oi(t))return t;const n=It.resolve(It.dirname(e),t);return(void 0)(n)?{absolutePath:n,rawPath:t,isModule:!1}:{absolutePath:H7.createRequire((typeof document>"u"?require("url").pathToFileURL(__filename).href:Os&&Os.tagName.toUpperCase()==="SCRIPT"&&Os.src||new URL("replay-index-yIZURr30.js",document.baseURI).href)??__dirname).resolve(t,{paths:[r,(typeof document>"u"?require("url").pathToFileURL(__filename).href:Os&&Os.tagName.toUpperCase()==="SCRIPT"&&Os.src||new URL("replay-index-yIZURr30.js",document.baseURI).href)?It.dirname((void 0)(typeof document>"u"?require("url").pathToFileURL(__filename).href:Os&&Os.tagName.toUpperCase()==="SCRIPT"&&Os.src||new URL("replay-index-yIZURr30.js",document.baseURI).href)):__dirname]}),isModule:!0,rawPath:t}};async function oXe(t,e){if(!t)return[];const r=async a=>{var l;if(!Oi(a))return a;try{const c=It.isAbsolute(a)?a:vK(a,It.join(e,U4e),e).absolutePath;if(!hC.has(c)){let u;if(typeof __webpack_require__=="function")u=__non_webpack_require__(c);else{const p=await import((void 0)(c).pathname);u=p.default||p}const d={contentDir:e},f=Array.isArray(u)?u:[u];for(const p of f)p!=null&&p.id&&iB(p)&&Xt.info(`Deprecated plugin format detected: ${p.id}
|
|
2481
2481
|
`);const h=iB(u)?u:QWe(u)?await u(d):await((l=u==null?void 0:u.default)==null?void 0:l.call(u,d)),m=Array.isArray(h)?h:[h];h&&hC.set(c,m.map(p=>({...p,path:a,absolutePath:c})))}return hC.get(c)}catch(c){throw new Error(`Failed to load plugin "${a}": ${c.message}
|
|
2482
2482
|
|
|
2483
2483
|
${c.stack}`)}},n=new Map,i=iXe(e);i&&t.push(i);const o=new Set;return(await Promise.all(t.map(async a=>{if(Oi(a)){if(Wr(a))throw new Error(wt.red("We don't support remote plugins yet."));if(o.has(a))return;o.add(a)}const l=await r(a);if(!l)return;const c=Array.isArray(l)?l:[l];return(await Promise.all(c.map(async u=>{if(!u)return;const d=u.id;if(typeof d!="string")throw new Error(wt.red(`Plugin must define \`id\` property in ${wt.blue(a.toString())}.`));const f=u.absolutePath??a.toString(),h=n.get(d);if(h){if(f!==h)throw new Error(wt.red(`Plugin "id" must be unique. Plugin ${wt.blue(f)} uses id "${wt.blue(d)}" already seen in ${wt.blue(f)}`));return}n.set(d,f);const m={id:d,...u.configs?{configs:u.configs}:{},...u.typeExtension?{typeExtension:u.typeExtension}:{}};if(u.rules){if(!u.rules.oas3&&!u.rules.oas2&&!u.rules.async2&&!u.rules.async3&&!u.rules.arazzo1&&!u.rules.overlay1)throw new Error(`Plugin rules must have \`oas3\`, \`oas2\`, \`async2\`, \`async3\`, \`arazzo\`, or \`overlay1\` rules "${a}.`);m.rules={},u.rules.oas3&&(m.rules.oas3=qr(u.rules.oas3,d)),u.rules.oas2&&(m.rules.oas2=qr(u.rules.oas2,d)),u.rules.async2&&(m.rules.async2=qr(u.rules.async2,d)),u.rules.async3&&(m.rules.async3=qr(u.rules.async3,d)),u.rules.arazzo1&&(m.rules.arazzo1=qr(u.rules.arazzo1,d)),u.rules.overlay1&&(m.rules.overlay1=qr(u.rules.overlay1,d))}if(u.preprocessors){if(!u.preprocessors.oas3&&!u.preprocessors.oas2&&!u.preprocessors.async2&&!u.preprocessors.async3&&!u.preprocessors.arazzo1&&!u.preprocessors.overlay1)throw new Error(`Plugin \`preprocessors\` must have \`oas3\`, \`oas2\`, \`async2\`, \`async3\`, \`arazzo1\`, or \`overlay1\` preprocessors "${a}.`);m.preprocessors={},u.preprocessors.oas3&&(m.preprocessors.oas3=qr(u.preprocessors.oas3,d)),u.preprocessors.oas2&&(m.preprocessors.oas2=qr(u.preprocessors.oas2,d)),u.preprocessors.async2&&(m.preprocessors.async2=qr(u.preprocessors.async2,d)),u.preprocessors.async3&&(m.preprocessors.async3=qr(u.preprocessors.async3,d)),u.preprocessors.arazzo1&&(m.preprocessors.arazzo1=qr(u.preprocessors.arazzo1,d)),u.preprocessors.overlay1&&(m.preprocessors.overlay1=qr(u.preprocessors.overlay1,d))}if(u.decorators){if(!u.decorators.oas3&&!u.decorators.oas2&&!u.decorators.async2&&!u.decorators.async3&&!u.decorators.arazzo1&&!u.decorators.overlay1)throw new Error(`Plugin \`decorators\` must have \`oas3\`, \`oas2\`, \`async2\`, \`async3\`, \`arazzo1\`, or \`overlay1\` decorators "${a}.`);m.decorators={},u.decorators.oas3&&(m.decorators.oas3=qr(u.decorators.oas3,d)),u.decorators.oas2&&(m.decorators.oas2=qr(u.decorators.oas2,d)),u.decorators.async2&&(m.decorators.async2=qr(u.decorators.async2,d)),u.decorators.async3&&(m.decorators.async3=qr(u.decorators.async3,d)),u.decorators.arazzo1&&(m.decorators.arazzo1=qr(u.decorators.arazzo1,d)),u.decorators.overlay1&&(m.decorators.overlay1=qr(u.decorators.overlay1,d))}return u.assertions&&(m.assertions=u.assertions),{...u,...m}}))).filter(A0)}))).filter(A0).flat()}function sXe(t,e){var s;const{pluginId:r,configName:n}=NWe(t),i=e.find(a=>a.id===r);if(!i)throw new Error(`Invalid config ${wt.red(t)}: plugin ${r} is not included.`);const o=(s=i.configs)==null?void 0:s[n];if(!o)throw new Error(r?`Invalid config ${wt.red(t)}: plugin ${r} doesn't export config with name ${n}.`:`Invalid config ${wt.red(t)}: there is no such built-in config.`);return o}function aXe(t,e){if(!t.rules)return{};const r={},n=[];for(const[i,o]of Object.entries(t.rules))if(i.startsWith("rule/")&&typeof o=="object"&&o!==null){const s=o;if(e){Iq(e,s);for(const a of s.where||[])Iq(e,a)}n.push({...s,assertionId:i})}else r[i]=o;return n.length>0&&(r.assertions=n),r}function Iq(t,e){for(const r of O8(e.assertions)){const[n,i]=r.split("/");if(!n||!i)continue;const o=t.find(s=>s.id===n);if(!o)throw Error(wt.red(`Plugin ${wt.blue(n)} isn't found.`));if(!o.assertions||!o.assertions[i])throw Error(`Plugin ${wt.red(n)} doesn't export assertions function with name ${wt.red(i)}.`);F0[r]=hUe(o.assertions[i])}}function lXe(t){return t?b8(t)?It.join(It.dirname(t),Tb):It.join(t,Tb):Yn?void 0:It.join(process.cwd(),Tb)}class p_{constructor(e,r={}){var i;this.ignore={},this._usedRules=new Set,this._usedVersions=new Set,this.resolvedConfig=e,this.configPath=r.configPath,this.document=r.document,this.resolvedRefMap=r.resolvedRefMap,this.resolve=OJ(this.resolvedConfig.resolve),this._alias=r.alias,this.plugins=r.plugins||[],this.doNotResolveExamples=!!((i=e.resolve)!=null&&i.doNotResolveExamples);const n=o=>aXe({rules:o},this.plugins);this.rules={oas2:n({...e.rules,...e.oas2Rules}),oas3_0:n({...e.rules,...e.oas3_0Rules}),oas3_1:n({...e.rules,...e.oas3_1Rules}),oas3_2:n({...e.rules,...e.oas3_2Rules}),async2:n({...e.rules,...e.async2Rules}),async3:n({...e.rules,...e.async3Rules}),arazzo1:n({...e.rules,...e.arazzo1Rules}),overlay1:n({...e.rules,...e.overlay1Rules})},this.preprocessors={oas2:{...e.preprocessors,...e.oas2Preprocessors},oas3_0:{...e.preprocessors,...e.oas3_0Preprocessors},oas3_1:{...e.preprocessors,...e.oas3_1Preprocessors},oas3_2:{...e.preprocessors,...e.oas3_2Preprocessors},async2:{...e.preprocessors,...e.async2Preprocessors},async3:{...e.preprocessors,...e.async3Preprocessors},arazzo1:{...e.preprocessors,...e.arazzo1Preprocessors},overlay1:{...e.preprocessors,...e.overlay1Preprocessors}},this.decorators={oas2:{...e.decorators,...e.oas2Decorators},oas3_0:{...e.decorators,...e.oas3_0Decorators},oas3_1:{...e.decorators,...e.oas3_1Decorators},oas3_2:{...e.decorators,...e.oas3_2Decorators},async2:{...e.decorators,...e.async2Decorators},async3:{...e.decorators,...e.async3Decorators},arazzo1:{...e.decorators,...e.arazzo1Decorators},overlay1:{...e.decorators,...e.overlay1Decorators}},this.resolveIgnore(lXe(r.configPath))}forAlias(e){var a,l;if(e===void 0||!ft((l=(a=this.resolvedConfig)==null?void 0:a.apis)==null?void 0:l[e]))return this;const{apis:r,...n}=this.resolvedConfig,{root:i,output:o,...s}=r[e];return new p_({...n,...s},{configPath:this.configPath,document:this.document,resolvedRefMap:this.resolvedRefMap,alias:e,plugins:this.plugins})}resolveIgnore(e){!e||b8(e)}saveIgnore(){const e=this.configPath?It.dirname(this.configPath):process.cwd(),r=It.join(e,Tb),n={};for(const i of Object.keys(this.ignore)){const o=Wr(i)?i:eQe(It.relative(e,i)),s=n[o]=this.ignore[i];for(const a of Object.keys(s))s[a]=Array.from(s[a])}(void 0)(r,Z4e+ULe(n))}addIgnore(e){const r=this.ignore,n=e.location[0];if(n.pointer===void 0)return;const i=r[n.source.absoluteRef]=r[n.source.absoluteRef]||{};(i[e.ruleId]=i[e.ruleId]||new Set).add(n.pointer)}addProblemToIgnore(e){const r=e.location[0];if(r.pointer===void 0)return e;const i=(this.ignore[r.source.absoluteRef]||{})[e.ruleId],o=i&&i.has(r.pointer);return o?{...e,ignored:o}:e}extendTypes(e,r){let n=e;for(const i of this.plugins)if(i.typeExtension!==void 0)switch(r){case"oas3_0":case"oas3_1":case"oas3_2":if(!i.typeExtension.oas3)continue;n=i.typeExtension.oas3(n,r);break;case"oas2":if(!i.typeExtension.oas2)continue;n=i.typeExtension.oas2(n,r);break;case"async2":if(!i.typeExtension.async2)continue;n=i.typeExtension.async2(n,r);break;case"async3":if(!i.typeExtension.async3)continue;n=i.typeExtension.async3(n,r);break;case"arazzo1":if(!i.typeExtension.arazzo1)continue;n=i.typeExtension.arazzo1(n,r);break;case"overlay1":if(!i.typeExtension.overlay1)continue;n=i.typeExtension.overlay1(n,r);break;default:throw new Error("Not implemented")}return n}getRuleSettings(e,r){this._usedRules.add(e),this._usedVersions.add(r);const n=this.rules[r][e]||"off";return typeof n=="string"?{severity:n}:{severity:"error",...n}}getPreprocessorSettings(e,r){this._usedRules.add(e),this._usedVersions.add(r);const n=this.preprocessors[r][e]||"off";return typeof n=="string"?{severity:n==="on"?"error":n}:{severity:"error",...n}}getDecoratorSettings(e,r){this._usedRules.add(e),this._usedVersions.add(r);const n=this.decorators[r][e]||"off";return typeof n=="string"?{severity:n==="on"?"error":n}:{severity:"error",...n}}getUnusedRules(){const e=[],r=[],n=[];for(const i of Array.from(this._usedVersions))e.push(...Object.keys(this.rules[i]).filter(o=>!this._usedRules.has(o))),r.push(...Object.keys(this.decorators[i]).filter(o=>!this._usedRules.has(o))),n.push(...Object.keys(this.preprocessors[i]).filter(o=>!this._usedRules.has(o)));return{rules:e,preprocessors:n,decorators:r}}getRulesForSpecVersion(e){switch(e){case"oas3":const r=[];return this.plugins.forEach(l=>{var c;return((c=l.preprocessors)==null?void 0:c.oas3)&&r.push(l.preprocessors.oas3)}),this.plugins.forEach(l=>{var c;return((c=l.rules)==null?void 0:c.oas3)&&r.push(l.rules.oas3)}),this.plugins.forEach(l=>{var c;return((c=l.decorators)==null?void 0:c.oas3)&&r.push(l.decorators.oas3)}),r;case"oas2":const n=[];return this.plugins.forEach(l=>{var c;return((c=l.preprocessors)==null?void 0:c.oas2)&&n.push(l.preprocessors.oas2)}),this.plugins.forEach(l=>{var c;return((c=l.rules)==null?void 0:c.oas2)&&n.push(l.rules.oas2)}),this.plugins.forEach(l=>{var c;return((c=l.decorators)==null?void 0:c.oas2)&&n.push(l.decorators.oas2)}),n;case"async2":const i=[];return this.plugins.forEach(l=>{var c;return((c=l.preprocessors)==null?void 0:c.async2)&&i.push(l.preprocessors.async2)}),this.plugins.forEach(l=>{var c;return((c=l.rules)==null?void 0:c.async2)&&i.push(l.rules.async2)}),this.plugins.forEach(l=>{var c;return((c=l.decorators)==null?void 0:c.async2)&&i.push(l.decorators.async2)}),i;case"async3":const o=[];return this.plugins.forEach(l=>{var c;return((c=l.preprocessors)==null?void 0:c.async3)&&o.push(l.preprocessors.async3)}),this.plugins.forEach(l=>{var c;return((c=l.rules)==null?void 0:c.async3)&&o.push(l.rules.async3)}),this.plugins.forEach(l=>{var c;return((c=l.decorators)==null?void 0:c.async3)&&o.push(l.decorators.async3)}),o;case"arazzo1":const s=[];return this.plugins.forEach(l=>{var c;return((c=l.preprocessors)==null?void 0:c.arazzo1)&&s.push(l.preprocessors.arazzo1)}),this.plugins.forEach(l=>{var c;return((c=l.rules)==null?void 0:c.arazzo1)&&s.push(l.rules.arazzo1)}),this.plugins.forEach(l=>{var c;return((c=l.decorators)==null?void 0:c.arazzo1)&&s.push(l.decorators.arazzo1)}),s;case"overlay1":const a=[];return this.plugins.forEach(l=>{var c;return((c=l.preprocessors)==null?void 0:c.overlay1)&&a.push(l.preprocessors.overlay1)}),this.plugins.forEach(l=>{var c;return((c=l.rules)==null?void 0:c.overlay1)&&a.push(l.rules.overlay1)}),this.plugins.forEach(l=>{var c;return((c=l.decorators)==null?void 0:c.overlay1)&&a.push(l.decorators.overlay1)}),a}}skipRules(e){for(const r of e||[])for(const n of Eb)if(this.rules[n][r])this.rules[n][r]="off";else if(Array.isArray(this.rules[n].assertions))for(const i of this.rules[n].assertions)i.assertionId===r&&(i.severity="off")}skipPreprocessors(e){for(const r of e||[])for(const n of Eb)this.preprocessors[n][r]&&(this.preprocessors[n][r]="off")}skipDecorators(e){for(const r of e||[])for(const n of Eb)this.decorators[n][r]&&(this.decorators[n][r]="off")}}async function bK(t,{configPath:e,externalRefResolver:r}={}){const i=zWe(typeof t=="string"?t:"",e??"");typeof t!="string"&&t&&(i.parsed=t);const{resolvedConfig:o,resolvedRefMap:s,plugins:a}=await nXe({rawConfigDocument:cXe(i),configPath:e,externalRefResolver:r});return new p_(o,{configPath:e,document:i,resolvedRefMap:s,plugins:a})}function cXe(t){if(!t.parsed)return t;const{plugins:e,resolve:r,...n}=t.parsed,i={...structuredClone(n),plugins:e==null?void 0:e.slice(),...r&&{resolve:{...r}}};return{...t,parsed:i}}var pC={},Ki={},mC={},Tq;function Tw(){return Tq||(Tq=1,(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e;(function(l){l[l.SCALAR=0]="SCALAR",l[l.MAPPING=1]="MAPPING",l[l.MAP=2]="MAP",l[l.SEQ=3]="SEQ",l[l.ANCHOR_REF=4]="ANCHOR_REF",l[l.INCLUDE_REF=5]="INCLUDE_REF"})(e=t.Kind||(t.Kind={}));function r(l,c){var u=c?c.endPosition:l.endPosition+1,d={key:l,value:c,startPosition:l.startPosition,endPosition:u,kind:e.MAPPING,parent:null,errors:[]};return d}t.newMapping=r;function n(l,c,u,d){return{errors:[],referencesAnchor:l,value:d,startPosition:c,endPosition:u,kind:e.ANCHOR_REF,parent:null}}t.newAnchorRef=n;function i(l){l===void 0&&(l="");var c={errors:[],startPosition:-1,endPosition:-1,value:""+l,kind:e.SCALAR,parent:null,doubleQuoted:!1,rawValue:""+l};return typeof l!="string"&&(c.valueObject=l),c}t.newScalar=i;function o(){return{errors:[],startPosition:-1,endPosition:-1,items:[],kind:e.SEQ,parent:null}}t.newItems=o;function s(){return o()}t.newSeq=s;function a(l){return{errors:[],startPosition:-1,endPosition:-1,mappings:l||[],kind:e.MAP,parent:null}}t.newMap=a})(mC)),mC}var As={},_q;function ef(){if(_q)return As;_q=1,Object.defineProperty(As,"__esModule",{value:!0});function t(s){return typeof s>"u"||s===null}As.isNothing=t;function e(s){return typeof s=="object"&&s!==null}As.isObject=e;function r(s){return Array.isArray(s)?s:t(s)?[]:[s]}As.toArray=r;function n(s,a){var l,c,u,d;if(a)for(d=Object.keys(a),l=0,c=d.length;l<c;l+=1)u=d[l],s[u]=a[u];return s}As.extend=n;function i(s,a){var l="",c;for(c=0;c<a;c+=1)l+=s;return l}As.repeat=i;function o(s){return s===0&&Number.NEGATIVE_INFINITY===1/s}return As.isNegativeZero=o,As}var gC,Rq;function hm(){if(Rq)return gC;Rq=1;var t=(function(){function e(r,n,i){n===void 0&&(n=null),i===void 0&&(i=!1),this.name="YAMLException",this.reason=r,this.mark=n,this.message=this.toString(!1),this.isWarning=i}return e.isInstance=function(r){if(r!=null&&r.getClassIdentifier&&typeof r.getClassIdentifier=="function")for(var n=0,i=r.getClassIdentifier();n<i.length;n++){var o=i[n];if(o==e.CLASS_IDENTIFIER)return!0}return!1},e.prototype.getClassIdentifier=function(){var r=[];return r.concat(e.CLASS_IDENTIFIER)},e.prototype.toString=function(r){r===void 0&&(r=!1);var n;return n="JS-YAML: "+(this.reason||"(unknown reason)"),!r&&this.mark&&(n+=" "+this.mark.toString()),n},e.CLASS_IDENTIFIER="yaml-ast-parser.YAMLException",e})();return gC=t,gC}var yC,jq;function uXe(){if(jq)return yC;jq=1;var t=ef(),e=(function(){function r(n,i,o,s,a){this.name=n,this.buffer=i,this.position=o,this.line=s,this.column=a}return r.prototype.getSnippet=function(n,i){n===void 0&&(n=0),i===void 0&&(i=75);var o,s,a,l,c;if(!this.buffer)return null;for(n=n||4,i=i||75,o="",s=this.position;s>0&&`\0\r
|
|
@@ -2565,7 +2565,7 @@ ${v.message}
|
|
|
2565
2565
|
|
|
2566
2566
|
`+d:l.message,h={title:l.ruleId,file:Wr(c.source.absoluteRef)?c.source.absoluteRef:It.relative(e,c.source.absoluteRef),line:c.start.line,col:c.start.col,endLine:(s=c.end)==null?void 0:s.line,endColumn:(a=c.end)==null?void 0:a.col};Xt.output(`::${u} ${r(h)}::${i(f)}
|
|
2567
2567
|
`)}function r(l){return Object.entries(l).filter(([,c])=>c!=null).map(([c,u])=>`${c}=${o(u)}`).join(",")}function n(l){return l==null?"":typeof l=="string"||l instanceof String?l:JSON.stringify(l)}function i(l){return n(l).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function o(l){return n(l).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}}delete e_.properties.theme;async function HXe(t){var i;const{ref:e,externalRefResolver:r=new ww(t.config.resolve)}=t,n=await r.resolveDocument(null,e,!0);return(i=t.collectSpecData)==null||i.call(t,n.parsed),JXe({document:n,...t,externalRefResolver:r})}async function JXe(t){oUe();const{document:e,customTypes:r,externalRefResolver:n,config:i}=t,o=t_(e.parsed),s=aJ(o),a=i.getRulesForSpecVersion(s),l=GT(i.extendTypes(r??r_(o),o),i),c={problems:[],specVersion:o,config:i,visitorsData:{}},u=U0(a,i,"preprocessors",o),d=U0(a,i,"rules",o);let f=await Mp({rootDocument:e,rootType:l.Root,externalRefResolver:n});u.length>0&&(Ad({document:e,rootType:l.Root,normalizedVisitors:Ed(u,l),resolvedRefMap:f,ctx:c}),f=await Mp({rootDocument:e,rootType:l.Root,externalRefResolver:n}));const h=Ed(d,l);return Ad({document:e,rootType:l.Root,normalizedVisitors:h,resolvedRefMap:f,ctx:c}),c.problems.map(m=>i.addProblemToIgnore(m))}const KXe={info:t=>{},error:t=>{},warn:t=>{},printNewLine:()=>{},printSeparator:()=>{},indent:(t,e)=>t,output:t=>t};class e9e extends ww{constructor(){super()}resolveExternalRef(e,r){return Sb(r)?r:e&&Sb(e)?new URL(r,e).href:e?mc.resolve(mc.dirname(e),r):r}async loadExternalRef(e){if(Sb(e)){const{body:r,mimeType:n}=await y8(e,{...this.config.http,customFetch:Fs});return new $d(e,r,n)}else{if(!await tZ(e))throw new Error(`File not found at ${e}.`);try{throw await eZ(e),new Error(`Expected a file but received a folder at ${e}.`)}catch(i){if(i instanceof Error&&i.message.includes("Expected a file but received a folder"))throw i}const n=await yI(e);return new $d(e,n.replace(/\r\n/g,`
|
|
2568
|
-
`))}}}async function t9e({collectionId:t,workflowId:e,projectDir:r,inputsObject:n,serversObject:i,sourceDescriptions:o,severitySettings:s}){const a=`${r}/${t}`,l=new e9e,c=n.map(f=>JSON.stringify({[f.name]:f.value})),u=r9e(i,o),{run:d}=await Promise.resolve().then(()=>require("./replay-index-
|
|
2568
|
+
`))}}}async function t9e({collectionId:t,workflowId:e,projectDir:r,inputsObject:n,serversObject:i,sourceDescriptions:o,severitySettings:s}){const a=`${r}/${t}`,l=new e9e,c=n.map(f=>JSON.stringify({[f.name]:f.value})),u=r9e(i,o),{run:d}=await Promise.resolve().then(()=>require("./replay-index-hrcnswLO.js"));return await d({files:[a],workflow:e?[e]:[],fetch:Fs,logger:KXe,maxSteps:500,maxFetchTimeout:4e4,requestFileLoader:{getFileBody:async f=>{if(!await tZ(f))throw new Error(`File ${f} doesn't exist or isn't readable.`);try{const m=await yI(f),p=new TextEncoder().encode(m);return new File([p],await K9(f))}catch(m){throw new Error(`Failed to read file ${f}: ${m}`)}}},envVariables:{},config:await bK({}),externalRefResolver:l,input:c,server:u,severity:JSON.stringify(s),skipLint:!0})}function r9e(t,e){return e.map(r=>{const n=t.find(o=>o.apiId===r.apiId);if(!n)return null;let i=n.value;if(n.variables)for(const o of n.variables){const s=new RegExp(`\\{${o.name}\\}`,"g");i=i.replace(s,o.value)}return`${r.name}=${i}`}).filter(r=>r!==null)}function y_(t){return t==null?"N/A":t<1e3?`${t} ms`:t<1e4?`${(t/1e3).toFixed(1)} s`:`${Math.round(t/1e3)} s`}function CK({checks:t}){const e=t.filter(h=>h.severity!=="off"),r=e.filter(h=>h.passed).length,n=e.filter(h=>h.severity==="warn"&&!h.passed).length,i=e.length,o=i-r-n,s=r===i,a=r===0,[l,c]=ce.default.useState(o>0||n>0),u=()=>s?"All checks passed":a?"All checks failed":`Some ${i>1?"checks were":"check was"} not successful`,d=()=>s?g.jsx(q.CheckmarkFilledIcon,{color:"var(--color-success-base)"}):o>0?g.jsx(q.ErrorFilledIcon,{color:"var(--color-error-base)"}):g.jsx(q.WarningFilledIcon,{color:"var(--color-warning-base)"}),f=h=>{h.stopPropagation(),c(!l)};return!e||e.length===0?null:g.jsxs(n9e,{children:[g.jsxs(i9e,{onClick:f,children:[g.jsxs(o9e,{children:[g.jsx(s9e,{children:g.jsx(a9e,{children:d()})}),g.jsxs(l9e,{children:[g.jsx(c9e,{children:u()}),g.jsxs(u9e,{children:[r," successful",n>0&&g.jsxs(g.Fragment,{children:[", ",n," ",n===1?"warning":"warnings"]}),o>0&&g.jsxs(g.Fragment,{children:[", ",o," failed"]})]})]})]}),g.jsx(d9e,{isExpanded:l,children:l?g.jsx(q.ChevronDownIcon,{}):g.jsx(q.ChevronRightIcon,{})})]}),g.jsx(f9e,{isExpanded:l,children:e.map((h,m)=>g.jsxs(h9e,{children:[g.jsx(p9e,{children:h.passed?g.jsx(q.CheckmarkIcon,{color:"var(--color-success-base)",size:"14px"}):!h.passed&&["warn"].includes(h.severity)?g.jsx(q.WarningFilledIcon,{color:"var(--color-warning-base)",size:"14px"}):g.jsx(q.CloseOutlineIcon,{color:"var(--color-error-base)",size:"14px"})}),g.jsxs(m9e,{children:[g.jsx(g9e,{children:h.name}),h.message&&g.jsx(y9e,{children:h.message})]})]},m))})]})}const n9e=R.div`
|
|
2569
2569
|
margin-bottom: 0;
|
|
2570
2570
|
margin-top: var(--spacing-xxs);
|
|
2571
2571
|
`,i9e=R.div`
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as h, o as r } from "./replay-index-
|
|
2
|
-
import { u as w, q as b } from "./replay-index-
|
|
1
|
+
import { n as h, o as r } from "./replay-index-CK1akZKQ.js";
|
|
2
|
+
import { u as w, q as b } from "./replay-index-CK1akZKQ.js";
|
|
3
3
|
async function x(s, i) {
|
|
4
4
|
const t = h(), l = await r(s), c = await r(i), o = l.replace(new RegExp(`^${t}+`), "").split(t).filter(Boolean), n = c.replace(new RegExp(`^${t}+`), "").split(t).filter(Boolean), p = Math.min(o.length, n.length);
|
|
5
5
|
let a = 0;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./replay-index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./replay-index-yIZURr30.js");async function v(i,l){const t=e.sep(),a=await e.resolve(i),c=await e.resolve(l),r=a.replace(new RegExp(`^${t}+`),"").split(t).filter(Boolean),n=c.replace(new RegExp(`^${t}+`),"").split(t).filter(Boolean),p=Math.min(r.length,n.length);let s=0;for(let o=0;o<p&&r[o]===n[o];o++)s++;const f=r.slice(s).map(()=>".."),g=n.slice(s);return[...f,...g].join(t)}exports.isAbsolute=e.isAbsolute;exports.join=e.join;exports.resolve=e.resolve;exports.relative=v;
|
package/dist/replay.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./replay-index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./replay-index-yIZURr30.js");exports.EmbeddedReplay=e.EmbeddedReplay;exports.Modal=e.Modal;exports.Replay=e.Replay;exports.ReplayOverlay=e.ReplayOverlay;
|
package/dist/replay.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@redocly/replay",
|
|
3
|
-
"version": "0.17.
|
|
3
|
+
"version": "0.17.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/replay.cjs",
|
|
6
6
|
"module": "./dist/replay.js",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"react-dom": "^19.1.0",
|
|
20
20
|
"react-router-dom": "^6.21.1",
|
|
21
21
|
"styled-components": "^5.3.11",
|
|
22
|
-
"@redocly/theme": "0.58.
|
|
22
|
+
"@redocly/theme": "0.58.1"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@codemirror/autocomplete": "^6.15.0",
|