@icanbwell/composite 1.1058.0 → 1.1058.1-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/20.index.js +1 -1
- package/20.index.js.map +1 -1
- package/237.index.js +19 -0
- package/237.index.js.map +1 -0
- package/279.index.js +1 -1
- package/279.index.js.map +1 -1
- package/index.js +6 -6
- package/index.js.map +1 -1
- package/native.js +1 -1
- package/package.json +1 -1
- package/897.index.js +0 -19
- package/897.index.js.map +0 -1
package/20.index.js
CHANGED
|
@@ -12896,7 +12896,7 @@ Take a look at the reducer(s) handling this action type: `+We.type+`.
|
|
|
12896
12896
|
}
|
|
12897
12897
|
}
|
|
12898
12898
|
}
|
|
12899
|
-
`));function SVe(e){const t=Object.assign(Object.assign({},Gs),e);return Apollo.useMutation(Ene,t)}const Fk={value:{system:"http://hl7.org/fhir/uv/smart-health-cards-and-links/StructureDefinition/ShlPayload",code:"smart-health-link"}};function gVe(e={}){return useDocumentReferencesQuery(Object.assign(Object.assign({},e),{variables:Object.assign(Object.assign({},e.variables),{category:Fk})}))}function mVe(e={}){return useDocumentReferencesLazyQuery(Object.assign(Object.assign({},e),{variables:Object.assign(Object.assign({},e.variables),{category:Fk})}))}const xk={value:{system:"https://www.icanbwell.com/fhir/CodeSystem/shl-event-type",code:"access"}};function vVe(e={}){return useCommunicationRequestsQuery(Object.assign(Object.assign({},e),{variables:Object.assign(Object.assign({},e.variables),{category:xk})}))}function EVe(e={}){return useCommunicationRequestsLazyQuery(Object.assign(Object.assign({},e),{variables:Object.assign(Object.assign({},e.variables),{category:xk})}))}const Vk={value:{system:"https://www.icanbwell.com/consent-category",code:"smartHealthLink"}};function yVe(e={}){return useConsentsForHealthLinksQuery(Object.assign(Object.assign({},e),{variables:Object.assign(Object.assign({},e.variables),{category:Vk})}))}function TVe(e={}){return useConsentsForHealthLinksLazyQuery(Object.assign(Object.assign({},e),{variables:Object.assign(Object.assign({},e.variables),{category:Vk})}))}const AVe=e=>useMutation(SendChatCompletionMutation,e);var kk=_(46),Oh,_E;class Bk{constructor(){this.type="backend",Oh.set(this,void 0),_E.set(this,void 0)}init(t,{clientSlug:n,apiClient:r}){if(!r)throw t.logger.error('"apiClient" not supplied to "QueryBackend".'),new Error('"apiClient" required for "QueryBackend".');dc(this,Oh,n,"f"),dc(this,_E,uG(r),"f")}read(t,n,r){return nE(this,void 0,void 0,function*(){try{const{translation:i}=yield vr(this,_E,"f").getClientTranslations({name:vr(this,Oh,"f"),key:n,lang:t});r(null,i?.json||{})}catch{const a=`Error fetching translation with key "${n}" and client "${vr(this,Oh,"f")||"N/A"}".`;r(a,null)}})}}Oh=new WeakMap,_E=new WeakMap,Bk.type="backend";var Cf;class jk{constructor(t){this.type="logger",Cf.set(this,void 0),dc(this,Cf,t,"f")}log([t,n,...r]){vr(this,Cf,"f").info({meta:n},t,...r)}warn([t,n,...r]){vr(this,Cf,"f").error({meta:n},t,...r)}error([t,n,...r]){vr(this,Cf,"f").error({meta:n},t,...r)}}Cf=new WeakMap,jk.type="logger";var pE,hE,Dl,Rh,ia,Nl;const qk="appLanguage";class so{constructor({keys:t,nativeBridge:n,fallbackKeys:r=[],defaultLanguage:i="en",logger:a,parent:c,debug:f=!1,remoteConfig:T={}}){Dl.set(this,void 0),Rh.set(this,void 0),ia.set(this,void 0),Nl.set(this,void 0),dc(this,Dl,t,"f"),dc(this,Rh,r,"f"),dc(this,Nl,n,"f");const h={lng:i,fallbackNS:vr(this,Rh,"f"),debug:f,defaultNS:t,returnNull:!1};c?dc(this,ia,c.cloneInstance(h),"f"):(dc(this,ia,Oa.createInstance(),"f"),a&&vr(this,ia,"f").use(new jk(a.child({library:"@icanbwell/i18n"}))),T.apiClient&&vr(this,ia,"f").use(Bk),vr(this,ia,"f").init(Object.assign(Object.assign({},h),{fallbackLng:!1,partialBundledLanguages:!0,ns:[],resources:{},backend:T,saveMissing:!0,missingKeyHandler:(m,G,H)=>vr(this,ia,"f").services.logger.error(`missing key: ${H}; language: ${m}; key: ${G}`)}))),this.t=vr(this,ia,"f").t,so.resolvedLanguage=vr(this,ia,"f").resolvedLanguage||i}load(){var t;return nE(this,void 0,void 0,function*(){const n=(yield(t=vr(this,Nl,"f"))===null||t===void 0?void 0:t.storage.getItem(qk))||so.resolvedLanguage;n!==so.resolvedLanguage&&(yield vr(this,ia,"f").changeLanguage(n),so.resolvedLanguage=n),yield vr(this,ia,"f").loadNamespaces(vr(this,Dl,"f"));const r=vr(this,Dl,"f").filter(i=>!vr(this,ia,"f").hasResourceBundle(n,i));if(r.length)throw new Error(`Error loading translations for key(s): ${r.join(", ")}`);return vr(so,pE,"f",hE).emit("changeLanguage",n),this})}child(t){return new so(Object.assign(Object.assign({},t),{nativeBridge:vr(this,Nl,"f"),fallbackKeys:[...vr(this,Rh,"f"),...vr(this,Dl,"f")],parent:vr(this,ia,"f"),defaultLanguage:vr(this,ia,"f").language}))}get isLoaded(){return vr(this,Dl,"f").every(t=>vr(this,ia,"f").hasResourceBundle(vr(this,ia,"f").language,t))}changeLanguage(t){var n,r;return nE(this,void 0,void 0,function*(){so.resolvedLanguage=t,yield vr(this,ia,"f").changeLanguage(t),vr(so,pE,"f",hE).emit("changeLanguage",t),yield(n=vr(this,Nl,"f"))===null||n===void 0?void 0:n.storage.setItem(qk,t),(r=vr(this,Nl,"f"))===null||r===void 0||r.reloadView(!0)})}get resolvedLanguage(){return so.resolvedLanguage}onChangeLanguage(t){vr(so,pE,"f",hE).on("changeLanguage",t)}}pE=so,Dl=new WeakMap,Rh=new WeakMap,ia=new WeakMap,Nl=new WeakMap,hE={value:new kk},so.resolvedLanguage="en";var QP=_(1677),Ph;(function(e){e.one="1.0.0"})(Ph||(Ph={}));const SE="orchestrator:native-bridge",yne={id:SE,dependencies:{featureServices:{}},create:()=>({[Ph.one]:()=>({featureService:QP.b})})};var Mh;(function(e){e.one="1.0.0"})(Mh||(Mh={}));const gE="orchestrator:translation-service",Tne={id:gE,dependencies:{featureServices:{[Pi]:Wa.one,[Ds]:oc.one,[yi]:Ua.one,[dh]:pf.one,[SE]:Ph.one}},create:({featureServices:e})=>{const t=e[Pi],n=e[Ds],r=e[dh],{slug:i}=e[yi].getClientContext(),a=e[SE],c=new so({keys:[],nativeBridge:a,defaultLanguage:"en",logger:n,remoteConfig:{clientSlug:i,apiClient:t}});return r.setProfileProperties({language:c.resolvedLanguage}),c.onChangeLanguage(f=>r.setProfileProperties({language:f})),{[Mh.one]:()=>({featureService:c})}}};var bf,Of,mE,Fs,vE,EE;const yE="tokens",HP="delegationContext";class Ane{constructor({apiClient:t,stateService:n,identityGatewaySdk:r,storage:i,logger:a}){bf.set(this,void 0),Of.set(this,void 0),mE.set(this,void 0),Fs.set(this,void 0),vE.set(this,void 0),EE.set(this,[]),(0,R.__classPrivateFieldSet)(this,bf,t,"f"),(0,R.__classPrivateFieldSet)(this,Of,n,"f"),(0,R.__classPrivateFieldSet)(this,mE,r,"f"),(0,R.__classPrivateFieldSet)(this,Fs,i,"f"),(0,R.__classPrivateFieldSet)(this,vE,a,"f")}registerPreLogoutHandler(t){(0,R.__classPrivateFieldGet)(this,EE,"f").push(t)}getStoredTokens(){const t=(0,R.__classPrivateFieldGet)(this,Fs,"f").getItem(yE);return t?JSON.parse(t):void 0}removeStoredTokens(){(0,R.__classPrivateFieldGet)(this,Fs,"f").removeItem(yE),this.clearDelegationContext()}storeTokens(t){const n=Object.assign(Object.assign({},t),{idToken:Object.assign(Object.assign({},t.idToken),{payload:(0,Ai.normalizeTokenPayload)(t.idToken.payload)})});return(0,R.__classPrivateFieldGet)(this,Fs,"f").setItem(yE,JSON.stringify(n)),n}storeDelegationContext(t){(0,R.__classPrivateFieldGet)(this,Fs,"f").setItem(HP,JSON.stringify(t))}getDelegationContext(){var t,n;const r=(0,R.__classPrivateFieldGet)(this,Fs,"f").getItem(HP);if(!r)return null;try{const i=JSON.parse(r);return!i?.consentId||!(!((n=(t=i?.delegateTokens)===null||t===void 0?void 0:t.accessToken)===null||n===void 0)&&n.jwtToken)?null:i}catch{return null}}clearDelegationContext(){(0,R.__classPrivateFieldGet)(this,Fs,"f").removeItem(HP)}logout(){var t;return(0,R.__awaiter)(this,void 0,void 0,function*(){for(const a of(0,R.__classPrivateFieldGet)(this,EE,"f"))try{yield a()}catch(c){(t=(0,R.__classPrivateFieldGet)(this,vE,"f"))===null||t===void 0||t.error(c instanceof Error?c:new Error(String(c)),"Pre-logout handler failed")}const n=(0,R.__classPrivateFieldGet)(this,Of,"f").getUserTokenData().accessToken.jwtToken,{key:r,variant:i}=(0,R.__classPrivateFieldGet)(this,Of,"f").getClientContext();i!==ne.GUEST&&(yield(0,R.__classPrivateFieldGet)(this,mE,"f").logout({accessToken:n},{context:{headers:{clientKey:r}}})),(0,R.__classPrivateFieldGet)(this,bf,"f").stop(),(0,R.__classPrivateFieldGet)(this,bf,"f").clearAuth(),yield(0,R.__classPrivateFieldGet)(this,bf,"f").clearStore(),(0,R.__classPrivateFieldGet)(this,Of,"f").logoutUser(),(0,R.__classPrivateFieldGet)(this,Fs,"f").removeItem(yE),this.clearDelegationContext()})}}bf=new WeakMap,Of=new WeakMap,mE=new WeakMap,Fs=new WeakMap,vE=new WeakMap,EE=new WeakMap;var Ih;(function(e){e.one="1.0.0"})(Ih||(Ih={}));const TE="orchestrator:identity-utils",Cne={id:TE,dependencies:{featureServices:{[Pi]:Wa.one,[Ds]:oc.one,[yi]:Ua.one,[dh]:pf.one}},create:({featureServices:e})=>{const t=e[Pi];return{[Ih.one]:()=>({featureService:new Ane({apiClient:t,stateService:e[yi],identityGatewaySdk:EF(t),storage:window.sessionStorage,logger:e[Ds]})})}}};var AE;(function(e){e.one="1.0.0"})(AE||(AE={}));const Qk="orchestrator:globaleventemitter-service",bne=e=>({id:Qk,create:()=>({[AE.one]:()=>({featureService:e})})});var CE;(function(e){e.one="1.0.0"})(CE||(CE={}));const Hk="orchestrator:reboot-controller",One=e=>({id:Hk,create:()=>({[CE.one]:()=>({featureService:e})})}),bE="orchestrator:bwell-sdk";var Dh;(function(e){e.one="1.0.0"})(Dh||(Dh={}));const Rne=e=>({id:bE,dependencies:{featureServices:{[yi]:Ua.one,[gE]:Mh.one,[Ds]:oc.one}},create:({featureServices:t})=>{const n=t[yi],r=t[gE],i=t[Ds],a=e;let c=!1,f=!1;const T=me=>{if(typeof me=="string")return me;if(me&&typeof me=="object"&&"message"in me){const ve=me.message;return typeof ve=="string"?ve:String(ve)}return String(me)},h=me=>/uninitialized|not been initialized/i.test(T(me)),m=me=>{try{a.language.setLanguage(me)}catch(ve){if(h(ve)){f||(f=!0,i.info({},"embeddable-core: Deferring language switch until SDK initialization completes"));return}i.info({error:T(ve)},"embeddable-core: Non-fatal language switch issue in SDK")}},G=me=>{try{const ve=a.language.getLanguage();me!==ve&&m(me)}catch(ve){if(h(ve))return;i.info({error:T(ve)},"embeddable-core: Non-fatal language read issue in SDK")}},H=()=>{var me;!(!((me=n.getUser().tokenData)===null||me===void 0)&&me.idToken)||(m(r.resolvedLanguage),c||(c=!0,r.onChangeLanguage(G)))};return n.getStore().subscribe(H),{[Dh.one]:()=>({featureService:a})}}});class _a extends Error{constructor(t,n){super(t),this.name="BWellError",n?.cause&&(this.cause=n.cause)}static isBwellError(t){return t instanceof _a}}class CVe extends _a{constructor(t="Authentication Error"){super(t),this.name="AuthenticationError"}}class bVe extends _a{constructor(t="Illegal Argument Error"){super(t),this.name="IllegalArgumentError"}}class OVe extends _a{constructor(t="Illegal State Error"){super(t),this.name="IllegalStateError"}}class Pne extends _a{constructor(t="Invalid Client Key Error"){super(t),this.name="InvalidClientKeyError"}}class YP extends _a{constructor(t,n){super(t),this.credentials=n,this.name="InvalidCredentialsTypeError"}}class Rf extends _a{constructor(t="Invalid Token Error"){super(t),this.name="InvalidTokenError"}}class Mne extends _a{constructor(t,n){super(t),this.status=n,this.name="NetworkError"}}class Ine extends _a{constructor(t){super(t.message()),this.operationOutcome=t,this.name="OperationOutcomeError"}}class zP extends _a{constructor(t,n){super(t),this.data=n,this.name="UnknownError"}}class Dne extends _a{constructor(t){super(t.join(". ")),this.errors=t,this.name="ValidationError"}}class en{constructor(t,n){this.data=t,n!==null&&(this.error=n)}hasError(){return this.error!==void 0}static error(t){return new en(void 0,t)}}var Yk=function(e,t,n,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="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 r==="a"?i.call(e,n):i?i.value=n:t.set(e,n),n},OE=function(e,t,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(e):r?r.value:t.get(e)},Nh,Lh;class nn{static success(t){return new Nne(t)}static failure(t){return new RE(t)}}class Nne extends nn{constructor(t){super(),Nh.set(this,void 0),Yk(this,Nh,t,"f")}data(){return OE(this,Nh,"f")}error(){throw OE(this,Nh,"f")}success(){return!0}failure(){return!1}toQueryResult(){return new en(this.data())}}Nh=new WeakMap;class RE extends nn{constructor(t){super(),Lh.set(this,void 0),Yk(this,Lh,t,"f")}data(){throw OE(this,Lh,"f")}error(){return OE(this,Lh,"f")}success(){return!1}failure(){return!0}intoFailure(){return nn.failure(this.error())}toQueryResult(){return new en(void 0,this.error())}}Lh=new WeakMap;var WP=function(e,t,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(e):r?r.value:t.get(e)},wh;class zk{constructor(){wh.set(this,[])}add(t){WP(this,wh,"f").push(t)}errors(){return WP(this,wh,"f")}hasErrors(){return WP(this,wh,"f").length>0}}wh=new WeakMap;var Wk=function(e,t,n,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="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 r==="a"?i.call(e,n):i?i.value=n:t.set(e,n),n},KP=function(e,t,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(e):r?r.value:t.get(e)},Uh,PE;class Lne{constructor(t){Uh.set(this,void 0),PE.set(this,void 0),Wk(this,PE,t,"f"),Wk(this,Uh,this.transformInput(t),"f")}validate(){return nn.success(null)}data(){return KP(this,Uh,"f")}toJSON(){return KP(this,Uh,"f")}transformInput(t){return t}input(){return KP(this,PE,"f")}}Uh=new WeakMap,PE=new WeakMap;class Ur extends Lne{validate(){const t=new zk;return this.validator.validate(this.input(),t),t.hasErrors()?nn.failure(new Dne(t.errors())):nn.success(null)}}var Kk=function(e,t,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(e):r?r.value:t.get(e)},ME,Xk,Jk;const Zk=100,XP=20;class Yi{constructor(){ME.add(this)}validate(t,n){Kk(this,ME,"m",Xk).call(this,t.page,n),Kk(this,ME,"m",Jk).call(this,t.pageSize,n)}}ME=new WeakSet,Xk=function(t,n){t<0&&n.add("page must be a positive number")},Jk=function(t,n){t!==void 0&&(t<=0&&n.add("Page size must be greater than 0"),t>Zk&&n.add(`Page size must not exceed ${Zk}`))};class zi extends Ur{constructor(){super(...arguments),this.validator=new Yi}transformInput(t){return Object.assign({pageSize:XP},t)}}function JP(){return new Date().toISOString()}function wne(){var e;return!(typeof process>"u"||((e=process.versions)===null||e===void 0?void 0:e.node)===void 0)}function Une(){return typeof window<"u"}function eB(){if(Une())return"browser";if(wne())return"node";throw new Error("Invalid runtime")}function $ne(e){switch(eB()){case"browser":return e.browser();case"node":return e.node()}}function tB(e){switch(eB()){case"node":return Buffer.from(e,"base64").toString("utf-8");case"browser":return atob(e)}}function Hn(e){return e!=null}function Va(e){return e==null}function RVe(e){return Hn(e)&&e!==""}function pa(e){return e==null||e===""}function uo(e){return e===void 0}function Sr(e){return e!==void 0}function Gne(e){return JSON.parse(tB(e)).env}const Fne=3;function nB(e){const t=e.split("."),n=t[1];if(n===void 0||t.length!==Fne)throw new Rf("Token is missing data and may be corrupted");try{return JSON.parse(tB(n))}catch(r){const i=r;throw new Rf(`Unable to parse token payload: ${i.name} - ${i.message}`)}}function xne(e){const n=nB(e).exp;if(typeof n!="number")throw new Rf("The access token is missing an expiration date and is most likely corrupted.");return n*1e3}const Vne="custom:clientFhirPersonId",kne="custom:bwellFhirPatientId";function Bne(e){const t=nB(e),n=t[kne],r=t[Vne];return Hn(n)&&Hn(r)?{bwellFhirPersonId:n,clientFhirPersonId:r}:null}function Ra(e){return e.trim()===""}const jne="1.77.0";function qne(){return jne}var ZP;(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"})(ZP||(ZP={}));var rB;(function(e){e.Guest="GUEST"})(rB||(rB={}));var IE;(function(e){e.CmsNetworkShareMyRecords="CMS_NETWORK_SHARE_MY_RECORDS",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"})(IE||(IE={}));var iB;(function(e){e.Complete="COMPLETE",e.Error="ERROR",e.Partial="PARTIAL",e.Queued="QUEUED"})(iB||(iB={}));var aB;(function(e){e.Institutional="INSTITUTIONAL",e.Oral="ORAL",e.Pharmacy="PHARMACY",e.Professional="PROFESSIONAL",e.Vision="VISION"})(aB||(aB={}));var oB;(function(e){e.Bwell="bwell"})(oB||(oB={}));var sB;(function(e){e.Bwell="BWELL"})(sB||(sB={}));var uB;(function(e){e.Basic="BASIC",e.Identity="IDENTITY",e.Oauth="OAUTH"})(uB||(uB={}));var eM;(function(e){e.Deny="DENY",e.Permit="PERMIT"})(eM||(eM={}));var tM;(function(e){e.Active="ACTIVE",e.Draft="DRAFT",e.EnteredInError="ENTERED_IN_ERROR",e.Inactive="INACTIVE",e.Proposed="PROPOSED",e.Rejected="REJECTED"})(tM||(tM={}));var cB;(function(e){e.Medical="MEDICAL",e.Pharmacy="PHARMACY"})(cB||(cB={}));var lB;(function(e){e.Usd="USD"})(lB||(lB={}));var dB;(function(e){e.Accepted="ACCEPTED",e.Rejected="REJECTED"})(dB||(dB={}));var fB;(function(e){e.AccessEnded="ACCESS_ENDED",e.Connected="CONNECTED",e.Deleted="DELETED",e.Disconnected="DISCONNECTED",e.Error="ERROR",e.Expired="EXPIRED"})(fB||(fB={}));var _B;(function(e){e.Clinical="CLINICAL",e.Device="DEVICE",e.Insurance="INSURANCE",e.Lab="LAB",e.Pharmacy="PHARMACY",e.Practitioner="PRACTITIONER"})(_B||(_B={}));var DE;(function(e){e.Connecthub="connecthub",e.Nppes="nppes"})(DE||(DE={}));var pB;(function(e){e.Connecthub="CONNECTHUB",e.Nppes="NPPES"})(pB||(pB={}));var hB;(function(e){e.Fri="FRI",e.Mon="MON",e.Sat="SAT",e.Sun="SUN",e.Thu="THU",e.Tue="TUE",e.Wed="WED"})(hB||(hB={}));var SB;(function(e){e.Deleted="DELETED"})(SB||(SB={}));var gB;(function(e){e.Kilometers="KILOMETERS",e.Meters="METERS",e.Miles="MILES"})(gB||(gB={}));var mB;(function(e){e.BwellPatient="BWELL_PATIENT",e.BwellPerson="BWELL_PERSON",e.ClientPatient="CLIENT_PATIENT",e.ClientPerson="CLIENT_PERSON"})(mB||(mB={}));var vB;(function(e){e.Active="active",e.EnteredInError="entered_in_error",e.Error="error",e.Off="off",e.Suspended="suspended",e.Test="test"})(vB||(vB={}));var EB;(function(e){e.Active="ACTIVE",e.EnteredInError="ENTERED_IN_ERROR",e.Error="ERROR",e.Off="OFF",e.Suspended="SUSPENDED",e.Test="TEST"})(EB||(EB={}));var nM;(function(e){e.CustomEvent="CUSTOM_EVENT",e.MobilePushOpen="MOBILE_PUSH_OPEN"})(nM||(nM={}));var rM;(function(e){e.Female="female",e.Male="male",e.Other="other",e.Unknown="unknown"})(rM||(rM={}));var iM;(function(e){e.Person="Person"})(iM||(iM={}));var aM;(function(e){e.Characteristic="characteristic",e.Communication="communication",e.Gender="gender",e.Specialty="specialty"})(aM||(aM={}));var yB;(function(e){e.Characteristic="CHARACTERISTIC",e.Communication="COMMUNICATION",e.Gender="GENDER",e.InsurancePlan="INSURANCE_PLAN",e.Specialty="SPECIALTY"})(yB||(yB={}));var TB;(function(e){e.Female="female",e.Male="male",e.Other="other",e.Unknown="unknown"})(TB||(TB={}));var AB;(function(e){e.Female="FEMALE",e.Male="MALE",e.Other="OTHER",e.Unknown="UNKNOWN"})(AB||(AB={}));var CB;(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"})(CB||(CB={}));var bB;(function(e){e.Official="_official",e.Old="_old",e.Secondary="_secondary",e.Temp="_temp",e.Usual="_usual"})(bB||(bB={}));var OB;(function(e){e.Cognito="COGNITO",e.Descope="DESCOPE"})(OB||(OB={}));var RB;(function(e){e.Direct="DIRECT",e.DirectIas="DIRECT_IAS",e.Ial2="IAL2",e.IndirectIas="INDIRECT_IAS",e.Proa="PROA"})(RB||(RB={}));var PB;(function(e){e.Clicked="clicked"})(PB||(PB={}));var MB;(function(e){e.Clicked="CLICKED"})(MB||(MB={}));var oM;(function(e){e.Debug="DEBUG",e.Error="ERROR",e.Info="INFO",e.Verbose="VERBOSE",e.Warn="WARN"})(oM||(oM={}));var sM;(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"})(sM||(sM={}));var IB;(function(e){e.CancelDelete="CANCEL_DELETE",e.ConfirmDelete="CONFIRM_DELETE",e.DeletionInProgress="DELETION_IN_PROGRESS",e.ImmediateExecution="IMMEDIATE_EXECUTION",e.RequestDelete="REQUEST_DELETE"})(IB||(IB={}));var uM;(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"})(uM||(uM={}));var DB;(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"})(DB||(DB={}));var NB;(function(e){e.Add="add",e.Copy="copy",e.Move="move",e.Remove="remove",e.Replace="replace",e.Test="test"})(NB||(NB={}));var LB;(function(e){e.ExistingPatients="EXISTING_PATIENTS",e.NewPatients="NEW_PATIENTS"})(LB||(LB={}));var wB;(function(e){e.Patient="Patient",e.Person="Person"})(wB||(wB={}));var UB;(function(e){e.Practice="practice",e.Practitioner="practitioner"})(UB||(UB={}));var $B;(function(e){e.Practice="PRACTICE",e.Practitioner="PRACTITIONER"})($B||($B={}));var GB;(function(e){e.QuestionnaireResponse="QuestionnaireResponse"})(GB||(GB={}));var FB;(function(e){e.Closed="CLOSED",e.Hold="HOLD",e.New="NEW",e.Open="OPEN",e.Pending="PENDING",e.Solved="SOLVED"})(FB||(FB={}));var xB;(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"})(xB||(xB={}));var VB;(function(e){e.DataConnections="DATA_CONNECTIONS",e.FindCare="FIND_CARE"})(VB||(VB={}));var kB;(function(e){e.Insurance="INSURANCE",e.Laboratory="LABORATORY",e.Pharmacy="PHARMACY",e.Practice="PRACTICE",e.Practitioner="PRACTITIONER"})(kB||(kB={}));var BB;(function(e){e.Abortion="ABORTION",e.AbuseNeglect="ABUSE_NEGLECT",e.DomesticViolence="DOMESTIC_VIOLENCE",e.GenderAffirming="GENDER_AFFIRMING",e.GeneticTesting="GENETIC_TESTING",e.HivAids="HIV_AIDS",e.Mammography="MAMMOGRAPHY",e.MentalHealth="MENTAL_HEALTH",e.ReproductiveHealthcare="REPRODUCTIVE_HEALTHCARE",e.SexualAssault="SEXUAL_ASSAULT",e.Std="STD",e.SubstanceAbuse="SUBSTANCE_ABUSE",e.SubstanceAlcohol="SUBSTANCE_ALCOHOL"})(BB||(BB={}));var jB;(function(e){e.UpdatedAt="UPDATED_AT"})(jB||(jB={}));var cM;(function(e){e.Content="content",e.Distance="distance",e.Relevance="relevance"})(cM||(cM={}));var qB;(function(e){e.Content="CONTENT",e.DataSourceRank="DATA_SOURCE_RANK",e.Distance="DISTANCE",e.Name="NAME",e.NextAvailable="NEXT_AVAILABLE",e.OnlineBookingAvailable="ONLINE_BOOKING_AVAILABLE",e.Relevance="RELEVANCE"})(qB||(qB={}));var NE;(function(e){e.Asc="asc",e.Desc="desc"})(NE||(NE={}));var QB;(function(e){e.Asc="ASC",e.Desc="DESC"})(QB||(QB={}));var HB;(function(e){e.CareSearch="CARE_SEARCH",e.Proa="PROA",e.ProviderDetails="PROVIDER_DETAILS",e.Sayt="SAYT",e.Unspecified="UNSPECIFIED"})(HB||(HB={}));var YB;(function(e){e.DataDeleted="DATA_DELETED",e.Deleting="DELETING",e.Error="ERROR",e.Pending="PENDING",e.Retrieved="RETRIEVED",e.Retrieving="RETRIEVING"})(YB||(YB={}));var lM;(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"})(lM||(lM={}));var LE;(function(e){e.Accurate="accurate",e.Estimate="estimate"})(LE||(LE={}));var zB;(function(e){e.Active="ACTIVE",e.Completed="COMPLETED"})(zB||(zB={}));var WB;(function(e){e.PersonMatchError="PERSON_MATCH_ERROR",e.ServerError="SERVER_ERROR"})(WB||(WB={}));const Qne=new Set(Object.values(rM));function KB(e){return Qne.has(e)}const Hne=new Set(Object.values(tM));function Yne(e){return Hne.has(e)}const zne=new Set(Object.values(IE));function XB(e){return zne.has(e)}const Wne=new Set(Object.values(eM));function Kne(e){return Wne.has(e)}class Xne{validate(t,n){!uo(t.gender)&&!KB(t.gender)&&n.add(`Invalid gender value: "${t.gender}"`)}}class PVe extends Ur{constructor(){super(...arguments),this.validator=new Xne}}class Jne{validate(t,n){XB(t.category)||n.add(`Invalid consent category code: "${t.category}"`)}}class MVe extends Ur{constructor(){super(...arguments),this.validator=new Jne}}class Zne{validate(t,n){Yne(t.status)||n.add(`Invalid consent status: "${t.status}"`),Kne(t.provision)||n.add(`Invalid consent provision type: "${t.provision}"`),XB(t.category)||n.add(`Invalid consent category code: "${t.category}"`),!uo(t.organizationId)&&Ra(t.organizationId)&&n.add("organizationId cannot be empty"),t.category===IE.ProaAttestation&&uo(t.organizationId)&&n.add("organizationId must be provided when category is PROA_ATTESTATION")}}class IVe extends Ur{constructor(){super(...arguments),this.validator=new Zne}}class ere{validate(t,n){pa(t.exportId)&&n.add("exportId is required"),pa(t.password)&&n.add("password is required")}}class DVe extends Ur{constructor(){super(...arguments),this.validator=new ere}}class NVe extends null{}var Ao=function(e,t,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(e):r?r.value:t.get(e)},ka,_c,JB,ZB,ej,tj,nj,rj;class Ll{constructor(){ka.add(this)}validate(t,n){if(!t.values||t.values.length===0){n.add("At least one SearchDateValue must be set to instantiate a SearchDate");return}for(const r of t.values)Ao(this,ka,"m",JB).call(this,r,n)}}ka=new WeakSet,_c=function(t,n){t&&t!==null&&isNaN(t.getTime())&&n.add("The date is not valid")},JB=function(t,n){const{equals:r,notEquals:i,greaterThan:a,greaterThanOrEqualTo:c,lessThan:f,lessThanOrEqualTo:T,approximately:h}=t,G=[r,i,a,c,f,T,h].filter(H=>H!=null).length;if(G===0){n.add("At least one SearchDateValue must be set to instantiate a SearchDate");return}Ao(this,ka,"m",ZB).call(this,t,G,n),Ao(this,ka,"m",nj).call(this,t,n),Ao(this,ka,"m",rj).call(this,t,n)},ZB=function(t,n,r){const{equals:i,notEquals:a,approximately:c}=t;if(i&&n>1){r.add("The equals value cannot be set with any other values");return}if(a&&n>1){r.add("The notEquals value cannot be set with any other values");return}if(c&&n>1){r.add("The approximately value cannot be set with any other values");return}Ao(this,ka,"m",ej).call(this,t,r),Ao(this,ka,"m",tj).call(this,t,r)},ej=function(t,n){t.greaterThan&&t.greaterThanOrEqualTo&&n.add("The greaterThan/greaterThanOrEqualTo value cannot be set with both values")},tj=function(t,n){t.lessThan&&t.lessThanOrEqualTo&&n.add("The lessThan/lessThanOrEqualTo value cannot be set with both values")},nj=function(t,n){const{equals:r,notEquals:i,greaterThan:a,greaterThanOrEqualTo:c,lessThan:f,lessThanOrEqualTo:T,approximately:h}=t;r&&Ao(this,ka,"m",_c).call(this,r,n),i&&Ao(this,ka,"m",_c).call(this,i,n),a&&Ao(this,ka,"m",_c).call(this,a,n),c&&Ao(this,ka,"m",_c).call(this,c,n),f&&Ao(this,ka,"m",_c).call(this,f,n),T&&Ao(this,ka,"m",_c).call(this,T,n),h&&Ao(this,ka,"m",_c).call(this,h,n)},rj=function(t,n){const{greaterThan:r,greaterThanOrEqualTo:i,lessThan:a,lessThanOrEqualTo:c}=t;r&&c&&r>=c&&n.add("The greaterThan value must be less than the lessThanOrEqualTo value"),i&&a&&i>=a&&n.add("The greaterThanOrEqualTo value must be less than the lessThan value"),r&&a&&r>=a&&n.add("The greaterThan value must be less than the lessThan value"),i&&c&&i>=c&&n.add("The greaterThanOrEqualTo value must be less than the lessThanOrEqualTo value")};var dM=function(e,t,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(e):r?r.value:t.get(e)},$h;class wl{constructor(){$h.set(this,new tre)}validate(t,n){var r;if(t.value===void 0&&t.values===void 0&&t.notEquals===void 0){n.add("Either SearchToken value or values or notEquals must be provided");return}if(t.value!==void 0&&dM(this,$h,"f").validate(t.value,n),t.values!==void 0&&t.values.length===0){n.add("At least one Coding must be set to instantiate a SearchToken");return}for(const i of(r=t.values)!==null&&r!==void 0?r:[])dM(this,$h,"f").validate(i,n);if(t.notEquals!==void 0){if(t.notEquals.values!==void 0){if(t.notEquals.values.length===0){n.add("If notEquals values are provided, at least one Coding must be set");return}for(const i of t.notEquals.values)dM(this,$h,"f").validate(i,n)}t.notEquals.code===void 0&&t.notEquals.value===void 0&&t.notEquals.system===void 0&&t.notEquals.values===void 0&&n.add("NotEquals must have at least one non-null property (code, value, system, or values)")}}}$h=new WeakMap;class tre{validate(t,n){!t.system&&!t.code&&n.add("Each Coding in the list must have at least one non-null and non-empty value for system or code")}}var Pf=function(e,t,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(e):r?r.value:t.get(e)},fM,_M,pM,hM,SM,gM;class ij extends Yi{constructor(){super(...arguments),fM.set(this,new wl),_M.set(this,new Ll)}validate(t,n){super.validate(t,n),t.groupCode&&Pf(this,fM,"f").validate(t.groupCode,n),t.lastUpdated&&Pf(this,_M,"f").validate(t.lastUpdated,n)}}fM=new WeakMap,_M=new WeakMap;class nre{validate(t,n){t.length===0&&n.add("Prescription array must not be empty.")}}class aj extends Yi{constructor(){super(...arguments),pM.set(this,new nre),hM.set(this,new Ll)}validate(t,n){super.validate(t,n),t.lastUpdated!==void 0&&Pf(this,hM,"f").validate(t.lastUpdated,n),t.prescription!==void 0&&Pf(this,pM,"f").validate(t.prescription,n)}}pM=new WeakMap,hM=new WeakMap;class rre extends Yi{validate(t,n){var r;super.validate(t,n),!((r=t?.ids)===null||r===void 0)&&r.length||n.add("ids must not be empty")}}class ire extends zi{constructor(){super(...arguments),this.validator=new ij}}class LVe extends null{}class wVe extends null{}class UVe extends null{}class $Ve extends null{}class GVe extends null{}class FVe extends null{}class xVe extends null{}class VVe extends null{}class kVe extends null{}class BVe extends null{}class jVe extends null{}class qVe extends null{}class QVe extends null{}class HVe extends null{}class YVe extends null{}class zVe extends null{}class WVe extends null{}class KVe extends null{}class XVe extends null{}class JVe extends null{}class are extends aj{constructor(){super(...arguments),SM.set(this,new wl)}validate(t,n){super.validate(t,n),t.medicationCode!==void 0&&Pf(this,SM,"f").validate(t.medicationCode,n)}}SM=new WeakMap;class ZVe extends zi{constructor(){super(...arguments),this.validator=new aj}}class e1e extends zi{constructor(){super(...arguments),this.validator=new are}}class ore extends ij{constructor(){super(...arguments),gM.set(this,new wl)}validate(t,n){super.validate(t,n),t.medicationCode!==void 0&&Pf(this,gM,"f").validate(t.medicationCode,n)}}gM=new WeakMap;class t1e extends ire{constructor(){super(...arguments),this.validator=new ore}}class n1e extends null{}class r1e extends null{}class i1e extends zi{constructor(){super(...arguments),this.validator=new rre}}class sre{validate(t,n){Ra(t.medicationStatementId)&&n.add("The medication pricing request must possess a medication statement id.")}}class a1e extends Ur{constructor(){super(...arguments),this.validator=new sre}}class ure extends Yi{validate(t,n){Ra(t.medicationStatementId)&&n.add("The medication knowledge request must possess a medication statement id."),super.validate(t,n)}}class o1e extends zi{constructor(){super(...arguments),this.validator=new ure}}class cre extends Yi{validate(t,n){Ra(t.labId)&&n.add("The lab knowledge request must contain a lab id."),super.validate(t,n)}}class s1e extends zi{constructor(){super(...arguments),this.validator=new cre}}var oj;(function(e){e.Active="ACTIVE",e.Completed="COMPLETED"})(oj||(oj={}));class lre{validate(t,n){Va(t)&&n.add("input must be provided."),pa(t.id)&&n.add("id must be a non-empty string."),Va(t.status)&&n.add("status is required.")}}class u1e extends Ur{constructor(){super(...arguments),this.validator=new lre}}const dre=new Set(Object.values(lM));function sj(e){return dre.has(e)}var fre=function(e,t,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(e):r?r.value:t.get(e)},mM,uj;class _re extends Yi{constructor(){super(...arguments),mM.add(this)}validate(t,n){if(super.validate(t,n),!uo(t.status)){const r=Array.isArray(t.status)?t.status:[t.status];for(const i of r)fre(this,mM,"m",uj).call(this,i,n)}}}mM=new WeakSet,uj=function(t,n){sj(t)||n.add(`Invalid task status: "${t}"`)};class c1e extends zi{constructor(){super(...arguments),this.validator=new _re}}class pre{validate(t,n){sj(t.newStatus)||n.add(`Invalid task status: "${t.newStatus}"`)}}class l1e extends Ur{constructor(){super(...arguments),this.validator=new pre}}var wE=function(e,t,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(e):r?r.value:t.get(e)},Mf,cj,lj,dj,fj;class d1e extends zi{constructor(){super(...arguments),this.validator=new hre}}class hre extends Yi{constructor(){super(...arguments),Mf.add(this)}validate(t,n){super.validate(t,n),Sr(t.organizationTypeFilters)&&wE(this,Mf,"m",cj).call(this,t.organizationTypeFilters,n),Sr(t.sortBy)&&wE(this,Mf,"m",lj).call(this,t.sortBy,n),Sr(t.filterFields)&&wE(this,Mf,"m",dj).call(this,t.filterFields,n),Sr(t.gender)&&wE(this,Mf,"m",fj).call(this,t.gender,n)}}Mf=new WeakSet,cj=function(t,n){for(const r of t)gre(r)||n.add(`Invalid organizationTypeFilters value: "${r}"`)},lj=function(t,n){Sr(t.field)&&!vre(t.field)&&n.add(`Invalid sortBy.field value: "${t.field}"`),Sr(t.order)&&!yre(t.order)&&n.add(`Invalid sortBy.order value: "${t.order}"`)},dj=function(t,n){for(const r of t)Are(r)||n.add(`Invalid filterField value: "${r}"`)},fj=function(t,n){KB(t)||n.add(`Invalid gender value: "${t}"`)};const Sre=new Set(Object.values(uM));function gre(e){return Sre.has(e)}const mre=new Set(Object.values(cM));function vre(e){return mre.has(e)}const Ere=new Set(Object.values(NE));function yre(e){return Ere.has(e)}const Tre=new Set(Object.values(aM));function Are(e){return Tre.has(e)}class f1e extends null{}class _1e extends zi{constructor(){super(...arguments),this.validator=new Cre}}class Cre extends Yi{validate(t,n){super.validate(t,n)}}const bre="data-connection-status";var Ore=function(e,t,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(e):r?r.value:t.get(e)},vM;const Rre="connectionId cannot be null or empty",Pre="username cannot be null or empty",Mre="password cannot be null or empty",Ire="integrationType array cannot be empty",Dre="integrationType array cannot contain blank or empty strings";class _j{validate(t,n){t.connectionId===""&&n.add(Rre)}}class Nre{constructor(){vM.set(this,new _j)}validate(t,n){Ore(this,vM,"f").validate(t,n),t.username===""&&n.add(Pre),t.password===""&&n.add(Mre)}}vM=new WeakMap;class Lre extends Ur{constructor(){super(...arguments),this.validator=new _j}}class p1e extends null{}class h1e extends Lre{constructor(){super(...arguments),this.validator=new Nre}}class S1e extends Ur{constructor(){super(...arguments),this.validator={validate:(t,n)=>{t.integrationType!==void 0&&t.integrationType!==null&&(t.integrationType.length===0&&n.add(Ire),t.integrationType.some(r=>r===""||r.trim()==="")&&n.add(Dre))}}}data(){return this.input()}}const wre="deviceToken is required",Ure="platformName must be a valid DevicePlatform value",$re="applicationName is required";var EM;(function(e){e.IOS="IOS",e.ANDROID="ANDROID"})(EM||(EM={}));const Gre=new Set(Object.values(EM));function Fre(e){return Gre.has(e)}function xre(e){return!Fre(e)}class pj{validate(t,n){Ra(t.deviceToken)&&n.add(wre)}}class Vre extends pj{validate(t,n){super.validate(t,n),xre(t.platformName.toUpperCase())&&n.add(Ure),Ra(t.applicationName)&&n.add($re)}}class g1e extends Ur{constructor(){super(...arguments),this.validator=new Vre}}class m1e extends Ur{constructor(){super(...arguments),this.validator=new pj}}const kre="string parameter serializedNotification must be provided",Bre="serialized notification must have a non-empty notification_id field of type string",hj="serialized notification must have an itbl object containing a non-empty messageId field of type string",jre="parsed notification must be a non-null object.",qre="serialized notification is not valid JSON.";class Qre{validate(t,n){if(uo(t.serializedNotification)||typeof t.serializedNotification!="string"||Ra(t.serializedNotification)){n.add(kre);return}let r=null;try{r=JSON.parse(t.serializedNotification)}catch{n.add(qre);return}if(typeof r!="object"||r===null){n.add(jre);return}const{itbl:i,notification_id:a}=r;if((uo(a)||typeof a!="string"||Ra(a))&&n.add(Bre),typeof i!="object"||Va(i)){n.add(hj);return}(uo(i.messageId)||typeof i.messageId!="string"||Ra(i.messageId))&&n.add(hj)}}class v1e extends Ur{constructor(){super(...arguments),this.validator=new Qre}}var yM=function(e,t,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(e):r?r.value:t.get(e)},Gh;class Hre extends Yi{constructor(){super(...arguments),Gh.set(this,new Ll)}validate(t,n){(uo(t.coverage)||Ra(t.coverage))&&n.add("The claim summary request must contain a coverage ID."),Sr(t.dateReceived)&&yM(this,Gh,"f").validate(t.dateReceived,n),Sr(t.servicePeriod)&&yM(this,Gh,"f").validate(t.servicePeriod,n),Sr(t.dateProcessed)&&yM(this,Gh,"f").validate(t.dateProcessed,n),super.validate(t,n)}}Gh=new WeakMap;class E1e extends zi{constructor(){super(...arguments),this.validator=new Hre}}const Yre="SearchReference value should be a non-empty string";class Sj{validate(t,n){Va(t.value)||(typeof t.value!="string"||Ra(t.value))&&n.add(Yre)}}const zre="SearchStringValue should be a non-empty string";class Fh{validate(t,n){if(Va(t.values))return;let r=!1;for(const i of t.values)Ra(i)&&(r=!0);r&&n.add(zre)}}var UE=function(e,t,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(e):r?r.value:t.get(e)},TM,AM,$E;class Wre extends Yi{constructor(){super(...arguments),TM.set(this,new Fh),AM.set(this,new Ll),$E.set(this,new Sj)}validate(t,n){super.validate(t,n),Sr(t.id)&&UE(this,TM,"f").validate(t.id,n),Sr(t.lastUpdated)&&UE(this,AM,"f").validate(t.lastUpdated,n),Sr(t.beneficiary)&&UE(this,$E,"f").validate(t.beneficiary,n),Sr(t.patient)&&UE(this,$E,"f").validate(t.patient,n)}}TM=new WeakMap,AM=new WeakMap,$E=new WeakMap;class y1e extends zi{constructor(){super(...arguments),this.validator=new Wre}}class Kre extends Yi{validate(t,n){super.validate(t,n)}}class T1e extends zi{constructor(){super(...arguments),this.validator=new Kre}}var Ul=function(e,t,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(e):r?r.value:t.get(e)},CM,GE,xh,bM;class Xre extends Yi{constructor(){super(...arguments),CM.set(this,new Fh),GE.set(this,new Ll),xh.set(this,new Sj),bM.set(this,new wl)}validate(t,n){super.validate(t,n),Sr(t.id)&&Ul(this,CM,"f").validate(t.id,n),Sr(t.lastUpdated)&&Ul(this,GE,"f").validate(t.lastUpdated,n),Sr(t.created)&&Ul(this,GE,"f").validate(t.created,n),Sr(t.patient)&&Ul(this,xh,"f").validate(t.patient,n),Sr(t.provider)&&Ul(this,xh,"f").validate(t.provider,n),Sr(t.coverage)&&Ul(this,xh,"f").validate(t.coverage,n),Sr(t.status)&&Ul(this,bM,"f").validate(t.status,n)}}CM=new WeakMap,GE=new WeakMap,xh=new WeakMap,bM=new WeakMap;class A1e extends zi{constructor(){super(...arguments),this.validator=new Xre}}var OM=function(e,t,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(e):r?r.value:t.get(e)},RM,PM,MM;class Jre{constructor(){RM.set(this,new Ll),PM.set(this,new Fh),MM.set(this,new wl)}validate(t,n){var r;Hn(t._source)&&OM(this,PM,"f").validate(t._source,n),Hn(t.date)&&OM(this,RM,"f").validate(t.date,n),Hn(t._count)&&t._count<0&&n.add("Value of count cannot be less than 0"),Hn(t._getpagesoffset)&&t._getpagesoffset<0&&n.add("Value of getpagesoffset cannot be less than 0"),Hn((r=t.supporting_info)===null||r===void 0?void 0:r.value)&&Ra(t.supporting_info.value)&&n.add("Supporting Information must have a non-empty value."),Hn(t.status)&&OM(this,MM,"f").validate(t.status,n)}}RM=new WeakMap,PM=new WeakMap,MM=new WeakMap;class C1e extends Ur{constructor(){super(...arguments),this.validator=new Jre}}class Zre{validate(t,n){if(!Va(t.cancelationReason)){if(Va(t.cancelationReason.coding)||t.cancelationReason.coding.length===0){n.add("cancelationReason must have at least one coding");return}for(const r of t.cancelationReason.coding)(Va(r?.code)||Va(r?.system))&&n.add("cancelationReason.coding must have a code and a system")}}}class b1e extends Ur{constructor(){super(...arguments),this.validator=new Zre}}class eie{validate(t,n){var r;pa((r=t.organization.value)===null||r===void 0?void 0:r.trim())&&n.add("Organization reference is required and must have a non-empty value.")}}class O1e extends Ur{constructor(){super(...arguments),this.validator=new eie}}class FE{validate(t,n,r={}){const{requireRole:i=!0}=r;Hn(t.id)?Ra(t.id)?n.add("Member id cannot be empty"):t.id.length>255&&n.add("Member id cannot exceed 255 characters"):n.add("Member id is required"),Hn(t.type)?Ra(t.type)&&n.add("Member type cannot be empty"):n.add("Member type is required");const a=Hn(t.role);if(i&&!a&&n.add("Member role is required"),a&&t.role)for(let c=0;c<t.role.length;c++){const f=t.role[c];Hn(f)?Ra(f)&&n.add(`Role ${c}: Cannot be blank`):n.add(`Role ${c}: Cannot be null or undefined`)}}}class R1e extends Ur{constructor(){super(...arguments),this.validator=new FE}}class tie{constructor(){this.updateValidator=new FE}validate(t,n){this.updateValidator.validate(t,n,{requireRole:!1})}}class P1e extends Ur{constructor(){super(...arguments),this.validator=new tie}}class nie{constructor(){this.updateValidator=new FE}validate(t,n){this.updateValidator.validate(t,n,{requireRole:!0})}}class M1e extends Ur{constructor(){super(...arguments),this.validator=new nie}}class rie{constructor(){this.updateValidator=new FE}validate(t,n){if(!Hn(t.members)){n.add("Members array is required");return}if(t.members.length===0){n.add("Members array cannot be empty");return}for(let r=0;r<t.members.length;r++){const i=t.members[r];if(!Hn(i)){n.add(`Member ${r}: Cannot be null or undefined`);continue}const a=new zk;this.updateValidator.validate(i,a,{requireRole:!0});for(const c of a.errors())n.add(`Member ${r}: ${c}`)}}}class I1e extends Ur{constructor(){super(...arguments),this.validator=new rie}}class iie extends Yi{validate(t,n){super.validate(t,n)}}class aie extends zi{constructor(){super(...arguments),this.validator=new iie}}class oie{validate(t,n){const r=t.questionnaireResponse;if(Va(r)){n.add("questionnaireResponse is required");return}if((pa(r.resourceType)||r.resourceType!=="QuestionnaireResponse")&&n.add('questionnaireResponse.resourceType must be "QuestionnaireResponse"'),pa(r.status)&&n.add("questionnaireResponse.status is required"),pa(r.questionnaire)&&n.add("questionnaireResponse.questionnaire is required"),Va(r.contained)||r.contained.length===0)n.add("questionnaireResponse.contained must have at least one item");else{let i=null;for(const a of r.contained){if(Va(a)){n.add("questionnaireResponse.contained item cannot be null or undefined");break}if(a.resourceType==="Questionnaire"){i=a;break}}if(Va(i)){n.add("questionnaireResponse.contained must contain a Questionnaire resource");return}pa(i.id)&&n.add("questionnaireResponse.contained Questionnaire resource must have an id")}}}class D1e extends Ur{constructor(){super(...arguments),this.validator=new oie}}class sie{validate(t,n){const r=t.questionnaireResponse;if(Va(r)){n.add("questionnaireResponse is required");return}(pa(r.resourceType)||r.resourceType!=="QuestionnaireResponse")&&n.add('questionnaireResponse.resourceType must be "QuestionnaireResponse"'),pa(r.status)&&n.add("questionnaireResponse.status is required"),pa(r.questionnaire)&&n.add("questionnaireResponse.questionnaire is required")}}class N1e extends Ur{constructor(){super(...arguments),this.validator=new sie}}var xE=function(e,t,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(e):r?r.value:t.get(e)},IM,DM,VE;class uie extends Yi{constructor(){super(...arguments),IM.set(this,new Ll),DM.set(this,new Fh),VE.set(this,new wl)}validate(t,n){super.validate(t,n),Hn(t.id)&&xE(this,DM,"f").validate(t.id,n),Hn(t.lastUpdated)&&xE(this,IM,"f").validate(t.lastUpdated,n),Hn(t.status)&&xE(this,VE,"f").validate(t.status,n),Hn(t.tag)&&xE(this,VE,"f").validate(t.tag,n)}}IM=new WeakMap,DM=new WeakMap,VE=new WeakMap;class L1e extends zi{constructor(){super(...arguments),this.validator=new uie}}var Vh=function(e,t,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(e):r?r.value:t.get(e)},NM,If;class cie extends Yi{constructor(){super(...arguments),NM.set(this,new Fh),If.set(this,new wl)}validate(t,n){super.validate(t,n),Hn(t.id)&&Vh(this,NM,"f").validate(t.id,n),Hn(t.tag)&&Vh(this,If,"f").validate(t.tag,n),Hn(t.security)&&Vh(this,If,"f").validate(t.security,n),Hn(t.context)&&Vh(this,If,"f").validate(t.context,n),Hn(t.identifier)&&Vh(this,If,"f").validate(t.identifier,n)}}NM=new WeakMap,If=new WeakMap;class w1e extends zi{constructor(){super(...arguments),this.validator=new cie}}class lie extends Yi{validate(t,n){super.validate(t,n)}}class U1e extends zi{constructor(){super(...arguments),this.validator=new lie}}class die{constructor(){this.dataURIRegex=/^data:[a-zA-Z0-9]+\/[a-zA-Z0-9-.+]+;base64,([A-Za-z0-9+/]*={0,2})$/}validate(t,n){t.file.trim()||n.add("File content is required"),t.file.trim()&&!this.dataURIRegex.test(t.file)&&n.add("File must be a valid data URI with base64 encoding (e.g., data:image/png;base64,...)"),t.fileName.trim()||n.add("File name is required")}}class $1e extends Ur{constructor(){super(...arguments),this.validator=new die}}class fie{validate(t,n){t.attachmentId.trim()||n.add("Attachment ID is required")}}class G1e extends Ur{constructor(){super(...arguments),this.validator=new fie}}class _ie{validate(t,n){t.subject.trim()||n.add("Subject is required"),t.comment.body.trim()||n.add("Comment body is required"),t.fields.category.trim()||n.add("Category is required")}}class F1e extends Ur{constructor(){super(...arguments),this.validator=new _ie}}class pie extends Yi{validate(t,n){super.validate(t,n)}}class x1e extends zi{constructor(){super(...arguments),this.validator=new pie}}class hie extends Yi{validate(t,n){t.requestId<0&&n.add("requestId must be a non-negative number"),super.validate(t,n)}}class V1e extends zi{constructor(){super(...arguments),this.validator=new hie}}class Sie{validate(t,n){t.requestId<0&&n.add("Request ID must be a non-negative integer"),pa(t.body.trim())&&n.add("Comment body is required")}}class k1e extends Ur{constructor(){super(...arguments),this.validator=new Sie}}class gie{validate(t,n){pa(t.attachmentId.trim())&&n.add("attachmentId must be a non-empty string"),t.requestId<0&&n.add("requestId must be a non-negative number")}}class B1e extends Ur{constructor(){super(...arguments),this.validator=new gie}}const mie="code cannot be null or empty";class vie{validate(t,n){pa(t.code)&&n.add(mie)}}class j1e extends Ur{constructor(){super(...arguments),this.validator=new vie}}const Eie="consentId cannot be null or empty";class yie{validate(t,n){pa(t.consentId)&&n.add(Eie)}}class Tie extends Ur{constructor(){super(...arguments),this.validator=new yie}}var LM=function(e,t,n,r){function i(a){return a instanceof n?a:new n(function(c){c(a)})}return new(n||(n=Promise))(function(a,c){function f(m){try{h(r.next(m))}catch(G){c(G)}}function T(m){try{h(r.throw(m))}catch(G){c(G)}}function h(m){m.done?a(m.value):i(m.value).then(f,T)}h((r=r.apply(e,t||[])).next())})};class wM{constructor(t=new Map){this.storage=t}get(t){return LM(this,void 0,void 0,function*(){return this.storage.get(t)})}set(t,n){return LM(this,void 0,void 0,function*(){this.storage.set(t,n)})}delete(t){return LM(this,void 0,void 0,function*(){return this.storage.delete(t)})}}const Aie={logLevel:oM.Error,timeout:3e4,retryPolicy:{attempts:3,interval:1e3},telemetryEnabled:!1,tokenStorage:new wM,language:null,overrides:{unauthedApiUrl:null,authedApiUrl:null}};var gu;(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"})(gu||(gu={}));var Cie=function(e,t,n,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="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 r==="a"?i.call(e,n):i?i.value=n:t.set(e,n),n},gj=function(e,t,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(e):r?r.value:t.get(e)},kh,Wn;(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"})(Wn||(Wn={}));const bie={[Wn.VERBOSE]:"VERBOSE",[Wn.DEBUG]:"DEBUG",[Wn.INFO]:"INFO",[Wn.WARN]:"WARN",[Wn.ERROR]:"ERROR",[Wn.FATAL]:"FATAL"};class Df{constructor(t){kh.set(this,void 0),Cie(this,kh,t,"f")}get severity(){return gj(this,kh,"f")}shouldLog(t){return t>=gj(this,kh,"f")}static severityText(t){return bie[t]}static severityFromText(t){switch(t){case"VERBOSE":return Wn.VERBOSE;case"DEBUG":return Wn.DEBUG;case"INFO":return Wn.INFO;case"WARN":return Wn.WARN;case"ERROR":return Wn.ERROR;case"FATAL":return Wn.FATAL;default:throw new Error(`Invalid severity text: ${t}`)}}}kh=new WeakMap;var UM=function(e,t,n,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="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 r==="a"?i.call(e,n):i?i.value=n:t.set(e,n),n},xs=function(e,t,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(e):r?r.value:t.get(e)},pc,mj,kE,Bh,BE,$l;class vj{constructor(t,n,r){pc.add(this),kE.set(this,void 0),Bh.set(this,void 0),BE.set(this,void 0),UM(this,kE,r,"f"),UM(this,Bh,new Df(t),"f"),UM(this,BE,n,"f")}name(){return xs(this,kE,"f")}severity(){return xs(this,Bh,"f").severity}verbose(t,n){xs(this,pc,"m",$l).call(this,Wn.VERBOSE,t,n)}debug(t,n){xs(this,pc,"m",$l).call(this,Wn.DEBUG,t,n)}info(t,n){xs(this,pc,"m",$l).call(this,Wn.INFO,t,n)}warn(t,n){xs(this,pc,"m",$l).call(this,Wn.WARN,t,n)}error(t,n){let r;n instanceof nn&&(r={error:n.failure()?n.error().message:n.data()}),n instanceof Error&&(r={error:n.message}),r===void 0&&(r=n),xs(this,pc,"m",$l).call(this,Wn.ERROR,t,r)}fatal(t,n){xs(this,pc,"m",$l).call(this,Wn.FATAL,t,n)}static otelSeverityNumber(t){switch(t){case Wn.VERBOSE:return gu.TRACE;case Wn.DEBUG:return gu.DEBUG;case Wn.INFO:return gu.INFO;case Wn.WARN:return gu.WARN;case Wn.ERROR:return gu.ERROR;case Wn.FATAL:return gu.FATAL;default:return gu.UNSPECIFIED}}}mj=vj,kE=new WeakMap,Bh=new WeakMap,BE=new WeakMap,pc=new WeakSet,$l=function(t,n,r){!xs(this,Bh,"f").shouldLog(t)||xs(this,BE,"f").emit({timestamp:Date.now(),severityNumber:mj.otelSeverityNumber(t),severityText:Df.severityText(t),body:n,attributes:r??{}})};var Ej=function(e,t,n,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="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 r==="a"?i.call(e,n):i?i.value=n:t.set(e,n),n},yj=function(e,t,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(e):r?r.value:t.get(e)},jE,qE;class Oie{constructor(t,n){jE.set(this,void 0),qE.set(this,void 0),Ej(this,qE,t,"f"),Ej(this,jE,n.loggerProvider(),"f")}getLogger(t){const n=t??"default",r=yj(this,jE,"f").getLogger(n);return new vj(yj(this,qE,"f"),r,n)}}jE=new WeakMap,qE=new WeakMap;class Rie{format(t,n,r,i){let c=`[${new Date().toISOString()}] ${Df.severityText(t)}`;return r!==void 0&&(c+=` (${r})`),c+=`: ${n}`,i===void 0?[c]:[c,i]}}var $M=function(e,t,n,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="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 r==="a"?i.call(e,n):i?i.value=n:t.set(e,n),n},Gi=function(e,t,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(e):r?r.value:t.get(e)},Vs,ks,mu;class Pie{constructor(t,n){Vs.set(this,void 0),ks.set(this,void 0),mu.set(this,void 0),$M(this,ks,new Df(t),"f"),$M(this,Vs,n,"f"),$M(this,mu,new Rie,"f")}name(){return Gi(this,Vs,"f")}severity(){return Gi(this,ks,"f").severity}verbose(t,n){Gi(this,ks,"f").shouldLog(Wn.VERBOSE)&&console.debug(...Gi(this,mu,"f").format(Wn.VERBOSE,t,Gi(this,Vs,"f"),n))}debug(t,n){Gi(this,ks,"f").shouldLog(Wn.DEBUG)&&console.debug(...Gi(this,mu,"f").format(Wn.DEBUG,t,Gi(this,Vs,"f"),n))}info(t,n){Gi(this,ks,"f").shouldLog(Wn.INFO)&&console.info(...Gi(this,mu,"f").format(Wn.INFO,t,Gi(this,Vs,"f"),n))}warn(t,n){Gi(this,ks,"f").shouldLog(Wn.WARN)&&console.warn(...Gi(this,mu,"f").format(Wn.WARN,t,Gi(this,Vs,"f"),n))}error(t,n){let r=n;n instanceof nn&&(r=n.failure()?n.error():n.data()),Gi(this,ks,"f").shouldLog(Wn.ERROR)&&console.error(...Gi(this,mu,"f").format(Wn.ERROR,t,Gi(this,Vs,"f"),r))}fatal(t,n){Gi(this,ks,"f").shouldLog(Wn.FATAL)&&console.error(...Gi(this,mu,"f").format(Wn.FATAL,t,Gi(this,Vs,"f"),n))}}Vs=new WeakMap,ks=new WeakMap,mu=new WeakMap;var Mie=function(e,t,n,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="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 r==="a"?i.call(e,n):i?i.value=n:t.set(e,n),n},Iie=function(e,t,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(e):r?r.value:t.get(e)},QE;class Fi{constructor(t=Wn.FATAL){QE.set(this,void 0),Mie(this,QE,t,"f")}getLogger(t){return new Pie(Iie(this,QE,"f"),t)}}QE=new WeakMap;var Die=function(e,t,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(e):r?r.value:t.get(e)},GM,Tj;class Nie{constructor(){GM.add(this)}createLogProvider(t,n){switch(Die(this,GM,"m",Tj).call(this,t)){case"otel":if(n===void 0)throw new Error('telemetry is required for "otel" logging');return new Oie(t.logLevel,n);case"console":return new Fi(t.logLevel)}}}GM=new WeakSet,Tj=function(t){return t.telemetry.enabled?"otel":"console"};var Xr=function(e,t,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(e):r?r.value:t.get(e)},vu=function(e,t,n,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="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 r==="a"?i.call(e,n):i?i.value=n:t.set(e,n),n},Wo,Nf,hc,Lf,Sc,Gl,Aj,Cj,bj,Oj,Rj,Pj,Mj,Ij,Dj,Nj;class HE{constructor(t){Wo.add(this),Nf.set(this,void 0),hc.set(this,void 0),Lf.set(this,void 0),Sc.set(this,void 0),Gl.set(this,void 0),this.bwellConfig=Xr(this,Wo,"m",Rj).call(this,t),vu(this,Nf,Df.severityFromText(this.bwellConfig.logLevel),"f"),vu(this,Gl,Xr(this,Wo,"m",Nj).call(this),"f"),vu(this,Lf,Xr(this,Wo,"m",Mj).call(this),"f"),vu(this,hc,Xr(this,Wo,"m",Ij).call(this),"f"),vu(this,Sc,Xr(this,Wo,"m",Dj).call(this),"f")}static initialize(t){try{const n=new HE(t);return nn.success(n)}catch(n){if(_a.isBwellError(n))return nn.failure(n);throw n}}get logLevel(){return Xr(this,Nf,"f")}get graphQL(){return Xr(this,Lf,"f")}get telemetry(){return Xr(this,hc,"f")}get http(){return Xr(this,Sc,"f")}get context(){return Xr(this,Gl,"f")}setContextUser(t){Xr(this,Gl,"f").user=t}mergeRemoteConfig(t){vu(this,Nf,Xr(this,Wo,"m",Aj).call(this,t),"f"),vu(this,Lf,Xr(this,Wo,"m",Cj).call(this,t),"f"),vu(this,hc,Object.freeze(Xr(this,Wo,"m",bj).call(this,t)),"f"),vu(this,Sc,Object.freeze(Xr(this,Wo,"m",Oj).call(this,t)),"f")}}Nf=new WeakMap,hc=new WeakMap,Lf=new WeakMap,Sc=new WeakMap,Gl=new WeakMap,Wo=new WeakSet,Aj=function(t){var n;const r=(n=t?.logLevel)!==null&&n!==void 0?n:null;return r===null?Xr(this,Nf,"f"):Df.severityFromText(r)},Cj=function(t){var n;const r=(n=t?.graphQLClient)!==null&&n!==void 0?n:null;if(r===null)return Xr(this,Lf,"f");const{authedApiUrl:i,unauthedApiUrl:a}=this.bwellConfig.overrides;return{unauthApiUrl:a??r.url,apiUrl:i??r.authUrl}},bj=function(t){var n,r;const i=(n=t?.telemetry)!==null&&n!==void 0?n:null;if(i===null)return Xr(this,hc,"f");const a=(r=i.enabled)!==null&&r!==void 0?r:Xr(this,hc,"f").enabled;if(i.collectorUrl.endsWith("/"))throw new Error('Telemetry config "collectorUrl" cannot end with a trailing slash.');let c;try{c=new URL(i.collectorUrl)}catch{throw new Error('Telemetry config "collectorUrl" malformed/is not a proper URL.')}if(c.pathname!=="/")throw new Error('Telemetry config "collectorUrl" cannot contain a path.');return Object.assign(Object.assign({},Xr(this,hc,"f")),{enabled:a,collectorUrl:i.collectorUrl})},Oj=function(t){var n,r,i;const a=(n=t?.httpClient)!==null&&n!==void 0?n:null;return a===null?Xr(this,Sc,"f"):{timeout:(r=a.requestTimeout)!==null&&r!==void 0?r:Xr(this,Sc,"f").timeout,retryPolicy:(i=a.retry)!==null&&i!==void 0?i:Xr(this,Sc,"f").retryPolicy}},Rj=function(t){return Object.assign(Object.assign({},Aie),t)},Pj=function(){try{return Gne(this.bwellConfig.clientKey)}catch{throw new Pne("It appears there is a problem with your Client Key. Contact b.well support for further assistance.")}},Mj=function(){var t,n;return{apiUrl:(t=this.bwellConfig.overrides.authedApiUrl)!==null&&t!==void 0?t:`https://api-gateway.${Xr(this,Gl,"f").env}.icanbwell.com/federated-graph-authed/graphql`,unauthApiUrl:(n=this.bwellConfig.overrides.unauthedApiUrl)!==null&&n!==void 0?n:`https://api-gateway.${Xr(this,Gl,"f").env}.icanbwell.com/federated-graph/graphql`}},Ij=function(){return{collectorUrl:"https://collector.services.icanbwell.com",enabled:this.bwellConfig.telemetryEnabled,timeout:this.bwellConfig.timeout}},Dj=function(){return{timeout:this.bwellConfig.timeout,retryPolicy:{attempts:this.bwellConfig.retryPolicy.attempts,interval:this.bwellConfig.retryPolicy.interval}}},Nj=function(){return{clientKey:this.bwellConfig.clientKey,env:Xr(this,Wo,"m",Pj).call(this),user:null}};var Lie=function(e,t,n,r){function i(a){return a instanceof n?a:new n(function(c){c(a)})}return new(n||(n=Promise))(function(a,c){function f(m){try{h(r.next(m))}catch(G){c(G)}}function T(m){try{h(r.throw(m))}catch(G){c(G)}}function h(m){m.done?a(m.value):i(m.value).then(f,T)}h((r=r.apply(e,t||[])).next())})},Lj=function(e,t,n,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="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 r==="a"?i.call(e,n):i?i.value=n:t.set(e,n),n},YE=function(e,t,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(e):r?r.value:t.get(e)},wf,zE;class wie{constructor(t,n=new Fi){wf.set(this,void 0),zE.set(this,void 0),Lj(this,zE,t,"f"),Lj(this,wf,n.getLogger("ConfigManager"),"f")}initialize(t){return Lie(this,void 0,void 0,function*(){const n=HE.initialize(t);if(n.failure())return n;const r=n.data();YE(this,wf,"f").verbose("Initializing SDK Configuration");const i=yield YE(this,zE,"f").initialize(r.context.clientKey);if(i.failure())return i.intoFailure();const a=i.data();try{r.mergeRemoteConfig(a)}catch(c){YE(this,wf,"f").error("Error merging SDK config with remote config.",c)}return YE(this,wf,"f").info("Remote SDK Configuration merged with user config"),nn.success(r)})}}wf=new WeakMap,zE=new WeakMap;class gc extends Error{response;request;constructor(t,n){const r=`${gc.extractMessage(t)}: ${JSON.stringify({response:t,request:n})}`;super(r),Object.setPrototypeOf(this,gc.prototype),this.response=t,this.request=n,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,gc)}static extractMessage(t){return t.errors?.[0]?.message??`GraphQL Error (Code: ${String(t.status)})`}}const wj=e=>e.toUpperCase(),FM=e=>typeof e=="function"?e():e,Uj=(e,t)=>e.map((n,r)=>[n,t[r]]),Uf=e=>{let t={};return e instanceof Headers?t=Uie(e):Array.isArray(e)?e.forEach(([n,r])=>{n&&r!==void 0&&(t[n]=r)}):e&&(t=e),t},Uie=e=>{const t={};return e.forEach((n,r)=>{t[r]=n}),t},$ie=e=>{try{const t=e();return Gie(t)?t.catch(n=>$j(n)):t}catch(t){return $j(t)}},$j=e=>e instanceof Error?e:new Error(String(e)),Gie=e=>typeof e=="object"&&e!==null&&"then"in e&&typeof e.then=="function"&&"catch"in e&&typeof e.catch=="function"&&"finally"in e&&typeof e.finally=="function",xM=e=>{throw new Error(`Unhandled case: ${String(e)}`)},WE=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),q1e=e=>Object.entries(e),Q1e=e=>Object.values(e),H1e=(e,t)=>Object.fromEntries(Object.entries(e).map(([n,r])=>[n,t(r,n)])),Y1e=e=>e.charAt(0).toLowerCase()+e.slice(1);function z1e(e){if(!Array.isArray(e))throw new Error(`Expected array. Got: ${String(e)}`)}function W1e(e){if(e===null||typeof e!="object")throw new Error(`Expected object. Got: ${String(e)}`)}const K1e=e=>e.charAt(0).toUpperCase()+e.slice(1),X1e=e=>{let t=!1,n,r;return{promise:new Promise((a,c)=>{n=a,r=c}),isResolved:()=>t,resolve:a=>{if(t=!0,e?.strict&&t)throw new Error(`Deferred is already resolved. Attempted to resolve with: ${JSON.stringify(a)}`);n(a)},reject:a=>r(a)}},Fie=(...e)=>{process.env.DEBUG&&console.log(...e)},J1e=(...e)=>(...t)=>{Fie(...e,...t)},Z1e=e=>{const t=[],n=[];for(const r of e)r instanceof Error?t.push(r):n.push(r);return[n,t]},eke=async(...e)=>{const t=xie(e);return new GraphQLClient(t.url).batchRequests(t)},xie=e=>e.length===1?e[0]:{url:e[0],documents:e[1],requestHeaders:e[2],signal:void 0},Vie=(e,t)=>e.documents?e:{documents:e,requestHeaders:t,signal:void 0},tke=async(...e)=>{const[t,n,...r]=e,i=kie(t,n,...r);return new GraphQLClient(i.url).rawRequest({...i})},kie=(e,t,...n)=>{const[r,i]=n;return typeof e=="string"?{url:e,query:t,variables:r,requestHeaders:i,signal:void 0}:e},Bie=(e,t,n)=>e.query?e:{query:e,variables:t,requestHeaders:n,signal:void 0};var jie=_(2455);const Gj="Accept",VM="Content-Type",kM="application/json",Fj="application/graphql-response+json",nke={success:200},xj=e=>e.replace(/([\s,]|#[^\n\r]+)+/g," ").trim(),qie=e=>{const t=e.toLowerCase();return t.includes(Fj)||t.includes(kM)},Vj=e=>{try{if(Array.isArray(e))return{_tag:"Batch",executionResults:e.map(kj)};if(WE(e))return{_tag:"Single",executionResult:kj(e)};throw new Error(`Invalid execution result: result is not object or array.
|
|
12899
|
+
`));function SVe(e){const t=Object.assign(Object.assign({},Gs),e);return Apollo.useMutation(Ene,t)}const Fk={value:{system:"http://hl7.org/fhir/uv/smart-health-cards-and-links/StructureDefinition/ShlPayload",code:"smart-health-link"}};function gVe(e={}){return useDocumentReferencesQuery(Object.assign(Object.assign({},e),{variables:Object.assign(Object.assign({},e.variables),{category:Fk})}))}function mVe(e={}){return useDocumentReferencesLazyQuery(Object.assign(Object.assign({},e),{variables:Object.assign(Object.assign({},e.variables),{category:Fk})}))}const xk={value:{system:"https://www.icanbwell.com/fhir/CodeSystem/shl-event-type",code:"access"}};function vVe(e={}){return useCommunicationRequestsQuery(Object.assign(Object.assign({},e),{variables:Object.assign(Object.assign({},e.variables),{category:xk})}))}function EVe(e={}){return useCommunicationRequestsLazyQuery(Object.assign(Object.assign({},e),{variables:Object.assign(Object.assign({},e.variables),{category:xk})}))}const Vk={value:{system:"https://www.icanbwell.com/consent-category",code:"smartHealthLink"}};function yVe(e={}){return useConsentsForHealthLinksQuery(Object.assign(Object.assign({},e),{variables:Object.assign(Object.assign({},e.variables),{category:Vk})}))}function TVe(e={}){return useConsentsForHealthLinksLazyQuery(Object.assign(Object.assign({},e),{variables:Object.assign(Object.assign({},e.variables),{category:Vk})}))}const AVe=e=>useMutation(SendChatCompletionMutation,e);var kk=_(46),Oh,_E;class Bk{constructor(){this.type="backend",Oh.set(this,void 0),_E.set(this,void 0)}init(t,{clientSlug:n,apiClient:r}){if(!r)throw t.logger.error('"apiClient" not supplied to "QueryBackend".'),new Error('"apiClient" required for "QueryBackend".');dc(this,Oh,n,"f"),dc(this,_E,uG(r),"f")}read(t,n,r){return nE(this,void 0,void 0,function*(){try{const{translation:i}=yield vr(this,_E,"f").getClientTranslations({name:vr(this,Oh,"f"),key:n,lang:t});r(null,i?.json||{})}catch{const a=`Error fetching translation with key "${n}" and client "${vr(this,Oh,"f")||"N/A"}".`;r(a,null)}})}}Oh=new WeakMap,_E=new WeakMap,Bk.type="backend";var Cf;class jk{constructor(t){this.type="logger",Cf.set(this,void 0),dc(this,Cf,t,"f")}log([t,n,...r]){vr(this,Cf,"f").info({meta:n},t,...r)}warn([t,n,...r]){vr(this,Cf,"f").error({meta:n},t,...r)}error([t,n,...r]){vr(this,Cf,"f").error({meta:n},t,...r)}}Cf=new WeakMap,jk.type="logger";var pE,hE,Dl,Rh,ia,Nl;const qk="appLanguage";class so{constructor({keys:t,nativeBridge:n,fallbackKeys:r=[],defaultLanguage:i="en",logger:a,parent:c,debug:f=!1,remoteConfig:T={}}){Dl.set(this,void 0),Rh.set(this,void 0),ia.set(this,void 0),Nl.set(this,void 0),dc(this,Dl,t,"f"),dc(this,Rh,r,"f"),dc(this,Nl,n,"f");const h={lng:i,fallbackNS:vr(this,Rh,"f"),debug:f,defaultNS:t,returnNull:!1};c?dc(this,ia,c.cloneInstance(h),"f"):(dc(this,ia,Oa.createInstance(),"f"),a&&vr(this,ia,"f").use(new jk(a.child({library:"@icanbwell/i18n"}))),T.apiClient&&vr(this,ia,"f").use(Bk),vr(this,ia,"f").init(Object.assign(Object.assign({},h),{fallbackLng:!1,partialBundledLanguages:!0,ns:[],resources:{},backend:T,saveMissing:!0,missingKeyHandler:(m,G,H)=>vr(this,ia,"f").services.logger.error(`missing key: ${H}; language: ${m}; key: ${G}`)}))),this.t=vr(this,ia,"f").t,so.resolvedLanguage=vr(this,ia,"f").resolvedLanguage||i}load(){var t;return nE(this,void 0,void 0,function*(){const n=(yield(t=vr(this,Nl,"f"))===null||t===void 0?void 0:t.storage.getItem(qk))||so.resolvedLanguage;n!==so.resolvedLanguage&&(yield vr(this,ia,"f").changeLanguage(n),so.resolvedLanguage=n),yield vr(this,ia,"f").loadNamespaces(vr(this,Dl,"f"));const r=vr(this,Dl,"f").filter(i=>!vr(this,ia,"f").hasResourceBundle(n,i));if(r.length)throw new Error(`Error loading translations for key(s): ${r.join(", ")}`);return vr(so,pE,"f",hE).emit("changeLanguage",n),this})}child(t){return new so(Object.assign(Object.assign({},t),{nativeBridge:vr(this,Nl,"f"),fallbackKeys:[...vr(this,Rh,"f"),...vr(this,Dl,"f")],parent:vr(this,ia,"f"),defaultLanguage:vr(this,ia,"f").language}))}get isLoaded(){return vr(this,Dl,"f").every(t=>vr(this,ia,"f").hasResourceBundle(vr(this,ia,"f").language,t))}changeLanguage(t){var n,r;return nE(this,void 0,void 0,function*(){so.resolvedLanguage=t,yield vr(this,ia,"f").changeLanguage(t),vr(so,pE,"f",hE).emit("changeLanguage",t),yield(n=vr(this,Nl,"f"))===null||n===void 0?void 0:n.storage.setItem(qk,t),(r=vr(this,Nl,"f"))===null||r===void 0||r.reloadView(!0)})}get resolvedLanguage(){return so.resolvedLanguage}onChangeLanguage(t){vr(so,pE,"f",hE).on("changeLanguage",t)}}pE=so,Dl=new WeakMap,Rh=new WeakMap,ia=new WeakMap,Nl=new WeakMap,hE={value:new kk},so.resolvedLanguage="en";var QP=_(49),Ph;(function(e){e.one="1.0.0"})(Ph||(Ph={}));const SE="orchestrator:native-bridge",yne={id:SE,dependencies:{featureServices:{}},create:()=>({[Ph.one]:()=>({featureService:QP.b})})};var Mh;(function(e){e.one="1.0.0"})(Mh||(Mh={}));const gE="orchestrator:translation-service",Tne={id:gE,dependencies:{featureServices:{[Pi]:Wa.one,[Ds]:oc.one,[yi]:Ua.one,[dh]:pf.one,[SE]:Ph.one}},create:({featureServices:e})=>{const t=e[Pi],n=e[Ds],r=e[dh],{slug:i}=e[yi].getClientContext(),a=e[SE],c=new so({keys:[],nativeBridge:a,defaultLanguage:"en",logger:n,remoteConfig:{clientSlug:i,apiClient:t}});return r.setProfileProperties({language:c.resolvedLanguage}),c.onChangeLanguage(f=>r.setProfileProperties({language:f})),{[Mh.one]:()=>({featureService:c})}}};var bf,Of,mE,Fs,vE,EE;const yE="tokens",HP="delegationContext";class Ane{constructor({apiClient:t,stateService:n,identityGatewaySdk:r,storage:i,logger:a}){bf.set(this,void 0),Of.set(this,void 0),mE.set(this,void 0),Fs.set(this,void 0),vE.set(this,void 0),EE.set(this,[]),(0,R.__classPrivateFieldSet)(this,bf,t,"f"),(0,R.__classPrivateFieldSet)(this,Of,n,"f"),(0,R.__classPrivateFieldSet)(this,mE,r,"f"),(0,R.__classPrivateFieldSet)(this,Fs,i,"f"),(0,R.__classPrivateFieldSet)(this,vE,a,"f")}registerPreLogoutHandler(t){(0,R.__classPrivateFieldGet)(this,EE,"f").push(t)}getStoredTokens(){const t=(0,R.__classPrivateFieldGet)(this,Fs,"f").getItem(yE);return t?JSON.parse(t):void 0}removeStoredTokens(){(0,R.__classPrivateFieldGet)(this,Fs,"f").removeItem(yE),this.clearDelegationContext()}storeTokens(t){const n=Object.assign(Object.assign({},t),{idToken:Object.assign(Object.assign({},t.idToken),{payload:(0,Ai.normalizeTokenPayload)(t.idToken.payload)})});return(0,R.__classPrivateFieldGet)(this,Fs,"f").setItem(yE,JSON.stringify(n)),n}storeDelegationContext(t){(0,R.__classPrivateFieldGet)(this,Fs,"f").setItem(HP,JSON.stringify(t))}getDelegationContext(){var t,n;const r=(0,R.__classPrivateFieldGet)(this,Fs,"f").getItem(HP);if(!r)return null;try{const i=JSON.parse(r);return!i?.consentId||!(!((n=(t=i?.delegateTokens)===null||t===void 0?void 0:t.accessToken)===null||n===void 0)&&n.jwtToken)?null:i}catch{return null}}clearDelegationContext(){(0,R.__classPrivateFieldGet)(this,Fs,"f").removeItem(HP)}logout(){var t;return(0,R.__awaiter)(this,void 0,void 0,function*(){for(const a of(0,R.__classPrivateFieldGet)(this,EE,"f"))try{yield a()}catch(c){(t=(0,R.__classPrivateFieldGet)(this,vE,"f"))===null||t===void 0||t.error(c instanceof Error?c:new Error(String(c)),"Pre-logout handler failed")}const n=(0,R.__classPrivateFieldGet)(this,Of,"f").getUserTokenData().accessToken.jwtToken,{key:r,variant:i}=(0,R.__classPrivateFieldGet)(this,Of,"f").getClientContext();i!==ne.GUEST&&(yield(0,R.__classPrivateFieldGet)(this,mE,"f").logout({accessToken:n},{context:{headers:{clientKey:r}}})),(0,R.__classPrivateFieldGet)(this,bf,"f").stop(),(0,R.__classPrivateFieldGet)(this,bf,"f").clearAuth(),yield(0,R.__classPrivateFieldGet)(this,bf,"f").clearStore(),(0,R.__classPrivateFieldGet)(this,Of,"f").logoutUser(),(0,R.__classPrivateFieldGet)(this,Fs,"f").removeItem(yE),this.clearDelegationContext()})}}bf=new WeakMap,Of=new WeakMap,mE=new WeakMap,Fs=new WeakMap,vE=new WeakMap,EE=new WeakMap;var Ih;(function(e){e.one="1.0.0"})(Ih||(Ih={}));const TE="orchestrator:identity-utils",Cne={id:TE,dependencies:{featureServices:{[Pi]:Wa.one,[Ds]:oc.one,[yi]:Ua.one,[dh]:pf.one}},create:({featureServices:e})=>{const t=e[Pi];return{[Ih.one]:()=>({featureService:new Ane({apiClient:t,stateService:e[yi],identityGatewaySdk:EF(t),storage:window.sessionStorage,logger:e[Ds]})})}}};var AE;(function(e){e.one="1.0.0"})(AE||(AE={}));const Qk="orchestrator:globaleventemitter-service",bne=e=>({id:Qk,create:()=>({[AE.one]:()=>({featureService:e})})});var CE;(function(e){e.one="1.0.0"})(CE||(CE={}));const Hk="orchestrator:reboot-controller",One=e=>({id:Hk,create:()=>({[CE.one]:()=>({featureService:e})})}),bE="orchestrator:bwell-sdk";var Dh;(function(e){e.one="1.0.0"})(Dh||(Dh={}));const Rne=e=>({id:bE,dependencies:{featureServices:{[yi]:Ua.one,[gE]:Mh.one,[Ds]:oc.one}},create:({featureServices:t})=>{const n=t[yi],r=t[gE],i=t[Ds],a=e;let c=!1,f=!1;const T=me=>{if(typeof me=="string")return me;if(me&&typeof me=="object"&&"message"in me){const ve=me.message;return typeof ve=="string"?ve:String(ve)}return String(me)},h=me=>/uninitialized|not been initialized/i.test(T(me)),m=me=>{try{a.language.setLanguage(me)}catch(ve){if(h(ve)){f||(f=!0,i.info({},"embeddable-core: Deferring language switch until SDK initialization completes"));return}i.info({error:T(ve)},"embeddable-core: Non-fatal language switch issue in SDK")}},G=me=>{try{const ve=a.language.getLanguage();me!==ve&&m(me)}catch(ve){if(h(ve))return;i.info({error:T(ve)},"embeddable-core: Non-fatal language read issue in SDK")}},H=()=>{var me;!(!((me=n.getUser().tokenData)===null||me===void 0)&&me.idToken)||(m(r.resolvedLanguage),c||(c=!0,r.onChangeLanguage(G)))};return n.getStore().subscribe(H),{[Dh.one]:()=>({featureService:a})}}});class _a extends Error{constructor(t,n){super(t),this.name="BWellError",n?.cause&&(this.cause=n.cause)}static isBwellError(t){return t instanceof _a}}class CVe extends _a{constructor(t="Authentication Error"){super(t),this.name="AuthenticationError"}}class bVe extends _a{constructor(t="Illegal Argument Error"){super(t),this.name="IllegalArgumentError"}}class OVe extends _a{constructor(t="Illegal State Error"){super(t),this.name="IllegalStateError"}}class Pne extends _a{constructor(t="Invalid Client Key Error"){super(t),this.name="InvalidClientKeyError"}}class YP extends _a{constructor(t,n){super(t),this.credentials=n,this.name="InvalidCredentialsTypeError"}}class Rf extends _a{constructor(t="Invalid Token Error"){super(t),this.name="InvalidTokenError"}}class Mne extends _a{constructor(t,n){super(t),this.status=n,this.name="NetworkError"}}class Ine extends _a{constructor(t){super(t.message()),this.operationOutcome=t,this.name="OperationOutcomeError"}}class zP extends _a{constructor(t,n){super(t),this.data=n,this.name="UnknownError"}}class Dne extends _a{constructor(t){super(t.join(". ")),this.errors=t,this.name="ValidationError"}}class en{constructor(t,n){this.data=t,n!==null&&(this.error=n)}hasError(){return this.error!==void 0}static error(t){return new en(void 0,t)}}var Yk=function(e,t,n,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="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 r==="a"?i.call(e,n):i?i.value=n:t.set(e,n),n},OE=function(e,t,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(e):r?r.value:t.get(e)},Nh,Lh;class nn{static success(t){return new Nne(t)}static failure(t){return new RE(t)}}class Nne extends nn{constructor(t){super(),Nh.set(this,void 0),Yk(this,Nh,t,"f")}data(){return OE(this,Nh,"f")}error(){throw OE(this,Nh,"f")}success(){return!0}failure(){return!1}toQueryResult(){return new en(this.data())}}Nh=new WeakMap;class RE extends nn{constructor(t){super(),Lh.set(this,void 0),Yk(this,Lh,t,"f")}data(){throw OE(this,Lh,"f")}error(){return OE(this,Lh,"f")}success(){return!1}failure(){return!0}intoFailure(){return nn.failure(this.error())}toQueryResult(){return new en(void 0,this.error())}}Lh=new WeakMap;var WP=function(e,t,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(e):r?r.value:t.get(e)},wh;class zk{constructor(){wh.set(this,[])}add(t){WP(this,wh,"f").push(t)}errors(){return WP(this,wh,"f")}hasErrors(){return WP(this,wh,"f").length>0}}wh=new WeakMap;var Wk=function(e,t,n,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="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 r==="a"?i.call(e,n):i?i.value=n:t.set(e,n),n},KP=function(e,t,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(e):r?r.value:t.get(e)},Uh,PE;class Lne{constructor(t){Uh.set(this,void 0),PE.set(this,void 0),Wk(this,PE,t,"f"),Wk(this,Uh,this.transformInput(t),"f")}validate(){return nn.success(null)}data(){return KP(this,Uh,"f")}toJSON(){return KP(this,Uh,"f")}transformInput(t){return t}input(){return KP(this,PE,"f")}}Uh=new WeakMap,PE=new WeakMap;class Ur extends Lne{validate(){const t=new zk;return this.validator.validate(this.input(),t),t.hasErrors()?nn.failure(new Dne(t.errors())):nn.success(null)}}var Kk=function(e,t,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(e):r?r.value:t.get(e)},ME,Xk,Jk;const Zk=100,XP=20;class Yi{constructor(){ME.add(this)}validate(t,n){Kk(this,ME,"m",Xk).call(this,t.page,n),Kk(this,ME,"m",Jk).call(this,t.pageSize,n)}}ME=new WeakSet,Xk=function(t,n){t<0&&n.add("page must be a positive number")},Jk=function(t,n){t!==void 0&&(t<=0&&n.add("Page size must be greater than 0"),t>Zk&&n.add(`Page size must not exceed ${Zk}`))};class zi extends Ur{constructor(){super(...arguments),this.validator=new Yi}transformInput(t){return Object.assign({pageSize:XP},t)}}function JP(){return new Date().toISOString()}function wne(){var e;return!(typeof process>"u"||((e=process.versions)===null||e===void 0?void 0:e.node)===void 0)}function Une(){return typeof window<"u"}function eB(){if(Une())return"browser";if(wne())return"node";throw new Error("Invalid runtime")}function $ne(e){switch(eB()){case"browser":return e.browser();case"node":return e.node()}}function tB(e){switch(eB()){case"node":return Buffer.from(e,"base64").toString("utf-8");case"browser":return atob(e)}}function Hn(e){return e!=null}function Va(e){return e==null}function RVe(e){return Hn(e)&&e!==""}function pa(e){return e==null||e===""}function uo(e){return e===void 0}function Sr(e){return e!==void 0}function Gne(e){return JSON.parse(tB(e)).env}const Fne=3;function nB(e){const t=e.split("."),n=t[1];if(n===void 0||t.length!==Fne)throw new Rf("Token is missing data and may be corrupted");try{return JSON.parse(tB(n))}catch(r){const i=r;throw new Rf(`Unable to parse token payload: ${i.name} - ${i.message}`)}}function xne(e){const n=nB(e).exp;if(typeof n!="number")throw new Rf("The access token is missing an expiration date and is most likely corrupted.");return n*1e3}const Vne="custom:clientFhirPersonId",kne="custom:bwellFhirPatientId";function Bne(e){const t=nB(e),n=t[kne],r=t[Vne];return Hn(n)&&Hn(r)?{bwellFhirPersonId:n,clientFhirPersonId:r}:null}function Ra(e){return e.trim()===""}const jne="1.77.0";function qne(){return jne}var ZP;(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"})(ZP||(ZP={}));var rB;(function(e){e.Guest="GUEST"})(rB||(rB={}));var IE;(function(e){e.CmsNetworkShareMyRecords="CMS_NETWORK_SHARE_MY_RECORDS",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"})(IE||(IE={}));var iB;(function(e){e.Complete="COMPLETE",e.Error="ERROR",e.Partial="PARTIAL",e.Queued="QUEUED"})(iB||(iB={}));var aB;(function(e){e.Institutional="INSTITUTIONAL",e.Oral="ORAL",e.Pharmacy="PHARMACY",e.Professional="PROFESSIONAL",e.Vision="VISION"})(aB||(aB={}));var oB;(function(e){e.Bwell="bwell"})(oB||(oB={}));var sB;(function(e){e.Bwell="BWELL"})(sB||(sB={}));var uB;(function(e){e.Basic="BASIC",e.Identity="IDENTITY",e.Oauth="OAUTH"})(uB||(uB={}));var eM;(function(e){e.Deny="DENY",e.Permit="PERMIT"})(eM||(eM={}));var tM;(function(e){e.Active="ACTIVE",e.Draft="DRAFT",e.EnteredInError="ENTERED_IN_ERROR",e.Inactive="INACTIVE",e.Proposed="PROPOSED",e.Rejected="REJECTED"})(tM||(tM={}));var cB;(function(e){e.Medical="MEDICAL",e.Pharmacy="PHARMACY"})(cB||(cB={}));var lB;(function(e){e.Usd="USD"})(lB||(lB={}));var dB;(function(e){e.Accepted="ACCEPTED",e.Rejected="REJECTED"})(dB||(dB={}));var fB;(function(e){e.AccessEnded="ACCESS_ENDED",e.Connected="CONNECTED",e.Deleted="DELETED",e.Disconnected="DISCONNECTED",e.Error="ERROR",e.Expired="EXPIRED"})(fB||(fB={}));var _B;(function(e){e.Clinical="CLINICAL",e.Device="DEVICE",e.Insurance="INSURANCE",e.Lab="LAB",e.Pharmacy="PHARMACY",e.Practitioner="PRACTITIONER"})(_B||(_B={}));var DE;(function(e){e.Connecthub="connecthub",e.Nppes="nppes"})(DE||(DE={}));var pB;(function(e){e.Connecthub="CONNECTHUB",e.Nppes="NPPES"})(pB||(pB={}));var hB;(function(e){e.Fri="FRI",e.Mon="MON",e.Sat="SAT",e.Sun="SUN",e.Thu="THU",e.Tue="TUE",e.Wed="WED"})(hB||(hB={}));var SB;(function(e){e.Deleted="DELETED"})(SB||(SB={}));var gB;(function(e){e.Kilometers="KILOMETERS",e.Meters="METERS",e.Miles="MILES"})(gB||(gB={}));var mB;(function(e){e.BwellPatient="BWELL_PATIENT",e.BwellPerson="BWELL_PERSON",e.ClientPatient="CLIENT_PATIENT",e.ClientPerson="CLIENT_PERSON"})(mB||(mB={}));var vB;(function(e){e.Active="active",e.EnteredInError="entered_in_error",e.Error="error",e.Off="off",e.Suspended="suspended",e.Test="test"})(vB||(vB={}));var EB;(function(e){e.Active="ACTIVE",e.EnteredInError="ENTERED_IN_ERROR",e.Error="ERROR",e.Off="OFF",e.Suspended="SUSPENDED",e.Test="TEST"})(EB||(EB={}));var nM;(function(e){e.CustomEvent="CUSTOM_EVENT",e.MobilePushOpen="MOBILE_PUSH_OPEN"})(nM||(nM={}));var rM;(function(e){e.Female="female",e.Male="male",e.Other="other",e.Unknown="unknown"})(rM||(rM={}));var iM;(function(e){e.Person="Person"})(iM||(iM={}));var aM;(function(e){e.Characteristic="characteristic",e.Communication="communication",e.Gender="gender",e.Specialty="specialty"})(aM||(aM={}));var yB;(function(e){e.Characteristic="CHARACTERISTIC",e.Communication="COMMUNICATION",e.Gender="GENDER",e.InsurancePlan="INSURANCE_PLAN",e.Specialty="SPECIALTY"})(yB||(yB={}));var TB;(function(e){e.Female="female",e.Male="male",e.Other="other",e.Unknown="unknown"})(TB||(TB={}));var AB;(function(e){e.Female="FEMALE",e.Male="MALE",e.Other="OTHER",e.Unknown="UNKNOWN"})(AB||(AB={}));var CB;(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"})(CB||(CB={}));var bB;(function(e){e.Official="_official",e.Old="_old",e.Secondary="_secondary",e.Temp="_temp",e.Usual="_usual"})(bB||(bB={}));var OB;(function(e){e.Cognito="COGNITO",e.Descope="DESCOPE"})(OB||(OB={}));var RB;(function(e){e.Direct="DIRECT",e.DirectIas="DIRECT_IAS",e.Ial2="IAL2",e.IndirectIas="INDIRECT_IAS",e.Proa="PROA"})(RB||(RB={}));var PB;(function(e){e.Clicked="clicked"})(PB||(PB={}));var MB;(function(e){e.Clicked="CLICKED"})(MB||(MB={}));var oM;(function(e){e.Debug="DEBUG",e.Error="ERROR",e.Info="INFO",e.Verbose="VERBOSE",e.Warn="WARN"})(oM||(oM={}));var sM;(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"})(sM||(sM={}));var IB;(function(e){e.CancelDelete="CANCEL_DELETE",e.ConfirmDelete="CONFIRM_DELETE",e.DeletionInProgress="DELETION_IN_PROGRESS",e.ImmediateExecution="IMMEDIATE_EXECUTION",e.RequestDelete="REQUEST_DELETE"})(IB||(IB={}));var uM;(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"})(uM||(uM={}));var DB;(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"})(DB||(DB={}));var NB;(function(e){e.Add="add",e.Copy="copy",e.Move="move",e.Remove="remove",e.Replace="replace",e.Test="test"})(NB||(NB={}));var LB;(function(e){e.ExistingPatients="EXISTING_PATIENTS",e.NewPatients="NEW_PATIENTS"})(LB||(LB={}));var wB;(function(e){e.Patient="Patient",e.Person="Person"})(wB||(wB={}));var UB;(function(e){e.Practice="practice",e.Practitioner="practitioner"})(UB||(UB={}));var $B;(function(e){e.Practice="PRACTICE",e.Practitioner="PRACTITIONER"})($B||($B={}));var GB;(function(e){e.QuestionnaireResponse="QuestionnaireResponse"})(GB||(GB={}));var FB;(function(e){e.Closed="CLOSED",e.Hold="HOLD",e.New="NEW",e.Open="OPEN",e.Pending="PENDING",e.Solved="SOLVED"})(FB||(FB={}));var xB;(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"})(xB||(xB={}));var VB;(function(e){e.DataConnections="DATA_CONNECTIONS",e.FindCare="FIND_CARE"})(VB||(VB={}));var kB;(function(e){e.Insurance="INSURANCE",e.Laboratory="LABORATORY",e.Pharmacy="PHARMACY",e.Practice="PRACTICE",e.Practitioner="PRACTITIONER"})(kB||(kB={}));var BB;(function(e){e.Abortion="ABORTION",e.AbuseNeglect="ABUSE_NEGLECT",e.DomesticViolence="DOMESTIC_VIOLENCE",e.GenderAffirming="GENDER_AFFIRMING",e.GeneticTesting="GENETIC_TESTING",e.HivAids="HIV_AIDS",e.Mammography="MAMMOGRAPHY",e.MentalHealth="MENTAL_HEALTH",e.ReproductiveHealthcare="REPRODUCTIVE_HEALTHCARE",e.SexualAssault="SEXUAL_ASSAULT",e.Std="STD",e.SubstanceAbuse="SUBSTANCE_ABUSE",e.SubstanceAlcohol="SUBSTANCE_ALCOHOL"})(BB||(BB={}));var jB;(function(e){e.UpdatedAt="UPDATED_AT"})(jB||(jB={}));var cM;(function(e){e.Content="content",e.Distance="distance",e.Relevance="relevance"})(cM||(cM={}));var qB;(function(e){e.Content="CONTENT",e.DataSourceRank="DATA_SOURCE_RANK",e.Distance="DISTANCE",e.Name="NAME",e.NextAvailable="NEXT_AVAILABLE",e.OnlineBookingAvailable="ONLINE_BOOKING_AVAILABLE",e.Relevance="RELEVANCE"})(qB||(qB={}));var NE;(function(e){e.Asc="asc",e.Desc="desc"})(NE||(NE={}));var QB;(function(e){e.Asc="ASC",e.Desc="DESC"})(QB||(QB={}));var HB;(function(e){e.CareSearch="CARE_SEARCH",e.Proa="PROA",e.ProviderDetails="PROVIDER_DETAILS",e.Sayt="SAYT",e.Unspecified="UNSPECIFIED"})(HB||(HB={}));var YB;(function(e){e.DataDeleted="DATA_DELETED",e.Deleting="DELETING",e.Error="ERROR",e.Pending="PENDING",e.Retrieved="RETRIEVED",e.Retrieving="RETRIEVING"})(YB||(YB={}));var lM;(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"})(lM||(lM={}));var LE;(function(e){e.Accurate="accurate",e.Estimate="estimate"})(LE||(LE={}));var zB;(function(e){e.Active="ACTIVE",e.Completed="COMPLETED"})(zB||(zB={}));var WB;(function(e){e.PersonMatchError="PERSON_MATCH_ERROR",e.ServerError="SERVER_ERROR"})(WB||(WB={}));const Qne=new Set(Object.values(rM));function KB(e){return Qne.has(e)}const Hne=new Set(Object.values(tM));function Yne(e){return Hne.has(e)}const zne=new Set(Object.values(IE));function XB(e){return zne.has(e)}const Wne=new Set(Object.values(eM));function Kne(e){return Wne.has(e)}class Xne{validate(t,n){!uo(t.gender)&&!KB(t.gender)&&n.add(`Invalid gender value: "${t.gender}"`)}}class PVe extends Ur{constructor(){super(...arguments),this.validator=new Xne}}class Jne{validate(t,n){XB(t.category)||n.add(`Invalid consent category code: "${t.category}"`)}}class MVe extends Ur{constructor(){super(...arguments),this.validator=new Jne}}class Zne{validate(t,n){Yne(t.status)||n.add(`Invalid consent status: "${t.status}"`),Kne(t.provision)||n.add(`Invalid consent provision type: "${t.provision}"`),XB(t.category)||n.add(`Invalid consent category code: "${t.category}"`),!uo(t.organizationId)&&Ra(t.organizationId)&&n.add("organizationId cannot be empty"),t.category===IE.ProaAttestation&&uo(t.organizationId)&&n.add("organizationId must be provided when category is PROA_ATTESTATION")}}class IVe extends Ur{constructor(){super(...arguments),this.validator=new Zne}}class ere{validate(t,n){pa(t.exportId)&&n.add("exportId is required"),pa(t.password)&&n.add("password is required")}}class DVe extends Ur{constructor(){super(...arguments),this.validator=new ere}}class NVe extends null{}var Ao=function(e,t,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(e):r?r.value:t.get(e)},ka,_c,JB,ZB,ej,tj,nj,rj;class Ll{constructor(){ka.add(this)}validate(t,n){if(!t.values||t.values.length===0){n.add("At least one SearchDateValue must be set to instantiate a SearchDate");return}for(const r of t.values)Ao(this,ka,"m",JB).call(this,r,n)}}ka=new WeakSet,_c=function(t,n){t&&t!==null&&isNaN(t.getTime())&&n.add("The date is not valid")},JB=function(t,n){const{equals:r,notEquals:i,greaterThan:a,greaterThanOrEqualTo:c,lessThan:f,lessThanOrEqualTo:T,approximately:h}=t,G=[r,i,a,c,f,T,h].filter(H=>H!=null).length;if(G===0){n.add("At least one SearchDateValue must be set to instantiate a SearchDate");return}Ao(this,ka,"m",ZB).call(this,t,G,n),Ao(this,ka,"m",nj).call(this,t,n),Ao(this,ka,"m",rj).call(this,t,n)},ZB=function(t,n,r){const{equals:i,notEquals:a,approximately:c}=t;if(i&&n>1){r.add("The equals value cannot be set with any other values");return}if(a&&n>1){r.add("The notEquals value cannot be set with any other values");return}if(c&&n>1){r.add("The approximately value cannot be set with any other values");return}Ao(this,ka,"m",ej).call(this,t,r),Ao(this,ka,"m",tj).call(this,t,r)},ej=function(t,n){t.greaterThan&&t.greaterThanOrEqualTo&&n.add("The greaterThan/greaterThanOrEqualTo value cannot be set with both values")},tj=function(t,n){t.lessThan&&t.lessThanOrEqualTo&&n.add("The lessThan/lessThanOrEqualTo value cannot be set with both values")},nj=function(t,n){const{equals:r,notEquals:i,greaterThan:a,greaterThanOrEqualTo:c,lessThan:f,lessThanOrEqualTo:T,approximately:h}=t;r&&Ao(this,ka,"m",_c).call(this,r,n),i&&Ao(this,ka,"m",_c).call(this,i,n),a&&Ao(this,ka,"m",_c).call(this,a,n),c&&Ao(this,ka,"m",_c).call(this,c,n),f&&Ao(this,ka,"m",_c).call(this,f,n),T&&Ao(this,ka,"m",_c).call(this,T,n),h&&Ao(this,ka,"m",_c).call(this,h,n)},rj=function(t,n){const{greaterThan:r,greaterThanOrEqualTo:i,lessThan:a,lessThanOrEqualTo:c}=t;r&&c&&r>=c&&n.add("The greaterThan value must be less than the lessThanOrEqualTo value"),i&&a&&i>=a&&n.add("The greaterThanOrEqualTo value must be less than the lessThan value"),r&&a&&r>=a&&n.add("The greaterThan value must be less than the lessThan value"),i&&c&&i>=c&&n.add("The greaterThanOrEqualTo value must be less than the lessThanOrEqualTo value")};var dM=function(e,t,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(e):r?r.value:t.get(e)},$h;class wl{constructor(){$h.set(this,new tre)}validate(t,n){var r;if(t.value===void 0&&t.values===void 0&&t.notEquals===void 0){n.add("Either SearchToken value or values or notEquals must be provided");return}if(t.value!==void 0&&dM(this,$h,"f").validate(t.value,n),t.values!==void 0&&t.values.length===0){n.add("At least one Coding must be set to instantiate a SearchToken");return}for(const i of(r=t.values)!==null&&r!==void 0?r:[])dM(this,$h,"f").validate(i,n);if(t.notEquals!==void 0){if(t.notEquals.values!==void 0){if(t.notEquals.values.length===0){n.add("If notEquals values are provided, at least one Coding must be set");return}for(const i of t.notEquals.values)dM(this,$h,"f").validate(i,n)}t.notEquals.code===void 0&&t.notEquals.value===void 0&&t.notEquals.system===void 0&&t.notEquals.values===void 0&&n.add("NotEquals must have at least one non-null property (code, value, system, or values)")}}}$h=new WeakMap;class tre{validate(t,n){!t.system&&!t.code&&n.add("Each Coding in the list must have at least one non-null and non-empty value for system or code")}}var Pf=function(e,t,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(e):r?r.value:t.get(e)},fM,_M,pM,hM,SM,gM;class ij extends Yi{constructor(){super(...arguments),fM.set(this,new wl),_M.set(this,new Ll)}validate(t,n){super.validate(t,n),t.groupCode&&Pf(this,fM,"f").validate(t.groupCode,n),t.lastUpdated&&Pf(this,_M,"f").validate(t.lastUpdated,n)}}fM=new WeakMap,_M=new WeakMap;class nre{validate(t,n){t.length===0&&n.add("Prescription array must not be empty.")}}class aj extends Yi{constructor(){super(...arguments),pM.set(this,new nre),hM.set(this,new Ll)}validate(t,n){super.validate(t,n),t.lastUpdated!==void 0&&Pf(this,hM,"f").validate(t.lastUpdated,n),t.prescription!==void 0&&Pf(this,pM,"f").validate(t.prescription,n)}}pM=new WeakMap,hM=new WeakMap;class rre extends Yi{validate(t,n){var r;super.validate(t,n),!((r=t?.ids)===null||r===void 0)&&r.length||n.add("ids must not be empty")}}class ire extends zi{constructor(){super(...arguments),this.validator=new ij}}class LVe extends null{}class wVe extends null{}class UVe extends null{}class $Ve extends null{}class GVe extends null{}class FVe extends null{}class xVe extends null{}class VVe extends null{}class kVe extends null{}class BVe extends null{}class jVe extends null{}class qVe extends null{}class QVe extends null{}class HVe extends null{}class YVe extends null{}class zVe extends null{}class WVe extends null{}class KVe extends null{}class XVe extends null{}class JVe extends null{}class are extends aj{constructor(){super(...arguments),SM.set(this,new wl)}validate(t,n){super.validate(t,n),t.medicationCode!==void 0&&Pf(this,SM,"f").validate(t.medicationCode,n)}}SM=new WeakMap;class ZVe extends zi{constructor(){super(...arguments),this.validator=new aj}}class e1e extends zi{constructor(){super(...arguments),this.validator=new are}}class ore extends ij{constructor(){super(...arguments),gM.set(this,new wl)}validate(t,n){super.validate(t,n),t.medicationCode!==void 0&&Pf(this,gM,"f").validate(t.medicationCode,n)}}gM=new WeakMap;class t1e extends ire{constructor(){super(...arguments),this.validator=new ore}}class n1e extends null{}class r1e extends null{}class i1e extends zi{constructor(){super(...arguments),this.validator=new rre}}class sre{validate(t,n){Ra(t.medicationStatementId)&&n.add("The medication pricing request must possess a medication statement id.")}}class a1e extends Ur{constructor(){super(...arguments),this.validator=new sre}}class ure extends Yi{validate(t,n){Ra(t.medicationStatementId)&&n.add("The medication knowledge request must possess a medication statement id."),super.validate(t,n)}}class o1e extends zi{constructor(){super(...arguments),this.validator=new ure}}class cre extends Yi{validate(t,n){Ra(t.labId)&&n.add("The lab knowledge request must contain a lab id."),super.validate(t,n)}}class s1e extends zi{constructor(){super(...arguments),this.validator=new cre}}var oj;(function(e){e.Active="ACTIVE",e.Completed="COMPLETED"})(oj||(oj={}));class lre{validate(t,n){Va(t)&&n.add("input must be provided."),pa(t.id)&&n.add("id must be a non-empty string."),Va(t.status)&&n.add("status is required.")}}class u1e extends Ur{constructor(){super(...arguments),this.validator=new lre}}const dre=new Set(Object.values(lM));function sj(e){return dre.has(e)}var fre=function(e,t,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(e):r?r.value:t.get(e)},mM,uj;class _re extends Yi{constructor(){super(...arguments),mM.add(this)}validate(t,n){if(super.validate(t,n),!uo(t.status)){const r=Array.isArray(t.status)?t.status:[t.status];for(const i of r)fre(this,mM,"m",uj).call(this,i,n)}}}mM=new WeakSet,uj=function(t,n){sj(t)||n.add(`Invalid task status: "${t}"`)};class c1e extends zi{constructor(){super(...arguments),this.validator=new _re}}class pre{validate(t,n){sj(t.newStatus)||n.add(`Invalid task status: "${t.newStatus}"`)}}class l1e extends Ur{constructor(){super(...arguments),this.validator=new pre}}var wE=function(e,t,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(e):r?r.value:t.get(e)},Mf,cj,lj,dj,fj;class d1e extends zi{constructor(){super(...arguments),this.validator=new hre}}class hre extends Yi{constructor(){super(...arguments),Mf.add(this)}validate(t,n){super.validate(t,n),Sr(t.organizationTypeFilters)&&wE(this,Mf,"m",cj).call(this,t.organizationTypeFilters,n),Sr(t.sortBy)&&wE(this,Mf,"m",lj).call(this,t.sortBy,n),Sr(t.filterFields)&&wE(this,Mf,"m",dj).call(this,t.filterFields,n),Sr(t.gender)&&wE(this,Mf,"m",fj).call(this,t.gender,n)}}Mf=new WeakSet,cj=function(t,n){for(const r of t)gre(r)||n.add(`Invalid organizationTypeFilters value: "${r}"`)},lj=function(t,n){Sr(t.field)&&!vre(t.field)&&n.add(`Invalid sortBy.field value: "${t.field}"`),Sr(t.order)&&!yre(t.order)&&n.add(`Invalid sortBy.order value: "${t.order}"`)},dj=function(t,n){for(const r of t)Are(r)||n.add(`Invalid filterField value: "${r}"`)},fj=function(t,n){KB(t)||n.add(`Invalid gender value: "${t}"`)};const Sre=new Set(Object.values(uM));function gre(e){return Sre.has(e)}const mre=new Set(Object.values(cM));function vre(e){return mre.has(e)}const Ere=new Set(Object.values(NE));function yre(e){return Ere.has(e)}const Tre=new Set(Object.values(aM));function Are(e){return Tre.has(e)}class f1e extends null{}class _1e extends zi{constructor(){super(...arguments),this.validator=new Cre}}class Cre extends Yi{validate(t,n){super.validate(t,n)}}const bre="data-connection-status";var Ore=function(e,t,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(e):r?r.value:t.get(e)},vM;const Rre="connectionId cannot be null or empty",Pre="username cannot be null or empty",Mre="password cannot be null or empty",Ire="integrationType array cannot be empty",Dre="integrationType array cannot contain blank or empty strings";class _j{validate(t,n){t.connectionId===""&&n.add(Rre)}}class Nre{constructor(){vM.set(this,new _j)}validate(t,n){Ore(this,vM,"f").validate(t,n),t.username===""&&n.add(Pre),t.password===""&&n.add(Mre)}}vM=new WeakMap;class Lre extends Ur{constructor(){super(...arguments),this.validator=new _j}}class p1e extends null{}class h1e extends Lre{constructor(){super(...arguments),this.validator=new Nre}}class S1e extends Ur{constructor(){super(...arguments),this.validator={validate:(t,n)=>{t.integrationType!==void 0&&t.integrationType!==null&&(t.integrationType.length===0&&n.add(Ire),t.integrationType.some(r=>r===""||r.trim()==="")&&n.add(Dre))}}}data(){return this.input()}}const wre="deviceToken is required",Ure="platformName must be a valid DevicePlatform value",$re="applicationName is required";var EM;(function(e){e.IOS="IOS",e.ANDROID="ANDROID"})(EM||(EM={}));const Gre=new Set(Object.values(EM));function Fre(e){return Gre.has(e)}function xre(e){return!Fre(e)}class pj{validate(t,n){Ra(t.deviceToken)&&n.add(wre)}}class Vre extends pj{validate(t,n){super.validate(t,n),xre(t.platformName.toUpperCase())&&n.add(Ure),Ra(t.applicationName)&&n.add($re)}}class g1e extends Ur{constructor(){super(...arguments),this.validator=new Vre}}class m1e extends Ur{constructor(){super(...arguments),this.validator=new pj}}const kre="string parameter serializedNotification must be provided",Bre="serialized notification must have a non-empty notification_id field of type string",hj="serialized notification must have an itbl object containing a non-empty messageId field of type string",jre="parsed notification must be a non-null object.",qre="serialized notification is not valid JSON.";class Qre{validate(t,n){if(uo(t.serializedNotification)||typeof t.serializedNotification!="string"||Ra(t.serializedNotification)){n.add(kre);return}let r=null;try{r=JSON.parse(t.serializedNotification)}catch{n.add(qre);return}if(typeof r!="object"||r===null){n.add(jre);return}const{itbl:i,notification_id:a}=r;if((uo(a)||typeof a!="string"||Ra(a))&&n.add(Bre),typeof i!="object"||Va(i)){n.add(hj);return}(uo(i.messageId)||typeof i.messageId!="string"||Ra(i.messageId))&&n.add(hj)}}class v1e extends Ur{constructor(){super(...arguments),this.validator=new Qre}}var yM=function(e,t,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(e):r?r.value:t.get(e)},Gh;class Hre extends Yi{constructor(){super(...arguments),Gh.set(this,new Ll)}validate(t,n){(uo(t.coverage)||Ra(t.coverage))&&n.add("The claim summary request must contain a coverage ID."),Sr(t.dateReceived)&&yM(this,Gh,"f").validate(t.dateReceived,n),Sr(t.servicePeriod)&&yM(this,Gh,"f").validate(t.servicePeriod,n),Sr(t.dateProcessed)&&yM(this,Gh,"f").validate(t.dateProcessed,n),super.validate(t,n)}}Gh=new WeakMap;class E1e extends zi{constructor(){super(...arguments),this.validator=new Hre}}const Yre="SearchReference value should be a non-empty string";class Sj{validate(t,n){Va(t.value)||(typeof t.value!="string"||Ra(t.value))&&n.add(Yre)}}const zre="SearchStringValue should be a non-empty string";class Fh{validate(t,n){if(Va(t.values))return;let r=!1;for(const i of t.values)Ra(i)&&(r=!0);r&&n.add(zre)}}var UE=function(e,t,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(e):r?r.value:t.get(e)},TM,AM,$E;class Wre extends Yi{constructor(){super(...arguments),TM.set(this,new Fh),AM.set(this,new Ll),$E.set(this,new Sj)}validate(t,n){super.validate(t,n),Sr(t.id)&&UE(this,TM,"f").validate(t.id,n),Sr(t.lastUpdated)&&UE(this,AM,"f").validate(t.lastUpdated,n),Sr(t.beneficiary)&&UE(this,$E,"f").validate(t.beneficiary,n),Sr(t.patient)&&UE(this,$E,"f").validate(t.patient,n)}}TM=new WeakMap,AM=new WeakMap,$E=new WeakMap;class y1e extends zi{constructor(){super(...arguments),this.validator=new Wre}}class Kre extends Yi{validate(t,n){super.validate(t,n)}}class T1e extends zi{constructor(){super(...arguments),this.validator=new Kre}}var Ul=function(e,t,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(e):r?r.value:t.get(e)},CM,GE,xh,bM;class Xre extends Yi{constructor(){super(...arguments),CM.set(this,new Fh),GE.set(this,new Ll),xh.set(this,new Sj),bM.set(this,new wl)}validate(t,n){super.validate(t,n),Sr(t.id)&&Ul(this,CM,"f").validate(t.id,n),Sr(t.lastUpdated)&&Ul(this,GE,"f").validate(t.lastUpdated,n),Sr(t.created)&&Ul(this,GE,"f").validate(t.created,n),Sr(t.patient)&&Ul(this,xh,"f").validate(t.patient,n),Sr(t.provider)&&Ul(this,xh,"f").validate(t.provider,n),Sr(t.coverage)&&Ul(this,xh,"f").validate(t.coverage,n),Sr(t.status)&&Ul(this,bM,"f").validate(t.status,n)}}CM=new WeakMap,GE=new WeakMap,xh=new WeakMap,bM=new WeakMap;class A1e extends zi{constructor(){super(...arguments),this.validator=new Xre}}var OM=function(e,t,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(e):r?r.value:t.get(e)},RM,PM,MM;class Jre{constructor(){RM.set(this,new Ll),PM.set(this,new Fh),MM.set(this,new wl)}validate(t,n){var r;Hn(t._source)&&OM(this,PM,"f").validate(t._source,n),Hn(t.date)&&OM(this,RM,"f").validate(t.date,n),Hn(t._count)&&t._count<0&&n.add("Value of count cannot be less than 0"),Hn(t._getpagesoffset)&&t._getpagesoffset<0&&n.add("Value of getpagesoffset cannot be less than 0"),Hn((r=t.supporting_info)===null||r===void 0?void 0:r.value)&&Ra(t.supporting_info.value)&&n.add("Supporting Information must have a non-empty value."),Hn(t.status)&&OM(this,MM,"f").validate(t.status,n)}}RM=new WeakMap,PM=new WeakMap,MM=new WeakMap;class C1e extends Ur{constructor(){super(...arguments),this.validator=new Jre}}class Zre{validate(t,n){if(!Va(t.cancelationReason)){if(Va(t.cancelationReason.coding)||t.cancelationReason.coding.length===0){n.add("cancelationReason must have at least one coding");return}for(const r of t.cancelationReason.coding)(Va(r?.code)||Va(r?.system))&&n.add("cancelationReason.coding must have a code and a system")}}}class b1e extends Ur{constructor(){super(...arguments),this.validator=new Zre}}class eie{validate(t,n){var r;pa((r=t.organization.value)===null||r===void 0?void 0:r.trim())&&n.add("Organization reference is required and must have a non-empty value.")}}class O1e extends Ur{constructor(){super(...arguments),this.validator=new eie}}class FE{validate(t,n,r={}){const{requireRole:i=!0}=r;Hn(t.id)?Ra(t.id)?n.add("Member id cannot be empty"):t.id.length>255&&n.add("Member id cannot exceed 255 characters"):n.add("Member id is required"),Hn(t.type)?Ra(t.type)&&n.add("Member type cannot be empty"):n.add("Member type is required");const a=Hn(t.role);if(i&&!a&&n.add("Member role is required"),a&&t.role)for(let c=0;c<t.role.length;c++){const f=t.role[c];Hn(f)?Ra(f)&&n.add(`Role ${c}: Cannot be blank`):n.add(`Role ${c}: Cannot be null or undefined`)}}}class R1e extends Ur{constructor(){super(...arguments),this.validator=new FE}}class tie{constructor(){this.updateValidator=new FE}validate(t,n){this.updateValidator.validate(t,n,{requireRole:!1})}}class P1e extends Ur{constructor(){super(...arguments),this.validator=new tie}}class nie{constructor(){this.updateValidator=new FE}validate(t,n){this.updateValidator.validate(t,n,{requireRole:!0})}}class M1e extends Ur{constructor(){super(...arguments),this.validator=new nie}}class rie{constructor(){this.updateValidator=new FE}validate(t,n){if(!Hn(t.members)){n.add("Members array is required");return}if(t.members.length===0){n.add("Members array cannot be empty");return}for(let r=0;r<t.members.length;r++){const i=t.members[r];if(!Hn(i)){n.add(`Member ${r}: Cannot be null or undefined`);continue}const a=new zk;this.updateValidator.validate(i,a,{requireRole:!0});for(const c of a.errors())n.add(`Member ${r}: ${c}`)}}}class I1e extends Ur{constructor(){super(...arguments),this.validator=new rie}}class iie extends Yi{validate(t,n){super.validate(t,n)}}class aie extends zi{constructor(){super(...arguments),this.validator=new iie}}class oie{validate(t,n){const r=t.questionnaireResponse;if(Va(r)){n.add("questionnaireResponse is required");return}if((pa(r.resourceType)||r.resourceType!=="QuestionnaireResponse")&&n.add('questionnaireResponse.resourceType must be "QuestionnaireResponse"'),pa(r.status)&&n.add("questionnaireResponse.status is required"),pa(r.questionnaire)&&n.add("questionnaireResponse.questionnaire is required"),Va(r.contained)||r.contained.length===0)n.add("questionnaireResponse.contained must have at least one item");else{let i=null;for(const a of r.contained){if(Va(a)){n.add("questionnaireResponse.contained item cannot be null or undefined");break}if(a.resourceType==="Questionnaire"){i=a;break}}if(Va(i)){n.add("questionnaireResponse.contained must contain a Questionnaire resource");return}pa(i.id)&&n.add("questionnaireResponse.contained Questionnaire resource must have an id")}}}class D1e extends Ur{constructor(){super(...arguments),this.validator=new oie}}class sie{validate(t,n){const r=t.questionnaireResponse;if(Va(r)){n.add("questionnaireResponse is required");return}(pa(r.resourceType)||r.resourceType!=="QuestionnaireResponse")&&n.add('questionnaireResponse.resourceType must be "QuestionnaireResponse"'),pa(r.status)&&n.add("questionnaireResponse.status is required"),pa(r.questionnaire)&&n.add("questionnaireResponse.questionnaire is required")}}class N1e extends Ur{constructor(){super(...arguments),this.validator=new sie}}var xE=function(e,t,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(e):r?r.value:t.get(e)},IM,DM,VE;class uie extends Yi{constructor(){super(...arguments),IM.set(this,new Ll),DM.set(this,new Fh),VE.set(this,new wl)}validate(t,n){super.validate(t,n),Hn(t.id)&&xE(this,DM,"f").validate(t.id,n),Hn(t.lastUpdated)&&xE(this,IM,"f").validate(t.lastUpdated,n),Hn(t.status)&&xE(this,VE,"f").validate(t.status,n),Hn(t.tag)&&xE(this,VE,"f").validate(t.tag,n)}}IM=new WeakMap,DM=new WeakMap,VE=new WeakMap;class L1e extends zi{constructor(){super(...arguments),this.validator=new uie}}var Vh=function(e,t,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(e):r?r.value:t.get(e)},NM,If;class cie extends Yi{constructor(){super(...arguments),NM.set(this,new Fh),If.set(this,new wl)}validate(t,n){super.validate(t,n),Hn(t.id)&&Vh(this,NM,"f").validate(t.id,n),Hn(t.tag)&&Vh(this,If,"f").validate(t.tag,n),Hn(t.security)&&Vh(this,If,"f").validate(t.security,n),Hn(t.context)&&Vh(this,If,"f").validate(t.context,n),Hn(t.identifier)&&Vh(this,If,"f").validate(t.identifier,n)}}NM=new WeakMap,If=new WeakMap;class w1e extends zi{constructor(){super(...arguments),this.validator=new cie}}class lie extends Yi{validate(t,n){super.validate(t,n)}}class U1e extends zi{constructor(){super(...arguments),this.validator=new lie}}class die{constructor(){this.dataURIRegex=/^data:[a-zA-Z0-9]+\/[a-zA-Z0-9-.+]+;base64,([A-Za-z0-9+/]*={0,2})$/}validate(t,n){t.file.trim()||n.add("File content is required"),t.file.trim()&&!this.dataURIRegex.test(t.file)&&n.add("File must be a valid data URI with base64 encoding (e.g., data:image/png;base64,...)"),t.fileName.trim()||n.add("File name is required")}}class $1e extends Ur{constructor(){super(...arguments),this.validator=new die}}class fie{validate(t,n){t.attachmentId.trim()||n.add("Attachment ID is required")}}class G1e extends Ur{constructor(){super(...arguments),this.validator=new fie}}class _ie{validate(t,n){t.subject.trim()||n.add("Subject is required"),t.comment.body.trim()||n.add("Comment body is required"),t.fields.category.trim()||n.add("Category is required")}}class F1e extends Ur{constructor(){super(...arguments),this.validator=new _ie}}class pie extends Yi{validate(t,n){super.validate(t,n)}}class x1e extends zi{constructor(){super(...arguments),this.validator=new pie}}class hie extends Yi{validate(t,n){t.requestId<0&&n.add("requestId must be a non-negative number"),super.validate(t,n)}}class V1e extends zi{constructor(){super(...arguments),this.validator=new hie}}class Sie{validate(t,n){t.requestId<0&&n.add("Request ID must be a non-negative integer"),pa(t.body.trim())&&n.add("Comment body is required")}}class k1e extends Ur{constructor(){super(...arguments),this.validator=new Sie}}class gie{validate(t,n){pa(t.attachmentId.trim())&&n.add("attachmentId must be a non-empty string"),t.requestId<0&&n.add("requestId must be a non-negative number")}}class B1e extends Ur{constructor(){super(...arguments),this.validator=new gie}}const mie="code cannot be null or empty";class vie{validate(t,n){pa(t.code)&&n.add(mie)}}class j1e extends Ur{constructor(){super(...arguments),this.validator=new vie}}const Eie="consentId cannot be null or empty";class yie{validate(t,n){pa(t.consentId)&&n.add(Eie)}}class Tie extends Ur{constructor(){super(...arguments),this.validator=new yie}}var LM=function(e,t,n,r){function i(a){return a instanceof n?a:new n(function(c){c(a)})}return new(n||(n=Promise))(function(a,c){function f(m){try{h(r.next(m))}catch(G){c(G)}}function T(m){try{h(r.throw(m))}catch(G){c(G)}}function h(m){m.done?a(m.value):i(m.value).then(f,T)}h((r=r.apply(e,t||[])).next())})};class wM{constructor(t=new Map){this.storage=t}get(t){return LM(this,void 0,void 0,function*(){return this.storage.get(t)})}set(t,n){return LM(this,void 0,void 0,function*(){this.storage.set(t,n)})}delete(t){return LM(this,void 0,void 0,function*(){return this.storage.delete(t)})}}const Aie={logLevel:oM.Error,timeout:3e4,retryPolicy:{attempts:3,interval:1e3},telemetryEnabled:!1,tokenStorage:new wM,language:null,overrides:{unauthedApiUrl:null,authedApiUrl:null}};var gu;(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"})(gu||(gu={}));var Cie=function(e,t,n,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="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 r==="a"?i.call(e,n):i?i.value=n:t.set(e,n),n},gj=function(e,t,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(e):r?r.value:t.get(e)},kh,Wn;(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"})(Wn||(Wn={}));const bie={[Wn.VERBOSE]:"VERBOSE",[Wn.DEBUG]:"DEBUG",[Wn.INFO]:"INFO",[Wn.WARN]:"WARN",[Wn.ERROR]:"ERROR",[Wn.FATAL]:"FATAL"};class Df{constructor(t){kh.set(this,void 0),Cie(this,kh,t,"f")}get severity(){return gj(this,kh,"f")}shouldLog(t){return t>=gj(this,kh,"f")}static severityText(t){return bie[t]}static severityFromText(t){switch(t){case"VERBOSE":return Wn.VERBOSE;case"DEBUG":return Wn.DEBUG;case"INFO":return Wn.INFO;case"WARN":return Wn.WARN;case"ERROR":return Wn.ERROR;case"FATAL":return Wn.FATAL;default:throw new Error(`Invalid severity text: ${t}`)}}}kh=new WeakMap;var UM=function(e,t,n,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="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 r==="a"?i.call(e,n):i?i.value=n:t.set(e,n),n},xs=function(e,t,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(e):r?r.value:t.get(e)},pc,mj,kE,Bh,BE,$l;class vj{constructor(t,n,r){pc.add(this),kE.set(this,void 0),Bh.set(this,void 0),BE.set(this,void 0),UM(this,kE,r,"f"),UM(this,Bh,new Df(t),"f"),UM(this,BE,n,"f")}name(){return xs(this,kE,"f")}severity(){return xs(this,Bh,"f").severity}verbose(t,n){xs(this,pc,"m",$l).call(this,Wn.VERBOSE,t,n)}debug(t,n){xs(this,pc,"m",$l).call(this,Wn.DEBUG,t,n)}info(t,n){xs(this,pc,"m",$l).call(this,Wn.INFO,t,n)}warn(t,n){xs(this,pc,"m",$l).call(this,Wn.WARN,t,n)}error(t,n){let r;n instanceof nn&&(r={error:n.failure()?n.error().message:n.data()}),n instanceof Error&&(r={error:n.message}),r===void 0&&(r=n),xs(this,pc,"m",$l).call(this,Wn.ERROR,t,r)}fatal(t,n){xs(this,pc,"m",$l).call(this,Wn.FATAL,t,n)}static otelSeverityNumber(t){switch(t){case Wn.VERBOSE:return gu.TRACE;case Wn.DEBUG:return gu.DEBUG;case Wn.INFO:return gu.INFO;case Wn.WARN:return gu.WARN;case Wn.ERROR:return gu.ERROR;case Wn.FATAL:return gu.FATAL;default:return gu.UNSPECIFIED}}}mj=vj,kE=new WeakMap,Bh=new WeakMap,BE=new WeakMap,pc=new WeakSet,$l=function(t,n,r){!xs(this,Bh,"f").shouldLog(t)||xs(this,BE,"f").emit({timestamp:Date.now(),severityNumber:mj.otelSeverityNumber(t),severityText:Df.severityText(t),body:n,attributes:r??{}})};var Ej=function(e,t,n,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="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 r==="a"?i.call(e,n):i?i.value=n:t.set(e,n),n},yj=function(e,t,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(e):r?r.value:t.get(e)},jE,qE;class Oie{constructor(t,n){jE.set(this,void 0),qE.set(this,void 0),Ej(this,qE,t,"f"),Ej(this,jE,n.loggerProvider(),"f")}getLogger(t){const n=t??"default",r=yj(this,jE,"f").getLogger(n);return new vj(yj(this,qE,"f"),r,n)}}jE=new WeakMap,qE=new WeakMap;class Rie{format(t,n,r,i){let c=`[${new Date().toISOString()}] ${Df.severityText(t)}`;return r!==void 0&&(c+=` (${r})`),c+=`: ${n}`,i===void 0?[c]:[c,i]}}var $M=function(e,t,n,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="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 r==="a"?i.call(e,n):i?i.value=n:t.set(e,n),n},Gi=function(e,t,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(e):r?r.value:t.get(e)},Vs,ks,mu;class Pie{constructor(t,n){Vs.set(this,void 0),ks.set(this,void 0),mu.set(this,void 0),$M(this,ks,new Df(t),"f"),$M(this,Vs,n,"f"),$M(this,mu,new Rie,"f")}name(){return Gi(this,Vs,"f")}severity(){return Gi(this,ks,"f").severity}verbose(t,n){Gi(this,ks,"f").shouldLog(Wn.VERBOSE)&&console.debug(...Gi(this,mu,"f").format(Wn.VERBOSE,t,Gi(this,Vs,"f"),n))}debug(t,n){Gi(this,ks,"f").shouldLog(Wn.DEBUG)&&console.debug(...Gi(this,mu,"f").format(Wn.DEBUG,t,Gi(this,Vs,"f"),n))}info(t,n){Gi(this,ks,"f").shouldLog(Wn.INFO)&&console.info(...Gi(this,mu,"f").format(Wn.INFO,t,Gi(this,Vs,"f"),n))}warn(t,n){Gi(this,ks,"f").shouldLog(Wn.WARN)&&console.warn(...Gi(this,mu,"f").format(Wn.WARN,t,Gi(this,Vs,"f"),n))}error(t,n){let r=n;n instanceof nn&&(r=n.failure()?n.error():n.data()),Gi(this,ks,"f").shouldLog(Wn.ERROR)&&console.error(...Gi(this,mu,"f").format(Wn.ERROR,t,Gi(this,Vs,"f"),r))}fatal(t,n){Gi(this,ks,"f").shouldLog(Wn.FATAL)&&console.error(...Gi(this,mu,"f").format(Wn.FATAL,t,Gi(this,Vs,"f"),n))}}Vs=new WeakMap,ks=new WeakMap,mu=new WeakMap;var Mie=function(e,t,n,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="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 r==="a"?i.call(e,n):i?i.value=n:t.set(e,n),n},Iie=function(e,t,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(e):r?r.value:t.get(e)},QE;class Fi{constructor(t=Wn.FATAL){QE.set(this,void 0),Mie(this,QE,t,"f")}getLogger(t){return new Pie(Iie(this,QE,"f"),t)}}QE=new WeakMap;var Die=function(e,t,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(e):r?r.value:t.get(e)},GM,Tj;class Nie{constructor(){GM.add(this)}createLogProvider(t,n){switch(Die(this,GM,"m",Tj).call(this,t)){case"otel":if(n===void 0)throw new Error('telemetry is required for "otel" logging');return new Oie(t.logLevel,n);case"console":return new Fi(t.logLevel)}}}GM=new WeakSet,Tj=function(t){return t.telemetry.enabled?"otel":"console"};var Xr=function(e,t,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(e):r?r.value:t.get(e)},vu=function(e,t,n,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="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 r==="a"?i.call(e,n):i?i.value=n:t.set(e,n),n},Wo,Nf,hc,Lf,Sc,Gl,Aj,Cj,bj,Oj,Rj,Pj,Mj,Ij,Dj,Nj;class HE{constructor(t){Wo.add(this),Nf.set(this,void 0),hc.set(this,void 0),Lf.set(this,void 0),Sc.set(this,void 0),Gl.set(this,void 0),this.bwellConfig=Xr(this,Wo,"m",Rj).call(this,t),vu(this,Nf,Df.severityFromText(this.bwellConfig.logLevel),"f"),vu(this,Gl,Xr(this,Wo,"m",Nj).call(this),"f"),vu(this,Lf,Xr(this,Wo,"m",Mj).call(this),"f"),vu(this,hc,Xr(this,Wo,"m",Ij).call(this),"f"),vu(this,Sc,Xr(this,Wo,"m",Dj).call(this),"f")}static initialize(t){try{const n=new HE(t);return nn.success(n)}catch(n){if(_a.isBwellError(n))return nn.failure(n);throw n}}get logLevel(){return Xr(this,Nf,"f")}get graphQL(){return Xr(this,Lf,"f")}get telemetry(){return Xr(this,hc,"f")}get http(){return Xr(this,Sc,"f")}get context(){return Xr(this,Gl,"f")}setContextUser(t){Xr(this,Gl,"f").user=t}mergeRemoteConfig(t){vu(this,Nf,Xr(this,Wo,"m",Aj).call(this,t),"f"),vu(this,Lf,Xr(this,Wo,"m",Cj).call(this,t),"f"),vu(this,hc,Object.freeze(Xr(this,Wo,"m",bj).call(this,t)),"f"),vu(this,Sc,Object.freeze(Xr(this,Wo,"m",Oj).call(this,t)),"f")}}Nf=new WeakMap,hc=new WeakMap,Lf=new WeakMap,Sc=new WeakMap,Gl=new WeakMap,Wo=new WeakSet,Aj=function(t){var n;const r=(n=t?.logLevel)!==null&&n!==void 0?n:null;return r===null?Xr(this,Nf,"f"):Df.severityFromText(r)},Cj=function(t){var n;const r=(n=t?.graphQLClient)!==null&&n!==void 0?n:null;if(r===null)return Xr(this,Lf,"f");const{authedApiUrl:i,unauthedApiUrl:a}=this.bwellConfig.overrides;return{unauthApiUrl:a??r.url,apiUrl:i??r.authUrl}},bj=function(t){var n,r;const i=(n=t?.telemetry)!==null&&n!==void 0?n:null;if(i===null)return Xr(this,hc,"f");const a=(r=i.enabled)!==null&&r!==void 0?r:Xr(this,hc,"f").enabled;if(i.collectorUrl.endsWith("/"))throw new Error('Telemetry config "collectorUrl" cannot end with a trailing slash.');let c;try{c=new URL(i.collectorUrl)}catch{throw new Error('Telemetry config "collectorUrl" malformed/is not a proper URL.')}if(c.pathname!=="/")throw new Error('Telemetry config "collectorUrl" cannot contain a path.');return Object.assign(Object.assign({},Xr(this,hc,"f")),{enabled:a,collectorUrl:i.collectorUrl})},Oj=function(t){var n,r,i;const a=(n=t?.httpClient)!==null&&n!==void 0?n:null;return a===null?Xr(this,Sc,"f"):{timeout:(r=a.requestTimeout)!==null&&r!==void 0?r:Xr(this,Sc,"f").timeout,retryPolicy:(i=a.retry)!==null&&i!==void 0?i:Xr(this,Sc,"f").retryPolicy}},Rj=function(t){return Object.assign(Object.assign({},Aie),t)},Pj=function(){try{return Gne(this.bwellConfig.clientKey)}catch{throw new Pne("It appears there is a problem with your Client Key. Contact b.well support for further assistance.")}},Mj=function(){var t,n;return{apiUrl:(t=this.bwellConfig.overrides.authedApiUrl)!==null&&t!==void 0?t:`https://api-gateway.${Xr(this,Gl,"f").env}.icanbwell.com/federated-graph-authed/graphql`,unauthApiUrl:(n=this.bwellConfig.overrides.unauthedApiUrl)!==null&&n!==void 0?n:`https://api-gateway.${Xr(this,Gl,"f").env}.icanbwell.com/federated-graph/graphql`}},Ij=function(){return{collectorUrl:"https://collector.services.icanbwell.com",enabled:this.bwellConfig.telemetryEnabled,timeout:this.bwellConfig.timeout}},Dj=function(){return{timeout:this.bwellConfig.timeout,retryPolicy:{attempts:this.bwellConfig.retryPolicy.attempts,interval:this.bwellConfig.retryPolicy.interval}}},Nj=function(){return{clientKey:this.bwellConfig.clientKey,env:Xr(this,Wo,"m",Pj).call(this),user:null}};var Lie=function(e,t,n,r){function i(a){return a instanceof n?a:new n(function(c){c(a)})}return new(n||(n=Promise))(function(a,c){function f(m){try{h(r.next(m))}catch(G){c(G)}}function T(m){try{h(r.throw(m))}catch(G){c(G)}}function h(m){m.done?a(m.value):i(m.value).then(f,T)}h((r=r.apply(e,t||[])).next())})},Lj=function(e,t,n,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="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 r==="a"?i.call(e,n):i?i.value=n:t.set(e,n),n},YE=function(e,t,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(e):r?r.value:t.get(e)},wf,zE;class wie{constructor(t,n=new Fi){wf.set(this,void 0),zE.set(this,void 0),Lj(this,zE,t,"f"),Lj(this,wf,n.getLogger("ConfigManager"),"f")}initialize(t){return Lie(this,void 0,void 0,function*(){const n=HE.initialize(t);if(n.failure())return n;const r=n.data();YE(this,wf,"f").verbose("Initializing SDK Configuration");const i=yield YE(this,zE,"f").initialize(r.context.clientKey);if(i.failure())return i.intoFailure();const a=i.data();try{r.mergeRemoteConfig(a)}catch(c){YE(this,wf,"f").error("Error merging SDK config with remote config.",c)}return YE(this,wf,"f").info("Remote SDK Configuration merged with user config"),nn.success(r)})}}wf=new WeakMap,zE=new WeakMap;class gc extends Error{response;request;constructor(t,n){const r=`${gc.extractMessage(t)}: ${JSON.stringify({response:t,request:n})}`;super(r),Object.setPrototypeOf(this,gc.prototype),this.response=t,this.request=n,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,gc)}static extractMessage(t){return t.errors?.[0]?.message??`GraphQL Error (Code: ${String(t.status)})`}}const wj=e=>e.toUpperCase(),FM=e=>typeof e=="function"?e():e,Uj=(e,t)=>e.map((n,r)=>[n,t[r]]),Uf=e=>{let t={};return e instanceof Headers?t=Uie(e):Array.isArray(e)?e.forEach(([n,r])=>{n&&r!==void 0&&(t[n]=r)}):e&&(t=e),t},Uie=e=>{const t={};return e.forEach((n,r)=>{t[r]=n}),t},$ie=e=>{try{const t=e();return Gie(t)?t.catch(n=>$j(n)):t}catch(t){return $j(t)}},$j=e=>e instanceof Error?e:new Error(String(e)),Gie=e=>typeof e=="object"&&e!==null&&"then"in e&&typeof e.then=="function"&&"catch"in e&&typeof e.catch=="function"&&"finally"in e&&typeof e.finally=="function",xM=e=>{throw new Error(`Unhandled case: ${String(e)}`)},WE=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),q1e=e=>Object.entries(e),Q1e=e=>Object.values(e),H1e=(e,t)=>Object.fromEntries(Object.entries(e).map(([n,r])=>[n,t(r,n)])),Y1e=e=>e.charAt(0).toLowerCase()+e.slice(1);function z1e(e){if(!Array.isArray(e))throw new Error(`Expected array. Got: ${String(e)}`)}function W1e(e){if(e===null||typeof e!="object")throw new Error(`Expected object. Got: ${String(e)}`)}const K1e=e=>e.charAt(0).toUpperCase()+e.slice(1),X1e=e=>{let t=!1,n,r;return{promise:new Promise((a,c)=>{n=a,r=c}),isResolved:()=>t,resolve:a=>{if(t=!0,e?.strict&&t)throw new Error(`Deferred is already resolved. Attempted to resolve with: ${JSON.stringify(a)}`);n(a)},reject:a=>r(a)}},Fie=(...e)=>{process.env.DEBUG&&console.log(...e)},J1e=(...e)=>(...t)=>{Fie(...e,...t)},Z1e=e=>{const t=[],n=[];for(const r of e)r instanceof Error?t.push(r):n.push(r);return[n,t]},eke=async(...e)=>{const t=xie(e);return new GraphQLClient(t.url).batchRequests(t)},xie=e=>e.length===1?e[0]:{url:e[0],documents:e[1],requestHeaders:e[2],signal:void 0},Vie=(e,t)=>e.documents?e:{documents:e,requestHeaders:t,signal:void 0},tke=async(...e)=>{const[t,n,...r]=e,i=kie(t,n,...r);return new GraphQLClient(i.url).rawRequest({...i})},kie=(e,t,...n)=>{const[r,i]=n;return typeof e=="string"?{url:e,query:t,variables:r,requestHeaders:i,signal:void 0}:e},Bie=(e,t,n)=>e.query?e:{query:e,variables:t,requestHeaders:n,signal:void 0};var jie=_(2455);const Gj="Accept",VM="Content-Type",kM="application/json",Fj="application/graphql-response+json",nke={success:200},xj=e=>e.replace(/([\s,]|#[^\n\r]+)+/g," ").trim(),qie=e=>{const t=e.toLowerCase();return t.includes(Fj)||t.includes(kM)},Vj=e=>{try{if(Array.isArray(e))return{_tag:"Batch",executionResults:e.map(kj)};if(WE(e))return{_tag:"Single",executionResult:kj(e)};throw new Error(`Invalid execution result: result is not object or array.
|
|
12900
12900
|
Got:
|
|
12901
12901
|
${String(e)}`)}catch(t){return t}},kj=e=>{if(typeof e!="object"||e===null)throw new Error("Invalid execution result: result is not object");let t,n,r;if("errors"in e){if(!WE(e.errors)&&!Array.isArray(e.errors))throw new Error("Invalid execution result: errors is not plain object OR array");t=e.errors}if("data"in e){if(!WE(e.data)&&e.data!==null)throw new Error("Invalid execution result: data is not plain object");n=e.data}if("extensions"in e){if(!WE(e.extensions))throw new Error("Invalid execution result: extensions is not plain object");r=e.extensions}return{data:n,errors:t,extensions:r}},Qie=e=>e._tag==="Batch"?e.executionResults.some(Bj):Bj(e.executionResult),Bj=e=>Array.isArray(e.errors)?e.errors.length>0:Boolean(e.errors),jj=e=>typeof e=="object"&&e!==null&&"kind"in e&&e.kind===jie.b.OPERATION_DEFINITION;var Hie=_(5157),Yie=_(2704);const zie=e=>{let t;const n=e.definitions.filter(jj);return n.length===1&&(t=n[0].name?.value),t},Wie=e=>{let t=!1;const n=e.definitions.filter(jj);return n.length===1&&(t=n[0].operation==="mutation"),t},BM=(e,t)=>{const n=typeof e=="string"||"kind"in e?e:String(e),r=typeof n=="string"?n:(0,Yie.y)(n);let i=!1,a;if(t)return{expression:r,isMutation:i,operationName:a};const c=$ie(()=>typeof n=="string"?(0,Hie.qg)(n):n);return c instanceof Error?{expression:r,isMutation:i,operationName:a}:(a=zie(c),i=Wie(c),{expression:r,operationName:a,isMutation:i})},jM=JSON,qM=async e=>{const t={...e,method:e.request._tag==="Single"?e.request.document.isMutation?"POST":wj(e.method??"post"):e.request.hasMutations?"POST":wj(e.method??"post"),fetchOptions:{...e.fetchOptions,errorPolicy:e.fetchOptions.errorPolicy??"none"}},r=await Xie(t.method)(t),i=await r.text();let a;try{a=Kie(i,r.headers.get(VM),e.fetchOptions.jsonSerializer??jM)}catch(f){a=f}const c={status:r.status,headers:r.headers,body:i};if(!r.ok){if(a instanceof Error)return new gc({...c},{query:e.request._tag==="Single"?e.request.document.expression:e.request.query,variables:e.request.variables});const f=a._tag==="Batch"?{...a.executionResults,...c}:{...a.executionResult,...c};return new gc(f,{query:e.request._tag==="Single"?e.request.document.expression:e.request.query,variables:e.request.variables})}if(a instanceof Error)throw a;if(Qie(a)&&t.fetchOptions.errorPolicy==="none"){const f=a._tag==="Batch"?{...a.executionResults,...c}:{...a.executionResult,...c};return new gc(f,{query:e.request._tag==="Single"?e.request.document.expression:e.request.query,variables:e.request.variables})}switch(a._tag){case"Single":return{...c,...qj(t)(a.executionResult)};case"Batch":return{...c,data:a.executionResults.map(qj(t))};default:xM(a)}},qj=e=>t=>({extensions:t.extensions,data:t.data,errors:e.fetchOptions.errorPolicy==="all"?t.errors:void 0}),Kie=(e,t,n)=>t&&qie(t)?Vj(n.parse(e)):Vj(e),Xie=e=>async t=>{const n=new Headers(t.headers);let r=null,i;n.has(Gj)||n.set(Gj,[Fj,kM].join(", ")),e==="POST"?(i=(t.fetchOptions.jsonSerializer??jM).stringify(Jie(t)),typeof i=="string"&&!n.has(VM)&&n.set(VM,kM)):r=Zie(t);const a={method:e,headers:n,body:i,...t.fetchOptions};let c=new URL(t.url),f=a;if(t.middleware){const h=await Promise.resolve(t.middleware({...a,url:t.url,operationName:t.request._tag==="Single"?t.request.document.operationName:void 0,variables:t.request.variables})),{url:m,...G}=h;c=new URL(m),f=G}return r&&r.forEach((h,m)=>{c.searchParams.append(m,h)}),await(t.fetch??fetch)(c,f)},Jie=e=>{switch(e.request._tag){case"Single":return{query:e.request.document.expression,variables:e.request.variables,operationName:e.request.document.operationName};case"Batch":return Uj(e.request.query,e.request.variables??[]).map(([t,n])=>({query:t,variables:n}));default:throw xM(e.request)}},Zie=e=>{const t=e.fetchOptions.jsonSerializer??jM,n=new URLSearchParams;switch(e.request._tag){case"Single":return n.append("query",xj(e.request.document.expression)),e.request.variables&&n.append("variables",t.stringify(e.request.variables)),e.request.document.operationName&&n.append("operationName",e.request.document.operationName),n;case"Batch":{const r=e.request.variables?.map(c=>t.stringify(c))??[],i=e.request.query.map(xj),a=Uj(i,r).map(([c,f])=>({query:c,variables:f}));return n.append("query",t.stringify(a)),n}default:throw xM(e.request)}};class eae{url;requestConfig;constructor(t,n={}){this.url=t,this.requestConfig=n}rawRequest=async(...t)=>{const[n,r,i]=t,a=Bie(n,r,i),{headers:c,fetch:f=globalThis.fetch,method:T="POST",requestMiddleware:h,responseMiddleware:m,excludeOperationName:G,...H}=this.requestConfig,{url:me}=this;a.signal!==void 0&&(H.signal=a.signal);const ve=BM(a.query,G),Ce=await qM({url:me,request:{_tag:"Single",document:ve,variables:a.variables},headers:{...Uf(FM(c)),...Uf(a.requestHeaders)},fetch:f,method:T,fetchOptions:H,middleware:h});if(m&&await m(Ce,{operationName:ve.operationName,variables:r,url:this.url}),Ce instanceof Error)throw Ce;return Ce};async request(t,...n){const[r,i]=n,a=tae(t,r,i),{headers:c,fetch:f=globalThis.fetch,method:T="POST",requestMiddleware:h,responseMiddleware:m,excludeOperationName:G,...H}=this.requestConfig,{url:me}=this;a.signal!==void 0&&(H.signal=a.signal);const ve=BM(a.document,G),Ce=await qM({url:me,request:{_tag:"Single",document:ve,variables:a.variables},headers:{...Uf(FM(c)),...Uf(a.requestHeaders)},fetch:f,method:T,fetchOptions:H,middleware:h});if(m&&await m(Ce,{operationName:ve.operationName,variables:a.variables,url:this.url}),Ce instanceof Error)throw Ce;return Ce.data}async batchRequests(t,n){const r=Vie(t,n),{headers:i,excludeOperationName:a,...c}=this.requestConfig;r.signal!==void 0&&(c.signal=r.signal);const f=r.documents.map(({document:H})=>BM(H,a)),T=f.map(({expression:H})=>H),h=f.some(({isMutation:H})=>H),m=r.documents.map(({variables:H})=>H),G=await qM({url:this.url,request:{_tag:"Batch",operationName:void 0,query:T,hasMutations:h,variables:m},headers:{...Uf(FM(i)),...Uf(r.requestHeaders)},fetch:this.requestConfig.fetch??globalThis.fetch,method:this.requestConfig.method||"POST",fetchOptions:c,middleware:this.requestConfig.requestMiddleware});if(this.requestConfig.responseMiddleware&&await this.requestConfig.responseMiddleware(G,{operationName:void 0,variables:m,url:this.url}),G instanceof Error)throw G;return G.data}setHeaders(t){return this.requestConfig.headers=t,this}setHeader(t,n){const{headers:r}=this.requestConfig;return r?r[t]=n:this.requestConfig.headers={[t]:n},this}setEndpoint(t){return this.url=t,this}}async function rke(e,t,...n){const r=nae(e,t,...n);return new GraphQLClient(r.url).request({...r})}const tae=(e,t,n)=>e.document?e:{document:e,variables:t,requestHeaders:n,signal:void 0},nae=(e,t,...n)=>{const[r,i]=n;return typeof e=="string"?{url:e,document:t,variables:r,requestHeaders:i,signal:void 0}:e},ike=null,xi=`
|
|
12902
12902
|
fragment CodingFields on Coding {
|