@wix/cli 1.1.52 → 1.1.54
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/build/DevCommand-OPMYQBQO.js +4 -0
- package/build/DevCommand-OPMYQBQO.js.map +1 -0
- package/build/DevCommand-PWWAORLA.js +4 -0
- package/build/DevCommand-PWWAORLA.js.map +1 -0
- package/build/LoginCommand-WY6DLWSR.js +4 -0
- package/build/LoginCommand-WY6DLWSR.js.map +1 -0
- package/build/LogoutCommand-4XUYL32R.js +4 -0
- package/build/LogoutCommand-4XUYL32R.js.map +1 -0
- package/build/WhoamiCommand-DEU5CPCY.js +4 -0
- package/build/WhoamiCommand-DEU5CPCY.js.map +1 -0
- package/build/check.js +1 -1
- package/build/chunk-52Q35AIU.js +4 -0
- package/build/chunk-52Q35AIU.js.map +1 -0
- package/build/chunk-5GZ44LZG.js +4 -0
- package/build/chunk-5GZ44LZG.js.map +1 -0
- package/build/chunk-5MKTSPKA.js +4 -0
- package/build/chunk-5MKTSPKA.js.map +1 -0
- package/build/chunk-66OBCXPW.js +4 -0
- package/build/chunk-66OBCXPW.js.map +1 -0
- package/build/{chunk-SZ35DFLD.js → chunk-6JAOI72Q.js} +2 -2
- package/build/chunk-B5FU6B7H.js +4 -0
- package/build/chunk-B5FU6B7H.js.map +1 -0
- package/build/{chunk-R5TGEMJ4.js → chunk-BLU4HRZE.js} +2 -2
- package/build/{chunk-R5TGEMJ4.js.map → chunk-BLU4HRZE.js.map} +1 -1
- package/build/{chunk-TLPEI3DE.js → chunk-C4I6VFE7.js} +2 -2
- package/build/chunk-COSE3VCT.js +14 -0
- package/build/chunk-COSE3VCT.js.map +1 -0
- package/build/chunk-CVDLBCEY.js +6 -0
- package/build/{chunk-TCTTRAWM.js.map → chunk-CVDLBCEY.js.map} +1 -1
- package/build/{chunk-L434E44T.js → chunk-CXUHBNPP.js} +6 -6
- package/build/{chunk-L434E44T.js.map → chunk-CXUHBNPP.js.map} +1 -1
- package/build/chunk-EXKXKMOZ.js +32 -0
- package/build/chunk-EXKXKMOZ.js.map +1 -0
- package/build/{chunk-EY7RCO4T.js → chunk-GCM6E6UB.js} +4 -4
- package/build/{chunk-L2PG7C3H.js → chunk-H4A4LESA.js} +49 -49
- package/build/{chunk-L2PG7C3H.js.map → chunk-H4A4LESA.js.map} +1 -1
- package/build/chunk-IECEFWH2.js +4 -0
- package/build/chunk-IECEFWH2.js.map +1 -0
- package/build/{chunk-GZENQUN7.js → chunk-JPTOEPBL.js} +2 -2
- package/build/chunk-KCPEZYDE.js +4 -0
- package/build/chunk-KCPEZYDE.js.map +1 -0
- package/build/{chunk-WICGWF4N.js → chunk-L3KGS4EW.js} +2 -2
- package/build/chunk-LJGLNQKN.js +4 -0
- package/build/{chunk-4BTCJXQC.js → chunk-MCYLPYJV.js} +27 -27
- package/build/chunk-MCYLPYJV.js.map +1 -0
- package/build/{chunk-TMNJT4K2.js → chunk-NOCPDXVB.js} +2 -2
- package/build/{chunk-JGPN7XZF.js → chunk-P6O6SHMD.js} +2 -2
- package/build/chunk-PCOHTRKC.js +43 -0
- package/build/chunk-PCOHTRKC.js.map +1 -0
- package/build/chunk-QOHOP5JZ.js +4 -0
- package/build/chunk-QOHOP5JZ.js.map +1 -0
- package/build/chunk-QRXJXTDM.js +6 -0
- package/build/chunk-QRXJXTDM.js.map +1 -0
- package/build/chunk-S4HJR2C7.js +4 -0
- package/build/chunk-S4HJR2C7.js.map +1 -0
- package/build/chunk-T2KRHPO3.js +4 -0
- package/build/chunk-T2KRHPO3.js.map +1 -0
- package/build/chunk-T4JL735D.js +4 -0
- package/build/chunk-T4JL735D.js.map +1 -0
- package/build/chunk-TAYZEZR6.js +4 -0
- package/build/chunk-TAYZEZR6.js.map +1 -0
- package/build/{chunk-ZNF7GN55.js → chunk-TIK7QUFJ.js} +47 -47
- package/build/chunk-TIK7QUFJ.js.map +1 -0
- package/build/{chunk-J4J4RXMY.js → chunk-U343CA3G.js} +2 -2
- package/build/{chunk-J4J4RXMY.js.map → chunk-U343CA3G.js.map} +1 -1
- package/build/{chunk-A47ABA7B.js → chunk-UJGKVZPY.js} +2 -2
- package/build/{chunk-K656WQZA.js → chunk-Z7AFBSZS.js} +1 -1
- package/build/chunk-Z7AFBSZS.js.map +1 -0
- package/build/{chunk-CUZEHDNU.js → chunk-ZKQ4ECXC.js} +2 -2
- package/build/chunk-ZKQ4ECXC.js.map +1 -0
- package/build/dev-SWU5Z4K7.js +47 -0
- package/build/dev-SWU5Z4K7.js.map +1 -0
- package/build/index.js +5 -5
- package/build/index.js.map +1 -1
- package/build/install-LUXGKYPY.js +4 -0
- package/build/install-LUXGKYPY.js.map +1 -0
- package/build/preview-4TUW247V.js +4 -0
- package/build/preview-4TUW247V.js.map +1 -0
- package/build/publish-4AEQZIB3.js +4 -0
- package/build/publish-4AEQZIB3.js.map +1 -0
- package/build/render-command-HDNAQLRA.js +4 -0
- package/build/render-command-HDNAQLRA.js.map +1 -0
- package/build/render-command-NUO5TPGR.js +4 -0
- package/build/render-command-NUO5TPGR.js.map +1 -0
- package/build/render-command-O3AJM5TP.js +4 -0
- package/build/run-command-JPWX3IS6.js +4 -0
- package/build/run-command-JPWX3IS6.js.map +1 -0
- package/build/src-3VVCCD5E.js +4 -0
- package/build/src-AFJWFYAO.js +4 -0
- package/build/src-AFJWFYAO.js.map +1 -0
- package/build/{src-QPWACH3J.js → src-EYNG7WNS.js} +2 -2
- package/build/{src-TBIN5XRV.js → src-PLSNGNQQ.js} +2 -2
- package/build/{src-7KKODZIY.js → src-WZKHASEF.js} +2 -2
- package/build/src-YZVHE5YE.js +4 -0
- package/build/{src-ZIMNO3M4.js → src-ZXBFFRDK.js} +2 -2
- package/build/sync-types-QSAUBUTI.js +4 -0
- package/build/uninstall-GS76M3XH.js +4 -0
- package/build/uninstall-GS76M3XH.js.map +1 -0
- package/build/{update-notifier-S5PQKIDE.js → update-notifier-LCY3CRNY.js} +2 -2
- package/package.json +2 -2
- package/build/DevCommand-74RYZYIJ.js +0 -4
- package/build/DevCommand-74RYZYIJ.js.map +0 -1
- package/build/DevCommand-LKSQSU4D.js +0 -4
- package/build/DevCommand-LKSQSU4D.js.map +0 -1
- package/build/LoginCommand-NYVD43UK.js +0 -4
- package/build/LoginCommand-NYVD43UK.js.map +0 -1
- package/build/LogoutCommand-S6XVACQ6.js +0 -4
- package/build/LogoutCommand-S6XVACQ6.js.map +0 -1
- package/build/WhoamiCommand-HOEXUJGJ.js +0 -4
- package/build/WhoamiCommand-HOEXUJGJ.js.map +0 -1
- package/build/chunk-4BTCJXQC.js.map +0 -1
- package/build/chunk-4NRHFR7Y.js +0 -4
- package/build/chunk-4NRHFR7Y.js.map +0 -1
- package/build/chunk-7WD47GXQ.js +0 -14
- package/build/chunk-7WD47GXQ.js.map +0 -1
- package/build/chunk-B7EXWRCM.js +0 -4
- package/build/chunk-B7EXWRCM.js.map +0 -1
- package/build/chunk-CUZEHDNU.js.map +0 -1
- package/build/chunk-E7Z3EVGI.js +0 -4
- package/build/chunk-E7Z3EVGI.js.map +0 -1
- package/build/chunk-EE5EBGQ7.js +0 -4
- package/build/chunk-EE5EBGQ7.js.map +0 -1
- package/build/chunk-EFB2I2BN.js +0 -32
- package/build/chunk-EFB2I2BN.js.map +0 -1
- package/build/chunk-FPM2JVPR.js +0 -4
- package/build/chunk-FPM2JVPR.js.map +0 -1
- package/build/chunk-JYYNYTCQ.js +0 -6
- package/build/chunk-JYYNYTCQ.js.map +0 -1
- package/build/chunk-K3QK4XYS.js +0 -4
- package/build/chunk-K656WQZA.js.map +0 -1
- package/build/chunk-KOIVBNZR.js +0 -4
- package/build/chunk-KOIVBNZR.js.map +0 -1
- package/build/chunk-TCTTRAWM.js +0 -6
- package/build/chunk-X3AOPEF4.js +0 -43
- package/build/chunk-X3AOPEF4.js.map +0 -1
- package/build/chunk-ZNF7GN55.js.map +0 -1
- package/build/dev-D6J7EO7H.js +0 -47
- package/build/dev-D6J7EO7H.js.map +0 -1
- package/build/install-WHE5Y4BG.js +0 -4
- package/build/install-WHE5Y4BG.js.map +0 -1
- package/build/preview-ODRKZ7BQ.js +0 -4
- package/build/preview-ODRKZ7BQ.js.map +0 -1
- package/build/publish-C25WIDKP.js +0 -4
- package/build/publish-C25WIDKP.js.map +0 -1
- package/build/render-command-7OROM33D.js +0 -4
- package/build/render-command-7OROM33D.js.map +0 -1
- package/build/render-command-UM6STUPA.js +0 -4
- package/build/render-command-UM6STUPA.js.map +0 -1
- package/build/render-command-YKD46BVP.js +0 -4
- package/build/run-command-YXYU45I7.js +0 -4
- package/build/run-command-YXYU45I7.js.map +0 -1
- package/build/src-7O5FMLWB.js +0 -4
- package/build/src-CJFU3UWU.js +0 -4
- package/build/src-CJFU3UWU.js.map +0 -1
- package/build/src-IFWA4LD7.js +0 -4
- package/build/sync-types-2XUVNMLY.js +0 -4
- package/build/uninstall-ZHKKF5EM.js +0 -4
- package/build/uninstall-ZHKKF5EM.js.map +0 -1
- /package/build/{chunk-SZ35DFLD.js.map → chunk-6JAOI72Q.js.map} +0 -0
- /package/build/{chunk-TLPEI3DE.js.map → chunk-C4I6VFE7.js.map} +0 -0
- /package/build/{chunk-EY7RCO4T.js.map → chunk-GCM6E6UB.js.map} +0 -0
- /package/build/{chunk-GZENQUN7.js.map → chunk-JPTOEPBL.js.map} +0 -0
- /package/build/{chunk-WICGWF4N.js.map → chunk-L3KGS4EW.js.map} +0 -0
- /package/build/{chunk-K3QK4XYS.js.map → chunk-LJGLNQKN.js.map} +0 -0
- /package/build/{chunk-TMNJT4K2.js.map → chunk-NOCPDXVB.js.map} +0 -0
- /package/build/{chunk-JGPN7XZF.js.map → chunk-P6O6SHMD.js.map} +0 -0
- /package/build/{chunk-A47ABA7B.js.map → chunk-UJGKVZPY.js.map} +0 -0
- /package/build/{render-command-YKD46BVP.js.map → render-command-O3AJM5TP.js.map} +0 -0
- /package/build/{src-IFWA4LD7.js.map → src-3VVCCD5E.js.map} +0 -0
- /package/build/{src-7KKODZIY.js.map → src-EYNG7WNS.js.map} +0 -0
- /package/build/{src-TBIN5XRV.js.map → src-PLSNGNQQ.js.map} +0 -0
- /package/build/{src-7O5FMLWB.js.map → src-WZKHASEF.js.map} +0 -0
- /package/build/{src-QPWACH3J.js.map → src-YZVHE5YE.js.map} +0 -0
- /package/build/{src-ZIMNO3M4.js.map → src-ZXBFFRDK.js.map} +0 -0
- /package/build/{sync-types-2XUVNMLY.js.map → sync-types-QSAUBUTI.js.map} +0 -0
- /package/build/{update-notifier-S5PQKIDE.js.map → update-notifier-LCY3CRNY.js.map} +0 -0
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { createRequire as _createRequire } from 'node:module';
|
|
2
|
+
const require = _createRequire(import.meta.url);
|
|
3
|
+
import{a as je,b as Be,c as It,e as N,f as xc,g as Lc,h as wc,i as $i,m as So,r as Fc,s as Dc,t as kc,u as Gc,v as Uc,x as Zi}from"./chunk-MCYLPYJV.js";import{b as fg,c as mg}from"./chunk-C4I6VFE7.js";import{d as ru}from"./chunk-TVMTOQUC.js";import{a as ut,b as $c,c as lt,d as pt,e as Zc,f as nr,g as sn,h as Nt,i as he,j as vo,k as an,l as ye,m as z,n as F,o as zc,p as Jc,q as Qc,r as eu,s as tu,t as nu,u as ue,v as ne}from"./chunk-J3IJS26Z.js";import{$ as Wc,$b as uu,Aa as O,Da as es,Ea as rr,F as Bc,Fa as cn,Ga as Le,Ka as ie,L as qc,Na as We,Oa as ze,Ta as ou,Tb as cu,Ua as iu,Va as su,Wb as Ao,Za as we,Zb as is,ab as ts,ac as un,bc as ss,cc as as,da as Vc,db as ns,dc as cs,eb as rs,fc as us,ga as er,gb as or,ha as Ji,ia as tr,j as Hc,ja as Kc,k as jc,ka as Yc,kb as os,ma as Qi,na as Xc,o as zi,p as yo,tb as au,v as on,w as U,ya as Pt,yb as Mt,za as qe}from"./chunk-CJ3JTOGS.js";import{b as Pc,c as Nc,d as Mc}from"./chunk-52Q35AIU.js";import{a as Eo,b as To}from"./chunk-ZKQ4ECXC.js";import{a as ho,b as Ki,c as Yi,d as Ic,e as Xi,g as _o,h as go}from"./chunk-CVDLBCEY.js";import{a as B,b as S,c as E,d as Vi,e as k,f as y,i as c}from"./chunk-UO4ZAUJK.js";function Ro(t){return t.setValue(gs,!0)}function Pg(t){return t.deleteValue(gs)}function _n(t){return t.getValue(gs)===!0}var gs,ar=S(()=>{"use strict";c();F();gs=lt("OpenTelemetry SDK Context Key SUPPRESS_TRACING")});var Eu,Io,gn,Po,Tu,Su,yu,Es=S(()=>{"use strict";c();Eu="=",Io=";",gn=",",Po="baggage",Tu=180,Su=4096,yu=8192});var ys={};Vi(ys,{getKeyPairs:()=>Ss,parseKeyPairsIntoRecord:()=>Mg,parsePairKeyValue:()=>No,serializeKeyPairs:()=>Ts});function Ts(t){return t.reduce(function(e,n){var r=""+e+(e!==""?gn:"")+n;return r.length>yu?e:r},"")}function Ss(t){return t.getAllEntries().map(function(e){var n=Ng(e,2),r=n[0],o=n[1],i=encodeURIComponent(r)+"="+encodeURIComponent(o.value);return o.metadata!==void 0&&(i+=Io+o.metadata.toString()),i})}function No(t){var e=t.split(Io);if(!(e.length<=0)){var n=e.shift();if(n){var r=n.indexOf(Eu);if(!(r<=0)){var o=decodeURIComponent(n.substring(0,r).trim()),i=decodeURIComponent(n.substring(r+1).trim()),s;return e.length>0&&(s=$c(e.join(Io))),{key:o,value:i,metadata:s}}}}}function Mg(t){return typeof t!="string"||t.length===0?{}:t.split(gn).map(function(e){return No(e)}).filter(function(e){return e!==void 0&&e.value.length>0}).reduce(function(e,n){return e[n.key]=n.value,e},{})}var Ng,vs=S(()=>{"use strict";c();F();Es();Ng=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),o,i=[],s;try{for(;(e===void 0||e-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return i}});var vu,Au=S(()=>{"use strict";c();F();ar();Es();vs();vu=function(){function t(){}return t.prototype.inject=function(e,n,r){var o=an.getBaggage(e);if(!(!o||_n(e))){var i=Ss(o).filter(function(a){return a.length<=Su}).slice(0,Tu),s=Ts(i);s.length>0&&r.set(n,Po,s)}},t.prototype.extract=function(e,n,r){var o=r.get(n,Po),i=Array.isArray(o)?o.join(gn):o;if(!i)return e;var s={};if(i.length===0)return e;var a=i.split(gn);return a.forEach(function(u){var l=No(u);if(l){var p={value:l.value};l.metadata&&(p.metadata=l.metadata),s[l.key]=p}}),Object.entries(s).length===0?e:an.setBaggage(e,an.createBaggage(s))},t.prototype.fields=function(){return[Po]},t}()});var xg,Ou=S(()=>{"use strict";c();xg=function(){function t(e,n){this._monotonicClock=n,this._epochMillis=e.now(),this._performanceMillis=n.now()}return t.prototype.now=function(){var e=this._monotonicClock.now()-this._performanceMillis;return this._epochMillis+e},t}()});function wg(t){var e,n,r={};if(typeof t!="object"||t==null)return r;try{for(var o=bu(Object.entries(t)),i=o.next();!i.done;i=o.next()){var s=Lg(i.value,2),a=s[0],u=s[1];if(!Cu(a)){he.warn("Invalid attribute key: "+a);continue}if(!Ru(u)){he.warn("Invalid attribute value set for key: "+a);continue}Array.isArray(u)?r[a]=u.slice():r[a]=u}}catch(l){e={error:l}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}return r}function Cu(t){return typeof t=="string"&&t.length>0}function Ru(t){return t==null?!0:Array.isArray(t)?Fg(t):Iu(t)}function Fg(t){var e,n,r;try{for(var o=bu(t),i=o.next();!i.done;i=o.next()){var s=i.value;if(s!=null){if(!r){if(Iu(s)){r=typeof s;continue}return!1}if(typeof s!==r)return!1}}}catch(a){e={error:a}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}return!0}function Iu(t){switch(typeof t){case"number":case"boolean":case"string":return!0}return!1}var bu,Lg,Pu=S(()=>{"use strict";c();F();bu=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Lg=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),o,i=[],s;try{for(;(e===void 0||e-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return i}});function As(){return function(t){he.error(Dg(t))}}function Dg(t){return typeof t=="string"?t:JSON.stringify(kg(t))}function kg(t){for(var e={},n=t;n!==null;)Object.getOwnPropertyNames(n).forEach(function(r){if(!e[r]){var o=n[r];o&&(e[r]=String(o))}}),n=Object.getPrototypeOf(n);return e}var Os=S(()=>{"use strict";c();F()});function Gg(t){Nu=t}function bs(t){try{Nu(t)}catch{}}var Nu,Cs=S(()=>{"use strict";c();Os();Nu=As()});var cr,Rs=S(()=>{"use strict";c();(function(t){t.AlwaysOff="always_off",t.AlwaysOn="always_on",t.ParentBasedAlwaysOff="parentbased_always_off",t.ParentBasedAlwaysOn="parentbased_always_on",t.ParentBasedTraceIdRatio="parentbased_traceidratio",t.TraceIdRatio="traceidratio"})(cr||(cr={}))});function jg(t){return Hg.indexOf(t)>-1}function qg(t){return Bg.indexOf(t)>-1}function Vg(t){return Wg.indexOf(t)>-1}function Kg(t,e,n){if(!(typeof n[t]>"u")){var r=String(n[t]);e[t]=r.toLowerCase()==="true"}}function Yg(t,e,n,r,o){if(r===void 0&&(r=-1/0),o===void 0&&(o=1/0),typeof n[t]<"u"){var i=Number(n[t]);isNaN(i)||(i<r?e[t]=r:i>o?e[t]=o:e[t]=i)}}function Xg(t,e,n,r){r===void 0&&(r=Ug);var o=n[t];typeof o=="string"&&(e[t]=o.split(r).map(function(i){return i.trim()}))}function Zg(t,e,n){var r=n[t];if(typeof r=="string"){var o=$g[r.toUpperCase()];o!=null&&(e[t]=o)}}function wo(t){var e={};for(var n in Lo){var r=n;switch(r){case"OTEL_LOG_LEVEL":Zg(r,e,t);break;default:if(jg(r))Kg(r,e,t);else if(qg(r))Yg(r,e,t);else if(Vg(r))Xg(r,e,t);else{var o=t[r];typeof o<"u"&&o!==null&&(e[r]=String(o))}}}return e}var Ug,Hg,Bg,Wg,Mo,xo,Mu,xu,Lo,$g,Is=S(()=>{"use strict";c();F();Rs();Ug=",",Hg=["OTEL_SDK_DISABLED"];Bg=["OTEL_BSP_EXPORT_TIMEOUT","OTEL_BSP_MAX_EXPORT_BATCH_SIZE","OTEL_BSP_MAX_QUEUE_SIZE","OTEL_BSP_SCHEDULE_DELAY","OTEL_BLRP_EXPORT_TIMEOUT","OTEL_BLRP_MAX_EXPORT_BATCH_SIZE","OTEL_BLRP_MAX_QUEUE_SIZE","OTEL_BLRP_SCHEDULE_DELAY","OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_ATTRIBUTE_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT","OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT","OTEL_SPAN_EVENT_COUNT_LIMIT","OTEL_SPAN_LINK_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT","OTEL_EXPORTER_OTLP_TIMEOUT","OTEL_EXPORTER_OTLP_TRACES_TIMEOUT","OTEL_EXPORTER_OTLP_METRICS_TIMEOUT","OTEL_EXPORTER_OTLP_LOGS_TIMEOUT","OTEL_EXPORTER_JAEGER_AGENT_PORT"];Wg=["OTEL_NO_PATCH_MODULES","OTEL_PROPAGATORS"];Mo=1/0,xo=128,Mu=128,xu=128,Lo={OTEL_SDK_DISABLED:!1,CONTAINER_NAME:"",ECS_CONTAINER_METADATA_URI_V4:"",ECS_CONTAINER_METADATA_URI:"",HOSTNAME:"",KUBERNETES_SERVICE_HOST:"",NAMESPACE:"",OTEL_BSP_EXPORT_TIMEOUT:3e4,OTEL_BSP_MAX_EXPORT_BATCH_SIZE:512,OTEL_BSP_MAX_QUEUE_SIZE:2048,OTEL_BSP_SCHEDULE_DELAY:5e3,OTEL_BLRP_EXPORT_TIMEOUT:3e4,OTEL_BLRP_MAX_EXPORT_BATCH_SIZE:512,OTEL_BLRP_MAX_QUEUE_SIZE:2048,OTEL_BLRP_SCHEDULE_DELAY:5e3,OTEL_EXPORTER_JAEGER_AGENT_HOST:"",OTEL_EXPORTER_JAEGER_AGENT_PORT:6832,OTEL_EXPORTER_JAEGER_ENDPOINT:"",OTEL_EXPORTER_JAEGER_PASSWORD:"",OTEL_EXPORTER_JAEGER_USER:"",OTEL_EXPORTER_OTLP_ENDPOINT:"",OTEL_EXPORTER_OTLP_TRACES_ENDPOINT:"",OTEL_EXPORTER_OTLP_METRICS_ENDPOINT:"",OTEL_EXPORTER_OTLP_LOGS_ENDPOINT:"",OTEL_EXPORTER_OTLP_HEADERS:"",OTEL_EXPORTER_OTLP_TRACES_HEADERS:"",OTEL_EXPORTER_OTLP_METRICS_HEADERS:"",OTEL_EXPORTER_OTLP_LOGS_HEADERS:"",OTEL_EXPORTER_OTLP_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_TRACES_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_METRICS_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_LOGS_TIMEOUT:1e4,OTEL_EXPORTER_ZIPKIN_ENDPOINT:"http://localhost:9411/api/v2/spans",OTEL_LOG_LEVEL:ut.INFO,OTEL_NO_PATCH_MODULES:[],OTEL_PROPAGATORS:["tracecontext","baggage"],OTEL_RESOURCE_ATTRIBUTES:"",OTEL_SERVICE_NAME:"",OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT:Mo,OTEL_ATTRIBUTE_COUNT_LIMIT:xo,OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT:Mo,OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT:xo,OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT:Mo,OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT:xo,OTEL_SPAN_EVENT_COUNT_LIMIT:128,OTEL_SPAN_LINK_COUNT_LIMIT:128,OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT:Mu,OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT:xu,OTEL_TRACES_EXPORTER:"",OTEL_TRACES_SAMPLER:cr.ParentBasedAlwaysOn,OTEL_TRACES_SAMPLER_ARG:"",OTEL_LOGS_EXPORTER:"",OTEL_EXPORTER_OTLP_INSECURE:"",OTEL_EXPORTER_OTLP_TRACES_INSECURE:"",OTEL_EXPORTER_OTLP_METRICS_INSECURE:"",OTEL_EXPORTER_OTLP_LOGS_INSECURE:"",OTEL_EXPORTER_OTLP_CERTIFICATE:"",OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE:"",OTEL_EXPORTER_OTLP_METRICS_CERTIFICATE:"",OTEL_EXPORTER_OTLP_LOGS_CERTIFICATE:"",OTEL_EXPORTER_OTLP_COMPRESSION:"",OTEL_EXPORTER_OTLP_TRACES_COMPRESSION:"",OTEL_EXPORTER_OTLP_METRICS_COMPRESSION:"",OTEL_EXPORTER_OTLP_LOGS_COMPRESSION:"",OTEL_EXPORTER_OTLP_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_TRACES_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_METRICS_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_LOGS_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_TRACES_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_METRICS_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_LOGS_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_TRACES_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_METRICS_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_LOGS_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE:"cumulative"};$g={ALL:ut.ALL,VERBOSE:ut.VERBOSE,DEBUG:ut.DEBUG,INFO:ut.INFO,WARN:ut.WARN,ERROR:ut.ERROR,NONE:ut.NONE}});function Lu(){var t=wo(process.env);return Object.assign({},Lo,t)}function wu(){return wo(process.env)}var Fu=S(()=>{"use strict";c();Is()});var zg,Du=S(()=>{"use strict";c();zg=typeof globalThis=="object"?globalThis:global});function ku(t){return t>=48&&t<=57?t-48:t>=97&&t<=102?t-87:t-55}function Ps(t){for(var e=new Uint8Array(t.length/2),n=0,r=0;r<t.length;r+=2){var o=ku(t.charCodeAt(r)),i=ku(t.charCodeAt(r+1));e[n++]=o<<4|i}return e}var Ns=S(()=>{"use strict";c()});function Jg(t){return Buffer.from(Ps(t)).toString("base64")}var Gu=S(()=>{"use strict";c();Ns()});function Uu(t){return function(){for(var n=0;n<t/4;n++)Fo.writeUInt32BE(Math.random()*Math.pow(2,32)>>>0,n*4);for(var n=0;n<t&&!(Fo[n]>0);n++)n===t-1&&(Fo[t-1]=1);return Fo.toString("hex",0,t)}}var Qg,Hu,eE,Fo,ju=S(()=>{"use strict";c();Qg=8,Hu=16,eE=function(){function t(){this.generateTraceId=Uu(Hu),this.generateSpanId=Uu(Qg)}return t}(),Fo=Buffer.allocUnsafe(Hu)});import{performance as tE}from"perf_hooks";var ur,Bu=S(()=>{"use strict";c();ur=tE});var Ms,xs=S(()=>{"use strict";c();Ms="1.25.1"});var En,nE,qu=S(()=>{"use strict";c();xs();ne();nE=(En={},En[Qc]="opentelemetry",En[Jc]="node",En[eu]=nu,En[tu]=Ms,En)});function rE(t){t.unref()}var Wu=S(()=>{"use strict";c()});var Vu=S(()=>{"use strict";c();Fu();Du();Gu();ju();Bu();qu();Wu()});var Ls=S(()=>{"use strict";c();Vu()});function lr(t){var e=t/1e3,n=Math.trunc(e),r=Math.round(t%1e3*iE);return[n,r]}function ws(){var t=ur.timeOrigin;if(typeof t!="number"){var e=ur;t=e.timing&&e.timing.fetchStart}return t}function Yu(t){var e=lr(ws()),n=lr(typeof t=="number"?t:ur.now());return Xu(e,n)}function sE(t){if(Fs(t))return t;if(typeof t=="number")return t<ws()?Yu(t):lr(t);if(t instanceof Date)return lr(t.getTime());throw TypeError("Invalid input type")}function aE(t,e){var n=e[0]-t[0],r=e[1]-t[1];return r<0&&(n-=1,r+=Do),[n,r]}function cE(t){var e=Ku,n=""+"0".repeat(e)+t[1]+"Z",r=n.substr(n.length-e-1),o=new Date(t[0]*1e3).toISOString();return o.replace("000Z",r)}function uE(t){return t[0]*Do+t[1]}function lE(t){return t[0]*1e3+t[1]/1e6}function pE(t){return t[0]*1e6+t[1]/1e3}function Fs(t){return Array.isArray(t)&&t.length===2&&typeof t[0]=="number"&&typeof t[1]=="number"}function dE(t){return Fs(t)||typeof t=="number"||t instanceof Date}function Xu(t,e){var n=[t[0]+e[0],t[1]+e[1]];return n[1]>=Do&&(n[1]-=Do,n[0]+=1),n}var Ku,oE,iE,Do,$u=S(()=>{"use strict";c();Ls();Ku=9,oE=6,iE=Math.pow(10,oE),Do=Math.pow(10,Ku)});var Zu=S(()=>{"use strict";c()});var Ds,zu=S(()=>{"use strict";c();(function(t){t[t.SUCCESS=0]="SUCCESS",t[t.FAILED=1]="FAILED"})(Ds||(Ds={}))});var fE,mE,Ju=S(()=>{"use strict";c();F();fE=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},mE=function(){function t(e){e===void 0&&(e={});var n;this._propagators=(n=e.propagators)!==null&&n!==void 0?n:[],this._fields=Array.from(new Set(this._propagators.map(function(r){return typeof r.fields=="function"?r.fields():[]}).reduce(function(r,o){return r.concat(o)},[])))}return t.prototype.inject=function(e,n,r){var o,i;try{for(var s=fE(this._propagators),a=s.next();!a.done;a=s.next()){var u=a.value;try{u.inject(e,n,r)}catch(l){he.warn("Failed to inject with "+u.constructor.name+". Err: "+l.message)}}}catch(l){o={error:l}}finally{try{a&&!a.done&&(i=s.return)&&i.call(s)}finally{if(o)throw o.error}}},t.prototype.extract=function(e,n,r){return this._propagators.reduce(function(o,i){try{return i.extract(o,n,r)}catch(s){he.warn("Failed to inject with "+i.constructor.name+". Err: "+s.message)}return o},e)},t.prototype.fields=function(){return this._fields.slice()},t}()});function Qu(t){return gE.test(t)}function el(t){return EE.test(t)&&!TE.test(t)}var ks,hE,_E,gE,EE,TE,tl=S(()=>{"use strict";c();ks="[_0-9a-z-*/]",hE="[a-z]"+ks+"{0,255}",_E="[a-z0-9]"+ks+"{0,240}@[a-z]"+ks+"{0,13}",gE=new RegExp("^(?:"+hE+"|"+_E+")$"),EE=/^[ -~]{0,255}[!-~]$/,TE=/,|=/});var nl,SE,rl,ol,pr,Gs=S(()=>{"use strict";c();tl();nl=32,SE=512,rl=",",ol="=",pr=function(){function t(e){this._internalState=new Map,e&&this._parse(e)}return t.prototype.set=function(e,n){var r=this._clone();return r._internalState.has(e)&&r._internalState.delete(e),r._internalState.set(e,n),r},t.prototype.unset=function(e){var n=this._clone();return n._internalState.delete(e),n},t.prototype.get=function(e){return this._internalState.get(e)},t.prototype.serialize=function(){var e=this;return this._keys().reduce(function(n,r){return n.push(r+ol+e.get(r)),n},[]).join(rl)},t.prototype._parse=function(e){e.length>SE||(this._internalState=e.split(rl).reverse().reduce(function(n,r){var o=r.trim(),i=o.indexOf(ol);if(i!==-1){var s=o.slice(0,i),a=o.slice(i+1,r.length);Qu(s)&&el(a)&&n.set(s,a)}return n},new Map),this._internalState.size>nl&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,nl))))},t.prototype._keys=function(){return Array.from(this._internalState.keys()).reverse()},t.prototype._clone=function(){var e=new t;return e._internalState=new Map(this._internalState),e},t}()});function il(t){var e=CE.exec(t);return!e||e[1]==="00"&&e[5]?null:{traceId:e[2],spanId:e[3],traceFlags:parseInt(e[4],16)}}var ko,Go,yE,vE,AE,OE,bE,CE,RE,sl=S(()=>{"use strict";c();F();ar();Gs();ko="traceparent",Go="tracestate",yE="00",vE="(?!ff)[\\da-f]{2}",AE="(?![0]{32})[\\da-f]{32}",OE="(?![0]{16})[\\da-f]{16}",bE="[\\da-f]{2}",CE=new RegExp("^\\s?("+vE+")-("+AE+")-("+OE+")-("+bE+")(-.*)?\\s?$");RE=function(){function t(){}return t.prototype.inject=function(e,n,r){var o=ye.getSpanContext(e);if(!(!o||_n(e)||!nr(o))){var i=yE+"-"+o.traceId+"-"+o.spanId+"-0"+Number(o.traceFlags||pt.NONE).toString(16);r.set(n,ko,i),o.traceState&&r.set(n,Go,o.traceState.serialize())}},t.prototype.extract=function(e,n,r){var o=r.get(n,ko);if(!o)return e;var i=Array.isArray(o)?o[0]:o;if(typeof i!="string")return e;var s=il(i);if(!s)return e;s.isRemote=!0;var a=r.get(n,Go);if(a){var u=Array.isArray(a)?a.join(","):a;s.traceState=new pr(typeof u=="string"?u:void 0)}return ye.setSpanContext(e,s)},t.prototype.fields=function(){return[ko,Go]},t}()});var al=S(()=>{"use strict";c()});function IE(t,e){return t.setValue(Hs,e)}function PE(t){return t.deleteValue(Hs)}function NE(t){return t.getValue(Hs)}var Hs,Us,cl=S(()=>{"use strict";c();F();Hs=lt("OpenTelemetry SDK Context Key RPC_METADATA");(function(t){t.HTTP="http"})(Us||(Us={}))});var Uo,js=S(()=>{"use strict";c();F();Uo=function(){function t(){}return t.prototype.shouldSample=function(){return{decision:sn.NOT_RECORD}},t.prototype.toString=function(){return"AlwaysOffSampler"},t}()});var dr,Bs=S(()=>{"use strict";c();F();dr=function(){function t(){}return t.prototype.shouldSample=function(){return{decision:sn.RECORD_AND_SAMPLED}},t.prototype.toString=function(){return"AlwaysOnSampler"},t}()});var ME,ul=S(()=>{"use strict";c();F();Cs();js();Bs();ME=function(){function t(e){var n,r,o,i;this._root=e.root,this._root||(bs(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new dr),this._remoteParentSampled=(n=e.remoteParentSampled)!==null&&n!==void 0?n:new dr,this._remoteParentNotSampled=(r=e.remoteParentNotSampled)!==null&&r!==void 0?r:new Uo,this._localParentSampled=(o=e.localParentSampled)!==null&&o!==void 0?o:new dr,this._localParentNotSampled=(i=e.localParentNotSampled)!==null&&i!==void 0?i:new Uo}return t.prototype.shouldSample=function(e,n,r,o,i,s){var a=ye.getSpanContext(e);return!a||!nr(a)?this._root.shouldSample(e,n,r,o,i,s):a.isRemote?a.traceFlags&pt.SAMPLED?this._remoteParentSampled.shouldSample(e,n,r,o,i,s):this._remoteParentNotSampled.shouldSample(e,n,r,o,i,s):a.traceFlags&pt.SAMPLED?this._localParentSampled.shouldSample(e,n,r,o,i,s):this._localParentNotSampled.shouldSample(e,n,r,o,i,s)},t.prototype.toString=function(){return"ParentBased{root="+this._root.toString()+", remoteParentSampled="+this._remoteParentSampled.toString()+", remoteParentNotSampled="+this._remoteParentNotSampled.toString()+", localParentSampled="+this._localParentSampled.toString()+", localParentNotSampled="+this._localParentNotSampled.toString()+"}"},t}()});var xE,ll=S(()=>{"use strict";c();F();xE=function(){function t(e){e===void 0&&(e=0),this._ratio=e,this._ratio=this._normalize(e),this._upperBound=Math.floor(this._ratio*4294967295)}return t.prototype.shouldSample=function(e,n){return{decision:Zc(n)&&this._accumulate(n)<this._upperBound?sn.RECORD_AND_SAMPLED:sn.NOT_RECORD}},t.prototype.toString=function(){return"TraceIdRatioBased{"+this._ratio+"}"},t.prototype._normalize=function(e){return typeof e!="number"||isNaN(e)?0:e>=1?1:e<=0?0:e},t.prototype._accumulate=function(e){for(var n=0,r=0;r<e.length/8;r++){var o=r*8,i=parseInt(e.slice(o,o+8),16);n=(n^i)>>>0}return n},t}()});function UE(t,e){return function(n){return t(e(n))}}function qs(t){if(!HE(t)||jE(t)!==LE)return!1;var e=GE(t);if(e===null)return!0;var n=fl.call(e,"constructor")&&e.constructor;return typeof n=="function"&&n instanceof n&&pl.call(n)===kE}function HE(t){return t!=null&&typeof t=="object"}function jE(t){return t==null?t===void 0?FE:wE:ln&&ln in Object(t)?BE(t):qE(t)}function BE(t){var e=fl.call(t,ln),n=t[ln],r=!1;try{t[ln]=void 0,r=!0}catch{}var o=ml.call(t);return r&&(e?t[ln]=n:delete t[ln]),o}function qE(t){return ml.call(t)}var LE,wE,FE,DE,pl,kE,GE,dl,fl,ln,ml,hl=S(()=>{"use strict";c();LE="[object Object]",wE="[object Null]",FE="[object Undefined]",DE=Function.prototype,pl=DE.toString,kE=pl.call(Object),GE=UE(Object.getPrototypeOf,Object),dl=Object.prototype,fl=dl.hasOwnProperty,ln=Symbol?Symbol.toStringTag:void 0,ml=dl.toString});function VE(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n=t.shift(),r=new WeakMap;t.length>0;)n=gl(n,t.shift(),0,r);return n}function Ws(t){return jo(t)?t.slice():t}function gl(t,e,n,r){n===void 0&&(n=0);var o;if(!(n>WE)){if(n++,Ho(t)||Ho(e)||El(e))o=Ws(e);else if(jo(t)){if(o=t.slice(),jo(e))for(var i=0,s=e.length;i<s;i++)o.push(Ws(e[i]));else if(fr(e))for(var a=Object.keys(e),i=0,s=a.length;i<s;i++){var u=a[i];o[u]=Ws(e[u])}}else if(fr(t))if(fr(e)){if(!KE(t,e))return e;o=Object.assign({},t);for(var a=Object.keys(e),i=0,s=a.length;i<s;i++){var u=a[i],l=e[u];if(Ho(l))typeof l>"u"?delete o[u]:o[u]=l;else{var p=o[u],d=l;if(_l(t,u,r)||_l(e,u,r))delete o[u];else{if(fr(p)&&fr(d)){var m=r.get(p)||[],h=r.get(d)||[];m.push({obj:t,key:u}),h.push({obj:e,key:u}),r.set(p,m),r.set(d,h)}o[u]=gl(o[u],l,n,r)}}}}else o=e;return o}}function _l(t,e,n){for(var r=n.get(t[e])||[],o=0,i=r.length;o<i;o++){var s=r[o];if(s.key===e&&s.obj===t)return!0}return!1}function jo(t){return Array.isArray(t)}function El(t){return typeof t=="function"}function fr(t){return!Ho(t)&&!jo(t)&&!El(t)&&typeof t=="object"}function Ho(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t>"u"||t instanceof Date||t instanceof RegExp||t===null}function KE(t,e){return!(!qs(t)||!qs(e))}var WE,Tl=S(()=>{"use strict";c();hl();WE=20});function XE(t,e){var n,r=new Promise(function(i,s){n=setTimeout(function(){s(new Sl("Operation timed out."))},e)});return Promise.race([t,r]).then(function(o){return clearTimeout(n),o},function(o){throw clearTimeout(n),o})}var YE,Sl,yl=S(()=>{"use strict";c();YE=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Sl=function(t){YE(e,t);function e(n){var r=t.call(this,n)||this;return Object.setPrototypeOf(r,e.prototype),r}return e}(Error)});function vl(t,e){return typeof e=="string"?t===e:!!t.match(e)}function ZE(t,e){var n,r;if(!e)return!1;try{for(var o=$E(e),i=o.next();!i.done;i=o.next()){var s=i.value;if(vl(t,s))return!0}}catch(a){n={error:a}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return!1}var $E,Al=S(()=>{"use strict";c();$E=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}});function zE(t){return typeof t=="function"&&typeof t.__original=="function"&&typeof t.__unwrap=="function"&&t.__wrapped===!0}var Ol=S(()=>{"use strict";c()});var bl,Cl=S(()=>{"use strict";c();bl=function(){function t(){var e=this;this._promise=new Promise(function(n,r){e._resolve=n,e._reject=r})}return Object.defineProperty(t.prototype,"promise",{get:function(){return this._promise},enumerable:!1,configurable:!0}),t.prototype.resolve=function(e){this._resolve(e)},t.prototype.reject=function(e){this._reject(e)},t}()});var JE,QE,eT,Rl=S(()=>{"use strict";c();Cl();JE=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),o,i=[],s;try{for(;(e===void 0||e-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return i},QE=function(t,e,n){if(n||arguments.length===2)for(var r=0,o=e.length,i;r<o;r++)(i||!(r in e))&&(i||(i=Array.prototype.slice.call(e,0,r)),i[r]=e[r]);return t.concat(i||Array.prototype.slice.call(e))},eT=function(){function t(e,n){this._callback=e,this._that=n,this._isCalled=!1,this._deferred=new bl}return Object.defineProperty(t.prototype,"isCalled",{get:function(){return this._isCalled},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"promise",{get:function(){return this._deferred.promise},enumerable:!1,configurable:!0}),t.prototype.call=function(){for(var e,n=this,r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];if(!this._isCalled){this._isCalled=!0;try{Promise.resolve((e=this._callback).call.apply(e,QE([this._that],JE(r),!1))).then(function(i){return n._deferred.resolve(i)},function(i){return n._deferred.reject(i)})}catch(i){this._deferred.reject(i)}}return this._deferred.promise},t}()});function Il(t,e){return new Promise(function(n){Nt.with(Ro(Nt.active()),function(){t.export(e,function(r){n(r)})})})}var Pl=S(()=>{"use strict";c();F();ar()});var Ve={};Vi(Ve,{AlwaysOffSampler:()=>Uo,AlwaysOnSampler:()=>dr,AnchoredClock:()=>xg,BindOnceFuture:()=>eT,CompositePropagator:()=>mE,DEFAULT_ATTRIBUTE_COUNT_LIMIT:()=>xo,DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT:()=>Mo,DEFAULT_ENVIRONMENT:()=>Lo,DEFAULT_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT:()=>Mu,DEFAULT_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT:()=>xu,ExportResultCode:()=>Ds,ParentBasedSampler:()=>ME,RPCType:()=>Us,RandomIdGenerator:()=>eE,SDK_INFO:()=>nE,TRACE_PARENT_HEADER:()=>ko,TRACE_STATE_HEADER:()=>Go,TimeoutError:()=>Sl,TraceIdRatioBasedSampler:()=>xE,TraceState:()=>pr,TracesSamplerValues:()=>cr,VERSION:()=>Ms,W3CBaggagePropagator:()=>vu,W3CTraceContextPropagator:()=>RE,_globalThis:()=>zg,addHrTimes:()=>Xu,baggageUtils:()=>ys,callWithTimeout:()=>XE,deleteRPCMetadata:()=>PE,getEnv:()=>Lu,getEnvWithoutDefaults:()=>wu,getRPCMetadata:()=>NE,getTimeOrigin:()=>ws,globalErrorHandler:()=>bs,hexToBase64:()=>Jg,hexToBinary:()=>Ps,hrTime:()=>Yu,hrTimeDuration:()=>aE,hrTimeToMicroseconds:()=>pE,hrTimeToMilliseconds:()=>lE,hrTimeToNanoseconds:()=>uE,hrTimeToTimeStamp:()=>cE,internal:()=>tT,isAttributeKey:()=>Cu,isAttributeValue:()=>Ru,isTimeInput:()=>dE,isTimeInputHrTime:()=>Fs,isTracingSuppressed:()=>_n,isUrlIgnored:()=>ZE,isWrapped:()=>zE,loggingErrorHandler:()=>As,merge:()=>VE,millisToHrTime:()=>lr,otperformance:()=>ur,parseEnvironment:()=>wo,parseTraceParent:()=>il,sanitizeAttributes:()=>wg,setGlobalErrorHandler:()=>Gg,setRPCMetadata:()=>IE,suppressTracing:()=>Ro,timeInputToHrTime:()=>sE,unrefTimer:()=>rE,unsuppressTracing:()=>Pg,urlMatches:()=>vl});var tT,Fe=S(()=>{"use strict";c();Au();Ou();Pu();Cs();Os();$u();Zu();Ns();zu();vs();Ls();Ju();sl();al();cl();js();Bs();ul();ll();ar();Gs();Is();Tl();Rs();yl();Al();Ol();Rl();xs();Pl();tT={_export:Il}});var Nl=E(mr=>{"use strict";c();Object.defineProperty(mr,"__esModule",{value:!0});mr.AttributeNames=void 0;var nT;(function(t){t.HTTP_ERROR_NAME="http.error_name",t.HTTP_ERROR_MESSAGE="http.error_message",t.HTTP_STATUS_TEXT="http.status_text"})(nT=mr.AttributeNames||(mr.AttributeNames={}))});var Vs=E(I=>{"use strict";c();Object.defineProperty(I,"__esModule",{value:!0});I.headerCapture=I.getIncomingRequestMetricAttributesOnResponse=I.getIncomingRequestAttributesOnResponse=I.getIncomingRequestMetricAttributes=I.getIncomingRequestAttributes=I.getOutgoingRequestMetricAttributesOnResponse=I.getOutgoingRequestAttributesOnResponse=I.setAttributesFromHttpKind=I.getOutgoingRequestMetricAttributes=I.getOutgoingRequestAttributes=I.extractHostnameAndPort=I.isValidOptionsType=I.getRequestInfo=I.isCompressed=I.setResponseContentLengthAttribute=I.setRequestContentLengthAttribute=I.setSpanWithError=I.isIgnored=I.satisfiesPattern=I.parseResponseStatus=I.getAbsoluteUrl=void 0;var hr=(F(),y(z)),b=(ne(),y(ue)),Ml=(Fe(),y(Ve)),Bo=B("url"),qo=Nl(),rT=(t,e,n="http:")=>{let r=t||{},o=r.protocol||n,i=(r.port||"").toString(),s=r.path||"/",a=r.host||r.hostname||e.host||"localhost";return a.indexOf(":")===-1&&i&&i!=="80"&&i!=="443"&&(a+=`:${i}`),`${o}//${a}${s}`};I.getAbsoluteUrl=rT;var oT=(t,e)=>{let n=t===hr.SpanKind.CLIENT?400:500;return e&&e>=100&&e<n?hr.SpanStatusCode.UNSET:hr.SpanStatusCode.ERROR};I.parseResponseStatus=oT;var iT=(t,e)=>{if(typeof e=="string")return e===t;if(e instanceof RegExp)return e.test(t);if(typeof e=="function")return e(t);throw new TypeError("Pattern is in unsupported datatype")};I.satisfiesPattern=iT;var sT=(t,e,n)=>{if(!e)return!1;try{for(let r of e)if((0,I.satisfiesPattern)(t,r))return!0}catch(r){n&&n(r)}return!1};I.isIgnored=sT;var aT=(t,e)=>{let n=e.message;t.setAttribute(qo.AttributeNames.HTTP_ERROR_NAME,e.name),t.setAttribute(qo.AttributeNames.HTTP_ERROR_MESSAGE,n),t.setStatus({code:hr.SpanStatusCode.ERROR,message:n}),t.recordException(e)};I.setSpanWithError=aT;var cT=(t,e)=>{let n=xl(t.headers);n!==null&&((0,I.isCompressed)(t.headers)?e[b.SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH]=n:e[b.SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED]=n)};I.setRequestContentLengthAttribute=cT;var uT=(t,e)=>{let n=xl(t.headers);n!==null&&((0,I.isCompressed)(t.headers)?e[b.SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH]=n:e[b.SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED]=n)};I.setResponseContentLengthAttribute=uT;function xl(t){let e=t["content-length"];if(e===void 0)return null;let n=parseInt(e,10);return isNaN(n)?null:n}var lT=t=>{let e=t["content-encoding"];return!!e&&e!=="identity"};I.isCompressed=lT;var pT=(t,e)=>{let n="/",r="",o;if(typeof t=="string")o=Bo.parse(t),n=o.pathname||"/",r=`${o.protocol||"http:"}//${o.host}`,e!==void 0&&Object.assign(o,e);else if(t instanceof Bo.URL)o={protocol:t.protocol,hostname:typeof t.hostname=="string"&&t.hostname.startsWith("[")?t.hostname.slice(1,-1):t.hostname,path:`${t.pathname||""}${t.search||""}`},t.port!==""&&(o.port=Number(t.port)),(t.username||t.password)&&(o.auth=`${t.username}:${t.password}`),n=t.pathname,r=t.origin,e!==void 0&&Object.assign(o,e);else{o=Object.assign({protocol:t.host?"http:":void 0},t),n=t.pathname,!n&&o.path&&(n=Bo.parse(o.path).pathname||"/");let s=o.host||(o.port!=null?`${o.hostname}${o.port}`:o.hostname);r=`${o.protocol||"http:"}//${s}`}let i=o.method?o.method.toUpperCase():"GET";return{origin:r,pathname:n,method:i,optionsParsed:o}};I.getRequestInfo=pT;var dT=t=>{if(!t)return!1;let e=typeof t;return e==="string"||e==="object"&&!Array.isArray(t)};I.isValidOptionsType=dT;var fT=t=>{var e;if(t.hostname&&t.port)return{hostname:t.hostname,port:t.port};let n=((e=t.host)===null||e===void 0?void 0:e.match(/^([^:/ ]+)(:\d{1,5})?/))||null,r=t.hostname||(n===null?"localhost":n[1]),o=t.port;return o||(n&&n[2]?o=n[2].substring(1):o=t.protocol==="https:"?"443":"80"),{hostname:r,port:o}};I.extractHostnameAndPort=fT;var mT=(t,e)=>{var n;let r=e.hostname,o=e.port,i=t.method,s=i?i.toUpperCase():"GET",a=t.headers||{},u=a["user-agent"],l={[b.SEMATTRS_HTTP_URL]:(0,I.getAbsoluteUrl)(t,a,`${e.component}:`),[b.SEMATTRS_HTTP_METHOD]:s,[b.SEMATTRS_HTTP_TARGET]:t.path||"/",[b.SEMATTRS_NET_PEER_NAME]:r,[b.SEMATTRS_HTTP_HOST]:(n=a.host)!==null&&n!==void 0?n:`${r}:${o}`};return u!==void 0&&(l[b.SEMATTRS_HTTP_USER_AGENT]=u),Object.assign(l,e.hookAttributes)};I.getOutgoingRequestAttributes=mT;var hT=t=>{let e={};return e[b.SEMATTRS_HTTP_METHOD]=t[b.SEMATTRS_HTTP_METHOD],e[b.SEMATTRS_NET_PEER_NAME]=t[b.SEMATTRS_NET_PEER_NAME],e};I.getOutgoingRequestMetricAttributes=hT;var _T=(t,e)=>{t&&(e[b.SEMATTRS_HTTP_FLAVOR]=t,t.toUpperCase()!=="QUIC"?e[b.SEMATTRS_NET_TRANSPORT]=b.NETTRANSPORTVALUES_IP_TCP:e[b.SEMATTRS_NET_TRANSPORT]=b.NETTRANSPORTVALUES_IP_UDP)};I.setAttributesFromHttpKind=_T;var gT=t=>{let{statusCode:e,statusMessage:n,httpVersion:r,socket:o}=t,i={};if(o){let{remoteAddress:s,remotePort:a}=o;i[b.SEMATTRS_NET_PEER_IP]=s,i[b.SEMATTRS_NET_PEER_PORT]=a}return(0,I.setResponseContentLengthAttribute)(t,i),e&&(i[b.SEMATTRS_HTTP_STATUS_CODE]=e,i[qo.AttributeNames.HTTP_STATUS_TEXT]=(n||"").toUpperCase()),(0,I.setAttributesFromHttpKind)(r,i),i};I.getOutgoingRequestAttributesOnResponse=gT;var ET=t=>{let e={};return e[b.SEMATTRS_NET_PEER_PORT]=t[b.SEMATTRS_NET_PEER_PORT],e[b.SEMATTRS_HTTP_STATUS_CODE]=t[b.SEMATTRS_HTTP_STATUS_CODE],e[b.SEMATTRS_HTTP_FLAVOR]=t[b.SEMATTRS_HTTP_FLAVOR],e};I.getOutgoingRequestMetricAttributesOnResponse=ET;var TT=(t,e)=>{let n=t.headers,r=n["user-agent"],o=n["x-forwarded-for"],i=t.method||"GET",s=t.httpVersion,a=t.url?Bo.parse(t.url):null,u=a?.host||n.host,l=a?.hostname||u?.replace(/^(.*)(:[0-9]{1,5})/,"$1")||"localhost",p=e.serverName,d={[b.SEMATTRS_HTTP_URL]:(0,I.getAbsoluteUrl)(a,n,`${e.component}:`),[b.SEMATTRS_HTTP_HOST]:u,[b.SEMATTRS_NET_HOST_NAME]:l,[b.SEMATTRS_HTTP_METHOD]:i,[b.SEMATTRS_HTTP_SCHEME]:e.component};return typeof o=="string"&&(d[b.SEMATTRS_HTTP_CLIENT_IP]=o.split(",")[0]),typeof p=="string"&&(d[b.SEMATTRS_HTTP_SERVER_NAME]=p),a&&(d[b.SEMATTRS_HTTP_TARGET]=a.path||"/"),r!==void 0&&(d[b.SEMATTRS_HTTP_USER_AGENT]=r),(0,I.setRequestContentLengthAttribute)(t,d),(0,I.setAttributesFromHttpKind)(s,d),Object.assign(d,e.hookAttributes)};I.getIncomingRequestAttributes=TT;var ST=t=>{let e={};return e[b.SEMATTRS_HTTP_SCHEME]=t[b.SEMATTRS_HTTP_SCHEME],e[b.SEMATTRS_HTTP_METHOD]=t[b.SEMATTRS_HTTP_METHOD],e[b.SEMATTRS_NET_HOST_NAME]=t[b.SEMATTRS_NET_HOST_NAME],e[b.SEMATTRS_HTTP_FLAVOR]=t[b.SEMATTRS_HTTP_FLAVOR],e};I.getIncomingRequestMetricAttributes=ST;var yT=(t,e)=>{let{socket:n}=t,{statusCode:r,statusMessage:o}=e,i=(0,Ml.getRPCMetadata)(hr.context.active()),s={};if(n){let{localAddress:a,localPort:u,remoteAddress:l,remotePort:p}=n;s[b.SEMATTRS_NET_HOST_IP]=a,s[b.SEMATTRS_NET_HOST_PORT]=u,s[b.SEMATTRS_NET_PEER_IP]=l,s[b.SEMATTRS_NET_PEER_PORT]=p}return s[b.SEMATTRS_HTTP_STATUS_CODE]=r,s[qo.AttributeNames.HTTP_STATUS_TEXT]=(o||"").toUpperCase(),i?.type===Ml.RPCType.HTTP&&i.route!==void 0&&(s[b.SEMATTRS_HTTP_ROUTE]=i.route),s};I.getIncomingRequestAttributesOnResponse=yT;var vT=t=>{let e={};return e[b.SEMATTRS_HTTP_STATUS_CODE]=t[b.SEMATTRS_HTTP_STATUS_CODE],e[b.SEMATTRS_NET_HOST_PORT]=t[b.SEMATTRS_NET_HOST_PORT],t[b.SEMATTRS_HTTP_ROUTE]!==void 0&&(e[b.SEMATTRS_HTTP_ROUTE]=t[b.SEMATTRS_HTTP_ROUTE]),e};I.getIncomingRequestMetricAttributesOnResponse=vT;function AT(t,e){let n=new Map;for(let r=0,o=e.length;r<o;r++){let i=e[r].toLowerCase();n.set(i,i.replace(/-/g,"_"))}return(r,o)=>{for(let i of n.keys()){let s=o(i);if(s===void 0)continue;let a=n.get(i),u=`http.${t}.header.${a}`;typeof s=="string"?r.setAttribute(u,[s]):Array.isArray(s)?r.setAttribute(u,s):r.setAttribute(u,[s])}}}I.headerCapture=AT});var Ll=E(Wo=>{"use strict";c();Object.defineProperty(Wo,"__esModule",{value:!0});Wo.VERSION=void 0;Wo.VERSION="0.52.1"});var wl=S(()=>{"use strict";c()});var Fl=S(()=>{"use strict";c()});var Dl,kl=S(()=>{"use strict";c();(function(t){t[t.UNSPECIFIED=0]="UNSPECIFIED",t[t.TRACE=1]="TRACE",t[t.TRACE2=2]="TRACE2",t[t.TRACE3=3]="TRACE3",t[t.TRACE4=4]="TRACE4",t[t.DEBUG=5]="DEBUG",t[t.DEBUG2=6]="DEBUG2",t[t.DEBUG3=7]="DEBUG3",t[t.DEBUG4=8]="DEBUG4",t[t.INFO=9]="INFO",t[t.INFO2=10]="INFO2",t[t.INFO3=11]="INFO3",t[t.INFO4=12]="INFO4",t[t.WARN=13]="WARN",t[t.WARN2=14]="WARN2",t[t.WARN3=15]="WARN3",t[t.WARN4=16]="WARN4",t[t.ERROR=17]="ERROR",t[t.ERROR2=18]="ERROR2",t[t.ERROR3=19]="ERROR3",t[t.ERROR4=20]="ERROR4",t[t.FATAL=21]="FATAL",t[t.FATAL2=22]="FATAL2",t[t.FATAL3=23]="FATAL3",t[t.FATAL4=24]="FATAL4"})(Dl||(Dl={}))});var Gl=S(()=>{"use strict";c()});var Ul=S(()=>{"use strict";c()});var Ks,$I,Ys=S(()=>{"use strict";c();Ks=function(){function t(){}return t.prototype.emit=function(e){},t}(),$I=new Ks});var OT,Xs,$s=S(()=>{"use strict";c();Ys();OT=function(){function t(){}return t.prototype.getLogger=function(e,n,r){return new Ks},t}(),Xs=new OT});var Hl,jl=S(()=>{"use strict";c();Hl=typeof globalThis=="object"?globalThis:global});var Bl=S(()=>{"use strict";c();jl()});var ql=S(()=>{"use strict";c();Bl()});function Wl(t,e,n){return function(r){return r===t?e:n}}var _r,Tn,Zs,Vl=S(()=>{"use strict";c();ql();_r=Symbol.for("io.opentelemetry.js.api.logs"),Tn=Hl;Zs=1});var Kl,Yl=S(()=>{"use strict";c();Vl();$s();Kl=function(){function t(){}return t.getInstance=function(){return this._instance||(this._instance=new t),this._instance},t.prototype.setGlobalLoggerProvider=function(e){return Tn[_r]?this.getLoggerProvider():(Tn[_r]=Wl(Zs,e,Xs),e)},t.prototype.getLoggerProvider=function(){var e,n;return(n=(e=Tn[_r])===null||e===void 0?void 0:e.call(Tn,Zs))!==null&&n!==void 0?n:Xs},t.prototype.getLogger=function(e,n,r){return this.getLoggerProvider().getLogger(e,n,r)},t.prototype.disable=function(){delete Tn[_r]},t}()});var Vo,zs=S(()=>{"use strict";c();wl();Fl();kl();Gl();Ul();Ys();$s();Yl();Vo=Kl.getInstance()});function Xl(t,e,n,r){for(var o=0,i=t.length;o<i;o++){var s=t[o];e&&s.setTracerProvider(e),n&&s.setMeterProvider(n),r&&s.setLoggerProvider&&s.setLoggerProvider(r),s.getConfig().enabled||s.enable()}}function $l(t){t.forEach(function(e){return e.disable()})}var Zl=S(()=>{"use strict";c()});function Ko(t){var e,n,r=t.tracerProvider||ye.getTracerProvider(),o=t.meterProvider||vo.getMeterProvider(),i=t.loggerProvider||Vo.getLoggerProvider(),s=(n=(e=t.instrumentations)===null||e===void 0?void 0:e.flat())!==null&&n!==void 0?n:[];return Xl(s,r,o,i),function(){$l(s)}}var zl=S(()=>{"use strict";c();F();zs();Zl()});var Qs=E((LP,ep)=>{"use strict";c();function Js(t){return typeof t=="function"}var ve=console.error.bind(console);function gr(t,e,n){var r=!!t[e]&&t.propertyIsEnumerable(e);Object.defineProperty(t,e,{configurable:!0,enumerable:r,writable:!0,value:n})}function Er(t){t&&t.logger&&(Js(t.logger)?ve=t.logger:ve("new logger isn't a function, not replacing"))}function Jl(t,e,n){if(!t||!t[e]){ve("no original function "+e+" to wrap");return}if(!n){ve("no wrapper function"),ve(new Error().stack);return}if(!Js(t[e])||!Js(n)){ve("original object and wrapper must be functions");return}var r=t[e],o=n(r,e);return gr(o,"__original",r),gr(o,"__unwrap",function(){t[e]===o&&gr(t,e,r)}),gr(o,"__wrapped",!0),gr(t,e,o),o}function bT(t,e,n){if(t)Array.isArray(t)||(t=[t]);else{ve("must provide one or more modules to patch"),ve(new Error().stack);return}if(!(e&&Array.isArray(e))){ve("must provide one or more functions to wrap on modules");return}t.forEach(function(r){e.forEach(function(o){Jl(r,o,n)})})}function Ql(t,e){if(!t||!t[e]){ve("no function to unwrap."),ve(new Error().stack);return}if(!t[e].__unwrap)ve("no original to unwrap to -- has "+e+" already been unwrapped?");else return t[e].__unwrap()}function CT(t,e){if(t)Array.isArray(t)||(t=[t]);else{ve("must provide one or more modules to patch"),ve(new Error().stack);return}if(!(e&&Array.isArray(e))){ve("must provide one or more functions to unwrap on modules");return}t.forEach(function(n){e.forEach(function(r){Ql(n,r)})})}Er.wrap=Jl;Er.massWrap=bT;Er.unwrap=Ql;Er.massUnwrap=CT;ep.exports=Er});var Lt,Yo,tp,np=S(()=>{"use strict";c();F();zs();Lt=k(Qs()),Yo=function(){return Yo=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}return t},Yo.apply(this,arguments)},tp=function(){function t(e,n,r){this.instrumentationName=e,this.instrumentationVersion=n,this._wrap=Lt.wrap,this._unwrap=Lt.unwrap,this._massWrap=Lt.massWrap,this._massUnwrap=Lt.massUnwrap,this._config=Yo({enabled:!0},r),this._diag=he.createComponentLogger({namespace:e}),this._tracer=ye.getTracer(e,n),this._meter=vo.getMeter(e,n),this._logger=Vo.getLogger(e,n),this._updateMetricInstruments()}return Object.defineProperty(t.prototype,"meter",{get:function(){return this._meter},enumerable:!1,configurable:!0}),t.prototype.setMeterProvider=function(e){this._meter=e.getMeter(this.instrumentationName,this.instrumentationVersion),this._updateMetricInstruments()},Object.defineProperty(t.prototype,"logger",{get:function(){return this._logger},enumerable:!1,configurable:!0}),t.prototype.setLoggerProvider=function(e){this._logger=e.getLogger(this.instrumentationName,this.instrumentationVersion)},t.prototype.getModuleDefinitions=function(){var e,n=(e=this.init())!==null&&e!==void 0?e:[];return Array.isArray(n)?n:[n]},t.prototype._updateMetricInstruments=function(){},t.prototype.getConfig=function(){return this._config},t.prototype.setConfig=function(e){this._config=Yo({},e)},t.prototype.setTracerProvider=function(e){this._tracer=e.getTracer(this.instrumentationName,this.instrumentationVersion)},Object.defineProperty(t.prototype,"tracer",{get:function(){return this._tracer},enumerable:!1,configurable:!0}),t.prototype._runSpanCustomizationHook=function(e,n,r,o){if(e)try{e(r,o)}catch(i){this._diag.error("Error running span customization hook due to exception in handler",{triggerName:n},i)}},t}()});var ea=E((UP,rp)=>{"use strict";c();var RT=B("os");rp.exports=RT.homedir||function(){var e=process.env.HOME,n=process.env.LOGNAME||process.env.USER||process.env.LNAME||process.env.USERNAME;return process.platform==="win32"?process.env.USERPROFILE||process.env.HOMEDRIVE+process.env.HOMEPATH||e||null:process.platform==="darwin"?e||(n?"/Users/"+n:null):process.platform==="linux"?e||(process.getuid()===0?"/root":n?"/home/"+n:null):e||null}});var ta=E((jP,op)=>{"use strict";c();op.exports=function(){var t=Error.prepareStackTrace;Error.prepareStackTrace=function(n,r){return r};var e=new Error().stack;return Error.prepareStackTrace=t,e[2].getFileName()}});var ip=E((qP,Tr)=>{"use strict";c();var IT=process.platform==="win32",PT=/^(((?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?[\\\/]?)(?:[^\\\/]*[\\\/])*)((\.{1,2}|[^\\\/]+?|)(\.[^.\/\\]*|))[\\\/]*$/,na={};function NT(t){return PT.exec(t).slice(1)}na.parse=function(t){if(typeof t!="string")throw new TypeError("Parameter 'pathString' must be a string, not "+typeof t);var e=NT(t);if(!e||e.length!==5)throw new TypeError("Invalid path '"+t+"'");return{root:e[1],dir:e[0]===e[1]?e[0]:e[0].slice(0,-1),base:e[2],ext:e[4],name:e[3]}};var MT=/^((\/?)(?:[^\/]*\/)*)((\.{1,2}|[^\/]+?|)(\.[^.\/]*|))[\/]*$/,ra={};function xT(t){return MT.exec(t).slice(1)}ra.parse=function(t){if(typeof t!="string")throw new TypeError("Parameter 'pathString' must be a string, not "+typeof t);var e=xT(t);if(!e||e.length!==5)throw new TypeError("Invalid path '"+t+"'");return{root:e[1],dir:e[0].slice(0,-1),base:e[2],ext:e[4],name:e[3]}};IT?Tr.exports=na.parse:Tr.exports=ra.parse;Tr.exports.posix=ra.parse;Tr.exports.win32=na.parse});var oa=E((VP,up)=>{"use strict";c();var cp=B("path"),sp=cp.parse||ip(),ap=function(e,n){var r="/";/^([A-Za-z]:)/.test(e)?r="":/^\\\\/.test(e)&&(r="\\\\");for(var o=[e],i=sp(e);i.dir!==o[o.length-1];)o.push(i.dir),i=sp(i.dir);return o.reduce(function(s,a){return s.concat(n.map(function(u){return cp.resolve(r,a,u)}))},[])};up.exports=function(e,n,r){var o=n&&n.moduleDirectory?[].concat(n.moduleDirectory):["node_modules"];if(n&&typeof n.paths=="function")return n.paths(r,e,function(){return ap(e,o)},n);var i=ap(e,o);return n&&n.paths?i.concat(n.paths):i}});var ia=E((YP,lp)=>{"use strict";c();var Sr=B("path");lp.exports=function(t,e){if(e=e||{},e.forceNodeResolution||!process.versions.pnp)return e;let{findPnpApi:n}=B("module"),r=(l,p)=>{let d=l.match(/^((?:@[^/]+\/)?[^/]+)(\/.*)?/);if(!d)throw new Error(`Assertion failed: Expected the "resolve" package to call the "paths" callback with package names only (got "${l}")`);p.charAt(p.length-1)!=="/"&&(p=Sr.join(p,"/"));let m=n(p);if(m===null)return;let h;try{h=m.resolveToUnqualified(`${d[1]}/package.json`,p,{considerBuiltins:!1})}catch{return null}if(h===null)throw new Error(`Assertion failed: The resolution thinks that "${d[1]}" is a Node builtin`);let _=Sr.dirname(h),T=typeof d[2]<"u"?Sr.join(_,d[2]):_;return{packagePath:_,unqualifiedPath:T}},o=(l,p)=>{for(let d=0;d<p.length;d++){let m=r(l,p[d]);if(m||d===p.length-1)return m}return null},i=Array.isArray(e.paths)?e.paths:[],s=(l,p,d,m)=>{let h=[p].concat(i),_=o(l,h);return _==null?d():[_.unqualifiedPath]},a=(l,p,d,m)=>{let h=[p].concat(i),_=o(l,h);if(_==null)return d().concat(i);let T=Sr.dirname(_.packagePath);return l.match(/^@[^/]+\//)&&(T=Sr.dirname(T)),[T]},u=!1;return e.__skipPackageIterator||(e.packageIterator=function(l,p,d,m){u=!0;try{return s(l,p,d,m)}finally{u=!1}}),e.paths=function(l,p,d,m){return u?d().concat(i):a(l,p,d,m)},e}});var fp=E(($P,dp)=>{"use strict";c();var LT="Function.prototype.bind called on incompatible ",wT=Object.prototype.toString,FT=Math.max,DT="[object Function]",pp=function(e,n){for(var r=[],o=0;o<e.length;o+=1)r[o]=e[o];for(var i=0;i<n.length;i+=1)r[i+e.length]=n[i];return r},kT=function(e,n){for(var r=[],o=n||0,i=0;o<e.length;o+=1,i+=1)r[i]=e[o];return r},GT=function(t,e){for(var n="",r=0;r<t.length;r+=1)n+=t[r],r+1<t.length&&(n+=e);return n};dp.exports=function(e){var n=this;if(typeof n!="function"||wT.apply(n)!==DT)throw new TypeError(LT+n);for(var r=kT(arguments,1),o,i=function(){if(this instanceof o){var p=n.apply(this,pp(r,arguments));return Object(p)===p?p:this}return n.apply(e,pp(r,arguments))},s=FT(0,n.length-r.length),a=[],u=0;u<s;u++)a[u]="$"+u;if(o=Function("binder","return function ("+GT(a,",")+"){ return binder.apply(this,arguments); }")(i),n.prototype){var l=function(){};l.prototype=n.prototype,o.prototype=new l,l.prototype=null}return o}});var hp=E((zP,mp)=>{"use strict";c();var UT=fp();mp.exports=Function.prototype.bind||UT});var gp=E((QP,_p)=>{"use strict";c();var HT=Function.prototype.call,jT=Object.prototype.hasOwnProperty,BT=hp();_p.exports=BT.call(HT,jT)});var Ep=E((tN,qT)=>{qT.exports={assert:!0,"node:assert":[">= 14.18 && < 15",">= 16"],"assert/strict":">= 15","node:assert/strict":">= 16",async_hooks:">= 8","node:async_hooks":[">= 14.18 && < 15",">= 16"],buffer_ieee754:">= 0.5 && < 0.9.7",buffer:!0,"node:buffer":[">= 14.18 && < 15",">= 16"],child_process:!0,"node:child_process":[">= 14.18 && < 15",">= 16"],cluster:">= 0.5","node:cluster":[">= 14.18 && < 15",">= 16"],console:!0,"node:console":[">= 14.18 && < 15",">= 16"],constants:!0,"node:constants":[">= 14.18 && < 15",">= 16"],crypto:!0,"node:crypto":[">= 14.18 && < 15",">= 16"],_debug_agent:">= 1 && < 8",_debugger:"< 8",dgram:!0,"node:dgram":[">= 14.18 && < 15",">= 16"],diagnostics_channel:[">= 14.17 && < 15",">= 15.1"],"node:diagnostics_channel":[">= 14.18 && < 15",">= 16"],dns:!0,"node:dns":[">= 14.18 && < 15",">= 16"],"dns/promises":">= 15","node:dns/promises":">= 16",domain:">= 0.7.12","node:domain":[">= 14.18 && < 15",">= 16"],events:!0,"node:events":[">= 14.18 && < 15",">= 16"],freelist:"< 6",fs:!0,"node:fs":[">= 14.18 && < 15",">= 16"],"fs/promises":[">= 10 && < 10.1",">= 14"],"node:fs/promises":[">= 14.18 && < 15",">= 16"],_http_agent:">= 0.11.1","node:_http_agent":[">= 14.18 && < 15",">= 16"],_http_client:">= 0.11.1","node:_http_client":[">= 14.18 && < 15",">= 16"],_http_common:">= 0.11.1","node:_http_common":[">= 14.18 && < 15",">= 16"],_http_incoming:">= 0.11.1","node:_http_incoming":[">= 14.18 && < 15",">= 16"],_http_outgoing:">= 0.11.1","node:_http_outgoing":[">= 14.18 && < 15",">= 16"],_http_server:">= 0.11.1","node:_http_server":[">= 14.18 && < 15",">= 16"],http:!0,"node:http":[">= 14.18 && < 15",">= 16"],http2:">= 8.8","node:http2":[">= 14.18 && < 15",">= 16"],https:!0,"node:https":[">= 14.18 && < 15",">= 16"],inspector:">= 8","node:inspector":[">= 14.18 && < 15",">= 16"],"inspector/promises":[">= 19"],"node:inspector/promises":[">= 19"],_linklist:"< 8",module:!0,"node:module":[">= 14.18 && < 15",">= 16"],net:!0,"node:net":[">= 14.18 && < 15",">= 16"],"node-inspect/lib/_inspect":">= 7.6 && < 12","node-inspect/lib/internal/inspect_client":">= 7.6 && < 12","node-inspect/lib/internal/inspect_repl":">= 7.6 && < 12",os:!0,"node:os":[">= 14.18 && < 15",">= 16"],path:!0,"node:path":[">= 14.18 && < 15",">= 16"],"path/posix":">= 15.3","node:path/posix":">= 16","path/win32":">= 15.3","node:path/win32":">= 16",perf_hooks:">= 8.5","node:perf_hooks":[">= 14.18 && < 15",">= 16"],process:">= 1","node:process":[">= 14.18 && < 15",">= 16"],punycode:">= 0.5","node:punycode":[">= 14.18 && < 15",">= 16"],querystring:!0,"node:querystring":[">= 14.18 && < 15",">= 16"],readline:!0,"node:readline":[">= 14.18 && < 15",">= 16"],"readline/promises":">= 17","node:readline/promises":">= 17",repl:!0,"node:repl":[">= 14.18 && < 15",">= 16"],"node:sea":[">= 20.12 && < 21",">= 21.7"],smalloc:">= 0.11.5 && < 3",_stream_duplex:">= 0.9.4","node:_stream_duplex":[">= 14.18 && < 15",">= 16"],_stream_transform:">= 0.9.4","node:_stream_transform":[">= 14.18 && < 15",">= 16"],_stream_wrap:">= 1.4.1","node:_stream_wrap":[">= 14.18 && < 15",">= 16"],_stream_passthrough:">= 0.9.4","node:_stream_passthrough":[">= 14.18 && < 15",">= 16"],_stream_readable:">= 0.9.4","node:_stream_readable":[">= 14.18 && < 15",">= 16"],_stream_writable:">= 0.9.4","node:_stream_writable":[">= 14.18 && < 15",">= 16"],stream:!0,"node:stream":[">= 14.18 && < 15",">= 16"],"stream/consumers":">= 16.7","node:stream/consumers":">= 16.7","stream/promises":">= 15","node:stream/promises":">= 16","stream/web":">= 16.5","node:stream/web":">= 16.5",string_decoder:!0,"node:string_decoder":[">= 14.18 && < 15",">= 16"],sys:[">= 0.4 && < 0.7",">= 0.8"],"node:sys":[">= 14.18 && < 15",">= 16"],"test/reporters":">= 19.9 && < 20.2","node:test/reporters":[">= 18.17 && < 19",">= 19.9",">= 20"],"test/mock_loader":">= 22.3 && < 22.7","node:test/mock_loader":">= 22.3 && < 22.7","node:test":[">= 16.17 && < 17",">= 18"],timers:!0,"node:timers":[">= 14.18 && < 15",">= 16"],"timers/promises":">= 15","node:timers/promises":">= 16",_tls_common:">= 0.11.13","node:_tls_common":[">= 14.18 && < 15",">= 16"],_tls_legacy:">= 0.11.3 && < 10",_tls_wrap:">= 0.11.3","node:_tls_wrap":[">= 14.18 && < 15",">= 16"],tls:!0,"node:tls":[">= 14.18 && < 15",">= 16"],trace_events:">= 10","node:trace_events":[">= 14.18 && < 15",">= 16"],tty:!0,"node:tty":[">= 14.18 && < 15",">= 16"],url:!0,"node:url":[">= 14.18 && < 15",">= 16"],util:!0,"node:util":[">= 14.18 && < 15",">= 16"],"util/types":">= 15.3","node:util/types":">= 16","v8/tools/arguments":">= 10 && < 12","v8/tools/codemap":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/consarray":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/csvparser":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/logreader":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/profile_view":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/splaytree":[">= 4.4 && < 5",">= 5.2 && < 12"],v8:">= 1","node:v8":[">= 14.18 && < 15",">= 16"],vm:!0,"node:vm":[">= 14.18 && < 15",">= 16"],wasi:[">= 13.4 && < 13.5",">= 18.17 && < 19",">= 20"],"node:wasi":[">= 18.17 && < 19",">= 20"],worker_threads:">= 11.7","node:worker_threads":[">= 14.18 && < 15",">= 16"],zlib:">= 0.5","node:zlib":[">= 14.18 && < 15",">= 16"]}});var yr=E((nN,yp)=>{"use strict";c();var WT=gp();function VT(t,e){for(var n=t.split("."),r=e.split(" "),o=r.length>1?r[0]:"=",i=(r.length>1?r[1]:r[0]).split("."),s=0;s<3;++s){var a=parseInt(n[s]||0,10),u=parseInt(i[s]||0,10);if(a!==u)return o==="<"?a<u:o===">="?a>=u:!1}return o===">="}function Tp(t,e){var n=e.split(/ ?&& ?/);if(n.length===0)return!1;for(var r=0;r<n.length;++r)if(!VT(t,n[r]))return!1;return!0}function KT(t,e){if(typeof e=="boolean")return e;var n=typeof t>"u"?process.versions&&process.versions.node:t;if(typeof n!="string")throw new TypeError(typeof t>"u"?"Unable to determine current node version":"If provided, a valid node version is required");if(e&&typeof e=="object"){for(var r=0;r<e.length;++r)if(Tp(n,e[r]))return!0;return!1}return Tp(n,e)}var Sp=Ep();yp.exports=function(e,n){return WT(Sp,e)&&KT(n,Sp[e])}});var Op=E((oN,Ap)=>{"use strict";c();var pn=B("fs"),YT=ea(),se=B("path"),XT=ta(),$T=oa(),ZT=ia(),zT=yr(),JT=process.platform!=="win32"&&pn.realpath&&typeof pn.realpath.native=="function"?pn.realpath.native:pn.realpath,vp=YT(),QT=function(){return[se.join(vp,".node_modules"),se.join(vp,".node_libraries")]},eS=function(e,n){pn.stat(e,function(r,o){return r?r.code==="ENOENT"||r.code==="ENOTDIR"?n(null,!1):n(r):n(null,o.isFile()||o.isFIFO())})},tS=function(e,n){pn.stat(e,function(r,o){return r?r.code==="ENOENT"||r.code==="ENOTDIR"?n(null,!1):n(r):n(null,o.isDirectory())})},nS=function(e,n){JT(e,function(r,o){r&&r.code!=="ENOENT"?n(r):n(null,r?e:o)})},vr=function(e,n,r,o){r&&r.preserveSymlinks===!1?e(n,o):o(null,n)},rS=function(e,n,r){e(n,function(o,i){if(o)r(o);else try{var s=JSON.parse(i);r(null,s)}catch{r(null)}})},oS=function(e,n,r){for(var o=$T(n,r,e),i=0;i<o.length;i++)o[i]=se.join(o[i],e);return o};Ap.exports=function(e,n,r){var o=r,i=n;if(typeof n=="function"&&(o=i,i={}),typeof e!="string"){var s=new TypeError("Path must be a string.");return process.nextTick(function(){o(s)})}i=ZT(e,i);var a=i.isFile||eS,u=i.isDirectory||tS,l=i.readFile||pn.readFile,p=i.realpath||nS,d=i.readPackage||rS;if(i.readFile&&i.readPackage){var m=new TypeError("`readFile` and `readPackage` are mutually exclusive.");return process.nextTick(function(){o(m)})}var h=i.packageIterator,_=i.extensions||[".js"],T=i.includeCoreModules!==!1,R=i.basedir||se.dirname(XT()),M=i.filename||R;i.paths=i.paths||QT();var C=se.resolve(R);vr(p,C,i,function(v,D){v?o(v):P(D)});var A;function P(v){if(/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/.test(e))A=se.resolve(v,e),(e==="."||e===".."||e.slice(-1)==="/")&&(A+="/"),/\/$/.test(e)&&A===v?q(A,i.package,w):W(A,i.package,w);else{if(T&&zT(e))return o(null,e);me(e,v,function(D,X,H){if(D)o(D);else{if(X)return vr(p,X,i,function(xe,te){xe?o(xe):o(null,te,H)});var Q=new Error("Cannot find module '"+e+"' from '"+M+"'");Q.code="MODULE_NOT_FOUND",o(Q)}})}}function w(v,D,X){v?o(v):D?o(null,D,X):q(A,function(H,Q,xe){if(H)o(H);else if(Q)vr(p,Q,i,function(ee,be){ee?o(ee):o(null,be,xe)});else{var te=new Error("Cannot find module '"+e+"' from '"+M+"'");te.code="MODULE_NOT_FOUND",o(te)}})}function W(v,D,X){var H=D,Q=X;typeof H=="function"&&(Q=H,H=void 0);var xe=[""].concat(_);te(xe,v,H);function te(ee,be,at){if(ee.length===0)return Q(null,void 0,at);var rn=be+ee[0],Ze=at;Ze?ge(null,Ze):x(se.dirname(rn),ge);function ge(Rt,mn,ct){if(Ze=mn,Rt)return Q(Rt);if(ct&&Ze&&i.pathFilter){var fo=se.relative(ct,rn),mo=fo.slice(0,fo.length-ee[0].length),Qn=i.pathFilter(Ze,be,mo);if(Qn)return te([""].concat(_.slice()),se.resolve(ct,Qn),Ze)}a(rn,po)}function po(Rt,mn){if(Rt)return Q(Rt);if(mn)return Q(null,rn,Ze);te(ee.slice(1),be,Ze)}}}function x(v,D){if(v===""||v==="/"||process.platform==="win32"&&/^\w:[/\\]*$/.test(v)||/[/\\]node_modules[/\\]*$/.test(v))return D(null);vr(p,v,i,function(X,H){if(X)return x(se.dirname(v),D);var Q=se.join(H,"package.json");a(Q,function(xe,te){if(!te)return x(se.dirname(v),D);d(l,Q,function(ee,be){ee&&D(ee);var at=be;at&&i.packageFilter&&(at=i.packageFilter(at,Q)),D(null,at,v)})})})}function q(v,D,X){var H=X,Q=D;typeof Q=="function"&&(H=Q,Q=i.package),vr(p,v,i,function(xe,te){if(xe)return H(xe);var ee=se.join(te,"package.json");a(ee,function(be,at){if(be)return H(be);if(!at)return W(se.join(v,"index"),Q,H);d(l,ee,function(rn,Ze){if(rn)return H(rn);var ge=Ze;if(ge&&i.packageFilter&&(ge=i.packageFilter(ge,ee)),ge&&ge.main){if(typeof ge.main!="string"){var po=new TypeError("package \u201C"+ge.name+"\u201D `main` must be a string");return po.code="INVALID_PACKAGE_MAIN",H(po)}(ge.main==="."||ge.main==="./")&&(ge.main="index"),W(se.resolve(v,ge.main),ge,function(Rt,mn,ct){if(Rt)return H(Rt);if(mn)return H(null,mn,ct);if(!ct)return W(se.join(v,"index"),ct,H);var fo=se.resolve(v,ct.main);q(fo,ct,function(mo,Qn,Rc){if(mo)return H(mo);if(Qn)return H(null,Qn,Rc);W(se.join(v,"index"),Rc,H)})});return}W(se.join(v,"/index"),ge,H)})})})}function j(v,D){if(D.length===0)return v(null,void 0);var X=D[0];u(se.dirname(X),H);function H(te,ee){if(te)return v(te);if(!ee)return j(v,D.slice(1));W(X,i.package,Q)}function Q(te,ee,be){if(te)return v(te);if(ee)return v(null,ee,be);q(X,i.package,xe)}function xe(te,ee,be){if(te)return v(te);if(ee)return v(null,ee,be);j(v,D.slice(1))}}function me(v,D,X){var H=function(){return oS(v,D,i)};j(X,h?h(v,D,H,i):H())}}});var bp=E((sN,iS)=>{iS.exports={assert:!0,"node:assert":[">= 14.18 && < 15",">= 16"],"assert/strict":">= 15","node:assert/strict":">= 16",async_hooks:">= 8","node:async_hooks":[">= 14.18 && < 15",">= 16"],buffer_ieee754:">= 0.5 && < 0.9.7",buffer:!0,"node:buffer":[">= 14.18 && < 15",">= 16"],child_process:!0,"node:child_process":[">= 14.18 && < 15",">= 16"],cluster:">= 0.5","node:cluster":[">= 14.18 && < 15",">= 16"],console:!0,"node:console":[">= 14.18 && < 15",">= 16"],constants:!0,"node:constants":[">= 14.18 && < 15",">= 16"],crypto:!0,"node:crypto":[">= 14.18 && < 15",">= 16"],_debug_agent:">= 1 && < 8",_debugger:"< 8",dgram:!0,"node:dgram":[">= 14.18 && < 15",">= 16"],diagnostics_channel:[">= 14.17 && < 15",">= 15.1"],"node:diagnostics_channel":[">= 14.18 && < 15",">= 16"],dns:!0,"node:dns":[">= 14.18 && < 15",">= 16"],"dns/promises":">= 15","node:dns/promises":">= 16",domain:">= 0.7.12","node:domain":[">= 14.18 && < 15",">= 16"],events:!0,"node:events":[">= 14.18 && < 15",">= 16"],freelist:"< 6",fs:!0,"node:fs":[">= 14.18 && < 15",">= 16"],"fs/promises":[">= 10 && < 10.1",">= 14"],"node:fs/promises":[">= 14.18 && < 15",">= 16"],_http_agent:">= 0.11.1","node:_http_agent":[">= 14.18 && < 15",">= 16"],_http_client:">= 0.11.1","node:_http_client":[">= 14.18 && < 15",">= 16"],_http_common:">= 0.11.1","node:_http_common":[">= 14.18 && < 15",">= 16"],_http_incoming:">= 0.11.1","node:_http_incoming":[">= 14.18 && < 15",">= 16"],_http_outgoing:">= 0.11.1","node:_http_outgoing":[">= 14.18 && < 15",">= 16"],_http_server:">= 0.11.1","node:_http_server":[">= 14.18 && < 15",">= 16"],http:!0,"node:http":[">= 14.18 && < 15",">= 16"],http2:">= 8.8","node:http2":[">= 14.18 && < 15",">= 16"],https:!0,"node:https":[">= 14.18 && < 15",">= 16"],inspector:">= 8","node:inspector":[">= 14.18 && < 15",">= 16"],"inspector/promises":[">= 19"],"node:inspector/promises":[">= 19"],_linklist:"< 8",module:!0,"node:module":[">= 14.18 && < 15",">= 16"],net:!0,"node:net":[">= 14.18 && < 15",">= 16"],"node-inspect/lib/_inspect":">= 7.6 && < 12","node-inspect/lib/internal/inspect_client":">= 7.6 && < 12","node-inspect/lib/internal/inspect_repl":">= 7.6 && < 12",os:!0,"node:os":[">= 14.18 && < 15",">= 16"],path:!0,"node:path":[">= 14.18 && < 15",">= 16"],"path/posix":">= 15.3","node:path/posix":">= 16","path/win32":">= 15.3","node:path/win32":">= 16",perf_hooks:">= 8.5","node:perf_hooks":[">= 14.18 && < 15",">= 16"],process:">= 1","node:process":[">= 14.18 && < 15",">= 16"],punycode:">= 0.5","node:punycode":[">= 14.18 && < 15",">= 16"],querystring:!0,"node:querystring":[">= 14.18 && < 15",">= 16"],readline:!0,"node:readline":[">= 14.18 && < 15",">= 16"],"readline/promises":">= 17","node:readline/promises":">= 17",repl:!0,"node:repl":[">= 14.18 && < 15",">= 16"],smalloc:">= 0.11.5 && < 3",_stream_duplex:">= 0.9.4","node:_stream_duplex":[">= 14.18 && < 15",">= 16"],_stream_transform:">= 0.9.4","node:_stream_transform":[">= 14.18 && < 15",">= 16"],_stream_wrap:">= 1.4.1","node:_stream_wrap":[">= 14.18 && < 15",">= 16"],_stream_passthrough:">= 0.9.4","node:_stream_passthrough":[">= 14.18 && < 15",">= 16"],_stream_readable:">= 0.9.4","node:_stream_readable":[">= 14.18 && < 15",">= 16"],_stream_writable:">= 0.9.4","node:_stream_writable":[">= 14.18 && < 15",">= 16"],stream:!0,"node:stream":[">= 14.18 && < 15",">= 16"],"stream/consumers":">= 16.7","node:stream/consumers":">= 16.7","stream/promises":">= 15","node:stream/promises":">= 16","stream/web":">= 16.5","node:stream/web":">= 16.5",string_decoder:!0,"node:string_decoder":[">= 14.18 && < 15",">= 16"],sys:[">= 0.4 && < 0.7",">= 0.8"],"node:sys":[">= 14.18 && < 15",">= 16"],"test/reporters":">= 19.9 && < 20.2","node:test/reporters":[">= 18.17 && < 19",">= 19.9",">= 20"],"node:test":[">= 16.17 && < 17",">= 18"],timers:!0,"node:timers":[">= 14.18 && < 15",">= 16"],"timers/promises":">= 15","node:timers/promises":">= 16",_tls_common:">= 0.11.13","node:_tls_common":[">= 14.18 && < 15",">= 16"],_tls_legacy:">= 0.11.3 && < 10",_tls_wrap:">= 0.11.3","node:_tls_wrap":[">= 14.18 && < 15",">= 16"],tls:!0,"node:tls":[">= 14.18 && < 15",">= 16"],trace_events:">= 10","node:trace_events":[">= 14.18 && < 15",">= 16"],tty:!0,"node:tty":[">= 14.18 && < 15",">= 16"],url:!0,"node:url":[">= 14.18 && < 15",">= 16"],util:!0,"node:util":[">= 14.18 && < 15",">= 16"],"util/types":">= 15.3","node:util/types":">= 16","v8/tools/arguments":">= 10 && < 12","v8/tools/codemap":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/consarray":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/csvparser":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/logreader":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/profile_view":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/splaytree":[">= 4.4 && < 5",">= 5.2 && < 12"],v8:">= 1","node:v8":[">= 14.18 && < 15",">= 16"],vm:!0,"node:vm":[">= 14.18 && < 15",">= 16"],wasi:[">= 13.4 && < 13.5",">= 18.17 && < 19",">= 20"],"node:wasi":[">= 18.17 && < 19",">= 20"],worker_threads:">= 11.7","node:worker_threads":[">= 14.18 && < 15",">= 16"],zlib:">= 0.5","node:zlib":[">= 14.18 && < 15",">= 16"]}});var Pp=E((aN,Ip)=>{"use strict";c();var sS=yr(),Cp=bp(),Rp={};for(Xo in Cp)Object.prototype.hasOwnProperty.call(Cp,Xo)&&(Rp[Xo]=sS(Xo));var Xo;Ip.exports=Rp});var Mp=E((uN,Np)=>{"use strict";c();var aS=yr();Np.exports=function(e){return aS(e)}});var wp=E((pN,Lp)=>{"use strict";c();var cS=yr(),dn=B("fs"),Ee=B("path"),uS=ea(),lS=ta(),pS=oa(),dS=ia(),fS=process.platform!=="win32"&&dn.realpathSync&&typeof dn.realpathSync.native=="function"?dn.realpathSync.native:dn.realpathSync,xp=uS(),mS=function(){return[Ee.join(xp,".node_modules"),Ee.join(xp,".node_libraries")]},hS=function(e){try{var n=dn.statSync(e,{throwIfNoEntry:!1})}catch(r){if(r&&(r.code==="ENOENT"||r.code==="ENOTDIR"))return!1;throw r}return!!n&&(n.isFile()||n.isFIFO())},_S=function(e){try{var n=dn.statSync(e,{throwIfNoEntry:!1})}catch(r){if(r&&(r.code==="ENOENT"||r.code==="ENOTDIR"))return!1;throw r}return!!n&&n.isDirectory()},gS=function(e){try{return fS(e)}catch(n){if(n.code!=="ENOENT")throw n}return e},Ar=function(e,n,r){return r&&r.preserveSymlinks===!1?e(n):n},ES=function(e,n){var r=e(n);try{var o=JSON.parse(r);return o}catch{}},TS=function(e,n,r){for(var o=pS(n,r,e),i=0;i<o.length;i++)o[i]=Ee.join(o[i],e);return o};Lp.exports=function(e,n){if(typeof e!="string")throw new TypeError("Path must be a string.");var r=dS(e,n),o=r.isFile||hS,i=r.readFileSync||dn.readFileSync,s=r.isDirectory||_S,a=r.realpathSync||gS,u=r.readPackageSync||ES;if(r.readFileSync&&r.readPackageSync)throw new TypeError("`readFileSync` and `readPackageSync` are mutually exclusive.");var l=r.packageIterator,p=r.extensions||[".js"],d=r.includeCoreModules!==!1,m=r.basedir||Ee.dirname(lS()),h=r.filename||m;r.paths=r.paths||mS();var _=Ar(a,Ee.resolve(m),r);if(/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/.test(e)){var T=Ee.resolve(_,e);(e==="."||e===".."||e.slice(-1)==="/")&&(T+="/");var R=A(T)||w(T);if(R)return Ar(a,R,r)}else{if(d&&cS(e))return e;var M=W(e,_);if(M)return Ar(a,M,r)}var C=new Error("Cannot find module '"+e+"' from '"+h+"'");throw C.code="MODULE_NOT_FOUND",C;function A(x){var q=P(Ee.dirname(x));if(q&&q.dir&&q.pkg&&r.pathFilter){var j=Ee.relative(q.dir,x),me=r.pathFilter(q.pkg,x,j);me&&(x=Ee.resolve(q.dir,me))}if(o(x))return x;for(var v=0;v<p.length;v++){var D=x+p[v];if(o(D))return D}}function P(x){if(!(x===""||x==="/")&&!(process.platform==="win32"&&/^\w:[/\\]*$/.test(x))&&!/[/\\]node_modules[/\\]*$/.test(x)){var q=Ee.join(Ar(a,x,r),"package.json");if(!o(q))return P(Ee.dirname(x));var j=u(i,q);return j&&r.packageFilter&&(j=r.packageFilter(j,x)),{pkg:j,dir:x}}}function w(x){var q=Ee.join(Ar(a,x,r),"/package.json");if(o(q)){try{var j=u(i,q)}catch{}if(j&&r.packageFilter&&(j=r.packageFilter(j,x)),j&&j.main){if(typeof j.main!="string"){var me=new TypeError("package \u201C"+j.name+"\u201D `main` must be a string");throw me.code="INVALID_PACKAGE_MAIN",me}(j.main==="."||j.main==="./")&&(j.main="index");try{var v=A(Ee.resolve(x,j.main));if(v)return v;var D=w(Ee.resolve(x,j.main));if(D)return D}catch{}}}return A(Ee.join(x,"/index"))}function W(x,q){for(var j=function(){return TS(x,q,r)},me=l?l(x,q,j,r):j(),v=0;v<me.length;v++){var D=me[v];if(s(Ee.dirname(D))){var X=A(D);if(X)return X;var H=w(D);if(H)return H}}}}});var Dp=E((fN,Fp)=>{"use strict";c();var $o=Op();$o.core=Pp();$o.isCore=Mp();$o.sync=wp();Fp.exports=$o});var aa=E((hN,kp)=>{"use strict";c();var sa=B("path");kp.exports=function(t){var e=t.split(sa.sep),n=e.lastIndexOf("node_modules");if(n!==-1&&e[n+1]){var r=e[n+1][0]==="@",o=r?e[n+1]+"/"+e[n+2]:e[n+1],i=r?3:2;return{name:o,basedir:e.slice(0,n+i).join(sa.sep),path:e.slice(n+i).join(sa.sep)}}}});var Gp=E((gN,SS)=>{SS.exports={name:"require-in-the-middle",version:"7.4.0",description:"Module to hook into the Node.js require function",main:"index.js",types:"types/index.d.ts",dependencies:{debug:"^4.3.5","module-details-from-path":"^1.0.3",resolve:"^1.22.8"},devDependencies:{"@babel/core":"^7.9.0","@babel/preset-env":"^7.9.5","@babel/preset-typescript":"^7.9.0","@babel/register":"^7.9.0","ipp-printer":"^1.0.0",patterns:"^1.0.3",roundround:"^0.2.0",semver:"^6.3.0",standard:"^14.3.1",tape:"^4.11.0"},scripts:{test:"npm run test:lint && npm run test:tape && npm run test:babel","test:lint":"standard","test:tape":"tape test/*.js","test:babel":"node test/babel/babel-register.js"},repository:{type:"git",url:"git+https://github.com/elastic/require-in-the-middle.git"},keywords:["require","hook","shim","shimmer","shimming","patch","monkey","monkeypatch","module","load"],files:["types"],author:"Thomas Watson Steen <w@tson.dk> (https://twitter.com/wa7son)",license:"MIT",bugs:{url:"https://github.com/elastic/require-in-the-middle/issues"},homepage:"https://github.com/elastic/require-in-the-middle#readme",engines:{node:">=8.6.0"}}});var pa=E((EN,la)=>{"use strict";c();var Sn=B("path"),dt=B("module"),ca=Dp(),re=fg()("require-in-the-middle"),yS=aa();la.exports=br;la.exports.Hook=br;var Or;if(dt.isBuiltin)Or=dt.isBuiltin;else{let[t,e]=process.versions.node.split(".").map(Number);t===8&&e<8?Or=n=>n==="http2"?!0:!!ca.core[n]:Or=n=>!!ca.core[n]}var vS=/([/\\]index)?(\.js)?$/,ua=class{constructor(){this._localCache=new Map,this._kRitmExports=Symbol("RitmExports")}has(e,n){if(this._localCache.has(e))return!0;if(n)return!1;{let r=B.cache[e];return!!(r&&this._kRitmExports in r)}}get(e,n){let r=this._localCache.get(e);if(r!==void 0)return r;if(!n){let o=B.cache[e];return o&&o[this._kRitmExports]}}set(e,n,r){r?this._localCache.set(e,n):e in B.cache?B.cache[e][this._kRitmExports]=n:(re('non-core module is unexpectedly not in require.cache: "%s"',e),this._localCache.set(e,n))}};function br(t,e,n){if(!(this instanceof br))return new br(t,e,n);if(typeof t=="function"?(n=t,t=null,e=null):typeof e=="function"&&(n=e,e=null),typeof dt._resolveFilename!="function"){console.error("Error: Expected Module._resolveFilename to be a function (was: %s) - aborting!",typeof dt._resolveFilename),console.error("Please report this error as an issue related to Node.js %s at %s",process.version,Gp().bugs.url);return}this._cache=new ua,this._unhooked=!1,this._origRequire=dt.prototype.require;let r=this,o=new Set,i=e?e.internals===!0:!1,s=Array.isArray(t);re("registering require hook"),this._require=dt.prototype.require=function(u){return r._unhooked===!0?(re("ignoring require call - module is soft-unhooked"),r._origRequire.apply(this,arguments)):a.call(this,arguments,!1)},typeof process.getBuiltinModule=="function"&&(this._origGetBuiltinModule=process.getBuiltinModule,this._getBuiltinModule=process.getBuiltinModule=function(u){return r._unhooked===!0?(re("ignoring process.getBuiltinModule call - module is soft-unhooked"),r._origGetBuiltinModule.apply(this,arguments)):a.call(this,arguments,!0)});function a(u,l){let p=u[0],d=Or(p),m;if(d){if(m=p,p.startsWith("node:")){let C=p.slice(5);Or(C)&&(m=C)}}else{if(l)return re("call to process.getBuiltinModule with unknown built-in id"),r._origGetBuiltinModule.apply(this,u);try{m=dt._resolveFilename(p,this)}catch(C){return re('Module._resolveFilename("%s") threw %j, calling original Module.require',p,C.message),r._origRequire.apply(this,u)}}let h,_;if(re("processing %s module require('%s'): %s",d===!0?"core":"non-core",p,m),r._cache.has(m,d)===!0)return re("returning already patched cached module: %s",m),r._cache.get(m,d);let T=o.has(m);T===!1&&o.add(m);let R=l?r._origGetBuiltinModule.apply(this,u):r._origRequire.apply(this,u);if(T===!0)return re("module is in the process of being patched already - ignoring: %s",m),R;if(o.delete(m),d===!0){if(s===!0&&t.includes(m)===!1)return re("ignoring core module not on whitelist: %s",m),R;h=m}else if(s===!0&&t.includes(m)){let C=Sn.parse(m);h=C.name,_=C.dir}else{let C=yS(m);if(C===void 0)return re("could not parse filename: %s",m),R;h=C.name,_=C.basedir;let A=AS(C);re("resolved filename to module: %s (id: %s, resolved: %s, basedir: %s)",h,p,A,_);let P=!1;if(s){if(!p.startsWith(".")&&t.includes(p)&&(h=p,P=!0),!t.includes(h)&&!t.includes(A))return R;t.includes(A)&&A!==h&&(h=A,P=!0)}if(!P){let w;try{w=ca.sync(h,{basedir:_})}catch{return re("could not resolve module: %s",h),r._cache.set(m,R,d),R}if(w!==m)if(i===!0)h=h+Sn.sep+Sn.relative(_,m),re("preparing to process require of internal file: %s",h);else return re("ignoring require of non-main module file: %s",w),r._cache.set(m,R,d),R}}r._cache.set(m,R,d),re("calling require hook: %s",h);let M=n(R,h,_);return r._cache.set(m,M,d),re("returning module: %s",h),M}}br.prototype.unhook=function(){this._unhooked=!0,this._require===dt.prototype.require?(dt.prototype.require=this._origRequire,re("require unhook successful")):re("require unhook unsuccessful"),process.getBuiltinModule!==void 0&&(this._getBuiltinModule===process.getBuiltinModule?(process.getBuiltinModule=this._origGetBuiltinModule,re("process.getBuiltinModule unhook successful")):re("process.getBuiltinModule unhook unsuccessful"))};function AS(t){let e=Sn.sep!=="/"?t.path.split(Sn.sep).join("/"):t.path;return Sn.posix.join(t.name,e).replace(vS,"")}});var Up,Hp,jp,Cr,Bp,qp,Wp=S(()=>{"use strict";c();Up=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Hp=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),o,i=[],s;try{for(;(e===void 0||e-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return i},jp=function(t,e,n){if(n||arguments.length===2)for(var r=0,o=e.length,i;r<o;r++)(i||!(r in e))&&(i||(i=Array.prototype.slice.call(e,0,r)),i[r]=e[r]);return t.concat(i||Array.prototype.slice.call(e))},Cr="/",Bp=function(){function t(){this.hooks=[],this.children=new Map}return t}(),qp=function(){function t(){this._trie=new Bp,this._counter=0}return t.prototype.insert=function(e){var n,r,o=this._trie;try{for(var i=Up(e.moduleName.split(Cr)),s=i.next();!s.done;s=i.next()){var a=s.value,u=o.children.get(a);u||(u=new Bp,o.children.set(a,u)),o=u}}catch(l){n={error:l}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}o.hooks.push({hook:e,insertedId:this._counter++})},t.prototype.search=function(e,n){var r,o,i=n===void 0?{}:n,s=i.maintainInsertionOrder,a=i.fullOnly,u=this._trie,l=[],p=!0;try{for(var d=Up(e.split(Cr)),m=d.next();!m.done;m=d.next()){var h=m.value,_=u.children.get(h);if(!_){p=!1;break}a||l.push.apply(l,jp([],Hp(_.hooks),!1)),u=_}}catch(T){r={error:T}}finally{try{m&&!m.done&&(o=d.return)&&o.call(d)}finally{if(r)throw r.error}}return a&&p&&l.push.apply(l,jp([],Hp(u.hooks),!1)),l.length===0?[]:l.length===1?[l[0].hook]:(s&&l.sort(function(T,R){return T.insertedId-R.insertedId}),l.map(function(T){var R=T.hook;return R}))},t}()});import*as da from"path";function CS(t){return da.sep!==Cr?t.split(da.sep).join(Cr):t}var Vp,OS,bS,Kp,Yp=S(()=>{"use strict";c();Vp=k(pa());Wp();OS=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},bS=["afterEach","after","beforeEach","before","describe","it"].every(function(t){return typeof global[t]=="function"}),Kp=function(){function t(){this._moduleNameTrie=new qp,this._initialize()}return t.prototype._initialize=function(){var e=this;new Vp.Hook(null,{internals:!0},function(n,r,o){var i,s,a=CS(r),u=e._moduleNameTrie.search(a,{maintainInsertionOrder:!0,fullOnly:o===void 0});try{for(var l=OS(u),p=l.next();!p.done;p=l.next()){var d=p.value.onRequire;n=d(n,r,o)}}catch(m){i={error:m}}finally{try{p&&!p.done&&(s=l.return)&&s.call(l)}finally{if(i)throw i.error}}return n})},t.prototype.register=function(e,n){var r={moduleName:e,onRequire:n};return this._moduleNameTrie.insert(r),r},t.getInstance=function(){var e;return bS?new t:this._instance=(e=this._instance)!==null&&e!==void 0?e:new t},t}()});var zp=E(Rr=>{"use strict";c();var Xp=[],fa=new WeakMap,$p=new Map,Zp=[],RS={set(t,e,n){return fa.get(t)[e](n)},defineProperty(t,e,n){if(!("value"in n))throw new Error("Getters/setters are not supported for exports property descriptors.");return fa.get(t)[e](n.value)}};function IS(t,e,n,r){$p.set(t,r),fa.set(e,n);let o=new Proxy(e,RS);Xp.forEach(i=>i(t,o)),Zp.push([t,o])}Rr.register=IS;Rr.importHooks=Xp;Rr.specifiers=$p;Rr.toHook=Zp});var rd=E((IN,Pr)=>{"use strict";c();var Jp=B("path"),PS=aa(),{fileURLToPath:Qp}=B("url"),{importHooks:ma,specifiers:NS,toHook:MS}=zp();function td(t){ma.push(t),MS.forEach(([e,n])=>t(e,n))}function nd(t){let e=ma.indexOf(t);e>-1&&ma.splice(e,1)}function ed(t,e,n,r){let o=t(e,n,r);o&&o!==e&&(e.default=o)}function Ir(t,e,n){if(!(this instanceof Ir))return new Ir(t,e,n);typeof t=="function"?(n=t,t=null,e=null):typeof e=="function"&&(n=e,e=null);let r=e?e.internals===!0:!1;this._iitmHook=(o,i)=>{let s=o,a=o.startsWith("node:"),u;if(a)o=o.replace(/^node:/,"");else{if(o.startsWith("file://"))try{o=Qp(o)}catch{}let l=PS(o);l&&(o=l.name,u=l.basedir)}if(t){for(let l of t)if(l===o){if(u){if(r)o=o+Jp.sep+Jp.relative(u,Qp(s));else if(!u.endsWith(NS.get(s)))continue}ed(n,i,o,u)}}else ed(n,i,o,u)},td(this._iitmHook)}Ir.prototype.unhook=function(){nd(this._iitmHook)};Pr.exports=Ir;Pr.exports.Hook=Ir;Pr.exports.addHook=td;Pr.exports.removeHook=nd});function wS(t,e,n){var r,o;try{o=t()}catch(i){r=i}finally{if(e(r,o),r&&!n)throw r;return o}}function FS(t,e,n){return xS(this,void 0,void 0,function(){var r,o,i;return LS(this,function(s){switch(s.label){case 0:return s.trys.push([0,2,3,4]),[4,t()];case 1:return o=s.sent(),[3,4];case 2:return i=s.sent(),r=i,[3,4];case 3:if(e(r,o),r&&!n)throw r;return[2,o];case 4:return[2]}})})}function ha(t){return typeof t=="function"&&typeof t.__original=="function"&&typeof t.__unwrap=="function"&&t.__wrapped===!0}var xS,LS,_a=S(()=>{"use strict";c();xS=function(t,e,n,r){function o(i){return i instanceof n?i:new n(function(s){s(i)})}return new(n||(n=Promise))(function(i,s){function a(p){try{l(r.next(p))}catch(d){s(d)}}function u(p){try{l(r.throw(p))}catch(d){s(d)}}function l(p){p.done?i(p.value):o(p.value).then(a,u)}l((r=r.apply(t,e||[])).next())})},LS=function(t,e){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,o,i,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(p){return u([l,p])}}function u(l){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,o&&(i=l[0]&2?o.return:l[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,l[1])).done)return i;switch(o=0,i&&(l=[l[0]&2,i.value]),l[0]){case 0:case 1:i=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,o=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(i=n.trys,!(i=i.length>0&&i[i.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!i||l[1]>i[0]&&l[1]<i[3])){n.label=l[1];break}if(l[0]===6&&n.label<i[1]){n.label=i[1],i=l;break}if(i&&n.label<i[2]){n.label=i[2],n.ops.push(l);break}i[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(p){l=[6,p],o=0}finally{r=i=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}});import*as yn from"path";import{types as od}from"util";import{readFileSync as kS}from"fs";function id(t,e,n){return typeof e>"u"?t.includes("*"):t.some(function(r){return(0,sd.satisfies)(e,r,{includePrerelease:n})})}var sd,Mr,ad,cd,DS,Nr,Zo,ud=S(()=>{"use strict";c();sd=k(ru()),Mr=k(Qs());np();Yp();ad=k(rd());F();cd=k(pa());_a();DS=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Nr=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Zo=function(t){DS(e,t);function e(n,r,o){var i=t.call(this,n,r,o)||this;i._hooks=[],i._requireInTheMiddleSingleton=Kp.getInstance(),i._enabled=!1,i._wrap=function(a,u,l){if(ha(a[u])&&i._unwrap(a,u),od.isProxy(a)){var p=(0,Mr.wrap)(Object.assign({},a),u,l);return Object.defineProperty(a,u,{value:p})}else return(0,Mr.wrap)(a,u,l)},i._unwrap=function(a,u){return od.isProxy(a)?Object.defineProperty(a,u,{value:a[u]}):(0,Mr.unwrap)(a,u)},i._massWrap=function(a,u,l){if(a)Array.isArray(a)||(a=[a]);else{he.error("must provide one or more modules to patch");return}if(!(u&&Array.isArray(u))){he.error("must provide one or more functions to wrap on modules");return}a.forEach(function(p){u.forEach(function(d){i._wrap(p,d,l)})})},i._massUnwrap=function(a,u){if(a)Array.isArray(a)||(a=[a]);else{he.error("must provide one or more modules to patch");return}if(!(u&&Array.isArray(u))){he.error("must provide one or more functions to wrap on modules");return}a.forEach(function(l){u.forEach(function(p){i._unwrap(l,p)})})};var s=i.init();return s&&!Array.isArray(s)&&(s=[s]),i._modules=s||[],i._modules.length===0&&he.debug("No modules instrumentation has been defined for "+("'"+i.instrumentationName+"@"+i.instrumentationVersion+"'")+", nothing will be patched"),i._config.enabled&&i.enable(),i}return e.prototype._warnOnPreloadedModules=function(){var n=this;this._modules.forEach(function(r){var o=r.name;try{var i=B.resolve(o);B.cache[i]&&n._diag.warn("Module "+o+" has been loaded before "+n.instrumentationName+" so it might not work, please initialize it before requiring "+o)}catch{}})},e.prototype._extractPackageVersion=function(n){try{var r=kS(yn.join(n,"package.json"),{encoding:"utf8"}),o=JSON.parse(r).version;return typeof o=="string"?o:void 0}catch{he.warn("Failed extracting version",n)}},e.prototype._onRequire=function(n,r,o,i){var s=this,a;if(!i)return typeof n.patch=="function"&&(n.moduleExports=r,this._enabled)?(this._diag.debug("Applying instrumentation patch for nodejs core module on require hook",{module:n.name}),n.patch(r)):r;var u=this._extractPackageVersion(i);if(n.moduleVersion=u,n.name===o)return id(n.supportedVersions,u,n.includePrerelease)&&typeof n.patch=="function"&&(n.moduleExports=r,this._enabled)?(this._diag.debug("Applying instrumentation patch for module on require hook",{module:n.name,version:n.moduleVersion,baseDir:i}),n.patch(r,n.moduleVersion)):r;var l=(a=n.files)!==null&&a!==void 0?a:[],p=yn.normalize(o),d=l.filter(function(m){return m.name===p}).filter(function(m){return id(m.supportedVersions,u,n.includePrerelease)});return d.reduce(function(m,h){return h.moduleExports=m,s._enabled?(s._diag.debug("Applying instrumentation patch for nodejs module file on require hook",{module:n.name,version:n.moduleVersion,fileName:h.name,baseDir:i}),h.patch(m,n.moduleVersion)):m},r)},e.prototype.enable=function(){var n,r,o,i,s,a,u=this;if(!this._enabled){if(this._enabled=!0,this._hooks.length>0){try{for(var l=Nr(this._modules),p=l.next();!p.done;p=l.next()){var d=p.value;typeof d.patch=="function"&&d.moduleExports&&(this._diag.debug("Applying instrumentation patch for nodejs module on instrumentation enabled",{module:d.name,version:d.moduleVersion}),d.patch(d.moduleExports,d.moduleVersion));try{for(var m=(o=void 0,Nr(d.files)),h=m.next();!h.done;h=m.next()){var _=h.value;_.moduleExports&&(this._diag.debug("Applying instrumentation patch for nodejs module file on instrumentation enabled",{module:d.name,version:d.moduleVersion,fileName:_.name}),_.patch(_.moduleExports,d.moduleVersion))}}catch(P){o={error:P}}finally{try{h&&!h.done&&(i=m.return)&&i.call(m)}finally{if(o)throw o.error}}}}catch(P){n={error:P}}finally{try{p&&!p.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}return}this._warnOnPreloadedModules();var T=function(P){var w=function(j,me,v){return u._onRequire(P,j,me,v)},W=function(j,me,v){return u._onRequire(P,j,me,v)},x=yn.isAbsolute(P.name)?new cd.Hook([P.name],{internals:!0},W):R._requireInTheMiddleSingleton.register(P.name,W);R._hooks.push(x);var q=new ad.Hook([P.name],{internals:!1},w);R._hooks.push(q)},R=this;try{for(var M=Nr(this._modules),C=M.next();!C.done;C=M.next()){var A=C.value;T(A)}}catch(P){s={error:P}}finally{try{C&&!C.done&&(a=M.return)&&a.call(M)}finally{if(s)throw s.error}}}},e.prototype.disable=function(){var n,r,o,i;if(this._enabled){this._enabled=!1;try{for(var s=Nr(this._modules),a=s.next();!a.done;a=s.next()){var u=a.value;typeof u.unpatch=="function"&&u.moduleExports&&(this._diag.debug("Removing instrumentation patch for nodejs module on instrumentation disabled",{module:u.name,version:u.moduleVersion}),u.unpatch(u.moduleExports,u.moduleVersion));try{for(var l=(o=void 0,Nr(u.files)),p=l.next();!p.done;p=l.next()){var d=p.value;d.moduleExports&&(this._diag.debug("Removing instrumentation patch for nodejs module file on instrumentation disabled",{module:u.name,version:u.moduleVersion,fileName:d.name}),d.unpatch(d.moduleExports,u.moduleVersion))}}catch(m){o={error:m}}finally{try{p&&!p.done&&(i=l.return)&&i.call(l)}finally{if(o)throw o.error}}}}catch(m){n={error:m}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}}},e.prototype.isEnabled=function(){return this._enabled},e}(tp)});import{normalize as zo}from"path";var ld=S(()=>{"use strict";c()});var pd=S(()=>{"use strict";c();ud();ld()});var ga=S(()=>{"use strict";c();pd()});var dd,fd=S(()=>{"use strict";c();dd=function(){function t(e,n,r,o,i){this.name=e,this.supportedVersions=n,this.patch=r,this.unpatch=o,this.files=i||[]}return t}()});var md,hd=S(()=>{"use strict";c();ga();md=function(){function t(e,n,r,o){this.supportedVersions=n,this.patch=r,this.unpatch=o,this.name=zo(e)}return t}()});var _d=S(()=>{"use strict";c()});var gd=S(()=>{"use strict";c()});var le={};Vi(le,{InstrumentationBase:()=>Zo,InstrumentationNodeModuleDefinition:()=>dd,InstrumentationNodeModuleFile:()=>md,isWrapped:()=>ha,registerInstrumentations:()=>Ko,safeExecuteInTheMiddle:()=>wS,safeExecuteInTheMiddleAsync:()=>FS});var ae=S(()=>{"use strict";c();zl();ga();fd();hd();_d();gd();_a()});var yd=E(Jo=>{"use strict";c();Object.defineProperty(Jo,"__esModule",{value:!0});Jo.HttpInstrumentation=void 0;var L=(F(),y(z)),vn=(Fe(),y(Ve)),Ed=ru(),Td=B("url"),Z=Vs(),GS=Ll(),De=(ae(),y(le)),Sd=(Fe(),y(Ve)),Ea=B("events"),US=(ne(),y(ue)),Ta=class extends De.InstrumentationBase{constructor(e={}){super("@opentelemetry/instrumentation-http",GS.VERSION,e),this._spanNotEnded=new WeakSet,this._headerCapture=this._createHeaderCapture()}_updateMetricInstruments(){this._httpServerDurationHistogram=this.meter.createHistogram("http.server.duration",{description:"Measures the duration of inbound HTTP requests.",unit:"ms",valueType:L.ValueType.DOUBLE}),this._httpClientDurationHistogram=this.meter.createHistogram("http.client.duration",{description:"Measures the duration of outbound HTTP requests.",unit:"ms",valueType:L.ValueType.DOUBLE})}setConfig(e={}){super.setConfig(e),this._headerCapture=this._createHeaderCapture()}init(){return[this._getHttpsInstrumentation(),this._getHttpInstrumentation()]}_getHttpInstrumentation(){return new De.InstrumentationNodeModuleDefinition("http",["*"],e=>(this._wrap(e,"request",this._getPatchOutgoingRequestFunction("http")),this._wrap(e,"get",this._getPatchOutgoingGetFunction(e.request)),this._wrap(e.Server.prototype,"emit",this._getPatchIncomingRequestFunction("http")),e),e=>{e!==void 0&&(this._unwrap(e,"request"),this._unwrap(e,"get"),this._unwrap(e.Server.prototype,"emit"))})}_getHttpsInstrumentation(){return new De.InstrumentationNodeModuleDefinition("https",["*"],e=>(this._wrap(e,"request",this._getPatchHttpsOutgoingRequestFunction("https")),this._wrap(e,"get",this._getPatchHttpsOutgoingGetFunction(e.request)),this._wrap(e.Server.prototype,"emit",this._getPatchIncomingRequestFunction("https")),e),e=>{e!==void 0&&(this._unwrap(e,"request"),this._unwrap(e,"get"),this._unwrap(e.Server.prototype,"emit"))})}_getPatchIncomingRequestFunction(e){return n=>this._incomingRequestFunction(e,n)}_getPatchOutgoingRequestFunction(e){return n=>this._outgoingRequestFunction(e,n)}_getPatchOutgoingGetFunction(e){return n=>function(o,...i){let s=e(o,...i);return s.end(),s}}_getPatchHttpsOutgoingRequestFunction(e){return n=>{let r=this;return function(i,...s){var a;return e==="https"&&typeof i=="object"&&((a=i?.constructor)===null||a===void 0?void 0:a.name)!=="URL"&&(i=Object.assign({},i),r._setDefaultOptions(i)),r._getPatchOutgoingRequestFunction(e)(n)(i,...s)}}}_setDefaultOptions(e){e.protocol=e.protocol||"https:",e.port=e.port||443}_getPatchHttpsOutgoingGetFunction(e){return n=>{let r=this;return function(i,...s){return r._getPatchOutgoingGetFunction(e)(n)(i,...s)}}}_traceClientRequest(e,n,r,o){this.getConfig().requestHook&&this._callRequestHook(n,e);let i=!1;return e.prependListener("response",s=>{this._diag.debug("outgoingRequest on response()"),e.listenerCount("response")<=1&&s.resume();let a=Z.getOutgoingRequestAttributesOnResponse(s);n.setAttributes(a),o=Object.assign(o,Z.getOutgoingRequestMetricAttributesOnResponse(a)),this.getConfig().responseHook&&this._callResponseHook(n,s),this._headerCapture.client.captureRequestHeaders(n,l=>e.getHeader(l)),this._headerCapture.client.captureResponseHeaders(n,l=>s.headers[l]),L.context.bind(L.context.active(),s);let u=()=>{if(this._diag.debug("outgoingRequest on end()"),i)return;i=!0;let l;s.aborted&&!s.complete?l={code:L.SpanStatusCode.ERROR}:l={code:Z.parseResponseStatus(L.SpanKind.CLIENT,s.statusCode)},n.setStatus(l),this.getConfig().applyCustomAttributesOnSpan&&(0,De.safeExecuteInTheMiddle)(()=>this.getConfig().applyCustomAttributesOnSpan(n,e,s),()=>{},!0),this._closeHttpSpan(n,L.SpanKind.CLIENT,r,o)};s.on("end",u),Ed.lt(process.version,"16.0.0")&&s.on("close",u),s.on(Ea.errorMonitor,l=>{this._diag.debug("outgoingRequest on error()",l),!i&&(i=!0,Z.setSpanWithError(n,l),n.setStatus({code:L.SpanStatusCode.ERROR,message:l.message}),this._closeHttpSpan(n,L.SpanKind.CLIENT,r,o))})}),e.on("close",()=>{this._diag.debug("outgoingRequest on request close()"),!(e.aborted||i)&&(i=!0,this._closeHttpSpan(n,L.SpanKind.CLIENT,r,o))}),e.on(Ea.errorMonitor,s=>{this._diag.debug("outgoingRequest on request error()",s),!i&&(i=!0,Z.setSpanWithError(n,s),this._closeHttpSpan(n,L.SpanKind.CLIENT,r,o))}),this._diag.debug("http.ClientRequest return request"),e}_incomingRequestFunction(e,n){let r=this;return function(i,...s){if(i!=="request")return n.apply(this,[i,...s]);let a=s[0],u=s[1],l=a.url&&Td.parse(a.url).pathname||"/",p=a.method||"GET";if(r._diag.debug(`${e} instrumentation incomingRequest`),Z.isIgnored(l,r.getConfig().ignoreIncomingPaths,A=>r._diag.error("caught ignoreIncomingPaths error: ",A))||(0,De.safeExecuteInTheMiddle)(()=>{var A,P;return(P=(A=r.getConfig()).ignoreIncomingRequestHook)===null||P===void 0?void 0:P.call(A,a)},A=>{A!=null&&r._diag.error("caught ignoreIncomingRequestHook error: ",A)},!0))return L.context.with((0,vn.suppressTracing)(L.context.active()),()=>(L.context.bind(L.context.active(),a),L.context.bind(L.context.active(),u),n.apply(this,[i,...s])));let d=a.headers,m=Z.getIncomingRequestAttributes(a,{component:e,serverName:r.getConfig().serverName,hookAttributes:r._callStartSpanHook(a,r.getConfig().startIncomingSpanHook)}),h={kind:L.SpanKind.SERVER,attributes:m},_=(0,vn.hrTime)(),T=Z.getIncomingRequestMetricAttributes(m),R=L.propagation.extract(L.ROOT_CONTEXT,d),M=r._startHttpSpan(p,h,R),C={type:Sd.RPCType.HTTP,span:M};return L.context.with((0,Sd.setRPCMetadata)(L.trace.setSpan(R,M),C),()=>{L.context.bind(L.context.active(),a),L.context.bind(L.context.active(),u),r.getConfig().requestHook&&r._callRequestHook(M,a),r.getConfig().responseHook&&r._callResponseHook(M,u),r._headerCapture.server.captureRequestHeaders(M,P=>a.headers[P]);let A=!1;return u.on("close",()=>{A||r._onServerResponseFinish(a,u,M,T,_)}),u.on(Ea.errorMonitor,P=>{A=!0,r._onServerResponseError(M,T,_,P)}),(0,De.safeExecuteInTheMiddle)(()=>n.apply(this,[i,...s]),P=>{if(P)throw Z.setSpanWithError(M,P),r._closeHttpSpan(M,L.SpanKind.SERVER,_,T),P})})}}_outgoingRequestFunction(e,n){let r=this;return function(i,...s){if(!Z.isValidOptionsType(i))return n.apply(this,[i,...s]);let a=typeof s[0]=="object"&&(typeof i=="string"||i instanceof Td.URL)?s.shift():void 0,{origin:u,pathname:l,method:p,optionsParsed:d}=Z.getRequestInfo(i,a);if(e==="http"&&Ed.lt(process.version,"9.0.0")&&d.protocol==="https:")return n.apply(this,[d,...s]);if(Z.isIgnored(u+l,r.getConfig().ignoreOutgoingUrls,w=>r._diag.error("caught ignoreOutgoingUrls error: ",w))||(0,De.safeExecuteInTheMiddle)(()=>{var w,W;return(W=(w=r.getConfig()).ignoreOutgoingRequestHook)===null||W===void 0?void 0:W.call(w,d)},w=>{w!=null&&r._diag.error("caught ignoreOutgoingRequestHook error: ",w)},!0))return n.apply(this,[d,...s]);let{hostname:m,port:h}=Z.extractHostnameAndPort(d),_=Z.getOutgoingRequestAttributes(d,{component:e,port:h,hostname:m,hookAttributes:r._callStartSpanHook(d,r.getConfig().startOutgoingSpanHook)}),T=(0,vn.hrTime)(),R=Z.getOutgoingRequestMetricAttributes(_),M={kind:L.SpanKind.CLIENT,attributes:_},C=r._startHttpSpan(p,M),A=L.context.active(),P=L.trace.setSpan(A,C);return d.headers?d.headers=Object.assign({},d.headers):d.headers={},L.propagation.inject(P,d.headers),L.context.with(P,()=>{let w=s[s.length-1];typeof w=="function"&&(s[s.length-1]=L.context.bind(A,w));let W=(0,De.safeExecuteInTheMiddle)(()=>n.apply(this,[d,...s]),x=>{if(x)throw Z.setSpanWithError(C,x),r._closeHttpSpan(C,L.SpanKind.CLIENT,T,R),x});return r._diag.debug(`${e} instrumentation outgoingRequest`),L.context.bind(A,W),r._traceClientRequest(W,C,T,R)})}}_onServerResponseFinish(e,n,r,o,i){let s=Z.getIncomingRequestAttributesOnResponse(e,n);o=Object.assign(o,Z.getIncomingRequestMetricAttributesOnResponse(s)),this._headerCapture.server.captureResponseHeaders(r,u=>n.getHeader(u)),r.setAttributes(s).setStatus({code:Z.parseResponseStatus(L.SpanKind.SERVER,n.statusCode)});let a=s[US.SEMATTRS_HTTP_ROUTE];a&&r.updateName(`${e.method||"GET"} ${a}`),this.getConfig().applyCustomAttributesOnSpan&&(0,De.safeExecuteInTheMiddle)(()=>this.getConfig().applyCustomAttributesOnSpan(r,e,n),()=>{},!0),this._closeHttpSpan(r,L.SpanKind.SERVER,i,o)}_onServerResponseError(e,n,r,o){Z.setSpanWithError(e,o),this._closeHttpSpan(e,L.SpanKind.SERVER,r,n)}_startHttpSpan(e,n,r=L.context.active()){let o=n.kind===L.SpanKind.CLIENT?this.getConfig().requireParentforOutgoingSpans:this.getConfig().requireParentforIncomingSpans,i,s=L.trace.getSpan(r);return o===!0&&s===void 0?i=L.trace.wrapSpanContext(L.INVALID_SPAN_CONTEXT):o===!0&&s?.spanContext().isRemote?i=s:i=this.tracer.startSpan(e,n,r),this._spanNotEnded.add(i),i}_closeHttpSpan(e,n,r,o){if(!this._spanNotEnded.has(e))return;e.end(),this._spanNotEnded.delete(e);let i=(0,vn.hrTimeToMilliseconds)((0,vn.hrTimeDuration)(r,(0,vn.hrTime)()));n===L.SpanKind.SERVER?this._httpServerDurationHistogram.record(i,o):n===L.SpanKind.CLIENT&&this._httpClientDurationHistogram.record(i,o)}_callResponseHook(e,n){(0,De.safeExecuteInTheMiddle)(()=>this.getConfig().responseHook(e,n),()=>{},!0)}_callRequestHook(e,n){(0,De.safeExecuteInTheMiddle)(()=>this.getConfig().requestHook(e,n),()=>{},!0)}_callStartSpanHook(e,n){if(typeof n=="function")return(0,De.safeExecuteInTheMiddle)(()=>n(e),()=>{},!0)}_createHeaderCapture(){var e,n,r,o,i,s,a,u,l,p,d,m;let h=this.getConfig();return{client:{captureRequestHeaders:Z.headerCapture("request",(r=(n=(e=h.headersToSpanAttributes)===null||e===void 0?void 0:e.client)===null||n===void 0?void 0:n.requestHeaders)!==null&&r!==void 0?r:[]),captureResponseHeaders:Z.headerCapture("response",(s=(i=(o=h.headersToSpanAttributes)===null||o===void 0?void 0:o.client)===null||i===void 0?void 0:i.responseHeaders)!==null&&s!==void 0?s:[])},server:{captureRequestHeaders:Z.headerCapture("request",(l=(u=(a=h.headersToSpanAttributes)===null||a===void 0?void 0:a.server)===null||u===void 0?void 0:u.requestHeaders)!==null&&l!==void 0?l:[]),captureResponseHeaders:Z.headerCapture("response",(m=(d=(p=h.headersToSpanAttributes)===null||p===void 0?void 0:p.server)===null||d===void 0?void 0:d.responseHeaders)!==null&&m!==void 0?m:[])}}}};Jo.HttpInstrumentation=Ta});var Ad=E(vd=>{"use strict";c();Object.defineProperty(vd,"__esModule",{value:!0})});var Od=E(ft=>{"use strict";c();var HS=ft&&ft.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),Sa=ft&&ft.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&HS(e,t,n)};Object.defineProperty(ft,"__esModule",{value:!0});Sa(yd(),ft);Sa(Ad(),ft);Sa(Vs(),ft)});var ti=E(wr=>{"use strict";c();Object.defineProperty(wr,"__esModule",{value:!0});wr.ExpressLayerType=void 0;var sv;(function(t){t.ROUTER="router",t.MIDDLEWARE="middleware",t.REQUEST_HANDLER="request_handler"})(sv=wr.ExpressLayerType||(wr.ExpressLayerType={}))});var ni=E(Fr=>{"use strict";c();Object.defineProperty(Fr,"__esModule",{value:!0});Fr.AttributeNames=void 0;var av;(function(t){t.EXPRESS_TYPE="express.type",t.EXPRESS_NAME="express.name"})(av=Fr.AttributeNames||(Fr.AttributeNames={}))});var Ra=E(On=>{"use strict";c();Object.defineProperty(On,"__esModule",{value:!0});On._LAYERS_STORE_PROPERTY=On.kLayerPatched=void 0;On.kLayerPatched=Symbol("express-layer-patched");On._LAYERS_STORE_PROPERTY="__ot_middlewares"});var cf=E(ke=>{"use strict";c();Object.defineProperty(ke,"__esModule",{value:!0});ke.getLayerPath=ke.asErrorAndMessage=ke.isLayerIgnored=ke.getLayerMetadata=ke.storeLayerPath=void 0;var Ia=ti(),bn=ni(),Pa=Ra(),cv=(t,e)=>{Array.isArray(t[Pa._LAYERS_STORE_PROPERTY])===!1&&Object.defineProperty(t,Pa._LAYERS_STORE_PROPERTY,{enumerable:!1,value:[]}),e!==void 0&&t[Pa._LAYERS_STORE_PROPERTY].push(e)};ke.storeLayerPath=cv;var uv=(t,e)=>t.name==="router"?{attributes:{[bn.AttributeNames.EXPRESS_NAME]:e,[bn.AttributeNames.EXPRESS_TYPE]:Ia.ExpressLayerType.ROUTER},name:`router - ${e}`}:t.name==="bound dispatch"?{attributes:{[bn.AttributeNames.EXPRESS_NAME]:e??"request handler",[bn.AttributeNames.EXPRESS_TYPE]:Ia.ExpressLayerType.REQUEST_HANDLER},name:`request handler${t.path?` - ${e}`:""}`}:{attributes:{[bn.AttributeNames.EXPRESS_NAME]:t.name,[bn.AttributeNames.EXPRESS_TYPE]:Ia.ExpressLayerType.MIDDLEWARE},name:`middleware - ${t.name}`};ke.getLayerMetadata=uv;var lv=(t,e)=>{if(typeof e=="string")return e===t;if(e instanceof RegExp)return e.test(t);if(typeof e=="function")return e(t);throw new TypeError("Pattern is in unsupported datatype")},pv=(t,e,n)=>{var r;if(Array.isArray(n?.ignoreLayersType)&&(!((r=n?.ignoreLayersType)===null||r===void 0)&&r.includes(e)))return!0;if(Array.isArray(n?.ignoreLayers)===!1)return!1;try{for(let o of n.ignoreLayers)if(lv(t,o))return!0}catch{}return!1};ke.isLayerIgnored=pv;var dv=t=>t instanceof Error?[t,t.message]:[String(t),String(t)];ke.asErrorAndMessage=dv;var fv=t=>Array.isArray(t[0])?t[0].map(e=>af(e)||"").join(","):af(t[0]);ke.getLayerPath=fv;var af=t=>{if(typeof t=="string")return t;if(t instanceof RegExp||typeof t=="number")return t.toString()}});var uf=E(Cn=>{"use strict";c();Object.defineProperty(Cn,"__esModule",{value:!0});Cn.PACKAGE_NAME=Cn.PACKAGE_VERSION=void 0;Cn.PACKAGE_VERSION="0.41.0";Cn.PACKAGE_NAME="@opentelemetry/instrumentation-express"});var mf=E(ri=>{"use strict";c();Object.defineProperty(ri,"__esModule",{value:!0});ri.ExpressInstrumentation=void 0;var lf=(Fe(),y(Ve)),fn=(F(),y(z)),pf=ti(),df=ni(),wt=cf(),ff=uf(),Rn=(ae(),y(le)),mv=(ne(),y(ue)),Dr=Ra(),Na=class extends Rn.InstrumentationBase{constructor(e={}){super(ff.PACKAGE_NAME,ff.PACKAGE_VERSION,e)}setConfig(e={}){this._config=Object.assign({},e)}getConfig(){return this._config}init(){return[new Rn.InstrumentationNodeModuleDefinition("express",[">=4.0.0 <5"],e=>{let n=e.Router;return(0,Rn.isWrapped)(n.route)&&this._unwrap(n,"route"),this._wrap(n,"route",this._getRoutePatch()),(0,Rn.isWrapped)(n.use)&&this._unwrap(n,"use"),this._wrap(n,"use",this._getRouterUsePatch()),(0,Rn.isWrapped)(e.application.use)&&this._unwrap(e.application,"use"),this._wrap(e.application,"use",this._getAppUsePatch()),e},e=>{if(e===void 0)return;let n=e.Router;this._unwrap(n,"route"),this._unwrap(n,"use"),this._unwrap(e.application,"use")})]}_getRoutePatch(){let e=this;return function(n){return function(...o){let i=n.apply(this,o),s=this.stack[this.stack.length-1];return e._applyPatch(s,(0,wt.getLayerPath)(o)),i}}}_getRouterUsePatch(){let e=this;return function(n){return function(...o){let i=n.apply(this,o),s=this.stack[this.stack.length-1];return e._applyPatch(s,(0,wt.getLayerPath)(o)),i}}}_getAppUsePatch(){let e=this;return function(n){return function(...o){let i=n.apply(this,o),s=this._router.stack[this._router.stack.length-1];return e._applyPatch(s,(0,wt.getLayerPath)(o)),i}}}_applyPatch(e,n){let r=this;e[Dr.kLayerPatched]!==!0&&(e[Dr.kLayerPatched]=!0,this._wrap(e,"handle",o=>{if(o.length===4)return o;let i=function(s,a){(0,wt.storeLayerPath)(s,n);let u=s[Dr._LAYERS_STORE_PROPERTY].filter(A=>A!=="/"&&A!=="/*").join("").replace(/\/{2,}/g,"/"),l={[mv.SEMATTRS_HTTP_ROUTE]:u.length>0?u:"/"},p=(0,wt.getLayerMetadata)(e,n),d=p.attributes[df.AttributeNames.EXPRESS_TYPE],m=(0,lf.getRPCMetadata)(fn.context.active());if(m?.type===lf.RPCType.HTTP&&(m.route=u||"/"),(0,wt.isLayerIgnored)(p.name,d,r._config))return d===pf.ExpressLayerType.MIDDLEWARE&&s[Dr._LAYERS_STORE_PROPERTY].pop(),o.apply(this,arguments);if(fn.trace.getSpan(fn.context.active())===void 0)return o.apply(this,arguments);let h=r._getSpanName({request:s,layerType:d,route:u},p.name),_=r.tracer.startSpan(h,{attributes:Object.assign(l,p.attributes)});r.getConfig().requestHook&&(0,Rn.safeExecuteInTheMiddle)(()=>r.getConfig().requestHook(_,{request:s,layerType:d,route:u}),A=>{A&&fn.diag.error("express instrumentation: request hook failed",A)},!0);let T=!1;p.attributes[df.AttributeNames.EXPRESS_TYPE]!==pf.ExpressLayerType.MIDDLEWARE&&(_.end(),T=!0);let R=()=>{T===!1&&(T=!0,_.end())},M=Array.from(arguments),C=M.findIndex(A=>typeof A=="function");C>=0&&(arguments[C]=function(){var A;let P=arguments[0],w=![void 0,null,"route","router"].includes(P);if(!T&&w){let[x,q]=(0,wt.asErrorAndMessage)(P);_.recordException(x),_.setStatus({code:fn.SpanStatusCode.ERROR,message:q})}return T===!1&&(T=!0,(A=s.res)===null||A===void 0||A.removeListener("finish",R),_.end()),s.route&&w||s[Dr._LAYERS_STORE_PROPERTY].pop(),M[C].apply(this,arguments)});try{return o.apply(this,arguments)}catch(A){let[P,w]=(0,wt.asErrorAndMessage)(A);throw _.recordException(P),_.setStatus({code:fn.SpanStatusCode.ERROR,message:w}),A}finally{T||a.once("finish",R)}};return Object.keys(o).forEach(s=>{Object.defineProperty(i,s,{get(){return o[s]},set(a){o[s]=a}})}),i}))}_getSpanName(e,n){var r;let o=this.getConfig().spanNameHook;if(!(o instanceof Function))return n;try{return(r=o(e,n))!==null&&r!==void 0?r:n}catch(i){return fn.diag.error("express instrumentation: error calling span name rewrite hook",i),n}}};ri.ExpressInstrumentation=Na});var _f=E(hf=>{"use strict";c();Object.defineProperty(hf,"__esModule",{value:!0})});var gf=E(Qe=>{"use strict";c();var hv=Qe&&Qe.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),oi=Qe&&Qe.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&hv(e,t,n)};Object.defineProperty(Qe,"__esModule",{value:!0});oi(mf(),Qe);oi(ti(),Qe);oi(ni(),Qe);oi(_f(),Qe)});var Ma=E(Ye=>{"use strict";c();Object.defineProperty(Ye,"__esModule",{value:!0});Ye.FastifyNames=Ye.FastifyTypes=Ye.AttributeNames=void 0;var gv;(function(t){t.FASTIFY_NAME="fastify.name",t.FASTIFY_TYPE="fastify.type",t.HOOK_NAME="hook.name",t.PLUGIN_NAME="plugin.name"})(gv=Ye.AttributeNames||(Ye.AttributeNames={}));var Ev;(function(t){t.MIDDLEWARE="middleware",t.REQUEST_HANDLER="request_handler"})(Ev=Ye.FastifyTypes||(Ye.FastifyTypes={}));var Tv;(function(t){t.MIDDLEWARE="middleware",t.REQUEST_HANDLER="request handler"})(Tv=Ye.FastifyNames||(Ye.FastifyNames={}))});var bf=E(Of=>{"use strict";c();Object.defineProperty(Of,"__esModule",{value:!0})});var xa=E(In=>{"use strict";c();Object.defineProperty(In,"__esModule",{value:!0});In.hooksNamesToWrap=In.spanRequestSymbol=void 0;In.spanRequestSymbol=Symbol("opentelemetry.instrumentation.fastify.request_active_span");In.hooksNamesToWrap=new Set(["onTimeout","onRequest","preParsing","preValidation","preSerialization","preHandler","onSend","onResponse","onError"])});var Rf=E(Ft=>{"use strict";c();Object.defineProperty(Ft,"__esModule",{value:!0});Ft.safeExecuteInTheMiddleMaybePromise=Ft.endSpan=Ft.startSpan=void 0;var Sv=(F(),y(z)),ii=xa();function yv(t,e,n,r={}){let o=e.startSpan(n,{attributes:r}),i=t[ii.spanRequestSymbol]||[];return i.push(o),Object.defineProperty(t,ii.spanRequestSymbol,{enumerable:!1,configurable:!0,value:i}),o}Ft.startSpan=yv;function vv(t,e){let n=t[ii.spanRequestSymbol]||[];n.length&&(n.forEach(r=>{e&&(r.setStatus({code:Sv.SpanStatusCode.ERROR,message:e.message}),r.recordException(e)),r.end()}),delete t[ii.spanRequestSymbol])}Ft.endSpan=vv;function Av(t,e,n){let r,o;try{o=t(),Cf(o)&&o.then(i=>e(void 0,i),i=>e(i))}catch(i){r=i}finally{if(!Cf(o)&&(e(r,o),r&&!n))throw r;return o}}Ft.safeExecuteInTheMiddleMaybePromise=Av;function Cf(t){var e;return typeof t=="object"&&t&&typeof((e=Object.getOwnPropertyDescriptor(t,"then"))===null||e===void 0?void 0:e.value)=="function"||!1}});var If=E(Pn=>{"use strict";c();Object.defineProperty(Pn,"__esModule",{value:!0});Pn.PACKAGE_NAME=Pn.PACKAGE_VERSION=void 0;Pn.PACKAGE_VERSION="0.38.0";Pn.PACKAGE_NAME="@opentelemetry/instrumentation-fastify"});var Mf=E(kt=>{"use strict";c();Object.defineProperty(kt,"__esModule",{value:!0});kt.FastifyInstrumentation=kt.ANONYMOUS_NAME=void 0;var Dt=(F(),y(z)),Pf=(Fe(),y(Ve)),si=(ae(),y(le)),Ov=(ne(),y(ue)),bv=xa(),et=Ma(),Nn=Rf(),Nf=If();kt.ANONYMOUS_NAME="anonymous";var La=class extends si.InstrumentationBase{constructor(e={}){super(Nf.PACKAGE_NAME,Nf.PACKAGE_VERSION,e)}setConfig(e={}){this._config=Object.assign({},e)}getConfig(){return this._config}init(){return[new si.InstrumentationNodeModuleDefinition("fastify",[">=3.0.0 <5"],e=>this._patchConstructor(e))]}_hookOnRequest(){let e=this;return function(r,o,i){if(!e.isEnabled())return i();e._wrap(o,"send",e._patchSend());let s=r,a=(0,Pf.getRPCMetadata)(Dt.context.active()),u=s.routeOptions?s.routeOptions.url:r.routerPath;u&&a?.type===Pf.RPCType.HTTP&&(a.route=u),i()}}_wrapHandler(e,n,r,o){let i=this;return this._diag.debug("Patching fastify route.handler function"),function(...s){if(!i.isEnabled())return r.apply(this,s);let a=r.name||e||kt.ANONYMOUS_NAME,u=`${et.FastifyNames.MIDDLEWARE} - ${a}`,l=s[1],p=(0,Nn.startSpan)(l,i.tracer,u,{[et.AttributeNames.FASTIFY_TYPE]:et.FastifyTypes.MIDDLEWARE,[et.AttributeNames.PLUGIN_NAME]:e,[et.AttributeNames.HOOK_NAME]:n}),d=o&&s[s.length-1];return d&&(s[s.length-1]=function(...m){(0,Nn.endSpan)(l),d.apply(this,m)}),Dt.context.with(Dt.trace.setSpan(Dt.context.active(),p),()=>(0,Nn.safeExecuteInTheMiddleMaybePromise)(()=>r.apply(this,s),m=>{m instanceof Error&&(p.setStatus({code:Dt.SpanStatusCode.ERROR,message:m.message}),p.recordException(m)),o||(0,Nn.endSpan)(l)}))}}_wrapAddHook(){let e=this;return this._diag.debug("Patching fastify server.addHook function"),function(n){return function(...o){let i=o[0],s=o[1],a=this.pluginName;if(!bv.hooksNamesToWrap.has(i))return n.apply(this,o);let u=typeof o[o.length-1]=="function"&&s.constructor.name!=="AsyncFunction";return n.apply(this,[i,e._wrapHandler(a,i,s,u)])}}}_patchConstructor(e){let n=this;function r(...o){let i=e.fastify.apply(this,o);return i.addHook("onRequest",n._hookOnRequest()),i.addHook("preHandler",n._hookPreHandler()),n._wrap(i,"addHook",n._wrapAddHook()),i}return r.fastify=r,r.default=r,r}_patchSend(){let e=this;return this._diag.debug("Patching fastify reply.send function"),function(r){return function(...i){let s=i[0];return e.isEnabled()?(0,si.safeExecuteInTheMiddle)(()=>r.apply(this,i),a=>{!a&&s instanceof Error&&(a=s),(0,Nn.endSpan)(this,a)}):r.apply(this,i)}}}_hookPreHandler(){let e=this;return this._diag.debug("Patching fastify preHandler function"),function(r,o,i){var s,a;if(!e.isEnabled())return i();let u=r,l=((s=u.routeOptions)===null||s===void 0?void 0:s.handler)||((a=u.context)===null||a===void 0?void 0:a.handler),p=l?.name.startsWith("bound ")?l.name.substr(6):l?.name,d=`${et.FastifyNames.REQUEST_HANDLER} - ${p||this.pluginName||kt.ANONYMOUS_NAME}`,m={[et.AttributeNames.PLUGIN_NAME]:this.pluginName,[et.AttributeNames.FASTIFY_TYPE]:et.FastifyTypes.REQUEST_HANDLER,[Ov.SEMATTRS_HTTP_ROUTE]:u.routeOptions?u.routeOptions.url:r.routerPath};p&&(m[et.AttributeNames.FASTIFY_NAME]=p);let h=(0,Nn.startSpan)(o,e.tracer,d,m);return e.getConfig().requestHook&&(0,si.safeExecuteInTheMiddle)(()=>e.getConfig().requestHook(h,{request:r}),_=>{_&&e._diag.error("request hook failed",_)},!0),Dt.context.with(Dt.trace.setSpan(Dt.context.active(),h),()=>{i()})}}};kt.FastifyInstrumentation=La});var xf=E(ht=>{"use strict";c();var Cv=ht&&ht.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),wa=ht&&ht.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&Cv(e,t,n)};Object.defineProperty(ht,"__esModule",{value:!0});wa(Ma(),ht);wa(bf(),ht);wa(Mf(),ht)});var Fa=E(Xe=>{"use strict";c();Object.defineProperty(Xe,"__esModule",{value:!0});Xe.SpanNames=Xe.TokenKind=Xe.AllowedOperationTypes=void 0;var Pv;(function(t){t.QUERY="query",t.MUTATION="mutation",t.SUBSCRIPTION="subscription"})(Pv=Xe.AllowedOperationTypes||(Xe.AllowedOperationTypes={}));var Nv;(function(t){t.SOF="<SOF>",t.EOF="<EOF>",t.BANG="!",t.DOLLAR="$",t.AMP="&",t.PAREN_L="(",t.PAREN_R=")",t.SPREAD="...",t.COLON=":",t.EQUALS="=",t.AT="@",t.BRACKET_L="[",t.BRACKET_R="]",t.BRACE_L="{",t.PIPE="|",t.BRACE_R="}",t.NAME="Name",t.INT="Int",t.FLOAT="Float",t.STRING="String",t.BLOCK_STRING="BlockString",t.COMMENT="Comment"})(Nv=Xe.TokenKind||(Xe.TokenKind={}));var Mv;(function(t){t.EXECUTE="graphql.execute",t.PARSE="graphql.parse",t.RESOLVE="graphql.resolve",t.VALIDATE="graphql.validate",t.SCHEMA_VALIDATE="graphql.validateSchema",t.SCHEMA_PARSE="graphql.parseSchema"})(Mv=Xe.SpanNames||(Xe.SpanNames={}))});var Da=E(kr=>{"use strict";c();Object.defineProperty(kr,"__esModule",{value:!0});kr.AttributeNames=void 0;var xv;(function(t){t.SOURCE="graphql.source",t.FIELD_NAME="graphql.field.name",t.FIELD_PATH="graphql.field.path",t.FIELD_TYPE="graphql.field.type",t.OPERATION_TYPE="graphql.operation.type",t.OPERATION_NAME="graphql.operation.name",t.VARIABLES="graphql.variables.",t.ERROR_VALIDATION_NAME="graphql.validation.error"})(xv=kr.AttributeNames||(kr.AttributeNames={}))});var ai=E(Mn=>{"use strict";c();Object.defineProperty(Mn,"__esModule",{value:!0});Mn.OTEL_GRAPHQL_DATA_SYMBOL=Mn.OTEL_PATCHED_SYMBOL=void 0;Mn.OTEL_PATCHED_SYMBOL=Symbol.for("opentelemetry.patched");Mn.OTEL_GRAPHQL_DATA_SYMBOL=Symbol.for("opentelemetry.graphql_data")});var kf=E(ci=>{"use strict";c();Object.defineProperty(ci,"__esModule",{value:!0});ci.OPERATION_NOT_SUPPORTED=void 0;var Hx=ai();ci.OPERATION_NOT_SUPPORTED="Operation$operationName$not supported"});var $f=E(de=>{"use strict";c();Object.defineProperty(de,"__esModule",{value:!0});de.wrapFieldResolver=de.wrapFields=de.getSourceFromLocation=de.getOperation=de.endSpan=de.addSpanSource=de.addInputVariableAttributes=de.isPromise=void 0;var Ln=(F(),y(z)),Gt=Fa(),xn=Da(),_t=ai(),Gf=Object.values(Gt.AllowedOperationTypes),Lv=t=>typeof t?.then=="function";de.isPromise=Lv;var wv=t=>typeof t=="object"&&t!==null;function ka(t,e,n){Array.isArray(n)?n.forEach((r,o)=>{ka(t,`${e}.${o}`,r)}):n instanceof Object?Object.entries(n).forEach(([r,o])=>{ka(t,`${e}.${r}`,o)}):t.setAttribute(`${xn.AttributeNames.VARIABLES}${String(e)}`,n)}function Fv(t,e){Object.entries(e).forEach(([n,r])=>{ka(t,n,r)})}de.addInputVariableAttributes=Fv;function Bf(t,e,n,r,o){let i=Kf(e,n,r,o);t.setAttribute(xn.AttributeNames.SOURCE,i)}de.addSpanSource=Bf;function Dv(t,e,n,r,o){let i=qf(n,o),s=!1;if(!i){s=!0;let a=Wf(n,o);i={parent:a,span:kv(t,e,n,r,o,a.span),error:null},Hv(n,o,i)}return{spanAdded:s,field:i}}function kv(t,e,n,r,o,i){var s,a;let u={[xn.AttributeNames.FIELD_NAME]:r.fieldName,[xn.AttributeNames.FIELD_PATH]:o.join("."),[xn.AttributeNames.FIELD_TYPE]:r.returnType.toString()},l=t.startSpan(`${Gt.SpanNames.RESOLVE} ${u[xn.AttributeNames.FIELD_PATH]}`,{attributes:u},i?Ln.trace.setSpan(Ln.context.active(),i):void 0),p=n[_t.OTEL_GRAPHQL_DATA_SYMBOL].source,d=r.fieldNodes.find(m=>m.kind==="Field");return d&&Bf(l,p.loc,e().allowValues,(s=d.loc)===null||s===void 0?void 0:s.start,(a=d.loc)===null||a===void 0?void 0:a.end),l}function Gv(t,e){e&&t.recordException(e),t.end()}de.endSpan=Gv;function Uv(t,e){if(!(!t||!Array.isArray(t.definitions)))return e?t.definitions.filter(n=>{var r;return Gf.indexOf((r=n)===null||r===void 0?void 0:r.operation)!==-1}).find(n=>{var r,o;return e===((o=(r=n)===null||r===void 0?void 0:r.name)===null||o===void 0?void 0:o.value)}):t.definitions.find(n=>{var r;return Gf.indexOf((r=n)===null||r===void 0?void 0:r.operation)!==-1})}de.getOperation=Uv;function Hv(t,e,n){return t[_t.OTEL_GRAPHQL_DATA_SYMBOL].fields[e.join(".")]=n}function qf(t,e){return t[_t.OTEL_GRAPHQL_DATA_SYMBOL].fields[e.join(".")]}function Wf(t,e){for(let n=e.length-1;n>0;n--){let r=qf(t,e.slice(0,n));if(r)return r}return{span:t[_t.OTEL_GRAPHQL_DATA_SYMBOL].span}}function jv(t,e){let n=[],r=e;for(;r;){let o=r.key;t&&typeof o=="number"&&(o="*"),n.push(String(o)),r=r.prev}return n.reverse()}function Bv(t){return Vf(`
|
|
4
|
+
`,t)}function Uf(t){return Vf(" ",t)}function Vf(t,e){let n="";for(let r=0;r<e;r++)n+=t;return n}var qv=[Gt.TokenKind.FLOAT,Gt.TokenKind.STRING,Gt.TokenKind.INT,Gt.TokenKind.BLOCK_STRING];function Kf(t,e=!1,n,r){var o,i;let s="";if(t?.startToken){let a=typeof n=="number"?n:t.start,u=typeof r=="number"?r:t.end,l=t.startToken.next,p=1;for(;l;){if(l.start<a){l=l.next,p=l?.line;continue}if(l.end>u){l=l.next,p=l?.line;continue}let d=l.value||l.kind,m="";!e&&qv.indexOf(l.kind)>=0&&(d="*"),l.kind===Gt.TokenKind.STRING&&(d=`"${d}"`),l.kind===Gt.TokenKind.EOF&&(d=""),l.line>p?(s+=Bv(l.line-p),p=l.line,m=Uf(l.column-1)):l.line===((o=l.prev)===null||o===void 0?void 0:o.line)&&(m=Uf(l.start-(((i=l.prev)===null||i===void 0?void 0:i.end)||0))),s+=m+d,l&&(l=l.next)}}return s}de.getSourceFromLocation=Kf;function Yf(t,e,n){if(!t||typeof t.getFields!="function"||t[_t.OTEL_PATCHED_SYMBOL])return;let r=t.getFields();t[_t.OTEL_PATCHED_SYMBOL]=!0,Object.keys(r).forEach(o=>{let i=r[o];if(i&&(i.resolve&&(i.resolve=Xf(e,n,i.resolve)),i.type)){let s=i.type;for(;s.ofType;)s=s.ofType;Yf(s,e,n)}})}de.wrapFields=Yf;var Hf=(t,e,n)=>{n&&(t.recordException(e),t.setStatus({code:Ln.SpanStatusCode.ERROR,message:e.message}),t.end())},jf=(t,e)=>{e&&t.end()};function Xf(t,e,n,r=!1){if(o[_t.OTEL_PATCHED_SYMBOL]||typeof n!="function")return n;function o(i,s,a,u){if(!n)return;let l=e();if(l.ignoreTrivialResolveSpans&&r&&(wv(i)||typeof i=="function")&&typeof i[u.fieldName]!="function")return n.call(this,i,s,a,u);if(!a[_t.OTEL_GRAPHQL_DATA_SYMBOL])return n.call(this,i,s,a,u);let p=jv(l.mergeItems,u&&u.path),d=p.filter(_=>typeof _=="string").length,m,h=!1;if(l.depth>=0&&l.depth<d)m=Wf(a,p);else{let _=Dv(t,e,a,u,p);m=_.field,h=_.spanAdded}return Ln.context.with(Ln.trace.setSpan(Ln.context.active(),m.span),()=>{try{let _=n.call(this,i,s,a,u);return(0,de.isPromise)(_)?_.then(T=>(jf(m.span,h),T),T=>{throw Hf(m.span,T,h),T}):(jf(m.span,h),_)}catch(_){throw Hf(m.span,_,h),_}})}return o[_t.OTEL_PATCHED_SYMBOL]=!0,o}de.wrapFieldResolver=Xf});var Zf=E(wn=>{"use strict";c();Object.defineProperty(wn,"__esModule",{value:!0});wn.PACKAGE_NAME=wn.PACKAGE_VERSION=void 0;wn.PACKAGE_VERSION="0.42.0";wn.PACKAGE_NAME="@opentelemetry/instrumentation-graphql"});var Qf=E(pi=>{"use strict";c();Object.defineProperty(pi,"__esModule",{value:!0});pi.GraphQLInstrumentation=void 0;var gt=(F(),y(z)),Ge=(ae(),y(le)),Gr=Fa(),ui=Da(),Ga=ai(),Wv=kf(),Se=$f(),zf=Zf(),Jf={mergeItems:!1,depth:-1,allowValues:!1,ignoreResolveSpans:!1},li=[">=14.0.0 <17"],Ua=class extends Ge.InstrumentationBase{constructor(e={}){super(zf.PACKAGE_NAME,zf.PACKAGE_VERSION,Object.assign({},Jf,e))}_getConfig(){return this._config}setConfig(e={}){this._config=Object.assign({},Jf,e)}init(){let e=new Ge.InstrumentationNodeModuleDefinition("graphql",li);return e.files.push(this._addPatchingExecute()),e.files.push(this._addPatchingParser()),e.files.push(this._addPatchingValidate()),e}_addPatchingExecute(){return new Ge.InstrumentationNodeModuleFile("graphql/execution/execute.js",li,e=>((0,Ge.isWrapped)(e.execute)&&this._unwrap(e,"execute"),this._wrap(e,"execute",this._patchExecute(e.defaultFieldResolver)),e),e=>{e&&this._unwrap(e,"execute")})}_addPatchingParser(){return new Ge.InstrumentationNodeModuleFile("graphql/language/parser.js",li,e=>((0,Ge.isWrapped)(e.parse)&&this._unwrap(e,"parse"),this._wrap(e,"parse",this._patchParse()),e),e=>{e&&this._unwrap(e,"parse")})}_addPatchingValidate(){return new Ge.InstrumentationNodeModuleFile("graphql/validation/validate.js",li,e=>((0,Ge.isWrapped)(e.validate)&&this._unwrap(e,"validate"),this._wrap(e,"validate",this._patchValidate()),e),e=>{e&&this._unwrap(e,"validate")})}_patchExecute(e){let n=this;return function(o){return function(){let s;if(arguments.length>=2){let l=arguments;s=n._wrapExecuteArgs(l[0],l[1],l[2],l[3],l[4],l[5],l[6],l[7],e)}else{let l=arguments[0];s=n._wrapExecuteArgs(l.schema,l.document,l.rootValue,l.contextValue,l.variableValues,l.operationName,l.fieldResolver,l.typeResolver,e)}let a=(0,Se.getOperation)(s.document,s.operationName),u=n._createExecuteSpan(a,s);return s.contextValue[Ga.OTEL_GRAPHQL_DATA_SYMBOL]={source:s.document?s.document||s.document[Ga.OTEL_GRAPHQL_DATA_SYMBOL]:void 0,span:u,fields:{}},gt.context.with(gt.trace.setSpan(gt.context.active(),u),()=>(0,Ge.safeExecuteInTheMiddle)(()=>o.apply(this,[s]),(l,p)=>{n._handleExecutionResult(u,l,p)}))}}}_handleExecutionResult(e,n,r){let o=this._getConfig();if(r===void 0||n){(0,Se.endSpan)(e,n);return}if((0,Se.isPromise)(r))r.then(i=>{if(typeof o.responseHook!="function"){(0,Se.endSpan)(e);return}this._executeResponseHook(e,i)},i=>{(0,Se.endSpan)(e,i)});else{if(typeof o.responseHook!="function"){(0,Se.endSpan)(e);return}this._executeResponseHook(e,r)}}_executeResponseHook(e,n){let r=this._getConfig();(0,Ge.safeExecuteInTheMiddle)(()=>{r.responseHook(e,n)},o=>{o&&this._diag.error("Error running response hook",o),(0,Se.endSpan)(e,void 0)},!0)}_patchParse(){let e=this;return function(r){return function(i,s){return e._parse(this,r,i,s)}}}_patchValidate(){let e=this;return function(r){return function(i,s,a,u,l){return e._validate(this,r,i,s,a,l,u)}}}_parse(e,n,r,o){let i=this._getConfig(),s=this.tracer.startSpan(Gr.SpanNames.PARSE);return gt.context.with(gt.trace.setSpan(gt.context.active(),s),()=>(0,Ge.safeExecuteInTheMiddle)(()=>n.call(e,r,o),(a,u)=>{u&&((0,Se.getOperation)(u)?u.loc&&(0,Se.addSpanSource)(s,u.loc,i.allowValues):s.updateName(Gr.SpanNames.SCHEMA_PARSE)),(0,Se.endSpan)(s,a)}))}_validate(e,n,r,o,i,s,a){let u=this.tracer.startSpan(Gr.SpanNames.VALIDATE,{});return gt.context.with(gt.trace.setSpan(gt.context.active(),u),()=>(0,Ge.safeExecuteInTheMiddle)(()=>n.call(e,r,o,i,a,s),(l,p)=>{o.loc||u.updateName(Gr.SpanNames.SCHEMA_VALIDATE),p&&p.length&&u.recordException({name:ui.AttributeNames.ERROR_VALIDATION_NAME,message:JSON.stringify(p)}),(0,Se.endSpan)(u,l)}))}_createExecuteSpan(e,n){var r;let o=this._getConfig(),i=this.tracer.startSpan(Gr.SpanNames.EXECUTE,{});if(e){let{operation:s,name:a}=e;i.setAttribute(ui.AttributeNames.OPERATION_TYPE,s);let u=a?.value;u?(i.setAttribute(ui.AttributeNames.OPERATION_NAME,u),i.updateName(`${s} ${u}`)):i.updateName(s)}else{let s=" ";n.operationName&&(s=` "${n.operationName}" `),s=Wv.OPERATION_NOT_SUPPORTED.replace("$operationName$",s),i.setAttribute(ui.AttributeNames.OPERATION_NAME,s)}return!((r=n.document)===null||r===void 0)&&r.loc&&(0,Se.addSpanSource)(i,n.document.loc,o.allowValues),n.variableValues&&o.allowValues&&(0,Se.addInputVariableAttributes)(i,n.variableValues),i}_wrapExecuteArgs(e,n,r,o,i,s,a,u,l){if(o||(o={}),o[Ga.OTEL_GRAPHQL_DATA_SYMBOL]||this._getConfig().ignoreResolveSpans)return{schema:e,document:n,rootValue:r,contextValue:o,variableValues:i,operationName:s,fieldResolver:a,typeResolver:u};let p=a==null,d=a??l;return a=(0,Se.wrapFieldResolver)(this.tracer,this._getConfig.bind(this),d,p),e&&((0,Se.wrapFields)(e.getQueryType(),this.tracer,this._getConfig.bind(this)),(0,Se.wrapFields)(e.getMutationType(),this.tracer,this._getConfig.bind(this))),{schema:e,document:n,rootValue:r,contextValue:o,variableValues:i,operationName:s,fieldResolver:a,typeResolver:u}}};pi.GraphQLInstrumentation=Ua});var tm=E(em=>{"use strict";c();Object.defineProperty(em,"__esModule",{value:!0})});var rm=E(Ut=>{"use strict";c();var Vv=Ut&&Ut.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),nm=Ut&&Ut.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&Vv(e,t,n)};Object.defineProperty(Ut,"__esModule",{value:!0});nm(Qf(),Ut);nm(tm(),Ut)});var cm=E(Ur=>{"use strict";c();Object.defineProperty(Ur,"__esModule",{value:!0});Ur.MongodbCommandType=void 0;var Yv;(function(t){t.CREATE_INDEXES="createIndexes",t.FIND_AND_MODIFY="findAndModify",t.IS_MASTER="isMaster",t.COUNT="count",t.AGGREGATE="aggregate",t.UNKNOWN="unknown"})(Yv=Ur.MongodbCommandType||(Ur.MongodbCommandType={}))});var um=E(Fn=>{"use strict";c();Object.defineProperty(Fn,"__esModule",{value:!0});Fn.PACKAGE_NAME=Fn.PACKAGE_VERSION=void 0;Fn.PACKAGE_VERSION="0.46.0";Fn.PACKAGE_NAME="@opentelemetry/instrumentation-mongodb"});var pm=E(di=>{"use strict";c();Object.defineProperty(di,"__esModule",{value:!0});di.MongoDBInstrumentation=void 0;var J=(F(),y(z)),$=(ae(),y(le)),Et=(ne(),y(ue)),Ht=cm(),lm=um(),Ha=class t extends $.InstrumentationBase{constructor(e={}){super(lm.PACKAGE_NAME,lm.PACKAGE_VERSION,e)}_updateMetricInstruments(){this._connectionsUsage=this.meter.createUpDownCounter("db.client.connections.usage",{description:"The number of connections that are currently in state described by the state attribute.",unit:"{connection}"})}init(){let{v3PatchConnection:e,v3UnpatchConnection:n}=this._getV3ConnectionPatches(),{v4PatchConnect:r,v4UnpatchConnect:o}=this._getV4ConnectPatches(),{v4PatchConnectionCallback:i,v4PatchConnectionPromise:s,v4UnpatchConnection:a}=this._getV4ConnectionPatches(),{v4PatchConnectionPool:u,v4UnpatchConnectionPool:l}=this._getV4ConnectionPoolPatches(),{v4PatchSessions:p,v4UnpatchSessions:d}=this._getV4SessionsPatches();return[new $.InstrumentationNodeModuleDefinition("mongodb",[">=3.3.0 <4"],void 0,void 0,[new $.InstrumentationNodeModuleFile("mongodb/lib/core/wireprotocol/index.js",[">=3.3.0 <4"],e,n)]),new $.InstrumentationNodeModuleDefinition("mongodb",[">=4.0.0 <7"],void 0,void 0,[new $.InstrumentationNodeModuleFile("mongodb/lib/cmap/connection.js",[">=4.0.0 <6.4"],i,a),new $.InstrumentationNodeModuleFile("mongodb/lib/cmap/connection.js",[">=6.4.0 <7"],s,a),new $.InstrumentationNodeModuleFile("mongodb/lib/cmap/connection_pool.js",[">=4.0.0 <6.4"],u,l),new $.InstrumentationNodeModuleFile("mongodb/lib/cmap/connect.js",[">=4.0.0 <7"],r,o),new $.InstrumentationNodeModuleFile("mongodb/lib/sessions.js",[">=4.0.0 <7"],p,d)])]}_getV3ConnectionPatches(){return{v3PatchConnection:e=>((0,$.isWrapped)(e.insert)&&this._unwrap(e,"insert"),this._wrap(e,"insert",this._getV3PatchOperation("insert")),(0,$.isWrapped)(e.remove)&&this._unwrap(e,"remove"),this._wrap(e,"remove",this._getV3PatchOperation("remove")),(0,$.isWrapped)(e.update)&&this._unwrap(e,"update"),this._wrap(e,"update",this._getV3PatchOperation("update")),(0,$.isWrapped)(e.command)&&this._unwrap(e,"command"),this._wrap(e,"command",this._getV3PatchCommand()),(0,$.isWrapped)(e.query)&&this._unwrap(e,"query"),this._wrap(e,"query",this._getV3PatchFind()),(0,$.isWrapped)(e.getMore)&&this._unwrap(e,"getMore"),this._wrap(e,"getMore",this._getV3PatchCursor()),e),v3UnpatchConnection:e=>{e!==void 0&&(this._unwrap(e,"insert"),this._unwrap(e,"remove"),this._unwrap(e,"update"),this._unwrap(e,"command"),this._unwrap(e,"query"),this._unwrap(e,"getMore"))}}}_getV4SessionsPatches(){return{v4PatchSessions:e=>((0,$.isWrapped)(e.acquire)&&this._unwrap(e,"acquire"),this._wrap(e.ServerSessionPool.prototype,"acquire",this._getV4AcquireCommand()),(0,$.isWrapped)(e.release)&&this._unwrap(e,"release"),this._wrap(e.ServerSessionPool.prototype,"release",this._getV4ReleaseCommand()),e),v4UnpatchSessions:e=>{e!==void 0&&((0,$.isWrapped)(e.acquire)&&this._unwrap(e,"acquire"),(0,$.isWrapped)(e.release)&&this._unwrap(e,"release"))}}}_getV4AcquireCommand(){let e=this;return n=>function(){let o=this.sessions.length,i=n.call(this),s=this.sessions.length;return o===s?e._connectionsUsage.add(1,{state:"used","pool.name":e._poolName}):o-1===s&&(e._connectionsUsage.add(-1,{state:"idle","pool.name":e._poolName}),e._connectionsUsage.add(1,{state:"used","pool.name":e._poolName})),i}}_getV4ReleaseCommand(){let e=this;return n=>function(o){let i=n.call(this,o);return e._connectionsUsage.add(-1,{state:"used","pool.name":e._poolName}),e._connectionsUsage.add(1,{state:"idle","pool.name":e._poolName}),i}}_getV4ConnectionPoolPatches(){return{v4PatchConnectionPool:e=>{let n=e.ConnectionPool.prototype;return(0,$.isWrapped)(n.checkOut)&&this._unwrap(n,"checkOut"),this._wrap(n,"checkOut",this._getV4ConnectionPoolCheckOut()),e},v4UnpatchConnectionPool:e=>{e!==void 0&&this._unwrap(e.ConnectionPool.prototype,"checkOut")}}}_getV4ConnectPatches(){return{v4PatchConnect:e=>((0,$.isWrapped)(e.connect)&&this._unwrap(e,"connect"),this._wrap(e,"connect",this._getV4ConnectCommand()),e),v4UnpatchConnect:e=>{e!==void 0&&this._unwrap(e,"connect")}}}_getV4ConnectionPoolCheckOut(){return e=>function(r){let o=J.context.bind(J.context.active(),r);return e.call(this,o)}}_getV4ConnectCommand(){let e=this;return n=>function(o,i){if(n.length===1){let a=n.call(this,o);return a&&typeof a.then=="function"&&a.then(()=>e.setPoolName(o),()=>{}),a}let s=function(a,u){if(a||!u){i(a,u);return}e.setPoolName(o),i(a,u)};return n.call(this,o,s)}}_getV4ConnectionPatches(){return{v4PatchConnectionCallback:e=>((0,$.isWrapped)(e.Connection.prototype.command)&&this._unwrap(e.Connection.prototype,"command"),this._wrap(e.Connection.prototype,"command",this._getV4PatchCommandCallback()),e),v4PatchConnectionPromise:e=>((0,$.isWrapped)(e.Connection.prototype.command)&&this._unwrap(e.Connection.prototype,"command"),this._wrap(e.Connection.prototype,"command",this._getV4PatchCommandPromise()),e),v4UnpatchConnection:e=>{e!==void 0&&this._unwrap(e.Connection.prototype,"command")}}}_getV3PatchOperation(e){let n=this;return r=>function(i,s,a,u,l){let p=J.trace.getSpan(J.context.active()),d=typeof u=="function"?u:l;if(!p||typeof d!="function"||typeof a!="object")return typeof u=="function"?r.call(this,i,s,a,u):r.call(this,i,s,a,u,l);let m=n.tracer.startSpan(`mongodb.${e}`,{kind:J.SpanKind.CLIENT});n._populateV3Attributes(m,s,i,a[0],e);let h=n._patchEnd(m,d);return typeof u=="function"?r.call(this,i,s,a,h):r.call(this,i,s,a,u,h)}}_getV3PatchCommand(){let e=this;return n=>function(o,i,s,a,u){let l=J.trace.getSpan(J.context.active()),p=typeof a=="function"?a:u;if(!l||typeof p!="function"||typeof s!="object")return typeof a=="function"?n.call(this,o,i,s,a):n.call(this,o,i,s,a,u);let d=t._getCommandType(s),m=d===Ht.MongodbCommandType.UNKNOWN?"command":d,h=e.tracer.startSpan(`mongodb.${m}`,{kind:J.SpanKind.CLIENT}),_=d===Ht.MongodbCommandType.UNKNOWN?void 0:d;e._populateV3Attributes(h,i,o,s,_);let T=e._patchEnd(h,p);return typeof a=="function"?n.call(this,o,i,s,T):n.call(this,o,i,s,a,T)}}_getV4PatchCommandCallback(){let e=this;return n=>function(o,i,s,a){let u=J.trace.getSpan(J.context.active()),l=a,p=Object.keys(i)[0];if(typeof l!="function"||typeof i!="object"||i.ismaster||i.hello)return n.call(this,o,i,s,a);let d;u&&(d=e.tracer.startSpan(`mongodb.${p}`,{kind:J.SpanKind.CLIENT}),e._populateV4Attributes(d,this,o,i,p));let m=e._patchEnd(d,l,this.id,p);return n.call(this,o,i,s,m)}}_getV4PatchCommandPromise(){let e=this;return n=>function(...o){let[i,s]=o,a=J.trace.getSpan(J.context.active()),u=Object.keys(s)[0],l=()=>{};if(typeof s!="object"||s.ismaster||s.hello)return n.apply(this,o);let p;a&&(p=e.tracer.startSpan(`mongodb.${u}`,{kind:J.SpanKind.CLIENT}),e._populateV4Attributes(p,this,i,s,u));let d=e._patchEnd(p,l,this.id,u),m=n.apply(this,o);return m.then(h=>d(null,h),h=>d(h)),m}}_getV3PatchFind(){let e=this;return n=>function(o,i,s,a,u,l){let p=J.trace.getSpan(J.context.active()),d=typeof u=="function"?u:l;if(!p||typeof d!="function"||typeof s!="object")return typeof u=="function"?n.call(this,o,i,s,a,u):n.call(this,o,i,s,a,u,l);let m=e.tracer.startSpan("mongodb.find",{kind:J.SpanKind.CLIENT});e._populateV3Attributes(m,i,o,s,"find");let h=e._patchEnd(m,d);return typeof u=="function"?n.call(this,o,i,s,a,h):n.call(this,o,i,s,a,u,h)}}_getV3PatchCursor(){let e=this;return n=>function(o,i,s,a,u,l){let p=J.trace.getSpan(J.context.active()),d=typeof u=="function"?u:l;if(!p||typeof d!="function")return typeof u=="function"?n.call(this,o,i,s,a,u):n.call(this,o,i,s,a,u,l);let m=e.tracer.startSpan("mongodb.getMore",{kind:J.SpanKind.CLIENT});e._populateV3Attributes(m,i,o,s.cmd,"getMore");let h=e._patchEnd(m,d);return typeof u=="function"?n.call(this,o,i,s,a,h):n.call(this,o,i,s,a,u,h)}}static _getCommandType(e){return e.createIndexes!==void 0?Ht.MongodbCommandType.CREATE_INDEXES:e.findandmodify!==void 0?Ht.MongodbCommandType.FIND_AND_MODIFY:e.ismaster!==void 0?Ht.MongodbCommandType.IS_MASTER:e.count!==void 0?Ht.MongodbCommandType.COUNT:e.aggregate!==void 0?Ht.MongodbCommandType.AGGREGATE:Ht.MongodbCommandType.UNKNOWN}_populateV4Attributes(e,n,r,o,i){let s,a;if(n){let l=typeof n.address=="string"?n.address.split(":"):"";l.length===2&&(s=l[0],a=l[1])}let u;o?.documents&&o.documents[0]?u=o.documents[0]:o?.cursors?u=o.cursors:u=o,this._addAllSpanAttributes(e,r.db,r.collection,s,a,u,i)}_populateV3Attributes(e,n,r,o,i){var s,a,u,l,p,d,m,h;let _,T;if(r&&r.s&&(_=(a=(s=r.s.options)===null||s===void 0?void 0:s.host)!==null&&a!==void 0?a:r.s.host,T=(p=(l=(u=r.s.options)===null||u===void 0?void 0:u.port)!==null&&l!==void 0?l:r.s.port)===null||p===void 0?void 0:p.toString(),_==null||T==null)){let A=(d=r.description)===null||d===void 0?void 0:d.address;if(A){let P=A.split(":");_=P[0],T=P[1]}}let[R,M]=n.toString().split("."),C=(h=(m=o?.query)!==null&&m!==void 0?m:o?.q)!==null&&h!==void 0?h:o;this._addAllSpanAttributes(e,R,M,_,T,C,i)}_addAllSpanAttributes(e,n,r,o,i,s,a){if(e.setAttributes({[Et.SEMATTRS_DB_SYSTEM]:Et.DBSYSTEMVALUES_MONGODB,[Et.SEMATTRS_DB_NAME]:n,[Et.SEMATTRS_DB_MONGODB_COLLECTION]:r,[Et.SEMATTRS_DB_OPERATION]:a,[Et.SEMATTRS_DB_CONNECTION_STRING]:`mongodb://${o}:${i}/${n}`}),o&&i){e.setAttribute(Et.SEMATTRS_NET_PEER_NAME,o);let l=parseInt(i,10);isNaN(l)||e.setAttribute(Et.SEMATTRS_NET_PEER_PORT,l)}if(!s)return;let u=typeof this._config.dbStatementSerializer=="function"?this._config.dbStatementSerializer:this._defaultDbStatementSerializer.bind(this);(0,$.safeExecuteInTheMiddle)(()=>{let l=u(s);e.setAttribute(Et.SEMATTRS_DB_STATEMENT,l)},l=>{l&&this._diag.error("Error running dbStatementSerializer hook",l)},!0)}_defaultDbStatementSerializer(e){var n;let o=!!(!((n=this._config)===null||n===void 0)&&n.enhancedDatabaseReporting)?e:this._scrubStatement(e);return JSON.stringify(o)}_scrubStatement(e){return Array.isArray(e)?e.map(n=>this._scrubStatement(n)):typeof e=="object"&&e!==null?Object.fromEntries(Object.entries(e).map(([n,r])=>[n,this._scrubStatement(r)])):"?"}_handleExecutionResult(e,n){let r=this.getConfig();typeof r.responseHook=="function"&&(0,$.safeExecuteInTheMiddle)(()=>{r.responseHook(e,{data:n})},o=>{o&&this._diag.error("Error running response hook",o)},!0)}_patchEnd(e,n,r,o){let i=J.context.active(),s=this;return function(...u){let l=u[0];if(e){if(l instanceof Error)e?.setStatus({code:J.SpanStatusCode.ERROR,message:l.message});else{let p=u[1];s._handleExecutionResult(e,p)}e.end()}return J.context.with(i,()=>(o==="endSessions"&&s._connectionsUsage.add(-1,{state:"idle","pool.name":s._poolName}),n.apply(this,u)))}}setPoolName(e){var n,r;let o=(n=e.hostAddress)===null||n===void 0?void 0:n.host,i=(r=e.hostAddress)===null||r===void 0?void 0:r.port,s=e.dbName,a=`mongodb://${o}:${i}/${s}`;this._poolName=a}};di.MongoDBInstrumentation=Ha});var dm=E(Hr=>{"use strict";c();Object.defineProperty(Hr,"__esModule",{value:!0});Hr.MongodbCommandType=void 0;var Xv;(function(t){t.CREATE_INDEXES="createIndexes",t.FIND_AND_MODIFY="findAndModify",t.IS_MASTER="isMaster",t.COUNT="count",t.UNKNOWN="unknown"})(Xv=Hr.MongodbCommandType||(Hr.MongodbCommandType={}))});var mm=E(jt=>{"use strict";c();var $v=jt&&jt.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),fm=jt&&jt.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&$v(e,t,n)};Object.defineProperty(jt,"__esModule",{value:!0});fm(pm(),jt);fm(dm(),jt)});var ym=E(Bt=>{"use strict";c();Object.defineProperty(Bt,"__esModule",{value:!0});Bt.handleCallbackResponse=Bt.handlePromiseResponse=Bt.getAttributesFromCollection=void 0;var Tm=(F(),y(z)),zv=(ae(),y(le)),jr=(ne(),y(ue));function Jv(t){return{[jr.SEMATTRS_DB_MONGODB_COLLECTION]:t.name,[jr.SEMATTRS_DB_NAME]:t.conn.name,[jr.SEMATTRS_DB_USER]:t.conn.user,[jr.SEMATTRS_NET_PEER_NAME]:t.conn.host,[jr.SEMATTRS_NET_PEER_PORT]:t.conn.port}}Bt.getAttributesFromCollection=Jv;function Sm(t,e={}){t.recordException(e),t.setStatus({code:Tm.SpanStatusCode.ERROR,message:`${e.message} ${e.code?`
|
|
5
|
+
Mongoose Error Code: ${e.code}`:""}`})}function ja(t,e,n,r=void 0){n&&(0,zv.safeExecuteInTheMiddle)(()=>n(t,{moduleVersion:r,response:e}),o=>{o&&Tm.diag.error("mongoose instrumentation: responseHook error",o)},!0)}function Qv(t,e,n,r=void 0){return t instanceof Promise?t.then(o=>(ja(e,o,n,r),o)).catch(o=>{throw Sm(e,o),o}).finally(()=>e.end()):(ja(e,t,n,r),e.end(),t)}Bt.handlePromiseResponse=Qv;function eA(t,e,n,r,o,i,s=void 0){let a=0;return o.length===2&&(a=1),o[a]=(u,l)=>(u?Sm(r,u):ja(r,l,i,s),r.end(),t(u,l)),e.apply(n,o)}Bt.handleCallbackResponse=eA});var vm=E(Dn=>{"use strict";c();Object.defineProperty(Dn,"__esModule",{value:!0});Dn.PACKAGE_NAME=Dn.PACKAGE_VERSION=void 0;Dn.PACKAGE_VERSION="0.40.0";Dn.PACKAGE_NAME="@opentelemetry/instrumentation-mongoose"});var Cm=E(tt=>{"use strict";c();Object.defineProperty(tt,"__esModule",{value:!0});tt.MongooseInstrumentation=tt._STORED_PARENT_SPAN=void 0;var Ae=(F(),y(z)),tA=(Fe(),y(Ve)),Ba=ym(),Am=(ae(),y(le)),Om=vm(),Br=(ne(),y(ue)),bm=["remove","deleteOne","deleteMany","find","findOne","estimatedDocumentCount","countDocuments","count","distinct","where","$where","findOneAndUpdate","findOneAndDelete","findOneAndReplace","findOneAndRemove"];tt._STORED_PARENT_SPAN=Symbol("stored-parent-span");var qa=class extends Am.InstrumentationBase{constructor(e={}){super(Om.PACKAGE_NAME,Om.PACKAGE_VERSION,e)}setConfig(e={}){this._config=Object.assign({},e)}init(){return new Am.InstrumentationNodeModuleDefinition("mongoose",[">=5.9.7 <7"],this.patch.bind(this),this.unpatch.bind(this))}patch(e,n){return this._wrap(e.Model.prototype,"save",this.patchOnModelMethods("save",n)),e.Model.prototype.$save=e.Model.prototype.save,this._wrap(e.Model.prototype,"remove",this.patchOnModelMethods("remove",n)),this._wrap(e.Query.prototype,"exec",this.patchQueryExec(n)),this._wrap(e.Aggregate.prototype,"exec",this.patchAggregateExec(n)),bm.forEach(r=>{this._wrap(e.Query.prototype,r,this.patchAndCaptureSpanContext(r))}),this._wrap(e.Model,"aggregate",this.patchModelAggregate()),e}unpatch(e){this._unwrap(e.Model.prototype,"save"),e.Model.prototype.$save=e.Model.prototype.save,this._unwrap(e.Model.prototype,"remove"),this._unwrap(e.Query.prototype,"exec"),this._unwrap(e.Aggregate.prototype,"exec"),bm.forEach(n=>{this._unwrap(e.Query.prototype,n)}),this._unwrap(e.Model,"aggregate")}patchAggregateExec(e){let n=this;return r=>function(i){var s;if(n._config.requireParentSpan&&Ae.trace.getSpan(Ae.context.active())===void 0)return r.apply(this,arguments);let a=this[tt._STORED_PARENT_SPAN],u={};n._config.dbStatementSerializer&&(u[Br.SEMATTRS_DB_STATEMENT]=n._config.dbStatementSerializer("aggregate",{options:this.options,aggregatePipeline:this._pipeline}));let l=n._startSpan(this._model.collection,(s=this._model)===null||s===void 0?void 0:s.modelName,"aggregate",u,a);return n._handleResponse(l,r,this,arguments,i,e)}}patchQueryExec(e){let n=this;return r=>function(i){if(n._config.requireParentSpan&&Ae.trace.getSpan(Ae.context.active())===void 0)return r.apply(this,arguments);let s=this[tt._STORED_PARENT_SPAN],a={};n._config.dbStatementSerializer&&(a[Br.SEMATTRS_DB_STATEMENT]=n._config.dbStatementSerializer(this.op,{condition:this._conditions,updates:this._update,options:this.options,fields:this._fields}));let u=n._startSpan(this.mongooseCollection,this.model.modelName,this.op,a,s);return n._handleResponse(u,r,this,arguments,i,e)}}patchOnModelMethods(e,n){let r=this;return o=>function(s,a){if(r._config.requireParentSpan&&Ae.trace.getSpan(Ae.context.active())===void 0)return o.apply(this,arguments);let u={document:this};s&&!(s instanceof Function)&&(u.options=s);let l={};r._config.dbStatementSerializer&&(l[Br.SEMATTRS_DB_STATEMENT]=r._config.dbStatementSerializer(e,u));let p=r._startSpan(this.constructor.collection,this.constructor.modelName,e,l);return s instanceof Function&&(a=s,s=void 0),r._handleResponse(p,o,this,arguments,a,n)}}patchModelAggregate(){let e=this;return n=>function(){let o=Ae.trace.getSpan(Ae.context.active()),i=e._callOriginalFunction(()=>n.apply(this,arguments));return i&&(i[tt._STORED_PARENT_SPAN]=o),i}}patchAndCaptureSpanContext(e){let n=this;return r=>function(){return this[tt._STORED_PARENT_SPAN]=Ae.trace.getSpan(Ae.context.active()),n._callOriginalFunction(()=>r.apply(this,arguments))}}_startSpan(e,n,r,o,i){return this.tracer.startSpan(`mongoose.${n}.${r}`,{kind:Ae.SpanKind.CLIENT,attributes:Object.assign(Object.assign(Object.assign({},o),(0,Ba.getAttributesFromCollection)(e)),{[Br.SEMATTRS_DB_OPERATION]:r,[Br.SEMATTRS_DB_SYSTEM]:"mongoose"})},i?Ae.trace.setSpan(Ae.context.active(),i):void 0)}_handleResponse(e,n,r,o,i,s=void 0){let a=this;if(i instanceof Function)return a._callOriginalFunction(()=>(0,Ba.handleCallbackResponse)(i,n,r,e,o,a._config.responseHook,s));{let u=a._callOriginalFunction(()=>n.apply(r,o));return(0,Ba.handlePromiseResponse)(u,e,a._config.responseHook,s)}}_callOriginalFunction(e){var n;return!((n=this._config)===null||n===void 0)&&n.suppressInternalInstrumentation?Ae.context.with((0,tA.suppressTracing)(Ae.context.active()),e):e()}};tt.MongooseInstrumentation=qa});var Im=E(Rm=>{"use strict";c();Object.defineProperty(Rm,"__esModule",{value:!0})});var Nm=E(qt=>{"use strict";c();var nA=qt&&qt.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),Pm=qt&&qt.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&nA(e,t,n)};Object.defineProperty(qt,"__esModule",{value:!0});Pm(Cm(),qt);Pm(Im(),qt)});var Fm=E(qr=>{"use strict";c();Object.defineProperty(qr,"__esModule",{value:!0});qr.AttributeNames=void 0;var oA;(function(t){t.MYSQL_VALUES="db.mysql.values"})(oA=qr.AttributeNames||(qr.AttributeNames={}))});var km=E(Re=>{"use strict";c();Object.defineProperty(Re,"__esModule",{value:!0});Re.getPoolName=Re.arrayStringifyHelper=Re.getSpanName=Re.getDbValues=Re.getDbStatement=Re.getConnectionAttributes=void 0;var Tt=(ne(),y(ue));function iA(t){let{host:e,port:n,database:r,user:o}=sA(t),i=parseInt(n,10);return isNaN(i)?{[Tt.SEMATTRS_NET_PEER_NAME]:e,[Tt.SEMATTRS_DB_CONNECTION_STRING]:Dm(e,n,r),[Tt.SEMATTRS_DB_NAME]:r,[Tt.SEMATTRS_DB_USER]:o}:{[Tt.SEMATTRS_NET_PEER_NAME]:e,[Tt.SEMATTRS_NET_PEER_PORT]:i,[Tt.SEMATTRS_DB_CONNECTION_STRING]:Dm(e,n,r),[Tt.SEMATTRS_DB_NAME]:r,[Tt.SEMATTRS_DB_USER]:o}}Re.getConnectionAttributes=iA;function sA(t){let{host:e,port:n,database:r,user:o}=t&&t.connectionConfig||t||{};return{host:e,port:n,database:r,user:o}}function Dm(t,e,n){let r=`jdbc:mysql://${t||"localhost"}`;return typeof e=="number"&&(r+=`:${e}`),typeof n=="string"&&(r+=`/${n}`),r}function aA(t){return typeof t=="string"?t:t.sql}Re.getDbStatement=aA;function cA(t,e){return Wa(typeof t=="string"?e:e||t.values)}Re.getDbValues=cA;function uA(t){return typeof t=="object"?t.sql:t.split(" ")[0]}Re.getSpanName=uA;function Wa(t){return t?`[${t.toString()}]`:""}Re.arrayStringifyHelper=Wa;function lA(t){let e=t.config.connectionConfig,n="";return n+=e.host?`host: '${e.host}', `:"",n+=e.port?`port: ${e.port}, `:"",n+=e.database?`database: '${e.database}', `:"",n+=e.user?`user: '${e.user}'`:"",e.user||(n=n.substring(0,n.length-2)),n.trim()}Re.getPoolName=lA});var Gm=E(kn=>{"use strict";c();Object.defineProperty(kn,"__esModule",{value:!0});kn.PACKAGE_NAME=kn.PACKAGE_VERSION=void 0;kn.PACKAGE_VERSION="0.40.0";kn.PACKAGE_NAME="@opentelemetry/instrumentation-mysql"});var Hm=E(mi=>{"use strict";c();Object.defineProperty(mi,"__esModule",{value:!0});mi.MySQLInstrumentation=void 0;var Ie=(F(),y(z)),Gn=(ae(),y(le)),Va=(ne(),y(ue)),pA=Fm(),Un=km(),Um=Gm(),fi=class t extends Gn.InstrumentationBase{constructor(e={}){super(Um.PACKAGE_NAME,Um.PACKAGE_VERSION,e),this._setMetricInstruments()}setMeterProvider(e){super.setMeterProvider(e),this._setMetricInstruments()}_setMetricInstruments(){this._connectionsUsage=this.meter.createUpDownCounter("db.client.connections.usage",{description:"The number of connections that are currently in state described by the state attribute.",unit:"{connection}"})}init(){return[new Gn.InstrumentationNodeModuleDefinition("mysql",[">=2.0.0 <3"],e=>((0,Gn.isWrapped)(e.createConnection)&&this._unwrap(e,"createConnection"),this._wrap(e,"createConnection",this._patchCreateConnection()),(0,Gn.isWrapped)(e.createPool)&&this._unwrap(e,"createPool"),this._wrap(e,"createPool",this._patchCreatePool()),(0,Gn.isWrapped)(e.createPoolCluster)&&this._unwrap(e,"createPoolCluster"),this._wrap(e,"createPoolCluster",this._patchCreatePoolCluster()),e),e=>{e!==void 0&&(this._unwrap(e,"createConnection"),this._unwrap(e,"createPool"),this._unwrap(e,"createPoolCluster"))})]}_patchCreateConnection(){return e=>{let n=this;return function(o){let i=e(...arguments);return n._wrap(i,"query",n._patchQuery(i)),i}}}_patchCreatePool(){return e=>{let n=this;return function(o){let i=e(...arguments);return n._wrap(i,"query",n._patchQuery(i)),n._wrap(i,"getConnection",n._patchGetConnection(i)),n._wrap(i,"end",n._patchPoolEnd(i)),n._setPoolcallbacks(i,n,""),i}}}_patchPoolEnd(e){return n=>{let r=this;return function(i){let s=e._allConnections.length,a=e._freeConnections.length,u=s-a,l=(0,Un.getPoolName)(e);r._connectionsUsage.add(-u,{state:"used",name:l}),r._connectionsUsage.add(-a,{state:"idle",name:l}),n.apply(e,arguments)}}}_patchCreatePoolCluster(){return e=>{let n=this;return function(o){let i=e(...arguments);return n._wrap(i,"getConnection",n._patchGetConnection(i)),n._wrap(i,"add",n._patchAdd(i)),i}}}_patchAdd(e){return n=>{let r=this;return function(i,s){if(!r._enabled)return r._unwrap(e,"add"),n.apply(e,arguments);n.apply(e,arguments);let a=e._nodes;if(a){let u=typeof i=="object"?"CLUSTER::"+e._lastId:String(i),l=a[u].pool;r._setPoolcallbacks(l,r,i)}}}}_patchGetConnection(e){return n=>{let r=this;return function(i,s,a){if(!r._enabled)return r._unwrap(e,"getConnection"),n.apply(e,arguments);if(arguments.length===1&&typeof i=="function"){let u=r._getConnectionCallbackPatchFn(i);return n.call(e,u)}if(arguments.length===2&&typeof s=="function"){let u=r._getConnectionCallbackPatchFn(s);return n.call(e,i,u)}if(arguments.length===3&&typeof a=="function"){let u=r._getConnectionCallbackPatchFn(a);return n.call(e,i,s,u)}return n.apply(e,arguments)}}}_getConnectionCallbackPatchFn(e){let n=this,r=Ie.context.active();return function(o,i){i&&((0,Gn.isWrapped)(i.query)||n._wrap(i,"query",n._patchQuery(i))),typeof e=="function"&&Ie.context.with(r,e,this,o,i)}}_patchQuery(e){return n=>{let r=this;return function(o,i,s){if(!r._enabled)return r._unwrap(e,"query"),n.apply(e,arguments);let a=r.tracer.startSpan((0,Un.getSpanName)(o),{kind:Ie.SpanKind.CLIENT,attributes:Object.assign(Object.assign({},t.COMMON_ATTRIBUTES),(0,Un.getConnectionAttributes)(e.config))});if(a.setAttribute(Va.SEMATTRS_DB_STATEMENT,(0,Un.getDbStatement)(o)),r.getConfig().enhancedDatabaseReporting){let d;Array.isArray(i)?d=i:arguments[2]&&(d=[i]),a.setAttribute(pA.AttributeNames.MYSQL_VALUES,(0,Un.getDbValues)(o,d))}let l=Array.from(arguments).findIndex(d=>typeof d=="function"),p=Ie.context.active();if(l===-1){let d=Ie.context.with(Ie.trace.setSpan(Ie.context.active(),a),()=>n.apply(e,arguments));return Ie.context.bind(p,d),d.on("error",m=>a.setStatus({code:Ie.SpanStatusCode.ERROR,message:m.message})).on("end",()=>{a.end()})}else return r._wrap(arguments,l,r._patchCallbackQuery(a,p)),Ie.context.with(Ie.trace.setSpan(Ie.context.active(),a),()=>n.apply(e,arguments))}}}_patchCallbackQuery(e,n){return r=>function(o,i,s){return o&&e.setStatus({code:Ie.SpanStatusCode.ERROR,message:o.message}),e.end(),Ie.context.with(n,()=>r(...arguments))}}_setPoolcallbacks(e,n,r){let o=r||(0,Un.getPoolName)(e);e.on("connection",i=>{n._connectionsUsage.add(1,{state:"idle",name:o})}),e.on("acquire",i=>{n._connectionsUsage.add(-1,{state:"idle",name:o}),n._connectionsUsage.add(1,{state:"used",name:o})}),e.on("release",i=>{n._connectionsUsage.add(-1,{state:"used",name:o}),n._connectionsUsage.add(1,{state:"idle",name:o})})}};mi.MySQLInstrumentation=fi;fi.COMMON_ATTRIBUTES={[Va.SEMATTRS_DB_SYSTEM]:Va.DBSYSTEMVALUES_MYSQL}});var Bm=E(jm=>{"use strict";c();Object.defineProperty(jm,"__esModule",{value:!0})});var Wm=E(Wt=>{"use strict";c();var dA=Wt&&Wt.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),qm=Wt&&Wt.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&dA(e,t,n)};Object.defineProperty(Wt,"__esModule",{value:!0});qm(Hm(),Wt);qm(Bm(),Wt)});var Ya=E(hi=>{"use strict";c();Object.defineProperty(hi,"__esModule",{value:!0});hi.addSqlCommenterComment=void 0;var Ka=(F(),y(z)),mA=(Fe(),y(Ve));function hA(t){let e=t.indexOf("--");if(e>=0)return!0;if(t.indexOf("/*")<0)return!1;let r=t.indexOf("*/");return e<r}function _A(t){return encodeURIComponent(t).replace(/[!'()*]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`)}function gA(t,e){if(typeof e!="string"||e.length===0||hA(e))return e;let n=new mA.W3CTraceContextPropagator,r={};n.inject(Ka.trace.setSpan(Ka.ROOT_CONTEXT,t),r,Ka.defaultTextMapSetter);let o=Object.keys(r).sort();if(o.length===0)return e;let i=o.map(s=>{let a=_A(r[s]);return`${s}='${a}'`}).join(",");return`${e} /*${i}*/`}hi.addSqlCommenterComment=gA});var Zm=E(nt=>{"use strict";c();Object.defineProperty(nt,"__esModule",{value:!0});nt.once=nt.getSpanName=nt.getDbStatement=nt.getConnectionAttributes=void 0;var St=(ne(),y(ue));function EA(t){let{host:e,port:n,database:r,user:o}=TA(t),i=parseInt(n,10);return isNaN(i)?{[St.SEMATTRS_NET_PEER_NAME]:e,[St.SEMATTRS_DB_CONNECTION_STRING]:$m(e,n,r),[St.SEMATTRS_DB_NAME]:r,[St.SEMATTRS_DB_USER]:o}:{[St.SEMATTRS_NET_PEER_NAME]:e,[St.SEMATTRS_NET_PEER_PORT]:i,[St.SEMATTRS_DB_CONNECTION_STRING]:$m(e,n,r),[St.SEMATTRS_DB_NAME]:r,[St.SEMATTRS_DB_USER]:o}}nt.getConnectionAttributes=EA;function TA(t){let{host:e,port:n,database:r,user:o}=t&&t.connectionConfig||t||{};return{host:e,port:n,database:r,user:o}}function $m(t,e,n){let r=`jdbc:mysql://${t||"localhost"}`;return typeof e=="number"&&(r+=`:${e}`),typeof n=="string"&&(r+=`/${n}`),r}function SA(t,e,n){return typeof t=="string"?n?e(t,n):t:n||t.values?e(t.sql,n||t.values):t.sql}nt.getDbStatement=SA;function yA(t){var e;let n=typeof t=="object"?t.sql:t;return(e=n?.split(" "))===null||e===void 0?void 0:e[0]}nt.getSpanName=yA;var vA=t=>{let e=!1;return(...n)=>{if(!e)return e=!0,t(...n)}};nt.once=vA});var zm=E(Hn=>{"use strict";c();Object.defineProperty(Hn,"__esModule",{value:!0});Hn.PACKAGE_NAME=Hn.PACKAGE_VERSION=void 0;Hn.PACKAGE_VERSION="0.40.0";Hn.PACKAGE_NAME="@opentelemetry/instrumentation-mysql2"});var th=E(Ei=>{"use strict";c();Object.defineProperty(Ei,"__esModule",{value:!0});Ei.MySQL2Instrumentation=void 0;var Jm=(F(),y(z)),Wr=(ae(),y(le)),Xa=(ne(),y(ue)),Qm=Ya(),_i=Zm(),eh=zm(),gi=class t extends Wr.InstrumentationBase{constructor(e={}){super(eh.PACKAGE_NAME,eh.PACKAGE_VERSION,e)}init(){return[new Wr.InstrumentationNodeModuleDefinition("mysql2",[">=1.4.2 <4"],e=>{let n=e.Connection.prototype;return(0,Wr.isWrapped)(n.query)&&this._unwrap(n,"query"),this._wrap(n,"query",this._patchQuery(e.format,!1)),(0,Wr.isWrapped)(n.execute)&&this._unwrap(n,"execute"),this._wrap(n,"execute",this._patchQuery(e.format,!0)),e},e=>{if(e===void 0)return;let n=e.Connection.prototype;this._unwrap(n,"query"),this._unwrap(n,"execute")})]}_patchQuery(e,n){return r=>{let o=this;return function(i,s,a){let u=o._config,l;Array.isArray(s)?l=s:arguments[2]&&(l=[s]);let p=o.tracer.startSpan((0,_i.getSpanName)(i),{kind:Jm.SpanKind.CLIENT,attributes:Object.assign(Object.assign(Object.assign({},t.COMMON_ATTRIBUTES),(0,_i.getConnectionAttributes)(this.config)),{[Xa.SEMATTRS_DB_STATEMENT]:(0,_i.getDbStatement)(i,e,l)})});!n&&u.addSqlCommenterCommentToQueries&&(arguments[0]=i=typeof i=="string"?(0,Qm.addSqlCommenterComment)(p,i):Object.assign(i,{sql:(0,Qm.addSqlCommenterComment)(p,i.sql)}));let d=(0,_i.once)((m,h)=>{m?p.setStatus({code:Jm.SpanStatusCode.ERROR,message:m.message}):typeof u.responseHook=="function"&&(0,Wr.safeExecuteInTheMiddle)(()=>{u.responseHook(p,{queryResults:h})},_=>{_&&o._diag.warn("Failed executing responseHook",_)},!0),p.end()});if(arguments.length===1){typeof i.onResult=="function"&&o._wrap(i,"onResult",o._patchCallbackQuery(d));let m=r.apply(this,arguments);return m.once("error",h=>{d(h)}).once("result",h=>{d(void 0,h)}),m}return typeof arguments[1]=="function"?o._wrap(arguments,1,o._patchCallbackQuery(d)):typeof arguments[2]=="function"&&o._wrap(arguments,2,o._patchCallbackQuery(d)),r.apply(this,arguments)}}}_patchCallbackQuery(e){return n=>function(r,o,i){return e(r,o),n(...arguments)}}};Ei.MySQL2Instrumentation=gi;gi.COMMON_ATTRIBUTES={[Xa.SEMATTRS_DB_SYSTEM]:Xa.DBSYSTEMVALUES_MYSQL}});var rh=E(nh=>{"use strict";c();Object.defineProperty(nh,"__esModule",{value:!0})});var ih=E(Vt=>{"use strict";c();var AA=Vt&&Vt.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),oh=Vt&&Vt.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&AA(e,t,n)};Object.defineProperty(Vt,"__esModule",{value:!0});oh(th(),Vt);oh(rh(),Vt)});var lh=E(Ti=>{"use strict";c();Object.defineProperty(Ti,"__esModule",{value:!0});Ti.endSpan=void 0;var bA=(F(),y(z)),CA=(t,e)=>{e&&(t.recordException(e),t.setStatus({code:bA.SpanStatusCode.ERROR,message:e.message})),t.end()};Ti.endSpan=CA});var $a=E(Si=>{"use strict";c();Object.defineProperty(Si,"__esModule",{value:!0});Si.defaultDbStatementSerializer=void 0;var RA=[{regex:/^ECHO/i,args:0},{regex:/^(LPUSH|MSET|PFA|PUBLISH|RPUSH|SADD|SET|SPUBLISH|XADD|ZADD)/i,args:1},{regex:/^(HSET|HMSET|LSET|LINSERT)/i,args:2},{regex:/^(ACL|BIT|B[LRZ]|CLIENT|CLUSTER|CONFIG|COMMAND|DECR|DEL|EVAL|EX|FUNCTION|GEO|GET|HINCR|HMGET|HSCAN|INCR|L[TRLM]|MEMORY|P[EFISTU]|RPOP|S[CDIMORSU]|XACK|X[CDGILPRT]|Z[CDILMPRS])/i,args:-1}],IA=(t,e)=>{var n,r;if(Array.isArray(e)&&e.length){let o=(r=(n=RA.find(({regex:s})=>s.test(t)))===null||n===void 0?void 0:n.args)!==null&&r!==void 0?r:0,i=o>=0?e.slice(0,o):e;return e.length>i.length&&i.push(`[${e.length-o} other arguments]`),`${t} ${i.join(" ")}`}return t};Si.defaultDbStatementSerializer=IA});var ph=E(jn=>{"use strict";c();Object.defineProperty(jn,"__esModule",{value:!0});jn.PACKAGE_NAME=jn.PACKAGE_VERSION=void 0;jn.PACKAGE_VERSION="0.42.0";jn.PACKAGE_NAME="@opentelemetry/instrumentation-ioredis"});var mh=E(vi=>{"use strict";c();Object.defineProperty(vi,"__esModule",{value:!0});vi.IORedisInstrumentation=void 0;var Kt=(F(),y(z)),yi=(ae(),y(le)),Ue=(ne(),y(ue)),dh=(ae(),y(le)),Vr=lh(),PA=$a(),fh=ph(),NA={requireParentSpan:!0},Za=class extends yi.InstrumentationBase{constructor(e={}){super(fh.PACKAGE_NAME,fh.PACKAGE_VERSION,Object.assign({},NA,e))}init(){return[new yi.InstrumentationNodeModuleDefinition("ioredis",[">=2.0.0 <6"],(e,n)=>{let r=e[Symbol.toStringTag]==="Module"?e.default:e;return(0,yi.isWrapped)(r.prototype.sendCommand)&&this._unwrap(r.prototype,"sendCommand"),this._wrap(r.prototype,"sendCommand",this._patchSendCommand(n)),(0,yi.isWrapped)(r.prototype.connect)&&this._unwrap(r.prototype,"connect"),this._wrap(r.prototype,"connect",this._patchConnection()),e},e=>{if(e===void 0)return;let n=e[Symbol.toStringTag]==="Module"?e.default:e;this._unwrap(n.prototype,"sendCommand"),this._unwrap(n.prototype,"connect")})]}_patchSendCommand(e){return n=>this._traceSendCommand(n,e)}_patchConnection(){return e=>this._traceConnection(e)}_traceSendCommand(e,n){let r=this;return function(o){if(arguments.length<1||typeof o!="object")return e.apply(this,arguments);let i=r.getConfig(),s=i?.dbStatementSerializer||PA.defaultDbStatementSerializer,a=Kt.trace.getSpan(Kt.context.active())===void 0;if(i?.requireParentSpan===!0&&a)return e.apply(this,arguments);let u=r.tracer.startSpan(o.name,{kind:Kt.SpanKind.CLIENT,attributes:{[Ue.SEMATTRS_DB_SYSTEM]:Ue.DBSYSTEMVALUES_REDIS,[Ue.SEMATTRS_DB_STATEMENT]:s(o.name,o.args)}});i?.requestHook&&(0,dh.safeExecuteInTheMiddle)(()=>i?.requestHook(u,{moduleVersion:n,cmdName:o.name,cmdArgs:o.args}),d=>{d&&Kt.diag.error("ioredis instrumentation: request hook failed",d)},!0);let{host:l,port:p}=this.options;u.setAttributes({[Ue.SEMATTRS_NET_PEER_NAME]:l,[Ue.SEMATTRS_NET_PEER_PORT]:p,[Ue.SEMATTRS_DB_CONNECTION_STRING]:`redis://${l}:${p}`});try{let d=e.apply(this,arguments),m=o.resolve;o.resolve=function(_){(0,dh.safeExecuteInTheMiddle)(()=>{var T;return(T=i?.responseHook)===null||T===void 0?void 0:T.call(i,u,o.name,o.args,_)},T=>{T&&Kt.diag.error("ioredis instrumentation: response hook failed",T)},!0),(0,Vr.endSpan)(u,null),m(_)};let h=o.reject;return o.reject=function(_){(0,Vr.endSpan)(u,_),h(_)},d}catch(d){throw(0,Vr.endSpan)(u,d),d}}}_traceConnection(e){let n=this;return function(){let r=n.getConfig(),o=Kt.trace.getSpan(Kt.context.active())===void 0;if(r?.requireParentSpan===!0&&o)return e.apply(this,arguments);let i=n.tracer.startSpan("connect",{kind:Kt.SpanKind.CLIENT,attributes:{[Ue.SEMATTRS_DB_SYSTEM]:Ue.DBSYSTEMVALUES_REDIS,[Ue.SEMATTRS_DB_STATEMENT]:"connect"}}),{host:s,port:a}=this.options;i.setAttributes({[Ue.SEMATTRS_NET_PEER_NAME]:s,[Ue.SEMATTRS_NET_PEER_PORT]:a,[Ue.SEMATTRS_DB_CONNECTION_STRING]:`redis://${s}:${a}`});try{let u=e.apply(this,arguments);return(0,Vr.endSpan)(i,null),u}catch(u){throw(0,Vr.endSpan)(i,u),u}}}};vi.IORedisInstrumentation=Za});var _h=E(hh=>{"use strict";c();Object.defineProperty(hh,"__esModule",{value:!0})});var Eh=E(Yt=>{"use strict";c();var MA=Yt&&Yt.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),gh=Yt&&Yt.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&MA(e,t,n)};Object.defineProperty(Yt,"__esModule",{value:!0});gh(mh(),Yt);gh(_h(),Yt)});var Th=E(Ai=>{"use strict";c();Object.defineProperty(Ai,"__esModule",{value:!0});Ai.getClientAttributes=void 0;var Kr=(ne(),y(ue));function xA(t,e){var n,r;return{[Kr.SEMATTRS_DB_SYSTEM]:Kr.DBSYSTEMVALUES_REDIS,[Kr.SEMATTRS_NET_PEER_NAME]:(n=e?.socket)===null||n===void 0?void 0:n.host,[Kr.SEMATTRS_NET_PEER_PORT]:(r=e?.socket)===null||r===void 0?void 0:r.port,[Kr.SEMATTRS_DB_CONNECTION_STRING]:LA(t,e?.url)}}Ai.getClientAttributes=xA;function LA(t,e){if(typeof e=="string")try{let n=new URL(e);return n.searchParams.delete("user_pwd"),n.username="",n.password="",n.href}catch(n){t.error("failed to sanitize redis connection url",n)}}});var Sh=E(Bn=>{"use strict";c();Object.defineProperty(Bn,"__esModule",{value:!0});Bn.PACKAGE_NAME=Bn.PACKAGE_VERSION=void 0;Bn.PACKAGE_VERSION="0.41.0";Bn.PACKAGE_NAME="@opentelemetry/instrumentation-redis-4"});var Oh=E(bi=>{"use strict";c();Object.defineProperty(bi,"__esModule",{value:!0});bi.RedisInstrumentation=void 0;var He=(F(),y(z)),fe=(ae(),y(le)),yh=Th(),wA=$a(),vh=Sh(),FA=(ne(),y(ue)),Yr=Symbol("opentelemetry.instrumentation.redis.open_spans"),Ah=Symbol("opentelemetry.instrumentation.redis.multi_command_options"),DA={requireParentSpan:!1},Oi=class t extends fe.InstrumentationBase{constructor(e={}){super(vh.PACKAGE_NAME,vh.PACKAGE_VERSION,e)}setConfig(e={}){this._config=Object.assign({},DA,e)}init(){return[this._getInstrumentationNodeModuleDefinition("@redis/client"),this._getInstrumentationNodeModuleDefinition("@node-redis/client")]}_getInstrumentationNodeModuleDefinition(e){let n=new fe.InstrumentationNodeModuleFile(`${e}/dist/lib/commander.js`,["^1.0.0"],(i,s)=>{let a=i.transformCommandArguments;if(!a)return this._diag.error("internal instrumentation error, missing transformCommandArguments function"),i;let u=s?.startsWith("1.0.")?"extendWithCommands":"attachCommands";return(0,fe.isWrapped)(i?.[u])&&this._unwrap(i,u),this._wrap(i,u,this._getPatchExtendWithCommands(a)),i},i=>{(0,fe.isWrapped)(i?.extendWithCommands)&&this._unwrap(i,"extendWithCommands"),(0,fe.isWrapped)(i?.attachCommands)&&this._unwrap(i,"attachCommands")}),r=new fe.InstrumentationNodeModuleFile(`${e}/dist/lib/client/multi-command.js`,["^1.0.0"],i=>{var s;let a=(s=i?.default)===null||s===void 0?void 0:s.prototype;return(0,fe.isWrapped)(a?.exec)&&this._unwrap(a,"exec"),this._wrap(a,"exec",this._getPatchMultiCommandsExec()),(0,fe.isWrapped)(a?.addCommand)&&this._unwrap(a,"addCommand"),this._wrap(a,"addCommand",this._getPatchMultiCommandsAddCommand()),i},i=>{var s;let a=(s=i?.default)===null||s===void 0?void 0:s.prototype;(0,fe.isWrapped)(a?.exec)&&this._unwrap(a,"exec"),(0,fe.isWrapped)(a?.addCommand)&&this._unwrap(a,"addCommand")}),o=new fe.InstrumentationNodeModuleFile(`${e}/dist/lib/client/index.js`,["^1.0.0"],i=>{var s;let a=(s=i?.default)===null||s===void 0?void 0:s.prototype;return a?.multi&&((0,fe.isWrapped)(a?.multi)&&this._unwrap(a,"multi"),this._wrap(a,"multi",this._getPatchRedisClientMulti())),a?.MULTI&&((0,fe.isWrapped)(a?.MULTI)&&this._unwrap(a,"MULTI"),this._wrap(a,"MULTI",this._getPatchRedisClientMulti())),(0,fe.isWrapped)(a?.sendCommand)&&this._unwrap(a,"sendCommand"),this._wrap(a,"sendCommand",this._getPatchRedisClientSendCommand()),this._wrap(a,"connect",this._getPatchedClientConnect()),i},i=>{var s;let a=(s=i?.default)===null||s===void 0?void 0:s.prototype;(0,fe.isWrapped)(a?.multi)&&this._unwrap(a,"multi"),(0,fe.isWrapped)(a?.MULTI)&&this._unwrap(a,"MULTI"),(0,fe.isWrapped)(a?.sendCommand)&&this._unwrap(a,"sendCommand")});return new fe.InstrumentationNodeModuleDefinition(e,["^1.0.0"],i=>i,()=>{},[n,r,o])}_getPatchExtendWithCommands(e){let n=this;return function(o){return function(s){var a;if(((a=s?.BaseClass)===null||a===void 0?void 0:a.name)!=="RedisClient")return o.apply(this,arguments);let u=s.executor;return s.executor=function(l,p){let d=e(l,p).args;return n._traceClientCommand(u,this,arguments,d)},o.apply(this,arguments)}}}_getPatchMultiCommandsExec(){let e=this;return function(r){return function(){let i=r.apply(this,arguments);return typeof i?.then!="function"?(e._diag.error("got non promise result when patching RedisClientMultiCommand.exec"),i):i.then(s=>{let a=this[Yr];return e._endSpansWithRedisReplies(a,s),s}).catch(s=>{let a=this[Yr];if(!a)e._diag.error("cannot find open spans to end for redis multi command");else{let u=s.constructor.name==="MultiErrorReply"?s.replies:new Array(a.length).fill(s);e._endSpansWithRedisReplies(a,u)}return Promise.reject(s)})}}}_getPatchMultiCommandsAddCommand(){let e=this;return function(r){return function(i){return e._traceClientCommand(r,this,arguments,i)}}}_getPatchRedisClientMulti(){return function(n){return function(){let o=n.apply(this,arguments);return o[Ah]=this.options,o}}}_getPatchRedisClientSendCommand(){let e=this;return function(r){return function(i){return e._traceClientCommand(r,this,arguments,i)}}}_getPatchedClientConnect(){let e=this;return function(r){return function(){let i=this.options,s=(0,yh.getClientAttributes)(this._diag,i),a=e.tracer.startSpan(`${t.COMPONENT}-connect`,{kind:He.SpanKind.CLIENT,attributes:s});return He.context.with(He.trace.setSpan(He.context.active(),a),()=>r.apply(this)).then(l=>(a.end(),l)).catch(l=>(a.recordException(l),a.setStatus({code:He.SpanStatusCode.ERROR,message:l.message}),a.end(),Promise.reject(l)))}}}_traceClientCommand(e,n,r,o){var i,s;if(He.trace.getSpan(He.context.active())===void 0&&(!((i=this._config)===null||i===void 0)&&i.requireParentSpan))return e.apply(n,r);let u=n.options||n[Ah],l=o[0],p=o.slice(1),d=((s=this._config)===null||s===void 0?void 0:s.dbStatementSerializer)||wA.defaultDbStatementSerializer,m=(0,yh.getClientAttributes)(this._diag,u);try{let T=d(l,p);T!=null&&(m[FA.SEMATTRS_DB_STATEMENT]=T)}catch(T){this._diag.error("dbStatementSerializer throw an exception",T,{commandName:l})}let h=this.tracer.startSpan(`${t.COMPONENT}-${l}`,{kind:He.SpanKind.CLIENT,attributes:m}),_=He.context.with(He.trace.setSpan(He.context.active(),h),()=>e.apply(n,r));if(typeof _?.then=="function")_.then(T=>{this._endSpanWithResponse(h,l,p,T,void 0)},T=>{this._endSpanWithResponse(h,l,p,null,T)});else{let T=_;T[Yr]=T[Yr]||[],T[Yr].push({span:h,commandName:l,commandArgs:p})}return _}_endSpansWithRedisReplies(e,n){if(!e)return this._diag.error("cannot find open spans to end for redis multi command");if(n.length!==e.length)return this._diag.error("number of multi command spans does not match response from redis");for(let r=0;r<e.length;r++){let{span:o,commandName:i,commandArgs:s}=e[r],a=n[r],[u,l]=a instanceof Error?[null,a]:[a,void 0];this._endSpanWithResponse(o,i,s,u,l)}}_endSpanWithResponse(e,n,r,o,i){if(!i&&this._config.responseHook)try{this._config.responseHook(e,n,r,o)}catch(s){this._diag.error("responseHook throw an exception",s)}i&&(e.recordException(i),e.setStatus({code:He.SpanStatusCode.ERROR,message:i?.message})),e.end()}};bi.RedisInstrumentation=Oi;Oi.COMPONENT="redis"});var Ch=E(bh=>{"use strict";c();Object.defineProperty(bh,"__esModule",{value:!0})});var Ih=E(Xt=>{"use strict";c();var kA=Xt&&Xt.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),Rh=Xt&&Xt.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&kA(e,t,n)};Object.defineProperty(Xt,"__esModule",{value:!0});Rh(Oh(),Xt);Rh(Ch(),Xt)});var Gh=E(qn=>{"use strict";c();Object.defineProperty(qn,"__esModule",{value:!0});qn.PACKAGE_NAME=qn.PACKAGE_VERSION=void 0;qn.PACKAGE_VERSION="0.39.0";qn.PACKAGE_NAME="@opentelemetry/instrumentation-nestjs-core"});var ec=E($r=>{"use strict";c();Object.defineProperty($r,"__esModule",{value:!0});$r.AttributeNames=void 0;var WA;(function(t){t.VERSION="nestjs.version",t.TYPE="nestjs.type",t.MODULE="nestjs.module",t.CONTROLLER="nestjs.controller",t.CALLBACK="nestjs.callback",t.PIPES="nestjs.pipes",t.INTERCEPTORS="nestjs.interceptors",t.GUARDS="nestjs.guards"})(WA=$r.AttributeNames||($r.AttributeNames={}))});var Uh=E(Zr=>{"use strict";c();Object.defineProperty(Zr,"__esModule",{value:!0});Zr.NestType=void 0;var VA;(function(t){t.APP_CREATION="app_creation",t.REQUEST_CONTEXT="request_context",t.REQUEST_HANDLER="handler"})(VA=Zr.NestType||(Zr.NestType={}))});var Hh=E(Wn=>{"use strict";c();Object.defineProperty(Wn,"__esModule",{value:!0});Wn.NestType=Wn.AttributeNames=void 0;var KA=ec();Object.defineProperty(Wn,"AttributeNames",{enumerable:!0,get:function(){return KA.AttributeNames}});var YA=Uh();Object.defineProperty(Wn,"NestType",{enumerable:!0,get:function(){return YA.NestType}})});var Bh=E(Ci=>{"use strict";c();Object.defineProperty(Ci,"__esModule",{value:!0});Ci.NestInstrumentation=void 0;var rt=(F(),y(z)),zr=(ae(),y(le)),jh=Gh(),tc=(ne(),y(ue)),Ne=Hh(),nc=[">=4.0.0 <11"],yt=class t extends zr.InstrumentationBase{constructor(e={}){super(jh.PACKAGE_NAME,jh.PACKAGE_VERSION,e)}init(){let e=new zr.InstrumentationNodeModuleDefinition(t.COMPONENT,nc);return e.files.push(this.getNestFactoryFileInstrumentation(nc),this.getRouterExecutionContextFileInstrumentation(nc)),e}getNestFactoryFileInstrumentation(e){return new zr.InstrumentationNodeModuleFile("@nestjs/core/nest-factory.js",e,(n,r)=>(this.ensureWrapped(n.NestFactoryStatic.prototype,"create",XA(this.tracer,r)),n),n=>{this._unwrap(n.NestFactoryStatic.prototype,"create")})}getRouterExecutionContextFileInstrumentation(e){return new zr.InstrumentationNodeModuleFile("@nestjs/core/router/router-execution-context.js",e,(n,r)=>(this.ensureWrapped(n.RouterExecutionContext.prototype,"create",$A(this.tracer,r)),n),n=>{this._unwrap(n.RouterExecutionContext.prototype,"create")})}ensureWrapped(e,n,r){(0,zr.isWrapped)(e[n])&&this._unwrap(e,n),this._wrap(e,n,r)}};Ci.NestInstrumentation=yt;yt.COMPONENT="@nestjs/core";yt.COMMON_ATTRIBUTES={component:yt.COMPONENT};function XA(t,e){return function(r){return function(i){let s=t.startSpan("Create Nest App",{attributes:Object.assign(Object.assign({},yt.COMMON_ATTRIBUTES),{[Ne.AttributeNames.TYPE]:Ne.NestType.APP_CREATION,[Ne.AttributeNames.VERSION]:e,[Ne.AttributeNames.MODULE]:i.name})}),a=rt.trace.setSpan(rt.context.active(),s);return rt.context.with(a,async()=>{try{return await r.apply(this,arguments)}catch(u){throw rc(s,u)}finally{s.end()}})}}}function $A(t,e){return function(r){return function(i,s){arguments[1]=ZA(t,e,s);let a=r.apply(this,arguments),u=s.name,l=i.constructor&&i.constructor.name?i.constructor.name:"UnnamedInstance",p=u?`${l}.${u}`:l;return function(d,m,h){var _,T;let R=t.startSpan(p,{attributes:Object.assign(Object.assign({},yt.COMMON_ATTRIBUTES),{[Ne.AttributeNames.VERSION]:e,[Ne.AttributeNames.TYPE]:Ne.NestType.REQUEST_CONTEXT,[tc.SEMATTRS_HTTP_METHOD]:d.method,[tc.SEMATTRS_HTTP_URL]:d.originalUrl||d.url,[tc.SEMATTRS_HTTP_ROUTE]:((_=d.route)===null||_===void 0?void 0:_.path)||((T=d.routeOptions)===null||T===void 0?void 0:T.url)||d.routerPath,[Ne.AttributeNames.CONTROLLER]:l,[Ne.AttributeNames.CALLBACK]:u})}),M=rt.trace.setSpan(rt.context.active(),R);return rt.context.with(M,async()=>{try{return await a.apply(this,arguments)}catch(C){throw rc(R,C)}finally{R.end()}})}}}}function ZA(t,e,n){let r=n.name||"anonymous nest handler",o={attributes:Object.assign(Object.assign({},yt.COMMON_ATTRIBUTES),{[Ne.AttributeNames.VERSION]:e,[Ne.AttributeNames.TYPE]:Ne.NestType.REQUEST_HANDLER,[Ne.AttributeNames.CALLBACK]:n.name})},i=function(){let s=t.startSpan(r,o),a=rt.trace.setSpan(rt.context.active(),s);return rt.context.with(a,async()=>{try{return await n.apply(this,arguments)}catch(u){throw rc(s,u)}finally{s.end()}})};return n.name&&Object.defineProperty(i,"name",{value:n.name}),Reflect.getMetadataKeys(n).forEach(s=>{Reflect.defineMetadata(s,Reflect.getMetadata(s,n),i)}),i}var rc=(t,e)=>(t.recordException(e),t.setStatus({code:rt.SpanStatusCode.ERROR,message:e.message}),e)});var Wh=E($t=>{"use strict";c();var zA=$t&&$t.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),qh=$t&&$t.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&zA(e,t,n)};Object.defineProperty($t,"__esModule",{value:!0});qh(Bh(),$t);qh(ec(),$t)});var oc=E(Jr=>{"use strict";c();Object.defineProperty(Jr,"__esModule",{value:!0});Jr.AttributeNames=void 0;var QA;(function(t){t.PG_VALUES="db.postgresql.values",t.PG_PLAN="db.postgresql.plan",t.IDLE_TIMEOUT_MILLIS="db.postgresql.idle.timeout.millis",t.MAX_CLIENT="db.postgresql.max.client"})(QA=Jr.AttributeNames||(Jr.AttributeNames={}))});var ic=E(Qr=>{"use strict";c();Object.defineProperty(Qr,"__esModule",{value:!0});Qr.SpanNames=void 0;var eO;(function(t){t.QUERY_PREFIX="pg.query",t.CONNECT="pg.connect",t.POOL_CONNECT="pg-pool.connect"})(eO=Qr.SpanNames||(Qr.SpanNames={}))});var e_=E(Y=>{"use strict";c();Object.defineProperty(Y,"__esModule",{value:!0});Y.isObjectWithTextString=Y.getErrorMessage=Y.patchClientConnectCallback=Y.patchCallbackPGPool=Y.patchCallback=Y.handleExecutionResult=Y.handleConfigQuery=Y.shouldSkipInstrumentation=Y.getSemanticAttributesFromPool=Y.getSemanticAttributesFromConnection=Y.getConnectionString=Y.getQuerySpanName=void 0;var Zt=(F(),y(z)),Ri=oc(),Oe=(ne(),y(ue)),tO=(ae(),y(le)),$h=ic();function Zh(t,e){if(!e)return $h.SpanNames.QUERY_PREFIX;let n=typeof e.name=="string"&&e.name?e.name:nO(e.text);return`${$h.SpanNames.QUERY_PREFIX}:${n}${t?` ${t}`:""}`}Y.getQuerySpanName=Zh;function nO(t){let e=t.indexOf(" "),n=e===-1?t:t.slice(0,e);return n=n.toUpperCase(),n.endsWith(";")?n.slice(0,-1):n}function sc(t){let e=t.host||"localhost",n=t.port||5432,r=t.database||"";return`postgresql://${e}:${n}/${r}`}Y.getConnectionString=sc;function zh(t){if(Number.isInteger(t))return t}function Jh(t){return{[Oe.SEMATTRS_DB_SYSTEM]:Oe.DBSYSTEMVALUES_POSTGRESQL,[Oe.SEMATTRS_DB_NAME]:t.database,[Oe.SEMATTRS_DB_CONNECTION_STRING]:sc(t),[Oe.SEMATTRS_NET_PEER_NAME]:t.host,[Oe.SEMATTRS_NET_PEER_PORT]:zh(t.port),[Oe.SEMATTRS_DB_USER]:t.user}}Y.getSemanticAttributesFromConnection=Jh;function rO(t){return{[Oe.SEMATTRS_DB_SYSTEM]:Oe.DBSYSTEMVALUES_POSTGRESQL,[Oe.SEMATTRS_DB_NAME]:t.database,[Oe.SEMATTRS_DB_CONNECTION_STRING]:sc(t),[Oe.SEMATTRS_NET_PEER_NAME]:t.host,[Oe.SEMATTRS_NET_PEER_PORT]:zh(t.port),[Oe.SEMATTRS_DB_USER]:t.user,[Ri.AttributeNames.IDLE_TIMEOUT_MILLIS]:t.idleTimeoutMillis,[Ri.AttributeNames.MAX_CLIENT]:t.maxClient}}Y.getSemanticAttributesFromPool=rO;function oO(t){return t.requireParentSpan===!0&&Zt.trace.getSpan(Zt.context.active())===void 0}Y.shouldSkipInstrumentation=oO;function iO(t,e,n){let{connectionParameters:r}=this,o=r.database,i=Zh(o,n),s=t.startSpan(i,{kind:Zt.SpanKind.CLIENT,attributes:Jh(r)});if(!n)return s;if(n.text&&s.setAttribute(Oe.SEMATTRS_DB_STATEMENT,n.text),e.enhancedDatabaseReporting&&Array.isArray(n.values))try{let a=n.values.map(u=>u==null?"null":u instanceof Buffer?u.toString():typeof u=="object"?typeof u.toPostgres=="function"?u.toPostgres():JSON.stringify(u):u.toString());s.setAttribute(Ri.AttributeNames.PG_VALUES,a)}catch(a){Zt.diag.error("failed to stringify ",n.values,a)}return typeof n.name=="string"&&s.setAttribute(Ri.AttributeNames.PG_PLAN,n.name),s}Y.handleConfigQuery=iO;function Qh(t,e,n){typeof t.responseHook=="function"&&(0,tO.safeExecuteInTheMiddle)(()=>{t.responseHook(e,{data:n})},r=>{r&&Zt.diag.error("Error running response hook",r)},!0)}Y.handleExecutionResult=Qh;function sO(t,e,n){return function(o,i){o?e.setStatus({code:Zt.SpanStatusCode.ERROR,message:o.message}):Qh(t,e,i),e.end(),n.call(this,o,i)}}Y.patchCallback=sO;function aO(t,e){return function(r,o,i){r&&t.setStatus({code:Zt.SpanStatusCode.ERROR,message:r.message}),t.end(),e.call(this,r,o,i)}}Y.patchCallbackPGPool=aO;function cO(t,e){return function(r){r&&t.setStatus({code:Zt.SpanStatusCode.ERROR,message:r.message}),t.end(),e.apply(this,arguments)}}Y.patchClientConnectCallback=cO;function uO(t){return typeof t=="object"&&t!==null&&"message"in t?String(t.message):void 0}Y.getErrorMessage=uO;function lO(t){var e;return typeof t=="object"&&typeof((e=t)===null||e===void 0?void 0:e.text)=="string"}Y.isObjectWithTextString=lO});var t_=E(Vn=>{"use strict";c();Object.defineProperty(Vn,"__esModule",{value:!0});Vn.PACKAGE_NAME=Vn.PACKAGE_VERSION=void 0;Vn.PACKAGE_VERSION="0.43.0";Vn.PACKAGE_NAME="@opentelemetry/instrumentation-pg"});var s_=E(Ii=>{"use strict";c();Object.defineProperty(Ii,"__esModule",{value:!0});Ii.PgInstrumentation=void 0;var vt=(ae(),y(le)),K=(F(),y(z)),Pe=e_(),n_=Ya(),r_=t_(),o_=ic(),ac=class extends vt.InstrumentationBase{constructor(e={}){super(r_.PACKAGE_NAME,r_.PACKAGE_VERSION,e)}init(){let e=new vt.InstrumentationNodeModuleDefinition("pg",[">=8.0.0 <9"],r=>{let o=r[Symbol.toStringTag]==="Module"?r.default:r;return(0,vt.isWrapped)(o.Client.prototype.query)&&this._unwrap(o.Client.prototype,"query"),(0,vt.isWrapped)(o.Client.prototype.connect)&&this._unwrap(o.Client.prototype,"connect"),this._wrap(o.Client.prototype,"query",this._getClientQueryPatch()),this._wrap(o.Client.prototype,"connect",this._getClientConnectPatch()),r},r=>{let o=r[Symbol.toStringTag]==="Module"?r.default:r;(0,vt.isWrapped)(o.Client.prototype.query)&&this._unwrap(o.Client.prototype,"query")}),n=new vt.InstrumentationNodeModuleDefinition("pg-pool",[">=2.0.0 <4"],r=>((0,vt.isWrapped)(r.prototype.connect)&&this._unwrap(r.prototype,"connect"),this._wrap(r.prototype,"connect",this._getPoolConnectPatch()),r),r=>{(0,vt.isWrapped)(r.prototype.connect)&&this._unwrap(r.prototype,"connect")});return[e,n]}setConfig(e={}){this._config=Object.assign({},e)}getConfig(){return this._config}_getClientConnectPatch(){let e=this;return n=>function(o){if(Pe.shouldSkipInstrumentation(e.getConfig()))return n.call(this,o);let i=e.tracer.startSpan(o_.SpanNames.CONNECT,{kind:K.SpanKind.CLIENT,attributes:Pe.getSemanticAttributesFromConnection(this)});if(o){let a=K.trace.getSpan(K.context.active());o=Pe.patchClientConnectCallback(i,o),a&&(o=K.context.bind(K.context.active(),o))}let s=K.context.with(K.trace.setSpan(K.context.active(),i),()=>n.call(this,o));return i_(i,s)}}_getClientQueryPatch(){let e=this;return n=>(this._diag.debug("Patching pg.Client.prototype.query"),function(...o){if(Pe.shouldSkipInstrumentation(e.getConfig()))return n.apply(this,o);let i=o[0],s=typeof i=="string",a=Pe.isObjectWithTextString(i),u=s?{text:i,values:Array.isArray(o[1])?o[1]:void 0}:a?i:void 0,l=e.getConfig(),p=Pe.handleConfigQuery.call(this,e.tracer,l,u);if(l.addSqlCommenterCommentToQueries&&(o[0]=s?(0,n_.addSqlCommenterComment)(p,i):a?Object.assign(Object.assign({},i),{text:(0,n_.addSqlCommenterComment)(p,i.text)}):o[0]),o.length>0){let m=K.trace.getSpan(K.context.active());if(typeof o[o.length-1]=="function")o[o.length-1]=Pe.patchCallback(l,p,o[o.length-1]),m&&(o[o.length-1]=K.context.bind(K.context.active(),o[o.length-1]));else if(typeof u?.callback=="function"){let h=Pe.patchCallback(e.getConfig(),p,u.callback);m&&(h=K.context.bind(K.context.active(),h)),o[0].callback=h}}typeof l.requestHook=="function"&&u&&(0,vt.safeExecuteInTheMiddle)(()=>{let{database:m,host:h,port:_,user:T}=this.connectionParameters,R={database:m,host:h,port:_,user:T};l.requestHook(p,{connection:R,query:{text:u.text,values:u.values,name:u.name}})},m=>{m&&e._diag.error("Error running query hook",m)},!0);let d;try{d=n.apply(this,o)}catch(m){throw p.setStatus({code:K.SpanStatusCode.ERROR,message:Pe.getErrorMessage(m)}),p.end(),m}return d instanceof Promise?d.then(m=>new Promise(h=>{Pe.handleExecutionResult(e.getConfig(),p,m),p.end(),h(m)})).catch(m=>new Promise((h,_)=>{p.setStatus({code:K.SpanStatusCode.ERROR,message:m.message}),p.end(),_(m)})):d})}_getPoolConnectPatch(){let e=this;return n=>function(o){if(Pe.shouldSkipInstrumentation(e.getConfig()))return n.call(this,o);let i=e.tracer.startSpan(o_.SpanNames.POOL_CONNECT,{kind:K.SpanKind.CLIENT,attributes:Pe.getSemanticAttributesFromPool(this.options)});if(o){let a=K.trace.getSpan(K.context.active());o=Pe.patchCallbackPGPool(i,o),a&&(o=K.context.bind(K.context.active(),o))}let s=K.context.with(K.trace.setSpan(K.context.active(),i),()=>n.call(this,o));return i_(i,s)}}};Ii.PgInstrumentation=ac;function i_(t,e){if(!(e instanceof Promise))return e;let n=e;return K.context.bind(K.context.active(),n.then(r=>(t.end(),r)).catch(r=>(t.setStatus({code:K.SpanStatusCode.ERROR,message:Pe.getErrorMessage(r)}),t.end(),Promise.reject(r))))}});var c_=E(a_=>{"use strict";c();Object.defineProperty(a_,"__esModule",{value:!0})});var u_=E(At=>{"use strict";c();var pO=At&&At.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),cc=At&&At.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&pO(e,t,n)};Object.defineProperty(At,"__esModule",{value:!0});cc(s_(),At);cc(c_(),At);cc(oc(),At)});var m_=E(Kn=>{"use strict";c();Object.defineProperty(Kn,"__esModule",{value:!0});Kn.PACKAGE_NAME=Kn.PACKAGE_VERSION=void 0;Kn.PACKAGE_VERSION="0.40.0";Kn.PACKAGE_NAME="@opentelemetry/instrumentation-hapi"});var uc=E(ot=>{"use strict";c();Object.defineProperty(ot,"__esModule",{value:!0});ot.HapiLifecycleMethodNames=ot.HapiLayerType=ot.handlerPatched=ot.HapiComponentName=void 0;ot.HapiComponentName="@hapi/hapi";ot.handlerPatched=Symbol("hapi-handler-patched");ot.HapiLayerType={ROUTER:"router",PLUGIN:"plugin",EXT:"server.ext"};ot.HapiLifecycleMethodNames=new Set(["onPreAuth","onCredentials","onPostAuth","onPreHandler","onPostHandler","onPreResponse","onRequest"])});var lc=E(eo=>{"use strict";c();Object.defineProperty(eo,"__esModule",{value:!0});eo.AttributeNames=void 0;var fO;(function(t){t.HAPI_TYPE="hapi.type",t.PLUGIN_NAME="hapi.plugin.name",t.EXT_TYPE="server.ext.type"})(fO=eo.AttributeNames||(eo.AttributeNames={}))});var h_=E(ce=>{"use strict";c();Object.defineProperty(ce,"__esModule",{value:!0});ce.getPluginFromInput=ce.getExtMetadata=ce.getRouteMetadata=ce.isPatchableExtMethod=ce.isDirectExtInput=ce.isLifecycleExtEventObj=ce.isLifecycleExtType=ce.getPluginName=void 0;var Pi=(ne(),y(ue)),to=uc(),zt=lc();function mO(t){return t.name?t.name:t.pkg.name}ce.getPluginName=mO;var hO=t=>typeof t=="string"&&to.HapiLifecycleMethodNames.has(t);ce.isLifecycleExtType=hO;var _O=t=>{var e;let n=(e=t)===null||e===void 0?void 0:e.type;return n!==void 0&&(0,ce.isLifecycleExtType)(n)};ce.isLifecycleExtEventObj=_O;var gO=t=>Array.isArray(t)&&t.length<=3&&(0,ce.isLifecycleExtType)(t[0])&&typeof t[1]=="function";ce.isDirectExtInput=gO;var EO=t=>!Array.isArray(t);ce.isPatchableExtMethod=EO;var TO=(t,e)=>e?{attributes:{[Pi.SEMATTRS_HTTP_ROUTE]:t.path,[Pi.SEMATTRS_HTTP_METHOD]:t.method,[zt.AttributeNames.HAPI_TYPE]:to.HapiLayerType.PLUGIN,[zt.AttributeNames.PLUGIN_NAME]:e},name:`${e}: route - ${t.path}`}:{attributes:{[Pi.SEMATTRS_HTTP_ROUTE]:t.path,[Pi.SEMATTRS_HTTP_METHOD]:t.method,[zt.AttributeNames.HAPI_TYPE]:to.HapiLayerType.ROUTER},name:`route - ${t.path}`};ce.getRouteMetadata=TO;var SO=(t,e)=>e?{attributes:{[zt.AttributeNames.EXT_TYPE]:t,[zt.AttributeNames.HAPI_TYPE]:to.HapiLayerType.EXT,[zt.AttributeNames.PLUGIN_NAME]:e},name:`${e}: ext - ${t}`}:{attributes:{[zt.AttributeNames.EXT_TYPE]:t,[zt.AttributeNames.HAPI_TYPE]:to.HapiLayerType.EXT},name:`ext - ${t}`};ce.getExtMetadata=SO;var yO=t=>"plugin"in t?"plugin"in t.plugin?t.plugin.plugin:t.plugin:t;ce.getPluginFromInput=yO});var E_=E(Mi=>{"use strict";c();Object.defineProperty(Mi,"__esModule",{value:!0});Mi.HapiInstrumentation=void 0;var Me=(F(),y(z)),__=(Fe(),y(Ve)),Ni=(ae(),y(le)),g_=m_(),no=uc(),Ot=h_(),pc=class extends Ni.InstrumentationBase{constructor(e={}){super(g_.PACKAGE_NAME,g_.PACKAGE_VERSION,e)}init(){return new Ni.InstrumentationNodeModuleDefinition(no.HapiComponentName,[">=17.0.0 <22"],e=>{let n=e[Symbol.toStringTag]==="Module"?e.default:e;return(0,Ni.isWrapped)(n.server)||this._wrap(n,"server",this._getServerPatch.bind(this)),(0,Ni.isWrapped)(n.Server)||this._wrap(n,"Server",this._getServerPatch.bind(this)),n},e=>{let n=e[Symbol.toStringTag]==="Module"?e.default:e;this._massUnwrap([n],["server","Server"])})}_getServerPatch(e){let n=this,r=this;return function(i){let s=e.apply(this,[i]);return r._wrap(s,"route",a=>n._getServerRoutePatch.bind(n)(a)),r._wrap(s,"ext",a=>n._getServerExtPatch.bind(n)(a)),r._wrap(s,"register",n._getServerRegisterPatch.bind(n)),s}}_getServerRegisterPatch(e){let n=this;return function(o,i){if(Array.isArray(o))for(let s of o){let a=(0,Ot.getPluginFromInput)(s);n._wrapRegisterHandler(a)}else{let s=(0,Ot.getPluginFromInput)(o);n._wrapRegisterHandler(s)}return e.apply(this,[o,i])}}_getServerExtPatch(e,n){let r=this;return function(...i){if(Array.isArray(i[0])){let s=i[0];for(let a=0;a<s.length;a++){let u=s[a];if((0,Ot.isLifecycleExtType)(u.type)){let l=u,p=r._wrapExtMethods(l.method,u.type,n);l.method=p,s[a]=l}}return e.apply(this,i)}else if((0,Ot.isDirectExtInput)(i)){let s=i,a=s[1],u=r._wrapExtMethods(a,s[0],n);return e.apply(this,[s[0],u,s[2]])}else if((0,Ot.isLifecycleExtEventObj)(i[0])){let s=i[0],a=r._wrapExtMethods(s.method,s.type,n);return s.method=a,e.call(this,s)}return e.apply(this,i)}}_getServerRoutePatch(e,n){let r=this;return function(o){if(Array.isArray(o))for(let i=0;i<o.length;i++){let s=r._wrapRouteHandler.call(r,o[i],n);o[i]=s}else o=r._wrapRouteHandler.call(r,o,n);return e.apply(this,[o])}}_wrapRegisterHandler(e){let n=this,r=(0,Ot.getPluginName)(e),o=e.register,i=this,s=function(a,u){return i._wrap(a,"route",l=>n._getServerRoutePatch.bind(n)(l,r)),i._wrap(a,"ext",l=>n._getServerExtPatch.bind(n)(l,r)),o(a,u)};e.register=s}_wrapExtMethods(e,n,r){let o=this;if(e instanceof Array){for(let i=0;i<e.length;i++)e[i]=o._wrapExtMethods(e[i],n);return e}else if((0,Ot.isPatchableExtMethod)(e))return e[no.handlerPatched]===!0?e:(e[no.handlerPatched]=!0,async function(...s){if(Me.trace.getSpan(Me.context.active())===void 0)return await e.apply(this,s);let a=(0,Ot.getExtMetadata)(n,r),u=o.tracer.startSpan(a.name,{attributes:a.attributes});try{return await Me.context.with(Me.trace.setSpan(Me.context.active(),u),e,void 0,...s)}catch(l){throw u.recordException(l),u.setStatus({code:Me.SpanStatusCode.ERROR,message:l.message}),l}finally{u.end()}});return e}_wrapRouteHandler(e,n){var r;let o=this;if(e[no.handlerPatched]===!0)return e;e[no.handlerPatched]=!0;let i=s=>async function(...a){if(Me.trace.getSpan(Me.context.active())===void 0)return await s.call(this,...a);let u=(0,__.getRPCMetadata)(Me.context.active());u?.type===__.RPCType.HTTP&&(u.route=e.path);let l=(0,Ot.getRouteMetadata)(e,n),p=o.tracer.startSpan(l.name,{attributes:l.attributes});try{return await Me.context.with(Me.trace.setSpan(Me.context.active(),p),()=>s.call(this,...a))}catch(d){throw p.recordException(d),p.setStatus({code:Me.SpanStatusCode.ERROR,message:d.message}),d}finally{p.end()}};if(typeof e.handler=="function")e.handler=i(e.handler);else if(typeof e.options=="function"){let s=e.options;e.options=function(a){let u=s(a);return typeof u.handler=="function"&&(u.handler=i(u.handler)),u}}else typeof((r=e.options)===null||r===void 0?void 0:r.handler)=="function"&&(e.options.handler=i(e.options.handler));return e}};Mi.HapiInstrumentation=pc});var S_=E(Jt=>{"use strict";c();var vO=Jt&&Jt.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),T_=Jt&&Jt.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&vO(e,t,n)};Object.defineProperty(Jt,"__esModule",{value:!0});T_(E_(),Jt);T_(lc(),Jt)});var xi=E(ro=>{"use strict";c();Object.defineProperty(ro,"__esModule",{value:!0});ro.KoaLayerType=void 0;var OO;(function(t){t.ROUTER="router",t.MIDDLEWARE="middleware"})(OO=ro.KoaLayerType||(ro.KoaLayerType={}))});var b_=E(Yn=>{"use strict";c();Object.defineProperty(Yn,"__esModule",{value:!0});Yn.PACKAGE_NAME=Yn.PACKAGE_VERSION=void 0;Yn.PACKAGE_VERSION="0.42.0";Yn.PACKAGE_NAME="@opentelemetry/instrumentation-koa"});var dc=E(oo=>{"use strict";c();Object.defineProperty(oo,"__esModule",{value:!0});oo.AttributeNames=void 0;var bO;(function(t){t.KOA_TYPE="koa.type",t.KOA_NAME="koa.name"})(bO=oo.AttributeNames||(oo.AttributeNames={}))});var R_=E(Xn=>{"use strict";c();Object.defineProperty(Xn,"__esModule",{value:!0});Xn.isLayerIgnored=Xn.getMiddlewareMetadata=void 0;var C_=xi(),Li=dc(),CO=(ne(),y(ue)),RO=(t,e,n,r)=>{var o;return n?{attributes:{[Li.AttributeNames.KOA_NAME]:r?.toString(),[Li.AttributeNames.KOA_TYPE]:C_.KoaLayerType.ROUTER,[CO.SEMATTRS_HTTP_ROUTE]:r?.toString()},name:t._matchedRouteName||`router - ${r}`}:{attributes:{[Li.AttributeNames.KOA_NAME]:(o=e.name)!==null&&o!==void 0?o:"middleware",[Li.AttributeNames.KOA_TYPE]:C_.KoaLayerType.MIDDLEWARE},name:`middleware - ${e.name}`}};Xn.getMiddlewareMetadata=RO;var IO=(t,e)=>{var n;return!!(Array.isArray(e?.ignoreLayersType)&&(!((n=e?.ignoreLayersType)===null||n===void 0)&&n.includes(t)))};Xn.isLayerIgnored=IO});var I_=E(wi=>{"use strict";c();Object.defineProperty(wi,"__esModule",{value:!0});wi.kLayerPatched=void 0;wi.kLayerPatched=Symbol("koa-layer-patched")});var w_=E(Fi=>{"use strict";c();Object.defineProperty(Fi,"__esModule",{value:!0});Fi.KoaInstrumentation=void 0;var it=(F(),y(z)),io=(ae(),y(le)),P_=xi(),N_=b_(),M_=R_(),x_=(Fe(),y(Ve)),L_=I_(),fc=class extends io.InstrumentationBase{constructor(e={}){super(N_.PACKAGE_NAME,N_.PACKAGE_VERSION,e)}setConfig(e={}){this._config=Object.assign({},e)}getConfig(){return this._config}init(){return new io.InstrumentationNodeModuleDefinition("koa",[">=2.0.0 <3"],e=>{let n=e[Symbol.toStringTag]==="Module"?e.default:e;return n==null?n:((0,io.isWrapped)(n.prototype.use)&&this._unwrap(n.prototype,"use"),this._wrap(n.prototype,"use",this._getKoaUsePatch.bind(this)),e)},e=>{let n=e[Symbol.toStringTag]==="Module"?e.default:e;(0,io.isWrapped)(n.prototype.use)&&this._unwrap(n.prototype,"use")})}_getKoaUsePatch(e){let n=this;return function(o){let i;return o.router?i=n._patchRouterDispatch(o):i=n._patchLayer(o,!1),e.apply(this,[i])}}_patchRouterDispatch(e){var n;it.diag.debug("Patching @koa/router dispatch");let r=e.router,o=(n=r?.stack)!==null&&n!==void 0?n:[];for(let i of o){let s=i.path,a=i.stack;for(let u=0;u<a.length;u++){let l=a[u];a[u]=this._patchLayer(l,!0,s)}}return e}_patchLayer(e,n,r){let o=n?P_.KoaLayerType.ROUTER:P_.KoaLayerType.MIDDLEWARE;return e[L_.kLayerPatched]===!0||(0,M_.isLayerIgnored)(o,this.getConfig())?e:e.constructor.name==="GeneratorFunction"||e.constructor.name==="AsyncGeneratorFunction"?(it.diag.debug("ignoring generator-based Koa middleware layer"),e):(e[L_.kLayerPatched]=!0,it.diag.debug("patching Koa middleware layer"),async(i,s)=>{if(it.trace.getSpan(it.context.active())===void 0)return e(i,s);let u=(0,M_.getMiddlewareMetadata)(i,e,n,r),l=this.tracer.startSpan(u.name,{attributes:u.attributes}),p=(0,x_.getRPCMetadata)(it.context.active());p?.type===x_.RPCType.HTTP&&i._matchedRoute&&(p.route=i._matchedRoute.toString()),this.getConfig().requestHook&&(0,io.safeExecuteInTheMiddle)(()=>this.getConfig().requestHook(l,{context:i,middlewareLayer:e,layerType:o}),m=>{m&&it.diag.error("koa instrumentation: request hook failed",m)},!0);let d=it.trace.setSpan(it.context.active(),l);return it.context.with(d,async()=>{try{return await e(i,s)}catch(m){throw l.recordException(m),m}finally{l.end()}})})}};Fi.KoaInstrumentation=fc});var F_=E(bt=>{"use strict";c();var PO=bt&&bt.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),mc=bt&&bt.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&PO(e,t,n)};Object.defineProperty(bt,"__esModule",{value:!0});mc(w_(),bt);mc(xi(),bt);mc(dc(),bt)});var hc=E($e=>{"use strict";c();Object.defineProperty($e,"__esModule",{value:!0});$e.ConnectNames=$e.ConnectTypes=$e.AttributeNames=void 0;var xO;(function(t){t.CONNECT_TYPE="connect.type",t.CONNECT_NAME="connect.name"})(xO=$e.AttributeNames||($e.AttributeNames={}));var LO;(function(t){t.MIDDLEWARE="middleware",t.REQUEST_HANDLER="request_handler"})(LO=$e.ConnectTypes||($e.ConnectTypes={}));var wO;(function(t){t.MIDDLEWARE="middleware",t.REQUEST_HANDLER="request handler"})(wO=$e.ConnectNames||($e.ConnectNames={}))});var H_=E($n=>{"use strict";c();Object.defineProperty($n,"__esModule",{value:!0});$n.PACKAGE_NAME=$n.PACKAGE_VERSION=void 0;$n.PACKAGE_VERSION="0.38.0";$n.PACKAGE_NAME="@opentelemetry/instrumentation-connect"});var j_=E(Di=>{"use strict";c();Object.defineProperty(Di,"__esModule",{value:!0});Di._LAYERS_STORE_PROPERTY=void 0;Di._LAYERS_STORE_PROPERTY=Symbol("opentelemetry.instrumentation-connect.request-route-stack")});var B_=E(en=>{"use strict";c();Object.defineProperty(en,"__esModule",{value:!0});en.generateRoute=en.replaceCurrentStackRoute=en.addNewStackLayer=void 0;var FO=(F(),y(z)),Qt=j_(),DO=t=>{Array.isArray(t[Qt._LAYERS_STORE_PROPERTY])===!1&&Object.defineProperty(t,Qt._LAYERS_STORE_PROPERTY,{enumerable:!1,value:[]}),t[Qt._LAYERS_STORE_PROPERTY].push("/");let e=t[Qt._LAYERS_STORE_PROPERTY].length;return()=>{e===t[Qt._LAYERS_STORE_PROPERTY].length?t[Qt._LAYERS_STORE_PROPERTY].pop():FO.diag.warn("Connect: Trying to pop the stack multiple time")}};en.addNewStackLayer=DO;var kO=(t,e)=>{e&&t[Qt._LAYERS_STORE_PROPERTY].splice(-1,1,e)};en.replaceCurrentStackRoute=kO;var GO=t=>t[Qt._LAYERS_STORE_PROPERTY].reduce((e,n)=>e.replace(/\/+$/,"")+n);en.generateRoute=GO});var V_=E(tn=>{"use strict";c();Object.defineProperty(tn,"__esModule",{value:!0});tn.ConnectInstrumentation=tn.ANONYMOUS_NAME=void 0;var UO=(F(),y(z)),q_=(Fe(),y(Ve)),Zn=hc(),W_=H_(),ki=(ae(),y(le)),HO=(ne(),y(ue)),_c=B_();tn.ANONYMOUS_NAME="anonymous";var gc=class extends ki.InstrumentationBase{constructor(e={}){super(W_.PACKAGE_NAME,W_.PACKAGE_VERSION,e)}init(){return[new ki.InstrumentationNodeModuleDefinition("connect",[">=3.0.0 <4"],e=>this._patchConstructor(e))]}_patchApp(e){(0,ki.isWrapped)(e.use)||this._wrap(e,"use",this._patchUse.bind(this)),(0,ki.isWrapped)(e.handle)||this._wrap(e,"handle",this._patchHandle.bind(this))}_patchConstructor(e){let n=this;return function(...r){let o=e.apply(this,r);return n._patchApp(o),o}}_patchNext(e,n){return function(o){let i=e.apply(this,[o]);return n(),i}}_startSpan(e,n){let r,o,i;e?(r=Zn.ConnectTypes.REQUEST_HANDLER,i=Zn.ConnectNames.REQUEST_HANDLER,o=e):(r=Zn.ConnectTypes.MIDDLEWARE,i=Zn.ConnectNames.MIDDLEWARE,o=n.name||tn.ANONYMOUS_NAME);let s=`${i} - ${o}`,a={attributes:{[HO.SEMATTRS_HTTP_ROUTE]:e.length>0?e:"/",[Zn.AttributeNames.CONNECT_TYPE]:r,[Zn.AttributeNames.CONNECT_NAME]:o}};return this.tracer.startSpan(s,a)}_patchMiddleware(e,n){let r=this,o=n.length===4;function i(){if(!r.isEnabled())return n.apply(this,arguments);let[s,a,u]=o?[1,2,3]:[0,1,2],l=arguments[s],p=arguments[a],d=arguments[u];(0,_c.replaceCurrentStackRoute)(l,e);let m=(0,q_.getRPCMetadata)(UO.context.active());e&&m?.type===q_.RPCType.HTTP&&(m.route=(0,_c.generateRoute)(l));let h="";e?h=`request handler - ${e}`:h=`middleware - ${n.name||tn.ANONYMOUS_NAME}`;let _=r._startSpan(e,n);r._diag.debug("start span",h);let T=!1;function R(){T?r._diag.debug(`span ${_.name} - already finished`):(T=!0,r._diag.debug(`finishing span ${_.name}`),_.end()),p.removeListener("close",R)}return p.addListener("close",R),arguments[u]=r._patchNext(d,R),n.apply(this,arguments)}return Object.defineProperty(i,"length",{value:n.length,writable:!1,configurable:!0}),i}_patchUse(e){let n=this;return function(...r){let o=r[r.length-1],i=r[r.length-2]||"";return r[r.length-1]=n._patchMiddleware(i,o),e.apply(this,r)}}_patchHandle(e){let n=this;return function(){let[r,o]=[0,2],i=arguments[r],s=arguments[o],a=(0,_c.addNewStackLayer)(i);return typeof s=="function"&&(arguments[o]=n._patchOut(s,a)),e.apply(this,arguments)}}_patchOut(e,n){return function(...o){return n(),Reflect.apply(e,this,o)}}};tn.ConnectInstrumentation=gc});var Y_=E(nn=>{"use strict";c();var jO=nn&&nn.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),K_=nn&&nn.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&jO(e,t,n)};Object.defineProperty(nn,"__esModule",{value:!0});K_(hc(),nn);K_(V_(),nn)});c();var hn=k(je(),1),lu=(0,hn.createContext)(null),hg=function({children:t,value:e}){return hn.default.createElement(lu.Provider,{value:e},t)},_g=()=>{let t=(0,hn.useContext)(lu);if(t==null)throw new Error("useBiLogger() cannot be used without an <BiProvider>");return t};c();c();var pg=k(je(),1);import Cc from"node:process";c();var sr=k(je(),1),ls=k(Ki(),1);import{dirname as gg}from"node:path";import{appendFileSync as Eg,mkdirSync as Tg}from"node:fs";c();var pu=k(mg(),1),du=k(Ki(),1);function ir(t){if(pu.HttpClient.isHttpError(t))return t;let e=t instanceof Error?du.default.cause(t):null;return e?ir(e):null}c();function Oo(t){return{request:{baseURL:t.config.baseURL,url:t.config.url,method:t.config.method,headers:t.config.headers,data:t.config.data},response:{code:t.code,message:t.message,status:t.response?.status,headers:t.response?.headers,data:t.response?.data}}}function ps(t,e){try{let n=`----- CLI crash report at ${new Date().toISOString()}
|
|
6
|
+
`;if(e instanceof Error){n+=`Error Trace
|
|
7
|
+
`,n+=`${ls.default.fullStack(e)}
|
|
8
|
+
`,n+=`Error Info
|
|
9
|
+
`,n+=`${JSON.stringify(ls.default.info(e),null,2)}
|
|
10
|
+
`;let r=ir(e);r&&(n+=`Request Info
|
|
11
|
+
`,n+=`${JSON.stringify(Oo(r),null,2)}
|
|
12
|
+
`)}Tg(gg(t),{recursive:!0}),Eg(t,n)}catch{}}var Ib=(0,sr.createContext)(null);c();var Co=k(je(),1);c();var f=k(je(),1),hs=k(ho(),1);c();function bo(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e]}function fu(){return typeof WeakMap<"u"?new WeakMap:Sg()}function Sg(){return{add:bo,delete:bo,get:bo,set:bo,has:function(t){return!1}}}var yg=Object.prototype.hasOwnProperty,fs=function(t,e){return yg.call(t,e)};function ds(t,e){for(var n in e)fs(e,n)&&(t[n]=e[n]);return t}var vg=/^[ \t]*(?:\r\n|\r|\n)/,Ag=/(?:\r\n|\r|\n)[ \t]*$/,Og=/^(?:[\r\n]|$)/,bg=/(?:\r\n|\r|\n)([ \t]*)(?:[^ \t\r\n]|$)/,Cg=/^[ \t]*[\r\n][ \t\r\n]*$/;function mu(t,e,n){var r=0,o=t[0].match(bg);o&&(r=o[1].length);var i="(\\r\\n|\\r|\\n).{0,"+r+"}",s=new RegExp(i,"g");e&&(t=t.slice(1));var a=n.newline,u=n.trimLeadingNewline,l=n.trimTrailingNewline,p=typeof a=="string",d=t.length,m=t.map(function(h,_){return h=h.replace(s,"$1"),_===0&&u&&(h=h.replace(vg,"")),_===d-1&&l&&(h=h.replace(Ag,"")),p&&(h=h.replace(/\r\n|\n|\r/g,function(T){return a})),h});return m}function Rg(t,e){for(var n="",r=0,o=t.length;r<o;r++)n+=t[r],r<o-1&&(n+=e[r]);return n}function Ig(t){return fs(t,"raw")&&fs(t,"length")}function hu(t){var e=fu(),n=fu();function r(i){for(var s=[],a=1;a<arguments.length;a++)s[a-1]=arguments[a];if(Ig(i)){var u=i,l=(s[0]===r||s[0]===Ce)&&Cg.test(u[0])&&Og.test(u[1]),p=l?n:e,d=p.get(u);if(d||(d=mu(u,l,t),p.set(u,d)),s.length===0)return d[0];var m=Rg(d,l?s.slice(1):s);return m}else return hu(ds(ds({},t),i||{}))}var o=ds(r,{string:function(i){return mu([i],!1,t)[0]}});return o}var Ce=hu({trimLeadingNewline:!0,trimTrailingNewline:!0});if(typeof module<"u")try{module.exports=Ce,Object.defineProperty(Ce,"__esModule",{value:!0}),Ce.default=Ce,Ce.outdent=Ce}catch{}c();var xt=k(je(),1);var g=({message:t,cause:e,explanation:n,hint:r})=>xt.default.createElement(Be,{flexDirection:"column"},xt.default.createElement($i,{type:"error"},t,e?` Cause: ${e.message}`:""),n&&xt.default.createElement($i,{type:"warning"},n),r&&xt.default.createElement(Be,{paddingTop:1,columnGap:1},xt.default.createElement(xc,null),typeof r=="string"?xt.default.createElement(N,null,r):r)),G=({message:t,explanation:e,hint:n})=>xt.default.createElement(g,{message:t,explanation:e,hint:n??"This is probably a temporary system error and has been logged. Try again shortly."});function gu(t,e){return(0,hs.match)(t,{UnknownFailure:({error:n})=>()=>f.default.createElement(f.default.Fragment,null,f.default.createElement(N,{skin:"error"},"Oh no, seems like the CLI encountered an unexpected error:"),n instanceof Error?f.default.createElement(N,{skin:"error"},n.message):f.default.createElement(N,null,JSON.stringify(n))),FailedToGetDeviceCode:()=>()=>f.default.createElement(G,{message:"An error occured while logging in: Failed to issue a login device code"}),FailedToGetAuthToken:()=>()=>f.default.createElement(G,{message:"An error occured while logging in: Failed to issue refresh token"}),FailedToRefreshTokenForSite:()=>()=>f.default.createElement(G,{message:"An error occured while logging in: Failed to issue refresh token for site"}),FailedToRenewAuthToken:()=>()=>f.default.createElement(G,{message:"Failed to renew access token."}),FailedToRenewAuthTokenSiteNotFound:({siteId:n})=>()=>f.default.createElement(g,{message:`Authenticate failed, your configured development site (${n}) could not be accessed`,hint:"Make sure the site exists and you still have access to it"}),FailedToRenewAuthTokenRefreshTokenRevoked:()=>()=>f.default.createElement(g,{message:"Failed to renew access token: refresh token has been revoked",hint:"Please login again to get a new refresh token"}),FailedToRevokeRefreshToken:({email:n})=>()=>f.default.createElement(G,{message:"An error occured while trying to logout: Failed to revoke refresh token!",explanation:`Wix CLI is still logged in to account ${n}`}),FailedToFetchPackageJson:()=>()=>f.default.createElement(G,{message:"Failed to fetch package data."}),FailedToCreateProjectFolder:({packageFolder:n})=>()=>f.default.createElement(g,{cause:e,message:`Failed to create project folder: ${n}.`}),LatestVersionOfCreateAppRequired:({currentVersion:n,latestVersion:r,updateCommand:o})=>()=>f.default.createElement(g,{message:f.default.createElement(f.default.Fragment,null,"Generating a Wix App is only supported using the latest version (",r,") of ",f.default.createElement(N,{bold:!0},"@wix/create-app")," (current:"," ",n,")"),hint:f.default.createElement(N,null,"Make sure you are using the following command:",f.default.createElement(It,null),f.default.createElement(N,{bold:!0},o),f.default.createElement(It,null),"If the problem persists, try clearing your package manager's cache")}),EmptyDirectoryRequiredAppGeneration:({folder:n})=>()=>f.default.createElement(g,{message:f.default.createElement(f.default.Fragment,null,"Generating a Wix App requires an empty directory but"," ",f.default.createElement(N,{bold:!0},n)," already exists and isn't empty"),hint:f.default.createElement(N,null,"Choose a different project name or delete the existing"," ",f.default.createElement(N,{bold:!0},n)," folder")}),InvalidNewPackageName:({packageName:n,validations:r})=>()=>f.default.createElement(g,{message:f.default.createElement(f.default.Fragment,null,"Generating a Wix App requires a valid npm package name for the generated ",f.default.createElement(N,{bold:!0},"package.json")," ",f.default.createElement(It,null),"The name ",f.default.createElement(N,{bold:!0},n)," failed the following validations:",f.default.createElement(It,null),r.map((o,i)=>f.default.createElement(N,{key:i},f.default.createElement(It,null),"- ",o))),hint:"Choose a different project name that follows the validations above"}),SiteSelectorTimedout:()=>()=>f.default.createElement(g,{message:"Waiting for application installation timed out."}),TypeErrorInvalidUrl:()=>()=>f.default.createElement(g,{message:"Invalid assets URL."}),UnsupportedPackageManager:({packageManagerName:n})=>()=>f.default.createElement(g,{message:"Generating a Wix App requires the usage of a supported package manager",hint:`Expected Yarn or NPM but ${n?`got ${n}`:"failed to detect a package manager"}`}),UnsupportedPackageManagerWorkspaces:({packageManagerName:n})=>()=>f.default.createElement(g,{message:`Generating a Wix App inside ${n} workspaces is not supported`}),FailedToGetDeveloperApps:()=>()=>f.default.createElement(G,{message:"Failed to get the list of your applications"}),FailedToCreateDevCenterApp:()=>()=>f.default.createElement(G,{message:"Failed to register your application in Wix"}),FailedToGetPlacements:()=>()=>f.default.createElement(G,{message:"Failed to get placements"}),FailedToCreateTunnel:()=>()=>f.default.createElement(g,{message:"Failed to create tunnel"}),FailedToDeleteTunnel:()=>()=>f.default.createElement(g,{message:"Failed to delete tunnel"}),SitePermissionDenied:({siteId:n})=>()=>f.default.createElement(g,{message:`You don't have permissions to site ${n}`}),AppPermissionDenied:({appId:n})=>()=>f.default.createElement(g,{message:`You don't have permissions to application ${n}`}),FailedToUpdateTelemetryConfig:()=>()=>f.default.createElement(g,{message:"Failed to change telemetry preferences"}),FailedToInstallPackage:({packageName:n})=>()=>f.default.createElement(g,{cause:e,message:`Failed to install npm package ${n}.`}),FailedToResolveNpmDependencies:()=>()=>f.default.createElement(G,{message:"Failed to resolve npm dependencies"}),FailedToInstallPackages:()=>()=>f.default.createElement(g,{cause:e,message:"Failed to install npm packages."}),FailedMigrationToAnyNpm:()=>()=>f.default.createElement(g,{message:f.default.createElement(f.default.Fragment,null,"Could not start the migration process"),hint:"Make sure that your package.json does not have packages installed outside of dev dependencies"}),DeprecatedVersion:({currentVersion:n})=>()=>f.default.createElement(g,{message:f.default.createElement(f.default.Fragment,null,`Your version of the Wix CLI (${n}) is`,f.default.createElement(N,{bold:!0}," deprecated"),"."),hint:"Please update to the latest version to continue"}),FailedToUninstallPackage:({packageName:n})=>()=>f.default.createElement(g,{cause:e,message:`Failed to uninstall npm package ${n}.`}),FailedToSyncToRevision:({revision:n})=>()=>f.default.createElement(g,{message:`Failed to sync the local project to revision ${n}`}),FailedToCreateVersion:()=>()=>f.default.createElement(g,{message:"Wix CLI failed to create version for your app"}),FailedToReadCache:({path:n})=>()=>f.default.createElement(g,{message:`Failed to read cache file at ${n}.`}),FailedToWriteCache:({path:n})=>()=>f.default.createElement(g,{message:`Failed to write cache file at ${n}.`}),UploadApplicationFailed:()=>()=>f.default.createElement(g,{message:"Failed to upload the application"}),BuiltProjectNeeded:()=>()=>f.default.createElement(g,{message:"Can not find build output, please execute `wix app build` to build your app before proceeding"}),WixUninstallMissingPackageName:()=>()=>f.default.createElement(g,{message:"Please specify a package name"}),FailedToReadJson:({filePath:n})=>()=>f.default.createElement(g,{cause:e,message:`Failed to read ${n}.`}),InvalidJsonFile:({filePath:n})=>()=>f.default.createElement(g,{cause:e,message:`Invalid JSON file located at ${n}.`}),FailedToWriteWixLock:()=>()=>f.default.createElement(g,{message:"Failed to write 'wix.lock'"}),InvalidVeloConfigJson:({configFilename:n})=>()=>f.default.createElement(g,{cause:e,message:`Invalid ${n}, make sure it's configured correctly.`}),DashboardPageConfigNotFound:({configPath:n})=>()=>f.default.createElement(g,{message:`Dashboard page config not found at ${n}`}),EmbeddedScriptConfigNotFound:({configPath:n})=>()=>f.default.createElement(g,{message:`Embedded script config not found at ${n}`}),CustomElementConfigNotFound:({configPath:n})=>()=>f.default.createElement(g,{message:`Site widget config not found at ${n}`}),SitePluginConfigNotFound:({configPath:n})=>()=>f.default.createElement(g,{message:`Site plugin config not found at ${n}`}),BlocksWidgetApiNotFound:({folderPath:n})=>()=>f.default.createElement(g,{message:`Blocks widget api file not found at ${n}`}),BlocksWidgetConfigNotFound:({configPath:n})=>()=>f.default.createElement(g,{message:`Blocks widget config not found at ${n}`}),BlocksWidgetPanelConfigNotFound:({configPath:n})=>()=>f.default.createElement(g,{message:`Blocks widget panel config not found at ${n}`}),NoExtensionsFound:()=>()=>f.default.createElement(g,{message:"Your project doesn't seem to have any extensions.",explanation:"Extensions are the building blocks of your app.",hint:"Make sure it is configured properly, or read our documentation (\u200Bhttps://wix.to/b7o4Ml0) to start developing your first extension."}),NoPagesDirectoryFound:({srcDir:n})=>()=>f.default.createElement(g,{message:f.default.createElement(f.default.Fragment,null,"No ",f.default.createElement(N,{bold:!0},"pages")," directory was found under"," ",f.default.createElement(N,{bold:!0},n),"."),hint:f.default.createElement(N,null,"Consider re-cloning the project repository or creating a"," ",f.default.createElement(N,{bold:!0},"pages")," directory under ",f.default.createElement(N,{bold:!0},n),".")}),DashboardPluginConfigNotFound:({configPath:n})=>()=>f.default.createElement(g,{message:`Dashboard plugin config not found at ${n}`}),DashboardMenuPluginConfigNotFound:({configPath:n})=>()=>f.default.createElement(g,{message:`Dashboard menu plugin config not found at ${n}`}),ServicePluginConfigNotFound:({configPath:n})=>()=>f.default.createElement(g,{message:`Service plugin config not found at ${n}`}),DashboardModalConfigNotFound:({configPath:n})=>()=>f.default.createElement(g,{message:`Dashboard modal config not found at ${n}`}),InvalidConfigSchemaError:({configPath:n,zodError:r})=>()=>f.default.createElement(g,{message:Ce`
|
|
13
|
+
Invalid configuration found at \`${n}\`:
|
|
14
|
+
The following errors were found:
|
|
15
|
+
${r.errors.map(ms).join(`
|
|
16
|
+
`)}`,hint:"Fix the errors above for your configurations to be applied successfully."}),InvalidParamsOverrideSchemaError:({paramsOverridePath:n,zodError:r})=>()=>f.default.createElement(g,{message:Ce`
|
|
17
|
+
Invalid params override found at \`${n}\`:
|
|
18
|
+
The following errors were found:
|
|
19
|
+
${r.errors.map(ms).join(`
|
|
20
|
+
`)}`,hint:"Fix the errors above for your params override to be applied successfully."}),InvalidDependenciesJsonSchemaError:({path:n,zodError:r})=>()=>f.default.createElement(g,{message:Ce`
|
|
21
|
+
Invalid configuration found at \`${n}\`:
|
|
22
|
+
The following errors were found:
|
|
23
|
+
${r.errors.map(ms).join(`
|
|
24
|
+
`)}`,hint:f.default.createElement(N,null,"Try to re-install ",f.default.createElement(N,{bold:!0},"@wix/cli-app")," dependency")}),PermissionDenied:()=>()=>f.default.createElement(g,{message:"Forbidden operation. Missing permissions"}),FailedToReadProjectFiles:()=>()=>f.default.createElement(g,{cause:e,message:"Failed to read source files: make sure you have an 'src' folder and that it's readable."}),FailedToCreateVersionForSubmittedApp:()=>()=>f.default.createElement(g,{message:"Cannot create a new application version because the app has an active marketplace submission",hint:"You will be able continue creating versions when your submission is approved or retracted"}),GridAppFilesMaxLengthExcceeded:({maxSizeViolationsData:n,filePaths:r})=>{let o="Found one or more project files that are bigger than the allowed limit";return n?.files.length&&(o+=` (${n.expectedSize}KB): ${n.files.map(i=>`${r[i.fileIndex]} (${i.receivedSize}KB)`).join(", ")}`),()=>f.default.createElement(g,{message:o})},GridAppFailedToUpdateFiles:()=>()=>f.default.createElement(g,{message:Ce`
|
|
25
|
+
Failed to update files.
|
|
26
|
+
Failed to sync changes from local files to the Dev Editor
|
|
27
|
+
Still watching local files and will continue to sync changes...
|
|
28
|
+
`}),FailedToWatchFiles:()=>()=>f.default.createElement(g,{cause:e,message:"Failed to watch files."}),FailedToCreateGridApp:({error:n})=>()=>f.default.createElement(g,{message:"Failed to create an isolated environment.",explanation:n}),DeviceCodeTimedOut:()=>()=>f.default.createElement(g,{message:"The device code has not been approved in the time allocated, please start the login process again."}),DuplicateComponentIdsError:({issues:n})=>{let r=({issue:i})=>{let s=a=>(0,hs.match)(a,{page:()=>"page",plugin:()=>"plugin","menu-plugin":()=>"menu plugin","sidebar-category":()=>"sidebar category","embedded-script":()=>"embedded script","custom-element":()=>"custom element","blocks-widget":()=>"blocks widget","blocks-widget-panel":()=>"blocks widget panel",modal:()=>"modal",topology:()=>"topology","site-plugin":()=>"site plugin",monitoring:()=>"monitoring"});return f.default.createElement(Be,{flexDirection:"column"},f.default.createElement(N,null,f.default.createElement(N,{bold:!0},"Duplicate ID: "),i.id),f.default.createElement(N,{bold:!0},"Extensions:"),i.components.map(({name:a,path:u,type:l})=>f.default.createElement(N,{key:u},"[",s(l),"] ",a," (",u,")")),f.default.createElement(N,null,f.default.createElement(N,{bold:!0},"Possible GUID: "),i.suggestedId))},o=f.default.createElement(Be,{flexDirection:"column",rowGap:1},f.default.createElement(N,null,"You can use the provided suggested GUIDs as the ID of the newly created extension."),n.map(i=>f.default.createElement(r,{issue:i,key:i.id})));return()=>f.default.createElement(g,{message:"Found multiple extensions with the same id, this might happen if you copy paste folders.",hint:o})},InvalidResponseData:()=>()=>f.default.createElement(G,{message:"Got unexpected response from server."}),InvalidCreateAppResponse:()=>()=>f.default.createElement(g,{message:"`createApp` returned an invalid response."}),InvalidDeployAppResponse:()=>()=>f.default.createElement(g,{message:"Got unexpected response from server. Make sure you are running a supported version of the Velo CLI."}),InvalidGetDeploymentResponse:()=>()=>f.default.createElement(g,{message:"Got unexpected response from server. Please try again later.."}),FailedToGetPagesDiff:()=>()=>f.default.createElement(g,{message:"Failed to request pages diff."}),InvalidViteBuildOutput:()=>()=>f.default.createElement(g,{message:"Invalid vite build output"}),ViteModuleBundleNotFound:()=>()=>f.default.createElement(g,{message:"Could not find module bundle in vite build output"}),ViteFileNotFoundInOutput:({fileName:n})=>()=>f.default.createElement(g,{message:`Could not find ${n} in vite build output`}),FailedToCreateBackendDeployment:()=>()=>f.default.createElement(g,{message:"Failed to create backend deployment"}),FailedToUpdateBackendDeployment:()=>()=>f.default.createElement(g,{message:"Failed to update backend deployment"}),InvalidDeploymentUrl:({deploymentUrl:n})=>()=>f.default.createElement(g,{message:`Invalid deployment URL: \`${n}\``}),FailedToGetBackendDeployment:()=>()=>f.default.createElement(g,{message:"Failed to get backend deployment"}),FailedToDeployBackend:()=>()=>f.default.createElement(g,{message:"Failed to deploy backend"}),FailedToMarkDeploymentAsPermanent:()=>()=>f.default.createElement(g,{message:"Failed to make backend deployment permanent"}),FailedToGetUserInfo:()=>()=>f.default.createElement(g,{message:"Failed to get user information."}),FailedToGetMyAccount:()=>()=>f.default.createElement(G,{message:"Failed to get account information."}),FailedToCreateDevelopmentSite:()=>()=>f.default.createElement(g,{message:"Failed to create a Development Site"}),FailedToGetDevelopmentSites:()=>()=>f.default.createElement(g,{message:"Failed to request development sites."}),FailedToGetDevelopmentSitesLimit:()=>()=>f.default.createElement(g,{message:"Failed to request development sites limit."}),FailedToGetRequiredApps:()=>()=>f.default.createElement(G,{message:"Failed to get app requirement info."}),FailedToGetMarketListing:()=>()=>f.default.createElement(g,{message:"Failed to get market listing."}),FailedToAddRequiredApp:()=>()=>f.default.createElement(g,{message:"Failed to add required app."}),FailedToQuerySites:()=>()=>f.default.createElement(g,{message:"Failed to request sites list."}),FailedToGetSite:()=>()=>f.default.createElement(g,{message:"Failed to get information about your configured Development Site"}),FailedToDeploySite:()=>()=>f.default.createElement(g,{message:"Failed to deploy site."}),FailedToPublishDeployment:()=>()=>f.default.createElement(G,{message:"Failed to publish site."}),FailedToSaveDevelopmentSite:({path:n})=>()=>f.default.createElement(g,{message:"Failed to save the current development site.",hint:`Make sure the \`${n}\` file has proper permissions and is accessible`}),FailedToBuildApp:()=>{let n=_u(e);return()=>f.default.createElement(g,{message:f.default.createElement(f.default.Fragment,null,"Failed to build the application.",f.default.createElement(It,null),n),hint:"Please check the build output for more information"})},FailedToCheckIfAppInstalled:()=>()=>f.default.createElement(g,{message:"Failed to fetch site installation details"}),FailedToInitializeGitRepo:()=>()=>f.default.createElement(g,{cause:e,message:"Failed to initialize git repo."}),FailedToInstallDependencies:()=>()=>f.default.createElement(g,{cause:e,message:"Failed to install dependencies."}),FailedToCommitChanges:()=>()=>f.default.createElement(g,{cause:e,message:"Failed to commit changes."}),FailedToDeleteAuthData:()=>()=>f.default.createElement(g,{cause:e,message:"Failed to delete auth data."}),FailedToDeleteLegacyAuthData:()=>()=>f.default.createElement(g,{cause:e,message:"Failed to delete legacy auth data."}),FailedToSaveAuthData:()=>()=>f.default.createElement(g,{cause:e,message:"Failed to save auth data."}),FailedToSaveApiKeyAuthData:()=>()=>f.default.createElement(g,{cause:e,message:"Failed to save api key auth data."}),FailedToWriteJson:({filePath:n})=>()=>f.default.createElement(g,{cause:e,message:`Failed to write JSON at path: ${n}.`}),FailedToWriteFile:({filePath:n})=>()=>f.default.createElement(g,{cause:e,message:`Failed to write file at path: ${n}.`}),FailedToCreateDir:({dirPath:n})=>()=>f.default.createElement(g,{cause:e,message:`Failed to create a directory at path: ${n}.`}),TemplatePathNotFound:({templatePath:n})=>()=>f.default.createElement(G,{message:`Template path not found: ${n}`}),LocalTemplatePathNotFound:({path:n})=>()=>f.default.createElement(g,{message:`Local template path not found: ${n}`}),FailedToCloneRepo:()=>()=>f.default.createElement(g,{cause:e,message:"Failed to clone repo.",hint:"Make sure the Git URL is correct and that your local Git is configured properly to access the remote repository"}),InvalidGitUrl:({url:n})=>()=>f.default.createElement(G,{message:`Invalid Git URL: ${n}`}),AuthenticationRequired:()=>()=>f.default.createElement(g,{message:"You have to already be logged in to run this command."}),InvalidApiKey:()=>()=>f.default.createElement(g,{message:"You used invalid API key to log in."}),SiteConfiguredRequired:()=>()=>f.default.createElement(g,{message:"You must configure the development site before running this command, or provide a site-id in the command options."}),FailedAddingPackageToWorkspace:()=>()=>f.default.createElement(g,{message:"Could not add package to the workspaces configuration. Please add it as instructed by your package manager.",hint:f.default.createElement(N,null,"Full error can be found in ",f.default.createElement(N,{bold:!0},"wix-error.log"))}),FailedToGenerateSelfsignedCertificate:()=>()=>f.default.createElement(g,{message:"Failed to generate a Selfsigned certificate for development."}),NonInteractiveTerminal:()=>()=>f.default.createElement(g,{message:"This command is not supported in non-interactive terminals. Please run the command in an interactive terminal (TTY)."}),FailedToResolveViteOrigin:()=>()=>f.default.createElement(g,{message:"Failed to resolve the base url for CSS asset urls"}),FailedToCreateAppRelease:()=>()=>f.default.createElement(G,{message:"Failed to create an app configuration."}),FailedToUpdateAppRelease:()=>()=>f.default.createElement(G,{message:"Failed to update an app configuration."}),FailedToCreateComponents:()=>()=>f.default.createElement(G,{message:"Failed to create components."}),FailedToCheckDeprecatedStatus:()=>()=>f.default.createElement(G,{message:"Failed to check cli version deprecated status."}),FailedToGetResolveNpmDependenciesResult:()=>()=>f.default.createElement(G,{message:"Failed to resolve Wix's lockfile."}),CliAppVersionMismatch:({cliVersion:n,cliAppVersion:r})=>()=>f.default.createElement(g,{message:f.default.createElement(N,null,"The versions of ",f.default.createElement(N,{bold:!0},"@wix/cli")," (",n,") and"," ",f.default.createElement(N,{bold:!0},"@wix/cli-app")," (",r,") dependencies do not match"),hint:f.default.createElement(N,null,"Align their versions in your ",f.default.createElement(N,{bold:!0},"package.json")," and re-install dependencies")}),FailedToGetAppValidity:()=>()=>f.default.createElement(G,{message:"Failed to get validation status for app version"}),InvalidDashboardPageRoute:({route:n,errorMessage:r})=>()=>f.default.createElement(g,{message:`Invalid dashboard page route: ${n}`,hint:r}),InvalidEmbeddedScriptFolder:({path:n,errorMessage:r})=>()=>f.default.createElement(g,{message:`Invalid embedded script folder: ${n}`,hint:r}),InvalidEmbeddedScriptTemplate:({templateFilename:n,errorMessage:r})=>()=>f.default.createElement(g,{message:`Invalid embedded script template in ${n}`,hint:r}),InvalidCustomElementTagName:({tagName:n,errorMessage:r})=>()=>f.default.createElement(g,{message:f.default.createElement(N,null,"We use name of folder as tagName for your custom element. Unfortunately, ",f.default.createElement(N,{bold:!0},n)," is invalid tagName. Reason: ",r),hint:f.default.createElement(N,null,"You can find rules for tagName here:"," ",f.default.createElement(N,{bold:!0},"https://developer.mozilla.org/en-US/docs/Web/API/CustomElementRegistry/define#valid_custom_element_names"))}),InvalidSiteFrontendPackageVersion:({packageName:n,versionRange:r})=>()=>f.default.createElement(g,{message:f.default.createElement(N,null,"Package ",f.default.createElement(N,{bold:!0},n)," has an invalid version range ",f.default.createElement(N,{bold:!0},r)," in your"," ",f.default.createElement(N,{bold:!0},"package.json")," file."),hint:f.default.createElement(N,null,"The version range must follow"," ",f.default.createElement(N,{bold:!0},"semantic versioning")," rules, and it must contain a major version.",f.default.createElement(It,null),"Read more about it here:"," ",f.default.createElement(So,{url:"https://docs.npmjs.com/about-semantic-versioning"}))}),FailedToCreateSiteOverride:()=>()=>f.default.createElement(G,{message:"Failed to create site override configuration"}),FailedToGetPipelineErrorInfo:()=>()=>f.default.createElement(G,{message:"Failed to get error details"}),FailedToGetDeploymentStatus:()=>()=>f.default.createElement(G,{message:"Failed to get deployment status"}),NetworkError:()=>()=>f.default.createElement(g,{cause:e,message:"Network error occurred.",hint:"Make sure you have an active internet connection and try again shortly."}),FailedToGenerateAppMarketQueryParam:()=>()=>f.default.createElement(G,{message:"Failed to get generate appMarket query parameter"}),FailedToParseLog:()=>()=>f.default.createElement(G,{message:"Failed to parse log from the server"}),AppForVersionNotFound:({version:n})=>()=>f.default.createElement(g,{message:`Could not find app configuration for the provided version: "${n}"`,hint:"Make sure that there is an app for this version."}),FailedToFetchAppForVersion:()=>()=>f.default.createElement(G,{message:"Failed to fetch app configuration"}),FailedToGetAppSecret:()=>()=>f.default.createElement(G,{message:"Failed to fetch app keys and configuration"}),FailedToConnectToLogsService:()=>()=>f.default.createElement(g,{message:"Failed to connect to logs service."}),FailedToGetLogsTopology:()=>()=>f.default.createElement(g,{message:"Failed to fetch logs configuration for the given version.",hint:"Try to use a different version."}),FailedInstallCloudflareNoAccess:({path:n})=>()=>f.default.createElement(g,{message:`Failed to install required binary in "${n}"`,hint:"Check that you have required permissions."}),LogsConnectionTimeout:()=>()=>f.default.createElement(g,{message:"Log session has been closed due to timeout."}),InvalidServicePluginImplementation:()=>()=>f.default.createElement(g,{message:"Your service plugin implementation is incorrect."}),UnknownServicePlugin:({name:n})=>()=>f.default.createElement(g,{message:`Unknown service plugin with the name of \`${n}\``}),InvalidServicePluginFolder:({relativePath:n})=>()=>f.default.createElement(g,{message:`Invalid folder for service plugin in \`${n}\``}),InvalidSiteOverrideID:()=>()=>f.default.createElement(g,{message:"Failed to read devSiteOverrideId from local app configurations.",hint:"Restart the dev environment and make sure that the .wix/app.config.json file exists."}),FailedToFindEsbuildOutputFile:()=>()=>f.default.createElement(g,{message:"Failed to find file in ESBuild output",hint:"Restart the dev environment and try again."}),FailedOptimizingWithEsbuild:()=>()=>f.default.createElement(g,{cause:e,message:"Failed to optimize dependency with ESBuild.",explanation:"Restart the dev environment and try again."}),FailedReadingEsbuildOutputFile:()=>()=>f.default.createElement(g,{message:"Failed to read ESBuild's output file",hint:"Restart the dev environment and try again."}),CliAppTemplateNotFound:({id:n})=>()=>f.default.createElement(g,{message:f.default.createElement(f.default.Fragment,null,"Template with ID ",f.default.createElement(N,{bold:!0},n)," not found."),hint:"Make sure you are using the correct template ID"}),FailedToQueryCliAppTemplates:()=>()=>f.default.createElement(G,{message:"Failed to fetch available app templates"}),FailedToCreateDevCenterAppFromTemplate:()=>()=>f.default.createElement(G,{message:"Failed to register your application in Wix"}),FailedToQueryApps:()=>()=>f.default.createElement(G,{message:"Failed to query apps"}),FailedToGetSiteInstalledApps:()=>()=>f.default.createElement(G,{message:"Failed to get site installed apps"}),FailedToGetClientSpecMap:()=>()=>f.default.createElement(G,{message:"Failed to get site client spec map"}),DeniedPermissionToGetAppSecret:()=>()=>f.default.createElement(g,{message:"Insufficient permissions",hint:"Please log in with an account that has the required permissions to access this application"}),FailedToCreateVeloApp:()=>()=>f.default.createElement(G,{message:"Failed to create an isolated environment."}),FailedToGetFilesFromVelo:()=>()=>f.default.createElement(G,{message:"Failed to get initial project files"}),FailedToOpenBrowser:()=>()=>f.default.createElement(g,{cause:e,message:"Failed to open browser.",hint:"Please make sure you have a browser installed, and it's appropriately configured"}),FailedToGetWixSite:()=>{let n=_u(e);return()=>f.default.createElement(G,{message:`Failed to parse local file system. Cause: ${n}`})},FailedToSyncPagesTypes:()=>()=>f.default.createElement(G,{message:"Failed to sync pages types"})})}function _u(t){return t instanceof Error?t.message:"Unknown"}function ms(t){let e=t.path.join(".");return e?`- \`${e}\`: ${t.message}`:`- ${t.message}`}var _s=({error:t,systemErrorOverride:e})=>(0,Co.useMemo)(()=>{let n=go(t);return _o(n)&&e?e:(0,Co.createElement)(gu(n.cliCode,n.cause()))},[t,e]);c();var zn=k(ho(),1);c();c();var Ld=k(Od(),1);c();F();Fe();ae();var ya="sentry.dsc",Cd="sentry.parent_span_id",Rd="sentry.sampled_not_recording";var VS=lt("sentry_scopes"),z0=lt("sentry_fork_isolation_scope"),J0=lt("sentry_fork_set_scope"),Q0=lt("sentry_fork_set_isolation_scope");function Id(t){return t.getValue(VS)}function KS({parentSpanId:t,dsc:e,sampled:n}){let r=e?Xc(e):void 0,o=new pr().set(Cd,t||""),i=r?o.set(ya,r):o;return n===!1?i.set(Rd,"1"):i}function Pd(t){let e=KS({parentSpanId:t.parentSpanId,dsc:t.dsc,sampled:t.sampled});return{traceId:t.traceId,spanId:t.parentSpanId||"",isRemote:!0,traceFlags:t.sampled?pt.SAMPLED:pt.NONE,traceState:e}}function bd(t){let e,n=t[0],r=1;for(;r<t.length;){let o=t[r],i=t[r+1];if(r+=2,(o==="optionalAccess"||o==="optionalCall")&&n==null)return;o==="access"||o==="optionalAccess"?(e=n,n=i(n)):(o==="call"||o==="optionalCall")&&(n=i((...s)=>n.call(e,...s)),e=void 0)}return n}function YS(t){let{traceFlags:e,traceState:n}=t,r=n?n.get(Rd)==="1":!1;if(e===pt.SAMPLED)return!0;if(r)return!1;let o=n?n.get(ya):void 0,i=o?Qi(o):void 0;if(bd([i,"optionalAccess",s=>s.sampled])==="true")return!0;if(bd([i,"optionalAccess",s=>s.sampled])==="false")return!1}function Nd(t){let e=t.spanContext(),{traceId:n,spanId:r,traceState:o}=e,i=o?o.get(ya):void 0,s=i?Qi(i):void 0,a=o&&o.get(Cd)||void 0,u=YS(e),l=s||os(ts(t));return{traceId:n,spanId:r,sampled:u,parentSpanId:a,dsc:l}}function An(...t){Ko({instrumentations:t})}c();F();function Md(t){let e=Id(Nt.active());e&&(e.isolationScope=t)}c();function Te(t,e){t.setAttribute(ze,e)}c();function xd(t){let e=t.protocol||"",n=t.hostname||t.host||"",r=!t.port||t.port===80||t.port===443||/^(.*):(\d+)$/.test(n)?"":`:${t.port}`,o=t.path?t.path:"/";return`${e}//${n}${r}${o}`}var wd="Http",Ke={},va,XS=Object.assign(function(){if(va)return;let t=Ke._instrumentation||Ld.HttpInstrumentation;va=new t({...O([Ke,"access",e=>e.instrumentation,"optionalAccess",e=>e._experimentalConfig]),ignoreOutgoingRequestHook:e=>{let n=xd(e);if(!n)return!1;if(is(n,ie()))return!0;let r=Ke.ignoreOutgoingRequests;return!!(r&&r(n,e))},ignoreIncomingRequestHook:e=>{let n=e.url,r=O([e,"access",i=>i.method,"optionalAccess",i=>i.toUpperCase,"call",i=>i()]);if(r==="OPTIONS"||r==="HEAD")return!0;let o=Ke.ignoreIncomingRequests;return!!(n&&o&&o(n,e))},requireParentforOutgoingSpans:!1,requireParentforIncomingSpans:!1,requestHook:(e,n)=>{if(Te(e,"auto.http.otel.http"),Dd(n)){O([Ke,"access",p=>p.instrumentation,"optionalAccess",p=>p.requestHook,"optionalCall",p=>p(e,n)]);return}let r=rs(e),o=(r.isolationScope||Le()).clone(),i=r.scope||cn();o.setSDKProcessingMetadata({request:n});let s=ie();s&&s.getOptions().autoSessionTracking&&o.setRequestSession({status:"ok"}),Md(o),ns(e,i,o);let a=(n.method||"GET").toUpperCase(),u=Ji(n.url||"/"),l=`${a} ${u}`;o.setTransactionName(l),O([Ke,"access",p=>p.instrumentation,"optionalAccess",p=>p.requestHook,"optionalCall",p=>p(e,n)])},responseHook:(e,n)=>{let r=ie();r&&r.getOptions().autoSessionTracking&&setImmediate(()=>{r._captureRequestSession()}),O([Ke,"access",o=>o.instrumentation,"optionalAccess",o=>o.responseHook,"optionalCall",o=>o(e,n)])},applyCustomAttributesOnSpan:(e,n,r)=>{(typeof Ke.breadcrumbs>"u"?!0:Ke.breadcrumbs)&&ZS(n,r),O([Ke,"access",i=>i.instrumentation,"optionalAccess",i=>i.applyCustomAttributesOnSpan,"optionalCall",i=>i(e,n,r)])}}),An(va)},{id:wd}),$S=(t={})=>({name:wd,setupOnce(){Ke=t,XS()}}),Fd=$S;function ZS(t,e){if(!Dd(t))return;let n=zS(t);un({category:"http",data:{status_code:e.statusCode,...n},type:"http"},{event:"response",request:t,response:e})}function zS(t){try{let e=t.getHeader("host")||t.host,n=new URL(t.path,`${t.protocol}//${e}`),r=er(n.toString()),o={url:tr(r),"http.method":t.method||"GET"};return r.search&&(o["http.query"]=r.search),r.hash&&(o["http.fragment"]=r.hash),o}catch{return{}}}function Dd(t){return"outputData"in t&&"outputSize"in t&&!("client"in t)&&!("statusCode"in t)}c();F();c();var oe=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;c();var Aa=Wc(process.versions.node),Qo=Aa.major;var JS=(t={})=>{let e=typeof t.breadcrumbs>"u"?!0:t.breadcrumbs,n=t.ignoreOutgoingRequests;async function r(){if(Qo<18){oe&&U.log("NodeFetch is not supported on Node < 18, skipping instrumentation...");return}try{let o=await import("./build-JJQXAOLF.js"),{FetchInstrumentation:i}=o;class s extends i{onHeaders({request:u,response:l}){return e&&ey(u,l),super.onHeaders({request:u,response:l})}}return new s({ignoreRequestHook:a=>{let u=ny(a.origin,a.path),l=!or();if(n&&u&&n(u))return!0;if(l){let d=Nt.active(),m={},h=ye.getSpan(d),_=h?Nd(h):cn().getPropagationContext(),T=Pd(_);T.traceState=O([T,"access",C=>C.traceState,"optionalAccess",C=>C.set,"call",C=>C("sentry.url",u)]);let R=ye.setSpanContext(d,T);an.inject(R,m);let M=a.headers;return Array.isArray(M)?Object.entries(m).forEach(C=>M.push(...C)):a.headers+=Object.entries(m).map(([C,A])=>`${C}: ${A}\r
|
|
29
|
+
`).join(""),!0}return!1},onRequest:({span:a})=>{QS(a)}})}catch(o){oe&&U.log(`Error while loading NodeFetch instrumentation:
|
|
30
|
+
`,o)}}return{name:"NodeFetch",setupOnce(){r().then(o=>{o&&An(o)})}}},kd=JS;function QS(t){Te(t,"auto.http.otel.node_fetch")}function ey(t,e){let n=ty(t);un({category:"http",data:{status_code:e.statusCode,...n},type:"http"},{event:"response",request:t,response:e})}function ty(t){try{let e=new URL(t.path,t.origin),n=er(e.toString()),r={url:tr(n),"http.method":t.method||"GET"};return n.search&&(r["http.query"]=n.search),n.hash&&(r["http.fragment"]=n.hash),r}catch{return{}}}function ny(t,e="/"){let n=`${t}`;return t.endsWith("/")&&e.startsWith("/")?`${n}${e.slice(1)}`:!t.endsWith("/")&&!e.startsWith("/")?`${n}/${e.slice(1)}`:`${n}${e}`}c();import*as Gd from"node:util";var ry="Console",oy=()=>({name:ry,setup(t){qc(({args:e,level:n})=>{ie()===t&&un({category:"console",level:Kc(n),message:Gd.format.apply(void 0,e)},{input:[...e],level:n})})}}),Ud=oy;c();import{execFile as iy}from"node:child_process";import{readFile as sy,readdir as ay}from"node:fs";import*as pe from"node:os";import{join as cy}from"node:path";import{promisify as jd}from"node:util";var uy=jd(sy),ly=jd(ay),py="Context",dy=(t={})=>{let e,n={app:!0,os:!0,device:!0,culture:!0,cloudResource:!0,...t};async function r(i){e===void 0&&(e=o());let s=fy(await e);return i.contexts={...i.contexts,app:{...s.app,...O([i,"access",a=>a.contexts,"optionalAccess",a=>a.app])},os:{...s.os,...O([i,"access",a=>a.contexts,"optionalAccess",a=>a.os])},device:{...s.device,...O([i,"access",a=>a.contexts,"optionalAccess",a=>a.device])},culture:{...s.culture,...O([i,"access",a=>a.contexts,"optionalAccess",a=>a.culture])},cloud_resource:{...s.cloud_resource,...O([i,"access",a=>a.contexts,"optionalAccess",a=>a.cloud_resource])}},i}async function o(){let i={};if(n.os&&(i.os=await my()),n.app&&(i.app=_y()),n.device&&(i.device=gy(n.device)),n.culture){let s=hy();s&&(i.culture=s)}return n.cloudResource&&(i.cloud_resource=Ay()),i}return{name:py,processEvent(i){return r(i)}}},Bd=dy;function fy(t){if(O([t,"optionalAccess",e=>e.app,"optionalAccess",e=>e.app_memory])&&(t.app.app_memory=process.memoryUsage().rss),O([t,"optionalAccess",e=>e.app,"optionalAccess",e=>e.free_memory])&&typeof process.availableMemory=="function"){let e=O([process,"access",n=>n.availableMemory,"optionalCall",n=>n()]);e!=null&&(t.app.free_memory=e)}return O([t,"optionalAccess",e=>e.device,"optionalAccess",e=>e.free_memory])&&(t.device.free_memory=pe.freemem()),t}async function my(){let t=pe.platform();switch(t){case"darwin":return yy();case"linux":return vy();default:return{name:Ey[t]||t,version:pe.release()}}}function hy(){try{if(typeof process.versions.icu!="string")return;let t=new Date(9e8);if(new Intl.DateTimeFormat("es",{month:"long"}).format(t)==="enero"){let n=Intl.DateTimeFormat().resolvedOptions();return{locale:n.locale,timezone:n.timeZone}}}catch{}}function _y(){let t=process.memoryUsage().rss,n={app_start_time:new Date(Date.now()-process.uptime()*1e3).toISOString(),app_memory:t};if(typeof process.availableMemory=="function"){let r=O([process,"access",o=>o.availableMemory,"optionalCall",o=>o()]);r!=null&&(n.free_memory=r)}return n}function gy(t){let e={},n;try{n=pe.uptime&&pe.uptime()}catch{}if(typeof n=="number"&&(e.boot_time=new Date(Date.now()-n*1e3).toISOString()),e.arch=pe.arch(),(t===!0||t.memory)&&(e.memory_size=pe.totalmem(),e.free_memory=pe.freemem()),t===!0||t.cpu){let r=pe.cpus(),o=r&&r[0];o&&(e.processor_count=r.length,e.cpu_description=o.model,e.processor_frequency=o.speed)}return e}var Ey={aix:"IBM AIX",freebsd:"FreeBSD",openbsd:"OpenBSD",sunos:"SunOS",win32:"Windows"},Ty=[{name:"fedora-release",distros:["Fedora"]},{name:"redhat-release",distros:["Red Hat Linux","Centos"]},{name:"redhat_version",distros:["Red Hat Linux"]},{name:"SuSE-release",distros:["SUSE Linux"]},{name:"lsb-release",distros:["Ubuntu Linux","Arch Linux"]},{name:"debian_version",distros:["Debian"]},{name:"debian_release",distros:["Debian"]},{name:"arch-release",distros:["Arch Linux"]},{name:"gentoo-release",distros:["Gentoo Linux"]},{name:"novell-release",distros:["SUSE Linux"]},{name:"alpine-release",distros:["Alpine Linux"]}],Sy={alpine:t=>t,arch:t=>Je(/distrib_release=(.*)/,t),centos:t=>Je(/release ([^ ]+)/,t),debian:t=>t,fedora:t=>Je(/release (..)/,t),mint:t=>Je(/distrib_release=(.*)/,t),red:t=>Je(/release ([^ ]+)/,t),suse:t=>Je(/VERSION = (.*)\n/,t),ubuntu:t=>Je(/distrib_release=(.*)/,t)};function Je(t,e){let n=t.exec(e);return n?n[1]:void 0}async function yy(){let t={kernel_version:pe.release(),name:"Mac OS X",version:`10.${Number(pe.release().split(".")[0])-4}`};try{let e=await new Promise((n,r)=>{iy("/usr/bin/sw_vers",(o,i)=>{if(o){r(o);return}n(i)})});t.name=Je(/^ProductName:\s+(.*)$/m,e),t.version=Je(/^ProductVersion:\s+(.*)$/m,e),t.build=Je(/^BuildVersion:\s+(.*)$/m,e)}catch{}return t}function Hd(t){return t.split(" ")[0].toLowerCase()}async function vy(){let t={kernel_version:pe.release(),name:"Linux"};try{let e=await ly("/etc"),n=Ty.find(a=>e.includes(a.name));if(!n)return t;let r=cy("/etc",n.name),o=(await uy(r,{encoding:"utf-8"})).toLowerCase(),{distros:i}=n;t.name=i.find(a=>o.indexOf(Hd(a))>=0)||i[0];let s=Hd(t.name);t.version=O([Sy,"access",a=>a[s],"optionalCall",a=>a(o)])}catch{}return t}function Ay(){return process.env.VERCEL?{"cloud.provider":"vercel","cloud.region":process.env.VERCEL_REGION}:process.env.AWS_REGION?{"cloud.provider":"aws","cloud.region":process.env.AWS_REGION,"cloud.platform":process.env.AWS_EXECUTION_ENV}:process.env.GCP_PROJECT?{"cloud.provider":"gcp"}:process.env.ALIYUN_REGION_ID?{"cloud.provider":"alibaba_cloud","cloud.region":process.env.ALIYUN_REGION_ID}:process.env.WEBSITE_SITE_NAME&&process.env.REGION_NAME?{"cloud.provider":"azure","cloud.region":process.env.REGION_NAME}:process.env.IBM_CLOUD_REGION?{"cloud.provider":"ibm_cloud","cloud.region":process.env.IBM_CLOUD_REGION}:process.env.TENCENTCLOUD_REGION?{"cloud.provider":"tencent_cloud","cloud.region":process.env.TENCENTCLOUD_REGION,"cloud.account.id":process.env.TENCENTCLOUD_APPID,"cloud.availability_zone":process.env.TENCENTCLOUD_ZONE}:process.env.NETLIFY?{"cloud.provider":"netlify"}:process.env.FLY_REGION?{"cloud.provider":"fly.io","cloud.region":process.env.FLY_REGION}:process.env.DYNO?{"cloud.provider":"heroku"}:void 0}c();import{createReadStream as Oy}from"node:fs";import{createInterface as by}from"node:readline";var Oa=new Pt(10),Vd=new Pt(20),Cy=7,Ry="ContextLines",Iy=1e3,Py=1e4;function Ny(t,e,n){let r=t.get(e);return r===void 0?(t.set(e,n),n):r}function My(t){return!!(t.startsWith("node:")||t.endsWith(".min.js")||t.endsWith(".min.cjs")||t.endsWith(".min.mjs")||t.startsWith("data:"))}function xy(t){return t.lineno!==void 0&&t.lineno>Py||t.colno!==void 0&&t.colno>Iy}function Ly(t,e){let n=Oa.get(t);if(n===void 0)return!1;for(let r=e[0];r<=e[1];r++)if(n[r]===void 0)return!1;return!0}function wy(t,e){if(!t.length)return[];let n=0,r=t[0];if(typeof r!="number")return[];let o=Wd(r,e),i=[];for(;;){if(n===t.length-1){i.push(o);break}let s=t[n+1];if(typeof s!="number")break;s<=o[1]?o[1]=s+e:(i.push(o),o=Wd(s,e)),n++}return i}function Fy(t,e,n){return new Promise((r,o)=>{let i=Oy(t),s=by({input:i}),a=0,u=0,l=e[u];if(l===void 0){r();return}let p=l[0],d=l[1];function m(h){Vd.set(t,1),oe&&U.error(`Failed to read file: ${t}. Error: ${h}`),s.close(),s.removeAllListeners(),r()}i.on("error",m),s.on("error",m),s.on("close",r),s.on("line",h=>{if(a++,!(a<p)&&(n[a]=jc(h,0),a>=d)){if(u===e.length-1){s.close(),s.removeAllListeners();return}u++;let _=e[u];if(_===void 0){s.close(),s.removeAllListeners();return}p=_[0],d=_[1]}})})}async function Dy(t,e){let n={};if(e>0&&O([t,"access",i=>i.exception,"optionalAccess",i=>i.values])){for(let i of t.exception.values)if(O([i,"access",s=>s.stacktrace,"optionalAccess",s=>s.frames,"optionalAccess",s=>s.length]))for(let s=i.stacktrace.frames.length-1;s>=0;s--){let a=i.stacktrace.frames[s],u=O([a,"optionalAccess",p=>p.filename]);if(!a||typeof u!="string"||typeof a.lineno!="number"||My(u)||xy(a))continue;n[u]||(n[u]=[]),n[u].push(a.lineno)}}let r=Object.keys(n);if(r.length==0)return t;let o=[];for(let i of r){if(Vd.get(i))continue;let s=n[i];if(!s)continue;s.sort((l,p)=>l-p);let a=wy(s,e);if(a.every(l=>Ly(i,l)))continue;let u=Ny(Oa,i,{});o.push(Fy(i,a,u))}if(await Promise.all(o).catch(()=>{oe&&U.log("Failed to read one or more source files and resolve context lines")}),e>0&&O([t,"access",i=>i.exception,"optionalAccess",i=>i.values]))for(let i of t.exception.values)i.stacktrace&&i.stacktrace.frames&&i.stacktrace.frames.length>0&&ky(i.stacktrace.frames,e,Oa);return t}function ky(t,e,n){for(let r of t)if(r.filename&&r.context_line===void 0&&typeof r.lineno=="number"){let o=n.get(r.filename);if(o===void 0)continue;Gy(r.lineno,r,e,o)}}function qd(t){delete t.pre_context,delete t.context_line,delete t.post_context}function Gy(t,e,n,r){if(e.lineno===void 0||r===void 0){oe&&U.error("Cannot resolve context for frame with no lineno or file contents");return}e.pre_context=[];for(let i=Kd(t,n);i<t;i++){let s=r[i];if(s===void 0){qd(e),oe&&U.error(`Could not find line ${i} in file ${e.filename}`);return}e.pre_context.push(s)}if(r[t]===void 0){qd(e),oe&&U.error(`Could not find line ${t} in file ${e.filename}`);return}e.context_line=r[t];let o=Yd(t,n);e.post_context=[];for(let i=t+1;i<=o;i++){let s=r[i];if(s===void 0)break;e.post_context.push(s)}}function Kd(t,e){return Math.max(1,t-e)}function Yd(t,e){return t+e}function Wd(t,e){return[Kd(t,e),Yd(t,e)]}var Uy=(t={})=>{let e=t.frameContextLines!==void 0?t.frameContextLines:Cy;return{name:Ry,processEvent(n){return Dy(n,e)}}},Xd=Uy;c();c();import{Worker as Hy}from"node:worker_threads";c();function Zd(t,e,n){let r=0,o=5,i=0;return setInterval(()=>{i===0?r>t&&(o*=2,n(o),o>86400&&(o=86400),i=o):(i-=1,i===0&&e()),r=0},1e3).unref(),()=>{r+=1}}function $d(t){return t!==void 0&&(t.length===0||t==="?"||t==="<anonymous>")}function ei(t,e){return t===e||$d(t)&&$d(e)}function xr(t){if(t!==void 0)return t.slice(-10).reduce((e,n)=>`${e},${n.function},${n.lineno},${n.colno}`,"")}function zd(t,e){if(e!==void 0)return xr(t(e,1))}var jy="LyohIEBzZW50cnkvbm9kZSA4LjIwLjAgKGNkZDBhOTIpIHwgaHR0cHM6Ly9naXRodWIuY29tL2dldHNlbnRyeS9zZW50cnktamF2YXNjcmlwdCAqLwppbXBvcnR7U2Vzc2lvbiBhcyBlfWZyb20ibm9kZTppbnNwZWN0b3IvcHJvbWlzZXMiO2ltcG9ydHt3b3JrZXJEYXRhIGFzIG4scGFyZW50UG9ydCBhcyB0fWZyb20ibm9kZTp3b3JrZXJfdGhyZWFkcyI7aW1wb3J0e3Bvc2l4IGFzIG8sc2VwIGFzIHJ9ZnJvbSJub2RlOnBhdGgiO2NvbnN0IGk9NTAscz0iPyIsYz0vXChlcnJvcjogKC4qKVwpLyxhPS9jYXB0dXJlTWVzc2FnZXxjYXB0dXJlRXhjZXB0aW9uLztmdW5jdGlvbiB1KGUpe3JldHVybiBlW2UubGVuZ3RoLTFdfHx7fX1jb25zdCBmPS9eKFxTKzpcXHxcLz8pKFtcc1xTXSo/KSgoPzpcLnsxLDJ9fFteL1xcXSs/fCkoXC5bXi4vXFxdKnwpKSg/OlsvXFxdKikkLztmdW5jdGlvbiBsKGUpe2NvbnN0IG49ZnVuY3Rpb24oZSl7Y29uc3Qgbj1lLmxlbmd0aD4xMDI0P2A8dHJ1bmNhdGVkPiR7ZS5zbGljZSgtMTAyNCl9YDplLHQ9Zi5leGVjKG4pO3JldHVybiB0P3Quc2xpY2UoMSk6W119KGUpLHQ9blswXXx8IiI7bGV0IG89blsxXTtyZXR1cm4gdHx8bz8obyYmKG89by5zbGljZSgwLG8ubGVuZ3RoLTEpKSx0K28pOiIuIn1mdW5jdGlvbiBkKGUsbj0hMSl7cmV0dXJuIShufHxlJiYhZS5zdGFydHNXaXRoKCIvIikmJiFlLm1hdGNoKC9eW0EtWl06LykmJiFlLnN0YXJ0c1dpdGgoIi4iKSYmIWUubWF0Y2goL15bYS16QS1aXShbYS16QS1aMC05LlwtK10pKjpcL1wvLykpJiZ2b2lkIDAhPT1lJiYhZS5pbmNsdWRlcygibm9kZV9tb2R1bGVzLyIpfWZ1bmN0aW9uIHAoZSl7Y29uc3Qgbj0vXlxzKlstXXs0LH0kLyx0PS9hdCAoPzphc3luYyApPyg/OiguKz8pXHMrXCgpPyg/OiguKyk6KFxkKyk6KFxkKyk/fChbXildKykpXCk/LztyZXR1cm4gbz0+e2NvbnN0IHI9by5tYXRjaCh0KTtpZihyKXtsZXQgbix0LG8saSxjO2lmKHJbMV0pe289clsxXTtsZXQgZT1vLmxhc3RJbmRleE9mKCIuIik7aWYoIi4iPT09b1tlLTFdJiZlLS0sZT4wKXtuPW8uc2xpY2UoMCxlKSx0PW8uc2xpY2UoZSsxKTtjb25zdCByPW4uaW5kZXhPZigiLk1vZHVsZSIpO3I+MCYmKG89by5zbGljZShyKzEpLG49bi5zbGljZSgwLHIpKX1pPXZvaWQgMH10JiYoaT1uLGM9dCksIjxhbm9ueW1vdXM+Ij09PXQmJihjPXZvaWQgMCxvPXZvaWQgMCksdm9pZCAwPT09byYmKGM9Y3x8cyxvPWk/YCR7aX0uJHtjfWA6Yyk7bGV0IGE9clsyXSYmclsyXS5zdGFydHNXaXRoKCJmaWxlOi8vIik/clsyXS5zbGljZSg3KTpyWzJdO2NvbnN0IHU9Im5hdGl2ZSI9PT1yWzVdO3JldHVybiBhJiZhLm1hdGNoKC9cL1tBLVpdOi8pJiYoYT1hLnNsaWNlKDEpKSxhfHwhcls1XXx8dXx8KGE9cls1XSkse2ZpbGVuYW1lOmEsbW9kdWxlOmU/ZShhKTp2b2lkIDAsZnVuY3Rpb246byxsaW5lbm86ZyhyWzNdKSxjb2xubzpnKHJbNF0pLGluX2FwcDpkKGF8fCIiLHUpfX1pZihvLm1hdGNoKG4pKXJldHVybntmaWxlbmFtZTpvfX19ZnVuY3Rpb24gZyhlKXtyZXR1cm4gcGFyc2VJbnQoZXx8IiIsMTApfHx2b2lkIDB9ZnVuY3Rpb24gbShlKXtyZXR1cm4gZS5yZXBsYWNlKC9eW0EtWl06LywiIikucmVwbGFjZSgvXFwvZywiLyIpfWNvbnN0IGI9biwkPWZ1bmN0aW9uKC4uLmUpe2NvbnN0IG49ZS5zb3J0KCgoZSxuKT0+ZVswXS1uWzBdKSkubWFwKChlPT5lWzFdKSk7cmV0dXJuKGUsdD0wLG89MCk9Pntjb25zdCByPVtdLGY9ZS5zcGxpdCgiXG4iKTtmb3IobGV0IGU9dDtlPGYubGVuZ3RoO2UrKyl7Y29uc3QgdD1mW2VdO2lmKHQubGVuZ3RoPjEwMjQpY29udGludWU7Y29uc3Qgcz1jLnRlc3QodCk/dC5yZXBsYWNlKGMsIiQxIik6dDtpZighcy5tYXRjaCgvXFMqRXJyb3I6IC8pKXtmb3IoY29uc3QgZSBvZiBuKXtjb25zdCBuPWUocyk7aWYobil7ci5wdXNoKG4pO2JyZWFrfX1pZihyLmxlbmd0aD49aStvKWJyZWFrfX1yZXR1cm4gZnVuY3Rpb24oZSl7aWYoIWUubGVuZ3RoKXJldHVybltdO2NvbnN0IG49QXJyYXkuZnJvbShlKTsvc2VudHJ5V3JhcHBlZC8udGVzdCh1KG4pLmZ1bmN0aW9ufHwiIikmJm4ucG9wKCk7bi5yZXZlcnNlKCksYS50ZXN0KHUobikuZnVuY3Rpb258fCIiKSYmKG4ucG9wKCksYS50ZXN0KHUobikuZnVuY3Rpb258fCIiKSYmbi5wb3AoKSk7cmV0dXJuIG4uc2xpY2UoMCxpKS5tYXAoKGU9Pih7Li4uZSxmaWxlbmFtZTplLmZpbGVuYW1lfHx1KG4pLmZpbGVuYW1lLGZ1bmN0aW9uOmUuZnVuY3Rpb258fHN9KSkpfShyLnNsaWNlKG8pKX19KFs5MCxwKGZ1bmN0aW9uKGU9KHByb2Nlc3MuYXJndlsxXT9sKHByb2Nlc3MuYXJndlsxXSk6cHJvY2Vzcy5jd2QoKSksbj0iXFwiPT09cil7Y29uc3QgdD1uP20oZSk6ZTtyZXR1cm4gZT0+e2lmKCFlKXJldHVybjtjb25zdCByPW4/bShlKTplO2xldHtkaXI6aSxiYXNlOnMsZXh0OmN9PW8ucGFyc2Uocik7Ii5qcyIhPT1jJiYiLm1qcyIhPT1jJiYiLmNqcyIhPT1jfHwocz1zLnNsaWNlKDAsLTEqYy5sZW5ndGgpKSxpfHwoaT0iLiIpO2NvbnN0IGE9aS5sYXN0SW5kZXhPZigiL25vZGVfbW9kdWxlcyIpO2lmKGE+LTEpcmV0dXJuYCR7aS5zbGljZShhKzE0KS5yZXBsYWNlKC9cLy9nLCIuIil9OiR7c31gO2lmKGkuc3RhcnRzV2l0aCh0KSl7bGV0IGU9aS5zbGljZSh0Lmxlbmd0aCsxKS5yZXBsYWNlKC9cLy9nLCIuIik7cmV0dXJuIGUmJihlKz0iOiIpLGUrPXMsZX1yZXR1cm4gc319KGIuYmFzZVBhdGgpKV0pO2Z1bmN0aW9uIHYoLi4uZSl7Yi5kZWJ1ZyYmY29uc29sZS5sb2coIltMb2NhbFZhcmlhYmxlcyBXb3JrZXJdIiwuLi5lKX1hc3luYyBmdW5jdGlvbiB3KGUsbix0LG8pe2NvbnN0IHI9YXdhaXQgZS5wb3N0KCJSdW50aW1lLmdldFByb3BlcnRpZXMiLHtvYmplY3RJZDpuLG93blByb3BlcnRpZXM6ITB9KTtvW3RdPXIucmVzdWx0LmZpbHRlcigoZT0+Imxlbmd0aCIhPT1lLm5hbWUmJiFpc05hTihwYXJzZUludChlLm5hbWUsMTApKSkpLnNvcnQoKChlLG4pPT5wYXJzZUludChlLm5hbWUsMTApLXBhcnNlSW50KG4ubmFtZSwxMCkpKS5tYXAoKGU9PmUudmFsdWU/LnZhbHVlKSl9YXN5bmMgZnVuY3Rpb24geShlLG4sdCxvKXtjb25zdCByPWF3YWl0IGUucG9zdCgiUnVudGltZS5nZXRQcm9wZXJ0aWVzIix7b2JqZWN0SWQ6bixvd25Qcm9wZXJ0aWVzOiEwfSk7b1t0XT1yLnJlc3VsdC5tYXAoKGU9PltlLm5hbWUsZS52YWx1ZT8udmFsdWVdKSkucmVkdWNlKCgoZSxbbix0XSk9PihlW25dPXQsZSkpLHt9KX1mdW5jdGlvbiBoKGUsbil7ZS52YWx1ZSYmKCJ2YWx1ZSJpbiBlLnZhbHVlP3ZvaWQgMD09PWUudmFsdWUudmFsdWV8fG51bGw9PT1lLnZhbHVlLnZhbHVlP25bZS5uYW1lXT1gPCR7ZS52YWx1ZS52YWx1ZX0+YDpuW2UubmFtZV09ZS52YWx1ZS52YWx1ZToiZGVzY3JpcHRpb24iaW4gZS52YWx1ZSYmImZ1bmN0aW9uIiE9PWUudmFsdWUudHlwZT9uW2UubmFtZV09YDwke2UudmFsdWUuZGVzY3JpcHRpb259PmA6InVuZGVmaW5lZCI9PT1lLnZhbHVlLnR5cGUmJihuW2UubmFtZV09Ijx1bmRlZmluZWQ+IikpfWFzeW5jIGZ1bmN0aW9uIFAoZSxuKXtjb25zdCB0PWF3YWl0IGUucG9zdCgiUnVudGltZS5nZXRQcm9wZXJ0aWVzIix7b2JqZWN0SWQ6bixvd25Qcm9wZXJ0aWVzOiEwfSksbz17fTtmb3IoY29uc3QgbiBvZiB0LnJlc3VsdClpZihuPy52YWx1ZT8ub2JqZWN0SWQmJiJBcnJheSI9PT1uPy52YWx1ZS5jbGFzc05hbWUpe2NvbnN0IHQ9bi52YWx1ZS5vYmplY3RJZDthd2FpdCB3KGUsdCxuLm5hbWUsbyl9ZWxzZSBpZihuPy52YWx1ZT8ub2JqZWN0SWQmJiJPYmplY3QiPT09bj8udmFsdWU/LmNsYXNzTmFtZSl7Y29uc3QgdD1uLnZhbHVlLm9iamVjdElkO2F3YWl0IHkoZSx0LG4ubmFtZSxvKX1lbHNlIG4/LnZhbHVlJiZoKG4sbyk7cmV0dXJuIG99bGV0IHg7KGFzeW5jIGZ1bmN0aW9uKCl7Y29uc3Qgbj1uZXcgZTtuLmNvbm5lY3RUb01haW5UaHJlYWQoKSx2KCJDb25uZWN0ZWQgdG8gbWFpbiB0aHJlYWQiKTtsZXQgbz0hMTtuLm9uKCJEZWJ1Z2dlci5yZXN1bWVkIiwoKCk9PntvPSExfSkpLG4ub24oIkRlYnVnZ2VyLnBhdXNlZCIsKGU9PntvPSEwLGFzeW5jIGZ1bmN0aW9uKGUsbix7cmVhc29uOm8sZGF0YTpyLGNhbGxGcmFtZXM6aX0pe2lmKCJleGNlcHRpb24iIT09byYmInByb21pc2VSZWplY3Rpb24iIT09bylyZXR1cm47eD8uKCk7Y29uc3Qgcz1mdW5jdGlvbihlLG4pe2lmKHZvaWQgMCE9PW4pcmV0dXJuIGZ1bmN0aW9uKGUpe2lmKHZvaWQgMCE9PWUpcmV0dXJuIGUuc2xpY2UoLTEwKS5yZWR1Y2UoKChlLG4pPT5gJHtlfSwke24uZnVuY3Rpb259LCR7bi5saW5lbm99LCR7bi5jb2xub31gKSwiIil9KGUobiwxKSl9KG4scj8uZGVzY3JpcHRpb24pO2lmKG51bGw9PXMpcmV0dXJuO2NvbnN0IGM9W107Zm9yKGxldCBuPTA7bjxpLmxlbmd0aDtuKyspe2NvbnN0e3Njb3BlQ2hhaW46dCxmdW5jdGlvbk5hbWU6byx0aGlzOnJ9PWlbbl0scz10LmZpbmQoKGU9PiJsb2NhbCI9PT1lLnR5cGUpKSxhPSJnbG9iYWwiIT09ci5jbGFzc05hbWUmJnIuY2xhc3NOYW1lP2Ake3IuY2xhc3NOYW1lfS4ke299YDpvO2lmKHZvaWQgMD09PXM/Lm9iamVjdC5vYmplY3RJZCljW25dPXtmdW5jdGlvbjphfTtlbHNle2NvbnN0IHQ9YXdhaXQgUChlLHMub2JqZWN0Lm9iamVjdElkKTtjW25dPXtmdW5jdGlvbjphLHZhcnM6dH19fXQ/LnBvc3RNZXNzYWdlKHtleGNlcHRpb25IYXNoOnMsZnJhbWVzOmN9KX0obiwkLGUucGFyYW1zKS50aGVuKCgoKT0+bz9uLnBvc3QoIkRlYnVnZ2VyLnJlc3VtZSIpOlByb21pc2UucmVzb2x2ZSgpKSwoZT0+e30pKX0pKSxhd2FpdCBuLnBvc3QoIkRlYnVnZ2VyLmVuYWJsZSIpO2NvbnN0IHI9ITEhPT1iLmNhcHR1cmVBbGxFeGNlcHRpb25zO2lmKGF3YWl0IG4ucG9zdCgiRGVidWdnZXIuc2V0UGF1c2VPbkV4Y2VwdGlvbnMiLHtzdGF0ZTpyPyJhbGwiOiJ1bmNhdWdodCJ9KSxyKXtjb25zdCBlPWIubWF4RXhjZXB0aW9uc1BlclNlY29uZHx8NTA7eD1mdW5jdGlvbihlLG4sdCl7bGV0IG89MCxyPTUsaT0wO3JldHVybiBzZXRJbnRlcnZhbCgoKCk9PnswPT09aT9vPmUmJihyKj0yLHQocikscj44NjQwMCYmKHI9ODY0MDApLGk9cik6KGktPTEsMD09PWkmJm4oKSksbz0wfSksMWUzKS51bnJlZigpLCgpPT57bys9MX19KGUsKGFzeW5jKCk9Pnt2KCJSYXRlLWxpbWl0IGxpZnRlZC4iKSxhd2FpdCBuLnBvc3QoIkRlYnVnZ2VyLnNldFBhdXNlT25FeGNlcHRpb25zIix7c3RhdGU6ImFsbCJ9KX0pLChhc3luYyBlPT57dihgUmF0ZS1saW1pdCBleGNlZWRlZC4gRGlzYWJsaW5nIGNhcHR1cmluZyBvZiBjYXVnaHQgZXhjZXB0aW9ucyBmb3IgJHtlfSBzZWNvbmRzLmApLGF3YWl0IG4ucG9zdCgiRGVidWdnZXIuc2V0UGF1c2VPbkV4Y2VwdGlvbnMiLHtzdGF0ZToidW5jYXVnaHQifSl9KSl9fSkoKS5jYXRjaCgoZT0+e3YoIkZhaWxlZCB0byBzdGFydCBkZWJ1Z2dlciIsZSl9KSksc2V0SW50ZXJ2YWwoKCgpPT57fSksMWU0KTs=";function Jd(...t){U.log("[LocalVariables]",...t)}var Qd=(t={})=>{let e=new Pt(20);function n(s){let a=xr(O([s,"optionalAccess",p=>p.stacktrace,"optionalAccess",p=>p.frames]));if(a===void 0)return;let u=e.remove(a);if(u===void 0)return;let l=(O([s,"access",p=>p.stacktrace,"optionalAccess",p=>p.frames])||[]).filter(p=>p.function!=="new Promise");for(let p=0;p<l.length;p++){let d=l.length-p-1,m=u[p],h=l[d];if(!h||!m)break;m.vars===void 0||h.in_app===!1||!ei(h.function,m.function)||(h.vars=m.vars)}}function r(s){for(let a of O([s,"access",u=>u.exception,"optionalAccess",u=>u.values])||[])n(a);return s}async function o(){let s=await import("node:inspector");s.url()||s.open(0)}function i(s){let a=new Hy(new URL(`data:application/javascript;base64,${jy}`),{workerData:s,execArgv:[]});process.on("exit",()=>{a.terminate()}),a.on("message",({exceptionHash:u,frames:l})=>{e.set(u,l)}),a.once("error",u=>{Jd("Worker error",u)}),a.once("exit",u=>{Jd("Worker exit",u)}),a.unref()}return{name:"LocalVariablesAsync",setup(s){if(!s.getOptions().includeLocalVariables)return;let u={...t,debug:U.isEnabled()};o().then(()=>{try{i(u)}catch(l){U.error("Failed to start worker",l)}},l=>{U.error("Failed to start inspector",l)})},processEvent(s){return r(s)}}};c();function ef(t){let e=[],n=!1;function r(s){e=[],!n&&(n=!0,t(s))}e.push(r);function o(s){e.push(s)}function i(s){let a=e.pop()||r;try{a(s)}catch{r(s)}}return{add:o,next:i}}var ba=class t{constructor(e){this._session=e}static async create(e){if(e)return e;let n=await import("node:inspector");return new t(new n.Session)}configureAndConnect(e,n){this._session.connect(),this._session.on("Debugger.paused",r=>{e(r,()=>{this._session.post("Debugger.resume")})}),this._session.post("Debugger.enable"),this._session.post("Debugger.setPauseOnExceptions",{state:n?"all":"uncaught"})}setPauseOnExceptions(e){this._session.post("Debugger.setPauseOnExceptions",{state:e?"all":"uncaught"})}getLocalVariables(e,n){this._getProperties(e,r=>{let{add:o,next:i}=ef(n);for(let s of r)if(O([s,"optionalAccess",a=>a.value,"optionalAccess",a=>a.objectId])&&O([s,"optionalAccess",a=>a.value,"access",a=>a.className])==="Array"){let a=s.value.objectId;o(u=>this._unrollArray(a,s.name,u,i))}else if(O([s,"optionalAccess",a=>a.value,"optionalAccess",a=>a.objectId])&&O([s,"optionalAccess",a=>a.value,"optionalAccess",a=>a.className])==="Object"){let a=s.value.objectId;o(u=>this._unrollObject(a,s.name,u,i))}else O([s,"optionalAccess",a=>a.value])&&o(a=>this._unrollOther(s,a,i));i({})})}_getProperties(e,n){this._session.post("Runtime.getProperties",{objectId:e,ownProperties:!0},(r,o)=>{n(r?[]:o.result)})}_unrollArray(e,n,r,o){this._getProperties(e,i=>{r[n]=i.filter(s=>s.name!=="length"&&!isNaN(parseInt(s.name,10))).sort((s,a)=>parseInt(s.name,10)-parseInt(a.name,10)).map(s=>O([s,"optionalAccess",a=>a.value,"optionalAccess",a=>a.value])),o(r)})}_unrollObject(e,n,r,o){this._getProperties(e,i=>{r[n]=i.map(s=>[s.name,O([s,"optionalAccess",a=>a.value,"optionalAccess",a=>a.value])]).reduce((s,[a,u])=>(s[a]=u,s),{}),o(r)})}_unrollOther(e,n,r){e.value&&("value"in e.value?e.value.value===void 0||e.value.value===null?n[e.name]=`<${e.value.value}>`:n[e.name]=e.value.value:"description"in e.value&&e.value.type!=="function"?n[e.name]=`<${e.value.description}>`:e.value.type==="undefined"&&(n[e.name]="<undefined>")),r(n)}},By="LocalVariables",qy=(t={},e)=>{let n=new Pt(20),r,o=!1;function i(a){let u=xr(O([a,"optionalAccess",d=>d.stacktrace,"optionalAccess",d=>d.frames]));if(u===void 0)return;let l=n.remove(u);if(l===void 0)return;let p=(O([a,"access",d=>d.stacktrace,"optionalAccess",d=>d.frames])||[]).filter(d=>d.function!=="new Promise");for(let d=0;d<p.length;d++){let m=p.length-d-1,h=l[d],_=p[m];if(!_||!h)break;h.vars===void 0||_.in_app===!1||!ei(_.function,h.function)||(_.vars=h.vars)}}function s(a){for(let u of O([a,"optionalAccess",l=>l.exception,"optionalAccess",l=>l.values])||[])i(u);return a}return{name:By,setupOnce(){let a=ie(),u=O([a,"optionalAccess",p=>p.getOptions,"call",p=>p()]);if(!O([u,"optionalAccess",p=>p.includeLocalVariables]))return;if(Qo<18){U.log("The `LocalVariables` integration is only supported on Node >= v18.");return}ba.create(e).then(p=>{function d(h,{params:{reason:_,data:T,callFrames:R}},M){if(_!=="exception"&&_!=="promiseRejection"){M();return}O([r,"optionalCall",w=>w()]);let C=zd(h,O([T,"optionalAccess",w=>w.description]));if(C==null){M();return}let{add:A,next:P}=ef(w=>{n.set(C,w),M()});for(let w=0;w<Math.min(R.length,5);w++){let{scopeChain:W,functionName:x,this:q}=R[w],j=W.find(v=>v.type==="local"),me=q.className==="global"||!q.className?x:`${q.className}.${x}`;if(O([j,"optionalAccess",v=>v.object,"access",v=>v.objectId])===void 0)A(v=>{v[w]={function:me},P(v)});else{let v=j.object.objectId;A(D=>O([p,"optionalAccess",X=>X.getLocalVariables,"call",X=>X(v,H=>{D[w]={function:me,vars:H},P(D)})]))}}P([])}let m=t.captureAllExceptions!==!1;if(p.configureAndConnect((h,_)=>d(u.stackParser,h,_),m),m){let h=t.maxExceptionsPerSecond||50;r=Zd(h,()=>{U.log("Local variables rate-limit lifted."),O([p,"optionalAccess",_=>_.setPauseOnExceptions,"call",_=>_(!0)])},_=>{U.log(`Local variables rate-limit exceeded. Disabling capturing of caught exceptions for ${_} seconds.`),O([p,"optionalAccess",T=>T.setPauseOnExceptions,"call",T=>T(!1)])})}o=!0},p=>{U.log("The `LocalVariables` integration failed to start.",p)})},processEvent(a){return o?s(a):a},_getCachedFramesCount(){return n.size},_getFirstCachedFrame(){return n.values()[0]}}},tf=qy;var nf=(t={})=>Aa.major<19?tf(t):Qd(t);c();import{existsSync as Wy,readFileSync as Vy}from"node:fs";import{dirname as Ky,join as Yy}from"node:path";var Ca,Xy="Modules",$y=()=>({name:Xy,processEvent(t){return t.modules={...t.modules,...Jy()},t}}),rf=$y;function Zy(){try{return B.cache?Object.keys(B.cache):[]}catch{return[]}}function zy(){let t=B.main&&B.main.paths||[],e=Zy(),n={},r={};return e.forEach(o=>{let i=o,s=()=>{let a=i;if(i=Ky(a),!i||a===i||r[a])return;if(t.indexOf(i)<0)return s();let u=Yy(a,"package.json");if(r[a]=!0,!Wy(u))return s();try{let l=JSON.parse(Vy(u,"utf8"));n[l.name]=l.version}catch{}};s()}),n}function Jy(){return Ca||(Ca=zy()),Ca}c();c();var Qy=2e3;function Lr(t){on(()=>{console.error(t)});let e=ie();if(e===void 0){oe&&U.warn("No NodeClient was defined, we are exiting the process now."),global.process.exit(1);return}let n=e.getOptions(),r=n&&n.shutdownTimeout&&n.shutdownTimeout>0&&n.shutdownTimeout||Qy;e.close(r).then(o=>{o||oe&&U.warn("We reached the timeout for emptying the request buffer, still exiting now!"),global.process.exit(1)},o=>{oe&&U.error(o)})}var ev="OnUncaughtException",of=(t={})=>{let e={exitEvenIfOtherHandlersAreRegistered:!1,...t};return{name:ev,setup(n){global.process.on("uncaughtException",tv(n,e))}}};function tv(t,e){let r=!1,o=!1,i=!1,s,a=t.getOptions();return Object.assign(u=>{let l=Lr;e.onFatalError?l=e.onFatalError:a.onFatalError&&(l=a.onFatalError);let d=global.process.listeners("uncaughtException").filter(h=>h.name!=="domainUncaughtExceptionClear"&&h.tag!=="sentry_tracingErrorCallback"&&h._errorHandler!==!0).length===0,m=e.exitEvenIfOtherHandlersAreRegistered||d;r?m&&(i?(oe&&U.warn("uncaught exception after calling fatal error shutdown callback - this is bad! forcing shutdown"),Lr(u)):o||(o=!0,setTimeout(()=>{i||(i=!0,l(s,u))},2e3))):(s=u,r=!0,ie()===t&&Mt(u,{originalException:u,captureContext:{level:"fatal"},mechanism:{handled:!1,type:"onuncaughtexception"}}),!i&&m&&(i=!0,l(u)))},{_errorHandler:!0})}c();var nv="OnUnhandledRejection",rv=(t={})=>{let e=t.mode||"warn";return{name:nv,setup(n){global.process.on("unhandledRejection",ov(n,{mode:e}))}}},sf=rv;function ov(t,e){return function(r,o){ie()===t&&(Mt(r,{originalException:o,captureContext:{extra:{unhandledPromiseRejection:!0}},mechanism:{handled:!1,type:"onunhandledrejection"}}),iv(r,e))}}function iv(t,e){let n="This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:";e.mode==="warn"?on(()=>{console.warn(n),console.error(t&&t.stack?t.stack:t)}):e.mode==="strict"&&(on(()=>{console.warn(n)}),Lr(t))}c();var Sf=k(gf(),1);c();var Ef={};function V(t,e){return Object.assign(n=>{let r=Ef[t];if(r){n&&r.setConfig(n);return}let o=e(n);Ef[t]=o,An(o)},{id:t})}c();function Tf(){return typeof B<"u"}var yf="Express",vf=V(yf,()=>new Sf.ExpressInstrumentation({requestHook(t){Te(t,"auto.http.otel.express");let e=we(t).data||{},n=e["express.type"];n&&t.setAttribute(We,`${n}.express`);let r=e["express.name"];typeof r=="string"&&t.updateName(r)},spanNameHook(t,e){if(Le()===rr())return oe&&U.warn("Isolation scope is still default isolation scope - skipping setting transactionName"),e;if(t.layerType==="request_handler"){let n=t.request,r=n.method?n.method.toUpperCase():"GET";Le().setTransactionName(`${r} ${t.route}`)}return e}})),_v=()=>({name:yf,setupOnce(){vf()}}),Af=_v;c();var Lf=k(xf(),1);var wf="Fastify",Ff=V(wf,()=>new Lf.FastifyInstrumentation({requestHook(t){Iv(t)}})),Rv=()=>({name:wf,setupOnce(){Ff()}}),Df=Rv;function Iv(t){let e=we(t).data||{},n=e["fastify.type"];if(e[We]||!n)return;t.setAttributes({[ze]:"auto.http.otel.fastify",[We]:`${n}.fastify`});let r=e["fastify.name"]||e["plugin.name"]||e["hook.name"];typeof r=="string"&&t.updateName(r.replace(/^fastify -> /,""))}c();var om=k(rm(),1);var im="Graphql",sm=V(im,(t={})=>{let e={ignoreResolveSpans:!0,ignoreTrivialResolveSpans:!0,...t};return new om.GraphQLInstrumentation({...e,responseHook(n){Te(n,"auto.graphql.otel.graphql")}})}),Kv=(t={})=>({name:im,setupOnce(){sm(t)}}),am=Kv;c();var hm=k(mm(),1);var _m="Mongo",gm=V(_m,()=>new hm.MongoDBInstrumentation({responseHook(t){Te(t,"auto.db.otel.mongo")}})),Zv=()=>({name:_m,setupOnce(){gm()}}),Em=Zv;c();var Mm=k(Nm(),1);var xm="Mongoose",Lm=V(xm,()=>new Mm.MongooseInstrumentation({responseHook(t){Te(t,"auto.db.otel.mongoose")}})),rA=()=>({name:xm,setupOnce(){Lm()}}),wm=rA;c();var Vm=k(Wm(),1);var Km="Mysql",Ym=V(Km,()=>new Vm.MySQLInstrumentation({})),fA=()=>({name:Km,setupOnce(){Ym()}}),Xm=fA;c();var sh=k(ih(),1);var ah="Mysql2",ch=V(ah,()=>new sh.MySQL2Instrumentation({responseHook(t){Te(t,"auto.db.otel.mysql2")}})),OA=()=>({name:ah,setupOnce(){ch()}}),uh=OA;c();var xh=k(Eh(),1),Lh=k(Ih(),1);c();var GA=["get","set","setex"],za=["get","mget"],UA=["set","setex"];function Xr(t,e){return t.includes(e.toLowerCase())}function Ja(t){return Xr(za,t)?"cache.get":Xr(UA,t)?"cache.put":void 0}function HA(t,e){return e.some(n=>t.startsWith(n))}function Ph(t,e){try{if(e.length===0)return;let n=o=>typeof o=="string"||typeof o=="number"||Buffer.isBuffer(o)?[o.toString()]:Array.isArray(o)?zi(o.map(i=>n(i))):["<unknown>"],r=e[0];return Xr(GA,t)&&r!=null?n(r):zi(e.map(o=>n(o)))}catch{return}}function Nh(t,e,n){if(!Ja(t))return!1;for(let r of e)if(HA(r,n))return!0;return!1}function Mh(t){let e=n=>{try{return Buffer.isBuffer(n)?n.byteLength:typeof n=="string"?n.length:typeof n=="number"?n.toString().length:n==null?0:JSON.stringify(n).length}catch{return}};return Array.isArray(t)?t.reduce((n,r)=>{let o=e(r);return typeof o=="number"?n!==void 0?n+o:o:n},0):e(t)}var wh="Redis",Qa={},Fh=(t,e,n,r)=>{t.setAttribute(ze,"auto.db.otel.redis");let o=Ph(e,n),i=Ja(e);if(!o||!i||!O([Qa,"optionalAccess",p=>p.cachePrefixes])||!Nh(e,o,Qa.cachePrefixes))return;let s=O([we,"call",p=>p(t),"access",p=>p.data,"optionalAccess",p=>p["net.peer.name"]]),a=O([we,"call",p=>p(t),"access",p=>p.data,"optionalAccess",p=>p["net.peer.port"]]);a&&s&&t.setAttributes({"network.peer.address":s,"network.peer.port":a});let u=Mh(r);u&&t.setAttribute(su,u),Xr(za,e)&&u!==void 0&&t.setAttribute(ou,u>0),t.setAttributes({[We]:i,[iu]:o});let l=o.join(", ");t.updateName(Hc(l,1024))},jA=V("IORedis",()=>new xh.IORedisInstrumentation({responseHook:Fh})),BA=V("Redis-4",()=>new Lh.RedisInstrumentation({responseHook:Fh})),Dh=Object.assign(()=>{jA(),BA()},{id:wh}),qA=(t={})=>({name:wh,setupOnce(){Qa=t,Dh()}}),kh=qA;c();var Vh=k(Wh(),1);var Kh="Nest",Yh=V(Kh,()=>new Vh.NestInstrumentation),JA=()=>({name:Kh,setupOnce(){Yh()}}),Xh=JA;c();var l_=k(u_(),1);var p_="Postgres",d_=V(p_,()=>new l_.PgInstrumentation({requireParentSpan:!0,requestHook(t){Te(t,"auto.db.otel.postgres")}})),dO=()=>({name:p_,setupOnce(){d_()}}),f_=dO;c();var y_=k(S_(),1);var v_="Hapi",A_=V(v_,()=>new y_.HapiInstrumentation),AO=()=>({name:v_,setupOnce(){A_()}}),O_=AO;c();var D_=k(F_(),1);ne();var k_="Koa",G_=V(k_,()=>new D_.KoaInstrumentation({requestHook(t,e){if(MO(t),Le()===rr()){oe&&U.warn("Isolation scope is default isolation scope - skipping setting transactionName");return}let n=we(t).data,r=n&&n[zc],o=O([e,"optionalAccess",i=>i.context,"optionalAccess",i=>i.request,"optionalAccess",i=>i.method,"optionalAccess",i=>i.toUpperCase,"call",i=>i()])||"GET";r&&Le().setTransactionName(`${o} ${r}`)}})),NO=()=>({name:k_,setupOnce(){G_()}}),U_=NO;function MO(t){t.setAttribute(ze,"auto.http.otel.koa");let e=we(t).data||{},n=e["koa.type"];n&&t.setAttribute(We,`${n}.koa`);let r=e["koa.name"];typeof r=="string"&&t.updateName(r||"< unknown >")}c();var X_=k(Y_(),1);var $_="Connect",Z_=V($_,()=>new X_.ConnectInstrumentation),BO=()=>({name:$_,setupOnce(){Z_()}}),z_=BO;c();c();function J_(){return[Af(),Df(),am(),Em(),wm(),Xm(),uh(),kh(),f_(),Xh(),O_(),U_(),z_()]}c();import*as WO from"node:http";import*as VO from"node:https";import{Readable as KO}from"node:stream";import{createGzip as YO}from"node:zlib";c();import*as Ct from"node:net";import*as Tc from"node:tls";c();import*as Ec from"node:http";var st=Symbol("AgentBaseInternalState"),Gi=class extends Ec.Agent{constructor(e){super(e),this[st]={}}isSecureEndpoint(e){if(e){if(typeof e.secureEndpoint=="boolean")return e.secureEndpoint;if(typeof e.protocol=="string")return e.protocol==="https:"}let{stack:n}=new Error;return typeof n!="string"?!1:n.split(`
|
|
31
|
+
`).some(r=>r.indexOf("(https.js:")!==-1||r.indexOf("node:https:")!==-1)}createSocket(e,n,r){let o={...n,secureEndpoint:this.isSecureEndpoint(n)};Promise.resolve().then(()=>this.connect(e,o)).then(i=>{if(i instanceof Ec.Agent)return i.addRequest(e,o);this[st].currentSocket=i,super.createSocket(e,n,r)},r)}createConnection(){let e=this[st].currentSocket;if(this[st].currentSocket=void 0,!e)throw new Error("No socket was returned in the `connect()` function");return e}get defaultPort(){return qe(this[st].defaultPort,()=>this.protocol==="https:"?443:80)}set defaultPort(e){this[st]&&(this[st].defaultPort=e)}get protocol(){return qe(this[st].protocol,()=>this.isSecureEndpoint()?"https:":"http:")}set protocol(e){this[st]&&(this[st].protocol=e)}};c();function Ui(...t){U.log("[https-proxy-agent:parse-proxy-response]",...t)}function Q_(t){return new Promise((e,n)=>{let r=0,o=[];function i(){let p=t.read();p?l(p):t.once("readable",i)}function s(){t.removeListener("end",a),t.removeListener("error",u),t.removeListener("readable",i)}function a(){s(),Ui("onend"),n(new Error("Proxy connection ended before receiving CONNECT response"))}function u(p){s(),Ui("onerror %o",p),n(p)}function l(p){o.push(p),r+=p.length;let d=Buffer.concat(o,r),m=d.indexOf(`\r
|
|
32
|
+
\r
|
|
33
|
+
`);if(m===-1){Ui("have not received end of HTTP headers yet..."),i();return}let h=d.slice(0,m).toString("ascii").split(`\r
|
|
34
|
+
`),_=h.shift();if(!_)return t.destroy(),n(new Error("No header received from proxy CONNECT response"));let T=_.split(" "),R=+(T[1]||0),M=T.slice(2).join(" "),C={};for(let A of h){if(!A)continue;let P=A.indexOf(":");if(P===-1)return t.destroy(),n(new Error(`Invalid header from proxy CONNECT response: "${A}"`));let w=A.slice(0,P).toLowerCase(),W=A.slice(P+1).trimStart(),x=C[w];typeof x=="string"?C[w]=[x,W]:Array.isArray(x)?x.push(W):C[w]=W}Ui("got proxy server response: %o %o",_,C),s(),e({connect:{statusCode:R,statusText:M,headers:C},buffered:d})}t.on("error",u),t.on("end",a),i()})}function so(...t){U.log("[https-proxy-agent]",...t)}var ao=class extends Gi{static __initStatic(){this.protocols=["http","https"]}constructor(e,n){super(n),this.options={},this.proxy=typeof e=="string"?new URL(e):e,this.proxyHeaders=qe(O([n,"optionalAccess",i=>i.headers]),()=>({})),so("Creating new HttpsProxyAgent instance: %o",this.proxy.href);let r=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),o=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol==="https:"?443:80;this.connectOpts={ALPNProtocols:["http/1.1"],...n?eg(n,"headers"):null,host:r,port:o}}async connect(e,n){let{proxy:r}=this;if(!n.host)throw new TypeError('No "host" provided');let o;if(r.protocol==="https:"){so("Creating `tls.Socket`: %o",this.connectOpts);let m=this.connectOpts.servername||this.connectOpts.host;o=Tc.connect({...this.connectOpts,servername:m&&Ct.isIP(m)?void 0:m})}else so("Creating `net.Socket`: %o",this.connectOpts),o=Ct.connect(this.connectOpts);let i=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders},s=Ct.isIPv6(n.host)?`[${n.host}]`:n.host,a=`CONNECT ${s}:${n.port} HTTP/1.1\r
|
|
35
|
+
`;if(r.username||r.password){let m=`${decodeURIComponent(r.username)}:${decodeURIComponent(r.password)}`;i["Proxy-Authorization"]=`Basic ${Buffer.from(m).toString("base64")}`}i.Host=`${s}:${n.port}`,i["Proxy-Connection"]||(i["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let m of Object.keys(i))a+=`${m}: ${i[m]}\r
|
|
36
|
+
`;let u=Q_(o);o.write(`${a}\r
|
|
37
|
+
`);let{connect:l,buffered:p}=await u;if(e.emit("proxyConnect",l),this.emit("proxyConnect",l,e),l.statusCode===200){if(e.once("socket",qO),n.secureEndpoint){so("Upgrading socket connection to TLS");let m=n.servername||n.host;return Tc.connect({...eg(n,"host","path","port"),socket:o,servername:Ct.isIP(m)?void 0:m})}return o}o.destroy();let d=new Ct.Socket({writable:!1});return d.readable=!0,e.once("socket",m=>{so("Replaying proxy buffer for failed request"),m.push(p),m.push(null)}),d}};ao.__initStatic();function qO(t){t.resume()}function eg(t,...e){let n={},r;for(r in t)e.includes(r)||(n[r]=t[r]);return n}var XO=1024*32;function $O(t){return new KO({read(){this.push(t),this.push(null)}})}function Hi(t){let e;try{e=new URL(t.url)}catch{return on(()=>{console.warn("[@sentry/node]: Invalid dsn or tunnel option, will not send any events. The tunnel option must be a full URL when used.")}),Ao(t,()=>Promise.resolve({}))}let n=e.protocol==="https:",r=ZO(e,t.proxy||(n?process.env.https_proxy:void 0)||process.env.http_proxy),o=n?VO:WO,i=t.keepAlive===void 0?!1:t.keepAlive,s=r?new ao(r):new o.Agent({keepAlive:i,maxSockets:30,timeout:2e3});return au(()=>{let a=zO(t,qe(t.httpModule,()=>o),s);return Ao(t,a)})}function ZO(t,e){let{no_proxy:n}=process.env;if(!(n&&n.split(",").some(o=>t.host.endsWith(o)||t.hostname.endsWith(o))))return e}function zO(t,e,n){let{hostname:r,pathname:o,port:i,protocol:s,search:a}=new URL(t.url);return function(l){return new Promise((p,d)=>{let m=$O(l.body),h={...t.headers};l.body.length>XO&&(h["content-encoding"]="gzip",m=m.pipe(YO()));let _=e.request({method:"POST",agent:n,headers:h,hostname:r,path:`${o}${a}`,port:i,protocol:s,ca:t.caCerts},T=>{T.on("data",()=>{}),T.on("end",()=>{}),T.setEncoding("utf8");let R=qe(T.headers["retry-after"],()=>null),M=qe(T.headers["x-sentry-rate-limits"],()=>null);p({statusCode:T.statusCode,headers:{"retry-after":R,"x-sentry-rate-limits":Array.isArray(M)?M[0]||null:M}})});_.on("error",d),m.pipe(_)})}}c();c();import{posix as JO,sep as QO}from"node:path";function tg(t){return t.replace(/^[A-Z]:/,"").replace(/\\/g,"/")}function ng(t=process.argv[1]?Vc(process.argv[1]):process.cwd(),e=QO==="\\"){let n=e?tg(t):t;return r=>{if(!r)return;let o=e?tg(r):r,{dir:i,base:s,ext:a}=JO.parse(o);(a===".js"||a===".mjs"||a===".cjs")&&(s=s.slice(0,a.length*-1)),i||(i=".");let u=i.lastIndexOf("/node_modules");if(u>-1)return`${i.slice(u+14).replace(/\//g,".")}:${s}`;if(i.startsWith(n)){let l=i.slice(n.length+1).replace(/\//g,".");return l&&(l+=":"),l+=s,l}return s}}var ji=Bc(Yc(ng()));c();F();import*as rg from"node:os";import{isMainThread as eb,threadId as tb}from"worker_threads";var nb=6e4,co=class extends cu{constructor(e){let n={...e,platform:"node",runtime:{name:"node",version:global.process.version},serverName:e.serverName||global.process.env.SENTRY_NAME||rg.hostname()};uu(n,"node"),U.log(`Initializing Sentry: process: ${process.pid}, thread: ${eb?"main":`worker-${tb}`}.`),super(n)}get tracer(){if(this._tracer)return this._tracer;let e="@sentry/node",n=yo,r=ye.getTracer(e,n);return this._tracer=r,r}async flush(e){let n=this.traceProvider,r=O([n,"optionalAccess",o=>o.activeSpanProcessor]);return r&&await r.forceFlush(),this.getOptions().sendClientReports&&this._flushOutcomes(),super.flush(e)}close(e){return this._clientReportInterval&&clearInterval(this._clientReportInterval),this._clientReportOnExitFlushListener&&process.off("beforeExit",this._clientReportOnExitFlushListener),super.close(e)}startClientReportTracking(){let e=this.getOptions();e.sendClientReports&&(this._clientReportOnExitFlushListener=()=>{this._flushOutcomes()},this._clientReportInterval=setInterval(()=>{oe&&U.log("Flushing client reports based on interval."),this._flushOutcomes()},qe(e.clientReportFlushInterval,()=>nb)).unref(),process.on("beforeExit",this._clientReportOnExitFlushListener))}};function ib(){return Tf()?[rf()]:[]}function og(){return[as(),ss(),cs(),us(),Ud(),Fd(),kd(),of(),sf(),Xd(),nf(),Bd(),...ib()]}function Sc(t){return[...og(),...sb(t)?J_():[]]}function sb(t){return or(t)?t.enableTracing||t.tracesSampleRate!=null||"tracesSampler"in t:!1}var yc=k(Ki(),1);import ab from"node:events";var Bi=(0,zn.variant)({Reported:(0,zn.fields)(),Ignored:{}}),cb=(t,e,{data:n}={})=>{if(!_o(e))return Bi.Ignored();let r=(0,zn.isType)(e.cliCode,Ic.UnknownFailure)?e.cliCode.error:e,o=t.captureException(r,{data:n,captureContext:i=>{let s=ir(r);return s&&(i.setTag("requestId",s.requestId),i.setContext("requestInfo",Oo(s))),r instanceof Error&&i.setContext("error details",{info:yc.default.info(r),fullStack:yc.default.fullStack(r)}),i}});return Bi.Reported({eventId:o})};function ig({dsn:t,release:e}){let{sentryDsn:n}=To(),r=new co({enabled:n!==void 0||!0,dsn:n??t,release:e,integrations:Sc({}).filter(s=>s.name!=="OnUnhandledRejection"&&s.name!=="OnUncaughtException"&&s.name!=="Modules"),stackParser:ji,transport:Hi,beforeSend(s){return delete s.server_name,s},normalizeDepth:10}),o=new es;o.setClient(r),r.init();let i=new ab;return{on:i.on.bind(i),reportError:(s,{data:a}={})=>{let u=go(s),l=cb(o,u,{data:a});return i.emit("errorReported",u),l},reportUserFeedback:async({userId:s,eventId:a,feedback:u})=>{let{BrowserClient:l}=await import("./esm-YWMLPSSR.js");new l({enabled:r.getOptions().enabled,dsn:r.getOptions().dsn,integrations:[],transport:Hi,stackParser:ji}).captureUserFeedback({event_id:a,name:"",email:`${s}@wix.com`,comments:Ce`
|
|
38
|
+
---
|
|
39
|
+
user: https://bo.wix.com/um/users/${s}
|
|
40
|
+
---
|
|
41
|
+
${u}
|
|
42
|
+
`})},setContext:(s,a)=>o.setContext(s,a),setUser:s=>o.setUser(s),getUser:()=>{let s=o.getUser();if(typeof s?.id=="string")return{id:s.id}}}}c();var lo=k(je(),1),bc=k(ho(),1);import{stdin as db}from"node:process";c();var qi=k(ho(),1);import{join as sg}from"node:path";var uo=(0,qi.variant)({Exists:(0,qi.fields)(),NotExists:{}}),ub=Eo.object({data:Eo.unknown(),createdAt:Eo.number()}),lb=(t,e)=>Date.now()-t.valueOf()>e*60*60*1e3;function qG(t,e){let n=To();return n.fsCacheDir?sg(n.fsCacheDir,e):sg(t,e)}function ag({filePath:t,ttlInHours:e=24*7}){return{get:async()=>{try{if(await Mc(t)){let i=ub.parse(await Nc(t));if(!lb(i.createdAt,e))return uo.Exists({data:i.data})}return uo.NotExists()}catch(o){throw new Yi({code:Xi.FailedToReadCache({path:t}),cause:o})}},set:async o=>{try{return await Pc(t,{data:o,createdAt:Date.now()}),uo.Exists({data:o})}catch(i){throw new Yi({code:Xi.FailedToWriteCache({path:t}),cause:i})}}}}c();var _e=k(je(),1);c();var vc=k(je(),1);var Wi=()=>vc.default.createElement(Gc,{i18nKey:"user_feedback.contact_us",components:[vc.default.createElement(So,{url:"https://discord.gg/devs-on-wix"})]});var cg=({onSubmit:t})=>{let{t:e}=Uc(),[n,r]=(0,_e.useState)(!1),[o,i]=(0,_e.useState)(),s=(0,_e.useCallback)(u=>{i(u),u||r(!0)},[]),a=(0,_e.useCallback)(u=>{r(!0),t({feedback:u})},[t]);return _e.default.createElement(_e.default.Fragment,null,_e.default.createElement(Be,{flexDirection:"column",marginTop:1,marginBottom:1},_e.default.createElement(N,null,e("user_feedback.title")),_e.default.createElement(N,{skin:"secondary"},e("user_feedback.subtitle"))),_e.default.createElement(Lc,{label:e("user_feedback.consent.label"),onSubmit:s}),o===!0&&_e.default.createElement(wc,{label:e("user_feedback.comments.label"),onSubmit:a}),n&&_e.default.createElement(Be,{flexDirection:"column",marginTop:1},_e.default.createElement(N,null,e(o?"user_feedback.submitted":"user_feedback.declined")),_e.default.createElement(Wi,null)))};c();var Ac=k(je(),1);var ug=()=>Ac.default.createElement(Be,{flexDirection:"column",marginTop:1},Ac.default.createElement(Wi,null));var Oc={"user_feedback.title":"Your experience matters to us. Would you like to submit feedback regarding this incident?","user_feedback.subtitle":"We may contact you by email in case we need more details.","user_feedback.consent.label":"Submit feedback?","user_feedback.comments.label":"Feedback (optional)","user_feedback.submitted":"Thank you for your cooperation in helping us resolve this issue promptly.","user_feedback.declined":"Thank you for your feedback.","user_feedback.contact_us":"Reach us in Discord in case you have more questions: <0 />"};async function lg({cachePath:t,reportResult:e,errorReporter:n}){if(!db.isTTY||!t||!(0,bc.isType)(e,Bi.Reported))return;let r=ag({filePath:t,ttlInHours:1}),o=await r.get();if((0,bc.isType)(o,uo.Exists))return;let i=n.getUser();i?await Fc(lo.default.createElement(Zi,{messages:Oc},lo.default.createElement(cg,{onSubmit:({feedback:s})=>{n.reportUserFeedback({userId:i.id,eventId:e.eventId,feedback:s})}}))):Dc(lo.default.createElement(Zi,{messages:Oc},lo.default.createElement(ug,null))),await r.set({reported:!0})}function fb({debugOutputPath:t,userFeedbackCachePath:e,...n}){let r=ig(n),o=function({error:s,data:a}){let u=r.reportError(s,{data:a});kc(pg.default.createElement(_s,{error:s})),ps(t,s),Cc.exitCode=1,lg({reportResult:u,errorReporter:r,cachePath:e}).catch(l=>{ps(t,l)})};return{handler:o,errorReporter:r,registerToProcessErrors:function(){Cc.on("uncaughtException",s=>{o({error:s,data:{mechanism:{handled:!1,type:"uncaughtException"}}})}),Cc.on("unhandledRejection",s=>{s instanceof Error&&s.message.startsWith("Build failed with")&&s.stack?.includes("esbuild")||s instanceof Error&&s.message.startsWith("Failed to load PostCSS config")||o({error:s,data:{mechanism:{handled:!1,type:"unhandledRejection"}}})})}}}c();var Jn=k(je(),1),dg=(0,Jn.createContext)(null),mb=t=>Jn.default.createElement(dg.Provider,{...t}),hb=()=>{let t=(0,Jn.useContext)(dg);if(t==null)throw new Error("useErrorReporter() cannot be used without an <ErrorReporterProvider>");return t};c();export{ir as a,hg as b,_g as c,ps as d,_s as e,yr as f,qG as g,ag as h,fb as i,mb as j,hb as k};
|
|
43
|
+
//# sourceMappingURL=chunk-PCOHTRKC.js.map
|