@icanbwell/composite 1.666.0 → 1.668.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/473.index.js +9 -9
- package/473.index.js.map +1 -1
- package/index.js +1 -1
- package/native.js +1 -1
- package/package.json +3 -3
package/473.index.js
CHANGED
|
@@ -5341,7 +5341,7 @@ Take a look at the reducer(s) handling this action type: `+We.type+`.
|
|
|
5341
5341
|
questionnaireName
|
|
5342
5342
|
}
|
|
5343
5343
|
}
|
|
5344
|
-
`));function hwe(e){const t=Object.assign(Object.assign({},el),e);return Apollo.useQuery(k$,t)}function Swe(e){const t=Object.assign(Object.assign({},el),e);return Apollo.useLazyQuery(k$,t)}const Ewe=e=>useMutation(CreateOauthThirdPartyConnection,e),vwe=e=>useMutation(DisconnectUserToken,e),mwe=e=>useMutation(CreateConnectionStatus,e),Twe=e=>useQuery(GetMemberConnections,e),Awe=e=>useQuery(GetConnections,e),gwe=e=>useQuery(GetConnection,e),ywe=e=>useQuery(GetOauthGeneratedUrl,e);var j$=h(46),Hp,Sm;class H${constructor(){this.type="backend",Hp.set(this,void 0),Sm.set(this,void 0)}init(t,{clientSlug:r,apiClient:n}){if(!n)throw t.logger.error('"apiClient" not supplied to "QueryBackend".'),new Error('"apiClient" required for "QueryBackend".');wu(this,Hp,r,"f"),wu(this,Sm,fU(n),"f")}read(t,r,n){return om(this,void 0,void 0,function*(){try{const{translation:i}=yield Jr(this,Sm,"f").getClientTranslations({name:Jr(this,Hp,"f"),key:r,lang:t});n(null,i?.json||{})}catch{const a=`Error fetching translation with key "${r}" and client "${Jr(this,Hp,"f")||"N/A"}".`;n(a,null)}})}}Hp=new WeakMap,Sm=new WeakMap,H$.type="backend";var Xf;class Y${constructor(t){this.type="logger",Xf.set(this,void 0),wu(this,Xf,t,"f")}log([t,r,...n]){Jr(this,Xf,"f").info({meta:r},t,...n)}warn([t,r,...n]){Jr(this,Xf,"f").error({meta:r},t,...n)}error([t,r,...n]){Jr(this,Xf,"f").error({meta:r},t,...n)}}Xf=new WeakMap,Y$.type="logger";var Em,vm,tl,Yp,Ii,rl;const q$="appLanguage";class Pa{constructor({keys:t,nativeBridge:r,fallbackKeys:n=[],defaultLanguage:i="en",logger:a,parent:u,debug:c=!1,remoteConfig:E={}}){tl.set(this,void 0),Yp.set(this,void 0),Ii.set(this,void 0),rl.set(this,void 0),wu(this,tl,t,"f"),wu(this,Yp,n,"f"),wu(this,rl,r,"f");const _={lng:i,fallbackNS:Jr(this,Yp,"f"),debug:c,defaultNS:t,returnNull:!1};u?wu(this,Ii,u.cloneInstance(_),"f"):(wu(this,Ii,ea.createInstance(),"f"),a&&Jr(this,Ii,"f").use(new Y$(a.child({library:"@icanbwell/i18n"}))),E.apiClient&&Jr(this,Ii,"f").use(H$),Jr(this,Ii,"f").init(Object.assign(Object.assign({},_),{fallbackLng:!1,partialBundledLanguages:!0,ns:[],resources:{},backend:E,saveMissing:!0,missingKeyHandler:(p,L,W)=>Jr(this,Ii,"f").services.logger.error(`missing key: ${W}; language: ${p}; key: ${L}`)}))),this.t=Jr(this,Ii,"f").t,Pa.resolvedLanguage=Jr(this,Ii,"f").resolvedLanguage||i}load(){var t;return om(this,void 0,void 0,function*(){const r=(yield(t=Jr(this,rl,"f"))===null||t===void 0?void 0:t.storage.getItem(q$))||Pa.resolvedLanguage;r!==Pa.resolvedLanguage&&(yield Jr(this,Ii,"f").changeLanguage(r),Pa.resolvedLanguage=r),yield Jr(this,Ii,"f").loadNamespaces(Jr(this,tl,"f"));const n=Jr(this,tl,"f").filter(i=>!Jr(this,Ii,"f").hasResourceBundle(r,i));if(n.length)throw new Error(`Error loading translations for key(s): ${n.join(", ")}`);return Jr(Pa,Em,"f",vm).emit("changeLanguage",r),this})}child(t){return new Pa(Object.assign(Object.assign({},t),{nativeBridge:Jr(this,rl,"f"),fallbackKeys:[...Jr(this,Yp,"f"),...Jr(this,tl,"f")],parent:Jr(this,Ii,"f"),defaultLanguage:Jr(this,Ii,"f").language}))}get isLoaded(){return Jr(this,tl,"f").every(t=>Jr(this,Ii,"f").hasResourceBundle(Jr(this,Ii,"f").language,t))}changeLanguage(t){var r;return om(this,void 0,void 0,function*(){Pa.resolvedLanguage=t,yield Jr(this,Ii,"f").changeLanguage(t),Jr(Pa,Em,"f",vm).emit("changeLanguage",t),yield(r=Jr(this,rl,"f"))===null||r===void 0?void 0:r.storage.setItem(q$,t),Jr(this,rl,"f").reloadView()})}get resolvedLanguage(){return Pa.resolvedLanguage}onChangeLanguage(t){Jr(Pa,Em,"f",vm).on("changeLanguage",t)}}Em=Pa,tl=new WeakMap,Yp=new WeakMap,Ii=new WeakMap,rl=new WeakMap,vm={value:new j$},Pa.resolvedLanguage="en";var NC=h(1827),qp;(function(e){e.one="1.0.0"})(qp||(qp={}));const mm="orchestrator:native-bridge",E9={id:mm,dependencies:{featureServices:{}},create:()=>({[qp.one]:()=>({featureService:NC.b})})};var Kp;(function(e){e.one="1.0.0"})(Kp||(Kp={}));const Tm="orchestrator:translation-service",v9={id:Tm,dependencies:{featureServices:{[za]:Nr.one,[ks]:Mu.one,[Wn]:vi.one,[Mp]:kf.one,[mm]:qp.one}},create:({featureServices:e})=>{const t=e[za],r=e[ks],n=e[Mp],{slug:i}=e[Wn].getClientContext(),a=e[mm],u=new Pa({keys:[],nativeBridge:a,defaultLanguage:"en",logger:r,remoteConfig:{clientSlug:i,apiClient:t}});return n.setProfileProperties({language:u.resolvedLanguage}),u.onChangeLanguage(c=>n.setProfileProperties({language:c})),{[Kp.one]:()=>({featureService:u})}}};var Jf,Zf,Am,nl;const gm="tokens";class m9{constructor({apiClient:t,stateService:r,identityGatewaySdk:n,storage:i}){Jf.set(this,void 0),Zf.set(this,void 0),Am.set(this,void 0),nl.set(this,void 0),(0,F.GG)(this,Jf,t,"f"),(0,F.GG)(this,Zf,r,"f"),(0,F.GG)(this,Am,n,"f"),(0,F.GG)(this,nl,i,"f")}getStoredTokens(){const t=(0,F.gn)(this,nl,"f").getItem(gm);return t?JSON.parse(t):void 0}removeStoredTokens(){(0,F.gn)(this,nl,"f").removeItem(gm)}storeTokens(t){(0,F.gn)(this,nl,"f").setItem(gm,JSON.stringify(t))}logout(){return(0,F.sH)(this,void 0,void 0,function*(){const t=(0,F.gn)(this,Zf,"f").getUserTokenData().accessToken.jwtToken,{key:r,variant:n}=(0,F.gn)(this,Zf,"f").getClientContext();n!==te.GUEST&&(yield(0,F.gn)(this,Am,"f").logout({accessToken:t},{context:{headers:{clientKey:r}}})),(0,F.gn)(this,Jf,"f").stop(),(0,F.gn)(this,Jf,"f").clearAuth(),yield(0,F.gn)(this,Jf,"f").clearStore(),(0,F.gn)(this,Zf,"f").logoutUser(),(0,F.gn)(this,nl,"f").removeItem(gm)})}}Jf=new WeakMap,Zf=new WeakMap,Am=new WeakMap,nl=new WeakMap;var ym;(function(e){e.one="1.0.0"})(ym||(ym={}));const K$="orchestrator:identity-utils",T9={id:K$,dependencies:{featureServices:{[za]:Nr.one,[ks]:Mu.one,[Wn]:vi.one,[Mp]:kf.one}},create:({featureServices:e})=>{const t=e[za];return{[ym.one]:()=>({featureService:new m9({apiClient:t,stateService:e[Wn],identityGatewaySdk:mx(t),storage:window.sessionStorage})})}}};var Rm;(function(e){e.one="1.0.0"})(Rm||(Rm={}));const W$="orchestrator:globaleventemitter-service",A9=e=>({id:W$,create:()=>({[Rm.one]:()=>({featureService:e})})});var Om;(function(e){e.one="1.0.0"})(Om||(Om={}));const Q$="orchestrator:reboot-controller",g9=e=>({id:Q$,create:()=>({[Om.one]:()=>({featureService:e})})});class Bi extends Error{constructor(t,r){super(t),this.name="BWellError",r?.cause&&(this.cause=r.cause)}static isBwellError(t){return t instanceof Bi}}class Rwe extends Bi{constructor(t="Authentication Error"){super(t),this.name="AuthenticationError"}}class Owe extends Bi{constructor(t="Illegal Argument Error"){super(t),this.name="IllegalArgumentError"}}class bwe extends Bi{constructor(t="Illegal State Error"){super(t),this.name="IllegalStateError"}}class y9 extends Bi{constructor(t="Invalid Client Key Error"){super(t),this.name="InvalidClientKeyError"}}class LC extends Bi{constructor(t,r){super(t),this.credentials=r,this.name="InvalidCredentialsTypeError"}}class e_ extends Bi{constructor(t="Invalid Token Error"){super(t),this.name="InvalidTokenError"}}class R9 extends Bi{constructor(t,r){super(t),this.status=r,this.name="NetworkError"}}class O9 extends Bi{constructor(t){super(t.message()),this.operationOutcome=t,this.name="OperationOutcomeError"}}class DC extends Bi{constructor(t,r){super(t),this.data=r,this.name="UnknownError"}}class b9 extends Bi{constructor(t){super(t.join(". ")),this.errors=t,this.name="ValidationError"}}class tr{constructor(t,r){this.data=t,r!==null&&(this.error=r)}hasError(){return this.error!==void 0}static error(t){return new tr(void 0,t)}}var z$=function(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r},bm=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},Wp,Qp;class Kt{static success(t){return new C9(t)}static failure(t){return new Cm(t)}}class C9 extends Kt{constructor(t){super(),Wp.set(this,void 0),z$(this,Wp,t,"f")}data(){return bm(this,Wp,"f")}error(){throw bm(this,Wp,"f")}success(){return!0}failure(){return!1}toQueryResult(){return new tr(this.data())}}Wp=new WeakMap;class Cm extends Kt{constructor(t){super(),Qp.set(this,void 0),z$(this,Qp,t,"f")}data(){throw bm(this,Qp,"f")}error(){return bm(this,Qp,"f")}success(){return!1}failure(){return!0}intoFailure(){return Kt.failure(this.error())}toQueryResult(){return new tr(void 0,this.error())}}Qp=new WeakMap;var wC=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},zp;class P9{constructor(){zp.set(this,[])}add(t){wC(this,zp,"f").push(t)}errors(){return wC(this,zp,"f")}hasErrors(){return wC(this,zp,"f").length>0}}zp=new WeakMap;var X$=function(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r},UC=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},Xp,Pm;class M9{constructor(t){Xp.set(this,void 0),Pm.set(this,void 0),X$(this,Pm,t,"f"),X$(this,Xp,this.transformInput(t),"f")}validate(){return Kt.success(null)}data(){return UC(this,Xp,"f")}toJSON(){return UC(this,Xp,"f")}transformInput(t){return t}input(){return UC(this,Pm,"f")}}Xp=new WeakMap,Pm=new WeakMap;class sa extends M9{validate(){const t=new P9;return this.validator.validate(this.input(),t),t.hasErrors()?Kt.failure(new b9(t.errors())):Kt.success(null)}}var J$=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},Mm,Z$,eV;const tV=100,I9=20;class Ys{constructor(){Mm.add(this)}validate(t,r){J$(this,Mm,"m",Z$).call(this,t.page,r),J$(this,Mm,"m",eV).call(this,t.pageSize,r)}}Mm=new WeakSet,Z$=function(t,r){t<0&&r.add("page must be a positive number")},eV=function(t,r){t!==void 0&&(t<=0&&r.add("Page size must be greater than 0"),t>tV&&r.add(`Page size must not exceed ${tV}`))};class qs extends sa{constructor(){super(...arguments),this.validator=new Ys}transformInput(t){return Object.assign({pageSize:I9},t)}}function N9(){var e;return!(typeof process>"u"||((e=process.versions)===null||e===void 0?void 0:e.node)===void 0)}function L9(){return typeof window<"u"}function rV(){if(L9())return"browser";if(N9())return"node";throw new Error("Invalid runtime")}function D9(e){switch(rV()){case"browser":return e.browser();case"node":return e.node()}}function nV(e){switch(rV()){case"node":return Buffer.from(e,"base64").toString("utf-8");case"browser":return atob(e)}}function Fn(e){return e!=null}function Fo(e){return e==null}function Cwe(e){return Fn(e)&&e!==""}function Ks(e){return e==null||e===""}function ka(e){return e===void 0}function ki(e){return e!==void 0}function w9(e){return JSON.parse(nV(e)).env}const U9=3;function iV(e){const t=e.split("."),r=t[1];if(r===void 0||t.length!==U9)throw new e_("Token is missing data and may be corrupted");try{return JSON.parse(nV(r))}catch(n){const i=n;throw new e_(`Unable to parse token payload: ${i.name} - ${i.message}`)}}function x9(e){const r=iV(e).exp;if(typeof r!="number")throw new e_("The access token is missing an expiration date and is most likely corrupted.");return r*1e3}const F9="custom:clientFhirPersonId",$9="custom:bwellFhirPatientId";function V9(e){const t=iV(e),r=t[$9],n=t[F9];return Fn(r)&&Fn(n)?{bwellFhirPersonId:r,clientFhirPersonId:n}:null}function $o(e){return e.trim()===""}const G9="1.35.0";function B9(){return G9}var xC;(function(e){e.Arrived="ARRIVED",e.Booked="BOOKED",e.Cancelled="CANCELLED",e.CheckedIn="CHECKED_IN",e.EnteredInError="ENTERED_IN_ERROR",e.Fulfilled="FULFILLED",e.Noshow="NOSHOW",e.Pending="PENDING",e.Proposed="PROPOSED",e.Waitlist="WAITLIST"})(xC||(xC={}));var aV;(function(e){e.Guest="GUEST"})(aV||(aV={}));var Im;(function(e){e.CommunicationPreferencesPhi="COMMUNICATION_PREFERENCES_PHI",e.DataSharing="DATA_SHARING",e.HealthCircleAdolescent="HEALTH_CIRCLE_ADOLESCENT",e.HealthCircleMinor="HEALTH_CIRCLE_MINOR",e.HealthMatch="HEALTH_MATCH",e.IasImportRecords="IAS_IMPORT_RECORDS",e.MobileCommunicationPreferences="MOBILE_COMMUNICATION_PREFERENCES",e.PersonalizedHealthOffersAndAds="PERSONALIZED_HEALTH_OFFERS_AND_ADS",e.ProaAttestation="PROA_ATTESTATION",e.Tos="TOS"})(Im||(Im={}));var oV;(function(e){e.Bwell="bwell"})(oV||(oV={}));var sV;(function(e){e.Bwell="BWELL"})(sV||(sV={}));var uV;(function(e){e.Basic="BASIC",e.Oauth="OAUTH"})(uV||(uV={}));var FC;(function(e){e.Deny="DENY",e.Permit="PERMIT"})(FC||(FC={}));var $C;(function(e){e.Active="ACTIVE",e.Draft="DRAFT",e.EnteredInError="ENTERED_IN_ERROR",e.Inactive="INACTIVE",e.Proposed="PROPOSED",e.Rejected="REJECTED"})($C||($C={}));var cV;(function(e){e.Home="home",e.Mobile="mobile",e.Work="work"})(cV||(cV={}));var lV;(function(e){e.Usd="USD"})(lV||(lV={}));var fV;(function(e){e.Connected="CONNECTED",e.Deleted="DELETED",e.Disconnected="DISCONNECTED",e.Error="ERROR",e.Expired="EXPIRED"})(fV||(fV={}));var _V;(function(e){e.Clinical="CLINICAL",e.Insurance="INSURANCE",e.Lab="LAB",e.Pharmacy="PHARMACY",e.Practitioner="PRACTITIONER"})(_V||(_V={}));var Nm;(function(e){e.Connecthub="connecthub",e.Nppes="nppes"})(Nm||(Nm={}));var dV;(function(e){e.Connecthub="CONNECTHUB",e.Nppes="NPPES"})(dV||(dV={}));var pV;(function(e){e.BwellPatient="BWELL_PATIENT",e.BwellPerson="BWELL_PERSON",e.ClientPatient="CLIENT_PATIENT",e.ClientPerson="CLIENT_PERSON"})(pV||(pV={}));var hV;(function(e){e.Active="active",e.EnteredInError="entered_in_error",e.Error="error",e.Off="off",e.Suspended="suspended",e.Test="test"})(hV||(hV={}));var SV;(function(e){e.Active="ACTIVE",e.EnteredInError="ENTERED_IN_ERROR",e.Error="ERROR",e.Off="OFF",e.Suspended="SUSPENDED",e.Test="TEST"})(SV||(SV={}));var VC;(function(e){e.CustomEvent="CUSTOM_EVENT",e.MobilePushOpen="MOBILE_PUSH_OPEN"})(VC||(VC={}));var GC;(function(e){e.Female="female",e.Male="male",e.Other="other",e.Unknown="unknown"})(GC||(GC={}));var BC;(function(e){e.Person="Person"})(BC||(BC={}));var kC;(function(e){e.Characteristic="characteristic",e.Communication="communication",e.Gender="gender",e.Specialty="specialty"})(kC||(kC={}));var EV;(function(e){e.Characteristic="CHARACTERISTIC",e.Communication="COMMUNICATION",e.Gender="GENDER",e.Specialty="SPECIALTY"})(EV||(EV={}));var vV;(function(e){e.Female="female",e.Male="male",e.Other="other",e.Unknown="unknown"})(vV||(vV={}));var mV;(function(e){e.Female="FEMALE",e.Male="MALE",e.Other="OTHER",e.Unknown="UNKNOWN"})(mV||(mV={}));var TV;(function(e){e.Female="female",e.Male="male",e.Other="other",e.Unknown="unknown"})(TV||(TV={}));var AV;(function(e){e.AllergyIntolerance="ALLERGY_INTOLERANCE",e.CarePlan="CARE_PLAN",e.Condition="CONDITION",e.Encounter="ENCOUNTER",e.Immunization="IMMUNIZATION",e.Labs="LABS",e.Medications="MEDICATIONS",e.Procedure="PROCEDURE",e.VitalSigns="VITAL_SIGNS"})(AV||(AV={}));var gV;(function(e){e.Official="_official",e.Old="_old",e.Secondary="_secondary",e.Temp="_temp",e.Usual="_usual"})(gV||(gV={}));var yV;(function(e){e.Clicked="clicked"})(yV||(yV={}));var RV;(function(e){e.Clicked="CLICKED"})(RV||(RV={}));var jC;(function(e){e.Debug="DEBUG",e.Error="ERROR",e.Info="INFO",e.Verbose="VERBOSE",e.Warn="WARN"})(jC||(jC={}));var OV;(function(e){e.Activity="ACTIVITY",e.Exam="EXAM",e.Imaging="IMAGING",e.Laboratory="LABORATORY",e.Procedure="PROCEDURE",e.SocialHistory="SOCIAL_HISTORY",e.Survey="SURVEY",e.Therapy="THERAPY",e.VitalSigns="VITAL_SIGNS"})(OV||(OV={}));var bV;(function(e){e.CancelDelete="CANCEL_DELETE",e.ConfirmDelete="CONFIRM_DELETE",e.DeletionInProgress="DELETION_IN_PROGRESS",e.ImmediateExecution="IMMEDIATE_EXECUTION",e.RequestDelete="REQUEST_DELETE"})(bV||(bV={}));var HC;(function(e){e.C19Vaccine="C19Vaccine",e.Device="Device",e.Insurance="Insurance",e.Laboratory="Laboratory",e.Pharmacy="Pharmacy",e.Provider="Provider",e.Bus="bus",e.Cg="cg",e.Crs="crs",e.Dept="dept",e.Edu="edu",e.Govt="govt",e.Ins="ins",e.Other="other",e.Pay="pay",e.Prov="prov",e.Reli="reli",e.Team="team"})(HC||(HC={}));var CV;(function(e){e.Bus="BUS",e.C19Vaccine="C19VACCINE",e.Cg="CG",e.Crs="CRS",e.Dept="DEPT",e.Device="DEVICE",e.Edu="EDU",e.Govt="GOVT",e.Ins="INS",e.Insurance="INSURANCE",e.Laboratory="LABORATORY",e.Other="OTHER",e.Pay="PAY",e.Pharmacy="PHARMACY",e.Prov="PROV",e.Provider="PROVIDER",e.Reli="RELI",e.Team="TEAM"})(CV||(CV={}));var PV;(function(e){e.Add="add",e.Copy="copy",e.Move="move",e.Remove="remove",e.Replace="replace",e.Test="test"})(PV||(PV={}));var MV;(function(e){e.Patient="Patient",e.Person="Person"})(MV||(MV={}));var IV;(function(e){e.Practice="practice",e.Practitioner="practitioner"})(IV||(IV={}));var NV;(function(e){e.Practice="PRACTICE",e.Practitioner="PRACTITIONER"})(NV||(NV={}));var LV;(function(e){e.QuestionnaireResponse="QuestionnaireResponse"})(LV||(LV={}));var DV;(function(e){e.AllergyIntolerance="ALLERGY_INTOLERANCE",e.CarePlan="CARE_PLAN",e.Condition="CONDITION",e.Encounter="ENCOUNTER",e.Immunization="IMMUNIZATION",e.MedicationDispense="MEDICATION_DISPENSE",e.MedicationRequest="MEDICATION_REQUEST",e.MedicationStatement="MEDICATION_STATEMENT",e.Observation="OBSERVATION",e.Procedure="PROCEDURE"})(DV||(DV={}));var wV;(function(e){e.Insurance="INSURANCE",e.Laboratory="LABORATORY",e.Pharmacy="PHARMACY",e.Practice="PRACTICE",e.Practitioner="PRACTITIONER"})(wV||(wV={}));var YC;(function(e){e.Content="content",e.Distance="distance",e.Relevance="relevance"})(YC||(YC={}));var UV;(function(e){e.Content="CONTENT",e.DataSourceRank="DATA_SOURCE_RANK",e.Distance="DISTANCE",e.Relevance="RELEVANCE"})(UV||(UV={}));var qC;(function(e){e.Asc="asc",e.Desc="desc"})(qC||(qC={}));var xV;(function(e){e.Asc="ASC",e.Desc="DESC"})(xV||(xV={}));var FV;(function(e){e.CareSearch="CARE_SEARCH",e.Proa="PROA",e.ProviderDetails="PROVIDER_DETAILS",e.Sayt="SAYT",e.Unspecified="UNSPECIFIED"})(FV||(FV={}));var $V;(function(e){e.Error="ERROR",e.Pending="PENDING",e.Retrieved="RETRIEVED",e.Retrieving="RETRIEVING"})($V||($V={}));var KC;(function(e){e.Accepted="ACCEPTED",e.Cancelled="CANCELLED",e.Completed="COMPLETED",e.Draft="DRAFT",e.EnteredInError="ENTERED_IN_ERROR",e.Failed="FAILED",e.InProgress="IN_PROGRESS",e.OnHold="ON_HOLD",e.Ready="READY",e.Received="RECEIVED",e.Rejected="REJECTED",e.Requested="REQUESTED"})(KC||(KC={}));var VV;(function(e){e.Accurate="accurate",e.Estimate="estimate"})(VV||(VV={}));const k9=new Set(Object.values(GC));function GV(e){return k9.has(e)}const j9=new Set(Object.values($C));function H9(e){return j9.has(e)}const Y9=new Set(Object.values(Im));function BV(e){return Y9.has(e)}const q9=new Set(Object.values(FC));function K9(e){return q9.has(e)}class W9{validate(t,r){!ka(t.gender)&&!GV(t.gender)&&r.add(`Invalid gender value: "${t.gender}"`)}}class Pwe extends sa{constructor(){super(...arguments),this.validator=new W9}}class Q9{validate(t,r){BV(t.category)||r.add(`Invalid consent category code: "${t.category}"`)}}class Mwe extends sa{constructor(){super(...arguments),this.validator=new Q9}}class z9{validate(t,r){H9(t.status)||r.add(`Invalid consent status: "${t.status}"`),K9(t.provision)||r.add(`Invalid consent provision type: "${t.provision}"`),BV(t.category)||r.add(`Invalid consent category code: "${t.category}"`),!ka(t.organizationId)&&$o(t.organizationId)&&r.add("organizationId cannot be empty"),t.category===Im.ProaAttestation&&ka(t.organizationId)&&r.add("organizationId must be provided when category is PROA_ATTESTATION")}}class Iwe extends sa{constructor(){super(...arguments),this.validator=new z9}}class X9{validate(t,r){Ks(t.exportId)&&r.add("exportId is required"),Ks(t.password)&&r.add("password is required")}}class Nwe extends sa{constructor(){super(...arguments),this.validator=new X9}}class Lwe extends null{}var ja=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},ua,xu,kV,jV,HV,YV,qV,KV;class WC{constructor(){ua.add(this)}validate(t,r){if(!t.values||t.values.length===0){r.add("At least one SearchDateValue must be set to instantiate a SearchDate");return}for(const n of t.values)ja(this,ua,"m",kV).call(this,n,r)}}ua=new WeakSet,xu=function(t,r){t&&t!==null&&isNaN(t.getTime())&&r.add("The date is not valid")},kV=function(t,r){const{equals:n,notEquals:i,greaterThan:a,greaterThanOrEqualTo:u,lessThan:c,lessThanOrEqualTo:E,approximately:_}=t,L=[n,i,a,u,c,E,_].filter(W=>W!=null).length;if(L===0){r.add("At least one SearchDateValue must be set to instantiate a SearchDate");return}ja(this,ua,"m",jV).call(this,t,L,r),ja(this,ua,"m",qV).call(this,t,r),ja(this,ua,"m",KV).call(this,t,r)},jV=function(t,r,n){const{equals:i,notEquals:a,approximately:u}=t;if(i&&r>1){n.add("The equals value cannot be set with any other values");return}if(a&&r>1){n.add("The notEquals value cannot be set with any other values");return}if(u&&r>1){n.add("The approximately value cannot be set with any other values");return}ja(this,ua,"m",HV).call(this,t,n),ja(this,ua,"m",YV).call(this,t,n)},HV=function(t,r){t.greaterThan&&t.greaterThanOrEqualTo&&r.add("The greaterThan/greaterThanOrEqualTo value cannot be set with both values")},YV=function(t,r){t.lessThan&&t.lessThanOrEqualTo&&r.add("The lessThan/lessThanOrEqualTo value cannot be set with both values")},qV=function(t,r){const{equals:n,notEquals:i,greaterThan:a,greaterThanOrEqualTo:u,lessThan:c,lessThanOrEqualTo:E,approximately:_}=t;n&&ja(this,ua,"m",xu).call(this,n,r),i&&ja(this,ua,"m",xu).call(this,i,r),a&&ja(this,ua,"m",xu).call(this,a,r),u&&ja(this,ua,"m",xu).call(this,u,r),c&&ja(this,ua,"m",xu).call(this,c,r),E&&ja(this,ua,"m",xu).call(this,E,r),_&&ja(this,ua,"m",xu).call(this,_,r)},KV=function(t,r){const{greaterThan:n,greaterThanOrEqualTo:i,lessThan:a,lessThanOrEqualTo:u}=t;n&&u&&n>=u&&r.add("The greaterThan value must be less than the lessThanOrEqualTo value"),i&&a&&i>=a&&r.add("The greaterThanOrEqualTo value must be less than the lessThan value"),n&&a&&n>=a&&r.add("The greaterThan value must be less than the lessThan value"),i&&u&&i>=u&&r.add("The greaterThanOrEqualTo value must be less than the lessThanOrEqualTo value")};var QC=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},Jp;class Lm{constructor(){Jp.set(this,new J9)}validate(t,r){var n;if(t.value===void 0&&t.values===void 0&&t.notEquals===void 0){r.add("Either SearchToken value or values or notEquals must be provided");return}if(t.value!==void 0&&QC(this,Jp,"f").validate(t.value,r),t.values!==void 0&&t.values.length===0){r.add("At least one Coding must be set to instantiate a SearchToken");return}for(const i of(n=t.values)!==null&&n!==void 0?n:[])QC(this,Jp,"f").validate(i,r);if(t.notEquals!==void 0){if(t.notEquals.values!==void 0){if(t.notEquals.values.length===0){r.add("If notEquals values are provided, at least one Coding must be set");return}for(const i of t.notEquals.values)QC(this,Jp,"f").validate(i,r)}t.notEquals.code===void 0&&t.notEquals.value===void 0&&t.notEquals.system===void 0&&t.notEquals.values===void 0&&r.add("NotEquals must have at least one non-null property (code, value, system, or values)")}}}Jp=new WeakMap;class J9{validate(t,r){!t.system&&!t.code&&r.add("Each Coding in the list must have at least one non-null and non-empty value for system or code")}}var t_=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},zC,XC,JC,ZC,eP,tP;class WV extends Ys{constructor(){super(...arguments),zC.set(this,new Lm),XC.set(this,new WC)}validate(t,r){super.validate(t,r),t.groupCode&&t_(this,zC,"f").validate(t.groupCode,r),t.lastUpdated&&t_(this,XC,"f").validate(t.lastUpdated,r)}}zC=new WeakMap,XC=new WeakMap;class Z9{validate(t,r){t.length===0&&r.add("Prescription array must not be empty.")}}class QV extends Ys{constructor(){super(...arguments),JC.set(this,new Z9),ZC.set(this,new WC)}validate(t,r){super.validate(t,r),t.lastUpdated!==void 0&&t_(this,ZC,"f").validate(t.lastUpdated,r),t.prescription!==void 0&&t_(this,JC,"f").validate(t.prescription,r)}}JC=new WeakMap,ZC=new WeakMap;class eZ extends Ys{validate(t,r){var n;super.validate(t,r),!((n=t?.ids)===null||n===void 0)&&n.length||r.add("ids must not be empty")}}class tZ extends qs{constructor(){super(...arguments),this.validator=new WV}}class Dwe extends null{}class wwe extends null{}class Uwe extends null{}class xwe extends null{}class Fwe extends null{}class $we extends null{}class Vwe extends null{}class Gwe extends null{}class Bwe extends null{}class kwe extends null{}class jwe extends null{}class Hwe extends null{}class Ywe extends null{}class qwe extends null{}class Kwe extends null{}class Wwe extends null{}class Qwe extends null{}class zwe extends null{}class Xwe extends null{}class rZ extends QV{constructor(){super(...arguments),eP.set(this,new Lm)}validate(t,r){super.validate(t,r),t.medicationCode!==void 0&&t_(this,eP,"f").validate(t.medicationCode,r)}}eP=new WeakMap;class Jwe extends qs{constructor(){super(...arguments),this.validator=new QV}}class Zwe extends qs{constructor(){super(...arguments),this.validator=new rZ}}class nZ extends WV{constructor(){super(...arguments),tP.set(this,new Lm)}validate(t,r){super.validate(t,r),t.medicationCode!==void 0&&t_(this,tP,"f").validate(t.medicationCode,r)}}tP=new WeakMap;class eUe extends tZ{constructor(){super(...arguments),this.validator=new nZ}}class tUe extends null{}class rUe extends qs{constructor(){super(...arguments),this.validator=new eZ}}class nUe extends null{}class iZ{validate(t,r){$o(t.medicationStatementId)&&r.add("The medication pricing request must possess a medication statement id.")}}class iUe extends sa{constructor(){super(...arguments),this.validator=new iZ}}class aZ extends Ys{validate(t,r){$o(t.medicationStatementId)&&r.add("The medication knowledge request must possess a medication statement id."),super.validate(t,r)}}class aUe extends qs{constructor(){super(...arguments),this.validator=new aZ}}class oZ extends Ys{validate(t,r){$o(t.labId)&&r.add("The lab knowledge request must contain a lab id."),super.validate(t,r)}}class oUe extends qs{constructor(){super(...arguments),this.validator=new oZ}}const sZ=new Set(Object.values(KC));function zV(e){return sZ.has(e)}var uZ=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},rP,XV;class cZ extends Ys{constructor(){super(...arguments),rP.add(this)}validate(t,r){if(super.validate(t,r),!ka(t.status)){const n=Array.isArray(t.status)?t.status:[t.status];for(const i of n)uZ(this,rP,"m",XV).call(this,i,r)}}}rP=new WeakSet,XV=function(t,r){zV(t)||r.add(`Invalid task status: "${t}"`)};class sUe extends qs{constructor(){super(...arguments),this.validator=new cZ}}class lZ{validate(t,r){zV(t.newStatus)||r.add(`Invalid task status: "${t.newStatus}"`)}}class uUe extends sa{constructor(){super(...arguments),this.validator=new lZ}}var Dm=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},r_,JV,ZV,eG,tG;class cUe extends qs{constructor(){super(...arguments),this.validator=new fZ}}class fZ extends Ys{constructor(){super(...arguments),r_.add(this)}validate(t,r){super.validate(t,r),ki(t.organizationTypeFilters)&&Dm(this,r_,"m",JV).call(this,t.organizationTypeFilters,r),ki(t.sortBy)&&Dm(this,r_,"m",ZV).call(this,t.sortBy,r),ki(t.filterFields)&&Dm(this,r_,"m",eG).call(this,t.filterFields,r),ki(t.gender)&&Dm(this,r_,"m",tG).call(this,t.gender,r)}}r_=new WeakSet,JV=function(t,r){for(const n of t)dZ(n)||r.add(`Invalid organizationTypeFilters value: "${n}"`)},ZV=function(t,r){ki(t.field)&&!hZ(t.field)&&r.add(`Invalid sortBy.field value: "${t.field}"`),ki(t.order)&&!EZ(t.order)&&r.add(`Invalid sortBy.order value: "${t.order}"`)},eG=function(t,r){for(const n of t)mZ(n)||r.add(`Invalid filterField value: "${n}"`)},tG=function(t,r){GV(t)||r.add(`Invalid gender value: "${t}"`)};const _Z=new Set(Object.values(HC));function dZ(e){return _Z.has(e)}const pZ=new Set(Object.values(YC));function hZ(e){return pZ.has(e)}const SZ=new Set(Object.values(qC));function EZ(e){return SZ.has(e)}const vZ=new Set(Object.values(kC));function mZ(e){return vZ.has(e)}class lUe extends null{}class fUe extends qs{constructor(){super(...arguments),this.validator=new TZ}}class TZ extends Ys{validate(t,r){super.validate(t,r)}}const AZ="data-connection-status";var gZ=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},nP;const yZ="connectionId cannot be null or empty",RZ="username cannot be null or empty",OZ="password cannot be null or empty";class rG{validate(t,r){t.connectionId===""&&r.add(yZ)}}class bZ{constructor(){nP.set(this,new rG)}validate(t,r){gZ(this,nP,"f").validate(t,r),t.username===""&&r.add(RZ),t.password===""&&r.add(OZ)}}nP=new WeakMap;class CZ extends sa{constructor(){super(...arguments),this.validator=new rG}}class _Ue extends null{}class dUe extends CZ{constructor(){super(...arguments),this.validator=new bZ}}const PZ="deviceToken is required",MZ="platformName must be a valid DevicePlatform value",IZ="applicationName is required";var iP;(function(e){e.IOS="IOS",e.ANDROID="ANDROID"})(iP||(iP={}));const NZ=new Set(Object.values(iP));function LZ(e){return NZ.has(e)}function DZ(e){return!LZ(e)}class nG{validate(t,r){$o(t.deviceToken)&&r.add(PZ)}}class wZ extends nG{validate(t,r){super.validate(t,r),DZ(t.platformName.toUpperCase())&&r.add(MZ),$o(t.applicationName)&&r.add(IZ)}}class pUe extends sa{constructor(){super(...arguments),this.validator=new wZ}}class hUe extends sa{constructor(){super(...arguments),this.validator=new nG}}const UZ="string parameter serializedNotification must be provided",xZ="serialized notification must have a non-empty notification_id field of type string",iG="serialized notification must have an itbl object containing a non-empty messageId field of type string",FZ="parsed notification must be a non-null object.",$Z="serialized notification is not valid JSON.";class VZ{validate(t,r){if(ka(t.serializedNotification)||typeof t.serializedNotification!="string"||$o(t.serializedNotification)){r.add(UZ);return}let n=null;try{n=JSON.parse(t.serializedNotification)}catch{r.add($Z);return}if(typeof n!="object"||n===null){r.add(FZ);return}const{itbl:i,notification_id:a}=n;if((ka(a)||typeof a!="string"||$o(a))&&r.add(xZ),typeof i!="object"||Fo(i)){r.add(iG);return}(ka(i.messageId)||typeof i.messageId!="string"||$o(i.messageId))&&r.add(iG)}}class SUe extends sa{constructor(){super(...arguments),this.validator=new VZ}}const GZ="SearchStringValue should be a non-empty string";class BZ{validate(t,r){if(Fo(t.values))return;let n=!1;for(const i of t.values)$o(i)&&(n=!0);n&&r.add(GZ)}}var aP=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},oP,sP,uP;class kZ{constructor(){oP.set(this,new WC),sP.set(this,new BZ),uP.set(this,new Lm)}validate(t,r){var n;Fn(t._source)&&aP(this,sP,"f").validate(t._source,r),Fn(t.date)&&aP(this,oP,"f").validate(t.date,r),Fn(t._count)&&t._count<0&&r.add("Value of count cannot be less than 0"),Fn(t._getpagesoffset)&&t._getpagesoffset<0&&r.add("Value of getpagesoffset cannot be less than 0"),Fn((n=t.supporting_info)===null||n===void 0?void 0:n.value)&&$o(t.supporting_info.value)&&r.add("Supporting Information must have a non-empty value."),Fn(t.status)&&aP(this,uP,"f").validate(t.status,r)}}oP=new WeakMap,sP=new WeakMap,uP=new WeakMap;class EUe extends sa{constructor(){super(...arguments),this.validator=new kZ}}class jZ{validate(t,r){if(!Fo(t.cancelationReason)){if(Fo(t.cancelationReason.coding)||t.cancelationReason.coding.length===0){r.add("cancelationReason must have at least one coding");return}for(const n of t.cancelationReason.coding)(Fo(n?.code)||Fo(n?.system))&&r.add("cancelationReason.coding must have a code and a system")}}}class vUe extends sa{constructor(){super(...arguments),this.validator=new jZ}}class HZ{validate(t,r){var n;Ks((n=t.organization.value)===null||n===void 0?void 0:n.trim())&&r.add("Organization reference is required and must have a non-empty value.")}}class mUe extends sa{constructor(){super(...arguments),this.validator=new HZ}}class YZ{validate(t,r){const n=t.questionnaireResponse;if(Fo(n)){r.add("questionnaireResponse is required");return}if((Ks(n.resourceType)||n.resourceType!=="QuestionnaireResponse")&&r.add('questionnaireResponse.resourceType must be "QuestionnaireResponse"'),Ks(n.status)&&r.add("questionnaireResponse.status is required"),Ks(n.questionnaire)&&r.add("questionnaireResponse.questionnaire is required"),Fo(n.contained)||n.contained.length===0)r.add("questionnaireResponse.contained must have at least one item");else{let i=null;for(const a of n.contained){if(Fo(a)){r.add("questionnaireResponse.contained item cannot be null or undefined");break}if(a.resourceType==="Questionnaire"){i=a;break}}if(Fo(i)){r.add("questionnaireResponse.contained must contain a Questionnaire resource");return}Ks(i.id)&&r.add("questionnaireResponse.contained Questionnaire resource must have an id")}}}class TUe extends sa{constructor(){super(...arguments),this.validator=new YZ}}var cP=function(e,t,r,n){function i(a){return a instanceof r?a:new r(function(u){u(a)})}return new(r||(r=Promise))(function(a,u){function c(p){try{_(n.next(p))}catch(L){u(L)}}function E(p){try{_(n.throw(p))}catch(L){u(L)}}function _(p){p.done?a(p.value):i(p.value).then(c,E)}_((n=n.apply(e,t||[])).next())})};class aG{constructor(t=new Map){this.storage=t}get(t){return cP(this,void 0,void 0,function*(){return this.storage.get(t)})}set(t,r){return cP(this,void 0,void 0,function*(){this.storage.set(t,r)})}delete(t){return cP(this,void 0,void 0,function*(){return this.storage.delete(t)})}}const qZ={logLevel:jC.Error,timeout:3e4,retryPolicy:{attempts:3,interval:1e3},telemetryEnabled:!1,tokenStorage:new aG,language:null,overrides:{unauthedApiUrl:null,authedApiUrl:null}};var Ws;(function(e){e[e.UNSPECIFIED=0]="UNSPECIFIED",e[e.TRACE=1]="TRACE",e[e.TRACE2=2]="TRACE2",e[e.TRACE3=3]="TRACE3",e[e.TRACE4=4]="TRACE4",e[e.DEBUG=5]="DEBUG",e[e.DEBUG2=6]="DEBUG2",e[e.DEBUG3=7]="DEBUG3",e[e.DEBUG4=8]="DEBUG4",e[e.INFO=9]="INFO",e[e.INFO2=10]="INFO2",e[e.INFO3=11]="INFO3",e[e.INFO4=12]="INFO4",e[e.WARN=13]="WARN",e[e.WARN2=14]="WARN2",e[e.WARN3=15]="WARN3",e[e.WARN4=16]="WARN4",e[e.ERROR=17]="ERROR",e[e.ERROR2=18]="ERROR2",e[e.ERROR3=19]="ERROR3",e[e.ERROR4=20]="ERROR4",e[e.FATAL=21]="FATAL",e[e.FATAL2=22]="FATAL2",e[e.FATAL3=23]="FATAL3",e[e.FATAL4=24]="FATAL4"})(Ws||(Ws={}));var KZ=function(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r},oG=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},Zp,Mr;(function(e){e[e.VERBOSE=0]="VERBOSE",e[e.DEBUG=1]="DEBUG",e[e.INFO=2]="INFO",e[e.WARN=3]="WARN",e[e.ERROR=4]="ERROR",e[e.FATAL=5]="FATAL"})(Mr||(Mr={}));const WZ={[Mr.VERBOSE]:"VERBOSE",[Mr.DEBUG]:"DEBUG",[Mr.INFO]:"INFO",[Mr.WARN]:"WARN",[Mr.ERROR]:"ERROR",[Mr.FATAL]:"FATAL"};class n_{constructor(t){Zp.set(this,void 0),KZ(this,Zp,t,"f")}get severity(){return oG(this,Zp,"f")}shouldLog(t){return t>=oG(this,Zp,"f")}static severityText(t){return WZ[t]}static severityFromText(t){switch(t){case"VERBOSE":return Mr.VERBOSE;case"DEBUG":return Mr.DEBUG;case"INFO":return Mr.INFO;case"WARN":return Mr.WARN;case"ERROR":return Mr.ERROR;case"FATAL":return Mr.FATAL;default:throw new Error(`Invalid severity text: ${t}`)}}}Zp=new WeakMap;var lP=function(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r},Es=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},Fu,sG,wm,eh,Um,il;class uG{constructor(t,r,n){Fu.add(this),wm.set(this,void 0),eh.set(this,void 0),Um.set(this,void 0),lP(this,wm,n,"f"),lP(this,eh,new n_(t),"f"),lP(this,Um,r,"f")}name(){return Es(this,wm,"f")}severity(){return Es(this,eh,"f").severity}verbose(t,r){Es(this,Fu,"m",il).call(this,Mr.VERBOSE,t,r)}debug(t,r){Es(this,Fu,"m",il).call(this,Mr.DEBUG,t,r)}info(t,r){Es(this,Fu,"m",il).call(this,Mr.INFO,t,r)}warn(t,r){Es(this,Fu,"m",il).call(this,Mr.WARN,t,r)}error(t,r){let n;r instanceof Kt&&(n={error:r.failure()?r.error().message:r.data()}),r instanceof Error&&(n={error:r.message}),n===void 0&&(n=r),Es(this,Fu,"m",il).call(this,Mr.ERROR,t,n)}fatal(t,r){Es(this,Fu,"m",il).call(this,Mr.FATAL,t,r)}static otelSeverityNumber(t){switch(t){case Mr.VERBOSE:return Ws.TRACE;case Mr.DEBUG:return Ws.DEBUG;case Mr.INFO:return Ws.INFO;case Mr.WARN:return Ws.WARN;case Mr.ERROR:return Ws.ERROR;case Mr.FATAL:return Ws.FATAL;default:return Ws.UNSPECIFIED}}}sG=uG,wm=new WeakMap,eh=new WeakMap,Um=new WeakMap,Fu=new WeakSet,il=function(t,r,n){!Es(this,eh,"f").shouldLog(t)||Es(this,Um,"f").emit({timestamp:Date.now(),severityNumber:sG.otelSeverityNumber(t),severityText:n_.severityText(t),body:r,attributes:n??{}})};var cG=function(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r},lG=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},xm,Fm;class QZ{constructor(t,r){xm.set(this,void 0),Fm.set(this,void 0),cG(this,Fm,t,"f"),cG(this,xm,r.loggerProvider(),"f")}getLogger(t){const r=t??"default",n=lG(this,xm,"f").getLogger(r);return new uG(lG(this,Fm,"f"),n,r)}}xm=new WeakMap,Fm=new WeakMap;class zZ{format(t,r,n,i){let u=`[${new Date().toISOString()}] ${n_.severityText(t)}`;return n!==void 0&&(u+=` (${n})`),u+=`: ${r}`,i===void 0?[u]:[u,i]}}var fP=function(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r},di=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},vs,ms,Qs;class XZ{constructor(t,r){vs.set(this,void 0),ms.set(this,void 0),Qs.set(this,void 0),fP(this,ms,new n_(t),"f"),fP(this,vs,r,"f"),fP(this,Qs,new zZ,"f")}name(){return di(this,vs,"f")}severity(){return di(this,ms,"f").severity}verbose(t,r){di(this,ms,"f").shouldLog(Mr.VERBOSE)&&console.debug(...di(this,Qs,"f").format(Mr.VERBOSE,t,di(this,vs,"f"),r))}debug(t,r){di(this,ms,"f").shouldLog(Mr.DEBUG)&&console.debug(...di(this,Qs,"f").format(Mr.DEBUG,t,di(this,vs,"f"),r))}info(t,r){di(this,ms,"f").shouldLog(Mr.INFO)&&console.info(...di(this,Qs,"f").format(Mr.INFO,t,di(this,vs,"f"),r))}warn(t,r){di(this,ms,"f").shouldLog(Mr.WARN)&&console.warn(...di(this,Qs,"f").format(Mr.WARN,t,di(this,vs,"f"),r))}error(t,r){let n=r;r instanceof Kt&&(n=r.failure()?r.error():r.data()),di(this,ms,"f").shouldLog(Mr.ERROR)&&console.error(...di(this,Qs,"f").format(Mr.ERROR,t,di(this,vs,"f"),n))}fatal(t,r){di(this,ms,"f").shouldLog(Mr.FATAL)&&console.error(...di(this,Qs,"f").format(Mr.FATAL,t,di(this,vs,"f"),r))}}vs=new WeakMap,ms=new WeakMap,Qs=new WeakMap;var JZ=function(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r},ZZ=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},$m;class ji{constructor(t=Mr.FATAL){$m.set(this,void 0),JZ(this,$m,t,"f")}getLogger(t){return new XZ(ZZ(this,$m,"f"),t)}}$m=new WeakMap;var eee=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},_P,fG;class tee{constructor(){_P.add(this)}createLogProvider(t,r){switch(eee(this,_P,"m",fG).call(this,t)){case"otel":if(r===void 0)throw new Error('telemetry is required for "otel" logging');return new QZ(t.logLevel,r);case"console":return new ji(t.logLevel)}}}_P=new WeakSet,fG=function(t){return t.telemetry.enabled?"otel":"console"};var Nn=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},zs=function(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r},ao,i_,$u,a_,Vu,al,_G,dG,pG,hG,SG,EG,vG,mG,TG,AG;class Vm{constructor(t){ao.add(this),i_.set(this,void 0),$u.set(this,void 0),a_.set(this,void 0),Vu.set(this,void 0),al.set(this,void 0),this.bwellConfig=Nn(this,ao,"m",SG).call(this,t),zs(this,i_,n_.severityFromText(this.bwellConfig.logLevel),"f"),zs(this,al,Nn(this,ao,"m",AG).call(this),"f"),zs(this,a_,Nn(this,ao,"m",vG).call(this),"f"),zs(this,$u,Nn(this,ao,"m",mG).call(this),"f"),zs(this,Vu,Nn(this,ao,"m",TG).call(this),"f")}static initialize(t){try{const r=new Vm(t);return Kt.success(r)}catch(r){if(Bi.isBwellError(r))return Kt.failure(r);throw r}}get logLevel(){return Nn(this,i_,"f")}get graphQL(){return Nn(this,a_,"f")}get telemetry(){return Nn(this,$u,"f")}get http(){return Nn(this,Vu,"f")}get context(){return Nn(this,al,"f")}setContextUser(t){Nn(this,al,"f").user=t}mergeRemoteConfig(t){zs(this,i_,Nn(this,ao,"m",_G).call(this,t),"f"),zs(this,a_,Nn(this,ao,"m",dG).call(this,t),"f"),zs(this,$u,Object.freeze(Nn(this,ao,"m",pG).call(this,t)),"f"),zs(this,Vu,Object.freeze(Nn(this,ao,"m",hG).call(this,t)),"f")}}i_=new WeakMap,$u=new WeakMap,a_=new WeakMap,Vu=new WeakMap,al=new WeakMap,ao=new WeakSet,_G=function(t){var r;const n=(r=t?.logLevel)!==null&&r!==void 0?r:null;return n===null?Nn(this,i_,"f"):n_.severityFromText(n)},dG=function(t){var r;const n=(r=t?.graphQLClient)!==null&&r!==void 0?r:null;if(n===null)return Nn(this,a_,"f");const{authedApiUrl:i,unauthedApiUrl:a}=this.bwellConfig.overrides;return{unauthApiUrl:a??n.url,apiUrl:i??n.authUrl}},pG=function(t){var r,n;const i=(r=t?.telemetry)!==null&&r!==void 0?r:null;if(i===null)return Nn(this,$u,"f");const a=(n=i.enabled)!==null&&n!==void 0?n:Nn(this,$u,"f").enabled;if(i.collectorUrl.endsWith("/"))throw new Error('Telemetry config "collectorUrl" cannot end with a trailing slash.');let u;try{u=new URL(i.collectorUrl)}catch{throw new Error('Telemetry config "collectorUrl" malformed/is not a proper URL.')}if(u.pathname!=="/")throw new Error('Telemetry config "collectorUrl" cannot contain a path.');return Object.assign(Object.assign({},Nn(this,$u,"f")),{enabled:a,collectorUrl:i.collectorUrl})},hG=function(t){var r,n,i;const a=(r=t?.httpClient)!==null&&r!==void 0?r:null;return a===null?Nn(this,Vu,"f"):{timeout:(n=a.requestTimeout)!==null&&n!==void 0?n:Nn(this,Vu,"f").timeout,retryPolicy:(i=a.retry)!==null&&i!==void 0?i:Nn(this,Vu,"f").retryPolicy}},SG=function(t){return Object.assign(Object.assign({},qZ),t)},EG=function(){try{return w9(this.bwellConfig.clientKey)}catch{throw new y9("It appears there is a problem with your Client Key. Contact b.well support for further assistance.")}},vG=function(){var t,r;return{apiUrl:(t=this.bwellConfig.overrides.authedApiUrl)!==null&&t!==void 0?t:`https://api-gateway.${Nn(this,al,"f").env}.icanbwell.com/federated-graph-authed/graphql`,unauthApiUrl:(r=this.bwellConfig.overrides.unauthedApiUrl)!==null&&r!==void 0?r:`https://api-gateway.${Nn(this,al,"f").env}.icanbwell.com/federated-graph/graphql`}},mG=function(){return{collectorUrl:"https://collector.services.icanbwell.com",enabled:this.bwellConfig.telemetryEnabled,timeout:this.bwellConfig.timeout}},TG=function(){return{timeout:this.bwellConfig.timeout,retryPolicy:{attempts:this.bwellConfig.retryPolicy.attempts,interval:this.bwellConfig.retryPolicy.interval}}},AG=function(){return{clientKey:this.bwellConfig.clientKey,env:Nn(this,ao,"m",EG).call(this),user:null}};var ree=function(e,t,r,n){function i(a){return a instanceof r?a:new r(function(u){u(a)})}return new(r||(r=Promise))(function(a,u){function c(p){try{_(n.next(p))}catch(L){u(L)}}function E(p){try{_(n.throw(p))}catch(L){u(L)}}function _(p){p.done?a(p.value):i(p.value).then(c,E)}_((n=n.apply(e,t||[])).next())})},gG=function(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r},Gm=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},o_,Bm;class nee{constructor(t,r=new ji){o_.set(this,void 0),Bm.set(this,void 0),gG(this,Bm,t,"f"),gG(this,o_,r.getLogger("ConfigManager"),"f")}initialize(t){return ree(this,void 0,void 0,function*(){const r=Vm.initialize(t);if(r.failure())return r;const n=r.data();Gm(this,o_,"f").verbose("Initializing SDK Configuration");const i=yield Gm(this,Bm,"f").initialize(n.context.clientKey);if(i.failure())return i.intoFailure();const a=i.data();try{n.mergeRemoteConfig(a)}catch(u){Gm(this,o_,"f").error("Error merging SDK config with remote config.",u)}return Gm(this,o_,"f").info("Remote SDK Configuration merged with user config"),Kt.success(n)})}}o_=new WeakMap,Bm=new WeakMap;const dP=JSON,iee=e=>e.toUpperCase(),aee=e=>{const t={};return e.forEach((r,n)=>{t[n]=r}),t},oee=(e,t,r)=>e.document?e:{document:e,variables:t,requestHeaders:r,signal:void 0},see=(e,t,r)=>e.query?e:{query:e,variables:t,requestHeaders:r,signal:void 0},uee=(e,t)=>e.documents?e:{documents:e,requestHeaders:t,signal:void 0},AUe=(e,t,...r)=>{const[n,i]=r;return e.document?e:{url:e,document:t,variables:n,requestHeaders:i,signal:void 0}},gUe=(e,t,...r)=>{const[n,i]=r;return e.query?e:{url:e,query:t,variables:n,requestHeaders:i,signal:void 0}};var cee=h(5157),lee=h(2704);const yG=e=>{let t;const r=e.definitions.filter(n=>n.kind==="OperationDefinition");return r.length===1&&(t=r[0]?.name?.value),t},km=e=>{if(typeof e=="string"){let r;try{const n=(0,cee.qg)(e);r=yG(n)}catch{}return{query:e,operationName:r}}const t=yG(e);return{query:(0,lee.y)(e),operationName:t}};class Gu extends Error{constructor(t,r){const n=`${Gu.extractMessage(t)}: ${JSON.stringify({response:t,request:r})}`;super(n),Object.setPrototypeOf(this,Gu.prototype),this.response=t,this.request=r,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,Gu)}static extractMessage(t){return t.errors?.[0]?.message??`GraphQL Error (Code: ${t.status})`}}var s_=h(288),fee=h.t(s_,2);const _ee="connection_init",dee="connection_ack",RG="ping",OG="pong",pee="subscribe",hee="next",See="error",bG="complete";class Bu{get type(){return this._type}get id(){return this._id}get payload(){return this._payload}constructor(t,r,n){this._type=t,this._payload=r,this._id=n}get text(){const t={type:this.type};return this.id!=null&&this.id!=null&&(t.id=this.id),this.payload!=null&&this.payload!=null&&(t.payload=this.payload),JSON.stringify(t)}static parse(t,r){const{type:n,payload:i,id:a}=JSON.parse(t);return new Bu(n,r(i),a)}}class Eee{constructor(t,{onInit:r,onAcknowledged:n,onPing:i,onPong:a}){this.socketState={acknowledged:!1,lastRequestId:0,subscriptions:{}},this.socket=t,t.addEventListener("open",async u=>{this.socketState.acknowledged=!1,this.socketState.subscriptions={},t.send(mee(r?await r():null).text)}),t.addEventListener("close",u=>{this.socketState.acknowledged=!1,this.socketState.subscriptions={}}),t.addEventListener("error",u=>{console.error(u)}),t.addEventListener("message",u=>{try{const c=vee(u.data);switch(c.type){case dee:{this.socketState.acknowledged?console.warn("Duplicate CONNECTION_ACK message ignored"):(this.socketState.acknowledged=!0,n&&n(c.payload));return}case RG:{i?i(c.payload).then(L=>t.send(CG(L).text)):t.send(CG(null).text);return}case OG:{a&&a(c.payload);return}}if(!this.socketState.acknowledged||c.id===void 0||c.id===null||!this.socketState.subscriptions[c.id])return;const{query:E,variables:_,subscriber:p}=this.socketState.subscriptions[c.id];switch(c.type){case hee:{!c.payload.errors&&c.payload.data&&p.next&&p.next(c.payload.data),c.payload.errors&&p.error&&p.error(new Gu({...c.payload,status:200},{query:E,variables:_}));return}case See:{p.error&&p.error(new Gu({errors:c.payload,status:200},{query:E,variables:_}));return}case bG:{p.complete&&p.complete(),delete this.socketState.subscriptions[c.id];return}}}catch(c){console.error(c),t.close(1006)}t.close(4400,"Unknown graphql-ws message.")})}makeSubscribe(t,r,n,i){const a=(this.socketState.lastRequestId++).toString();return this.socketState.subscriptions[a]={query:t,variables:i,subscriber:n},this.socket.send(Aee(a,{query:t,operationName:r,variables:i}).text),()=>{this.socket.send(gee(a).text),delete this.socketState.subscriptions[a]}}rawRequest(t,r){return new Promise((n,i)=>{let a;this.rawSubscribe(t,{next:(u,c)=>a={data:u,extensions:c},error:i,complete:()=>n(a)},r)})}request(t,r){return new Promise((n,i)=>{let a;this.subscribe(t,{next:u=>a=u,error:i,complete:()=>n(a)},r)})}subscribe(t,r,n){const{query:i,operationName:a}=km(t);return this.makeSubscribe(i,a,r,n)}rawSubscribe(t,r,n){return this.makeSubscribe(t,void 0,r,n)}ping(t){this.socket.send(Tee(t).text)}close(){this.socket.close(1e3)}}Eee.PROTOCOL="graphql-transport-ws";function vee(e,t=r=>r){return Bu.parse(e,t)}function mee(e){return new Bu(_ee,e)}function Tee(e){return new Bu(RG,e,void 0)}function CG(e){return new Bu(OG,e,void 0)}function Aee(e,t){return new Bu(pee,t,e)}function gee(e){return new Bu(bG,void 0,e)}const u_=e=>{let t={};return e&&(typeof Headers<"u"&&e instanceof Headers||fee&&s_.Headers&&e instanceof s_.Headers?t=aee(e):Array.isArray(e)?e.forEach(([r,n])=>{r&&n!==void 0&&(t[r]=n)}):t=e),t},PG=e=>e.replace(/([\s,]|#[^\n\r]+)+/g," ").trim(),yee=e=>{if(!Array.isArray(e.query)){const n=e,i=[`query=${encodeURIComponent(PG(n.query))}`];return e.variables&&i.push(`variables=${encodeURIComponent(n.jsonSerializer.stringify(n.variables))}`),n.operationName&&i.push(`operationName=${encodeURIComponent(n.operationName)}`),i.join("&")}if(typeof e.variables<"u"&&!Array.isArray(e.variables))throw new Error("Cannot create query with given variable type, array expected");const t=e,r=e.query.reduce((n,i,a)=>(n.push({query:PG(i),variables:t.variables?t.jsonSerializer.stringify(t.variables[a]):void 0}),n),[]);return`query=${encodeURIComponent(t.jsonSerializer.stringify(r))}`},Ree=e=>async t=>{const{url:r,query:n,variables:i,operationName:a,fetch:u,fetchOptions:c,middleware:E}=t,_={...t.headers};let p="",L;e==="POST"?(L=bee(n,i,a,c.jsonSerializer),typeof L=="string"&&(_["Content-Type"]="application/json")):p=yee({query:n,variables:i,operationName:a,jsonSerializer:c.jsonSerializer??dP});const W={method:e,headers:_,body:L,...c};let ve=r,me=W;if(E){const Oe=await Promise.resolve(E({...W,url:r,operationName:a,variables:i})),{url:He,...qe}=Oe;ve=He,me=qe}return p&&(ve=`${ve}?${p}`),await u(ve,me)};class jm{constructor(t,r={}){this.url=t,this.requestConfig=r,this.rawRequest=async(...n)=>{const[i,a,u]=n,c=see(i,a,u),{headers:E,fetch:_=s_,method:p="POST",requestMiddleware:L,responseMiddleware:W,...ve}=this.requestConfig,{url:me}=this;c.signal!==void 0&&(ve.signal=c.signal);const{operationName:Oe}=km(c.query);return pP({url:me,query:c.query,variables:c.variables,headers:{...u_(hP(E)),...u_(c.requestHeaders)},operationName:Oe,fetch:_,method:p,fetchOptions:ve,middleware:L}).then(He=>(W&&W(He),He)).catch(He=>{throw W&&W(He),He})}}async request(t,...r){const[n,i]=r,a=oee(t,n,i),{headers:u,fetch:c=s_,method:E="POST",requestMiddleware:_,responseMiddleware:p,...L}=this.requestConfig,{url:W}=this;a.signal!==void 0&&(L.signal=a.signal);const{query:ve,operationName:me}=km(a.document);return pP({url:W,query:ve,variables:a.variables,headers:{...u_(hP(u)),...u_(a.requestHeaders)},operationName:me,fetch:c,method:E,fetchOptions:L,middleware:_}).then(Oe=>(p&&p(Oe),Oe.data)).catch(Oe=>{throw p&&p(Oe),Oe})}batchRequests(t,r){const n=uee(t,r),{headers:i,...a}=this.requestConfig;n.signal!==void 0&&(a.signal=n.signal);const u=n.documents.map(({document:E})=>km(E).query),c=n.documents.map(({variables:E})=>E);return pP({url:this.url,query:u,variables:c,headers:{...u_(hP(i)),...u_(n.requestHeaders)},operationName:void 0,fetch:this.requestConfig.fetch??s_,method:this.requestConfig.method||"POST",fetchOptions:a,middleware:this.requestConfig.requestMiddleware}).then(E=>(this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(E),E.data)).catch(E=>{throw this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(E),E})}setHeaders(t){return this.requestConfig.headers=t,this}setHeader(t,r){const{headers:n}=this.requestConfig;return n?n[t]=r:this.requestConfig.headers={[t]:r},this}setEndpoint(t){return this.url=t,this}}const pP=async e=>{const{query:t,variables:r,fetchOptions:n}=e,i=Ree(iee(e.method??"post")),a=Array.isArray(e.query),u=await i(e),c=await Cee(u,n.jsonSerializer??dP),E=Array.isArray(c)?!c.some(({data:p})=>!p):Boolean(c.data),_=Array.isArray(c)||!c.errors||Array.isArray(c.errors)&&!c.errors.length||n.errorPolicy==="all"||n.errorPolicy==="ignore";if(u.ok&&_&&E){const{errors:p,...L}=(Array.isArray(c),c),W=n.errorPolicy==="ignore"?L:c;return{...a?{data:W}:W,headers:u.headers,status:u.status}}else{const p=typeof c=="string"?{error:c}:c;throw new Gu({...p,status:u.status,headers:u.headers},{query:t,variables:r})}},yUe=async(...e)=>{const[t,r,...n]=e,i=parseRawRequestExtendedArgs(t,r,...n);return new jm(i.url).rawRequest({...i})};async function RUe(e,t,...r){const n=parseRequestExtendedArgs(e,t,...r);return new jm(n.url).request({...n})}const OUe=async(...e)=>{const t=Oee(e);return new jm(t.url).batchRequests(t)},Oee=e=>e.length===1?e[0]:{url:e[0],documents:e[1],requestHeaders:e[2],signal:void 0},bee=(e,t,r,n)=>{const i=n??dP;if(!Array.isArray(e))return i.stringify({query:e,variables:t,operationName:r});if(typeof t<"u"&&!Array.isArray(t))throw new Error("Cannot create request body with given variable type, array expected");const a=e.reduce((u,c,E)=>(u.push({query:c,variables:t?t[E]:void 0}),u),[]);return i.stringify(a)},Cee=async(e,t)=>{let r;return e.headers.forEach((n,i)=>{i.toLowerCase()==="content-type"&&(r=n)}),r&&(r.toLowerCase().startsWith("application/json")||r.toLowerCase().startsWith("application/graphql+json")||r.toLowerCase().startsWith("application/graphql-response+json"))?t.parse(await e.text()):e.text()},hP=e=>typeof e=="function"?e():e,bUe=(e,...t)=>e.reduce((r,n,i)=>`${r}${n}${i in t?String(t[i]):""}`,""),CUe=null,Hi=`
|
|
5344
|
+
`));function hwe(e){const t=Object.assign(Object.assign({},el),e);return Apollo.useQuery(k$,t)}function Swe(e){const t=Object.assign(Object.assign({},el),e);return Apollo.useLazyQuery(k$,t)}const Ewe=e=>useMutation(CreateOauthThirdPartyConnection,e),vwe=e=>useMutation(DisconnectUserToken,e),mwe=e=>useMutation(CreateConnectionStatus,e),Twe=e=>useQuery(GetMemberConnections,e),Awe=e=>useQuery(GetConnections,e),gwe=e=>useQuery(GetConnection,e),ywe=e=>useLazyQuery(GetConnection,e),Rwe=e=>useQuery(GetOauthGeneratedUrl,e);var j$=h(46),Hp,Sm;class H${constructor(){this.type="backend",Hp.set(this,void 0),Sm.set(this,void 0)}init(t,{clientSlug:r,apiClient:n}){if(!n)throw t.logger.error('"apiClient" not supplied to "QueryBackend".'),new Error('"apiClient" required for "QueryBackend".');wu(this,Hp,r,"f"),wu(this,Sm,fU(n),"f")}read(t,r,n){return om(this,void 0,void 0,function*(){try{const{translation:i}=yield Jr(this,Sm,"f").getClientTranslations({name:Jr(this,Hp,"f"),key:r,lang:t});n(null,i?.json||{})}catch{const a=`Error fetching translation with key "${r}" and client "${Jr(this,Hp,"f")||"N/A"}".`;n(a,null)}})}}Hp=new WeakMap,Sm=new WeakMap,H$.type="backend";var Xf;class Y${constructor(t){this.type="logger",Xf.set(this,void 0),wu(this,Xf,t,"f")}log([t,r,...n]){Jr(this,Xf,"f").info({meta:r},t,...n)}warn([t,r,...n]){Jr(this,Xf,"f").error({meta:r},t,...n)}error([t,r,...n]){Jr(this,Xf,"f").error({meta:r},t,...n)}}Xf=new WeakMap,Y$.type="logger";var Em,vm,tl,Yp,Ii,rl;const q$="appLanguage";class Pa{constructor({keys:t,nativeBridge:r,fallbackKeys:n=[],defaultLanguage:i="en",logger:a,parent:u,debug:c=!1,remoteConfig:E={}}){tl.set(this,void 0),Yp.set(this,void 0),Ii.set(this,void 0),rl.set(this,void 0),wu(this,tl,t,"f"),wu(this,Yp,n,"f"),wu(this,rl,r,"f");const _={lng:i,fallbackNS:Jr(this,Yp,"f"),debug:c,defaultNS:t,returnNull:!1};u?wu(this,Ii,u.cloneInstance(_),"f"):(wu(this,Ii,ea.createInstance(),"f"),a&&Jr(this,Ii,"f").use(new Y$(a.child({library:"@icanbwell/i18n"}))),E.apiClient&&Jr(this,Ii,"f").use(H$),Jr(this,Ii,"f").init(Object.assign(Object.assign({},_),{fallbackLng:!1,partialBundledLanguages:!0,ns:[],resources:{},backend:E,saveMissing:!0,missingKeyHandler:(p,L,W)=>Jr(this,Ii,"f").services.logger.error(`missing key: ${W}; language: ${p}; key: ${L}`)}))),this.t=Jr(this,Ii,"f").t,Pa.resolvedLanguage=Jr(this,Ii,"f").resolvedLanguage||i}load(){var t;return om(this,void 0,void 0,function*(){const r=(yield(t=Jr(this,rl,"f"))===null||t===void 0?void 0:t.storage.getItem(q$))||Pa.resolvedLanguage;r!==Pa.resolvedLanguage&&(yield Jr(this,Ii,"f").changeLanguage(r),Pa.resolvedLanguage=r),yield Jr(this,Ii,"f").loadNamespaces(Jr(this,tl,"f"));const n=Jr(this,tl,"f").filter(i=>!Jr(this,Ii,"f").hasResourceBundle(r,i));if(n.length)throw new Error(`Error loading translations for key(s): ${n.join(", ")}`);return Jr(Pa,Em,"f",vm).emit("changeLanguage",r),this})}child(t){return new Pa(Object.assign(Object.assign({},t),{nativeBridge:Jr(this,rl,"f"),fallbackKeys:[...Jr(this,Yp,"f"),...Jr(this,tl,"f")],parent:Jr(this,Ii,"f"),defaultLanguage:Jr(this,Ii,"f").language}))}get isLoaded(){return Jr(this,tl,"f").every(t=>Jr(this,Ii,"f").hasResourceBundle(Jr(this,Ii,"f").language,t))}changeLanguage(t){var r;return om(this,void 0,void 0,function*(){Pa.resolvedLanguage=t,yield Jr(this,Ii,"f").changeLanguage(t),Jr(Pa,Em,"f",vm).emit("changeLanguage",t),yield(r=Jr(this,rl,"f"))===null||r===void 0?void 0:r.storage.setItem(q$,t),Jr(this,rl,"f").reloadView()})}get resolvedLanguage(){return Pa.resolvedLanguage}onChangeLanguage(t){Jr(Pa,Em,"f",vm).on("changeLanguage",t)}}Em=Pa,tl=new WeakMap,Yp=new WeakMap,Ii=new WeakMap,rl=new WeakMap,vm={value:new j$},Pa.resolvedLanguage="en";var NC=h(1827),qp;(function(e){e.one="1.0.0"})(qp||(qp={}));const mm="orchestrator:native-bridge",E9={id:mm,dependencies:{featureServices:{}},create:()=>({[qp.one]:()=>({featureService:NC.b})})};var Kp;(function(e){e.one="1.0.0"})(Kp||(Kp={}));const Tm="orchestrator:translation-service",v9={id:Tm,dependencies:{featureServices:{[za]:Nr.one,[ks]:Mu.one,[Wn]:vi.one,[Mp]:kf.one,[mm]:qp.one}},create:({featureServices:e})=>{const t=e[za],r=e[ks],n=e[Mp],{slug:i}=e[Wn].getClientContext(),a=e[mm],u=new Pa({keys:[],nativeBridge:a,defaultLanguage:"en",logger:r,remoteConfig:{clientSlug:i,apiClient:t}});return n.setProfileProperties({language:u.resolvedLanguage}),u.onChangeLanguage(c=>n.setProfileProperties({language:c})),{[Kp.one]:()=>({featureService:u})}}};var Jf,Zf,Am,nl;const gm="tokens";class m9{constructor({apiClient:t,stateService:r,identityGatewaySdk:n,storage:i}){Jf.set(this,void 0),Zf.set(this,void 0),Am.set(this,void 0),nl.set(this,void 0),(0,F.GG)(this,Jf,t,"f"),(0,F.GG)(this,Zf,r,"f"),(0,F.GG)(this,Am,n,"f"),(0,F.GG)(this,nl,i,"f")}getStoredTokens(){const t=(0,F.gn)(this,nl,"f").getItem(gm);return t?JSON.parse(t):void 0}removeStoredTokens(){(0,F.gn)(this,nl,"f").removeItem(gm)}storeTokens(t){(0,F.gn)(this,nl,"f").setItem(gm,JSON.stringify(t))}logout(){return(0,F.sH)(this,void 0,void 0,function*(){const t=(0,F.gn)(this,Zf,"f").getUserTokenData().accessToken.jwtToken,{key:r,variant:n}=(0,F.gn)(this,Zf,"f").getClientContext();n!==te.GUEST&&(yield(0,F.gn)(this,Am,"f").logout({accessToken:t},{context:{headers:{clientKey:r}}})),(0,F.gn)(this,Jf,"f").stop(),(0,F.gn)(this,Jf,"f").clearAuth(),yield(0,F.gn)(this,Jf,"f").clearStore(),(0,F.gn)(this,Zf,"f").logoutUser(),(0,F.gn)(this,nl,"f").removeItem(gm)})}}Jf=new WeakMap,Zf=new WeakMap,Am=new WeakMap,nl=new WeakMap;var ym;(function(e){e.one="1.0.0"})(ym||(ym={}));const K$="orchestrator:identity-utils",T9={id:K$,dependencies:{featureServices:{[za]:Nr.one,[ks]:Mu.one,[Wn]:vi.one,[Mp]:kf.one}},create:({featureServices:e})=>{const t=e[za];return{[ym.one]:()=>({featureService:new m9({apiClient:t,stateService:e[Wn],identityGatewaySdk:mx(t),storage:window.sessionStorage})})}}};var Rm;(function(e){e.one="1.0.0"})(Rm||(Rm={}));const W$="orchestrator:globaleventemitter-service",A9=e=>({id:W$,create:()=>({[Rm.one]:()=>({featureService:e})})});var Om;(function(e){e.one="1.0.0"})(Om||(Om={}));const Q$="orchestrator:reboot-controller",g9=e=>({id:Q$,create:()=>({[Om.one]:()=>({featureService:e})})});class Bi extends Error{constructor(t,r){super(t),this.name="BWellError",r?.cause&&(this.cause=r.cause)}static isBwellError(t){return t instanceof Bi}}class Owe extends Bi{constructor(t="Authentication Error"){super(t),this.name="AuthenticationError"}}class bwe extends Bi{constructor(t="Illegal Argument Error"){super(t),this.name="IllegalArgumentError"}}class Cwe extends Bi{constructor(t="Illegal State Error"){super(t),this.name="IllegalStateError"}}class y9 extends Bi{constructor(t="Invalid Client Key Error"){super(t),this.name="InvalidClientKeyError"}}class LC extends Bi{constructor(t,r){super(t),this.credentials=r,this.name="InvalidCredentialsTypeError"}}class e_ extends Bi{constructor(t="Invalid Token Error"){super(t),this.name="InvalidTokenError"}}class R9 extends Bi{constructor(t,r){super(t),this.status=r,this.name="NetworkError"}}class O9 extends Bi{constructor(t){super(t.message()),this.operationOutcome=t,this.name="OperationOutcomeError"}}class DC extends Bi{constructor(t,r){super(t),this.data=r,this.name="UnknownError"}}class b9 extends Bi{constructor(t){super(t.join(". ")),this.errors=t,this.name="ValidationError"}}class tr{constructor(t,r){this.data=t,r!==null&&(this.error=r)}hasError(){return this.error!==void 0}static error(t){return new tr(void 0,t)}}var z$=function(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r},bm=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},Wp,Qp;class Kt{static success(t){return new C9(t)}static failure(t){return new Cm(t)}}class C9 extends Kt{constructor(t){super(),Wp.set(this,void 0),z$(this,Wp,t,"f")}data(){return bm(this,Wp,"f")}error(){throw bm(this,Wp,"f")}success(){return!0}failure(){return!1}toQueryResult(){return new tr(this.data())}}Wp=new WeakMap;class Cm extends Kt{constructor(t){super(),Qp.set(this,void 0),z$(this,Qp,t,"f")}data(){throw bm(this,Qp,"f")}error(){return bm(this,Qp,"f")}success(){return!1}failure(){return!0}intoFailure(){return Kt.failure(this.error())}toQueryResult(){return new tr(void 0,this.error())}}Qp=new WeakMap;var wC=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},zp;class P9{constructor(){zp.set(this,[])}add(t){wC(this,zp,"f").push(t)}errors(){return wC(this,zp,"f")}hasErrors(){return wC(this,zp,"f").length>0}}zp=new WeakMap;var X$=function(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r},UC=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},Xp,Pm;class M9{constructor(t){Xp.set(this,void 0),Pm.set(this,void 0),X$(this,Pm,t,"f"),X$(this,Xp,this.transformInput(t),"f")}validate(){return Kt.success(null)}data(){return UC(this,Xp,"f")}toJSON(){return UC(this,Xp,"f")}transformInput(t){return t}input(){return UC(this,Pm,"f")}}Xp=new WeakMap,Pm=new WeakMap;class sa extends M9{validate(){const t=new P9;return this.validator.validate(this.input(),t),t.hasErrors()?Kt.failure(new b9(t.errors())):Kt.success(null)}}var J$=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},Mm,Z$,eV;const tV=100,I9=20;class Ys{constructor(){Mm.add(this)}validate(t,r){J$(this,Mm,"m",Z$).call(this,t.page,r),J$(this,Mm,"m",eV).call(this,t.pageSize,r)}}Mm=new WeakSet,Z$=function(t,r){t<0&&r.add("page must be a positive number")},eV=function(t,r){t!==void 0&&(t<=0&&r.add("Page size must be greater than 0"),t>tV&&r.add(`Page size must not exceed ${tV}`))};class qs extends sa{constructor(){super(...arguments),this.validator=new Ys}transformInput(t){return Object.assign({pageSize:I9},t)}}function N9(){var e;return!(typeof process>"u"||((e=process.versions)===null||e===void 0?void 0:e.node)===void 0)}function L9(){return typeof window<"u"}function rV(){if(L9())return"browser";if(N9())return"node";throw new Error("Invalid runtime")}function D9(e){switch(rV()){case"browser":return e.browser();case"node":return e.node()}}function nV(e){switch(rV()){case"node":return Buffer.from(e,"base64").toString("utf-8");case"browser":return atob(e)}}function Fn(e){return e!=null}function Fo(e){return e==null}function Pwe(e){return Fn(e)&&e!==""}function Ks(e){return e==null||e===""}function ka(e){return e===void 0}function ki(e){return e!==void 0}function w9(e){return JSON.parse(nV(e)).env}const U9=3;function iV(e){const t=e.split("."),r=t[1];if(r===void 0||t.length!==U9)throw new e_("Token is missing data and may be corrupted");try{return JSON.parse(nV(r))}catch(n){const i=n;throw new e_(`Unable to parse token payload: ${i.name} - ${i.message}`)}}function x9(e){const r=iV(e).exp;if(typeof r!="number")throw new e_("The access token is missing an expiration date and is most likely corrupted.");return r*1e3}const F9="custom:clientFhirPersonId",$9="custom:bwellFhirPatientId";function V9(e){const t=iV(e),r=t[$9],n=t[F9];return Fn(r)&&Fn(n)?{bwellFhirPersonId:r,clientFhirPersonId:n}:null}function $o(e){return e.trim()===""}const G9="1.35.0";function B9(){return G9}var xC;(function(e){e.Arrived="ARRIVED",e.Booked="BOOKED",e.Cancelled="CANCELLED",e.CheckedIn="CHECKED_IN",e.EnteredInError="ENTERED_IN_ERROR",e.Fulfilled="FULFILLED",e.Noshow="NOSHOW",e.Pending="PENDING",e.Proposed="PROPOSED",e.Waitlist="WAITLIST"})(xC||(xC={}));var aV;(function(e){e.Guest="GUEST"})(aV||(aV={}));var Im;(function(e){e.CommunicationPreferencesPhi="COMMUNICATION_PREFERENCES_PHI",e.DataSharing="DATA_SHARING",e.HealthCircleAdolescent="HEALTH_CIRCLE_ADOLESCENT",e.HealthCircleMinor="HEALTH_CIRCLE_MINOR",e.HealthMatch="HEALTH_MATCH",e.IasImportRecords="IAS_IMPORT_RECORDS",e.MobileCommunicationPreferences="MOBILE_COMMUNICATION_PREFERENCES",e.PersonalizedHealthOffersAndAds="PERSONALIZED_HEALTH_OFFERS_AND_ADS",e.ProaAttestation="PROA_ATTESTATION",e.Tos="TOS"})(Im||(Im={}));var oV;(function(e){e.Bwell="bwell"})(oV||(oV={}));var sV;(function(e){e.Bwell="BWELL"})(sV||(sV={}));var uV;(function(e){e.Basic="BASIC",e.Oauth="OAUTH"})(uV||(uV={}));var FC;(function(e){e.Deny="DENY",e.Permit="PERMIT"})(FC||(FC={}));var $C;(function(e){e.Active="ACTIVE",e.Draft="DRAFT",e.EnteredInError="ENTERED_IN_ERROR",e.Inactive="INACTIVE",e.Proposed="PROPOSED",e.Rejected="REJECTED"})($C||($C={}));var cV;(function(e){e.Home="home",e.Mobile="mobile",e.Work="work"})(cV||(cV={}));var lV;(function(e){e.Usd="USD"})(lV||(lV={}));var fV;(function(e){e.Connected="CONNECTED",e.Deleted="DELETED",e.Disconnected="DISCONNECTED",e.Error="ERROR",e.Expired="EXPIRED"})(fV||(fV={}));var _V;(function(e){e.Clinical="CLINICAL",e.Insurance="INSURANCE",e.Lab="LAB",e.Pharmacy="PHARMACY",e.Practitioner="PRACTITIONER"})(_V||(_V={}));var Nm;(function(e){e.Connecthub="connecthub",e.Nppes="nppes"})(Nm||(Nm={}));var dV;(function(e){e.Connecthub="CONNECTHUB",e.Nppes="NPPES"})(dV||(dV={}));var pV;(function(e){e.BwellPatient="BWELL_PATIENT",e.BwellPerson="BWELL_PERSON",e.ClientPatient="CLIENT_PATIENT",e.ClientPerson="CLIENT_PERSON"})(pV||(pV={}));var hV;(function(e){e.Active="active",e.EnteredInError="entered_in_error",e.Error="error",e.Off="off",e.Suspended="suspended",e.Test="test"})(hV||(hV={}));var SV;(function(e){e.Active="ACTIVE",e.EnteredInError="ENTERED_IN_ERROR",e.Error="ERROR",e.Off="OFF",e.Suspended="SUSPENDED",e.Test="TEST"})(SV||(SV={}));var VC;(function(e){e.CustomEvent="CUSTOM_EVENT",e.MobilePushOpen="MOBILE_PUSH_OPEN"})(VC||(VC={}));var GC;(function(e){e.Female="female",e.Male="male",e.Other="other",e.Unknown="unknown"})(GC||(GC={}));var BC;(function(e){e.Person="Person"})(BC||(BC={}));var kC;(function(e){e.Characteristic="characteristic",e.Communication="communication",e.Gender="gender",e.Specialty="specialty"})(kC||(kC={}));var EV;(function(e){e.Characteristic="CHARACTERISTIC",e.Communication="COMMUNICATION",e.Gender="GENDER",e.Specialty="SPECIALTY"})(EV||(EV={}));var vV;(function(e){e.Female="female",e.Male="male",e.Other="other",e.Unknown="unknown"})(vV||(vV={}));var mV;(function(e){e.Female="FEMALE",e.Male="MALE",e.Other="OTHER",e.Unknown="UNKNOWN"})(mV||(mV={}));var TV;(function(e){e.Female="female",e.Male="male",e.Other="other",e.Unknown="unknown"})(TV||(TV={}));var AV;(function(e){e.AllergyIntolerance="ALLERGY_INTOLERANCE",e.CarePlan="CARE_PLAN",e.Condition="CONDITION",e.Encounter="ENCOUNTER",e.Immunization="IMMUNIZATION",e.Labs="LABS",e.Medications="MEDICATIONS",e.Procedure="PROCEDURE",e.VitalSigns="VITAL_SIGNS"})(AV||(AV={}));var gV;(function(e){e.Official="_official",e.Old="_old",e.Secondary="_secondary",e.Temp="_temp",e.Usual="_usual"})(gV||(gV={}));var yV;(function(e){e.Clicked="clicked"})(yV||(yV={}));var RV;(function(e){e.Clicked="CLICKED"})(RV||(RV={}));var jC;(function(e){e.Debug="DEBUG",e.Error="ERROR",e.Info="INFO",e.Verbose="VERBOSE",e.Warn="WARN"})(jC||(jC={}));var OV;(function(e){e.Activity="ACTIVITY",e.Exam="EXAM",e.Imaging="IMAGING",e.Laboratory="LABORATORY",e.Procedure="PROCEDURE",e.SocialHistory="SOCIAL_HISTORY",e.Survey="SURVEY",e.Therapy="THERAPY",e.VitalSigns="VITAL_SIGNS"})(OV||(OV={}));var bV;(function(e){e.CancelDelete="CANCEL_DELETE",e.ConfirmDelete="CONFIRM_DELETE",e.DeletionInProgress="DELETION_IN_PROGRESS",e.ImmediateExecution="IMMEDIATE_EXECUTION",e.RequestDelete="REQUEST_DELETE"})(bV||(bV={}));var HC;(function(e){e.C19Vaccine="C19Vaccine",e.Device="Device",e.Insurance="Insurance",e.Laboratory="Laboratory",e.Pharmacy="Pharmacy",e.Provider="Provider",e.Bus="bus",e.Cg="cg",e.Crs="crs",e.Dept="dept",e.Edu="edu",e.Govt="govt",e.Ins="ins",e.Other="other",e.Pay="pay",e.Prov="prov",e.Reli="reli",e.Team="team"})(HC||(HC={}));var CV;(function(e){e.Bus="BUS",e.C19Vaccine="C19VACCINE",e.Cg="CG",e.Crs="CRS",e.Dept="DEPT",e.Device="DEVICE",e.Edu="EDU",e.Govt="GOVT",e.Ins="INS",e.Insurance="INSURANCE",e.Laboratory="LABORATORY",e.Other="OTHER",e.Pay="PAY",e.Pharmacy="PHARMACY",e.Prov="PROV",e.Provider="PROVIDER",e.Reli="RELI",e.Team="TEAM"})(CV||(CV={}));var PV;(function(e){e.Add="add",e.Copy="copy",e.Move="move",e.Remove="remove",e.Replace="replace",e.Test="test"})(PV||(PV={}));var MV;(function(e){e.Patient="Patient",e.Person="Person"})(MV||(MV={}));var IV;(function(e){e.Practice="practice",e.Practitioner="practitioner"})(IV||(IV={}));var NV;(function(e){e.Practice="PRACTICE",e.Practitioner="PRACTITIONER"})(NV||(NV={}));var LV;(function(e){e.QuestionnaireResponse="QuestionnaireResponse"})(LV||(LV={}));var DV;(function(e){e.AllergyIntolerance="ALLERGY_INTOLERANCE",e.CarePlan="CARE_PLAN",e.Condition="CONDITION",e.Encounter="ENCOUNTER",e.Immunization="IMMUNIZATION",e.MedicationDispense="MEDICATION_DISPENSE",e.MedicationRequest="MEDICATION_REQUEST",e.MedicationStatement="MEDICATION_STATEMENT",e.Observation="OBSERVATION",e.Procedure="PROCEDURE"})(DV||(DV={}));var wV;(function(e){e.Insurance="INSURANCE",e.Laboratory="LABORATORY",e.Pharmacy="PHARMACY",e.Practice="PRACTICE",e.Practitioner="PRACTITIONER"})(wV||(wV={}));var YC;(function(e){e.Content="content",e.Distance="distance",e.Relevance="relevance"})(YC||(YC={}));var UV;(function(e){e.Content="CONTENT",e.DataSourceRank="DATA_SOURCE_RANK",e.Distance="DISTANCE",e.Relevance="RELEVANCE"})(UV||(UV={}));var qC;(function(e){e.Asc="asc",e.Desc="desc"})(qC||(qC={}));var xV;(function(e){e.Asc="ASC",e.Desc="DESC"})(xV||(xV={}));var FV;(function(e){e.CareSearch="CARE_SEARCH",e.Proa="PROA",e.ProviderDetails="PROVIDER_DETAILS",e.Sayt="SAYT",e.Unspecified="UNSPECIFIED"})(FV||(FV={}));var $V;(function(e){e.Error="ERROR",e.Pending="PENDING",e.Retrieved="RETRIEVED",e.Retrieving="RETRIEVING"})($V||($V={}));var KC;(function(e){e.Accepted="ACCEPTED",e.Cancelled="CANCELLED",e.Completed="COMPLETED",e.Draft="DRAFT",e.EnteredInError="ENTERED_IN_ERROR",e.Failed="FAILED",e.InProgress="IN_PROGRESS",e.OnHold="ON_HOLD",e.Ready="READY",e.Received="RECEIVED",e.Rejected="REJECTED",e.Requested="REQUESTED"})(KC||(KC={}));var VV;(function(e){e.Accurate="accurate",e.Estimate="estimate"})(VV||(VV={}));const k9=new Set(Object.values(GC));function GV(e){return k9.has(e)}const j9=new Set(Object.values($C));function H9(e){return j9.has(e)}const Y9=new Set(Object.values(Im));function BV(e){return Y9.has(e)}const q9=new Set(Object.values(FC));function K9(e){return q9.has(e)}class W9{validate(t,r){!ka(t.gender)&&!GV(t.gender)&&r.add(`Invalid gender value: "${t.gender}"`)}}class Mwe extends sa{constructor(){super(...arguments),this.validator=new W9}}class Q9{validate(t,r){BV(t.category)||r.add(`Invalid consent category code: "${t.category}"`)}}class Iwe extends sa{constructor(){super(...arguments),this.validator=new Q9}}class z9{validate(t,r){H9(t.status)||r.add(`Invalid consent status: "${t.status}"`),K9(t.provision)||r.add(`Invalid consent provision type: "${t.provision}"`),BV(t.category)||r.add(`Invalid consent category code: "${t.category}"`),!ka(t.organizationId)&&$o(t.organizationId)&&r.add("organizationId cannot be empty"),t.category===Im.ProaAttestation&&ka(t.organizationId)&&r.add("organizationId must be provided when category is PROA_ATTESTATION")}}class Nwe extends sa{constructor(){super(...arguments),this.validator=new z9}}class X9{validate(t,r){Ks(t.exportId)&&r.add("exportId is required"),Ks(t.password)&&r.add("password is required")}}class Lwe extends sa{constructor(){super(...arguments),this.validator=new X9}}class Dwe extends null{}var ja=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},ua,xu,kV,jV,HV,YV,qV,KV;class WC{constructor(){ua.add(this)}validate(t,r){if(!t.values||t.values.length===0){r.add("At least one SearchDateValue must be set to instantiate a SearchDate");return}for(const n of t.values)ja(this,ua,"m",kV).call(this,n,r)}}ua=new WeakSet,xu=function(t,r){t&&t!==null&&isNaN(t.getTime())&&r.add("The date is not valid")},kV=function(t,r){const{equals:n,notEquals:i,greaterThan:a,greaterThanOrEqualTo:u,lessThan:c,lessThanOrEqualTo:E,approximately:_}=t,L=[n,i,a,u,c,E,_].filter(W=>W!=null).length;if(L===0){r.add("At least one SearchDateValue must be set to instantiate a SearchDate");return}ja(this,ua,"m",jV).call(this,t,L,r),ja(this,ua,"m",qV).call(this,t,r),ja(this,ua,"m",KV).call(this,t,r)},jV=function(t,r,n){const{equals:i,notEquals:a,approximately:u}=t;if(i&&r>1){n.add("The equals value cannot be set with any other values");return}if(a&&r>1){n.add("The notEquals value cannot be set with any other values");return}if(u&&r>1){n.add("The approximately value cannot be set with any other values");return}ja(this,ua,"m",HV).call(this,t,n),ja(this,ua,"m",YV).call(this,t,n)},HV=function(t,r){t.greaterThan&&t.greaterThanOrEqualTo&&r.add("The greaterThan/greaterThanOrEqualTo value cannot be set with both values")},YV=function(t,r){t.lessThan&&t.lessThanOrEqualTo&&r.add("The lessThan/lessThanOrEqualTo value cannot be set with both values")},qV=function(t,r){const{equals:n,notEquals:i,greaterThan:a,greaterThanOrEqualTo:u,lessThan:c,lessThanOrEqualTo:E,approximately:_}=t;n&&ja(this,ua,"m",xu).call(this,n,r),i&&ja(this,ua,"m",xu).call(this,i,r),a&&ja(this,ua,"m",xu).call(this,a,r),u&&ja(this,ua,"m",xu).call(this,u,r),c&&ja(this,ua,"m",xu).call(this,c,r),E&&ja(this,ua,"m",xu).call(this,E,r),_&&ja(this,ua,"m",xu).call(this,_,r)},KV=function(t,r){const{greaterThan:n,greaterThanOrEqualTo:i,lessThan:a,lessThanOrEqualTo:u}=t;n&&u&&n>=u&&r.add("The greaterThan value must be less than the lessThanOrEqualTo value"),i&&a&&i>=a&&r.add("The greaterThanOrEqualTo value must be less than the lessThan value"),n&&a&&n>=a&&r.add("The greaterThan value must be less than the lessThan value"),i&&u&&i>=u&&r.add("The greaterThanOrEqualTo value must be less than the lessThanOrEqualTo value")};var QC=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},Jp;class Lm{constructor(){Jp.set(this,new J9)}validate(t,r){var n;if(t.value===void 0&&t.values===void 0&&t.notEquals===void 0){r.add("Either SearchToken value or values or notEquals must be provided");return}if(t.value!==void 0&&QC(this,Jp,"f").validate(t.value,r),t.values!==void 0&&t.values.length===0){r.add("At least one Coding must be set to instantiate a SearchToken");return}for(const i of(n=t.values)!==null&&n!==void 0?n:[])QC(this,Jp,"f").validate(i,r);if(t.notEquals!==void 0){if(t.notEquals.values!==void 0){if(t.notEquals.values.length===0){r.add("If notEquals values are provided, at least one Coding must be set");return}for(const i of t.notEquals.values)QC(this,Jp,"f").validate(i,r)}t.notEquals.code===void 0&&t.notEquals.value===void 0&&t.notEquals.system===void 0&&t.notEquals.values===void 0&&r.add("NotEquals must have at least one non-null property (code, value, system, or values)")}}}Jp=new WeakMap;class J9{validate(t,r){!t.system&&!t.code&&r.add("Each Coding in the list must have at least one non-null and non-empty value for system or code")}}var t_=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},zC,XC,JC,ZC,eP,tP;class WV extends Ys{constructor(){super(...arguments),zC.set(this,new Lm),XC.set(this,new WC)}validate(t,r){super.validate(t,r),t.groupCode&&t_(this,zC,"f").validate(t.groupCode,r),t.lastUpdated&&t_(this,XC,"f").validate(t.lastUpdated,r)}}zC=new WeakMap,XC=new WeakMap;class Z9{validate(t,r){t.length===0&&r.add("Prescription array must not be empty.")}}class QV extends Ys{constructor(){super(...arguments),JC.set(this,new Z9),ZC.set(this,new WC)}validate(t,r){super.validate(t,r),t.lastUpdated!==void 0&&t_(this,ZC,"f").validate(t.lastUpdated,r),t.prescription!==void 0&&t_(this,JC,"f").validate(t.prescription,r)}}JC=new WeakMap,ZC=new WeakMap;class eZ extends Ys{validate(t,r){var n;super.validate(t,r),!((n=t?.ids)===null||n===void 0)&&n.length||r.add("ids must not be empty")}}class tZ extends qs{constructor(){super(...arguments),this.validator=new WV}}class wwe extends null{}class Uwe extends null{}class xwe extends null{}class Fwe extends null{}class $we extends null{}class Vwe extends null{}class Gwe extends null{}class Bwe extends null{}class kwe extends null{}class jwe extends null{}class Hwe extends null{}class Ywe extends null{}class qwe extends null{}class Kwe extends null{}class Wwe extends null{}class Qwe extends null{}class zwe extends null{}class Xwe extends null{}class Jwe extends null{}class rZ extends QV{constructor(){super(...arguments),eP.set(this,new Lm)}validate(t,r){super.validate(t,r),t.medicationCode!==void 0&&t_(this,eP,"f").validate(t.medicationCode,r)}}eP=new WeakMap;class Zwe extends qs{constructor(){super(...arguments),this.validator=new QV}}class eUe extends qs{constructor(){super(...arguments),this.validator=new rZ}}class nZ extends WV{constructor(){super(...arguments),tP.set(this,new Lm)}validate(t,r){super.validate(t,r),t.medicationCode!==void 0&&t_(this,tP,"f").validate(t.medicationCode,r)}}tP=new WeakMap;class tUe extends tZ{constructor(){super(...arguments),this.validator=new nZ}}class rUe extends null{}class nUe extends qs{constructor(){super(...arguments),this.validator=new eZ}}class iUe extends null{}class iZ{validate(t,r){$o(t.medicationStatementId)&&r.add("The medication pricing request must possess a medication statement id.")}}class aUe extends sa{constructor(){super(...arguments),this.validator=new iZ}}class aZ extends Ys{validate(t,r){$o(t.medicationStatementId)&&r.add("The medication knowledge request must possess a medication statement id."),super.validate(t,r)}}class oUe extends qs{constructor(){super(...arguments),this.validator=new aZ}}class oZ extends Ys{validate(t,r){$o(t.labId)&&r.add("The lab knowledge request must contain a lab id."),super.validate(t,r)}}class sUe extends qs{constructor(){super(...arguments),this.validator=new oZ}}const sZ=new Set(Object.values(KC));function zV(e){return sZ.has(e)}var uZ=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},rP,XV;class cZ extends Ys{constructor(){super(...arguments),rP.add(this)}validate(t,r){if(super.validate(t,r),!ka(t.status)){const n=Array.isArray(t.status)?t.status:[t.status];for(const i of n)uZ(this,rP,"m",XV).call(this,i,r)}}}rP=new WeakSet,XV=function(t,r){zV(t)||r.add(`Invalid task status: "${t}"`)};class uUe extends qs{constructor(){super(...arguments),this.validator=new cZ}}class lZ{validate(t,r){zV(t.newStatus)||r.add(`Invalid task status: "${t.newStatus}"`)}}class cUe extends sa{constructor(){super(...arguments),this.validator=new lZ}}var Dm=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},r_,JV,ZV,eG,tG;class lUe extends qs{constructor(){super(...arguments),this.validator=new fZ}}class fZ extends Ys{constructor(){super(...arguments),r_.add(this)}validate(t,r){super.validate(t,r),ki(t.organizationTypeFilters)&&Dm(this,r_,"m",JV).call(this,t.organizationTypeFilters,r),ki(t.sortBy)&&Dm(this,r_,"m",ZV).call(this,t.sortBy,r),ki(t.filterFields)&&Dm(this,r_,"m",eG).call(this,t.filterFields,r),ki(t.gender)&&Dm(this,r_,"m",tG).call(this,t.gender,r)}}r_=new WeakSet,JV=function(t,r){for(const n of t)dZ(n)||r.add(`Invalid organizationTypeFilters value: "${n}"`)},ZV=function(t,r){ki(t.field)&&!hZ(t.field)&&r.add(`Invalid sortBy.field value: "${t.field}"`),ki(t.order)&&!EZ(t.order)&&r.add(`Invalid sortBy.order value: "${t.order}"`)},eG=function(t,r){for(const n of t)mZ(n)||r.add(`Invalid filterField value: "${n}"`)},tG=function(t,r){GV(t)||r.add(`Invalid gender value: "${t}"`)};const _Z=new Set(Object.values(HC));function dZ(e){return _Z.has(e)}const pZ=new Set(Object.values(YC));function hZ(e){return pZ.has(e)}const SZ=new Set(Object.values(qC));function EZ(e){return SZ.has(e)}const vZ=new Set(Object.values(kC));function mZ(e){return vZ.has(e)}class fUe extends null{}class _Ue extends qs{constructor(){super(...arguments),this.validator=new TZ}}class TZ extends Ys{validate(t,r){super.validate(t,r)}}const AZ="data-connection-status";var gZ=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},nP;const yZ="connectionId cannot be null or empty",RZ="username cannot be null or empty",OZ="password cannot be null or empty";class rG{validate(t,r){t.connectionId===""&&r.add(yZ)}}class bZ{constructor(){nP.set(this,new rG)}validate(t,r){gZ(this,nP,"f").validate(t,r),t.username===""&&r.add(RZ),t.password===""&&r.add(OZ)}}nP=new WeakMap;class CZ extends sa{constructor(){super(...arguments),this.validator=new rG}}class dUe extends null{}class pUe extends CZ{constructor(){super(...arguments),this.validator=new bZ}}const PZ="deviceToken is required",MZ="platformName must be a valid DevicePlatform value",IZ="applicationName is required";var iP;(function(e){e.IOS="IOS",e.ANDROID="ANDROID"})(iP||(iP={}));const NZ=new Set(Object.values(iP));function LZ(e){return NZ.has(e)}function DZ(e){return!LZ(e)}class nG{validate(t,r){$o(t.deviceToken)&&r.add(PZ)}}class wZ extends nG{validate(t,r){super.validate(t,r),DZ(t.platformName.toUpperCase())&&r.add(MZ),$o(t.applicationName)&&r.add(IZ)}}class hUe extends sa{constructor(){super(...arguments),this.validator=new wZ}}class SUe extends sa{constructor(){super(...arguments),this.validator=new nG}}const UZ="string parameter serializedNotification must be provided",xZ="serialized notification must have a non-empty notification_id field of type string",iG="serialized notification must have an itbl object containing a non-empty messageId field of type string",FZ="parsed notification must be a non-null object.",$Z="serialized notification is not valid JSON.";class VZ{validate(t,r){if(ka(t.serializedNotification)||typeof t.serializedNotification!="string"||$o(t.serializedNotification)){r.add(UZ);return}let n=null;try{n=JSON.parse(t.serializedNotification)}catch{r.add($Z);return}if(typeof n!="object"||n===null){r.add(FZ);return}const{itbl:i,notification_id:a}=n;if((ka(a)||typeof a!="string"||$o(a))&&r.add(xZ),typeof i!="object"||Fo(i)){r.add(iG);return}(ka(i.messageId)||typeof i.messageId!="string"||$o(i.messageId))&&r.add(iG)}}class EUe extends sa{constructor(){super(...arguments),this.validator=new VZ}}const GZ="SearchStringValue should be a non-empty string";class BZ{validate(t,r){if(Fo(t.values))return;let n=!1;for(const i of t.values)$o(i)&&(n=!0);n&&r.add(GZ)}}var aP=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},oP,sP,uP;class kZ{constructor(){oP.set(this,new WC),sP.set(this,new BZ),uP.set(this,new Lm)}validate(t,r){var n;Fn(t._source)&&aP(this,sP,"f").validate(t._source,r),Fn(t.date)&&aP(this,oP,"f").validate(t.date,r),Fn(t._count)&&t._count<0&&r.add("Value of count cannot be less than 0"),Fn(t._getpagesoffset)&&t._getpagesoffset<0&&r.add("Value of getpagesoffset cannot be less than 0"),Fn((n=t.supporting_info)===null||n===void 0?void 0:n.value)&&$o(t.supporting_info.value)&&r.add("Supporting Information must have a non-empty value."),Fn(t.status)&&aP(this,uP,"f").validate(t.status,r)}}oP=new WeakMap,sP=new WeakMap,uP=new WeakMap;class vUe extends sa{constructor(){super(...arguments),this.validator=new kZ}}class jZ{validate(t,r){if(!Fo(t.cancelationReason)){if(Fo(t.cancelationReason.coding)||t.cancelationReason.coding.length===0){r.add("cancelationReason must have at least one coding");return}for(const n of t.cancelationReason.coding)(Fo(n?.code)||Fo(n?.system))&&r.add("cancelationReason.coding must have a code and a system")}}}class mUe extends sa{constructor(){super(...arguments),this.validator=new jZ}}class HZ{validate(t,r){var n;Ks((n=t.organization.value)===null||n===void 0?void 0:n.trim())&&r.add("Organization reference is required and must have a non-empty value.")}}class TUe extends sa{constructor(){super(...arguments),this.validator=new HZ}}class YZ{validate(t,r){const n=t.questionnaireResponse;if(Fo(n)){r.add("questionnaireResponse is required");return}if((Ks(n.resourceType)||n.resourceType!=="QuestionnaireResponse")&&r.add('questionnaireResponse.resourceType must be "QuestionnaireResponse"'),Ks(n.status)&&r.add("questionnaireResponse.status is required"),Ks(n.questionnaire)&&r.add("questionnaireResponse.questionnaire is required"),Fo(n.contained)||n.contained.length===0)r.add("questionnaireResponse.contained must have at least one item");else{let i=null;for(const a of n.contained){if(Fo(a)){r.add("questionnaireResponse.contained item cannot be null or undefined");break}if(a.resourceType==="Questionnaire"){i=a;break}}if(Fo(i)){r.add("questionnaireResponse.contained must contain a Questionnaire resource");return}Ks(i.id)&&r.add("questionnaireResponse.contained Questionnaire resource must have an id")}}}class AUe extends sa{constructor(){super(...arguments),this.validator=new YZ}}var cP=function(e,t,r,n){function i(a){return a instanceof r?a:new r(function(u){u(a)})}return new(r||(r=Promise))(function(a,u){function c(p){try{_(n.next(p))}catch(L){u(L)}}function E(p){try{_(n.throw(p))}catch(L){u(L)}}function _(p){p.done?a(p.value):i(p.value).then(c,E)}_((n=n.apply(e,t||[])).next())})};class aG{constructor(t=new Map){this.storage=t}get(t){return cP(this,void 0,void 0,function*(){return this.storage.get(t)})}set(t,r){return cP(this,void 0,void 0,function*(){this.storage.set(t,r)})}delete(t){return cP(this,void 0,void 0,function*(){return this.storage.delete(t)})}}const qZ={logLevel:jC.Error,timeout:3e4,retryPolicy:{attempts:3,interval:1e3},telemetryEnabled:!1,tokenStorage:new aG,language:null,overrides:{unauthedApiUrl:null,authedApiUrl:null}};var Ws;(function(e){e[e.UNSPECIFIED=0]="UNSPECIFIED",e[e.TRACE=1]="TRACE",e[e.TRACE2=2]="TRACE2",e[e.TRACE3=3]="TRACE3",e[e.TRACE4=4]="TRACE4",e[e.DEBUG=5]="DEBUG",e[e.DEBUG2=6]="DEBUG2",e[e.DEBUG3=7]="DEBUG3",e[e.DEBUG4=8]="DEBUG4",e[e.INFO=9]="INFO",e[e.INFO2=10]="INFO2",e[e.INFO3=11]="INFO3",e[e.INFO4=12]="INFO4",e[e.WARN=13]="WARN",e[e.WARN2=14]="WARN2",e[e.WARN3=15]="WARN3",e[e.WARN4=16]="WARN4",e[e.ERROR=17]="ERROR",e[e.ERROR2=18]="ERROR2",e[e.ERROR3=19]="ERROR3",e[e.ERROR4=20]="ERROR4",e[e.FATAL=21]="FATAL",e[e.FATAL2=22]="FATAL2",e[e.FATAL3=23]="FATAL3",e[e.FATAL4=24]="FATAL4"})(Ws||(Ws={}));var KZ=function(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r},oG=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},Zp,Mr;(function(e){e[e.VERBOSE=0]="VERBOSE",e[e.DEBUG=1]="DEBUG",e[e.INFO=2]="INFO",e[e.WARN=3]="WARN",e[e.ERROR=4]="ERROR",e[e.FATAL=5]="FATAL"})(Mr||(Mr={}));const WZ={[Mr.VERBOSE]:"VERBOSE",[Mr.DEBUG]:"DEBUG",[Mr.INFO]:"INFO",[Mr.WARN]:"WARN",[Mr.ERROR]:"ERROR",[Mr.FATAL]:"FATAL"};class n_{constructor(t){Zp.set(this,void 0),KZ(this,Zp,t,"f")}get severity(){return oG(this,Zp,"f")}shouldLog(t){return t>=oG(this,Zp,"f")}static severityText(t){return WZ[t]}static severityFromText(t){switch(t){case"VERBOSE":return Mr.VERBOSE;case"DEBUG":return Mr.DEBUG;case"INFO":return Mr.INFO;case"WARN":return Mr.WARN;case"ERROR":return Mr.ERROR;case"FATAL":return Mr.FATAL;default:throw new Error(`Invalid severity text: ${t}`)}}}Zp=new WeakMap;var lP=function(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r},Es=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},Fu,sG,wm,eh,Um,il;class uG{constructor(t,r,n){Fu.add(this),wm.set(this,void 0),eh.set(this,void 0),Um.set(this,void 0),lP(this,wm,n,"f"),lP(this,eh,new n_(t),"f"),lP(this,Um,r,"f")}name(){return Es(this,wm,"f")}severity(){return Es(this,eh,"f").severity}verbose(t,r){Es(this,Fu,"m",il).call(this,Mr.VERBOSE,t,r)}debug(t,r){Es(this,Fu,"m",il).call(this,Mr.DEBUG,t,r)}info(t,r){Es(this,Fu,"m",il).call(this,Mr.INFO,t,r)}warn(t,r){Es(this,Fu,"m",il).call(this,Mr.WARN,t,r)}error(t,r){let n;r instanceof Kt&&(n={error:r.failure()?r.error().message:r.data()}),r instanceof Error&&(n={error:r.message}),n===void 0&&(n=r),Es(this,Fu,"m",il).call(this,Mr.ERROR,t,n)}fatal(t,r){Es(this,Fu,"m",il).call(this,Mr.FATAL,t,r)}static otelSeverityNumber(t){switch(t){case Mr.VERBOSE:return Ws.TRACE;case Mr.DEBUG:return Ws.DEBUG;case Mr.INFO:return Ws.INFO;case Mr.WARN:return Ws.WARN;case Mr.ERROR:return Ws.ERROR;case Mr.FATAL:return Ws.FATAL;default:return Ws.UNSPECIFIED}}}sG=uG,wm=new WeakMap,eh=new WeakMap,Um=new WeakMap,Fu=new WeakSet,il=function(t,r,n){!Es(this,eh,"f").shouldLog(t)||Es(this,Um,"f").emit({timestamp:Date.now(),severityNumber:sG.otelSeverityNumber(t),severityText:n_.severityText(t),body:r,attributes:n??{}})};var cG=function(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r},lG=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},xm,Fm;class QZ{constructor(t,r){xm.set(this,void 0),Fm.set(this,void 0),cG(this,Fm,t,"f"),cG(this,xm,r.loggerProvider(),"f")}getLogger(t){const r=t??"default",n=lG(this,xm,"f").getLogger(r);return new uG(lG(this,Fm,"f"),n,r)}}xm=new WeakMap,Fm=new WeakMap;class zZ{format(t,r,n,i){let u=`[${new Date().toISOString()}] ${n_.severityText(t)}`;return n!==void 0&&(u+=` (${n})`),u+=`: ${r}`,i===void 0?[u]:[u,i]}}var fP=function(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r},di=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},vs,ms,Qs;class XZ{constructor(t,r){vs.set(this,void 0),ms.set(this,void 0),Qs.set(this,void 0),fP(this,ms,new n_(t),"f"),fP(this,vs,r,"f"),fP(this,Qs,new zZ,"f")}name(){return di(this,vs,"f")}severity(){return di(this,ms,"f").severity}verbose(t,r){di(this,ms,"f").shouldLog(Mr.VERBOSE)&&console.debug(...di(this,Qs,"f").format(Mr.VERBOSE,t,di(this,vs,"f"),r))}debug(t,r){di(this,ms,"f").shouldLog(Mr.DEBUG)&&console.debug(...di(this,Qs,"f").format(Mr.DEBUG,t,di(this,vs,"f"),r))}info(t,r){di(this,ms,"f").shouldLog(Mr.INFO)&&console.info(...di(this,Qs,"f").format(Mr.INFO,t,di(this,vs,"f"),r))}warn(t,r){di(this,ms,"f").shouldLog(Mr.WARN)&&console.warn(...di(this,Qs,"f").format(Mr.WARN,t,di(this,vs,"f"),r))}error(t,r){let n=r;r instanceof Kt&&(n=r.failure()?r.error():r.data()),di(this,ms,"f").shouldLog(Mr.ERROR)&&console.error(...di(this,Qs,"f").format(Mr.ERROR,t,di(this,vs,"f"),n))}fatal(t,r){di(this,ms,"f").shouldLog(Mr.FATAL)&&console.error(...di(this,Qs,"f").format(Mr.FATAL,t,di(this,vs,"f"),r))}}vs=new WeakMap,ms=new WeakMap,Qs=new WeakMap;var JZ=function(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r},ZZ=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},$m;class ji{constructor(t=Mr.FATAL){$m.set(this,void 0),JZ(this,$m,t,"f")}getLogger(t){return new XZ(ZZ(this,$m,"f"),t)}}$m=new WeakMap;var eee=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},_P,fG;class tee{constructor(){_P.add(this)}createLogProvider(t,r){switch(eee(this,_P,"m",fG).call(this,t)){case"otel":if(r===void 0)throw new Error('telemetry is required for "otel" logging');return new QZ(t.logLevel,r);case"console":return new ji(t.logLevel)}}}_P=new WeakSet,fG=function(t){return t.telemetry.enabled?"otel":"console"};var Nn=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},zs=function(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r},ao,i_,$u,a_,Vu,al,_G,dG,pG,hG,SG,EG,vG,mG,TG,AG;class Vm{constructor(t){ao.add(this),i_.set(this,void 0),$u.set(this,void 0),a_.set(this,void 0),Vu.set(this,void 0),al.set(this,void 0),this.bwellConfig=Nn(this,ao,"m",SG).call(this,t),zs(this,i_,n_.severityFromText(this.bwellConfig.logLevel),"f"),zs(this,al,Nn(this,ao,"m",AG).call(this),"f"),zs(this,a_,Nn(this,ao,"m",vG).call(this),"f"),zs(this,$u,Nn(this,ao,"m",mG).call(this),"f"),zs(this,Vu,Nn(this,ao,"m",TG).call(this),"f")}static initialize(t){try{const r=new Vm(t);return Kt.success(r)}catch(r){if(Bi.isBwellError(r))return Kt.failure(r);throw r}}get logLevel(){return Nn(this,i_,"f")}get graphQL(){return Nn(this,a_,"f")}get telemetry(){return Nn(this,$u,"f")}get http(){return Nn(this,Vu,"f")}get context(){return Nn(this,al,"f")}setContextUser(t){Nn(this,al,"f").user=t}mergeRemoteConfig(t){zs(this,i_,Nn(this,ao,"m",_G).call(this,t),"f"),zs(this,a_,Nn(this,ao,"m",dG).call(this,t),"f"),zs(this,$u,Object.freeze(Nn(this,ao,"m",pG).call(this,t)),"f"),zs(this,Vu,Object.freeze(Nn(this,ao,"m",hG).call(this,t)),"f")}}i_=new WeakMap,$u=new WeakMap,a_=new WeakMap,Vu=new WeakMap,al=new WeakMap,ao=new WeakSet,_G=function(t){var r;const n=(r=t?.logLevel)!==null&&r!==void 0?r:null;return n===null?Nn(this,i_,"f"):n_.severityFromText(n)},dG=function(t){var r;const n=(r=t?.graphQLClient)!==null&&r!==void 0?r:null;if(n===null)return Nn(this,a_,"f");const{authedApiUrl:i,unauthedApiUrl:a}=this.bwellConfig.overrides;return{unauthApiUrl:a??n.url,apiUrl:i??n.authUrl}},pG=function(t){var r,n;const i=(r=t?.telemetry)!==null&&r!==void 0?r:null;if(i===null)return Nn(this,$u,"f");const a=(n=i.enabled)!==null&&n!==void 0?n:Nn(this,$u,"f").enabled;if(i.collectorUrl.endsWith("/"))throw new Error('Telemetry config "collectorUrl" cannot end with a trailing slash.');let u;try{u=new URL(i.collectorUrl)}catch{throw new Error('Telemetry config "collectorUrl" malformed/is not a proper URL.')}if(u.pathname!=="/")throw new Error('Telemetry config "collectorUrl" cannot contain a path.');return Object.assign(Object.assign({},Nn(this,$u,"f")),{enabled:a,collectorUrl:i.collectorUrl})},hG=function(t){var r,n,i;const a=(r=t?.httpClient)!==null&&r!==void 0?r:null;return a===null?Nn(this,Vu,"f"):{timeout:(n=a.requestTimeout)!==null&&n!==void 0?n:Nn(this,Vu,"f").timeout,retryPolicy:(i=a.retry)!==null&&i!==void 0?i:Nn(this,Vu,"f").retryPolicy}},SG=function(t){return Object.assign(Object.assign({},qZ),t)},EG=function(){try{return w9(this.bwellConfig.clientKey)}catch{throw new y9("It appears there is a problem with your Client Key. Contact b.well support for further assistance.")}},vG=function(){var t,r;return{apiUrl:(t=this.bwellConfig.overrides.authedApiUrl)!==null&&t!==void 0?t:`https://api-gateway.${Nn(this,al,"f").env}.icanbwell.com/federated-graph-authed/graphql`,unauthApiUrl:(r=this.bwellConfig.overrides.unauthedApiUrl)!==null&&r!==void 0?r:`https://api-gateway.${Nn(this,al,"f").env}.icanbwell.com/federated-graph/graphql`}},mG=function(){return{collectorUrl:"https://collector.services.icanbwell.com",enabled:this.bwellConfig.telemetryEnabled,timeout:this.bwellConfig.timeout}},TG=function(){return{timeout:this.bwellConfig.timeout,retryPolicy:{attempts:this.bwellConfig.retryPolicy.attempts,interval:this.bwellConfig.retryPolicy.interval}}},AG=function(){return{clientKey:this.bwellConfig.clientKey,env:Nn(this,ao,"m",EG).call(this),user:null}};var ree=function(e,t,r,n){function i(a){return a instanceof r?a:new r(function(u){u(a)})}return new(r||(r=Promise))(function(a,u){function c(p){try{_(n.next(p))}catch(L){u(L)}}function E(p){try{_(n.throw(p))}catch(L){u(L)}}function _(p){p.done?a(p.value):i(p.value).then(c,E)}_((n=n.apply(e,t||[])).next())})},gG=function(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r},Gm=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},o_,Bm;class nee{constructor(t,r=new ji){o_.set(this,void 0),Bm.set(this,void 0),gG(this,Bm,t,"f"),gG(this,o_,r.getLogger("ConfigManager"),"f")}initialize(t){return ree(this,void 0,void 0,function*(){const r=Vm.initialize(t);if(r.failure())return r;const n=r.data();Gm(this,o_,"f").verbose("Initializing SDK Configuration");const i=yield Gm(this,Bm,"f").initialize(n.context.clientKey);if(i.failure())return i.intoFailure();const a=i.data();try{n.mergeRemoteConfig(a)}catch(u){Gm(this,o_,"f").error("Error merging SDK config with remote config.",u)}return Gm(this,o_,"f").info("Remote SDK Configuration merged with user config"),Kt.success(n)})}}o_=new WeakMap,Bm=new WeakMap;const dP=JSON,iee=e=>e.toUpperCase(),aee=e=>{const t={};return e.forEach((r,n)=>{t[n]=r}),t},oee=(e,t,r)=>e.document?e:{document:e,variables:t,requestHeaders:r,signal:void 0},see=(e,t,r)=>e.query?e:{query:e,variables:t,requestHeaders:r,signal:void 0},uee=(e,t)=>e.documents?e:{documents:e,requestHeaders:t,signal:void 0},gUe=(e,t,...r)=>{const[n,i]=r;return e.document?e:{url:e,document:t,variables:n,requestHeaders:i,signal:void 0}},yUe=(e,t,...r)=>{const[n,i]=r;return e.query?e:{url:e,query:t,variables:n,requestHeaders:i,signal:void 0}};var cee=h(5157),lee=h(2704);const yG=e=>{let t;const r=e.definitions.filter(n=>n.kind==="OperationDefinition");return r.length===1&&(t=r[0]?.name?.value),t},km=e=>{if(typeof e=="string"){let r;try{const n=(0,cee.qg)(e);r=yG(n)}catch{}return{query:e,operationName:r}}const t=yG(e);return{query:(0,lee.y)(e),operationName:t}};class Gu extends Error{constructor(t,r){const n=`${Gu.extractMessage(t)}: ${JSON.stringify({response:t,request:r})}`;super(n),Object.setPrototypeOf(this,Gu.prototype),this.response=t,this.request=r,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,Gu)}static extractMessage(t){return t.errors?.[0]?.message??`GraphQL Error (Code: ${t.status})`}}var s_=h(288),fee=h.t(s_,2);const _ee="connection_init",dee="connection_ack",RG="ping",OG="pong",pee="subscribe",hee="next",See="error",bG="complete";class Bu{get type(){return this._type}get id(){return this._id}get payload(){return this._payload}constructor(t,r,n){this._type=t,this._payload=r,this._id=n}get text(){const t={type:this.type};return this.id!=null&&this.id!=null&&(t.id=this.id),this.payload!=null&&this.payload!=null&&(t.payload=this.payload),JSON.stringify(t)}static parse(t,r){const{type:n,payload:i,id:a}=JSON.parse(t);return new Bu(n,r(i),a)}}class Eee{constructor(t,{onInit:r,onAcknowledged:n,onPing:i,onPong:a}){this.socketState={acknowledged:!1,lastRequestId:0,subscriptions:{}},this.socket=t,t.addEventListener("open",async u=>{this.socketState.acknowledged=!1,this.socketState.subscriptions={},t.send(mee(r?await r():null).text)}),t.addEventListener("close",u=>{this.socketState.acknowledged=!1,this.socketState.subscriptions={}}),t.addEventListener("error",u=>{console.error(u)}),t.addEventListener("message",u=>{try{const c=vee(u.data);switch(c.type){case dee:{this.socketState.acknowledged?console.warn("Duplicate CONNECTION_ACK message ignored"):(this.socketState.acknowledged=!0,n&&n(c.payload));return}case RG:{i?i(c.payload).then(L=>t.send(CG(L).text)):t.send(CG(null).text);return}case OG:{a&&a(c.payload);return}}if(!this.socketState.acknowledged||c.id===void 0||c.id===null||!this.socketState.subscriptions[c.id])return;const{query:E,variables:_,subscriber:p}=this.socketState.subscriptions[c.id];switch(c.type){case hee:{!c.payload.errors&&c.payload.data&&p.next&&p.next(c.payload.data),c.payload.errors&&p.error&&p.error(new Gu({...c.payload,status:200},{query:E,variables:_}));return}case See:{p.error&&p.error(new Gu({errors:c.payload,status:200},{query:E,variables:_}));return}case bG:{p.complete&&p.complete(),delete this.socketState.subscriptions[c.id];return}}}catch(c){console.error(c),t.close(1006)}t.close(4400,"Unknown graphql-ws message.")})}makeSubscribe(t,r,n,i){const a=(this.socketState.lastRequestId++).toString();return this.socketState.subscriptions[a]={query:t,variables:i,subscriber:n},this.socket.send(Aee(a,{query:t,operationName:r,variables:i}).text),()=>{this.socket.send(gee(a).text),delete this.socketState.subscriptions[a]}}rawRequest(t,r){return new Promise((n,i)=>{let a;this.rawSubscribe(t,{next:(u,c)=>a={data:u,extensions:c},error:i,complete:()=>n(a)},r)})}request(t,r){return new Promise((n,i)=>{let a;this.subscribe(t,{next:u=>a=u,error:i,complete:()=>n(a)},r)})}subscribe(t,r,n){const{query:i,operationName:a}=km(t);return this.makeSubscribe(i,a,r,n)}rawSubscribe(t,r,n){return this.makeSubscribe(t,void 0,r,n)}ping(t){this.socket.send(Tee(t).text)}close(){this.socket.close(1e3)}}Eee.PROTOCOL="graphql-transport-ws";function vee(e,t=r=>r){return Bu.parse(e,t)}function mee(e){return new Bu(_ee,e)}function Tee(e){return new Bu(RG,e,void 0)}function CG(e){return new Bu(OG,e,void 0)}function Aee(e,t){return new Bu(pee,t,e)}function gee(e){return new Bu(bG,void 0,e)}const u_=e=>{let t={};return e&&(typeof Headers<"u"&&e instanceof Headers||fee&&s_.Headers&&e instanceof s_.Headers?t=aee(e):Array.isArray(e)?e.forEach(([r,n])=>{r&&n!==void 0&&(t[r]=n)}):t=e),t},PG=e=>e.replace(/([\s,]|#[^\n\r]+)+/g," ").trim(),yee=e=>{if(!Array.isArray(e.query)){const n=e,i=[`query=${encodeURIComponent(PG(n.query))}`];return e.variables&&i.push(`variables=${encodeURIComponent(n.jsonSerializer.stringify(n.variables))}`),n.operationName&&i.push(`operationName=${encodeURIComponent(n.operationName)}`),i.join("&")}if(typeof e.variables<"u"&&!Array.isArray(e.variables))throw new Error("Cannot create query with given variable type, array expected");const t=e,r=e.query.reduce((n,i,a)=>(n.push({query:PG(i),variables:t.variables?t.jsonSerializer.stringify(t.variables[a]):void 0}),n),[]);return`query=${encodeURIComponent(t.jsonSerializer.stringify(r))}`},Ree=e=>async t=>{const{url:r,query:n,variables:i,operationName:a,fetch:u,fetchOptions:c,middleware:E}=t,_={...t.headers};let p="",L;e==="POST"?(L=bee(n,i,a,c.jsonSerializer),typeof L=="string"&&(_["Content-Type"]="application/json")):p=yee({query:n,variables:i,operationName:a,jsonSerializer:c.jsonSerializer??dP});const W={method:e,headers:_,body:L,...c};let ve=r,me=W;if(E){const Oe=await Promise.resolve(E({...W,url:r,operationName:a,variables:i})),{url:He,...qe}=Oe;ve=He,me=qe}return p&&(ve=`${ve}?${p}`),await u(ve,me)};class jm{constructor(t,r={}){this.url=t,this.requestConfig=r,this.rawRequest=async(...n)=>{const[i,a,u]=n,c=see(i,a,u),{headers:E,fetch:_=s_,method:p="POST",requestMiddleware:L,responseMiddleware:W,...ve}=this.requestConfig,{url:me}=this;c.signal!==void 0&&(ve.signal=c.signal);const{operationName:Oe}=km(c.query);return pP({url:me,query:c.query,variables:c.variables,headers:{...u_(hP(E)),...u_(c.requestHeaders)},operationName:Oe,fetch:_,method:p,fetchOptions:ve,middleware:L}).then(He=>(W&&W(He),He)).catch(He=>{throw W&&W(He),He})}}async request(t,...r){const[n,i]=r,a=oee(t,n,i),{headers:u,fetch:c=s_,method:E="POST",requestMiddleware:_,responseMiddleware:p,...L}=this.requestConfig,{url:W}=this;a.signal!==void 0&&(L.signal=a.signal);const{query:ve,operationName:me}=km(a.document);return pP({url:W,query:ve,variables:a.variables,headers:{...u_(hP(u)),...u_(a.requestHeaders)},operationName:me,fetch:c,method:E,fetchOptions:L,middleware:_}).then(Oe=>(p&&p(Oe),Oe.data)).catch(Oe=>{throw p&&p(Oe),Oe})}batchRequests(t,r){const n=uee(t,r),{headers:i,...a}=this.requestConfig;n.signal!==void 0&&(a.signal=n.signal);const u=n.documents.map(({document:E})=>km(E).query),c=n.documents.map(({variables:E})=>E);return pP({url:this.url,query:u,variables:c,headers:{...u_(hP(i)),...u_(n.requestHeaders)},operationName:void 0,fetch:this.requestConfig.fetch??s_,method:this.requestConfig.method||"POST",fetchOptions:a,middleware:this.requestConfig.requestMiddleware}).then(E=>(this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(E),E.data)).catch(E=>{throw this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(E),E})}setHeaders(t){return this.requestConfig.headers=t,this}setHeader(t,r){const{headers:n}=this.requestConfig;return n?n[t]=r:this.requestConfig.headers={[t]:r},this}setEndpoint(t){return this.url=t,this}}const pP=async e=>{const{query:t,variables:r,fetchOptions:n}=e,i=Ree(iee(e.method??"post")),a=Array.isArray(e.query),u=await i(e),c=await Cee(u,n.jsonSerializer??dP),E=Array.isArray(c)?!c.some(({data:p})=>!p):Boolean(c.data),_=Array.isArray(c)||!c.errors||Array.isArray(c.errors)&&!c.errors.length||n.errorPolicy==="all"||n.errorPolicy==="ignore";if(u.ok&&_&&E){const{errors:p,...L}=(Array.isArray(c),c),W=n.errorPolicy==="ignore"?L:c;return{...a?{data:W}:W,headers:u.headers,status:u.status}}else{const p=typeof c=="string"?{error:c}:c;throw new Gu({...p,status:u.status,headers:u.headers},{query:t,variables:r})}},RUe=async(...e)=>{const[t,r,...n]=e,i=parseRawRequestExtendedArgs(t,r,...n);return new jm(i.url).rawRequest({...i})};async function OUe(e,t,...r){const n=parseRequestExtendedArgs(e,t,...r);return new jm(n.url).request({...n})}const bUe=async(...e)=>{const t=Oee(e);return new jm(t.url).batchRequests(t)},Oee=e=>e.length===1?e[0]:{url:e[0],documents:e[1],requestHeaders:e[2],signal:void 0},bee=(e,t,r,n)=>{const i=n??dP;if(!Array.isArray(e))return i.stringify({query:e,variables:t,operationName:r});if(typeof t<"u"&&!Array.isArray(t))throw new Error("Cannot create request body with given variable type, array expected");const a=e.reduce((u,c,E)=>(u.push({query:c,variables:t?t[E]:void 0}),u),[]);return i.stringify(a)},Cee=async(e,t)=>{let r;return e.headers.forEach((n,i)=>{i.toLowerCase()==="content-type"&&(r=n)}),r&&(r.toLowerCase().startsWith("application/json")||r.toLowerCase().startsWith("application/graphql+json")||r.toLowerCase().startsWith("application/graphql-response+json"))?t.parse(await e.text()):e.text()},hP=e=>typeof e=="function"?e():e,CUe=(e,...t)=>e.reduce((r,n,i)=>`${r}${n}${i in t?String(t[i]):""}`,""),PUe=null,Hi=`
|
|
5345
5345
|
fragment CodingFields on Coding {
|
|
5346
5346
|
system
|
|
5347
5347
|
code
|
|
@@ -5630,7 +5630,7 @@ ${vP}`,IG=`
|
|
|
5630
5630
|
}
|
|
5631
5631
|
}
|
|
5632
5632
|
${bn}
|
|
5633
|
-
${Ur}`,
|
|
5633
|
+
${Ur}`,MUe=null,xee=`
|
|
5634
5634
|
fragment MedicationIngredientItemReferenceMedicationFields on Medication {
|
|
5635
5635
|
resourceType
|
|
5636
5636
|
identifier {
|
|
@@ -5738,7 +5738,7 @@ ${Vee}`,NG=`
|
|
|
5738
5738
|
}
|
|
5739
5739
|
${bn}
|
|
5740
5740
|
${Ur}
|
|
5741
|
-
${Gee}`}`,
|
|
5741
|
+
${Gee}`}`,LUe=null,DUe=null,yi=`
|
|
5742
5742
|
fragment MetaFields on Meta {
|
|
5743
5743
|
versionId
|
|
5744
5744
|
lastUpdated
|
|
@@ -8526,7 +8526,7 @@ ${la}`,ere=`
|
|
|
8526
8526
|
lastPerformed
|
|
8527
8527
|
}
|
|
8528
8528
|
}
|
|
8529
|
-
`,sre=(e,t,r,n)=>e();function ure(e,t=sre){return{getTasks(r,n){return t(i=>e.rawRequest(ete,r,Object.assign(Object.assign({},n),i)),"getTasks","query",r)},taskUpdateStatus(r,n){return t(i=>e.rawRequest(tte,r,Object.assign(Object.assign({},n),i)),"taskUpdateStatus","mutation",r)},createConnection(r,n){return t(i=>e.rawRequest(rte,r,Object.assign(Object.assign({},n),i)),"createConnection","mutation",r)},deleteConnection(r,n){return t(i=>e.rawRequest(nte,r,Object.assign(Object.assign({},n),i)),"deleteConnection","mutation",r)},disconnectConnection(r,n){return t(i=>e.rawRequest(ite,r,Object.assign(Object.assign({},n),i)),"disconnectConnection","mutation",r)},getDataSource(r,n){return t(i=>e.rawRequest(ate,r,Object.assign(Object.assign({},n),i)),"getDataSource","query",r)},getMemberConnections(r,n){return t(i=>e.rawRequest(ote,r,Object.assign(Object.assign({},n),i)),"getMemberConnections","query",r)},getOauthUrl(r,n){return t(i=>e.rawRequest(ste,r,Object.assign(Object.assign({},n),i)),"getOauthUrl","query",r)},updateDeviceRegistration(r,n){return t(i=>e.rawRequest(ute,r,Object.assign(Object.assign({},n),i)),"updateDeviceRegistration","mutation",r)},publishEvent(r,n){return t(i=>e.rawRequest(cte,r,Object.assign(Object.assign({},n),i)),"publishEvent","mutation",r)},getBinary(r,n){return t(i=>e.rawRequest(lte,r,Object.assign(Object.assign({},n),i)),"getBinary","query",r)},getFHIR(r,n){return t(i=>e.rawRequest(fte,r,Object.assign(Object.assign({},n),i)),"getFHIR","query",r)},getDiagnosticReports(r,n){return t(i=>e.rawRequest(_te,r,Object.assign(Object.assign({},n),i)),"getDiagnosticReports","query",r)},getAllergyIntoleranceGroups(r,n){return t(i=>e.rawRequest(dte,r,Object.assign(Object.assign({},n),i)),"getAllergyIntoleranceGroups","query",r)},getAllergyIntolerances(r,n){return t(i=>e.rawRequest(pte,r,Object.assign(Object.assign({},n),i)),"getAllergyIntolerances","query",r)},getCarePlanGroups(r,n){return t(i=>e.rawRequest(hte,r,Object.assign(Object.assign({},n),i)),"getCarePlanGroups","query",r)},getCarePlans(r,n){return t(i=>e.rawRequest(Ste,r,Object.assign(Object.assign({},n),i)),"getCarePlans","query",r)},getCareTeams(r,n){return t(i=>e.rawRequest(Ete,r,Object.assign(Object.assign({},n),i)),"getCareTeams","query",r)},getConditionGroups(r,n){return t(i=>e.rawRequest(vte,r,Object.assign(Object.assign({},n),i)),"getConditionGroups","query",r)},getConditions(r,n){return t(i=>e.rawRequest(mte,r,Object.assign(Object.assign({},n),i)),"getConditions","query",r)},getDiagnosticReportLabGroups(r,n){return t(i=>e.rawRequest(Tte,r,Object.assign(Object.assign({},n),i)),"getDiagnosticReportLabGroups","query",r)},getDocumentReferences(r,n){return t(i=>e.rawRequest(Ate,r,Object.assign(Object.assign({},n),i)),"getDocumentReferences","query",r)},getEncountersGroup(r,n){return t(i=>e.rawRequest(gte,r,Object.assign(Object.assign({},n),i)),"getEncountersGroup","query",r)},getEncounterQuery(r,n){return t(i=>e.rawRequest(yte,r,Object.assign(Object.assign({},n),i)),"getEncounterQuery","query",r)},GetHealthSummary(r,n){return t(i=>e.rawRequest(Rte,r,Object.assign(Object.assign({},n),i)),"GetHealthSummary","query",r)},getImmunizationGroups(r,n){return t(i=>e.rawRequest(Ote,r,Object.assign(Object.assign({},n),i)),"getImmunizationGroups","query",r)},getImmunizations(r,n){return t(i=>e.rawRequest(bte,r,Object.assign(Object.assign({},n),i)),"getImmunizations","query",r)},getProcedureGroups(r,n){return t(i=>e.rawRequest(Cte,r,Object.assign(Object.assign({},n),i)),"getProcedureGroups","query",r)},GetProcedures(r,n){return t(i=>e.rawRequest(Pte,r,Object.assign(Object.assign({},n),i)),"GetProcedures","query",r)},getVitalSignGroups(r,n){return t(i=>e.rawRequest(Mte,r,Object.assign(Object.assign({},n),i)),"getVitalSignGroups","query",r)},getVitalSigns(r,n){return t(i=>e.rawRequest(Ite,r,Object.assign(Object.assign({},n),i)),"getVitalSigns","query",r)},getLabGroups(r,n){return t(i=>e.rawRequest(Nte,r,Object.assign(Object.assign({},n),i)),"getLabGroups","query",r)},getLabKnowledge(r,n){return t(i=>e.rawRequest(Lte,r,Object.assign(Object.assign({},n),i)),"getLabKnowledge","query",r)},getLabs(r,n){return t(i=>e.rawRequest(Dte,r,Object.assign(Object.assign({},n),i)),"getLabs","query",r)},getMedicationDispense(r,n){return t(i=>e.rawRequest(wte,r,Object.assign(Object.assign({},n),i)),"getMedicationDispense","query",r)},getMedicationGroups(r,n){return t(i=>e.rawRequest(Ute,r,Object.assign(Object.assign({},n),i)),"getMedicationGroups","query",r)},getMedicationKnowledge(r,n){return t(i=>e.rawRequest(xte,r,Object.assign(Object.assign({},n),i)),"getMedicationKnowledge","query",r)},getMedicationPricing(r,n){return t(i=>e.rawRequest(Fte,r,Object.assign(Object.assign({},n),i)),"getMedicationPricing","query",r)},getMedicationRequest(r,n){return t(i=>e.rawRequest($te,r,Object.assign(Object.assign({},n),i)),"getMedicationRequest","query",r)},getMedicationStatements(r,n){return t(i=>e.rawRequest(Vte,r,Object.assign(Object.assign({},n),i)),"getMedicationStatements","query",r)},appointments(r,n){return t(i=>e.rawRequest(Gte,r,Object.assign(Object.assign({},n),i)),"appointments","query",r)},cancelAppointment(r,n){return t(i=>e.rawRequest(Bte,r,Object.assign(Object.assign({},n),i)),"cancelAppointment","mutation",r)},cancelationReasons(r,n){return t(i=>e.rawRequest(kte,r,Object.assign(Object.assign({},n),i)),"cancelationReasons","query",r)},authenticate(r,n){return t(i=>e.rawRequest(jte,r,Object.assign(Object.assign({},n),i)),"authenticate","query",r)},createGuestAccessToken(r,n){return t(i=>e.rawRequest(Hte,r,Object.assign(Object.assign({},n),i)),"createGuestAccessToken","mutation",r)},ExchangeAuthCode(r,n){return t(i=>e.rawRequest(Yte,r,Object.assign(Object.assign({},n),i)),"ExchangeAuthCode","mutation",r)},initialize(r,n){return t(i=>e.rawRequest(qte,r,Object.assign(Object.assign({},n),i)),"initialize","query",r)},login(r,n){return t(i=>e.rawRequest(Kte,r,Object.assign(Object.assign({},n),i)),"login","query",r)},refreshTokens(r,n){return t(i=>e.rawRequest(Wte,r,Object.assign(Object.assign({},n),i)),"refreshTokens","query",r)},nextQuestion(r,n){return t(i=>e.rawRequest(Qte,r,Object.assign(Object.assign({},n),i)),"nextQuestion","mutation",r)},providerSearch(r,n){return t(i=>e.rawRequest(zte,r,Object.assign(Object.assign({},n),i)),"providerSearch","query",r)},requestConnection(r,n){return t(i=>e.rawRequest(Xte,r,Object.assign(Object.assign({},n),i)),"requestConnection","mutation",r)},SearchHealthResources(r,n){return t(i=>e.rawRequest(Jte,r,Object.assign(Object.assign({},n),i)),"SearchHealthResources","query",r)},createConsent(r,n){return t(i=>e.rawRequest(Zte,r,Object.assign(Object.assign({},n),i)),"createConsent","mutation",r)},CreateDataExportDirectDownloadUrl(r,n){return t(i=>e.rawRequest(ere,r,Object.assign(Object.assign({},n),i)),"CreateDataExportDirectDownloadUrl","mutation",r)},CreateVerificationUrl(r,n){return t(i=>e.rawRequest(tre,r,Object.assign(Object.assign({},n),i)),"CreateVerificationUrl","mutation",r)},delete(r,n){return t(i=>e.rawRequest(rre,r,Object.assign(Object.assign({},n),i)),"delete","mutation",r)},getProfile(r,n){return t(i=>e.rawRequest(nre,r,Object.assign(Object.assign({},n),i)),"getProfile","query",r)},searchConsent(r,n){return t(i=>e.rawRequest(ire,r,Object.assign(Object.assign({},n),i)),"searchConsent","query",r)},updateUserProfile(r,n){return t(i=>e.rawRequest(are,r,Object.assign(Object.assign({},n),i)),"updateUserProfile","mutation",r)},VerificationStatus(r,n){return t(i=>e.rawRequest(ore,r,Object.assign(Object.assign({},n),i)),"VerificationStatus","query",r)}}}var cre=function(e,t,r,n){function i(a){return a instanceof r?a:new r(function(u){u(a)})}return new(r||(r=Promise))(function(a,u){function c(p){try{_(n.next(p))}catch(L){u(L)}}function E(p){try{_(n.throw(p))}catch(L){u(L)}}function _(p){p.done?a(p.value):i(p.value).then(c,E)}_((n=n.apply(e,t||[])).next())})};function UG(e,t,r){let n;t!==void 0&&(n=lre(t));const i={};r!=null&&(i["accept-language"]=r);const a=new jm(e,{errorPolicy:"all",mode:"cors",requestMiddleware:n,headers:i});return{client:a,sdk:ure(a)}}function lre(e){return t=>cre(this,void 0,void 0,function*(){const n=(yield e.getAccessToken()).data();return Object.assign(Object.assign({},t),{headers:Object.assign(Object.assign({},t.headers),{Authorization:`Bearer ${n}`})})})}var fre=function(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r},xG=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},th;const FG="accept-language";class _re{constructor(t){th.set(this,void 0),fre(this,th,t,"f")}setLanguage(t){xG(this,th,"f").setHeader(FG,t)}getLanguage(){var t;const r=xG(this,th,"f").requestConfig.headers;return(t=r?.[FG])!==null&&t!==void 0?t:null}}th=new WeakMap;const dre="INFORMATION",wUe="WARNING",$G="ERROR",pre="FATAL";class Qm{constructor(t){this.issue=t}message(){var t,r;const n=[];for(const i of this.issue){const a=(r=(t=i.details)===null||t===void 0?void 0:t.text)===null||r===void 0?void 0:r.trim();a==null||a.length===0||n.push(a)}return n.join(", ")}success(){for(const t of this.issue){const r=t.severity.toUpperCase();if(r===$G||r===pre)return!1}return!0}static error(t){return new Qm([{severity:$G,code:"EXCEPTION",details:{text:t.message}}])}static success(){return new Qm([{severity:dre,code:"INFORMATIONAL",details:{}}])}}function hre(e){for(const t of e){const r=VG(t);if(r!==null){if(r.code==="500")return!0;for(const n of r.resource.issue)if(n.code==="exception")return!0}}return!1}function yP(e=[]){const t=[];let r=!1;for(const a of e){const u=VG(a);if(u!==null){r=!0;for(const c of u.resource.issue)t.push(c)}}if(!r)return null;const n=new Qm(t),i=new O9(n);if(Ks(i.message)){const a=e.map(u=>u.message).join(", ");i.message=Ks(a)?"Unknown error. Contact b.well support for further assistance.":a}return i}function VG(e){const t=e.extensions,r=t?.code,n=t?.resource;return r===void 0||n===void 0||!Sre(n)?null:{code:r,resource:n}}function Sre(e){const t=e.issue;return t===void 0?!1:Array.isArray(t)}var GG=function(e,t,r,n){function i(a){return a instanceof r?a:new r(function(u){u(a)})}return new(r||(r=Promise))(function(a,u){function c(p){try{_(n.next(p))}catch(L){u(L)}}function E(p){try{_(n.throw(p))}catch(L){u(L)}}function _(p){p.done?a(p.value):i(p.value).then(c,E)}_((n=n.apply(e,t||[])).next())})},zm=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},c_,RP,OP;class Ts{constructor(){c_.add(this)}handleTransaction(t){return GG(this,void 0,void 0,function*(){try{const r=yield t,n=yP(r.errors);return n!==null?Kt.failure(n):Kt.success(r.data)}catch(r){if(Bi.isBwellError(r))return Kt.failure(r);if(zm(this,c_,"m",RP).call(this,r))return zm(this,c_,"m",OP).call(this,r);throw r}})}handleQuery(t){return GG(this,void 0,void 0,function*(){try{const r=yield t,n=yP(r.errors);return new tr(r.data,n)}catch(r){if(Bi.isBwellError(r))return new tr(void 0,r);if(zm(this,c_,"m",RP).call(this,r)){const n=zm(this,c_,"m",OP).call(this,r);return tr.error(n.error())}throw r}})}validateRequest(t){return t===void 0?Kt.success(null):t.validate()}}c_=new WeakSet,RP=function(t){return t instanceof Gu},OP=function(t){if(t.response.status>299)return new Cm(new R9("Network error",t.response.status));const r=t.response.errors;if(r!==void 0){if(hre(r))return new Cm(new DC("Internal server error",r));const n=yP(r);if(n!==null)return Kt.failure(n)}return new Cm(new DC("Unknown error",t))};var l_=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},ju,ol,rh;(function(e){e.ACTIVITY_CONTENT="https://www.icanbwell.com/contentDescription",e.ACTIVITY_ID="https://www.icanbwell.com/activityId",e.ACTIVITY_TOPIC="https://www.icanbwell.com/activityTopic",e.ACTIVITY_TYPE="https://www.icanbwell.com/activityType"})(rh||(rh={}));class Ere{constructor(){ju.add(this)}create(t){var r;const n=t.data(),i={page:n.page,pageSize:n.pageSize};return ki(n.id)&&(i.id=l_(this,ju,"m",ol).call(this,n.id)),ki(n.activityId)&&(i.identifier=l_(this,ju,"m",ol).call(this,n.activityId,rh.ACTIVITY_ID)),ki(n.activityType)&&(i.code=l_(this,ju,"m",ol).call(this,n.activityType,rh.ACTIVITY_TYPE)),ki(n.activityTopic)&&(i.tag=l_(this,ju,"m",ol).call(this,n.activityTopic,rh.ACTIVITY_TOPIC)),ki(n.status)&&(i.status=l_(this,ju,"m",ol).call(this,n.status)),ki(n.subject)&&(i.subject=l_(this,ju,"m",ol).call(this,n.subject)),i.sortMethod=n.smartSort===!0?"smartSort":"",ki(n.enrichContent)&&(i.enrichContent=n.enrichContent),i.contentLanguage=(r=n.contentLanguage)!==null&&r!==void 0?r:"en",{request:i}}}ju=new WeakSet,ol=function(t,r){const i={value:(Array.isArray(t)?t:[t]).join(",")};return ki(r)&&(i.system=r),{values:[i]}};var BG=function(e,t,r,n){function i(a){return a instanceof r?a:new r(function(u){u(a)})}return new(r||(r=Promise))(function(a,u){function c(p){try{_(n.next(p))}catch(L){u(L)}}function E(p){try{_(n.throw(p))}catch(L){u(L)}}function _(p){p.done?a(p.value):i(p.value).then(c,E)}_((n=n.apply(e,t||[])).next())})},kG=function(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r},Vo=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},Go,nh,bP;class vre extends Ts{constructor(t,r=new ji){super(),Go.set(this,void 0),nh.set(this,void 0),bP.set(this,new Ere),kG(this,nh,t,"f"),kG(this,Go,r.getLogger("GraphQLActivityManager"),"f")}getTasks(t){return BG(this,void 0,void 0,function*(){var r;const n=t.validate();if(n.failure())return n.toQueryResult();Vo(this,Go,"f").verbose("calling getTask query...");const i=yield this.handleQuery(Vo(this,nh,"f").getTasks(Vo(this,bP,"f").create(t)));return Vo(this,Go,"f").verbose("getTask query complete"),i.hasError()?Vo(this,Go,"f").error("getTask query error",i.error):Vo(this,Go,"f").info("successfully called getTask query"),new tr((r=i.data)===null||r===void 0?void 0:r.getTasks,i.error)})}updateTaskStatus(t){return BG(this,void 0,void 0,function*(){const r=t.validate();if(r.failure())return r;Vo(this,Go,"f").verbose("calling taskUpdateStatus mutation");const n=yield this.handleTransaction(Vo(this,nh,"f").taskUpdateStatus(t.data()));return Vo(this,Go,"f").verbose("taskUpdateStatus mutation complete"),n.failure()?(Vo(this,Go,"f").error("taskUpdateStatus error",n),n.intoFailure()):(Vo(this,Go,"f").info("taskUpdateStatus mutation success"),Kt.success(n.data().taskUpdateStatus))})}}Go=new WeakMap,nh=new WeakMap,bP=new WeakMap;var f_=function(e,t,r,n){function i(a){return a instanceof r?a:new r(function(u){u(a)})}return new(r||(r=Promise))(function(a,u){function c(p){try{_(n.next(p))}catch(L){u(L)}}function E(p){try{_(n.throw(p))}catch(L){u(L)}}function _(p){p.done?a(p.value):i(p.value).then(c,E)}_((n=n.apply(e,t||[])).next())})},CP=function(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r},un=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},Js,Cn,Xm;class mre extends Ts{constructor(t,r=new ji,n=new Tre){super(),Js.set(this,void 0),Cn.set(this,void 0),Xm.set(this,void 0),CP(this,Js,t,"f"),CP(this,Cn,r.getLogger("GraphQLConnectionManager"),"f"),CP(this,Xm,n,"f")}getMemberConnections(){return f_(this,void 0,void 0,function*(){un(this,Cn,"f").verbose("calling getMemberConnections...");const t=yield this.handleQuery(un(this,Js,"f").getMemberConnections());return un(this,Cn,"f").verbose("getMemberConnections complete"),t.hasError()?un(this,Cn,"f").error("getMemberConnections failed",t.error):un(this,Cn,"f").info("successfully called getMemberConnections"),un(this,Xm,"f").create(t)})}getDataSource(t){return f_(this,void 0,void 0,function*(){var r;const n=this.validateRequest(t);if(n.failure())return n.toQueryResult();un(this,Cn,"f").verbose("calling getDataSources...");const i=yield this.handleQuery(un(this,Js,"f").getDataSource(Object.assign({},t.data())));return un(this,Cn,"f").verbose("getDataSources complete"),i.hasError()?un(this,Cn,"f").error("getDataSources failed",i.error):un(this,Cn,"f").info("successfully called getDataSources"),new tr((r=i.data)===null||r===void 0?void 0:r.getDataSource,i.error)})}createConnection(t){return f_(this,void 0,void 0,function*(){const r=this.validateRequest(t);if(r.failure())return r.intoFailure();un(this,Cn,"f").verbose("calling createConnection...");const n=yield this.handleTransaction(un(this,Js,"f").createConnection(Object.assign({},t.data())));return un(this,Cn,"f").verbose("createConnection complete"),n.failure()?(un(this,Cn,"f").error("createConnection failed",n),n.intoFailure()):(un(this,Cn,"f").info("successfully called createConnection"),Kt.success(n.data().createConnection))})}disconnectConnection(t){return f_(this,void 0,void 0,function*(){const r=this.validateRequest(t);if(r.failure())return r.intoFailure();un(this,Cn,"f").verbose("calling disconnectConnection...");const n=yield this.handleTransaction(un(this,Js,"f").disconnectConnection(Object.assign({},t.data())));return un(this,Cn,"f").verbose("disconnectConnection complete"),n.failure()?(un(this,Cn,"f").error("disconnectConnection failed",n),n.intoFailure()):(un(this,Cn,"f").info("successfully called disconnectConnection"),Kt.success(n.data().disconnectConnection))})}deleteConnection(t){return f_(this,void 0,void 0,function*(){const r=this.validateRequest(t);if(r.failure())return r.intoFailure();un(this,Cn,"f").verbose("calling deleteConnection...");const n=yield this.handleTransaction(un(this,Js,"f").deleteConnection(Object.assign({},t.data())));return un(this,Cn,"f").verbose("deleteConnection complete"),n.failure()?(un(this,Cn,"f").error("deleteConnection failed",n),n.intoFailure()):(un(this,Cn,"f").info("successfully called deleteConnection"),Kt.success(n.data().deleteConnection))})}getOauthUrl(t){return f_(this,void 0,void 0,function*(){var r;const n=this.validateRequest(t);if(n.failure())return n.toQueryResult();un(this,Cn,"f").verbose("calling getOauthUrl...");const i=yield this.handleQuery(un(this,Js,"f").getOauthUrl(Object.assign({},t.data())));return un(this,Cn,"f").verbose("getOauthUrl complete"),i.hasError()?un(this,Cn,"f").error("getOauthUrl failed",i.error):un(this,Cn,"f").info("successfully called getOauthUrl"),new tr((r=i.data)===null||r===void 0?void 0:r.getOauthUrl,i.error)})}}Js=new WeakMap,Cn=new WeakMap,Xm=new WeakMap;class Tre{create(t){var r,n,i,a,u,c;const E=new Map,_=(i=(n=(r=t.data)===null||r===void 0?void 0:r.subscription_subscription)===null||n===void 0?void 0:n.entry)!==null&&i!==void 0?i:[];for(const L of _)if(Fn((a=L?.resource)===null||a===void 0?void 0:a.service_slug)&&Fn(L?.resource.subscriptionStatus))for(const W of L.resource.subscriptionStatus)E.set(L.resource.service_slug,{error:W?.error,extension:W?.extension});const p=(c=(u=t.data)===null||u===void 0?void 0:u.getMemberConnections)!==null&&c!==void 0?c:[];return new tr(p.map(L=>{var W;const ve=E.get(L.id);if(Fo(ve))return Object.assign(Object.assign({},L),{syncErrors:[]});const me=(W=ve.extension)===null||W===void 0?void 0:W.find(Oe=>Oe?.id===AZ);return Object.assign(Object.assign({},L),{syncErrors:ve.error,syncStatus:me?me.valueString:L.syncStatus})}),t.error)}}class Are{create(t){return{deviceToken:t.data().deviceToken,platformName:"",applicationName:"",notificationPreference:!1}}}class gre{create(t){return Object.assign(Object.assign({},t.data()),{notificationPreference:!0})}}var jG=function(e,t,r,n){function i(a){return a instanceof r?a:new r(function(u){u(a)})}return new(r||(r=Promise))(function(a,u){function c(p){try{_(n.next(p))}catch(L){u(L)}}function E(p){try{_(n.throw(p))}catch(L){u(L)}}function _(p){p.done?a(p.value):i(p.value).then(c,E)}_((n=n.apply(e,t||[])).next())})},HG=function(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r},so=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},ih,Bo,PP,MP;class yre extends Ts{constructor(t,r=new ji){super(),ih.set(this,void 0),Bo.set(this,void 0),PP.set(this,new Are),MP.set(this,new gre),HG(this,ih,t,"f"),HG(this,Bo,r.getLogger("GraphQLDeviceManager"),"f")}registerDevice(t){return jG(this,void 0,void 0,function*(){const r=this.validateRequest(t);if(r.failure())return r.intoFailure();const n=so(this,MP,"f").create(t);so(this,Bo,"f").verbose("calling updateDeviceRegistration to register device...");const i=yield this.handleTransaction(so(this,ih,"f").updateDeviceRegistration(n));return so(this,Bo,"f").verbose("updateDeviceRegistration complete for registration."),i.failure()?(so(this,Bo,"f").error("updateDeviceRegistration failed",i),i.intoFailure()):(so(this,Bo,"f").info("successfully called updateDeviceRegistration for registration."),Kt.success(i.data().updateDeviceRegistration))})}deregisterDevice(t){return jG(this,void 0,void 0,function*(){const r=this.validateRequest(t);if(r.failure())return r.intoFailure();so(this,Bo,"f").verbose("calling updateDeviceRegistration to deregister device...");const n=so(this,PP,"f").create(t),i=yield this.handleTransaction(so(this,ih,"f").updateDeviceRegistration(n));return so(this,Bo,"f").verbose("updateDeviceRegistration complete for deregistration."),i.failure()?(so(this,Bo,"f").error("updateDeviceRegistration failed",i),i.intoFailure()):(so(this,Bo,"f").info("successfully called updateDeviceRegistration for deregistration."),Kt.success(i.data().updateDeviceRegistration))})}}ih=new WeakMap,Bo=new WeakMap,PP=new WeakMap,MP=new WeakMap;class Rre{create(t){const r=JSON.parse(t.data().serializedNotification);return{notificationId:r.notification_id,messageId:r.itbl.messageId,eventType:VC.MobilePushOpen}}}var Ore=function(e,t,r,n){function i(a){return a instanceof r?a:new r(function(u){u(a)})}return new(r||(r=Promise))(function(a,u){function c(p){try{_(n.next(p))}catch(L){u(L)}}function E(p){try{_(n.throw(p))}catch(L){u(L)}}function _(p){p.done?a(p.value):i(p.value).then(c,E)}_((n=n.apply(e,t||[])).next())})},IP=function(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r},sl=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},Jm,Hu,Zm;class bre extends Ts{constructor(t,r=new ji,n=new Rre){super(),Jm.set(this,void 0),Hu.set(this,void 0),Zm.set(this,void 0),IP(this,Jm,t,"f"),IP(this,Hu,r.getLogger("GraphQLEventManager"),"f"),IP(this,Zm,n,"f")}handleNotification(t){return Ore(this,void 0,void 0,function*(){const r=this.validateRequest(t);if(r.failure())return r.intoFailure();sl(this,Hu,"f").debug("Calling publishEvent");let n;try{n=sl(this,Zm,"f").create(t)}catch(a){return sl(this,Hu,"f").error("Error creating publishEvent request",a),Kt.failure(new DC("Error creating publishEvent request"))}const i=yield this.handleTransaction(sl(this,Jm,"f").publishEvent(n));return sl(this,Hu,"f").debug("publishEvent completed"),i.failure()?(sl(this,Hu,"f").error("publishEvent mutation error",i),i.intoFailure()):(sl(this,Hu,"f").info("publishEvent mutation success"),Kt.success(i.data().publishEvent))})}}Jm=new WeakMap,Hu=new WeakMap,Zm=new WeakMap;class Cre{create(t){var r,n,i,a,u,c,E,_;const p=t.data();return{source:(r=p._source)!==null&&r!==void 0?r:null,id:(n=p._id)!==null&&n!==void 0?n:null,count:(i=p._count)!==null&&i!==void 0?i:25,getPagesOffset:(a=p._getpagesoffset)!==null&&a!==void 0?a:0,date:(u=p.date)!==null&&u!==void 0?u:null,sort:(c=p._sort)!==null&&c!==void 0?c:null,supportingInformation:(E=p.supporting_info)!==null&&E!==void 0?E:null,status:(_=p.status)!==null&&_!==void 0?_:null}}}class Pre{create(t){const r=t.data();return{appointment:{id:r.id,status:xC.Cancelled,cancelationReason:r.cancelationReason}}}}var NP=function(e,t,r,n){function i(a){return a instanceof r?a:new r(function(u){u(a)})}return new(r||(r=Promise))(function(a,u){function c(p){try{_(n.next(p))}catch(L){u(L)}}function E(p){try{_(n.throw(p))}catch(L){u(L)}}function _(p){p.done?a(p.value):i(p.value).then(c,E)}_((n=n.apply(e,t||[])).next())})},YG=function(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r},Yi=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},fa,__,LP,DP;class Mre extends Ts{constructor(t,r=new ji){super(),fa.set(this,void 0),__.set(this,void 0),LP.set(this,new Cre),DP.set(this,new Pre),YG(this,__,t,"f"),YG(this,fa,r.getLogger("GraphQLHealthSpaceManager"),"f")}getAppointments(t){return NP(this,void 0,void 0,function*(){var r;const n=this.validateRequest(t);if(n.failure())return n.toQueryResult();Yi(this,fa,"f").verbose("calling appointments query...");const i=yield this.handleQuery(Yi(this,__,"f").appointments(Yi(this,LP,"f").create(t)));return Yi(this,fa,"f").verbose("appointments query complete"),i.hasError()?Yi(this,fa,"f").error("appointments query error",i.error):Yi(this,fa,"f").info("successfully called appointments query"),new tr((r=i.data)===null||r===void 0?void 0:r.appointments,i.error)})}cancelAppointment(t){return NP(this,void 0,void 0,function*(){const r=this.validateRequest(t);if(r.failure())return r.intoFailure();Yi(this,fa,"f").verbose("calling cancel appointment mutation...");const n=yield this.handleTransaction(Yi(this,__,"f").cancelAppointment(Yi(this,DP,"f").create(t)));return Yi(this,fa,"f").verbose("cancel appointment mutation complete"),n.failure()?(Yi(this,fa,"f").error("cancel appointment mutation error",n),n.intoFailure()):(Yi(this,fa,"f").info("successfully called cancel appointment mutation"),Kt.success(n.data().updateAppointment))})}getCancelationReasons(t){return NP(this,void 0,void 0,function*(){var r;const n=this.validateRequest(t);if(n.failure())return n.toQueryResult();Yi(this,fa,"f").verbose("calling cancelationReasons query...");const i=yield this.handleQuery(Yi(this,__,"f").cancelationReasons(t.data()));return Yi(this,fa,"f").verbose("cancelationReasons query complete"),i.hasError()?Yi(this,fa,"f").error("cancelationReasons query error",i.error):Yi(this,fa,"f").info("successfully called cancelationReasons query"),new tr((r=i.data)===null||r===void 0?void 0:r.cancelationReasons,i.error)})}}fa=new WeakMap,__=new WeakMap,LP=new WeakMap,DP=new WeakMap;class Ire{create(t){var r;const n=(r=t.data)===null||r===void 0?void 0:r.getMedicationDispense;if(!n)return new tr(void 0,t.error);const i=Object.assign(Object.assign({},n),n?.resources&&{resources:n?.resources.map(a=>{var u,c,E,_,p,L,W;return Object.assign(Object.assign({},a),a.medication&&{medication:Object.assign(Object.assign({},a.medication),((u=a.medication)===null||u===void 0?void 0:u.resource)&&{resource:Object.assign(Object.assign({},(c=a.medication)===null||c===void 0?void 0:c.resource),((_=(E=a.medication)===null||E===void 0?void 0:E.resource)===null||_===void 0?void 0:_.ingredient)&&{ingredient:(W=(L=(p=a.medication)===null||p===void 0?void 0:p.resource)===null||L===void 0?void 0:L.ingredient)===null||W===void 0?void 0:W.map(ve=>{var me,Oe;return Object.assign(Object.assign({},ve),((me=ve?.itemReference)===null||me===void 0?void 0:me.itemReferenceResource)&&{itemReference:{resource:(Oe=ve?.itemReference)===null||Oe===void 0?void 0:Oe.itemReferenceResource}})})})})})})});return new tr(i,t.error)}}class Nre{create(t){var r;const n=(r=t.data)===null||r===void 0?void 0:r.getMedicationRequest;if(!n)return new tr(void 0,t.error);const i=Object.assign(Object.assign({},n),n?.resources&&{resources:n?.resources.map(a=>{var u,c,E,_,p,L,W;return Object.assign(Object.assign({},a),a.medication&&{medication:Object.assign(Object.assign({},a.medication),((u=a.medication)===null||u===void 0?void 0:u.resource)&&{resource:Object.assign(Object.assign({},(c=a.medication)===null||c===void 0?void 0:c.resource),((_=(E=a.medication)===null||E===void 0?void 0:E.resource)===null||_===void 0?void 0:_.ingredient)&&{ingredient:(W=(L=(p=a.medication)===null||p===void 0?void 0:p.resource)===null||L===void 0?void 0:L.ingredient)===null||W===void 0?void 0:W.map(ve=>{var me,Oe;return Object.assign(Object.assign({},ve),((me=ve?.itemReference)===null||me===void 0?void 0:me.itemReferenceResource)&&{itemReference:{resource:(Oe=ve?.itemReference)===null||Oe===void 0?void 0:Oe.itemReferenceResource}})})})})})})});return new tr(i,t.error)}}var En=function(e,t,r,n){function i(a){return a instanceof r?a:new r(function(u){u(a)})}return new(r||(r=Promise))(function(a,u){function c(p){try{_(n.next(p))}catch(L){u(L)}}function E(p){try{_(n.throw(p))}catch(L){u(L)}}function _(p){p.done?a(p.value):i(p.value).then(c,E)}_((n=n.apply(e,t||[])).next())})},eT=function(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r},lt=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},nn,Rt,tT,rT;class Lre extends Ts{constructor(t,r=new ji,n=new Nre,i=new Ire){super(),nn.set(this,void 0),Rt.set(this,void 0),tT.set(this,void 0),rT.set(this,void 0),eT(this,nn,t,"f"),eT(this,Rt,r.getLogger("GraphQLHealthManager"),"f"),eT(this,tT,n,"f"),eT(this,rT,i,"f")}getHealthSummary(){return En(this,void 0,void 0,function*(){var t;lt(this,Rt,"f").verbose("calling getHealthSummary...");const r=yield this.handleQuery(lt(this,nn,"f").GetHealthSummary());return lt(this,Rt,"f").verbose("getHealthSummary complete"),r.hasError()?lt(this,Rt,"f").error("getHealthSummary failed",r.error):lt(this,Rt,"f").info("successfully called getHealthSummary"),new tr((t=r.data)===null||t===void 0?void 0:t.getHealthSummary,r.error)})}getAllergyIntolerances(t){return En(this,void 0,void 0,function*(){var r,n;const i=this.validateRequest(t);if(i.failure())return i.toQueryResult();lt(this,Rt,"f").verbose("calling getAllergyIntolerances...");const a=yield this.handleQuery(lt(this,nn,"f").getAllergyIntolerances({request:(r=t?.data())!==null&&r!==void 0?r:null}));return lt(this,Rt,"f").verbose("getAllergyIntolerances complete"),a.hasError()&<(this,Rt,"f").error("getAllergyIntolerances errors",a.error),new tr((n=a.data)===null||n===void 0?void 0:n.getAllergyIntolerances,a.error)})}getAllergyIntoleranceGroups(t){return En(this,void 0,void 0,function*(){var r,n;const i=this.validateRequest(t);if(i.failure())return i.toQueryResult();lt(this,Rt,"f").verbose("calling getAllergyIntoleranceGroups...");const a=yield this.handleQuery(lt(this,nn,"f").getAllergyIntoleranceGroups({request:(r=t?.data())!==null&&r!==void 0?r:null}));return lt(this,Rt,"f").verbose("getAllergyIntoleranceGroups complete"),a.hasError()&<(this,Rt,"f").error("getAllergyIntoleranceGroups errors",a.error),new tr((n=a.data)===null||n===void 0?void 0:n.getAllergyIntoleranceGroups,a.error)})}getConditions(t){return En(this,void 0,void 0,function*(){var r,n;const i=this.validateRequest(t);if(i.failure())return i.toQueryResult();lt(this,Rt,"f").verbose("calling getConditions...");const a=yield this.handleQuery(lt(this,nn,"f").getConditions({request:(r=t?.data())!==null&&r!==void 0?r:null}));return lt(this,Rt,"f").verbose("getConditions complete"),a.hasError()&<(this,Rt,"f").error("getConditions errors",a.error),new tr((n=a.data)===null||n===void 0?void 0:n.getConditions,a.error)})}getConditionGroups(t){return En(this,void 0,void 0,function*(){var r,n;const i=this.validateRequest(t);if(i.failure())return i.toQueryResult();lt(this,Rt,"f").verbose("calling getConditionGroups...");const a=yield this.handleQuery(lt(this,nn,"f").getConditionGroups({request:(r=t?.data())!==null&&r!==void 0?r:null}));return lt(this,Rt,"f").verbose("getConditionGroups complete"),a.hasError()&<(this,Rt,"f").error("getConditionGroups errors",a.error),new tr((n=a.data)===null||n===void 0?void 0:n.getConditionGroups,a.error)})}getDiagnosticReports(t){return En(this,void 0,void 0,function*(){var r;const n=this.validateRequest(t);if(n.failure())return n.toQueryResult();lt(this,Rt,"f").verbose("calling getDiagnosticReports...");const i=yield this.handleQuery(lt(this,nn,"f").getDiagnosticReports());return lt(this,Rt,"f").verbose("getDiagnosticReports complete"),i.hasError()&<(this,Rt,"f").error("getDiagnosticReports errors",i.error),new tr((r=i.data)===null||r===void 0?void 0:r.diagnosticReports,i.error)})}getDocumentReferences(t){return En(this,void 0,void 0,function*(){var r,n;const i=this.validateRequest(t);if(i.failure())return i.toQueryResult();lt(this,Rt,"f").verbose("calling getDocumentReferences...");const a=yield this.handleQuery(lt(this,nn,"f").getDocumentReferences({request:(r=t?.data())!==null&&r!==void 0?r:null}));return lt(this,Rt,"f").verbose("getDocumentReferences complete"),a.hasError()&<(this,Rt,"f").error("getDocumentReferences errors",a.error),new tr((n=a.data)===null||n===void 0?void 0:n.getDocumentReferences,a.error)})}getBinary(t){return En(this,void 0,void 0,function*(){var r;const n=this.validateRequest(t);if(n.failure())return n.toQueryResult();lt(this,Rt,"f").verbose("calling getBinary...");const i=yield this.handleQuery(lt(this,nn,"f").getBinary({request:t.data()}));return lt(this,Rt,"f").verbose("getBinary complete"),i.hasError()&<(this,Rt,"f").error("getBinary errors",i.error),new tr((r=i.data)===null||r===void 0?void 0:r.getBinary,i.error)})}getLabs(t){return En(this,void 0,void 0,function*(){var r,n;const i=this.validateRequest(t);if(i.failure())return i.toQueryResult();lt(this,Rt,"f").verbose("calling getLabs...");const a=yield this.handleQuery(lt(this,nn,"f").getLabs({request:(r=t?.data())!==null&&r!==void 0?r:null}));return lt(this,Rt,"f").verbose("getLabs complete"),a.hasError()&<(this,Rt,"f").error("getLabs errors",a.error),new tr((n=a.data)===null||n===void 0?void 0:n.getLabs,a.error)})}getLabGroups(t){return En(this,void 0,void 0,function*(){var r,n;const i=this.validateRequest(t);if(i.failure())return i.toQueryResult();lt(this,Rt,"f").verbose("calling getLabGroups...");const a=yield this.handleQuery(lt(this,nn,"f").getLabGroups({request:(r=t?.data())!==null&&r!==void 0?r:null}));return lt(this,Rt,"f").verbose("getLabGroups complete"),a.hasError()&<(this,Rt,"f").error("getLabGroups errors",a.error),new tr((n=a.data)===null||n===void 0?void 0:n.getLabGroups,a.error)})}getCarePlans(t){return En(this,void 0,void 0,function*(){var r,n;const i=this.validateRequest(t);if(i.failure())return i.toQueryResult();lt(this,Rt,"f").verbose("calling getCarePlans...");const a=yield this.handleQuery(lt(this,nn,"f").getCarePlans({request:(r=t?.data())!==null&&r!==void 0?r:null}));return lt(this,Rt,"f").verbose("getCarePlans complete"),a.hasError()&<(this,Rt,"f").error("getCarePlans errors",a.error),new tr((n=a.data)===null||n===void 0?void 0:n.getCarePlans,a.error)})}getCarePlanGroups(t){return En(this,void 0,void 0,function*(){var r,n;const i=this.validateRequest(t);if(i.failure())return i.toQueryResult();lt(this,Rt,"f").verbose("calling getCarePlanGroups...");const a=yield this.handleQuery(lt(this,nn,"f").getCarePlanGroups({request:(r=t?.data())!==null&&r!==void 0?r:null}));return lt(this,Rt,"f").verbose("getCarePlanGroups complete"),a.hasError()&<(this,Rt,"f").error("getCarePlanGroups errors",a.error),new tr((n=a.data)===null||n===void 0?void 0:n.getCarePlanGroups,a.error)})}getCareTeams(t){return En(this,void 0,void 0,function*(){var r,n;const i=this.validateRequest(t);if(i.failure())return i.toQueryResult();lt(this,Rt,"f").verbose("calling getCareTeams");const a=yield this.handleQuery(lt(this,nn,"f").getCareTeams({request:(r=t?.data())!==null&&r!==void 0?r:null}));return lt(this,Rt,"f").verbose("getCareTeams complete"),a.hasError()&<(this,Rt,"f").error("getCareTeams errors",a.error),new tr((n=a.data)===null||n===void 0?void 0:n.getCareTeams,a.error)})}getEncounters(t){return En(this,void 0,void 0,function*(){var r,n;const i=this.validateRequest(t);if(i.failure())return i.toQueryResult();lt(this,Rt,"f").verbose("calling getEncounters...");const a=yield this.handleQuery(lt(this,nn,"f").getEncounterQuery({request:(r=t?.data())!==null&&r!==void 0?r:null}));return lt(this,Rt,"f").verbose("getEncounters complete"),a.hasError()&<(this,Rt,"f").error("getEncounters errors",a.error),new tr((n=a.data)===null||n===void 0?void 0:n.getEncounters,a.error)})}getEncounterGroups(t){return En(this,void 0,void 0,function*(){var r,n;const i=this.validateRequest(t);if(i.failure())return i.toQueryResult();lt(this,Rt,"f").verbose("calling getEncounterGroups...");const a=yield this.handleQuery(lt(this,nn,"f").getEncountersGroup({request:(r=t?.data())!==null&&r!==void 0?r:null}));return lt(this,Rt,"f").verbose("getEncounterGroups complete"),a.hasError()&<(this,Rt,"f").error("getEncounterGroups errors",a.error),new tr((n=a.data)===null||n===void 0?void 0:n.getEncounterGroups,a.error)})}getImmunizations(t){return En(this,void 0,void 0,function*(){var r,n;const i=this.validateRequest(t);if(i.failure())return i.toQueryResult();lt(this,Rt,"f").verbose("calling getImmunizations...");const a=yield this.handleQuery(lt(this,nn,"f").getImmunizations({request:(r=t?.data())!==null&&r!==void 0?r:null}));return lt(this,Rt,"f").verbose("getImmunizations complete"),a.hasError()&<(this,Rt,"f").error("getImmunizations errors",a.error),new tr((n=a.data)===null||n===void 0?void 0:n.getImmunizations,a.error)})}getImmunizationGroups(t){return En(this,void 0,void 0,function*(){var r,n;const i=this.validateRequest(t);if(i.failure())return i.toQueryResult();lt(this,Rt,"f").verbose("calling getImmunizationGroups...");const a=yield this.handleQuery(lt(this,nn,"f").getImmunizationGroups({request:(r=t?.data())!==null&&r!==void 0?r:null}));return lt(this,Rt,"f").verbose("getImmunizationGroups complete"),a.hasError()&<(this,Rt,"f").error("getImmunizationGroups errors",a.error),new tr((n=a.data)===null||n===void 0?void 0:n.getImmunizationGroups,a.error)})}getProcedures(t){return En(this,void 0,void 0,function*(){var r,n;const i=this.validateRequest(t);if(i.failure())return i.toQueryResult();lt(this,Rt,"f").verbose("calling getProcedures...");const a=yield this.handleQuery(lt(this,nn,"f").GetProcedures({request:(r=t?.data())!==null&&r!==void 0?r:null}));return lt(this,Rt,"f").verbose("getProcedures complete"),a.hasError()&<(this,Rt,"f").error("getProcedures errors",a.error),new tr((n=a.data)===null||n===void 0?void 0:n.getProcedures,a.error)})}getProcedureGroups(t){return En(this,void 0,void 0,function*(){var r,n;const i=this.validateRequest(t);if(i.failure())return i.toQueryResult();lt(this,Rt,"f").verbose("calling getProcedureGroups...");const a=yield this.handleQuery(lt(this,nn,"f").getProcedureGroups({request:(r=t?.data())!==null&&r!==void 0?r:null}));return lt(this,Rt,"f").verbose("getProcedureGroups complete"),a.hasError()&<(this,Rt,"f").error("getProcedureGroups errors",a.error),new tr((n=a.data)===null||n===void 0?void 0:n.getProcedureGroups,a.error)})}getVitalSigns(t){return En(this,void 0,void 0,function*(){var r,n;const i=this.validateRequest(t);if(i.failure())return i.toQueryResult();lt(this,Rt,"f").verbose("calling getVitalSigns...");const a=yield this.handleQuery(lt(this,nn,"f").getVitalSigns({request:(r=t?.data())!==null&&r!==void 0?r:null}));return lt(this,Rt,"f").verbose("getVitalSigns complete"),a.hasError()&<(this,Rt,"f").error("getVitalSigns errors",a.error),new tr((n=a.data)===null||n===void 0?void 0:n.getVitalSigns,a.error)})}getVitalSignGroups(t){return En(this,void 0,void 0,function*(){var r,n;const i=this.validateRequest(t);if(i.failure())return i.toQueryResult();lt(this,Rt,"f").verbose("calling getVitalSignGroups...");const a=yield this.handleQuery(lt(this,nn,"f").getVitalSignGroups({request:(r=t?.data())!==null&&r!==void 0?r:null}));return lt(this,Rt,"f").verbose("getVitalSignGroups complete"),a.hasError()&<(this,Rt,"f").error("getVitalSignGroups errors",a.error),new tr((n=a.data)===null||n===void 0?void 0:n.getVitalSignGroups,a.error)})}getMedicationDispense(t){return En(this,void 0,void 0,function*(){var r;const n=this.validateRequest(t);if(n.failure())return n.toQueryResult();lt(this,Rt,"f").verbose("calling getMedicationDispense...");const i=yield this.handleQuery(lt(this,nn,"f").getMedicationDispense({request:(r=t?.data())!==null&&r!==void 0?r:null}));return lt(this,Rt,"f").verbose("getMedicationDispense complete"),i.hasError()&<(this,Rt,"f").error("getMedicationDispense errors",i.error),lt(this,rT,"f").create(i)})}getMedicationRequest(t){return En(this,void 0,void 0,function*(){var r;const n=this.validateRequest(t);if(n.failure())return n.toQueryResult();lt(this,Rt,"f").verbose("calling getMedicationRequest...");const i=yield this.handleQuery(lt(this,nn,"f").getMedicationRequest({request:(r=t?.data())!==null&&r!==void 0?r:null}));return lt(this,Rt,"f").verbose("getMedicationRequest complete"),i.hasError()&<(this,Rt,"f").error("getMedicationRequest errors",i.error),lt(this,tT,"f").create(i)})}getMedicationStatements(t){return En(this,void 0,void 0,function*(){var r,n;const i=this.validateRequest(t);if(i.failure())return i.toQueryResult();lt(this,Rt,"f").verbose("calling getMedicationStatements...");const a=yield this.handleQuery(lt(this,nn,"f").getMedicationStatements({request:(r=t?.data())!==null&&r!==void 0?r:null}));return lt(this,Rt,"f").verbose("getMedicationStatements complete"),a.hasError()&<(this,Rt,"f").error("getMedicationStatements errors",a.error),new tr((n=a.data)===null||n===void 0?void 0:n.getMedicationStatements,a.error)})}getMedicationGroups(t){return En(this,void 0,void 0,function*(){var r,n;const i=this.validateRequest(t);if(i.failure())return i.toQueryResult();lt(this,Rt,"f").verbose("calling getMedicationGroups...");const a=yield this.handleQuery(lt(this,nn,"f").getMedicationGroups({request:(r=t?.data())!==null&&r!==void 0?r:null}));return lt(this,Rt,"f").verbose("getMedicationGroups complete"),a.hasError()&<(this,Rt,"f").error("getMedicationGroups errors",a.error),new tr((n=a.data)===null||n===void 0?void 0:n.getMedicationGroups,a.error)})}getMedicationKnowledge(t){return En(this,void 0,void 0,function*(){var r;const n=this.validateRequest(t);if(n.failure())return n.toQueryResult();lt(this,Rt,"f").verbose("calling getMedicationKnowledge...");const i=yield this.handleQuery(lt(this,nn,"f").getMedicationKnowledge({request:t.data()}));return lt(this,Rt,"f").verbose("getMedicationKnowledge complete"),i.hasError()&<(this,Rt,"f").error("getMedicationKnowledge errors",i.error),new tr((r=i.data)===null||r===void 0?void 0:r.getMedicationKnowledge,i.error)})}getLabKnowledge(t){return En(this,void 0,void 0,function*(){var r;const n=this.validateRequest(t);if(n.failure())return n.toQueryResult();lt(this,Rt,"f").verbose("calling getLabKnowledge...");const i=yield this.handleQuery(lt(this,nn,"f").getLabKnowledge({request:t.data()}));return lt(this,Rt,"f").verbose("getLabKnowledge complete"),i.hasError()&<(this,Rt,"f").error("getLabKnowledge errors",i.error),new tr((r=i.data)===null||r===void 0?void 0:r.getLabKnowledge,i.error)})}getMedicationPricing(t){return En(this,void 0,void 0,function*(){var r;const n=this.validateRequest(t);if(n.failure())return n.toQueryResult();lt(this,Rt,"f").verbose("calling getMedicationPricing...");const i=yield this.handleQuery(lt(this,nn,"f").getMedicationPricing({request:t.data()}));return lt(this,Rt,"f").verbose("getMedicationPricing complete"),i.hasError()&<(this,Rt,"f").error("getMedicationPricing errors",i.error),new tr((r=i.data)===null||r===void 0?void 0:r.getMedicationPricing,i.error)})}getDiagnosticReportLabGroups(t){return En(this,void 0,void 0,function*(){var r,n;const i=this.validateRequest(t);if(i.failure())return i.toQueryResult();lt(this,Rt,"f").verbose("calling getDiagnosticReportLabGroups...");const a=yield this.handleQuery(lt(this,nn,"f").getDiagnosticReportLabGroups({request:(r=t?.data())!==null&&r!==void 0?r:null}));return lt(this,Rt,"f").verbose("getDiagnosticReportLabGroups complete"),a.hasError()&<(this,Rt,"f").error("getDiagnosticReportLabGroups errors",a.error),new tr((n=a.data)===null||n===void 0?void 0:n.getDiagnosticReportLabGroups,a.error)})}}nn=new WeakMap,Rt=new WeakMap,tT=new WeakMap,rT=new WeakMap;var Dre=function(e,t,r,n){function i(a){return a instanceof r?a:new r(function(u){u(a)})}return new(r||(r=Promise))(function(a,u){function c(p){try{_(n.next(p))}catch(L){u(L)}}function E(p){try{_(n.throw(p))}catch(L){u(L)}}function _(p){p.done?a(p.value):i(p.value).then(c,E)}_((n=n.apply(e,t||[])).next())})},qG=function(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r},ah=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},ul,nT;class wre extends Ts{constructor(t,r=new ji){super(),ul.set(this,void 0),nT.set(this,void 0),qG(this,nT,t,"f"),qG(this,ul,r.getLogger("GraphQLQuestionnaireManager"),"f")}nextQuestion(t){return Dre(this,void 0,void 0,function*(){const r=t.validate();if(r.failure())return r.intoFailure();ah(this,ul,"f").verbose("calling nextQuestion mutation...");const n=yield this.handleTransaction(ah(this,nT,"f").nextQuestion(t.data()));return ah(this,ul,"f").verbose("nextQuestion mutation complete"),n.failure()?(ah(this,ul,"f").error("nextQuestion mutation failed",n.error()),n.intoFailure()):(ah(this,ul,"f").info("successfully called nextQuestion mutation"),Kt.success(n.data().nextQuestion))})}}ul=new WeakMap,nT=new WeakMap;class wP{create(t){var r,n,i,a,u,c,E,_,p;const L=t.data(),W=null,ve=(r=L.searchTerm)!==null&&r!==void 0?r:null,me=(n=L.specialtyFilters)!==null&&n!==void 0?n:null,Oe=(i=L.includePopulatedPROAonly)!==null&&i!==void 0?i:!1,He=(a=L.organizationTypeFilters)!==null&&a!==void 0?a:null,qe=(u=L.gender)!==null&&u!==void 0?u:null,We=(c=L.location)!==null&&c!==void 0?c:null;let ct=null;ki(L.sortBy)&&(ct={field:(E=L.sortBy.field)!==null&&E!==void 0?E:null,order:(_=L.sortBy.order)!==null&&_!==void 0?_:null});const yt=(p=L.filterFields)!==null&&p!==void 0?p:null,jt=L.page,dr=L.pageSize;return{client:W,searchTerm:ve,specialtyFilters:me,includePopulatedPROAonly:Oe,organizationTypeFilters:He,gender:qe,location:We,sortBy:ct,filterFields:yt,page:jt,pageSize:dr}}}var Ure=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},UP;class xre{constructor(){UP.set(this,new wP)}create(t){const r=Ure(this,UP,"f").create(t);return r.client={data_sets:[Nm.Connecthub]},r}}UP=new WeakMap;var Fre=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},xP;class $re{constructor(){xP.set(this,new wP)}create(t){const r=Fre(this,xP,"f").create(t);return r.client={data_sets:[Nm.Nppes]},r}}xP=new WeakMap;class Vre{create(t){var r,n,i,a;const u=t.data();return{institution:(r=u.institution)!==null&&r!==void 0?r:null,provider:(n=u.provider)!==null&&n!==void 0?n:null,city:(i=u.city)!==null&&i!==void 0?i:null,state:(a=u.state)!==null&&a!==void 0?a:null}}}class Gre{create(t){var r,n,i,a,u,c,E;const _=t.data();return{searchInput:{client:_.client,filters:(r=_.filters)!==null&&r!==void 0?r:null,orderBy:(n=_.orderBy)!==null&&n!==void 0?n:null,paging:{pageNumber:(i=_.page)!==null&&i!==void 0?i:null,pageSize:(a=_.pageSize)!==null&&a!==void 0?a:null},search:(u=_.search)!==null&&u!==void 0?u:null,searchLocation:(c=_.searchLocation)!==null&&c!==void 0?c:null,user:(E=_.user)!==null&&E!==void 0?E:null}}}}var oh=function(e,t,r,n){function i(a){return a instanceof r?a:new r(function(u){u(a)})}return new(r||(r=Promise))(function(a,u){function c(p){try{_(n.next(p))}catch(L){u(L)}}function E(p){try{_(n.throw(p))}catch(L){u(L)}}function _(p){p.done?a(p.value):i(p.value).then(c,E)}_((n=n.apply(e,t||[])).next())})},KG=function(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r},_n=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},Yu,zn,FP,$P,VP,GP,BP;class Bre extends Ts{constructor(t,r=new ji){super(),Yu.set(this,void 0),zn.set(this,void 0),FP.set(this,new wP),$P.set(this,new $re),VP.set(this,new xre),GP.set(this,new Vre),BP.set(this,new Gre),KG(this,Yu,t,"f"),KG(this,zn,r.getLogger("GraphQLSearchManager"),"f")}searchHealthResources(t){return oh(this,void 0,void 0,function*(){var r;const n=t.validate();if(n.failure())return n.toQueryResult();_n(this,zn,"f").verbose("calling searchHealthResources query");const i=yield this.handleQuery(_n(this,Yu,"f").SearchHealthResources(_n(this,BP,"f").create(t)));return _n(this,zn,"f").verbose("searchHealthResources query complete"),i.hasError()?_n(this,zn,"f").error("searchHealthResources query failed",i.error):_n(this,zn,"f").info("successfully called searchHealthResources query"),new tr((r=i.data)===null||r===void 0?void 0:r.searchHealthResources,i.error)})}search(t){return oh(this,void 0,void 0,function*(){var r;const n=t.validate();if(n.failure())return n.toQueryResult();_n(this,zn,"f").verbose("calling providerSearch search query");const i=yield this.handleQuery(_n(this,Yu,"f").providerSearch(_n(this,FP,"f").create(t)));return _n(this,zn,"f").verbose("providerSearch search query complete"),i.hasError()?_n(this,zn,"f").error("providerSearch search query failed",i.error):_n(this,zn,"f").info("successfully called providerSearch search query"),new tr((r=i.data)===null||r===void 0?void 0:r.providers,i.error)})}searchProviders(t){return oh(this,void 0,void 0,function*(){var r;const n=t.validate();if(n.failure())return n.toQueryResult();_n(this,zn,"f").verbose("calling providerSearch searchProviders query");const i=yield this.handleQuery(_n(this,Yu,"f").providerSearch(_n(this,$P,"f").create(t)));return _n(this,zn,"f").verbose("providerSearch searchProviders query complete"),i.hasError()?_n(this,zn,"f").error("providerSearch searchProviders query failed",i.error):_n(this,zn,"f").info("successfully called providerSearch searchProviders query"),new tr((r=i.data)===null||r===void 0?void 0:r.providers,i.error)})}searchConnections(t){return oh(this,void 0,void 0,function*(){var r;const n=t.validate();if(n.failure())return n.toQueryResult();_n(this,zn,"f").verbose("calling providerSearch searchConnections query");const i=yield this.handleQuery(_n(this,Yu,"f").providerSearch(_n(this,VP,"f").create(t)));return _n(this,zn,"f").verbose("providerSearch searchConnections query complete"),i.hasError()?_n(this,zn,"f").error("providerSearch searchConnections query failed",i.error):_n(this,zn,"f").info("successfully called providerSearch searchConnections query"),new tr((r=i.data)===null||r===void 0?void 0:r.providers,i.error)})}requestConnection(t){return oh(this,void 0,void 0,function*(){_n(this,zn,"f").verbose("calling requestConnection mutation");const r=yield this.handleTransaction(_n(this,Yu,"f").requestConnection(_n(this,GP,"f").create(t)));return _n(this,zn,"f").verbose("requestConnection mutation complete"),r.failure()?(_n(this,zn,"f").error("requestConnection mutation failed",r),r.intoFailure()):(_n(this,zn,"f").info("requestConnection request success"),Kt.success(r.data().requestConnection))})}}Yu=new WeakMap,zn=new WeakMap,FP=new WeakMap,$P=new WeakMap,VP=new WeakMap,GP=new WeakMap,BP=new WeakMap;const kre="http://www.icanbwell.com/consent-category";class jre{create(t){const r=t.data(),n={status:r.status,provision:{type:r.provision}};return ki(r.organizationId)&&(n.organization=[{type:"Organization",reference:`Organization/${r.organizationId}`}]),ki(r.category)&&(n.category=[{coding:[{system:kre,code:r.category}]}]),{consentInput:n}}}class Hre{create(t){const r=t.data();return{exportId:r.exportId,password:r.password}}}class Yre{create(t){var r,n;const i=t.data();return{callbackURL:(r=i.callbackUrl)!==null&&r!==void 0?r:null,includeAttributeMatchingCheck:(n=i.includeAttributeMatchingCheck)!==null&&n!==void 0?n:null}}}class qre{create(t){return{categoryCode:t.data().category}}}var d_=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},qu,kP,WG,QG,zG,XG;class Kre{constructor(){qu.add(this)}create(t){const r=t.data(),n={resourceType:BC.Person};return d_(this,qu,"m",kP).call(this,"id",r.id,n),d_(this,qu,"m",kP).call(this,"birthDate",r.birthDate,n),d_(this,qu,"m",WG).call(this,r,n),d_(this,qu,"m",zG).call(this,r,n),d_(this,qu,"m",QG).call(this,r,n),d_(this,qu,"m",XG).call(this,r,n),{person:n}}}qu=new WeakSet,kP=function(t,r,n){ka(r)||(n[t]=r)},WG=function(t,r){let n=!1;const{firstName:i,lastName:a}=t,u={};Fn(i)&&(n=!0,u.given=[i]),Fn(a)&&(n=!0,u.family=a),n&&(r.name=[u])},QG=function(t,r){let n=!1;const{addressUnit:i,addressStreet:a,city:u,stateOrProvidence:c,postageOrZipCode:E}=t,_={};if(Fn(i)||Fn(a)){n=!0;const p=[];Fn(a)&&p.push(a),Fn(i)&&p.push(i),_.line=p}Fn(u)&&(n=!0,_.city=u),Fn(c)&&(n=!0,_.state=c),Fn(E)&&(n=!0,_.postalCode=E),n&&(r.address=[_])},zG=function(t,r){const n=t.gender;ka(n)||(r.gender=n)},XG=function(t,r){const n=[],{homePhone:i,mobilePhone:a,workPhone:u,email:c}=t;Fn(i)&&n.push({system:"phone",use:"home",value:i}),Fn(a)&&n.push({system:"phone",use:"mobile",value:a}),Fn(u)&&n.push({system:"phone",use:"work",value:u}),Fn(c)&&n.push({system:"email",value:c}),n.length!==0&&(r.telecom=n)};var Ku=function(e,t,r,n){function i(a){return a instanceof r?a:new r(function(u){u(a)})}return new(r||(r=Promise))(function(a,u){function c(p){try{_(n.next(p))}catch(L){u(L)}}function E(p){try{_(n.throw(p))}catch(L){u(L)}}function _(p){p.done?a(p.value):i(p.value).then(c,E)}_((n=n.apply(e,t||[])).next())})},JG=function(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r},fr=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},ko,jr,jP,HP,YP,qP,KP;class Wre extends Ts{constructor(t,r=new ji){super(),ko.set(this,void 0),jr.set(this,void 0),jP.set(this,new jre),HP.set(this,new Kre),YP.set(this,new qre),qP.set(this,new Hre),KP.set(this,new Yre),JG(this,ko,t,"f"),JG(this,jr,r.getLogger("GraphQLUserManager"),"f")}getProfile(){return Ku(this,void 0,void 0,function*(){var t;fr(this,jr,"f").verbose("calling getProfile...");const r=yield this.handleQuery(fr(this,ko,"f").getProfile());return fr(this,jr,"f").verbose("getProfile complete"),r.hasError()?fr(this,jr,"f").error("getProfile failed",r.error):fr(this,jr,"f").info("successfully called getProfile"),new tr((t=r.data)===null||t===void 0?void 0:t.userProfile,r.error)})}delete(){return Ku(this,void 0,void 0,function*(){fr(this,jr,"f").verbose("calling delete...");const t=yield this.handleTransaction(fr(this,ko,"f").delete());return fr(this,jr,"f").verbose("delete complete"),t.failure()?(fr(this,jr,"f").error("delete failed",t.error),t.intoFailure()):(fr(this,jr,"f").info("successfully called delete"),Kt.success(null))})}updateProfile(t){return Ku(this,void 0,void 0,function*(){fr(this,jr,"f").verbose("calling updateUserProfile");const r=yield this.handleTransaction(fr(this,ko,"f").updateUserProfile(fr(this,HP,"f").create(t)));return fr(this,jr,"f").verbose("updateUserProfile complete"),r.failure()?(fr(this,jr,"f").error("updateUserProfile error",r),r.intoFailure()):(fr(this,jr,"f").info("updateUserProfile success"),Kt.success(r.data().updateUserProfile))})}getConsents(t){return Ku(this,void 0,void 0,function*(){var r;const n=this.validateRequest(t);if(n.failure())return n.toQueryResult();fr(this,jr,"f").verbose("calling consent search query...");let i;t!==void 0&&(i=fr(this,YP,"f").create(t));const a=yield this.handleQuery(fr(this,ko,"f").searchConsent(i));return fr(this,jr,"f").verbose("consent search query complete"),a.hasError()?fr(this,jr,"f").error("consent search failed",a.error):fr(this,jr,"f").info("successfully called consent search query"),new tr((r=a.data)===null||r===void 0?void 0:r.search,a.error)})}createConsent(t){return Ku(this,void 0,void 0,function*(){const r=t.validate();if(r.failure())return r;fr(this,jr,"f").verbose("calling createConsent mutation...");const n=yield this.handleTransaction(fr(this,ko,"f").createConsent(fr(this,jP,"f").create(t)));return fr(this,jr,"f").verbose("createConsent mutation complete"),n.failure()?(fr(this,jr,"f").error("createConsent mutation error",n),n.intoFailure()):(fr(this,jr,"f").info("createConsent mutation success"),Kt.success(n.data().createConsent))})}createDataExportDirectDownloadUrl(t){return Ku(this,void 0,void 0,function*(){const r=t.validate();if(r.failure())return r;fr(this,jr,"f").verbose("calling createDataExportDirectDownloadUrl mutation...");const n=yield this.handleTransaction(fr(this,ko,"f").CreateDataExportDirectDownloadUrl(fr(this,qP,"f").create(t)));return fr(this,jr,"f").verbose("createDataExportDirectDownloadUrl mutation complete"),n.failure()?(fr(this,jr,"f").error("createDataExportDirectDownloadUrl mutation error",n),n.intoFailure()):(fr(this,jr,"f").info("createDataExportDirectDownloadUrl mutation success"),Kt.success(n.data().createDataExportDirectDownloadUrl))})}createVerificationUrl(t){return Ku(this,void 0,void 0,function*(){fr(this,jr,"f").verbose("calling createVerificationUrl mutation...");const r=yield this.handleTransaction(fr(this,ko,"f").CreateVerificationUrl(fr(this,KP,"f").create(t)));return fr(this,jr,"f").verbose("createVerificationUrl complete"),r.failure()?(fr(this,jr,"f").error("createVerificationUrl error",r),r.intoFailure()):(fr(this,jr,"f").info("createVerificationUrl success"),Kt.success(r.data().createVerificationUrl))})}getVerificationStatus(){return Ku(this,void 0,void 0,function*(){fr(this,jr,"f").verbose("calling getVerificationStatus query...");const t=yield this.handleTransaction(fr(this,ko,"f").VerificationStatus());return fr(this,jr,"f").verbose("getVerificationStatus complete"),t.failure()?(fr(this,jr,"f").error("getVerificationStatus error",t),t.intoFailure()):(fr(this,jr,"f").info("getVerificationStatus success"),Kt.success(t.data().verificationStatus))})}}ko=new WeakMap,jr=new WeakMap,jP=new WeakMap,HP=new WeakMap,YP=new WeakMap,qP=new WeakMap,KP=new WeakMap;var ZG=function(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r},As=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},iT,uo;class Qre{constructor(t,r,n){iT.set(this,void 0),uo.set(this,void 0),ZG(this,iT,r.getLogger("GraphQLAPIProvider"),"f"),ZG(this,uo,t,"f"),As(this,iT,"f").verbose("initializing GraphQLClient"),this.activity=new vre(As(this,uo,"f"),r),this.connection=new mre(As(this,uo,"f"),r),this.device=new yre(As(this,uo,"f"),r),this.event=new bre(As(this,uo,"f"),r),this.health=new Lre(As(this,uo,"f"),r),this.healthSpace=new Mre(As(this,uo,"f"),r),this.user=new Wre(As(this,uo,"f"),r),this.search=new Bre(As(this,uo,"f"),r),this.questionnaire=new wre(As(this,uo,"f"),r),this.language=new _re(n)}}iT=new WeakMap,uo=new WeakMap;class zre{createApiProvider(t,r,n){const{sdk:i,client:a}=UG(t.graphQL.apiUrl,r,t.bwellConfig.language);return new Qre(i,n,a)}}var p_=function(e,t,r,n){function i(a){return a instanceof r?a:new r(function(u){u(a)})}return new(r||(r=Promise))(function(a,u){function c(p){try{_(n.next(p))}catch(L){u(L)}}function E(p){try{_(n.throw(p))}catch(L){u(L)}}function _(p){p.done?a(p.value):i(p.value).then(c,E)}_((n=n.apply(e,t||[])).next())})},eB=function(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r},dn=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},Zs,Pn;class Xre extends Ts{constructor(t,r=new ji){super(),Zs.set(this,void 0),Pn.set(this,void 0),eB(this,Zs,t,"f"),eB(this,Pn,r.getLogger("GraphQLIdentityManager"),"f")}initialize(t){return p_(this,void 0,void 0,function*(){dn(this,Pn,"f").verbose("executing initialize query...",{clientKey:t});const r=yield this.handleTransaction(dn(this,Zs,"f").initialize({clientKey:t}));return dn(this,Pn,"f").verbose("initialize query complete",r),r.failure()?(dn(this,Pn,"f").error("initialize failed.",r),r.intoFailure()):(dn(this,Pn,"f").info("successfully called initialize"),Kt.success(r.data().initSdk))})}authenticateWithOauth(t){return p_(this,void 0,void 0,function*(){dn(this,Pn,"f").verbose("exectuting oauth authenticate query...");const r=yield this.handleTransaction(dn(this,Zs,"f").authenticate({},{Authorization:t.jweToken,ClientKey:t.clientKey}));if(dn(this,Pn,"f").verbose("oauth authenticate query complete",r),r.failure())return dn(this,Pn,"f").error("oauth authenticate failed",r),r.intoFailure();dn(this,Pn,"f").info("oauth authenticate success");const n=r.data(),i={accessToken:n.getToken.accessToken.jwtToken,idToken:n.getToken.idToken.jwtToken,refreshToken:n.getToken.refreshToken.token};return Kt.success(i)})}authenticateWithUsernamePassword(t){return p_(this,void 0,void 0,function*(){dn(this,Pn,"f").verbose("exectuting username/password authenticate query...");const r=yield this.handleTransaction(dn(this,Zs,"f").login({email:t.email,password:t.password},{ClientKey:t.clientKey}));if(dn(this,Pn,"f").verbose("username/password authenticate query complete",r),r.failure())return dn(this,Pn,"f").error("username/password authenticate failed",r),r.intoFailure();dn(this,Pn,"f").info("username/password authenticate success");const n=r.data(),i={accessToken:n.login.accessToken.jwtToken,idToken:n.login.idToken.jwtToken,refreshToken:n.login.refreshToken.token};return Kt.success(i)})}authenticateWithAuthCode(t){return p_(this,void 0,void 0,function*(){dn(this,Pn,"f").verbose("executing authenticateWithAuthCode query...");const r=yield this.handleTransaction(dn(this,Zs,"f").ExchangeAuthCode({authCode:t.authCode}));if(dn(this,Pn,"f").verbose("authenticateWithAuthCode query complete",r),r.failure())return dn(this,Pn,"f").error("authenticateWithAuthCode failed",r),r.intoFailure();dn(this,Pn,"f").info("authenticateWithAuthCode successful");const n=r.data(),i={accessToken:n.exchangeAuthCode.accessToken.jwtToken,idToken:n.exchangeAuthCode.idToken.jwtToken,refreshToken:n.exchangeAuthCode.refreshToken.token};return Kt.success(i)})}refreshAccessToken(t){return p_(this,void 0,void 0,function*(){dn(this,Pn,"f").verbose("executing refreshAccessToken query...");const r=yield this.handleTransaction(dn(this,Zs,"f").refreshTokens({},{refresh_token:t.refreshToken,clientkey:t.clientKey}));return dn(this,Pn,"f").verbose("refreshAccessToken query complete",r),r.failure()?(dn(this,Pn,"f").error("refreshAccessToken failed",r),r.intoFailure()):(dn(this,Pn,"f").info("refreshAccessToken successful"),Kt.success(r.data().refresh))})}createGuestAccessToken(t){return p_(this,void 0,void 0,function*(){dn(this,Pn,"f").verbose("executing createGuestAccessToken mutation...",t);const r=yield this.handleTransaction(dn(this,Zs,"f").createGuestAccessToken(t));if(dn(this,Pn,"f").verbose("createGuestAccessToken mutation complete",r),r.failure())return dn(this,Pn,"f").error("createGuestAccessToken failed",r),r.intoFailure();dn(this,Pn,"f").info("createGuestAccessToken successful");const n=r.data();return Kt.success(n.createGuestAccessToken)})}}Zs=new WeakMap,Pn=new WeakMap;class Jre{createIdentityManager(t,r){const{sdk:n}=UG(t.graphQL.unauthApiUrl);return new Xre(n,r)}}function WP(e,t){const r=Object.keys(e);return r.length===t.length&&r.every(n=>t.includes(n))}function tB(e){return"token"in e&&WP(e,["token"])}function rB(e){return"email"in e&&"password"in e&&WP(e,["email","password"])}function nB(e){return"authCode"in e&&WP(e,["authCode"])}var Zre=function(e,t,r,n){function i(a){return a instanceof r?a:new r(function(u){u(a)})}return new(r||(r=Promise))(function(a,u){function c(p){try{_(n.next(p))}catch(L){u(L)}}function E(p){try{_(n.throw(p))}catch(L){u(L)}}function _(p){p.done?a(p.value):i(p.value).then(c,E)}_((n=n.apply(e,t||[])).next())})},QP=function(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r},sh=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},aT,h_,oT;class ene{constructor(t,r,n=new ji){aT.set(this,void 0),h_.set(this,void 0),oT.set(this,void 0),QP(this,aT,r,"f"),QP(this,oT,t,"f"),QP(this,h_,n.getLogger("OAuthStrategy"),"f")}authenticate(t){return Zre(this,void 0,void 0,function*(){if(!tB(t))return sh(this,h_,"f").error("Incorrect credentials type provided to OAuthStrategy"),Kt.failure(new LC("Expected OAuthCredentials",t));sh(this,h_,"f").verbose("authenticating via OAuth strategy...");const r=yield sh(this,aT,"f").authenticateWithOauth({jweToken:t.token,clientKey:sh(this,oT,"f").context.clientKey});return sh(this,h_,"f").verbose("finished OAuth authentication"),r})}}aT=new WeakMap,h_=new WeakMap,oT=new WeakMap;var tne=function(e,t,r,n){function i(a){return a instanceof r?a:new r(function(u){u(a)})}return new(r||(r=Promise))(function(a,u){function c(p){try{_(n.next(p))}catch(L){u(L)}}function E(p){try{_(n.throw(p))}catch(L){u(L)}}function _(p){p.done?a(p.value):i(p.value).then(c,E)}_((n=n.apply(e,t||[])).next())})},zP=function(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r},uh=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},sT,S_,uT;class rne{constructor(t,r,n=new ji){sT.set(this,void 0),S_.set(this,void 0),uT.set(this,void 0),zP(this,sT,r,"f"),zP(this,uT,t,"f"),zP(this,S_,n.getLogger("AuthCodeStrategy"),"f")}authenticate(t){return tne(this,void 0,void 0,function*(){if(!nB(t))return uh(this,S_,"f").error("Incorrect credentials type provided to AuthCodeStrategy"),Kt.failure(new LC("Expected AuthCodeCredentials",t));uh(this,S_,"f").verbose("authenticating via AuthCode strategy...");const r=yield uh(this,sT,"f").authenticateWithAuthCode({authCode:t.authCode,clientKey:uh(this,uT,"f").context.clientKey});return uh(this,S_,"f").verbose("finished AuthCode authentication"),r})}}sT=new WeakMap,S_=new WeakMap,uT=new WeakMap;var nne=function(e,t,r,n){function i(a){return a instanceof r?a:new r(function(u){u(a)})}return new(r||(r=Promise))(function(a,u){function c(p){try{_(n.next(p))}catch(L){u(L)}}function E(p){try{_(n.throw(p))}catch(L){u(L)}}function _(p){p.done?a(p.value):i(p.value).then(c,E)}_((n=n.apply(e,t||[])).next())})},XP=function(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r},ch=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},cT,E_,lT;class ine{constructor(t,r,n=new ji){cT.set(this,void 0),E_.set(this,void 0),lT.set(this,void 0),XP(this,cT,r,"f"),XP(this,lT,t,"f"),XP(this,E_,n.getLogger("UsernamePasswordStrategy"),"f")}authenticate(t){return nne(this,void 0,void 0,function*(){if(!rB(t))return ch(this,E_,"f").error("Invalid credentials type provided to UsernamePasswordStrategy. Please provide username and password."),Kt.failure(new LC("Expected UserPassCredentials",t));ch(this,E_,"f").verbose("authenticating via UsernamePassword strategy...");const r=yield ch(this,cT,"f").authenticateWithUsernamePassword({clientKey:ch(this,lT,"f").context.clientKey,email:t.email,password:t.password});return ch(this,E_,"f").verbose("finished OAuth authentication"),r})}}cT=new WeakMap,E_=new WeakMap,lT=new WeakMap;class ane{createAuthStrategy(t,r,n,i=new ji){if(rB(n))return new ine(t,r,i);if(tB(n))return new ene(t,r,i);if(nB(n))return new rne(t,r,i);throw new Error("Invalid credentials type provided; expected UserPassCredentials, OauthCredentials or AuthCodeCredentials.")}}var one=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof h.g=="object"?h.g:{},cl="1.9.0",iB=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;function sne(e){var t=new Set([e]),r=new Set,n=e.match(iB);if(!n)return function(){return!1};var i={major:+n[1],minor:+n[2],patch:+n[3],prerelease:n[4]};if(i.prerelease!=null)return function(E){return E===e};function a(c){return r.add(c),!1}function u(c){return t.add(c),!0}return function(E){if(t.has(E))return!0;if(r.has(E))return!1;var _=E.match(iB);if(!_)return a(E);var p={major:+_[1],minor:+_[2],patch:+_[3],prerelease:_[4]};return p.prerelease!=null||i.major!==p.major?a(E):i.major===0?i.minor===p.minor&&i.patch<=p.patch?u(E):a(E):i.minor<=p.minor?u(E):a(E)}}var une=sne(cl),cne=cl.split(".")[0],lh=Symbol.for("opentelemetry.js.api."+cne),fh=one;function _h(e,t,r,n){var i;n===void 0&&(n=!1);var a=fh[lh]=(i=fh[lh])!==null&&i!==void 0?i:{version:cl};if(!n&&a[e]){var u=new Error("@opentelemetry/api: Attempted duplicate registration of API: "+e);return r.error(u.stack||u.message),!1}if(a.version!==cl){var u=new Error("@opentelemetry/api: Registration of version v"+a.version+" for "+e+" does not match previously registered API v"+cl);return r.error(u.stack||u.message),!1}return a[e]=t,r.debug("@opentelemetry/api: Registered a global for "+e+" v"+cl+"."),!0}function ll(e){var t,r,n=(t=fh[lh])===null||t===void 0?void 0:t.version;if(!(!n||!une(n)))return(r=fh[lh])===null||r===void 0?void 0:r[e]}function dh(e,t){t.debug("@opentelemetry/api: Unregistering a global for "+e+" v"+cl+".");var r=fh[lh];r&&delete r[e]}function fT(e){return Symbol.for(e)}var lne=function(){function e(t){var r=this;r._currentContext=t?new Map(t):new Map,r.getValue=function(n){return r._currentContext.get(n)},r.setValue=function(n,i){var a=new e(r._currentContext);return a._currentContext.set(n,i),a},r.deleteValue=function(n){var i=new e(r._currentContext);return i._currentContext.delete(n),i}}return e}(),v_=new lne,fne=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,a=[],u;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)a.push(i.value)}catch(c){u={error:c}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(u)throw u.error}}return a},_ne=function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,a;n<i;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))},dne=function(){function e(){}return e.prototype.active=function(){return v_},e.prototype.with=function(t,r,n){for(var i=[],a=3;a<arguments.length;a++)i[a-3]=arguments[a];return r.call.apply(r,_ne([n],fne(i),!1))},e.prototype.bind=function(t,r){return r},e.prototype.enable=function(){return this},e.prototype.disable=function(){return this},e}(),pne=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,a=[],u;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)a.push(i.value)}catch(c){u={error:c}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(u)throw u.error}}return a},hne=function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,a;n<i;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))},Sne=function(){function e(t){this._namespace=t.namespace||"DiagComponentLogger"}return e.prototype.debug=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return ph("debug",this._namespace,t)},e.prototype.error=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return ph("error",this._namespace,t)},e.prototype.info=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return ph("info",this._namespace,t)},e.prototype.warn=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return ph("warn",this._namespace,t)},e.prototype.verbose=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return ph("verbose",this._namespace,t)},e}();function ph(e,t,r){var n=ll("diag");if(!!n)return r.unshift(t),n[e].apply(n,hne([],pne(r),!1))}var vn;(function(e){e[e.NONE=0]="NONE",e[e.ERROR=30]="ERROR",e[e.WARN=50]="WARN",e[e.INFO=60]="INFO",e[e.DEBUG=70]="DEBUG",e[e.VERBOSE=80]="VERBOSE",e[e.ALL=9999]="ALL"})(vn||(vn={}));function Ene(e,t){e<vn.NONE?e=vn.NONE:e>vn.ALL&&(e=vn.ALL),t=t||{};function r(n,i){var a=t[n];return typeof a=="function"&&e>=i?a.bind(t):function(){}}return{error:r("error",vn.ERROR),warn:r("warn",vn.WARN),info:r("info",vn.INFO),debug:r("debug",vn.DEBUG),verbose:r("verbose",vn.VERBOSE)}}var vne=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,a=[],u;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)a.push(i.value)}catch(c){u={error:c}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(u)throw u.error}}return a},mne=function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,a;n<i;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))},Tne="diag",gs=function(){function e(){function t(i){return function(){for(var a=[],u=0;u<arguments.length;u++)a[u]=arguments[u];var c=ll("diag");if(!!c)return c[i].apply(c,mne([],vne(a),!1))}}var r=this,n=function(i,a){var u,c,E;if(a===void 0&&(a={logLevel:vn.INFO}),i===r){var _=new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");return r.error((u=_.stack)!==null&&u!==void 0?u:_.message),!1}typeof a=="number"&&(a={logLevel:a});var p=ll("diag"),L=Ene((c=a.logLevel)!==null&&c!==void 0?c:vn.INFO,i);if(p&&!a.suppressOverrideMessage){var W=(E=new Error().stack)!==null&&E!==void 0?E:"<failed to generate stacktrace>";p.warn("Current logger will be overwritten from "+W),L.warn("Current logger will overwrite one already registered from "+W)}return _h("diag",L,r,!0)};r.setLogger=n,r.disable=function(){dh(Tne,r)},r.createComponentLogger=function(i){return new Sne(i)},r.verbose=t("verbose"),r.debug=t("debug"),r.info=t("info"),r.warn=t("warn"),r.error=t("error")}return e.instance=function(){return this._instance||(this._instance=new e),this._instance},e}(),Ane=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,a=[],u;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)a.push(i.value)}catch(c){u={error:c}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(u)throw u.error}}return a},gne=function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,a;n<i;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))},JP="context",yne=new dne,_T=function(){function e(){}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalContextManager=function(t){return _h(JP,t,gs.instance())},e.prototype.active=function(){return this._getContextManager().active()},e.prototype.with=function(t,r,n){for(var i,a=[],u=3;u<arguments.length;u++)a[u-3]=arguments[u];return(i=this._getContextManager()).with.apply(i,gne([t,r,n],Ane(a),!1))},e.prototype.bind=function(t,r){return this._getContextManager().bind(t,r)},e.prototype._getContextManager=function(){return ll(JP)||yne},e.prototype.disable=function(){this._getContextManager().disable(),dh(JP,gs.instance())},e}(),ys;(function(e){e[e.NONE=0]="NONE",e[e.SAMPLED=1]="SAMPLED"})(ys||(ys={}));var aB="0000000000000000",oB="00000000000000000000000000000000",sB={traceId:oB,spanId:aB,traceFlags:ys.NONE},hh=function(){function e(t){t===void 0&&(t=sB),this._spanContext=t}return e.prototype.spanContext=function(){return this._spanContext},e.prototype.setAttribute=function(t,r){return this},e.prototype.setAttributes=function(t){return this},e.prototype.addEvent=function(t,r){return this},e.prototype.addLink=function(t){return this},e.prototype.addLinks=function(t){return this},e.prototype.setStatus=function(t){return this},e.prototype.updateName=function(t){return this},e.prototype.end=function(t){},e.prototype.isRecording=function(){return!1},e.prototype.recordException=function(t,r){},e}(),ZP=fT("OpenTelemetry Context Key SPAN");function eM(e){return e.getValue(ZP)||void 0}function Rne(){return eM(_T.getInstance().active())}function tM(e,t){return e.setValue(ZP,t)}function One(e){return e.deleteValue(ZP)}function bne(e,t){return tM(e,new hh(t))}function uB(e){var t;return(t=eM(e))===null||t===void 0?void 0:t.spanContext()}var Cne=/^([0-9a-f]{32})$/i,Pne=/^[0-9a-f]{16}$/i;function cB(e){return Cne.test(e)&&e!==oB}function Mne(e){return Pne.test(e)&&e!==aB}function m_(e){return cB(e.traceId)&&Mne(e.spanId)}function Ine(e){return new hh(e)}var rM=_T.getInstance(),lB=function(){function e(){}return e.prototype.startSpan=function(t,r,n){n===void 0&&(n=rM.active());var i=Boolean(r?.root);if(i)return new hh;var a=n&&uB(n);return Nne(a)&&m_(a)?new hh(a):new hh},e.prototype.startActiveSpan=function(t,r,n,i){var a,u,c;if(!(arguments.length<2)){arguments.length===2?c=r:arguments.length===3?(a=r,c=n):(a=r,u=n,c=i);var E=u??rM.active(),_=this.startSpan(t,a,E),p=tM(E,_);return rM.with(p,c,void 0,_)}},e}();function Nne(e){return typeof e=="object"&&typeof e.spanId=="string"&&typeof e.traceId=="string"&&typeof e.traceFlags=="number"}var Lne=new lB,Dne=function(){function e(t,r,n,i){this._provider=t,this.name=r,this.version=n,this.options=i}return e.prototype.startSpan=function(t,r,n){return this._getTracer().startSpan(t,r,n)},e.prototype.startActiveSpan=function(t,r,n,i){var a=this._getTracer();return Reflect.apply(a.startActiveSpan,a,arguments)},e.prototype._getTracer=function(){if(this._delegate)return this._delegate;var t=this._provider.getDelegateTracer(this.name,this.version,this.options);return t?(this._delegate=t,this._delegate):Lne},e}(),wne=function(){function e(){}return e.prototype.getTracer=function(t,r,n){return new lB},e}(),Une=new wne,fB=function(){function e(){}return e.prototype.getTracer=function(t,r,n){var i;return(i=this.getDelegateTracer(t,r,n))!==null&&i!==void 0?i:new Dne(this,t,r,n)},e.prototype.getDelegate=function(){var t;return(t=this._delegate)!==null&&t!==void 0?t:Une},e.prototype.setDelegate=function(t){this._delegate=t},e.prototype.getDelegateTracer=function(t,r,n){var i;return(i=this._delegate)===null||i===void 0?void 0:i.getTracer(t,r,n)},e}(),nM="trace",xne=function(){function e(){this._proxyTracerProvider=new fB,this.wrapSpanContext=Ine,this.isSpanContextValid=m_,this.deleteSpan=One,this.getSpan=eM,this.getActiveSpan=Rne,this.getSpanContext=uB,this.setSpan=tM,this.setSpanContext=bne}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalTracerProvider=function(t){var r=_h(nM,this._proxyTracerProvider,gs.instance());return r&&this._proxyTracerProvider.setDelegate(t),r},e.prototype.getTracerProvider=function(){return ll(nM)||this._proxyTracerProvider},e.prototype.getTracer=function(t,r){return this.getTracerProvider().getTracer(t,r)},e.prototype.disable=function(){dh(nM,gs.instance()),this._proxyTracerProvider=new fB},e}(),ta=xne.getInstance(),iM=fT("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function Fne(e){return e.setValue(iM,!0)}function UUe(e){return e.deleteValue(iM)}function $ne(e){return e.getValue(iM)===!0}var aM="[_0-9a-z-*/]",Vne="[a-z]"+aM+"{0,255}",Gne="[a-z0-9]"+aM+"{0,240}@[a-z]"+aM+"{0,13}",Bne=new RegExp("^(?:"+Vne+"|"+Gne+")$"),kne=/^[ -~]{0,255}[!-~]$/,jne=/,|=/;function Hne(e){return Bne.test(e)}function Yne(e){return kne.test(e)&&!jne.test(e)}var _B=32,qne=512,dB=",",pB="=",Kne=function(){function e(t){this._internalState=new Map,t&&this._parse(t)}return e.prototype.set=function(t,r){var n=this._clone();return n._internalState.has(t)&&n._internalState.delete(t),n._internalState.set(t,r),n},e.prototype.unset=function(t){var r=this._clone();return r._internalState.delete(t),r},e.prototype.get=function(t){return this._internalState.get(t)},e.prototype.serialize=function(){var t=this;return this._keys().reduce(function(r,n){return r.push(n+pB+t.get(n)),r},[]).join(dB)},e.prototype._parse=function(t){t.length>qne||(this._internalState=t.split(dB).reverse().reduce(function(r,n){var i=n.trim(),a=i.indexOf(pB);if(a!==-1){var u=i.slice(0,a),c=i.slice(a+1,n.length);Hne(u)&&Yne(c)&&r.set(u,c)}return r},new Map),this._internalState.size>_B&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,_B))))},e.prototype._keys=function(){return Array.from(this._internalState.keys()).reverse()},e.prototype._clone=function(){var t=new e;return t._internalState=new Map(this._internalState),t},e}(),oM="traceparent",sM="tracestate",Wne="00",Qne="(?!ff)[\\da-f]{2}",zne="(?![0]{32})[\\da-f]{32}",Xne="(?![0]{16})[\\da-f]{16}",Jne="[\\da-f]{2}",Zne=new RegExp("^\\s?("+Qne+")-("+zne+")-("+Xne+")-("+Jne+")(-.*)?\\s?$");function eie(e){var t=Zne.exec(e);return!t||t[1]==="00"&&t[5]?null:{traceId:t[2],spanId:t[3],traceFlags:parseInt(t[4],16)}}var tie=function(){function e(){}return e.prototype.inject=function(t,r,n){var i=ta.getSpanContext(t);if(!(!i||$ne(t)||!m_(i))){var a=Wne+"-"+i.traceId+"-"+i.spanId+"-0"+Number(i.traceFlags||ys.NONE).toString(16);n.set(r,oM,a),i.traceState&&n.set(r,sM,i.traceState.serialize())}},e.prototype.extract=function(t,r,n){var i=n.get(r,oM);if(!i)return t;var a=Array.isArray(i)?i[0]:i;if(typeof a!="string")return t;var u=eie(a);if(!u)return t;u.isRemote=!0;var c=n.get(r,sM);if(c){var E=Array.isArray(c)?c.join(","):c;u.traceState=new Kne(typeof E=="string"?E:void 0)}return ta.setSpanContext(t,u)},e.prototype.fields=function(){return[oM,sM]},e}(),rie=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof h.g=="object"?h.g:{},fl="1.6.0",hB=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;function nie(e){var t=new Set([e]),r=new Set,n=e.match(hB);if(!n)return function(){return!1};var i={major:+n[1],minor:+n[2],patch:+n[3],prerelease:n[4]};if(i.prerelease!=null)return function(E){return E===e};function a(c){return r.add(c),!1}function u(c){return t.add(c),!0}return function(E){if(t.has(E))return!0;if(r.has(E))return!1;var _=E.match(hB);if(!_)return a(E);var p={major:+_[1],minor:+_[2],patch:+_[3],prerelease:_[4]};return p.prerelease!=null||i.major!==p.major?a(E):i.major===0?i.minor===p.minor&&i.patch<=p.patch?u(E):a(E):i.minor<=p.minor?u(E):a(E)}}var iie=nie(fl),aie=fl.split(".")[0],Sh=Symbol.for("opentelemetry.js.api."+aie),Eh=rie;function oie(e,t,r,n){var i;n===void 0&&(n=!1);var a=Eh[Sh]=(i=Eh[Sh])!==null&&i!==void 0?i:{version:fl};if(!n&&a[e]){var u=new Error("@opentelemetry/api: Attempted duplicate registration of API: "+e);return r.error(u.stack||u.message),!1}if(a.version!==fl){var u=new Error("@opentelemetry/api: Registration of version v"+a.version+" for "+e+" does not match previously registered API v"+fl);return r.error(u.stack||u.message),!1}return a[e]=t,r.debug("@opentelemetry/api: Registered a global for "+e+" v"+fl+"."),!0}function uM(e){var t,r,n=(t=Eh[Sh])===null||t===void 0?void 0:t.version;if(!(!n||!iie(n)))return(r=Eh[Sh])===null||r===void 0?void 0:r[e]}function sie(e,t){t.debug("@opentelemetry/api: Unregistering a global for "+e+" v"+fl+".");var r=Eh[Sh];r&&delete r[e]}var uie=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,a=[],u;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)a.push(i.value)}catch(c){u={error:c}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(u)throw u.error}}return a},cie=function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,a;n<i;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))},lie=function(){function e(t){this._namespace=t.namespace||"DiagComponentLogger"}return e.prototype.debug=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return vh("debug",this._namespace,t)},e.prototype.error=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return vh("error",this._namespace,t)},e.prototype.info=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return vh("info",this._namespace,t)},e.prototype.warn=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return vh("warn",this._namespace,t)},e.prototype.verbose=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return vh("verbose",this._namespace,t)},e}();function vh(e,t,r){var n=uM("diag");if(!!n)return r.unshift(t),n[e].apply(n,cie([],uie(r),!1))}var ci;(function(e){e[e.NONE=0]="NONE",e[e.ERROR=30]="ERROR",e[e.WARN=50]="WARN",e[e.INFO=60]="INFO",e[e.DEBUG=70]="DEBUG",e[e.VERBOSE=80]="VERBOSE",e[e.ALL=9999]="ALL"})(ci||(ci={}));function fie(e,t){e<ci.NONE?e=ci.NONE:e>ci.ALL&&(e=ci.ALL),t=t||{};function r(n,i){var a=t[n];return typeof a=="function"&&e>=i?a.bind(t):function(){}}return{error:r("error",ci.ERROR),warn:r("warn",ci.WARN),info:r("info",ci.INFO),debug:r("debug",ci.DEBUG),verbose:r("verbose",ci.VERBOSE)}}var _ie=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,a=[],u;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)a.push(i.value)}catch(c){u={error:c}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(u)throw u.error}}return a},die=function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,a;n<i;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))},pie="diag",SB=function(){function e(){function t(i){return function(){for(var a=[],u=0;u<arguments.length;u++)a[u]=arguments[u];var c=uM("diag");if(!!c)return c[i].apply(c,die([],_ie(a),!1))}}var r=this,n=function(i,a){var u,c,E;if(a===void 0&&(a={logLevel:ci.INFO}),i===r){var _=new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");return r.error((u=_.stack)!==null&&u!==void 0?u:_.message),!1}typeof a=="number"&&(a={logLevel:a});var p=uM("diag"),L=fie((c=a.logLevel)!==null&&c!==void 0?c:ci.INFO,i);if(p&&!a.suppressOverrideMessage){var W=(E=new Error().stack)!==null&&E!==void 0?E:"<failed to generate stacktrace>";p.warn("Current logger will be overwritten from "+W),L.warn("Current logger will overwrite one already registered from "+W)}return oie("diag",L,r,!0)};r.setLogger=n,r.disable=function(){sie(pie,r)},r.createComponentLogger=function(i){return new lie(i)},r.verbose=t("verbose"),r.debug=t("debug"),r.info=t("info"),r.warn=t("warn"),r.error=t("error")}return e.instance=function(){return this._instance||(this._instance=new e),this._instance},e}(),Wu=SB.instance(),hie=function(){function e(){var t=this;this._promise=new Promise(function(r,n){t._resolve=r,t._reject=n})}return Object.defineProperty(e.prototype,"promise",{get:function(){return this._promise},enumerable:!1,configurable:!0}),e.prototype.resolve=function(t){this._resolve(t)},e.prototype.reject=function(t){this._reject(t)},e}(),Sie=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,a=[],u;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)a.push(i.value)}catch(c){u={error:c}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(u)throw u.error}}return a},Eie=function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,a;n<i;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))},vie=function(){function e(t,r){this._callback=t,this._that=r,this._isCalled=!1,this._deferred=new hie}return Object.defineProperty(e.prototype,"isCalled",{get:function(){return this._isCalled},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"promise",{get:function(){return this._deferred.promise},enumerable:!1,configurable:!0}),e.prototype.call=function(){for(var t,r=this,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];if(!this._isCalled){this._isCalled=!0;try{Promise.resolve((t=this._callback).call.apply(t,Eie([this._that],Sie(n),!1))).then(function(a){return r._deferred.resolve(a)},function(a){return r._deferred.reject(a)})}catch(a){this._deferred.reject(a)}}return this._deferred.promise},e}(),T_;(function(e){e[e.SUCCESS=0]="SUCCESS",e[e.FAILED=1]="FAILED"})(T_||(T_={}));var cM;(function(e){e.AlwaysOff="always_off",e.AlwaysOn="always_on",e.ParentBasedAlwaysOff="parentbased_always_off",e.ParentBasedAlwaysOn="parentbased_always_on",e.ParentBasedTraceIdRatio="parentbased_traceidratio",e.TraceIdRatio="traceidratio"})(cM||(cM={}));var mie=",",Tie=["OTEL_SDK_DISABLED"];function Aie(e){return Tie.indexOf(e)>-1}var gie=["OTEL_BSP_EXPORT_TIMEOUT","OTEL_BSP_MAX_EXPORT_BATCH_SIZE","OTEL_BSP_MAX_QUEUE_SIZE","OTEL_BSP_SCHEDULE_DELAY","OTEL_BLRP_EXPORT_TIMEOUT","OTEL_BLRP_MAX_EXPORT_BATCH_SIZE","OTEL_BLRP_MAX_QUEUE_SIZE","OTEL_BLRP_SCHEDULE_DELAY","OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_ATTRIBUTE_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT","OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT","OTEL_SPAN_EVENT_COUNT_LIMIT","OTEL_SPAN_LINK_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT","OTEL_EXPORTER_OTLP_TIMEOUT","OTEL_EXPORTER_OTLP_TRACES_TIMEOUT","OTEL_EXPORTER_OTLP_METRICS_TIMEOUT","OTEL_EXPORTER_OTLP_LOGS_TIMEOUT","OTEL_EXPORTER_JAEGER_AGENT_PORT"];function yie(e){return gie.indexOf(e)>-1}var Rie=["OTEL_NO_PATCH_MODULES","OTEL_PROPAGATORS"];function Oie(e){return Rie.indexOf(e)>-1}var lM=1/0,fM=128,bie=128,Cie=128,EB={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:ci.INFO,OTEL_NO_PATCH_MODULES:[],OTEL_PROPAGATORS:["tracecontext","baggage"],OTEL_RESOURCE_ATTRIBUTES:"",OTEL_SERVICE_NAME:"",OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT:lM,OTEL_ATTRIBUTE_COUNT_LIMIT:fM,OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT:lM,OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT:fM,OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT:lM,OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT:fM,OTEL_SPAN_EVENT_COUNT_LIMIT:128,OTEL_SPAN_LINK_COUNT_LIMIT:128,OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT:bie,OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT:Cie,OTEL_TRACES_EXPORTER:"",OTEL_TRACES_SAMPLER:cM.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"};function Pie(e,t,r){if(!(typeof r[e]>"u")){var n=String(r[e]);t[e]=n.toLowerCase()==="true"}}function Mie(e,t,r,n,i){if(n===void 0&&(n=-1/0),i===void 0&&(i=1/0),typeof r[e]<"u"){var a=Number(r[e]);isNaN(a)||(a<n?t[e]=n:a>i?t[e]=i:t[e]=a)}}function Iie(e,t,r,n){n===void 0&&(n=mie);var i=r[e];typeof i=="string"&&(t[e]=i.split(n).map(function(a){return a.trim()}))}var Nie={ALL:ci.ALL,VERBOSE:ci.VERBOSE,DEBUG:ci.DEBUG,INFO:ci.INFO,WARN:ci.WARN,ERROR:ci.ERROR,NONE:ci.NONE};function Lie(e,t,r){var n=r[e];if(typeof n=="string"){var i=Nie[n.toUpperCase()];i!=null&&(t[e]=i)}}function Die(e){var t={};for(var r in EB){var n=r;switch(n){case"OTEL_LOG_LEVEL":Lie(n,t,e);break;default:if(Aie(n))Pie(n,t,e);else if(yie(n))Mie(n,t,e);else if(Oie(n))Iie(n,t,e);else{var i=e[n];typeof i<"u"&&i!==null&&(t[n]=String(i))}}}return t}var wie=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof h.g=="object"?h.g:{};function eu(){var e=Die(wie);return Object.assign({},EB,e)}function xUe(){return parseEnvironment(_globalThis)}var Uie=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,a=[],u;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)a.push(i.value)}catch(c){u={error:c}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(u)throw u.error}}return a},vB=1e4,xie=5,Fie=1e3,$ie=5e3,Vie=1.5;function Gie(e){e===void 0&&(e={});var t={};return Object.entries(e).forEach(function(r){var n=Uie(r,2),i=n[0],a=n[1];typeof a<"u"?t[i]=String(a):Wu.warn('Header "'+i+'" has invalid value ('+a+") and will be ignored")}),t}function Bie(e,t){return e.endsWith("/")||(e=e+"/"),e+t}function kie(e){try{var t=new URL(e);return t.pathname===""&&(t.pathname=t.pathname+"/"),t.toString()}catch{return Wu.warn("Could not parse export URL: '"+e+"'"),e}}function jie(e){return typeof e=="number"?e<=0?mB(e,vB):e:Hie()}function Hie(){var e,t=Number((e=eu().OTEL_EXPORTER_OTLP_TRACES_TIMEOUT)!==null&&e!==void 0?e:eu().OTEL_EXPORTER_OTLP_TIMEOUT);return t<=0?mB(t,vB):t}function mB(e,t){return Wu.warn("Timeout must be greater than 0",e),t}function Yie(e){var t=[429,502,503,504];return t.includes(e)}function qie(e){if(e==null)return-1;var t=Number.parseInt(e,10);if(Number.isInteger(t))return t>0?t*1e3:-1;var r=new Date(e).getTime()-Date.now();return r>=0?r:0}var Kie=function(){function e(t){t===void 0&&(t={}),this._sendingPromises=[],this.url=this.getDefaultUrl(t),typeof t.hostname=="string"&&(this.hostname=t.hostname),this.shutdown=this.shutdown.bind(this),this._shutdownOnce=new vie(this._shutdown,this),this._concurrencyLimit=typeof t.concurrencyLimit=="number"?t.concurrencyLimit:30,this.timeoutMillis=jie(t.timeoutMillis),this.onInit(t)}return e.prototype.export=function(t,r){if(this._shutdownOnce.isCalled){r({code:T_.FAILED,error:new Error("Exporter has been shutdown")});return}if(this._sendingPromises.length>=this._concurrencyLimit){r({code:T_.FAILED,error:new Error("Concurrent export limit reached")});return}this._export(t).then(function(){r({code:T_.SUCCESS})}).catch(function(n){r({code:T_.FAILED,error:n})})},e.prototype._export=function(t){var r=this;return new Promise(function(n,i){try{Wu.debug("items to be sent",t),r.send(t,n,i)}catch(a){i(a)}})},e.prototype.shutdown=function(){return this._shutdownOnce.call()},e.prototype.forceFlush=function(){return Promise.all(this._sendingPromises).then(function(){})},e.prototype._shutdown=function(){return Wu.debug("shutdown started"),this.onShutdown(),this.forceFlush()},e}(),Wie=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),mh=function(e){Wie(t,e);function t(r,n,i){var a=e.call(this,r)||this;return a.name="OTLPExporterError",a.data=i,a.code=n,a}return t}(Error),dT=function(){return dT=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},dT.apply(this,arguments)},Qie=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,a=[],u;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)a.push(i.value)}catch(c){u={error:c}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(u)throw u.error}}return a};function zie(e,t,r,n,i){if(navigator.sendBeacon(t,new Blob([e],r)))Wu.debug("sendBeacon - can send",e),n();else{var a=new mh("sendBeacon - cannot send "+e);i(a)}}function Xie(e,t,r,n,i,a){var u,c,E=!1,_=setTimeout(function(){if(clearTimeout(u),E=!0,c.readyState===XMLHttpRequest.DONE){var L=new mh("Request Timeout");a(L)}else c.abort()},n),p=function(L,W){L===void 0&&(L=xie),W===void 0&&(W=Fie),c=new XMLHttpRequest,c.open("POST",t);var ve={Accept:"application/json","Content-Type":"application/json"};Object.entries(dT(dT({},ve),r)).forEach(function(me){var Oe=Qie(me,2),He=Oe[0],qe=Oe[1];c.setRequestHeader(He,qe)}),c.send(e),c.onreadystatechange=function(){if(c.readyState===XMLHttpRequest.DONE&&E===!1)if(c.status>=200&&c.status<=299)Wu.debug("xhr success",e),i(),clearTimeout(_),clearTimeout(u);else if(c.status&&Yie(c.status)&&L>0){var me=void 0;W=Vie*W,c.getResponseHeader("Retry-After")?me=qie(c.getResponseHeader("Retry-After")):me=Math.round(Math.random()*($ie-W)+W),u=setTimeout(function(){p(L-1,W)},me)}else{var Oe=new mh("Failed to export with XHR (status: "+c.status+")",c.status);a(Oe),clearTimeout(_),clearTimeout(u)}},c.onabort=function(){if(E){var me=new mh("Request Timeout");a(me)}clearTimeout(_),clearTimeout(u)},c.onerror=function(){if(E){var me=new mh("Request Timeout");a(me)}clearTimeout(_),clearTimeout(u)}};p()}var Jie=Symbol("BaggageEntryMetadata"),Zie=SB.instance();function FUe(e){return e===void 0&&(e={}),new BaggageImpl(new Map(Object.entries(e)))}function eae(e){return typeof e!="string"&&(Zie.error("Cannot create baggage metadata from unknown type: "+typeof e),e=""),{__TYPE__:Jie,toString:function(){return e}}}var tae="=",TB=";",rae=",",$Ue="baggage",VUe=180,GUe=4096,BUe=8192,nae=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,a=[],u;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)a.push(i.value)}catch(c){u={error:c}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(u)throw u.error}}return a};function kUe(e){return e.reduce(function(t,r){var n=""+t+(t!==""?BAGGAGE_ITEMS_SEPARATOR:"")+r;return n.length>BAGGAGE_MAX_TOTAL_LENGTH?t:n},"")}function jUe(e){return e.getAllEntries().map(function(t){var r=nae(t,2),n=r[0],i=r[1],a=encodeURIComponent(n)+"="+encodeURIComponent(i.value);return i.metadata!==void 0&&(a+=BAGGAGE_PROPERTIES_SEPARATOR+i.metadata.toString()),a})}function iae(e){var t=e.split(TB);if(!(t.length<=0)){var r=t.shift();if(!!r){var n=r.indexOf(tae);if(!(n<=0)){var i=decodeURIComponent(r.substring(0,n).trim()),a=decodeURIComponent(r.substring(n+1).trim()),u;return t.length>0&&(u=eae(t.join(TB))),{key:i,value:a,metadata:u}}}}}function AB(e){return typeof e!="string"||e.length===0?{}:e.split(rae).map(function(t){return iae(t)}).filter(function(t){return t!==void 0&&t.value.length>0}).reduce(function(t,r){return t[r.key]=r.value,t},{})}var aae=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),pT=function(){return pT=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},pT.apply(this,arguments)},oae=function(e){aae(t,e);function t(r,n,i){r===void 0&&(r={});var a=e.call(this,r)||this;return a._useXHR=!1,a._serializer=n,a._contentType=i,a._useXHR=!!r.headers||typeof navigator.sendBeacon!="function",a._useXHR?a._headers=Object.assign({},Gie(r.headers),AB(eu().OTEL_EXPORTER_OTLP_HEADERS)):a._headers={},a}return t.prototype.onInit=function(){},t.prototype.onShutdown=function(){},t.prototype.send=function(r,n,i){var a=this,u;if(this._shutdownOnce.isCalled){Wu.debug("Shutdown already started. Cannot send objects");return}var c=(u=this._serializer.serializeRequest(r))!==null&&u!==void 0?u:new Uint8Array,E=new Promise(function(p,L){a._useXHR?Xie(c,a.url,pT(pT({},a._headers),{"Content-Type":a._contentType}),a.timeoutMillis,p,L):zie(c,a.url,{type:a._contentType},p,L)}).then(n,i);this._sendingPromises.push(E);var _=function(){var p=a._sendingPromises.indexOf(E);a._sendingPromises.splice(p,1)};E.then(_,_)},t}(Kie),sae=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,a=[],u;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)a.push(i.value)}catch(c){u={error:c}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(u)throw u.error}}return a};function _M(e){return{name:e.name,version:e.version}}function _l(e){return Object.keys(e).map(function(t){return dM(t,e[t])})}function dM(e,t){return{key:e,value:pM(t)}}function pM(e){var t=typeof e;return t==="string"?{stringValue:e}:t==="number"?Number.isInteger(e)?{intValue:e}:{doubleValue:e}:t==="boolean"?{boolValue:e}:e instanceof Uint8Array?{bytesValue:e}:Array.isArray(e)?{arrayValue:{values:e.map(pM)}}:t==="object"&&e!=null?{kvlistValue:{values:Object.entries(e).map(function(r){var n=sae(r,2),i=n[0],a=n[1];return dM(i,a)})}}:{}}function uae(e,t){var r,n=e.spanContext(),i=e.status;return{traceId:t.encodeSpanContext(n.traceId),spanId:t.encodeSpanContext(n.spanId),parentSpanId:t.encodeOptionalSpanContext(e.parentSpanId),traceState:(r=n.traceState)===null||r===void 0?void 0:r.serialize(),name:e.name,kind:e.kind==null?0:e.kind+1,startTimeUnixNano:t.encodeHrTime(e.startTime),endTimeUnixNano:t.encodeHrTime(e.endTime),attributes:_l(e.attributes),droppedAttributesCount:e.droppedAttributesCount,events:e.events.map(function(a){return lae(a,t)}),droppedEventsCount:e.droppedEventsCount,status:{code:i.code,message:i.message},links:e.links.map(function(a){return cae(a,t)}),droppedLinksCount:e.droppedLinksCount}}function cae(e,t){var r;return{attributes:e.attributes?_l(e.attributes):[],spanId:t.encodeSpanContext(e.context.spanId),traceId:t.encodeSpanContext(e.context.traceId),traceState:(r=e.context.traceState)===null||r===void 0?void 0:r.serialize(),droppedAttributesCount:e.droppedAttributesCount||0}}function lae(e,t){return{attributes:e.attributes?_l(e.attributes):[],name:e.name,timeUnixNano:t.encodeHrTime(e.time),droppedAttributesCount:e.droppedAttributesCount||0}}var gB=9,fae=6,_ae=Math.pow(10,fae),hT=Math.pow(10,gB);function ST(e){var t=e/1e3,r=Math.trunc(t),n=Math.round(e%1e3*_ae);return[r,n]}function yB(){var e=performance.timeOrigin;if(typeof e!="number"){var t=performance;e=t.timing&&t.timing.fetchStart}return e}function dae(e){var t=ST(yB()),r=ST(typeof e=="number"?e:performance.now());return hae(t,r)}function HUe(e){if(RB(e))return e;if(typeof e=="number")return e<yB()?dae(e):ST(e);if(e instanceof Date)return ST(e.getTime());throw TypeError("Invalid input type")}function YUe(e,t){var r=t[0]-e[0],n=t[1]-e[1];return n<0&&(r-=1,n+=hT),[r,n]}function qUe(e){var t=gB,r=""+"0".repeat(t)+e[1]+"Z",n=r.substr(r.length-t-1),i=new Date(e[0]*1e3).toISOString();return i.replace("000Z",n)}function pae(e){return e[0]*hT+e[1]}function KUe(e){return e[0]*1e3+e[1]/1e6}function WUe(e){return e[0]*1e6+e[1]/1e3}function RB(e){return Array.isArray(e)&&e.length===2&&typeof e[0]=="number"&&typeof e[1]=="number"}function QUe(e){return RB(e)||typeof e=="number"||e instanceof Date}function hae(e,t){var r=[e[0]+t[0],e[1]+t[1]];return r[1]>=hT&&(r[1]-=hT,r[0]+=1),r}function OB(e){return e>=48&&e<=57?e-48:e>=97&&e<=102?e-87:e-55}function hM(e){for(var t=new Uint8Array(e.length/2),r=0,n=0;n<e.length;n+=2){var i=OB(e.charCodeAt(n)),a=OB(e.charCodeAt(n+1));t[r++]=i<<4|a}return t}function bB(e){var t=BigInt(1e9);return BigInt(e[0])*t+BigInt(e[1])}function Sae(e){var t=Number(BigInt.asUintN(32,e)),r=Number(BigInt.asUintN(32,e>>BigInt(32)));return{low:t,high:r}}function CB(e){var t=bB(e);return Sae(t)}function Eae(e){var t=bB(e);return t.toString()}var vae=typeof BigInt<"u"?Eae:pae;function PB(e){return e}function MB(e){if(e!==void 0)return hM(e)}var mae={encodeHrTime:CB,encodeSpanContext:hM,encodeOptionalSpanContext:MB};function SM(e){var t,r;if(e===void 0)return mae;var n=(t=e.useLongBits)!==null&&t!==void 0?t:!0,i=(r=e.useHex)!==null&&r!==void 0?r:!1;return{encodeHrTime:n?CB:vae,encodeSpanContext:i?PB:hM,encodeOptionalSpanContext:i?PB:MB}}function EM(e){return{attributes:_l(e.attributes),droppedAttributesCount:0}}var Tae=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Aae=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,a=[],u;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)a.push(i.value)}catch(c){u={error:c}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(u)throw u.error}}return a};function gae(e,t){var r=SM(t);return{resourceSpans:Rae(e,r)}}function yae(e){var t,r,n=new Map;try{for(var i=Tae(e),a=i.next();!a.done;a=i.next()){var u=a.value,c=n.get(u.resource);c||(c=new Map,n.set(u.resource,c));var E=u.instrumentationLibrary.name+"@"+(u.instrumentationLibrary.version||"")+":"+(u.instrumentationLibrary.schemaUrl||""),_=c.get(E);_||(_=[],c.set(E,_)),_.push(u)}}catch(p){t={error:p}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return n}function Rae(e,t){for(var r=yae(e),n=[],i=r.entries(),a=i.next();!a.done;){for(var u=Aae(a.value,2),c=u[0],E=u[1],_=[],p=E.values(),L=p.next();!L.done;){var W=L.value;if(W.length>0){var ve=W.map(function(Oe){return uae(Oe,t)});_.push({scope:_M(W[0].instrumentationLibrary),spans:ve,schemaUrl:W[0].instrumentationLibrary.schemaUrl})}L=p.next()}var me={resource:EM(c),scopeSpans:_,schemaUrl:void 0};n.push(me),a=i.next()}return n}var ET;(function(e){e[e.INT=0]="INT",e[e.DOUBLE=1]="DOUBLE"})(ET||(ET={}));var A_;(function(e){e[e.HISTOGRAM=0]="HISTOGRAM",e[e.EXPONENTIAL_HISTOGRAM=1]="EXPONENTIAL_HISTOGRAM",e[e.GAUGE=2]="GAUGE",e[e.SUM=3]="SUM"})(A_||(A_={}));var vT;(function(e){e[e.DELTA=0]="DELTA",e[e.CUMULATIVE=1]="CUMULATIVE"})(vT||(vT={}));function Oae(e,t){var r=SM(t);return{resource:EM(e.resource),schemaUrl:void 0,scopeMetrics:bae(e.scopeMetrics,r)}}function bae(e,t){return Array.from(e.map(function(r){return{scope:_M(r.scope),metrics:r.metrics.map(function(n){return Cae(n,t)}),schemaUrl:r.scope.schemaUrl}}))}function Cae(e,t){var r={name:e.descriptor.name,description:e.descriptor.description,unit:e.descriptor.unit},n=Nae(e.aggregationTemporality);switch(e.dataPointType){case A_.SUM:r.sum={aggregationTemporality:n,isMonotonic:e.isMonotonic,dataPoints:IB(e,t)};break;case A_.GAUGE:r.gauge={dataPoints:IB(e,t)};break;case A_.HISTOGRAM:r.histogram={aggregationTemporality:n,dataPoints:Mae(e,t)};break;case A_.EXPONENTIAL_HISTOGRAM:r.exponentialHistogram={aggregationTemporality:n,dataPoints:Iae(e,t)};break}return r}function Pae(e,t,r){var n={attributes:_l(e.attributes),startTimeUnixNano:r.encodeHrTime(e.startTime),timeUnixNano:r.encodeHrTime(e.endTime)};switch(t){case ET.INT:n.asInt=e.value;break;case ET.DOUBLE:n.asDouble=e.value;break}return n}function IB(e,t){return e.dataPoints.map(function(r){return Pae(r,e.descriptor.valueType,t)})}function Mae(e,t){return e.dataPoints.map(function(r){var n=r.value;return{attributes:_l(r.attributes),bucketCounts:n.buckets.counts,explicitBounds:n.buckets.boundaries,count:n.count,sum:n.sum,min:n.min,max:n.max,startTimeUnixNano:t.encodeHrTime(r.startTime),timeUnixNano:t.encodeHrTime(r.endTime)}})}function Iae(e,t){return e.dataPoints.map(function(r){var n=r.value;return{attributes:_l(r.attributes),count:n.count,min:n.min,max:n.max,sum:n.sum,positive:{offset:n.positive.offset,bucketCounts:n.positive.bucketCounts},negative:{offset:n.negative.offset,bucketCounts:n.negative.bucketCounts},scale:n.scale,zeroCount:n.zeroCount,startTimeUnixNano:t.encodeHrTime(r.startTime),timeUnixNano:t.encodeHrTime(r.endTime)}})}function Nae(e){switch(e){case vT.DELTA:return 1;case vT.CUMULATIVE:return 2}}function Lae(e,t){return{resourceMetrics:e.map(function(r){return Oae(r,t)})}}var Dae=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},NB=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,a=[],u;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)a.push(i.value)}catch(c){u={error:c}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(u)throw u.error}}return a};function wae(e,t){var r=SM(t);return{resourceLogs:xae(e,r)}}function Uae(e){var t,r,n=new Map;try{for(var i=Dae(e),a=i.next();!a.done;a=i.next()){var u=a.value,c=u.resource,E=u.instrumentationScope,_=E.name,p=E.version,L=p===void 0?"":p,W=E.schemaUrl,ve=W===void 0?"":W,me=n.get(c);me||(me=new Map,n.set(c,me));var Oe=_+"@"+L+":"+ve,He=me.get(Oe);He||(He=[],me.set(Oe,He)),He.push(u)}}catch(qe){t={error:qe}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return n}function xae(e,t){var r=Uae(e);return Array.from(r,function(n){var i=NB(n,2),a=i[0],u=i[1];return{resource:EM(a),scopeLogs:Array.from(u,function(c){var E=NB(c,2),_=E[1];return{scope:_M(_[0].instrumentationScope),logRecords:_.map(function(p){return Fae(p,t)}),schemaUrl:_[0].instrumentationScope.schemaUrl}}),schemaUrl:void 0}})}function Fae(e,t){var r,n,i;return{timeUnixNano:t.encodeHrTime(e.hrTime),observedTimeUnixNano:t.encodeHrTime(e.hrTimeObserved),severityNumber:e.severityNumber,severityText:e.severityText,body:pM(e.body),attributes:$ae(e.attributes),droppedAttributesCount:e.droppedAttributesCount,flags:(r=e.spanContext)===null||r===void 0?void 0:r.traceFlags,traceId:t.encodeOptionalSpanContext((n=e.spanContext)===null||n===void 0?void 0:n.traceId),spanId:t.encodeOptionalSpanContext((i=e.spanContext)===null||i===void 0?void 0:i.spanId)}}function zUe(e){return e}function $ae(e){return Object.keys(e).map(function(t){return dM(t,e[t])})}var XUe={serializeRequest:function(e){var t=gae(e,{useHex:!0,useLongBits:!1}),r=new TextEncoder;return r.encode(JSON.stringify(t))},deserializeResponse:function(e){var t=new TextDecoder;return JSON.parse(t.decode(e))}},JUe={serializeRequest:function(e){var t=Lae(e,{useLongBits:!1}),r=new TextEncoder;return r.encode(JSON.stringify(t))},deserializeResponse:function(e){var t=new TextDecoder;return JSON.parse(t.decode(e))}},Vae={serializeRequest:function(e){var t=wae(e,{useHex:!0,useLongBits:!1}),r=new TextEncoder;return r.encode(JSON.stringify(t))},deserializeResponse:function(e){var t=new TextDecoder;return JSON.parse(t.decode(e))}},LB="v1/logs",Gae="http://localhost:4318/"+LB;function Bae(e){return typeof e.url=="string"?e.url:eu().OTEL_EXPORTER_OTLP_LOGS_ENDPOINT.length>0?kie(eu().OTEL_EXPORTER_OTLP_LOGS_ENDPOINT):eu().OTEL_EXPORTER_OTLP_ENDPOINT.length>0?Bie(eu().OTEL_EXPORTER_OTLP_ENDPOINT,LB):Gae}var kae=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Th=function(){return Th=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Th.apply(this,arguments)},jae=function(e){kae(t,e);function t(r){r===void 0&&(r={});var n=e.call(this,Th({timeoutMillis:eu().OTEL_EXPORTER_OTLP_LOGS_TIMEOUT},r),Vae,"application/json")||this;return n._headers=Th(Th({},n._headers),AB(eu().OTEL_EXPORTER_OTLP_LOGS_HEADERS)),n}return t.prototype.getDefaultUrl=function(r){return Bae(r)},t}(oae),_r=gs.instance();function dl(e){for(var t={},r=e.length,n=0;n<r;n++){var i=e[n];i&&(t[String(i).toUpperCase().replace(/[-.]/g,"_")]=i)}return t}var Hae="cloud.provider",Yae="cloud.account.id",qae="cloud.region",Kae="cloud.availability_zone",Wae="cloud.platform",Qae="aws.ecs.container.arn",zae="aws.ecs.cluster.arn",Xae="aws.ecs.launchtype",Jae="aws.ecs.task.arn",Zae="aws.ecs.task.family",eoe="aws.ecs.task.revision",toe="aws.eks.cluster.arn",roe="aws.log.group.names",noe="aws.log.group.arns",ioe="aws.log.stream.names",aoe="aws.log.stream.arns",ooe="container.name",soe="container.id",uoe="container.runtime",coe="container.image.name",loe="container.image.tag",foe="deployment.environment",_oe="device.id",doe="device.model.identifier",poe="device.model.name",hoe="faas.name",Soe="faas.id",Eoe="faas.version",voe="faas.instance",moe="faas.max_memory",Toe="host.id",Aoe="host.name",goe="host.type",yoe="host.arch",Roe="host.image.name",Ooe="host.image.id",boe="host.image.version",Coe="k8s.cluster.name",Poe="k8s.node.name",Moe="k8s.node.uid",Ioe="k8s.namespace.name",Noe="k8s.pod.uid",Loe="k8s.pod.name",Doe="k8s.container.name",woe="k8s.replicaset.uid",Uoe="k8s.replicaset.name",xoe="k8s.deployment.uid",Foe="k8s.deployment.name",$oe="k8s.statefulset.uid",Voe="k8s.statefulset.name",Goe="k8s.daemonset.uid",Boe="k8s.daemonset.name",koe="k8s.job.uid",joe="k8s.job.name",Hoe="k8s.cronjob.uid",Yoe="k8s.cronjob.name",qoe="os.type",Koe="os.description",Woe="os.name",Qoe="os.version",zoe="process.pid",Xoe="process.executable.name",Joe="process.executable.path",Zoe="process.command",ese="process.command_line",tse="process.command_args",rse="process.owner",DB="process.runtime.name",nse="process.runtime.version",ise="process.runtime.description",wB="service.name",ase="service.namespace",ose="service.instance.id",sse="service.version",UB="telemetry.sdk.name",xB="telemetry.sdk.language",FB="telemetry.sdk.version",use="telemetry.auto.version",cse="webengine.name",lse="webengine.version",fse="webengine.description",ZUe=null,exe=null,txe=null,rxe=null,nxe=null,ixe=null,axe=null,oxe=null,sxe=null,uxe=null,cxe=null,lxe=null,fxe=null,_xe=null,dxe=null,pxe=null,hxe=null,Sxe=null,Exe=null,vxe=null,mxe=null,Txe=null,Axe=null,gxe=null,yxe=null,Rxe=null,Oxe=null,bxe=null,Cxe=null,Pxe=null,Mxe=null,Ixe=null,Nxe=null,Lxe=null,Dxe=null,wxe=null,Uxe=null,xxe=null,Fxe=null,$xe=null,Vxe=null,Gxe=null,Bxe=null,kxe=null,jxe=null,Hxe=null,Yxe=null,qxe=null,Kxe=null,Wxe=null,Qxe=null,zxe=null,Xxe=null,Jxe=null,Zxe=null,eFe=null,tFe=null,rFe=null,nFe=null,iFe=null,aFe=null,oFe=null,sFe=null,uFe=null,cFe=null,lFe=null,fFe=null,_se=DB,_Fe=null,dFe=null,dse=wB,pFe=null,hFe=null,SFe=null,vM=UB,mM=xB,TM=FB,EFe=null,vFe=null,mFe=null,TFe=null,AFe=dl([Hae,Yae,qae,Kae,Wae,Qae,zae,Xae,Jae,Zae,eoe,toe,roe,noe,ioe,aoe,ooe,soe,uoe,coe,loe,foe,_oe,doe,poe,hoe,Soe,Eoe,voe,moe,Toe,Aoe,goe,yoe,Roe,Ooe,boe,Coe,Poe,Moe,Ioe,Noe,Loe,Doe,woe,Uoe,xoe,Foe,$oe,Voe,Goe,Boe,koe,joe,Hoe,Yoe,qoe,Koe,Woe,Qoe,zoe,Xoe,Joe,Zoe,ese,tse,rse,DB,nse,ise,wB,ase,ose,sse,UB,xB,FB,use,cse,lse,fse]),pse="alibaba_cloud",hse="aws",Sse="azure",Ese="gcp",gFe=null,yFe=null,RFe=null,OFe=null,bFe=dl([pse,hse,Sse,Ese]),vse="alibaba_cloud_ecs",mse="alibaba_cloud_fc",Tse="aws_ec2",Ase="aws_ecs",gse="aws_eks",yse="aws_lambda",Rse="aws_elastic_beanstalk",Ose="azure_vm",bse="azure_container_instances",Cse="azure_aks",Pse="azure_functions",Mse="azure_app_service",Ise="gcp_compute_engine",Nse="gcp_cloud_run",Lse="gcp_kubernetes_engine",Dse="gcp_cloud_functions",wse="gcp_app_engine",CFe=null,PFe=null,MFe=null,IFe=null,NFe=null,LFe=null,DFe=null,wFe=null,UFe=null,xFe=null,FFe=null,$Fe=null,VFe=null,GFe=null,BFe=null,kFe=null,jFe=null,HFe=dl([vse,mse,Tse,Ase,gse,yse,Rse,Ose,bse,Cse,Pse,Mse,Ise,Nse,Lse,Dse,wse]),Use="ec2",xse="fargate",YFe=null,qFe=null,KFe=dl([Use,xse]),Fse="amd64",$se="arm32",Vse="arm64",Gse="ia64",Bse="ppc32",kse="ppc64",jse="x86",WFe=null,QFe=null,zFe=null,XFe=null,JFe=null,ZFe=null,e1e=null,t1e=dl([Fse,$se,Vse,Gse,Bse,kse,jse]),Hse="windows",Yse="linux",qse="darwin",Kse="freebsd",Wse="netbsd",Qse="openbsd",zse="dragonflybsd",Xse="hpux",Jse="aix",Zse="solaris",eue="z_os",r1e=null,n1e=null,i1e=null,a1e=null,o1e=null,s1e=null,u1e=null,c1e=null,l1e=null,f1e=null,_1e=null,d1e=dl([Hse,Yse,qse,Kse,Wse,Qse,zse,Xse,Jse,Zse,eue]),tue="cpp",rue="dotnet",nue="erlang",iue="go",aue="java",oue="nodejs",sue="php",uue="python",cue="ruby",$B="webjs",p1e=null,h1e=null,S1e=null,E1e=null,v1e=null,m1e=null,T1e=null,A1e=null,g1e=null,lue=$B,y1e=dl([tue,rue,nue,iue,aue,oue,sue,uue,cue,$B]),fue="1.30.1",g_,AM=(g_={},g_[vM]="opentelemetry",g_[_se]="browser",g_[mM]=lue,g_[TM]=fue,g_);function _ue(){return"unknown_service"}var Qu=function(){return Qu=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Qu.apply(this,arguments)},due=function(e,t,r,n){function i(a){return a instanceof r?a:new r(function(u){u(a)})}return new(r||(r=Promise))(function(a,u){function c(p){try{_(n.next(p))}catch(L){u(L)}}function E(p){try{_(n.throw(p))}catch(L){u(L)}}function _(p){p.done?a(p.value):i(p.value).then(c,E)}_((n=n.apply(e,t||[])).next())})},pue=function(e,t){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,u;return u={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(u[Symbol.iterator]=function(){return this}),u;function c(_){return function(p){return E([_,p])}}function E(_){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(a=_[0]&2?i.return:_[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,_[1])).done)return a;switch(i=0,a&&(_=[_[0]&2,a.value]),_[0]){case 0:case 1:a=_;break;case 4:return r.label++,{value:_[1],done:!1};case 5:r.label++,i=_[1],_=[0];continue;case 7:_=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(_[0]===6||_[0]===2)){r=0;continue}if(_[0]===3&&(!a||_[1]>a[0]&&_[1]<a[3])){r.label=_[1];break}if(_[0]===6&&r.label<a[1]){r.label=a[1],a=_;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(_);break}a[2]&&r.ops.pop(),r.trys.pop();continue}_=t.call(e,r)}catch(p){_=[6,p],i=0}finally{n=a=0}if(_[0]&5)throw _[1];return{value:_[0]?_[1]:void 0,done:!0}}},hue=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,a=[],u;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)a.push(i.value)}catch(c){u={error:c}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(u)throw u.error}}return a},mT=function(){function e(t,r){var n=this,i;this._attributes=t,this.asyncAttributesPending=r!=null,this._syncAttributes=(i=this._attributes)!==null&&i!==void 0?i:{},this._asyncAttributesPromise=r?.then(function(a){return n._attributes=Object.assign({},n._attributes,a),n.asyncAttributesPending=!1,a},function(a){return _r.debug("a resource's async attributes promise rejected: %s",a),n.asyncAttributesPending=!1,{}})}return e.empty=function(){return e.EMPTY},e.default=function(){var t;return new e((t={},t[dse]=_ue(),t[mM]=AM[mM],t[vM]=AM[vM],t[TM]=AM[TM],t))},Object.defineProperty(e.prototype,"attributes",{get:function(){var t;return this.asyncAttributesPending&&_r.error("Accessing resource attributes before async attributes settled"),(t=this._attributes)!==null&&t!==void 0?t:{}},enumerable:!1,configurable:!0}),e.prototype.waitForAsyncAttributes=function(){return due(this,void 0,void 0,function(){return pue(this,function(t){switch(t.label){case 0:return this.asyncAttributesPending?[4,this._asyncAttributesPromise]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2]}})})},e.prototype.merge=function(t){var r=this,n;if(!t)return this;var i=Qu(Qu({},this._syncAttributes),(n=t._syncAttributes)!==null&&n!==void 0?n:t.attributes);if(!this._asyncAttributesPromise&&!t._asyncAttributesPromise)return new e(i);var a=Promise.all([this._asyncAttributesPromise,t._asyncAttributesPromise]).then(function(u){var c,E=hue(u,2),_=E[0],p=E[1];return Qu(Qu(Qu(Qu({},r._syncAttributes),_),(c=t._syncAttributes)!==null&&c!==void 0?c:t.attributes),p)});return new e(i,a)},e.EMPTY=new e({}),e}(),VB=function(){function e(){}return e.prototype.emit=function(t){},e}(),Sue=new VB;function pl(e){for(var t={},r=e.length,n=0;n<r;n++){var i=e[n];i&&(t[String(i).toUpperCase().replace(/[-.]/g,"_")]=i)}return t}var Eue="cloud.provider",vue="cloud.account.id",mue="cloud.region",Tue="cloud.availability_zone",Aue="cloud.platform",gue="aws.ecs.container.arn",yue="aws.ecs.cluster.arn",Rue="aws.ecs.launchtype",Oue="aws.ecs.task.arn",bue="aws.ecs.task.family",Cue="aws.ecs.task.revision",Pue="aws.eks.cluster.arn",Mue="aws.log.group.names",Iue="aws.log.group.arns",Nue="aws.log.stream.names",Lue="aws.log.stream.arns",Due="container.name",wue="container.id",Uue="container.runtime",xue="container.image.name",Fue="container.image.tag",$ue="deployment.environment",Vue="device.id",Gue="device.model.identifier",Bue="device.model.name",kue="faas.name",jue="faas.id",Hue="faas.version",Yue="faas.instance",que="faas.max_memory",Kue="host.id",Wue="host.name",Que="host.type",zue="host.arch",Xue="host.image.name",Jue="host.image.id",Zue="host.image.version",ece="k8s.cluster.name",tce="k8s.node.name",rce="k8s.node.uid",nce="k8s.namespace.name",ice="k8s.pod.uid",ace="k8s.pod.name",oce="k8s.container.name",sce="k8s.replicaset.uid",uce="k8s.replicaset.name",cce="k8s.deployment.uid",lce="k8s.deployment.name",fce="k8s.statefulset.uid",_ce="k8s.statefulset.name",dce="k8s.daemonset.uid",pce="k8s.daemonset.name",hce="k8s.job.uid",Sce="k8s.job.name",Ece="k8s.cronjob.uid",vce="k8s.cronjob.name",mce="os.type",Tce="os.description",Ace="os.name",gce="os.version",yce="process.pid",Rce="process.executable.name",Oce="process.executable.path",bce="process.command",Cce="process.command_line",Pce="process.command_args",Mce="process.owner",Ice="process.runtime.name",Nce="process.runtime.version",Lce="process.runtime.description",GB="service.name",Dce="service.namespace",wce="service.instance.id",Uce="service.version",BB="telemetry.sdk.name",kB="telemetry.sdk.language",jB="telemetry.sdk.version",xce="telemetry.auto.version",Fce="webengine.name",$ce="webengine.version",Vce="webengine.description",R1e=null,O1e=null,b1e=null,C1e=null,P1e=null,M1e=null,I1e=null,N1e=null,L1e=null,D1e=null,w1e=null,U1e=null,x1e=null,F1e=null,$1e=null,V1e=null,G1e=null,B1e=null,k1e=null,j1e=null,H1e=null,Y1e=null,q1e=null,K1e=null,W1e=null,Q1e=null,z1e=null,X1e=null,J1e=null,Z1e=null,e$e=null,t$e=null,r$e=null,n$e=null,i$e=null,a$e=null,o$e=null,s$e=null,u$e=null,c$e=null,l$e=null,f$e=null,_$e=null,d$e=null,p$e=null,h$e=null,S$e=null,E$e=null,v$e=null,m$e=null,T$e=null,A$e=null,g$e=null,y$e=null,R$e=null,O$e=null,b$e=null,C$e=null,P$e=null,M$e=null,I$e=null,N$e=null,L$e=null,D$e=null,w$e=null,U$e=null,x$e=null,F$e=null,$$e=null,V$e=null,Gce=GB,G$e=null,B$e=null,k$e=null,HB=BB,YB=kB,qB=jB,j$e=null,H$e=null,Y$e=null,q$e=null,K$e=pl([Eue,vue,mue,Tue,Aue,gue,yue,Rue,Oue,bue,Cue,Pue,Mue,Iue,Nue,Lue,Due,wue,Uue,xue,Fue,$ue,Vue,Gue,Bue,kue,jue,Hue,Yue,que,Kue,Wue,Que,zue,Xue,Jue,Zue,ece,tce,rce,nce,ice,ace,oce,sce,uce,cce,lce,fce,_ce,dce,pce,hce,Sce,Ece,vce,mce,Tce,Ace,gce,yce,Rce,Oce,bce,Cce,Pce,Mce,Ice,Nce,Lce,GB,Dce,wce,Uce,BB,kB,jB,xce,Fce,$ce,Vce]),Bce="alibaba_cloud",kce="aws",jce="azure",Hce="gcp",W$e=null,Q$e=null,z$e=null,X$e=null,J$e=pl([Bce,kce,jce,Hce]),Yce="alibaba_cloud_ecs",qce="alibaba_cloud_fc",Kce="aws_ec2",Wce="aws_ecs",Qce="aws_eks",zce="aws_lambda",Xce="aws_elastic_beanstalk",Jce="azure_vm",Zce="azure_container_instances",ele="azure_aks",tle="azure_functions",rle="azure_app_service",nle="gcp_compute_engine",ile="gcp_cloud_run",ale="gcp_kubernetes_engine",ole="gcp_cloud_functions",sle="gcp_app_engine",Z$e=null,eVe=null,tVe=null,rVe=null,nVe=null,iVe=null,aVe=null,oVe=null,sVe=null,uVe=null,cVe=null,lVe=null,fVe=null,_Ve=null,dVe=null,pVe=null,hVe=null,SVe=pl([Yce,qce,Kce,Wce,Qce,zce,Xce,Jce,Zce,ele,tle,rle,nle,ile,ale,ole,sle]),ule="ec2",cle="fargate",EVe=null,vVe=null,mVe=pl([ule,cle]),lle="amd64",fle="arm32",_le="arm64",dle="ia64",ple="ppc32",hle="ppc64",Sle="x86",TVe=null,AVe=null,gVe=null,yVe=null,RVe=null,OVe=null,bVe=null,CVe=pl([lle,fle,_le,dle,ple,hle,Sle]),Ele="windows",vle="linux",mle="darwin",Tle="freebsd",Ale="netbsd",gle="openbsd",yle="dragonflybsd",Rle="hpux",Ole="aix",ble="solaris",Cle="z_os",PVe=null,MVe=null,IVe=null,NVe=null,LVe=null,DVe=null,wVe=null,UVe=null,xVe=null,FVe=null,$Ve=null,VVe=pl([Ele,vle,mle,Tle,Ale,gle,yle,Rle,Ole,ble,Cle]),Ple="cpp",Mle="dotnet",Ile="erlang",Nle="go",Lle="java",Dle="nodejs",wle="php",Ule="python",xle="ruby",Fle="webjs",GVe=null,BVe=null,kVe=null,jVe=null,HVe=null,YVe=null,qVe=null,KVe=null,WVe=null,QVe=null,zVe=pl([Ple,Mle,Ile,Nle,Lle,Dle,wle,Ule,xle,Fle]),$le="1.25.1";function hl(e){for(var t={},r=e.length,n=0;n<r;n++){var i=e[n];i&&(t[String(i).toUpperCase().replace(/[-.]/g,"_")]=i)}return t}var Vle="cloud.provider",Gle="cloud.account.id",Ble="cloud.region",kle="cloud.availability_zone",jle="cloud.platform",Hle="aws.ecs.container.arn",Yle="aws.ecs.cluster.arn",qle="aws.ecs.launchtype",Kle="aws.ecs.task.arn",Wle="aws.ecs.task.family",Qle="aws.ecs.task.revision",zle="aws.eks.cluster.arn",Xle="aws.log.group.names",Jle="aws.log.group.arns",Zle="aws.log.stream.names",efe="aws.log.stream.arns",tfe="container.name",rfe="container.id",nfe="container.runtime",ife="container.image.name",afe="container.image.tag",ofe="deployment.environment",sfe="device.id",ufe="device.model.identifier",cfe="device.model.name",lfe="faas.name",ffe="faas.id",_fe="faas.version",dfe="faas.instance",pfe="faas.max_memory",hfe="host.id",Sfe="host.name",Efe="host.type",vfe="host.arch",mfe="host.image.name",Tfe="host.image.id",Afe="host.image.version",gfe="k8s.cluster.name",yfe="k8s.node.name",Rfe="k8s.node.uid",Ofe="k8s.namespace.name",bfe="k8s.pod.uid",Cfe="k8s.pod.name",Pfe="k8s.container.name",Mfe="k8s.replicaset.uid",Ife="k8s.replicaset.name",Nfe="k8s.deployment.uid",Lfe="k8s.deployment.name",Dfe="k8s.statefulset.uid",wfe="k8s.statefulset.name",Ufe="k8s.daemonset.uid",xfe="k8s.daemonset.name",Ffe="k8s.job.uid",$fe="k8s.job.name",Vfe="k8s.cronjob.uid",Gfe="k8s.cronjob.name",Bfe="os.type",kfe="os.description",jfe="os.name",Hfe="os.version",Yfe="process.pid",qfe="process.executable.name",Kfe="process.executable.path",Wfe="process.command",Qfe="process.command_line",zfe="process.command_args",Xfe="process.owner",KB="process.runtime.name",Jfe="process.runtime.version",Zfe="process.runtime.description",e_e="service.name",t_e="service.namespace",r_e="service.instance.id",n_e="service.version",WB="telemetry.sdk.name",QB="telemetry.sdk.language",zB="telemetry.sdk.version",i_e="telemetry.auto.version",a_e="webengine.name",o_e="webengine.version",s_e="webengine.description",XVe=null,JVe=null,ZVe=null,eGe=null,tGe=null,rGe=null,nGe=null,iGe=null,aGe=null,oGe=null,sGe=null,uGe=null,cGe=null,lGe=null,fGe=null,_Ge=null,dGe=null,pGe=null,hGe=null,SGe=null,EGe=null,vGe=null,mGe=null,TGe=null,AGe=null,gGe=null,yGe=null,RGe=null,OGe=null,bGe=null,CGe=null,PGe=null,MGe=null,IGe=null,NGe=null,LGe=null,DGe=null,wGe=null,UGe=null,xGe=null,FGe=null,$Ge=null,VGe=null,GGe=null,BGe=null,kGe=null,jGe=null,HGe=null,YGe=null,qGe=null,KGe=null,WGe=null,QGe=null,zGe=null,XGe=null,JGe=null,ZGe=null,eBe=null,tBe=null,rBe=null,nBe=null,iBe=null,aBe=null,oBe=null,sBe=null,uBe=null,cBe=null,u_e=KB,lBe=null,fBe=null,_Be=null,dBe=null,pBe=null,hBe=null,c_e=WB,l_e=QB,f_e=zB,SBe=null,EBe=null,vBe=null,mBe=null,TBe=hl([Vle,Gle,Ble,kle,jle,Hle,Yle,qle,Kle,Wle,Qle,zle,Xle,Jle,Zle,efe,tfe,rfe,nfe,ife,afe,ofe,sfe,ufe,cfe,lfe,ffe,_fe,dfe,pfe,hfe,Sfe,Efe,vfe,mfe,Tfe,Afe,gfe,yfe,Rfe,Ofe,bfe,Cfe,Pfe,Mfe,Ife,Nfe,Lfe,Dfe,wfe,Ufe,xfe,Ffe,$fe,Vfe,Gfe,Bfe,kfe,jfe,Hfe,Yfe,qfe,Kfe,Wfe,Qfe,zfe,Xfe,KB,Jfe,Zfe,e_e,t_e,r_e,n_e,WB,QB,zB,i_e,a_e,o_e,s_e]),__e="alibaba_cloud",d_e="aws",p_e="azure",h_e="gcp",ABe=null,gBe=null,yBe=null,RBe=null,OBe=hl([__e,d_e,p_e,h_e]),S_e="alibaba_cloud_ecs",E_e="alibaba_cloud_fc",v_e="aws_ec2",m_e="aws_ecs",T_e="aws_eks",A_e="aws_lambda",g_e="aws_elastic_beanstalk",y_e="azure_vm",R_e="azure_container_instances",O_e="azure_aks",b_e="azure_functions",C_e="azure_app_service",P_e="gcp_compute_engine",M_e="gcp_cloud_run",I_e="gcp_kubernetes_engine",N_e="gcp_cloud_functions",L_e="gcp_app_engine",bBe=null,CBe=null,PBe=null,MBe=null,IBe=null,NBe=null,LBe=null,DBe=null,wBe=null,UBe=null,xBe=null,FBe=null,$Be=null,VBe=null,GBe=null,BBe=null,kBe=null,jBe=hl([S_e,E_e,v_e,m_e,T_e,A_e,g_e,y_e,R_e,O_e,b_e,C_e,P_e,M_e,I_e,N_e,L_e]),D_e="ec2",w_e="fargate",HBe=null,YBe=null,qBe=hl([D_e,w_e]),U_e="amd64",x_e="arm32",F_e="arm64",$_e="ia64",V_e="ppc32",G_e="ppc64",B_e="x86",KBe=null,WBe=null,QBe=null,zBe=null,XBe=null,JBe=null,ZBe=null,eke=hl([U_e,x_e,F_e,$_e,V_e,G_e,B_e]),k_e="windows",j_e="linux",H_e="darwin",Y_e="freebsd",q_e="netbsd",K_e="openbsd",W_e="dragonflybsd",Q_e="hpux",z_e="aix",X_e="solaris",J_e="z_os",tke=null,rke=null,nke=null,ike=null,ake=null,oke=null,ske=null,uke=null,cke=null,lke=null,fke=null,_ke=hl([k_e,j_e,H_e,Y_e,q_e,K_e,W_e,Q_e,z_e,X_e,J_e]),Z_e="cpp",ede="dotnet",tde="erlang",rde="go",nde="java",ide="nodejs",ade="php",ode="python",sde="ruby",XB="webjs",dke=null,pke=null,hke=null,Ske=null,Eke=null,vke=null,mke=null,Tke=null,Ake=null,ude=XB,gke=hl([Z_e,ede,tde,rde,nde,ide,ade,ode,sde,XB]),y_,gM=(y_={},y_[c_e]="opentelemetry",y_[u_e]="browser",y_[l_e]=ude,y_[f_e]=$le,y_);function cde(){return"unknown_service"}var zu=function(){return zu=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},zu.apply(this,arguments)},lde=function(e,t,r,n){function i(a){return a instanceof r?a:new r(function(u){u(a)})}return new(r||(r=Promise))(function(a,u){function c(p){try{_(n.next(p))}catch(L){u(L)}}function E(p){try{_(n.throw(p))}catch(L){u(L)}}function _(p){p.done?a(p.value):i(p.value).then(c,E)}_((n=n.apply(e,t||[])).next())})},fde=function(e,t){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,u;return u={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(u[Symbol.iterator]=function(){return this}),u;function c(_){return function(p){return E([_,p])}}function E(_){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(a=_[0]&2?i.return:_[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,_[1])).done)return a;switch(i=0,a&&(_=[_[0]&2,a.value]),_[0]){case 0:case 1:a=_;break;case 4:return r.label++,{value:_[1],done:!1};case 5:r.label++,i=_[1],_=[0];continue;case 7:_=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(_[0]===6||_[0]===2)){r=0;continue}if(_[0]===3&&(!a||_[1]>a[0]&&_[1]<a[3])){r.label=_[1];break}if(_[0]===6&&r.label<a[1]){r.label=a[1],a=_;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(_);break}a[2]&&r.ops.pop(),r.trys.pop();continue}_=t.call(e,r)}catch(p){_=[6,p],i=0}finally{n=a=0}if(_[0]&5)throw _[1];return{value:_[0]?_[1]:void 0,done:!0}}},_de=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,a=[],u;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)a.push(i.value)}catch(c){u={error:c}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(u)throw u.error}}return a},JB=function(){function e(t,r){var n=this,i;this._attributes=t,this.asyncAttributesPending=r!=null,this._syncAttributes=(i=this._attributes)!==null&&i!==void 0?i:{},this._asyncAttributesPromise=r?.then(function(a){return n._attributes=Object.assign({},n._attributes,a),n.asyncAttributesPending=!1,a},function(a){return _r.debug("a resource's async attributes promise rejected: %s",a),n.asyncAttributesPending=!1,{}})}return e.empty=function(){return e.EMPTY},e.default=function(){var t;return new e((t={},t[Gce]=cde(),t[YB]=gM[YB],t[HB]=gM[HB],t[qB]=gM[qB],t))},Object.defineProperty(e.prototype,"attributes",{get:function(){var t;return this.asyncAttributesPending&&_r.error("Accessing resource attributes before async attributes settled"),(t=this._attributes)!==null&&t!==void 0?t:{}},enumerable:!1,configurable:!0}),e.prototype.waitForAsyncAttributes=function(){return lde(this,void 0,void 0,function(){return fde(this,function(t){switch(t.label){case 0:return this.asyncAttributesPending?[4,this._asyncAttributesPromise]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2]}})})},e.prototype.merge=function(t){var r=this,n;if(!t)return this;var i=zu(zu({},this._syncAttributes),(n=t._syncAttributes)!==null&&n!==void 0?n:t.attributes);if(!this._asyncAttributesPromise&&!t._asyncAttributesPromise)return new e(i);var a=Promise.all([this._asyncAttributesPromise,t._asyncAttributesPromise]).then(function(u){var c,E=_de(u,2),_=E[0],p=E[1];return zu(zu(zu(zu({},r._syncAttributes),_),(c=t._syncAttributes)!==null&&c!==void 0?c:t.attributes),p)});return new e(i,a)},e.EMPTY=new e({}),e}(),dde="[object Object]",pde="[object Null]",hde="[object Undefined]",Sde=Function.prototype,ZB=Sde.toString,Ede=ZB.call(Object),vde=mde(Object.getPrototypeOf,Object),ek=Object.prototype,tk=ek.hasOwnProperty,Sl=Symbol?Symbol.toStringTag:void 0,rk=ek.toString;function mde(e,t){return function(r){return e(t(r))}}function nk(e){if(!Tde(e)||Ade(e)!==dde)return!1;var t=vde(e);if(t===null)return!0;var r=tk.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&ZB.call(r)===Ede}function Tde(e){return e!=null&&typeof e=="object"}function Ade(e){return e==null?e===void 0?hde:pde:Sl&&Sl in Object(e)?gde(e):yde(e)}function gde(e){var t=tk.call(e,Sl),r=e[Sl],n=!1;try{e[Sl]=void 0,n=!0}catch{}var i=rk.call(e);return n&&(t?e[Sl]=r:delete e[Sl]),i}function yde(e){return rk.call(e)}var Rde=20;function Ode(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var r=e.shift(),n=new WeakMap;e.length>0;)r=ik(r,e.shift(),0,n);return r}function yM(e){return TT(e)?e.slice():e}function ik(e,t,r,n){r===void 0&&(r=0);var i;if(!(r>Rde)){if(r++,AT(e)||AT(t)||ok(t))i=yM(t);else if(TT(e)){if(i=e.slice(),TT(t))for(var a=0,u=t.length;a<u;a++)i.push(yM(t[a]));else if(Ah(t))for(var c=Object.keys(t),a=0,u=c.length;a<u;a++){var E=c[a];i[E]=yM(t[E])}}else if(Ah(e))if(Ah(t)){if(!bde(e,t))return t;i=Object.assign({},e);for(var c=Object.keys(t),a=0,u=c.length;a<u;a++){var E=c[a],_=t[E];if(AT(_))typeof _>"u"?delete i[E]:i[E]=_;else{var p=i[E],L=_;if(ak(e,E,n)||ak(t,E,n))delete i[E];else{if(Ah(p)&&Ah(L)){var W=n.get(p)||[],ve=n.get(L)||[];W.push({obj:e,key:E}),ve.push({obj:t,key:E}),n.set(p,W),n.set(L,ve)}i[E]=ik(i[E],_,r,n)}}}}else i=t;return i}}function ak(e,t,r){for(var n=r.get(e[t])||[],i=0,a=n.length;i<a;i++){var u=n[i];if(u.key===t&&u.obj===e)return!0}return!1}function TT(e){return Array.isArray(e)}function ok(e){return typeof e=="function"}function Ah(e){return!AT(e)&&!TT(e)&&!ok(e)&&typeof e=="object"}function AT(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e>"u"||e instanceof Date||e instanceof RegExp||e===null}function bde(e,t){return!(!nk(e)||!nk(t))}var Cde=function(){function e(){var t=this;this._promise=new Promise(function(r,n){t._resolve=r,t._reject=n})}return Object.defineProperty(e.prototype,"promise",{get:function(){return this._promise},enumerable:!1,configurable:!0}),e.prototype.resolve=function(t){this._resolve(t)},e.prototype.reject=function(t){this._reject(t)},e}(),Pde=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,a=[],u;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)a.push(i.value)}catch(c){u={error:c}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(u)throw u.error}}return a},Mde=function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,a;n<i;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))},sk=function(){function e(t,r){this._callback=t,this._that=r,this._isCalled=!1,this._deferred=new Cde}return Object.defineProperty(e.prototype,"isCalled",{get:function(){return this._isCalled},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"promise",{get:function(){return this._deferred.promise},enumerable:!1,configurable:!0}),e.prototype.call=function(){for(var t,r=this,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];if(!this._isCalled){this._isCalled=!0;try{Promise.resolve((t=this._callback).call.apply(t,Mde([this._that],Pde(n),!1))).then(function(a){return r._deferred.resolve(a)},function(a){return r._deferred.reject(a)})}catch(a){this._deferred.reject(a)}}return this._deferred.promise},e}(),_a=_T.getInstance(),gh=performance,uk=9,Ide=6,Nde=Math.pow(10,Ide),gT=Math.pow(10,uk);function yT(e){var t=e/1e3,r=Math.trunc(t),n=Math.round(e%1e3*Nde);return[r,n]}function ck(){var e=gh.timeOrigin;if(typeof e!="number"){var t=gh;e=t.timing&&t.timing.fetchStart}return e}function RM(e){var t=yT(ck()),r=yT(typeof e=="number"?e:gh.now());return Lde(t,r)}function El(e){if(lk(e))return e;if(typeof e=="number")return e<ck()?RM(e):yT(e);if(e instanceof Date)return yT(e.getTime());throw TypeError("Invalid input type")}function yke(e,t){var r=t[0]-e[0],n=t[1]-e[1];return n<0&&(r-=1,n+=gT),[r,n]}function Rke(e){var t=uk,r=""+"0".repeat(t)+e[1]+"Z",n=r.substr(r.length-t-1),i=new Date(e[0]*1e3).toISOString();return i.replace("000Z",n)}function Xu(e){return e[0]*gT+e[1]}function Oke(e){return e[0]*1e3+e[1]/1e6}function bke(e){return e[0]*1e6+e[1]/1e3}function lk(e){return Array.isArray(e)&&e.length===2&&typeof e[0]=="number"&&typeof e[1]=="number"}function Cke(e){return lk(e)||typeof e=="number"||e instanceof Date}function Lde(e,t){var r=[e[0]+t[0],e[1]+t[1]];return r[1]>=gT&&(r[1]-=gT,r[0]+=1),r}var fk=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Dde=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,a=[],u;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)a.push(i.value)}catch(c){u={error:c}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(u)throw u.error}}return a};function Pke(e){var t,r,n={};if(typeof e!="object"||e==null)return n;try{for(var i=fk(Object.entries(e)),a=i.next();!a.done;a=i.next()){var u=Dde(a.value,2),c=u[0],E=u[1];if(!wde(c)){diag.warn("Invalid attribute key: "+c);continue}if(!OM(E)){diag.warn("Invalid attribute value set for key: "+c);continue}Array.isArray(E)?n[c]=E.slice():n[c]=E}}catch(_){t={error:_}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return n}function wde(e){return typeof e=="string"&&e.length>0}function OM(e){return e==null?!0:Array.isArray(e)?Ude(e):_k(e)}function Ude(e){var t,r,n;try{for(var i=fk(e),a=i.next();!a.done;a=i.next()){var u=a.value;if(u!=null){if(!n){if(_k(u)){n=typeof u;continue}return!1}if(typeof u!==n)return!1}}}catch(c){t={error:c}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return!0}function _k(e){switch(typeof e){case"number":case"boolean":case"string":return!0}return!1}var xde=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Fde=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,a=[],u;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)a.push(i.value)}catch(c){u={error:c}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(u)throw u.error}}return a},$de=function(){function e(t,r,n){this.attributes={},this.totalAttributesCount=0,this._isReadonly=!1;var i=n.timestamp,a=n.observedTimestamp,u=n.severityNumber,c=n.severityText,E=n.body,_=n.attributes,p=_===void 0?{}:_,L=n.context,W=Date.now();if(this.hrTime=El(i??W),this.hrTimeObserved=El(a??W),L){var ve=ta.getSpanContext(L);ve&&m_(ve)&&(this.spanContext=ve)}this.severityNumber=u,this.severityText=c,this.body=E,this.resource=t.resource,this.instrumentationScope=r,this._logRecordLimits=t.logRecordLimits,this.setAttributes(p)}return Object.defineProperty(e.prototype,"severityText",{get:function(){return this._severityText},set:function(t){this._isLogRecordReadonly()||(this._severityText=t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"severityNumber",{get:function(){return this._severityNumber},set:function(t){this._isLogRecordReadonly()||(this._severityNumber=t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"body",{get:function(){return this._body},set:function(t){this._isLogRecordReadonly()||(this._body=t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"droppedAttributesCount",{get:function(){return this.totalAttributesCount-Object.keys(this.attributes).length},enumerable:!1,configurable:!0}),e.prototype.setAttribute=function(t,r){return this._isLogRecordReadonly()?this:r===null?this:t.length===0?(_r.warn("Invalid attribute key: "+t),this):!OM(r)&&!(typeof r=="object"&&!Array.isArray(r)&&Object.keys(r).length>0)?(_r.warn("Invalid attribute value set for key: "+t),this):(this.totalAttributesCount+=1,Object.keys(this.attributes).length>=this._logRecordLimits.attributeCountLimit&&!Object.prototype.hasOwnProperty.call(this.attributes,t)?(this.droppedAttributesCount===1&&_r.warn("Dropping extra attributes."),this):(OM(r)?this.attributes[t]=this._truncateToSize(r):this.attributes[t]=r,this))},e.prototype.setAttributes=function(t){var r,n;try{for(var i=xde(Object.entries(t)),a=i.next();!a.done;a=i.next()){var u=Fde(a.value,2),c=u[0],E=u[1];this.setAttribute(c,E)}}catch(_){r={error:_}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return this},e.prototype.setBody=function(t){return this.body=t,this},e.prototype.setSeverityNumber=function(t){return this.severityNumber=t,this},e.prototype.setSeverityText=function(t){return this.severityText=t,this},e.prototype._makeReadonly=function(){this._isReadonly=!0},e.prototype._truncateToSize=function(t){var r=this,n=this._logRecordLimits.attributeValueLengthLimit;return n<=0?(_r.warn("Attribute value limit must be positive, got "+n),t):typeof t=="string"?this._truncateToLimitUtil(t,n):Array.isArray(t)?t.map(function(i){return typeof i=="string"?r._truncateToLimitUtil(i,n):i}):t},e.prototype._truncateToLimitUtil=function(t,r){return t.length<=r?t:t.substring(0,r)},e.prototype._isLogRecordReadonly=function(){return this._isReadonly&&_r.warn("Can not execute the operation on emitted log record"),this._isReadonly},e}(),bM=function(){return bM=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},bM.apply(this,arguments)},Vde=function(){function e(t,r){this.instrumentationScope=t,this._sharedState=r}return e.prototype.emit=function(t){var r=t.context||_a.active(),n=new $de(this._sharedState,this.instrumentationScope,bM({context:r},t));this._sharedState.activeProcessor.onEmit(n,r),n._makeReadonly()},e}(),CM;(function(e){e.AlwaysOff="always_off",e.AlwaysOn="always_on",e.ParentBasedAlwaysOff="parentbased_always_off",e.ParentBasedAlwaysOn="parentbased_always_on",e.ParentBasedTraceIdRatio="parentbased_traceidratio",e.TraceIdRatio="traceidratio"})(CM||(CM={}));var Gde=",",Bde=["OTEL_SDK_DISABLED"];function kde(e){return Bde.indexOf(e)>-1}var jde=["OTEL_BSP_EXPORT_TIMEOUT","OTEL_BSP_MAX_EXPORT_BATCH_SIZE","OTEL_BSP_MAX_QUEUE_SIZE","OTEL_BSP_SCHEDULE_DELAY","OTEL_BLRP_EXPORT_TIMEOUT","OTEL_BLRP_MAX_EXPORT_BATCH_SIZE","OTEL_BLRP_MAX_QUEUE_SIZE","OTEL_BLRP_SCHEDULE_DELAY","OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_ATTRIBUTE_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT","OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT","OTEL_SPAN_EVENT_COUNT_LIMIT","OTEL_SPAN_LINK_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT","OTEL_EXPORTER_OTLP_TIMEOUT","OTEL_EXPORTER_OTLP_TRACES_TIMEOUT","OTEL_EXPORTER_OTLP_METRICS_TIMEOUT","OTEL_EXPORTER_OTLP_LOGS_TIMEOUT","OTEL_EXPORTER_JAEGER_AGENT_PORT"];function Hde(e){return jde.indexOf(e)>-1}var Yde=["OTEL_NO_PATCH_MODULES","OTEL_PROPAGATORS"];function qde(e){return Yde.indexOf(e)>-1}var RT=1/0,OT=128,Kde=128,Wde=128,dk={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:vn.INFO,OTEL_NO_PATCH_MODULES:[],OTEL_PROPAGATORS:["tracecontext","baggage"],OTEL_RESOURCE_ATTRIBUTES:"",OTEL_SERVICE_NAME:"",OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT:RT,OTEL_ATTRIBUTE_COUNT_LIMIT:OT,OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT:RT,OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT:OT,OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT:RT,OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT:OT,OTEL_SPAN_EVENT_COUNT_LIMIT:128,OTEL_SPAN_LINK_COUNT_LIMIT:128,OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT:Kde,OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT:Wde,OTEL_TRACES_EXPORTER:"",OTEL_TRACES_SAMPLER:CM.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"};function Qde(e,t,r){if(!(typeof r[e]>"u")){var n=String(r[e]);t[e]=n.toLowerCase()==="true"}}function zde(e,t,r,n,i){if(n===void 0&&(n=-1/0),i===void 0&&(i=1/0),typeof r[e]<"u"){var a=Number(r[e]);isNaN(a)||(a<n?t[e]=n:a>i?t[e]=i:t[e]=a)}}function Xde(e,t,r,n){n===void 0&&(n=Gde);var i=r[e];typeof i=="string"&&(t[e]=i.split(n).map(function(a){return a.trim()}))}var Jde={ALL:vn.ALL,VERBOSE:vn.VERBOSE,DEBUG:vn.DEBUG,INFO:vn.INFO,WARN:vn.WARN,ERROR:vn.ERROR,NONE:vn.NONE};function Zde(e,t,r){var n=r[e];if(typeof n=="string"){var i=Jde[n.toUpperCase()];i!=null&&(t[e]=i)}}function pk(e){var t={};for(var r in dk){var n=r;switch(n){case"OTEL_LOG_LEVEL":Zde(n,t,e);break;default:if(kde(n))Qde(n,t,e);else if(Hde(n))zde(n,t,e);else if(qde(n))Xde(n,t,e);else{var i=e[n];typeof i<"u"&&i!==null&&(t[n]=String(i))}}}return t}var hk=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof h.g=="object"?h.g:{};function PM(){var e=pk(hk);return Object.assign({},dk,e)}function epe(){return pk(hk)}function tpe(){return{forceFlushTimeoutMillis:3e4,logRecordLimits:{attributeValueLengthLimit:PM().OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:PM().OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT},includeTraceContext:!0}}function rpe(e){var t,r,n,i,a,u,c=epe();return{attributeCountLimit:(n=(r=(t=e.attributeCountLimit)!==null&&t!==void 0?t:c.OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT)!==null&&r!==void 0?r:c.OTEL_ATTRIBUTE_COUNT_LIMIT)!==null&&n!==void 0?n:OT,attributeValueLengthLimit:(u=(a=(i=e.attributeValueLengthLimit)!==null&&i!==void 0?i:c.OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&a!==void 0?a:c.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&u!==void 0?u:RT}}var npe=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),ipe=function(e){npe(t,e);function t(r){var n=e.call(this,r)||this;return Object.setPrototypeOf(n,t.prototype),n}return t}(Error);function Sk(e,t){var r,n=new Promise(function(a,u){r=setTimeout(function(){u(new ipe("Operation timed out."))},t)});return Promise.race([e,n]).then(function(i){return clearTimeout(r),i},function(i){throw clearTimeout(r),i})}var Ek=function(e,t,r,n){function i(a){return a instanceof r?a:new r(function(u){u(a)})}return new(r||(r=Promise))(function(a,u){function c(p){try{_(n.next(p))}catch(L){u(L)}}function E(p){try{_(n.throw(p))}catch(L){u(L)}}function _(p){p.done?a(p.value):i(p.value).then(c,E)}_((n=n.apply(e,t||[])).next())})},vk=function(e,t){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,u;return u={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(u[Symbol.iterator]=function(){return this}),u;function c(_){return function(p){return E([_,p])}}function E(_){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(a=_[0]&2?i.return:_[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,_[1])).done)return a;switch(i=0,a&&(_=[_[0]&2,a.value]),_[0]){case 0:case 1:a=_;break;case 4:return r.label++,{value:_[1],done:!1};case 5:r.label++,i=_[1],_=[0];continue;case 7:_=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(_[0]===6||_[0]===2)){r=0;continue}if(_[0]===3&&(!a||_[1]>a[0]&&_[1]<a[3])){r.label=_[1];break}if(_[0]===6&&r.label<a[1]){r.label=a[1],a=_;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(_);break}a[2]&&r.ops.pop(),r.trys.pop();continue}_=t.call(e,r)}catch(p){_=[6,p],i=0}finally{n=a=0}if(_[0]&5)throw _[1];return{value:_[0]?_[1]:void 0,done:!0}}},ape=function(){function e(t,r){this.processors=t,this.forceFlushTimeoutMillis=r}return e.prototype.forceFlush=function(){return Ek(this,void 0,void 0,function(){var t;return vk(this,function(r){switch(r.label){case 0:return t=this.forceFlushTimeoutMillis,[4,Promise.all(this.processors.map(function(n){return Sk(n.forceFlush(),t)}))];case 1:return r.sent(),[2]}})})},e.prototype.onEmit=function(t,r){this.processors.forEach(function(n){return n.onEmit(t,r)})},e.prototype.shutdown=function(){return Ek(this,void 0,void 0,function(){return vk(this,function(t){switch(t.label){case 0:return[4,Promise.all(this.processors.map(function(r){return r.shutdown()}))];case 1:return t.sent(),[2]}})})},e}(),ope=function(){function e(){}return e.prototype.forceFlush=function(){return Promise.resolve()},e.prototype.onEmit=function(t,r){},e.prototype.shutdown=function(){return Promise.resolve()},e}(),spe=function(){function e(t,r,n){this.resource=t,this.forceFlushTimeoutMillis=r,this.logRecordLimits=n,this.loggers=new Map,this.registeredLogRecordProcessors=[],this.activeProcessor=new ope}return e}(),upe="unknown",cpe=function(){function e(t){t===void 0&&(t={});var r,n=Ode({},tpe(),t),i=JB.default().merge((r=n.resource)!==null&&r!==void 0?r:JB.empty());this._sharedState=new spe(i,n.forceFlushTimeoutMillis,rpe(n.logRecordLimits)),this._shutdownOnce=new sk(this._shutdown,this)}return e.prototype.getLogger=function(t,r,n){if(this._shutdownOnce.isCalled)return _r.warn("A shutdown LoggerProvider cannot provide a Logger"),Sue;t||_r.warn("Logger requested without instrumentation scope name.");var i=t||upe,a=i+"@"+(r||"")+":"+(n?.schemaUrl||"");return this._sharedState.loggers.has(a)||this._sharedState.loggers.set(a,new Vde({name:i,version:r,schemaUrl:n?.schemaUrl},this._sharedState)),this._sharedState.loggers.get(a)},e.prototype.addLogRecordProcessor=function(t){this._sharedState.registeredLogRecordProcessors.length===0&&this._sharedState.activeProcessor.shutdown().catch(function(r){return _r.error("Error while trying to shutdown current log record processor",r)}),this._sharedState.registeredLogRecordProcessors.push(t),this._sharedState.activeProcessor=new ape(this._sharedState.registeredLogRecordProcessors,this._sharedState.forceFlushTimeoutMillis)},e.prototype.forceFlush=function(){return this._shutdownOnce.isCalled?(_r.warn("invalid attempt to force flush after LoggerProvider shutdown"),this._shutdownOnce.promise):this._sharedState.activeProcessor.forceFlush()},e.prototype.shutdown=function(){return this._shutdownOnce.isCalled?(_r.warn("shutdown may only be called once per LoggerProvider"),this._shutdownOnce.promise):this._shutdownOnce.call()},e.prototype._shutdown=function(){return this._sharedState.activeProcessor.shutdown()},e}();function lpe(){return function(e){_r.error(fpe(e))}}function fpe(e){return typeof e=="string"?e:JSON.stringify(_pe(e))}function _pe(e){for(var t={},r=e;r!==null;)Object.getOwnPropertyNames(r).forEach(function(n){if(!t[n]){var i=r[n];i&&(t[n]=String(i))}}),r=Object.getPrototypeOf(r);return t}var mk=lpe();function Mke(e){mk=e}function bT(e){try{mk(e)}catch{}}function Ike(e){}function dpe(e,t){return new Promise(function(r){_a.with(Fne(_a.active()),function(){e.export(t,function(n){r(n)})})})}var ppe={_export:dpe},MM;(function(e){e[e.SUCCESS=0]="SUCCESS",e[e.FAILED=1]="FAILED"})(MM||(MM={}));var hpe=function(e,t,r,n){function i(a){return a instanceof r?a:new r(function(u){u(a)})}return new(r||(r=Promise))(function(a,u){function c(p){try{_(n.next(p))}catch(L){u(L)}}function E(p){try{_(n.throw(p))}catch(L){u(L)}}function _(p){p.done?a(p.value):i(p.value).then(c,E)}_((n=n.apply(e,t||[])).next())})},Spe=function(e,t){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,u;return u={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(u[Symbol.iterator]=function(){return this}),u;function c(_){return function(p){return E([_,p])}}function E(_){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(a=_[0]&2?i.return:_[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,_[1])).done)return a;switch(i=0,a&&(_=[_[0]&2,a.value]),_[0]){case 0:case 1:a=_;break;case 4:return r.label++,{value:_[1],done:!1};case 5:r.label++,i=_[1],_=[0];continue;case 7:_=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(_[0]===6||_[0]===2)){r=0;continue}if(_[0]===3&&(!a||_[1]>a[0]&&_[1]<a[3])){r.label=_[1];break}if(_[0]===6&&r.label<a[1]){r.label=a[1],a=_;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(_);break}a[2]&&r.ops.pop(),r.trys.pop();continue}_=t.call(e,r)}catch(p){_=[6,p],i=0}finally{n=a=0}if(_[0]&5)throw _[1];return{value:_[0]?_[1]:void 0,done:!0}}},Epe=function(){function e(t,r){var n,i,a,u;this._exporter=t,this._finishedLogRecords=[];var c=PM();this._maxExportBatchSize=(n=r?.maxExportBatchSize)!==null&&n!==void 0?n:c.OTEL_BLRP_MAX_EXPORT_BATCH_SIZE,this._maxQueueSize=(i=r?.maxQueueSize)!==null&&i!==void 0?i:c.OTEL_BLRP_MAX_QUEUE_SIZE,this._scheduledDelayMillis=(a=r?.scheduledDelayMillis)!==null&&a!==void 0?a:c.OTEL_BLRP_SCHEDULE_DELAY,this._exportTimeoutMillis=(u=r?.exportTimeoutMillis)!==null&&u!==void 0?u:c.OTEL_BLRP_EXPORT_TIMEOUT,this._shutdownOnce=new sk(this._shutdown,this),this._maxExportBatchSize>this._maxQueueSize&&(_r.warn("BatchLogRecordProcessor: maxExportBatchSize must be smaller or equal to maxQueueSize, setting maxExportBatchSize to match maxQueueSize"),this._maxExportBatchSize=this._maxQueueSize)}return e.prototype.onEmit=function(t){this._shutdownOnce.isCalled||this._addToBuffer(t)},e.prototype.forceFlush=function(){return this._shutdownOnce.isCalled?this._shutdownOnce.promise:this._flushAll()},e.prototype.shutdown=function(){return this._shutdownOnce.call()},e.prototype._shutdown=function(){return hpe(this,void 0,void 0,function(){return Spe(this,function(t){switch(t.label){case 0:return this.onShutdown(),[4,this._flushAll()];case 1:return t.sent(),[4,this._exporter.shutdown()];case 2:return t.sent(),[2]}})})},e.prototype._addToBuffer=function(t){this._finishedLogRecords.length>=this._maxQueueSize||(this._finishedLogRecords.push(t),this._maybeStartTimer())},e.prototype._flushAll=function(){var t=this;return new Promise(function(r,n){for(var i=[],a=Math.ceil(t._finishedLogRecords.length/t._maxExportBatchSize),u=0;u<a;u++)i.push(t._flushOneBatch());Promise.all(i).then(function(){r()}).catch(n)})},e.prototype._flushOneBatch=function(){var t=this;return this._clearTimer(),this._finishedLogRecords.length===0?Promise.resolve():new Promise(function(r,n){Sk(t._export(t._finishedLogRecords.splice(0,t._maxExportBatchSize)),t._exportTimeoutMillis).then(function(){return r()}).catch(n)})},e.prototype._maybeStartTimer=function(){var t=this;this._timer===void 0&&(this._timer=setTimeout(function(){t._flushOneBatch().then(function(){t._finishedLogRecords.length>0&&(t._clearTimer(),t._maybeStartTimer())}).catch(function(r){bT(r)})},this._scheduledDelayMillis),this._timer,void 0)},e.prototype._clearTimer=function(){this._timer!==void 0&&(clearTimeout(this._timer),this._timer=void 0)},e.prototype._export=function(t){var r=this,n=function(){return ppe._export(r._exporter,t).then(function(a){var u;a.code!==MM.SUCCESS&&bT((u=a.error)!==null&&u!==void 0?u:new Error("BatchLogRecordProcessor: log record export failed (status "+a+")"))}).catch(bT)},i=t.map(function(a){return a.resource}).filter(function(a){return a.asyncAttributesPending});return i.length===0?n():Promise.all(i.map(function(a){var u;return(u=a.waitForAsyncAttributes)===null||u===void 0?void 0:u.call(a)})).then(n,bT)},e}(),vpe=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),mpe=function(e){vpe(t,e);function t(r,n){var i=e.call(this,r,n)||this;return i._onInit(n),i}return t.prototype.onShutdown=function(){typeof document>"u"||(this._visibilityChangeListener&&document.removeEventListener("visibilitychange",this._visibilityChangeListener),this._pageHideListener&&document.removeEventListener("pagehide",this._pageHideListener))},t.prototype._onInit=function(r){var n=this;r?.disableAutoFlushOnDocumentHide===!0||typeof document>"u"||(this._visibilityChangeListener=function(){document.visibilityState==="hidden"&&n.forceFlush()},this._pageHideListener=function(){n.forceFlush()},document.addEventListener("visibilitychange",this._visibilityChangeListener),document.addEventListener("pagehide",this._pageHideListener))},t}(Epe),Tpe=function(){function e(){}return e.prototype.inject=function(t,r){},e.prototype.extract=function(t,r){return t},e.prototype.fields=function(){return[]},e}(),Ape={get:function(e,t){if(e!=null)return e[t]},keys:function(e){return e==null?[]:Object.keys(e)}},gpe={set:function(e,t,r){e!=null&&(e[t]=r)}},IM=fT("OpenTelemetry Baggage Key");function Tk(e){return e.getValue(IM)||void 0}function ype(){return Tk(_T.getInstance().active())}function Rpe(e,t){return e.setValue(IM,t)}function Ope(e){return e.deleteValue(IM)}var bpe=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,a=[],u;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)a.push(i.value)}catch(c){u={error:c}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(u)throw u.error}}return a},Cpe=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Ppe=function(){function e(t){this._entries=t?new Map(t):new Map}return e.prototype.getEntry=function(t){var r=this._entries.get(t);if(!!r)return Object.assign({},r)},e.prototype.getAllEntries=function(){return Array.from(this._entries.entries()).map(function(t){var r=bpe(t,2),n=r[0],i=r[1];return[n,i]})},e.prototype.setEntry=function(t,r){var n=new e(this._entries);return n._entries.set(t,r),n},e.prototype.removeEntry=function(t){var r=new e(this._entries);return r._entries.delete(t),r},e.prototype.removeEntries=function(){for(var t,r,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];var a=new e(this._entries);try{for(var u=Cpe(n),c=u.next();!c.done;c=u.next()){var E=c.value;a._entries.delete(E)}}catch(_){t={error:_}}finally{try{c&&!c.done&&(r=u.return)&&r.call(u)}finally{if(t)throw t.error}}return a},e.prototype.clear=function(){return new e},e}(),Mpe=Symbol("BaggageEntryMetadata"),Ipe=gs.instance();function Npe(e){return e===void 0&&(e={}),new Ppe(new Map(Object.entries(e)))}function Lpe(e){return typeof e!="string"&&(Ipe.error("Cannot create baggage metadata from unknown type: "+typeof e),e=""),{__TYPE__:Mpe,toString:function(){return e}}}var NM="propagation",Dpe=new Tpe,wpe=function(){function e(){this.createBaggage=Npe,this.getBaggage=Tk,this.getActiveBaggage=ype,this.setBaggage=Rpe,this.deleteBaggage=Ope}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalPropagator=function(t){return _h(NM,t,gs.instance())},e.prototype.inject=function(t,r,n){return n===void 0&&(n=gpe),this._getGlobalPropagator().inject(t,r,n)},e.prototype.extract=function(t,r,n){return n===void 0&&(n=Ape),this._getGlobalPropagator().extract(t,r,n)},e.prototype.fields=function(){return this._getGlobalPropagator().fields()},e.prototype.disable=function(){dh(NM,gs.instance())},e.prototype._getGlobalPropagator=function(){return ll(NM)||Dpe},e}(),R_=wpe.getInstance(),Upe="[object Object]",xpe="[object Null]",Fpe="[object Undefined]",$pe=Function.prototype,Ak=$pe.toString,Vpe=Ak.call(Object),Gpe=Bpe(Object.getPrototypeOf,Object),gk=Object.prototype,yk=gk.hasOwnProperty,vl=Symbol?Symbol.toStringTag:void 0,Rk=gk.toString;function Bpe(e,t){return function(r){return e(t(r))}}function Ok(e){if(!kpe(e)||jpe(e)!==Upe)return!1;var t=Gpe(e);if(t===null)return!0;var r=yk.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&Ak.call(r)===Vpe}function kpe(e){return e!=null&&typeof e=="object"}function jpe(e){return e==null?e===void 0?Fpe:xpe:vl&&vl in Object(e)?Hpe(e):Ype(e)}function Hpe(e){var t=yk.call(e,vl),r=e[vl],n=!1;try{e[vl]=void 0,n=!0}catch{}var i=Rk.call(e);return n&&(t?e[vl]=r:delete e[vl]),i}function Ype(e){return Rk.call(e)}var qpe=20;function Kpe(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var r=e.shift(),n=new WeakMap;e.length>0;)r=bk(r,e.shift(),0,n);return r}function LM(e){return CT(e)?e.slice():e}function bk(e,t,r,n){r===void 0&&(r=0);var i;if(!(r>qpe)){if(r++,PT(e)||PT(t)||Pk(t))i=LM(t);else if(CT(e)){if(i=e.slice(),CT(t))for(var a=0,u=t.length;a<u;a++)i.push(LM(t[a]));else if(yh(t))for(var c=Object.keys(t),a=0,u=c.length;a<u;a++){var E=c[a];i[E]=LM(t[E])}}else if(yh(e))if(yh(t)){if(!Wpe(e,t))return t;i=Object.assign({},e);for(var c=Object.keys(t),a=0,u=c.length;a<u;a++){var E=c[a],_=t[E];if(PT(_))typeof _>"u"?delete i[E]:i[E]=_;else{var p=i[E],L=_;if(Ck(e,E,n)||Ck(t,E,n))delete i[E];else{if(yh(p)&&yh(L)){var W=n.get(p)||[],ve=n.get(L)||[];W.push({obj:e,key:E}),ve.push({obj:t,key:E}),n.set(p,W),n.set(L,ve)}i[E]=bk(i[E],_,r,n)}}}}else i=t;return i}}function Ck(e,t,r){for(var n=r.get(e[t])||[],i=0,a=n.length;i<a;i++){var u=n[i];if(u.key===t&&u.obj===e)return!0}return!1}function CT(e){return Array.isArray(e)}function Pk(e){return typeof e=="function"}function yh(e){return!PT(e)&&!CT(e)&&!Pk(e)&&typeof e=="object"}function PT(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e>"u"||e instanceof Date||e instanceof RegExp||e===null}function Wpe(e,t){return!(!Ok(e)||!Ok(t))}var Rs;(function(e){e.AlwaysOff="always_off",e.AlwaysOn="always_on",e.ParentBasedAlwaysOff="parentbased_always_off",e.ParentBasedAlwaysOn="parentbased_always_on",e.ParentBasedTraceIdRatio="parentbased_traceidratio",e.TraceIdRatio="traceidratio"})(Rs||(Rs={}));var Qpe=",",zpe=["OTEL_SDK_DISABLED"];function Xpe(e){return zpe.indexOf(e)>-1}var Jpe=["OTEL_BSP_EXPORT_TIMEOUT","OTEL_BSP_MAX_EXPORT_BATCH_SIZE","OTEL_BSP_MAX_QUEUE_SIZE","OTEL_BSP_SCHEDULE_DELAY","OTEL_BLRP_EXPORT_TIMEOUT","OTEL_BLRP_MAX_EXPORT_BATCH_SIZE","OTEL_BLRP_MAX_QUEUE_SIZE","OTEL_BLRP_SCHEDULE_DELAY","OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_ATTRIBUTE_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT","OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT","OTEL_SPAN_EVENT_COUNT_LIMIT","OTEL_SPAN_LINK_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT","OTEL_EXPORTER_OTLP_TIMEOUT","OTEL_EXPORTER_OTLP_TRACES_TIMEOUT","OTEL_EXPORTER_OTLP_METRICS_TIMEOUT","OTEL_EXPORTER_OTLP_LOGS_TIMEOUT","OTEL_EXPORTER_JAEGER_AGENT_PORT"];function Zpe(e){return Jpe.indexOf(e)>-1}var ehe=["OTEL_NO_PATCH_MODULES","OTEL_PROPAGATORS","OTEL_SEMCONV_STABILITY_OPT_IN"];function the(e){return ehe.indexOf(e)>-1}var MT=1/0,IT=128,rhe=128,nhe=128,Mk={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:vn.INFO,OTEL_NO_PATCH_MODULES:[],OTEL_PROPAGATORS:["tracecontext","baggage"],OTEL_RESOURCE_ATTRIBUTES:"",OTEL_SERVICE_NAME:"",OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT:MT,OTEL_ATTRIBUTE_COUNT_LIMIT:IT,OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT:MT,OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT:IT,OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT:MT,OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT:IT,OTEL_SPAN_EVENT_COUNT_LIMIT:128,OTEL_SPAN_LINK_COUNT_LIMIT:128,OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT:rhe,OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT:nhe,OTEL_TRACES_EXPORTER:"",OTEL_TRACES_SAMPLER:Rs.ParentBasedAlwaysOn,OTEL_TRACES_SAMPLER_ARG:"",OTEL_LOGS_EXPORTER:"",OTEL_EXPORTER_OTLP_INSECURE:"",OTEL_EXPORTER_OTLP_TRACES_INSECURE:"",OTEL_EXPORTER_OTLP_METRICS_INSECURE:"",OTEL_EXPORTER_OTLP_LOGS_INSECURE:"",OTEL_EXPORTER_OTLP_CERTIFICATE:"",OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE:"",OTEL_EXPORTER_OTLP_METRICS_CERTIFICATE:"",OTEL_EXPORTER_OTLP_LOGS_CERTIFICATE:"",OTEL_EXPORTER_OTLP_COMPRESSION:"",OTEL_EXPORTER_OTLP_TRACES_COMPRESSION:"",OTEL_EXPORTER_OTLP_METRICS_COMPRESSION:"",OTEL_EXPORTER_OTLP_LOGS_COMPRESSION:"",OTEL_EXPORTER_OTLP_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_TRACES_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_METRICS_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_LOGS_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_TRACES_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_METRICS_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_LOGS_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_TRACES_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_METRICS_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_LOGS_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE:"cumulative",OTEL_SEMCONV_STABILITY_OPT_IN:[]};function ihe(e,t,r){if(!(typeof r[e]>"u")){var n=String(r[e]);t[e]=n.toLowerCase()==="true"}}function ahe(e,t,r,n,i){if(n===void 0&&(n=-1/0),i===void 0&&(i=1/0),typeof r[e]<"u"){var a=Number(r[e]);isNaN(a)||(a<n?t[e]=n:a>i?t[e]=i:t[e]=a)}}function ohe(e,t,r,n){n===void 0&&(n=Qpe);var i=r[e];typeof i=="string"&&(t[e]=i.split(n).map(function(a){return a.trim()}))}var she={ALL:vn.ALL,VERBOSE:vn.VERBOSE,DEBUG:vn.DEBUG,INFO:vn.INFO,WARN:vn.WARN,ERROR:vn.ERROR,NONE:vn.NONE};function uhe(e,t,r){var n=r[e];if(typeof n=="string"){var i=she[n.toUpperCase()];i!=null&&(t[e]=i)}}function Ik(e){var t={};for(var r in Mk){var n=r;switch(n){case"OTEL_LOG_LEVEL":uhe(n,t,e);break;default:if(Xpe(n))ihe(n,t,e);else if(Zpe(n))ahe(n,t,e);else if(the(n))ohe(n,t,e);else{var i=e[n];typeof i<"u"&&i!==null&&(t[n]=String(i))}}}return t}var Nk=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof h.g=="object"?h.g:{};function Rh(){var e=Ik(Nk);return Object.assign({},Mk,e)}function che(){return Ik(Nk)}var lhe=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},fhe=function(){function e(t){t===void 0&&(t={});var r;this._propagators=(r=t.propagators)!==null&&r!==void 0?r:[],this._fields=Array.from(new Set(this._propagators.map(function(n){return typeof n.fields=="function"?n.fields():[]}).reduce(function(n,i){return n.concat(i)},[])))}return e.prototype.inject=function(t,r,n){var i,a;try{for(var u=lhe(this._propagators),c=u.next();!c.done;c=u.next()){var E=c.value;try{E.inject(t,r,n)}catch(_){_r.warn("Failed to inject with "+E.constructor.name+". Err: "+_.message)}}}catch(_){i={error:_}}finally{try{c&&!c.done&&(a=u.return)&&a.call(u)}finally{if(i)throw i.error}}},e.prototype.extract=function(t,r,n){return this._propagators.reduce(function(i,a){try{return a.extract(i,r,n)}catch(u){_r.warn("Failed to extract with "+a.constructor.name+". Err: "+u.message)}return i},t)},e.prototype.fields=function(){return this._fields.slice()},e}(),DM=fT("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function _he(e){return e.setValue(DM,!0)}function Nke(e){return e.deleteValue(DM)}function wM(e){return e.getValue(DM)===!0}var UM="[_0-9a-z-*/]",dhe="[a-z]"+UM+"{0,255}",phe="[a-z0-9]"+UM+"{0,240}@[a-z]"+UM+"{0,13}",hhe=new RegExp("^(?:"+dhe+"|"+phe+")$"),She=/^[ -~]{0,255}[!-~]$/,Ehe=/,|=/;function vhe(e){return hhe.test(e)}function mhe(e){return She.test(e)&&!Ehe.test(e)}var Lk=32,The=512,Dk=",",wk="=",Ahe=function(){function e(t){this._internalState=new Map,t&&this._parse(t)}return e.prototype.set=function(t,r){var n=this._clone();return n._internalState.has(t)&&n._internalState.delete(t),n._internalState.set(t,r),n},e.prototype.unset=function(t){var r=this._clone();return r._internalState.delete(t),r},e.prototype.get=function(t){return this._internalState.get(t)},e.prototype.serialize=function(){var t=this;return this._keys().reduce(function(r,n){return r.push(n+wk+t.get(n)),r},[]).join(Dk)},e.prototype._parse=function(t){t.length>The||(this._internalState=t.split(Dk).reverse().reduce(function(r,n){var i=n.trim(),a=i.indexOf(wk);if(a!==-1){var u=i.slice(0,a),c=i.slice(a+1,n.length);vhe(u)&&mhe(c)&&r.set(u,c)}return r},new Map),this._internalState.size>Lk&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,Lk))))},e.prototype._keys=function(){return Array.from(this._internalState.keys()).reverse()},e.prototype._clone=function(){var t=new e;return t._internalState=new Map(this._internalState),t},e}(),xM="traceparent",FM="tracestate",ghe="00",yhe="(?!ff)[\\da-f]{2}",Rhe="(?![0]{32})[\\da-f]{32}",Ohe="(?![0]{16})[\\da-f]{16}",bhe="[\\da-f]{2}",Che=new RegExp("^\\s?("+yhe+")-("+Rhe+")-("+Ohe+")-("+bhe+")(-.*)?\\s?$");function Phe(e){var t=Che.exec(e);return!t||t[1]==="00"&&t[5]?null:{traceId:t[2],spanId:t[3],traceFlags:parseInt(t[4],16)}}var Mhe=function(){function e(){}return e.prototype.inject=function(t,r,n){var i=ta.getSpanContext(t);if(!(!i||wM(t)||!m_(i))){var a=ghe+"-"+i.traceId+"-"+i.spanId+"-0"+Number(i.traceFlags||ys.NONE).toString(16);n.set(r,xM,a),i.traceState&&n.set(r,FM,i.traceState.serialize())}},e.prototype.extract=function(t,r,n){var i=n.get(r,xM);if(!i)return t;var a=Array.isArray(i)?i[0]:i;if(typeof a!="string")return t;var u=Phe(a);if(!u)return t;u.isRemote=!0;var c=n.get(r,FM);if(c){var E=Array.isArray(c)?c.join(","):c;u.traceState=new Ahe(typeof E=="string"?E:void 0)}return ta.setSpanContext(t,u)},e.prototype.fields=function(){return[xM,FM]},e}(),Ihe="=",$M=";",VM=",",GM="baggage",Nhe=180,Lhe=4096,Dhe=8192,whe=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,a=[],u;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)a.push(i.value)}catch(c){u={error:c}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(u)throw u.error}}return a};function Uhe(e){return e.reduce(function(t,r){var n=""+t+(t!==""?VM:"")+r;return n.length>Dhe?t:n},"")}function xhe(e){return e.getAllEntries().map(function(t){var r=whe(t,2),n=r[0],i=r[1],a=encodeURIComponent(n)+"="+encodeURIComponent(i.value);return i.metadata!==void 0&&(a+=$M+i.metadata.toString()),a})}function Uk(e){var t=e.split($M);if(!(t.length<=0)){var r=t.shift();if(!!r){var n=r.indexOf(Ihe);if(!(n<=0)){var i=decodeURIComponent(r.substring(0,n).trim()),a=decodeURIComponent(r.substring(n+1).trim()),u;return t.length>0&&(u=Lpe(t.join($M))),{key:i,value:a,metadata:u}}}}}function Lke(e){return typeof e!="string"||e.length===0?{}:e.split(BAGGAGE_ITEMS_SEPARATOR).map(function(t){return Uk(t)}).filter(function(t){return t!==void 0&&t.value.length>0}).reduce(function(t,r){return t[r.key]=r.value,t},{})}var Fhe=function(){function e(){}return e.prototype.inject=function(t,r,n){var i=R_.getBaggage(t);if(!(!i||wM(t))){var a=xhe(i).filter(function(c){return c.length<=Lhe}).slice(0,Nhe),u=Uhe(a);u.length>0&&n.set(r,GM,u)}},e.prototype.extract=function(t,r,n){var i=n.get(r,GM),a=Array.isArray(i)?i.join(VM):i;if(!a)return t;var u={};if(a.length===0)return t;var c=a.split(VM);return c.forEach(function(E){var _=Uk(E);if(_){var p={value:_.value};_.metadata&&(p.metadata=_.metadata),u[_.key]=p}}),Object.entries(u).length===0?t:R_.setBaggage(t,R_.createBaggage(u))},e.prototype.fields=function(){return[GM]},e}(),NT;(function(e){e[e.INTERNAL=0]="INTERNAL",e[e.SERVER=1]="SERVER",e[e.CLIENT=2]="CLIENT",e[e.PRODUCER=3]="PRODUCER",e[e.CONSUMER=4]="CONSUMER"})(NT||(NT={}));var LT;(function(e){e[e.NOT_RECORD=0]="NOT_RECORD",e[e.RECORD=1]="RECORD",e[e.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(LT||(LT={}));var xk=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},$he=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,a=[],u;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)a.push(i.value)}catch(c){u={error:c}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(u)throw u.error}}return a};function DT(e){var t,r,n={};if(typeof e!="object"||e==null)return n;try{for(var i=xk(Object.entries(e)),a=i.next();!a.done;a=i.next()){var u=$he(a.value,2),c=u[0],E=u[1];if(!Vhe(c)){_r.warn("Invalid attribute key: "+c);continue}if(!Fk(E)){_r.warn("Invalid attribute value set for key: "+c);continue}Array.isArray(E)?n[c]=E.slice():n[c]=E}}catch(_){t={error:_}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return n}function Vhe(e){return typeof e=="string"&&e.length>0}function Fk(e){return e==null?!0:Array.isArray(e)?Ghe(e):$k(e)}function Ghe(e){var t,r,n;try{for(var i=xk(e),a=i.next();!a.done;a=i.next()){var u=a.value;if(u!=null){if(!n){if($k(u)){n=typeof u;continue}return!1}if(typeof u!==n)return!1}}}catch(c){t={error:c}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return!0}function $k(e){switch(typeof e){case"number":case"boolean":case"string":return!0}return!1}var BM;(function(e){e[e.UNSET=0]="UNSET",e[e.OK=1]="OK",e[e.ERROR=2]="ERROR"})(BM||(BM={}));var O_=performance,Vk=9,Bhe=6,khe=Math.pow(10,Bhe),wT=Math.pow(10,Vk);function Ju(e){var t=e/1e3,r=Math.trunc(t),n=Math.round(e%1e3*khe);return[r,n]}function kM(){var e=O_.timeOrigin;if(typeof e!="number"){var t=O_;e=t.timing&&t.timing.fetchStart}return e}function Gk(e){var t=Ju(kM()),r=Ju(typeof e=="number"?e:O_.now());return kk(t,r)}function Dke(e){if(jM(e))return e;if(typeof e=="number")return e<kM()?Gk(e):Ju(e);if(e instanceof Date)return Ju(e.getTime());throw TypeError("Invalid input type")}function jhe(e,t){var r=t[0]-e[0],n=t[1]-e[1];return n<0&&(r-=1,n+=wT),[r,n]}function wke(e){var t=Vk,r=""+"0".repeat(t)+e[1]+"Z",n=r.substring(r.length-t-1),i=new Date(e[0]*1e3).toISOString();return i.replace("000Z",n)}function Uke(e){return e[0]*wT+e[1]}function xke(e){return e[0]*1e3+e[1]/1e6}function Fke(e){return e[0]*1e6+e[1]/1e3}function jM(e){return Array.isArray(e)&&e.length===2&&typeof e[0]=="number"&&typeof e[1]=="number"}function Bk(e){return jM(e)||typeof e=="number"||e instanceof Date}function kk(e,t){var r=[e[0]+t[0],e[1]+t[1]];return r[1]>=wT&&(r[1]-=wT,r[0]+=1),r}function co(e){for(var t={},r=e.length,n=0;n<r;n++){var i=e[n];i&&(t[String(i).toUpperCase().replace(/[-.]/g,"_")]=i)}return t}var Hhe="aws.lambda.invoked_arn",Yhe="db.system",qhe="db.connection_string",Khe="db.user",Whe="db.jdbc.driver_classname",Qhe="db.name",zhe="db.statement",Xhe="db.operation",Jhe="db.mssql.instance_name",Zhe="db.cassandra.keyspace",eSe="db.cassandra.page_size",tSe="db.cassandra.consistency_level",rSe="db.cassandra.table",nSe="db.cassandra.idempotence",iSe="db.cassandra.speculative_execution_count",aSe="db.cassandra.coordinator.id",oSe="db.cassandra.coordinator.dc",sSe="db.hbase.namespace",uSe="db.redis.database_index",cSe="db.mongodb.collection",lSe="db.sql.table",jk="exception.type",Hk="exception.message",Yk="exception.stacktrace",fSe="exception.escaped",_Se="faas.trigger",dSe="faas.execution",pSe="faas.document.collection",hSe="faas.document.operation",SSe="faas.document.time",ESe="faas.document.name",vSe="faas.time",mSe="faas.cron",TSe="faas.coldstart",ASe="faas.invoked_name",gSe="faas.invoked_provider",ySe="faas.invoked_region",RSe="net.transport",OSe="net.peer.ip",bSe="net.peer.port",CSe="net.peer.name",PSe="net.host.ip",MSe="net.host.port",ISe="net.host.name",NSe="net.host.connection.type",LSe="net.host.connection.subtype",DSe="net.host.carrier.name",wSe="net.host.carrier.mcc",USe="net.host.carrier.mnc",xSe="net.host.carrier.icc",FSe="peer.service",$Se="enduser.id",VSe="enduser.role",GSe="enduser.scope",BSe="thread.id",kSe="thread.name",jSe="code.function",HSe="code.namespace",YSe="code.filepath",qSe="code.lineno",KSe="http.method",WSe="http.url",QSe="http.target",zSe="http.host",XSe="http.scheme",JSe="http.status_code",ZSe="http.flavor",eEe="http.user_agent",tEe="http.request_content_length",rEe="http.request_content_length_uncompressed",nEe="http.response_content_length",iEe="http.response_content_length_uncompressed",aEe="http.server_name",oEe="http.route",sEe="http.client_ip",uEe="aws.dynamodb.table_names",cEe="aws.dynamodb.consumed_capacity",lEe="aws.dynamodb.item_collection_metrics",fEe="aws.dynamodb.provisioned_read_capacity",_Ee="aws.dynamodb.provisioned_write_capacity",dEe="aws.dynamodb.consistent_read",pEe="aws.dynamodb.projection",hEe="aws.dynamodb.limit",SEe="aws.dynamodb.attributes_to_get",EEe="aws.dynamodb.index_name",vEe="aws.dynamodb.select",mEe="aws.dynamodb.global_secondary_indexes",TEe="aws.dynamodb.local_secondary_indexes",AEe="aws.dynamodb.exclusive_start_table",gEe="aws.dynamodb.table_count",yEe="aws.dynamodb.scan_forward",REe="aws.dynamodb.segment",OEe="aws.dynamodb.total_segments",bEe="aws.dynamodb.count",CEe="aws.dynamodb.scanned_count",PEe="aws.dynamodb.attribute_definitions",MEe="aws.dynamodb.global_secondary_index_updates",IEe="messaging.system",NEe="messaging.destination",LEe="messaging.destination_kind",DEe="messaging.temp_destination",wEe="messaging.protocol",UEe="messaging.protocol_version",xEe="messaging.url",FEe="messaging.message_id",$Ee="messaging.conversation_id",VEe="messaging.message_payload_size_bytes",GEe="messaging.message_payload_compressed_size_bytes",BEe="messaging.operation",kEe="messaging.consumer_id",jEe="messaging.rabbitmq.routing_key",HEe="messaging.kafka.message_key",YEe="messaging.kafka.consumer_group",qEe="messaging.kafka.client_id",KEe="messaging.kafka.partition",WEe="messaging.kafka.tombstone",QEe="rpc.system",zEe="rpc.service",XEe="rpc.method",JEe="rpc.grpc.status_code",ZEe="rpc.jsonrpc.version",eve="rpc.jsonrpc.request_id",tve="rpc.jsonrpc.error_code",rve="rpc.jsonrpc.error_message",nve="message.type",ive="message.id",ave="message.compressed_size",ove="message.uncompressed_size",$ke=null,Vke=null,Gke=null,Bke=null,kke=null,jke=null,Hke=null,Yke=null,qke=null,Kke=null,Wke=null,Qke=null,zke=null,Xke=null,Jke=null,Zke=null,eje=null,tje=null,rje=null,nje=null,ije=null,HM=jk,YM=Hk,sve=Yk,aje=null,oje=null,sje=null,uje=null,cje=null,lje=null,fje=null,_je=null,dje=null,pje=null,hje=null,Sje=null,Eje=null,vje=null,mje=null,Tje=null,Aje=null,gje=null,yje=null,Rje=null,Oje=null,bje=null,Cje=null,Pje=null,Mje=null,Ije=null,Nje=null,Lje=null,Dje=null,wje=null,Uje=null,xje=null,Fje=null,$je=null,Vje=null,Gje=null,Bje=null,kje=null,jje=null,Hje=null,Yje=null,qje=null,Kje=null,Wje=null,Qje=null,zje=null,Xje=null,Jje=null,Zje=null,eHe=null,tHe=null,rHe=null,nHe=null,iHe=null,aHe=null,oHe=null,sHe=null,uHe=null,cHe=null,lHe=null,fHe=null,_He=null,dHe=null,pHe=null,hHe=null,SHe=null,EHe=null,vHe=null,mHe=null,THe=null,AHe=null,gHe=null,yHe=null,RHe=null,OHe=null,bHe=null,CHe=null,PHe=null,MHe=null,IHe=null,NHe=null,LHe=null,DHe=null,wHe=null,UHe=null,xHe=null,FHe=null,$He=null,VHe=null,GHe=null,BHe=null,kHe=null,jHe=null,HHe=null,YHe=null,qHe=null,KHe=null,WHe=null,QHe=null,zHe=null,XHe=null,JHe=null,ZHe=null,eYe=null,tYe=co([Hhe,Yhe,qhe,Khe,Whe,Qhe,zhe,Xhe,Jhe,Zhe,eSe,tSe,rSe,nSe,iSe,aSe,oSe,sSe,uSe,cSe,lSe,jk,Hk,Yk,fSe,_Se,dSe,pSe,hSe,SSe,ESe,vSe,mSe,TSe,ASe,gSe,ySe,RSe,OSe,bSe,CSe,PSe,MSe,ISe,NSe,LSe,DSe,wSe,USe,xSe,FSe,$Se,VSe,GSe,BSe,kSe,jSe,HSe,YSe,qSe,KSe,WSe,QSe,zSe,XSe,JSe,ZSe,eEe,tEe,rEe,nEe,iEe,aEe,oEe,sEe,uEe,cEe,lEe,fEe,_Ee,dEe,pEe,hEe,SEe,EEe,vEe,mEe,TEe,AEe,gEe,yEe,REe,OEe,bEe,CEe,PEe,MEe,IEe,NEe,LEe,DEe,wEe,UEe,xEe,FEe,$Ee,VEe,GEe,BEe,kEe,jEe,HEe,YEe,qEe,KEe,WEe,QEe,zEe,XEe,JEe,ZEe,eve,tve,rve,nve,ive,ave,ove]),uve="other_sql",cve="mssql",lve="mysql",fve="oracle",_ve="db2",dve="postgresql",pve="redshift",hve="hive",Sve="cloudscape",Eve="hsqldb",vve="progress",mve="maxdb",Tve="hanadb",Ave="ingres",gve="firstsql",yve="edb",Rve="cache",Ove="adabas",bve="firebird",Cve="derby",Pve="filemaker",Mve="informix",Ive="instantdb",Nve="interbase",Lve="mariadb",Dve="netezza",wve="pervasive",Uve="pointbase",xve="sqlite",Fve="sybase",$ve="teradata",Vve="vertica",Gve="h2",Bve="coldfusion",kve="cassandra",jve="hbase",Hve="mongodb",Yve="redis",qve="couchbase",Kve="couchdb",Wve="cosmosdb",Qve="dynamodb",zve="neo4j",Xve="geode",Jve="elasticsearch",Zve="memcached",eme="cockroachdb",rYe=null,nYe=null,iYe=null,aYe=null,oYe=null,sYe=null,uYe=null,cYe=null,lYe=null,fYe=null,_Ye=null,dYe=null,pYe=null,hYe=null,SYe=null,EYe=null,vYe=null,mYe=null,TYe=null,AYe=null,gYe=null,yYe=null,RYe=null,OYe=null,bYe=null,CYe=null,PYe=null,MYe=null,IYe=null,NYe=null,LYe=null,DYe=null,wYe=null,UYe=null,xYe=null,FYe=null,$Ye=null,VYe=null,GYe=null,BYe=null,kYe=null,jYe=null,HYe=null,YYe=null,qYe=null,KYe=null,WYe=null,QYe=co([uve,cve,lve,fve,_ve,dve,pve,hve,Sve,Eve,vve,mve,Tve,Ave,gve,yve,Rve,Ove,bve,Cve,Pve,Mve,Ive,Nve,Lve,Dve,wve,Uve,xve,Fve,$ve,Vve,Gve,Bve,kve,jve,Hve,Yve,qve,Kve,Wve,Qve,zve,Xve,Jve,Zve,eme]),tme="all",rme="each_quorum",nme="quorum",ime="local_quorum",ame="one",ome="two",sme="three",ume="local_one",cme="any",lme="serial",fme="local_serial",zYe=null,XYe=null,JYe=null,ZYe=null,e8e=null,t8e=null,r8e=null,n8e=null,i8e=null,a8e=null,o8e=null,s8e=co([tme,rme,nme,ime,ame,ome,sme,ume,cme,lme,fme]),_me="datasource",dme="http",pme="pubsub",hme="timer",Sme="other",u8e=null,c8e=null,l8e=null,f8e=null,_8e=null,d8e=co([_me,dme,pme,hme,Sme]),Eme="insert",vme="edit",mme="delete",p8e=null,h8e=null,S8e=null,E8e=co([Eme,vme,mme]),Tme="alibaba_cloud",Ame="aws",gme="azure",yme="gcp",v8e=null,m8e=null,T8e=null,A8e=null,g8e=co([Tme,Ame,gme,yme]),Rme="ip_tcp",Ome="ip_udp",bme="ip",Cme="unix",Pme="pipe",Mme="inproc",Ime="other",y8e=null,R8e=null,O8e=null,b8e=null,C8e=null,P8e=null,M8e=null,I8e=co([Rme,Ome,bme,Cme,Pme,Mme,Ime]),Nme="wifi",Lme="wired",Dme="cell",wme="unavailable",Ume="unknown",N8e=null,L8e=null,D8e=null,w8e=null,U8e=null,x8e=co([Nme,Lme,Dme,wme,Ume]),xme="gprs",Fme="edge",$me="umts",Vme="cdma",Gme="evdo_0",Bme="evdo_a",kme="cdma2000_1xrtt",jme="hsdpa",Hme="hsupa",Yme="hspa",qme="iden",Kme="evdo_b",Wme="lte",Qme="ehrpd",zme="hspap",Xme="gsm",Jme="td_scdma",Zme="iwlan",eTe="nr",tTe="nrnsa",rTe="lte_ca",F8e=null,$8e=null,V8e=null,G8e=null,B8e=null,k8e=null,j8e=null,H8e=null,Y8e=null,q8e=null,K8e=null,W8e=null,Q8e=null,z8e=null,X8e=null,J8e=null,Z8e=null,eqe=null,tqe=null,rqe=null,nqe=null,iqe=co([xme,Fme,$me,Vme,Gme,Bme,kme,jme,Hme,Yme,qme,Kme,Wme,Qme,zme,Xme,Jme,Zme,eTe,tTe,rTe]),nTe="1.0",iTe="1.1",aTe="2.0",oTe="SPDY",sTe="QUIC",aqe=null,oqe=null,sqe=null,uqe=null,cqe=null,lqe={HTTP_1_0:nTe,HTTP_1_1:iTe,HTTP_2_0:aTe,SPDY:oTe,QUIC:sTe},uTe="queue",cTe="topic",fqe=null,_qe=null,dqe=co([uTe,cTe]),lTe="receive",fTe="process",pqe=null,hqe=null,Sqe=co([lTe,fTe]),_Te=0,dTe=1,pTe=2,hTe=3,STe=4,ETe=5,vTe=6,mTe=7,TTe=8,ATe=9,gTe=10,yTe=11,RTe=12,OTe=13,bTe=14,CTe=15,PTe=16,Eqe=null,vqe=null,mqe=null,Tqe=null,Aqe=null,gqe=null,yqe=null,Rqe=null,Oqe=null,bqe=null,Cqe=null,Pqe=null,Mqe=null,Iqe=null,Nqe=null,Lqe=null,Dqe=null,wqe={OK:_Te,CANCELLED:dTe,UNKNOWN:pTe,INVALID_ARGUMENT:hTe,DEADLINE_EXCEEDED:STe,NOT_FOUND:ETe,ALREADY_EXISTS:vTe,PERMISSION_DENIED:mTe,RESOURCE_EXHAUSTED:TTe,FAILED_PRECONDITION:ATe,ABORTED:gTe,OUT_OF_RANGE:yTe,UNIMPLEMENTED:RTe,INTERNAL:OTe,UNAVAILABLE:bTe,DATA_LOSS:CTe,UNAUTHENTICATED:PTe},MTe="SENT",ITe="RECEIVED",Uqe=null,xqe=null,Fqe=co([MTe,ITe]),NTe="exception",qM=function(){return qM=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},qM.apply(this,arguments)},LTe=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},qk=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,a=[],u;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)a.push(i.value)}catch(c){u={error:c}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(u)throw u.error}}return a},DTe=function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,a;n<i;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))},wTe=function(){function e(t,r,n,i,a,u,c,E,_,p){c===void 0&&(c=[]),this.attributes={},this.links=[],this.events=[],this._droppedAttributesCount=0,this._droppedEventsCount=0,this._droppedLinksCount=0,this.status={code:BM.UNSET},this.endTime=[0,0],this._ended=!1,this._duration=[-1,-1],this.name=n,this._spanContext=i,this.parentSpanId=u,this.kind=a,this.links=c;var L=Date.now();this._performanceStartTime=O_.now(),this._performanceOffset=L-(this._performanceStartTime+kM()),this._startTimeProvided=E!=null,this.startTime=this._getTime(E??L),this.resource=t.resource,this.instrumentationLibrary=t.instrumentationLibrary,this._spanLimits=t.getSpanLimits(),this._attributeValueLengthLimit=this._spanLimits.attributeValueLengthLimit||0,p!=null&&this.setAttributes(p),this._spanProcessor=t.getActiveSpanProcessor(),this._spanProcessor.onStart(this,r)}return e.prototype.spanContext=function(){return this._spanContext},e.prototype.setAttribute=function(t,r){return r==null||this._isSpanEnded()?this:t.length===0?(_r.warn("Invalid attribute key: "+t),this):Fk(r)?Object.keys(this.attributes).length>=this._spanLimits.attributeCountLimit&&!Object.prototype.hasOwnProperty.call(this.attributes,t)?(this._droppedAttributesCount++,this):(this.attributes[t]=this._truncateToSize(r),this):(_r.warn("Invalid attribute value set for key: "+t),this)},e.prototype.setAttributes=function(t){var r,n;try{for(var i=LTe(Object.entries(t)),a=i.next();!a.done;a=i.next()){var u=qk(a.value,2),c=u[0],E=u[1];this.setAttribute(c,E)}}catch(_){r={error:_}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return this},e.prototype.addEvent=function(t,r,n){if(this._isSpanEnded())return this;if(this._spanLimits.eventCountLimit===0)return _r.warn("No events allowed."),this._droppedEventsCount++,this;this.events.length>=this._spanLimits.eventCountLimit&&(this._droppedEventsCount===0&&_r.debug("Dropping extra events."),this.events.shift(),this._droppedEventsCount++),Bk(r)&&(Bk(n)||(n=r),r=void 0);var i=DT(r);return this.events.push({name:t,attributes:i,time:this._getTime(n),droppedAttributesCount:0}),this},e.prototype.addLink=function(t){return this.links.push(t),this},e.prototype.addLinks=function(t){var r;return(r=this.links).push.apply(r,DTe([],qk(t),!1)),this},e.prototype.setStatus=function(t){return this._isSpanEnded()?this:(this.status=qM({},t),this.status.message!=null&&typeof t.message!="string"&&(_r.warn("Dropping invalid status.message of type '"+typeof t.message+"', expected 'string'"),delete this.status.message),this)},e.prototype.updateName=function(t){return this._isSpanEnded()?this:(this.name=t,this)},e.prototype.end=function(t){if(this._isSpanEnded()){_r.error(this.name+" "+this._spanContext.traceId+"-"+this._spanContext.spanId+" - You can only call end() on a span once.");return}this._ended=!0,this.endTime=this._getTime(t),this._duration=jhe(this.startTime,this.endTime),this._duration[0]<0&&(_r.warn("Inconsistent start and end time, startTime > endTime. Setting span duration to 0ms.",this.startTime,this.endTime),this.endTime=this.startTime.slice(),this._duration=[0,0]),this._droppedEventsCount>0&&_r.warn("Dropped "+this._droppedEventsCount+" events because eventCountLimit reached"),this._spanProcessor.onEnd(this)},e.prototype._getTime=function(t){if(typeof t=="number"&&t<=O_.now())return Gk(t+this._performanceOffset);if(typeof t=="number")return Ju(t);if(t instanceof Date)return Ju(t.getTime());if(jM(t))return t;if(this._startTimeProvided)return Ju(Date.now());var r=O_.now()-this._performanceStartTime;return kk(this.startTime,Ju(r))},e.prototype.isRecording=function(){return this._ended===!1},e.prototype.recordException=function(t,r){var n={};typeof t=="string"?n[YM]=t:t&&(t.code?n[HM]=t.code.toString():t.name&&(n[HM]=t.name),t.message&&(n[YM]=t.message),t.stack&&(n[sve]=t.stack)),n[HM]||n[YM]?this.addEvent(NTe,n,r):_r.warn("Failed to record an exception "+t)},Object.defineProperty(e.prototype,"duration",{get:function(){return this._duration},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ended",{get:function(){return this._ended},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"droppedAttributesCount",{get:function(){return this._droppedAttributesCount},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"droppedEventsCount",{get:function(){return this._droppedEventsCount},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"droppedLinksCount",{get:function(){return this._droppedLinksCount},enumerable:!1,configurable:!0}),e.prototype._isSpanEnded=function(){return this._ended&&_r.warn("Can not execute the operation on ended Span {traceId: "+this._spanContext.traceId+", spanId: "+this._spanContext.spanId+"}"),this._ended},e.prototype._truncateToLimitUtil=function(t,r){return t.length<=r?t:t.substring(0,r)},e.prototype._truncateToSize=function(t){var r=this,n=this._attributeValueLengthLimit;return n<=0?(_r.warn("Attribute value limit must be positive, got "+n),t):typeof t=="string"?this._truncateToLimitUtil(t,n):Array.isArray(t)?t.map(function(i){return typeof i=="string"?r._truncateToLimitUtil(i,n):i}):t},e}(),b_;(function(e){e[e.NOT_RECORD=0]="NOT_RECORD",e[e.RECORD=1]="RECORD",e[e.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(b_||(b_={}));var UT=function(){function e(){}return e.prototype.shouldSample=function(){return{decision:b_.NOT_RECORD}},e.prototype.toString=function(){return"AlwaysOffSampler"},e}(),C_=function(){function e(){}return e.prototype.shouldSample=function(){return{decision:b_.RECORD_AND_SAMPLED}},e.prototype.toString=function(){return"AlwaysOnSampler"},e}();function UTe(){return function(e){_r.error(xTe(e))}}function xTe(e){return typeof e=="string"?e:JSON.stringify(FTe(e))}function FTe(e){for(var t={},r=e;r!==null;)Object.getOwnPropertyNames(r).forEach(function(n){if(!t[n]){var i=r[n];i&&(t[n]=String(i))}}),r=Object.getPrototypeOf(r);return t}var Kk=UTe();function $qe(e){Kk=e}function P_(e){try{Kk(e)}catch{}}var KM=function(){function e(t){var r,n,i,a;this._root=t.root,this._root||(P_(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new C_),this._remoteParentSampled=(r=t.remoteParentSampled)!==null&&r!==void 0?r:new C_,this._remoteParentNotSampled=(n=t.remoteParentNotSampled)!==null&&n!==void 0?n:new UT,this._localParentSampled=(i=t.localParentSampled)!==null&&i!==void 0?i:new C_,this._localParentNotSampled=(a=t.localParentNotSampled)!==null&&a!==void 0?a:new UT}return e.prototype.shouldSample=function(t,r,n,i,a,u){var c=ta.getSpanContext(t);return!c||!m_(c)?this._root.shouldSample(t,r,n,i,a,u):c.isRemote?c.traceFlags&ys.SAMPLED?this._remoteParentSampled.shouldSample(t,r,n,i,a,u):this._remoteParentNotSampled.shouldSample(t,r,n,i,a,u):c.traceFlags&ys.SAMPLED?this._localParentSampled.shouldSample(t,r,n,i,a,u):this._localParentNotSampled.shouldSample(t,r,n,i,a,u)},e.prototype.toString=function(){return"ParentBased{root="+this._root.toString()+", remoteParentSampled="+this._remoteParentSampled.toString()+", remoteParentNotSampled="+this._remoteParentNotSampled.toString()+", localParentSampled="+this._localParentSampled.toString()+", localParentNotSampled="+this._localParentNotSampled.toString()+"}"},e}(),Wk=function(){function e(t){t===void 0&&(t=0),this._ratio=t,this._ratio=this._normalize(t),this._upperBound=Math.floor(this._ratio*4294967295)}return e.prototype.shouldSample=function(t,r){return{decision:cB(r)&&this._accumulate(r)<this._upperBound?b_.RECORD_AND_SAMPLED:b_.NOT_RECORD}},e.prototype.toString=function(){return"TraceIdRatioBased{"+this._ratio+"}"},e.prototype._normalize=function(t){return typeof t!="number"||isNaN(t)?0:t>=1?1:t<=0?0:t},e.prototype._accumulate=function(t){for(var r=0,n=0;n<t.length/8;n++){var i=n*8,a=parseInt(t.slice(i,i+8),16);r=(r^a)>>>0}return r},e}(),$Te=Rs.AlwaysOn,M_=1;function Qk(){var e=Rh();return{sampler:zk(e),forceFlushTimeoutMillis:3e4,generalLimits:{attributeValueLengthLimit:e.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:e.OTEL_ATTRIBUTE_COUNT_LIMIT},spanLimits:{attributeValueLengthLimit:e.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:e.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT,linkCountLimit:e.OTEL_SPAN_LINK_COUNT_LIMIT,eventCountLimit:e.OTEL_SPAN_EVENT_COUNT_LIMIT,attributePerEventCountLimit:e.OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT,attributePerLinkCountLimit:e.OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT},mergeResourceWithDefaults:!0}}function zk(e){switch(e===void 0&&(e=Rh()),e.OTEL_TRACES_SAMPLER){case Rs.AlwaysOn:return new C_;case Rs.AlwaysOff:return new UT;case Rs.ParentBasedAlwaysOn:return new KM({root:new C_});case Rs.ParentBasedAlwaysOff:return new KM({root:new UT});case Rs.TraceIdRatio:return new Wk(Xk(e));case Rs.ParentBasedTraceIdRatio:return new KM({root:new Wk(Xk(e))});default:return _r.error('OTEL_TRACES_SAMPLER value "'+e.OTEL_TRACES_SAMPLER+" invalid, defaulting to "+$Te+'".'),new C_}}function Xk(e){if(e.OTEL_TRACES_SAMPLER_ARG===void 0||e.OTEL_TRACES_SAMPLER_ARG==="")return _r.error("OTEL_TRACES_SAMPLER_ARG is blank, defaulting to "+M_+"."),M_;var t=Number(e.OTEL_TRACES_SAMPLER_ARG);return isNaN(t)?(_r.error("OTEL_TRACES_SAMPLER_ARG="+e.OTEL_TRACES_SAMPLER_ARG+" was given, but it is invalid, defaulting to "+M_+"."),M_):t<0||t>1?(_r.error("OTEL_TRACES_SAMPLER_ARG="+e.OTEL_TRACES_SAMPLER_ARG+" was given, but it is out of range ([0..1]), defaulting to "+M_+"."),M_):t}function VTe(e){var t={sampler:zk()},r=Qk(),n=Object.assign({},r,t,e);return n.generalLimits=Object.assign({},r.generalLimits,e.generalLimits||{}),n.spanLimits=Object.assign({},r.spanLimits,e.spanLimits||{}),n}function GTe(e){var t,r,n,i,a,u,c,E,_,p,L,W,ve=Object.assign({},e.spanLimits),me=che();return ve.attributeCountLimit=(u=(a=(i=(r=(t=e.spanLimits)===null||t===void 0?void 0:t.attributeCountLimit)!==null&&r!==void 0?r:(n=e.generalLimits)===null||n===void 0?void 0:n.attributeCountLimit)!==null&&i!==void 0?i:me.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT)!==null&&a!==void 0?a:me.OTEL_ATTRIBUTE_COUNT_LIMIT)!==null&&u!==void 0?u:IT,ve.attributeValueLengthLimit=(W=(L=(p=(E=(c=e.spanLimits)===null||c===void 0?void 0:c.attributeValueLengthLimit)!==null&&E!==void 0?E:(_=e.generalLimits)===null||_===void 0?void 0:_.attributeValueLengthLimit)!==null&&p!==void 0?p:me.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&L!==void 0?L:me.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&W!==void 0?W:MT,Object.assign({},e,{spanLimits:ve})}var BTe=8,kTe=16,jTe=function(){function e(){this.generateTraceId=Jk(kTe),this.generateSpanId=Jk(BTe)}return e}(),xT=Array(32);function Jk(e){return function(){for(var r=0;r<e*2;r++)xT[r]=Math.floor(Math.random()*16)+48,xT[r]>=58&&(xT[r]+=39);return String.fromCharCode.apply(null,xT.slice(0,e*2))}}var HTe=function(){function e(t,r,n){this._tracerProvider=n;var i=VTe(r);this._sampler=i.sampler,this._generalLimits=i.generalLimits,this._spanLimits=i.spanLimits,this._idGenerator=r.idGenerator||new jTe,this.resource=n.resource,this.instrumentationLibrary=t}return e.prototype.startSpan=function(t,r,n){var i,a,u;r===void 0&&(r={}),n===void 0&&(n=_a.active()),r.root&&(n=ta.deleteSpan(n));var c=ta.getSpan(n);if(wM(n)){_r.debug("Instrumentation suppressed, returning Noop Span");var E=ta.wrapSpanContext(sB);return E}var _=c?.spanContext(),p=this._idGenerator.generateSpanId(),L,W,ve;!_||!ta.isSpanContextValid(_)?L=this._idGenerator.generateTraceId():(L=_.traceId,W=_.traceState,ve=_.spanId);var me=(i=r.kind)!==null&&i!==void 0?i:NT.INTERNAL,Oe=((a=r.links)!==null&&a!==void 0?a:[]).map(function(dr){return{context:dr.context,attributes:DT(dr.attributes)}}),He=DT(r.attributes),qe=this._sampler.shouldSample(n,L,t,me,He,Oe);W=(u=qe.traceState)!==null&&u!==void 0?u:W;var We=qe.decision===LT.RECORD_AND_SAMPLED?ys.SAMPLED:ys.NONE,ct={traceId:L,spanId:p,traceFlags:We,traceState:W};if(qe.decision===LT.NOT_RECORD){_r.debug("Recording is off, propagating context in a non-recording span");var E=ta.wrapSpanContext(ct);return E}var yt=DT(Object.assign(He,qe.attributes)),jt=new wTe(this,n,t,ct,me,ve,Oe,r.startTime,void 0,yt);return jt},e.prototype.startActiveSpan=function(t,r,n,i){var a,u,c;if(!(arguments.length<2)){arguments.length===2?c=r:arguments.length===3?(a=r,c=n):(a=r,u=n,c=i);var E=u??_a.active(),_=this.startSpan(t,a,E),p=ta.setSpan(E,_);return _a.with(p,c,void 0,_)}},e.prototype.getGeneralLimits=function(){return this._generalLimits},e.prototype.getSpanLimits=function(){return this._spanLimits},e.prototype.getActiveSpanProcessor=function(){return this._tracerProvider.getActiveSpanProcessor()},e}(),FT=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Zk=function(){function e(t){this._spanProcessors=t}return e.prototype.forceFlush=function(){var t,r,n=[];try{for(var i=FT(this._spanProcessors),a=i.next();!a.done;a=i.next()){var u=a.value;n.push(u.forceFlush())}}catch(c){t={error:c}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return new Promise(function(c){Promise.all(n).then(function(){c()}).catch(function(E){P_(E||new Error("MultiSpanProcessor: forceFlush failed")),c()})})},e.prototype.onStart=function(t,r){var n,i;try{for(var a=FT(this._spanProcessors),u=a.next();!u.done;u=a.next()){var c=u.value;c.onStart(t,r)}}catch(E){n={error:E}}finally{try{u&&!u.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}},e.prototype.onEnd=function(t){var r,n;try{for(var i=FT(this._spanProcessors),a=i.next();!a.done;a=i.next()){var u=a.value;u.onEnd(t)}}catch(c){r={error:c}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}},e.prototype.shutdown=function(){var t,r,n=[];try{for(var i=FT(this._spanProcessors),a=i.next();!a.done;a=i.next()){var u=a.value;n.push(u.shutdown())}}catch(c){t={error:c}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return new Promise(function(c,E){Promise.all(n).then(function(){c()},E)})},e}(),YTe=function(){function e(){}return e.prototype.onStart=function(t,r){},e.prototype.onEnd=function(t){},e.prototype.shutdown=function(){return Promise.resolve()},e.prototype.forceFlush=function(){return Promise.resolve()},e}(),qTe=function(){function e(){var t=this;this._promise=new Promise(function(r,n){t._resolve=r,t._reject=n})}return Object.defineProperty(e.prototype,"promise",{get:function(){return this._promise},enumerable:!1,configurable:!0}),e.prototype.resolve=function(t){this._resolve(t)},e.prototype.reject=function(t){this._reject(t)},e}(),KTe=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,a=[],u;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)a.push(i.value)}catch(c){u={error:c}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(u)throw u.error}}return a},WTe=function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,a;n<i;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))},QTe=function(){function e(t,r){this._callback=t,this._that=r,this._isCalled=!1,this._deferred=new qTe}return Object.defineProperty(e.prototype,"isCalled",{get:function(){return this._isCalled},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"promise",{get:function(){return this._deferred.promise},enumerable:!1,configurable:!0}),e.prototype.call=function(){for(var t,r=this,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];if(!this._isCalled){this._isCalled=!0;try{Promise.resolve((t=this._callback).call.apply(t,WTe([this._that],KTe(n),!1))).then(function(a){return r._deferred.resolve(a)},function(a){return r._deferred.reject(a)})}catch(a){this._deferred.reject(a)}}return this._deferred.promise},e}(),WM;(function(e){e[e.SUCCESS=0]="SUCCESS",e[e.FAILED=1]="FAILED"})(WM||(WM={}));function Vqe(e){}var zTe=function(){function e(t,r){this._exporter=t,this._isExporting=!1,this._finishedSpans=[],this._droppedSpansCount=0;var n=Rh();this._maxExportBatchSize=typeof r?.maxExportBatchSize=="number"?r.maxExportBatchSize:n.OTEL_BSP_MAX_EXPORT_BATCH_SIZE,this._maxQueueSize=typeof r?.maxQueueSize=="number"?r.maxQueueSize:n.OTEL_BSP_MAX_QUEUE_SIZE,this._scheduledDelayMillis=typeof r?.scheduledDelayMillis=="number"?r.scheduledDelayMillis:n.OTEL_BSP_SCHEDULE_DELAY,this._exportTimeoutMillis=typeof r?.exportTimeoutMillis=="number"?r.exportTimeoutMillis:n.OTEL_BSP_EXPORT_TIMEOUT,this._shutdownOnce=new QTe(this._shutdown,this),this._maxExportBatchSize>this._maxQueueSize&&(_r.warn("BatchSpanProcessor: maxExportBatchSize must be smaller or equal to maxQueueSize, setting maxExportBatchSize to match maxQueueSize"),this._maxExportBatchSize=this._maxQueueSize)}return e.prototype.forceFlush=function(){return this._shutdownOnce.isCalled?this._shutdownOnce.promise:this._flushAll()},e.prototype.onStart=function(t,r){},e.prototype.onEnd=function(t){this._shutdownOnce.isCalled||(t.spanContext().traceFlags&ys.SAMPLED)!==0&&this._addToBuffer(t)},e.prototype.shutdown=function(){return this._shutdownOnce.call()},e.prototype._shutdown=function(){var t=this;return Promise.resolve().then(function(){return t.onShutdown()}).then(function(){return t._flushAll()}).then(function(){return t._exporter.shutdown()})},e.prototype._addToBuffer=function(t){if(this._finishedSpans.length>=this._maxQueueSize){this._droppedSpansCount===0&&_r.debug("maxQueueSize reached, dropping spans"),this._droppedSpansCount++;return}this._droppedSpansCount>0&&(_r.warn("Dropped "+this._droppedSpansCount+" spans because maxQueueSize reached"),this._droppedSpansCount=0),this._finishedSpans.push(t),this._maybeStartTimer()},e.prototype._flushAll=function(){var t=this;return new Promise(function(r,n){for(var i=[],a=Math.ceil(t._finishedSpans.length/t._maxExportBatchSize),u=0,c=a;u<c;u++)i.push(t._flushOneBatch());Promise.all(i).then(function(){r()}).catch(n)})},e.prototype._flushOneBatch=function(){var t=this;return this._clearTimer(),this._finishedSpans.length===0?Promise.resolve():new Promise(function(r,n){var i=setTimeout(function(){n(new Error("Timeout"))},t._exportTimeoutMillis);_a.with(_he(_a.active()),function(){var a;t._finishedSpans.length<=t._maxExportBatchSize?(a=t._finishedSpans,t._finishedSpans=[]):a=t._finishedSpans.splice(0,t._maxExportBatchSize);for(var u=function(){return t._exporter.export(a,function(L){var W;clearTimeout(i),L.code===WM.SUCCESS?r():n((W=L.error)!==null&&W!==void 0?W:new Error("BatchSpanProcessor: span export failed"))})},c=null,E=0,_=a.length;E<_;E++){var p=a[E];p.resource.asyncAttributesPending&&p.resource.waitForAsyncAttributes&&(c??(c=[]),c.push(p.resource.waitForAsyncAttributes()))}c===null?u():Promise.all(c).then(u,function(L){P_(L),n(L)})})})},e.prototype._maybeStartTimer=function(){var t=this;if(!this._isExporting){var r=function(){t._isExporting=!0,t._flushOneBatch().finally(function(){t._isExporting=!1,t._finishedSpans.length>0&&(t._clearTimer(),t._maybeStartTimer())}).catch(function(n){t._isExporting=!1,P_(n)})};if(this._finishedSpans.length>=this._maxExportBatchSize)return r();this._timer===void 0&&(this._timer=setTimeout(function(){return r()},this._scheduledDelayMillis),this._timer,void 0)}},e.prototype._clearTimer=function(){this._timer!==void 0&&(clearTimeout(this._timer),this._timer=void 0)},e}(),XTe=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),JTe=function(e){XTe(t,e);function t(r,n){var i=e.call(this,r,n)||this;return i.onInit(n),i}return t.prototype.onInit=function(r){var n=this;r?.disableAutoFlushOnDocumentHide!==!0&&typeof document<"u"&&(this._visibilityChangeListener=function(){document.visibilityState==="hidden"&&n.forceFlush().catch(function(i){P_(i)})},this._pageHideListener=function(){n.forceFlush().catch(function(i){P_(i)})},document.addEventListener("visibilitychange",this._visibilityChangeListener),document.addEventListener("pagehide",this._pageHideListener))},t.prototype.onShutdown=function(){typeof document<"u"&&(this._visibilityChangeListener&&document.removeEventListener("visibilitychange",this._visibilityChangeListener),this._pageHideListener&&document.removeEventListener("pagehide",this._pageHideListener))},t}(zTe),ZTe=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,a=[],u;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)a.push(i.value)}catch(c){u={error:c}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(u)throw u.error}}return a},eAe=function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,a;n<i;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))},ml;(function(e){e[e.resolved=0]="resolved",e[e.timeout=1]="timeout",e[e.error=2]="error",e[e.unresolved=3]="unresolved"})(ml||(ml={}));var tAe=function(){function e(t){t===void 0&&(t={});var r,n;this._registeredSpanProcessors=[],this._tracers=new Map;var i=Kpe({},Qk(),GTe(t));if(this.resource=(r=i.resource)!==null&&r!==void 0?r:mT.empty(),i.mergeResourceWithDefaults&&(this.resource=mT.default().merge(this.resource)),this._config=Object.assign({},i,{resource:this.resource}),!((n=t.spanProcessors)===null||n===void 0)&&n.length)this._registeredSpanProcessors=eAe([],ZTe(t.spanProcessors),!1),this.activeSpanProcessor=new Zk(this._registeredSpanProcessors);else{var a=this._buildExporterFromEnv();if(a!==void 0){var u=new JTe(a);this.activeSpanProcessor=u}else this.activeSpanProcessor=new YTe}}return e.prototype.getTracer=function(t,r,n){var i=t+"@"+(r||"")+":"+(n?.schemaUrl||"");return this._tracers.has(i)||this._tracers.set(i,new HTe({name:t,version:r,schemaUrl:n?.schemaUrl},this._config,this)),this._tracers.get(i)},e.prototype.addSpanProcessor=function(t){this._registeredSpanProcessors.length===0&&this.activeSpanProcessor.shutdown().catch(function(r){return _r.error("Error while trying to shutdown current span processor",r)}),this._registeredSpanProcessors.push(t),this.activeSpanProcessor=new Zk(this._registeredSpanProcessors)},e.prototype.getActiveSpanProcessor=function(){return this.activeSpanProcessor},e.prototype.register=function(t){t===void 0&&(t={}),ta.setGlobalTracerProvider(this),t.propagator===void 0&&(t.propagator=this._buildPropagatorFromEnv()),t.contextManager&&_a.setGlobalContextManager(t.contextManager),t.propagator&&R_.setGlobalPropagator(t.propagator)},e.prototype.forceFlush=function(){var t=this._config.forceFlushTimeoutMillis,r=this._registeredSpanProcessors.map(function(n){return new Promise(function(i){var a,u=setTimeout(function(){i(new Error("Span processor did not completed within timeout period of "+t+" ms")),a=ml.timeout},t);n.forceFlush().then(function(){clearTimeout(u),a!==ml.timeout&&(a=ml.resolved,i(a))}).catch(function(c){clearTimeout(u),a=ml.error,i(c)})})});return new Promise(function(n,i){Promise.all(r).then(function(a){var u=a.filter(function(c){return c!==ml.resolved});u.length>0?i(u):n()}).catch(function(a){return i([a])})})},e.prototype.shutdown=function(){return this.activeSpanProcessor.shutdown()},e.prototype._getPropagator=function(t){var r;return(r=this.constructor._registeredPropagators.get(t))===null||r===void 0?void 0:r()},e.prototype._getSpanExporter=function(t){var r;return(r=this.constructor._registeredExporters.get(t))===null||r===void 0?void 0:r()},e.prototype._buildPropagatorFromEnv=function(){var t=this,r=Array.from(new Set(Rh().OTEL_PROPAGATORS)),n=r.map(function(a){var u=t._getPropagator(a);return u||_r.warn('Propagator "'+a+'" requested through environment variable is unavailable.'),u}),i=n.reduce(function(a,u){return u&&a.push(u),a},[]);if(i.length!==0)return r.length===1?i[0]:new fhe({propagators:i})},e.prototype._buildExporterFromEnv=function(){var t=Rh().OTEL_TRACES_EXPORTER;if(!(t==="none"||t==="")){var r=this._getSpanExporter(t);return r||_r.error('Exporter "'+t+'" requested through environment variable is unavailable.'),r}},e._registeredPropagators=new Map([["tracecontext",function(){return new Mhe}],["baggage",function(){return new Fhe}]]),e._registeredExporters=new Map,e}(),rAe=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,a=[],u;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)a.push(i.value)}catch(c){u={error:c}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(u)throw u.error}}return a},nAe=function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,a;n<i;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))},iAe=function(){function e(){this._enabled=!1,this._currentContext=v_}return e.prototype._bindFunction=function(t,r){t===void 0&&(t=v_);var n=this,i=function(){for(var a=this,u=[],c=0;c<arguments.length;c++)u[c]=arguments[c];return n.with(t,function(){return r.apply(a,u)})};return Object.defineProperty(i,"length",{enumerable:!1,configurable:!0,writable:!1,value:r.length}),i},e.prototype.active=function(){return this._currentContext},e.prototype.bind=function(t,r){return t===void 0&&(t=this.active()),typeof r=="function"?this._bindFunction(t,r):r},e.prototype.disable=function(){return this._currentContext=v_,this._enabled=!1,this},e.prototype.enable=function(){return this._enabled?this:(this._enabled=!0,this._currentContext=v_,this)},e.prototype.with=function(t,r,n){for(var i=[],a=3;a<arguments.length;a++)i[a-3]=arguments[a];var u=this._currentContext;this._currentContext=t||v_;try{return r.call.apply(r,nAe([n],rAe(i),!1))}finally{this._currentContext=u}},e}(),aAe=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),oAe=function(e){aAe(t,e);function t(r){r===void 0&&(r={});var n=e.call(this,r)||this;if(r.contextManager)throw"contextManager should be defined in register method not in constructor";if(r.propagator)throw"propagator should be defined in register method not in constructor";return n}return t.prototype.register=function(r){r===void 0&&(r={}),r.contextManager===void 0&&(r.contextManager=new iAe),r.contextManager&&r.contextManager.enable(),e.prototype.register.call(this,r)},t}(tAe);function Tl(e){let t={};const r=e.length;for(let n=0;n<r;n++){const i=e[n];i&&(t[String(i).toUpperCase().replace(/[-.]/g,"_")]=i)}return t}const sAe="cloud.provider",uAe="cloud.account.id",cAe="cloud.region",lAe="cloud.availability_zone",fAe="cloud.platform",_Ae="aws.ecs.container.arn",dAe="aws.ecs.cluster.arn",pAe="aws.ecs.launchtype",hAe="aws.ecs.task.arn",SAe="aws.ecs.task.family",EAe="aws.ecs.task.revision",vAe="aws.eks.cluster.arn",mAe="aws.log.group.names",TAe="aws.log.group.arns",AAe="aws.log.stream.names",gAe="aws.log.stream.arns",yAe="container.name",RAe="container.id",OAe="container.runtime",bAe="container.image.name",CAe="container.image.tag",ej="deployment.environment",PAe="device.id",MAe="device.model.identifier",IAe="device.model.name",NAe="faas.name",LAe="faas.id",DAe="faas.version",wAe="faas.instance",UAe="faas.max_memory",xAe="host.id",FAe="host.name",$Ae="host.type",VAe="host.arch",GAe="host.image.name",BAe="host.image.id",kAe="host.image.version",jAe="k8s.cluster.name",HAe="k8s.node.name",YAe="k8s.node.uid",qAe="k8s.namespace.name",KAe="k8s.pod.uid",WAe="k8s.pod.name",QAe="k8s.container.name",zAe="k8s.replicaset.uid",XAe="k8s.replicaset.name",JAe="k8s.deployment.uid",ZAe="k8s.deployment.name",ege="k8s.statefulset.uid",tge="k8s.statefulset.name",rge="k8s.daemonset.uid",nge="k8s.daemonset.name",ige="k8s.job.uid",age="k8s.job.name",oge="k8s.cronjob.uid",sge="k8s.cronjob.name",uge="os.type",cge="os.description",lge="os.name",fge="os.version",_ge="process.pid",dge="process.executable.name",pge="process.executable.path",hge="process.command",Sge="process.command_line",Ege="process.command_args",vge="process.owner",mge="process.runtime.name",Tge="process.runtime.version",Age="process.runtime.description",tj="service.name",rj="service.namespace",gge="service.instance.id",nj="service.version",yge="telemetry.sdk.name",ij="telemetry.sdk.language",Rge="telemetry.sdk.version",Oge="telemetry.auto.version",bge="webengine.name",Cge="webengine.version",Pge="webengine.description",Gqe=null,Bqe=null,kqe=null,jqe=null,Hqe=null,Yqe=null,qqe=null,Kqe=null,Wqe=null,Qqe=null,zqe=null,Xqe=null,Jqe=null,Zqe=null,e2e=null,t2e=null,r2e=null,n2e=null,i2e=null,a2e=null,o2e=null,Mge=ej,s2e=null,u2e=null,c2e=null,l2e=null,f2e=null,_2e=null,d2e=null,p2e=null,h2e=null,S2e=null,E2e=null,v2e=null,m2e=null,T2e=null,A2e=null,g2e=null,y2e=null,R2e=null,O2e=null,b2e=null,C2e=null,P2e=null,M2e=null,I2e=null,N2e=null,L2e=null,D2e=null,w2e=null,U2e=null,x2e=null,F2e=null,$2e=null,V2e=null,G2e=null,B2e=null,k2e=null,j2e=null,H2e=null,Y2e=null,q2e=null,K2e=null,W2e=null,Q2e=null,z2e=null,X2e=null,J2e=null,Z2e=null,eKe=null,Ige=tj,Nge=rj,tKe=null,Lge=nj,rKe=null,Dge=ij,nKe=null,iKe=null,aKe=null,oKe=null,sKe=null,uKe=Tl([sAe,uAe,cAe,lAe,fAe,_Ae,dAe,pAe,hAe,SAe,EAe,vAe,mAe,TAe,AAe,gAe,yAe,RAe,OAe,bAe,CAe,ej,PAe,MAe,IAe,NAe,LAe,DAe,wAe,UAe,xAe,FAe,$Ae,VAe,GAe,BAe,kAe,jAe,HAe,YAe,qAe,KAe,WAe,QAe,zAe,XAe,JAe,ZAe,ege,tge,rge,nge,ige,age,oge,sge,uge,cge,lge,fge,_ge,dge,pge,hge,Sge,Ege,vge,mge,Tge,Age,tj,rj,gge,nj,yge,ij,Rge,Oge,bge,Cge,Pge]),wge="alibaba_cloud",Uge="aws",xge="azure",Fge="gcp",cKe=null,lKe=null,fKe=null,_Ke=null,dKe=Tl([wge,Uge,xge,Fge]),$ge="alibaba_cloud_ecs",Vge="alibaba_cloud_fc",Gge="aws_ec2",Bge="aws_ecs",kge="aws_eks",jge="aws_lambda",Hge="aws_elastic_beanstalk",Yge="azure_vm",qge="azure_container_instances",Kge="azure_aks",Wge="azure_functions",Qge="azure_app_service",zge="gcp_compute_engine",Xge="gcp_cloud_run",Jge="gcp_kubernetes_engine",Zge="gcp_cloud_functions",eye="gcp_app_engine",pKe=null,hKe=null,SKe=null,EKe=null,vKe=null,mKe=null,TKe=null,AKe=null,gKe=null,yKe=null,RKe=null,OKe=null,bKe=null,CKe=null,PKe=null,MKe=null,IKe=null,NKe=Tl([$ge,Vge,Gge,Bge,kge,jge,Hge,Yge,qge,Kge,Wge,Qge,zge,Xge,Jge,Zge,eye]),tye="ec2",rye="fargate",LKe=null,DKe=null,wKe=Tl([tye,rye]),nye="amd64",iye="arm32",aye="arm64",oye="ia64",sye="ppc32",uye="ppc64",cye="x86",UKe=null,xKe=null,FKe=null,$Ke=null,VKe=null,GKe=null,BKe=null,kKe=Tl([nye,iye,aye,oye,sye,uye,cye]),lye="windows",fye="linux",_ye="darwin",dye="freebsd",pye="netbsd",hye="openbsd",Sye="dragonflybsd",Eye="hpux",vye="aix",mye="solaris",Tye="z_os",jKe=null,HKe=null,YKe=null,qKe=null,KKe=null,WKe=null,QKe=null,zKe=null,XKe=null,JKe=null,ZKe=null,eWe=Tl([lye,fye,_ye,dye,pye,hye,Sye,Eye,vye,mye,Tye]),Aye="cpp",gye="dotnet",yye="erlang",Rye="go",Oye="java",bye="nodejs",Cye="php",Pye="python",Mye="ruby",Iye="webjs",tWe=null,rWe=null,nWe=null,iWe=null,aWe=null,oWe=null,sWe=null,uWe=null,cWe=null,lWe=null,fWe=Tl([Aye,gye,yye,Rye,Oye,bye,Cye,Pye,Mye,Iye]);var Nye=function(e,t,r,n){function i(a){return a instanceof r?a:new r(function(u){u(a)})}return new(r||(r=Promise))(function(a,u){function c(p){try{_(n.next(p))}catch(L){u(L)}}function E(p){try{_(n.throw(p))}catch(L){u(L)}}function _(p){p.done?a(p.value):i(p.value).then(c,E)}_((n=n.apply(e,t||[])).next())})},Lye=function(e,t){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,u;return u={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(u[Symbol.iterator]=function(){return this}),u;function c(_){return function(p){return E([_,p])}}function E(_){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(a=_[0]&2?i.return:_[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,_[1])).done)return a;switch(i=0,a&&(_=[_[0]&2,a.value]),_[0]){case 0:case 1:a=_;break;case 4:return r.label++,{value:_[1],done:!1};case 5:r.label++,i=_[1],_=[0];continue;case 7:_=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(_[0]===6||_[0]===2)){r=0;continue}if(_[0]===3&&(!a||_[1]>a[0]&&_[1]<a[3])){r.label=_[1];break}if(_[0]===6&&r.label<a[1]){r.label=a[1],a=_;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(_);break}a[2]&&r.ops.pop(),r.trys.pop();continue}_=t.call(e,r)}catch(p){_=[6,p],i=0}finally{n=a=0}if(_[0]&5)throw _[1];return{value:_[0]?_[1]:void 0,done:!0}}};function Dye(e,t,r){var n,i;try{i=e()}catch(a){n=a}finally{if(t(n,i),n&&!r)throw n;return i}}function _We(e,t,r){return Nye(this,void 0,void 0,function(){var n,i,a;return Lye(this,function(u){switch(u.label){case 0:return u.trys.push([0,2,3,4]),[4,e()];case 1:return i=u.sent(),[3,4];case 2:return a=u.sent(),n=a,[3,4];case 3:if(t(n,i),n&&!r)throw n;return[2,i];case 4:return[2]}})})}function aj(e){return typeof e=="function"&&typeof e.__original=="function"&&typeof e.__unwrap=="function"&&e.__wrapped===!0}var Al=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),wye=function(){function e(){}return e.prototype.createGauge=function(t,r){return jye},e.prototype.createHistogram=function(t,r){return Hye},e.prototype.createCounter=function(t,r){return kye},e.prototype.createUpDownCounter=function(t,r){return Yye},e.prototype.createObservableGauge=function(t,r){return Kye},e.prototype.createObservableCounter=function(t,r){return qye},e.prototype.createObservableUpDownCounter=function(t,r){return Wye},e.prototype.addBatchObservableCallback=function(t,r){},e.prototype.removeBatchObservableCallback=function(t){},e}(),$T=function(){function e(){}return e}(),Uye=function(e){Al(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.add=function(r,n){},t}($T),xye=function(e){Al(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.add=function(r,n){},t}($T),Fye=function(e){Al(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.record=function(r,n){},t}($T),$ye=function(e){Al(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.record=function(r,n){},t}($T),QM=function(){function e(){}return e.prototype.addCallback=function(t){},e.prototype.removeCallback=function(t){},e}(),Vye=function(e){Al(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(QM),Gye=function(e){Al(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(QM),Bye=function(e){Al(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(QM),oj=new wye,kye=new Uye,jye=new Fye,Hye=new $ye,Yye=new xye,qye=new Vye,Kye=new Gye,Wye=new Bye;function dWe(){return oj}var Qye=function(){function e(){}return e.prototype.getMeter=function(t,r,n){return oj},e}(),zye=new Qye,zM="metrics",Xye=function(){function e(){}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalMeterProvider=function(t){return _h(zM,t,gs.instance())},e.prototype.getMeterProvider=function(){return ll(zM)||zye},e.prototype.getMeter=function(t,r,n){return this.getMeterProvider().getMeter(t,r,n)},e.prototype.disable=function(){dh(zM,gs.instance())},e}(),Jye=Xye.getInstance(),Zye=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof h.g=="object"?h.g:{},VT=Symbol.for("io.opentelemetry.js.api.logs"),Oh=Zye;function eRe(e,t,r){return function(n){return n===e?t:r}}var sj=1,tRe=function(){function e(){}return e.prototype.getLogger=function(t,r,n){return new VB},e}(),uj=new tRe,rRe=function(){function e(){}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalLoggerProvider=function(t){return Oh[VT]?this.getLoggerProvider():(Oh[VT]=eRe(sj,t,uj),t)},e.prototype.getLoggerProvider=function(){var t,r;return(r=(t=Oh[VT])===null||t===void 0?void 0:t.call(Oh,sj))!==null&&r!==void 0?r:uj},e.prototype.getLogger=function(t,r,n){return this.getLoggerProvider().getLogger(t,r,n)},e.prototype.disable=function(){delete Oh[VT]},e}(),nRe=rRe.getInstance(),GT=h(8821),BT=function(){return BT=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},BT.apply(this,arguments)},iRe=function(){function e(t,r,n){this.instrumentationName=t,this.instrumentationVersion=r,this._wrap=GT.wrap,this._unwrap=GT.unwrap,this._massWrap=GT.massWrap,this._massUnwrap=GT.massUnwrap,this._config=BT({enabled:!0},n),this._diag=_r.createComponentLogger({namespace:t}),this._tracer=ta.getTracer(t,r),this._meter=Jye.getMeter(t,r),this._logger=nRe.getLogger(t,r),this._updateMetricInstruments()}return Object.defineProperty(e.prototype,"meter",{get:function(){return this._meter},enumerable:!1,configurable:!0}),e.prototype.setMeterProvider=function(t){this._meter=t.getMeter(this.instrumentationName,this.instrumentationVersion),this._updateMetricInstruments()},Object.defineProperty(e.prototype,"logger",{get:function(){return this._logger},enumerable:!1,configurable:!0}),e.prototype.setLoggerProvider=function(t){this._logger=t.getLogger(this.instrumentationName,this.instrumentationVersion)},e.prototype.getModuleDefinitions=function(){var t,r=(t=this.init())!==null&&t!==void 0?t:[];return Array.isArray(r)?r:[r]},e.prototype._updateMetricInstruments=function(){},e.prototype.getConfig=function(){return this._config},e.prototype.setConfig=function(t){this._config=BT({},t)},e.prototype.setTracerProvider=function(t){this._tracer=t.getTracer(this.instrumentationName,this.instrumentationVersion)},Object.defineProperty(e.prototype,"tracer",{get:function(){return this._tracer},enumerable:!1,configurable:!0}),e.prototype._runSpanCustomizationHook=function(t,r,n,i){if(!!t)try{t(n,i)}catch(a){this._diag.error("Error running span customization hook due to exception in handler",{triggerName:r},a)}},e}(),aRe=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),oRe=function(e){aRe(t,e);function t(r,n,i){var a=e.call(this,r,n,i)||this;return a._config.enabled&&a.enable(),a}return t}(iRe),sRe=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};function cj(e,t){return typeof t=="string"?e===t:!!e.match(t)}function uRe(e,t){var r,n;if(!t)return!1;try{for(var i=sRe(t),a=i.next();!a.done;a=i.next()){var u=a.value;if(cj(e,u))return!0}}catch(c){r={error:c}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return!1}function lo(e){for(var t={},r=e.length,n=0;n<r;n++){var i=e[n];i&&(t[String(i).toUpperCase().replace(/[-.]/g,"_")]=i)}return t}var cRe="aws.lambda.invoked_arn",lRe="db.system",fRe="db.connection_string",_Re="db.user",dRe="db.jdbc.driver_classname",pRe="db.name",hRe="db.statement",SRe="db.operation",ERe="db.mssql.instance_name",vRe="db.cassandra.keyspace",mRe="db.cassandra.page_size",TRe="db.cassandra.consistency_level",ARe="db.cassandra.table",gRe="db.cassandra.idempotence",yRe="db.cassandra.speculative_execution_count",RRe="db.cassandra.coordinator.id",ORe="db.cassandra.coordinator.dc",bRe="db.hbase.namespace",CRe="db.redis.database_index",PRe="db.mongodb.collection",MRe="db.sql.table",IRe="exception.type",NRe="exception.message",LRe="exception.stacktrace",DRe="exception.escaped",wRe="faas.trigger",URe="faas.execution",xRe="faas.document.collection",FRe="faas.document.operation",$Re="faas.document.time",VRe="faas.document.name",GRe="faas.time",BRe="faas.cron",kRe="faas.coldstart",jRe="faas.invoked_name",HRe="faas.invoked_provider",YRe="faas.invoked_region",qRe="net.transport",KRe="net.peer.ip",WRe="net.peer.port",QRe="net.peer.name",zRe="net.host.ip",XRe="net.host.port",JRe="net.host.name",ZRe="net.host.connection.type",eOe="net.host.connection.subtype",tOe="net.host.carrier.name",rOe="net.host.carrier.mcc",nOe="net.host.carrier.mnc",iOe="net.host.carrier.icc",aOe="peer.service",oOe="enduser.id",sOe="enduser.role",uOe="enduser.scope",cOe="thread.id",lOe="thread.name",fOe="code.function",_Oe="code.namespace",dOe="code.filepath",pOe="code.lineno",lj="http.method",fj="http.url",hOe="http.target",_j="http.host",dj="http.scheme",pj="http.status_code",SOe="http.flavor",hj="http.user_agent",EOe="http.request_content_length",vOe="http.request_content_length_uncompressed",Sj="http.response_content_length",Ej="http.response_content_length_uncompressed",mOe="http.server_name",TOe="http.route",AOe="http.client_ip",gOe="aws.dynamodb.table_names",yOe="aws.dynamodb.consumed_capacity",ROe="aws.dynamodb.item_collection_metrics",OOe="aws.dynamodb.provisioned_read_capacity",bOe="aws.dynamodb.provisioned_write_capacity",COe="aws.dynamodb.consistent_read",POe="aws.dynamodb.projection",MOe="aws.dynamodb.limit",IOe="aws.dynamodb.attributes_to_get",NOe="aws.dynamodb.index_name",LOe="aws.dynamodb.select",DOe="aws.dynamodb.global_secondary_indexes",wOe="aws.dynamodb.local_secondary_indexes",UOe="aws.dynamodb.exclusive_start_table",xOe="aws.dynamodb.table_count",FOe="aws.dynamodb.scan_forward",$Oe="aws.dynamodb.segment",VOe="aws.dynamodb.total_segments",GOe="aws.dynamodb.count",BOe="aws.dynamodb.scanned_count",kOe="aws.dynamodb.attribute_definitions",jOe="aws.dynamodb.global_secondary_index_updates",HOe="messaging.system",YOe="messaging.destination",qOe="messaging.destination_kind",KOe="messaging.temp_destination",WOe="messaging.protocol",QOe="messaging.protocol_version",zOe="messaging.url",XOe="messaging.message_id",JOe="messaging.conversation_id",ZOe="messaging.message_payload_size_bytes",ebe="messaging.message_payload_compressed_size_bytes",tbe="messaging.operation",rbe="messaging.consumer_id",nbe="messaging.rabbitmq.routing_key",ibe="messaging.kafka.message_key",abe="messaging.kafka.consumer_group",obe="messaging.kafka.client_id",sbe="messaging.kafka.partition",ube="messaging.kafka.tombstone",cbe="rpc.system",lbe="rpc.service",fbe="rpc.method",_be="rpc.grpc.status_code",dbe="rpc.jsonrpc.version",pbe="rpc.jsonrpc.request_id",hbe="rpc.jsonrpc.error_code",Sbe="rpc.jsonrpc.error_message",Ebe="message.type",vbe="message.id",mbe="message.compressed_size",Tbe="message.uncompressed_size",pWe=null,hWe=null,SWe=null,EWe=null,vWe=null,mWe=null,TWe=null,AWe=null,gWe=null,yWe=null,RWe=null,OWe=null,bWe=null,CWe=null,PWe=null,MWe=null,IWe=null,NWe=null,LWe=null,DWe=null,wWe=null,UWe=null,xWe=null,FWe=null,$We=null,VWe=null,GWe=null,BWe=null,kWe=null,jWe=null,HWe=null,YWe=null,qWe=null,KWe=null,WWe=null,QWe=null,zWe=null,XWe=null,JWe=null,ZWe=null,eQe=null,tQe=null,rQe=null,nQe=null,iQe=null,aQe=null,oQe=null,sQe=null,uQe=null,cQe=null,lQe=null,fQe=null,_Qe=null,dQe=null,pQe=null,hQe=null,SQe=null,EQe=null,vQe=null,mQe=null,Abe=lj,gbe=fj,TQe=null,ybe=_j,Rbe=dj,Obe=pj,AQe=null,bbe=hj,gQe=null,yQe=null,Cbe=Sj,Pbe=Ej,RQe=null,OQe=null,bQe=null,CQe=null,PQe=null,MQe=null,IQe=null,NQe=null,LQe=null,DQe=null,wQe=null,UQe=null,xQe=null,FQe=null,$Qe=null,VQe=null,GQe=null,BQe=null,kQe=null,jQe=null,HQe=null,YQe=null,qQe=null,KQe=null,WQe=null,QQe=null,zQe=null,XQe=null,JQe=null,ZQe=null,e3e=null,t3e=null,r3e=null,n3e=null,i3e=null,a3e=null,o3e=null,s3e=null,u3e=null,c3e=null,l3e=null,f3e=null,_3e=null,d3e=null,p3e=null,h3e=null,S3e=null,E3e=null,v3e=null,m3e=null,T3e=null,A3e=null,g3e=null,y3e=null,R3e=null,O3e=null,b3e=lo([cRe,lRe,fRe,_Re,dRe,pRe,hRe,SRe,ERe,vRe,mRe,TRe,ARe,gRe,yRe,RRe,ORe,bRe,CRe,PRe,MRe,IRe,NRe,LRe,DRe,wRe,URe,xRe,FRe,$Re,VRe,GRe,BRe,kRe,jRe,HRe,YRe,qRe,KRe,WRe,QRe,zRe,XRe,JRe,ZRe,eOe,tOe,rOe,nOe,iOe,aOe,oOe,sOe,uOe,cOe,lOe,fOe,_Oe,dOe,pOe,lj,fj,hOe,_j,dj,pj,SOe,hj,EOe,vOe,Sj,Ej,mOe,TOe,AOe,gOe,yOe,ROe,OOe,bOe,COe,POe,MOe,IOe,NOe,LOe,DOe,wOe,UOe,xOe,FOe,$Oe,VOe,GOe,BOe,kOe,jOe,HOe,YOe,qOe,KOe,WOe,QOe,zOe,XOe,JOe,ZOe,ebe,tbe,rbe,nbe,ibe,abe,obe,sbe,ube,cbe,lbe,fbe,_be,dbe,pbe,hbe,Sbe,Ebe,vbe,mbe,Tbe]),Mbe="other_sql",Ibe="mssql",Nbe="mysql",Lbe="oracle",Dbe="db2",wbe="postgresql",Ube="redshift",xbe="hive",Fbe="cloudscape",$be="hsqldb",Vbe="progress",Gbe="maxdb",Bbe="hanadb",kbe="ingres",jbe="firstsql",Hbe="edb",Ybe="cache",qbe="adabas",Kbe="firebird",Wbe="derby",Qbe="filemaker",zbe="informix",Xbe="instantdb",Jbe="interbase",Zbe="mariadb",eCe="netezza",tCe="pervasive",rCe="pointbase",nCe="sqlite",iCe="sybase",aCe="teradata",oCe="vertica",sCe="h2",uCe="coldfusion",cCe="cassandra",lCe="hbase",fCe="mongodb",_Ce="redis",dCe="couchbase",pCe="couchdb",hCe="cosmosdb",SCe="dynamodb",ECe="neo4j",vCe="geode",mCe="elasticsearch",TCe="memcached",ACe="cockroachdb",C3e=null,P3e=null,M3e=null,I3e=null,N3e=null,L3e=null,D3e=null,w3e=null,U3e=null,x3e=null,F3e=null,$3e=null,V3e=null,G3e=null,B3e=null,k3e=null,j3e=null,H3e=null,Y3e=null,q3e=null,K3e=null,W3e=null,Q3e=null,z3e=null,X3e=null,J3e=null,Z3e=null,eze=null,tze=null,rze=null,nze=null,ize=null,aze=null,oze=null,sze=null,uze=null,cze=null,lze=null,fze=null,_ze=null,dze=null,pze=null,hze=null,Sze=null,Eze=null,vze=null,mze=null,Tze=lo([Mbe,Ibe,Nbe,Lbe,Dbe,wbe,Ube,xbe,Fbe,$be,Vbe,Gbe,Bbe,kbe,jbe,Hbe,Ybe,qbe,Kbe,Wbe,Qbe,zbe,Xbe,Jbe,Zbe,eCe,tCe,rCe,nCe,iCe,aCe,oCe,sCe,uCe,cCe,lCe,fCe,_Ce,dCe,pCe,hCe,SCe,ECe,vCe,mCe,TCe,ACe]),gCe="all",yCe="each_quorum",RCe="quorum",OCe="local_quorum",bCe="one",CCe="two",PCe="three",MCe="local_one",ICe="any",NCe="serial",LCe="local_serial",Aze=null,gze=null,yze=null,Rze=null,Oze=null,bze=null,Cze=null,Pze=null,Mze=null,Ize=null,Nze=null,Lze=lo([gCe,yCe,RCe,OCe,bCe,CCe,PCe,MCe,ICe,NCe,LCe]),DCe="datasource",wCe="http",UCe="pubsub",xCe="timer",FCe="other",Dze=null,wze=null,Uze=null,xze=null,Fze=null,$ze=lo([DCe,wCe,UCe,xCe,FCe]),$Ce="insert",VCe="edit",GCe="delete",Vze=null,Gze=null,Bze=null,kze=lo([$Ce,VCe,GCe]),BCe="alibaba_cloud",kCe="aws",jCe="azure",HCe="gcp",jze=null,Hze=null,Yze=null,qze=null,Kze=lo([BCe,kCe,jCe,HCe]),YCe="ip_tcp",qCe="ip_udp",KCe="ip",WCe="unix",QCe="pipe",zCe="inproc",XCe="other",Wze=null,Qze=null,zze=null,Xze=null,Jze=null,Zze=null,e4e=null,t4e=lo([YCe,qCe,KCe,WCe,QCe,zCe,XCe]),JCe="wifi",ZCe="wired",ePe="cell",tPe="unavailable",rPe="unknown",r4e=null,n4e=null,i4e=null,a4e=null,o4e=null,s4e=lo([JCe,ZCe,ePe,tPe,rPe]),nPe="gprs",iPe="edge",aPe="umts",oPe="cdma",sPe="evdo_0",uPe="evdo_a",cPe="cdma2000_1xrtt",lPe="hsdpa",fPe="hsupa",_Pe="hspa",dPe="iden",pPe="evdo_b",hPe="lte",SPe="ehrpd",EPe="hspap",vPe="gsm",mPe="td_scdma",TPe="iwlan",APe="nr",gPe="nrnsa",yPe="lte_ca",u4e=null,c4e=null,l4e=null,f4e=null,_4e=null,d4e=null,p4e=null,h4e=null,S4e=null,E4e=null,v4e=null,m4e=null,T4e=null,A4e=null,g4e=null,y4e=null,R4e=null,O4e=null,b4e=null,C4e=null,P4e=null,M4e=lo([nPe,iPe,aPe,oPe,sPe,uPe,cPe,lPe,fPe,_Pe,dPe,pPe,hPe,SPe,EPe,vPe,mPe,TPe,APe,gPe,yPe]),RPe="1.0",OPe="1.1",bPe="2.0",CPe="SPDY",PPe="QUIC",I4e=null,N4e=null,L4e=null,D4e=null,w4e=null,U4e={HTTP_1_0:RPe,HTTP_1_1:OPe,HTTP_2_0:bPe,SPDY:CPe,QUIC:PPe},MPe="queue",IPe="topic",x4e=null,F4e=null,$4e=lo([MPe,IPe]),NPe="receive",LPe="process",V4e=null,G4e=null,B4e=lo([NPe,LPe]),DPe=0,wPe=1,UPe=2,xPe=3,FPe=4,$Pe=5,VPe=6,GPe=7,BPe=8,kPe=9,jPe=10,HPe=11,YPe=12,qPe=13,KPe=14,WPe=15,QPe=16,k4e=null,j4e=null,H4e=null,Y4e=null,q4e=null,K4e=null,W4e=null,Q4e=null,z4e=null,X4e=null,J4e=null,Z4e=null,e6e=null,t6e=null,r6e=null,n6e=null,i6e=null,a6e={OK:DPe,CANCELLED:wPe,UNKNOWN:UPe,INVALID_ARGUMENT:xPe,DEADLINE_EXCEEDED:FPe,NOT_FOUND:$Pe,ALREADY_EXISTS:VPe,PERMISSION_DENIED:GPe,RESOURCE_EXHAUSTED:BPe,FAILED_PRECONDITION:kPe,ABORTED:jPe,OUT_OF_RANGE:HPe,UNIMPLEMENTED:YPe,INTERNAL:qPe,UNAVAILABLE:KPe,DATA_LOSS:WPe,UNAUTHENTICATED:QPe},zPe="SENT",XPe="RECEIVED",o6e=null,s6e=null,u6e=lo([zPe,XPe]),$n;(function(e){e.CONNECT_END="connectEnd",e.CONNECT_START="connectStart",e.DECODED_BODY_SIZE="decodedBodySize",e.DOM_COMPLETE="domComplete",e.DOM_CONTENT_LOADED_EVENT_END="domContentLoadedEventEnd",e.DOM_CONTENT_LOADED_EVENT_START="domContentLoadedEventStart",e.DOM_INTERACTIVE="domInteractive",e.DOMAIN_LOOKUP_END="domainLookupEnd",e.DOMAIN_LOOKUP_START="domainLookupStart",e.ENCODED_BODY_SIZE="encodedBodySize",e.FETCH_START="fetchStart",e.LOAD_EVENT_END="loadEventEnd",e.LOAD_EVENT_START="loadEventStart",e.NAVIGATION_START="navigationStart",e.REDIRECT_END="redirectEnd",e.REDIRECT_START="redirectStart",e.REQUEST_START="requestStart",e.RESPONSE_END="responseEnd",e.RESPONSE_START="responseStart",e.SECURE_CONNECTION_START="secureConnectionStart",e.UNLOAD_EVENT_END="unloadEventEnd",e.UNLOAD_EVENT_START="unloadEventStart"})($n||($n={}));var XM;function JPe(){return XM||(XM=document.createElement("a")),XM}function JM(e,t){return t in e}function tu(e,t,r,n){var i=void 0,a=void 0;JM(r,t)&&typeof r[t]=="number"&&(i=r[t]);var u=n||$n.FETCH_START;if(JM(r,u)&&typeof r[u]=="number"&&(a=r[u]),i!==void 0&&a!==void 0&&i>=a)return e.addEvent(t,i),e}function vj(e,t){tu(e,$n.FETCH_START,t),tu(e,$n.DOMAIN_LOOKUP_START,t),tu(e,$n.DOMAIN_LOOKUP_END,t),tu(e,$n.CONNECT_START,t),JM(t,"name")&&t.name.startsWith("https:")&&tu(e,$n.SECURE_CONNECTION_START,t),tu(e,$n.CONNECT_END,t),tu(e,$n.REQUEST_START,t),tu(e,$n.RESPONSE_START,t),tu(e,$n.RESPONSE_END,t);var r=t[$n.ENCODED_BODY_SIZE];r!==void 0&&e.setAttribute(Cbe,r);var n=t[$n.DECODED_BODY_SIZE];n!==void 0&&r!==n&&e.setAttribute(Pbe,n)}function ZPe(e){return e.slice().sort(function(t,r){var n=t[$n.FETCH_START],i=r[$n.FETCH_START];return n>i?1:n<i?-1:0})}function mj(){return typeof location<"u"?location.origin:void 0}function eMe(e,t,r,n,i,a){i===void 0&&(i=new WeakSet);var u=Zu(e);e=u.toString();var c=rMe(e,t,r,n,i,a);if(c.length===0)return{mainRequest:void 0};if(c.length===1)return{mainRequest:c[0]};var E=ZPe(c);if(u.origin!==mj()&&E.length>1){var _=E[0],p=tMe(E,_[$n.RESPONSE_END],r),L=_[$n.RESPONSE_END],W=p[$n.FETCH_START];return W<L&&(p=_,_=void 0),{corsPreFlightRequest:_,mainRequest:p}}else return{mainRequest:c[0]}}function tMe(e,t,r){for(var n=Xu(r),i=Xu(El(t)),a=e[1],u,c=e.length,E=1;E<c;E++){var _=e[E],p=Xu(El(_[$n.FETCH_START])),L=Xu(El(_[$n.RESPONSE_END])),W=n-L;p>=i&&(!u||W<u)&&(u=W,a=_)}return a}function rMe(e,t,r,n,i,a){var u=Xu(t),c=Xu(r),E=n.filter(function(_){var p=Xu(El(_[$n.FETCH_START])),L=Xu(El(_[$n.RESPONSE_END]));return _.initiatorType.toLowerCase()===(a||"xmlhttprequest")&&_.name===e&&p>=u&&L<=c});return E.length>0&&(E=E.filter(function(_){return!i.has(_)})),E}function Zu(e){if(typeof URL=="function")return new URL(e,typeof document<"u"?document.baseURI:typeof location<"u"?location.href:void 0);var t=JPe();return t.href=e,t}function c6e(e){var t=Zu(e);return t.href}function nMe(e,t){if(e.nodeType===Node.DOCUMENT_NODE)return"/";var r=aMe(e,t);if(t&&r.indexOf("@id")>0)return r;var n="";return e.parentNode&&(n+=nMe(e.parentNode,!1)),n+=r,n}function iMe(e){if(!e.parentNode)return 0;var t=[e.nodeType];e.nodeType===Node.CDATA_SECTION_NODE&&t.push(Node.TEXT_NODE);var r=Array.from(e.parentNode.childNodes);return r=r.filter(function(n){var i=n.localName;return t.indexOf(n.nodeType)>=0&&i===e.localName}),r.length>=1?r.indexOf(e)+1:0}function aMe(e,t){var r=e.nodeType,n=iMe(e),i="";if(r===Node.ELEMENT_NODE){var a=e.getAttribute("id");if(t&&a)return'//*[@id="'+a+'"]';i=e.localName}else if(r===Node.TEXT_NODE||r===Node.CDATA_SECTION_NODE)i="text()";else if(r===Node.COMMENT_NODE)i="comment()";else return"";return i&&n>1?"/"+i+"["+n+"]":"/"+i}function oMe(e,t){var r=t||[];(typeof r=="string"||r instanceof RegExp)&&(r=[r]);var n=Zu(e);return n.origin===mj()?!0:r.some(function(i){return cj(e,i)})}var ru;(function(e){e.METHOD_OPEN="open",e.METHOD_SEND="send",e.EVENT_ABORT="abort",e.EVENT_ERROR="error",e.EVENT_LOAD="loaded",e.EVENT_TIMEOUT="timeout"})(ru||(ru={}));var Tj="0.52.1",ZM;(function(e){e.HTTP_STATUS_TEXT="http.status_text"})(ZM||(ZM={}));var sMe=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),uMe=300,cMe=function(e){sMe(t,e);function t(r){r===void 0&&(r={});var n=e.call(this,"@opentelemetry/instrumentation-xml-http-request",Tj,r)||this;return n.component="xml-http-request",n.version=Tj,n.moduleName=n.component,n._tasksCount=0,n._xhrMem=new WeakMap,n._usedResources=new WeakSet,n}return t.prototype.init=function(){},t.prototype._addHeaders=function(r,n){var i=Zu(n).href;if(!oMe(i,this.getConfig().propagateTraceHeaderCorsUrls)){var a={};R_.inject(_a.active(),a),Object.keys(a).length>0&&this._diag.debug("headers inject skipped due to CORS policy");return}var u={};R_.inject(_a.active(),u),Object.keys(u).forEach(function(c){r.setRequestHeader(c,String(u[c]))})},t.prototype._addChildSpan=function(r,n){var i=this;_a.with(ta.setSpan(_a.active(),r),function(){var a=i.tracer.startSpan("CORS Preflight",{startTime:n[$n.FETCH_START]});i.getConfig().ignoreNetworkEvents||vj(a,n),a.end(n[$n.RESPONSE_END])})},t.prototype._addFinalSpanAttributes=function(r,n,i){if(typeof i=="string"){var a=Zu(i);n.status!==void 0&&r.setAttribute(Obe,n.status),n.statusText!==void 0&&r.setAttribute(ZM.HTTP_STATUS_TEXT,n.statusText),r.setAttribute(ybe,a.host),r.setAttribute(Rbe,a.protocol.replace(":","")),r.setAttribute(bbe,navigator.userAgent)}},t.prototype._applyAttributesAfterXHR=function(r,n){var i=this,a=this.getConfig().applyCustomAttributesOnSpan;typeof a=="function"&&Dye(function(){return a(r,n)},function(u){!u||i._diag.error("applyCustomAttributesOnSpan",u)},!0)},t.prototype._addResourceObserver=function(r,n){var i=this._xhrMem.get(r);!i||typeof PerformanceObserver!="function"||typeof PerformanceResourceTiming!="function"||(i.createdResources={observer:new PerformanceObserver(function(a){var u=a.getEntries(),c=Zu(n);u.forEach(function(E){E.initiatorType==="xmlhttprequest"&&E.name===c.href&&i.createdResources&&i.createdResources.entries.push(E)})}),entries:[]},i.createdResources.observer.observe({entryTypes:["resource"]}))},t.prototype._clearResources=function(){this._tasksCount===0&&this.getConfig().clearTimingResources&&(gh.clearResourceTimings(),this._xhrMem=new WeakMap,this._usedResources=new WeakSet)},t.prototype._findResourceAndAddNetworkEvents=function(r,n,i,a,u){if(!(!i||!a||!u||!r.createdResources)){var c=r.createdResources.entries;(!c||!c.length)&&(c=gh.getEntriesByType("resource"));var E=eMe(Zu(i).href,a,u,c,this._usedResources);if(E.mainRequest){var _=E.mainRequest;this._markResourceAsUsed(_);var p=E.corsPreFlightRequest;p&&(this._addChildSpan(n,p),this._markResourceAsUsed(p)),this.getConfig().ignoreNetworkEvents||vj(n,_)}}},t.prototype._cleanPreviousSpanInformation=function(r){var n=this._xhrMem.get(r);if(n){var i=n.callbackToRemoveEvents;i&&i(),this._xhrMem.delete(r)}},t.prototype._createSpan=function(r,n,i){var a;if(uRe(n,this.getConfig().ignoreUrls)){this._diag.debug("ignoring span as url matches ignored url");return}var u=i.toUpperCase(),c=this.tracer.startSpan(u,{kind:NT.CLIENT,attributes:(a={},a[Abe]=i,a[gbe]=Zu(n).toString(),a)});return c.addEvent(ru.METHOD_OPEN),this._cleanPreviousSpanInformation(r),this._xhrMem.set(r,{span:c,spanUrl:n}),c},t.prototype._markResourceAsUsed=function(r){this._usedResources.add(r)},t.prototype._patchOpen=function(){var r=this;return function(n){var i=r;return function(){for(var u=[],c=0;c<arguments.length;c++)u[c]=arguments[c];var E=u[0],_=u[1];return i._createSpan(this,_,E),n.apply(this,u)}}},t.prototype._patchSend=function(){var r=this;function n(p,L,W,ve){var me=L.callbackToRemoveEvents;typeof me=="function"&&me();var Oe=L.span,He=L.spanUrl,qe=L.sendStartTime;Oe&&(r._findResourceAndAddNetworkEvents(L,Oe,He,qe,W),Oe.addEvent(p,ve),r._addFinalSpanAttributes(Oe,L,He),Oe.end(ve),r._tasksCount--),r._clearResources()}function i(p,L){var W=r._xhrMem.get(L);if(!!W){W.status=L.status,W.statusText=L.statusText,r._xhrMem.delete(L),W.span&&r._applyAttributesAfterXHR(W.span,L);var ve=RM(),me=Date.now();setTimeout(function(){n(p,W,ve,me)},uMe)}}function a(){i(ru.EVENT_ERROR,this)}function u(){i(ru.EVENT_ABORT,this)}function c(){i(ru.EVENT_TIMEOUT,this)}function E(){this.status<299?i(ru.EVENT_LOAD,this):i(ru.EVENT_ERROR,this)}function _(p){p.removeEventListener("abort",u),p.removeEventListener("error",a),p.removeEventListener("load",E),p.removeEventListener("timeout",c);var L=r._xhrMem.get(p);L&&(L.callbackToRemoveEvents=void 0)}return function(p){return function(){for(var W=this,ve=[],me=0;me<arguments.length;me++)ve[me]=arguments[me];var Oe=r._xhrMem.get(this);if(!Oe)return p.apply(this,ve);var He=Oe.span,qe=Oe.spanUrl;return He&&qe&&_a.with(ta.setSpan(_a.active(),He),function(){r._tasksCount++,Oe.sendStartTime=RM(),He.addEvent(ru.METHOD_SEND),W.addEventListener("abort",u),W.addEventListener("error",a),W.addEventListener("load",E),W.addEventListener("timeout",c),Oe.callbackToRemoveEvents=function(){_(W),Oe.createdResources&&Oe.createdResources.observer.disconnect()},r._addHeaders(W,qe),r._addResourceObserver(W,qe)}),p.apply(this,ve)}}},t.prototype.enable=function(){this._diag.debug("applying patch to",this.moduleName,this.version),aj(XMLHttpRequest.prototype.open)&&(this._unwrap(XMLHttpRequest.prototype,"open"),this._diag.debug("removing previous patch from method open")),aj(XMLHttpRequest.prototype.send)&&(this._unwrap(XMLHttpRequest.prototype,"send"),this._diag.debug("removing previous patch from method send")),this._wrap(XMLHttpRequest.prototype,"open",this._patchOpen()),this._wrap(XMLHttpRequest.prototype,"send",this._patchSend())},t.prototype.disable=function(){this._diag.debug("removing patch from",this.moduleName,this.version),this._unwrap(XMLHttpRequest.prototype,"open"),this._unwrap(XMLHttpRequest.prototype,"send"),this._tasksCount=0,this._xhrMem=new WeakMap,this._usedResources=new WeakSet},t}(oRe);const lMe="https?://api-gateway.[a-zA-Z]+.icanbwell.com",Aj=new RegExp(`^(?!${lMe})`);function l6e(e){return Aj.test(e)}function fMe(e){return D9({node:()=>null,browser:()=>new cMe({ignoreUrls:[Aj],propagateTraceHeaderCorsUrls:[e.graphQL.apiUrl,e.graphQL.unauthApiUrl]})})}var Os=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},eI=function(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r},I_,N_,bh,kT,gj,yj,Rj,Oj;class _Me{constructor(t){I_.add(this),N_.set(this,void 0),bh.set(this,void 0),kT.set(this,void 0),eI(this,N_,Os(this,I_,"m",gj).call(this,t),"f"),eI(this,bh,Os(this,I_,"m",yj).call(this),"f"),eI(this,kT,Os(this,I_,"m",Rj).call(this,t),"f"),this.fetchInstrumentation=Os(this,I_,"m",Oj).call(this,t)}loggerProvider(){return Os(this,kT,"f")}resource(){return Os(this,N_,"f")}tracerProvider(){return Os(this,bh,"f")}}N_=new WeakMap,bh=new WeakMap,kT=new WeakMap,I_=new WeakSet,gj=function(t){var r,n,i,a;return mT.default().merge(new mT({[Ige]:"bwell-sdk-typescript",[Lge]:B9(),[Dge]:"typescript",[Nge]:"com.bwell",[Mge]:t.context.env,"client.key":t.context.clientKey,"user.id":(n=(r=t.context.user)===null||r===void 0?void 0:r.clientFhirPersonId)!==null&&n!==void 0?n:"","user.bwell-person-id":(a=(i=t.context.user)===null||i===void 0?void 0:i.bwellFhirPersonId)!==null&&a!==void 0?a:""}))},yj=function(){const t=new oAe({resource:Os(this,N_,"f")});return t.register({propagator:new tie}),t},Rj=function(t){const r=new cpe({resource:Os(this,N_,"f")}),n=new jae({url:`${t.telemetry.collectorUrl}/otlp-http/v1/logs`}),i=new mpe(n);return r.addLogRecordProcessor(i),r},Oj=function(t){const r=fMe(t);return r===null?null:(r.setTracerProvider(Os(this,bh,"f")),r)};var gl=function(e,t,r,n){function i(a){return a instanceof r?a:new r(function(u){u(a)})}return new(r||(r=Promise))(function(a,u){function c(p){try{_(n.next(p))}catch(L){u(L)}}function E(p){try{_(n.throw(p))}catch(L){u(L)}}function _(p){p.done?a(p.value):i(p.value).then(c,E)}_((n=n.apply(e,t||[])).next())})},tI=function(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r},qi=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},L_,ec,jT,Ch,jo,rI,bj,Cj,nI;class Pj{constructor(t,r,n,i){L_.add(this),jT.set(this,void 0),Ch.set(this,void 0),jo.set(this,void 0),tI(this,jT,r,"f"),tI(this,Ch,n.getLogger("TokenManager"),"f"),tI(this,jo,i,"f")}static initialize(t,r){return gl(this,arguments,void 0,function*(n,i,a=new ji,u=new aG){const c=qi(ec,ec,"m",rI).call(ec,n.accessToken);if(c.failure())return c.intoFailure();const E=new ec(Object.assign(Object.assign({},n),{expiration:c.data()}),i,a,u);try{yield Promise.all([u.set("idToken",n.idToken),u.set("clientKey",n.clientKey),u.set("accessToken",n.accessToken),u.set("refreshToken",n.refreshToken),u.set("expiration",c.data().toISOString())])}catch{return Kt.failure(new e_("Failed to set tokens in token storage"))}return Kt.success(E)})}getAccessToken(){return gl(this,void 0,void 0,function*(){if(yield qi(this,L_,"m",Cj).call(this)){const n=yield qi(this,L_,"m",nI).call(this);if(n.failure())return n.intoFailure()}const r=yield qi(this,jo,"f").get("accessToken");return ka(r)?Kt.failure(new e_("accessToken not found in token storage")):Kt.success(r)})}getIdToken(){return gl(this,void 0,void 0,function*(){return yield qi(this,jo,"f").get("idToken")})}refreshAccessToken(){return gl(this,void 0,void 0,function*(){return qi(this,L_,"m",nI).call(this)})}}ec=Pj,jT=new WeakMap,Ch=new WeakMap,jo=new WeakMap,L_=new WeakSet,rI=function(t){try{const r=x9(t);return Kt.success(new Date(r))}catch(r){if(!Bi.isBwellError(r))throw r;return Kt.failure(r)}},bj=function(){return gl(this,void 0,void 0,function*(){const t=yield qi(this,jo,"f").get("expiration");if(ka(t))throw new Error("expiration not found in token storage");return new Date(t)})},Cj=function(){return gl(this,void 0,void 0,function*(){const r=(yield qi(this,L_,"m",bj).call(this)).getTime(),n=Date.now();return r<n})},nI=function(){return gl(this,void 0,void 0,function*(){qi(this,Ch,"f").verbose("refreshing access token...");const[t,r]=yield Promise.all([qi(this,jo,"f").get("refreshToken"),qi(this,jo,"f").get("clientKey")]);if(ka(t)||ka(r))return Kt.failure(new e_("refreshToken or clientKey not found in token storage"));const n=yield qi(this,jT,"f").refreshAccessToken({refreshToken:t,clientKey:r});if(qi(this,Ch,"f").verbose("refreshing access token complete"),n.failure())return n.intoFailure();const i=n.data();yield qi(this,jo,"f").set("accessToken",i.accessToken),yield qi(this,jo,"f").set("idToken",i.idToken);const a=qi(ec,ec,"m",rI).call(ec,i.accessToken);return a.failure()?a.intoFailure():(yield qi(this,jo,"f").set("expiration",a.data().toISOString()),Kt.success(null))})};var Ph=function(e,t,r,n){function i(a){return a instanceof r?a:new r(function(u){u(a)})}return new(r||(r=Promise))(function(a,u){function c(p){try{_(n.next(p))}catch(L){u(L)}}function E(p){try{_(n.throw(p))}catch(L){u(L)}}function _(p){p.done?a(p.value):i(p.value).then(c,E)}_((n=n.apply(e,t||[])).next())})},Ha=function(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r},qt=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},li,D_,Ya,Mh,iI,aI,oI,sI,bs,Ih,yl,Rl,HT,w_,uI,Ho,cI,lI,fI,Mj;class dMe{constructor(t){li.add(this),D_.set(this,void 0),Ya.set(this,void 0),Mh.set(this,void 0),iI.set(this,new tee),aI.set(this,new zre),oI.set(this,new Jre),sI.set(this,new ane),bs.set(this,void 0),Ih.set(this,void 0),yl.set(this,void 0),Rl.set(this,void 0),HT.set(this,void 0),w_.set(this,void 0),Ha(this,D_,t,"f"),Ha(this,Ya,Vm.initialize(qt(this,D_,"f")).data(),"f"),Ha(this,Mh,qt(this,li,"m",fI).call(this),"f"),Ha(this,bs,qt(this,li,"m",lI).call(this),"f"),Ha(this,yl,qt(this,bs,"f").getLogger("BWellSDK"),"f"),Ha(this,Rl,qt(this,oI,"f").createIdentityManager(qt(this,Ya,"f"),qt(this,bs,"f")),"f"),Ha(this,HT,new nee(qt(this,Rl,"f")),"f")}initialize(){return Ph(this,void 0,void 0,function*(){qt(this,yl,"f").verbose("initializing SDKConfig...");const t=yield qt(this,HT,"f").initialize(qt(this,D_,"f"));return t.failure()?t.intoFailure():(qt(this,yl,"f").verbose("SDK Config initialized successfully"),Ha(this,Ya,t.data(),"f"),qt(this,li,"m",cI).call(this),Kt.success(null))})}authenticate(t){return Ph(this,void 0,void 0,function*(){const n=yield qt(this,sI,"f").createAuthStrategy(qt(this,Ya,"f"),qt(this,Rl,"f"),t,qt(this,bs,"f")).authenticate(t);if(n.failure())return n.intoFailure();const i=n.data();return qt(this,li,"m",uI).call(this,i)})}setAuthTokens(t){return Ph(this,void 0,void 0,function*(){const r=yield qt(this,li,"m",uI).call(this,t);if(r.failure())return r.intoFailure();if(qt(this,w_,"f")===void 0)throw new Error("TokenManager not set");const n=yield qt(this,w_,"f").refreshAccessToken();return n.failure()?n.intoFailure():Kt.success(null)})}createGuestAccessToken(){return Ph(this,void 0,void 0,function*(){return qt(this,Rl,"f").createGuestAccessToken({clientKey:qt(this,Ya,"f").context.clientKey})})}get health(){return qt(this,li,"m",Ho).call(this).health}get healthSpace(){return qt(this,li,"m",Ho).call(this).healthSpace}get user(){return qt(this,li,"m",Ho).call(this).user}get connection(){return qt(this,li,"m",Ho).call(this).connection}get activity(){return qt(this,li,"m",Ho).call(this).activity}get device(){return qt(this,li,"m",Ho).call(this).device}get event(){return qt(this,li,"m",Ho).call(this).event}get search(){return qt(this,li,"m",Ho).call(this).search}get language(){return qt(this,li,"m",Ho).call(this).language}get questionnaire(){return qt(this,li,"m",Ho).call(this).questionnaire}}D_=new WeakMap,Ya=new WeakMap,Mh=new WeakMap,iI=new WeakMap,aI=new WeakMap,oI=new WeakMap,sI=new WeakMap,bs=new WeakMap,Ih=new WeakMap,yl=new WeakMap,Rl=new WeakMap,HT=new WeakMap,w_=new WeakMap,li=new WeakSet,uI=function(t){return Ph(this,void 0,void 0,function*(){try{const i=V9(t.idToken);Fn(i)&&qt(this,Ya,"f").setContextUser(i)}catch(i){if(Bi.isBwellError(i))return Kt.failure(i);throw i}const r=Object.assign(Object.assign({},t),{clientKey:qt(this,Ya,"f").context.clientKey}),n=yield Pj.initialize(r,qt(this,Rl,"f"),qt(this,bs,"f"),qt(this,D_,"f").tokenStorage);return n.failure()?n.intoFailure():(Ha(this,w_,n.data(),"f"),qt(this,li,"m",cI).call(this),Ha(this,Ih,qt(this,li,"m",Mj).call(this,qt(this,w_,"f")),"f"),Kt.success(null))})},Ho=function(){if(qt(this,Ih,"f")===void 0)throw new Error("Unintialized");return qt(this,Ih,"f")},cI=function(){qt(this,yl,"f").verbose("reinitializing SDK dependencies"),Ha(this,Mh,qt(this,li,"m",fI).call(this),"f"),Ha(this,bs,qt(this,li,"m",lI).call(this),"f"),Ha(this,yl,qt(this,bs,"f").getLogger("BwellSDK"),"f")},lI=function(){return qt(this,iI,"f").createLogProvider(qt(this,Ya,"f"),qt(this,Mh,"f"))},fI=function(){if(!!qt(this,Ya,"f").telemetry.enabled)return new _Me(qt(this,Ya,"f"))},Mj=function(t){return qt(this,aI,"f").createApiProvider(qt(this,Ya,"f"),t,qt(this,bs,"f"))};const Ij="orchestrator:bwell-sdk";var YT;(function(e){e.one="1.0.0"})(YT||(YT={}));const pMe={id:Ij,dependencies:{featureServices:{[Wn]:vi.one,[Tm]:Kp.one,[ks]:Mu.one}},create:({featureServices:e})=>{const t=e[Wn],r=e[Tm],n=e[ks],{key:i}=t.getClientContext(),a=new dMe({clientKey:i});return t.getStore().subscribe(()=>{var u;if((u=t.getUser().tokenData)===null||u===void 0?void 0:u.idToken)try{a.language.setLanguage(r.resolvedLanguage),r.onChangeLanguage(_=>{const p=a.language.getLanguage();_!==p&&a.language.setLanguage(_)})}catch(_){n.error(_,"embeddable-core: Error occurred when switching language in SDK")}}),{[YT.one]:()=>({featureService:a})}}},_I={apiClient:d,theme:H,analytics:V,auth:A,logging:y,state:T,navigation:m,featureFlags:D,translation:P,identityUtils:g,nativeBridge:$,globalEventEmitter:G,rebootController:x,bwellSdk:Z},f6e=Object.keys(_I).reduce((e,t)=>{const{id:r,version:n}=_I[t];return Object.assign(Object.assign({},e),{[t]:{id:r,version:n}})},{});var er=_I,hMe=h(8561),SMe=h(295),Nj=h.n(SMe),EMe=h(2424),Lj=h.n(EMe);class vMe{constructor(t){this.providedExternals=t;for(const[r,n]of Object.entries(t))if(!Lj()(n))throw new Error(`The provided version ${JSON.stringify(n)} for the external ${JSON.stringify(r)} is invalid.`)}validate(t){for(const[r,n]of Object.entries(t)){const i=this.providedExternals[r];if(!i)throw new Error(`The external dependency ${JSON.stringify(r)} is not provided.`);if(!Nj()(i,n))throw new Error(`The external dependency ${JSON.stringify(r)} in the required version range ${JSON.stringify(n)} is not satisfied. The provided version is ${JSON.stringify(i)}.`)}}}class mMe{constructor(t,r,n){this.promise=t,this.value=r,this.error=n,t.then(i=>this.value=i).catch(i=>this.error=i)}}function TMe(e,t,r){let n=`The Feature App module at the url ${JSON.stringify(e)} ${t?`with the module type ${JSON.stringify(t)}`:"with no specific module type"} is invalid. A Feature App module must have a Feature App definition as default export. A Feature App definition is an object with at least a \`create\` method.`;return r&&r.length>1&&!t&&(n+=" Hint: The provided module loader expects an optional second parameter `moduleType`. It might need to be provided for this Feature App."),n}function AMe(e){return typeof e!="object"||!e?!1:typeof e.create=="function"}function gMe(e){return typeof e!="object"||!e?!1:AMe(e.default)}class yMe{constructor(t,r={}){this.featureServiceRegistry=t,this.options=r,this.asyncFeatureAppDefinitions=new Map,this.featureAppDefinitionsWithRegisteredOwnFeatureServices=new WeakSet,this.featureAppRetainers=new Map,this.logger=r.logger||console}getAsyncFeatureAppDefinition(t,r){const n=`${t}${r}`;let i=this.asyncFeatureAppDefinitions.get(n);return i||(i=this.createAsyncFeatureAppDefinition(t,r),this.asyncFeatureAppDefinitions.set(n,i)),i}createFeatureAppScope(t,r,n={}){const i=this.getFeatureAppRetainer(t,r,n);let a=!1;return{featureApp:i.featureApp,release:()=>{a?this.logger.warn(`The Feature App with the ID ${JSON.stringify(t)} has already been released for this scope.`):(a=!0,i.release())}}}async preloadFeatureApp(t,r){await this.getAsyncFeatureAppDefinition(t,r).promise}createAsyncFeatureAppDefinition(t,r){const{moduleLoader:n}=this.options;if(!n)throw new Error("No module loader provided.");return new mMe(n(t,r).then(i=>{if(!gMe(i))throw new Error(TMe(t,r,this.options.moduleLoader));return this.logger.info(`The Feature App module at the url ${JSON.stringify(t)} has been successfully loaded.`),i.default}))}registerOwnFeatureServices(t,r){this.featureAppDefinitionsWithRegisteredOwnFeatureServices.has(r)||(r.ownFeatureServiceDefinitions&&this.featureServiceRegistry.registerFeatureServices(r.ownFeatureServiceDefinitions,t),this.featureAppDefinitionsWithRegisteredOwnFeatureServices.add(r))}getFeatureAppRetainer(t,r,n){let i=this.featureAppRetainers.get(t);return i?i.retain():(this.registerOwnFeatureServices(t,r),i=this.createFeatureAppRetainer(r,t,n)),i}createFeatureAppRetainer(t,r,n){var i,a;this.validateExternals(t);const{featureAppName:u,baseUrl:c,beforeCreate:E,config:_,done:p}=n,L=this.featureServiceRegistry.bindFeatureServices(t,r,u);try{(a=(i=this.options).onBind)===null||a===void 0||a.call(i,{featureAppDefinition:t,featureAppId:r,featureAppName:u})}catch(ve){this.logger.error("Failed to execute onBind callback.",ve)}const W={baseUrl:c,config:_,featureAppId:r,featureAppName:u,featureServices:L.featureServices,done:p};try{E?.(W);const ve=t.create(W);this.logger.info(`The Feature App with the ID ${JSON.stringify(r)} has been successfully created.`);let me=1;const Oe={featureApp:ve,retain:()=>{me+=1},release:()=>{me-=1,me===0&&(this.featureAppRetainers.delete(r),L.unbind())}};return this.featureAppRetainers.set(r,Oe),Oe}catch(ve){throw L.unbind(),ve}}validateExternals(t){const{externalsValidator:r}=this.options;if(!r)return;const{dependencies:n}=t;n&&n.externals&&r.validate(n.externals)}}var RMe=h(5725),OMe=h.n(RMe);function bMe(e,t,r,n,i){return`The ${e?"optional":"required"} Feature Service ${JSON.stringify(t)} in the unsupported version range ${JSON.stringify(n)} could not be bound to consumer ${JSON.stringify(r)}. The supported versions are ${JSON.stringify(i)}.`}function CMe(e,t,r){return`The Feature Service ${JSON.stringify(e)} could not be registered by registrant ${JSON.stringify(t)} because it defines the invalid version ${JSON.stringify(r)}.`}function PMe(e,t,r){return`The ${e?"optional":"required"} Feature Service ${JSON.stringify(t)} in an invalid version could not be bound to consumer ${JSON.stringify(r)}.`}function MMe(e,t,r){return`The ${e?"optional":"required"} Feature Service ${JSON.stringify(t)} is not registered and therefore could not be bound to consumer ${JSON.stringify(r)}.`}function IMe(e,t){return`The Feature Service ${JSON.stringify(e)} could not be registered by registrant ${JSON.stringify(t)} because it returned undefined.`}function NMe(e,t){return`The Feature Service ${JSON.stringify(e)} has been successfully registered by registrant ${JSON.stringify(t)}.`}function LMe(e,t){return`The already registered Feature Service ${JSON.stringify(e)} could not be re-registered by registrant ${JSON.stringify(t)}.`}function DMe(e,t){return`The required Feature Service ${JSON.stringify(e)} has been successfully bound to consumer ${JSON.stringify(t)}.`}function wMe(e){return`All required Feature Services are already bound to consumer ${JSON.stringify(e)}.`}function UMe(e,t){return`The required Feature Service ${JSON.stringify(e)} could not be unbound from consumer ${JSON.stringify(t)}.`}function xMe(e,t){return`The required Feature Service ${JSON.stringify(e)} has been successfully unbound from consumer ${JSON.stringify(t)}.`}function FMe(e){return`All required Feature Services are already unbound from consumer ${JSON.stringify(e)}.`}var $Me=h(2702),VMe=h.n($Me);function GMe(e){return t=>[e,t]}function BMe(e,t){return Object.keys(t).map(GMe(e))}function kMe(e){return Array.from(e.keys()).reduce((t,r)=>{const n=e.get(r);if(!n)return t;const i=BMe(r,n);return[...t,...i]},[])}function jMe(e){const t=Array.from(e.keys()),r=kMe(e),n=VMe()(r);return n.push(...t.filter(i=>e.has(i)&&n.indexOf(i)===-1)),n.reverse()}function Dj({dependencies:e,optionalDependencies:t}){return Object.assign(Object.assign({},e&&e.featureServices),t&&t.featureServices)}function HMe(e){const t=new Map;for(const r of e)t.set(r.id,Dj(r));return t}function YMe({optionalDependencies:e},t){return Boolean(e&&e.featureServices&&e.featureServices.hasOwnProperty(t))}function qMe(e){const t=new Map;for(const r of e)t.set(r.id,r);return t}class KMe{constructor(t={}){this.options=t,this.sharedFeatureServices=new Map,this.consumerIds=new Set,this.logger=t.logger||console}registerFeatureServices(t,r){const n=qMe(t),i=HMe(t);for(const a of jMe(i))this.registerFeatureService(n,a,r)}bindFeatureServices(t,r,n){if(this.consumerIds.has(r))throw new Error(wMe(r));const i=new Map,a=Object.create(null),u=Dj(t);for(const _ of Object.keys(u)){const p=YMe(t,_),L=u[_],W=this.bindFeatureService(_,r,n,L,{optional:p});!W||(this.logger.info(DMe(_,r)),i.set(_,W),a[_]=W.featureService)}this.consumerIds.add(r);let c=!1;return{featureServices:a,unbind:()=>{if(c)throw new Error(FMe(r));c=!0,this.consumerIds.delete(r);for(const[_,p]of i.entries())try{p.unbind&&p.unbind(),this.logger.info(xMe(_,r))}catch(L){this.logger.error(UMe(_,r),L)}}}}registerFeatureService(t,r,n){const i=t.get(r);if(!i)return;if(this.sharedFeatureServices.has(r)){this.logger.warn(LMe(r,n));return}this.validateExternals(i);const{featureServices:a}=this.bindFeatureServices(i,r),u=i.create({featureServices:a});u?(this.validateFeatureServiceVersions(u,r,n),this.sharedFeatureServices.set(r,u),this.logger.info(NMe(r,n))):this.logger.info(IMe(r,n))}bindFeatureService(t,r,n,i,{optional:a}){const u=i&&OMe()(i);if(!u){const W=PMe(a,t,r);if(a){this.logger.info(W);return}throw new Error(W)}const c=`^${u.version}`,E=this.sharedFeatureServices.get(t);if(!E){const W=MMe(a,t,r);if(a){this.logger.info(W);return}throw new Error(W)}const _=Object.keys(E),p=_.find(W=>Nj()(W,c)),L=p?E[p]:void 0;if(!L){const W=bMe(a,t,r,c,_);if(a){this.logger.info(W);return}throw new Error(W)}return L(r,n)}validateExternals(t){const{externalsValidator:r}=this.options;if(!r)return;const{dependencies:n}=t;n&&n.externals&&r.validate(n.externals)}validateFeatureServiceVersions(t,r,n){for(const i of Object.keys(t))if(!Lj()(i))throw new Error(CMe(r,n,i))}}function wj(e,t={}){const{featureServiceDefinitions:r,featureServiceDependencies:n,providedExternals:i,moduleLoader:a,logger:u,onBind:c}=t;let E;i&&(E=new vMe(i));const _=new KMe({externalsValidator:E,logger:u}),p={dependencies:{featureServices:n}};r&&_.registerFeatureServices(r,e);const L=new yMe(_,{externalsValidator:E,moduleLoader:a,logger:u,onBind:c}),{featureServices:W}=_.bindFeatureServices(p,e);return{featureAppManager:L,featureServiceRegistry:_,featureServices:W}}/**
|
|
8529
|
+
`,sre=(e,t,r,n)=>e();function ure(e,t=sre){return{getTasks(r,n){return t(i=>e.rawRequest(ete,r,Object.assign(Object.assign({},n),i)),"getTasks","query",r)},taskUpdateStatus(r,n){return t(i=>e.rawRequest(tte,r,Object.assign(Object.assign({},n),i)),"taskUpdateStatus","mutation",r)},createConnection(r,n){return t(i=>e.rawRequest(rte,r,Object.assign(Object.assign({},n),i)),"createConnection","mutation",r)},deleteConnection(r,n){return t(i=>e.rawRequest(nte,r,Object.assign(Object.assign({},n),i)),"deleteConnection","mutation",r)},disconnectConnection(r,n){return t(i=>e.rawRequest(ite,r,Object.assign(Object.assign({},n),i)),"disconnectConnection","mutation",r)},getDataSource(r,n){return t(i=>e.rawRequest(ate,r,Object.assign(Object.assign({},n),i)),"getDataSource","query",r)},getMemberConnections(r,n){return t(i=>e.rawRequest(ote,r,Object.assign(Object.assign({},n),i)),"getMemberConnections","query",r)},getOauthUrl(r,n){return t(i=>e.rawRequest(ste,r,Object.assign(Object.assign({},n),i)),"getOauthUrl","query",r)},updateDeviceRegistration(r,n){return t(i=>e.rawRequest(ute,r,Object.assign(Object.assign({},n),i)),"updateDeviceRegistration","mutation",r)},publishEvent(r,n){return t(i=>e.rawRequest(cte,r,Object.assign(Object.assign({},n),i)),"publishEvent","mutation",r)},getBinary(r,n){return t(i=>e.rawRequest(lte,r,Object.assign(Object.assign({},n),i)),"getBinary","query",r)},getFHIR(r,n){return t(i=>e.rawRequest(fte,r,Object.assign(Object.assign({},n),i)),"getFHIR","query",r)},getDiagnosticReports(r,n){return t(i=>e.rawRequest(_te,r,Object.assign(Object.assign({},n),i)),"getDiagnosticReports","query",r)},getAllergyIntoleranceGroups(r,n){return t(i=>e.rawRequest(dte,r,Object.assign(Object.assign({},n),i)),"getAllergyIntoleranceGroups","query",r)},getAllergyIntolerances(r,n){return t(i=>e.rawRequest(pte,r,Object.assign(Object.assign({},n),i)),"getAllergyIntolerances","query",r)},getCarePlanGroups(r,n){return t(i=>e.rawRequest(hte,r,Object.assign(Object.assign({},n),i)),"getCarePlanGroups","query",r)},getCarePlans(r,n){return t(i=>e.rawRequest(Ste,r,Object.assign(Object.assign({},n),i)),"getCarePlans","query",r)},getCareTeams(r,n){return t(i=>e.rawRequest(Ete,r,Object.assign(Object.assign({},n),i)),"getCareTeams","query",r)},getConditionGroups(r,n){return t(i=>e.rawRequest(vte,r,Object.assign(Object.assign({},n),i)),"getConditionGroups","query",r)},getConditions(r,n){return t(i=>e.rawRequest(mte,r,Object.assign(Object.assign({},n),i)),"getConditions","query",r)},getDiagnosticReportLabGroups(r,n){return t(i=>e.rawRequest(Tte,r,Object.assign(Object.assign({},n),i)),"getDiagnosticReportLabGroups","query",r)},getDocumentReferences(r,n){return t(i=>e.rawRequest(Ate,r,Object.assign(Object.assign({},n),i)),"getDocumentReferences","query",r)},getEncountersGroup(r,n){return t(i=>e.rawRequest(gte,r,Object.assign(Object.assign({},n),i)),"getEncountersGroup","query",r)},getEncounterQuery(r,n){return t(i=>e.rawRequest(yte,r,Object.assign(Object.assign({},n),i)),"getEncounterQuery","query",r)},GetHealthSummary(r,n){return t(i=>e.rawRequest(Rte,r,Object.assign(Object.assign({},n),i)),"GetHealthSummary","query",r)},getImmunizationGroups(r,n){return t(i=>e.rawRequest(Ote,r,Object.assign(Object.assign({},n),i)),"getImmunizationGroups","query",r)},getImmunizations(r,n){return t(i=>e.rawRequest(bte,r,Object.assign(Object.assign({},n),i)),"getImmunizations","query",r)},getProcedureGroups(r,n){return t(i=>e.rawRequest(Cte,r,Object.assign(Object.assign({},n),i)),"getProcedureGroups","query",r)},GetProcedures(r,n){return t(i=>e.rawRequest(Pte,r,Object.assign(Object.assign({},n),i)),"GetProcedures","query",r)},getVitalSignGroups(r,n){return t(i=>e.rawRequest(Mte,r,Object.assign(Object.assign({},n),i)),"getVitalSignGroups","query",r)},getVitalSigns(r,n){return t(i=>e.rawRequest(Ite,r,Object.assign(Object.assign({},n),i)),"getVitalSigns","query",r)},getLabGroups(r,n){return t(i=>e.rawRequest(Nte,r,Object.assign(Object.assign({},n),i)),"getLabGroups","query",r)},getLabKnowledge(r,n){return t(i=>e.rawRequest(Lte,r,Object.assign(Object.assign({},n),i)),"getLabKnowledge","query",r)},getLabs(r,n){return t(i=>e.rawRequest(Dte,r,Object.assign(Object.assign({},n),i)),"getLabs","query",r)},getMedicationDispense(r,n){return t(i=>e.rawRequest(wte,r,Object.assign(Object.assign({},n),i)),"getMedicationDispense","query",r)},getMedicationGroups(r,n){return t(i=>e.rawRequest(Ute,r,Object.assign(Object.assign({},n),i)),"getMedicationGroups","query",r)},getMedicationKnowledge(r,n){return t(i=>e.rawRequest(xte,r,Object.assign(Object.assign({},n),i)),"getMedicationKnowledge","query",r)},getMedicationPricing(r,n){return t(i=>e.rawRequest(Fte,r,Object.assign(Object.assign({},n),i)),"getMedicationPricing","query",r)},getMedicationRequest(r,n){return t(i=>e.rawRequest($te,r,Object.assign(Object.assign({},n),i)),"getMedicationRequest","query",r)},getMedicationStatements(r,n){return t(i=>e.rawRequest(Vte,r,Object.assign(Object.assign({},n),i)),"getMedicationStatements","query",r)},appointments(r,n){return t(i=>e.rawRequest(Gte,r,Object.assign(Object.assign({},n),i)),"appointments","query",r)},cancelAppointment(r,n){return t(i=>e.rawRequest(Bte,r,Object.assign(Object.assign({},n),i)),"cancelAppointment","mutation",r)},cancelationReasons(r,n){return t(i=>e.rawRequest(kte,r,Object.assign(Object.assign({},n),i)),"cancelationReasons","query",r)},authenticate(r,n){return t(i=>e.rawRequest(jte,r,Object.assign(Object.assign({},n),i)),"authenticate","query",r)},createGuestAccessToken(r,n){return t(i=>e.rawRequest(Hte,r,Object.assign(Object.assign({},n),i)),"createGuestAccessToken","mutation",r)},ExchangeAuthCode(r,n){return t(i=>e.rawRequest(Yte,r,Object.assign(Object.assign({},n),i)),"ExchangeAuthCode","mutation",r)},initialize(r,n){return t(i=>e.rawRequest(qte,r,Object.assign(Object.assign({},n),i)),"initialize","query",r)},login(r,n){return t(i=>e.rawRequest(Kte,r,Object.assign(Object.assign({},n),i)),"login","query",r)},refreshTokens(r,n){return t(i=>e.rawRequest(Wte,r,Object.assign(Object.assign({},n),i)),"refreshTokens","query",r)},nextQuestion(r,n){return t(i=>e.rawRequest(Qte,r,Object.assign(Object.assign({},n),i)),"nextQuestion","mutation",r)},providerSearch(r,n){return t(i=>e.rawRequest(zte,r,Object.assign(Object.assign({},n),i)),"providerSearch","query",r)},requestConnection(r,n){return t(i=>e.rawRequest(Xte,r,Object.assign(Object.assign({},n),i)),"requestConnection","mutation",r)},SearchHealthResources(r,n){return t(i=>e.rawRequest(Jte,r,Object.assign(Object.assign({},n),i)),"SearchHealthResources","query",r)},createConsent(r,n){return t(i=>e.rawRequest(Zte,r,Object.assign(Object.assign({},n),i)),"createConsent","mutation",r)},CreateDataExportDirectDownloadUrl(r,n){return t(i=>e.rawRequest(ere,r,Object.assign(Object.assign({},n),i)),"CreateDataExportDirectDownloadUrl","mutation",r)},CreateVerificationUrl(r,n){return t(i=>e.rawRequest(tre,r,Object.assign(Object.assign({},n),i)),"CreateVerificationUrl","mutation",r)},delete(r,n){return t(i=>e.rawRequest(rre,r,Object.assign(Object.assign({},n),i)),"delete","mutation",r)},getProfile(r,n){return t(i=>e.rawRequest(nre,r,Object.assign(Object.assign({},n),i)),"getProfile","query",r)},searchConsent(r,n){return t(i=>e.rawRequest(ire,r,Object.assign(Object.assign({},n),i)),"searchConsent","query",r)},updateUserProfile(r,n){return t(i=>e.rawRequest(are,r,Object.assign(Object.assign({},n),i)),"updateUserProfile","mutation",r)},VerificationStatus(r,n){return t(i=>e.rawRequest(ore,r,Object.assign(Object.assign({},n),i)),"VerificationStatus","query",r)}}}var cre=function(e,t,r,n){function i(a){return a instanceof r?a:new r(function(u){u(a)})}return new(r||(r=Promise))(function(a,u){function c(p){try{_(n.next(p))}catch(L){u(L)}}function E(p){try{_(n.throw(p))}catch(L){u(L)}}function _(p){p.done?a(p.value):i(p.value).then(c,E)}_((n=n.apply(e,t||[])).next())})};function UG(e,t,r){let n;t!==void 0&&(n=lre(t));const i={};r!=null&&(i["accept-language"]=r);const a=new jm(e,{errorPolicy:"all",mode:"cors",requestMiddleware:n,headers:i});return{client:a,sdk:ure(a)}}function lre(e){return t=>cre(this,void 0,void 0,function*(){const n=(yield e.getAccessToken()).data();return Object.assign(Object.assign({},t),{headers:Object.assign(Object.assign({},t.headers),{Authorization:`Bearer ${n}`})})})}var fre=function(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r},xG=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},th;const FG="accept-language";class _re{constructor(t){th.set(this,void 0),fre(this,th,t,"f")}setLanguage(t){xG(this,th,"f").setHeader(FG,t)}getLanguage(){var t;const r=xG(this,th,"f").requestConfig.headers;return(t=r?.[FG])!==null&&t!==void 0?t:null}}th=new WeakMap;const dre="INFORMATION",UUe="WARNING",$G="ERROR",pre="FATAL";class Qm{constructor(t){this.issue=t}message(){var t,r;const n=[];for(const i of this.issue){const a=(r=(t=i.details)===null||t===void 0?void 0:t.text)===null||r===void 0?void 0:r.trim();a==null||a.length===0||n.push(a)}return n.join(", ")}success(){for(const t of this.issue){const r=t.severity.toUpperCase();if(r===$G||r===pre)return!1}return!0}static error(t){return new Qm([{severity:$G,code:"EXCEPTION",details:{text:t.message}}])}static success(){return new Qm([{severity:dre,code:"INFORMATIONAL",details:{}}])}}function hre(e){for(const t of e){const r=VG(t);if(r!==null){if(r.code==="500")return!0;for(const n of r.resource.issue)if(n.code==="exception")return!0}}return!1}function yP(e=[]){const t=[];let r=!1;for(const a of e){const u=VG(a);if(u!==null){r=!0;for(const c of u.resource.issue)t.push(c)}}if(!r)return null;const n=new Qm(t),i=new O9(n);if(Ks(i.message)){const a=e.map(u=>u.message).join(", ");i.message=Ks(a)?"Unknown error. Contact b.well support for further assistance.":a}return i}function VG(e){const t=e.extensions,r=t?.code,n=t?.resource;return r===void 0||n===void 0||!Sre(n)?null:{code:r,resource:n}}function Sre(e){const t=e.issue;return t===void 0?!1:Array.isArray(t)}var GG=function(e,t,r,n){function i(a){return a instanceof r?a:new r(function(u){u(a)})}return new(r||(r=Promise))(function(a,u){function c(p){try{_(n.next(p))}catch(L){u(L)}}function E(p){try{_(n.throw(p))}catch(L){u(L)}}function _(p){p.done?a(p.value):i(p.value).then(c,E)}_((n=n.apply(e,t||[])).next())})},zm=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},c_,RP,OP;class Ts{constructor(){c_.add(this)}handleTransaction(t){return GG(this,void 0,void 0,function*(){try{const r=yield t,n=yP(r.errors);return n!==null?Kt.failure(n):Kt.success(r.data)}catch(r){if(Bi.isBwellError(r))return Kt.failure(r);if(zm(this,c_,"m",RP).call(this,r))return zm(this,c_,"m",OP).call(this,r);throw r}})}handleQuery(t){return GG(this,void 0,void 0,function*(){try{const r=yield t,n=yP(r.errors);return new tr(r.data,n)}catch(r){if(Bi.isBwellError(r))return new tr(void 0,r);if(zm(this,c_,"m",RP).call(this,r)){const n=zm(this,c_,"m",OP).call(this,r);return tr.error(n.error())}throw r}})}validateRequest(t){return t===void 0?Kt.success(null):t.validate()}}c_=new WeakSet,RP=function(t){return t instanceof Gu},OP=function(t){if(t.response.status>299)return new Cm(new R9("Network error",t.response.status));const r=t.response.errors;if(r!==void 0){if(hre(r))return new Cm(new DC("Internal server error",r));const n=yP(r);if(n!==null)return Kt.failure(n)}return new Cm(new DC("Unknown error",t))};var l_=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},ju,ol,rh;(function(e){e.ACTIVITY_CONTENT="https://www.icanbwell.com/contentDescription",e.ACTIVITY_ID="https://www.icanbwell.com/activityId",e.ACTIVITY_TOPIC="https://www.icanbwell.com/activityTopic",e.ACTIVITY_TYPE="https://www.icanbwell.com/activityType"})(rh||(rh={}));class Ere{constructor(){ju.add(this)}create(t){var r;const n=t.data(),i={page:n.page,pageSize:n.pageSize};return ki(n.id)&&(i.id=l_(this,ju,"m",ol).call(this,n.id)),ki(n.activityId)&&(i.identifier=l_(this,ju,"m",ol).call(this,n.activityId,rh.ACTIVITY_ID)),ki(n.activityType)&&(i.code=l_(this,ju,"m",ol).call(this,n.activityType,rh.ACTIVITY_TYPE)),ki(n.activityTopic)&&(i.tag=l_(this,ju,"m",ol).call(this,n.activityTopic,rh.ACTIVITY_TOPIC)),ki(n.status)&&(i.status=l_(this,ju,"m",ol).call(this,n.status)),ki(n.subject)&&(i.subject=l_(this,ju,"m",ol).call(this,n.subject)),i.sortMethod=n.smartSort===!0?"smartSort":"",ki(n.enrichContent)&&(i.enrichContent=n.enrichContent),i.contentLanguage=(r=n.contentLanguage)!==null&&r!==void 0?r:"en",{request:i}}}ju=new WeakSet,ol=function(t,r){const i={value:(Array.isArray(t)?t:[t]).join(",")};return ki(r)&&(i.system=r),{values:[i]}};var BG=function(e,t,r,n){function i(a){return a instanceof r?a:new r(function(u){u(a)})}return new(r||(r=Promise))(function(a,u){function c(p){try{_(n.next(p))}catch(L){u(L)}}function E(p){try{_(n.throw(p))}catch(L){u(L)}}function _(p){p.done?a(p.value):i(p.value).then(c,E)}_((n=n.apply(e,t||[])).next())})},kG=function(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r},Vo=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},Go,nh,bP;class vre extends Ts{constructor(t,r=new ji){super(),Go.set(this,void 0),nh.set(this,void 0),bP.set(this,new Ere),kG(this,nh,t,"f"),kG(this,Go,r.getLogger("GraphQLActivityManager"),"f")}getTasks(t){return BG(this,void 0,void 0,function*(){var r;const n=t.validate();if(n.failure())return n.toQueryResult();Vo(this,Go,"f").verbose("calling getTask query...");const i=yield this.handleQuery(Vo(this,nh,"f").getTasks(Vo(this,bP,"f").create(t)));return Vo(this,Go,"f").verbose("getTask query complete"),i.hasError()?Vo(this,Go,"f").error("getTask query error",i.error):Vo(this,Go,"f").info("successfully called getTask query"),new tr((r=i.data)===null||r===void 0?void 0:r.getTasks,i.error)})}updateTaskStatus(t){return BG(this,void 0,void 0,function*(){const r=t.validate();if(r.failure())return r;Vo(this,Go,"f").verbose("calling taskUpdateStatus mutation");const n=yield this.handleTransaction(Vo(this,nh,"f").taskUpdateStatus(t.data()));return Vo(this,Go,"f").verbose("taskUpdateStatus mutation complete"),n.failure()?(Vo(this,Go,"f").error("taskUpdateStatus error",n),n.intoFailure()):(Vo(this,Go,"f").info("taskUpdateStatus mutation success"),Kt.success(n.data().taskUpdateStatus))})}}Go=new WeakMap,nh=new WeakMap,bP=new WeakMap;var f_=function(e,t,r,n){function i(a){return a instanceof r?a:new r(function(u){u(a)})}return new(r||(r=Promise))(function(a,u){function c(p){try{_(n.next(p))}catch(L){u(L)}}function E(p){try{_(n.throw(p))}catch(L){u(L)}}function _(p){p.done?a(p.value):i(p.value).then(c,E)}_((n=n.apply(e,t||[])).next())})},CP=function(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r},un=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},Js,Cn,Xm;class mre extends Ts{constructor(t,r=new ji,n=new Tre){super(),Js.set(this,void 0),Cn.set(this,void 0),Xm.set(this,void 0),CP(this,Js,t,"f"),CP(this,Cn,r.getLogger("GraphQLConnectionManager"),"f"),CP(this,Xm,n,"f")}getMemberConnections(){return f_(this,void 0,void 0,function*(){un(this,Cn,"f").verbose("calling getMemberConnections...");const t=yield this.handleQuery(un(this,Js,"f").getMemberConnections());return un(this,Cn,"f").verbose("getMemberConnections complete"),t.hasError()?un(this,Cn,"f").error("getMemberConnections failed",t.error):un(this,Cn,"f").info("successfully called getMemberConnections"),un(this,Xm,"f").create(t)})}getDataSource(t){return f_(this,void 0,void 0,function*(){var r;const n=this.validateRequest(t);if(n.failure())return n.toQueryResult();un(this,Cn,"f").verbose("calling getDataSources...");const i=yield this.handleQuery(un(this,Js,"f").getDataSource(Object.assign({},t.data())));return un(this,Cn,"f").verbose("getDataSources complete"),i.hasError()?un(this,Cn,"f").error("getDataSources failed",i.error):un(this,Cn,"f").info("successfully called getDataSources"),new tr((r=i.data)===null||r===void 0?void 0:r.getDataSource,i.error)})}createConnection(t){return f_(this,void 0,void 0,function*(){const r=this.validateRequest(t);if(r.failure())return r.intoFailure();un(this,Cn,"f").verbose("calling createConnection...");const n=yield this.handleTransaction(un(this,Js,"f").createConnection(Object.assign({},t.data())));return un(this,Cn,"f").verbose("createConnection complete"),n.failure()?(un(this,Cn,"f").error("createConnection failed",n),n.intoFailure()):(un(this,Cn,"f").info("successfully called createConnection"),Kt.success(n.data().createConnection))})}disconnectConnection(t){return f_(this,void 0,void 0,function*(){const r=this.validateRequest(t);if(r.failure())return r.intoFailure();un(this,Cn,"f").verbose("calling disconnectConnection...");const n=yield this.handleTransaction(un(this,Js,"f").disconnectConnection(Object.assign({},t.data())));return un(this,Cn,"f").verbose("disconnectConnection complete"),n.failure()?(un(this,Cn,"f").error("disconnectConnection failed",n),n.intoFailure()):(un(this,Cn,"f").info("successfully called disconnectConnection"),Kt.success(n.data().disconnectConnection))})}deleteConnection(t){return f_(this,void 0,void 0,function*(){const r=this.validateRequest(t);if(r.failure())return r.intoFailure();un(this,Cn,"f").verbose("calling deleteConnection...");const n=yield this.handleTransaction(un(this,Js,"f").deleteConnection(Object.assign({},t.data())));return un(this,Cn,"f").verbose("deleteConnection complete"),n.failure()?(un(this,Cn,"f").error("deleteConnection failed",n),n.intoFailure()):(un(this,Cn,"f").info("successfully called deleteConnection"),Kt.success(n.data().deleteConnection))})}getOauthUrl(t){return f_(this,void 0,void 0,function*(){var r;const n=this.validateRequest(t);if(n.failure())return n.toQueryResult();un(this,Cn,"f").verbose("calling getOauthUrl...");const i=yield this.handleQuery(un(this,Js,"f").getOauthUrl(Object.assign({},t.data())));return un(this,Cn,"f").verbose("getOauthUrl complete"),i.hasError()?un(this,Cn,"f").error("getOauthUrl failed",i.error):un(this,Cn,"f").info("successfully called getOauthUrl"),new tr((r=i.data)===null||r===void 0?void 0:r.getOauthUrl,i.error)})}}Js=new WeakMap,Cn=new WeakMap,Xm=new WeakMap;class Tre{create(t){var r,n,i,a,u,c;const E=new Map,_=(i=(n=(r=t.data)===null||r===void 0?void 0:r.subscription_subscription)===null||n===void 0?void 0:n.entry)!==null&&i!==void 0?i:[];for(const L of _)if(Fn((a=L?.resource)===null||a===void 0?void 0:a.service_slug)&&Fn(L?.resource.subscriptionStatus))for(const W of L.resource.subscriptionStatus)E.set(L.resource.service_slug,{error:W?.error,extension:W?.extension});const p=(c=(u=t.data)===null||u===void 0?void 0:u.getMemberConnections)!==null&&c!==void 0?c:[];return new tr(p.map(L=>{var W;const ve=E.get(L.id);if(Fo(ve))return Object.assign(Object.assign({},L),{syncErrors:[]});const me=(W=ve.extension)===null||W===void 0?void 0:W.find(Oe=>Oe?.id===AZ);return Object.assign(Object.assign({},L),{syncErrors:ve.error,syncStatus:me?me.valueString:L.syncStatus})}),t.error)}}class Are{create(t){return{deviceToken:t.data().deviceToken,platformName:"",applicationName:"",notificationPreference:!1}}}class gre{create(t){return Object.assign(Object.assign({},t.data()),{notificationPreference:!0})}}var jG=function(e,t,r,n){function i(a){return a instanceof r?a:new r(function(u){u(a)})}return new(r||(r=Promise))(function(a,u){function c(p){try{_(n.next(p))}catch(L){u(L)}}function E(p){try{_(n.throw(p))}catch(L){u(L)}}function _(p){p.done?a(p.value):i(p.value).then(c,E)}_((n=n.apply(e,t||[])).next())})},HG=function(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r},so=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},ih,Bo,PP,MP;class yre extends Ts{constructor(t,r=new ji){super(),ih.set(this,void 0),Bo.set(this,void 0),PP.set(this,new Are),MP.set(this,new gre),HG(this,ih,t,"f"),HG(this,Bo,r.getLogger("GraphQLDeviceManager"),"f")}registerDevice(t){return jG(this,void 0,void 0,function*(){const r=this.validateRequest(t);if(r.failure())return r.intoFailure();const n=so(this,MP,"f").create(t);so(this,Bo,"f").verbose("calling updateDeviceRegistration to register device...");const i=yield this.handleTransaction(so(this,ih,"f").updateDeviceRegistration(n));return so(this,Bo,"f").verbose("updateDeviceRegistration complete for registration."),i.failure()?(so(this,Bo,"f").error("updateDeviceRegistration failed",i),i.intoFailure()):(so(this,Bo,"f").info("successfully called updateDeviceRegistration for registration."),Kt.success(i.data().updateDeviceRegistration))})}deregisterDevice(t){return jG(this,void 0,void 0,function*(){const r=this.validateRequest(t);if(r.failure())return r.intoFailure();so(this,Bo,"f").verbose("calling updateDeviceRegistration to deregister device...");const n=so(this,PP,"f").create(t),i=yield this.handleTransaction(so(this,ih,"f").updateDeviceRegistration(n));return so(this,Bo,"f").verbose("updateDeviceRegistration complete for deregistration."),i.failure()?(so(this,Bo,"f").error("updateDeviceRegistration failed",i),i.intoFailure()):(so(this,Bo,"f").info("successfully called updateDeviceRegistration for deregistration."),Kt.success(i.data().updateDeviceRegistration))})}}ih=new WeakMap,Bo=new WeakMap,PP=new WeakMap,MP=new WeakMap;class Rre{create(t){const r=JSON.parse(t.data().serializedNotification);return{notificationId:r.notification_id,messageId:r.itbl.messageId,eventType:VC.MobilePushOpen}}}var Ore=function(e,t,r,n){function i(a){return a instanceof r?a:new r(function(u){u(a)})}return new(r||(r=Promise))(function(a,u){function c(p){try{_(n.next(p))}catch(L){u(L)}}function E(p){try{_(n.throw(p))}catch(L){u(L)}}function _(p){p.done?a(p.value):i(p.value).then(c,E)}_((n=n.apply(e,t||[])).next())})},IP=function(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r},sl=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},Jm,Hu,Zm;class bre extends Ts{constructor(t,r=new ji,n=new Rre){super(),Jm.set(this,void 0),Hu.set(this,void 0),Zm.set(this,void 0),IP(this,Jm,t,"f"),IP(this,Hu,r.getLogger("GraphQLEventManager"),"f"),IP(this,Zm,n,"f")}handleNotification(t){return Ore(this,void 0,void 0,function*(){const r=this.validateRequest(t);if(r.failure())return r.intoFailure();sl(this,Hu,"f").debug("Calling publishEvent");let n;try{n=sl(this,Zm,"f").create(t)}catch(a){return sl(this,Hu,"f").error("Error creating publishEvent request",a),Kt.failure(new DC("Error creating publishEvent request"))}const i=yield this.handleTransaction(sl(this,Jm,"f").publishEvent(n));return sl(this,Hu,"f").debug("publishEvent completed"),i.failure()?(sl(this,Hu,"f").error("publishEvent mutation error",i),i.intoFailure()):(sl(this,Hu,"f").info("publishEvent mutation success"),Kt.success(i.data().publishEvent))})}}Jm=new WeakMap,Hu=new WeakMap,Zm=new WeakMap;class Cre{create(t){var r,n,i,a,u,c,E,_;const p=t.data();return{source:(r=p._source)!==null&&r!==void 0?r:null,id:(n=p._id)!==null&&n!==void 0?n:null,count:(i=p._count)!==null&&i!==void 0?i:25,getPagesOffset:(a=p._getpagesoffset)!==null&&a!==void 0?a:0,date:(u=p.date)!==null&&u!==void 0?u:null,sort:(c=p._sort)!==null&&c!==void 0?c:null,supportingInformation:(E=p.supporting_info)!==null&&E!==void 0?E:null,status:(_=p.status)!==null&&_!==void 0?_:null}}}class Pre{create(t){const r=t.data();return{appointment:{id:r.id,status:xC.Cancelled,cancelationReason:r.cancelationReason}}}}var NP=function(e,t,r,n){function i(a){return a instanceof r?a:new r(function(u){u(a)})}return new(r||(r=Promise))(function(a,u){function c(p){try{_(n.next(p))}catch(L){u(L)}}function E(p){try{_(n.throw(p))}catch(L){u(L)}}function _(p){p.done?a(p.value):i(p.value).then(c,E)}_((n=n.apply(e,t||[])).next())})},YG=function(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r},Yi=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},fa,__,LP,DP;class Mre extends Ts{constructor(t,r=new ji){super(),fa.set(this,void 0),__.set(this,void 0),LP.set(this,new Cre),DP.set(this,new Pre),YG(this,__,t,"f"),YG(this,fa,r.getLogger("GraphQLHealthSpaceManager"),"f")}getAppointments(t){return NP(this,void 0,void 0,function*(){var r;const n=this.validateRequest(t);if(n.failure())return n.toQueryResult();Yi(this,fa,"f").verbose("calling appointments query...");const i=yield this.handleQuery(Yi(this,__,"f").appointments(Yi(this,LP,"f").create(t)));return Yi(this,fa,"f").verbose("appointments query complete"),i.hasError()?Yi(this,fa,"f").error("appointments query error",i.error):Yi(this,fa,"f").info("successfully called appointments query"),new tr((r=i.data)===null||r===void 0?void 0:r.appointments,i.error)})}cancelAppointment(t){return NP(this,void 0,void 0,function*(){const r=this.validateRequest(t);if(r.failure())return r.intoFailure();Yi(this,fa,"f").verbose("calling cancel appointment mutation...");const n=yield this.handleTransaction(Yi(this,__,"f").cancelAppointment(Yi(this,DP,"f").create(t)));return Yi(this,fa,"f").verbose("cancel appointment mutation complete"),n.failure()?(Yi(this,fa,"f").error("cancel appointment mutation error",n),n.intoFailure()):(Yi(this,fa,"f").info("successfully called cancel appointment mutation"),Kt.success(n.data().updateAppointment))})}getCancelationReasons(t){return NP(this,void 0,void 0,function*(){var r;const n=this.validateRequest(t);if(n.failure())return n.toQueryResult();Yi(this,fa,"f").verbose("calling cancelationReasons query...");const i=yield this.handleQuery(Yi(this,__,"f").cancelationReasons(t.data()));return Yi(this,fa,"f").verbose("cancelationReasons query complete"),i.hasError()?Yi(this,fa,"f").error("cancelationReasons query error",i.error):Yi(this,fa,"f").info("successfully called cancelationReasons query"),new tr((r=i.data)===null||r===void 0?void 0:r.cancelationReasons,i.error)})}}fa=new WeakMap,__=new WeakMap,LP=new WeakMap,DP=new WeakMap;class Ire{create(t){var r;const n=(r=t.data)===null||r===void 0?void 0:r.getMedicationDispense;if(!n)return new tr(void 0,t.error);const i=Object.assign(Object.assign({},n),n?.resources&&{resources:n?.resources.map(a=>{var u,c,E,_,p,L,W;return Object.assign(Object.assign({},a),a.medication&&{medication:Object.assign(Object.assign({},a.medication),((u=a.medication)===null||u===void 0?void 0:u.resource)&&{resource:Object.assign(Object.assign({},(c=a.medication)===null||c===void 0?void 0:c.resource),((_=(E=a.medication)===null||E===void 0?void 0:E.resource)===null||_===void 0?void 0:_.ingredient)&&{ingredient:(W=(L=(p=a.medication)===null||p===void 0?void 0:p.resource)===null||L===void 0?void 0:L.ingredient)===null||W===void 0?void 0:W.map(ve=>{var me,Oe;return Object.assign(Object.assign({},ve),((me=ve?.itemReference)===null||me===void 0?void 0:me.itemReferenceResource)&&{itemReference:{resource:(Oe=ve?.itemReference)===null||Oe===void 0?void 0:Oe.itemReferenceResource}})})})})})})});return new tr(i,t.error)}}class Nre{create(t){var r;const n=(r=t.data)===null||r===void 0?void 0:r.getMedicationRequest;if(!n)return new tr(void 0,t.error);const i=Object.assign(Object.assign({},n),n?.resources&&{resources:n?.resources.map(a=>{var u,c,E,_,p,L,W;return Object.assign(Object.assign({},a),a.medication&&{medication:Object.assign(Object.assign({},a.medication),((u=a.medication)===null||u===void 0?void 0:u.resource)&&{resource:Object.assign(Object.assign({},(c=a.medication)===null||c===void 0?void 0:c.resource),((_=(E=a.medication)===null||E===void 0?void 0:E.resource)===null||_===void 0?void 0:_.ingredient)&&{ingredient:(W=(L=(p=a.medication)===null||p===void 0?void 0:p.resource)===null||L===void 0?void 0:L.ingredient)===null||W===void 0?void 0:W.map(ve=>{var me,Oe;return Object.assign(Object.assign({},ve),((me=ve?.itemReference)===null||me===void 0?void 0:me.itemReferenceResource)&&{itemReference:{resource:(Oe=ve?.itemReference)===null||Oe===void 0?void 0:Oe.itemReferenceResource}})})})})})})});return new tr(i,t.error)}}var En=function(e,t,r,n){function i(a){return a instanceof r?a:new r(function(u){u(a)})}return new(r||(r=Promise))(function(a,u){function c(p){try{_(n.next(p))}catch(L){u(L)}}function E(p){try{_(n.throw(p))}catch(L){u(L)}}function _(p){p.done?a(p.value):i(p.value).then(c,E)}_((n=n.apply(e,t||[])).next())})},eT=function(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r},lt=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},nn,Rt,tT,rT;class Lre extends Ts{constructor(t,r=new ji,n=new Nre,i=new Ire){super(),nn.set(this,void 0),Rt.set(this,void 0),tT.set(this,void 0),rT.set(this,void 0),eT(this,nn,t,"f"),eT(this,Rt,r.getLogger("GraphQLHealthManager"),"f"),eT(this,tT,n,"f"),eT(this,rT,i,"f")}getHealthSummary(){return En(this,void 0,void 0,function*(){var t;lt(this,Rt,"f").verbose("calling getHealthSummary...");const r=yield this.handleQuery(lt(this,nn,"f").GetHealthSummary());return lt(this,Rt,"f").verbose("getHealthSummary complete"),r.hasError()?lt(this,Rt,"f").error("getHealthSummary failed",r.error):lt(this,Rt,"f").info("successfully called getHealthSummary"),new tr((t=r.data)===null||t===void 0?void 0:t.getHealthSummary,r.error)})}getAllergyIntolerances(t){return En(this,void 0,void 0,function*(){var r,n;const i=this.validateRequest(t);if(i.failure())return i.toQueryResult();lt(this,Rt,"f").verbose("calling getAllergyIntolerances...");const a=yield this.handleQuery(lt(this,nn,"f").getAllergyIntolerances({request:(r=t?.data())!==null&&r!==void 0?r:null}));return lt(this,Rt,"f").verbose("getAllergyIntolerances complete"),a.hasError()&<(this,Rt,"f").error("getAllergyIntolerances errors",a.error),new tr((n=a.data)===null||n===void 0?void 0:n.getAllergyIntolerances,a.error)})}getAllergyIntoleranceGroups(t){return En(this,void 0,void 0,function*(){var r,n;const i=this.validateRequest(t);if(i.failure())return i.toQueryResult();lt(this,Rt,"f").verbose("calling getAllergyIntoleranceGroups...");const a=yield this.handleQuery(lt(this,nn,"f").getAllergyIntoleranceGroups({request:(r=t?.data())!==null&&r!==void 0?r:null}));return lt(this,Rt,"f").verbose("getAllergyIntoleranceGroups complete"),a.hasError()&<(this,Rt,"f").error("getAllergyIntoleranceGroups errors",a.error),new tr((n=a.data)===null||n===void 0?void 0:n.getAllergyIntoleranceGroups,a.error)})}getConditions(t){return En(this,void 0,void 0,function*(){var r,n;const i=this.validateRequest(t);if(i.failure())return i.toQueryResult();lt(this,Rt,"f").verbose("calling getConditions...");const a=yield this.handleQuery(lt(this,nn,"f").getConditions({request:(r=t?.data())!==null&&r!==void 0?r:null}));return lt(this,Rt,"f").verbose("getConditions complete"),a.hasError()&<(this,Rt,"f").error("getConditions errors",a.error),new tr((n=a.data)===null||n===void 0?void 0:n.getConditions,a.error)})}getConditionGroups(t){return En(this,void 0,void 0,function*(){var r,n;const i=this.validateRequest(t);if(i.failure())return i.toQueryResult();lt(this,Rt,"f").verbose("calling getConditionGroups...");const a=yield this.handleQuery(lt(this,nn,"f").getConditionGroups({request:(r=t?.data())!==null&&r!==void 0?r:null}));return lt(this,Rt,"f").verbose("getConditionGroups complete"),a.hasError()&<(this,Rt,"f").error("getConditionGroups errors",a.error),new tr((n=a.data)===null||n===void 0?void 0:n.getConditionGroups,a.error)})}getDiagnosticReports(t){return En(this,void 0,void 0,function*(){var r;const n=this.validateRequest(t);if(n.failure())return n.toQueryResult();lt(this,Rt,"f").verbose("calling getDiagnosticReports...");const i=yield this.handleQuery(lt(this,nn,"f").getDiagnosticReports());return lt(this,Rt,"f").verbose("getDiagnosticReports complete"),i.hasError()&<(this,Rt,"f").error("getDiagnosticReports errors",i.error),new tr((r=i.data)===null||r===void 0?void 0:r.diagnosticReports,i.error)})}getDocumentReferences(t){return En(this,void 0,void 0,function*(){var r,n;const i=this.validateRequest(t);if(i.failure())return i.toQueryResult();lt(this,Rt,"f").verbose("calling getDocumentReferences...");const a=yield this.handleQuery(lt(this,nn,"f").getDocumentReferences({request:(r=t?.data())!==null&&r!==void 0?r:null}));return lt(this,Rt,"f").verbose("getDocumentReferences complete"),a.hasError()&<(this,Rt,"f").error("getDocumentReferences errors",a.error),new tr((n=a.data)===null||n===void 0?void 0:n.getDocumentReferences,a.error)})}getBinary(t){return En(this,void 0,void 0,function*(){var r;const n=this.validateRequest(t);if(n.failure())return n.toQueryResult();lt(this,Rt,"f").verbose("calling getBinary...");const i=yield this.handleQuery(lt(this,nn,"f").getBinary({request:t.data()}));return lt(this,Rt,"f").verbose("getBinary complete"),i.hasError()&<(this,Rt,"f").error("getBinary errors",i.error),new tr((r=i.data)===null||r===void 0?void 0:r.getBinary,i.error)})}getLabs(t){return En(this,void 0,void 0,function*(){var r,n;const i=this.validateRequest(t);if(i.failure())return i.toQueryResult();lt(this,Rt,"f").verbose("calling getLabs...");const a=yield this.handleQuery(lt(this,nn,"f").getLabs({request:(r=t?.data())!==null&&r!==void 0?r:null}));return lt(this,Rt,"f").verbose("getLabs complete"),a.hasError()&<(this,Rt,"f").error("getLabs errors",a.error),new tr((n=a.data)===null||n===void 0?void 0:n.getLabs,a.error)})}getLabGroups(t){return En(this,void 0,void 0,function*(){var r,n;const i=this.validateRequest(t);if(i.failure())return i.toQueryResult();lt(this,Rt,"f").verbose("calling getLabGroups...");const a=yield this.handleQuery(lt(this,nn,"f").getLabGroups({request:(r=t?.data())!==null&&r!==void 0?r:null}));return lt(this,Rt,"f").verbose("getLabGroups complete"),a.hasError()&<(this,Rt,"f").error("getLabGroups errors",a.error),new tr((n=a.data)===null||n===void 0?void 0:n.getLabGroups,a.error)})}getCarePlans(t){return En(this,void 0,void 0,function*(){var r,n;const i=this.validateRequest(t);if(i.failure())return i.toQueryResult();lt(this,Rt,"f").verbose("calling getCarePlans...");const a=yield this.handleQuery(lt(this,nn,"f").getCarePlans({request:(r=t?.data())!==null&&r!==void 0?r:null}));return lt(this,Rt,"f").verbose("getCarePlans complete"),a.hasError()&<(this,Rt,"f").error("getCarePlans errors",a.error),new tr((n=a.data)===null||n===void 0?void 0:n.getCarePlans,a.error)})}getCarePlanGroups(t){return En(this,void 0,void 0,function*(){var r,n;const i=this.validateRequest(t);if(i.failure())return i.toQueryResult();lt(this,Rt,"f").verbose("calling getCarePlanGroups...");const a=yield this.handleQuery(lt(this,nn,"f").getCarePlanGroups({request:(r=t?.data())!==null&&r!==void 0?r:null}));return lt(this,Rt,"f").verbose("getCarePlanGroups complete"),a.hasError()&<(this,Rt,"f").error("getCarePlanGroups errors",a.error),new tr((n=a.data)===null||n===void 0?void 0:n.getCarePlanGroups,a.error)})}getCareTeams(t){return En(this,void 0,void 0,function*(){var r,n;const i=this.validateRequest(t);if(i.failure())return i.toQueryResult();lt(this,Rt,"f").verbose("calling getCareTeams");const a=yield this.handleQuery(lt(this,nn,"f").getCareTeams({request:(r=t?.data())!==null&&r!==void 0?r:null}));return lt(this,Rt,"f").verbose("getCareTeams complete"),a.hasError()&<(this,Rt,"f").error("getCareTeams errors",a.error),new tr((n=a.data)===null||n===void 0?void 0:n.getCareTeams,a.error)})}getEncounters(t){return En(this,void 0,void 0,function*(){var r,n;const i=this.validateRequest(t);if(i.failure())return i.toQueryResult();lt(this,Rt,"f").verbose("calling getEncounters...");const a=yield this.handleQuery(lt(this,nn,"f").getEncounterQuery({request:(r=t?.data())!==null&&r!==void 0?r:null}));return lt(this,Rt,"f").verbose("getEncounters complete"),a.hasError()&<(this,Rt,"f").error("getEncounters errors",a.error),new tr((n=a.data)===null||n===void 0?void 0:n.getEncounters,a.error)})}getEncounterGroups(t){return En(this,void 0,void 0,function*(){var r,n;const i=this.validateRequest(t);if(i.failure())return i.toQueryResult();lt(this,Rt,"f").verbose("calling getEncounterGroups...");const a=yield this.handleQuery(lt(this,nn,"f").getEncountersGroup({request:(r=t?.data())!==null&&r!==void 0?r:null}));return lt(this,Rt,"f").verbose("getEncounterGroups complete"),a.hasError()&<(this,Rt,"f").error("getEncounterGroups errors",a.error),new tr((n=a.data)===null||n===void 0?void 0:n.getEncounterGroups,a.error)})}getImmunizations(t){return En(this,void 0,void 0,function*(){var r,n;const i=this.validateRequest(t);if(i.failure())return i.toQueryResult();lt(this,Rt,"f").verbose("calling getImmunizations...");const a=yield this.handleQuery(lt(this,nn,"f").getImmunizations({request:(r=t?.data())!==null&&r!==void 0?r:null}));return lt(this,Rt,"f").verbose("getImmunizations complete"),a.hasError()&<(this,Rt,"f").error("getImmunizations errors",a.error),new tr((n=a.data)===null||n===void 0?void 0:n.getImmunizations,a.error)})}getImmunizationGroups(t){return En(this,void 0,void 0,function*(){var r,n;const i=this.validateRequest(t);if(i.failure())return i.toQueryResult();lt(this,Rt,"f").verbose("calling getImmunizationGroups...");const a=yield this.handleQuery(lt(this,nn,"f").getImmunizationGroups({request:(r=t?.data())!==null&&r!==void 0?r:null}));return lt(this,Rt,"f").verbose("getImmunizationGroups complete"),a.hasError()&<(this,Rt,"f").error("getImmunizationGroups errors",a.error),new tr((n=a.data)===null||n===void 0?void 0:n.getImmunizationGroups,a.error)})}getProcedures(t){return En(this,void 0,void 0,function*(){var r,n;const i=this.validateRequest(t);if(i.failure())return i.toQueryResult();lt(this,Rt,"f").verbose("calling getProcedures...");const a=yield this.handleQuery(lt(this,nn,"f").GetProcedures({request:(r=t?.data())!==null&&r!==void 0?r:null}));return lt(this,Rt,"f").verbose("getProcedures complete"),a.hasError()&<(this,Rt,"f").error("getProcedures errors",a.error),new tr((n=a.data)===null||n===void 0?void 0:n.getProcedures,a.error)})}getProcedureGroups(t){return En(this,void 0,void 0,function*(){var r,n;const i=this.validateRequest(t);if(i.failure())return i.toQueryResult();lt(this,Rt,"f").verbose("calling getProcedureGroups...");const a=yield this.handleQuery(lt(this,nn,"f").getProcedureGroups({request:(r=t?.data())!==null&&r!==void 0?r:null}));return lt(this,Rt,"f").verbose("getProcedureGroups complete"),a.hasError()&<(this,Rt,"f").error("getProcedureGroups errors",a.error),new tr((n=a.data)===null||n===void 0?void 0:n.getProcedureGroups,a.error)})}getVitalSigns(t){return En(this,void 0,void 0,function*(){var r,n;const i=this.validateRequest(t);if(i.failure())return i.toQueryResult();lt(this,Rt,"f").verbose("calling getVitalSigns...");const a=yield this.handleQuery(lt(this,nn,"f").getVitalSigns({request:(r=t?.data())!==null&&r!==void 0?r:null}));return lt(this,Rt,"f").verbose("getVitalSigns complete"),a.hasError()&<(this,Rt,"f").error("getVitalSigns errors",a.error),new tr((n=a.data)===null||n===void 0?void 0:n.getVitalSigns,a.error)})}getVitalSignGroups(t){return En(this,void 0,void 0,function*(){var r,n;const i=this.validateRequest(t);if(i.failure())return i.toQueryResult();lt(this,Rt,"f").verbose("calling getVitalSignGroups...");const a=yield this.handleQuery(lt(this,nn,"f").getVitalSignGroups({request:(r=t?.data())!==null&&r!==void 0?r:null}));return lt(this,Rt,"f").verbose("getVitalSignGroups complete"),a.hasError()&<(this,Rt,"f").error("getVitalSignGroups errors",a.error),new tr((n=a.data)===null||n===void 0?void 0:n.getVitalSignGroups,a.error)})}getMedicationDispense(t){return En(this,void 0,void 0,function*(){var r;const n=this.validateRequest(t);if(n.failure())return n.toQueryResult();lt(this,Rt,"f").verbose("calling getMedicationDispense...");const i=yield this.handleQuery(lt(this,nn,"f").getMedicationDispense({request:(r=t?.data())!==null&&r!==void 0?r:null}));return lt(this,Rt,"f").verbose("getMedicationDispense complete"),i.hasError()&<(this,Rt,"f").error("getMedicationDispense errors",i.error),lt(this,rT,"f").create(i)})}getMedicationRequest(t){return En(this,void 0,void 0,function*(){var r;const n=this.validateRequest(t);if(n.failure())return n.toQueryResult();lt(this,Rt,"f").verbose("calling getMedicationRequest...");const i=yield this.handleQuery(lt(this,nn,"f").getMedicationRequest({request:(r=t?.data())!==null&&r!==void 0?r:null}));return lt(this,Rt,"f").verbose("getMedicationRequest complete"),i.hasError()&<(this,Rt,"f").error("getMedicationRequest errors",i.error),lt(this,tT,"f").create(i)})}getMedicationStatements(t){return En(this,void 0,void 0,function*(){var r,n;const i=this.validateRequest(t);if(i.failure())return i.toQueryResult();lt(this,Rt,"f").verbose("calling getMedicationStatements...");const a=yield this.handleQuery(lt(this,nn,"f").getMedicationStatements({request:(r=t?.data())!==null&&r!==void 0?r:null}));return lt(this,Rt,"f").verbose("getMedicationStatements complete"),a.hasError()&<(this,Rt,"f").error("getMedicationStatements errors",a.error),new tr((n=a.data)===null||n===void 0?void 0:n.getMedicationStatements,a.error)})}getMedicationGroups(t){return En(this,void 0,void 0,function*(){var r,n;const i=this.validateRequest(t);if(i.failure())return i.toQueryResult();lt(this,Rt,"f").verbose("calling getMedicationGroups...");const a=yield this.handleQuery(lt(this,nn,"f").getMedicationGroups({request:(r=t?.data())!==null&&r!==void 0?r:null}));return lt(this,Rt,"f").verbose("getMedicationGroups complete"),a.hasError()&<(this,Rt,"f").error("getMedicationGroups errors",a.error),new tr((n=a.data)===null||n===void 0?void 0:n.getMedicationGroups,a.error)})}getMedicationKnowledge(t){return En(this,void 0,void 0,function*(){var r;const n=this.validateRequest(t);if(n.failure())return n.toQueryResult();lt(this,Rt,"f").verbose("calling getMedicationKnowledge...");const i=yield this.handleQuery(lt(this,nn,"f").getMedicationKnowledge({request:t.data()}));return lt(this,Rt,"f").verbose("getMedicationKnowledge complete"),i.hasError()&<(this,Rt,"f").error("getMedicationKnowledge errors",i.error),new tr((r=i.data)===null||r===void 0?void 0:r.getMedicationKnowledge,i.error)})}getLabKnowledge(t){return En(this,void 0,void 0,function*(){var r;const n=this.validateRequest(t);if(n.failure())return n.toQueryResult();lt(this,Rt,"f").verbose("calling getLabKnowledge...");const i=yield this.handleQuery(lt(this,nn,"f").getLabKnowledge({request:t.data()}));return lt(this,Rt,"f").verbose("getLabKnowledge complete"),i.hasError()&<(this,Rt,"f").error("getLabKnowledge errors",i.error),new tr((r=i.data)===null||r===void 0?void 0:r.getLabKnowledge,i.error)})}getMedicationPricing(t){return En(this,void 0,void 0,function*(){var r;const n=this.validateRequest(t);if(n.failure())return n.toQueryResult();lt(this,Rt,"f").verbose("calling getMedicationPricing...");const i=yield this.handleQuery(lt(this,nn,"f").getMedicationPricing({request:t.data()}));return lt(this,Rt,"f").verbose("getMedicationPricing complete"),i.hasError()&<(this,Rt,"f").error("getMedicationPricing errors",i.error),new tr((r=i.data)===null||r===void 0?void 0:r.getMedicationPricing,i.error)})}getDiagnosticReportLabGroups(t){return En(this,void 0,void 0,function*(){var r,n;const i=this.validateRequest(t);if(i.failure())return i.toQueryResult();lt(this,Rt,"f").verbose("calling getDiagnosticReportLabGroups...");const a=yield this.handleQuery(lt(this,nn,"f").getDiagnosticReportLabGroups({request:(r=t?.data())!==null&&r!==void 0?r:null}));return lt(this,Rt,"f").verbose("getDiagnosticReportLabGroups complete"),a.hasError()&<(this,Rt,"f").error("getDiagnosticReportLabGroups errors",a.error),new tr((n=a.data)===null||n===void 0?void 0:n.getDiagnosticReportLabGroups,a.error)})}}nn=new WeakMap,Rt=new WeakMap,tT=new WeakMap,rT=new WeakMap;var Dre=function(e,t,r,n){function i(a){return a instanceof r?a:new r(function(u){u(a)})}return new(r||(r=Promise))(function(a,u){function c(p){try{_(n.next(p))}catch(L){u(L)}}function E(p){try{_(n.throw(p))}catch(L){u(L)}}function _(p){p.done?a(p.value):i(p.value).then(c,E)}_((n=n.apply(e,t||[])).next())})},qG=function(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r},ah=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},ul,nT;class wre extends Ts{constructor(t,r=new ji){super(),ul.set(this,void 0),nT.set(this,void 0),qG(this,nT,t,"f"),qG(this,ul,r.getLogger("GraphQLQuestionnaireManager"),"f")}nextQuestion(t){return Dre(this,void 0,void 0,function*(){const r=t.validate();if(r.failure())return r.intoFailure();ah(this,ul,"f").verbose("calling nextQuestion mutation...");const n=yield this.handleTransaction(ah(this,nT,"f").nextQuestion(t.data()));return ah(this,ul,"f").verbose("nextQuestion mutation complete"),n.failure()?(ah(this,ul,"f").error("nextQuestion mutation failed",n.error()),n.intoFailure()):(ah(this,ul,"f").info("successfully called nextQuestion mutation"),Kt.success(n.data().nextQuestion))})}}ul=new WeakMap,nT=new WeakMap;class wP{create(t){var r,n,i,a,u,c,E,_,p;const L=t.data(),W=null,ve=(r=L.searchTerm)!==null&&r!==void 0?r:null,me=(n=L.specialtyFilters)!==null&&n!==void 0?n:null,Oe=(i=L.includePopulatedPROAonly)!==null&&i!==void 0?i:!1,He=(a=L.organizationTypeFilters)!==null&&a!==void 0?a:null,qe=(u=L.gender)!==null&&u!==void 0?u:null,We=(c=L.location)!==null&&c!==void 0?c:null;let ct=null;ki(L.sortBy)&&(ct={field:(E=L.sortBy.field)!==null&&E!==void 0?E:null,order:(_=L.sortBy.order)!==null&&_!==void 0?_:null});const yt=(p=L.filterFields)!==null&&p!==void 0?p:null,jt=L.page,dr=L.pageSize;return{client:W,searchTerm:ve,specialtyFilters:me,includePopulatedPROAonly:Oe,organizationTypeFilters:He,gender:qe,location:We,sortBy:ct,filterFields:yt,page:jt,pageSize:dr}}}var Ure=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},UP;class xre{constructor(){UP.set(this,new wP)}create(t){const r=Ure(this,UP,"f").create(t);return r.client={data_sets:[Nm.Connecthub]},r}}UP=new WeakMap;var Fre=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},xP;class $re{constructor(){xP.set(this,new wP)}create(t){const r=Fre(this,xP,"f").create(t);return r.client={data_sets:[Nm.Nppes]},r}}xP=new WeakMap;class Vre{create(t){var r,n,i,a;const u=t.data();return{institution:(r=u.institution)!==null&&r!==void 0?r:null,provider:(n=u.provider)!==null&&n!==void 0?n:null,city:(i=u.city)!==null&&i!==void 0?i:null,state:(a=u.state)!==null&&a!==void 0?a:null}}}class Gre{create(t){var r,n,i,a,u,c,E;const _=t.data();return{searchInput:{client:_.client,filters:(r=_.filters)!==null&&r!==void 0?r:null,orderBy:(n=_.orderBy)!==null&&n!==void 0?n:null,paging:{pageNumber:(i=_.page)!==null&&i!==void 0?i:null,pageSize:(a=_.pageSize)!==null&&a!==void 0?a:null},search:(u=_.search)!==null&&u!==void 0?u:null,searchLocation:(c=_.searchLocation)!==null&&c!==void 0?c:null,user:(E=_.user)!==null&&E!==void 0?E:null}}}}var oh=function(e,t,r,n){function i(a){return a instanceof r?a:new r(function(u){u(a)})}return new(r||(r=Promise))(function(a,u){function c(p){try{_(n.next(p))}catch(L){u(L)}}function E(p){try{_(n.throw(p))}catch(L){u(L)}}function _(p){p.done?a(p.value):i(p.value).then(c,E)}_((n=n.apply(e,t||[])).next())})},KG=function(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r},_n=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},Yu,zn,FP,$P,VP,GP,BP;class Bre extends Ts{constructor(t,r=new ji){super(),Yu.set(this,void 0),zn.set(this,void 0),FP.set(this,new wP),$P.set(this,new $re),VP.set(this,new xre),GP.set(this,new Vre),BP.set(this,new Gre),KG(this,Yu,t,"f"),KG(this,zn,r.getLogger("GraphQLSearchManager"),"f")}searchHealthResources(t){return oh(this,void 0,void 0,function*(){var r;const n=t.validate();if(n.failure())return n.toQueryResult();_n(this,zn,"f").verbose("calling searchHealthResources query");const i=yield this.handleQuery(_n(this,Yu,"f").SearchHealthResources(_n(this,BP,"f").create(t)));return _n(this,zn,"f").verbose("searchHealthResources query complete"),i.hasError()?_n(this,zn,"f").error("searchHealthResources query failed",i.error):_n(this,zn,"f").info("successfully called searchHealthResources query"),new tr((r=i.data)===null||r===void 0?void 0:r.searchHealthResources,i.error)})}search(t){return oh(this,void 0,void 0,function*(){var r;const n=t.validate();if(n.failure())return n.toQueryResult();_n(this,zn,"f").verbose("calling providerSearch search query");const i=yield this.handleQuery(_n(this,Yu,"f").providerSearch(_n(this,FP,"f").create(t)));return _n(this,zn,"f").verbose("providerSearch search query complete"),i.hasError()?_n(this,zn,"f").error("providerSearch search query failed",i.error):_n(this,zn,"f").info("successfully called providerSearch search query"),new tr((r=i.data)===null||r===void 0?void 0:r.providers,i.error)})}searchProviders(t){return oh(this,void 0,void 0,function*(){var r;const n=t.validate();if(n.failure())return n.toQueryResult();_n(this,zn,"f").verbose("calling providerSearch searchProviders query");const i=yield this.handleQuery(_n(this,Yu,"f").providerSearch(_n(this,$P,"f").create(t)));return _n(this,zn,"f").verbose("providerSearch searchProviders query complete"),i.hasError()?_n(this,zn,"f").error("providerSearch searchProviders query failed",i.error):_n(this,zn,"f").info("successfully called providerSearch searchProviders query"),new tr((r=i.data)===null||r===void 0?void 0:r.providers,i.error)})}searchConnections(t){return oh(this,void 0,void 0,function*(){var r;const n=t.validate();if(n.failure())return n.toQueryResult();_n(this,zn,"f").verbose("calling providerSearch searchConnections query");const i=yield this.handleQuery(_n(this,Yu,"f").providerSearch(_n(this,VP,"f").create(t)));return _n(this,zn,"f").verbose("providerSearch searchConnections query complete"),i.hasError()?_n(this,zn,"f").error("providerSearch searchConnections query failed",i.error):_n(this,zn,"f").info("successfully called providerSearch searchConnections query"),new tr((r=i.data)===null||r===void 0?void 0:r.providers,i.error)})}requestConnection(t){return oh(this,void 0,void 0,function*(){_n(this,zn,"f").verbose("calling requestConnection mutation");const r=yield this.handleTransaction(_n(this,Yu,"f").requestConnection(_n(this,GP,"f").create(t)));return _n(this,zn,"f").verbose("requestConnection mutation complete"),r.failure()?(_n(this,zn,"f").error("requestConnection mutation failed",r),r.intoFailure()):(_n(this,zn,"f").info("requestConnection request success"),Kt.success(r.data().requestConnection))})}}Yu=new WeakMap,zn=new WeakMap,FP=new WeakMap,$P=new WeakMap,VP=new WeakMap,GP=new WeakMap,BP=new WeakMap;const kre="http://www.icanbwell.com/consent-category";class jre{create(t){const r=t.data(),n={status:r.status,provision:{type:r.provision}};return ki(r.organizationId)&&(n.organization=[{type:"Organization",reference:`Organization/${r.organizationId}`}]),ki(r.category)&&(n.category=[{coding:[{system:kre,code:r.category}]}]),{consentInput:n}}}class Hre{create(t){const r=t.data();return{exportId:r.exportId,password:r.password}}}class Yre{create(t){var r,n;const i=t.data();return{callbackURL:(r=i.callbackUrl)!==null&&r!==void 0?r:null,includeAttributeMatchingCheck:(n=i.includeAttributeMatchingCheck)!==null&&n!==void 0?n:null}}}class qre{create(t){return{categoryCode:t.data().category}}}var d_=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},qu,kP,WG,QG,zG,XG;class Kre{constructor(){qu.add(this)}create(t){const r=t.data(),n={resourceType:BC.Person};return d_(this,qu,"m",kP).call(this,"id",r.id,n),d_(this,qu,"m",kP).call(this,"birthDate",r.birthDate,n),d_(this,qu,"m",WG).call(this,r,n),d_(this,qu,"m",zG).call(this,r,n),d_(this,qu,"m",QG).call(this,r,n),d_(this,qu,"m",XG).call(this,r,n),{person:n}}}qu=new WeakSet,kP=function(t,r,n){ka(r)||(n[t]=r)},WG=function(t,r){let n=!1;const{firstName:i,lastName:a}=t,u={};Fn(i)&&(n=!0,u.given=[i]),Fn(a)&&(n=!0,u.family=a),n&&(r.name=[u])},QG=function(t,r){let n=!1;const{addressUnit:i,addressStreet:a,city:u,stateOrProvidence:c,postageOrZipCode:E}=t,_={};if(Fn(i)||Fn(a)){n=!0;const p=[];Fn(a)&&p.push(a),Fn(i)&&p.push(i),_.line=p}Fn(u)&&(n=!0,_.city=u),Fn(c)&&(n=!0,_.state=c),Fn(E)&&(n=!0,_.postalCode=E),n&&(r.address=[_])},zG=function(t,r){const n=t.gender;ka(n)||(r.gender=n)},XG=function(t,r){const n=[],{homePhone:i,mobilePhone:a,workPhone:u,email:c}=t;Fn(i)&&n.push({system:"phone",use:"home",value:i}),Fn(a)&&n.push({system:"phone",use:"mobile",value:a}),Fn(u)&&n.push({system:"phone",use:"work",value:u}),Fn(c)&&n.push({system:"email",value:c}),n.length!==0&&(r.telecom=n)};var Ku=function(e,t,r,n){function i(a){return a instanceof r?a:new r(function(u){u(a)})}return new(r||(r=Promise))(function(a,u){function c(p){try{_(n.next(p))}catch(L){u(L)}}function E(p){try{_(n.throw(p))}catch(L){u(L)}}function _(p){p.done?a(p.value):i(p.value).then(c,E)}_((n=n.apply(e,t||[])).next())})},JG=function(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r},fr=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},ko,jr,jP,HP,YP,qP,KP;class Wre extends Ts{constructor(t,r=new ji){super(),ko.set(this,void 0),jr.set(this,void 0),jP.set(this,new jre),HP.set(this,new Kre),YP.set(this,new qre),qP.set(this,new Hre),KP.set(this,new Yre),JG(this,ko,t,"f"),JG(this,jr,r.getLogger("GraphQLUserManager"),"f")}getProfile(){return Ku(this,void 0,void 0,function*(){var t;fr(this,jr,"f").verbose("calling getProfile...");const r=yield this.handleQuery(fr(this,ko,"f").getProfile());return fr(this,jr,"f").verbose("getProfile complete"),r.hasError()?fr(this,jr,"f").error("getProfile failed",r.error):fr(this,jr,"f").info("successfully called getProfile"),new tr((t=r.data)===null||t===void 0?void 0:t.userProfile,r.error)})}delete(){return Ku(this,void 0,void 0,function*(){fr(this,jr,"f").verbose("calling delete...");const t=yield this.handleTransaction(fr(this,ko,"f").delete());return fr(this,jr,"f").verbose("delete complete"),t.failure()?(fr(this,jr,"f").error("delete failed",t.error),t.intoFailure()):(fr(this,jr,"f").info("successfully called delete"),Kt.success(null))})}updateProfile(t){return Ku(this,void 0,void 0,function*(){fr(this,jr,"f").verbose("calling updateUserProfile");const r=yield this.handleTransaction(fr(this,ko,"f").updateUserProfile(fr(this,HP,"f").create(t)));return fr(this,jr,"f").verbose("updateUserProfile complete"),r.failure()?(fr(this,jr,"f").error("updateUserProfile error",r),r.intoFailure()):(fr(this,jr,"f").info("updateUserProfile success"),Kt.success(r.data().updateUserProfile))})}getConsents(t){return Ku(this,void 0,void 0,function*(){var r;const n=this.validateRequest(t);if(n.failure())return n.toQueryResult();fr(this,jr,"f").verbose("calling consent search query...");let i;t!==void 0&&(i=fr(this,YP,"f").create(t));const a=yield this.handleQuery(fr(this,ko,"f").searchConsent(i));return fr(this,jr,"f").verbose("consent search query complete"),a.hasError()?fr(this,jr,"f").error("consent search failed",a.error):fr(this,jr,"f").info("successfully called consent search query"),new tr((r=a.data)===null||r===void 0?void 0:r.search,a.error)})}createConsent(t){return Ku(this,void 0,void 0,function*(){const r=t.validate();if(r.failure())return r;fr(this,jr,"f").verbose("calling createConsent mutation...");const n=yield this.handleTransaction(fr(this,ko,"f").createConsent(fr(this,jP,"f").create(t)));return fr(this,jr,"f").verbose("createConsent mutation complete"),n.failure()?(fr(this,jr,"f").error("createConsent mutation error",n),n.intoFailure()):(fr(this,jr,"f").info("createConsent mutation success"),Kt.success(n.data().createConsent))})}createDataExportDirectDownloadUrl(t){return Ku(this,void 0,void 0,function*(){const r=t.validate();if(r.failure())return r;fr(this,jr,"f").verbose("calling createDataExportDirectDownloadUrl mutation...");const n=yield this.handleTransaction(fr(this,ko,"f").CreateDataExportDirectDownloadUrl(fr(this,qP,"f").create(t)));return fr(this,jr,"f").verbose("createDataExportDirectDownloadUrl mutation complete"),n.failure()?(fr(this,jr,"f").error("createDataExportDirectDownloadUrl mutation error",n),n.intoFailure()):(fr(this,jr,"f").info("createDataExportDirectDownloadUrl mutation success"),Kt.success(n.data().createDataExportDirectDownloadUrl))})}createVerificationUrl(t){return Ku(this,void 0,void 0,function*(){fr(this,jr,"f").verbose("calling createVerificationUrl mutation...");const r=yield this.handleTransaction(fr(this,ko,"f").CreateVerificationUrl(fr(this,KP,"f").create(t)));return fr(this,jr,"f").verbose("createVerificationUrl complete"),r.failure()?(fr(this,jr,"f").error("createVerificationUrl error",r),r.intoFailure()):(fr(this,jr,"f").info("createVerificationUrl success"),Kt.success(r.data().createVerificationUrl))})}getVerificationStatus(){return Ku(this,void 0,void 0,function*(){fr(this,jr,"f").verbose("calling getVerificationStatus query...");const t=yield this.handleTransaction(fr(this,ko,"f").VerificationStatus());return fr(this,jr,"f").verbose("getVerificationStatus complete"),t.failure()?(fr(this,jr,"f").error("getVerificationStatus error",t),t.intoFailure()):(fr(this,jr,"f").info("getVerificationStatus success"),Kt.success(t.data().verificationStatus))})}}ko=new WeakMap,jr=new WeakMap,jP=new WeakMap,HP=new WeakMap,YP=new WeakMap,qP=new WeakMap,KP=new WeakMap;var ZG=function(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r},As=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},iT,uo;class Qre{constructor(t,r,n){iT.set(this,void 0),uo.set(this,void 0),ZG(this,iT,r.getLogger("GraphQLAPIProvider"),"f"),ZG(this,uo,t,"f"),As(this,iT,"f").verbose("initializing GraphQLClient"),this.activity=new vre(As(this,uo,"f"),r),this.connection=new mre(As(this,uo,"f"),r),this.device=new yre(As(this,uo,"f"),r),this.event=new bre(As(this,uo,"f"),r),this.health=new Lre(As(this,uo,"f"),r),this.healthSpace=new Mre(As(this,uo,"f"),r),this.user=new Wre(As(this,uo,"f"),r),this.search=new Bre(As(this,uo,"f"),r),this.questionnaire=new wre(As(this,uo,"f"),r),this.language=new _re(n)}}iT=new WeakMap,uo=new WeakMap;class zre{createApiProvider(t,r,n){const{sdk:i,client:a}=UG(t.graphQL.apiUrl,r,t.bwellConfig.language);return new Qre(i,n,a)}}var p_=function(e,t,r,n){function i(a){return a instanceof r?a:new r(function(u){u(a)})}return new(r||(r=Promise))(function(a,u){function c(p){try{_(n.next(p))}catch(L){u(L)}}function E(p){try{_(n.throw(p))}catch(L){u(L)}}function _(p){p.done?a(p.value):i(p.value).then(c,E)}_((n=n.apply(e,t||[])).next())})},eB=function(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r},dn=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},Zs,Pn;class Xre extends Ts{constructor(t,r=new ji){super(),Zs.set(this,void 0),Pn.set(this,void 0),eB(this,Zs,t,"f"),eB(this,Pn,r.getLogger("GraphQLIdentityManager"),"f")}initialize(t){return p_(this,void 0,void 0,function*(){dn(this,Pn,"f").verbose("executing initialize query...",{clientKey:t});const r=yield this.handleTransaction(dn(this,Zs,"f").initialize({clientKey:t}));return dn(this,Pn,"f").verbose("initialize query complete",r),r.failure()?(dn(this,Pn,"f").error("initialize failed.",r),r.intoFailure()):(dn(this,Pn,"f").info("successfully called initialize"),Kt.success(r.data().initSdk))})}authenticateWithOauth(t){return p_(this,void 0,void 0,function*(){dn(this,Pn,"f").verbose("exectuting oauth authenticate query...");const r=yield this.handleTransaction(dn(this,Zs,"f").authenticate({},{Authorization:t.jweToken,ClientKey:t.clientKey}));if(dn(this,Pn,"f").verbose("oauth authenticate query complete",r),r.failure())return dn(this,Pn,"f").error("oauth authenticate failed",r),r.intoFailure();dn(this,Pn,"f").info("oauth authenticate success");const n=r.data(),i={accessToken:n.getToken.accessToken.jwtToken,idToken:n.getToken.idToken.jwtToken,refreshToken:n.getToken.refreshToken.token};return Kt.success(i)})}authenticateWithUsernamePassword(t){return p_(this,void 0,void 0,function*(){dn(this,Pn,"f").verbose("exectuting username/password authenticate query...");const r=yield this.handleTransaction(dn(this,Zs,"f").login({email:t.email,password:t.password},{ClientKey:t.clientKey}));if(dn(this,Pn,"f").verbose("username/password authenticate query complete",r),r.failure())return dn(this,Pn,"f").error("username/password authenticate failed",r),r.intoFailure();dn(this,Pn,"f").info("username/password authenticate success");const n=r.data(),i={accessToken:n.login.accessToken.jwtToken,idToken:n.login.idToken.jwtToken,refreshToken:n.login.refreshToken.token};return Kt.success(i)})}authenticateWithAuthCode(t){return p_(this,void 0,void 0,function*(){dn(this,Pn,"f").verbose("executing authenticateWithAuthCode query...");const r=yield this.handleTransaction(dn(this,Zs,"f").ExchangeAuthCode({authCode:t.authCode}));if(dn(this,Pn,"f").verbose("authenticateWithAuthCode query complete",r),r.failure())return dn(this,Pn,"f").error("authenticateWithAuthCode failed",r),r.intoFailure();dn(this,Pn,"f").info("authenticateWithAuthCode successful");const n=r.data(),i={accessToken:n.exchangeAuthCode.accessToken.jwtToken,idToken:n.exchangeAuthCode.idToken.jwtToken,refreshToken:n.exchangeAuthCode.refreshToken.token};return Kt.success(i)})}refreshAccessToken(t){return p_(this,void 0,void 0,function*(){dn(this,Pn,"f").verbose("executing refreshAccessToken query...");const r=yield this.handleTransaction(dn(this,Zs,"f").refreshTokens({},{refresh_token:t.refreshToken,clientkey:t.clientKey}));return dn(this,Pn,"f").verbose("refreshAccessToken query complete",r),r.failure()?(dn(this,Pn,"f").error("refreshAccessToken failed",r),r.intoFailure()):(dn(this,Pn,"f").info("refreshAccessToken successful"),Kt.success(r.data().refresh))})}createGuestAccessToken(t){return p_(this,void 0,void 0,function*(){dn(this,Pn,"f").verbose("executing createGuestAccessToken mutation...",t);const r=yield this.handleTransaction(dn(this,Zs,"f").createGuestAccessToken(t));if(dn(this,Pn,"f").verbose("createGuestAccessToken mutation complete",r),r.failure())return dn(this,Pn,"f").error("createGuestAccessToken failed",r),r.intoFailure();dn(this,Pn,"f").info("createGuestAccessToken successful");const n=r.data();return Kt.success(n.createGuestAccessToken)})}}Zs=new WeakMap,Pn=new WeakMap;class Jre{createIdentityManager(t,r){const{sdk:n}=UG(t.graphQL.unauthApiUrl);return new Xre(n,r)}}function WP(e,t){const r=Object.keys(e);return r.length===t.length&&r.every(n=>t.includes(n))}function tB(e){return"token"in e&&WP(e,["token"])}function rB(e){return"email"in e&&"password"in e&&WP(e,["email","password"])}function nB(e){return"authCode"in e&&WP(e,["authCode"])}var Zre=function(e,t,r,n){function i(a){return a instanceof r?a:new r(function(u){u(a)})}return new(r||(r=Promise))(function(a,u){function c(p){try{_(n.next(p))}catch(L){u(L)}}function E(p){try{_(n.throw(p))}catch(L){u(L)}}function _(p){p.done?a(p.value):i(p.value).then(c,E)}_((n=n.apply(e,t||[])).next())})},QP=function(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r},sh=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},aT,h_,oT;class ene{constructor(t,r,n=new ji){aT.set(this,void 0),h_.set(this,void 0),oT.set(this,void 0),QP(this,aT,r,"f"),QP(this,oT,t,"f"),QP(this,h_,n.getLogger("OAuthStrategy"),"f")}authenticate(t){return Zre(this,void 0,void 0,function*(){if(!tB(t))return sh(this,h_,"f").error("Incorrect credentials type provided to OAuthStrategy"),Kt.failure(new LC("Expected OAuthCredentials",t));sh(this,h_,"f").verbose("authenticating via OAuth strategy...");const r=yield sh(this,aT,"f").authenticateWithOauth({jweToken:t.token,clientKey:sh(this,oT,"f").context.clientKey});return sh(this,h_,"f").verbose("finished OAuth authentication"),r})}}aT=new WeakMap,h_=new WeakMap,oT=new WeakMap;var tne=function(e,t,r,n){function i(a){return a instanceof r?a:new r(function(u){u(a)})}return new(r||(r=Promise))(function(a,u){function c(p){try{_(n.next(p))}catch(L){u(L)}}function E(p){try{_(n.throw(p))}catch(L){u(L)}}function _(p){p.done?a(p.value):i(p.value).then(c,E)}_((n=n.apply(e,t||[])).next())})},zP=function(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r},uh=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},sT,S_,uT;class rne{constructor(t,r,n=new ji){sT.set(this,void 0),S_.set(this,void 0),uT.set(this,void 0),zP(this,sT,r,"f"),zP(this,uT,t,"f"),zP(this,S_,n.getLogger("AuthCodeStrategy"),"f")}authenticate(t){return tne(this,void 0,void 0,function*(){if(!nB(t))return uh(this,S_,"f").error("Incorrect credentials type provided to AuthCodeStrategy"),Kt.failure(new LC("Expected AuthCodeCredentials",t));uh(this,S_,"f").verbose("authenticating via AuthCode strategy...");const r=yield uh(this,sT,"f").authenticateWithAuthCode({authCode:t.authCode,clientKey:uh(this,uT,"f").context.clientKey});return uh(this,S_,"f").verbose("finished AuthCode authentication"),r})}}sT=new WeakMap,S_=new WeakMap,uT=new WeakMap;var nne=function(e,t,r,n){function i(a){return a instanceof r?a:new r(function(u){u(a)})}return new(r||(r=Promise))(function(a,u){function c(p){try{_(n.next(p))}catch(L){u(L)}}function E(p){try{_(n.throw(p))}catch(L){u(L)}}function _(p){p.done?a(p.value):i(p.value).then(c,E)}_((n=n.apply(e,t||[])).next())})},XP=function(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r},ch=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},cT,E_,lT;class ine{constructor(t,r,n=new ji){cT.set(this,void 0),E_.set(this,void 0),lT.set(this,void 0),XP(this,cT,r,"f"),XP(this,lT,t,"f"),XP(this,E_,n.getLogger("UsernamePasswordStrategy"),"f")}authenticate(t){return nne(this,void 0,void 0,function*(){if(!rB(t))return ch(this,E_,"f").error("Invalid credentials type provided to UsernamePasswordStrategy. Please provide username and password."),Kt.failure(new LC("Expected UserPassCredentials",t));ch(this,E_,"f").verbose("authenticating via UsernamePassword strategy...");const r=yield ch(this,cT,"f").authenticateWithUsernamePassword({clientKey:ch(this,lT,"f").context.clientKey,email:t.email,password:t.password});return ch(this,E_,"f").verbose("finished OAuth authentication"),r})}}cT=new WeakMap,E_=new WeakMap,lT=new WeakMap;class ane{createAuthStrategy(t,r,n,i=new ji){if(rB(n))return new ine(t,r,i);if(tB(n))return new ene(t,r,i);if(nB(n))return new rne(t,r,i);throw new Error("Invalid credentials type provided; expected UserPassCredentials, OauthCredentials or AuthCodeCredentials.")}}var one=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof h.g=="object"?h.g:{},cl="1.9.0",iB=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;function sne(e){var t=new Set([e]),r=new Set,n=e.match(iB);if(!n)return function(){return!1};var i={major:+n[1],minor:+n[2],patch:+n[3],prerelease:n[4]};if(i.prerelease!=null)return function(E){return E===e};function a(c){return r.add(c),!1}function u(c){return t.add(c),!0}return function(E){if(t.has(E))return!0;if(r.has(E))return!1;var _=E.match(iB);if(!_)return a(E);var p={major:+_[1],minor:+_[2],patch:+_[3],prerelease:_[4]};return p.prerelease!=null||i.major!==p.major?a(E):i.major===0?i.minor===p.minor&&i.patch<=p.patch?u(E):a(E):i.minor<=p.minor?u(E):a(E)}}var une=sne(cl),cne=cl.split(".")[0],lh=Symbol.for("opentelemetry.js.api."+cne),fh=one;function _h(e,t,r,n){var i;n===void 0&&(n=!1);var a=fh[lh]=(i=fh[lh])!==null&&i!==void 0?i:{version:cl};if(!n&&a[e]){var u=new Error("@opentelemetry/api: Attempted duplicate registration of API: "+e);return r.error(u.stack||u.message),!1}if(a.version!==cl){var u=new Error("@opentelemetry/api: Registration of version v"+a.version+" for "+e+" does not match previously registered API v"+cl);return r.error(u.stack||u.message),!1}return a[e]=t,r.debug("@opentelemetry/api: Registered a global for "+e+" v"+cl+"."),!0}function ll(e){var t,r,n=(t=fh[lh])===null||t===void 0?void 0:t.version;if(!(!n||!une(n)))return(r=fh[lh])===null||r===void 0?void 0:r[e]}function dh(e,t){t.debug("@opentelemetry/api: Unregistering a global for "+e+" v"+cl+".");var r=fh[lh];r&&delete r[e]}function fT(e){return Symbol.for(e)}var lne=function(){function e(t){var r=this;r._currentContext=t?new Map(t):new Map,r.getValue=function(n){return r._currentContext.get(n)},r.setValue=function(n,i){var a=new e(r._currentContext);return a._currentContext.set(n,i),a},r.deleteValue=function(n){var i=new e(r._currentContext);return i._currentContext.delete(n),i}}return e}(),v_=new lne,fne=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,a=[],u;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)a.push(i.value)}catch(c){u={error:c}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(u)throw u.error}}return a},_ne=function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,a;n<i;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))},dne=function(){function e(){}return e.prototype.active=function(){return v_},e.prototype.with=function(t,r,n){for(var i=[],a=3;a<arguments.length;a++)i[a-3]=arguments[a];return r.call.apply(r,_ne([n],fne(i),!1))},e.prototype.bind=function(t,r){return r},e.prototype.enable=function(){return this},e.prototype.disable=function(){return this},e}(),pne=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,a=[],u;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)a.push(i.value)}catch(c){u={error:c}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(u)throw u.error}}return a},hne=function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,a;n<i;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))},Sne=function(){function e(t){this._namespace=t.namespace||"DiagComponentLogger"}return e.prototype.debug=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return ph("debug",this._namespace,t)},e.prototype.error=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return ph("error",this._namespace,t)},e.prototype.info=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return ph("info",this._namespace,t)},e.prototype.warn=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return ph("warn",this._namespace,t)},e.prototype.verbose=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return ph("verbose",this._namespace,t)},e}();function ph(e,t,r){var n=ll("diag");if(!!n)return r.unshift(t),n[e].apply(n,hne([],pne(r),!1))}var vn;(function(e){e[e.NONE=0]="NONE",e[e.ERROR=30]="ERROR",e[e.WARN=50]="WARN",e[e.INFO=60]="INFO",e[e.DEBUG=70]="DEBUG",e[e.VERBOSE=80]="VERBOSE",e[e.ALL=9999]="ALL"})(vn||(vn={}));function Ene(e,t){e<vn.NONE?e=vn.NONE:e>vn.ALL&&(e=vn.ALL),t=t||{};function r(n,i){var a=t[n];return typeof a=="function"&&e>=i?a.bind(t):function(){}}return{error:r("error",vn.ERROR),warn:r("warn",vn.WARN),info:r("info",vn.INFO),debug:r("debug",vn.DEBUG),verbose:r("verbose",vn.VERBOSE)}}var vne=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,a=[],u;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)a.push(i.value)}catch(c){u={error:c}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(u)throw u.error}}return a},mne=function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,a;n<i;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))},Tne="diag",gs=function(){function e(){function t(i){return function(){for(var a=[],u=0;u<arguments.length;u++)a[u]=arguments[u];var c=ll("diag");if(!!c)return c[i].apply(c,mne([],vne(a),!1))}}var r=this,n=function(i,a){var u,c,E;if(a===void 0&&(a={logLevel:vn.INFO}),i===r){var _=new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");return r.error((u=_.stack)!==null&&u!==void 0?u:_.message),!1}typeof a=="number"&&(a={logLevel:a});var p=ll("diag"),L=Ene((c=a.logLevel)!==null&&c!==void 0?c:vn.INFO,i);if(p&&!a.suppressOverrideMessage){var W=(E=new Error().stack)!==null&&E!==void 0?E:"<failed to generate stacktrace>";p.warn("Current logger will be overwritten from "+W),L.warn("Current logger will overwrite one already registered from "+W)}return _h("diag",L,r,!0)};r.setLogger=n,r.disable=function(){dh(Tne,r)},r.createComponentLogger=function(i){return new Sne(i)},r.verbose=t("verbose"),r.debug=t("debug"),r.info=t("info"),r.warn=t("warn"),r.error=t("error")}return e.instance=function(){return this._instance||(this._instance=new e),this._instance},e}(),Ane=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,a=[],u;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)a.push(i.value)}catch(c){u={error:c}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(u)throw u.error}}return a},gne=function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,a;n<i;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))},JP="context",yne=new dne,_T=function(){function e(){}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalContextManager=function(t){return _h(JP,t,gs.instance())},e.prototype.active=function(){return this._getContextManager().active()},e.prototype.with=function(t,r,n){for(var i,a=[],u=3;u<arguments.length;u++)a[u-3]=arguments[u];return(i=this._getContextManager()).with.apply(i,gne([t,r,n],Ane(a),!1))},e.prototype.bind=function(t,r){return this._getContextManager().bind(t,r)},e.prototype._getContextManager=function(){return ll(JP)||yne},e.prototype.disable=function(){this._getContextManager().disable(),dh(JP,gs.instance())},e}(),ys;(function(e){e[e.NONE=0]="NONE",e[e.SAMPLED=1]="SAMPLED"})(ys||(ys={}));var aB="0000000000000000",oB="00000000000000000000000000000000",sB={traceId:oB,spanId:aB,traceFlags:ys.NONE},hh=function(){function e(t){t===void 0&&(t=sB),this._spanContext=t}return e.prototype.spanContext=function(){return this._spanContext},e.prototype.setAttribute=function(t,r){return this},e.prototype.setAttributes=function(t){return this},e.prototype.addEvent=function(t,r){return this},e.prototype.addLink=function(t){return this},e.prototype.addLinks=function(t){return this},e.prototype.setStatus=function(t){return this},e.prototype.updateName=function(t){return this},e.prototype.end=function(t){},e.prototype.isRecording=function(){return!1},e.prototype.recordException=function(t,r){},e}(),ZP=fT("OpenTelemetry Context Key SPAN");function eM(e){return e.getValue(ZP)||void 0}function Rne(){return eM(_T.getInstance().active())}function tM(e,t){return e.setValue(ZP,t)}function One(e){return e.deleteValue(ZP)}function bne(e,t){return tM(e,new hh(t))}function uB(e){var t;return(t=eM(e))===null||t===void 0?void 0:t.spanContext()}var Cne=/^([0-9a-f]{32})$/i,Pne=/^[0-9a-f]{16}$/i;function cB(e){return Cne.test(e)&&e!==oB}function Mne(e){return Pne.test(e)&&e!==aB}function m_(e){return cB(e.traceId)&&Mne(e.spanId)}function Ine(e){return new hh(e)}var rM=_T.getInstance(),lB=function(){function e(){}return e.prototype.startSpan=function(t,r,n){n===void 0&&(n=rM.active());var i=Boolean(r?.root);if(i)return new hh;var a=n&&uB(n);return Nne(a)&&m_(a)?new hh(a):new hh},e.prototype.startActiveSpan=function(t,r,n,i){var a,u,c;if(!(arguments.length<2)){arguments.length===2?c=r:arguments.length===3?(a=r,c=n):(a=r,u=n,c=i);var E=u??rM.active(),_=this.startSpan(t,a,E),p=tM(E,_);return rM.with(p,c,void 0,_)}},e}();function Nne(e){return typeof e=="object"&&typeof e.spanId=="string"&&typeof e.traceId=="string"&&typeof e.traceFlags=="number"}var Lne=new lB,Dne=function(){function e(t,r,n,i){this._provider=t,this.name=r,this.version=n,this.options=i}return e.prototype.startSpan=function(t,r,n){return this._getTracer().startSpan(t,r,n)},e.prototype.startActiveSpan=function(t,r,n,i){var a=this._getTracer();return Reflect.apply(a.startActiveSpan,a,arguments)},e.prototype._getTracer=function(){if(this._delegate)return this._delegate;var t=this._provider.getDelegateTracer(this.name,this.version,this.options);return t?(this._delegate=t,this._delegate):Lne},e}(),wne=function(){function e(){}return e.prototype.getTracer=function(t,r,n){return new lB},e}(),Une=new wne,fB=function(){function e(){}return e.prototype.getTracer=function(t,r,n){var i;return(i=this.getDelegateTracer(t,r,n))!==null&&i!==void 0?i:new Dne(this,t,r,n)},e.prototype.getDelegate=function(){var t;return(t=this._delegate)!==null&&t!==void 0?t:Une},e.prototype.setDelegate=function(t){this._delegate=t},e.prototype.getDelegateTracer=function(t,r,n){var i;return(i=this._delegate)===null||i===void 0?void 0:i.getTracer(t,r,n)},e}(),nM="trace",xne=function(){function e(){this._proxyTracerProvider=new fB,this.wrapSpanContext=Ine,this.isSpanContextValid=m_,this.deleteSpan=One,this.getSpan=eM,this.getActiveSpan=Rne,this.getSpanContext=uB,this.setSpan=tM,this.setSpanContext=bne}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalTracerProvider=function(t){var r=_h(nM,this._proxyTracerProvider,gs.instance());return r&&this._proxyTracerProvider.setDelegate(t),r},e.prototype.getTracerProvider=function(){return ll(nM)||this._proxyTracerProvider},e.prototype.getTracer=function(t,r){return this.getTracerProvider().getTracer(t,r)},e.prototype.disable=function(){dh(nM,gs.instance()),this._proxyTracerProvider=new fB},e}(),ta=xne.getInstance(),iM=fT("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function Fne(e){return e.setValue(iM,!0)}function xUe(e){return e.deleteValue(iM)}function $ne(e){return e.getValue(iM)===!0}var aM="[_0-9a-z-*/]",Vne="[a-z]"+aM+"{0,255}",Gne="[a-z0-9]"+aM+"{0,240}@[a-z]"+aM+"{0,13}",Bne=new RegExp("^(?:"+Vne+"|"+Gne+")$"),kne=/^[ -~]{0,255}[!-~]$/,jne=/,|=/;function Hne(e){return Bne.test(e)}function Yne(e){return kne.test(e)&&!jne.test(e)}var _B=32,qne=512,dB=",",pB="=",Kne=function(){function e(t){this._internalState=new Map,t&&this._parse(t)}return e.prototype.set=function(t,r){var n=this._clone();return n._internalState.has(t)&&n._internalState.delete(t),n._internalState.set(t,r),n},e.prototype.unset=function(t){var r=this._clone();return r._internalState.delete(t),r},e.prototype.get=function(t){return this._internalState.get(t)},e.prototype.serialize=function(){var t=this;return this._keys().reduce(function(r,n){return r.push(n+pB+t.get(n)),r},[]).join(dB)},e.prototype._parse=function(t){t.length>qne||(this._internalState=t.split(dB).reverse().reduce(function(r,n){var i=n.trim(),a=i.indexOf(pB);if(a!==-1){var u=i.slice(0,a),c=i.slice(a+1,n.length);Hne(u)&&Yne(c)&&r.set(u,c)}return r},new Map),this._internalState.size>_B&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,_B))))},e.prototype._keys=function(){return Array.from(this._internalState.keys()).reverse()},e.prototype._clone=function(){var t=new e;return t._internalState=new Map(this._internalState),t},e}(),oM="traceparent",sM="tracestate",Wne="00",Qne="(?!ff)[\\da-f]{2}",zne="(?![0]{32})[\\da-f]{32}",Xne="(?![0]{16})[\\da-f]{16}",Jne="[\\da-f]{2}",Zne=new RegExp("^\\s?("+Qne+")-("+zne+")-("+Xne+")-("+Jne+")(-.*)?\\s?$");function eie(e){var t=Zne.exec(e);return!t||t[1]==="00"&&t[5]?null:{traceId:t[2],spanId:t[3],traceFlags:parseInt(t[4],16)}}var tie=function(){function e(){}return e.prototype.inject=function(t,r,n){var i=ta.getSpanContext(t);if(!(!i||$ne(t)||!m_(i))){var a=Wne+"-"+i.traceId+"-"+i.spanId+"-0"+Number(i.traceFlags||ys.NONE).toString(16);n.set(r,oM,a),i.traceState&&n.set(r,sM,i.traceState.serialize())}},e.prototype.extract=function(t,r,n){var i=n.get(r,oM);if(!i)return t;var a=Array.isArray(i)?i[0]:i;if(typeof a!="string")return t;var u=eie(a);if(!u)return t;u.isRemote=!0;var c=n.get(r,sM);if(c){var E=Array.isArray(c)?c.join(","):c;u.traceState=new Kne(typeof E=="string"?E:void 0)}return ta.setSpanContext(t,u)},e.prototype.fields=function(){return[oM,sM]},e}(),rie=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof h.g=="object"?h.g:{},fl="1.6.0",hB=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;function nie(e){var t=new Set([e]),r=new Set,n=e.match(hB);if(!n)return function(){return!1};var i={major:+n[1],minor:+n[2],patch:+n[3],prerelease:n[4]};if(i.prerelease!=null)return function(E){return E===e};function a(c){return r.add(c),!1}function u(c){return t.add(c),!0}return function(E){if(t.has(E))return!0;if(r.has(E))return!1;var _=E.match(hB);if(!_)return a(E);var p={major:+_[1],minor:+_[2],patch:+_[3],prerelease:_[4]};return p.prerelease!=null||i.major!==p.major?a(E):i.major===0?i.minor===p.minor&&i.patch<=p.patch?u(E):a(E):i.minor<=p.minor?u(E):a(E)}}var iie=nie(fl),aie=fl.split(".")[0],Sh=Symbol.for("opentelemetry.js.api."+aie),Eh=rie;function oie(e,t,r,n){var i;n===void 0&&(n=!1);var a=Eh[Sh]=(i=Eh[Sh])!==null&&i!==void 0?i:{version:fl};if(!n&&a[e]){var u=new Error("@opentelemetry/api: Attempted duplicate registration of API: "+e);return r.error(u.stack||u.message),!1}if(a.version!==fl){var u=new Error("@opentelemetry/api: Registration of version v"+a.version+" for "+e+" does not match previously registered API v"+fl);return r.error(u.stack||u.message),!1}return a[e]=t,r.debug("@opentelemetry/api: Registered a global for "+e+" v"+fl+"."),!0}function uM(e){var t,r,n=(t=Eh[Sh])===null||t===void 0?void 0:t.version;if(!(!n||!iie(n)))return(r=Eh[Sh])===null||r===void 0?void 0:r[e]}function sie(e,t){t.debug("@opentelemetry/api: Unregistering a global for "+e+" v"+fl+".");var r=Eh[Sh];r&&delete r[e]}var uie=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,a=[],u;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)a.push(i.value)}catch(c){u={error:c}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(u)throw u.error}}return a},cie=function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,a;n<i;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))},lie=function(){function e(t){this._namespace=t.namespace||"DiagComponentLogger"}return e.prototype.debug=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return vh("debug",this._namespace,t)},e.prototype.error=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return vh("error",this._namespace,t)},e.prototype.info=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return vh("info",this._namespace,t)},e.prototype.warn=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return vh("warn",this._namespace,t)},e.prototype.verbose=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return vh("verbose",this._namespace,t)},e}();function vh(e,t,r){var n=uM("diag");if(!!n)return r.unshift(t),n[e].apply(n,cie([],uie(r),!1))}var ci;(function(e){e[e.NONE=0]="NONE",e[e.ERROR=30]="ERROR",e[e.WARN=50]="WARN",e[e.INFO=60]="INFO",e[e.DEBUG=70]="DEBUG",e[e.VERBOSE=80]="VERBOSE",e[e.ALL=9999]="ALL"})(ci||(ci={}));function fie(e,t){e<ci.NONE?e=ci.NONE:e>ci.ALL&&(e=ci.ALL),t=t||{};function r(n,i){var a=t[n];return typeof a=="function"&&e>=i?a.bind(t):function(){}}return{error:r("error",ci.ERROR),warn:r("warn",ci.WARN),info:r("info",ci.INFO),debug:r("debug",ci.DEBUG),verbose:r("verbose",ci.VERBOSE)}}var _ie=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,a=[],u;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)a.push(i.value)}catch(c){u={error:c}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(u)throw u.error}}return a},die=function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,a;n<i;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))},pie="diag",SB=function(){function e(){function t(i){return function(){for(var a=[],u=0;u<arguments.length;u++)a[u]=arguments[u];var c=uM("diag");if(!!c)return c[i].apply(c,die([],_ie(a),!1))}}var r=this,n=function(i,a){var u,c,E;if(a===void 0&&(a={logLevel:ci.INFO}),i===r){var _=new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");return r.error((u=_.stack)!==null&&u!==void 0?u:_.message),!1}typeof a=="number"&&(a={logLevel:a});var p=uM("diag"),L=fie((c=a.logLevel)!==null&&c!==void 0?c:ci.INFO,i);if(p&&!a.suppressOverrideMessage){var W=(E=new Error().stack)!==null&&E!==void 0?E:"<failed to generate stacktrace>";p.warn("Current logger will be overwritten from "+W),L.warn("Current logger will overwrite one already registered from "+W)}return oie("diag",L,r,!0)};r.setLogger=n,r.disable=function(){sie(pie,r)},r.createComponentLogger=function(i){return new lie(i)},r.verbose=t("verbose"),r.debug=t("debug"),r.info=t("info"),r.warn=t("warn"),r.error=t("error")}return e.instance=function(){return this._instance||(this._instance=new e),this._instance},e}(),Wu=SB.instance(),hie=function(){function e(){var t=this;this._promise=new Promise(function(r,n){t._resolve=r,t._reject=n})}return Object.defineProperty(e.prototype,"promise",{get:function(){return this._promise},enumerable:!1,configurable:!0}),e.prototype.resolve=function(t){this._resolve(t)},e.prototype.reject=function(t){this._reject(t)},e}(),Sie=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,a=[],u;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)a.push(i.value)}catch(c){u={error:c}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(u)throw u.error}}return a},Eie=function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,a;n<i;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))},vie=function(){function e(t,r){this._callback=t,this._that=r,this._isCalled=!1,this._deferred=new hie}return Object.defineProperty(e.prototype,"isCalled",{get:function(){return this._isCalled},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"promise",{get:function(){return this._deferred.promise},enumerable:!1,configurable:!0}),e.prototype.call=function(){for(var t,r=this,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];if(!this._isCalled){this._isCalled=!0;try{Promise.resolve((t=this._callback).call.apply(t,Eie([this._that],Sie(n),!1))).then(function(a){return r._deferred.resolve(a)},function(a){return r._deferred.reject(a)})}catch(a){this._deferred.reject(a)}}return this._deferred.promise},e}(),T_;(function(e){e[e.SUCCESS=0]="SUCCESS",e[e.FAILED=1]="FAILED"})(T_||(T_={}));var cM;(function(e){e.AlwaysOff="always_off",e.AlwaysOn="always_on",e.ParentBasedAlwaysOff="parentbased_always_off",e.ParentBasedAlwaysOn="parentbased_always_on",e.ParentBasedTraceIdRatio="parentbased_traceidratio",e.TraceIdRatio="traceidratio"})(cM||(cM={}));var mie=",",Tie=["OTEL_SDK_DISABLED"];function Aie(e){return Tie.indexOf(e)>-1}var gie=["OTEL_BSP_EXPORT_TIMEOUT","OTEL_BSP_MAX_EXPORT_BATCH_SIZE","OTEL_BSP_MAX_QUEUE_SIZE","OTEL_BSP_SCHEDULE_DELAY","OTEL_BLRP_EXPORT_TIMEOUT","OTEL_BLRP_MAX_EXPORT_BATCH_SIZE","OTEL_BLRP_MAX_QUEUE_SIZE","OTEL_BLRP_SCHEDULE_DELAY","OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_ATTRIBUTE_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT","OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT","OTEL_SPAN_EVENT_COUNT_LIMIT","OTEL_SPAN_LINK_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT","OTEL_EXPORTER_OTLP_TIMEOUT","OTEL_EXPORTER_OTLP_TRACES_TIMEOUT","OTEL_EXPORTER_OTLP_METRICS_TIMEOUT","OTEL_EXPORTER_OTLP_LOGS_TIMEOUT","OTEL_EXPORTER_JAEGER_AGENT_PORT"];function yie(e){return gie.indexOf(e)>-1}var Rie=["OTEL_NO_PATCH_MODULES","OTEL_PROPAGATORS"];function Oie(e){return Rie.indexOf(e)>-1}var lM=1/0,fM=128,bie=128,Cie=128,EB={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:ci.INFO,OTEL_NO_PATCH_MODULES:[],OTEL_PROPAGATORS:["tracecontext","baggage"],OTEL_RESOURCE_ATTRIBUTES:"",OTEL_SERVICE_NAME:"",OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT:lM,OTEL_ATTRIBUTE_COUNT_LIMIT:fM,OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT:lM,OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT:fM,OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT:lM,OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT:fM,OTEL_SPAN_EVENT_COUNT_LIMIT:128,OTEL_SPAN_LINK_COUNT_LIMIT:128,OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT:bie,OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT:Cie,OTEL_TRACES_EXPORTER:"",OTEL_TRACES_SAMPLER:cM.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"};function Pie(e,t,r){if(!(typeof r[e]>"u")){var n=String(r[e]);t[e]=n.toLowerCase()==="true"}}function Mie(e,t,r,n,i){if(n===void 0&&(n=-1/0),i===void 0&&(i=1/0),typeof r[e]<"u"){var a=Number(r[e]);isNaN(a)||(a<n?t[e]=n:a>i?t[e]=i:t[e]=a)}}function Iie(e,t,r,n){n===void 0&&(n=mie);var i=r[e];typeof i=="string"&&(t[e]=i.split(n).map(function(a){return a.trim()}))}var Nie={ALL:ci.ALL,VERBOSE:ci.VERBOSE,DEBUG:ci.DEBUG,INFO:ci.INFO,WARN:ci.WARN,ERROR:ci.ERROR,NONE:ci.NONE};function Lie(e,t,r){var n=r[e];if(typeof n=="string"){var i=Nie[n.toUpperCase()];i!=null&&(t[e]=i)}}function Die(e){var t={};for(var r in EB){var n=r;switch(n){case"OTEL_LOG_LEVEL":Lie(n,t,e);break;default:if(Aie(n))Pie(n,t,e);else if(yie(n))Mie(n,t,e);else if(Oie(n))Iie(n,t,e);else{var i=e[n];typeof i<"u"&&i!==null&&(t[n]=String(i))}}}return t}var wie=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof h.g=="object"?h.g:{};function eu(){var e=Die(wie);return Object.assign({},EB,e)}function FUe(){return parseEnvironment(_globalThis)}var Uie=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,a=[],u;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)a.push(i.value)}catch(c){u={error:c}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(u)throw u.error}}return a},vB=1e4,xie=5,Fie=1e3,$ie=5e3,Vie=1.5;function Gie(e){e===void 0&&(e={});var t={};return Object.entries(e).forEach(function(r){var n=Uie(r,2),i=n[0],a=n[1];typeof a<"u"?t[i]=String(a):Wu.warn('Header "'+i+'" has invalid value ('+a+") and will be ignored")}),t}function Bie(e,t){return e.endsWith("/")||(e=e+"/"),e+t}function kie(e){try{var t=new URL(e);return t.pathname===""&&(t.pathname=t.pathname+"/"),t.toString()}catch{return Wu.warn("Could not parse export URL: '"+e+"'"),e}}function jie(e){return typeof e=="number"?e<=0?mB(e,vB):e:Hie()}function Hie(){var e,t=Number((e=eu().OTEL_EXPORTER_OTLP_TRACES_TIMEOUT)!==null&&e!==void 0?e:eu().OTEL_EXPORTER_OTLP_TIMEOUT);return t<=0?mB(t,vB):t}function mB(e,t){return Wu.warn("Timeout must be greater than 0",e),t}function Yie(e){var t=[429,502,503,504];return t.includes(e)}function qie(e){if(e==null)return-1;var t=Number.parseInt(e,10);if(Number.isInteger(t))return t>0?t*1e3:-1;var r=new Date(e).getTime()-Date.now();return r>=0?r:0}var Kie=function(){function e(t){t===void 0&&(t={}),this._sendingPromises=[],this.url=this.getDefaultUrl(t),typeof t.hostname=="string"&&(this.hostname=t.hostname),this.shutdown=this.shutdown.bind(this),this._shutdownOnce=new vie(this._shutdown,this),this._concurrencyLimit=typeof t.concurrencyLimit=="number"?t.concurrencyLimit:30,this.timeoutMillis=jie(t.timeoutMillis),this.onInit(t)}return e.prototype.export=function(t,r){if(this._shutdownOnce.isCalled){r({code:T_.FAILED,error:new Error("Exporter has been shutdown")});return}if(this._sendingPromises.length>=this._concurrencyLimit){r({code:T_.FAILED,error:new Error("Concurrent export limit reached")});return}this._export(t).then(function(){r({code:T_.SUCCESS})}).catch(function(n){r({code:T_.FAILED,error:n})})},e.prototype._export=function(t){var r=this;return new Promise(function(n,i){try{Wu.debug("items to be sent",t),r.send(t,n,i)}catch(a){i(a)}})},e.prototype.shutdown=function(){return this._shutdownOnce.call()},e.prototype.forceFlush=function(){return Promise.all(this._sendingPromises).then(function(){})},e.prototype._shutdown=function(){return Wu.debug("shutdown started"),this.onShutdown(),this.forceFlush()},e}(),Wie=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),mh=function(e){Wie(t,e);function t(r,n,i){var a=e.call(this,r)||this;return a.name="OTLPExporterError",a.data=i,a.code=n,a}return t}(Error),dT=function(){return dT=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},dT.apply(this,arguments)},Qie=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,a=[],u;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)a.push(i.value)}catch(c){u={error:c}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(u)throw u.error}}return a};function zie(e,t,r,n,i){if(navigator.sendBeacon(t,new Blob([e],r)))Wu.debug("sendBeacon - can send",e),n();else{var a=new mh("sendBeacon - cannot send "+e);i(a)}}function Xie(e,t,r,n,i,a){var u,c,E=!1,_=setTimeout(function(){if(clearTimeout(u),E=!0,c.readyState===XMLHttpRequest.DONE){var L=new mh("Request Timeout");a(L)}else c.abort()},n),p=function(L,W){L===void 0&&(L=xie),W===void 0&&(W=Fie),c=new XMLHttpRequest,c.open("POST",t);var ve={Accept:"application/json","Content-Type":"application/json"};Object.entries(dT(dT({},ve),r)).forEach(function(me){var Oe=Qie(me,2),He=Oe[0],qe=Oe[1];c.setRequestHeader(He,qe)}),c.send(e),c.onreadystatechange=function(){if(c.readyState===XMLHttpRequest.DONE&&E===!1)if(c.status>=200&&c.status<=299)Wu.debug("xhr success",e),i(),clearTimeout(_),clearTimeout(u);else if(c.status&&Yie(c.status)&&L>0){var me=void 0;W=Vie*W,c.getResponseHeader("Retry-After")?me=qie(c.getResponseHeader("Retry-After")):me=Math.round(Math.random()*($ie-W)+W),u=setTimeout(function(){p(L-1,W)},me)}else{var Oe=new mh("Failed to export with XHR (status: "+c.status+")",c.status);a(Oe),clearTimeout(_),clearTimeout(u)}},c.onabort=function(){if(E){var me=new mh("Request Timeout");a(me)}clearTimeout(_),clearTimeout(u)},c.onerror=function(){if(E){var me=new mh("Request Timeout");a(me)}clearTimeout(_),clearTimeout(u)}};p()}var Jie=Symbol("BaggageEntryMetadata"),Zie=SB.instance();function $Ue(e){return e===void 0&&(e={}),new BaggageImpl(new Map(Object.entries(e)))}function eae(e){return typeof e!="string"&&(Zie.error("Cannot create baggage metadata from unknown type: "+typeof e),e=""),{__TYPE__:Jie,toString:function(){return e}}}var tae="=",TB=";",rae=",",VUe="baggage",GUe=180,BUe=4096,kUe=8192,nae=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,a=[],u;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)a.push(i.value)}catch(c){u={error:c}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(u)throw u.error}}return a};function jUe(e){return e.reduce(function(t,r){var n=""+t+(t!==""?BAGGAGE_ITEMS_SEPARATOR:"")+r;return n.length>BAGGAGE_MAX_TOTAL_LENGTH?t:n},"")}function HUe(e){return e.getAllEntries().map(function(t){var r=nae(t,2),n=r[0],i=r[1],a=encodeURIComponent(n)+"="+encodeURIComponent(i.value);return i.metadata!==void 0&&(a+=BAGGAGE_PROPERTIES_SEPARATOR+i.metadata.toString()),a})}function iae(e){var t=e.split(TB);if(!(t.length<=0)){var r=t.shift();if(!!r){var n=r.indexOf(tae);if(!(n<=0)){var i=decodeURIComponent(r.substring(0,n).trim()),a=decodeURIComponent(r.substring(n+1).trim()),u;return t.length>0&&(u=eae(t.join(TB))),{key:i,value:a,metadata:u}}}}}function AB(e){return typeof e!="string"||e.length===0?{}:e.split(rae).map(function(t){return iae(t)}).filter(function(t){return t!==void 0&&t.value.length>0}).reduce(function(t,r){return t[r.key]=r.value,t},{})}var aae=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),pT=function(){return pT=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},pT.apply(this,arguments)},oae=function(e){aae(t,e);function t(r,n,i){r===void 0&&(r={});var a=e.call(this,r)||this;return a._useXHR=!1,a._serializer=n,a._contentType=i,a._useXHR=!!r.headers||typeof navigator.sendBeacon!="function",a._useXHR?a._headers=Object.assign({},Gie(r.headers),AB(eu().OTEL_EXPORTER_OTLP_HEADERS)):a._headers={},a}return t.prototype.onInit=function(){},t.prototype.onShutdown=function(){},t.prototype.send=function(r,n,i){var a=this,u;if(this._shutdownOnce.isCalled){Wu.debug("Shutdown already started. Cannot send objects");return}var c=(u=this._serializer.serializeRequest(r))!==null&&u!==void 0?u:new Uint8Array,E=new Promise(function(p,L){a._useXHR?Xie(c,a.url,pT(pT({},a._headers),{"Content-Type":a._contentType}),a.timeoutMillis,p,L):zie(c,a.url,{type:a._contentType},p,L)}).then(n,i);this._sendingPromises.push(E);var _=function(){var p=a._sendingPromises.indexOf(E);a._sendingPromises.splice(p,1)};E.then(_,_)},t}(Kie),sae=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,a=[],u;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)a.push(i.value)}catch(c){u={error:c}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(u)throw u.error}}return a};function _M(e){return{name:e.name,version:e.version}}function _l(e){return Object.keys(e).map(function(t){return dM(t,e[t])})}function dM(e,t){return{key:e,value:pM(t)}}function pM(e){var t=typeof e;return t==="string"?{stringValue:e}:t==="number"?Number.isInteger(e)?{intValue:e}:{doubleValue:e}:t==="boolean"?{boolValue:e}:e instanceof Uint8Array?{bytesValue:e}:Array.isArray(e)?{arrayValue:{values:e.map(pM)}}:t==="object"&&e!=null?{kvlistValue:{values:Object.entries(e).map(function(r){var n=sae(r,2),i=n[0],a=n[1];return dM(i,a)})}}:{}}function uae(e,t){var r,n=e.spanContext(),i=e.status;return{traceId:t.encodeSpanContext(n.traceId),spanId:t.encodeSpanContext(n.spanId),parentSpanId:t.encodeOptionalSpanContext(e.parentSpanId),traceState:(r=n.traceState)===null||r===void 0?void 0:r.serialize(),name:e.name,kind:e.kind==null?0:e.kind+1,startTimeUnixNano:t.encodeHrTime(e.startTime),endTimeUnixNano:t.encodeHrTime(e.endTime),attributes:_l(e.attributes),droppedAttributesCount:e.droppedAttributesCount,events:e.events.map(function(a){return lae(a,t)}),droppedEventsCount:e.droppedEventsCount,status:{code:i.code,message:i.message},links:e.links.map(function(a){return cae(a,t)}),droppedLinksCount:e.droppedLinksCount}}function cae(e,t){var r;return{attributes:e.attributes?_l(e.attributes):[],spanId:t.encodeSpanContext(e.context.spanId),traceId:t.encodeSpanContext(e.context.traceId),traceState:(r=e.context.traceState)===null||r===void 0?void 0:r.serialize(),droppedAttributesCount:e.droppedAttributesCount||0}}function lae(e,t){return{attributes:e.attributes?_l(e.attributes):[],name:e.name,timeUnixNano:t.encodeHrTime(e.time),droppedAttributesCount:e.droppedAttributesCount||0}}var gB=9,fae=6,_ae=Math.pow(10,fae),hT=Math.pow(10,gB);function ST(e){var t=e/1e3,r=Math.trunc(t),n=Math.round(e%1e3*_ae);return[r,n]}function yB(){var e=performance.timeOrigin;if(typeof e!="number"){var t=performance;e=t.timing&&t.timing.fetchStart}return e}function dae(e){var t=ST(yB()),r=ST(typeof e=="number"?e:performance.now());return hae(t,r)}function YUe(e){if(RB(e))return e;if(typeof e=="number")return e<yB()?dae(e):ST(e);if(e instanceof Date)return ST(e.getTime());throw TypeError("Invalid input type")}function qUe(e,t){var r=t[0]-e[0],n=t[1]-e[1];return n<0&&(r-=1,n+=hT),[r,n]}function KUe(e){var t=gB,r=""+"0".repeat(t)+e[1]+"Z",n=r.substr(r.length-t-1),i=new Date(e[0]*1e3).toISOString();return i.replace("000Z",n)}function pae(e){return e[0]*hT+e[1]}function WUe(e){return e[0]*1e3+e[1]/1e6}function QUe(e){return e[0]*1e6+e[1]/1e3}function RB(e){return Array.isArray(e)&&e.length===2&&typeof e[0]=="number"&&typeof e[1]=="number"}function zUe(e){return RB(e)||typeof e=="number"||e instanceof Date}function hae(e,t){var r=[e[0]+t[0],e[1]+t[1]];return r[1]>=hT&&(r[1]-=hT,r[0]+=1),r}function OB(e){return e>=48&&e<=57?e-48:e>=97&&e<=102?e-87:e-55}function hM(e){for(var t=new Uint8Array(e.length/2),r=0,n=0;n<e.length;n+=2){var i=OB(e.charCodeAt(n)),a=OB(e.charCodeAt(n+1));t[r++]=i<<4|a}return t}function bB(e){var t=BigInt(1e9);return BigInt(e[0])*t+BigInt(e[1])}function Sae(e){var t=Number(BigInt.asUintN(32,e)),r=Number(BigInt.asUintN(32,e>>BigInt(32)));return{low:t,high:r}}function CB(e){var t=bB(e);return Sae(t)}function Eae(e){var t=bB(e);return t.toString()}var vae=typeof BigInt<"u"?Eae:pae;function PB(e){return e}function MB(e){if(e!==void 0)return hM(e)}var mae={encodeHrTime:CB,encodeSpanContext:hM,encodeOptionalSpanContext:MB};function SM(e){var t,r;if(e===void 0)return mae;var n=(t=e.useLongBits)!==null&&t!==void 0?t:!0,i=(r=e.useHex)!==null&&r!==void 0?r:!1;return{encodeHrTime:n?CB:vae,encodeSpanContext:i?PB:hM,encodeOptionalSpanContext:i?PB:MB}}function EM(e){return{attributes:_l(e.attributes),droppedAttributesCount:0}}var Tae=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Aae=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,a=[],u;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)a.push(i.value)}catch(c){u={error:c}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(u)throw u.error}}return a};function gae(e,t){var r=SM(t);return{resourceSpans:Rae(e,r)}}function yae(e){var t,r,n=new Map;try{for(var i=Tae(e),a=i.next();!a.done;a=i.next()){var u=a.value,c=n.get(u.resource);c||(c=new Map,n.set(u.resource,c));var E=u.instrumentationLibrary.name+"@"+(u.instrumentationLibrary.version||"")+":"+(u.instrumentationLibrary.schemaUrl||""),_=c.get(E);_||(_=[],c.set(E,_)),_.push(u)}}catch(p){t={error:p}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return n}function Rae(e,t){for(var r=yae(e),n=[],i=r.entries(),a=i.next();!a.done;){for(var u=Aae(a.value,2),c=u[0],E=u[1],_=[],p=E.values(),L=p.next();!L.done;){var W=L.value;if(W.length>0){var ve=W.map(function(Oe){return uae(Oe,t)});_.push({scope:_M(W[0].instrumentationLibrary),spans:ve,schemaUrl:W[0].instrumentationLibrary.schemaUrl})}L=p.next()}var me={resource:EM(c),scopeSpans:_,schemaUrl:void 0};n.push(me),a=i.next()}return n}var ET;(function(e){e[e.INT=0]="INT",e[e.DOUBLE=1]="DOUBLE"})(ET||(ET={}));var A_;(function(e){e[e.HISTOGRAM=0]="HISTOGRAM",e[e.EXPONENTIAL_HISTOGRAM=1]="EXPONENTIAL_HISTOGRAM",e[e.GAUGE=2]="GAUGE",e[e.SUM=3]="SUM"})(A_||(A_={}));var vT;(function(e){e[e.DELTA=0]="DELTA",e[e.CUMULATIVE=1]="CUMULATIVE"})(vT||(vT={}));function Oae(e,t){var r=SM(t);return{resource:EM(e.resource),schemaUrl:void 0,scopeMetrics:bae(e.scopeMetrics,r)}}function bae(e,t){return Array.from(e.map(function(r){return{scope:_M(r.scope),metrics:r.metrics.map(function(n){return Cae(n,t)}),schemaUrl:r.scope.schemaUrl}}))}function Cae(e,t){var r={name:e.descriptor.name,description:e.descriptor.description,unit:e.descriptor.unit},n=Nae(e.aggregationTemporality);switch(e.dataPointType){case A_.SUM:r.sum={aggregationTemporality:n,isMonotonic:e.isMonotonic,dataPoints:IB(e,t)};break;case A_.GAUGE:r.gauge={dataPoints:IB(e,t)};break;case A_.HISTOGRAM:r.histogram={aggregationTemporality:n,dataPoints:Mae(e,t)};break;case A_.EXPONENTIAL_HISTOGRAM:r.exponentialHistogram={aggregationTemporality:n,dataPoints:Iae(e,t)};break}return r}function Pae(e,t,r){var n={attributes:_l(e.attributes),startTimeUnixNano:r.encodeHrTime(e.startTime),timeUnixNano:r.encodeHrTime(e.endTime)};switch(t){case ET.INT:n.asInt=e.value;break;case ET.DOUBLE:n.asDouble=e.value;break}return n}function IB(e,t){return e.dataPoints.map(function(r){return Pae(r,e.descriptor.valueType,t)})}function Mae(e,t){return e.dataPoints.map(function(r){var n=r.value;return{attributes:_l(r.attributes),bucketCounts:n.buckets.counts,explicitBounds:n.buckets.boundaries,count:n.count,sum:n.sum,min:n.min,max:n.max,startTimeUnixNano:t.encodeHrTime(r.startTime),timeUnixNano:t.encodeHrTime(r.endTime)}})}function Iae(e,t){return e.dataPoints.map(function(r){var n=r.value;return{attributes:_l(r.attributes),count:n.count,min:n.min,max:n.max,sum:n.sum,positive:{offset:n.positive.offset,bucketCounts:n.positive.bucketCounts},negative:{offset:n.negative.offset,bucketCounts:n.negative.bucketCounts},scale:n.scale,zeroCount:n.zeroCount,startTimeUnixNano:t.encodeHrTime(r.startTime),timeUnixNano:t.encodeHrTime(r.endTime)}})}function Nae(e){switch(e){case vT.DELTA:return 1;case vT.CUMULATIVE:return 2}}function Lae(e,t){return{resourceMetrics:e.map(function(r){return Oae(r,t)})}}var Dae=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},NB=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,a=[],u;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)a.push(i.value)}catch(c){u={error:c}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(u)throw u.error}}return a};function wae(e,t){var r=SM(t);return{resourceLogs:xae(e,r)}}function Uae(e){var t,r,n=new Map;try{for(var i=Dae(e),a=i.next();!a.done;a=i.next()){var u=a.value,c=u.resource,E=u.instrumentationScope,_=E.name,p=E.version,L=p===void 0?"":p,W=E.schemaUrl,ve=W===void 0?"":W,me=n.get(c);me||(me=new Map,n.set(c,me));var Oe=_+"@"+L+":"+ve,He=me.get(Oe);He||(He=[],me.set(Oe,He)),He.push(u)}}catch(qe){t={error:qe}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return n}function xae(e,t){var r=Uae(e);return Array.from(r,function(n){var i=NB(n,2),a=i[0],u=i[1];return{resource:EM(a),scopeLogs:Array.from(u,function(c){var E=NB(c,2),_=E[1];return{scope:_M(_[0].instrumentationScope),logRecords:_.map(function(p){return Fae(p,t)}),schemaUrl:_[0].instrumentationScope.schemaUrl}}),schemaUrl:void 0}})}function Fae(e,t){var r,n,i;return{timeUnixNano:t.encodeHrTime(e.hrTime),observedTimeUnixNano:t.encodeHrTime(e.hrTimeObserved),severityNumber:e.severityNumber,severityText:e.severityText,body:pM(e.body),attributes:$ae(e.attributes),droppedAttributesCount:e.droppedAttributesCount,flags:(r=e.spanContext)===null||r===void 0?void 0:r.traceFlags,traceId:t.encodeOptionalSpanContext((n=e.spanContext)===null||n===void 0?void 0:n.traceId),spanId:t.encodeOptionalSpanContext((i=e.spanContext)===null||i===void 0?void 0:i.spanId)}}function XUe(e){return e}function $ae(e){return Object.keys(e).map(function(t){return dM(t,e[t])})}var JUe={serializeRequest:function(e){var t=gae(e,{useHex:!0,useLongBits:!1}),r=new TextEncoder;return r.encode(JSON.stringify(t))},deserializeResponse:function(e){var t=new TextDecoder;return JSON.parse(t.decode(e))}},ZUe={serializeRequest:function(e){var t=Lae(e,{useLongBits:!1}),r=new TextEncoder;return r.encode(JSON.stringify(t))},deserializeResponse:function(e){var t=new TextDecoder;return JSON.parse(t.decode(e))}},Vae={serializeRequest:function(e){var t=wae(e,{useHex:!0,useLongBits:!1}),r=new TextEncoder;return r.encode(JSON.stringify(t))},deserializeResponse:function(e){var t=new TextDecoder;return JSON.parse(t.decode(e))}},LB="v1/logs",Gae="http://localhost:4318/"+LB;function Bae(e){return typeof e.url=="string"?e.url:eu().OTEL_EXPORTER_OTLP_LOGS_ENDPOINT.length>0?kie(eu().OTEL_EXPORTER_OTLP_LOGS_ENDPOINT):eu().OTEL_EXPORTER_OTLP_ENDPOINT.length>0?Bie(eu().OTEL_EXPORTER_OTLP_ENDPOINT,LB):Gae}var kae=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Th=function(){return Th=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Th.apply(this,arguments)},jae=function(e){kae(t,e);function t(r){r===void 0&&(r={});var n=e.call(this,Th({timeoutMillis:eu().OTEL_EXPORTER_OTLP_LOGS_TIMEOUT},r),Vae,"application/json")||this;return n._headers=Th(Th({},n._headers),AB(eu().OTEL_EXPORTER_OTLP_LOGS_HEADERS)),n}return t.prototype.getDefaultUrl=function(r){return Bae(r)},t}(oae),_r=gs.instance();function dl(e){for(var t={},r=e.length,n=0;n<r;n++){var i=e[n];i&&(t[String(i).toUpperCase().replace(/[-.]/g,"_")]=i)}return t}var Hae="cloud.provider",Yae="cloud.account.id",qae="cloud.region",Kae="cloud.availability_zone",Wae="cloud.platform",Qae="aws.ecs.container.arn",zae="aws.ecs.cluster.arn",Xae="aws.ecs.launchtype",Jae="aws.ecs.task.arn",Zae="aws.ecs.task.family",eoe="aws.ecs.task.revision",toe="aws.eks.cluster.arn",roe="aws.log.group.names",noe="aws.log.group.arns",ioe="aws.log.stream.names",aoe="aws.log.stream.arns",ooe="container.name",soe="container.id",uoe="container.runtime",coe="container.image.name",loe="container.image.tag",foe="deployment.environment",_oe="device.id",doe="device.model.identifier",poe="device.model.name",hoe="faas.name",Soe="faas.id",Eoe="faas.version",voe="faas.instance",moe="faas.max_memory",Toe="host.id",Aoe="host.name",goe="host.type",yoe="host.arch",Roe="host.image.name",Ooe="host.image.id",boe="host.image.version",Coe="k8s.cluster.name",Poe="k8s.node.name",Moe="k8s.node.uid",Ioe="k8s.namespace.name",Noe="k8s.pod.uid",Loe="k8s.pod.name",Doe="k8s.container.name",woe="k8s.replicaset.uid",Uoe="k8s.replicaset.name",xoe="k8s.deployment.uid",Foe="k8s.deployment.name",$oe="k8s.statefulset.uid",Voe="k8s.statefulset.name",Goe="k8s.daemonset.uid",Boe="k8s.daemonset.name",koe="k8s.job.uid",joe="k8s.job.name",Hoe="k8s.cronjob.uid",Yoe="k8s.cronjob.name",qoe="os.type",Koe="os.description",Woe="os.name",Qoe="os.version",zoe="process.pid",Xoe="process.executable.name",Joe="process.executable.path",Zoe="process.command",ese="process.command_line",tse="process.command_args",rse="process.owner",DB="process.runtime.name",nse="process.runtime.version",ise="process.runtime.description",wB="service.name",ase="service.namespace",ose="service.instance.id",sse="service.version",UB="telemetry.sdk.name",xB="telemetry.sdk.language",FB="telemetry.sdk.version",use="telemetry.auto.version",cse="webengine.name",lse="webengine.version",fse="webengine.description",exe=null,txe=null,rxe=null,nxe=null,ixe=null,axe=null,oxe=null,sxe=null,uxe=null,cxe=null,lxe=null,fxe=null,_xe=null,dxe=null,pxe=null,hxe=null,Sxe=null,Exe=null,vxe=null,mxe=null,Txe=null,Axe=null,gxe=null,yxe=null,Rxe=null,Oxe=null,bxe=null,Cxe=null,Pxe=null,Mxe=null,Ixe=null,Nxe=null,Lxe=null,Dxe=null,wxe=null,Uxe=null,xxe=null,Fxe=null,$xe=null,Vxe=null,Gxe=null,Bxe=null,kxe=null,jxe=null,Hxe=null,Yxe=null,qxe=null,Kxe=null,Wxe=null,Qxe=null,zxe=null,Xxe=null,Jxe=null,Zxe=null,eFe=null,tFe=null,rFe=null,nFe=null,iFe=null,aFe=null,oFe=null,sFe=null,uFe=null,cFe=null,lFe=null,fFe=null,_Fe=null,_se=DB,dFe=null,pFe=null,dse=wB,hFe=null,SFe=null,EFe=null,vM=UB,mM=xB,TM=FB,vFe=null,mFe=null,TFe=null,AFe=null,gFe=dl([Hae,Yae,qae,Kae,Wae,Qae,zae,Xae,Jae,Zae,eoe,toe,roe,noe,ioe,aoe,ooe,soe,uoe,coe,loe,foe,_oe,doe,poe,hoe,Soe,Eoe,voe,moe,Toe,Aoe,goe,yoe,Roe,Ooe,boe,Coe,Poe,Moe,Ioe,Noe,Loe,Doe,woe,Uoe,xoe,Foe,$oe,Voe,Goe,Boe,koe,joe,Hoe,Yoe,qoe,Koe,Woe,Qoe,zoe,Xoe,Joe,Zoe,ese,tse,rse,DB,nse,ise,wB,ase,ose,sse,UB,xB,FB,use,cse,lse,fse]),pse="alibaba_cloud",hse="aws",Sse="azure",Ese="gcp",yFe=null,RFe=null,OFe=null,bFe=null,CFe=dl([pse,hse,Sse,Ese]),vse="alibaba_cloud_ecs",mse="alibaba_cloud_fc",Tse="aws_ec2",Ase="aws_ecs",gse="aws_eks",yse="aws_lambda",Rse="aws_elastic_beanstalk",Ose="azure_vm",bse="azure_container_instances",Cse="azure_aks",Pse="azure_functions",Mse="azure_app_service",Ise="gcp_compute_engine",Nse="gcp_cloud_run",Lse="gcp_kubernetes_engine",Dse="gcp_cloud_functions",wse="gcp_app_engine",PFe=null,MFe=null,IFe=null,NFe=null,LFe=null,DFe=null,wFe=null,UFe=null,xFe=null,FFe=null,$Fe=null,VFe=null,GFe=null,BFe=null,kFe=null,jFe=null,HFe=null,YFe=dl([vse,mse,Tse,Ase,gse,yse,Rse,Ose,bse,Cse,Pse,Mse,Ise,Nse,Lse,Dse,wse]),Use="ec2",xse="fargate",qFe=null,KFe=null,WFe=dl([Use,xse]),Fse="amd64",$se="arm32",Vse="arm64",Gse="ia64",Bse="ppc32",kse="ppc64",jse="x86",QFe=null,zFe=null,XFe=null,JFe=null,ZFe=null,e1e=null,t1e=null,r1e=dl([Fse,$se,Vse,Gse,Bse,kse,jse]),Hse="windows",Yse="linux",qse="darwin",Kse="freebsd",Wse="netbsd",Qse="openbsd",zse="dragonflybsd",Xse="hpux",Jse="aix",Zse="solaris",eue="z_os",n1e=null,i1e=null,a1e=null,o1e=null,s1e=null,u1e=null,c1e=null,l1e=null,f1e=null,_1e=null,d1e=null,p1e=dl([Hse,Yse,qse,Kse,Wse,Qse,zse,Xse,Jse,Zse,eue]),tue="cpp",rue="dotnet",nue="erlang",iue="go",aue="java",oue="nodejs",sue="php",uue="python",cue="ruby",$B="webjs",h1e=null,S1e=null,E1e=null,v1e=null,m1e=null,T1e=null,A1e=null,g1e=null,y1e=null,lue=$B,R1e=dl([tue,rue,nue,iue,aue,oue,sue,uue,cue,$B]),fue="1.30.1",g_,AM=(g_={},g_[vM]="opentelemetry",g_[_se]="browser",g_[mM]=lue,g_[TM]=fue,g_);function _ue(){return"unknown_service"}var Qu=function(){return Qu=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Qu.apply(this,arguments)},due=function(e,t,r,n){function i(a){return a instanceof r?a:new r(function(u){u(a)})}return new(r||(r=Promise))(function(a,u){function c(p){try{_(n.next(p))}catch(L){u(L)}}function E(p){try{_(n.throw(p))}catch(L){u(L)}}function _(p){p.done?a(p.value):i(p.value).then(c,E)}_((n=n.apply(e,t||[])).next())})},pue=function(e,t){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,u;return u={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(u[Symbol.iterator]=function(){return this}),u;function c(_){return function(p){return E([_,p])}}function E(_){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(a=_[0]&2?i.return:_[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,_[1])).done)return a;switch(i=0,a&&(_=[_[0]&2,a.value]),_[0]){case 0:case 1:a=_;break;case 4:return r.label++,{value:_[1],done:!1};case 5:r.label++,i=_[1],_=[0];continue;case 7:_=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(_[0]===6||_[0]===2)){r=0;continue}if(_[0]===3&&(!a||_[1]>a[0]&&_[1]<a[3])){r.label=_[1];break}if(_[0]===6&&r.label<a[1]){r.label=a[1],a=_;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(_);break}a[2]&&r.ops.pop(),r.trys.pop();continue}_=t.call(e,r)}catch(p){_=[6,p],i=0}finally{n=a=0}if(_[0]&5)throw _[1];return{value:_[0]?_[1]:void 0,done:!0}}},hue=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,a=[],u;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)a.push(i.value)}catch(c){u={error:c}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(u)throw u.error}}return a},mT=function(){function e(t,r){var n=this,i;this._attributes=t,this.asyncAttributesPending=r!=null,this._syncAttributes=(i=this._attributes)!==null&&i!==void 0?i:{},this._asyncAttributesPromise=r?.then(function(a){return n._attributes=Object.assign({},n._attributes,a),n.asyncAttributesPending=!1,a},function(a){return _r.debug("a resource's async attributes promise rejected: %s",a),n.asyncAttributesPending=!1,{}})}return e.empty=function(){return e.EMPTY},e.default=function(){var t;return new e((t={},t[dse]=_ue(),t[mM]=AM[mM],t[vM]=AM[vM],t[TM]=AM[TM],t))},Object.defineProperty(e.prototype,"attributes",{get:function(){var t;return this.asyncAttributesPending&&_r.error("Accessing resource attributes before async attributes settled"),(t=this._attributes)!==null&&t!==void 0?t:{}},enumerable:!1,configurable:!0}),e.prototype.waitForAsyncAttributes=function(){return due(this,void 0,void 0,function(){return pue(this,function(t){switch(t.label){case 0:return this.asyncAttributesPending?[4,this._asyncAttributesPromise]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2]}})})},e.prototype.merge=function(t){var r=this,n;if(!t)return this;var i=Qu(Qu({},this._syncAttributes),(n=t._syncAttributes)!==null&&n!==void 0?n:t.attributes);if(!this._asyncAttributesPromise&&!t._asyncAttributesPromise)return new e(i);var a=Promise.all([this._asyncAttributesPromise,t._asyncAttributesPromise]).then(function(u){var c,E=hue(u,2),_=E[0],p=E[1];return Qu(Qu(Qu(Qu({},r._syncAttributes),_),(c=t._syncAttributes)!==null&&c!==void 0?c:t.attributes),p)});return new e(i,a)},e.EMPTY=new e({}),e}(),VB=function(){function e(){}return e.prototype.emit=function(t){},e}(),Sue=new VB;function pl(e){for(var t={},r=e.length,n=0;n<r;n++){var i=e[n];i&&(t[String(i).toUpperCase().replace(/[-.]/g,"_")]=i)}return t}var Eue="cloud.provider",vue="cloud.account.id",mue="cloud.region",Tue="cloud.availability_zone",Aue="cloud.platform",gue="aws.ecs.container.arn",yue="aws.ecs.cluster.arn",Rue="aws.ecs.launchtype",Oue="aws.ecs.task.arn",bue="aws.ecs.task.family",Cue="aws.ecs.task.revision",Pue="aws.eks.cluster.arn",Mue="aws.log.group.names",Iue="aws.log.group.arns",Nue="aws.log.stream.names",Lue="aws.log.stream.arns",Due="container.name",wue="container.id",Uue="container.runtime",xue="container.image.name",Fue="container.image.tag",$ue="deployment.environment",Vue="device.id",Gue="device.model.identifier",Bue="device.model.name",kue="faas.name",jue="faas.id",Hue="faas.version",Yue="faas.instance",que="faas.max_memory",Kue="host.id",Wue="host.name",Que="host.type",zue="host.arch",Xue="host.image.name",Jue="host.image.id",Zue="host.image.version",ece="k8s.cluster.name",tce="k8s.node.name",rce="k8s.node.uid",nce="k8s.namespace.name",ice="k8s.pod.uid",ace="k8s.pod.name",oce="k8s.container.name",sce="k8s.replicaset.uid",uce="k8s.replicaset.name",cce="k8s.deployment.uid",lce="k8s.deployment.name",fce="k8s.statefulset.uid",_ce="k8s.statefulset.name",dce="k8s.daemonset.uid",pce="k8s.daemonset.name",hce="k8s.job.uid",Sce="k8s.job.name",Ece="k8s.cronjob.uid",vce="k8s.cronjob.name",mce="os.type",Tce="os.description",Ace="os.name",gce="os.version",yce="process.pid",Rce="process.executable.name",Oce="process.executable.path",bce="process.command",Cce="process.command_line",Pce="process.command_args",Mce="process.owner",Ice="process.runtime.name",Nce="process.runtime.version",Lce="process.runtime.description",GB="service.name",Dce="service.namespace",wce="service.instance.id",Uce="service.version",BB="telemetry.sdk.name",kB="telemetry.sdk.language",jB="telemetry.sdk.version",xce="telemetry.auto.version",Fce="webengine.name",$ce="webengine.version",Vce="webengine.description",O1e=null,b1e=null,C1e=null,P1e=null,M1e=null,I1e=null,N1e=null,L1e=null,D1e=null,w1e=null,U1e=null,x1e=null,F1e=null,$1e=null,V1e=null,G1e=null,B1e=null,k1e=null,j1e=null,H1e=null,Y1e=null,q1e=null,K1e=null,W1e=null,Q1e=null,z1e=null,X1e=null,J1e=null,Z1e=null,e$e=null,t$e=null,r$e=null,n$e=null,i$e=null,a$e=null,o$e=null,s$e=null,u$e=null,c$e=null,l$e=null,f$e=null,_$e=null,d$e=null,p$e=null,h$e=null,S$e=null,E$e=null,v$e=null,m$e=null,T$e=null,A$e=null,g$e=null,y$e=null,R$e=null,O$e=null,b$e=null,C$e=null,P$e=null,M$e=null,I$e=null,N$e=null,L$e=null,D$e=null,w$e=null,U$e=null,x$e=null,F$e=null,$$e=null,V$e=null,G$e=null,Gce=GB,B$e=null,k$e=null,j$e=null,HB=BB,YB=kB,qB=jB,H$e=null,Y$e=null,q$e=null,K$e=null,W$e=pl([Eue,vue,mue,Tue,Aue,gue,yue,Rue,Oue,bue,Cue,Pue,Mue,Iue,Nue,Lue,Due,wue,Uue,xue,Fue,$ue,Vue,Gue,Bue,kue,jue,Hue,Yue,que,Kue,Wue,Que,zue,Xue,Jue,Zue,ece,tce,rce,nce,ice,ace,oce,sce,uce,cce,lce,fce,_ce,dce,pce,hce,Sce,Ece,vce,mce,Tce,Ace,gce,yce,Rce,Oce,bce,Cce,Pce,Mce,Ice,Nce,Lce,GB,Dce,wce,Uce,BB,kB,jB,xce,Fce,$ce,Vce]),Bce="alibaba_cloud",kce="aws",jce="azure",Hce="gcp",Q$e=null,z$e=null,X$e=null,J$e=null,Z$e=pl([Bce,kce,jce,Hce]),Yce="alibaba_cloud_ecs",qce="alibaba_cloud_fc",Kce="aws_ec2",Wce="aws_ecs",Qce="aws_eks",zce="aws_lambda",Xce="aws_elastic_beanstalk",Jce="azure_vm",Zce="azure_container_instances",ele="azure_aks",tle="azure_functions",rle="azure_app_service",nle="gcp_compute_engine",ile="gcp_cloud_run",ale="gcp_kubernetes_engine",ole="gcp_cloud_functions",sle="gcp_app_engine",eVe=null,tVe=null,rVe=null,nVe=null,iVe=null,aVe=null,oVe=null,sVe=null,uVe=null,cVe=null,lVe=null,fVe=null,_Ve=null,dVe=null,pVe=null,hVe=null,SVe=null,EVe=pl([Yce,qce,Kce,Wce,Qce,zce,Xce,Jce,Zce,ele,tle,rle,nle,ile,ale,ole,sle]),ule="ec2",cle="fargate",vVe=null,mVe=null,TVe=pl([ule,cle]),lle="amd64",fle="arm32",_le="arm64",dle="ia64",ple="ppc32",hle="ppc64",Sle="x86",AVe=null,gVe=null,yVe=null,RVe=null,OVe=null,bVe=null,CVe=null,PVe=pl([lle,fle,_le,dle,ple,hle,Sle]),Ele="windows",vle="linux",mle="darwin",Tle="freebsd",Ale="netbsd",gle="openbsd",yle="dragonflybsd",Rle="hpux",Ole="aix",ble="solaris",Cle="z_os",MVe=null,IVe=null,NVe=null,LVe=null,DVe=null,wVe=null,UVe=null,xVe=null,FVe=null,$Ve=null,VVe=null,GVe=pl([Ele,vle,mle,Tle,Ale,gle,yle,Rle,Ole,ble,Cle]),Ple="cpp",Mle="dotnet",Ile="erlang",Nle="go",Lle="java",Dle="nodejs",wle="php",Ule="python",xle="ruby",Fle="webjs",BVe=null,kVe=null,jVe=null,HVe=null,YVe=null,qVe=null,KVe=null,WVe=null,QVe=null,zVe=null,XVe=pl([Ple,Mle,Ile,Nle,Lle,Dle,wle,Ule,xle,Fle]),$le="1.25.1";function hl(e){for(var t={},r=e.length,n=0;n<r;n++){var i=e[n];i&&(t[String(i).toUpperCase().replace(/[-.]/g,"_")]=i)}return t}var Vle="cloud.provider",Gle="cloud.account.id",Ble="cloud.region",kle="cloud.availability_zone",jle="cloud.platform",Hle="aws.ecs.container.arn",Yle="aws.ecs.cluster.arn",qle="aws.ecs.launchtype",Kle="aws.ecs.task.arn",Wle="aws.ecs.task.family",Qle="aws.ecs.task.revision",zle="aws.eks.cluster.arn",Xle="aws.log.group.names",Jle="aws.log.group.arns",Zle="aws.log.stream.names",efe="aws.log.stream.arns",tfe="container.name",rfe="container.id",nfe="container.runtime",ife="container.image.name",afe="container.image.tag",ofe="deployment.environment",sfe="device.id",ufe="device.model.identifier",cfe="device.model.name",lfe="faas.name",ffe="faas.id",_fe="faas.version",dfe="faas.instance",pfe="faas.max_memory",hfe="host.id",Sfe="host.name",Efe="host.type",vfe="host.arch",mfe="host.image.name",Tfe="host.image.id",Afe="host.image.version",gfe="k8s.cluster.name",yfe="k8s.node.name",Rfe="k8s.node.uid",Ofe="k8s.namespace.name",bfe="k8s.pod.uid",Cfe="k8s.pod.name",Pfe="k8s.container.name",Mfe="k8s.replicaset.uid",Ife="k8s.replicaset.name",Nfe="k8s.deployment.uid",Lfe="k8s.deployment.name",Dfe="k8s.statefulset.uid",wfe="k8s.statefulset.name",Ufe="k8s.daemonset.uid",xfe="k8s.daemonset.name",Ffe="k8s.job.uid",$fe="k8s.job.name",Vfe="k8s.cronjob.uid",Gfe="k8s.cronjob.name",Bfe="os.type",kfe="os.description",jfe="os.name",Hfe="os.version",Yfe="process.pid",qfe="process.executable.name",Kfe="process.executable.path",Wfe="process.command",Qfe="process.command_line",zfe="process.command_args",Xfe="process.owner",KB="process.runtime.name",Jfe="process.runtime.version",Zfe="process.runtime.description",e_e="service.name",t_e="service.namespace",r_e="service.instance.id",n_e="service.version",WB="telemetry.sdk.name",QB="telemetry.sdk.language",zB="telemetry.sdk.version",i_e="telemetry.auto.version",a_e="webengine.name",o_e="webengine.version",s_e="webengine.description",JVe=null,ZVe=null,eGe=null,tGe=null,rGe=null,nGe=null,iGe=null,aGe=null,oGe=null,sGe=null,uGe=null,cGe=null,lGe=null,fGe=null,_Ge=null,dGe=null,pGe=null,hGe=null,SGe=null,EGe=null,vGe=null,mGe=null,TGe=null,AGe=null,gGe=null,yGe=null,RGe=null,OGe=null,bGe=null,CGe=null,PGe=null,MGe=null,IGe=null,NGe=null,LGe=null,DGe=null,wGe=null,UGe=null,xGe=null,FGe=null,$Ge=null,VGe=null,GGe=null,BGe=null,kGe=null,jGe=null,HGe=null,YGe=null,qGe=null,KGe=null,WGe=null,QGe=null,zGe=null,XGe=null,JGe=null,ZGe=null,eBe=null,tBe=null,rBe=null,nBe=null,iBe=null,aBe=null,oBe=null,sBe=null,uBe=null,cBe=null,lBe=null,u_e=KB,fBe=null,_Be=null,dBe=null,pBe=null,hBe=null,SBe=null,c_e=WB,l_e=QB,f_e=zB,EBe=null,vBe=null,mBe=null,TBe=null,ABe=hl([Vle,Gle,Ble,kle,jle,Hle,Yle,qle,Kle,Wle,Qle,zle,Xle,Jle,Zle,efe,tfe,rfe,nfe,ife,afe,ofe,sfe,ufe,cfe,lfe,ffe,_fe,dfe,pfe,hfe,Sfe,Efe,vfe,mfe,Tfe,Afe,gfe,yfe,Rfe,Ofe,bfe,Cfe,Pfe,Mfe,Ife,Nfe,Lfe,Dfe,wfe,Ufe,xfe,Ffe,$fe,Vfe,Gfe,Bfe,kfe,jfe,Hfe,Yfe,qfe,Kfe,Wfe,Qfe,zfe,Xfe,KB,Jfe,Zfe,e_e,t_e,r_e,n_e,WB,QB,zB,i_e,a_e,o_e,s_e]),__e="alibaba_cloud",d_e="aws",p_e="azure",h_e="gcp",gBe=null,yBe=null,RBe=null,OBe=null,bBe=hl([__e,d_e,p_e,h_e]),S_e="alibaba_cloud_ecs",E_e="alibaba_cloud_fc",v_e="aws_ec2",m_e="aws_ecs",T_e="aws_eks",A_e="aws_lambda",g_e="aws_elastic_beanstalk",y_e="azure_vm",R_e="azure_container_instances",O_e="azure_aks",b_e="azure_functions",C_e="azure_app_service",P_e="gcp_compute_engine",M_e="gcp_cloud_run",I_e="gcp_kubernetes_engine",N_e="gcp_cloud_functions",L_e="gcp_app_engine",CBe=null,PBe=null,MBe=null,IBe=null,NBe=null,LBe=null,DBe=null,wBe=null,UBe=null,xBe=null,FBe=null,$Be=null,VBe=null,GBe=null,BBe=null,kBe=null,jBe=null,HBe=hl([S_e,E_e,v_e,m_e,T_e,A_e,g_e,y_e,R_e,O_e,b_e,C_e,P_e,M_e,I_e,N_e,L_e]),D_e="ec2",w_e="fargate",YBe=null,qBe=null,KBe=hl([D_e,w_e]),U_e="amd64",x_e="arm32",F_e="arm64",$_e="ia64",V_e="ppc32",G_e="ppc64",B_e="x86",WBe=null,QBe=null,zBe=null,XBe=null,JBe=null,ZBe=null,eke=null,tke=hl([U_e,x_e,F_e,$_e,V_e,G_e,B_e]),k_e="windows",j_e="linux",H_e="darwin",Y_e="freebsd",q_e="netbsd",K_e="openbsd",W_e="dragonflybsd",Q_e="hpux",z_e="aix",X_e="solaris",J_e="z_os",rke=null,nke=null,ike=null,ake=null,oke=null,ske=null,uke=null,cke=null,lke=null,fke=null,_ke=null,dke=hl([k_e,j_e,H_e,Y_e,q_e,K_e,W_e,Q_e,z_e,X_e,J_e]),Z_e="cpp",ede="dotnet",tde="erlang",rde="go",nde="java",ide="nodejs",ade="php",ode="python",sde="ruby",XB="webjs",pke=null,hke=null,Ske=null,Eke=null,vke=null,mke=null,Tke=null,Ake=null,gke=null,ude=XB,yke=hl([Z_e,ede,tde,rde,nde,ide,ade,ode,sde,XB]),y_,gM=(y_={},y_[c_e]="opentelemetry",y_[u_e]="browser",y_[l_e]=ude,y_[f_e]=$le,y_);function cde(){return"unknown_service"}var zu=function(){return zu=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},zu.apply(this,arguments)},lde=function(e,t,r,n){function i(a){return a instanceof r?a:new r(function(u){u(a)})}return new(r||(r=Promise))(function(a,u){function c(p){try{_(n.next(p))}catch(L){u(L)}}function E(p){try{_(n.throw(p))}catch(L){u(L)}}function _(p){p.done?a(p.value):i(p.value).then(c,E)}_((n=n.apply(e,t||[])).next())})},fde=function(e,t){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,u;return u={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(u[Symbol.iterator]=function(){return this}),u;function c(_){return function(p){return E([_,p])}}function E(_){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(a=_[0]&2?i.return:_[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,_[1])).done)return a;switch(i=0,a&&(_=[_[0]&2,a.value]),_[0]){case 0:case 1:a=_;break;case 4:return r.label++,{value:_[1],done:!1};case 5:r.label++,i=_[1],_=[0];continue;case 7:_=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(_[0]===6||_[0]===2)){r=0;continue}if(_[0]===3&&(!a||_[1]>a[0]&&_[1]<a[3])){r.label=_[1];break}if(_[0]===6&&r.label<a[1]){r.label=a[1],a=_;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(_);break}a[2]&&r.ops.pop(),r.trys.pop();continue}_=t.call(e,r)}catch(p){_=[6,p],i=0}finally{n=a=0}if(_[0]&5)throw _[1];return{value:_[0]?_[1]:void 0,done:!0}}},_de=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,a=[],u;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)a.push(i.value)}catch(c){u={error:c}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(u)throw u.error}}return a},JB=function(){function e(t,r){var n=this,i;this._attributes=t,this.asyncAttributesPending=r!=null,this._syncAttributes=(i=this._attributes)!==null&&i!==void 0?i:{},this._asyncAttributesPromise=r?.then(function(a){return n._attributes=Object.assign({},n._attributes,a),n.asyncAttributesPending=!1,a},function(a){return _r.debug("a resource's async attributes promise rejected: %s",a),n.asyncAttributesPending=!1,{}})}return e.empty=function(){return e.EMPTY},e.default=function(){var t;return new e((t={},t[Gce]=cde(),t[YB]=gM[YB],t[HB]=gM[HB],t[qB]=gM[qB],t))},Object.defineProperty(e.prototype,"attributes",{get:function(){var t;return this.asyncAttributesPending&&_r.error("Accessing resource attributes before async attributes settled"),(t=this._attributes)!==null&&t!==void 0?t:{}},enumerable:!1,configurable:!0}),e.prototype.waitForAsyncAttributes=function(){return lde(this,void 0,void 0,function(){return fde(this,function(t){switch(t.label){case 0:return this.asyncAttributesPending?[4,this._asyncAttributesPromise]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2]}})})},e.prototype.merge=function(t){var r=this,n;if(!t)return this;var i=zu(zu({},this._syncAttributes),(n=t._syncAttributes)!==null&&n!==void 0?n:t.attributes);if(!this._asyncAttributesPromise&&!t._asyncAttributesPromise)return new e(i);var a=Promise.all([this._asyncAttributesPromise,t._asyncAttributesPromise]).then(function(u){var c,E=_de(u,2),_=E[0],p=E[1];return zu(zu(zu(zu({},r._syncAttributes),_),(c=t._syncAttributes)!==null&&c!==void 0?c:t.attributes),p)});return new e(i,a)},e.EMPTY=new e({}),e}(),dde="[object Object]",pde="[object Null]",hde="[object Undefined]",Sde=Function.prototype,ZB=Sde.toString,Ede=ZB.call(Object),vde=mde(Object.getPrototypeOf,Object),ek=Object.prototype,tk=ek.hasOwnProperty,Sl=Symbol?Symbol.toStringTag:void 0,rk=ek.toString;function mde(e,t){return function(r){return e(t(r))}}function nk(e){if(!Tde(e)||Ade(e)!==dde)return!1;var t=vde(e);if(t===null)return!0;var r=tk.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&ZB.call(r)===Ede}function Tde(e){return e!=null&&typeof e=="object"}function Ade(e){return e==null?e===void 0?hde:pde:Sl&&Sl in Object(e)?gde(e):yde(e)}function gde(e){var t=tk.call(e,Sl),r=e[Sl],n=!1;try{e[Sl]=void 0,n=!0}catch{}var i=rk.call(e);return n&&(t?e[Sl]=r:delete e[Sl]),i}function yde(e){return rk.call(e)}var Rde=20;function Ode(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var r=e.shift(),n=new WeakMap;e.length>0;)r=ik(r,e.shift(),0,n);return r}function yM(e){return TT(e)?e.slice():e}function ik(e,t,r,n){r===void 0&&(r=0);var i;if(!(r>Rde)){if(r++,AT(e)||AT(t)||ok(t))i=yM(t);else if(TT(e)){if(i=e.slice(),TT(t))for(var a=0,u=t.length;a<u;a++)i.push(yM(t[a]));else if(Ah(t))for(var c=Object.keys(t),a=0,u=c.length;a<u;a++){var E=c[a];i[E]=yM(t[E])}}else if(Ah(e))if(Ah(t)){if(!bde(e,t))return t;i=Object.assign({},e);for(var c=Object.keys(t),a=0,u=c.length;a<u;a++){var E=c[a],_=t[E];if(AT(_))typeof _>"u"?delete i[E]:i[E]=_;else{var p=i[E],L=_;if(ak(e,E,n)||ak(t,E,n))delete i[E];else{if(Ah(p)&&Ah(L)){var W=n.get(p)||[],ve=n.get(L)||[];W.push({obj:e,key:E}),ve.push({obj:t,key:E}),n.set(p,W),n.set(L,ve)}i[E]=ik(i[E],_,r,n)}}}}else i=t;return i}}function ak(e,t,r){for(var n=r.get(e[t])||[],i=0,a=n.length;i<a;i++){var u=n[i];if(u.key===t&&u.obj===e)return!0}return!1}function TT(e){return Array.isArray(e)}function ok(e){return typeof e=="function"}function Ah(e){return!AT(e)&&!TT(e)&&!ok(e)&&typeof e=="object"}function AT(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e>"u"||e instanceof Date||e instanceof RegExp||e===null}function bde(e,t){return!(!nk(e)||!nk(t))}var Cde=function(){function e(){var t=this;this._promise=new Promise(function(r,n){t._resolve=r,t._reject=n})}return Object.defineProperty(e.prototype,"promise",{get:function(){return this._promise},enumerable:!1,configurable:!0}),e.prototype.resolve=function(t){this._resolve(t)},e.prototype.reject=function(t){this._reject(t)},e}(),Pde=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,a=[],u;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)a.push(i.value)}catch(c){u={error:c}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(u)throw u.error}}return a},Mde=function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,a;n<i;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))},sk=function(){function e(t,r){this._callback=t,this._that=r,this._isCalled=!1,this._deferred=new Cde}return Object.defineProperty(e.prototype,"isCalled",{get:function(){return this._isCalled},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"promise",{get:function(){return this._deferred.promise},enumerable:!1,configurable:!0}),e.prototype.call=function(){for(var t,r=this,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];if(!this._isCalled){this._isCalled=!0;try{Promise.resolve((t=this._callback).call.apply(t,Mde([this._that],Pde(n),!1))).then(function(a){return r._deferred.resolve(a)},function(a){return r._deferred.reject(a)})}catch(a){this._deferred.reject(a)}}return this._deferred.promise},e}(),_a=_T.getInstance(),gh=performance,uk=9,Ide=6,Nde=Math.pow(10,Ide),gT=Math.pow(10,uk);function yT(e){var t=e/1e3,r=Math.trunc(t),n=Math.round(e%1e3*Nde);return[r,n]}function ck(){var e=gh.timeOrigin;if(typeof e!="number"){var t=gh;e=t.timing&&t.timing.fetchStart}return e}function RM(e){var t=yT(ck()),r=yT(typeof e=="number"?e:gh.now());return Lde(t,r)}function El(e){if(lk(e))return e;if(typeof e=="number")return e<ck()?RM(e):yT(e);if(e instanceof Date)return yT(e.getTime());throw TypeError("Invalid input type")}function Rke(e,t){var r=t[0]-e[0],n=t[1]-e[1];return n<0&&(r-=1,n+=gT),[r,n]}function Oke(e){var t=uk,r=""+"0".repeat(t)+e[1]+"Z",n=r.substr(r.length-t-1),i=new Date(e[0]*1e3).toISOString();return i.replace("000Z",n)}function Xu(e){return e[0]*gT+e[1]}function bke(e){return e[0]*1e3+e[1]/1e6}function Cke(e){return e[0]*1e6+e[1]/1e3}function lk(e){return Array.isArray(e)&&e.length===2&&typeof e[0]=="number"&&typeof e[1]=="number"}function Pke(e){return lk(e)||typeof e=="number"||e instanceof Date}function Lde(e,t){var r=[e[0]+t[0],e[1]+t[1]];return r[1]>=gT&&(r[1]-=gT,r[0]+=1),r}var fk=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Dde=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,a=[],u;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)a.push(i.value)}catch(c){u={error:c}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(u)throw u.error}}return a};function Mke(e){var t,r,n={};if(typeof e!="object"||e==null)return n;try{for(var i=fk(Object.entries(e)),a=i.next();!a.done;a=i.next()){var u=Dde(a.value,2),c=u[0],E=u[1];if(!wde(c)){diag.warn("Invalid attribute key: "+c);continue}if(!OM(E)){diag.warn("Invalid attribute value set for key: "+c);continue}Array.isArray(E)?n[c]=E.slice():n[c]=E}}catch(_){t={error:_}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return n}function wde(e){return typeof e=="string"&&e.length>0}function OM(e){return e==null?!0:Array.isArray(e)?Ude(e):_k(e)}function Ude(e){var t,r,n;try{for(var i=fk(e),a=i.next();!a.done;a=i.next()){var u=a.value;if(u!=null){if(!n){if(_k(u)){n=typeof u;continue}return!1}if(typeof u!==n)return!1}}}catch(c){t={error:c}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return!0}function _k(e){switch(typeof e){case"number":case"boolean":case"string":return!0}return!1}var xde=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Fde=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,a=[],u;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)a.push(i.value)}catch(c){u={error:c}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(u)throw u.error}}return a},$de=function(){function e(t,r,n){this.attributes={},this.totalAttributesCount=0,this._isReadonly=!1;var i=n.timestamp,a=n.observedTimestamp,u=n.severityNumber,c=n.severityText,E=n.body,_=n.attributes,p=_===void 0?{}:_,L=n.context,W=Date.now();if(this.hrTime=El(i??W),this.hrTimeObserved=El(a??W),L){var ve=ta.getSpanContext(L);ve&&m_(ve)&&(this.spanContext=ve)}this.severityNumber=u,this.severityText=c,this.body=E,this.resource=t.resource,this.instrumentationScope=r,this._logRecordLimits=t.logRecordLimits,this.setAttributes(p)}return Object.defineProperty(e.prototype,"severityText",{get:function(){return this._severityText},set:function(t){this._isLogRecordReadonly()||(this._severityText=t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"severityNumber",{get:function(){return this._severityNumber},set:function(t){this._isLogRecordReadonly()||(this._severityNumber=t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"body",{get:function(){return this._body},set:function(t){this._isLogRecordReadonly()||(this._body=t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"droppedAttributesCount",{get:function(){return this.totalAttributesCount-Object.keys(this.attributes).length},enumerable:!1,configurable:!0}),e.prototype.setAttribute=function(t,r){return this._isLogRecordReadonly()?this:r===null?this:t.length===0?(_r.warn("Invalid attribute key: "+t),this):!OM(r)&&!(typeof r=="object"&&!Array.isArray(r)&&Object.keys(r).length>0)?(_r.warn("Invalid attribute value set for key: "+t),this):(this.totalAttributesCount+=1,Object.keys(this.attributes).length>=this._logRecordLimits.attributeCountLimit&&!Object.prototype.hasOwnProperty.call(this.attributes,t)?(this.droppedAttributesCount===1&&_r.warn("Dropping extra attributes."),this):(OM(r)?this.attributes[t]=this._truncateToSize(r):this.attributes[t]=r,this))},e.prototype.setAttributes=function(t){var r,n;try{for(var i=xde(Object.entries(t)),a=i.next();!a.done;a=i.next()){var u=Fde(a.value,2),c=u[0],E=u[1];this.setAttribute(c,E)}}catch(_){r={error:_}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return this},e.prototype.setBody=function(t){return this.body=t,this},e.prototype.setSeverityNumber=function(t){return this.severityNumber=t,this},e.prototype.setSeverityText=function(t){return this.severityText=t,this},e.prototype._makeReadonly=function(){this._isReadonly=!0},e.prototype._truncateToSize=function(t){var r=this,n=this._logRecordLimits.attributeValueLengthLimit;return n<=0?(_r.warn("Attribute value limit must be positive, got "+n),t):typeof t=="string"?this._truncateToLimitUtil(t,n):Array.isArray(t)?t.map(function(i){return typeof i=="string"?r._truncateToLimitUtil(i,n):i}):t},e.prototype._truncateToLimitUtil=function(t,r){return t.length<=r?t:t.substring(0,r)},e.prototype._isLogRecordReadonly=function(){return this._isReadonly&&_r.warn("Can not execute the operation on emitted log record"),this._isReadonly},e}(),bM=function(){return bM=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},bM.apply(this,arguments)},Vde=function(){function e(t,r){this.instrumentationScope=t,this._sharedState=r}return e.prototype.emit=function(t){var r=t.context||_a.active(),n=new $de(this._sharedState,this.instrumentationScope,bM({context:r},t));this._sharedState.activeProcessor.onEmit(n,r),n._makeReadonly()},e}(),CM;(function(e){e.AlwaysOff="always_off",e.AlwaysOn="always_on",e.ParentBasedAlwaysOff="parentbased_always_off",e.ParentBasedAlwaysOn="parentbased_always_on",e.ParentBasedTraceIdRatio="parentbased_traceidratio",e.TraceIdRatio="traceidratio"})(CM||(CM={}));var Gde=",",Bde=["OTEL_SDK_DISABLED"];function kde(e){return Bde.indexOf(e)>-1}var jde=["OTEL_BSP_EXPORT_TIMEOUT","OTEL_BSP_MAX_EXPORT_BATCH_SIZE","OTEL_BSP_MAX_QUEUE_SIZE","OTEL_BSP_SCHEDULE_DELAY","OTEL_BLRP_EXPORT_TIMEOUT","OTEL_BLRP_MAX_EXPORT_BATCH_SIZE","OTEL_BLRP_MAX_QUEUE_SIZE","OTEL_BLRP_SCHEDULE_DELAY","OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_ATTRIBUTE_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT","OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT","OTEL_SPAN_EVENT_COUNT_LIMIT","OTEL_SPAN_LINK_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT","OTEL_EXPORTER_OTLP_TIMEOUT","OTEL_EXPORTER_OTLP_TRACES_TIMEOUT","OTEL_EXPORTER_OTLP_METRICS_TIMEOUT","OTEL_EXPORTER_OTLP_LOGS_TIMEOUT","OTEL_EXPORTER_JAEGER_AGENT_PORT"];function Hde(e){return jde.indexOf(e)>-1}var Yde=["OTEL_NO_PATCH_MODULES","OTEL_PROPAGATORS"];function qde(e){return Yde.indexOf(e)>-1}var RT=1/0,OT=128,Kde=128,Wde=128,dk={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:vn.INFO,OTEL_NO_PATCH_MODULES:[],OTEL_PROPAGATORS:["tracecontext","baggage"],OTEL_RESOURCE_ATTRIBUTES:"",OTEL_SERVICE_NAME:"",OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT:RT,OTEL_ATTRIBUTE_COUNT_LIMIT:OT,OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT:RT,OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT:OT,OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT:RT,OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT:OT,OTEL_SPAN_EVENT_COUNT_LIMIT:128,OTEL_SPAN_LINK_COUNT_LIMIT:128,OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT:Kde,OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT:Wde,OTEL_TRACES_EXPORTER:"",OTEL_TRACES_SAMPLER:CM.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"};function Qde(e,t,r){if(!(typeof r[e]>"u")){var n=String(r[e]);t[e]=n.toLowerCase()==="true"}}function zde(e,t,r,n,i){if(n===void 0&&(n=-1/0),i===void 0&&(i=1/0),typeof r[e]<"u"){var a=Number(r[e]);isNaN(a)||(a<n?t[e]=n:a>i?t[e]=i:t[e]=a)}}function Xde(e,t,r,n){n===void 0&&(n=Gde);var i=r[e];typeof i=="string"&&(t[e]=i.split(n).map(function(a){return a.trim()}))}var Jde={ALL:vn.ALL,VERBOSE:vn.VERBOSE,DEBUG:vn.DEBUG,INFO:vn.INFO,WARN:vn.WARN,ERROR:vn.ERROR,NONE:vn.NONE};function Zde(e,t,r){var n=r[e];if(typeof n=="string"){var i=Jde[n.toUpperCase()];i!=null&&(t[e]=i)}}function pk(e){var t={};for(var r in dk){var n=r;switch(n){case"OTEL_LOG_LEVEL":Zde(n,t,e);break;default:if(kde(n))Qde(n,t,e);else if(Hde(n))zde(n,t,e);else if(qde(n))Xde(n,t,e);else{var i=e[n];typeof i<"u"&&i!==null&&(t[n]=String(i))}}}return t}var hk=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof h.g=="object"?h.g:{};function PM(){var e=pk(hk);return Object.assign({},dk,e)}function epe(){return pk(hk)}function tpe(){return{forceFlushTimeoutMillis:3e4,logRecordLimits:{attributeValueLengthLimit:PM().OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:PM().OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT},includeTraceContext:!0}}function rpe(e){var t,r,n,i,a,u,c=epe();return{attributeCountLimit:(n=(r=(t=e.attributeCountLimit)!==null&&t!==void 0?t:c.OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT)!==null&&r!==void 0?r:c.OTEL_ATTRIBUTE_COUNT_LIMIT)!==null&&n!==void 0?n:OT,attributeValueLengthLimit:(u=(a=(i=e.attributeValueLengthLimit)!==null&&i!==void 0?i:c.OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&a!==void 0?a:c.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&u!==void 0?u:RT}}var npe=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),ipe=function(e){npe(t,e);function t(r){var n=e.call(this,r)||this;return Object.setPrototypeOf(n,t.prototype),n}return t}(Error);function Sk(e,t){var r,n=new Promise(function(a,u){r=setTimeout(function(){u(new ipe("Operation timed out."))},t)});return Promise.race([e,n]).then(function(i){return clearTimeout(r),i},function(i){throw clearTimeout(r),i})}var Ek=function(e,t,r,n){function i(a){return a instanceof r?a:new r(function(u){u(a)})}return new(r||(r=Promise))(function(a,u){function c(p){try{_(n.next(p))}catch(L){u(L)}}function E(p){try{_(n.throw(p))}catch(L){u(L)}}function _(p){p.done?a(p.value):i(p.value).then(c,E)}_((n=n.apply(e,t||[])).next())})},vk=function(e,t){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,u;return u={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(u[Symbol.iterator]=function(){return this}),u;function c(_){return function(p){return E([_,p])}}function E(_){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(a=_[0]&2?i.return:_[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,_[1])).done)return a;switch(i=0,a&&(_=[_[0]&2,a.value]),_[0]){case 0:case 1:a=_;break;case 4:return r.label++,{value:_[1],done:!1};case 5:r.label++,i=_[1],_=[0];continue;case 7:_=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(_[0]===6||_[0]===2)){r=0;continue}if(_[0]===3&&(!a||_[1]>a[0]&&_[1]<a[3])){r.label=_[1];break}if(_[0]===6&&r.label<a[1]){r.label=a[1],a=_;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(_);break}a[2]&&r.ops.pop(),r.trys.pop();continue}_=t.call(e,r)}catch(p){_=[6,p],i=0}finally{n=a=0}if(_[0]&5)throw _[1];return{value:_[0]?_[1]:void 0,done:!0}}},ape=function(){function e(t,r){this.processors=t,this.forceFlushTimeoutMillis=r}return e.prototype.forceFlush=function(){return Ek(this,void 0,void 0,function(){var t;return vk(this,function(r){switch(r.label){case 0:return t=this.forceFlushTimeoutMillis,[4,Promise.all(this.processors.map(function(n){return Sk(n.forceFlush(),t)}))];case 1:return r.sent(),[2]}})})},e.prototype.onEmit=function(t,r){this.processors.forEach(function(n){return n.onEmit(t,r)})},e.prototype.shutdown=function(){return Ek(this,void 0,void 0,function(){return vk(this,function(t){switch(t.label){case 0:return[4,Promise.all(this.processors.map(function(r){return r.shutdown()}))];case 1:return t.sent(),[2]}})})},e}(),ope=function(){function e(){}return e.prototype.forceFlush=function(){return Promise.resolve()},e.prototype.onEmit=function(t,r){},e.prototype.shutdown=function(){return Promise.resolve()},e}(),spe=function(){function e(t,r,n){this.resource=t,this.forceFlushTimeoutMillis=r,this.logRecordLimits=n,this.loggers=new Map,this.registeredLogRecordProcessors=[],this.activeProcessor=new ope}return e}(),upe="unknown",cpe=function(){function e(t){t===void 0&&(t={});var r,n=Ode({},tpe(),t),i=JB.default().merge((r=n.resource)!==null&&r!==void 0?r:JB.empty());this._sharedState=new spe(i,n.forceFlushTimeoutMillis,rpe(n.logRecordLimits)),this._shutdownOnce=new sk(this._shutdown,this)}return e.prototype.getLogger=function(t,r,n){if(this._shutdownOnce.isCalled)return _r.warn("A shutdown LoggerProvider cannot provide a Logger"),Sue;t||_r.warn("Logger requested without instrumentation scope name.");var i=t||upe,a=i+"@"+(r||"")+":"+(n?.schemaUrl||"");return this._sharedState.loggers.has(a)||this._sharedState.loggers.set(a,new Vde({name:i,version:r,schemaUrl:n?.schemaUrl},this._sharedState)),this._sharedState.loggers.get(a)},e.prototype.addLogRecordProcessor=function(t){this._sharedState.registeredLogRecordProcessors.length===0&&this._sharedState.activeProcessor.shutdown().catch(function(r){return _r.error("Error while trying to shutdown current log record processor",r)}),this._sharedState.registeredLogRecordProcessors.push(t),this._sharedState.activeProcessor=new ape(this._sharedState.registeredLogRecordProcessors,this._sharedState.forceFlushTimeoutMillis)},e.prototype.forceFlush=function(){return this._shutdownOnce.isCalled?(_r.warn("invalid attempt to force flush after LoggerProvider shutdown"),this._shutdownOnce.promise):this._sharedState.activeProcessor.forceFlush()},e.prototype.shutdown=function(){return this._shutdownOnce.isCalled?(_r.warn("shutdown may only be called once per LoggerProvider"),this._shutdownOnce.promise):this._shutdownOnce.call()},e.prototype._shutdown=function(){return this._sharedState.activeProcessor.shutdown()},e}();function lpe(){return function(e){_r.error(fpe(e))}}function fpe(e){return typeof e=="string"?e:JSON.stringify(_pe(e))}function _pe(e){for(var t={},r=e;r!==null;)Object.getOwnPropertyNames(r).forEach(function(n){if(!t[n]){var i=r[n];i&&(t[n]=String(i))}}),r=Object.getPrototypeOf(r);return t}var mk=lpe();function Ike(e){mk=e}function bT(e){try{mk(e)}catch{}}function Nke(e){}function dpe(e,t){return new Promise(function(r){_a.with(Fne(_a.active()),function(){e.export(t,function(n){r(n)})})})}var ppe={_export:dpe},MM;(function(e){e[e.SUCCESS=0]="SUCCESS",e[e.FAILED=1]="FAILED"})(MM||(MM={}));var hpe=function(e,t,r,n){function i(a){return a instanceof r?a:new r(function(u){u(a)})}return new(r||(r=Promise))(function(a,u){function c(p){try{_(n.next(p))}catch(L){u(L)}}function E(p){try{_(n.throw(p))}catch(L){u(L)}}function _(p){p.done?a(p.value):i(p.value).then(c,E)}_((n=n.apply(e,t||[])).next())})},Spe=function(e,t){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,u;return u={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(u[Symbol.iterator]=function(){return this}),u;function c(_){return function(p){return E([_,p])}}function E(_){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(a=_[0]&2?i.return:_[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,_[1])).done)return a;switch(i=0,a&&(_=[_[0]&2,a.value]),_[0]){case 0:case 1:a=_;break;case 4:return r.label++,{value:_[1],done:!1};case 5:r.label++,i=_[1],_=[0];continue;case 7:_=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(_[0]===6||_[0]===2)){r=0;continue}if(_[0]===3&&(!a||_[1]>a[0]&&_[1]<a[3])){r.label=_[1];break}if(_[0]===6&&r.label<a[1]){r.label=a[1],a=_;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(_);break}a[2]&&r.ops.pop(),r.trys.pop();continue}_=t.call(e,r)}catch(p){_=[6,p],i=0}finally{n=a=0}if(_[0]&5)throw _[1];return{value:_[0]?_[1]:void 0,done:!0}}},Epe=function(){function e(t,r){var n,i,a,u;this._exporter=t,this._finishedLogRecords=[];var c=PM();this._maxExportBatchSize=(n=r?.maxExportBatchSize)!==null&&n!==void 0?n:c.OTEL_BLRP_MAX_EXPORT_BATCH_SIZE,this._maxQueueSize=(i=r?.maxQueueSize)!==null&&i!==void 0?i:c.OTEL_BLRP_MAX_QUEUE_SIZE,this._scheduledDelayMillis=(a=r?.scheduledDelayMillis)!==null&&a!==void 0?a:c.OTEL_BLRP_SCHEDULE_DELAY,this._exportTimeoutMillis=(u=r?.exportTimeoutMillis)!==null&&u!==void 0?u:c.OTEL_BLRP_EXPORT_TIMEOUT,this._shutdownOnce=new sk(this._shutdown,this),this._maxExportBatchSize>this._maxQueueSize&&(_r.warn("BatchLogRecordProcessor: maxExportBatchSize must be smaller or equal to maxQueueSize, setting maxExportBatchSize to match maxQueueSize"),this._maxExportBatchSize=this._maxQueueSize)}return e.prototype.onEmit=function(t){this._shutdownOnce.isCalled||this._addToBuffer(t)},e.prototype.forceFlush=function(){return this._shutdownOnce.isCalled?this._shutdownOnce.promise:this._flushAll()},e.prototype.shutdown=function(){return this._shutdownOnce.call()},e.prototype._shutdown=function(){return hpe(this,void 0,void 0,function(){return Spe(this,function(t){switch(t.label){case 0:return this.onShutdown(),[4,this._flushAll()];case 1:return t.sent(),[4,this._exporter.shutdown()];case 2:return t.sent(),[2]}})})},e.prototype._addToBuffer=function(t){this._finishedLogRecords.length>=this._maxQueueSize||(this._finishedLogRecords.push(t),this._maybeStartTimer())},e.prototype._flushAll=function(){var t=this;return new Promise(function(r,n){for(var i=[],a=Math.ceil(t._finishedLogRecords.length/t._maxExportBatchSize),u=0;u<a;u++)i.push(t._flushOneBatch());Promise.all(i).then(function(){r()}).catch(n)})},e.prototype._flushOneBatch=function(){var t=this;return this._clearTimer(),this._finishedLogRecords.length===0?Promise.resolve():new Promise(function(r,n){Sk(t._export(t._finishedLogRecords.splice(0,t._maxExportBatchSize)),t._exportTimeoutMillis).then(function(){return r()}).catch(n)})},e.prototype._maybeStartTimer=function(){var t=this;this._timer===void 0&&(this._timer=setTimeout(function(){t._flushOneBatch().then(function(){t._finishedLogRecords.length>0&&(t._clearTimer(),t._maybeStartTimer())}).catch(function(r){bT(r)})},this._scheduledDelayMillis),this._timer,void 0)},e.prototype._clearTimer=function(){this._timer!==void 0&&(clearTimeout(this._timer),this._timer=void 0)},e.prototype._export=function(t){var r=this,n=function(){return ppe._export(r._exporter,t).then(function(a){var u;a.code!==MM.SUCCESS&&bT((u=a.error)!==null&&u!==void 0?u:new Error("BatchLogRecordProcessor: log record export failed (status "+a+")"))}).catch(bT)},i=t.map(function(a){return a.resource}).filter(function(a){return a.asyncAttributesPending});return i.length===0?n():Promise.all(i.map(function(a){var u;return(u=a.waitForAsyncAttributes)===null||u===void 0?void 0:u.call(a)})).then(n,bT)},e}(),vpe=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),mpe=function(e){vpe(t,e);function t(r,n){var i=e.call(this,r,n)||this;return i._onInit(n),i}return t.prototype.onShutdown=function(){typeof document>"u"||(this._visibilityChangeListener&&document.removeEventListener("visibilitychange",this._visibilityChangeListener),this._pageHideListener&&document.removeEventListener("pagehide",this._pageHideListener))},t.prototype._onInit=function(r){var n=this;r?.disableAutoFlushOnDocumentHide===!0||typeof document>"u"||(this._visibilityChangeListener=function(){document.visibilityState==="hidden"&&n.forceFlush()},this._pageHideListener=function(){n.forceFlush()},document.addEventListener("visibilitychange",this._visibilityChangeListener),document.addEventListener("pagehide",this._pageHideListener))},t}(Epe),Tpe=function(){function e(){}return e.prototype.inject=function(t,r){},e.prototype.extract=function(t,r){return t},e.prototype.fields=function(){return[]},e}(),Ape={get:function(e,t){if(e!=null)return e[t]},keys:function(e){return e==null?[]:Object.keys(e)}},gpe={set:function(e,t,r){e!=null&&(e[t]=r)}},IM=fT("OpenTelemetry Baggage Key");function Tk(e){return e.getValue(IM)||void 0}function ype(){return Tk(_T.getInstance().active())}function Rpe(e,t){return e.setValue(IM,t)}function Ope(e){return e.deleteValue(IM)}var bpe=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,a=[],u;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)a.push(i.value)}catch(c){u={error:c}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(u)throw u.error}}return a},Cpe=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Ppe=function(){function e(t){this._entries=t?new Map(t):new Map}return e.prototype.getEntry=function(t){var r=this._entries.get(t);if(!!r)return Object.assign({},r)},e.prototype.getAllEntries=function(){return Array.from(this._entries.entries()).map(function(t){var r=bpe(t,2),n=r[0],i=r[1];return[n,i]})},e.prototype.setEntry=function(t,r){var n=new e(this._entries);return n._entries.set(t,r),n},e.prototype.removeEntry=function(t){var r=new e(this._entries);return r._entries.delete(t),r},e.prototype.removeEntries=function(){for(var t,r,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];var a=new e(this._entries);try{for(var u=Cpe(n),c=u.next();!c.done;c=u.next()){var E=c.value;a._entries.delete(E)}}catch(_){t={error:_}}finally{try{c&&!c.done&&(r=u.return)&&r.call(u)}finally{if(t)throw t.error}}return a},e.prototype.clear=function(){return new e},e}(),Mpe=Symbol("BaggageEntryMetadata"),Ipe=gs.instance();function Npe(e){return e===void 0&&(e={}),new Ppe(new Map(Object.entries(e)))}function Lpe(e){return typeof e!="string"&&(Ipe.error("Cannot create baggage metadata from unknown type: "+typeof e),e=""),{__TYPE__:Mpe,toString:function(){return e}}}var NM="propagation",Dpe=new Tpe,wpe=function(){function e(){this.createBaggage=Npe,this.getBaggage=Tk,this.getActiveBaggage=ype,this.setBaggage=Rpe,this.deleteBaggage=Ope}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalPropagator=function(t){return _h(NM,t,gs.instance())},e.prototype.inject=function(t,r,n){return n===void 0&&(n=gpe),this._getGlobalPropagator().inject(t,r,n)},e.prototype.extract=function(t,r,n){return n===void 0&&(n=Ape),this._getGlobalPropagator().extract(t,r,n)},e.prototype.fields=function(){return this._getGlobalPropagator().fields()},e.prototype.disable=function(){dh(NM,gs.instance())},e.prototype._getGlobalPropagator=function(){return ll(NM)||Dpe},e}(),R_=wpe.getInstance(),Upe="[object Object]",xpe="[object Null]",Fpe="[object Undefined]",$pe=Function.prototype,Ak=$pe.toString,Vpe=Ak.call(Object),Gpe=Bpe(Object.getPrototypeOf,Object),gk=Object.prototype,yk=gk.hasOwnProperty,vl=Symbol?Symbol.toStringTag:void 0,Rk=gk.toString;function Bpe(e,t){return function(r){return e(t(r))}}function Ok(e){if(!kpe(e)||jpe(e)!==Upe)return!1;var t=Gpe(e);if(t===null)return!0;var r=yk.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&Ak.call(r)===Vpe}function kpe(e){return e!=null&&typeof e=="object"}function jpe(e){return e==null?e===void 0?Fpe:xpe:vl&&vl in Object(e)?Hpe(e):Ype(e)}function Hpe(e){var t=yk.call(e,vl),r=e[vl],n=!1;try{e[vl]=void 0,n=!0}catch{}var i=Rk.call(e);return n&&(t?e[vl]=r:delete e[vl]),i}function Ype(e){return Rk.call(e)}var qpe=20;function Kpe(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var r=e.shift(),n=new WeakMap;e.length>0;)r=bk(r,e.shift(),0,n);return r}function LM(e){return CT(e)?e.slice():e}function bk(e,t,r,n){r===void 0&&(r=0);var i;if(!(r>qpe)){if(r++,PT(e)||PT(t)||Pk(t))i=LM(t);else if(CT(e)){if(i=e.slice(),CT(t))for(var a=0,u=t.length;a<u;a++)i.push(LM(t[a]));else if(yh(t))for(var c=Object.keys(t),a=0,u=c.length;a<u;a++){var E=c[a];i[E]=LM(t[E])}}else if(yh(e))if(yh(t)){if(!Wpe(e,t))return t;i=Object.assign({},e);for(var c=Object.keys(t),a=0,u=c.length;a<u;a++){var E=c[a],_=t[E];if(PT(_))typeof _>"u"?delete i[E]:i[E]=_;else{var p=i[E],L=_;if(Ck(e,E,n)||Ck(t,E,n))delete i[E];else{if(yh(p)&&yh(L)){var W=n.get(p)||[],ve=n.get(L)||[];W.push({obj:e,key:E}),ve.push({obj:t,key:E}),n.set(p,W),n.set(L,ve)}i[E]=bk(i[E],_,r,n)}}}}else i=t;return i}}function Ck(e,t,r){for(var n=r.get(e[t])||[],i=0,a=n.length;i<a;i++){var u=n[i];if(u.key===t&&u.obj===e)return!0}return!1}function CT(e){return Array.isArray(e)}function Pk(e){return typeof e=="function"}function yh(e){return!PT(e)&&!CT(e)&&!Pk(e)&&typeof e=="object"}function PT(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e>"u"||e instanceof Date||e instanceof RegExp||e===null}function Wpe(e,t){return!(!Ok(e)||!Ok(t))}var Rs;(function(e){e.AlwaysOff="always_off",e.AlwaysOn="always_on",e.ParentBasedAlwaysOff="parentbased_always_off",e.ParentBasedAlwaysOn="parentbased_always_on",e.ParentBasedTraceIdRatio="parentbased_traceidratio",e.TraceIdRatio="traceidratio"})(Rs||(Rs={}));var Qpe=",",zpe=["OTEL_SDK_DISABLED"];function Xpe(e){return zpe.indexOf(e)>-1}var Jpe=["OTEL_BSP_EXPORT_TIMEOUT","OTEL_BSP_MAX_EXPORT_BATCH_SIZE","OTEL_BSP_MAX_QUEUE_SIZE","OTEL_BSP_SCHEDULE_DELAY","OTEL_BLRP_EXPORT_TIMEOUT","OTEL_BLRP_MAX_EXPORT_BATCH_SIZE","OTEL_BLRP_MAX_QUEUE_SIZE","OTEL_BLRP_SCHEDULE_DELAY","OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_ATTRIBUTE_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT","OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT","OTEL_SPAN_EVENT_COUNT_LIMIT","OTEL_SPAN_LINK_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT","OTEL_EXPORTER_OTLP_TIMEOUT","OTEL_EXPORTER_OTLP_TRACES_TIMEOUT","OTEL_EXPORTER_OTLP_METRICS_TIMEOUT","OTEL_EXPORTER_OTLP_LOGS_TIMEOUT","OTEL_EXPORTER_JAEGER_AGENT_PORT"];function Zpe(e){return Jpe.indexOf(e)>-1}var ehe=["OTEL_NO_PATCH_MODULES","OTEL_PROPAGATORS","OTEL_SEMCONV_STABILITY_OPT_IN"];function the(e){return ehe.indexOf(e)>-1}var MT=1/0,IT=128,rhe=128,nhe=128,Mk={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:vn.INFO,OTEL_NO_PATCH_MODULES:[],OTEL_PROPAGATORS:["tracecontext","baggage"],OTEL_RESOURCE_ATTRIBUTES:"",OTEL_SERVICE_NAME:"",OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT:MT,OTEL_ATTRIBUTE_COUNT_LIMIT:IT,OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT:MT,OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT:IT,OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT:MT,OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT:IT,OTEL_SPAN_EVENT_COUNT_LIMIT:128,OTEL_SPAN_LINK_COUNT_LIMIT:128,OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT:rhe,OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT:nhe,OTEL_TRACES_EXPORTER:"",OTEL_TRACES_SAMPLER:Rs.ParentBasedAlwaysOn,OTEL_TRACES_SAMPLER_ARG:"",OTEL_LOGS_EXPORTER:"",OTEL_EXPORTER_OTLP_INSECURE:"",OTEL_EXPORTER_OTLP_TRACES_INSECURE:"",OTEL_EXPORTER_OTLP_METRICS_INSECURE:"",OTEL_EXPORTER_OTLP_LOGS_INSECURE:"",OTEL_EXPORTER_OTLP_CERTIFICATE:"",OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE:"",OTEL_EXPORTER_OTLP_METRICS_CERTIFICATE:"",OTEL_EXPORTER_OTLP_LOGS_CERTIFICATE:"",OTEL_EXPORTER_OTLP_COMPRESSION:"",OTEL_EXPORTER_OTLP_TRACES_COMPRESSION:"",OTEL_EXPORTER_OTLP_METRICS_COMPRESSION:"",OTEL_EXPORTER_OTLP_LOGS_COMPRESSION:"",OTEL_EXPORTER_OTLP_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_TRACES_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_METRICS_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_LOGS_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_TRACES_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_METRICS_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_LOGS_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_TRACES_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_METRICS_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_LOGS_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE:"cumulative",OTEL_SEMCONV_STABILITY_OPT_IN:[]};function ihe(e,t,r){if(!(typeof r[e]>"u")){var n=String(r[e]);t[e]=n.toLowerCase()==="true"}}function ahe(e,t,r,n,i){if(n===void 0&&(n=-1/0),i===void 0&&(i=1/0),typeof r[e]<"u"){var a=Number(r[e]);isNaN(a)||(a<n?t[e]=n:a>i?t[e]=i:t[e]=a)}}function ohe(e,t,r,n){n===void 0&&(n=Qpe);var i=r[e];typeof i=="string"&&(t[e]=i.split(n).map(function(a){return a.trim()}))}var she={ALL:vn.ALL,VERBOSE:vn.VERBOSE,DEBUG:vn.DEBUG,INFO:vn.INFO,WARN:vn.WARN,ERROR:vn.ERROR,NONE:vn.NONE};function uhe(e,t,r){var n=r[e];if(typeof n=="string"){var i=she[n.toUpperCase()];i!=null&&(t[e]=i)}}function Ik(e){var t={};for(var r in Mk){var n=r;switch(n){case"OTEL_LOG_LEVEL":uhe(n,t,e);break;default:if(Xpe(n))ihe(n,t,e);else if(Zpe(n))ahe(n,t,e);else if(the(n))ohe(n,t,e);else{var i=e[n];typeof i<"u"&&i!==null&&(t[n]=String(i))}}}return t}var Nk=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof h.g=="object"?h.g:{};function Rh(){var e=Ik(Nk);return Object.assign({},Mk,e)}function che(){return Ik(Nk)}var lhe=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},fhe=function(){function e(t){t===void 0&&(t={});var r;this._propagators=(r=t.propagators)!==null&&r!==void 0?r:[],this._fields=Array.from(new Set(this._propagators.map(function(n){return typeof n.fields=="function"?n.fields():[]}).reduce(function(n,i){return n.concat(i)},[])))}return e.prototype.inject=function(t,r,n){var i,a;try{for(var u=lhe(this._propagators),c=u.next();!c.done;c=u.next()){var E=c.value;try{E.inject(t,r,n)}catch(_){_r.warn("Failed to inject with "+E.constructor.name+". Err: "+_.message)}}}catch(_){i={error:_}}finally{try{c&&!c.done&&(a=u.return)&&a.call(u)}finally{if(i)throw i.error}}},e.prototype.extract=function(t,r,n){return this._propagators.reduce(function(i,a){try{return a.extract(i,r,n)}catch(u){_r.warn("Failed to extract with "+a.constructor.name+". Err: "+u.message)}return i},t)},e.prototype.fields=function(){return this._fields.slice()},e}(),DM=fT("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function _he(e){return e.setValue(DM,!0)}function Lke(e){return e.deleteValue(DM)}function wM(e){return e.getValue(DM)===!0}var UM="[_0-9a-z-*/]",dhe="[a-z]"+UM+"{0,255}",phe="[a-z0-9]"+UM+"{0,240}@[a-z]"+UM+"{0,13}",hhe=new RegExp("^(?:"+dhe+"|"+phe+")$"),She=/^[ -~]{0,255}[!-~]$/,Ehe=/,|=/;function vhe(e){return hhe.test(e)}function mhe(e){return She.test(e)&&!Ehe.test(e)}var Lk=32,The=512,Dk=",",wk="=",Ahe=function(){function e(t){this._internalState=new Map,t&&this._parse(t)}return e.prototype.set=function(t,r){var n=this._clone();return n._internalState.has(t)&&n._internalState.delete(t),n._internalState.set(t,r),n},e.prototype.unset=function(t){var r=this._clone();return r._internalState.delete(t),r},e.prototype.get=function(t){return this._internalState.get(t)},e.prototype.serialize=function(){var t=this;return this._keys().reduce(function(r,n){return r.push(n+wk+t.get(n)),r},[]).join(Dk)},e.prototype._parse=function(t){t.length>The||(this._internalState=t.split(Dk).reverse().reduce(function(r,n){var i=n.trim(),a=i.indexOf(wk);if(a!==-1){var u=i.slice(0,a),c=i.slice(a+1,n.length);vhe(u)&&mhe(c)&&r.set(u,c)}return r},new Map),this._internalState.size>Lk&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,Lk))))},e.prototype._keys=function(){return Array.from(this._internalState.keys()).reverse()},e.prototype._clone=function(){var t=new e;return t._internalState=new Map(this._internalState),t},e}(),xM="traceparent",FM="tracestate",ghe="00",yhe="(?!ff)[\\da-f]{2}",Rhe="(?![0]{32})[\\da-f]{32}",Ohe="(?![0]{16})[\\da-f]{16}",bhe="[\\da-f]{2}",Che=new RegExp("^\\s?("+yhe+")-("+Rhe+")-("+Ohe+")-("+bhe+")(-.*)?\\s?$");function Phe(e){var t=Che.exec(e);return!t||t[1]==="00"&&t[5]?null:{traceId:t[2],spanId:t[3],traceFlags:parseInt(t[4],16)}}var Mhe=function(){function e(){}return e.prototype.inject=function(t,r,n){var i=ta.getSpanContext(t);if(!(!i||wM(t)||!m_(i))){var a=ghe+"-"+i.traceId+"-"+i.spanId+"-0"+Number(i.traceFlags||ys.NONE).toString(16);n.set(r,xM,a),i.traceState&&n.set(r,FM,i.traceState.serialize())}},e.prototype.extract=function(t,r,n){var i=n.get(r,xM);if(!i)return t;var a=Array.isArray(i)?i[0]:i;if(typeof a!="string")return t;var u=Phe(a);if(!u)return t;u.isRemote=!0;var c=n.get(r,FM);if(c){var E=Array.isArray(c)?c.join(","):c;u.traceState=new Ahe(typeof E=="string"?E:void 0)}return ta.setSpanContext(t,u)},e.prototype.fields=function(){return[xM,FM]},e}(),Ihe="=",$M=";",VM=",",GM="baggage",Nhe=180,Lhe=4096,Dhe=8192,whe=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,a=[],u;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)a.push(i.value)}catch(c){u={error:c}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(u)throw u.error}}return a};function Uhe(e){return e.reduce(function(t,r){var n=""+t+(t!==""?VM:"")+r;return n.length>Dhe?t:n},"")}function xhe(e){return e.getAllEntries().map(function(t){var r=whe(t,2),n=r[0],i=r[1],a=encodeURIComponent(n)+"="+encodeURIComponent(i.value);return i.metadata!==void 0&&(a+=$M+i.metadata.toString()),a})}function Uk(e){var t=e.split($M);if(!(t.length<=0)){var r=t.shift();if(!!r){var n=r.indexOf(Ihe);if(!(n<=0)){var i=decodeURIComponent(r.substring(0,n).trim()),a=decodeURIComponent(r.substring(n+1).trim()),u;return t.length>0&&(u=Lpe(t.join($M))),{key:i,value:a,metadata:u}}}}}function Dke(e){return typeof e!="string"||e.length===0?{}:e.split(BAGGAGE_ITEMS_SEPARATOR).map(function(t){return Uk(t)}).filter(function(t){return t!==void 0&&t.value.length>0}).reduce(function(t,r){return t[r.key]=r.value,t},{})}var Fhe=function(){function e(){}return e.prototype.inject=function(t,r,n){var i=R_.getBaggage(t);if(!(!i||wM(t))){var a=xhe(i).filter(function(c){return c.length<=Lhe}).slice(0,Nhe),u=Uhe(a);u.length>0&&n.set(r,GM,u)}},e.prototype.extract=function(t,r,n){var i=n.get(r,GM),a=Array.isArray(i)?i.join(VM):i;if(!a)return t;var u={};if(a.length===0)return t;var c=a.split(VM);return c.forEach(function(E){var _=Uk(E);if(_){var p={value:_.value};_.metadata&&(p.metadata=_.metadata),u[_.key]=p}}),Object.entries(u).length===0?t:R_.setBaggage(t,R_.createBaggage(u))},e.prototype.fields=function(){return[GM]},e}(),NT;(function(e){e[e.INTERNAL=0]="INTERNAL",e[e.SERVER=1]="SERVER",e[e.CLIENT=2]="CLIENT",e[e.PRODUCER=3]="PRODUCER",e[e.CONSUMER=4]="CONSUMER"})(NT||(NT={}));var LT;(function(e){e[e.NOT_RECORD=0]="NOT_RECORD",e[e.RECORD=1]="RECORD",e[e.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(LT||(LT={}));var xk=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},$he=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,a=[],u;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)a.push(i.value)}catch(c){u={error:c}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(u)throw u.error}}return a};function DT(e){var t,r,n={};if(typeof e!="object"||e==null)return n;try{for(var i=xk(Object.entries(e)),a=i.next();!a.done;a=i.next()){var u=$he(a.value,2),c=u[0],E=u[1];if(!Vhe(c)){_r.warn("Invalid attribute key: "+c);continue}if(!Fk(E)){_r.warn("Invalid attribute value set for key: "+c);continue}Array.isArray(E)?n[c]=E.slice():n[c]=E}}catch(_){t={error:_}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return n}function Vhe(e){return typeof e=="string"&&e.length>0}function Fk(e){return e==null?!0:Array.isArray(e)?Ghe(e):$k(e)}function Ghe(e){var t,r,n;try{for(var i=xk(e),a=i.next();!a.done;a=i.next()){var u=a.value;if(u!=null){if(!n){if($k(u)){n=typeof u;continue}return!1}if(typeof u!==n)return!1}}}catch(c){t={error:c}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return!0}function $k(e){switch(typeof e){case"number":case"boolean":case"string":return!0}return!1}var BM;(function(e){e[e.UNSET=0]="UNSET",e[e.OK=1]="OK",e[e.ERROR=2]="ERROR"})(BM||(BM={}));var O_=performance,Vk=9,Bhe=6,khe=Math.pow(10,Bhe),wT=Math.pow(10,Vk);function Ju(e){var t=e/1e3,r=Math.trunc(t),n=Math.round(e%1e3*khe);return[r,n]}function kM(){var e=O_.timeOrigin;if(typeof e!="number"){var t=O_;e=t.timing&&t.timing.fetchStart}return e}function Gk(e){var t=Ju(kM()),r=Ju(typeof e=="number"?e:O_.now());return kk(t,r)}function wke(e){if(jM(e))return e;if(typeof e=="number")return e<kM()?Gk(e):Ju(e);if(e instanceof Date)return Ju(e.getTime());throw TypeError("Invalid input type")}function jhe(e,t){var r=t[0]-e[0],n=t[1]-e[1];return n<0&&(r-=1,n+=wT),[r,n]}function Uke(e){var t=Vk,r=""+"0".repeat(t)+e[1]+"Z",n=r.substring(r.length-t-1),i=new Date(e[0]*1e3).toISOString();return i.replace("000Z",n)}function xke(e){return e[0]*wT+e[1]}function Fke(e){return e[0]*1e3+e[1]/1e6}function $ke(e){return e[0]*1e6+e[1]/1e3}function jM(e){return Array.isArray(e)&&e.length===2&&typeof e[0]=="number"&&typeof e[1]=="number"}function Bk(e){return jM(e)||typeof e=="number"||e instanceof Date}function kk(e,t){var r=[e[0]+t[0],e[1]+t[1]];return r[1]>=wT&&(r[1]-=wT,r[0]+=1),r}function co(e){for(var t={},r=e.length,n=0;n<r;n++){var i=e[n];i&&(t[String(i).toUpperCase().replace(/[-.]/g,"_")]=i)}return t}var Hhe="aws.lambda.invoked_arn",Yhe="db.system",qhe="db.connection_string",Khe="db.user",Whe="db.jdbc.driver_classname",Qhe="db.name",zhe="db.statement",Xhe="db.operation",Jhe="db.mssql.instance_name",Zhe="db.cassandra.keyspace",eSe="db.cassandra.page_size",tSe="db.cassandra.consistency_level",rSe="db.cassandra.table",nSe="db.cassandra.idempotence",iSe="db.cassandra.speculative_execution_count",aSe="db.cassandra.coordinator.id",oSe="db.cassandra.coordinator.dc",sSe="db.hbase.namespace",uSe="db.redis.database_index",cSe="db.mongodb.collection",lSe="db.sql.table",jk="exception.type",Hk="exception.message",Yk="exception.stacktrace",fSe="exception.escaped",_Se="faas.trigger",dSe="faas.execution",pSe="faas.document.collection",hSe="faas.document.operation",SSe="faas.document.time",ESe="faas.document.name",vSe="faas.time",mSe="faas.cron",TSe="faas.coldstart",ASe="faas.invoked_name",gSe="faas.invoked_provider",ySe="faas.invoked_region",RSe="net.transport",OSe="net.peer.ip",bSe="net.peer.port",CSe="net.peer.name",PSe="net.host.ip",MSe="net.host.port",ISe="net.host.name",NSe="net.host.connection.type",LSe="net.host.connection.subtype",DSe="net.host.carrier.name",wSe="net.host.carrier.mcc",USe="net.host.carrier.mnc",xSe="net.host.carrier.icc",FSe="peer.service",$Se="enduser.id",VSe="enduser.role",GSe="enduser.scope",BSe="thread.id",kSe="thread.name",jSe="code.function",HSe="code.namespace",YSe="code.filepath",qSe="code.lineno",KSe="http.method",WSe="http.url",QSe="http.target",zSe="http.host",XSe="http.scheme",JSe="http.status_code",ZSe="http.flavor",eEe="http.user_agent",tEe="http.request_content_length",rEe="http.request_content_length_uncompressed",nEe="http.response_content_length",iEe="http.response_content_length_uncompressed",aEe="http.server_name",oEe="http.route",sEe="http.client_ip",uEe="aws.dynamodb.table_names",cEe="aws.dynamodb.consumed_capacity",lEe="aws.dynamodb.item_collection_metrics",fEe="aws.dynamodb.provisioned_read_capacity",_Ee="aws.dynamodb.provisioned_write_capacity",dEe="aws.dynamodb.consistent_read",pEe="aws.dynamodb.projection",hEe="aws.dynamodb.limit",SEe="aws.dynamodb.attributes_to_get",EEe="aws.dynamodb.index_name",vEe="aws.dynamodb.select",mEe="aws.dynamodb.global_secondary_indexes",TEe="aws.dynamodb.local_secondary_indexes",AEe="aws.dynamodb.exclusive_start_table",gEe="aws.dynamodb.table_count",yEe="aws.dynamodb.scan_forward",REe="aws.dynamodb.segment",OEe="aws.dynamodb.total_segments",bEe="aws.dynamodb.count",CEe="aws.dynamodb.scanned_count",PEe="aws.dynamodb.attribute_definitions",MEe="aws.dynamodb.global_secondary_index_updates",IEe="messaging.system",NEe="messaging.destination",LEe="messaging.destination_kind",DEe="messaging.temp_destination",wEe="messaging.protocol",UEe="messaging.protocol_version",xEe="messaging.url",FEe="messaging.message_id",$Ee="messaging.conversation_id",VEe="messaging.message_payload_size_bytes",GEe="messaging.message_payload_compressed_size_bytes",BEe="messaging.operation",kEe="messaging.consumer_id",jEe="messaging.rabbitmq.routing_key",HEe="messaging.kafka.message_key",YEe="messaging.kafka.consumer_group",qEe="messaging.kafka.client_id",KEe="messaging.kafka.partition",WEe="messaging.kafka.tombstone",QEe="rpc.system",zEe="rpc.service",XEe="rpc.method",JEe="rpc.grpc.status_code",ZEe="rpc.jsonrpc.version",eve="rpc.jsonrpc.request_id",tve="rpc.jsonrpc.error_code",rve="rpc.jsonrpc.error_message",nve="message.type",ive="message.id",ave="message.compressed_size",ove="message.uncompressed_size",Vke=null,Gke=null,Bke=null,kke=null,jke=null,Hke=null,Yke=null,qke=null,Kke=null,Wke=null,Qke=null,zke=null,Xke=null,Jke=null,Zke=null,eje=null,tje=null,rje=null,nje=null,ije=null,aje=null,HM=jk,YM=Hk,sve=Yk,oje=null,sje=null,uje=null,cje=null,lje=null,fje=null,_je=null,dje=null,pje=null,hje=null,Sje=null,Eje=null,vje=null,mje=null,Tje=null,Aje=null,gje=null,yje=null,Rje=null,Oje=null,bje=null,Cje=null,Pje=null,Mje=null,Ije=null,Nje=null,Lje=null,Dje=null,wje=null,Uje=null,xje=null,Fje=null,$je=null,Vje=null,Gje=null,Bje=null,kje=null,jje=null,Hje=null,Yje=null,qje=null,Kje=null,Wje=null,Qje=null,zje=null,Xje=null,Jje=null,Zje=null,eHe=null,tHe=null,rHe=null,nHe=null,iHe=null,aHe=null,oHe=null,sHe=null,uHe=null,cHe=null,lHe=null,fHe=null,_He=null,dHe=null,pHe=null,hHe=null,SHe=null,EHe=null,vHe=null,mHe=null,THe=null,AHe=null,gHe=null,yHe=null,RHe=null,OHe=null,bHe=null,CHe=null,PHe=null,MHe=null,IHe=null,NHe=null,LHe=null,DHe=null,wHe=null,UHe=null,xHe=null,FHe=null,$He=null,VHe=null,GHe=null,BHe=null,kHe=null,jHe=null,HHe=null,YHe=null,qHe=null,KHe=null,WHe=null,QHe=null,zHe=null,XHe=null,JHe=null,ZHe=null,eYe=null,tYe=null,rYe=co([Hhe,Yhe,qhe,Khe,Whe,Qhe,zhe,Xhe,Jhe,Zhe,eSe,tSe,rSe,nSe,iSe,aSe,oSe,sSe,uSe,cSe,lSe,jk,Hk,Yk,fSe,_Se,dSe,pSe,hSe,SSe,ESe,vSe,mSe,TSe,ASe,gSe,ySe,RSe,OSe,bSe,CSe,PSe,MSe,ISe,NSe,LSe,DSe,wSe,USe,xSe,FSe,$Se,VSe,GSe,BSe,kSe,jSe,HSe,YSe,qSe,KSe,WSe,QSe,zSe,XSe,JSe,ZSe,eEe,tEe,rEe,nEe,iEe,aEe,oEe,sEe,uEe,cEe,lEe,fEe,_Ee,dEe,pEe,hEe,SEe,EEe,vEe,mEe,TEe,AEe,gEe,yEe,REe,OEe,bEe,CEe,PEe,MEe,IEe,NEe,LEe,DEe,wEe,UEe,xEe,FEe,$Ee,VEe,GEe,BEe,kEe,jEe,HEe,YEe,qEe,KEe,WEe,QEe,zEe,XEe,JEe,ZEe,eve,tve,rve,nve,ive,ave,ove]),uve="other_sql",cve="mssql",lve="mysql",fve="oracle",_ve="db2",dve="postgresql",pve="redshift",hve="hive",Sve="cloudscape",Eve="hsqldb",vve="progress",mve="maxdb",Tve="hanadb",Ave="ingres",gve="firstsql",yve="edb",Rve="cache",Ove="adabas",bve="firebird",Cve="derby",Pve="filemaker",Mve="informix",Ive="instantdb",Nve="interbase",Lve="mariadb",Dve="netezza",wve="pervasive",Uve="pointbase",xve="sqlite",Fve="sybase",$ve="teradata",Vve="vertica",Gve="h2",Bve="coldfusion",kve="cassandra",jve="hbase",Hve="mongodb",Yve="redis",qve="couchbase",Kve="couchdb",Wve="cosmosdb",Qve="dynamodb",zve="neo4j",Xve="geode",Jve="elasticsearch",Zve="memcached",eme="cockroachdb",nYe=null,iYe=null,aYe=null,oYe=null,sYe=null,uYe=null,cYe=null,lYe=null,fYe=null,_Ye=null,dYe=null,pYe=null,hYe=null,SYe=null,EYe=null,vYe=null,mYe=null,TYe=null,AYe=null,gYe=null,yYe=null,RYe=null,OYe=null,bYe=null,CYe=null,PYe=null,MYe=null,IYe=null,NYe=null,LYe=null,DYe=null,wYe=null,UYe=null,xYe=null,FYe=null,$Ye=null,VYe=null,GYe=null,BYe=null,kYe=null,jYe=null,HYe=null,YYe=null,qYe=null,KYe=null,WYe=null,QYe=null,zYe=co([uve,cve,lve,fve,_ve,dve,pve,hve,Sve,Eve,vve,mve,Tve,Ave,gve,yve,Rve,Ove,bve,Cve,Pve,Mve,Ive,Nve,Lve,Dve,wve,Uve,xve,Fve,$ve,Vve,Gve,Bve,kve,jve,Hve,Yve,qve,Kve,Wve,Qve,zve,Xve,Jve,Zve,eme]),tme="all",rme="each_quorum",nme="quorum",ime="local_quorum",ame="one",ome="two",sme="three",ume="local_one",cme="any",lme="serial",fme="local_serial",XYe=null,JYe=null,ZYe=null,e8e=null,t8e=null,r8e=null,n8e=null,i8e=null,a8e=null,o8e=null,s8e=null,u8e=co([tme,rme,nme,ime,ame,ome,sme,ume,cme,lme,fme]),_me="datasource",dme="http",pme="pubsub",hme="timer",Sme="other",c8e=null,l8e=null,f8e=null,_8e=null,d8e=null,p8e=co([_me,dme,pme,hme,Sme]),Eme="insert",vme="edit",mme="delete",h8e=null,S8e=null,E8e=null,v8e=co([Eme,vme,mme]),Tme="alibaba_cloud",Ame="aws",gme="azure",yme="gcp",m8e=null,T8e=null,A8e=null,g8e=null,y8e=co([Tme,Ame,gme,yme]),Rme="ip_tcp",Ome="ip_udp",bme="ip",Cme="unix",Pme="pipe",Mme="inproc",Ime="other",R8e=null,O8e=null,b8e=null,C8e=null,P8e=null,M8e=null,I8e=null,N8e=co([Rme,Ome,bme,Cme,Pme,Mme,Ime]),Nme="wifi",Lme="wired",Dme="cell",wme="unavailable",Ume="unknown",L8e=null,D8e=null,w8e=null,U8e=null,x8e=null,F8e=co([Nme,Lme,Dme,wme,Ume]),xme="gprs",Fme="edge",$me="umts",Vme="cdma",Gme="evdo_0",Bme="evdo_a",kme="cdma2000_1xrtt",jme="hsdpa",Hme="hsupa",Yme="hspa",qme="iden",Kme="evdo_b",Wme="lte",Qme="ehrpd",zme="hspap",Xme="gsm",Jme="td_scdma",Zme="iwlan",eTe="nr",tTe="nrnsa",rTe="lte_ca",$8e=null,V8e=null,G8e=null,B8e=null,k8e=null,j8e=null,H8e=null,Y8e=null,q8e=null,K8e=null,W8e=null,Q8e=null,z8e=null,X8e=null,J8e=null,Z8e=null,eqe=null,tqe=null,rqe=null,nqe=null,iqe=null,aqe=co([xme,Fme,$me,Vme,Gme,Bme,kme,jme,Hme,Yme,qme,Kme,Wme,Qme,zme,Xme,Jme,Zme,eTe,tTe,rTe]),nTe="1.0",iTe="1.1",aTe="2.0",oTe="SPDY",sTe="QUIC",oqe=null,sqe=null,uqe=null,cqe=null,lqe=null,fqe={HTTP_1_0:nTe,HTTP_1_1:iTe,HTTP_2_0:aTe,SPDY:oTe,QUIC:sTe},uTe="queue",cTe="topic",_qe=null,dqe=null,pqe=co([uTe,cTe]),lTe="receive",fTe="process",hqe=null,Sqe=null,Eqe=co([lTe,fTe]),_Te=0,dTe=1,pTe=2,hTe=3,STe=4,ETe=5,vTe=6,mTe=7,TTe=8,ATe=9,gTe=10,yTe=11,RTe=12,OTe=13,bTe=14,CTe=15,PTe=16,vqe=null,mqe=null,Tqe=null,Aqe=null,gqe=null,yqe=null,Rqe=null,Oqe=null,bqe=null,Cqe=null,Pqe=null,Mqe=null,Iqe=null,Nqe=null,Lqe=null,Dqe=null,wqe=null,Uqe={OK:_Te,CANCELLED:dTe,UNKNOWN:pTe,INVALID_ARGUMENT:hTe,DEADLINE_EXCEEDED:STe,NOT_FOUND:ETe,ALREADY_EXISTS:vTe,PERMISSION_DENIED:mTe,RESOURCE_EXHAUSTED:TTe,FAILED_PRECONDITION:ATe,ABORTED:gTe,OUT_OF_RANGE:yTe,UNIMPLEMENTED:RTe,INTERNAL:OTe,UNAVAILABLE:bTe,DATA_LOSS:CTe,UNAUTHENTICATED:PTe},MTe="SENT",ITe="RECEIVED",xqe=null,Fqe=null,$qe=co([MTe,ITe]),NTe="exception",qM=function(){return qM=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},qM.apply(this,arguments)},LTe=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},qk=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,a=[],u;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)a.push(i.value)}catch(c){u={error:c}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(u)throw u.error}}return a},DTe=function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,a;n<i;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))},wTe=function(){function e(t,r,n,i,a,u,c,E,_,p){c===void 0&&(c=[]),this.attributes={},this.links=[],this.events=[],this._droppedAttributesCount=0,this._droppedEventsCount=0,this._droppedLinksCount=0,this.status={code:BM.UNSET},this.endTime=[0,0],this._ended=!1,this._duration=[-1,-1],this.name=n,this._spanContext=i,this.parentSpanId=u,this.kind=a,this.links=c;var L=Date.now();this._performanceStartTime=O_.now(),this._performanceOffset=L-(this._performanceStartTime+kM()),this._startTimeProvided=E!=null,this.startTime=this._getTime(E??L),this.resource=t.resource,this.instrumentationLibrary=t.instrumentationLibrary,this._spanLimits=t.getSpanLimits(),this._attributeValueLengthLimit=this._spanLimits.attributeValueLengthLimit||0,p!=null&&this.setAttributes(p),this._spanProcessor=t.getActiveSpanProcessor(),this._spanProcessor.onStart(this,r)}return e.prototype.spanContext=function(){return this._spanContext},e.prototype.setAttribute=function(t,r){return r==null||this._isSpanEnded()?this:t.length===0?(_r.warn("Invalid attribute key: "+t),this):Fk(r)?Object.keys(this.attributes).length>=this._spanLimits.attributeCountLimit&&!Object.prototype.hasOwnProperty.call(this.attributes,t)?(this._droppedAttributesCount++,this):(this.attributes[t]=this._truncateToSize(r),this):(_r.warn("Invalid attribute value set for key: "+t),this)},e.prototype.setAttributes=function(t){var r,n;try{for(var i=LTe(Object.entries(t)),a=i.next();!a.done;a=i.next()){var u=qk(a.value,2),c=u[0],E=u[1];this.setAttribute(c,E)}}catch(_){r={error:_}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return this},e.prototype.addEvent=function(t,r,n){if(this._isSpanEnded())return this;if(this._spanLimits.eventCountLimit===0)return _r.warn("No events allowed."),this._droppedEventsCount++,this;this.events.length>=this._spanLimits.eventCountLimit&&(this._droppedEventsCount===0&&_r.debug("Dropping extra events."),this.events.shift(),this._droppedEventsCount++),Bk(r)&&(Bk(n)||(n=r),r=void 0);var i=DT(r);return this.events.push({name:t,attributes:i,time:this._getTime(n),droppedAttributesCount:0}),this},e.prototype.addLink=function(t){return this.links.push(t),this},e.prototype.addLinks=function(t){var r;return(r=this.links).push.apply(r,DTe([],qk(t),!1)),this},e.prototype.setStatus=function(t){return this._isSpanEnded()?this:(this.status=qM({},t),this.status.message!=null&&typeof t.message!="string"&&(_r.warn("Dropping invalid status.message of type '"+typeof t.message+"', expected 'string'"),delete this.status.message),this)},e.prototype.updateName=function(t){return this._isSpanEnded()?this:(this.name=t,this)},e.prototype.end=function(t){if(this._isSpanEnded()){_r.error(this.name+" "+this._spanContext.traceId+"-"+this._spanContext.spanId+" - You can only call end() on a span once.");return}this._ended=!0,this.endTime=this._getTime(t),this._duration=jhe(this.startTime,this.endTime),this._duration[0]<0&&(_r.warn("Inconsistent start and end time, startTime > endTime. Setting span duration to 0ms.",this.startTime,this.endTime),this.endTime=this.startTime.slice(),this._duration=[0,0]),this._droppedEventsCount>0&&_r.warn("Dropped "+this._droppedEventsCount+" events because eventCountLimit reached"),this._spanProcessor.onEnd(this)},e.prototype._getTime=function(t){if(typeof t=="number"&&t<=O_.now())return Gk(t+this._performanceOffset);if(typeof t=="number")return Ju(t);if(t instanceof Date)return Ju(t.getTime());if(jM(t))return t;if(this._startTimeProvided)return Ju(Date.now());var r=O_.now()-this._performanceStartTime;return kk(this.startTime,Ju(r))},e.prototype.isRecording=function(){return this._ended===!1},e.prototype.recordException=function(t,r){var n={};typeof t=="string"?n[YM]=t:t&&(t.code?n[HM]=t.code.toString():t.name&&(n[HM]=t.name),t.message&&(n[YM]=t.message),t.stack&&(n[sve]=t.stack)),n[HM]||n[YM]?this.addEvent(NTe,n,r):_r.warn("Failed to record an exception "+t)},Object.defineProperty(e.prototype,"duration",{get:function(){return this._duration},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ended",{get:function(){return this._ended},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"droppedAttributesCount",{get:function(){return this._droppedAttributesCount},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"droppedEventsCount",{get:function(){return this._droppedEventsCount},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"droppedLinksCount",{get:function(){return this._droppedLinksCount},enumerable:!1,configurable:!0}),e.prototype._isSpanEnded=function(){return this._ended&&_r.warn("Can not execute the operation on ended Span {traceId: "+this._spanContext.traceId+", spanId: "+this._spanContext.spanId+"}"),this._ended},e.prototype._truncateToLimitUtil=function(t,r){return t.length<=r?t:t.substring(0,r)},e.prototype._truncateToSize=function(t){var r=this,n=this._attributeValueLengthLimit;return n<=0?(_r.warn("Attribute value limit must be positive, got "+n),t):typeof t=="string"?this._truncateToLimitUtil(t,n):Array.isArray(t)?t.map(function(i){return typeof i=="string"?r._truncateToLimitUtil(i,n):i}):t},e}(),b_;(function(e){e[e.NOT_RECORD=0]="NOT_RECORD",e[e.RECORD=1]="RECORD",e[e.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(b_||(b_={}));var UT=function(){function e(){}return e.prototype.shouldSample=function(){return{decision:b_.NOT_RECORD}},e.prototype.toString=function(){return"AlwaysOffSampler"},e}(),C_=function(){function e(){}return e.prototype.shouldSample=function(){return{decision:b_.RECORD_AND_SAMPLED}},e.prototype.toString=function(){return"AlwaysOnSampler"},e}();function UTe(){return function(e){_r.error(xTe(e))}}function xTe(e){return typeof e=="string"?e:JSON.stringify(FTe(e))}function FTe(e){for(var t={},r=e;r!==null;)Object.getOwnPropertyNames(r).forEach(function(n){if(!t[n]){var i=r[n];i&&(t[n]=String(i))}}),r=Object.getPrototypeOf(r);return t}var Kk=UTe();function Vqe(e){Kk=e}function P_(e){try{Kk(e)}catch{}}var KM=function(){function e(t){var r,n,i,a;this._root=t.root,this._root||(P_(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new C_),this._remoteParentSampled=(r=t.remoteParentSampled)!==null&&r!==void 0?r:new C_,this._remoteParentNotSampled=(n=t.remoteParentNotSampled)!==null&&n!==void 0?n:new UT,this._localParentSampled=(i=t.localParentSampled)!==null&&i!==void 0?i:new C_,this._localParentNotSampled=(a=t.localParentNotSampled)!==null&&a!==void 0?a:new UT}return e.prototype.shouldSample=function(t,r,n,i,a,u){var c=ta.getSpanContext(t);return!c||!m_(c)?this._root.shouldSample(t,r,n,i,a,u):c.isRemote?c.traceFlags&ys.SAMPLED?this._remoteParentSampled.shouldSample(t,r,n,i,a,u):this._remoteParentNotSampled.shouldSample(t,r,n,i,a,u):c.traceFlags&ys.SAMPLED?this._localParentSampled.shouldSample(t,r,n,i,a,u):this._localParentNotSampled.shouldSample(t,r,n,i,a,u)},e.prototype.toString=function(){return"ParentBased{root="+this._root.toString()+", remoteParentSampled="+this._remoteParentSampled.toString()+", remoteParentNotSampled="+this._remoteParentNotSampled.toString()+", localParentSampled="+this._localParentSampled.toString()+", localParentNotSampled="+this._localParentNotSampled.toString()+"}"},e}(),Wk=function(){function e(t){t===void 0&&(t=0),this._ratio=t,this._ratio=this._normalize(t),this._upperBound=Math.floor(this._ratio*4294967295)}return e.prototype.shouldSample=function(t,r){return{decision:cB(r)&&this._accumulate(r)<this._upperBound?b_.RECORD_AND_SAMPLED:b_.NOT_RECORD}},e.prototype.toString=function(){return"TraceIdRatioBased{"+this._ratio+"}"},e.prototype._normalize=function(t){return typeof t!="number"||isNaN(t)?0:t>=1?1:t<=0?0:t},e.prototype._accumulate=function(t){for(var r=0,n=0;n<t.length/8;n++){var i=n*8,a=parseInt(t.slice(i,i+8),16);r=(r^a)>>>0}return r},e}(),$Te=Rs.AlwaysOn,M_=1;function Qk(){var e=Rh();return{sampler:zk(e),forceFlushTimeoutMillis:3e4,generalLimits:{attributeValueLengthLimit:e.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:e.OTEL_ATTRIBUTE_COUNT_LIMIT},spanLimits:{attributeValueLengthLimit:e.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:e.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT,linkCountLimit:e.OTEL_SPAN_LINK_COUNT_LIMIT,eventCountLimit:e.OTEL_SPAN_EVENT_COUNT_LIMIT,attributePerEventCountLimit:e.OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT,attributePerLinkCountLimit:e.OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT},mergeResourceWithDefaults:!0}}function zk(e){switch(e===void 0&&(e=Rh()),e.OTEL_TRACES_SAMPLER){case Rs.AlwaysOn:return new C_;case Rs.AlwaysOff:return new UT;case Rs.ParentBasedAlwaysOn:return new KM({root:new C_});case Rs.ParentBasedAlwaysOff:return new KM({root:new UT});case Rs.TraceIdRatio:return new Wk(Xk(e));case Rs.ParentBasedTraceIdRatio:return new KM({root:new Wk(Xk(e))});default:return _r.error('OTEL_TRACES_SAMPLER value "'+e.OTEL_TRACES_SAMPLER+" invalid, defaulting to "+$Te+'".'),new C_}}function Xk(e){if(e.OTEL_TRACES_SAMPLER_ARG===void 0||e.OTEL_TRACES_SAMPLER_ARG==="")return _r.error("OTEL_TRACES_SAMPLER_ARG is blank, defaulting to "+M_+"."),M_;var t=Number(e.OTEL_TRACES_SAMPLER_ARG);return isNaN(t)?(_r.error("OTEL_TRACES_SAMPLER_ARG="+e.OTEL_TRACES_SAMPLER_ARG+" was given, but it is invalid, defaulting to "+M_+"."),M_):t<0||t>1?(_r.error("OTEL_TRACES_SAMPLER_ARG="+e.OTEL_TRACES_SAMPLER_ARG+" was given, but it is out of range ([0..1]), defaulting to "+M_+"."),M_):t}function VTe(e){var t={sampler:zk()},r=Qk(),n=Object.assign({},r,t,e);return n.generalLimits=Object.assign({},r.generalLimits,e.generalLimits||{}),n.spanLimits=Object.assign({},r.spanLimits,e.spanLimits||{}),n}function GTe(e){var t,r,n,i,a,u,c,E,_,p,L,W,ve=Object.assign({},e.spanLimits),me=che();return ve.attributeCountLimit=(u=(a=(i=(r=(t=e.spanLimits)===null||t===void 0?void 0:t.attributeCountLimit)!==null&&r!==void 0?r:(n=e.generalLimits)===null||n===void 0?void 0:n.attributeCountLimit)!==null&&i!==void 0?i:me.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT)!==null&&a!==void 0?a:me.OTEL_ATTRIBUTE_COUNT_LIMIT)!==null&&u!==void 0?u:IT,ve.attributeValueLengthLimit=(W=(L=(p=(E=(c=e.spanLimits)===null||c===void 0?void 0:c.attributeValueLengthLimit)!==null&&E!==void 0?E:(_=e.generalLimits)===null||_===void 0?void 0:_.attributeValueLengthLimit)!==null&&p!==void 0?p:me.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&L!==void 0?L:me.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&W!==void 0?W:MT,Object.assign({},e,{spanLimits:ve})}var BTe=8,kTe=16,jTe=function(){function e(){this.generateTraceId=Jk(kTe),this.generateSpanId=Jk(BTe)}return e}(),xT=Array(32);function Jk(e){return function(){for(var r=0;r<e*2;r++)xT[r]=Math.floor(Math.random()*16)+48,xT[r]>=58&&(xT[r]+=39);return String.fromCharCode.apply(null,xT.slice(0,e*2))}}var HTe=function(){function e(t,r,n){this._tracerProvider=n;var i=VTe(r);this._sampler=i.sampler,this._generalLimits=i.generalLimits,this._spanLimits=i.spanLimits,this._idGenerator=r.idGenerator||new jTe,this.resource=n.resource,this.instrumentationLibrary=t}return e.prototype.startSpan=function(t,r,n){var i,a,u;r===void 0&&(r={}),n===void 0&&(n=_a.active()),r.root&&(n=ta.deleteSpan(n));var c=ta.getSpan(n);if(wM(n)){_r.debug("Instrumentation suppressed, returning Noop Span");var E=ta.wrapSpanContext(sB);return E}var _=c?.spanContext(),p=this._idGenerator.generateSpanId(),L,W,ve;!_||!ta.isSpanContextValid(_)?L=this._idGenerator.generateTraceId():(L=_.traceId,W=_.traceState,ve=_.spanId);var me=(i=r.kind)!==null&&i!==void 0?i:NT.INTERNAL,Oe=((a=r.links)!==null&&a!==void 0?a:[]).map(function(dr){return{context:dr.context,attributes:DT(dr.attributes)}}),He=DT(r.attributes),qe=this._sampler.shouldSample(n,L,t,me,He,Oe);W=(u=qe.traceState)!==null&&u!==void 0?u:W;var We=qe.decision===LT.RECORD_AND_SAMPLED?ys.SAMPLED:ys.NONE,ct={traceId:L,spanId:p,traceFlags:We,traceState:W};if(qe.decision===LT.NOT_RECORD){_r.debug("Recording is off, propagating context in a non-recording span");var E=ta.wrapSpanContext(ct);return E}var yt=DT(Object.assign(He,qe.attributes)),jt=new wTe(this,n,t,ct,me,ve,Oe,r.startTime,void 0,yt);return jt},e.prototype.startActiveSpan=function(t,r,n,i){var a,u,c;if(!(arguments.length<2)){arguments.length===2?c=r:arguments.length===3?(a=r,c=n):(a=r,u=n,c=i);var E=u??_a.active(),_=this.startSpan(t,a,E),p=ta.setSpan(E,_);return _a.with(p,c,void 0,_)}},e.prototype.getGeneralLimits=function(){return this._generalLimits},e.prototype.getSpanLimits=function(){return this._spanLimits},e.prototype.getActiveSpanProcessor=function(){return this._tracerProvider.getActiveSpanProcessor()},e}(),FT=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Zk=function(){function e(t){this._spanProcessors=t}return e.prototype.forceFlush=function(){var t,r,n=[];try{for(var i=FT(this._spanProcessors),a=i.next();!a.done;a=i.next()){var u=a.value;n.push(u.forceFlush())}}catch(c){t={error:c}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return new Promise(function(c){Promise.all(n).then(function(){c()}).catch(function(E){P_(E||new Error("MultiSpanProcessor: forceFlush failed")),c()})})},e.prototype.onStart=function(t,r){var n,i;try{for(var a=FT(this._spanProcessors),u=a.next();!u.done;u=a.next()){var c=u.value;c.onStart(t,r)}}catch(E){n={error:E}}finally{try{u&&!u.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}},e.prototype.onEnd=function(t){var r,n;try{for(var i=FT(this._spanProcessors),a=i.next();!a.done;a=i.next()){var u=a.value;u.onEnd(t)}}catch(c){r={error:c}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}},e.prototype.shutdown=function(){var t,r,n=[];try{for(var i=FT(this._spanProcessors),a=i.next();!a.done;a=i.next()){var u=a.value;n.push(u.shutdown())}}catch(c){t={error:c}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return new Promise(function(c,E){Promise.all(n).then(function(){c()},E)})},e}(),YTe=function(){function e(){}return e.prototype.onStart=function(t,r){},e.prototype.onEnd=function(t){},e.prototype.shutdown=function(){return Promise.resolve()},e.prototype.forceFlush=function(){return Promise.resolve()},e}(),qTe=function(){function e(){var t=this;this._promise=new Promise(function(r,n){t._resolve=r,t._reject=n})}return Object.defineProperty(e.prototype,"promise",{get:function(){return this._promise},enumerable:!1,configurable:!0}),e.prototype.resolve=function(t){this._resolve(t)},e.prototype.reject=function(t){this._reject(t)},e}(),KTe=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,a=[],u;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)a.push(i.value)}catch(c){u={error:c}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(u)throw u.error}}return a},WTe=function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,a;n<i;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))},QTe=function(){function e(t,r){this._callback=t,this._that=r,this._isCalled=!1,this._deferred=new qTe}return Object.defineProperty(e.prototype,"isCalled",{get:function(){return this._isCalled},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"promise",{get:function(){return this._deferred.promise},enumerable:!1,configurable:!0}),e.prototype.call=function(){for(var t,r=this,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];if(!this._isCalled){this._isCalled=!0;try{Promise.resolve((t=this._callback).call.apply(t,WTe([this._that],KTe(n),!1))).then(function(a){return r._deferred.resolve(a)},function(a){return r._deferred.reject(a)})}catch(a){this._deferred.reject(a)}}return this._deferred.promise},e}(),WM;(function(e){e[e.SUCCESS=0]="SUCCESS",e[e.FAILED=1]="FAILED"})(WM||(WM={}));function Gqe(e){}var zTe=function(){function e(t,r){this._exporter=t,this._isExporting=!1,this._finishedSpans=[],this._droppedSpansCount=0;var n=Rh();this._maxExportBatchSize=typeof r?.maxExportBatchSize=="number"?r.maxExportBatchSize:n.OTEL_BSP_MAX_EXPORT_BATCH_SIZE,this._maxQueueSize=typeof r?.maxQueueSize=="number"?r.maxQueueSize:n.OTEL_BSP_MAX_QUEUE_SIZE,this._scheduledDelayMillis=typeof r?.scheduledDelayMillis=="number"?r.scheduledDelayMillis:n.OTEL_BSP_SCHEDULE_DELAY,this._exportTimeoutMillis=typeof r?.exportTimeoutMillis=="number"?r.exportTimeoutMillis:n.OTEL_BSP_EXPORT_TIMEOUT,this._shutdownOnce=new QTe(this._shutdown,this),this._maxExportBatchSize>this._maxQueueSize&&(_r.warn("BatchSpanProcessor: maxExportBatchSize must be smaller or equal to maxQueueSize, setting maxExportBatchSize to match maxQueueSize"),this._maxExportBatchSize=this._maxQueueSize)}return e.prototype.forceFlush=function(){return this._shutdownOnce.isCalled?this._shutdownOnce.promise:this._flushAll()},e.prototype.onStart=function(t,r){},e.prototype.onEnd=function(t){this._shutdownOnce.isCalled||(t.spanContext().traceFlags&ys.SAMPLED)!==0&&this._addToBuffer(t)},e.prototype.shutdown=function(){return this._shutdownOnce.call()},e.prototype._shutdown=function(){var t=this;return Promise.resolve().then(function(){return t.onShutdown()}).then(function(){return t._flushAll()}).then(function(){return t._exporter.shutdown()})},e.prototype._addToBuffer=function(t){if(this._finishedSpans.length>=this._maxQueueSize){this._droppedSpansCount===0&&_r.debug("maxQueueSize reached, dropping spans"),this._droppedSpansCount++;return}this._droppedSpansCount>0&&(_r.warn("Dropped "+this._droppedSpansCount+" spans because maxQueueSize reached"),this._droppedSpansCount=0),this._finishedSpans.push(t),this._maybeStartTimer()},e.prototype._flushAll=function(){var t=this;return new Promise(function(r,n){for(var i=[],a=Math.ceil(t._finishedSpans.length/t._maxExportBatchSize),u=0,c=a;u<c;u++)i.push(t._flushOneBatch());Promise.all(i).then(function(){r()}).catch(n)})},e.prototype._flushOneBatch=function(){var t=this;return this._clearTimer(),this._finishedSpans.length===0?Promise.resolve():new Promise(function(r,n){var i=setTimeout(function(){n(new Error("Timeout"))},t._exportTimeoutMillis);_a.with(_he(_a.active()),function(){var a;t._finishedSpans.length<=t._maxExportBatchSize?(a=t._finishedSpans,t._finishedSpans=[]):a=t._finishedSpans.splice(0,t._maxExportBatchSize);for(var u=function(){return t._exporter.export(a,function(L){var W;clearTimeout(i),L.code===WM.SUCCESS?r():n((W=L.error)!==null&&W!==void 0?W:new Error("BatchSpanProcessor: span export failed"))})},c=null,E=0,_=a.length;E<_;E++){var p=a[E];p.resource.asyncAttributesPending&&p.resource.waitForAsyncAttributes&&(c??(c=[]),c.push(p.resource.waitForAsyncAttributes()))}c===null?u():Promise.all(c).then(u,function(L){P_(L),n(L)})})})},e.prototype._maybeStartTimer=function(){var t=this;if(!this._isExporting){var r=function(){t._isExporting=!0,t._flushOneBatch().finally(function(){t._isExporting=!1,t._finishedSpans.length>0&&(t._clearTimer(),t._maybeStartTimer())}).catch(function(n){t._isExporting=!1,P_(n)})};if(this._finishedSpans.length>=this._maxExportBatchSize)return r();this._timer===void 0&&(this._timer=setTimeout(function(){return r()},this._scheduledDelayMillis),this._timer,void 0)}},e.prototype._clearTimer=function(){this._timer!==void 0&&(clearTimeout(this._timer),this._timer=void 0)},e}(),XTe=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),JTe=function(e){XTe(t,e);function t(r,n){var i=e.call(this,r,n)||this;return i.onInit(n),i}return t.prototype.onInit=function(r){var n=this;r?.disableAutoFlushOnDocumentHide!==!0&&typeof document<"u"&&(this._visibilityChangeListener=function(){document.visibilityState==="hidden"&&n.forceFlush().catch(function(i){P_(i)})},this._pageHideListener=function(){n.forceFlush().catch(function(i){P_(i)})},document.addEventListener("visibilitychange",this._visibilityChangeListener),document.addEventListener("pagehide",this._pageHideListener))},t.prototype.onShutdown=function(){typeof document<"u"&&(this._visibilityChangeListener&&document.removeEventListener("visibilitychange",this._visibilityChangeListener),this._pageHideListener&&document.removeEventListener("pagehide",this._pageHideListener))},t}(zTe),ZTe=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,a=[],u;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)a.push(i.value)}catch(c){u={error:c}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(u)throw u.error}}return a},eAe=function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,a;n<i;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))},ml;(function(e){e[e.resolved=0]="resolved",e[e.timeout=1]="timeout",e[e.error=2]="error",e[e.unresolved=3]="unresolved"})(ml||(ml={}));var tAe=function(){function e(t){t===void 0&&(t={});var r,n;this._registeredSpanProcessors=[],this._tracers=new Map;var i=Kpe({},Qk(),GTe(t));if(this.resource=(r=i.resource)!==null&&r!==void 0?r:mT.empty(),i.mergeResourceWithDefaults&&(this.resource=mT.default().merge(this.resource)),this._config=Object.assign({},i,{resource:this.resource}),!((n=t.spanProcessors)===null||n===void 0)&&n.length)this._registeredSpanProcessors=eAe([],ZTe(t.spanProcessors),!1),this.activeSpanProcessor=new Zk(this._registeredSpanProcessors);else{var a=this._buildExporterFromEnv();if(a!==void 0){var u=new JTe(a);this.activeSpanProcessor=u}else this.activeSpanProcessor=new YTe}}return e.prototype.getTracer=function(t,r,n){var i=t+"@"+(r||"")+":"+(n?.schemaUrl||"");return this._tracers.has(i)||this._tracers.set(i,new HTe({name:t,version:r,schemaUrl:n?.schemaUrl},this._config,this)),this._tracers.get(i)},e.prototype.addSpanProcessor=function(t){this._registeredSpanProcessors.length===0&&this.activeSpanProcessor.shutdown().catch(function(r){return _r.error("Error while trying to shutdown current span processor",r)}),this._registeredSpanProcessors.push(t),this.activeSpanProcessor=new Zk(this._registeredSpanProcessors)},e.prototype.getActiveSpanProcessor=function(){return this.activeSpanProcessor},e.prototype.register=function(t){t===void 0&&(t={}),ta.setGlobalTracerProvider(this),t.propagator===void 0&&(t.propagator=this._buildPropagatorFromEnv()),t.contextManager&&_a.setGlobalContextManager(t.contextManager),t.propagator&&R_.setGlobalPropagator(t.propagator)},e.prototype.forceFlush=function(){var t=this._config.forceFlushTimeoutMillis,r=this._registeredSpanProcessors.map(function(n){return new Promise(function(i){var a,u=setTimeout(function(){i(new Error("Span processor did not completed within timeout period of "+t+" ms")),a=ml.timeout},t);n.forceFlush().then(function(){clearTimeout(u),a!==ml.timeout&&(a=ml.resolved,i(a))}).catch(function(c){clearTimeout(u),a=ml.error,i(c)})})});return new Promise(function(n,i){Promise.all(r).then(function(a){var u=a.filter(function(c){return c!==ml.resolved});u.length>0?i(u):n()}).catch(function(a){return i([a])})})},e.prototype.shutdown=function(){return this.activeSpanProcessor.shutdown()},e.prototype._getPropagator=function(t){var r;return(r=this.constructor._registeredPropagators.get(t))===null||r===void 0?void 0:r()},e.prototype._getSpanExporter=function(t){var r;return(r=this.constructor._registeredExporters.get(t))===null||r===void 0?void 0:r()},e.prototype._buildPropagatorFromEnv=function(){var t=this,r=Array.from(new Set(Rh().OTEL_PROPAGATORS)),n=r.map(function(a){var u=t._getPropagator(a);return u||_r.warn('Propagator "'+a+'" requested through environment variable is unavailable.'),u}),i=n.reduce(function(a,u){return u&&a.push(u),a},[]);if(i.length!==0)return r.length===1?i[0]:new fhe({propagators:i})},e.prototype._buildExporterFromEnv=function(){var t=Rh().OTEL_TRACES_EXPORTER;if(!(t==="none"||t==="")){var r=this._getSpanExporter(t);return r||_r.error('Exporter "'+t+'" requested through environment variable is unavailable.'),r}},e._registeredPropagators=new Map([["tracecontext",function(){return new Mhe}],["baggage",function(){return new Fhe}]]),e._registeredExporters=new Map,e}(),rAe=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,a=[],u;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)a.push(i.value)}catch(c){u={error:c}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(u)throw u.error}}return a},nAe=function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,a;n<i;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))},iAe=function(){function e(){this._enabled=!1,this._currentContext=v_}return e.prototype._bindFunction=function(t,r){t===void 0&&(t=v_);var n=this,i=function(){for(var a=this,u=[],c=0;c<arguments.length;c++)u[c]=arguments[c];return n.with(t,function(){return r.apply(a,u)})};return Object.defineProperty(i,"length",{enumerable:!1,configurable:!0,writable:!1,value:r.length}),i},e.prototype.active=function(){return this._currentContext},e.prototype.bind=function(t,r){return t===void 0&&(t=this.active()),typeof r=="function"?this._bindFunction(t,r):r},e.prototype.disable=function(){return this._currentContext=v_,this._enabled=!1,this},e.prototype.enable=function(){return this._enabled?this:(this._enabled=!0,this._currentContext=v_,this)},e.prototype.with=function(t,r,n){for(var i=[],a=3;a<arguments.length;a++)i[a-3]=arguments[a];var u=this._currentContext;this._currentContext=t||v_;try{return r.call.apply(r,nAe([n],rAe(i),!1))}finally{this._currentContext=u}},e}(),aAe=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),oAe=function(e){aAe(t,e);function t(r){r===void 0&&(r={});var n=e.call(this,r)||this;if(r.contextManager)throw"contextManager should be defined in register method not in constructor";if(r.propagator)throw"propagator should be defined in register method not in constructor";return n}return t.prototype.register=function(r){r===void 0&&(r={}),r.contextManager===void 0&&(r.contextManager=new iAe),r.contextManager&&r.contextManager.enable(),e.prototype.register.call(this,r)},t}(tAe);function Tl(e){let t={};const r=e.length;for(let n=0;n<r;n++){const i=e[n];i&&(t[String(i).toUpperCase().replace(/[-.]/g,"_")]=i)}return t}const sAe="cloud.provider",uAe="cloud.account.id",cAe="cloud.region",lAe="cloud.availability_zone",fAe="cloud.platform",_Ae="aws.ecs.container.arn",dAe="aws.ecs.cluster.arn",pAe="aws.ecs.launchtype",hAe="aws.ecs.task.arn",SAe="aws.ecs.task.family",EAe="aws.ecs.task.revision",vAe="aws.eks.cluster.arn",mAe="aws.log.group.names",TAe="aws.log.group.arns",AAe="aws.log.stream.names",gAe="aws.log.stream.arns",yAe="container.name",RAe="container.id",OAe="container.runtime",bAe="container.image.name",CAe="container.image.tag",ej="deployment.environment",PAe="device.id",MAe="device.model.identifier",IAe="device.model.name",NAe="faas.name",LAe="faas.id",DAe="faas.version",wAe="faas.instance",UAe="faas.max_memory",xAe="host.id",FAe="host.name",$Ae="host.type",VAe="host.arch",GAe="host.image.name",BAe="host.image.id",kAe="host.image.version",jAe="k8s.cluster.name",HAe="k8s.node.name",YAe="k8s.node.uid",qAe="k8s.namespace.name",KAe="k8s.pod.uid",WAe="k8s.pod.name",QAe="k8s.container.name",zAe="k8s.replicaset.uid",XAe="k8s.replicaset.name",JAe="k8s.deployment.uid",ZAe="k8s.deployment.name",ege="k8s.statefulset.uid",tge="k8s.statefulset.name",rge="k8s.daemonset.uid",nge="k8s.daemonset.name",ige="k8s.job.uid",age="k8s.job.name",oge="k8s.cronjob.uid",sge="k8s.cronjob.name",uge="os.type",cge="os.description",lge="os.name",fge="os.version",_ge="process.pid",dge="process.executable.name",pge="process.executable.path",hge="process.command",Sge="process.command_line",Ege="process.command_args",vge="process.owner",mge="process.runtime.name",Tge="process.runtime.version",Age="process.runtime.description",tj="service.name",rj="service.namespace",gge="service.instance.id",nj="service.version",yge="telemetry.sdk.name",ij="telemetry.sdk.language",Rge="telemetry.sdk.version",Oge="telemetry.auto.version",bge="webengine.name",Cge="webengine.version",Pge="webengine.description",Bqe=null,kqe=null,jqe=null,Hqe=null,Yqe=null,qqe=null,Kqe=null,Wqe=null,Qqe=null,zqe=null,Xqe=null,Jqe=null,Zqe=null,e2e=null,t2e=null,r2e=null,n2e=null,i2e=null,a2e=null,o2e=null,s2e=null,Mge=ej,u2e=null,c2e=null,l2e=null,f2e=null,_2e=null,d2e=null,p2e=null,h2e=null,S2e=null,E2e=null,v2e=null,m2e=null,T2e=null,A2e=null,g2e=null,y2e=null,R2e=null,O2e=null,b2e=null,C2e=null,P2e=null,M2e=null,I2e=null,N2e=null,L2e=null,D2e=null,w2e=null,U2e=null,x2e=null,F2e=null,$2e=null,V2e=null,G2e=null,B2e=null,k2e=null,j2e=null,H2e=null,Y2e=null,q2e=null,K2e=null,W2e=null,Q2e=null,z2e=null,X2e=null,J2e=null,Z2e=null,eKe=null,tKe=null,Ige=tj,Nge=rj,rKe=null,Lge=nj,nKe=null,Dge=ij,iKe=null,aKe=null,oKe=null,sKe=null,uKe=null,cKe=Tl([sAe,uAe,cAe,lAe,fAe,_Ae,dAe,pAe,hAe,SAe,EAe,vAe,mAe,TAe,AAe,gAe,yAe,RAe,OAe,bAe,CAe,ej,PAe,MAe,IAe,NAe,LAe,DAe,wAe,UAe,xAe,FAe,$Ae,VAe,GAe,BAe,kAe,jAe,HAe,YAe,qAe,KAe,WAe,QAe,zAe,XAe,JAe,ZAe,ege,tge,rge,nge,ige,age,oge,sge,uge,cge,lge,fge,_ge,dge,pge,hge,Sge,Ege,vge,mge,Tge,Age,tj,rj,gge,nj,yge,ij,Rge,Oge,bge,Cge,Pge]),wge="alibaba_cloud",Uge="aws",xge="azure",Fge="gcp",lKe=null,fKe=null,_Ke=null,dKe=null,pKe=Tl([wge,Uge,xge,Fge]),$ge="alibaba_cloud_ecs",Vge="alibaba_cloud_fc",Gge="aws_ec2",Bge="aws_ecs",kge="aws_eks",jge="aws_lambda",Hge="aws_elastic_beanstalk",Yge="azure_vm",qge="azure_container_instances",Kge="azure_aks",Wge="azure_functions",Qge="azure_app_service",zge="gcp_compute_engine",Xge="gcp_cloud_run",Jge="gcp_kubernetes_engine",Zge="gcp_cloud_functions",eye="gcp_app_engine",hKe=null,SKe=null,EKe=null,vKe=null,mKe=null,TKe=null,AKe=null,gKe=null,yKe=null,RKe=null,OKe=null,bKe=null,CKe=null,PKe=null,MKe=null,IKe=null,NKe=null,LKe=Tl([$ge,Vge,Gge,Bge,kge,jge,Hge,Yge,qge,Kge,Wge,Qge,zge,Xge,Jge,Zge,eye]),tye="ec2",rye="fargate",DKe=null,wKe=null,UKe=Tl([tye,rye]),nye="amd64",iye="arm32",aye="arm64",oye="ia64",sye="ppc32",uye="ppc64",cye="x86",xKe=null,FKe=null,$Ke=null,VKe=null,GKe=null,BKe=null,kKe=null,jKe=Tl([nye,iye,aye,oye,sye,uye,cye]),lye="windows",fye="linux",_ye="darwin",dye="freebsd",pye="netbsd",hye="openbsd",Sye="dragonflybsd",Eye="hpux",vye="aix",mye="solaris",Tye="z_os",HKe=null,YKe=null,qKe=null,KKe=null,WKe=null,QKe=null,zKe=null,XKe=null,JKe=null,ZKe=null,eWe=null,tWe=Tl([lye,fye,_ye,dye,pye,hye,Sye,Eye,vye,mye,Tye]),Aye="cpp",gye="dotnet",yye="erlang",Rye="go",Oye="java",bye="nodejs",Cye="php",Pye="python",Mye="ruby",Iye="webjs",rWe=null,nWe=null,iWe=null,aWe=null,oWe=null,sWe=null,uWe=null,cWe=null,lWe=null,fWe=null,_We=Tl([Aye,gye,yye,Rye,Oye,bye,Cye,Pye,Mye,Iye]);var Nye=function(e,t,r,n){function i(a){return a instanceof r?a:new r(function(u){u(a)})}return new(r||(r=Promise))(function(a,u){function c(p){try{_(n.next(p))}catch(L){u(L)}}function E(p){try{_(n.throw(p))}catch(L){u(L)}}function _(p){p.done?a(p.value):i(p.value).then(c,E)}_((n=n.apply(e,t||[])).next())})},Lye=function(e,t){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,u;return u={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(u[Symbol.iterator]=function(){return this}),u;function c(_){return function(p){return E([_,p])}}function E(_){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(a=_[0]&2?i.return:_[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,_[1])).done)return a;switch(i=0,a&&(_=[_[0]&2,a.value]),_[0]){case 0:case 1:a=_;break;case 4:return r.label++,{value:_[1],done:!1};case 5:r.label++,i=_[1],_=[0];continue;case 7:_=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(_[0]===6||_[0]===2)){r=0;continue}if(_[0]===3&&(!a||_[1]>a[0]&&_[1]<a[3])){r.label=_[1];break}if(_[0]===6&&r.label<a[1]){r.label=a[1],a=_;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(_);break}a[2]&&r.ops.pop(),r.trys.pop();continue}_=t.call(e,r)}catch(p){_=[6,p],i=0}finally{n=a=0}if(_[0]&5)throw _[1];return{value:_[0]?_[1]:void 0,done:!0}}};function Dye(e,t,r){var n,i;try{i=e()}catch(a){n=a}finally{if(t(n,i),n&&!r)throw n;return i}}function dWe(e,t,r){return Nye(this,void 0,void 0,function(){var n,i,a;return Lye(this,function(u){switch(u.label){case 0:return u.trys.push([0,2,3,4]),[4,e()];case 1:return i=u.sent(),[3,4];case 2:return a=u.sent(),n=a,[3,4];case 3:if(t(n,i),n&&!r)throw n;return[2,i];case 4:return[2]}})})}function aj(e){return typeof e=="function"&&typeof e.__original=="function"&&typeof e.__unwrap=="function"&&e.__wrapped===!0}var Al=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),wye=function(){function e(){}return e.prototype.createGauge=function(t,r){return jye},e.prototype.createHistogram=function(t,r){return Hye},e.prototype.createCounter=function(t,r){return kye},e.prototype.createUpDownCounter=function(t,r){return Yye},e.prototype.createObservableGauge=function(t,r){return Kye},e.prototype.createObservableCounter=function(t,r){return qye},e.prototype.createObservableUpDownCounter=function(t,r){return Wye},e.prototype.addBatchObservableCallback=function(t,r){},e.prototype.removeBatchObservableCallback=function(t){},e}(),$T=function(){function e(){}return e}(),Uye=function(e){Al(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.add=function(r,n){},t}($T),xye=function(e){Al(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.add=function(r,n){},t}($T),Fye=function(e){Al(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.record=function(r,n){},t}($T),$ye=function(e){Al(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.record=function(r,n){},t}($T),QM=function(){function e(){}return e.prototype.addCallback=function(t){},e.prototype.removeCallback=function(t){},e}(),Vye=function(e){Al(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(QM),Gye=function(e){Al(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(QM),Bye=function(e){Al(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(QM),oj=new wye,kye=new Uye,jye=new Fye,Hye=new $ye,Yye=new xye,qye=new Vye,Kye=new Gye,Wye=new Bye;function pWe(){return oj}var Qye=function(){function e(){}return e.prototype.getMeter=function(t,r,n){return oj},e}(),zye=new Qye,zM="metrics",Xye=function(){function e(){}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalMeterProvider=function(t){return _h(zM,t,gs.instance())},e.prototype.getMeterProvider=function(){return ll(zM)||zye},e.prototype.getMeter=function(t,r,n){return this.getMeterProvider().getMeter(t,r,n)},e.prototype.disable=function(){dh(zM,gs.instance())},e}(),Jye=Xye.getInstance(),Zye=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof h.g=="object"?h.g:{},VT=Symbol.for("io.opentelemetry.js.api.logs"),Oh=Zye;function eRe(e,t,r){return function(n){return n===e?t:r}}var sj=1,tRe=function(){function e(){}return e.prototype.getLogger=function(t,r,n){return new VB},e}(),uj=new tRe,rRe=function(){function e(){}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalLoggerProvider=function(t){return Oh[VT]?this.getLoggerProvider():(Oh[VT]=eRe(sj,t,uj),t)},e.prototype.getLoggerProvider=function(){var t,r;return(r=(t=Oh[VT])===null||t===void 0?void 0:t.call(Oh,sj))!==null&&r!==void 0?r:uj},e.prototype.getLogger=function(t,r,n){return this.getLoggerProvider().getLogger(t,r,n)},e.prototype.disable=function(){delete Oh[VT]},e}(),nRe=rRe.getInstance(),GT=h(8821),BT=function(){return BT=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},BT.apply(this,arguments)},iRe=function(){function e(t,r,n){this.instrumentationName=t,this.instrumentationVersion=r,this._wrap=GT.wrap,this._unwrap=GT.unwrap,this._massWrap=GT.massWrap,this._massUnwrap=GT.massUnwrap,this._config=BT({enabled:!0},n),this._diag=_r.createComponentLogger({namespace:t}),this._tracer=ta.getTracer(t,r),this._meter=Jye.getMeter(t,r),this._logger=nRe.getLogger(t,r),this._updateMetricInstruments()}return Object.defineProperty(e.prototype,"meter",{get:function(){return this._meter},enumerable:!1,configurable:!0}),e.prototype.setMeterProvider=function(t){this._meter=t.getMeter(this.instrumentationName,this.instrumentationVersion),this._updateMetricInstruments()},Object.defineProperty(e.prototype,"logger",{get:function(){return this._logger},enumerable:!1,configurable:!0}),e.prototype.setLoggerProvider=function(t){this._logger=t.getLogger(this.instrumentationName,this.instrumentationVersion)},e.prototype.getModuleDefinitions=function(){var t,r=(t=this.init())!==null&&t!==void 0?t:[];return Array.isArray(r)?r:[r]},e.prototype._updateMetricInstruments=function(){},e.prototype.getConfig=function(){return this._config},e.prototype.setConfig=function(t){this._config=BT({},t)},e.prototype.setTracerProvider=function(t){this._tracer=t.getTracer(this.instrumentationName,this.instrumentationVersion)},Object.defineProperty(e.prototype,"tracer",{get:function(){return this._tracer},enumerable:!1,configurable:!0}),e.prototype._runSpanCustomizationHook=function(t,r,n,i){if(!!t)try{t(n,i)}catch(a){this._diag.error("Error running span customization hook due to exception in handler",{triggerName:r},a)}},e}(),aRe=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),oRe=function(e){aRe(t,e);function t(r,n,i){var a=e.call(this,r,n,i)||this;return a._config.enabled&&a.enable(),a}return t}(iRe),sRe=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};function cj(e,t){return typeof t=="string"?e===t:!!e.match(t)}function uRe(e,t){var r,n;if(!t)return!1;try{for(var i=sRe(t),a=i.next();!a.done;a=i.next()){var u=a.value;if(cj(e,u))return!0}}catch(c){r={error:c}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return!1}function lo(e){for(var t={},r=e.length,n=0;n<r;n++){var i=e[n];i&&(t[String(i).toUpperCase().replace(/[-.]/g,"_")]=i)}return t}var cRe="aws.lambda.invoked_arn",lRe="db.system",fRe="db.connection_string",_Re="db.user",dRe="db.jdbc.driver_classname",pRe="db.name",hRe="db.statement",SRe="db.operation",ERe="db.mssql.instance_name",vRe="db.cassandra.keyspace",mRe="db.cassandra.page_size",TRe="db.cassandra.consistency_level",ARe="db.cassandra.table",gRe="db.cassandra.idempotence",yRe="db.cassandra.speculative_execution_count",RRe="db.cassandra.coordinator.id",ORe="db.cassandra.coordinator.dc",bRe="db.hbase.namespace",CRe="db.redis.database_index",PRe="db.mongodb.collection",MRe="db.sql.table",IRe="exception.type",NRe="exception.message",LRe="exception.stacktrace",DRe="exception.escaped",wRe="faas.trigger",URe="faas.execution",xRe="faas.document.collection",FRe="faas.document.operation",$Re="faas.document.time",VRe="faas.document.name",GRe="faas.time",BRe="faas.cron",kRe="faas.coldstart",jRe="faas.invoked_name",HRe="faas.invoked_provider",YRe="faas.invoked_region",qRe="net.transport",KRe="net.peer.ip",WRe="net.peer.port",QRe="net.peer.name",zRe="net.host.ip",XRe="net.host.port",JRe="net.host.name",ZRe="net.host.connection.type",eOe="net.host.connection.subtype",tOe="net.host.carrier.name",rOe="net.host.carrier.mcc",nOe="net.host.carrier.mnc",iOe="net.host.carrier.icc",aOe="peer.service",oOe="enduser.id",sOe="enduser.role",uOe="enduser.scope",cOe="thread.id",lOe="thread.name",fOe="code.function",_Oe="code.namespace",dOe="code.filepath",pOe="code.lineno",lj="http.method",fj="http.url",hOe="http.target",_j="http.host",dj="http.scheme",pj="http.status_code",SOe="http.flavor",hj="http.user_agent",EOe="http.request_content_length",vOe="http.request_content_length_uncompressed",Sj="http.response_content_length",Ej="http.response_content_length_uncompressed",mOe="http.server_name",TOe="http.route",AOe="http.client_ip",gOe="aws.dynamodb.table_names",yOe="aws.dynamodb.consumed_capacity",ROe="aws.dynamodb.item_collection_metrics",OOe="aws.dynamodb.provisioned_read_capacity",bOe="aws.dynamodb.provisioned_write_capacity",COe="aws.dynamodb.consistent_read",POe="aws.dynamodb.projection",MOe="aws.dynamodb.limit",IOe="aws.dynamodb.attributes_to_get",NOe="aws.dynamodb.index_name",LOe="aws.dynamodb.select",DOe="aws.dynamodb.global_secondary_indexes",wOe="aws.dynamodb.local_secondary_indexes",UOe="aws.dynamodb.exclusive_start_table",xOe="aws.dynamodb.table_count",FOe="aws.dynamodb.scan_forward",$Oe="aws.dynamodb.segment",VOe="aws.dynamodb.total_segments",GOe="aws.dynamodb.count",BOe="aws.dynamodb.scanned_count",kOe="aws.dynamodb.attribute_definitions",jOe="aws.dynamodb.global_secondary_index_updates",HOe="messaging.system",YOe="messaging.destination",qOe="messaging.destination_kind",KOe="messaging.temp_destination",WOe="messaging.protocol",QOe="messaging.protocol_version",zOe="messaging.url",XOe="messaging.message_id",JOe="messaging.conversation_id",ZOe="messaging.message_payload_size_bytes",ebe="messaging.message_payload_compressed_size_bytes",tbe="messaging.operation",rbe="messaging.consumer_id",nbe="messaging.rabbitmq.routing_key",ibe="messaging.kafka.message_key",abe="messaging.kafka.consumer_group",obe="messaging.kafka.client_id",sbe="messaging.kafka.partition",ube="messaging.kafka.tombstone",cbe="rpc.system",lbe="rpc.service",fbe="rpc.method",_be="rpc.grpc.status_code",dbe="rpc.jsonrpc.version",pbe="rpc.jsonrpc.request_id",hbe="rpc.jsonrpc.error_code",Sbe="rpc.jsonrpc.error_message",Ebe="message.type",vbe="message.id",mbe="message.compressed_size",Tbe="message.uncompressed_size",hWe=null,SWe=null,EWe=null,vWe=null,mWe=null,TWe=null,AWe=null,gWe=null,yWe=null,RWe=null,OWe=null,bWe=null,CWe=null,PWe=null,MWe=null,IWe=null,NWe=null,LWe=null,DWe=null,wWe=null,UWe=null,xWe=null,FWe=null,$We=null,VWe=null,GWe=null,BWe=null,kWe=null,jWe=null,HWe=null,YWe=null,qWe=null,KWe=null,WWe=null,QWe=null,zWe=null,XWe=null,JWe=null,ZWe=null,eQe=null,tQe=null,rQe=null,nQe=null,iQe=null,aQe=null,oQe=null,sQe=null,uQe=null,cQe=null,lQe=null,fQe=null,_Qe=null,dQe=null,pQe=null,hQe=null,SQe=null,EQe=null,vQe=null,mQe=null,TQe=null,Abe=lj,gbe=fj,AQe=null,ybe=_j,Rbe=dj,Obe=pj,gQe=null,bbe=hj,yQe=null,RQe=null,Cbe=Sj,Pbe=Ej,OQe=null,bQe=null,CQe=null,PQe=null,MQe=null,IQe=null,NQe=null,LQe=null,DQe=null,wQe=null,UQe=null,xQe=null,FQe=null,$Qe=null,VQe=null,GQe=null,BQe=null,kQe=null,jQe=null,HQe=null,YQe=null,qQe=null,KQe=null,WQe=null,QQe=null,zQe=null,XQe=null,JQe=null,ZQe=null,e3e=null,t3e=null,r3e=null,n3e=null,i3e=null,a3e=null,o3e=null,s3e=null,u3e=null,c3e=null,l3e=null,f3e=null,_3e=null,d3e=null,p3e=null,h3e=null,S3e=null,E3e=null,v3e=null,m3e=null,T3e=null,A3e=null,g3e=null,y3e=null,R3e=null,O3e=null,b3e=null,C3e=lo([cRe,lRe,fRe,_Re,dRe,pRe,hRe,SRe,ERe,vRe,mRe,TRe,ARe,gRe,yRe,RRe,ORe,bRe,CRe,PRe,MRe,IRe,NRe,LRe,DRe,wRe,URe,xRe,FRe,$Re,VRe,GRe,BRe,kRe,jRe,HRe,YRe,qRe,KRe,WRe,QRe,zRe,XRe,JRe,ZRe,eOe,tOe,rOe,nOe,iOe,aOe,oOe,sOe,uOe,cOe,lOe,fOe,_Oe,dOe,pOe,lj,fj,hOe,_j,dj,pj,SOe,hj,EOe,vOe,Sj,Ej,mOe,TOe,AOe,gOe,yOe,ROe,OOe,bOe,COe,POe,MOe,IOe,NOe,LOe,DOe,wOe,UOe,xOe,FOe,$Oe,VOe,GOe,BOe,kOe,jOe,HOe,YOe,qOe,KOe,WOe,QOe,zOe,XOe,JOe,ZOe,ebe,tbe,rbe,nbe,ibe,abe,obe,sbe,ube,cbe,lbe,fbe,_be,dbe,pbe,hbe,Sbe,Ebe,vbe,mbe,Tbe]),Mbe="other_sql",Ibe="mssql",Nbe="mysql",Lbe="oracle",Dbe="db2",wbe="postgresql",Ube="redshift",xbe="hive",Fbe="cloudscape",$be="hsqldb",Vbe="progress",Gbe="maxdb",Bbe="hanadb",kbe="ingres",jbe="firstsql",Hbe="edb",Ybe="cache",qbe="adabas",Kbe="firebird",Wbe="derby",Qbe="filemaker",zbe="informix",Xbe="instantdb",Jbe="interbase",Zbe="mariadb",eCe="netezza",tCe="pervasive",rCe="pointbase",nCe="sqlite",iCe="sybase",aCe="teradata",oCe="vertica",sCe="h2",uCe="coldfusion",cCe="cassandra",lCe="hbase",fCe="mongodb",_Ce="redis",dCe="couchbase",pCe="couchdb",hCe="cosmosdb",SCe="dynamodb",ECe="neo4j",vCe="geode",mCe="elasticsearch",TCe="memcached",ACe="cockroachdb",P3e=null,M3e=null,I3e=null,N3e=null,L3e=null,D3e=null,w3e=null,U3e=null,x3e=null,F3e=null,$3e=null,V3e=null,G3e=null,B3e=null,k3e=null,j3e=null,H3e=null,Y3e=null,q3e=null,K3e=null,W3e=null,Q3e=null,z3e=null,X3e=null,J3e=null,Z3e=null,eze=null,tze=null,rze=null,nze=null,ize=null,aze=null,oze=null,sze=null,uze=null,cze=null,lze=null,fze=null,_ze=null,dze=null,pze=null,hze=null,Sze=null,Eze=null,vze=null,mze=null,Tze=null,Aze=lo([Mbe,Ibe,Nbe,Lbe,Dbe,wbe,Ube,xbe,Fbe,$be,Vbe,Gbe,Bbe,kbe,jbe,Hbe,Ybe,qbe,Kbe,Wbe,Qbe,zbe,Xbe,Jbe,Zbe,eCe,tCe,rCe,nCe,iCe,aCe,oCe,sCe,uCe,cCe,lCe,fCe,_Ce,dCe,pCe,hCe,SCe,ECe,vCe,mCe,TCe,ACe]),gCe="all",yCe="each_quorum",RCe="quorum",OCe="local_quorum",bCe="one",CCe="two",PCe="three",MCe="local_one",ICe="any",NCe="serial",LCe="local_serial",gze=null,yze=null,Rze=null,Oze=null,bze=null,Cze=null,Pze=null,Mze=null,Ize=null,Nze=null,Lze=null,Dze=lo([gCe,yCe,RCe,OCe,bCe,CCe,PCe,MCe,ICe,NCe,LCe]),DCe="datasource",wCe="http",UCe="pubsub",xCe="timer",FCe="other",wze=null,Uze=null,xze=null,Fze=null,$ze=null,Vze=lo([DCe,wCe,UCe,xCe,FCe]),$Ce="insert",VCe="edit",GCe="delete",Gze=null,Bze=null,kze=null,jze=lo([$Ce,VCe,GCe]),BCe="alibaba_cloud",kCe="aws",jCe="azure",HCe="gcp",Hze=null,Yze=null,qze=null,Kze=null,Wze=lo([BCe,kCe,jCe,HCe]),YCe="ip_tcp",qCe="ip_udp",KCe="ip",WCe="unix",QCe="pipe",zCe="inproc",XCe="other",Qze=null,zze=null,Xze=null,Jze=null,Zze=null,e4e=null,t4e=null,r4e=lo([YCe,qCe,KCe,WCe,QCe,zCe,XCe]),JCe="wifi",ZCe="wired",ePe="cell",tPe="unavailable",rPe="unknown",n4e=null,i4e=null,a4e=null,o4e=null,s4e=null,u4e=lo([JCe,ZCe,ePe,tPe,rPe]),nPe="gprs",iPe="edge",aPe="umts",oPe="cdma",sPe="evdo_0",uPe="evdo_a",cPe="cdma2000_1xrtt",lPe="hsdpa",fPe="hsupa",_Pe="hspa",dPe="iden",pPe="evdo_b",hPe="lte",SPe="ehrpd",EPe="hspap",vPe="gsm",mPe="td_scdma",TPe="iwlan",APe="nr",gPe="nrnsa",yPe="lte_ca",c4e=null,l4e=null,f4e=null,_4e=null,d4e=null,p4e=null,h4e=null,S4e=null,E4e=null,v4e=null,m4e=null,T4e=null,A4e=null,g4e=null,y4e=null,R4e=null,O4e=null,b4e=null,C4e=null,P4e=null,M4e=null,I4e=lo([nPe,iPe,aPe,oPe,sPe,uPe,cPe,lPe,fPe,_Pe,dPe,pPe,hPe,SPe,EPe,vPe,mPe,TPe,APe,gPe,yPe]),RPe="1.0",OPe="1.1",bPe="2.0",CPe="SPDY",PPe="QUIC",N4e=null,L4e=null,D4e=null,w4e=null,U4e=null,x4e={HTTP_1_0:RPe,HTTP_1_1:OPe,HTTP_2_0:bPe,SPDY:CPe,QUIC:PPe},MPe="queue",IPe="topic",F4e=null,$4e=null,V4e=lo([MPe,IPe]),NPe="receive",LPe="process",G4e=null,B4e=null,k4e=lo([NPe,LPe]),DPe=0,wPe=1,UPe=2,xPe=3,FPe=4,$Pe=5,VPe=6,GPe=7,BPe=8,kPe=9,jPe=10,HPe=11,YPe=12,qPe=13,KPe=14,WPe=15,QPe=16,j4e=null,H4e=null,Y4e=null,q4e=null,K4e=null,W4e=null,Q4e=null,z4e=null,X4e=null,J4e=null,Z4e=null,e6e=null,t6e=null,r6e=null,n6e=null,i6e=null,a6e=null,o6e={OK:DPe,CANCELLED:wPe,UNKNOWN:UPe,INVALID_ARGUMENT:xPe,DEADLINE_EXCEEDED:FPe,NOT_FOUND:$Pe,ALREADY_EXISTS:VPe,PERMISSION_DENIED:GPe,RESOURCE_EXHAUSTED:BPe,FAILED_PRECONDITION:kPe,ABORTED:jPe,OUT_OF_RANGE:HPe,UNIMPLEMENTED:YPe,INTERNAL:qPe,UNAVAILABLE:KPe,DATA_LOSS:WPe,UNAUTHENTICATED:QPe},zPe="SENT",XPe="RECEIVED",s6e=null,u6e=null,c6e=lo([zPe,XPe]),$n;(function(e){e.CONNECT_END="connectEnd",e.CONNECT_START="connectStart",e.DECODED_BODY_SIZE="decodedBodySize",e.DOM_COMPLETE="domComplete",e.DOM_CONTENT_LOADED_EVENT_END="domContentLoadedEventEnd",e.DOM_CONTENT_LOADED_EVENT_START="domContentLoadedEventStart",e.DOM_INTERACTIVE="domInteractive",e.DOMAIN_LOOKUP_END="domainLookupEnd",e.DOMAIN_LOOKUP_START="domainLookupStart",e.ENCODED_BODY_SIZE="encodedBodySize",e.FETCH_START="fetchStart",e.LOAD_EVENT_END="loadEventEnd",e.LOAD_EVENT_START="loadEventStart",e.NAVIGATION_START="navigationStart",e.REDIRECT_END="redirectEnd",e.REDIRECT_START="redirectStart",e.REQUEST_START="requestStart",e.RESPONSE_END="responseEnd",e.RESPONSE_START="responseStart",e.SECURE_CONNECTION_START="secureConnectionStart",e.UNLOAD_EVENT_END="unloadEventEnd",e.UNLOAD_EVENT_START="unloadEventStart"})($n||($n={}));var XM;function JPe(){return XM||(XM=document.createElement("a")),XM}function JM(e,t){return t in e}function tu(e,t,r,n){var i=void 0,a=void 0;JM(r,t)&&typeof r[t]=="number"&&(i=r[t]);var u=n||$n.FETCH_START;if(JM(r,u)&&typeof r[u]=="number"&&(a=r[u]),i!==void 0&&a!==void 0&&i>=a)return e.addEvent(t,i),e}function vj(e,t){tu(e,$n.FETCH_START,t),tu(e,$n.DOMAIN_LOOKUP_START,t),tu(e,$n.DOMAIN_LOOKUP_END,t),tu(e,$n.CONNECT_START,t),JM(t,"name")&&t.name.startsWith("https:")&&tu(e,$n.SECURE_CONNECTION_START,t),tu(e,$n.CONNECT_END,t),tu(e,$n.REQUEST_START,t),tu(e,$n.RESPONSE_START,t),tu(e,$n.RESPONSE_END,t);var r=t[$n.ENCODED_BODY_SIZE];r!==void 0&&e.setAttribute(Cbe,r);var n=t[$n.DECODED_BODY_SIZE];n!==void 0&&r!==n&&e.setAttribute(Pbe,n)}function ZPe(e){return e.slice().sort(function(t,r){var n=t[$n.FETCH_START],i=r[$n.FETCH_START];return n>i?1:n<i?-1:0})}function mj(){return typeof location<"u"?location.origin:void 0}function eMe(e,t,r,n,i,a){i===void 0&&(i=new WeakSet);var u=Zu(e);e=u.toString();var c=rMe(e,t,r,n,i,a);if(c.length===0)return{mainRequest:void 0};if(c.length===1)return{mainRequest:c[0]};var E=ZPe(c);if(u.origin!==mj()&&E.length>1){var _=E[0],p=tMe(E,_[$n.RESPONSE_END],r),L=_[$n.RESPONSE_END],W=p[$n.FETCH_START];return W<L&&(p=_,_=void 0),{corsPreFlightRequest:_,mainRequest:p}}else return{mainRequest:c[0]}}function tMe(e,t,r){for(var n=Xu(r),i=Xu(El(t)),a=e[1],u,c=e.length,E=1;E<c;E++){var _=e[E],p=Xu(El(_[$n.FETCH_START])),L=Xu(El(_[$n.RESPONSE_END])),W=n-L;p>=i&&(!u||W<u)&&(u=W,a=_)}return a}function rMe(e,t,r,n,i,a){var u=Xu(t),c=Xu(r),E=n.filter(function(_){var p=Xu(El(_[$n.FETCH_START])),L=Xu(El(_[$n.RESPONSE_END]));return _.initiatorType.toLowerCase()===(a||"xmlhttprequest")&&_.name===e&&p>=u&&L<=c});return E.length>0&&(E=E.filter(function(_){return!i.has(_)})),E}function Zu(e){if(typeof URL=="function")return new URL(e,typeof document<"u"?document.baseURI:typeof location<"u"?location.href:void 0);var t=JPe();return t.href=e,t}function l6e(e){var t=Zu(e);return t.href}function nMe(e,t){if(e.nodeType===Node.DOCUMENT_NODE)return"/";var r=aMe(e,t);if(t&&r.indexOf("@id")>0)return r;var n="";return e.parentNode&&(n+=nMe(e.parentNode,!1)),n+=r,n}function iMe(e){if(!e.parentNode)return 0;var t=[e.nodeType];e.nodeType===Node.CDATA_SECTION_NODE&&t.push(Node.TEXT_NODE);var r=Array.from(e.parentNode.childNodes);return r=r.filter(function(n){var i=n.localName;return t.indexOf(n.nodeType)>=0&&i===e.localName}),r.length>=1?r.indexOf(e)+1:0}function aMe(e,t){var r=e.nodeType,n=iMe(e),i="";if(r===Node.ELEMENT_NODE){var a=e.getAttribute("id");if(t&&a)return'//*[@id="'+a+'"]';i=e.localName}else if(r===Node.TEXT_NODE||r===Node.CDATA_SECTION_NODE)i="text()";else if(r===Node.COMMENT_NODE)i="comment()";else return"";return i&&n>1?"/"+i+"["+n+"]":"/"+i}function oMe(e,t){var r=t||[];(typeof r=="string"||r instanceof RegExp)&&(r=[r]);var n=Zu(e);return n.origin===mj()?!0:r.some(function(i){return cj(e,i)})}var ru;(function(e){e.METHOD_OPEN="open",e.METHOD_SEND="send",e.EVENT_ABORT="abort",e.EVENT_ERROR="error",e.EVENT_LOAD="loaded",e.EVENT_TIMEOUT="timeout"})(ru||(ru={}));var Tj="0.52.1",ZM;(function(e){e.HTTP_STATUS_TEXT="http.status_text"})(ZM||(ZM={}));var sMe=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),uMe=300,cMe=function(e){sMe(t,e);function t(r){r===void 0&&(r={});var n=e.call(this,"@opentelemetry/instrumentation-xml-http-request",Tj,r)||this;return n.component="xml-http-request",n.version=Tj,n.moduleName=n.component,n._tasksCount=0,n._xhrMem=new WeakMap,n._usedResources=new WeakSet,n}return t.prototype.init=function(){},t.prototype._addHeaders=function(r,n){var i=Zu(n).href;if(!oMe(i,this.getConfig().propagateTraceHeaderCorsUrls)){var a={};R_.inject(_a.active(),a),Object.keys(a).length>0&&this._diag.debug("headers inject skipped due to CORS policy");return}var u={};R_.inject(_a.active(),u),Object.keys(u).forEach(function(c){r.setRequestHeader(c,String(u[c]))})},t.prototype._addChildSpan=function(r,n){var i=this;_a.with(ta.setSpan(_a.active(),r),function(){var a=i.tracer.startSpan("CORS Preflight",{startTime:n[$n.FETCH_START]});i.getConfig().ignoreNetworkEvents||vj(a,n),a.end(n[$n.RESPONSE_END])})},t.prototype._addFinalSpanAttributes=function(r,n,i){if(typeof i=="string"){var a=Zu(i);n.status!==void 0&&r.setAttribute(Obe,n.status),n.statusText!==void 0&&r.setAttribute(ZM.HTTP_STATUS_TEXT,n.statusText),r.setAttribute(ybe,a.host),r.setAttribute(Rbe,a.protocol.replace(":","")),r.setAttribute(bbe,navigator.userAgent)}},t.prototype._applyAttributesAfterXHR=function(r,n){var i=this,a=this.getConfig().applyCustomAttributesOnSpan;typeof a=="function"&&Dye(function(){return a(r,n)},function(u){!u||i._diag.error("applyCustomAttributesOnSpan",u)},!0)},t.prototype._addResourceObserver=function(r,n){var i=this._xhrMem.get(r);!i||typeof PerformanceObserver!="function"||typeof PerformanceResourceTiming!="function"||(i.createdResources={observer:new PerformanceObserver(function(a){var u=a.getEntries(),c=Zu(n);u.forEach(function(E){E.initiatorType==="xmlhttprequest"&&E.name===c.href&&i.createdResources&&i.createdResources.entries.push(E)})}),entries:[]},i.createdResources.observer.observe({entryTypes:["resource"]}))},t.prototype._clearResources=function(){this._tasksCount===0&&this.getConfig().clearTimingResources&&(gh.clearResourceTimings(),this._xhrMem=new WeakMap,this._usedResources=new WeakSet)},t.prototype._findResourceAndAddNetworkEvents=function(r,n,i,a,u){if(!(!i||!a||!u||!r.createdResources)){var c=r.createdResources.entries;(!c||!c.length)&&(c=gh.getEntriesByType("resource"));var E=eMe(Zu(i).href,a,u,c,this._usedResources);if(E.mainRequest){var _=E.mainRequest;this._markResourceAsUsed(_);var p=E.corsPreFlightRequest;p&&(this._addChildSpan(n,p),this._markResourceAsUsed(p)),this.getConfig().ignoreNetworkEvents||vj(n,_)}}},t.prototype._cleanPreviousSpanInformation=function(r){var n=this._xhrMem.get(r);if(n){var i=n.callbackToRemoveEvents;i&&i(),this._xhrMem.delete(r)}},t.prototype._createSpan=function(r,n,i){var a;if(uRe(n,this.getConfig().ignoreUrls)){this._diag.debug("ignoring span as url matches ignored url");return}var u=i.toUpperCase(),c=this.tracer.startSpan(u,{kind:NT.CLIENT,attributes:(a={},a[Abe]=i,a[gbe]=Zu(n).toString(),a)});return c.addEvent(ru.METHOD_OPEN),this._cleanPreviousSpanInformation(r),this._xhrMem.set(r,{span:c,spanUrl:n}),c},t.prototype._markResourceAsUsed=function(r){this._usedResources.add(r)},t.prototype._patchOpen=function(){var r=this;return function(n){var i=r;return function(){for(var u=[],c=0;c<arguments.length;c++)u[c]=arguments[c];var E=u[0],_=u[1];return i._createSpan(this,_,E),n.apply(this,u)}}},t.prototype._patchSend=function(){var r=this;function n(p,L,W,ve){var me=L.callbackToRemoveEvents;typeof me=="function"&&me();var Oe=L.span,He=L.spanUrl,qe=L.sendStartTime;Oe&&(r._findResourceAndAddNetworkEvents(L,Oe,He,qe,W),Oe.addEvent(p,ve),r._addFinalSpanAttributes(Oe,L,He),Oe.end(ve),r._tasksCount--),r._clearResources()}function i(p,L){var W=r._xhrMem.get(L);if(!!W){W.status=L.status,W.statusText=L.statusText,r._xhrMem.delete(L),W.span&&r._applyAttributesAfterXHR(W.span,L);var ve=RM(),me=Date.now();setTimeout(function(){n(p,W,ve,me)},uMe)}}function a(){i(ru.EVENT_ERROR,this)}function u(){i(ru.EVENT_ABORT,this)}function c(){i(ru.EVENT_TIMEOUT,this)}function E(){this.status<299?i(ru.EVENT_LOAD,this):i(ru.EVENT_ERROR,this)}function _(p){p.removeEventListener("abort",u),p.removeEventListener("error",a),p.removeEventListener("load",E),p.removeEventListener("timeout",c);var L=r._xhrMem.get(p);L&&(L.callbackToRemoveEvents=void 0)}return function(p){return function(){for(var W=this,ve=[],me=0;me<arguments.length;me++)ve[me]=arguments[me];var Oe=r._xhrMem.get(this);if(!Oe)return p.apply(this,ve);var He=Oe.span,qe=Oe.spanUrl;return He&&qe&&_a.with(ta.setSpan(_a.active(),He),function(){r._tasksCount++,Oe.sendStartTime=RM(),He.addEvent(ru.METHOD_SEND),W.addEventListener("abort",u),W.addEventListener("error",a),W.addEventListener("load",E),W.addEventListener("timeout",c),Oe.callbackToRemoveEvents=function(){_(W),Oe.createdResources&&Oe.createdResources.observer.disconnect()},r._addHeaders(W,qe),r._addResourceObserver(W,qe)}),p.apply(this,ve)}}},t.prototype.enable=function(){this._diag.debug("applying patch to",this.moduleName,this.version),aj(XMLHttpRequest.prototype.open)&&(this._unwrap(XMLHttpRequest.prototype,"open"),this._diag.debug("removing previous patch from method open")),aj(XMLHttpRequest.prototype.send)&&(this._unwrap(XMLHttpRequest.prototype,"send"),this._diag.debug("removing previous patch from method send")),this._wrap(XMLHttpRequest.prototype,"open",this._patchOpen()),this._wrap(XMLHttpRequest.prototype,"send",this._patchSend())},t.prototype.disable=function(){this._diag.debug("removing patch from",this.moduleName,this.version),this._unwrap(XMLHttpRequest.prototype,"open"),this._unwrap(XMLHttpRequest.prototype,"send"),this._tasksCount=0,this._xhrMem=new WeakMap,this._usedResources=new WeakSet},t}(oRe);const lMe="https?://api-gateway.[a-zA-Z]+.icanbwell.com",Aj=new RegExp(`^(?!${lMe})`);function f6e(e){return Aj.test(e)}function fMe(e){return D9({node:()=>null,browser:()=>new cMe({ignoreUrls:[Aj],propagateTraceHeaderCorsUrls:[e.graphQL.apiUrl,e.graphQL.unauthApiUrl]})})}var Os=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},eI=function(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r},I_,N_,bh,kT,gj,yj,Rj,Oj;class _Me{constructor(t){I_.add(this),N_.set(this,void 0),bh.set(this,void 0),kT.set(this,void 0),eI(this,N_,Os(this,I_,"m",gj).call(this,t),"f"),eI(this,bh,Os(this,I_,"m",yj).call(this),"f"),eI(this,kT,Os(this,I_,"m",Rj).call(this,t),"f"),this.fetchInstrumentation=Os(this,I_,"m",Oj).call(this,t)}loggerProvider(){return Os(this,kT,"f")}resource(){return Os(this,N_,"f")}tracerProvider(){return Os(this,bh,"f")}}N_=new WeakMap,bh=new WeakMap,kT=new WeakMap,I_=new WeakSet,gj=function(t){var r,n,i,a;return mT.default().merge(new mT({[Ige]:"bwell-sdk-typescript",[Lge]:B9(),[Dge]:"typescript",[Nge]:"com.bwell",[Mge]:t.context.env,"client.key":t.context.clientKey,"user.id":(n=(r=t.context.user)===null||r===void 0?void 0:r.clientFhirPersonId)!==null&&n!==void 0?n:"","user.bwell-person-id":(a=(i=t.context.user)===null||i===void 0?void 0:i.bwellFhirPersonId)!==null&&a!==void 0?a:""}))},yj=function(){const t=new oAe({resource:Os(this,N_,"f")});return t.register({propagator:new tie}),t},Rj=function(t){const r=new cpe({resource:Os(this,N_,"f")}),n=new jae({url:`${t.telemetry.collectorUrl}/otlp-http/v1/logs`}),i=new mpe(n);return r.addLogRecordProcessor(i),r},Oj=function(t){const r=fMe(t);return r===null?null:(r.setTracerProvider(Os(this,bh,"f")),r)};var gl=function(e,t,r,n){function i(a){return a instanceof r?a:new r(function(u){u(a)})}return new(r||(r=Promise))(function(a,u){function c(p){try{_(n.next(p))}catch(L){u(L)}}function E(p){try{_(n.throw(p))}catch(L){u(L)}}function _(p){p.done?a(p.value):i(p.value).then(c,E)}_((n=n.apply(e,t||[])).next())})},tI=function(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r},qi=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},L_,ec,jT,Ch,jo,rI,bj,Cj,nI;class Pj{constructor(t,r,n,i){L_.add(this),jT.set(this,void 0),Ch.set(this,void 0),jo.set(this,void 0),tI(this,jT,r,"f"),tI(this,Ch,n.getLogger("TokenManager"),"f"),tI(this,jo,i,"f")}static initialize(t,r){return gl(this,arguments,void 0,function*(n,i,a=new ji,u=new aG){const c=qi(ec,ec,"m",rI).call(ec,n.accessToken);if(c.failure())return c.intoFailure();const E=new ec(Object.assign(Object.assign({},n),{expiration:c.data()}),i,a,u);try{yield Promise.all([u.set("idToken",n.idToken),u.set("clientKey",n.clientKey),u.set("accessToken",n.accessToken),u.set("refreshToken",n.refreshToken),u.set("expiration",c.data().toISOString())])}catch{return Kt.failure(new e_("Failed to set tokens in token storage"))}return Kt.success(E)})}getAccessToken(){return gl(this,void 0,void 0,function*(){if(yield qi(this,L_,"m",Cj).call(this)){const n=yield qi(this,L_,"m",nI).call(this);if(n.failure())return n.intoFailure()}const r=yield qi(this,jo,"f").get("accessToken");return ka(r)?Kt.failure(new e_("accessToken not found in token storage")):Kt.success(r)})}getIdToken(){return gl(this,void 0,void 0,function*(){return yield qi(this,jo,"f").get("idToken")})}refreshAccessToken(){return gl(this,void 0,void 0,function*(){return qi(this,L_,"m",nI).call(this)})}}ec=Pj,jT=new WeakMap,Ch=new WeakMap,jo=new WeakMap,L_=new WeakSet,rI=function(t){try{const r=x9(t);return Kt.success(new Date(r))}catch(r){if(!Bi.isBwellError(r))throw r;return Kt.failure(r)}},bj=function(){return gl(this,void 0,void 0,function*(){const t=yield qi(this,jo,"f").get("expiration");if(ka(t))throw new Error("expiration not found in token storage");return new Date(t)})},Cj=function(){return gl(this,void 0,void 0,function*(){const r=(yield qi(this,L_,"m",bj).call(this)).getTime(),n=Date.now();return r<n})},nI=function(){return gl(this,void 0,void 0,function*(){qi(this,Ch,"f").verbose("refreshing access token...");const[t,r]=yield Promise.all([qi(this,jo,"f").get("refreshToken"),qi(this,jo,"f").get("clientKey")]);if(ka(t)||ka(r))return Kt.failure(new e_("refreshToken or clientKey not found in token storage"));const n=yield qi(this,jT,"f").refreshAccessToken({refreshToken:t,clientKey:r});if(qi(this,Ch,"f").verbose("refreshing access token complete"),n.failure())return n.intoFailure();const i=n.data();yield qi(this,jo,"f").set("accessToken",i.accessToken),yield qi(this,jo,"f").set("idToken",i.idToken);const a=qi(ec,ec,"m",rI).call(ec,i.accessToken);return a.failure()?a.intoFailure():(yield qi(this,jo,"f").set("expiration",a.data().toISOString()),Kt.success(null))})};var Ph=function(e,t,r,n){function i(a){return a instanceof r?a:new r(function(u){u(a)})}return new(r||(r=Promise))(function(a,u){function c(p){try{_(n.next(p))}catch(L){u(L)}}function E(p){try{_(n.throw(p))}catch(L){u(L)}}function _(p){p.done?a(p.value):i(p.value).then(c,E)}_((n=n.apply(e,t||[])).next())})},Ha=function(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r},qt=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},li,D_,Ya,Mh,iI,aI,oI,sI,bs,Ih,yl,Rl,HT,w_,uI,Ho,cI,lI,fI,Mj;class dMe{constructor(t){li.add(this),D_.set(this,void 0),Ya.set(this,void 0),Mh.set(this,void 0),iI.set(this,new tee),aI.set(this,new zre),oI.set(this,new Jre),sI.set(this,new ane),bs.set(this,void 0),Ih.set(this,void 0),yl.set(this,void 0),Rl.set(this,void 0),HT.set(this,void 0),w_.set(this,void 0),Ha(this,D_,t,"f"),Ha(this,Ya,Vm.initialize(qt(this,D_,"f")).data(),"f"),Ha(this,Mh,qt(this,li,"m",fI).call(this),"f"),Ha(this,bs,qt(this,li,"m",lI).call(this),"f"),Ha(this,yl,qt(this,bs,"f").getLogger("BWellSDK"),"f"),Ha(this,Rl,qt(this,oI,"f").createIdentityManager(qt(this,Ya,"f"),qt(this,bs,"f")),"f"),Ha(this,HT,new nee(qt(this,Rl,"f")),"f")}initialize(){return Ph(this,void 0,void 0,function*(){qt(this,yl,"f").verbose("initializing SDKConfig...");const t=yield qt(this,HT,"f").initialize(qt(this,D_,"f"));return t.failure()?t.intoFailure():(qt(this,yl,"f").verbose("SDK Config initialized successfully"),Ha(this,Ya,t.data(),"f"),qt(this,li,"m",cI).call(this),Kt.success(null))})}authenticate(t){return Ph(this,void 0,void 0,function*(){const n=yield qt(this,sI,"f").createAuthStrategy(qt(this,Ya,"f"),qt(this,Rl,"f"),t,qt(this,bs,"f")).authenticate(t);if(n.failure())return n.intoFailure();const i=n.data();return qt(this,li,"m",uI).call(this,i)})}setAuthTokens(t){return Ph(this,void 0,void 0,function*(){const r=yield qt(this,li,"m",uI).call(this,t);if(r.failure())return r.intoFailure();if(qt(this,w_,"f")===void 0)throw new Error("TokenManager not set");const n=yield qt(this,w_,"f").refreshAccessToken();return n.failure()?n.intoFailure():Kt.success(null)})}createGuestAccessToken(){return Ph(this,void 0,void 0,function*(){return qt(this,Rl,"f").createGuestAccessToken({clientKey:qt(this,Ya,"f").context.clientKey})})}get health(){return qt(this,li,"m",Ho).call(this).health}get healthSpace(){return qt(this,li,"m",Ho).call(this).healthSpace}get user(){return qt(this,li,"m",Ho).call(this).user}get connection(){return qt(this,li,"m",Ho).call(this).connection}get activity(){return qt(this,li,"m",Ho).call(this).activity}get device(){return qt(this,li,"m",Ho).call(this).device}get event(){return qt(this,li,"m",Ho).call(this).event}get search(){return qt(this,li,"m",Ho).call(this).search}get language(){return qt(this,li,"m",Ho).call(this).language}get questionnaire(){return qt(this,li,"m",Ho).call(this).questionnaire}}D_=new WeakMap,Ya=new WeakMap,Mh=new WeakMap,iI=new WeakMap,aI=new WeakMap,oI=new WeakMap,sI=new WeakMap,bs=new WeakMap,Ih=new WeakMap,yl=new WeakMap,Rl=new WeakMap,HT=new WeakMap,w_=new WeakMap,li=new WeakSet,uI=function(t){return Ph(this,void 0,void 0,function*(){try{const i=V9(t.idToken);Fn(i)&&qt(this,Ya,"f").setContextUser(i)}catch(i){if(Bi.isBwellError(i))return Kt.failure(i);throw i}const r=Object.assign(Object.assign({},t),{clientKey:qt(this,Ya,"f").context.clientKey}),n=yield Pj.initialize(r,qt(this,Rl,"f"),qt(this,bs,"f"),qt(this,D_,"f").tokenStorage);return n.failure()?n.intoFailure():(Ha(this,w_,n.data(),"f"),qt(this,li,"m",cI).call(this),Ha(this,Ih,qt(this,li,"m",Mj).call(this,qt(this,w_,"f")),"f"),Kt.success(null))})},Ho=function(){if(qt(this,Ih,"f")===void 0)throw new Error("Unintialized");return qt(this,Ih,"f")},cI=function(){qt(this,yl,"f").verbose("reinitializing SDK dependencies"),Ha(this,Mh,qt(this,li,"m",fI).call(this),"f"),Ha(this,bs,qt(this,li,"m",lI).call(this),"f"),Ha(this,yl,qt(this,bs,"f").getLogger("BwellSDK"),"f")},lI=function(){return qt(this,iI,"f").createLogProvider(qt(this,Ya,"f"),qt(this,Mh,"f"))},fI=function(){if(!!qt(this,Ya,"f").telemetry.enabled)return new _Me(qt(this,Ya,"f"))},Mj=function(t){return qt(this,aI,"f").createApiProvider(qt(this,Ya,"f"),t,qt(this,bs,"f"))};const Ij="orchestrator:bwell-sdk";var YT;(function(e){e.one="1.0.0"})(YT||(YT={}));const pMe={id:Ij,dependencies:{featureServices:{[Wn]:vi.one,[Tm]:Kp.one,[ks]:Mu.one}},create:({featureServices:e})=>{const t=e[Wn],r=e[Tm],n=e[ks],{key:i}=t.getClientContext(),a=new dMe({clientKey:i});return t.getStore().subscribe(()=>{var u;if((u=t.getUser().tokenData)===null||u===void 0?void 0:u.idToken)try{a.language.setLanguage(r.resolvedLanguage),r.onChangeLanguage(_=>{const p=a.language.getLanguage();_!==p&&a.language.setLanguage(_)})}catch(_){n.error(_,"embeddable-core: Error occurred when switching language in SDK")}}),{[YT.one]:()=>({featureService:a})}}},_I={apiClient:d,theme:H,analytics:V,auth:A,logging:y,state:T,navigation:m,featureFlags:D,translation:P,identityUtils:g,nativeBridge:$,globalEventEmitter:G,rebootController:x,bwellSdk:Z},_6e=Object.keys(_I).reduce((e,t)=>{const{id:r,version:n}=_I[t];return Object.assign(Object.assign({},e),{[t]:{id:r,version:n}})},{});var er=_I,hMe=h(8561),SMe=h(295),Nj=h.n(SMe),EMe=h(2424),Lj=h.n(EMe);class vMe{constructor(t){this.providedExternals=t;for(const[r,n]of Object.entries(t))if(!Lj()(n))throw new Error(`The provided version ${JSON.stringify(n)} for the external ${JSON.stringify(r)} is invalid.`)}validate(t){for(const[r,n]of Object.entries(t)){const i=this.providedExternals[r];if(!i)throw new Error(`The external dependency ${JSON.stringify(r)} is not provided.`);if(!Nj()(i,n))throw new Error(`The external dependency ${JSON.stringify(r)} in the required version range ${JSON.stringify(n)} is not satisfied. The provided version is ${JSON.stringify(i)}.`)}}}class mMe{constructor(t,r,n){this.promise=t,this.value=r,this.error=n,t.then(i=>this.value=i).catch(i=>this.error=i)}}function TMe(e,t,r){let n=`The Feature App module at the url ${JSON.stringify(e)} ${t?`with the module type ${JSON.stringify(t)}`:"with no specific module type"} is invalid. A Feature App module must have a Feature App definition as default export. A Feature App definition is an object with at least a \`create\` method.`;return r&&r.length>1&&!t&&(n+=" Hint: The provided module loader expects an optional second parameter `moduleType`. It might need to be provided for this Feature App."),n}function AMe(e){return typeof e!="object"||!e?!1:typeof e.create=="function"}function gMe(e){return typeof e!="object"||!e?!1:AMe(e.default)}class yMe{constructor(t,r={}){this.featureServiceRegistry=t,this.options=r,this.asyncFeatureAppDefinitions=new Map,this.featureAppDefinitionsWithRegisteredOwnFeatureServices=new WeakSet,this.featureAppRetainers=new Map,this.logger=r.logger||console}getAsyncFeatureAppDefinition(t,r){const n=`${t}${r}`;let i=this.asyncFeatureAppDefinitions.get(n);return i||(i=this.createAsyncFeatureAppDefinition(t,r),this.asyncFeatureAppDefinitions.set(n,i)),i}createFeatureAppScope(t,r,n={}){const i=this.getFeatureAppRetainer(t,r,n);let a=!1;return{featureApp:i.featureApp,release:()=>{a?this.logger.warn(`The Feature App with the ID ${JSON.stringify(t)} has already been released for this scope.`):(a=!0,i.release())}}}async preloadFeatureApp(t,r){await this.getAsyncFeatureAppDefinition(t,r).promise}createAsyncFeatureAppDefinition(t,r){const{moduleLoader:n}=this.options;if(!n)throw new Error("No module loader provided.");return new mMe(n(t,r).then(i=>{if(!gMe(i))throw new Error(TMe(t,r,this.options.moduleLoader));return this.logger.info(`The Feature App module at the url ${JSON.stringify(t)} has been successfully loaded.`),i.default}))}registerOwnFeatureServices(t,r){this.featureAppDefinitionsWithRegisteredOwnFeatureServices.has(r)||(r.ownFeatureServiceDefinitions&&this.featureServiceRegistry.registerFeatureServices(r.ownFeatureServiceDefinitions,t),this.featureAppDefinitionsWithRegisteredOwnFeatureServices.add(r))}getFeatureAppRetainer(t,r,n){let i=this.featureAppRetainers.get(t);return i?i.retain():(this.registerOwnFeatureServices(t,r),i=this.createFeatureAppRetainer(r,t,n)),i}createFeatureAppRetainer(t,r,n){var i,a;this.validateExternals(t);const{featureAppName:u,baseUrl:c,beforeCreate:E,config:_,done:p}=n,L=this.featureServiceRegistry.bindFeatureServices(t,r,u);try{(a=(i=this.options).onBind)===null||a===void 0||a.call(i,{featureAppDefinition:t,featureAppId:r,featureAppName:u})}catch(ve){this.logger.error("Failed to execute onBind callback.",ve)}const W={baseUrl:c,config:_,featureAppId:r,featureAppName:u,featureServices:L.featureServices,done:p};try{E?.(W);const ve=t.create(W);this.logger.info(`The Feature App with the ID ${JSON.stringify(r)} has been successfully created.`);let me=1;const Oe={featureApp:ve,retain:()=>{me+=1},release:()=>{me-=1,me===0&&(this.featureAppRetainers.delete(r),L.unbind())}};return this.featureAppRetainers.set(r,Oe),Oe}catch(ve){throw L.unbind(),ve}}validateExternals(t){const{externalsValidator:r}=this.options;if(!r)return;const{dependencies:n}=t;n&&n.externals&&r.validate(n.externals)}}var RMe=h(5725),OMe=h.n(RMe);function bMe(e,t,r,n,i){return`The ${e?"optional":"required"} Feature Service ${JSON.stringify(t)} in the unsupported version range ${JSON.stringify(n)} could not be bound to consumer ${JSON.stringify(r)}. The supported versions are ${JSON.stringify(i)}.`}function CMe(e,t,r){return`The Feature Service ${JSON.stringify(e)} could not be registered by registrant ${JSON.stringify(t)} because it defines the invalid version ${JSON.stringify(r)}.`}function PMe(e,t,r){return`The ${e?"optional":"required"} Feature Service ${JSON.stringify(t)} in an invalid version could not be bound to consumer ${JSON.stringify(r)}.`}function MMe(e,t,r){return`The ${e?"optional":"required"} Feature Service ${JSON.stringify(t)} is not registered and therefore could not be bound to consumer ${JSON.stringify(r)}.`}function IMe(e,t){return`The Feature Service ${JSON.stringify(e)} could not be registered by registrant ${JSON.stringify(t)} because it returned undefined.`}function NMe(e,t){return`The Feature Service ${JSON.stringify(e)} has been successfully registered by registrant ${JSON.stringify(t)}.`}function LMe(e,t){return`The already registered Feature Service ${JSON.stringify(e)} could not be re-registered by registrant ${JSON.stringify(t)}.`}function DMe(e,t){return`The required Feature Service ${JSON.stringify(e)} has been successfully bound to consumer ${JSON.stringify(t)}.`}function wMe(e){return`All required Feature Services are already bound to consumer ${JSON.stringify(e)}.`}function UMe(e,t){return`The required Feature Service ${JSON.stringify(e)} could not be unbound from consumer ${JSON.stringify(t)}.`}function xMe(e,t){return`The required Feature Service ${JSON.stringify(e)} has been successfully unbound from consumer ${JSON.stringify(t)}.`}function FMe(e){return`All required Feature Services are already unbound from consumer ${JSON.stringify(e)}.`}var $Me=h(2702),VMe=h.n($Me);function GMe(e){return t=>[e,t]}function BMe(e,t){return Object.keys(t).map(GMe(e))}function kMe(e){return Array.from(e.keys()).reduce((t,r)=>{const n=e.get(r);if(!n)return t;const i=BMe(r,n);return[...t,...i]},[])}function jMe(e){const t=Array.from(e.keys()),r=kMe(e),n=VMe()(r);return n.push(...t.filter(i=>e.has(i)&&n.indexOf(i)===-1)),n.reverse()}function Dj({dependencies:e,optionalDependencies:t}){return Object.assign(Object.assign({},e&&e.featureServices),t&&t.featureServices)}function HMe(e){const t=new Map;for(const r of e)t.set(r.id,Dj(r));return t}function YMe({optionalDependencies:e},t){return Boolean(e&&e.featureServices&&e.featureServices.hasOwnProperty(t))}function qMe(e){const t=new Map;for(const r of e)t.set(r.id,r);return t}class KMe{constructor(t={}){this.options=t,this.sharedFeatureServices=new Map,this.consumerIds=new Set,this.logger=t.logger||console}registerFeatureServices(t,r){const n=qMe(t),i=HMe(t);for(const a of jMe(i))this.registerFeatureService(n,a,r)}bindFeatureServices(t,r,n){if(this.consumerIds.has(r))throw new Error(wMe(r));const i=new Map,a=Object.create(null),u=Dj(t);for(const _ of Object.keys(u)){const p=YMe(t,_),L=u[_],W=this.bindFeatureService(_,r,n,L,{optional:p});!W||(this.logger.info(DMe(_,r)),i.set(_,W),a[_]=W.featureService)}this.consumerIds.add(r);let c=!1;return{featureServices:a,unbind:()=>{if(c)throw new Error(FMe(r));c=!0,this.consumerIds.delete(r);for(const[_,p]of i.entries())try{p.unbind&&p.unbind(),this.logger.info(xMe(_,r))}catch(L){this.logger.error(UMe(_,r),L)}}}}registerFeatureService(t,r,n){const i=t.get(r);if(!i)return;if(this.sharedFeatureServices.has(r)){this.logger.warn(LMe(r,n));return}this.validateExternals(i);const{featureServices:a}=this.bindFeatureServices(i,r),u=i.create({featureServices:a});u?(this.validateFeatureServiceVersions(u,r,n),this.sharedFeatureServices.set(r,u),this.logger.info(NMe(r,n))):this.logger.info(IMe(r,n))}bindFeatureService(t,r,n,i,{optional:a}){const u=i&&OMe()(i);if(!u){const W=PMe(a,t,r);if(a){this.logger.info(W);return}throw new Error(W)}const c=`^${u.version}`,E=this.sharedFeatureServices.get(t);if(!E){const W=MMe(a,t,r);if(a){this.logger.info(W);return}throw new Error(W)}const _=Object.keys(E),p=_.find(W=>Nj()(W,c)),L=p?E[p]:void 0;if(!L){const W=bMe(a,t,r,c,_);if(a){this.logger.info(W);return}throw new Error(W)}return L(r,n)}validateExternals(t){const{externalsValidator:r}=this.options;if(!r)return;const{dependencies:n}=t;n&&n.externals&&r.validate(n.externals)}validateFeatureServiceVersions(t,r,n){for(const i of Object.keys(t))if(!Lj()(i))throw new Error(CMe(r,n,i))}}function wj(e,t={}){const{featureServiceDefinitions:r,featureServiceDependencies:n,providedExternals:i,moduleLoader:a,logger:u,onBind:c}=t;let E;i&&(E=new vMe(i));const _=new KMe({externalsValidator:E,logger:u}),p={dependencies:{featureServices:n}};r&&_.registerFeatureServices(r,e);const L=new yMe(_,{externalsValidator:E,moduleLoader:a,logger:u,onBind:c}),{featureServices:W}=_.bindFeatureServices(p,e);return{featureAppManager:L,featureServiceRegistry:_,featureServices:W}}/**
|
|
8530
8530
|
* @license
|
|
8531
8531
|
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
8532
8532
|
* This code may only be used under the BSD style license found at
|
|
@@ -8538,7 +8538,7 @@ ${la}`,ere=`
|
|
|
8538
8538
|
* Code distributed by Google as part of the polymer project is also
|
|
8539
8539
|
* subject to an additional IP rights grant found at
|
|
8540
8540
|
* http://polymer.github.io/PATENTS.txt
|
|
8541
|
-
*/const Uj=typeof window<"u"&&window.customElements!=null&&window.customElements.polyfillWrapFlushCallback!==void 0,
|
|
8541
|
+
*/const Uj=typeof window<"u"&&window.customElements!=null&&window.customElements.polyfillWrapFlushCallback!==void 0,d6e=(e,t,r=null,n=null)=>{for(;t!==r;){const i=t.nextSibling;e.insertBefore(t,n),t=i}},dI=(e,t,r=null)=>{for(;t!==r;){const n=t.nextSibling;e.removeChild(t),t=n}};/**
|
|
8542
8542
|
* @license
|
|
8543
8543
|
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
8544
8544
|
* This code may only be used under the BSD style license found at
|
|
@@ -8610,7 +8610,7 @@ ${la}`,ere=`
|
|
|
8610
8610
|
* Code distributed by Google as part of the polymer project is also
|
|
8611
8611
|
* subject to an additional IP rights grant found at
|
|
8612
8612
|
* http://polymer.github.io/PATENTS.txt
|
|
8613
|
-
*/const Yj=window.trustedTypes&&trustedTypes.createPolicy("lit-html",{createHTML:e=>e}),zMe=` ${nu} `;class qj{constructor(t,r,n,i){this.strings=t,this.values=r,this.type=n,this.processor=i}getHTML(){const t=this.strings.length-1;let r="",n=!1;for(let i=0;i<t;i++){const a=this.strings[i],u=a.lastIndexOf("<!--");n=(u>-1||n)&&a.indexOf("-->",u+1)===-1;const c=pI.exec(a);c===null?r+=a+(n?zMe:xj):r+=a.substr(0,c.index)+c[1]+c[2]+Nh+c[3]+nu}return r+=this.strings[t],r}getTemplateElement(){const t=document.createElement("template");let r=this.getHTML();return Yj!==void 0&&(r=Yj.createHTML(r)),t.innerHTML=r,t}}class
|
|
8613
|
+
*/const Yj=window.trustedTypes&&trustedTypes.createPolicy("lit-html",{createHTML:e=>e}),zMe=` ${nu} `;class qj{constructor(t,r,n,i){this.strings=t,this.values=r,this.type=n,this.processor=i}getHTML(){const t=this.strings.length-1;let r="",n=!1;for(let i=0;i<t;i++){const a=this.strings[i],u=a.lastIndexOf("<!--");n=(u>-1||n)&&a.indexOf("-->",u+1)===-1;const c=pI.exec(a);c===null?r+=a+(n?zMe:xj):r+=a.substr(0,c.index)+c[1]+c[2]+Nh+c[3]+nu}return r+=this.strings[t],r}getTemplateElement(){const t=document.createElement("template");let r=this.getHTML();return Yj!==void 0&&(r=Yj.createHTML(r)),t.innerHTML=r,t}}class p6e extends null{getHTML(){return`<svg>${super.getHTML()}</svg>`}getTemplateElement(){const t=super.getTemplateElement(),r=t.content,n=r.firstChild;return r.removeChild(n),reparentNodes(r,n.firstChild),t}}/**
|
|
8614
8614
|
* @license
|
|
8615
8615
|
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
8616
8616
|
* This code may only be used under the BSD style license found at
|
|
@@ -8670,7 +8670,7 @@ ${la}`,ere=`
|
|
|
8670
8670
|
* Code distributed by Google as part of the polymer project is also
|
|
8671
8671
|
* subject to an additional IP rights grant found at
|
|
8672
8672
|
* http://polymer.github.io/PATENTS.txt
|
|
8673
|
-
*/typeof window<"u"&&(window.litHtmlVersions||(window.litHtmlVersions=[])).push("1.4.1");const x_=(e,...t)=>new qj(e,t,"html",aIe),
|
|
8673
|
+
*/typeof window<"u"&&(window.litHtmlVersions||(window.litHtmlVersions=[])).push("1.4.1");const x_=(e,...t)=>new qj(e,t,"html",aIe),h6e=(e,...t)=>new SVGTemplateResult(e,t,"svg",defaultTemplateProcessor);/**
|
|
8674
8674
|
* @license
|
|
8675
8675
|
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
8676
8676
|
* This code may only be used under the BSD style license found at
|
|
@@ -8706,7 +8706,7 @@ ${la}`,ere=`
|
|
|
8706
8706
|
* Code distributed by Google as part of the polymer project is also
|
|
8707
8707
|
* subject to an additional IP rights grant found at
|
|
8708
8708
|
* http://polymer.github.io/PATENTS.txt
|
|
8709
|
-
*/const fIe=(e,t)=>(window.customElements.define(e,t),t),_Ie=(e,t)=>{const{kind:r,elements:n}=t;return{kind:r,elements:n,finisher(i){window.customElements.define(e,i)}}},
|
|
8709
|
+
*/const fIe=(e,t)=>(window.customElements.define(e,t),t),_Ie=(e,t)=>{const{kind:r,elements:n}=t;return{kind:r,elements:n,finisher(i){window.customElements.define(e,i)}}},S6e=e=>t=>typeof t=="function"?fIe(e,t):_Ie(e,t),dIe=(e,t)=>t.kind==="method"&&t.descriptor&&!("value"in t.descriptor)?Object.assign(Object.assign({},t),{finisher(r){r.createProperty(t.key,e)}}):{kind:"field",key:Symbol(),placement:"own",descriptor:{},initializer(){typeof t.initializer=="function"&&(this[t.key]=t.initializer.call(this))},finisher(r){r.createProperty(t.key,e)}},pIe=(e,t,r)=>{t.constructor.createProperty(r,e)};function fo(e){return(t,r)=>r!==void 0?pIe(e,t,r):dIe(e,t)}function hIe(e){return fo({attribute:!1,hasChanged:e?.hasChanged})}const E6e=e=>hIe(e);function v6e(e,t){return(r,n)=>{const i={get(){return this.renderRoot.querySelector(e)},enumerable:!0,configurable:!0};if(t){const a=n!==void 0?n:r.key,u=typeof a=="symbol"?Symbol():`__${a}`;i.get=function(){return this[u]===void 0&&(this[u]=this.renderRoot.querySelector(e)),this[u]}}return n!==void 0?QT(i,r,n):zT(i,r)}}function m6e(e){return(t,r)=>{const n={async get(){return await this.updateComplete,this.renderRoot.querySelector(e)},enumerable:!0,configurable:!0};return r!==void 0?QT(n,t,r):zT(n,t)}}function T6e(e){return(t,r)=>{const n={get(){return this.renderRoot.querySelectorAll(e)},enumerable:!0,configurable:!0};return r!==void 0?QT(n,t,r):zT(n,t)}}const QT=(e,t,r)=>{Object.defineProperty(t,r,e)},zT=(e,t)=>({kind:"method",placement:"prototype",key:t.key,descriptor:e}),SIe=(e,t)=>Object.assign(Object.assign({},t),{finisher(r){Object.assign(r.prototype[t.key],e)}}),EIe=(e,t,r)=>{Object.assign(t[r],e)};function A6e(e){return(t,r)=>r!==void 0?EIe(e,t,r):SIe(e,t)}const eH=Element.prototype,vIe=eH.msMatchesSelector||eH.webkitMatchesSelector;function g6e(e="",t=!1,r=""){return(n,i)=>{const a={get(){const u=`slot${e?`[name=${e}]`:":not([name])"}`,c=this.renderRoot.querySelector(u);let E=c&&c.assignedNodes({flatten:t});return E&&r&&(E=E.filter(_=>_.nodeType===Node.ELEMENT_NODE&&(_.matches?_.matches(r):vIe.call(_,r)))),E},enumerable:!0,configurable:!0};return i!==void 0?QT(a,n,i):zT(a,n)}}/**
|
|
8710
8710
|
@license
|
|
8711
8711
|
Copyright (c) 2019 The Polymer Project Authors. All rights reserved.
|
|
8712
8712
|
This code may only be used under the BSD style license found at
|
|
@@ -8716,7 +8716,7 @@ found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
|
|
|
8716
8716
|
part of the polymer project is also subject to an additional IP rights grant
|
|
8717
8717
|
found at http://polymer.github.io/PATENTS.txt
|
|
8718
8718
|
*/const bI=window.ShadowRoot&&(window.ShadyCSS===void 0||window.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,CI=Symbol();class PI{constructor(t,r){if(r!==CI)throw new Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t}get styleSheet(){return this._styleSheet===void 0&&(bI?(this._styleSheet=new CSSStyleSheet,this._styleSheet.replaceSync(this.cssText)):this._styleSheet=null),this._styleSheet}toString(){return this.cssText}}const mIe=e=>new PI(String(e),CI),TIe=e=>{if(e instanceof PI)return e.cssText;if(typeof e=="number")return e;throw new Error(`Value passed to 'css' function must be a 'css' function result: ${e}. Use 'unsafeCSS' to pass non-literal values, but
|
|
8719
|
-
take care to ensure page security.`)},
|
|
8719
|
+
take care to ensure page security.`)},y6e=(e,...t)=>{const r=t.reduce((n,i,a)=>n+TIe(i)+e[a+1],e[0]);return new PI(r,CI)};/**
|
|
8720
8720
|
* @license
|
|
8721
8721
|
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
8722
8722
|
* This code may only be used under the BSD style license found at
|